Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- LoadEDTile: ; 675b (1:675b)
- ; In Red/Blue, the bank for the ED_tile was defined incorrectly as bank0
- ; Luckily, the MBC3 treats loading $0 into $2000-$2fff range as loading bank1 into $4000-$7fff range
- ; Because Yellow uses the MBC5, loading $0 into $2000 - $2fff range will load bank0 instead of bank1 and thus incorrectly load the tile
- ; Instead of defining the correct bank, GameFreak decided to simply copy the ED_Tile in the function during HBlank
- ld de, ED_Tile
- ld hl, vFont + $700
- ld c, $4 ; number of copies needed
- .waitForHBlankLoop
- ld a, [rSTAT]
- and %10 ; in HBlank?
- jr nz, .waitForHBlankLoop
- ld a, [de]
- ld [hli], a
- ld [hli], a
- inc de
- ld a, [de]
- ld [hli], a
- ld [hli], a
- inc de
- dec c
- jr nz, .waitForHBlankLoop
- ret
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement