-
Notifications
You must be signed in to change notification settings - Fork 852
Open
Labels
accuracyHardware accuracy improvementHardware accuracy improvementbugcomponent: ppuPPU / graphics (ppu/)PPU / graphics (ppu/)difficulty: easySmall, localized change (1-2 lines)Small, localized change (1-2 lines)priority: lowMinor inaccuracy or code quality issueMinor inaccuracy or code quality issue
Description
Summary
Three small PPU issues:
1. Odd-frame cycle skip is dead code (ppu/index.js:402-406)
dummyCycleToggle is initialized to false and never set to true anywhere, so odd frames are never shortened by 1 dot. Real NTSC NES alternates between 341-dot and 340-dot frames (when rendering is enabled).
2. Monochrome mode background color is nonsensical (ppu/index.js:502-527)
When f_dispType === 1 (monochrome), the code picks hardcoded RGB colors (green, blue, red) based on the emphasis bits. Real hardware doesn't work this way — emphasis attenuates color channels regardless of greyscale mode.
3. Sprite 0 hit missing left-column and x=255 checks
Per nesdev, sprite 0 hit should not fire when:
- Background or sprite left-column clipping is active (left 8 pixels hidden via PPUMASK bits 1-2)
- At x=255
The current checkSprite0() doesn't check these conditions.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
accuracyHardware accuracy improvementHardware accuracy improvementbugcomponent: ppuPPU / graphics (ppu/)PPU / graphics (ppu/)difficulty: easySmall, localized change (1-2 lines)Small, localized change (1-2 lines)priority: lowMinor inaccuracy or code quality issueMinor inaccuracy or code quality issue