flipflop = new LS393(this, emu); // LS74
not_remote = new NOT(this, emu);
pcm = new PCM1BIT(this, emu);
+#ifdef USE_DEBUGGER
+ pcm->set_context_debugger(new DEBUGGER(this, emu));
+#endif
fdc = new UPD765A(this, emu);
+#ifdef USE_DEBUGGER
+ fdc->set_context_debugger(new DEBUGGER(this, emu));
+#endif
fdc->set_context_noise_seek(new NOISE(this, emu));
fdc->set_context_noise_head_down(new NOISE(this, emu));
fdc->set_context_noise_head_up(new NOISE(this, emu));
void VM::play_tape(int drv, const _TCHAR* file_path)
{
- drec->play_tape(file_path);
-// drec->set_remote(true);
+ bool remote = drec->get_remote();
+
+ if(drec->play_tape(file_path) && remote) {
+ // if machine already sets remote on, start playing now
+ push_play(drv);
+ }
}
void VM::rec_tape(int drv, const _TCHAR* file_path)
{
- drec->rec_tape(file_path);
-// drec->set_remote(true);
+ bool remote = drec->get_remote();
+
+ if(drec->rec_tape(file_path) && remote) {
+ // if machine already sets remote on, start recording now
+ push_play(drv);
+ }
}
void VM::close_tape(int drv)
emu->lock_vm();
drec->close_tape();
emu->unlock_vm();
-// drec->set_remote(false);
+ drec->set_remote(false);
}
bool VM::is_tape_inserted(int drv)
void VM::push_play(int drv)
{
+ drec->set_remote(false);
drec->set_ff_rew(0);
drec->set_remote(true);
}
void VM::push_fast_forward(int drv)
{
+ drec->set_remote(false);
drec->set_ff_rew(1);
drec->set_remote(true);
}
void VM::push_fast_rewind(int drv)
{
+ drec->set_remote(false);
drec->set_ff_rew(-1);
drec->set_remote(true);
}
}
}
// Machine specified.
- state_fio->StateInt32(boot_mode);
+ state_fio->StateValue(boot_mode);
return true;
}