diff options
author | entrpntr <entrpntr@gmail.com> | 2020-03-31 14:15:21 -0400 |
---|---|---|
committer | entrpntr <entrpntr@gmail.com> | 2020-03-31 14:39:28 -0400 |
commit | 95d7d56581a9de9c62ab805a872d5900ff12e8ef (patch) | |
tree | 9e872b5df6b688f3a3b3dd119d60e0263a95f90a /macros/data.asm | |
parent | 93578c2ffd08f4917badc1be42d8d683e2ca0634 (diff) |
Disassemble pic banks.
Diffstat (limited to 'macros/data.asm')
-rwxr-xr-x | macros/data.asm | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/macros/data.asm b/macros/data.asm index 32903b0f..c0ada7f7 100755 --- a/macros/data.asm +++ b/macros/data.asm @@ -81,8 +81,19 @@ rept _NARG endr ENDM +; Reverses FixPicBank in engine/gfx/load_pics.asm +; +; Takes the actual bank of the pic in the ROM and returns the "defined" bank +; $1f -> $13 +; $20 -> $14 +; $2e -> $1f +; +; Otherwise, the ROM bank will match the defined bank. dba_pic: MACRO ; dbw bank, address - db BANK(\1) - PICS_FIX + db (BANK(\1) == $1f) * ($13 - $1f) \ + + (BANK(\1) == $20) * ($14 - $20) \ + + (BANK(\1) == $2e) * ($1f - $2e) \ + + (BANK(\1)) dw \1 ENDM |