// initialize
// ----------------------------------------------------------------------------
-VM::VM(EMU* parent_emu) : VM_TEMPLATE(parent_emu)
+VM::VM(EMU_TEMPLATE* parent_emu) : VM_TEMPLATE(parent_emu)
{
// create devices
first_device = last_device = NULL;
fdc->set_context_noise_head_down(new NOISE(this, emu));
fdc->set_context_noise_head_up(new NOISE(this, emu));
#ifdef USE_DEBUGGER
- fdc->set_context_debugger(new DEBUGGER(this, emu));
+// fdc->set_context_debugger(new DEBUGGER(this, emu));
#endif
pcm = new PCM1BIT(this, emu);
#ifdef USE_DEBUGGER
- pcm->set_context_debugger(new DEBUGGER(this, emu));
+// pcm->set_context_debugger(new DEBUGGER(this, emu));
#endif
rtc = new RP5C01(this, emu); // RP-5C15
sasi_host = new SCSI_HOST(this, emu);
opn->write_signal(SIG_YM2203_PORT_B, (monitor_type & 2) ? 0x77 : 0x37, 0xff);
}
-void VM::special_reset()
+void VM::special_reset(int num)
{
// reset all devices
// for(DEVICE* device = first_device; device; device = device->next_device) {
// device->special_reset();
// }
- memory->special_reset();
+ memory->special_reset(num);
cpu->reset();
}
}
}
+double VM::get_current_usec()
+{
+ if(event == NULL) return 0.0;
+ return event->get_current_usec();
+}
+
+uint64_t VM::get_current_clock_uint64()
+{
+ if(event == NULL) return (uint64_t)0;
+ return event->get_current_clock_uint64();
+}
+
#define STATE_VERSION 8
bool VM::process_state(FILEIO* state_fio, bool loading)
// const char *name = typeid(*device).name();
// But, using get_device_name() instead of typeid(foo).name() 20181008 K.O
const char *name = device->get_device_name();
- int len = strlen(name);
+ int len = (int)strlen(name);
if(!state_fio->StateCheckInt32(len)) {
if(loading) {