idle loop hack, psp bugfix, plat debug str

git-svn-id: file:///home/notaz/opt/svn/PicoDrive@566 be3aeb3a-fb24-0410-a615-afba39da0efa
This commit is contained in:
notaz 2008-08-06 20:04:23 +00:00
parent a7efb231fe
commit fcf94fcc20
10 changed files with 39 additions and 15 deletions

View file

@ -99,19 +99,19 @@ cfi_loop:
.endm
idle_bra:
mov r5, #4
mov r5, #2
inc_counter
b Op6001
idle_bne:
msr cpsr_flg, r10 ;@ ARM flags = 68000 flags
movne r5, #4
msr cpsr_flg, r10
movne r5, #2 @ 2 is intentional due to strange timing issues
inc_counter ne
b Op6601
idle_beq:
msr cpsr_flg, r10 ;@ ARM flags = 68000 flags
moveq r5, #4
moveq r5, #2
inc_counter eq
b Op6701

View file

@ -262,6 +262,10 @@ typedef signed int s32;
goto famec_Exec;
#endif
#define RET0() \
m68kcontext.io_cycle_counter = -6; \
goto famec_End;
#else
#define NEXT \
@ -274,6 +278,10 @@ typedef signed int s32;
m68kcontext.io_cycle_counter -= (A); \
return;
#define RET0() \
m68kcontext.io_cycle_counter = -6; \
return;
#endif
#define M68K_PPL (m68kcontext.sr >> 8) & 7

View file

@ -19263,8 +19263,7 @@ OPCODE(0x4E72)
ASP = res;
}
m68kcontext.execinfo |= FM68K_HALTED;
m68kcontext.io_cycle_counter = 0;
RET(4)
RET0()
}
// RTE
@ -39984,8 +39983,7 @@ OPCODE(0x6001_idle)
PC += ((s8)(Opcode & 0xFE)) >> 1;
#endif
UPDATE_IDLE_COUNT
m68kcontext.io_cycle_counter = 10;
RET(10)
RET0()
}
// BCC
@ -39995,7 +39993,8 @@ OPCODE(0x6601_idle)
{
UPDATE_IDLE_COUNT
PC += ((s8)(Opcode & 0xFE)) >> 1;
m68kcontext.io_cycle_counter = 8;
//if (idle_hit)
RET0()
}
RET(8)
}
@ -40006,7 +40005,8 @@ OPCODE(0x6701_idle)
{
UPDATE_IDLE_COUNT
PC += ((s8)(Opcode & 0xFE)) >> 1;
m68kcontext.io_cycle_counter = 8;
//if (idle_hit)
RET0()
}
RET(8)
}