mirror of
https://github.com/RaySollium99/picodrive.git
synced 2025-09-05 07:17:45 -04:00
fixes for idle and other stuff
This commit is contained in:
parent
8ad1d2adf2
commit
0219d379de
6 changed files with 26 additions and 14 deletions
|
@ -40012,20 +40012,18 @@ RET(8)
|
|||
}
|
||||
|
||||
|
||||
extern int SekIsIdleReady(void);
|
||||
extern int SekIsIdleCode(unsigned short *dst, int bytes);
|
||||
extern int SekRegisterIdlePatch(unsigned int pc, int oldop, int newop, void *ctx);
|
||||
|
||||
OPCODE(idle_detector_bcc8)
|
||||
{
|
||||
extern int idledet_start_frame;
|
||||
extern char Pico[];
|
||||
int frame_count, cond_true, bytes, ret, newop;
|
||||
u16 *dest_pc;
|
||||
|
||||
dest_pc = PC + (((s8)(Opcode & 0xFE)) >> 1);
|
||||
|
||||
frame_count = *(int *)(Pico+0x22208+0x1c); // Pico.m.frame_count
|
||||
if (frame_count < idledet_start_frame)
|
||||
if (!SekIsIdleReady())
|
||||
goto end;
|
||||
|
||||
bytes = 0 - (s8)(Opcode & 0xFE) - 2;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue