Make vblank overclock respect 7-bit sample state
This commit is contained in:
22
src/ppu.c
22
src/ppu.c
@@ -1153,11 +1153,12 @@ int FCEUPPU_Loop(int skip) {
|
|||||||
TriggerNMI();
|
TriggerNMI();
|
||||||
}
|
}
|
||||||
X6502_Run((scanlines_per_frame - 242) * (256 + 85) - 12);
|
X6502_Run((scanlines_per_frame - 242) * (256 + 85) - 12);
|
||||||
if (vblankscanlines)
|
if (overclock_state && vblankscanlines) {
|
||||||
{
|
if (!DMC_7bit || !skip_7bit_overclocking) {
|
||||||
overclocked = 1;
|
overclocked = 1;
|
||||||
X6502_Run(vblankscanlines * (256 + 85) - 12);
|
X6502_Run(vblankscanlines * (256 + 85) - 12);
|
||||||
overclocked = 0;
|
overclocked = 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
PPU_status &= 0x1f;
|
PPU_status &= 0x1f;
|
||||||
X6502_Run(256);
|
X6502_Run(256);
|
||||||
@@ -1231,20 +1232,13 @@ int FCEUPPU_Loop(int skip) {
|
|||||||
DoLine();
|
DoLine();
|
||||||
if (scanline < normal_scanlines || scanline == totalscanlines)
|
if (scanline < normal_scanlines || scanline == totalscanlines)
|
||||||
overclocked = 0;
|
overclocked = 0;
|
||||||
else
|
else {
|
||||||
{
|
|
||||||
if (DMC_7bit && skip_7bit_overclocking) /* 7bit sample started after 240th line */
|
if (DMC_7bit && skip_7bit_overclocking) /* 7bit sample started after 240th line */
|
||||||
break;
|
break;
|
||||||
overclocked = 1;
|
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);
|
|
||||||
FCEU_printf("extrascanlines:%d vblankscanlines:%d\n",extrascanlines,vblankscanlines);
|
|
||||||
*/
|
|
||||||
DMC_7bit = 0;
|
DMC_7bit = 0;
|
||||||
if (MMC5Hack && (ScreenON || SpriteON)) MMC5_hb(scanline);
|
if (MMC5Hack && (ScreenON || SpriteON)) MMC5_hb(scanline);
|
||||||
for (x = 1, max = 0, maxref = 0; x < 7; x++) {
|
for (x = 1, max = 0, maxref = 0; x < 7; x++) {
|
||||||
|
|||||||
Reference in New Issue
Block a user