maincpu->set_context_bus_bs(g_mainstat, SIG_AND_BIT_1, 0xffffffff);
g_mainstat->set_context_out(mainio, FM7_MAINIO_RUN_Z80, 0xffffffff);
z80cpu->set_context_busack(mainio, FM7_MAINIO_RUN_6809, 0xffffffff);
+
mainio->set_context_z80cpu(z80cpu);
#endif
#if defined(_USE_QT)
} else if(index == 1) {
return subcpu;
}
-#if defined(_WITH_Z80)
+#if defined(WITH_Z80)
else if(index == 2) {
return z80cpu;
}
#endif
#if defined(_FM77AV_VARIANTS)
reg_fd12 = 0xbc; // 0b10111100
-#endif
+#endif
+#if defined(WITH_Z80)
+ z80->write_signal(SIG_CPU_BUSREQ, 0xffffffff, 0xffffffff);
+#endif
+ maincpu->write_signal(SIG_CPU_BUSREQ, 0, 0xffffffff);
+ maincpu->write_signal(SIG_CPU_HALTREQ, 0, 0xffffffff);
//#if defined(_FM8)
// bubble_casette[0]->reset();
// bubble_casette[1]->reset();
} else {
z80->write_signal(SIG_CPU_BUSREQ, 1, 1);
req_z80run = false;
+ z80_run = false;
+ maincpu->write_signal(SIG_CPU_HALTREQ, 0, 1);
+
}
#endif
}
break;
#if defined(WITH_Z80)
case FM7_MAINIO_RUN_Z80:
- if((req_z80run) && (val_b)) {
+ if((req_z80run)/* && (val_b) */) {
z80->write_signal(SIG_CPU_BUSREQ, 0, 1);
z80_run = true;
+ //z80->reset(); // OK?
}
break;
case FM7_MAINIO_RUN_6809:
- if(!(req_z80run) && (val_b) && (z80_run)) {
- maincpu->write_signal(SIG_CPU_BUSREQ, 0, 1);
+ if(!(req_z80run) /* && (val_b) */ && (z80_run)) {
+ maincpu->write_signal(SIG_CPU_HALTREQ, 0, 1);
+ //maincpu->write_signal(SIG_CPU_BUSREQ, 0, 1);
z80_run = false;
}
break;