notaz.gp2x.de
/
picodrive.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix ROM selector annoyance
[picodrive.git]
/
cpu
/
fame
/
famec_opcodes.h
diff --git
a/cpu/fame/famec_opcodes.h
b/cpu/fame/famec_opcodes.h
index
ecbc056
..
551d757
100644
(file)
--- a/
cpu/fame/famec_opcodes.h
+++ b/
cpu/fame/famec_opcodes.h
@@
-19263,8
+19263,7
@@
OPCODE(0x4E72)
ASP = res;
}
m68kcontext.execinfo |= FM68K_HALTED;
ASP = res;
}
m68kcontext.execinfo |= FM68K_HALTED;
- m68kcontext.io_cycle_counter = 0;
-RET(4)
+RET0()
}
// RTE
}
// RTE
@@
-39984,8
+39983,7
@@
OPCODE(0x6001_idle)
PC += ((s8)(Opcode & 0xFE)) >> 1;
#endif
UPDATE_IDLE_COUNT
PC += ((s8)(Opcode & 0xFE)) >> 1;
#endif
UPDATE_IDLE_COUNT
- m68kcontext.io_cycle_counter = 10;
-RET(10)
+RET0()
}
// BCC
}
// BCC
@@
-39995,7
+39993,8
@@
OPCODE(0x6601_idle)
{
UPDATE_IDLE_COUNT
PC += ((s8)(Opcode & 0xFE)) >> 1;
{
UPDATE_IDLE_COUNT
PC += ((s8)(Opcode & 0xFE)) >> 1;
- m68kcontext.io_cycle_counter = 8;
+ //if (idle_hit)
+ RET0()
}
RET(8)
}
}
RET(8)
}
@@
-40006,14
+40005,15
@@
OPCODE(0x6701_idle)
{
UPDATE_IDLE_COUNT
PC += ((s8)(Opcode & 0xFE)) >> 1;
{
UPDATE_IDLE_COUNT
PC += ((s8)(Opcode & 0xFE)) >> 1;
- m68kcontext.io_cycle_counter = 8;
+ //if (idle_hit)
+ RET0()
}
RET(8)
}
extern int SekIsIdleCode(unsigned short *dst, int bytes);
}
RET(8)
}
extern int SekIsIdleCode(unsigned short *dst, int bytes);
-extern int SekRegisterIdlePatch(unsigned int pc, int oldop, int newop);
+extern int SekRegisterIdlePatch(unsigned int pc, int oldop, int newop
, void *ctx
);
OPCODE(idle_detector_bcc8)
{
OPCODE(idle_detector_bcc8)
{
@@
-40032,18
+40032,22
@@
OPCODE(idle_detector_bcc8)
ret = SekIsIdleCode(dest_pc, bytes);
newop = (Opcode & 0xfe) | 0x7100;
if (!ret) newop |= 0x200;
ret = SekIsIdleCode(dest_pc, bytes);
newop = (Opcode & 0xfe) | 0x7100;
if (!ret) newop |= 0x200;
- if (Opcode & 0x0100) newop |= 0x400; // beq
+ if ( Opcode & 0x0100) newop |= 0x400; // beq
+ if (!(Opcode & 0x0f00)) newop |= 0xc00; // bra
- ret = SekRegisterIdlePatch(GET_PC - 2, Opcode, newop);
+ ret = SekRegisterIdlePatch(GET_PC - 2, Opcode, newop
, &m68kcontext
);
switch (ret)
{
case 0: PC[-1] = newop; break;
case 1: break;
switch (ret)
{
case 0: PC[-1] = newop; break;
case 1: break;
- case 2: JumpTable[Opcode] = (Opcode & 0x0100) ? CAST_OP(0x6701) : CAST_OP(0x6601); break;
+ case 2: JumpTable[Opcode] = (Opcode & 0x0f00) ?
+ ((Opcode & 0x0100) ? CAST_OP(0x6701) : CAST_OP(0x6601)) :
+ CAST_OP(0x6001); break;
}
end:
}
end:
- cond_true = (Opcode & 0x0100) ? !flag_NotZ : flag_NotZ; // beq?
+ if ((Opcode & 0xff00) == 0x6000) cond_true = 1;
+ else cond_true = (Opcode & 0x0100) ? !flag_NotZ : flag_NotZ; // beq?
if (cond_true)
{
PC = dest_pc;
if (cond_true)
{
PC = dest_pc;
@@
-40052,14
+40056,4
@@
end:
RET(8)
}
RET(8)
}
-OPCODE(idle_detector_dead)
-{
- // patch without further questions
- int newop = 0x7d00 | (Opcode & 0xff);
- PC[-1] = newop;
- SekRegisterIdlePatch(GET_PC - 2, Opcode, newop);
-
- PC += ((s8)(Opcode & 0xFE)) >> 1;
-RET(10)
-}
#endif // PICODRIVE_HACK
#endif // PICODRIVE_HACK