Fixed FDS registers, and OAM Buffer#4637
Open
100thCoin wants to merge 1 commit intoTASEmulators:masterfrom
Open
Fixed FDS registers, and OAM Buffer#4637100thCoin wants to merge 1 commit intoTASEmulators:masterfrom
100thCoin wants to merge 1 commit intoTASEmulators:masterfrom
Conversation
FDS registers don't need to be "Activated" like the APU registers. After the OAM Address wraps around, writes to OAM2 are replaced with reads to OAM2. This was already being emulated, but importantly, the ppu continues reading from wherever the OAM2 address was.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A while back, I made changes to how APU registers are read. This is because APU registers are only readable if the 6502 address bus is within the range of $4000 to $401F. Unbeknownst to me, this change broke reads from the Famicom Disk System Registers. I have corrected that issue, and ran relevant tests.
Additionally, the primary purpose for me making this PR was to make a very small change to OAM evaluation, where writes to OAM2 become reads from OAM2. It was simply reading from OAM2[0] instead of using the OAM2 address, which I have corrected.
Relevant test for this OAM2 behavior. I'll admit that this isn't my most readable test. It just sets up OAM with a specific pattern, reads from $2004 on every ppu cycle of a specific scanline, (across a couple frames. This obviously cannot be done in a single frame) and then evaluates the results.
Previous results:

Error code 6 is pretty much saying that the data after those OAM2 writes become reads was incorrect.
After making this change:

Check if completed: