Created
November 16, 2017 09:41
-
-
Save tobiasvl/b27a3ac26acefb9e9c4f759725d58008 to your computer and use it in GitHub Desktop.
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
| ; C000 = Copy of OAM table | |
| InitSpriteDMA:: | |
| ; copy spritedma routine into hiram | |
| ld hl,SpriteDMA | |
| ld de,$FF80 | |
| ld bc,SpriteDMAEnd - SpriteDMA | |
| call mem_Copy | |
| ret | |
| ; SpriteDMA routine (copied to HiRAM at $FF80) | |
| SpriteDMA: | |
| ld a,$C0 | |
| ldh [rDMA],a | |
| ld a,$28 | |
| .lp | |
| dec a | |
| jr nz,.lp | |
| ret | |
| SpriteDMAEnd: | |
| VBlank_irq:: | |
| call $FF80 | |
| reti |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment