Skip to content

Commit

Permalink
NES: FDS - Tweak disk load timing to prevent a bug in Ai Senshi Nicol
Browse files Browse the repository at this point in the history
  • Loading branch information
SourMesen committed Jan 13, 2024
1 parent e3076c6 commit 4b94902
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion Core/NES/Mappers/FDS/Fds.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,13 @@ void Fds::ProcessCpuClock()
//Wait a bit before ejecting the disk (eject in ~77 frames)
_autoDiskEjectCounter = 77;
} else {
_delay = 150;
//This delay used to be 150, but this triggers a bug in Ai Senshi Nicol
//during the transition from level 2 to 3 - the 150 value causes an NMI
//to occur between 2 writes to $2006 (vram addr), which ends up breaking
//the PPU update logic and causes broken graphics when stage 3 loads
//Both 149 or 151 fix the issue because they change the timing enough
//that the NMI no longer interrupts the vram update routine.
_delay = 149;
}
}
}
Expand Down

0 comments on commit 4b94902

Please sign in to comment.