void cpu_spinuntil_time(double duration) { static int timetrig = 0; cpu_spinuntil_trigger(TRIGGER_SUSPENDTIME + timetrig); cpu_triggertime(duration, TRIGGER_SUSPENDTIME + timetrig); timetrig = (timetrig + 1) & 255; }
void arkanoid_Z80_mcu_w(int offset,int data) { /* a write from the Z80 has occurred, mark it and remember the value */ z80write = 1; fromz80 = data; /* give up a little bit of time to let the 68705 detect the write */ cpu_spinuntil_trigger(700); }
void docastle_shared1_w(int offset,int data) { buffer1[offset] = data; if (offset == 8) { /* freeze execution of the master CPU until the slave has used the shared memory */ cpu_spinuntil_trigger(500); } }
void eolith_speedup_read(void) { /* for debug */ // if ((activecpu_get_pc()!=eolith_speedup_address) && (eolith_vblank!=1) ) // printf("%06x eolith speedup_read data %02x\n",activecpu_get_pc(), eolith_vblank); if (activecpu_get_pc()==eolith_speedup_address && eolith_vblank==0 && eolith_scanline < eolith_speedup_resume_scanline) { cpu_spinuntil_trigger(1000); } }
int docastle_shared0_r(int offset) { /* this shouldn't be done, however it's the only way I've found */ /* to make dip switches work in Do Run Run. */ if (offset == 8) { cpu_cause_interrupt(1,Z80_NMI_INT); cpu_spinuntil_trigger(500); } return buffer0[offset]; }
void cpu_spin(void) { cpu_spinuntil_trigger(TRIGGER_TIMESLICE); }
void cpu_spinuntil_int(void) { VERIFY_EXECUTINGCPU_VOID(cpu_spinuntil_int); cpu_spinuntil_trigger(TRIGGER_INT + activecpu); }