Mercurial > repos > blastem
diff sms.c @ 1507:2455662378ed mame_interp
Added MAME Z80 core, re-enabled 68K tracing in Musashi core, disabled a bunch of code gen stuff when using interpreters from MAME
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Sat, 30 Dec 2017 18:27:06 -0800 |
parents | c886c54d8cf1 |
children | b7ecd0d6a77b |
line wrap: on
line diff
--- a/sms.c Wed Dec 27 13:46:52 2017 -0800 +++ b/sms.c Sat Dec 30 18:27:06 2017 -0800 @@ -348,10 +348,12 @@ render_set_video_standard(VID_NTSC); while (!sms->should_return) { +#ifdef USE_NATIVE if (system->enter_debugger && sms->z80->pc) { system->enter_debugger = 0; zdebugger(sms->z80, sms->z80->pc); } +#endif if (sms->z80->nmi_start == CYCLE_NEVER) { uint32_t nmi = vdp_next_nmi(sms->vdp); if (nmi != CYCLE_NEVER) { @@ -366,6 +368,7 @@ vdp_run_context(sms->vdp, target_cycle); psg_run(sms->psg, target_cycle); +#ifdef USE_NATIVE if (system->save_state) { while (!sms->z80->pc) { //advance Z80 to an instruction boundary @@ -374,6 +377,7 @@ save_state(sms, system->save_state - 1); system->save_state = 0; } +#endif target_cycle += 3420*16; if (target_cycle > 0x10000000) { @@ -410,10 +414,12 @@ load_state_path(sms, statefile); } +#ifdef USE_NATIVE if (system->enter_debugger) { system->enter_debugger = 0; zinsert_breakpoint(sms->z80, sms->z80->pc, (uint8_t *)zdebugger); } +#endif run_sms(system); } @@ -422,7 +428,9 @@ { sms_context *sms = (sms_context *)system; z80_assert_reset(sms->z80, sms->z80->current_cycle); +#ifdef USE_NATIVE sms->z80->target_cycle = sms->z80->sync_cycle = sms->z80->current_cycle; +#endif } static void free_sms(system_header *system)