void MD_UpdateSubStuff(void) { int32 max_md_timestamp; max_md_timestamp = Main68K.timestamp * 7; if(zreset == 1 && zbusreq == 0) { z80_cycle_counter += max_md_timestamp - z80_last_ts; while(z80_cycle_counter > 0) { int32 z80_temp = z80_do_opcode() * 15; z80_cycle_counter -= z80_temp; md_timestamp += z80_temp; if(md_timestamp > max_md_timestamp) { //printf("Meow: %d\n", md_timestamp - max_md_timestamp); md_timestamp = max_md_timestamp; } MainVDP.Run(); } } z80_last_ts = max_md_timestamp; md_timestamp = max_md_timestamp; MainVDP.Run(); //if(MD_IsCD) // MDCD_Run(master_cycles); }
int Z80_RunOP(void) { if(!Z80Enabled) return(-1); return(z80_do_opcode()); }