mirror of
https://github.com/ekeeke/Genesis-Plus-GX.git
synced 2024-09-10 16:53:15 +02:00
Fixed broken 68k address error emulation
This commit is contained in:
parent
49392b331e
commit
f78f3e605a
@ -520,11 +520,6 @@ void md_cart_init(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#if M68K_EMULATE_ADDRESS_ERROR
|
|
||||||
/* default behavior */
|
|
||||||
m68k.aerr_enabled = config.addr_error;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* detect specific mappers */
|
/* detect specific mappers */
|
||||||
if (strstr(rominfo.domestic,"SUPER STREET FIGHTER2") != NULL)
|
if (strstr(rominfo.domestic,"SUPER STREET FIGHTER2") != NULL)
|
||||||
{
|
{
|
||||||
|
@ -67,6 +67,7 @@ void gen_init(void)
|
|||||||
{
|
{
|
||||||
/* initialize main 68k */
|
/* initialize main 68k */
|
||||||
m68k_init();
|
m68k_init();
|
||||||
|
m68k.aerr_enabled = config.addr_error;
|
||||||
|
|
||||||
/* initialize main 68k memory map */
|
/* initialize main 68k memory map */
|
||||||
|
|
||||||
|
@ -39,9 +39,9 @@
|
|||||||
/* ================================ INCLUDES ============================== */
|
/* ================================ INCLUDES ============================== */
|
||||||
/* ======================================================================== */
|
/* ======================================================================== */
|
||||||
|
|
||||||
|
#include <setjmp.h>
|
||||||
#include "macros.h"
|
#include "macros.h"
|
||||||
|
|
||||||
|
|
||||||
/* ======================================================================== */
|
/* ======================================================================== */
|
||||||
/* ==================== ARCHITECTURE-DEPENDANT DEFINES ==================== */
|
/* ==================== ARCHITECTURE-DEPENDANT DEFINES ==================== */
|
||||||
/* ======================================================================== */
|
/* ======================================================================== */
|
||||||
@ -250,11 +250,10 @@ typedef struct
|
|||||||
uint int_mask; /* I0-I2 */
|
uint int_mask; /* I0-I2 */
|
||||||
uint int_level; /* State of interrupt pins IPL0-IPL2 -- ASG: changed from ints_pending */
|
uint int_level; /* State of interrupt pins IPL0-IPL2 -- ASG: changed from ints_pending */
|
||||||
uint stopped; /* Stopped state */
|
uint stopped; /* Stopped state */
|
||||||
#if M68K_EMULATE_PREFETCH
|
|
||||||
uint pref_addr; /* Last prefetch address */
|
uint pref_addr; /* Last prefetch address */
|
||||||
uint pref_data; /* Data in the prefetch queue */
|
uint pref_data; /* Data in the prefetch queue */
|
||||||
#endif
|
|
||||||
#if M68K_EMULATE_ADDRESS_ERROR
|
|
||||||
uint instr_mode; /* Stores whether we are in instruction mode or group 0/1 exception mode */
|
uint instr_mode; /* Stores whether we are in instruction mode or group 0/1 exception mode */
|
||||||
uint run_mode; /* Stores whether we are processing a reset, bus error, address error, or something else */
|
uint run_mode; /* Stores whether we are processing a reset, bus error, address error, or something else */
|
||||||
uint aerr_enabled; /* Enables/deisables address error checks at runtime */
|
uint aerr_enabled; /* Enables/deisables address error checks at runtime */
|
||||||
@ -262,27 +261,16 @@ typedef struct
|
|||||||
uint aerr_address; /* Address error location */
|
uint aerr_address; /* Address error location */
|
||||||
uint aerr_write_mode; /* Address error write mode */
|
uint aerr_write_mode; /* Address error write mode */
|
||||||
uint aerr_fc; /* Address error FC code */
|
uint aerr_fc; /* Address error FC code */
|
||||||
#endif
|
|
||||||
#if M68K_EMULATE_TRACE
|
|
||||||
uint tracing; /* Tracing enable flag */
|
uint tracing; /* Tracing enable flag */
|
||||||
#endif
|
|
||||||
#if M68K_EMULATE_FC
|
|
||||||
uint address_space; /* Current FC code */
|
uint address_space; /* Current FC code */
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Callbacks to host */
|
/* Callbacks to host */
|
||||||
#if M68K_EMULATE_INT_ACK == OPT_ON
|
|
||||||
int (*int_ack_callback)(int int_line); /* Interrupt Acknowledge */
|
int (*int_ack_callback)(int int_line); /* Interrupt Acknowledge */
|
||||||
#endif
|
|
||||||
#if M68K_EMULATE_RESET == OPT_ON
|
|
||||||
void (*reset_instr_callback)(void); /* Called when a RESET instruction is encountered */
|
void (*reset_instr_callback)(void); /* Called when a RESET instruction is encountered */
|
||||||
#endif
|
|
||||||
#if M68K_TAS_HAS_CALLBACK == OPT_ON
|
|
||||||
int (*tas_instr_callback)(void); /* Called when a TAS instruction is encountered, allows / disallows writeback */
|
int (*tas_instr_callback)(void); /* Called when a TAS instruction is encountered, allows / disallows writeback */
|
||||||
#endif
|
|
||||||
#if M68K_EMULATE_FC == OPT_ON
|
|
||||||
void (*set_fc_callback)(unsigned int new_fc); /* Called when the CPU function code changes */
|
void (*set_fc_callback)(unsigned int new_fc); /* Called when the CPU function code changes */
|
||||||
#endif
|
|
||||||
} m68ki_cpu_core;
|
} m68ki_cpu_core;
|
||||||
|
|
||||||
/* CPU cores */
|
/* CPU cores */
|
||||||
|
Loading…
Reference in New Issue
Block a user