Label scratch space and a bunch of box lists.

This commit is contained in:
yenatch
2015-08-19 21:51:04 -07:00
parent 038166f97c
commit 9e3bd6cb9b
5 changed files with 134 additions and 134 deletions

View File

@@ -982,7 +982,7 @@ BattleAnimCmd_DD: ; cc640 (33:4640)
GetSubstitutePic: ; cc64c GetSubstitutePic: ; cc64c
ld hl, $a000 ld hl, sScratch
ld bc, $310 ld bc, $310
.loop .loop
xor a xor a
@@ -997,40 +997,40 @@ GetSubstitutePic: ; cc64c
jr z, .player jr z, .player
ld hl, MonsterSpriteGFX ld hl, MonsterSpriteGFX
ld de, $a000 + $130 ld de, sScratch + $130
call CopyMonsterSpriteTile call CopyMonsterSpriteTile
ld hl, MonsterSpriteGFX + $10 ld hl, MonsterSpriteGFX + $10
ld de, $a000 + $1a0 ld de, sScratch + $1a0
call CopyMonsterSpriteTile call CopyMonsterSpriteTile
ld hl, MonsterSpriteGFX + $20 ld hl, MonsterSpriteGFX + $20
ld de, $a000 + $140 ld de, sScratch + $140
call CopyMonsterSpriteTile call CopyMonsterSpriteTile
ld hl, MonsterSpriteGFX + $30 ld hl, MonsterSpriteGFX + $30
ld de, $a000 + $1b0 ld de, sScratch + $1b0
call CopyMonsterSpriteTile call CopyMonsterSpriteTile
ld hl, $9000 ld hl, $9000
ld de, $a000 ld de, sScratch
lb bc, BANK(GetSubstitutePic), 7 * 7 lb bc, BANK(GetSubstitutePic), 7 * 7
call Request2bpp call Request2bpp
jr .done jr .done
.player .player
ld hl, MonsterSpriteGFX + $40 ld hl, MonsterSpriteGFX + $40
ld de, $a000 + $100 ld de, sScratch + $100
call CopyMonsterSpriteTile call CopyMonsterSpriteTile
ld hl, MonsterSpriteGFX + $50 ld hl, MonsterSpriteGFX + $50
ld de, $a000 + $160 ld de, sScratch + $160
call CopyMonsterSpriteTile call CopyMonsterSpriteTile
ld hl, MonsterSpriteGFX + $60 ld hl, MonsterSpriteGFX + $60
ld de, $a000 + $110 ld de, sScratch + $110
call CopyMonsterSpriteTile call CopyMonsterSpriteTile
ld hl, MonsterSpriteGFX + $70 ld hl, MonsterSpriteGFX + $70
ld de, $a000 + $170 ld de, sScratch + $170
call CopyMonsterSpriteTile call CopyMonsterSpriteTile
ld hl, $9310 ld hl, $9310
ld de, $a000 ld de, sScratch
lb bc, BANK(GetSubstitutePic), 6 * 6 lb bc, BANK(GetSubstitutePic), 6 * 6
call Request2bpp call Request2bpp
@@ -1061,7 +1061,7 @@ BattleAnimCmd_E2: ; cc6cf (33:46cf)
ret ret
GetMinimizePic: ; cc6e7 (33:46e7) GetMinimizePic: ; cc6e7 (33:46e7)
ld hl, $a000 ld hl, sScratch
ld bc, $310 ld bc, $310
.loop .loop
xor a xor a
@@ -1078,7 +1078,7 @@ GetMinimizePic: ; cc6e7 (33:46e7)
ld de, $a1a0 ld de, $a1a0
call CopyMinimizePic call CopyMinimizePic
ld hl, $9000 ld hl, $9000
ld de, $a000 ld de, sScratch
lb bc, BANK(GetMinimizePic), $31 lb bc, BANK(GetMinimizePic), $31
ret ret
@@ -1086,7 +1086,7 @@ GetMinimizePic: ; cc6e7 (33:46e7)
ld de, $a160 ld de, $a160
call CopyMinimizePic call CopyMinimizePic
ld hl, $9310 ld hl, $9310
ld de, $a000 ld de, sScratch
lb bc, BANK(GetMinimizePic), $24 lb bc, BANK(GetMinimizePic), $24
ret ret

View File

@@ -2421,12 +2421,12 @@ Function4143b: ; 4143b
ret ret
.asm_4145b .asm_4145b
ld a, $0 ld a, BANK(sScratch)
call GetSRAMBank call GetSRAMBank
callba Function1de0d7 callba Function1de0d7
ld hl, VTiles2 ld hl, VTiles2
ld de, $a000 ld de, sScratch
ld c, $31 ld c, 7 * 7
ld a, [hROMBank] ld a, [hROMBank]
ld b, a ld b, a
call Get2bpp call Get2bpp

View File

@@ -137,15 +137,15 @@ Functione6c:: ; e6c
Functione73:: ; e73 Functione73:: ; e73
push de push de
ld a, $0 ld a, BANK(sScratch)
call GetSRAMBank call GetSRAMBank
push bc push bc
ld de, $a000 ld de, sScratch
ld a, b ld a, b
call FarDecompress call FarDecompress
pop bc pop bc
pop hl pop hl
ld de, $a000 ld de, sScratch
call Request2bpp call Request2bpp
call CloseSRAM call CloseSRAM
ret ret

226
main.asm
View File

@@ -10055,20 +10055,20 @@ Functione5d9: ; e5d9
; e66e ; e66e
Unknown_e66e: ; e66e Unknown_e66e: ; e66e
dbw 2, $a000 dbw BANK(sBox1), sBox1
dbw 2, $a450 dbw BANK(sBox2), sBox2
dbw 2, $a8a0 dbw BANK(sBox3), sBox3
dbw 2, $acf0 dbw BANK(sBox4), sBox4
dbw 2, $b140 dbw BANK(sBox5), sBox5
dbw 2, $b590 dbw BANK(sBox6), sBox6
dbw 2, $b9e0 dbw BANK(sBox7), sBox7
dbw 3, $a000 dbw BANK(sBox8), sBox8
dbw 3, $a450 dbw BANK(sBox9), sBox9
dbw 3, $a8a0 dbw BANK(sBox10), sBox10
dbw 3, $acf0 dbw BANK(sBox11), sBox11
dbw 3, $b140 dbw BANK(sBox12), sBox12
dbw 3, $b590 dbw BANK(sBox13), sBox13
dbw 3, $b9e0 dbw BANK(sBox14), sBox14
; e698 ; e698
Functione698: ; e698 Functione698: ; e698
@@ -21770,10 +21770,10 @@ Function16cff: ; 16cff
push af push af
ld a, $6 ld a, $6
ld [rSVBK], a ld [rSVBK], a
ld a, $0 ld a, BANK(sScratch)
call GetSRAMBank call GetSRAMBank
ld de, w6_d000 ld de, w6_d000
ld hl, $a000 ld hl, sScratch
ld a, [hROMBank] ld a, [hROMBank]
ld b, a ld b, a
ld c, $31 ld c, $31
@@ -21793,12 +21793,12 @@ Function16d20: ; 16d20
call PlaceString call PlaceString
xor a xor a
call GetSRAMBank call GetSRAMBank
ld hl, $a000 ld hl, sScratch
ld bc, $0310 ld bc, $0310
xor a xor a
call ByteFill call ByteFill
ld hl, $9310 ld hl, $9310
ld de, $a000 ld de, sScratch
ld c, $31 ld c, $31
ld a, [hROMBank] ld a, [hROMBank]
ld b, a ld b, a
@@ -21816,10 +21816,11 @@ UnownDexDoWhatString:
db "Do what?@" db "Do what?@"
UnownDexMenuString: UnownDexMenuString:
db $ef, " PRINT", $4e db $ef, " PRINT"
db $f5, " CANCEL", $4e next $f5, " CANCEL"
db $df, " PREVIOUS", $4e next $df, " PREVIOUS"
db $eb, " NEXT@" next $eb, " NEXT"
db "@"
UnownDexVacantString: UnownDexVacantString:
db "VACANT@" db "VACANT@"
@@ -23884,14 +23885,14 @@ Function24423: ; 24423
xor a xor a
call GetSRAMBank call GetSRAMBank
hlcoord 0, 0 hlcoord 0, 0
ld de, $a000 ld de, sScratch
ld bc, SCREEN_WIDTH * SCREEN_HEIGHT ld bc, SCREEN_WIDTH * SCREEN_HEIGHT
call CopyBytes call CopyBytes
call CloseSRAM call CloseSRAM
call Function2173 call Function2173
xor a xor a
call GetSRAMBank call GetSRAMBank
ld hl, $a000 ld hl, sScratch
decoord 0, 0 decoord 0, 0
ld bc, SCREEN_WIDTH * SCREEN_HEIGHT ld bc, SCREEN_WIDTH * SCREEN_HEIGHT
.asm_2444c .asm_2444c
@@ -26187,9 +26188,9 @@ Function25299: ; 25299 (9:5299)
; 252ec (9:52ec) ; 252ec (9:52ec)
String_252ec: ; 252ec String_252ec: ; 252ec
db "NAME/", $4e db "NAME/"
db $4e next ""
db "MONEY@" next "MONEY@"
Tilemap_252f9: ; 252f9 Tilemap_252f9: ; 252f9
db $27, $28, $ff ; ID NO db $27, $28, $ff ; ID NO
@@ -26226,8 +26227,9 @@ Function2530a: ; 2530a (9:530a)
; 2534c (9:534c) ; 2534c (9:534c)
String_2534c: ; 2534c String_2534c: ; 2534c
db "#DEX", $4e db "#DEX"
db "PLAY TIME@" next "PLAY TIME"
db "@"
String_2535b: ; 2535b String_2535b: ; 2535b
db "@" db "@"
@@ -31370,10 +31372,10 @@ Function29573: ; 29573
; 29591 ; 29591
String29591: ; 29591 String29591: ; 29591
db "─── №.", $4e db "─── №."
db $4e next ""
db "OT/", $4e next "OT/"
db $73, "№.@" next $73, "№.@"
; 295a1 ; 295a1
Function295a1: ; 295a1 Function295a1: ; 295a1
@@ -31393,9 +31395,9 @@ Function295a1: ; 295a1
; 295c2 ; 295c2
String295c2: ; 295c2 String295c2: ; 295c2
db "EGG", $4e db "EGG"
db "OT/?????", $4e next "OT/?????"
db $73, "№.?????@" next $73, "№.?????@"
; 295d8 ; 295d8
Function295d8: ; 295d8 Function295d8: ; 295d8
@@ -42392,21 +42394,20 @@ CheckOwnMon: ; 0x4a7ba
; 0x4a810 ; 0x4a810
BoxAddressTable1: ; 4a810 BoxAddressTable1: ; 4a810
; bank, address dbw BANK(sBox1), sBox1
dbw $02, $a000 dbw BANK(sBox2), sBox2
dbw $02, $a450 dbw BANK(sBox3), sBox3
dbw $02, $a8a0 dbw BANK(sBox4), sBox4
dbw $02, $acf0 dbw BANK(sBox5), sBox5
dbw $02, $b140 dbw BANK(sBox6), sBox6
dbw $02, $b590 dbw BANK(sBox7), sBox7
dbw $02, $b9e0 dbw BANK(sBox8), sBox8
dbw $03, $a000 dbw BANK(sBox9), sBox9
dbw $03, $a450 dbw BANK(sBox10), sBox10
dbw $03, $a8a0 dbw BANK(sBox11), sBox11
dbw $03, $acf0 dbw BANK(sBox12), sBox12
dbw $03, $b140 dbw BANK(sBox13), sBox13
dbw $03, $b590 dbw BANK(sBox14), sBox14
dbw $03, $b9e0
; 4a83a ; 4a83a
UpdateOTPointer: ; 0x4a83a UpdateOTPointer: ; 0x4a83a
@@ -42555,21 +42556,20 @@ Function4a8dc: ; 4a8dc
; 4a8f4 ; 4a8f4
BoxAddressTable2: ; 4a8f4 BoxAddressTable2: ; 4a8f4
; bank, address dbw BANK(sBox1), sBox1
dbw $02, $a000 dbw BANK(sBox2), sBox2
dbw $02, $a450 dbw BANK(sBox3), sBox3
dbw $02, $a8a0 dbw BANK(sBox4), sBox4
dbw $02, $acf0 dbw BANK(sBox5), sBox5
dbw $02, $b140 dbw BANK(sBox6), sBox6
dbw $02, $b590 dbw BANK(sBox7), sBox7
dbw $02, $b9e0 dbw BANK(sBox8), sBox8
dbw $03, $a000 dbw BANK(sBox9), sBox9
dbw $03, $a450 dbw BANK(sBox10), sBox10
dbw $03, $a8a0 dbw BANK(sBox11), sBox11
dbw $03, $acf0 dbw BANK(sBox12), sBox12
dbw $03, $b140 dbw BANK(sBox13), sBox13
dbw $03, $b590 dbw BANK(sBox14), sBox14
dbw $03, $b9e0
; 4a91e ; 4a91e
Function4a91e: ; 4a91e Function4a91e: ; 4a91e
@@ -44720,21 +44720,20 @@ Function4d939: ; 4d939
; 4d99f ; 4d99f
Unknown_4d99f: ; 4d99f Unknown_4d99f: ; 4d99f
; bank, address dbw BANK(sBox1), sBox1
dbw $02, $a000 dbw BANK(sBox2), sBox2
dbw $02, $a450 dbw BANK(sBox3), sBox3
dbw $02, $a8a0 dbw BANK(sBox4), sBox4
dbw $02, $acf0 dbw BANK(sBox5), sBox5
dbw $02, $b140 dbw BANK(sBox6), sBox6
dbw $02, $b590 dbw BANK(sBox7), sBox7
dbw $02, $b9e0 dbw BANK(sBox8), sBox8
dbw $03, $a000 dbw BANK(sBox9), sBox9
dbw $03, $a450 dbw BANK(sBox10), sBox10
dbw $03, $a8a0 dbw BANK(sBox11), sBox11
dbw $03, $acf0 dbw BANK(sBox12), sBox12
dbw $03, $b140 dbw BANK(sBox13), sBox13
dbw $03, $b590 dbw BANK(sBox14), sBox14
dbw $03, $b9e0
; 4d9c9 ; 4d9c9
UnknownText_0x4d9c9: ; 0x4d9c9 UnknownText_0x4d9c9: ; 0x4d9c9
@@ -77077,7 +77076,7 @@ Functione0000: ; e0000
push de push de
xor a xor a
call GetSRAMBank call GetSRAMBank
ld hl, $a000 ld hl, sScratch
ld bc, $0000 ld bc, $0000
.asm_e000b .asm_e000b
push bc push bc
@@ -77105,11 +77104,11 @@ endr
cp $31 cp $31
jr c, .asm_e000b jr c, .asm_e000b
ld hl, OverworldMap ld hl, OverworldMap
ld de, $a000 ld de, sScratch
ld bc, $0310 ld bc, $0310
call CopyBytes call CopyBytes
pop hl pop hl
ld de, $a000 ld de, sScratch
ld c, $31 ld c, $31
ld a, [hROMBank] ld a, [hROMBank]
ld b, a ld b, a
@@ -82612,20 +82611,20 @@ endr
Unknown_e33a6: ; e33a6 Unknown_e33a6: ; e33a6
; bank, address ; bank, address
dbw $02, $a000 dbw BANK(sBox1), sBox1
dbw $02, $a450 dbw BANK(sBox2), sBox2
dbw $02, $a8a0 dbw BANK(sBox3), sBox3
dbw $02, $acf0 dbw BANK(sBox4), sBox4
dbw $02, $b140 dbw BANK(sBox5), sBox5
dbw $02, $b590 dbw BANK(sBox6), sBox6
dbw $02, $b9e0 dbw BANK(sBox7), sBox7
dbw $03, $a000 dbw BANK(sBox8), sBox8
dbw $03, $a450 dbw BANK(sBox9), sBox9
dbw $03, $a8a0 dbw BANK(sBox10), sBox10
dbw $03, $acf0 dbw BANK(sBox11), sBox11
dbw $03, $b140 dbw BANK(sBox12), sBox12
dbw $03, $b590 dbw BANK(sBox13), sBox13
dbw $03, $b9e0 dbw BANK(sBox14), sBox14
; e33d0 ; e33d0
Functione33d0: ; e33d0 (38:73d0) Functione33d0: ; e33d0 (38:73d0)
@@ -82843,21 +82842,20 @@ endr
; e36a5 (38:76a5) ; e36a5 (38:76a5)
Unknown_e36a5: ; e36a5 Unknown_e36a5: ; e36a5
; bank, address dbw BANK(sBox1), sBox1
dbw $02, $a000 dbw BANK(sBox2), sBox2
dbw $02, $a450 dbw BANK(sBox3), sBox3
dbw $02, $a8a0 dbw BANK(sBox4), sBox4
dbw $02, $acf0 dbw BANK(sBox5), sBox5
dbw $02, $b140 dbw BANK(sBox6), sBox6
dbw $02, $b590 dbw BANK(sBox7), sBox7
dbw $02, $b9e0 dbw BANK(sBox8), sBox8
dbw $03, $a000 dbw BANK(sBox9), sBox9
dbw $03, $a450 dbw BANK(sBox10), sBox10
dbw $03, $a8a0 dbw BANK(sBox11), sBox11
dbw $03, $acf0 dbw BANK(sBox12), sBox12
dbw $03, $b140 dbw BANK(sBox13), sBox13
dbw $03, $b590 dbw BANK(sBox14), sBox14
dbw $03, $b9e0
; e36cf ; e36cf
Functione36cf: ; e36cf (38:76cf) Functione36cf: ; e36cf (38:76cf)
@@ -93166,7 +93164,7 @@ INCBIN "gfx/unknown/1ddf33.2bpp.lz"
Function1de0d7: ; 1de0d7 Function1de0d7: ; 1de0d7
ld hl, LZ_1de0e1 ld hl, LZ_1de0e1
ld de, $a000 ld de, sScratch
call Decompress call Decompress
ret ret
; 1de0e1 ; 1de0e1

View File

@@ -2674,6 +2674,8 @@ w6_d600:: ds $600
SECTION "Scratch", SRAM, BANK [0] SECTION "Scratch", SRAM, BANK [0]
sScratch::
SECTION "SRAM Bank 0", SRAM [$a600], BANK [0] SECTION "SRAM Bank 0", SRAM [$a600], BANK [0]