ref: 4c2a480ebc6aae68c3c87674b4715f6bdd5b1d18
parent: d74d2542412ca5d58d9077801b35b8061a68b0cc
parent: 2b144fcfd4f55f4ef56bf1c7993ea17979bf9369
author: Bryan Bishop <[email protected]>
date: Sun Mar 2 10:37:36 EST 2014
Merge pull request #234 from yenatch/incbins SGB/CGB data, contest entrants, emotes, pack gfx
--- a/engine/color.asm
+++ b/engine/color.asm
@@ -81,7 +81,7 @@
Function8aa4: ; 8aa4
push de
push bc
- ld hl, $5ce6
+ ld hl, PalPacket_9ce6
ld de, $cda9
ld bc, $0010
call CopyBytes
@@ -97,7 +97,7 @@
ld [$cdaf], a
ld hl, $cda9
call Function9809
- ld hl, $5a86
+ ld hl, BlkPacket_9a86
call Function9809
ret
; 8ad1
@@ -104,7 +104,7 @@
Function8ad1: ; 8ad1
- ld hl, $5c57
+ ld hl, PalPacket_9c56 + 1
call Function9610
call Function971a
call Function9699
@@ -180,7 +180,7 @@
ld a, [hSGB]
and a
ret z
- ld hl, $5a86
+ ld hl, BlkPacket_9a86
jp Function9809
; 8b4d
@@ -224,7 +224,7 @@
ret z
ld a, c
push af
- ld hl, $5ce6
+ ld hl, PalPacket_9ce6
ld de, $cda9
ld bc, $0010
call CopyBytes
@@ -361,7 +361,7 @@
ld h, $0
add hl, hl
add hl, hl
- ld bc, $68be
+ ld bc, Palettes_a8be
add hl, bc
ld bc, $0004
ld a, $5
@@ -393,8 +393,8 @@
Function8c8a: ; 8c8a
call CheckCGB
ret z
- ld hl, $4f6a
- ld b, $0
+ ld hl, Unknown_8f6a
+ ld b, 0
dec c
add hl, bc
add hl, bc
@@ -417,16 +417,16 @@
Function8cb4: ; 8cb4
ld l, e
- ld h, $0
+ ld h, 0
add hl, hl
add hl, hl
add hl, hl
- ld de, Data8d05
+ ld de, Palettes_8d05
add hl, de
call CheckCGB
jr nz, .asm_8cf0
push hl
- ld hl, $5ce6
+ ld hl, PalPacket_9ce6
ld de, $cda9
ld bc, $0010
call CopyBytes
@@ -443,7 +443,7 @@
ld [$cdaf], a
ld hl, $cda9
call Function9809
- ld hl, $5a86
+ ld hl, BlkPacket_9a86
call Function9809
ret
@@ -458,16 +458,81 @@
ret
; 8d05
-Data8d05: ; 8d05
-INCBIN "baserom.gbc", $8d05, $8d55 - $8d05
+Palettes_8d05: ; 8d05
+ RGB 20, 31, 11
+ RGB 31, 19, 00
+ RGB 31, 10, 09
+ RGB 00, 00, 00
+
+ RGB 15, 20, 31
+ RGB 30, 26, 00
+ RGB 31, 12, 00
+ RGB 00, 00, 00
+
+ RGB 24, 17, 31
+ RGB 30, 26, 00
+ RGB 08, 11, 31
+ RGB 00, 00, 00
+
+ RGB 31, 25, 17
+ RGB 31, 18, 04
+ RGB 28, 12, 05
+ RGB 00, 00, 00
+
+ RGB 19, 26, 31
+ RGB 31, 05, 08
+ RGB 31, 09, 31
+ RGB 00, 00, 00
+
+ RGB 31, 19, 28
+ RGB 31, 21, 00
+ RGB 12, 22, 00
+ RGB 00, 00, 00
+
+ RGB 19, 17, 23
+ RGB 30, 26, 00
+ RGB 31, 12, 00
+ RGB 00, 00, 00
+
+ RGB 07, 26, 31
+ RGB 26, 26, 27
+ RGB 31, 11, 11
+ RGB 00, 00, 00
+
+ RGB 21, 31, 21
+ RGB 30, 26, 00
+ RGB 31, 12, 00
+ RGB 00, 00, 00
+
+ RGB 07, 26, 31
+ RGB 31, 31, 00
+ RGB 00, 21, 00
+ RGB 00, 00, 00
; 8d55
INCLUDE "predef/cgb.asm"
-INCBIN "baserom.gbc", $95f0, $9610 - $95f0
+Function95f0: ; 95f0
+ ld hl, Palette_9608
+ ld de, Unkn1Pals
+ ld bc, $0008
+ ld a, $5
+ call FarCopyWRAM
+ call Function96a4
+ call Function9699
+ call Function96b3
+ ret
+; 9608
+Palette_9608: ; 9608
+ RGB 31, 31, 31
+ RGB 09, 31, 31
+ RGB 10, 12, 31
+ RGB 00, 03, 19
+; 9610
+
Function9610: ; 9610
ld de, $d000
ld c, $4
@@ -492,7 +557,7 @@
add hl, hl
add hl, hl
add hl, hl
- ld bc, $5df6
+ ld bc, Palettes_9df6
add hl, bc
ret
; 9630
@@ -684,8 +749,8 @@
Function971a: ; 971a
- ld hl, $7681
- ld de, MartPointer
+ ld hl, Palettes_b681
+ ld de, Unkn2Pals
ld bc, $0010
ld a, $5
call FarCopyWRAM
@@ -723,11 +788,11 @@
ld a, [PlayerGender]
and a
jr z, .asm_9760
- ld hl, FalknerPalette
+ ld hl, KrisPalette
ret
.asm_9760
- ld hl, $70ce
+ ld hl, PlayerPalette
ret
; 9764
@@ -738,10 +803,10 @@
Function976b: ; 976b
ld l, a
- ld h, $0
+ ld h, 0
add hl, hl
add hl, hl
- ld bc, $70ce
+ ld bc, TrainerPalettes
add hl, bc
ret
; 9775
@@ -751,8 +816,81 @@
ret
; 9779
-INCBIN "baserom.gbc", $9779, $97ee - $9779
+Function9779: ; 9779
+ ret
+; 977a
+Function977a: ; 977a
+ call CheckCGB
+ ret z
+ ld hl, Palettes_979c
+ ld a, $90
+ ld [rOBPI], a
+ ld c, $30
+.asm_9787
+ ld a, [hli]
+ ld [rOBPD], a
+ dec c
+ jr nz, .asm_9787
+ ld hl, Palettes_979c
+ ld de, $d050
+ ld bc, $0010
+ ld a, $5
+ call FarCopyWRAM
+ ret
+; 979c
+
+Palettes_979c: ; 979c
+ RGB 31, 31, 31
+ RGB 25, 25, 25
+ RGB 13, 13, 13
+ RGB 00, 00, 00
+ RGB 31, 31, 31
+ RGB 31, 31, 07
+ RGB 31, 16, 01
+ RGB 00, 00, 00
+ RGB 31, 31, 31
+ RGB 31, 19, 24
+ RGB 30, 10, 06
+ RGB 00, 00, 00
+ RGB 31, 31, 31
+ RGB 12, 25, 01
+ RGB 05, 14, 00
+ RGB 00, 00, 00
+ RGB 31, 31, 31
+ RGB 08, 12, 31
+ RGB 01, 04, 31
+ RGB 00, 00, 00
+ RGB 31, 31, 31
+ RGB 24, 18, 07
+ RGB 20, 15, 03
+ RGB 00, 00, 00
+; 97cc
+
+Function97cc: ; 97cc
+ call CheckCGB
+ ret z
+ ld a, $90
+ ld [rOBPI], a
+ ld a, $1c
+ call Function9625
+ call Function97e5
+ ld a, $21
+ call Function9625
+ call Function97e5
+ ret
+; 97e5
+
+Function97e5: ; 97e5
+ ld c, $8
+.asm_97e7
+ ld a, [hli]
+ ld [rOBPD], a
+ dec c
+ jr nz, .asm_97e7
+ ret
+; 97ee
+
Function97ee: ; 97ee
ld l, a
ld h, $0
@@ -854,7 +992,7 @@
call Function992c
call Function9a7a
call Function993f
- ld hl, $5d66
+ ld hl, PalPacket_9d66
call Function981a
.asm_988a
@@ -922,7 +1060,7 @@
; 98eb
Function98eb: ; 98eb
- ld hl, $58ff
+ ld hl, Unknown_98ff
ld c, $9
.asm_98f0
push bc
@@ -939,8 +1077,33 @@
ret
; 98ff
-INCBIN "baserom.gbc", $98ff, $992c - $98ff
+Unknown_98ff: ; 98ff
+ dw PalPacket_9d56
+ dw PalPacket_9d76
+ dw PalPacket_9d86
+ dw PalPacket_9d96
+ dw PalPacket_9da6
+ dw PalPacket_9db6
+ dw PalPacket_9dc6
+ dw PalPacket_9dd6
+ dw PalPacket_9de6
+; 9911
+Function9911: ; 9911
+ di
+ xor a
+ ld [rJOYP], a
+ ld hl, PalPacket_9d56
+ call Function981a
+ call Function992c
+ call Function9a7a
+ call Function993f
+ ld hl, PalPacket_9d66
+ call Function981a
+ ei
+ ret
+; 992c
+
Function992c: ; 992c
call Function9938
push de
@@ -952,7 +1115,7 @@
Function9938: ; 9938
ld hl, SGBBorder
- ld de, $606e
+ ld de, SGBBorderMap
ret
; 993f
@@ -965,7 +1128,7 @@
; 994a
Function994a: ; 994a
- ld hl, $5d26
+ ld hl, PalPacket_9d26
call Function981a
call Function9a7a
ld a, [rJOYP]
@@ -1014,7 +1177,7 @@
; 99ab
Function99ab: ; 99ab
- ld hl, $5d16
+ ld hl, PalPacket_9d16
call Function981a
jp Function9a7a
; 99b4
@@ -1023,7 +1186,7 @@
call DisableLCD
ld a, $e4
ld [rBGP], a
- ld hl, $5df6
+ ld hl, Palettes_9df6
ld de, VTiles1
ld bc, $1000
call CopyData
@@ -1030,7 +1193,7 @@
call DrawDefaultTiles
ld a, $e3
ld [rLCDC], a
- ld hl, $5d06
+ ld hl, PalPacket_9d06
call Function981a
xor a
ld [rBGP], a
@@ -1065,7 +1228,7 @@
call DrawDefaultTiles
ld a, $e3
ld [rLCDC], a
- ld hl, $5d46
+ ld hl, PalPacket_9d46
call Function981a
xor a
ld [rBGP], a
@@ -1090,7 +1253,7 @@
call DrawDefaultTiles
ld a, $e3
ld [rLCDC], a
- ld hl, $5d36
+ ld hl, PalPacket_9d36
call Function981a
xor a
ld [rBGP], a
@@ -1154,29 +1317,641 @@
ret
; 9a86
-INCBIN "baserom.gbc", $9a86, $a51e - $9a86
+BlkPacket_9a86: ; 9a86
+ db $21, $01, $03, $00, $00, $00, $13, $11, $00, $00, $00, $00, $00, $00, $00, $00
-SGBBorder:
+BlkPacket_9a96: ; 9a96
+ db $21, $01, $07, $05, $00, $0a, $13, $0d, $00, $00, $00, $00, $00, $00, $00, $00
+
+BlkPacket_9aa6: ; 9a86
+ db $22, $05, $07, $0a, $00, $0c, $13, $11, $03, $05, $01, $00, $0a, $03, $03, $00
+ db $0a, $08, $13, $0a, $03, $0a, $00, $04, $08, $0b, $03, $0f, $0b, $00, $13, $07
+
+BlkPacket_9ac6: ; 9a86
+ db $21, $01, $07, $05, $00, $01, $07, $07, $00, $00, $00, $00, $00, $00, $00, $00
+
+BlkPacket_9ad6: ; 9a86
+ db $21, $01, $07, $05, $0b, $01, $13, $02, $00, $00, $00, $00, $00, $00, $00, $00
+
+BlkPacket_9ae6: ; 9a86
+ db $21, $01, $07, $05, $01, $01, $08, $08, $00, $00, $00, $00, $00, $00, $00, $00
+
+BlkPacket_9af6: ; 9a86
+ db $21, $01, $07, $05, $07, $05, $0d, $0b, $00, $00, $00, $00, $00, $00, $00, $00
+
+BlkPacket_9b06: ; 9a86
+ db $22, $05, $03, $05, $00, $00, $13, $0b, $03, $0a, $00, $04, $13, $09, $02, $0f
+ db $00, $06, $13, $07, $03, $00, $04, $04, $0f, $09, $03, $00, $00, $0c, $13, $11
+
+BlkPacket_9b26: ; 9a86
+ db $23, $07, $07, $10, $00, $00, $02, $0c, $02, $00, $0c, $00, $12, $01, $02, $00
+ db $0c, $02, $12, $03, $02, $00, $0c, $04, $12, $05, $02, $00, $0c, $06, $12, $07
+ db $02, $00, $0c, $08, $12, $09, $02, $00, $0c, $0a, $12, $0b, $00, $00, $00, $00
+
+BlkPacket_9b56: ; 9a86
+ db $22, $03, $07, $20, $00, $00, $13, $04, $03, $0f, $00, $06, $13, $11, $03, $05
+ db $0f, $01, $12, $04, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00
+
+BlkPacket_9b76: ; 9a86
+ db $21, $01, $07, $10, $00, $00, $13, $05, $00, $00, $00, $00, $00, $00, $00, $00
+
+BlkPacket_9b86: ; 9a86
+ db $21, $02, $07, $0a, $00, $04, $13, $0d, $03, $05, $00, $06, $13, $0b, $00, $00
+; 9b96
+
+; 9b96
+PalPacket_9b96: db $51, $48, $00, $49, $00, $4a, $00, $4b, $00, $00, $00, $00, $00, $00, $00, $00
+PalPacket_9ba6: db $51, $2b, $00, $24, $00, $20, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00
+PalPacket_9bb6: db $51, $41, $00, $42, $00, $43, $00, $44, $00, $00, $00, $00, $00, $00, $00, $00
+PalPacket_9bc6: db $51, $4c, $00, $4c, $00, $4c, $00, $4c, $00, $00, $00, $00, $00, $00, $00, $00
+PalPacket_9bd6: db $51, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00
+PalPacket_9be6: db $51, $36, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00
+PalPacket_9bf6: db $51, $37, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00
+PalPacket_9c06: db $51, $38, $00, $39, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00
+PalPacket_9c16: db $51, $3a, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00
+PalPacket_9c26: db $51, $3b, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00
+PalPacket_9c36: db $51, $3c, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00
+PalPacket_9c46: db $51, $39, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00
+PalPacket_9c56: db $51, $2e, $00, $2f, $00, $30, $00, $31, $00, $00, $00, $00, $00, $00, $00, $00
+PalPacket_9c66: db $51, $1a, $00, $1a, $00, $1a, $00, $1a, $00, $00, $00, $00, $00, $00, $00, $00
+PalPacket_9c76: db $51, $32, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00
+PalPacket_9c86: db $51, $3c, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00
+PalPacket_9c96: db $51, $3d, $00, $3e, $00, $3f, $00, $40, $00, $00, $00, $00, $00, $00, $00, $00
+PalPacket_9ca6: db $51, $33, $00, $34, $00, $1b, $00, $1f, $00, $00, $00, $00, $00, $00, $00, $00
+PalPacket_9cb6: db $51, $1b, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00
+PalPacket_9cc6: db $51, $1c, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00
+PalPacket_9cd6: db $51, $35, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00
+PalPacket_9ce6: db $01, $ff, $7f, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00
+PalPacket_9cf6: db $09, $ff, $7f, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00
+PalPacket_9d06: db $59, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00
+PalPacket_9d16: db $89, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00
+PalPacket_9d26: db $89, $01, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00
+PalPacket_9d36: db $99, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00
+PalPacket_9d46: db $a1, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00
+PalPacket_9d56: db $b9, $01, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00
+PalPacket_9d66: db $b9, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00
+PalPacket_9d76: db $79, $5d, $08, $00, $0b, $8c, $d0, $f4, $60, $00, $00, $00, $00, $00, $00, $00
+PalPacket_9d86: db $79, $52, $08, $00, $0b, $a9, $e7, $9f, $01, $c0, $7e, $e8, $e8, $e8, $e8, $e0
+PalPacket_9d96: db $79, $47, $08, $00, $0b, $c4, $d0, $16, $a5, $cb, $c9, $05, $d0, $10, $a2, $28
+PalPacket_9da6: db $79, $3c, $08, $00, $0b, $f0, $12, $a5, $c9, $c9, $c8, $d0, $1c, $a5, $ca, $c9
+PalPacket_9db6: db $79, $31, $08, $00, $0b, $0c, $a5, $ca, $c9, $7e, $d0, $06, $a5, $cb, $c9, $7e
+PalPacket_9dc6: db $79, $26, $08, $00, $0b, $39, $cd, $48, $0c, $d0, $34, $a5, $c9, $c9, $80, $d0
+PalPacket_9dd6: db $79, $1b, $08, $00, $0b, $ea, $ea, $ea, $ea, $ea, $a9, $01, $cd, $4f, $0c, $d0
+PalPacket_9de6: db $79, $10, $08, $00, $0b, $4c, $20, $08, $ea, $ea, $ea, $ea, $ea, $60, $ea, $ea
+; 9df6
+
+Palettes_9df6: ; 9df6
+ RGB 31, 31, 31
+ RGB 22, 25, 19
+ RGB 16, 21, 30
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 27, 28, 31
+ RGB 15, 20, 31
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 24, 28, 19
+ RGB 15, 20, 31
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 24, 24, 24
+ RGB 15, 20, 31
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 21, 23, 31
+ RGB 15, 20, 31
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 24, 21, 27
+ RGB 15, 20, 31
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 31, 24, 16
+ RGB 15, 20, 31
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 25, 30, 26
+ RGB 15, 20, 31
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 31, 25, 31
+ RGB 15, 20, 31
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 31, 20, 19
+ RGB 15, 20, 31
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 31, 26, 19
+ RGB 15, 20, 31
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 27, 28, 27
+ RGB 15, 20, 31
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 24, 30, 23
+ RGB 15, 20, 31
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 29, 24, 29
+ RGB 15, 20, 31
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 26, 23, 29
+ RGB 15, 20, 31
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 25, 23, 20
+ RGB 15, 20, 31
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 29, 26, 18
+ RGB 15, 20, 31
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 31, 21, 18
+ RGB 15, 20, 31
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 26, 25, 31
+ RGB 15, 20, 31
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 22, 21, 31
+ RGB 15, 20, 31
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 22, 25, 21
+ RGB 15, 20, 31
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 21, 21, 22
+ RGB 15, 20, 31
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 31, 20, 20
+ RGB 15, 20, 31
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 26, 26, 26
+ RGB 15, 20, 31
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 21, 14, 09
+ RGB 15, 20, 20
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 12, 28, 22
+ RGB 15, 20, 20
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 07, 07, 07
+ RGB 02, 03, 03
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 30, 22, 17
+ RGB 16, 14, 19
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 18, 20, 27
+ RGB 11, 15, 23
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 31, 20, 10
+ RGB 26, 10, 06
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 21, 25, 29
+ RGB 14, 19, 25
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 27, 22, 24
+ RGB 21, 15, 23
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 28, 20, 15
+ RGB 21, 14, 09
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 20, 26, 16
+ RGB 09, 20, 11
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 30, 22, 24
+ RGB 28, 15, 21
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 31, 28, 14
+ RGB 26, 20, 00
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 26, 21, 22
+ RGB 15, 15, 18
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 23, 19, 13
+ RGB 14, 12, 17
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 16, 18, 21
+ RGB 10, 12, 18
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 22, 15, 16
+ RGB 17, 02, 05
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 15, 20, 20
+ RGB 05, 16, 16
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 23, 15, 19
+ RGB 14, 04, 12
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 20, 17, 18
+ RGB 18, 13, 11
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 23, 21, 16
+ RGB 12, 12, 10
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 21, 25, 29
+ RGB 30, 22, 24
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 26, 23, 16
+ RGB 29, 14, 09
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 18, 18, 18
+ RGB 10, 10, 10
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 30, 26, 15
+ RGB 00, 23, 00
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 30, 26, 15
+ RGB 31, 23, 00
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 30, 26, 15
+ RGB 31, 00, 00
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 29, 26, 19
+ RGB 27, 20, 14
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 24, 20, 10
+ RGB 21, 00, 04
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 31, 20, 10
+ RGB 21, 00, 04
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 30, 26, 16
+ RGB 16, 12, 09
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 15, 28, 26
+ RGB 12, 22, 26
+ RGB 03, 16, 14
+
+ RGB 31, 31, 31
+ RGB 15, 28, 26
+ RGB 23, 24, 24
+ RGB 00, 00, 00
+
+ RGB 31, 31, 24
+ RGB 07, 27, 19
+ RGB 26, 20, 10
+ RGB 19, 12, 08
+
+ RGB 31, 31, 31
+ RGB 31, 28, 14
+ RGB 31, 13, 31
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 16, 18, 21
+ RGB 10, 12, 18
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 23, 21, 16
+ RGB 12, 12, 10
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 31, 14, 00
+ RGB 07, 11, 15
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 26, 21, 22
+ RGB 26, 10, 06
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 30, 27, 04
+ RGB 24, 20, 11
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 31, 13, 25
+ RGB 24, 20, 11
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 16, 19, 29
+ RGB 24, 20, 11
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 30, 22, 24
+ RGB 18, 18, 18
+ RGB 16, 10, 07
+
+ RGB 31, 31, 31
+ RGB 21, 25, 29
+ RGB 18, 18, 18
+ RGB 16, 10, 07
+
+ RGB 31, 31, 31
+ RGB 20, 26, 16
+ RGB 18, 18, 18
+ RGB 16, 10, 07
+
+ RGB 31, 31, 31
+ RGB 31, 28, 14
+ RGB 18, 18, 18
+ RGB 16, 10, 07
+
+ RGB 31, 31, 31
+ RGB 18, 18, 18
+ RGB 26, 10, 06
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 30, 22, 24
+ RGB 28, 15, 21
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 26, 20, 00
+ RGB 16, 19, 29
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 16, 02, 30
+ RGB 15, 20, 31
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 16, 13, 04
+ RGB 15, 20, 31
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 28, 04, 02
+ RGB 15, 20, 31
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 18, 23, 31
+ RGB 15, 20, 31
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 24, 20, 11
+ RGB 18, 13, 11
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 31, 31, 31
+ RGB 25, 30, 00
+ RGB 25, 30, 00
+
+ RGB 00, 00, 00
+ RGB 08, 11, 11
+ RGB 21, 21, 21
+ RGB 31, 31, 31
+; a06e
+
+SGBBorderMap: ; a06e
+ db $07,$14, $07,$14, $07,$14, $07,$14, $07,$14, $07,$14, $07,$14, $07,$14, $07,$14, $07,$14, $07,$14, $07,$14, $14,$14, $15,$14, $16,$14, $17,$14, $17,$54, $16,$54, $15,$54, $14,$54, $07,$14, $07,$14, $07,$14, $07,$14, $07,$14, $07,$14, $07,$14, $07,$14, $07,$14, $07,$14, $07,$14, $07,$14
+ db $01,$14, $02,$14, $03,$14, $03,$54, $02,$54, $01,$54, $07,$14, $07,$14, $07,$14, $07,$14, $07,$14, $07,$14, $24,$14, $25,$14, $26,$14, $07,$14, $07,$54, $26,$54, $25,$54, $24,$54, $07,$14, $07,$14, $07,$14, $07,$14, $07,$14, $07,$54, $01,$14, $02,$14, $03,$14, $03,$54, $02,$54, $01,$54
+ db $11,$14, $12,$14, $13,$14, $13,$54, $12,$54, $11,$54, $10,$54, $07,$14, $07,$14, $07,$14, $07,$14, $07,$14, $07,$14, $24,$14, $34,$14, $35,$14, $35,$54, $34,$54, $33,$54, $07,$14, $07,$14, $07,$14, $07,$14, $07,$14, $07,$14, $10,$14, $11,$14, $12,$14, $13,$14, $13,$54, $12,$54, $11,$54
+ db $21,$14, $22,$14, $23,$14, $23,$54, $22,$54, $21,$54, $20,$54, $07,$14, $08,$14, $09,$14, $0a,$14, $0b,$14, $0c,$14, $0d,$14, $07,$14, $07,$14, $18,$14, $09,$14, $1a,$14, $1b,$14, $0d,$14, $0c,$14, $1c,$14, $29,$14, $07,$14, $20,$14, $21,$14, $22,$14, $23,$14, $23,$54, $22,$54, $21,$54
+ db $31,$14, $32,$14, $07,$14, $07,$14, $32,$54, $36,$10, $38,$10, $38,$10, $38,$10, $38,$10, $38,$10, $38,$10, $38,$10, $38,$10, $38,$10, $38,$10, $38,$10, $38,$10, $38,$10, $38,$10, $38,$10, $38,$10, $38,$10, $38,$10, $38,$10, $38,$10, $27,$10, $32,$14, $07,$54, $07,$54, $32,$54, $31,$54
+ db $05,$14, $06,$14, $07,$14, $07,$54, $06,$54, $1f,$10, $37,$10, $06,$14, $07,$14, $07,$54, $06,$54, $05,$54
+ db $15,$14, $16,$14, $17,$14, $17,$54, $16,$54, $1f,$10, $37,$10, $16,$14, $17,$14, $17,$54, $16,$54, $15,$54
+ db $25,$14, $26,$14, $07,$14, $07,$54, $26,$54, $1f,$10, $37,$10, $26,$14, $07,$14, $07,$54, $26,$54, $25,$54
+ db $33,$14, $34,$14, $35,$14, $35,$54, $34,$54, $1f,$10, $37,$10, $34,$14, $35,$14, $35,$54, $34,$54, $33,$54
+ db $07,$14, $07,$14, $07,$14, $07,$14, $07,$14, $1f,$10, $37,$10, $07,$14, $07,$14, $07,$14, $07,$14, $07,$14
+ db $02,$54, $01,$54, $07,$54, $07,$14, $07,$14, $1f,$10, $37,$10, $07,$14, $07,$14, $07,$14, $01,$14, $02,$14
+ db $12,$54, $11,$54, $10,$54, $07,$14, $07,$14, $1f,$10, $37,$10, $07,$14, $07,$14, $10,$14, $11,$14, $12,$14
+ db $22,$54, $21,$54, $20,$54, $07,$14, $07,$14, $1f,$10, $37,$10, $07,$14, $07,$14, $20,$14, $21,$14, $22,$14
+ db $32,$54, $31,$54, $30,$54, $07,$14, $07,$14, $1f,$10, $37,$10, $07,$14, $07,$14, $30,$14, $31,$14, $32,$14
+ db $06,$54, $05,$54, $04,$54, $07,$14, $07,$14, $1f,$10, $37,$10, $07,$14, $07,$14, $04,$14, $05,$14, $06,$14
+ db $16,$54, $15,$54, $14,$54, $07,$14, $07,$14, $1f,$10, $37,$10, $07,$14, $07,$14, $14,$14, $15,$14, $16,$14
+ db $26,$54, $25,$54, $24,$54, $07,$14, $07,$14, $1f,$10, $37,$10, $07,$14, $07,$14, $24,$14, $25,$14, $26,$14
+ db $34,$54, $33,$54, $07,$54, $07,$14, $07,$14, $1f,$10, $37,$10, $07,$14, $07,$14, $07,$14, $33,$14, $34,$14
+ db $07,$14, $07,$14, $07,$14, $07,$14, $07,$14, $1f,$10, $37,$10, $07,$14, $07,$14, $07,$14, $07,$14, $07,$14
+ db $01,$14, $02,$14, $03,$14, $03,$54, $02,$54, $1f,$10, $37,$10, $02,$14, $03,$14, $03,$54, $02,$54, $01,$54
+ db $11,$14, $12,$14, $13,$14, $13,$54, $12,$54, $1f,$10, $37,$10, $12,$14, $13,$14, $13,$54, $12,$54, $11,$54
+ db $21,$14, $22,$14, $23,$14, $23,$54, $22,$54, $1f,$10, $37,$10, $22,$14, $23,$14, $23,$54, $22,$54, $21,$54
+ db $31,$14, $32,$14, $07,$14, $07,$14, $32,$54, $1f,$10, $37,$10, $32,$14, $07,$54, $07,$54, $32,$54, $31,$54
+ db $05,$14, $06,$14, $07,$14, $07,$54, $06,$54, $2e,$10, $2f,$10, $2f,$10, $2f,$10, $2f,$10, $2f,$10, $2f,$10, $2f,$10, $2f,$10, $2f,$10, $2f,$10, $2f,$10, $2f,$10, $2f,$10, $2f,$10, $2f,$10, $2f,$10, $2f,$10, $2f,$10, $2f,$10, $2f,$10, $2d,$10, $06,$14, $07,$14, $07,$54, $06,$54, $05,$54
+ db $15,$14, $16,$14, $17,$14, $17,$54, $16,$54, $15,$54, $14,$54, $07,$14, $07,$14, $39,$14, $0e,$14, $09,$14, $0f,$14, $28,$14, $07,$14, $19,$14, $0c,$14, $1c,$14, $29,$14, $2a,$14, $2b,$14, $2c,$14, $39,$14, $07,$14, $07,$14, $14,$14, $15,$14, $16,$14, $17,$14, $17,$54, $16,$54, $15,$54
+ db $25,$14, $26,$14, $07,$14, $07,$54, $26,$54, $25,$54, $24,$54, $07,$14, $07,$14, $07,$14, $07,$14, $07,$14, $07,$14, $01,$14, $02,$14, $03,$14, $03,$54, $02,$54, $01,$54, $07,$14, $07,$14, $07,$14, $07,$14, $07,$14, $07,$14, $24,$14, $25,$14, $26,$14, $07,$14, $07,$54, $26,$54, $25,$54
+ db $33,$14, $34,$14, $35,$14, $35,$54, $34,$54, $24,$54, $07,$54, $07,$14, $07,$14, $07,$14, $07,$14, $07,$14, $10,$14, $11,$14, $12,$14, $13,$14, $13,$54, $12,$54, $11,$54, $10,$54, $07,$14, $07,$14, $07,$14, $07,$14, $07,$14, $07,$14, $24,$14, $34,$14, $35,$14, $35,$54, $34,$54, $33,$54
+ db $07,$14, $07,$14, $07,$14, $07,$14, $07,$14, $07,$14, $07,$14, $07,$14, $07,$14, $07,$14, $07,$14, $07,$14, $20,$14, $21,$14, $22,$14, $23,$14, $23,$54, $22,$54, $21,$54, $20,$54, $07,$14, $07,$14, $07,$14, $07,$14, $07,$14, $07,$14, $07,$14, $07,$14, $07,$14, $07,$14, $07,$14, $07,$14
+; a49e
+
+SGBBorderPalettes: ; a49e
+ RGB 24, 06, 06
+ RGB 24, 24, 26
+ RGB 14, 15, 20
+ RGB 04, 07, 10
+
+ RGB 31, 31, 25
+ RGB 31, 31, 25
+ RGB 31, 31, 25
+ RGB 31, 31, 25
+
+ RGB 31, 31, 25
+ RGB 31, 31, 25
+ RGB 31, 31, 25
+ RGB 31, 31, 25
+
+ RGB 31, 31, 25
+ RGB 31, 31, 25
+ RGB 31, 31, 25
+ RGB 31, 31, 25
+
+ RGB 18, 24, 18
+ RGB 31, 26, 15
+ RGB 26, 19, 10
+ RGB 12, 07, 05
+
+ RGB 31, 31, 25
+ RGB 31, 31, 25
+ RGB 31, 31, 25
+ RGB 31, 31, 25
+
+ RGB 31, 31, 25
+ RGB 31, 31, 25
+ RGB 31, 31, 25
+ RGB 31, 31, 25
+
+ RGB 31, 31, 25
+ RGB 31, 31, 25
+ RGB 31, 31, 25
+ RGB 31, 31, 25
+
+ RGB 18, 06, 31
+ RGB 31, 31, 29
+ RGB 31, 12, 00
+ RGB 00, 00, 00
+
+ RGB 31, 31, 25
+ RGB 31, 31, 25
+ RGB 31, 31, 25
+ RGB 31, 31, 25
+
+ RGB 31, 31, 25
+ RGB 31, 31, 25
+ RGB 31, 31, 25
+ RGB 31, 31, 25
+
+ RGB 31, 31, 25
+ RGB 31, 31, 25
+ RGB 31, 31, 25
+ RGB 31, 31, 25
+
+ RGB 12, 31, 06
+ RGB 22, 26, 30
+ RGB 16, 17, 21
+ RGB 00, 03, 00
+
+ RGB 31, 31, 25
+ RGB 31, 31, 25
+ RGB 31, 31, 25
+ RGB 31, 31, 25
+
+ RGB 31, 31, 25
+ RGB 31, 31, 25
+ RGB 31, 31, 25
+ RGB 31, 31, 25
+
+ RGB 31, 31, 25
+ RGB 31, 31, 25
+ RGB 31, 31, 25
+ RGB 31, 31, 25
+; a51e
+
+SGBBorder: ; a51e
INCBIN "gfx/misc/sgb_border.2bpp"
+; a8be
-INCBIN "baserom.gbc", $a8be, $a8d6 - $a8be
+Palettes_a8be: ; a8be
+ RGB 30, 26, 15
+ RGB 00, 23, 00
-PokemonPalettes:
-INCLUDE "gfx/pics/palette_pointers.asm"
+ RGB 30, 26, 15
+ RGB 31, 21, 00
-INCBIN "baserom.gbc", $b0ae, $b0d2 - $b0ae
+ RGB 30, 26, 15
+ RGB 31, 00, 00
-TrainerPalettes:
+Palettes_a8ca: ; a8ca
+ RGB 30, 26, 15
+ RGB 04, 17, 31
+
+Palettes_a8ce: ; a8ce
+ RGB 30, 22, 17
+ RGB 16, 14, 19
+
+ RGB 30, 22, 17
+ RGB 16, 14, 19
+; a8d6
+
+; a8d6
+INCLUDE "gfx/pics/palette_pointers.asm"
+; b0ce
+
+; b0ce
INCLUDE "gfx/trainers/palette_pointers.asm"
+; b1de
Functionb1de: ; b1de
callba Function494ac
jr c, .asm_b230
ld a, [$d19a]
- and $7
+ and 7
ld e, a
- ld d, $0
- ld hl, $7279
+ ld d, 0
+ ld hl, Unknown_b279
add hl, de
add hl, de
ld a, [hli]
@@ -1183,12 +1958,12 @@
ld h, [hl]
ld l, a
ld a, [TimeOfDayPal]
- and $3
+ and 3
add a
add a
add a
ld e, a
- ld d, $0
+ ld d, 0
add hl, de
ld e, l
ld d, h
@@ -1203,7 +1978,7 @@
push de
push hl
ld l, a
- ld h, $0
+ ld h, 0
add hl, hl
add hl, hl
add hl, hl
@@ -1212,7 +1987,7 @@
ld e, l
ld d, h
pop hl
- ld c, $8
+ ld c, 8
.asm_b222
ld a, [de]
inc de
@@ -1228,9 +2003,9 @@
.asm_b230
ld a, [TimeOfDayPal]
- and $3
- ld bc, $0040
- ld hl, $7469
+ and 3
+ ld bc, $40
+ ld hl, Palettes_b469
call AddNTimes
ld de, Unkn2Pals
ld bc, $0040
@@ -1237,23 +2012,23 @@
ld a, $5
call FarCopyWRAM
ld a, [$d19a]
- cp $1
+ cp 1
jr z, .asm_b253
- cp $2
+ cp 2
ret nz
.asm_b253
ld a, [MapGroup]
ld l, a
- ld h, $0
+ ld h, 0
add hl, hl
add hl, hl
add hl, hl
- ld de, $7569
+ ld de, Palettes_b569
add hl, de
ld a, [TimeOfDayPal]
- and $3
- cp $2
+ and 3
+ cp 2
jr c, .asm_b26d
inc hl
inc hl
@@ -1268,8 +2043,48 @@
ret
; b279
-INCBIN "baserom.gbc", $b279, $b319 - $b279
+Unknown_b279: ; b279
+ dw Unknown_b289
+ dw Unknown_b289
+ dw Unknown_b289
+ dw Unknown_b2a9
+ dw Unknown_b2c9
+ dw Unknown_b2e9
+ dw Unknown_b2a9
+ dw Unknown_b2c9
+; b289
+Unknown_b289: ; b289
+ db $00, $01, $02, $28, $04, $05, $06, $07, $08, $09, $0a, $28, $0c, $0d, $0e, $0f
+ db $10, $11, $12, $29, $14, $15, $16, $17, $18, $19, $1a, $1b, $1c, $1d, $1e, $1f
+
+Unknown_b2a9: ; b289
+ db $20, $21, $22, $23, $24, $25, $26, $07, $20, $21, $22, $23, $24, $25, $26, $07
+ db $10, $11, $12, $13, $14, $15, $16, $07, $18, $19, $1a, $1b, $1c, $1d, $1e, $07
+
+Unknown_b2c9: ; b289
+ db $00, $01, $02, $03, $04, $05, $06, $07, $08, $09, $0a, $0b, $0c, $0d, $0e, $0f
+ db $10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $1a, $1b, $1c, $1d, $1e, $1f
+
+Unknown_b2e9: ; b289
+ db $00, $01, $02, $03, $04, $05, $06, $07, $08, $09, $0a, $0b, $0c, $0d, $0e, $0f
+ db $10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $1a, $1b, $1c, $1d, $1e, $1f
+; b309
+
+Palette_b309: ; b309
+ RGB 31, 31, 31
+ RGB 31, 19, 24
+ RGB 30, 10, 06
+ RGB 00, 00, 00
+; b311
+
+Palette_b311: ; b311
+ RGB 31, 31, 31
+ RGB 17, 19, 31
+ RGB 14, 16, 31
+ RGB 00, 00, 00
+; b319
+
MornPal: ; 0xb319
INCLUDE "tilesets/morn.pal"
; 0xb359
@@ -1286,9 +2101,598 @@
INCLUDE "tilesets/dark.pal"
; 0xb419
-INCBIN "baserom.gbc", $b419, $b7a9 - $b419
+; There are actually a lot more of these.
-Paletteb7a9: ; b7a9
+; b419
+
+ RGB 30, 28, 26
+ RGB 19, 19, 19
+ RGB 13, 13, 13
+ RGB 07, 07, 07
+
+ RGB 30, 28, 26
+ RGB 31, 19, 24
+ RGB 30, 10, 06
+ RGB 07, 07, 07
+
+ RGB 18, 24, 09
+ RGB 15, 20, 01
+ RGB 09, 13, 00
+ RGB 07, 07, 07
+
+ RGB 30, 28, 26
+ RGB 15, 16, 31
+ RGB 09, 09, 31
+ RGB 07, 07, 07
+
+ RGB 30, 28, 26
+ RGB 31, 31, 07
+ RGB 31, 16, 01
+ RGB 07, 07, 07
+
+ RGB 26, 24, 17
+ RGB 21, 17, 07
+ RGB 16, 13, 03
+ RGB 07, 07, 07
+
+ RGB 30, 28, 26
+ RGB 17, 19, 31
+ RGB 14, 16, 31
+ RGB 07, 07, 07
+
+ RGB 31, 31, 16
+ RGB 31, 31, 16
+ RGB 14, 09, 00
+ RGB 00, 00, 00
+
+ RGB 23, 23, 31
+ RGB 18, 19, 31
+ RGB 13, 12, 31
+ RGB 07, 07, 07
+
+ RGB 15, 13, 27
+ RGB 10, 09, 20
+ RGB 04, 03, 18
+ RGB 00, 00, 00
+; b469
+
+Palettes_b469: ; b469
+ RGB 28, 31, 16
+ RGB 31, 19, 10
+ RGB 31, 07, 01
+ RGB 00, 00, 00
+
+ RGB 28, 31, 16
+ RGB 31, 19, 10
+ RGB 10, 09, 31
+ RGB 00, 00, 00
+
+ RGB 28, 31, 16
+ RGB 31, 19, 10
+ RGB 07, 23, 03
+ RGB 00, 00, 00
+
+ RGB 28, 31, 16
+ RGB 31, 19, 10
+ RGB 15, 10, 03
+ RGB 00, 00, 00
+
+ RGB 28, 31, 16
+ RGB 31, 19, 10
+ RGB 30, 10, 06
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 31, 31, 31
+ RGB 13, 13, 13
+ RGB 00, 00, 00
+
+ RGB 22, 31, 10
+ RGB 12, 25, 01
+ RGB 05, 14, 00
+ RGB 07, 07, 07
+
+ RGB 28, 31, 16
+ RGB 24, 18, 07
+ RGB 20, 15, 03
+ RGB 07, 07, 07
+
+ RGB 27, 31, 27
+ RGB 31, 19, 10
+ RGB 31, 07, 01
+ RGB 00, 00, 00
+
+ RGB 27, 31, 27
+ RGB 31, 19, 10
+ RGB 10, 09, 31
+ RGB 00, 00, 00
+
+ RGB 27, 31, 27
+ RGB 31, 19, 10
+ RGB 07, 23, 03
+ RGB 00, 00, 00
+
+ RGB 27, 31, 27
+ RGB 31, 19, 10
+ RGB 15, 10, 03
+ RGB 00, 00, 00
+
+ RGB 27, 31, 27
+ RGB 31, 19, 10
+ RGB 30, 10, 06
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 31, 31, 31
+ RGB 13, 13, 13
+ RGB 00, 00, 00
+
+ RGB 22, 31, 10
+ RGB 12, 25, 01
+ RGB 05, 14, 00
+ RGB 07, 07, 07
+
+ RGB 27, 31, 27
+ RGB 24, 18, 07
+ RGB 20, 15, 03
+ RGB 07, 07, 07
+
+ RGB 15, 14, 24
+ RGB 31, 19, 10
+ RGB 31, 07, 01
+ RGB 00, 00, 00
+
+ RGB 15, 14, 24
+ RGB 31, 19, 10
+ RGB 10, 09, 31
+ RGB 00, 00, 00
+
+ RGB 15, 14, 24
+ RGB 31, 19, 10
+ RGB 07, 23, 03
+ RGB 00, 00, 00
+
+ RGB 15, 14, 24
+ RGB 31, 19, 10
+ RGB 15, 10, 03
+ RGB 00, 00, 00
+
+ RGB 15, 14, 24
+ RGB 31, 19, 10
+ RGB 30, 10, 06
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 31, 31, 31
+ RGB 13, 13, 13
+ RGB 00, 00, 00
+
+ RGB 15, 14, 24
+ RGB 08, 13, 19
+ RGB 00, 11, 13
+ RGB 00, 00, 00
+
+ RGB 15, 14, 24
+ RGB 12, 09, 15
+ RGB 08, 04, 05
+ RGB 00, 00, 00
+
+ RGB 01, 01, 02
+ RGB 31, 19, 10
+ RGB 31, 07, 01
+ RGB 00, 00, 00
+
+ RGB 01, 01, 02
+ RGB 31, 19, 10
+ RGB 10, 09, 31
+ RGB 00, 00, 00
+
+ RGB 01, 01, 02
+ RGB 31, 19, 10
+ RGB 07, 23, 03
+ RGB 00, 00, 00
+
+ RGB 01, 01, 02
+ RGB 31, 19, 10
+ RGB 15, 10, 03
+ RGB 00, 00, 00
+
+ RGB 01, 01, 02
+ RGB 31, 19, 10
+ RGB 30, 10, 06
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 31, 31, 31
+ RGB 13, 13, 13
+ RGB 00, 00, 00
+
+ RGB 01, 01, 02
+ RGB 00, 00, 00
+ RGB 00, 00, 00
+ RGB 00, 00, 00
+
+ RGB 01, 01, 02
+ RGB 00, 00, 00
+ RGB 00, 00, 00
+ RGB 00, 00, 00
+; b569
+
+Palettes_b569: ; b569
+ RGB 21, 21, 21
+ RGB 11, 11, 11
+ RGB 21, 21, 21
+ RGB 11, 11, 11
+
+ RGB 14, 17, 31
+ RGB 07, 11, 15
+ RGB 09, 09, 17
+ RGB 05, 07, 13
+
+ RGB 12, 19, 00
+ RGB 06, 10, 00
+ RGB 06, 09, 07
+ RGB 04, 05, 06
+
+ RGB 21, 21, 21
+ RGB 11, 11, 11
+ RGB 21, 21, 21
+ RGB 17, 08, 07
+
+ RGB 31, 19, 00
+ RGB 27, 10, 05
+ RGB 15, 07, 02
+ RGB 11, 04, 02
+
+ RGB 11, 10, 16
+ RGB 05, 06, 07
+ RGB 03, 04, 08
+ RGB 00, 00, 00
+
+ RGB 31, 10, 00
+ RGB 18, 06, 00
+ RGB 18, 05, 09
+ RGB 17, 08, 07
+
+ RGB 17, 27, 31
+ RGB 05, 15, 31
+ RGB 07, 08, 22
+ RGB 07, 07, 16
+
+ RGB 22, 20, 10
+ RGB 17, 14, 03
+ RGB 11, 11, 05
+ RGB 10, 09, 07
+
+ RGB 31, 08, 04
+ RGB 09, 09, 08
+ RGB 18, 05, 09
+ RGB 09, 09, 08
+
+ RGB 24, 14, 31
+ RGB 13, 07, 21
+ RGB 12, 03, 18
+ RGB 09, 03, 15
+
+ RGB 25, 25, 00
+ RGB 20, 17, 08
+ RGB 12, 12, 00
+ RGB 10, 09, 05
+
+ RGB 27, 23, 01
+ RGB 23, 11, 00
+ RGB 15, 11, 01
+ RGB 11, 10, 01
+
+ RGB 27, 28, 31
+ RGB 17, 19, 22
+ RGB 14, 14, 18
+ RGB 10, 09, 13
+
+ RGB 19, 19, 16
+ RGB 10, 12, 15
+ RGB 09, 09, 11
+ RGB 04, 05, 07
+
+ RGB 14, 17, 31
+ RGB 07, 11, 15
+ RGB 09, 13, 19
+ RGB 07, 07, 16
+
+ RGB 21, 21, 21
+ RGB 13, 13, 13
+ RGB 11, 11, 19
+ RGB 07, 07, 12
+
+ RGB 31, 18, 29
+ RGB 17, 13, 20
+ RGB 14, 06, 12
+ RGB 11, 03, 10
+
+ RGB 23, 15, 31
+ RGB 16, 05, 31
+ RGB 12, 07, 17
+ RGB 08, 06, 10
+
+ RGB 21, 21, 25
+ RGB 16, 16, 16
+ RGB 13, 13, 13
+ RGB 07, 07, 07
+
+ RGB 21, 21, 21
+ RGB 11, 11, 11
+ RGB 21, 21, 21
+ RGB 11, 11, 11
+
+ RGB 19, 31, 15
+ RGB 31, 22, 02
+ RGB 12, 13, 09
+ RGB 09, 12, 03
+
+ RGB 15, 10, 31
+ RGB 07, 05, 15
+ RGB 06, 05, 17
+ RGB 02, 02, 08
+
+ RGB 21, 31, 07
+ RGB 13, 25, 04
+ RGB 09, 14, 08
+ RGB 06, 10, 04
+
+ RGB 20, 31, 14
+ RGB 11, 23, 05
+ RGB 09, 13, 08
+ RGB 06, 09, 04
+
+ RGB 31, 26, 00
+ RGB 31, 15, 00
+ RGB 13, 13, 01
+ RGB 08, 08, 01
+
+ RGB 31, 14, 28
+ RGB 31, 05, 21
+ RGB 14, 07, 17
+ RGB 13, 00, 08
+
+Palettes_b641: ; b641
+ RGB 27, 31, 27
+ RGB 21, 21, 21
+ RGB 13, 13, 13
+ RGB 00, 00, 00
+
+ RGB 27, 31, 27
+ RGB 31, 07, 06
+ RGB 20, 02, 03
+ RGB 00, 00, 00
+
+ RGB 27, 31, 27
+ RGB 10, 31, 09
+ RGB 04, 14, 01
+ RGB 00, 00, 00
+
+ RGB 27, 31, 27
+ RGB 08, 12, 31
+ RGB 01, 04, 31
+ RGB 00, 00, 00
+
+ RGB 27, 31, 27
+ RGB 31, 31, 07
+ RGB 31, 16, 01
+ RGB 00, 00, 00
+; b669
+
+ RGB 27, 31, 27
+ RGB 22, 16, 08
+ RGB 13, 07, 01
+ RGB 00, 00, 00
+
+ RGB 27, 31, 27
+ RGB 15, 31, 31
+ RGB 05, 17, 31
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 11, 11, 19
+ RGB 07, 07, 12
+ RGB 00, 00, 00
+; b681
+
+Palettes_b681: ; b681
+ RGB 27, 31, 27
+ RGB 31, 19, 10
+ RGB 31, 07, 04
+ RGB 00, 00, 00
+
+ RGB 27, 31, 27
+ RGB 31, 19, 10
+ RGB 10, 14, 20
+ RGB 00, 00, 00
+
+ RGB 27, 31, 27
+ RGB 31, 19, 10
+ RGB 31, 07, 04
+ RGB 00, 00, 00
+
+ RGB 27, 31, 27
+ RGB 31, 19, 10
+ RGB 31, 07, 04
+ RGB 00, 00, 00
+
+ RGB 27, 31, 27
+ RGB 31, 19, 10
+ RGB 31, 07, 04
+ RGB 00, 00, 00
+
+ RGB 27, 31, 27
+ RGB 31, 19, 10
+ RGB 31, 07, 04
+ RGB 00, 00, 00
+
+ RGB 27, 31, 27
+ RGB 31, 19, 10
+ RGB 31, 07, 04
+ RGB 00, 00, 00
+
+ RGB 27, 31, 27
+ RGB 31, 19, 10
+ RGB 31, 07, 04
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 21, 21, 21
+ RGB 13, 13, 13
+ RGB 07, 07, 07
+
+ RGB 31, 31, 31
+ RGB 31, 31, 07
+ RGB 31, 16, 01
+ RGB 07, 07, 07
+
+ RGB 31, 31, 31
+ RGB 31, 19, 24
+ RGB 30, 10, 06
+ RGB 07, 07, 07
+
+ RGB 31, 31, 31
+ RGB 12, 25, 01
+ RGB 05, 14, 00
+ RGB 07, 07, 07
+
+ RGB 31, 31, 31
+ RGB 08, 12, 31
+ RGB 01, 04, 31
+ RGB 07, 07, 07
+
+ RGB 31, 31, 31
+ RGB 24, 18, 07
+ RGB 20, 15, 03
+ RGB 07, 07, 07
+
+Palettes_b6f1: ; b6f1
+ RGB 31, 31, 31
+ RGB 18, 23, 31
+ RGB 15, 20, 31
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 22, 00, 31
+ RGB 15, 20, 31
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 31, 00, 00
+ RGB 15, 20, 31
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 25, 22, 00
+ RGB 15, 20, 31
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 23, 26, 31
+ RGB 18, 23, 31
+ RGB 00, 00, 00
+
+Palettes_b719: ; b719
+ RGB 31, 31, 31
+ RGB 07, 06, 03
+ RGB 07, 06, 03
+ RGB 07, 06, 03
+
+ RGB 31, 31, 31
+ RGB 31, 31, 00
+ RGB 26, 22, 00
+ RGB 00, 00, 00
+; b729
+
+Palettes_b729: ; b729
+ RGB 28, 31, 20
+ RGB 21, 21, 21
+ RGB 13, 13, 13
+ RGB 00, 00, 00
+
+ RGB 28, 31, 20
+ RGB 00, 31, 00
+ RGB 00, 00, 31
+ RGB 00, 00, 00
+
+ RGB 28, 31, 20
+ RGB 00, 31, 00
+ RGB 15, 07, 00
+ RGB 00, 00, 00
+
+ RGB 28, 31, 20
+ RGB 31, 15, 00
+ RGB 15, 07, 00
+ RGB 00, 00, 00
+
+ RGB 28, 31, 20
+ RGB 00, 31, 00
+ RGB 00, 00, 31
+ RGB 31, 00, 00
+
+ RGB 28, 31, 20
+ RGB 00, 31, 00
+ RGB 15, 07, 00
+ RGB 31, 00, 00
+; b759
+
+Palettes_b759: ; b759
+ RGB 28, 31, 20
+ RGB 21, 21, 21
+ RGB 13, 13, 13
+ RGB 00, 00, 00
+
+ RGB 28, 31, 20
+ RGB 00, 31, 00
+ RGB 00, 00, 31
+ RGB 00, 00, 00
+
+ RGB 28, 31, 20
+ RGB 00, 31, 00
+ RGB 15, 07, 00
+ RGB 00, 00, 00
+
+ RGB 28, 31, 20
+ RGB 10, 18, 31
+ RGB 13, 06, 31
+ RGB 00, 00, 00
+
+ RGB 28, 31, 20
+ RGB 00, 31, 00
+ RGB 00, 00, 31
+ RGB 31, 00, 00
+
+ RGB 28, 31, 20
+ RGB 00, 31, 00
+ RGB 15, 07, 00
+ RGB 31, 00, 00
+; b789
+
+Palettes_b789: ; b789
+ RGB 31, 31, 31
+ RGB 30, 22, 24
+ RGB 18, 18, 18
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 10, 11, 31
+ RGB 18, 18, 18
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 12, 31, 11
+ RGB 18, 18, 18
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 29, 26, 05
+ RGB 18, 18, 18
+ RGB 00, 00, 00
+; b7a9
+
+Palettes_b7a9: ; b7a9
RGB 31, 31, 31
RGB 24, 25, 28
RGB 24, 24, 09
--- a/engine/events.asm
+++ b/engine/events.asm
@@ -529,8 +529,8 @@
ret
.asm_96966
- ld a, $4
- ld hl, $75f8
+ ld a, BANK(UnknownScript_0x135f8)
+ ld hl, UnknownScript_0x135f8
call CallScript
scf
ret
@@ -765,8 +765,8 @@
ld de, EngineBuffer1
ld bc, 3
call FarCopyBytes
- ld a, $4
- ld hl, $7625
+ ld a, BANK(UnknownScript_0x13625)
+ ld hl, UnknownScript_0x13625
call CallScript
scf
ret
@@ -876,8 +876,8 @@
.three ; 96b20
; force the player to move in some direction
- ld a, $4
- ld hl, $653d
+ ld a, BANK(UnknownScript_0x1253d)
+ ld hl, UnknownScript_0x1253d
call CallScript
; ld a, -1
ld c, a
@@ -1025,8 +1025,8 @@
dec a
ld [$dca1], a
ret nz
- ld a, $4
- ld hl, $7619
+ ld a, BANK(UnknownScript_0x13619)
+ ld hl, UnknownScript_0x13619
call CallScript
scf
ret
--- a/engine/scripting.asm
+++ b/engine/scripting.asm
@@ -1561,8 +1561,8 @@
and $3f
cp $1
jr nz, .asm_97470 ; 0x97466 $8
- ld b, $4
- ld hl, $64c1
+ ld b, BANK(UnknownScript_0x124c1)
+ ld hl, UnknownScript_0x124c1
jp ScriptJump
.asm_97470
bit 0, d
binary files /dev/null b/gfx/emotes/bolt.2bpp differ
binary files /dev/null b/gfx/emotes/fish.2bpp differ
binary files /dev/null b/gfx/emotes/happy.2bpp differ
binary files /dev/null b/gfx/emotes/heart.2bpp differ
binary files /dev/null b/gfx/emotes/question.2bpp differ
binary files /dev/null b/gfx/emotes/sad.2bpp differ
binary files /dev/null b/gfx/emotes/shock.2bpp differ
binary files /dev/null b/gfx/emotes/sleep.2bpp differ
binary files /dev/null b/gfx/misc/fishing.2bpp differ
binary files a/gfx/misc/pack.2bpp b/gfx/misc/pack.2bpp differ
binary files /dev/null b/gfx/misc/pack_menu.2bpp differ
binary files a/gfx/ow/misc.2bpp /dev/null differ
--- a/gfx/pics/palette_pointers.asm
+++ b/gfx/pics/palette_pointers.asm
@@ -1,3 +1,5 @@
+PokemonPalettes: ; a8d6
+
BulbasaurPalette: INCLUDE "gfx/pics/001/normal.pal"
BulbasaurShinyPalette: INCLUDE "gfx/pics/001/shiny.pal"
IvysaurPalette: INCLUDE "gfx/pics/002/normal.pal"
@@ -500,3 +502,34 @@
HoOhShinyPalette: INCLUDE "gfx/pics/250/shiny.pal"
CelebiPalette: INCLUDE "gfx/pics/251/normal.pal"
CelebiShinyPalette: INCLUDE "gfx/pics/251/shiny.pal"
+
+; 252
+ RGB 30, 26, 11
+ RGB 23, 16, 00
+; 252 shiny
+ RGB 30, 26, 11
+ RGB 23, 16, 00
+
+; Egg
+ RGB 30, 26, 11
+ RGB 23, 16, 00
+; Egg shiny
+ RGB 30, 26, 11
+ RGB 23, 16, 00
+
+; 254
+ RGB 30, 26, 11
+ RGB 23, 16, 00
+; 254 shiny
+ RGB 30, 26, 11
+ RGB 23, 16, 00
+
+; 255
+ RGB 23, 23, 23
+ RGB 17, 17, 17
+; 255 shiny
+ RGB 23, 23, 23
+ RGB 17, 17, 17
+
+; b0ce
+
--- a/gfx/trainers/palette_pointers.asm
+++ b/gfx/trainers/palette_pointers.asm
@@ -1,3 +1,16 @@
+
+TrainerPalettes: ; b0ce
+
+PlayerPalette: ; b0ce
+; The player's palette
+ RGB 25, 18, 12
+ RGB 22, 09, 05
+
+KrisPalette: ; b0d0
+; Apparently Kris uses Falkner's palette
+; RGB 27, 17, 14
+; RGB 07, 05, 31
+
FalknerPalette: INCLUDE "gfx/trainers/000.pal"
WhitneyPalette: INCLUDE "gfx/trainers/001.pal"
BugsyPalette: INCLUDE "gfx/trainers/002.pal"
@@ -65,3 +78,5 @@
OfficerPalette: INCLUDE "gfx/trainers/064.pal"
GruntfPalette: INCLUDE "gfx/trainers/065.pal"
MysticalmanPalette: INCLUDE "gfx/trainers/066.pal"
+; b1de
+
--- a/main.asm
+++ b/main.asm
@@ -14707,7 +14707,7 @@
Function10026: ; 10026
ld a, [$cf63]
- ld hl, $4030
+ ld hl, Jumptable_10030
call Function1086b
jp [hl]
; 10030
@@ -14750,7 +14750,7 @@
; no known jump sources
Function10067: ; 10067 (4:4067)
- ld hl, $4a4f
+ ld hl, MenuDataHeader_0x10a4f
call Function1d3c
ld a, [$d0d9]
ld [$cf88], a
@@ -14780,7 +14780,7 @@
; no known jump sources
Function100a6: ; 100a6 (4:40a6)
- ld hl, $4a7f
+ ld hl, MenuDataHeader_0x10a7f
call Function1d3c
ld a, [$d0da]
ld [$cf88], a
@@ -14914,7 +14914,7 @@
; no known jump sources
Function10198: ; 10198 (4:4198)
- ld hl, $4aaf
+ ld hl, MenuDataHeader_0x10aaf
call Function1d3c
ld a, [$d0db]
ld [$cf88], a
@@ -14960,28 +14960,28 @@
jr nz, .asm_10217
jr .asm_1021f
.asm_10207
- ld hl, $4249
- ld de, $426a
+ ld hl, MenuDataHeader_0x10249
+ ld de, Jumptable_1026a
jr .asm_10235
.asm_1020f
- ld hl, $4274
- ld de, $4291
+ ld hl, MenuDataHeader_0x10274
+ ld de, Jumptable_10291
jr .asm_10235
.asm_10217
- ld hl, $4299
- ld de, $42ac
+ ld hl, MenuDataHeader_0x10299
+ ld de, Jumptable_102ac
jr .asm_10235
.asm_1021f
- ld hl, $42b0
- ld de, $42c7
+ ld hl, MenuDataHeader_0x102b0
+ ld de, Jumptable_102c7
jr .asm_10235
.asm_10227
- ld hl, $42cd
- ld de, $42ea
+ ld hl, MenuDataHeader_0x102cd
+ ld de, Jumptable_102ea
jr .asm_10235
.asm_1022f
- ld hl, $42f2
- ld de, $430b
+ ld hl, MenuDataHeader_0x102f2
+ ld de, Jumptable_1030b
.asm_10235
push de
call LoadMenuDataHeader
@@ -14995,12 +14995,151 @@
jp [hl]
; 10249 (4:4249)
-INCBIN "baserom.gbc",$10249,$10311 - $10249
+MenuDataHeader_0x10249: ; 0x10249
+ db $40 ; flags
+ db 01, 13 ; start coords
+ db 11, 19 ; end coords
+ dw MenuData2_0x10251
+ db 1 ; default option
+; 0x10251
+
+MenuData2_0x10251: ; 0x10251
+ db $c0 ; flags
+ db 5 ; items
+ db "USE@"
+ db "GIVE@"
+ db "TOSS@"
+ db "SEL@"
+ db "QUIT@"
+; 0x1026a
+
+Jumptable_1026a: ; 1026a
+ dw Function10311
+ dw Function103fd
+ dw Function10364
+ dw Function103c2
+ dw Function10492
+; 10274
+
+MenuDataHeader_0x10274: ; 0x10274
+ db $40 ; flags
+ db 03, 13 ; start coords
+ db 11, 19 ; end coords
+ dw MenuData2_0x1027c
+ db 1 ; default option
+; 0x1027c
+
+MenuData2_0x1027c: ; 0x1027c
+ db $c0 ; flags
+ db 4 ; items
+ db "USE@"
+ db "GIVE@"
+ db "TOSS@"
+ db "QUIT@"
+; 0x10291
+
+Jumptable_10291: ; 10291
+ dw Function10311
+ dw Function103fd
+ dw Function10364
+ dw Function10492
+; 10299
+
+MenuDataHeader_0x10299: ; 0x10299
+ db $40 ; flags
+ db 07, 13 ; start coords
+ db 11, 19 ; end coords
+ dw MenuData2_0x102a1
+ db 1 ; default option
+; 0x102a1
+
+MenuData2_0x102a1: ; 0x102a1
+ db $c0 ; flags
+ db 2 ; items
+ db "USE@"
+ db "QUIT@"
+; 0x102ac
+
+Jumptable_102ac: ; 102ac
+ dw Function10311
+ dw Function10492
+; 102b0
+
+MenuDataHeader_0x102b0: ; 0x102b0
+ db $40 ; flags
+ db 05, 13 ; start coords
+ db 11, 19 ; end coords
+ dw MenuData2_0x102b8
+ db 1 ; default option
+; 0x102b8
+
+MenuData2_0x102b8: ; 0x102b8
+ db $c0 ; flags
+ db 3 ; items
+ db "USE@"
+ db "SEL@"
+ db "QUIT@"
+; 0x102c7
+
+Jumptable_102c7: ; 102c7
+ dw Function10311
+ dw Function103c2
+ dw Function10492
+; 102cd
+
+MenuDataHeader_0x102cd: ; 0x102cd
+ db $40 ; flags
+ db 03, 13 ; start coords
+ db 11, 19 ; end coords
+ dw MenuData2_0x102d5
+ db 1 ; default option
+; 0x102d5
+
+MenuData2_0x102d5: ; 0x102d5
+ db $c0 ; flags
+ db 4 ; items
+ db "GIVE@"
+ db "TOSS@"
+ db "SEL@"
+ db "QUIT@"
+; 0x102ea
+
+Jumptable_102ea: ; 102ea
+ dw Function103fd
+ dw Function10364
+ dw Function103c2
+ dw Function10492
+; 102f2
+
+MenuDataHeader_0x102f2: ; 0x102f2
+ db $40 ; flags
+ db 05, 13 ; start coords
+ db 11, 19 ; end coords
+ dw MenuData2_0x102fa
+ db 1 ; default option
+; 0x102fa
+
+MenuData2_0x102fa: ; 0x102fa
+ db $c0 ; flags
+ db 3 ; items
+ db "GIVE@"
+ db "TOSS@"
+ db "QUIT@"
+; 0x1030b
+
+Jumptable_1030b: ; 1030b
+ dw Function103fd
+ dw Function10364
+ dw Function10492
+; 10311
+
+Function10311: ; 10311
callba CheckItemMenu
ld a, [$d142]
ld hl, Jumptable_1031f
rst JumpTable
ret
+; 1031f
; no known jump sources
Jumptable_1031f: ; 1031f (4:431f)
@@ -15011,11 +15150,11 @@
dw Function10334
dw Function10338
dw Function10355
+; 1035c
-
; known jump sources: 1035c (4:435c)
Function1032d: ; 1032d (4:432d)
- ld hl, $4af3
+ ld hl, UnknownText_0x10af3
call Function10889
ret
@@ -15037,7 +15176,7 @@
call Function10a40
ret
.asm_1034e
- ld hl, $4af8
+ ld hl, UnknownText_0x10af8
call Function10889
ret
@@ -15052,8 +15191,92 @@
ret
; 10364 (4:4364)
-INCBIN "baserom.gbc",$10364,$103fd - $10364
+Function10364: ; 10364
+ ld hl, UnknownText_0x10ae4
+ call Function10889
+ callba Function24fbf
+ push af
+ call Function1c07
+ pop af
+ jr c, .asm_1039c
+ call Function10a1d
+ ld hl, UnknownText_0x10ae9
+ call Function1d4f
+ call YesNoBox
+ push af
+ call Function1c07
+ pop af
+ jr c, .asm_1039c
+ ld hl, NumItems
+ ld a, [$d107]
+ call TossItem
+ call Function10a1d
+ ld hl, UnknownText_0x10aee
+ call Function10889
+.asm_1039c
+ ret
+; 1039d
+
+Function1039d: ; 1039d
+ ld a, [$cf65]
+ and a
+ jr z, .asm_103b2
+ dec a
+ jr z, .asm_103aa
+ dec a
+ jr z, .asm_103ba
+ ret
+
+.asm_103aa
+ xor a
+ ld [$d0db], a
+ ld [$d0e1], a
+ ret
+
+.asm_103b2
+ xor a
+ ld [$d0d9], a
+ ld [$d0df], a
+ ret
+
+.asm_103ba
+ xor a
+ ld [$d0da], a
+ ld [$d0e0], a
+ ret
+; 103c2
+
+Function103c2: ; 103c2
+ callba CheckSelectableItem
+ ld a, [$d142]
+ and a
+ jr nz, .asm_103f6
+ ld a, [$cf65]
+ rrca
+ rrca
+ and $c0
+ ld b, a
+ ld a, [$d107]
+ inc a
+ and $3f
+ or b
+ ld [WhichRegisteredItem], a
+ ld a, [CurItem]
+ ld [RegisteredItem], a
+ call Function10a1d
+ ld de, SFX_FULL_HEAL
+ call WaitPlaySFX
+ ld hl, UnknownText_0x10afd
+ call Function10889
+ ret
+
+.asm_103f6
+ ld hl, UnknownText_0x10b02
+ call Function10889
+ ret
+; 103fd
+
Function103fd: ; 103fd
ld a, [PartyCount] ; $dcd7
and a
@@ -15079,7 +15302,7 @@
ld a, [CurPartySpecies] ; $d108
cp $fd
jr nz, .asm_10453
- ld hl, $448d
+ ld hl, UnknownText_0x1048d
call PrintText
jr .asm_10427
.asm_10453
@@ -15109,12 +15332,16 @@
; known jump sources: 10401 (4:4401)
Function10486: ; 10486 (4:4486)
- ld hl, $4af8
+ ld hl, UnknownText_0x10af8
call Function10889
ret
; 1048d (4:448d)
-INCBIN "baserom.gbc", $1048d, $10492 - $1048d
+UnknownText_0x1048d: ; 0x1048d
+ ; An EGG can't hold an item.
+ text_jump UnknownText_0x1c0b7f
+ db "@"
+; 0x10492
Function10492: ; 10492
ret
@@ -15144,7 +15371,7 @@
Function104b9: ; 104b9
ld a, [$cf63]
- ld hl, $44c3
+ ld hl, Jumptable_104c3
call Function1086b
jp [hl]
; 104c3
@@ -15187,7 +15414,7 @@
; no known jump sources
Function104fa: ; 104fa (4:44fa)
- ld hl, $4a4f
+ ld hl, MenuDataHeader_0x10a4f
call Function1d3c
ld a, [$d0d9]
ld [$cf88], a
@@ -15217,7 +15444,7 @@
; no known jump sources
Function10539: ; 10539 (4:4539)
- ld hl, $4a7f
+ ld hl, MenuDataHeader_0x10a7f
call Function1d3c
ld a, [$d0da]
ld [$cf88], a
@@ -15244,7 +15471,7 @@
xor a
ld [hBGMapMode], a ; $ff00+$d4
call Function1089a
- ld hl, $4b0c
+ ld hl, UnknownText_0x10b0c
call Function10889
call Function10866
ret
@@ -15272,7 +15499,7 @@
; no known jump sources
Function105a6: ; 105a6 (4:45a6)
- ld hl, $4aaf
+ ld hl, MenuDataHeader_0x10aaf
call Function1d3c
ld a, [$d0db]
ld [$cf88], a
@@ -15299,12 +15526,12 @@
Function105dc: ; 105dc (4:45dc)
and a
jr z, .asm_105e7
- ld hl, $4601
- ld de, $4614
+ ld hl, MenuDataHeader_0x10601
+ ld de, Jumptable_10614
jr .asm_105ed
.asm_105e7
- ld hl, $4618
- ld de, $4627
+ ld hl, MenuDataHeader_0x10618
+ ld de, Jumptable_10627
.asm_105ed
push de
call LoadMenuDataHeader
@@ -15318,7 +15545,45 @@
jp [hl]
; 10601 (4:4601)
-INCBIN "baserom.gbc",$10601,$10629 - $10601
+MenuDataHeader_0x10601: ; 0x10601
+ db $40 ; flags
+ db 07, 13 ; start coords
+ db 11, 19 ; end coords
+ dw MenuData2_0x10609
+ db 1 ; default option
+; 0x10609
+
+MenuData2_0x10609: ; 0x10609
+ db $c0 ; flags
+ db 2 ; items
+ db "USE@"
+ db "QUIT@"
+; 0x10614
+
+Jumptable_10614: ; 10614
+ dw Function10629
+ dw Function10689
+; 10618
+
+MenuDataHeader_0x10618: ; 0x10618
+ db $40 ; flags
+ db 09, 13 ; start coords
+ db 11, 19 ; end coords
+ dw MenuData2_0x10620
+ db 1 ; default option
+; 0x10620
+
+MenuData2_0x10620: ; 0x10620
+ db $c0 ; flags
+ db 1 ; items
+ db "QUIT@"
+; 0x10627
+
+Jumptable_10627: ; 10627
+ dw Function10689
+; 10629
+
+Function10629: ; 10629
callba CheckItemContext
ld a, [$d142]
ld hl, Jumptable_10637
@@ -15338,7 +15603,7 @@
; known jump sources: 10678 (4:4678)
Function10645: ; 10645 (4:4645)
- ld hl, $4af3
+ ld hl, UnknownText_0x10af3
call Function10889
ret
@@ -15384,7 +15649,9 @@
ret
; 10689 (4:4689)
-INCBIN "baserom.gbc",$10689,$1068a - $10689
+Function10689: ; 10689
+ ret
+; 1068a
Function1068a: ; 1068a
@@ -15427,7 +15694,7 @@
Function106c7: ; 106c7
ld a, [$cf63]
- ld hl, $46d1
+ ld hl, Jumptable_106d1
call Function1086b
jp [hl]
; 106d1
@@ -15445,7 +15712,7 @@
Function106d9: ; 106d9 (4:46d9)
xor a
call Function10762
- ld hl, $4a67
+ ld hl, MenuDataHeader_0x10a67
call Function1d3c
ld a, [$d0d9]
ld [$cf88], a
@@ -15462,7 +15729,7 @@
Function106ff: ; 106ff (4:46ff)
ld a, $2
call Function10762
- ld hl, $4a97
+ ld hl, MenuDataHeader_0x10a97
call Function1d3c
ld a, [$d0da]
ld [$cf88], a
@@ -15489,7 +15756,7 @@
Function1073b: ; 1073b (4:473b)
ld a, $1
call Function10762
- ld hl, $4ac7
+ ld hl, MenuDataHeader_0x10ac7
call Function1d3c
ld a, [$d0db]
ld [$cf88], a
@@ -15583,7 +15850,7 @@
Function107d7: ; 107d7
ld a, [$cf63]
- ld hl, $47e1
+ ld hl, Jumptable_107e1
call Function1086b
jp [hl]
; 107e1
@@ -15600,21 +15867,53 @@
; no known jump sources
Function107e9: ; 107e9 (4:47e9)
xor a
- ld hl, $47ef
- jr asm_1085a
+ ld hl, MenuDataHeader_0x107ef
+ jr Function1085a
; 107ef (4:47ef)
-INCBIN "baserom.gbc",$107ef,$10807 - $107ef
+MenuDataHeader_0x107ef: ; 0x107ef
+ db $40 ; flags
+ db 01, 07 ; start coords
+ db 11, 19 ; end coords
+ dw MenuData2_0x107f7
+ db 1 ; default option
+; 0x107f7
+MenuData2_0x107f7: ; 0x107f7
+ db $ae ; flags
+ db 5, 8 ; rows, columns
+ db 2 ; horizontal spacing
+ dbw 0, $d288
+ dbw BANK(Function24ab4), Function24ab4
+ dbw BANK(Function24ac3), Function24ac3
+ dbw BANK(Function244c3), Function244c3
+; 10807
+
; no known jump sources
Function10807: ; 10807 (4:4807)
ld a, $2
- ld hl, $480e
- jr asm_1085a
+ ld hl, MenuDataHeader_0x1080e
+ jr Function1085a
; 1080e (4:480e)
-INCBIN "baserom.gbc",$1080e,$10826 - $1080e
+MenuDataHeader_0x1080e: ; 0x1080e
+ db $40 ; flags
+ db 01, 07 ; start coords
+ db 11, 19 ; end coords
+ dw MenuData2_0x10816
+ db 1 ; default option
+; 0x10816
+MenuData2_0x10816: ; 0x10816
+ db $ae ; flags
+ db 5, 8 ; rows, columns
+ db 1 ; horizontal spacing
+ dbw 0, $d292
+ dbw BANK(Function24ab4), Function24ab4
+ dbw BANK(Function24ac3), Function24ac3
+ dbw BANK(Function244c3), Function244c3
+; 10826
+
; no known jump sources
Function10826: ; 10826 (4:4826)
ld a, $3
@@ -15628,12 +15927,29 @@
; no known jump sources
Function1083b: ; 1083b (4:483b)
ld a, $1
- ld hl, $4842
- jr asm_1085a
+ ld hl, MenuDataHeader_0x10842
+ jr Function1085a
; 10842 (4:4842)
-INCBIN "baserom.gbc",$10842,$1085a - $10842
-asm_1085a: ; 1085a (4:485a)
+MenuDataHeader_0x10842: ; 0x10842
+ db $40 ; flags
+ db 01, 07 ; start coords
+ db 11, 19 ; end coords
+ dw MenuData2_0x1084a
+ db 1 ; default option
+; 0x1084a
+
+MenuData2_0x1084a: ; 0x1084a
+ db $ae ; flags
+ db 5, 8 ; rows, columns
+ db 2 ; horizontal spacing
+ dbw 0, $d2a6
+ dbw BANK(Function24ab4), Function24ab4
+ dbw BANK(Function24ac3), Function24ac3
+ dbw BANK(Function244c3), Function244c3
+; 1085a
+
+Function1085a: ; 1085a (4:485a)
push hl
call Function10762
pop hl
@@ -15647,10 +15963,9 @@
inc [hl]
ret
-
Function1086b: ; 1086b
ld e, a
- ld d, $0
+ ld d, 0
add hl, de
add hl, de
ld a, [hli]
@@ -15659,7 +15974,6 @@
ret
; 10874
-
; no known jump sources
Function10874: ; 10874 (4:4874)
ld hl, $cf63
@@ -15705,7 +16019,7 @@
jr nz, .asm_108c5
.asm_108b3
- ld hl, $48cc
+ ld hl, PackGFXPointers
add hl, de
add hl, de
ld a, [hli]
@@ -15712,7 +16026,7 @@
ld e, a
ld d, [hl]
ld hl, $9500
- ld bc, $040f
+ lb bc, BANK(PackGFX), 15
call Request2bpp
ret
@@ -15721,7 +16035,12 @@
ret
; 108cc
-INCBIN "baserom.gbc",$108cc,$108d4 - $108cc
+PackGFXPointers: ; 108cc
+ dw PackGFX + $f0 * 1
+ dw PackGFX + $f0 * 3
+ dw PackGFX + $f0 * 0
+ dw PackGFX + $f0 * 2
+; 108d4
; known jump sources: 1008c (4:408c), 100cb (4:40cb), 100f2 (4:40f2), 101bd (4:41bd), 1051f (4:451f), 1055e (4:455e), 1058b (4:458b), 105cb (4:45cb)
Function108d4: ; 108d4 (4:48d4)
@@ -15776,7 +16095,7 @@
ret
.asm_10923
callba Function2490c
- ld hl, $4b07
+ ld hl, UnknownText_0x10b07
call Function10889
scf
ret
@@ -15807,10 +16126,10 @@
call ClearTileMap
call ClearSprites
call DisableLCD
- ld hl, $4b16
+ ld hl, PackMenuGFX
ld de, VTiles2
ld bc, $0600
- ld a, $4
+ ld a, BANK(PackMenuGFX)
call FarCopyBytes
ld hl, $c4b4
ld bc, $00dc
@@ -15840,10 +16159,10 @@
Function109a5: ; 109a5
ld hl, $c4dc
ld a, $50
- ld de, $000f
- ld b, $3
+ ld de, 15
+ ld b, 3
.asm_109af
- ld c, $5
+ ld c, 5
.asm_109b1
ld [hli], a
inc a
@@ -15857,19 +16176,22 @@
Function109bb: ; 109bb
ld a, [$cf65]
+
+ ; * 15
ld d, a
swap a
sub d
- ld d, $0
+
+ ld d, 0
ld e, a
- ld hl, $49e1
+ ld hl, Tilemap_109e1
add hl, de
ld d, h
ld e, l
ld hl, $c52c
- ld c, $3
+ ld c, 3
.asm_109d0
- ld b, $5
+ ld b, 5
.asm_109d2
ld a, [de]
inc de
@@ -15877,7 +16199,7 @@
dec b
jr nz, .asm_109d2
ld a, c
- ld c, $f
+ ld c, 15
add hl, bc
ld c, a
dec c
@@ -15885,8 +16207,29 @@
ret
; 109e1
-INCBIN "baserom.gbc",$109e1,$10a36 - $109e1
+Tilemap_109e1: ; 109e1
+ db $00, $04, $04, $04, $01, $06, $07, $08, $09, $0a, $02, $05, $05, $05, $03
+ db $00, $04, $04, $04, $01, $15, $16, $17, $18, $19, $02, $05, $05, $05, $03
+ db $00, $04, $04, $04, $01, $0b, $0c, $0d, $0e, $0f, $02, $05, $05, $05, $03
+ db $00, $04, $04, $04, $01, $10, $11, $12, $13, $14, $02, $05, $05, $05, $03
+; 10a1d
+Function10a1d: ; 10a1d
+ ld a, [CurItem]
+ ld [$d265], a
+ call GetItemName
+ call CopyName1
+ ret
+; 10a2a
+
+Function10a2a: ; 10a2a
+ ld hl, TileMap
+ ld bc, $0168
+ ld a, $7f
+ call ByteFill
+ ret
+; 10a36
+
; known jump sources: 1005a (4:405a), 10099 (4:4099), 100d8 (4:40d8), 1018b (4:418b), 104ed (4:44ed), 1052c (4:452c), 1056b (4:456b), 10599 (4:4599), 10765 (4:4765)
Function10a36: ; 10a36 (4:4a36)
ld hl, $c4cd
@@ -15904,8 +16247,183 @@
ret
; 10a4f
-INCBIN "baserom.gbc",$10a4f,$10b16 - $10a4f
+MenuDataHeader_0x10a4f: ; 0x10a4f
+ db $40 ; flags
+ db 01, 07 ; start coords
+ db 11, 19 ; end coords
+ dw MenuData2_0x10a57
+ db 1 ; default option
+; 0x10a57
+MenuData2_0x10a57: ; 0x10a57
+ db $ae ; flags
+ db 5, 8 ; rows, columns
+ db 2 ; horizontal spacing
+ dbw 0, $d892
+ dbw BANK(Function24ab4), Function24ab4
+ dbw BANK(Function24ac3), Function24ac3
+ dbw BANK(Function244c3), Function244c3
+; 10a67
+
+MenuDataHeader_0x10a67: ; 0x10a67
+ db $40 ; flags
+ db 01, 07 ; start coords
+ db 11, 19 ; end coords
+ dw MenuData2_0x10a6f
+ db 1 ; default option
+; 0x10a6f
+
+MenuData2_0x10a6f: ; 0x10a6f
+ db $2e ; flags
+ db 5, 8 ; rows, columns
+ db 2 ; horizontal spacing
+ dbw 0, $d892
+ dbw BANK(Function24ab4), Function24ab4
+ dbw BANK(Function24ac3), Function24ac3
+ dbw BANK(Function244c3), Function244c3
+; 10a7f
+
+MenuDataHeader_0x10a7f: ; 0x10a7f
+ db $40 ; flags
+ db 01, 07 ; start coords
+ db 11, 19 ; end coords
+ dw MenuData2_0x10a87
+ db 1 ; default option
+; 0x10a87
+
+MenuData2_0x10a87: ; 0x10a87
+ db $ae ; flags
+ db 5, 8 ; rows, columns
+ db 1 ; horizontal spacing
+ dbw 0, $d8bc
+ dbw BANK(Function24ab4), Function24ab4
+ dbw BANK(Function24ac3), Function24ac3
+ dbw BANK(Function244c3), Function244c3
+; 10a97
+
+MenuDataHeader_0x10a97: ; 0x10a97
+ db $40 ; flags
+ db 01, 07 ; start coords
+ db 11, 19 ; end coords
+ dw MenuData2_0x10a9f
+ db 1 ; default option
+; 0x10a9f
+
+MenuData2_0x10a9f: ; 0x10a9f
+ db $2e ; flags
+ db 5, 8 ; rows, columns
+ db 1 ; horizontal spacing
+ dbw 0, $d8bc
+ dbw BANK(Function24ab4), Function24ab4
+ dbw BANK(Function24ac3), Function24ac3
+ dbw BANK(Function244c3), Function244c3
+; 10aaf
+
+MenuDataHeader_0x10aaf: ; 0x10aaf
+ db $40 ; flags
+ db 01, 07 ; start coords
+ db 11, 19 ; end coords
+ dw MenuData2_0x10ab7
+ db 1 ; default option
+; 0x10ab7
+
+MenuData2_0x10ab7: ; 0x10ab7
+ db $ae ; flags
+ db 5, 8 ; rows, columns
+ db 2 ; horizontal spacing
+ dbw 0, $d8d7
+ dbw BANK(Function24ab4), Function24ab4
+ dbw BANK(Function24ac3), Function24ac3
+ dbw BANK(Function244c3), Function244c3
+; 10ac7
+
+MenuDataHeader_0x10ac7: ; 0x10ac7
+ db $40 ; flags
+ db 01, 07 ; start coords
+ db 11, 19 ; end coords
+ dw MenuData2_0x10acf
+ db 1 ; default option
+; 0x10acf
+
+MenuData2_0x10acf: ; 0x10acf
+ db $2e ; flags
+ db 5, 8 ; rows, columns
+ db 2 ; horizontal spacing
+ dbw 0, $d8d7
+ dbw BANK(Function24ab4), Function24ab4
+ dbw BANK(Function24ac3), Function24ac3
+ dbw BANK(Function244c3), Function244c3
+; 10adf
+
+UnknownText_0x10adf: ; 0x10adf
+ ; No items.
+ text_jump UnknownText_0x1c0b9a
+ db "@"
+; 0x10ae4
+
+UnknownText_0x10ae4: ; 0x10ae4
+ ; Throw away how many?
+ text_jump UnknownText_0x1c0ba5
+ db "@"
+; 0x10ae9
+
+UnknownText_0x10ae9: ; 0x10ae9
+ ; Throw away @ @ (S)?
+ text_jump UnknownText_0x1c0bbb
+ db "@"
+; 0x10aee
+
+UnknownText_0x10aee: ; 0x10aee
+ ; Threw away @ (S).
+ text_jump UnknownText_0x1c0bd8
+ db "@"
+; 0x10af3
+
+UnknownText_0x10af3: ; 0x10af3
+ ; OAK: ! This isn't the time to use that!
+ text_jump UnknownText_0x1c0bee
+ db "@"
+; 0x10af8
+
+UnknownText_0x10af8: ; 0x10af8
+ ; You don't have a #MON!
+ text_jump UnknownText_0x1c0c17
+ db "@"
+; 0x10afd
+
+UnknownText_0x10afd: ; 0x10afd
+ ; Registered the @ .
+ text_jump UnknownText_0x1c0c2e
+ db "@"
+; 0x10b02
+
+UnknownText_0x10b02: ; 0x10b02
+ ; You can't register that item.
+ text_jump UnknownText_0x1c0c45
+ db "@"
+; 0x10b07
+
+UnknownText_0x10b07: ; 0x10b07
+ ; Where should this be moved to?
+ text_jump UnknownText_0x1c0c63
+ db "@"
+; 0x10b0c
+
+UnknownText_0x10b0c: ; 0x10b0c
+ ;
+ text_jump UnknownText_0x1c0c83
+ db "@"
+; 0x10b11
+
+UnknownText_0x10b11: ; 0x10b11
+ ; You can't use it in a battle.
+ text_jump UnknownText_0x1c0c85
+ db "@"
+; 0x10b16
+
+PackMenuGFX:
+INCBIN "gfx/misc/pack_menu.2bpp"
+
PackGFX:
INCBIN "gfx/misc/pack.2bpp"
@@ -16552,10 +17070,10 @@
Function1171d: ; 1171d
ld a, [EnemyAtkLevel]
- and $7
+ and 7
ld e, a
- ld d, $0
- ld hl, $572e
+ ld d, 0
+ ld hl, Jumptable_1172e
add hl, de
add hl, de
ld a, [hli]
@@ -16592,7 +17110,7 @@
call PlaceString
ld l, c
ld h, b
- ld de, $5780
+ ld de, Strings_11780
call PlaceString
inc de
ld hl, $c4f5
@@ -16610,7 +17128,10 @@
ret
; 11780 (4:5780)
-INCBIN "baserom.gbc",$11780,$1178d - $11780
+Strings_11780: ; 11780
+ db "'S@"
+ db "NICKNAME?@"
+; 1178d
; no known jump sources
Function1178d: ; 1178d (4:578d)
@@ -16617,47 +17138,53 @@
callba GetPlayerIcon
call Function11847
ld hl, $c4cd
- ld de, $57a3
+ ld de, String_117a3
call PlaceString
call Function11882
ret
; 117a3 (4:57a3)
-INCBIN "baserom.gbc",$117a3,$117ae - $117a3
+String_117a3: ; 117a3
+ db "YOUR NAME?@"
+; 117ae
; no known jump sources
Function117ae: ; 117ae (4:57ae)
- ld de, $43c0
- ld b, $30
+ ld de, SilverSpriteGFX
+ ld b, BANK(SilverSpriteGFX)
call Function11847
ld hl, $c4cd
- ld de, $57c3
+ ld de, String_117c3
call PlaceString
call Function11882
ret
; 117c3 (4:57c3)
-INCBIN "baserom.gbc",$117c3,$117d1 - $117c3
+String_117c3: ; 117c3
+ db "RIVAL'S NAME?@"
+; 117d1
; no known jump sources
Function117d1: ; 117d1 (4:57d1)
- ld de, $4fc0
- ld b, $30
+ ld de, MomSpriteGFX
+ ld b, BANK(MomSpriteGFX)
call Function11847
ld hl, $c4cd
- ld de, $57e6
+ ld de, String_117e6
call PlaceString
call Function11882
ret
; 117e6 (4:57e6)
-INCBIN "baserom.gbc",$117e6,$117f5 - $117e6
+String_117e6: ; 117e6
+ db "MOTHER'S NAME?@"
+; 117f5
; no known jump sources
Function117f5: ; 117f5 (4:57f5)
- ld de, $7380
+ ld de, PokeBallSpriteGFX
ld hl, $8000
- ld bc, $3104
+ lb bc, BANK(PokeBallSpriteGFX), $4
call Request2bpp
xor a
ld hl, $c300
@@ -16670,24 +17197,28 @@
add hl, bc
ld [hl], $0
ld hl, $c4cd
- ld de, $5822
+ ld de, String_11822
call PlaceString
call Function11889
ret
; 11822 (4:5822)
-INCBIN "baserom.gbc",$11822,$1182c - $11822
+String_11822: ; 11822
+ db "BOX NAME?@"
+; 1182c
; no known jump sources
Function1182c: ; 1182c (4:582c)
ld hl, $c4cb
- ld de, $5839
+ ld de, String_11839
call PlaceString
call Function11882
ret
; 11839 (4:5839)
-INCBIN "baserom.gbc",$11839,$11847 - $11839
+String_11839: ; 11839
+ db "おともだち の なまえは?@"
+; 11847
; known jump sources: 11793 (4:5793), 117b3 (4:57b3), 117d6 (4:57d6)
Function11847: ; 11847 (4:5847)
@@ -16726,22 +17257,22 @@
Function1187b: ; 1187b (4:587b)
ld a, $a
ld hl, $c51d
- jr asm_11890
+ jr Function11890
; known jump sources: 1179f (4:579f), 117bf (4:57bf), 117e2 (4:57e2), 11835 (4:5835)
Function11882: ; 11882 (4:5882)
ld a, $7
ld hl, $c51d
- jr asm_11890
+ jr Function11890
; known jump sources: 1181e (4:581e)
Function11889: ; 11889 (4:5889)
ld a, $8
ld hl, $c4f5
- jr asm_11890
+ jr Function11890
; known jump sources: 11880 (4:5880), 11887 (4:5887), 1188e (4:588e)
-asm_11890: ; 11890 (4:5890)
+Function11890: ; 11890 (4:5890)
ld [$c6d3], a
ld a, l
ld [EnemySDefLevel], a ; $c6d8
@@ -16875,7 +17406,7 @@
ld a, [$cf63]
ld e, a
ld d, $0
- ld hl, $5977
+ ld hl, Jumptable_11977
add hl, de
add hl, de
ld a, [hli]
@@ -17035,10 +17566,10 @@
inc d
.asm_11a53
cp d
- ld de, $5a79
+ ld de, Unknown_11a79
ld a, $0
jr nz, .asm_11a60
- ld de, $5a82
+ ld de, Unknown_11a82
ld a, $1
.asm_11a60
ld hl, $e
@@ -17059,7 +17590,11 @@
ret
; 11a79 (4:5a79)
-INCBIN "baserom.gbc",$11a79,$11a8b - $11a79
+Unknown_11a79: ; 11a79
+ db $00, $10, $20, $30, $40, $50, $60, $70, $80
+Unknown_11a82: ; 11a82
+ db $00, $00, $00, $30, $30, $30, $60, $60, $60
+; 11a8b
; known jump sources: 11a3b (4:5a3b)
Function11a8b: ; 11a8b (4:5a8b)
@@ -17175,9 +17710,14 @@
ld a, [PlayerEvaLevel] ; $c6d2
cp c
ret nc
+
ld a, [EnemySAtkLevel] ; $c6d7
+
+Function11b23: ; 11b23
call Function11bd0
ld [hl], a
+
+Function11b27: ; 11b27
ld hl, PlayerEvaLevel ; $c6d2
inc [hl]
call Function11bd0
@@ -17192,8 +17732,89 @@
ret
; 11b39 (4:5b39)
-INCBIN "baserom.gbc",$11b39,$11bbc - $11b39
+Function11b39: ; 11b39
+ ld a, [PlayerEvaLevel]
+ and a
+ ret z
+ push hl
+ ld hl, PlayerEvaLevel
+ dec [hl]
+ call Function11bd0
+ ld c, [hl]
+ pop hl
+.asm_11b48
+ ld a, [hli]
+ cp $ff
+ jr z, Function11b27
+ cp c
+ jr z, .asm_11b53
+ inc hl
+ jr .asm_11b48
+
+.asm_11b53
+ ld a, [hl]
+ jr Function11b23
+; 11b56
+
+Unknown_11b56: ; 11b56
+ db $b6, $26
+ db $b7, $27
+ db $b8, $28
+ db $b9, $29
+ db $ba, $2a
+ db $bb, $2b
+ db $bc, $2c
+ db $bd, $2d
+ db $be, $2e
+ db $bf, $2f
+ db $c0, $30
+ db $c1, $31
+ db $c2, $32
+ db $c3, $33
+ db $c4, $34
+ db $ca, $3a
+ db $cb, $3b
+ db $cc, $3c
+ db $cd, $3d
+ db $ce, $3e
+ db $85, $05
+ db $86, $06
+ db $87, $07
+ db $88, $08
+ db $89, $09
+ db $8a, $0a
+ db $8b, $0b
+ db $8c, $0c
+ db $8d, $0d
+ db $8e, $0e
+ db $8f, $0f
+ db $90, $10
+ db $91, $11
+ db $92, $12
+ db $93, $13
+ db $99, $19
+ db $9a, $1a
+ db $9b, $1b
+ db $cd, $3d
+ db $9c, $1c
+ db $ff
+; 11ba7
+
+Unknown_11ba7: ; 11ba7
+ db $ca, $44
+ db $cb, $45
+ db $cc, $46
+ db $cd, $47
+ db $ce, $48
+ db $99, $40
+ db $9a, $41
+ db $9b, $42
+ db $cd, $47
+ db $9c, $43
+ db $ff
+; 11bbc
+
; known jump sources: 119e7 (4:59e7), 1208d (4:608d)
Function11bbc: ; 11bbc (4:5bbc)
ld hl, PlayerEvaLevel ; $c6d2
@@ -17219,12 +17840,12 @@
ld l, a
ld a, [PlayerEvaLevel] ; $c6d2
ld e, a
- ld d, $0
+ ld d, 0
add hl, de
pop af
ret
+; 11be0
-
Function11be0: ; 11be0
ld hl, PlayerSDefLevel
ld a, [hli]
@@ -17316,24 +17937,29 @@
callab Function8cf53
call Functione51
call Functione5f
- ld de, $5e65
+
+ ld de, GFX_11e65
ld hl, $8eb0
- ld bc, $0401
+ lb bc, BANK(GFX_11e65), 1
call Get1bpp
- ld de, $5e6d
+
+ ld de, GFX_11e6d
ld hl, $8f20
- ld bc, $0401
+ lb bc, BANK(GFX_11e6d), 1
call Get1bpp
+
ld de, $9600
- ld hl, $5cb7
- ld bc, $0010
- ld a, $4
+ ld hl, GFX_11cb7
+ ld bc, $10
+ ld a, BANK(GFX_11cb7)
call FarCopyBytes
+
ld de, $87e0
- ld hl, $5cc7
- ld bc, $0020
- ld a, $4
+ ld hl, GFX_11cc7
+ ld bc, $20
+ ld a, BANK(GFX_11cc7)
call FarCopyBytes
+
ld a, $5
ld hl, $c312
ld [hli], a
@@ -17352,8 +17978,14 @@
ret
; 11cb7
-INCBIN "baserom.gbc",$11cb7,$11ce7 - $11cb7
+GFX_11cb7: ; 11cb7
+INCBIN "baserom.gbc", $11cb7, $11cc7 - $11cb7
+; 11cc7
+GFX_11cc7: ; 11cc7
+INCBIN "baserom.gbc", $11cc7, $11ce7 - $11cc7
+; 11ce7
+
NameInputLower:
db "a b c d e f g h i"
db "j k l m n o p q r"
@@ -17380,10 +18012,20 @@
db "× ( ) : ; [ ] ", $e1, " ", $e2
db "- ? ! ♂ ♀ / . , &"
db "lower DEL END "
+; 11e5d
+GFX_11e5d: ; 11e5d
+INCBIN "baserom.gbc",$11e5d,$11e65 - $11e5d
+; 11e6d
-INCBIN "baserom.gbc",$11e5d,$11e75 - $11e5d
+GFX_11e65:
+INCBIN "baserom.gbc",$11e65,$11e6d - $11e65
+; 11e6d
+GFX_11e6d: ; 11e6d
+INCBIN "baserom.gbc", $11e6d, $11e75 - $11e6d
+; 11e75
+
; no known jump sources
Function11e75: ; 11e75 (4:5e75)
ld hl, PlayerSDefLevel ; $c6d0
@@ -17415,9 +18057,9 @@
call DisableLCD
call Function11c51
ld de, $8000
- ld hl, $5ef4
+ ld hl, GFX_11ef4
ld bc, $80
- ld a, $4
+ ld a, BANK(GFX_11ef4)
call FarCopyBytes
xor a
ld hl, $c300
@@ -17452,7 +18094,9 @@
ret
; 11ef4 (4:5ef4)
+GFX_11ef4: ; 11ef4
INCBIN "baserom.gbc",$11ef4,$11f74 - $11ef4
+; 11f74
; known jump sources: 11ecc (4:5ecc)
Function11f74: ; 11f74 (4:5f74)
@@ -17461,7 +18105,9 @@
ret
; 11f7a (4:5f7a)
-INCBIN "baserom.gbc",$11f7a,$11f84 - $11f7a
+String_11f7a: ; 11f7a
+ db "メールを かいてね@"
+; 11f84
; known jump sources: 11ec5 (4:5ec5)
Function11f84: ; 11f84 (4:5f84)
@@ -17541,8 +18187,8 @@
Function12008: ; 12008 (4:6008)
ld a, [$cf63]
ld e, a
- ld d, $0
- ld hl, $6017
+ ld d, 0
+ ld hl, Jumptable_12017
add hl, de
add hl, de
ld a, [hli]
@@ -17647,11 +18293,11 @@
xor $1
ld [hl], a
jr nz, .asm_120ba
- ld de, $61dd
+ ld de, String_121dd
call Function11fa9
ret
.asm_120ba
- ld de, $624f
+ ld de, String_1224f
call Function11fa9
ret
@@ -17667,10 +18313,10 @@
add hl, bc
ld [hl], e
cp $5
- ld de, $60f8
+ ld de, Unknown_120f8
ld a, $0
jr nz, .asm_120df
- ld de, $6102
+ ld de, Unknown_12102
ld a, $1
.asm_120df
ld hl, $e
@@ -17691,7 +18337,11 @@
ret
; 120f8 (4:60f8)
-INCBIN "baserom.gbc",$120f8,$1210c - $120f8
+Unknown_120f8: ; 120f8
+ db $00, $10, $20, $30, $40, $50, $60, $70, $80, $90
+Unknown_12102: ; 12102
+ db $00, $00, $00, $30, $30, $30, $60, $60, $60, $60
+; 1210c
; known jump sources: 120c1 (4:60c1)
Function1210c: ; 1210c (4:610c)
@@ -17825,8 +18475,59 @@
jp Function11b17
; 121b2 (4:61b2)
-INCBIN "baserom.gbc",$121b2,$122c1 - $121b2
+Function121b2: ; 121b2
+ ld a, [PlayerEvaLevel]
+ and a
+ ret z
+ cp $11
+ jr nz, .asm_121c3
+ push hl
+ ld hl, PlayerEvaLevel
+ dec [hl]
+ dec [hl]
+ jr .asm_121c8
+.asm_121c3
+ push hl
+ ld hl, PlayerEvaLevel
+ dec [hl]
+
+.asm_121c8
+ call Function11bd0
+ ld c, [hl]
+ pop hl
+.asm_121cd
+ ld a, [hli]
+ cp $ff
+ jp z, Function11b27
+ cp c
+ jr z, .asm_121d9
+ inc hl
+ jr .asm_121cd
+
+.asm_121d9
+ ld a, [hl]
+ jp Function11b23
+; 121dd
+
+String_121dd: ; 122dd
+ db "A B C D E F G H I J"
+ db "K L M N O P Q R S T"
+ db "U V W X Y Z , ? !"
+ db "1 2 3 4 5 6 7 8 9 0"
+ db "ゅ ょ ", $70, " ", $71, " é ♂ ♀ ¥ … ×"
+ db "lower DEL END "
+; 1224f
+
+String_1224f: ; 1224f
+ db "a b c d e f g h i j"
+ db "k l m n o p q r s t
+ db "u v w x y z . - /"
+ db "'d 'l 'm 'r 's 't 'v & ( )"
+ db $72, " ", $73, " [ ] ' : ; "
+ db "UPPER DEL END "
+; 122c1
+
UnknownScript_0x122c1: ; 0x122c1
checkflag $0011
iffalse .script_122cd
@@ -17911,8 +18612,8 @@
.asm_12342
ld a, [Buffer1]
ld e, a
- ld d, $0
- ld hl, $6365
+ ld d, 0
+ ld hl, Unknown_12365
add hl, de
add hl, de
ld a, [hli]
@@ -17924,9 +18625,9 @@
ld [$d1ec], a
add hl, de
ld a, [hl]
- cp $5
+ cp 5
jr z, .asm_12364
- ld hl, $6377
+ ld hl, Jumptable_12377
rst JumpTable
jr .asm_12342
@@ -17934,9 +18635,21 @@
ret
; 12365
-INCBIN "baserom.gbc",$12365,$12377 - $12365
+Unknown_12365: ; 12365
+ dw Unknown_1236b
+ dw Unknown_1236f
+ dw Unknown_12373
+; 1236b
-Table12377: ; 12377
+Unknown_1236b: ; 1236b
+ db 0, 1, 3, 5
+Unknown_1236f: ; 1236f
+ db 0, 1, 3, 5
+Unknown_12373: ; 12373
+ db 0, 2, 4, 5
+; 12377
+
+Jumptable_12377: ; 12377
dw Function12383
dw Function12393
dw Function123a1
@@ -17947,9 +18660,9 @@
Function12383: ; 12383
call Function12434
- ld de, $63fc
+ ld de, GFX_123fc
ld hl, $87c0
- ld bc, $0402
+ lb bc, BANK(GFX_123fc), $2
call Request2bpp
ret
; 12393
@@ -17956,7 +18669,7 @@
Function12393: ; 12393
ld hl, $c480
- ld de, $63dc
+ ld de, Unknown_123dc
call Function124a3
call Function124a3
jr Function123a7
@@ -17963,7 +18676,7 @@
Function123a1: ; 123a1
ld hl, $c480
- ld de, $641c
+ ld de, Unknown_1241c
Function123a7: ; 123a7
ld a, [PartyCount]
@@ -17971,10 +18684,10 @@
.asm_123ab
call Function124a3
push de
- ld de, $0012
+ ld de, SFX_SECOND_PART_OF_ITEMFINDER
call PlaySFX
pop de
- ld c, $1e
+ ld c, 30
call DelayFrames
dec b
jr nz, .asm_123ab
@@ -17982,17 +18695,17 @@
; 123bf
Function123bf: ; 123bf
- ld de, $000d
+ ld de, MUSIC_HEAL
call PlayMusic
jp Function12459
; 123c8
Function123c8: ; 123c8
- ld de, $00aa
+ ld de, SFX_GAME_FREAK_LOGO_GS
call PlaySFX
call Function12459
call WaitSFX
- ld de, $000d
+ ld de, SFX_BOOT_PC
call PlaySFX
ret
; 123db
@@ -18001,8 +18714,30 @@
ret
; 123dc
-INCBIN "baserom.gbc",$123dc,$12434 - $123dc
+Unknown_123dc: ; 123dc
+ db $20, $22, $7c, $16
+ db $20, $26, $7c, $16
+ db $26, $20, $7d, $16
+ db $26, $28, $7d, $36
+ db $2b, $20, $7d, $16
+ db $2b, $28, $7d, $36
+ db $30, $20, $7d, $16
+ db $30, $28, $7d, $36
+; 123fc
+GFX_123fc: ; 123fc
+INCBIN "baserom.gbc", $123fc, $1241c - $123fc
+; 1241c
+
+Unknown_1241c: ; 1241c
+ db $3c, $51, $7d, $16
+ db $3c, $56, $7d, $16
+ db $3b, $4d, $7d, $16
+ db $3b, $5a, $7d, $16
+ db $39, $49, $7d, $16
+ db $39, $5d, $7d, $16
+; 12434
+
Function12434: ; 12434
call Function3218
jr nz, .asm_1243e
@@ -18011,9 +18746,9 @@
ret
.asm_1243e
- ld hl, $6451
- ld de, CurMart
- ld bc, $0008
+ ld hl, Palette_12451
+ ld de, $d0f0
+ ld bc, 8
ld a, $5
call FarCopyWRAM
ld a, $1
@@ -18021,7 +18756,12 @@
ret
; 12451
-INCBIN "baserom.gbc",$12451,$12459 - $12451
+Palette_12451: ; 12451
+ RGB 31, 31, 31
+ RGB 31, 19, 10
+ RGB 31, 07, 01
+ RGB 00, 00, 00
+; 12459
Function12459: ; 12459
ld c, $8
@@ -18049,7 +18789,7 @@
push af
ld a, $5
ld [rSVBK], a
- ld hl, CurMart
+ ld hl, $d0f0
ld a, [hli]
ld e, a
ld a, [hli]
@@ -18087,10 +18827,10 @@
Function124a3: ; 124a3
push bc
ld a, [Buffer1]
- ld bc, $1020
+ lb bc, $10, $20
cp $1
jr z, .asm_124b1
- ld bc, $0000
+ lb bc, $00, $00
.asm_124b1
ld a, [de]
@@ -18111,11 +18851,16 @@
ret
; 124c1
-INCBIN "baserom.gbc",$124c1,$124c8 - $124c1
+UnknownScript_0x124c1:: ; 0x124c1
+ 3callasm Function1250a
+ 2jump UnknownScript_0x124ce
+; 0x124c8
UnknownScript_0x124c8:: ; 0x124c8
refreshscreen $0
3callasm Function124fa
+
+UnknownScript_0x124ce: ; 0x124ce
2writetext UnknownText_0x124f5
closetext
special $002e
@@ -18135,8 +18880,9 @@
; 0x124f5
UnknownText_0x124f5: ; 0x124f5
+ ; is out of useable #MON! whited out!
text_jump UnknownText_0x1c0a4e
- db $50
+ db "@"
; 0x124fa
Function124fa: ; 124fa
@@ -18148,12 +18894,13 @@
ret
; 1250a
+Function1250a: ; 1250a
ld b, $0
call GetSGBLayout
call Function32f9
ret
+; 12513
-
HalveMoney: ; 12513
; Empty function...
@@ -18189,17 +18936,84 @@
ret
; 1253d
-INCBIN "baserom.gbc",$1253d,$12580 - $1253d
+UnknownScript_0x1253d:: ; 0x1253d
+ checkcode $9
+ if_equal $0, UnknownScript_0x12555
+ if_equal $1, UnknownScript_0x12550
+ if_equal $2, UnknownScript_0x1255f
+ if_equal $3, UnknownScript_0x1255a
+ end
+; 0x12550
+UnknownScript_0x12550: ; 0x12550
+ applymovement $0, MovementData_0x12564
+ end
+; 0x12555
+UnknownScript_0x12555: ; 0x12555
+ applymovement $0, MovementData_0x1256b
+ end
+; 0x1255a
+
+UnknownScript_0x1255a: ; 0x1255a
+ applymovement $0, MovementData_0x12572
+ end
+; 0x1255f
+
+UnknownScript_0x1255f: ; 0x1255f
+ applymovement $0, MovementData_0x12579
+ end
+; 0x12564
+
+MovementData_0x12564: ; 0x12564
+ step_wait5
+ big_step_down
+ turn_in_down
+ step_wait5
+ big_step_down
+ turn_head_down
+ step_end
+; 0x1256b
+
+MovementData_0x1256b: ; 0x1256b
+ step_wait5
+ big_step_down
+ turn_in_up
+ step_wait5
+ big_step_down
+ turn_head_up
+ step_end
+; 0x12572
+
+MovementData_0x12572: ; 0x12572
+ step_wait5
+ big_step_down
+ turn_in_left
+ step_wait5
+ big_step_down
+ turn_head_left
+ step_end
+; 0x12579
+
+MovementData_0x12579: ; 0x12579
+ step_wait5
+ big_step_down
+ turn_in_right
+ step_wait5
+ big_step_down
+ turn_head_right
+ step_end
+; 0x12580
+
+
Function12580: ; 12580
callba Functionb8172
jr c, .asm_1258d
- ld hl, $65ba
+ ld hl, UnknownScript_0x125ba
jr .asm_12590
.asm_1258d
- ld hl, $65ad
+ ld hl, UnknownScript_0x125ad
.asm_12590
call Function31cd
@@ -18208,9 +19022,50 @@
ret
; 12599
-INCBIN "baserom.gbc",$12599,$125cd - $12599
+Function12599: ; 12599
+ ld c, $4
+.asm_1259b
+ push bc
+ ld de, SFX_SECOND_PART_OF_ITEMFINDER
+ call WaitPlaySFX
+ ld de, SFX_TRANSACTION
+ call WaitPlaySFX
+ pop bc
+ dec c
+ jr nz, .asm_1259b
+ ret
+; 125ad
+UnknownScript_0x125ad: ; 0x125ad
+ reloadmappart
+ special $0035
+ 3callasm Function12599
+ 2writetext UnknownText_0x125c3
+ loadmovesprites
+ end
+; 0x125ba
+UnknownScript_0x125ba: ; 0x125ba
+ reloadmappart
+ special $0035
+ 2writetext UnknownText_0x125c8
+ loadmovesprites
+ end
+; 0x125c3
+
+UnknownText_0x125c3: ; 0x125c3
+ ; Yes! ITEMFINDER indicates there's an item nearby.
+ text_jump UnknownText_0x1c0a77
+ db "@"
+; 0x125c8
+
+UnknownText_0x125c8: ; 0x125c8
+ ; Nope! ITEMFINDER isn't responding.
+ text_jump UnknownText_0x1c0aa9
+ db "@"
+; 0x125cd
+
+
StartMenu:: ; 125cd
call Function1fbf
@@ -18622,8 +19477,8 @@
ld hl, .EndTheContestText
call Function12cf5
jr c, .asm_12903
- ld a, $4
- ld hl, $760b
+ ld a, BANK(UnknownScript_0x1360b)
+ ld hl, UnknownScript_0x1360b
call Function31cf
ld a, 4
ret
@@ -18796,7 +19651,7 @@
ld a, [$d142]
and a
jr nz, .asm_12a3f
- ld hl, $6a45
+ ld hl, UnknownText_0x12a45
call Function1d4f
callba Function24fbf
push af
@@ -18804,7 +19659,7 @@
call Function1c07
pop af
jr c, .asm_12a42
- ld hl, $6a4a
+ ld hl, UnknownText_0x12a4a
call Function1d4f
call YesNoBox
push af
@@ -18815,7 +19670,7 @@
ld a, [$d107]
call TossItem
call PartyMonItemName
- ld hl, $6a4f
+ ld hl, UnknownText_0x12a4f
call Function1d4f
call Function1c07
and a
@@ -18828,16 +19683,36 @@
ret
; 12a45 (4:6a45)
-INCBIN "baserom.gbc",$12a45,$12a54 - $12a45
+UnknownText_0x12a45: ; 0x12a45
+ ; Toss out how many @ (S)?
+ text_jump UnknownText_0x1c1a90
+ db "@"
+; 0x12a4a
+UnknownText_0x12a4a: ; 0x12a4a
+ ; Throw away @ @ (S)?
+ text_jump UnknownText_0x1c1aad
+ db "@"
+; 0x12a4f
+
+UnknownText_0x12a4f: ; 0x12a4f
+ ; Discarded @ (S).
+ text_jump UnknownText_0x1c1aca
+ db "@"
+; 0x12a54
+
; known jump sources: 12a3f (4:6a3f)
Function12a54: ; 12a54 (4:6a54)
- ld hl, $6a5b
+ ld hl, UnknownText_0x12a5b
call Function1d67
ret
; 12a5b (4:6a5b)
-INCBIN "baserom.gbc",$12a5b,$12a60 - $12a5b
+UnknownText_0x12a5b: ; 0x12a5b
+ ; That's too impor- tant to toss out!
+ text_jump UnknownText_0x1c1adf
+ db "@"
+; 0x12a60
CantUseItem: ; 12a60
ld hl, CantUseItemText
@@ -19281,7 +20156,7 @@
jr z, .asm_12d6d
cp $2
jr z, .asm_12d6d
- ld hl, $6dc9
+ ld hl, MenuDataHeader_0x12dc9
call LoadMenuDataHeader
call Function1d81
call Function1c07
@@ -19342,9 +20217,23 @@
; 12dc9
-INCBIN "baserom.gbc",$12dc9,$12de2 - $12dc9
+MenuDataHeader_0x12dc9: ; 0x12dc9
+ db $40 ; flags
+ db 10, 12 ; start coords
+ db 17, 19 ; end coords
+ dw MenuData2_0x12dd1
+ db 1 ; default option
+; 0x12dd1
+MenuData2_0x12dd1: ; 0x12dd1
+ db $80 ; flags
+ db 3 ; items
+ db "READ@"
+ db "TAKE@"
+ db "QUIT@"
+; 0x12de2
+
UnknownText_0x12de2: ; 0x12de2
text_jump UnknownText_0x1c1c22
db "@"
@@ -19426,9 +20315,11 @@
.asm_12e4f
ld a, $0
ret
-; 12e52
-INCBIN "baserom.gbc",$12e52,$12e55 - $12e52
+.asm_12e52
+ ld a, $1
+ ret
+; 12e55
Function12e55: ; 12e55
callba Functionc8ac
@@ -19535,7 +20426,7 @@
jr .asm_12ef9
.asm_12ef3
- ld hl, $6f00
+ ld hl, UnknownText_0x12f00
call PrintText
.asm_12ef9
@@ -19545,7 +20436,11 @@
ret
; 12f00
-INCBIN "baserom.gbc",$12f00,$12f05 - $12f00
+UnknownText_0x12f00: ; 0x12f00
+ ; Not enough HP!
+ text_jump UnknownText_0x1c1ce3
+ db "@"
+; 0x12f05
Function12f05: ; 12f05
ld a, $24
@@ -19621,7 +20516,7 @@
Function12f73: ; 12f73
call Function13172
- ld de, $6fb2
+ ld de, Unknown_12fb2
call Function1bb1
call Function131ef
ld hl, $cfa5
@@ -19660,7 +20555,9 @@
ret
; 12fb2
-INCBIN "baserom.gbc",$12fb2,$12fba - $12fb2
+Unknown_12fb2: ; 12fb2
+ db $03, $01, $03, $01, $40, $00, $20, $c3
+; 12fba
Function12fba: ; 12fba
ld a, [CurPartySpecies]
@@ -19686,7 +20583,7 @@
ld [$d0d8], a
call Function13172
call Function132d3
- ld de, $7163
+ ld de, Unknown_13163
call Function1bb1
.asm_12fe8
call Function131ef
@@ -19841,10 +20738,10 @@
call Function1313a
.asm_13113
- ld de, $0020
+ ld de, SFX_SWITCH_POKEMON
call PlaySFX
call WaitSFX
- ld de, $0020
+ ld de, SFX_SWITCH_POKEMON
call PlaySFX
call WaitSFX
ld hl, $c4c9
@@ -19888,8 +20785,14 @@
jp ClearTileMap
; 13163
-INCBIN "baserom.gbc",$13163,$13172 - $13163
+Unknown_13163: ; 13163
+ db $03, $01, $03, $01, $40, $00, $20, $f3
+; 1316b
+String_1316b: ; 1316b
+ db "Where?@"
+; 13172
+
Function13172: ; 13172
call WhiteBGMap
call ClearTileMap
@@ -19989,13 +20892,13 @@
xor a
ld [hBGMapMode], a
ld hl, $c568
- ld de, $72ba
+ ld de, String_132ba
call PlaceString
ld hl, $c57c
- ld de, $72c2
+ ld de, String_132c2
call PlaceString
ld hl, $c59c
- ld de, $72ca
+ ld de, String_132ca
call PlaceString
ld a, [CurSpecies]
ld b, a
@@ -20019,7 +20922,7 @@
jr .asm_132ad
.asm_132a7
- ld de, $72cf
+ ld de, String_132cf
call PlaceString
.asm_132ad
@@ -20031,7 +20934,18 @@
ret
; 132ba
-INCBIN "baserom.gbc",$132ba,$132d3 - $132ba
+String_132ba: ; 132ba
+ db "┌─────┐@"
+; 132c2
+String_132c2: ; 132c2
+ db "│TYPE/└@"
+; 132ca
+String_132ca: ; 132ca
+ db "ATK/@"
+; 132cf
+String_132cf: ; 132cf
+ db "---@"
+; 132d3
Function132d3: ; 132d3
call Function132da
@@ -20416,10 +21330,10 @@
Function134dd: ; 134dd
call Function1d6e
- ld hl, $750d
+ ld hl, UnknownText_0x1350d
call PrintText
call Function13512
- ld hl, $7550
+ ld hl, MenuDataHeader_0x13550
call Function1d3c
call Function352f
call Function1ad2
@@ -20439,7 +21353,11 @@
ret
; 1350d
-INCBIN "baserom.gbc",$1350d,$13512 - $1350d
+UnknownText_0x1350d: ; 0x1350d
+ ; Which floor?
+ text_jump UnknownText_0x1bd2bc
+ db "@"
+; 0x13512
Function13512: ; 13512
@@ -20452,7 +21370,7 @@
ld c, $8
call TextBox
ld hl, $c4c9
- ld de, $7537
+ ld de, String_13537
call PlaceString
ld hl, $c4f4
call Function1353f
@@ -20461,7 +21379,9 @@
ret
; 13537
-INCBIN "baserom.gbc",$13537,$1353f - $13537
+String_13537: ; 13537
+ db "Now on:@"
+; 1353f
Function1353f: ; 1353f
@@ -20477,10 +21397,27 @@
ret
; 13550
-INCBIN "baserom.gbc",$13550,$13568 - $13550
- ld a, [MenuSelection] ; $cf74
+MenuDataHeader_0x13550: ; 0x13550
+ db $40 ; flags
+ db 01, 12 ; start coords
+ db 09, 18 ; end coords
+ dw MenuData2_0x13558
+ db 1 ; default option
+; 0x13558
+MenuData2_0x13558: ; 0x13558
+ db $10 ; flags
+ db 4, 0 ; rows, columns
+ db 1 ; horizontal spacing
+ dbw 0, $d0f0
+ dbw BANK(Function13568), Function13568
+ dbw BANK(NULL), NULL
+ dbw BANK(NULL), NULL
+; 13568
+Function13568: ; 13568
+ ld a, [MenuSelection] ; $cf74
+
Function1356b: ; 1356b
push de
call Function13575
@@ -20576,7 +21513,13 @@
end
; 0x135f8
-INCBIN "baserom.gbc",$135f8,$13603 - $135f8
+UnknownScript_0x135f8:: ; 0x135f8
+ playsound SFX_ELEVATOR_END
+ loadfont
+ 2writetext UnknownText_0x1360f
+ closetext
+ 2jump UnknownScript_0x1360b
+; 0x13603
UnknownScript_0x13603: ; 0x13603
playsound SFX_ELEVATOR_END
@@ -20583,18 +21526,74 @@
loadfont
2writetext UnknownText_0x13614
closetext
+
+UnknownScript_0x1360b: ; 0x1360b
loadmovesprites
jumpstd $0016
; 0x1360f
-INCBIN "baserom.gbc",$1360f,$13614 - $1360f
+UnknownText_0x1360f: ; 0x1360f
+ ; ANNOUNCER: BEEEP! Time's up!
+ text_jump UnknownText_0x1bd2ca
+ db "@"
+; 0x13614
UnknownText_0x13614: ; 0x13614
+ ; ANNOUNCER: The Contest is over!
text_jump UnknownText_0x1bd2e7
- db $50
+ db "@"
; 0x13619
-INCBIN "baserom.gbc",$13619,$1364f - $13619
+UnknownScript_0x13619:: ; 0x13619
+ loadfont
+ 2writetext UnknownText_0x13620
+ closetext
+ loadmovesprites
+ end
+; 0x13620
+
+UnknownText_0x13620: ; 0x13620
+ ; REPEL's effect wore off.
+ text_jump UnknownText_0x1bd308
+ db "@"
+; 0x13625
+
+UnknownScript_0x13625:: ; 0x13625
+ loadfont
+ copybytetovar Unkn2Pals
+ itemtotext $0, $0
+ 2writetext UnknownText_0x13645
+ giveitem $ff, $1
+ iffalse UnknownScript_0x1363e
+ 3callasm Function1364f
+ specialsound
+ itemnotify
+ 2jump UnknownScript_0x13643
+; 0x1363e
+
+UnknownScript_0x1363e: ; 0x1363e
+ keeptextopen
+ 2writetext UnknownText_0x1364a
+ closetext
+
+UnknownScript_0x13643: ; 13643
+ loadmovesprites
+ end
+; 0x13645
+
+UnknownText_0x13645: ; 0x13645
+ ; found @ !
+ text_jump UnknownText_0x1bd321
+ db "@"
+; 0x1364a
+
+UnknownText_0x1364a: ; 0x1364a
+ ; But has no space left…
+ text_jump UnknownText_0x1bd331
+ db "@"
+; 0x1364f
+
+Function1364f: ; 1364f
ld hl, EngineBuffer1 ; $d03e (aliases: MenuItemsList, CurFruitTree, CurInput)
ld a, [hli]
ld d, [hl]
@@ -20738,8 +21737,8 @@
dec a
jr z, .asm_13777
ld c, a
- ld b, $0
- ld hl, $7783
+ ld b, 0
+ ld hl, Unknown_13783
add hl, bc
add hl, bc
ld a, [hli]
@@ -20782,8 +21781,81 @@
jp CopyBytes
; 13783
-INCBIN "baserom.gbc",$13783,$13807 - $13783
+Unknown_13783: ; 13783
+ dw Unknown_13799
+ dw Unknown_13799
+ dw Unknown_137a4
+ dw Unknown_137af
+ dw Unknown_137ba
+ dw Unknown_137c5
+ dw Unknown_137d0
+ dw Unknown_137db
+ dw Unknown_137e6
+ dw Unknown_137f1
+ dw Unknown_137fc
+; 13799
+Unknown_13799:
+ db BUG_CATCHER, DON
+ dbw KAKUNA, 300
+ dbw METAPOD, 285
+ dbw CATERPIE, 226
+
+Unknown_137a4:
+ db BUG_CATCHER, ED
+ dbw BUTTERFREE, 286
+ dbw BUTTERFREE, 251
+ dbw CATERPIE, 237
+
+Unknown_137af:
+ db COOLTRAINERM, NICK
+ dbw SCYTHER, 357
+ dbw BUTTERFREE, 349
+ dbw PINSIR, 368
+
+Unknown_137ba:
+ db POKEFANM, WILLIAM
+ dbw PINSIR, 332
+ dbw BUTTERFREE, 324
+ dbw VENONAT, 321
+
+Unknown_137c5:
+ db BUG_CATCHER, BUG_CATCHER_BENNY
+ dbw BUTTERFREE, 318
+ dbw WEEDLE, 295
+ dbw CATERPIE, 285
+
+Unknown_137d0:
+ db CAMPER, BARRY
+ dbw PINSIR, 366
+ dbw VENONAT, 329
+ dbw KAKUNA, 314
+
+Unknown_137db:
+ db PICNICKER, CINDY
+ dbw BUTTERFREE, 341
+ dbw METAPOD, 301
+ dbw CATERPIE, 264
+
+Unknown_137e6:
+ db BUG_CATCHER, JOSH
+ dbw SCYTHER, 326
+ dbw BUTTERFREE, 292
+ dbw METAPOD, 282
+
+Unknown_137f1:
+ db YOUNGSTER, SAMUEL
+ dbw WEEDLE, 270
+ dbw PINSIR, 282
+ dbw CATERPIE, 251
+
+Unknown_137fc:
+ db SCHOOLBOY, KIPP
+ dbw VENONAT, 267
+ dbw PARAS, 254
+ dbw KAKUNA, 259
+; 13807
+
Function13807: ; 13807
ld hl, $d00a
ld de, $fffc
@@ -20902,8 +21974,8 @@
ld [$d00e], a
dec a
ld c, a
- ld b, $0
- ld hl, $7783
+ ld b, 0
+ ld hl, Unknown_13783
add hl, bc
add hl, bc
ld a, [hli]
@@ -21074,7 +22146,7 @@
Function139a8: ; 139a8
ld c, $a
- ld hl, $79fe
+ ld hl, Unknown_139fe
.asm_139ad
push bc
push hl
@@ -21099,8 +22171,8 @@
ld c, $19
call SimpleDivide
ld e, b
- ld d, $0
- ld hl, $79fe
+ ld d, 0
+ ld hl, Unknown_139fe
add hl, de
add hl, de
ld e, [hl]
@@ -21122,9 +22194,9 @@
; 139ed
Function139ed: ; 139ed
- ld hl, $79fe
+ ld hl, Unknown_139fe
ld e, a
- ld d, $0
+ ld d, 0
add hl, de
add hl, de
ld e, [hl]
@@ -21135,7 +22207,18 @@
ret
; 139fe
-INCBIN "baserom.gbc",$139fe,$13a12 - $139fe
+Unknown_139fe: ; 139fe
+ dw $0716
+ dw $0717
+ dw $0718
+ dw $0719
+ dw $071a
+ dw $071b
+ dw $071c
+ dw $071d
+ dw $071e
+ dw $071f
+; 13a12
Function13a12: ; 13a12
ld hl, PartyMon1HP
@@ -21177,9 +22260,237 @@
ret
; 13a47
-INCBIN "baserom.gbc",$13a47,$13b87 - $13a47
+Function13a47: ; 13a47
+ ld hl, PartyCount
+ ld a, [hl]
+ and a
+ ret z
+ cp $7
+ jr c, .asm_13a54
+ ld a, $6
+ ld [hl], a
+.asm_13a54
+ inc hl
+ ld b, a
+ ld c, $0
+.asm_13a58
+ ld a, [hl]
+ and a
+ jr z, .asm_13a64
+ cp $fc
+ jr z, .asm_13a64
+ cp $fe
+ jr c, .asm_13a73
+.asm_13a64
+ ld [hl], $eb
+ push hl
+ push bc
+ ld a, c
+ ld hl, PartyMon1
+ call GetPartyLocation
+ ld [hl], $eb
+ pop bc
+ pop hl
+
+.asm_13a73
+ inc hl
+ inc c
+ dec b
+ jr nz, .asm_13a58
+ ld [hl], $ff
+ ld hl, PartyMon1
+ ld a, [PartyCount]
+ ld d, a
+ ld e, $0
+.asm_13a83
+ push de
+ push hl
+ ld b, h
+ ld c, l
+ ld a, [hl]
+ and a
+ jr z, .asm_13a8f
+ cp $fc
+ jr c, .asm_13a9c
+
+.asm_13a8f
+ ld [hl], $eb
+ push de
+ ld d, $0
+ ld hl, PartySpecies
+ add hl, de
+ pop de
+ ld a, $eb
+ ld [hl], a
+
+.asm_13a9c
+ ld [CurSpecies], a
+ call GetBaseData
+ ld hl, $001f
+ add hl, bc
+ ld a, [hl]
+ cp $2
+ ld a, $2
+ jr c, .asm_13ab4
+ ld a, [hl]
+ cp $64
+ jr c, .asm_13ab5
+ ld a, $64
+
+.asm_13ab4
+ ld [hl], a
+
+.asm_13ab5
+ ld [CurPartyLevel], a
+ ld hl, $0024
+ add hl, bc
+ ld d, h
+ ld e, l
+ ld hl, $000a
+ add hl, bc
+ ld b, $1
+ ld a, $c
+ call Predef
+ pop hl
+ ld bc, $0030
+ add hl, bc
+ pop de
+ inc e
+ dec d
+ jr nz, .asm_13a83
+ ld de, $de41
+ ld a, [PartyCount]
+ ld b, a
+ ld c, $0
+.asm_13adc
+ push bc
+ call Function13b71
+ push de
+ callba Function17d073
+ pop hl
+ pop bc
+ jr nc, .asm_13b0e
+ push bc
+ push hl
+ ld hl, PartySpecies
+ push bc
+ ld b, $0
+ add hl, bc
+ pop bc
+ ld a, [hl]
+ cp $fd
+ ld hl, String_13b6b
+ jr z, .asm_13b06
+ ld [$d265], a
+ call GetPokemonName
+ ld hl, StringBuffer1
+
+.asm_13b06
+ pop de
+ ld bc, $000b
+ call CopyBytes
+ pop bc
+
+.asm_13b0e
+ inc c
+ dec b
+ jr nz, .asm_13adc
+ ld de, $ddff
+ ld a, [PartyCount]
+ ld b, a
+ ld c, $0
+.asm_13b1b
+ push bc
+ call Function13b71
+ push de
+ callba Function17d073
+ pop hl
+ jr nc, .asm_13b34
+ ld d, h
+ ld e, l
+ ld hl, PlayerName
+ ld bc, $000b
+ call CopyBytes
+
+.asm_13b34
+ pop bc
+ inc c
+ dec b
+ jr nz, .asm_13b1b
+ ld hl, $dce1
+ ld a, [PartyCount]
+ ld b, a
+.asm_13b40
+ push hl
+ ld c, $4
+ ld a, [hl]
+ and a
+ jr z, .asm_13b4b
+ cp $fc
+ jr c, .asm_13b4d
+
+.asm_13b4b
+ ld [hl], $1
+
+.asm_13b4d
+ ld a, [hl]
+ and a
+ jr z, .asm_13b55
+ cp $fc
+ jr c, .asm_13b5c
+
+.asm_13b55
+ xor a
+ ld [hli], a
+ dec c
+ jr nz, .asm_13b55
+ jr .asm_13b60
+
+.asm_13b5c
+ inc hl
+ dec c
+ jr nz, .asm_13b4d
+
+.asm_13b60
+ pop hl
+ push bc
+ ld bc, $0030
+ add hl, bc
+ pop bc
+ dec b
+ jr nz, .asm_13b40
+ ret
+; 13b6b
+
+String_13b6b: ; 13b6b
+ db "タマゴ@@@"
+; 13b71
+
+Function13b71: ; 13b71
+ push de
+ ld c, $1
+ ld b, $6
+.asm_13b76
+ ld a, [de]
+ cp $50
+ jr z, .asm_13b85
+ inc de
+ inc c
+ dec b
+ jr nz, .asm_13b76
+ dec c
+ dec de
+ ld a, $50
+ ld [de], a
+
+.asm_13b85
+ pop de
+ ret
+; 13b87
+
+
GetSquareRoot: ; 13b87
; Return the square root of de in b.
@@ -21277,12 +22588,17 @@
db 10, MORN
db 18, DAY
db 24, NITE
-; 1404c
+ db -1, MORN
+; 1404e
+Unknown_1404e: ; 1404e
+ db 20, 2
+ db 40, 0
+ db 60, 1
+ db -1, 0
+; 14056
-INCBIN "baserom.gbc",$1404c,$14056 - $1404c
-
Function14056: ; 14056
call UpdateTime
ld hl, $d4ba
@@ -21442,9 +22758,31 @@
ret
; 14146
-INCBIN "baserom.gbc",$14146,$14168 - $14146
+Function14146: ; 14146
+ ld hl, $d13e
+ ld a, [hl]
+ push af
+ res 7, [hl]
+ set 6, [hl]
+ call Function14209
+ pop af
+ ld [$d13e], a
+ ret
+; 14157
+Function14157: ; 14157
+ ld hl, $d13e
+ ld a, [hl]
+ push af
+ set 7, [hl]
+ res 6, [hl]
+ call Function14209
+ pop af
+ ld [$d13e], a
+ ret
+; 14168
+
Function14168:: ; 14168
call Function1416f
call Function14209
@@ -22079,8 +23417,8 @@
Function1442f:: ; 1442f
ld a, c
- ld bc, $0006
- ld hl, $444d
+ ld bc, 6
+ ld hl, EmotesPointers
call AddNTimes
ld e, [hl]
inc hl
@@ -22101,9 +23439,62 @@
ret
; 1444d
-INCBIN "baserom.gbc",$1444d,$14495 - $1444d
+EmotesPointers: ; 144d
+; dw source address
+; db length, bank
+; dw dest address
+ dw ShockEmote
+ db $40, BANK(ShockEmote)
+ dw $8f80
+ dw QuestionEmote
+ db $40, BANK(QuestionEmote)
+ dw $8f80
+
+ dw HappyEmote
+ db $40, BANK(HappyEmote)
+ dw $8f80
+
+ dw SadEmote
+ db $40, BANK(SadEmote)
+ dw $8f80
+
+ dw HeartEmote
+ db $40, BANK(HeartEmote)
+ dw $8f80
+
+ dw BoltEmote
+ db $40, BANK(BoltEmote)
+ dw $8f80
+
+ dw SleepEmote
+ db $40, BANK(SleepEmote)
+ dw $8f80
+
+ dw FishEmote
+ db $40, BANK(FishEmote)
+ dw $8f80
+
+ dw FishingRodGFX + $00
+ db $10, BANK(FishingRodGFX)
+ dw $8fc0
+
+ dw FishingRodGFX + $10
+ db $20, BANK(FishingRodGFX)
+ dw $8fc0
+
+ dw FishingRodGFX + $30
+ db $20, BANK(FishingRodGFX)
+ dw $8fe0
+
+ dw FishingRodGFX + $50
+ db $10, BANK(FishingRodGFX)
+ dw $8fe0
+
+; 14495
+
+
SpriteMons: ; 14495
db UNOWN
db GEODUDE
@@ -47568,7 +48959,7 @@
Function48e81: ; 48e81
- ld hl, $4e93
+ ld hl, PackFGFXPointers
add hl, de
add hl, de
ld a, [hli]
@@ -47575,15 +48966,21 @@
ld e, a
ld d, [hl]
ld hl, $9500
- ld bc, $120f
+ lb bc, BANK(PackFGFX), 15
call Request2bpp
ret
; 48e93
-INCBIN "baserom.gbc",$48e93,$48e9b - $48e93
+PackFGFXPointers: ; 48e93
+ dw PackFGFX + $f0 * 1
+ dw PackFGFX + $f0 * 3
+ dw PackFGFX + $f0 * 0
+ dw PackFGFX + $f0 * 2
+; 48e9b
-PackFGFX:
+PackFGFX: ; 48e9b
INCBIN "gfx/misc/pack_f.2bpp"
+; 4925b
Function4925b: ; 4925b
call FadeToMenu
@@ -88665,9 +90062,17 @@
dec b
jr nz, .asm_10433c
ret
+; 104350
-
-INCBIN "gfx/ow/misc.2bpp"
+ShockEmote: INCBIN "gfx/emotes/shock.2bpp"
+QuestionEmote: INCBIN "gfx/emotes/question.2bpp"
+HappyEmote: INCBIN "gfx/emotes/happy.2bpp"
+SadEmote: INCBIN "gfx/emotes/sad.2bpp"
+HeartEmote: INCBIN "gfx/emotes/heart.2bpp"
+BoltEmote: INCBIN "gfx/emotes/bolt.2bpp"
+SleepEmote: INCBIN "gfx/emotes/sleep.2bpp"
+FishEmote: INCBIN "gfx/emotes/fish.2bpp"
+FishingRodGFX: INCBIN "gfx/misc/fishing.2bpp"
Function1045b0: ; 1045b0
--- a/predef/cgb.asm
+++ b/predef/cgb.asm
@@ -68,15 +68,15 @@
; 8db8
Function8db8: ; 8db8
- ld hl, $5c67
+ ld hl, PalPacket_9c66 + 1
ld de, $d000
ld c, $4
call Function9615
- ld hl, $5c67
+ ld hl, PalPacket_9c66 + 1
ld de, $d020
ld c, $4
call Function9615
- ld hl, $5c67
+ ld hl, PalPacket_9c66 + 1
ld de, MartPointer
ld c, $2
call Function9615
@@ -95,7 +95,7 @@
ld h, $0
add hl, hl
add hl, hl
- ld bc, $68be
+ ld bc, Palettes_a8be
add hl, bc
call Function9643
ld a, [PlayerHPPal]
@@ -103,10 +103,10 @@
ld h, $0
add hl, hl
add hl, hl
- ld bc, $68be
+ ld bc, Palettes_a8be
add hl, bc
call Function9643
- ld hl, $68ca
+ ld hl, Palettes_a8ca
call Function9643
ld de, MartPointer
pop hl
@@ -147,7 +147,7 @@
ld bc, $0078
ld a, $7
call ByteFill
- ld hl, $579c
+ ld hl, Palettes_979c
ld de, $d050
ld bc, $0030
ld a, $5
@@ -161,9 +161,9 @@
callba Function100dc0
Function8e8b: ; 8e8b
- ld hl, $7311
+ ld hl, Palette_b311
jr nc, .asm_8e93
- ld hl, $7309
+ ld hl, Palette_b309
.asm_8e93
ld de, $d038
@@ -175,9 +175,9 @@
Function8e9f: ; 8e9f
callba Function100dc0
- ld hl, $7311
+ ld hl, Palette_b311
jr nc, .asm_8ead
- ld hl, $7309
+ ld hl, Palette_b309
.asm_8ead
ld de, $d000
@@ -191,11 +191,11 @@
ld a, [PlayerGender]
bit 0, a
jr z, .asm_8ec5
- ld hl, $7759
+ ld hl, Palettes_b759
jr .asm_8ec8
.asm_8ec5
- ld hl, $7729
+ ld hl, Palettes_b729
.asm_8ec8
ld de, $d000
@@ -215,7 +215,7 @@
ld h, $0
add hl, hl
add hl, hl
- ld bc, $68be
+ ld bc, Palettes_a8be
add hl, bc
call Function9643
ld a, [CurPartySpecies]
@@ -222,7 +222,7 @@
ld bc, TempMonDVs
call Function974b
call Function9643
- ld hl, $68ca
+ ld hl, Palettes_a8ca
call Function9643
ld hl, Palette8f52
ld de, $d018
@@ -274,8 +274,14 @@
RGB 00, 00, 00
; 8f6a
-INCBIN "baserom.gbc", $8f6a, $8f70 - $8f6a
+Unknown_8f6a: ; 8f6a
+ RGB 31, 19, 31
+ RGB 21, 31, 14
+
+ RGB 17, 31, 31
+; 8f70
+
Function8f70: ; 8f70
ld de, Unkn1Pals
ld a, $1d
@@ -355,8 +361,29 @@
ret
; 9009
-INCBIN "baserom.gbc", $9009, $9036 - $9009
+Function9009: ; 9009
+ ld hl, Palette9036
+ call Function9630
+ jr .asm_901a
+ ld bc, TempMonDVs
+ call Function974b
+ call Function9643
+
+.asm_901a
+ call Function9699
+ ld hl, $cdee
+ ld bc, $0707
+ ld a, $1
+ call Function9663
+ call Function971a
+ call Function96b3
+ call Function96a4
+ ld a, $1
+ ld [hCGBPalUpdate], a
+ ret
+; 9036
+
Palette9036: ; 9036
RGB 31, 15, 00
RGB 23, 12, 00
@@ -386,7 +413,7 @@
; 906e
Function906e: ; 906e
- ld hl, Paletteb7a9
+ ld hl, Palettes_b7a9
ld de, Unkn1Pals
ld bc, $0080
ld a, $5
@@ -440,7 +467,7 @@
; 90f8
Function90f8: ; 90f8
- ld hl, $5ca7
+ ld hl, PalPacket_9ca6 + 1
call Function9610
call Function9699
ld de, Unkn2Pals
@@ -459,8 +486,8 @@
; 9122
Function9122: ; 9122
- ld b, $0
- ld hl, $512d
+ ld b, 0
+ ld hl, Jumptable_912d
add hl, bc
add hl, bc
ld a, [hli]
@@ -469,10 +496,69 @@
jp [hl]
; 912d
-INCBIN "baserom.gbc", $912d, $9195 - $912d
+Jumptable_912d: ; 912d
+ dw Function9133
+ dw Function9166
+ dw Function9180
+; 9133
+Function9133: ; 9133
+ ld hl, Palette_914e
+ ld de, Unkn1Pals
+ call Function9630
+ ld hl, Palette_9156
+ ld de, Unkn2Pals
+ ld bc, $0010
+ ld a, $5
+ call FarCopyWRAM
+ call Function9699
+ ret
+; 914e
+
+Palette_914e: ; 914e
+ RGB 19, 31, 19
+ RGB 18, 23, 31
+ RGB 11, 21, 28
+ RGB 04, 16, 24
+
+Palette_9156: ; 9156
+ RGB 29, 29, 29
+ RGB 20, 19, 20
+ RGB 19, 06, 04
+ RGB 03, 04, 06
+
+ RGB 31, 31, 31
+ RGB 31, 31, 31
+ RGB 31, 00, 00
+ RGB 03, 04, 06
+; 9166
+
+Function9166: ; 9166
+ ld de, Unkn1Pals
+ ld a, $38
+ call Function9625
+ call Function9630
+ ld de, Unkn2Pals
+ ld a, $39
+ call Function9625
+ call Function9630
+ call Function9699
+ ret
+; 9180
+
+Function9180: ; 9180
+ ld hl, PalPacket_9c36 + 1
+ call Function9610
+ ld de, Unkn2Pals
+ ld a, $3a
+ call Function9625
+ call Function9630
+ call Function9699
+ ret
+; 9195
+
Function9195: ; 9195
- ld hl, $7789
+ ld hl, Palettes_b789
ld de, Unkn1Pals
ld bc, $0028
ld a, $5
@@ -484,12 +570,12 @@
; 91ad
Function91ad: ; 91ad
- ld hl, $7641
+ ld hl, Palettes_b641
ld de, Unkn1Pals
ld bc, $0080
ld a, $5
call FarCopyWRAM
- ld hl, $5cb7
+ ld hl, PalPacket_9cb6 + 1
call Function9610
call Function9699
call Function96b3
@@ -504,7 +590,7 @@
; 91d1
Function91d1: ; 91d1
- ld hl, $5c57
+ ld hl, PalPacket_9c56 + 1
call Function9610
call Function8e9f
call Function8e85
@@ -533,7 +619,7 @@
ld a, [PlayerHPPal]
call Function974b
call Function9643
- ld hl, $579c
+ ld hl, Palettes_979c
ld de, $d050
ld bc, $0030
ld a, $5
@@ -549,12 +635,12 @@
; 9228
Function9228: ; 9228
- ld hl, $76f1
+ ld hl, Palettes_b6f1
ld de, Unkn1Pals
ld bc, $0028
ld a, $5
call FarCopyWRAM
- ld hl, $7719
+ ld hl, Palettes_b719
ld de, Unkn2Pals
ld bc, $0010
ld a, $5
@@ -568,7 +654,7 @@
; 9251
Function9251: ; 9251
- ld hl, $5cb7
+ ld hl, PalPacket_9cb6 + 1
call Function9610
call Function9699
call Function96b3
@@ -576,7 +662,7 @@
; 925e
Function925e: ; 925e
- ld hl, $5bc7
+ ld hl, PalPacket_9bc6 + 1
call Function9610
ld de, Unkn2Pals
ld a, $4c
@@ -710,10 +796,10 @@
call Function9630
ld a, [PlayerHPPal]
ld l, a
- ld h, $0
+ ld h, 0
add hl, hl
add hl, hl
- ld bc, $68be
+ ld bc, Palettes_a8be
add hl, bc
call Function9643
call Function9699
@@ -729,7 +815,7 @@
; 93a6
Function93a6: ; 93a6
- ld hl, $5c47
+ ld hl, PalPacket_9c46 + 1
call Function9610
call Function9699
call Function96b3
@@ -759,11 +845,11 @@
ld a, [PlayerGender]
bit 0, a
jr z, .asm_93e6
- ld hl, $5469
+ ld hl, Palettes_9469
jr .asm_93e9
.asm_93e6
- ld hl, $5439
+ ld hl, Palettes_9439
.asm_93e9
ld de, Unkn1Pals
@@ -798,8 +884,60 @@
ret
; 9439
-INCBIN "baserom.gbc", $9439, $9499 - $9439
+Palettes_9439: ; 9439
+ RGB 31, 31, 31
+ RGB 15, 15, 31
+ RGB 00, 00, 31
+ RGB 00, 00, 00
+ RGB 31, 31, 31
+ RGB 15, 15, 31
+ RGB 00, 00, 31
+ RGB 00, 00, 00
+ RGB 31, 11, 31
+ RGB 15, 15, 31
+ RGB 00, 00, 31
+ RGB 00, 00, 00
+ RGB 31, 31, 31
+ RGB 15, 15, 31
+ RGB 00, 00, 31
+ RGB 31, 00, 00
+ RGB 31, 31, 31
+ RGB 15, 15, 31
+ RGB 31, 00, 00
+ RGB 00, 00, 00
+ RGB 31, 31, 31
+ RGB 07, 19, 07
+ RGB 07, 19, 07
+ RGB 00, 00, 00
+; 9469
+Palettes_9469: ; 9469
+ RGB 31, 31, 31
+ RGB 31, 14, 31
+ RGB 31, 07, 31
+ RGB 00, 00, 00
+ RGB 31, 31, 31
+ RGB 31, 14, 31
+ RGB 31, 07, 31
+ RGB 00, 00, 00
+ RGB 15, 15, 31
+ RGB 31, 14, 31
+ RGB 31, 07, 31
+ RGB 00, 00, 00
+ RGB 31, 31, 31
+ RGB 31, 14, 31
+ RGB 31, 07, 31
+ RGB 31, 00, 00
+ RGB 31, 31, 31
+ RGB 31, 14, 31
+ RGB 31, 00, 00
+ RGB 00, 00, 00
+ RGB 31, 31, 31
+ RGB 07, 19, 07
+ RGB 07, 19, 07
+ RGB 00, 00, 00
+; 9499
+
Function9499: ; 9499
call Function91c8
ld de, $0014
@@ -836,7 +974,7 @@
; 94d0
Function94d0: ; 94d0
- ld hl, $5ba7
+ ld hl, PalPacket_9ba6 + 1
call Function9610
call Function9699
ld hl, $ce29
@@ -859,10 +997,10 @@
ld a, $4e
call Function9625
call Function9630
- ld hl, $5521
+ ld hl, Palette_9521
ld de, Unkn2Pals
call Function9630
- ld hl, $5521
+ ld hl, Palette_9521
ld de, $d048
call Function9630
call Function9699
@@ -871,7 +1009,12 @@
ret
; 9521
-INCBIN "baserom.gbc", $9521, $9529 - $9521
+Palette_9521: ; 9521
+ RGB 31, 31, 31
+ RGB 13, 11, 00
+ RGB 23, 12, 28
+ RGB 00, 00, 00
+; 9529
Function9529: ; 9529
ld de, Unkn1Pals
@@ -896,9 +1039,9 @@
; 9555
Function9555: ; 9555
- ld hl, $5cc7
+ ld hl, PalPacket_9cc6 + 1
call Function9610
- ld hl, $7681
+ ld hl, Palettes_b681
ld de, Unkn2Pals
ld bc, $0008
ld a, $5
--- a/predef/sgb.asm
+++ b/predef/sgb.asm
@@ -59,24 +59,24 @@
; 86ad
Function86ad: ; 86ad
- ld hl, $5c66
- ld de, $5aa6
+ ld hl, PalPacket_9c66
+ ld de, BlkPacket_9aa6
ret
; 86b4
Function86b4: ; 86b4
- ld hl, $5aa6
+ ld hl, BlkPacket_9aa6
call Function9809
- ld hl, $5ce6
+ ld hl, PalPacket_9ce6
ld de, $cda9
ld bc, $0010
call CopyBytes
ld a, [PlayerHPPal]
ld l, a
- ld h, $0
+ ld h, 0
add hl, hl
add hl, hl
- ld de, $68be
+ ld de, Palettes_a8be
add hl, de
ld a, [hli]
ld [$cdac], a
@@ -101,7 +101,7 @@
ld [$cdb4], a
ld a, [hl]
ld [$cdb5], a
- ld hl, $5cf6
+ ld hl, PalPacket_9cf6
ld de, $cdb9
ld bc, $0010
call CopyBytes
@@ -131,7 +131,7 @@
; 873c
Function873c: ; 873c
- ld hl, $5bd6
+ ld hl, PalPacket_9bd6
ld de, $cda9
ld bc, $0010
call CopyBytes
@@ -143,18 +143,18 @@
add $2f
ld [hl], a
ld hl, $cda9
- ld de, $5ad6
+ ld de, BlkPacket_9ad6
ret
; 875c
Function875c: ; 875c
- ld hl, $5c76
- ld de, $5a86
+ ld hl, PalPacket_9c76
+ ld de, BlkPacket_9a86
ret
; 8763
Function8763: ; 8763
- ld hl, $5ce6
+ ld hl, PalPacket_9ce6
ld de, $cda9
ld bc, $0010
call CopyBytes
@@ -163,7 +163,7 @@
ld h, $0
add hl, hl
add hl, hl
- ld de, $68be
+ ld de, Palettes_a8be
add hl, de
ld a, [hli]
ld [$cdac], a
@@ -185,18 +185,18 @@
ld a, [hl]
ld [$cdb5], a
ld hl, $cda9
- ld de, $5ac6
+ ld de, BlkPacket_9ac6
ret
; 87ab
Function87ab: ; 87ab
- ld hl, $5c56
+ ld hl, PalPacket_9c56
ld de, $cdaa
ret
; 87b2
Function87b2: ; 87b2
- ld hl, $5ce6
+ ld hl, PalPacket_9ce6
ld de, $cda9
ld bc, $0010
call CopyBytes
@@ -219,12 +219,12 @@
ld a, [hl]
ld [$cdb5], a
ld hl, $cda9
- ld de, $5ae6
+ ld de, BlkPacket_9ae6
ret
; 87e9
Function87e9: ; 87e9
- ld hl, $5ce6
+ ld hl, PalPacket_9ce6
ld de, $cda9
ld bc, $0010
call CopyBytes
@@ -248,18 +248,18 @@
ld a, [hl]
ld [$cdb5], a
ld hl, $cda9
- ld de, $5ae6
+ ld de, BlkPacket_9ae6
ret
; 8823
Function8823: ; 8823
call Function87b2
- ld de, $5af6
+ ld de, BlkPacket_9af6
ret
; 882a
Function882a: ; 882a
- ld hl, $5ce6
+ ld hl, PalPacket_9ce6
ld de, $cda9
ld bc, $0010
call CopyBytes
@@ -272,37 +272,37 @@
inc hl
ld [hl], $19
ld hl, $cda9
- ld de, $5a86
+ ld de, BlkPacket_9a86
ret
; 884b
Function884b: ; 884b
- ld hl, $5c36
- ld de, $5a86
+ ld hl, PalPacket_9c36
+ ld de, BlkPacket_9a86
ret
; 8852
Function8852: ; 8852
- ld hl, $5c96
- ld de, $5b06
+ ld hl, PalPacket_9c96
+ ld de, BlkPacket_9b06
ret
; 8859
Function8859: ; 8859
- ld hl, $5ca6
- ld de, $5b76
+ ld hl, PalPacket_9ca6
+ ld de, BlkPacket_9b76
ret
; 8860
Function8860: ; 8860
- ld hl, $5cb6
- ld de, $5a86
+ ld hl, PalPacket_9cb6
+ ld de, BlkPacket_9a86
ret
; 8867
Function8867: ; 8867
- ld b, $0
- ld hl, $4878
+ ld b, 0
+ ld hl, Unknown_8878
add hl, bc
add hl, bc
add hl, bc
@@ -317,11 +317,15 @@
ret
; 8878
-INCBIN "baserom.gbc", $8878, $8884 - $8878
+Unknown_8878: ; 8878
+ dw BlkPacket_9a86, PalPacket_9be6
+ dw BlkPacket_9a96, PalPacket_9c06
+ dw BlkPacket_9a86, PalPacket_9c16
+; 8884
Function8884: ; 8884
- ld hl, $5b96
- ld de, $5b56
+ ld hl, PalPacket_9b96
+ ld de, BlkPacket_9b56
ld a, $8
ld [SGBPredef], a
ret
@@ -328,29 +332,29 @@
; 8890
Function8890: ; 8890
- ld hl, $5ba6
- ld de, $5b86
+ ld hl, PalPacket_9ba6
+ ld de, BlkPacket_9b86
ret
; 8897
Function8897: ; 8897
- ld hl, $5c46
- ld de, $5a86
+ ld hl, PalPacket_9c46
+ ld de, BlkPacket_9a86
ret
; 889e
Function889e: ; 889e
- ld hl, $5a86
+ ld hl, BlkPacket_9a86
ld de, PlayerLightScreenCount
ld bc, $0010
call CopyBytes
- ld hl, $5bb6
- ld de, $5a86
+ ld hl, PalPacket_9bb6
+ ld de, BlkPacket_9a86
ret
; 88b1
Function88b1: ; 88b1
- ld hl, $5bd6
+ ld hl, PalPacket_9bd6
ld de, $cda9
ld bc, $0010
call CopyBytes
@@ -357,7 +361,7 @@
call Function8a0c
ld hl, $cdaa
ld [hld], a
- ld de, $5a86
+ ld de, BlkPacket_9a86
ld a, $9
ld [SGBPredef], a
ret
@@ -365,7 +369,7 @@
Function88cd: ; 88cd
push bc
- ld hl, $5ce6
+ ld hl, PalPacket_9ce6
ld de, $cda9
ld bc, $0010
call CopyBytes
@@ -403,28 +407,28 @@
.asm_8913
ld hl, $cda9
- ld de, $5a86
+ ld de, BlkPacket_9a86
ret
; 891a
Function891a: ; 891a
- ld hl, $5cb6
- ld de, $5a86
+ ld hl, PalPacket_9cb6
+ ld de, BlkPacket_9a86
ret
; 8921
Function8921: ; 8921
- ld hl, $5bc6
- ld de, $5a86
+ ld hl, PalPacket_9bc6
+ ld de, BlkPacket_9a86
ret
; 8928
Function8928: ; 8928
- ld hl, $5bd6
+ ld hl, PalPacket_9bd6
ld de, $cda9
ld bc, $0010
call CopyBytes
- ld hl, $5a86
+ ld hl, BlkPacket_9a86
ld de, $cdb9
ld bc, $0010
call CopyBytes
@@ -450,24 +454,24 @@
; 8969
Function8969: ; 8969
- ld hl, $5ce6
+ ld hl, PalPacket_9ce6
ld de, $cda9
ld bc, $0010
call CopyBytes
ld a, [CurPartySpecies]
ld l, a
- ld h, $0
+ ld h, 0
add hl, hl
add hl, hl
add hl, hl
- ld de, $68ce
+ ld de, Palettes_a8ce
add hl, de
ld a, [$cf65]
- and $3
+ and 3
sla a
sla a
ld c, a
- ld b, $0
+ ld b, 0
add hl, bc
ld a, [hli]
ld [$cdac], a
@@ -478,18 +482,18 @@
ld a, [hl]
ld [$cdaf], a
ld hl, $cda9
- ld de, $5a86
+ ld de, BlkPacket_9a86
ret
; 89a6
Function89a6: ; 89a6
- ld hl, $5cd6
- ld de, $5a86
+ ld hl, PalPacket_9cd6
+ ld de, BlkPacket_9a86
ret
; 89ad
Function89ad: ; 89ad
- ld hl, $5ce6
+ ld hl, PalPacket_9ce6
ld de, $cda9
ld bc, $0010
call CopyBytes
@@ -505,18 +509,18 @@
ld a, [hl]
ld [$cdaf], a
ld hl, $cda9
- ld de, $5a86
+ ld de, BlkPacket_9a86
ret
; 89d9
Function89d9: ; 89d9
- ld hl, $5cc6
- ld de, $5a86
+ ld hl, PalPacket_9cc6
+ ld de, BlkPacket_9a86
ret
; 89e0
Function89e0: ; 89e0
- ld hl, $5ce6
+ ld hl, PalPacket_9ce6
ld de, $cda9
ld bc, $0010
call CopyBytes
@@ -532,7 +536,7 @@
ld a, [hl]
ld [$cdaf], a
ld hl, $cda9
- ld de, $5a86
+ ld de, BlkPacket_9a86
ret
; 8a0c
@@ -557,8 +561,8 @@
jr z, .asm_8a42
ld a, [MapGroup]
ld e, a
- ld d, $0
- ld hl, $4a45
+ ld d, 0
+ ld hl, Unknown_8a45
add hl, de
ld a, [hl]
ret
@@ -580,7 +584,35 @@
ret
; 8a45
-INCBIN "baserom.gbc", $8a45, $8a60 - $8a45
+Unknown_8a45: ; 8a45
+ db $00
+ db $12
+ db $14
+ db $18
+ db $11
+ db $15
+ db $09
+ db $04
+ db $0f
+ db $16
+ db $0e
+ db $10
+ db $06
+ db $01
+ db $03
+ db $06
+ db $0b
+ db $08
+ db $05
+ db $17
+ db $08
+ db $07
+ db $13
+ db $02
+ db $0c
+ db $0a
+ db $0d
+; 8a60
Function8a60: ; 8a60
push de