Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix various bugs in NES NTSC filter and PPU palettes #31

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

Gumball2415
Copy link
Contributor

@Gumball2415 Gumball2415 commented Oct 22, 2023

This PR aims to fix some small bugs regarding NES NTSC filters.

Changes in this PR:

  • Correct dot crawl phase offset calculation
  • Use standard RGB-YIQ matrix coefficients for Bisqwit NTSC
  • Fix RGB PPU default palette emphasis behavior

@Gumball2415 Gumball2415 marked this pull request as ready for review October 25, 2023 07:08
@Gumball2415 Gumball2415 marked this pull request as draft October 25, 2023 07:24
@Gumball2415 Gumball2415 marked this pull request as ready for review October 27, 2023 18:21
@Gumball2415 Gumball2415 changed the title Fix various bugs in NES NTSC filters Fix various bugs in NES NTSC filter and PPU palettes Dec 11, 2023
- Thanks lidnariq!
- The new formula is based on the color generator clock cycle count per
  frame.
https://forums.nesdev.org/viewtopic.php?p=172817#p172817

Bisqwit originally intended to match a certain palette using different
display primaries ("FCC D65"). This resulted in colors that looked off.
The modification here is to more closely match Bisqwit's own palette
generator, which uses a more standard RGB-YIQ matrix.
at hue 0, saturation 1.0, contrast 1.0, brightness 1.0, gamma 2.2
https://bisqwit.iki.fi/utils/nespalette.php

IQ component coefficients are derived from the NTSC base matrix of
luminance and color-difference. with color reduction factors and an
additional 33 degree rotation of each respective component.
https://www.nesdev.org/wiki/NTSC_video#Converting_YUV_to_signal_RGB
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant