-
-
Notifications
You must be signed in to change notification settings - Fork 77
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
Develop #283
Conversation
This file contains 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
HiROM | FastROM support
Modifies WaitForVBlank() so it can be called with any DB register value. Also documents that WaitForVBlank() will preserve A/X/Y registers.
The speed_change jsr in `_MouseRead` can crash if `mouseSpeedChange` is in a different bank to `_MouseRead`. speed_change has been changed to a child label to illuminate that `_MouseRead` is calling a subroutine outside of vblank.asm.
mouse_read has been moved to vblank.asm and the same comments already exist in vblank.asm.
Saves 2 cycles and matches the _GetScope call in the VBlank ISR.
Writes to nmi_handler are not atomic and the VBlank ISR can crash if a VBlank Interrupt occurs in the middle of the nmi_handler write. To fix this crash, nmiSet() is now a function that will temporarily disable interrupts so nmi_handler can be safely written to. This commit also modifies consoleInit() to use nmiSet().
* Test for lag-frames * Remove oamMemory DMA transfer (now handled by the VBlank ISR) * Remove snes_vblank_count++ (now handled by the VBlank ISR)
These functions did not multiply the argument by 2 when converting the `value` argument (0-4) to an X index register value (0, 2, 4, 6, 8).
I have tested and confirmed `padsDown(i) == pad_keysrepeat[i]` before making this change.
padsClear() is not clearing the high byte of the pad variables. Using long addressing is faster then changing DB register. Also: * Added bounds testing to padsClear() * padsClear() can be called with an 8 bit Index
* Document pad arrays. * pads*() value parameter is an index, not an address. * Clarify pads*() parameter range
It is only used in the NMI ISR and should not be used for IRQ interrupts.
Fixes potential memory corruption in NMI ISR.
The VBlank ISR changes the Direct Page Register to `tcc__registers_nmi_isr`. If `tcc__registers_nmi_isr` is not page aligned, a 1 cycle penalty will be applied to all direct-page instructions in the VBlank ISR (including the `nmi_handler`).
`vblank_flag` can be used to determine if it is OK to read from `bgInfo` in `myconsoleVblank()`.
Input fixes and VBlank ISR rewrite
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.
No description provided.