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

Some minor accuracy fixes pertaining to audio & rendering #425

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jimmy-dsi
Copy link

Hello,

I've added some changes to fix a few of the minor emulation inaccuracies I've noticed. Here are the main ones:

  • The functionality of the BG clipping and Sprite clipping now work independently of each other, and the leftmost column now shows the BG color instead of a solid black (except for when TV clipping is enabled).
  • Interpolation has been removed from the triangle channel so that it retains its characteristic "stair-step" wave pattern.
  • Fixed an issue with the rightmost column of the screen not rendering correctly when TV clipping is disabled.
  • All APU channels are now center-panned by default.
  • NTSC palette modified to align more closely with the actual NTSC colors.

I've also added on a few small extra features:

  • In addition to the APU panning table, I've added an APU volume mixer table, plus a table of "channel enable" flags, intended to be enabled/disable by the user via a GUI (and function independently of the register-controlled isEnabled flags).
  • Added an "onFrameStart" callback option to the NES object, which is triggered when the top scanline is rendered as opposed to the bottom scanline like "onFrame".
  • The TV clipping PPU flag has now been split into 2 separate flags for horizontal and vertical clipping. Only vertical is enabled by default.

@viktoras25
Copy link

Thanks! Works great for me. Clipping was so annoying!

this.stereoPosRTriangle = this.masterVolume - this.stereoPosLTriangle;
this.stereoPosRNoise = this.masterVolume - this.stereoPosLNoise;
this.stereoPosRDMC = this.masterVolume - this.stereoPosLDMC;
this.stereoPosLSquare1 = (this.panning[0] * this.volume[0] * +this.enabled[0] * this.masterVolume) >> 8;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

code format should be same with before

Copy link

@ZhaoTonggang ZhaoTonggang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I applied your modification and it was a great experience! thank you very much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants