Sonic CD runs on GP2X

git-svn-id: file:///home/notaz/opt/svn/PicoDrive@21 be3aeb3a-fb24-0410-a615-afba39da0efa
This commit is contained in:
notaz 2007-01-19 22:08:50 +00:00
parent d1df87866b
commit b837b69b3f
20 changed files with 364 additions and 184 deletions

View file

@ -319,14 +319,16 @@ static void OtherWrite8(u32 a,u32 d,int realsize)
//int lineCycles=(488-SekCyclesLeft)&0x1ff;
d&=1; d^=1;
if(!d) {
// hack: detect a nasty situation where Z80 was enabled and disabled in the same 68k timeslice (Golden Axe III)
// if((PicoOpt&4) && Pico.m.z80Run==1) z80_run(20); // FIXME: movies
z80stopCycle = SekCyclesDone();
//z80ExtraCycles += (lineCycles>>1)-(lineCycles>>5); // only meaningful in PicoFrameHints()
// this is for a nasty situation where Z80 was enabled and disabled in the same 68k timeslice (Golden Axe III)
if (Pico.m.z80Run) {
int lineCycles=(488-SekCyclesLeft)&0x1ff;
z80stopCycle = SekCyclesDone();
lineCycles=(lineCycles>>1)-(lineCycles>>5);
z80_run(lineCycles);
}
} else {
z80startCycle = SekCyclesDone();
//if(Pico.m.scanline != -1)
//z80ExtraCycles -= (lineCycles>>1)-(lineCycles>>5)+16;
}
dprintf("set_zrun: %02x [%i|%i] @%06x", d, Pico.m.scanline, SekCyclesDone(), /*mz80GetRegisterValue(NULL, 0),*/ SekPc);
Pico.m.z80Run=(u8)d; return;
@ -621,7 +623,7 @@ static void CPU_CALL PicoWrite32(u32 a,u32 d)
// -----------------------------------------------------------------
int PicoMemInit()
void PicoMemSetup()
{
#ifdef EMU_C68K
// Setup memory callbacks:
@ -633,7 +635,6 @@ int PicoMemInit()
PicoCpu.write16=PicoWrite16;
PicoCpu.write32=PicoWrite32;
#endif
return 0;
}
#ifdef EMU_A68K