X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?p=fceu.git;a=blobdiff_plain;f=fce.c;h=73e884535139aae631bb7d13e456d7bfdf1aa1f1;hp=2e4af6d6367668ce539971018ef77e9c4d45bab5;hb=a384bf449483e62637ce05a60ff4b06730a19934;hpb=6244011fd85a10400accd6d8e7d941144f92aa5b diff --git a/fce.c b/fce.c index 2e4af6d..73e8845 100644 --- a/fce.c +++ b/fce.c @@ -28,6 +28,7 @@ #include "fce.h" #include "fceu098.h" #include "sound.h" +#include "sound098.h" #include "svga.h" #include "netplay.h" #include "general.h" @@ -1265,22 +1266,26 @@ void FCEUI_Kill(void) static void EmLoop(void); +int use098code = 0; void (*ResetNES)(void) = 0; void (*PowerNES)(void) = 0; void (*FCEUI_Emulate)(void) = 0; void FCEUI_SetEmuMode(int is_new) { + use098code = is_new; if (is_new) { ResetNES=ResetNES098; PowerNES=PowerNES098; + SetSoundVariables=SetSoundVariables098; FCEUI_Emulate=FCEUI_Emulate098; } else { ResetNES=ResetNES081; PowerNES=PowerNES081; + SetSoundVariables=SetSoundVariables081; FCEUI_Emulate=EmLoop; } } @@ -1355,7 +1360,10 @@ static void EmLoop(void) if(ppudead) /* Needed for Knight Rider, possibly others. */ { //memset(XBuf, 0, 320*240); - X6502_Run(scanlines_per_frame*(256+85)); + //X6502_Run(scanlines_per_frame*(256+85)); + int lines; + for (lines=scanlines_per_frame;lines;lines--) + X6502_Run(256+85); ppudead--; goto update; }