diff --git a/Makefile.common b/Makefile.common index d1b6c78..506a5e7 100644 --- a/Makefile.common +++ b/Makefile.common @@ -44,6 +44,7 @@ SOURCES_C += \ $(SOURCE_DIR)/cpu_cores/eighty/z80_ops.c \ $(SOURCE_DIR)/cpu_cores/eighty/z80_wrap.c else +CFLAGS += -DUSE_Z80 SOURCES_C += $(SOURCE_DIR)/cpu_cores/z80/z80.c endif diff --git a/source/ports/libretro/libretro_state.c b/source/ports/libretro/libretro_state.c index fa1bc94..ee2a165 100644 --- a/source/ports/libretro/libretro_state.c +++ b/source/ports/libretro/libretro_state.c @@ -69,7 +69,10 @@ void system_load_state_mem(void) /* Load Z80 context */ state_read(Z80_Context, sizeof(z80_t)); + +#ifdef USE_Z80 Z80.irq_callback = sms_irq_callback; +#endif /* Load YM2413 context */ state_read(YM2413_GetContextPtr(), YM2413_GetContextSize());