mirror of
https://github.com/RaySollium99/picodrive.git
synced 2025-10-27 13:38:51 +01:00
FAMEC idle loops, PSP port sync, minor adjustments
git-svn-id: file:///home/notaz/opt/svn/PicoDrive@525 be3aeb3a-fb24-0410-a615-afba39da0efa
This commit is contained in:
parent
b06778874d
commit
c060a9ab9c
23 changed files with 408 additions and 155 deletions
15
Pico/Sek.c
15
Pico/Sek.c
|
|
@ -182,6 +182,7 @@ PICO_INTERNAL void SekSetRealTAS(int use_real)
|
|||
static int *idledet_addrs = NULL;
|
||||
static int idledet_count = 0, idledet_bads = 0;
|
||||
int idledet_start_frame = 0;
|
||||
int jumptab[0x10000];
|
||||
|
||||
static unsigned char *rom_verify = NULL;
|
||||
|
||||
|
|
@ -202,6 +203,10 @@ void SekInitIdleDet(void)
|
|||
#ifdef EMU_C68K
|
||||
CycloneInitIdle();
|
||||
#endif
|
||||
#ifdef EMU_F68K
|
||||
{ extern void *get_jumptab(void); memcpy(jumptab, get_jumptab(), sizeof(jumptab)); }
|
||||
fm68k_emulate(0, 0, 1);
|
||||
#endif
|
||||
}
|
||||
|
||||
int SekIsIdleCode(unsigned short *dst, int bytes)
|
||||
|
|
@ -275,6 +280,9 @@ void SekFinishIdleDet(void)
|
|||
int done_something = idledet_count > 0;
|
||||
#ifdef EMU_C68K
|
||||
CycloneFinishIdle();
|
||||
#endif
|
||||
#ifdef EMU_F68K
|
||||
fm68k_emulate(0, 0, 2);
|
||||
#endif
|
||||
while (idledet_count > 0)
|
||||
{
|
||||
|
|
@ -291,10 +299,15 @@ void SekFinishIdleDet(void)
|
|||
|
||||
if (done_something)
|
||||
{
|
||||
int i;
|
||||
int i, *jt;
|
||||
extern void *get_jumptab(void);
|
||||
for (i = 0; i < Pico.romsize; i++)
|
||||
if (rom_verify[i] != Pico.rom[i])
|
||||
printf("ROM corruption @ %06x!\n", i), exit(1);
|
||||
|
||||
jt = get_jumptab();
|
||||
for (i = 0; i < 0x10000; i++)
|
||||
if (jumptab[i] != jt[i]) { printf("jumptab broken @ %04x\n", i); exit(1); }
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue