fix overclock buffer overflow
This commit is contained in:
19
src/ppu.c
19
src/ppu.c
@@ -662,8 +662,15 @@ static void Fixit1(void) {
|
||||
|
||||
void MMC5_hb(int); //Ugh ugh ugh.
|
||||
static void DoLine(void) {
|
||||
if (scanline >= 240 && scanline != totalscanlines) {
|
||||
X6502_Run(256 + 69);
|
||||
scanline++;
|
||||
X6502_Run(16);
|
||||
return;
|
||||
}
|
||||
|
||||
int x;
|
||||
uint8 *target = XBuf + (scanline << 8);
|
||||
uint8 *target = XBuf + ((scanline < 240 ? scanline : 240) << 8);
|
||||
|
||||
if (MMC5Hack && (ScreenON || SpriteON)) MMC5_hb(scanline);
|
||||
|
||||
@@ -1231,11 +1238,11 @@ int FCEUPPU_Loop(int skip) {
|
||||
overclocked = 1;
|
||||
}
|
||||
}
|
||||
/* For Debugging
|
||||
* FCEU_printf("Overclock State:%d DMC+7bit:%d Skip_7bit_OC:%d\n",
|
||||
* overclock_state,DMC_7bit,skip_7bit_overclocking);
|
||||
* FCEU_printf("SL:%d N_SL:%d, T_SL:%d Overclocked(for FCEU_SoundCPUHook):%d\n\n",
|
||||
* scanline,normal_scanlines,totalscanlines,overclocked);
|
||||
/* For Debugging */
|
||||
/* FCEU_printf("Overclock State:%d DMC+7bit:%d Skip_7bit_OC:%d\n",
|
||||
overclock_state,DMC_7bit,skip_7bit_overclocking);
|
||||
FCEU_printf("SL:%d N_SL:%d, T_SL:%d Overclocked(for FCEU_SoundCPUHook):%d\n\n",
|
||||
scanline,normal_scanlines,totalscanlines,overclocked);
|
||||
*/
|
||||
DMC_7bit = 0;
|
||||
if (MMC5Hack && (ScreenON || SpriteON)) MMC5_hb(scanline);
|
||||
|
||||
Reference in New Issue
Block a user