X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?p=fceu.git;a=blobdiff_plain;f=fce.c;h=e36a86cdf5da867c2618479d09247dcd0eb8cb4d;hp=561661a8493bc742bc493c487d357b2c23e524a3;hb=a7de43667532d3b5423a59092213b50ae6485aab;hpb=4fdfab079f3f006ae215ab453072a25588aa951d diff --git a/fce.c b/fce.c index 561661a..e36a86c 100644 --- a/fce.c +++ b/fce.c @@ -97,7 +97,7 @@ void (*GameInterface)(int h); void FP_FASTAPASS(1) (*PPU_hook)(uint32 A); void (*GameStateRestore)(int version); -void (*GameHBIRQHook)(void); +void (*GameHBIRQHook)(void), (*GameHBIRQHook2)(void); readfunc ARead[0x10000]; writefunc BWrite[0x10000]; @@ -973,6 +973,8 @@ static void DoHBlank(void) Fixit2(); X6502_Run(85-6-16); } + if(GameHBIRQHook2 && (ScreenON || SpriteON)) + GameHBIRQHook2(); //PPU_hook(0,-1); //fprintf(stderr,"%3d: $%04x\n",scanline,RefreshAddr); scanline++; @@ -1044,7 +1046,7 @@ void ResetGameLoaded(void) if(GameLoaded) CloseGame(); GameStateRestore=0; PPU_hook=0; - GameHBIRQHook=0; + GameHBIRQHook=GameHBIRQHook2=0; GameExpSound.Fill=0; GameExpSound.RChange=0; if(GameExpSound.Kill) @@ -1063,6 +1065,10 @@ void ResetGameLoaded(void) } char lastLoadedGameName [2048]; +int UNIFLoad(const char *name, int fp); +int iNESLoad(const char *name, int fp); +int FDSLoad(const char *name, int fp); +int NSFLoad(int fp); FCEUGI *FCEUI_LoadGame(char *name) { @@ -1255,8 +1261,12 @@ void EmLoop(void) X6502_Run(256); { if(ScreenON || SpriteON) + { if(GameHBIRQHook) GameHBIRQHook(); + if(GameHBIRQHook2) + GameHBIRQHook2(); + } X6502_Run(85-16); @@ -1416,3 +1426,26 @@ void PowerNES(void) X6502_Power(); } + +/* savestate stuff */ +uint16 TempAddrT,RefreshAddrT; + +SFORMAT FCEUPPU_STATEINFO[]={ + { NTARAM, 0x800, "NTAR"}, + { PALRAM, 0x20, "PRAM"}, + { SPRAM, 0x100, "SPRA"}, + { PPU, 0x4, "PPUR"}, + { &XOffset, 1, "XOFF"}, + { &vtoggle, 1, "VTOG"}, + { &RefreshAddrT, 2|RLSB, "RADD"}, + { &TempAddrT, 2|RLSB, "TADD"}, + { &VRAMBuffer, 1, "VBUF"}, + { &PPUGenLatch, 1, "PGEN"}, + // from 0.98.15 + { &kook, 1, "KOOK"}, + { &ppudead, 1, "DEAD"}, + { &PPUSPL, 1, "PSPL"}, + { 0 } + }; + +