mirror of
https://github.com/RetroDECK/Supermodel.git
synced 2024-11-25 23:25:40 +00:00
68K now uses run-time hooks for IRQ and instruction hook callbacks
This commit is contained in:
parent
33c04ce345
commit
121f81c742
|
@ -1,7 +1,7 @@
|
||||||
/**
|
/**
|
||||||
** Supermodel
|
** Supermodel
|
||||||
** A Sega Model 3 Arcade Emulator.
|
** A Sega Model 3 Arcade Emulator.
|
||||||
** Copyright 2011 Bart Trzynadlowski, Nik Henson
|
** Copyright 2003-2022 The Supermodel Team
|
||||||
**
|
**
|
||||||
** This file is part of Supermodel.
|
** This file is part of Supermodel.
|
||||||
**
|
**
|
||||||
|
@ -303,6 +303,7 @@ bool M68KInit(void)
|
||||||
s_Bus = NULL;
|
s_Bus = NULL;
|
||||||
#ifdef SUPERMODEL_DEBUGGER
|
#ifdef SUPERMODEL_DEBUGGER
|
||||||
s_Debug = NULL;
|
s_Debug = NULL;
|
||||||
|
m68k_set_instr_hook_callback(M68KDebugCallback);
|
||||||
#endif // SUPERMODEL_DEBUGGER
|
#endif // SUPERMODEL_DEBUGGER
|
||||||
DebugLog("Initialized 68K\n");
|
DebugLog("Initialized 68K\n");
|
||||||
return OKAY;
|
return OKAY;
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
/**
|
/**
|
||||||
** Supermodel
|
** Supermodel
|
||||||
** A Sega Model 3 Arcade Emulator.
|
** A Sega Model 3 Arcade Emulator.
|
||||||
** Copyright 2011 Bart Trzynadlowski, Nik Henson
|
** Copyright 2003-2022 The Supermodel Team
|
||||||
**
|
**
|
||||||
** This file is part of Supermodel.
|
** This file is part of Supermodel.
|
||||||
**
|
**
|
||||||
|
@ -96,8 +96,8 @@
|
||||||
* If off, all interrupts will be autovectored and all interrupt requests will
|
* If off, all interrupts will be autovectored and all interrupt requests will
|
||||||
* auto-clear when the interrupt is serviced.
|
* auto-clear when the interrupt is serviced.
|
||||||
*/
|
*/
|
||||||
#define M68K_EMULATE_INT_ACK OPT_SPECIFY_HANDLER
|
#define M68K_EMULATE_INT_ACK OPT_ON
|
||||||
#define M68K_INT_ACK_CALLBACK(A) M68KIRQCallback(A)
|
#define M68K_INT_ACK_CALLBACK(A) your_int_ack_handler_function(A)
|
||||||
|
|
||||||
|
|
||||||
/* If ON, CPU will call the breakpoint acknowledge callback when it encounters
|
/* If ON, CPU will call the breakpoint acknowledge callback when it encounters
|
||||||
|
@ -116,7 +116,7 @@
|
||||||
* instruction.
|
* instruction.
|
||||||
*/
|
*/
|
||||||
#define M68K_EMULATE_RESET OPT_OFF
|
#define M68K_EMULATE_RESET OPT_OFF
|
||||||
#define M68K_RESET_CALLBACK() M68KResetCallback()
|
#define M68K_RESET_CALLBACK() your_reset_instr_handler_function()
|
||||||
|
|
||||||
|
|
||||||
/* If ON, CPU will call the callback when it encounters a cmpi.l #v, dn
|
/* If ON, CPU will call the callback when it encounters a cmpi.l #v, dn
|
||||||
|
@ -154,12 +154,12 @@
|
||||||
* instruction.
|
* instruction.
|
||||||
*/
|
*/
|
||||||
#ifdef SUPERMODEL_DEBUGGER
|
#ifdef SUPERMODEL_DEBUGGER
|
||||||
#define M68K_INSTRUCTION_HOOK OPT_SPECIFY_HANDLER
|
#define M68K_INSTRUCTION_HOOK OPT_ON
|
||||||
#define M68K_INSTRUCTION_CALLBACK() M68KDebugCallback()
|
|
||||||
#else
|
#else
|
||||||
#define M68K_INSTRUCTION_HOOK OPT_OFF
|
#define M68K_INSTRUCTION_HOOK OPT_OFF
|
||||||
|
#endif // SUPERMODEL_DEBUGGER
|
||||||
#define M68K_INSTRUCTION_CALLBACK() your_instruction_hook_function()
|
#define M68K_INSTRUCTION_CALLBACK() your_instruction_hook_function()
|
||||||
#endif // SUPERMODEL_DEBUGGER
|
|
||||||
|
|
||||||
/* If ON, the CPU will emulate the 4-byte prefetch queue of a real 68000 */
|
/* If ON, the CPU will emulate the 4-byte prefetch queue of a real 68000 */
|
||||||
#define M68K_EMULATE_PREFETCH OPT_OFF
|
#define M68K_EMULATE_PREFETCH OPT_OFF
|
||||||
|
|
Loading…
Reference in a new issue