mirror of
https://github.com/RaySollium99/picodrive.git
synced 2025-09-05 07:17:45 -04:00
workaround idledet breaking op test
This commit is contained in:
parent
c6e1e9779a
commit
2b15cea82e
2 changed files with 9 additions and 0 deletions
|
@ -18574,6 +18574,10 @@ RET(8)
|
||||||
// ILLEGAL
|
// ILLEGAL
|
||||||
OPCODE(0x4AFC)
|
OPCODE(0x4AFC)
|
||||||
{
|
{
|
||||||
|
#ifdef PICODRIVE_HACK
|
||||||
|
extern void SekFinishIdleDet(void);
|
||||||
|
SekFinishIdleDet();
|
||||||
|
#endif
|
||||||
SET_PC(execute_exception(M68K_ILLEGAL_INSTRUCTION_EX, GET_PC-2, GET_SR));
|
SET_PC(execute_exception(M68K_ILLEGAL_INSTRUCTION_EX, GET_PC-2, GET_SR));
|
||||||
RET(0)
|
RET(0)
|
||||||
}
|
}
|
||||||
|
|
|
@ -60,6 +60,8 @@ static int SekUnrecognizedOpcode()
|
||||||
PicoCpuCM68k.state_flags |= 1;
|
PicoCpuCM68k.state_flags |= 1;
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
// happened once - may happen again
|
||||||
|
SekFinishIdleDet();
|
||||||
#ifdef EMU_M68K // debugging cyclone
|
#ifdef EMU_M68K // debugging cyclone
|
||||||
{
|
{
|
||||||
extern int have_illegal;
|
extern int have_illegal;
|
||||||
|
@ -421,6 +423,8 @@ int SekRegisterIdlePatch(unsigned int pc, int oldop, int newop, void *ctx)
|
||||||
|
|
||||||
void SekFinishIdleDet(void)
|
void SekFinishIdleDet(void)
|
||||||
{
|
{
|
||||||
|
if (idledet_count < 0)
|
||||||
|
return;
|
||||||
#ifdef EMU_C68K
|
#ifdef EMU_C68K
|
||||||
CycloneFinishIdle();
|
CycloneFinishIdle();
|
||||||
#endif
|
#endif
|
||||||
|
@ -439,6 +443,7 @@ void SekFinishIdleDet(void)
|
||||||
else
|
else
|
||||||
elprintf(EL_STATUS|EL_IDLE, "idle: don't know how to restore %04x", *op);
|
elprintf(EL_STATUS|EL_IDLE, "idle: don't know how to restore %04x", *op);
|
||||||
}
|
}
|
||||||
|
idledet_count = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue