• R/O
  • HTTP
  • SSH
  • HTTPS

common_source_project-fm7: Commit

Common Source Code Project for Qt (a.k.a for FM-7).


Commit MetaInfo

Revisionbae0d67985f7e093591809d0222981108e1dda3c (tree)
Zeit2022-11-28 00:58:18
AutorK.Ohta <whatisthis.sowhat@gmai...>
CommiterK.Ohta

Log Message

[VM][FMTOWNS] Apply NEW APIs.

Ändern Zusammenfassung

Diff

--- a/source/src/vm/fmtowns/fmtowns.cpp
+++ b/source/src/vm/fmtowns/fmtowns.cpp
@@ -125,7 +125,7 @@ VM::VM(EMU_TEMPLATE* parent_emu) : VM_TEMPLATE(parent_emu)
125125 */
126126
127127 // create devices
128- first_device = last_device = NULL;
128+ //first_device = last_device = nullptr;
129129 dummy = new DEVICE(this, emu); // must be 1st device
130130 event = new EVENT(this, emu); // must be 2nd device
131131 #if defined(_USE_QT)
@@ -188,7 +188,7 @@ VM::VM(EMU_TEMPLATE* parent_emu) : VM_TEMPLATE(parent_emu)
188188 scsi_host = new SCSI_HOST(this, emu);
189189
190190 for(int i = 0; i < 7; i++) {
191- scsi_hdd[i] = NULL;
191+ scsi_hdd[i] = nullptr;
192192 }
193193 #if defined(USE_HARD_DISK)
194194 for(int i = 0; i < USE_HARD_DISK; i++) {
@@ -215,7 +215,7 @@ VM::VM(EMU_TEMPLATE* parent_emu) : VM_TEMPLATE(parent_emu)
215215 #if 0
216216 iccard2 = new TOWNS_ICCARD(this, emu);
217217 #else
218- iccard2 = NULL;
218+ iccard2 = nullptr;
219219 #endif
220220 for(int i = 0; i < 2; i++) {
221221 joypad_2btn[i] = new JOYPAD_2BTN(this, emu);
@@ -458,7 +458,7 @@ VM::VM(EMU_TEMPLATE* parent_emu) : VM_TEMPLATE(parent_emu)
458458 cpu->set_context_io(io);
459459 cpu->set_context_intr(pic);
460460 cpu->set_context_dma(dma);
461- cpu->set_context_bios(NULL);
461+ cpu->set_context_bios(nullptr);
462462 cpu->set_context_extreset(memory, SIG_FMTOWNS_NOTIFY_RESET, 0xffffffff);
463463 #ifdef USE_DEBUGGER
464464 cpu->set_context_debugger(new DEBUGGER(this, emu));
@@ -652,7 +652,7 @@ VM::VM(EMU_TEMPLATE* parent_emu) : VM_TEMPLATE(parent_emu)
652652 // Vram allocation may be before initialize().
653653 // initialize all devices
654654 #if defined(__GIT_REPO_VERSION)
655- strncpy(_git_revision, __GIT_REPO_VERSION, sizeof(_git_revision) - 1);
655+ set_git_repo_version(__GIT_REPO_VERSION);
656656 #endif
657657 // ToDo : Use config framework
658658 int exram_size = config.current_ram_size;
@@ -688,71 +688,53 @@ VM::VM(EMU_TEMPLATE* parent_emu) : VM_TEMPLATE(parent_emu)
688688 cpu->device_model = INTEL_80386;
689689 #endif
690690
691- for(DEVICE* device = first_device; device; device = device->next_device) {
692- device->initialize();
693- }
691+ initialize_devices();
694692 // cpu->set_address_mask(0xffffffff);
695693 }
696694
697695 VM::~VM()
698696 {
699697 // delete all devices
700- for(DEVICE* device = first_device; device;) {
701- DEVICE *next_device = device->next_device;
702-// printf("DEVID=%d\n", device->this_device_id);
703- device->release();
704- delete device;
705- device = next_device;
706- }
707-}
708-
709-DEVICE* VM::get_device(int id)
710-{
711- for(DEVICE* device = first_device; device; device = device->next_device) {
712- if(device->this_device_id == id) {
713- return device;
714- }
715- }
716- return NULL;
698+ release_devices();
717699 }
718700
719701 void VM::set_machine_type(uint16_t machine_id, uint16_t cpu_id)
720702 {
721- if(memory != NULL) {
703+ if(memory != nullptr) {
722704 memory->set_cpu_id(cpu_id);
723705 memory->set_machine_id(machine_id);
724706 }
725- if(crtc != NULL) {
707+ if(crtc != nullptr) {
726708 crtc->set_cpu_id(cpu_id);
727709 crtc->set_machine_id(machine_id);
728710 }
729- if(timer != NULL) {
711+ if(timer != nullptr) {
730712 timer->set_cpu_id(cpu_id);
731713 timer->set_machine_id(machine_id);
732714 }
733- if(cdrom != NULL) {
715+ if(cdrom != nullptr) {
734716 cdrom->set_cpu_id(cpu_id);
735717 cdrom->set_machine_id(machine_id);
736718 }
737- if(scsi != NULL) {
719+ if(scsi != nullptr) {
738720 scsi->set_cpu_id(cpu_id);
739721 scsi->set_machine_id(machine_id);
740722 }
741- if(serialrom != NULL) {
723+ if(serialrom != nullptr) {
742724 serialrom->set_cpu_id(cpu_id);
743725 serialrom->set_machine_id(machine_id);
744726 }
745- if(floppy != NULL) {
727+ if(floppy != nullptr) {
746728 floppy->set_cpu_id(cpu_id);
747729 floppy->set_machine_id(machine_id);
748730 }
749731 #if defined(HAS_20PIX_FONTS)
750- if(fontrom_20pix != NULL) {
732+ if(fontrom_20pix != nullptr) {
751733 fontrom_20pix->set_cpu_id(cpu_id);
752734 fontrom_20pix->set_machine_id(machine_id);
753735 }
754736 #endif
755- if(vram != NULL) {
737+ if(vram != nullptr) {
756738 vram->set_cpu_id(cpu_id);
757739 vram->set_machine_id(machine_id);
758740 }
@@ -768,28 +750,38 @@ void VM::reset()
768750 {
769751 // reset all devices
770752 boot_seq = false;
771- for(DEVICE* device = first_device; device; device = device->next_device) {
772- device->reset();
773- }
753+ VM_TEMPLATE::reset();
774754 // cpu->set_address_mask(0xffffffff);
775755 }
776756
777757 void VM::special_reset(int num)
778758 {
779- // reset all devices
780759 boot_seq = true;
781-
782- for(DEVICE* device = first_device; device; device = device->next_device) {
783- device->reset();
784- }
785- keyboard->special_reset(num);
786760
787-// cpu->set_address_mask(0xffffffff);
761+ // reset all devices
762+ VM_TEMPLATE::reset();
763+ // cpu->set_address_mask(0xffffffff);
764+ if(keyboard != nullptr) {
765+ keyboard->special_reset(num);
766+ }
788767 }
789768
790769 void VM::run()
791770 {
792- event->drive();
771+ if(event != nullptr) {
772+ event->drive();
773+ }
774+}
775+void VM::process_boot_sequence(uint32_t val)
776+{
777+ if(boot_seq) {
778+ if(val != 0) {
779+ if(keyboard != nullptr) {
780+ keyboard->write_signal(SIG_KEYBOARD_BOOTSEQ_END, 0xffffffff, 0xffffffff);
781+ }
782+ boot_seq = false;
783+ }
784+ }
793785 }
794786
795787 // ----------------------------------------------------------------------------
@@ -802,7 +794,7 @@ DEVICE *VM::get_cpu(int index)
802794 if(index == 0) {
803795 return cpu;
804796 }
805- return NULL;
797+ return nullptr;
806798 }
807799 #endif
808800
@@ -812,28 +804,19 @@ DEVICE *VM::get_cpu(int index)
812804
813805 void VM::draw_screen()
814806 {
815- crtc->draw_screen();
816-}
817-
818-uint32_t VM::is_floppy_disk_accessed()
819-{
820- uint32_t val = fdc->read_signal(0);
821- if(boot_seq) {
822- if(val != 0) {
823- keyboard->write_signal(SIG_KEYBOARD_BOOTSEQ_END, 0xffffffff, 0xffffffff);
824- boot_seq = false;
825- }
807+ if(crtc != nullptr) {
808+ crtc->draw_screen();
826809 }
827- return val;
828810 }
829811
812+
830813 // ----------------------------------------------------------------------------
831814 // soud manager
832815 // ----------------------------------------------------------------------------
833816
834817 void VM::initialize_sound(int rate, int samples)
835818 {
836- emu->lock_vm();
819+// emu->lock_vm();
837820 // init sound manager
838821 event->initialize_sound(rate, samples);
839822
@@ -864,21 +847,29 @@ void VM::initialize_sound(int rate, int samples)
864847 line_in_ch = event->add_sound_in_source(rate, samples, 2);
865848 mixer->set_context_line_in(line_in_ch, rate, samples);
866849 #endif
867- emu->unlock_vm();
850+// emu->unlock_vm();
868851 }
869852
870853 uint16_t* VM::create_sound(int* extra_frames)
871854 {
872- return event->create_sound(extra_frames);
855+ if(event != nullptr) {
856+ return event->create_sound(extra_frames);
857+ }
858+ return VM_TEMPLATE::create_sound(extra_frames);
873859 }
874860
875861 int VM::get_sound_buffer_ptr()
876862 {
877- return event->get_sound_buffer_ptr();
863+ if(event != nullptr) {
864+ return event->get_sound_buffer_ptr();
865+ }
866+ return VM_TEMPLATE::get_sound_buffer_ptr();
878867 }
879868
880869 void VM::clear_sound_in()
881870 {
871+ if(event == nullptr) return;
872+
882873 event->clear_sound_in_source(adc_in_ch);
883874 event->clear_sound_in_source(mic_in_ch);
884875 event->clear_sound_in_source(line_in_ch);
@@ -887,7 +878,7 @@ void VM::clear_sound_in()
887878
888879 int VM::get_sound_in_data(int ch, int32_t* dst, int expect_samples, int expect_rate, int expect_channels)
889880 {
890- if(dst == NULL) return 0;
881+ if(dst == nullptr) return 0;
891882 if(expect_samples <= 0) return 0;
892883 int n_ch = -1;
893884 switch(ch) {
@@ -902,7 +893,10 @@ int VM::get_sound_in_data(int ch, int32_t* dst, int expect_samples, int expect_r
902893 break;
903894 }
904895 if(n_ch < 0) return 0;
905- int samples = event->get_sound_in_data(n_ch, dst, expect_samples, expect_rate, expect_channels);
896+ int samples = 0;
897+ if(event != nullptr) {
898+ samples = event->get_sound_in_data(n_ch, dst, expect_samples, expect_rate, expect_channels);
899+ }
906900 return samples;
907901 }
908902
@@ -925,11 +919,10 @@ int VM::sound_in(int ch, int32_t* src, int samples)
925919 if(n_ch < 0) return 0;
926920
927921 int ss = 0;
928- {
922+ if(event != nullptr) {
929923 emu->lock_vm();
930924 ss = event->write_sound_in_buffer(n_ch, src, samples);
931925 emu->unlock_vm();
932-
933926 }
934927 return ss;
935928 }
@@ -938,7 +931,7 @@ int VM::sound_in(int ch, int32_t* src, int samples)
938931 void VM::open_hard_disk(int drv, const _TCHAR* file_path)
939932 {
940933 if((drv < USE_HARD_DISK) && (drv < 8) && (drv >= 0)) {
941- if(scsi_hdd[drv] != NULL) {
934+ if(scsi_hdd[drv] != nullptr) {
942935 scsi_hdd[drv]->open(0, file_path, 512);
943936 }
944937 }
@@ -947,7 +940,7 @@ void VM::open_hard_disk(int drv, const _TCHAR* file_path)
947940 void VM::close_hard_disk(int drv)
948941 {
949942 if((drv < USE_HARD_DISK) && (drv < 8) && (drv >= 0)) {
950- if(scsi_hdd[drv] != NULL) {
943+ if(scsi_hdd[drv] != nullptr) {
951944 scsi_hdd[drv]->close(0);
952945 }
953946 }
@@ -956,7 +949,7 @@ void VM::close_hard_disk(int drv)
956949 bool VM::is_hard_disk_inserted(int drv)
957950 {
958951 if((drv < USE_HARD_DISK) && (drv < 8) && (drv >= 0)) {
959- if(scsi_hdd[drv] != NULL) {
952+ if(scsi_hdd[drv] != nullptr) {
960953 return scsi_hdd[drv]->mounted(0);
961954 }
962955 }
@@ -968,46 +961,41 @@ uint32_t VM::is_hard_disk_accessed()
968961 uint32_t status = 0;
969962
970963 for(int drv = 0; drv < USE_HARD_DISK; drv++) {
971- if(scsi_hdd[drv] != NULL) {
964+ if(scsi_hdd[drv] != nullptr) {
972965 if(scsi_hdd[drv]->accessed(0)) {
973966 status |= 1 << drv;
974967 }
975968 }
976969 }
977- if(boot_seq) {
978- if(status != 0) {
979- keyboard->write_signal(SIG_KEYBOARD_BOOTSEQ_END, 0xffffffff, 0xffffffff);
980- boot_seq = false;
981- }
982- }
970+ process_boot_sequence(1);
983971 return status;
984972 }
985973 #endif // USE_HARD_DISK
986974
987975 void VM::open_compact_disc(int drv, const _TCHAR* file_path)
988976 {
989- cdrom->open(file_path);
977+ if(cdrom != nullptr) {
978+ cdrom->open(file_path);
979+ }
990980 }
991981
992982 void VM::close_compact_disc(int drv)
993983 {
994- cdrom->close();
984+ if(cdrom != nullptr) {
985+ cdrom->close();
986+ }
995987 }
996988
997989 bool VM::is_compact_disc_inserted(int drv)
998990 {
991+ if(cdrom == nullptr) return false;
999992 return cdrom->mounted();
1000993 }
1001994
1002995 uint32_t VM::is_compact_disc_accessed()
1003996 {
1004997 uint32_t status = cdrom->accessed();
1005- if(boot_seq) {
1006- if(status != 0) {
1007- keyboard->write_signal(SIG_KEYBOARD_BOOTSEQ_END, 0xffffffff, 0xffffffff);
1008- boot_seq = false;
1009- }
1010- }
998+ process_boot_sequence(1);
1011999 return status;
10121000 }
10131001
@@ -1027,28 +1015,38 @@ void VM::set_sound_device_volume(int ch, int decibel_l, int decibel_r)
10271015 // if(ch >= 10) ch++;
10281016 #endif
10291017 if(ch == 0) { // BEEP
1030- beep->set_volume(0, decibel_l, decibel_r);
1018+ if(beep != nullptr) {
1019+ beep->set_volume(0, decibel_l, decibel_r);
1020+ }
10311021 }
10321022 else if(ch == 1) { // CD-ROM
10331023 if(e_volumes[1] != nullptr) {
10341024 e_volumes[1]->set_volumes(0, decibel_l, 1, decibel_r);
1035- } else {
1025+ } else if(cdrom != nullptr) {
10361026 cdrom->set_volume(0, decibel_l, decibel_r);
10371027 }
10381028 }
10391029 else if(ch == 2) { // OPN2
1040- opn2->set_volume(0, decibel_l, decibel_r);
1030+ if(opn2 != nullptr) {
1031+ opn2->set_volume(0, decibel_l, decibel_r);
1032+ }
10411033 }
10421034 else if(ch == 3) { // ADPCM
1043- rf5c68->set_volume(0, decibel_l, decibel_r);
1035+ if(rf5c68 != nullptr) {
1036+ rf5c68->set_volume(0, decibel_l, decibel_r);
1037+ }
10441038 }
10451039 else if(ch == 4) { // SEEK, HEAD UP / DOWN
1046- seek_sound->set_volume(0, decibel_l, decibel_r);
1047- head_up_sound->set_volume(0, decibel_l, decibel_r);
1048- head_down_sound->set_volume(0, decibel_l, decibel_r);
1040+ if(seek_sound != nullptr) {
1041+ seek_sound->set_volume(0, decibel_l, decibel_r);
1042+ }
1043+ if(head_up_sound != nullptr) {
1044+ head_up_sound->set_volume(0, decibel_l, decibel_r);
1045+ }
1046+ if(head_down_sound != nullptr) {
1047+ head_down_sound->set_volume(0, decibel_l, decibel_r);
1048+ }
10491049 }
1050-
1051-
10521050 }
10531051 #endif
10541052
@@ -1058,12 +1056,16 @@ void VM::set_sound_device_volume(int ch, int decibel_l, int decibel_r)
10581056
10591057 void VM::key_down(int code, bool repeat)
10601058 {
1061- keyboard->key_down(code);
1059+ if(keyboard != nullptr) {
1060+ keyboard->key_down(code);
1061+ }
10621062 }
10631063
10641064 void VM::key_up(int code)
10651065 {
1066- keyboard->key_up(code);
1066+ if(keyboard != nullptr) {
1067+ keyboard->key_up(code);
1068+ }
10671069 }
10681070
10691071 // ----------------------------------------------------------------------------
@@ -1073,12 +1075,12 @@ void VM::open_cart(int drv, const _TCHAR* file_path)
10731075 {
10741076 switch(drv) {
10751077 case 0:
1076- if(iccard1 != NULL) {
1078+ if(iccard1 != nullptr) {
10771079 iccard1->open_cart(file_path);
10781080 }
10791081 break;
10801082 case 1:
1081- if(iccard2 != NULL) {
1083+ if(iccard2 != nullptr) {
10821084 iccard2->open_cart(file_path);
10831085 }
10841086 break;
@@ -1089,12 +1091,12 @@ void VM::close_cart(int drv)
10891091 {
10901092 switch(drv) {
10911093 case 0:
1092- if(iccard1 != NULL) {
1094+ if(iccard1 != nullptr) {
10931095 iccard1->close_cart();
10941096 }
10951097 break;
10961098 case 1:
1097- if(iccard2 != NULL) {
1099+ if(iccard2 != nullptr) {
10981100 iccard2->close_cart();
10991101 }
11001102 break;
@@ -1105,12 +1107,12 @@ bool VM::is_cart_inserted(int drv)
11051107 {
11061108 switch(drv) {
11071109 case 0:
1108- if(iccard1 != NULL) {
1110+ if(iccard1 != nullptr) {
11091111 return iccard1->is_cart_inserted();
11101112 }
11111113 break;
11121114 case 1:
1113- if(iccard2 != NULL) {
1115+ if(iccard2 != nullptr) {
11141116 return iccard2->is_cart_inserted();
11151117 }
11161118 break;
@@ -1121,89 +1123,88 @@ bool VM::is_cart_inserted(int drv)
11211123 void VM::open_floppy_disk(int drv, const _TCHAR* file_path, int bank)
11221124 {
11231125
1124- fdc->open_disk(drv, file_path, bank);
1125- floppy->change_disk(drv);
1126+ if(fdc != nullptr) {
1127+ fdc->open_disk(drv, file_path, bank);
1128+ floppy->change_disk(drv);
1129+ }
11261130 }
11271131
11281132 void VM::close_floppy_disk(int drv)
11291133 {
1130- fdc->close_disk(drv);
1131-// floppy->change_disk(drv);
1134+ if(fdc != nullptr) {
1135+ fdc->close_disk(drv);
1136+ // floppy->change_disk(drv);
1137+ }
1138+}
1139+uint32_t VM::is_floppy_disk_accessed()
1140+{
1141+ uint32_t val = fdc->read_signal(0);
1142+ process_boot_sequence(val);
1143+ return val;
11321144 }
11331145
11341146 bool VM::is_floppy_disk_inserted(int drv)
11351147 {
1136- return fdc->is_disk_inserted(drv);
1148+ if(fdc != nullptr) {
1149+ return fdc->is_disk_inserted(drv);
1150+ }
1151+ return VM_TEMPLATE::is_floppy_disk_inserted(drv);
11371152 }
11381153
11391154 void VM::is_floppy_disk_protected(int drv, bool value)
11401155 {
1141- fdc->is_disk_protected(drv, value);
1156+ if(fdc != nullptr) {
1157+ fdc->is_disk_protected(drv, value);
1158+ }
11421159 }
11431160
11441161 bool VM::is_floppy_disk_protected(int drv)
11451162 {
1146- return fdc->is_disk_protected(drv);
1163+ if(fdc != nullptr) {
1164+ return fdc->is_disk_protected(drv);
1165+ }
1166+ return VM_TEMPLATE::is_floppy_disk_protected(drv);
11471167 }
11481168
11491169 bool VM::is_frame_skippable()
11501170 {
1151- return event->is_frame_skippable();
1152-}
1153-
1154-void VM::update_config()
1155-{
1156- for(DEVICE* device = first_device; device; device = device->next_device) {
1157- device->update_config();
1171+ if(event != nullptr) {
1172+ return event->is_frame_skippable();
11581173 }
1174+ return VM_TEMPLATE::is_frame_skippable();
11591175 }
11601176
1177+
11611178 double VM::get_current_usec()
11621179 {
1163- if(event == NULL) return 0.0;
1164- return event->get_current_usec();
1180+ if(event != nullptr) {
1181+ return event->get_current_usec();
1182+ }
1183+ return VM_TEMPLATE::get_current_usec();
11651184 }
11661185
11671186 uint64_t VM::get_current_clock_uint64()
11681187 {
1169- if(event == NULL) return (uint64_t)0;
1188+ if(event != nullptr) {
11701189 return event->get_current_clock_uint64();
1190+ }
1191+ return VM_TEMPLATE::get_current_clock_uint64();
11711192 }
11721193
11731194 #define STATE_VERSION 4
11741195
11751196 bool VM::process_state(FILEIO* state_fio, bool loading)
11761197 {
1177- if(!state_fio->StateCheckUint32(STATE_VERSION)) {
1178- return false;
1179- }
1180- for(DEVICE* device = first_device; device; device = device->next_device) {
1181- const _TCHAR *name = char_to_tchar(typeid(*device).name() + 6); // skip "class "
1182- int len = (int)_tcslen(name);
1183-
1184- if(!state_fio->StateCheckInt32(len)) {
1185- if(loading) {
1186- printf("Class name len Error: DEVID=%d EXPECT=%s\n", device->this_device_id, name);
1187- }
1188- return false;
1189- }
1190- if(!state_fio->StateCheckBuffer(name, len, 1)) {
1191- if(loading) {
1192- printf("Class name Error: DEVID=%d EXPECT=%s\n", device->this_device_id, name);
1193- }
1194- return false;
1195- }
1196- if(!device->process_state(state_fio, loading)) {
1197- if(loading) {
1198- printf("Data loading Error: DEVID=%d\n", device->this_device_id);
1199- }
1200- return false;
1201- }
1202- }
1198+ if(!(VM_TEMPLATE::process_state_core(state_fio, loading, STATE_VERSION))) {
1199+ return false;
1200+ }
1201+
12031202 // Machine specified.
1204-
12051203 state_fio->StateValue(boot_seq);
12061204
1205+ if(loading) {
1206+ update_config();
1207+ }
12071208 return true;
12081209 }
12091210
--- a/source/src/vm/fmtowns/fmtowns.h
+++ b/source/src/vm/fmtowns/fmtowns.h
@@ -454,6 +454,7 @@ protected:
454454 scrntype_t *d_renderbuffer[2][2]; // [bank][layer]
455455 uint32_t renderbuffer_size[2][2];
456456 */
457+ virtual void process_boot_sequence(uint32_t val);
457458 public:
458459 // ----------------------------------------
459460 // initialize
@@ -467,64 +468,62 @@ public:
467468 // ----------------------------------------
468469
469470 // drive virtual machine
470- void reset();
471- void special_reset(int num);
472- void run();
471+ void reset() override;
472+ void special_reset(int num) override;
473+ void run() override;
473474
474475 #ifdef USE_DEBUGGER
475476 // debugger
476- DEVICE *get_cpu(int index);
477+ DEVICE *get_cpu(int index) override;
477478 #endif
478479
479480 // draw screen
480- void draw_screen();
481+ void draw_screen() override;
481482
482483 // sound generation
483- void initialize_sound(int rate, int samples);
484- uint16_t* create_sound(int* extra_frames);
485- int get_sound_buffer_ptr();
484+ void initialize_sound(int rate, int samples) override;
485+ uint16_t* create_sound(int* extra_frames) override;
486+ int get_sound_buffer_ptr() override;
486487 #ifdef USE_SOUND_VOLUME
487- void set_sound_device_volume(int ch, int decibel_l, int decibel_r);
488+ void set_sound_device_volume(int ch, int decibel_l, int decibel_r) override;
488489 #endif
489490
490491 // notify key
491- void key_down(int code, bool repeat);
492- void key_up(int code);
492+ void key_down(int code, bool repeat) override;
493+ void key_up(int code) override;
493494
494495 // user interface
495496 // CARTs are IC CARD.Will implement something :-)
496- void open_cart(int drv, const _TCHAR* file_path);
497- void close_cart(int drv);
498- bool is_cart_inserted(int drv);
497+ void open_cart(int drv, const _TCHAR* file_path) override;
498+ void close_cart(int drv) override;
499+ bool is_cart_inserted(int drv) override;
499500
500- void open_floppy_disk(int drv, const _TCHAR* file_path, int bank);
501- void close_floppy_disk(int drv);
502- uint32_t is_floppy_disk_accessed();
503- bool is_floppy_disk_inserted(int drv);
504- void is_floppy_disk_protected(int drv, bool value);
505- bool is_floppy_disk_protected(int drv);
506- bool is_frame_skippable();
507-
508- void open_compact_disc(int drv, const _TCHAR* file_path);
509- void close_compact_disc(int drv);
510- bool is_compact_disc_inserted(int drv);
511- uint32_t is_compact_disc_accessed();
501+ void open_floppy_disk(int drv, const _TCHAR* file_path, int bank) override;
502+ void close_floppy_disk(int drv) override;
503+ uint32_t is_floppy_disk_accessed() override;
504+ bool is_floppy_disk_inserted(int drv) override;
505+ void is_floppy_disk_protected(int drv, bool value) override;
506+ bool is_floppy_disk_protected(int drv) override;
507+ bool is_frame_skippable() override;
508+
509+ void open_compact_disc(int drv, const _TCHAR* file_path) override;
510+ void close_compact_disc(int drv) override;
511+ bool is_compact_disc_inserted(int drv) override;
512+ uint32_t is_compact_disc_accessed() override;
512513 #if defined(USE_HARD_DISK)
513- void open_hard_disk(int drv, const _TCHAR* file_path);
514- void close_hard_disk(int drv);
515- bool is_hard_disk_inserted(int drv);
516- uint32_t is_hard_disk_accessed();
514+ void open_hard_disk(int drv, const _TCHAR* file_path) override;
515+ void close_hard_disk(int drv) override;
516+ bool is_hard_disk_inserted(int drv) override;
517+ uint32_t is_hard_disk_accessed() override;
517518 #endif
518519 void set_machine_type(uint16_t machine_id, uint16_t cpu_id);
519-
520520 void clear_sound_in();
521521 int get_sound_in_data(int ch, int32_t* dst, int expect_samples, int expect_rate, int expect_channels);
522522 int sound_in(int ch, int32_t* src, int samples);
523523
524- double get_current_usec();
525- uint64_t get_current_clock_uint64();
524+ double get_current_usec() override;
525+ uint64_t get_current_clock_uint64() override;
526526
527- void update_config();
528527 bool process_state(FILEIO* state_fio, bool loading);
529528
530529 // ----------------------------------------
@@ -532,9 +531,8 @@ public:
532531 // ----------------------------------------
533532
534533 // devices
535- DEVICE* get_device(int id);
534+ //DEVICE* get_device(int id);
536535 //DEVICE* dummy;
537536 //DEVICE* first_device;
538537 //DEVICE* last_device;
539538 };
540-
Show on old repository browser