ref: c1f18c79b8bd52d27d4ec2fb056ad9eb3e0012d0
parent: f676c3d357417c81daa33544536213ae85a5472f
parent: 3453e7ce9c71c73664b061af9b77346b608b9013
author: Bryan Bishop <[email protected]>
date: Tue Mar 4 04:17:17 EST 2014
Merge pull request #238 from yenatch/incbins Pokedex and some mobile link location names.
--- a/engine/title.asm
+++ b/engine/title.asm
@@ -243,7 +243,7 @@
swap a
ld e, a
ld d, $0
- ld hl, $6ece
+ ld hl, Unknown_10eece
add hl, de
ld d, [hl]
xor a
@@ -256,7 +256,9 @@
ret
; 10eece
-INCBIN "baserom.gbc", $10eece, $10eed2 - $10eece
+Unknown_10eece: ; 10eece
+ db $80, $88, $00, $08
+; 10eed2
Function10eed2: ; 10eed2
@@ -374,21 +376,15 @@
TitleSuicuneGFX: ; 10ef46
INCBIN "gfx/title/suicune.lz"
-; 10f31b
+; 10f326
-INCBIN "baserom.gbc", $10f31b, $10f326 - $10f31b
-
TitleLogoGFX: ; 10f326
INCBIN "gfx/title/logo.lz"
-; 10fced
+; 10fcee
-INCBIN "baserom.gbc", $10fced, $10fcee - $10fced
-
TitleCrystalGFX: ; 10fcee
INCBIN "gfx/title/crystal.lz"
-; 10fed7
-
-INCBIN "baserom.gbc", $10fed7, $10fede - $10fed7
+; 10fede
TitleScreenPalettes:
; BG
binary files a/gfx/title/crystal.lz b/gfx/title/crystal.lz differ
binary files a/gfx/title/logo.lz b/gfx/title/logo.lz differ
binary files a/gfx/title/suicune.lz b/gfx/title/suicune.lz differ
--- a/main.asm
+++ b/main.asm
@@ -30847,8 +30847,8 @@
push hl
dec a
ld e, a
- ld d, $0
- ld hl, $4015
+ ld d, 0
+ ld hl, Unknown_20015
add hl, de
add hl, de
add hl, de
@@ -30864,11 +30864,20 @@
ret
; 20015 (8:4015)
-INCBIN "baserom.gbc",$20015,$20021 - $20015
+Unknown_20015: ; 20015
+ dw $d1ed
+ db $07, $04
+ dw $d1ee
+ db $18, $0c
+
+ dw $d1ef
+ db $3c, $0f
+; 20021
+
; no known jump sources
Function20021: ; 20021 (8:4021)
- ld hl, $4047
+ ld hl, UnknownText_0x20047
call PrintText
ld hl, Options ; $cfcc
ld a, [hl]
@@ -30876,7 +30885,7 @@
set 4, [hl]
call Function1d6e
call ClearTileMap
- ld hl, $404c
+ ld hl, UnknownText_0x2004c
call PrintText
call Function20051
call Function1c07
@@ -30887,8 +30896,18 @@
ret
; 20047 (8:4047)
-INCBIN "baserom.gbc",$20047,$20051 - $20047
+UnknownText_0x20047: ; 0x20047
+ ; The clock's time may be wrong. Please reset the time.
+ text_jump UnknownText_0x1c40e6
+ db "@"
+; 0x2004c
+UnknownText_0x2004c: ; 0x2004c
+ ; Set with the Control Pad. Confirm: A Button Cancel: B Button
+ text_jump UnknownText_0x1c411c
+ db "@"
+; 0x20051
+
; known jump sources: 2003a (8:403a)
Function20051: ; 20051 (8:4051)
ld a, $1
@@ -30909,7 +30928,7 @@
and a
ret nz
call Function2011f
- ld hl, $40b0
+ ld hl, UnknownText_0x200b0
call PrintText
call YesNoBox
jr c, .asm_200ad
@@ -30923,7 +30942,7 @@
ld [$d089], a
call Function677
call Function2011f
- ld hl, $40b5
+ ld hl, UnknownText_0x200b5
call PrintText
call Functiona80
xor a
@@ -30933,8 +30952,18 @@
ret
; 200b0 (8:40b0)
-INCBIN "baserom.gbc",$200b0,$200ba - $200b0
+UnknownText_0x200b0: ; 0x200b0
+ ; Is this OK?
+ text_jump UnknownText_0x1c415b
+ db "@"
+; 0x200b5
+UnknownText_0x200b5: ; 0x200b5
+ ; The clock has been reset.
+ text_jump UnknownText_0x1c4168
+ db "@"
+; 0x200ba
+
; known jump sources: 20071 (8:4071), 200db (8:40db)
Function200ba: ; 200ba (8:40ba)
call Function354b
@@ -31020,10 +31049,10 @@
ld de, $c54b
callba Function1dd6bb
ld a, [Buffer2] ; $d1eb (aliases: MovementType)
- ld de, $7f7f
+ lb de, $7f, $7f
call Function20168
ld a, [Buffer1] ; $d1ea (aliases: MagikarpLength)
- ld de, $61ee
+ lb de, $61, $ee
call Function20168
ld a, [Buffer1] ; $d1ea (aliases: MagikarpLength)
ld [Buffer2], a ; $d1eb (aliases: MovementType)
@@ -31030,7 +31059,12 @@
ret
; 20160 (8:4160)
-INCBIN "baserom.gbc",$20160,$20168 - $20160
+Function20160: ; 20160
+ ld a, [$d1ec]
+ ld b, a
+ call GetTileCoord
+ ret
+; 20168
; known jump sources: 2014d (8:414d), 20156 (8:4156)
Function20168: ; 20168 (8:4168)
@@ -31048,9 +31082,15 @@
ret
; 2017c (8:417c)
-INCBIN "baserom.gbc",$2017c,$20181 - $2017c
+String_2017c: ; 2017c
+ db "じ@" ; HR
+; 2017e
+String_2017e: ; 2017e
+ db "ふん@" ; MIN
+; 20181
+
SECTION "Tileset Data 3", ROMX, BANK[TILESETS_3]
INCLUDE "tilesets/data_3.asm"
@@ -45213,7 +45253,16 @@
ret
; 40292 (10:4292)
-INCBIN "baserom.gbc",$40292,$402aa - $40292
+Function40292: ; 40292
+ ld a, [$cf65]
+ xor $1
+ ld [$cf65], a
+ call Function40bb1
+ ld [$c2d6], a
+ callba Function4424d
+ call WaitBGMap
+ ret
+; 402aa
; no known jump sources
Function402aa: ; 402aa (10:42aa)
@@ -45242,8 +45291,101 @@
ret
; 402e8 (10:42e8)
-INCBIN "baserom.gbc",$402e8,$4039d - $402e8
+Unknown_402e8: ; 402e8
+ dw $0430
+ dw $c5f5
+ dw $c5fa
+ dw $c5ff
+ dw $c603
+; 402f2
+Jumptable_402f2: ; 402f2
+ dw Function40292
+ dw Function402fa
+ dw Function40340
+ dw Function4034f
+; 402fa
+
+Function402fa: ; 402fa
+ call Function41401
+ xor a
+ ld [hSCX], a
+ call DelayFrame
+ ld a, $7
+ ld [hWX], a
+ ld a, $90
+ ld [hWY], a
+ call Function40bb1
+ ld a, [$c7e4]
+ ld e, a
+ ld a, $32
+ call Predef
+ call Function41401
+ call DelayFrame
+ xor a
+ ld [hBGMapMode], a
+ ld a, $90
+ ld [hWY], a
+ ld a, $5
+ ld [hSCX], a
+ call DelayFrame
+ call Function4038d
+ call Function4143b
+ call WaitBGMap
+ call Function40bb1
+ ld [CurPartySpecies], a
+ ld a, $4
+ call Function41423
+ ret
+; 40340
+
+Function40340: ; 40340
+ call Function40bb1
+ ld a, [$d265]
+ call Function381e
+ ld e, c
+ ld d, b
+ call PlayCryHeader
+ ret
+; 4034f
+
+Function4034f: ; 4034f
+ call Function41415
+ xor a
+ ld [hSCX], a
+ ld a, [$cf65]
+ push af
+ ld a, [$cf64]
+ push af
+ ld a, [$cf63]
+ push af
+ callba Function8442c
+ pop af
+ ld [$cf63], a
+ pop af
+ ld [$cf64], a
+ pop af
+ ld [$cf65], a
+ call WhiteBGMap
+ call DisableLCD
+ call Function414fb
+ call Function4038d
+ call EnableLCD
+ call WaitBGMap
+ ld a, $5
+ ld [hSCX], a
+ call Function41427
+ ret
+; 4038d
+
+Function4038d: ; 4038d
+ call Function407fd
+ call Function40bb1
+ callba Function4424d
+ call Function40ba0
+ ret
+; 4039d
+
; no known jump sources
Function4039d: ; 4039d (10:439d)
xor a
@@ -45265,11 +45407,11 @@
ld a, [$c7dc]
and a
jr nz, .asm_403c9
- ld de, $43f3
+ ld de, Unknown_403f3
jr .asm_403cc
.asm_403c9
- ld de, $43fb
+ ld de, Unknown_403fb
.asm_403cc
call Function4135a
call c, Function40e5b
@@ -45295,8 +45437,21 @@
ret
; 403f3 (10:43f3)
-INCBIN "baserom.gbc",$403f3,$40405 - $403f3
+Unknown_403f3: ; 403f3
+ dw $03c0
+ dw $c4f2
+ dw $c51a
+ dw $c542
+; 403fb
+Unknown_403fb: ; 403fb
+ dw $04c0
+ dw $c4f2
+ dw $c51a
+ dw $c542
+ dw $c56a
+; 40405
+
; no known jump sources
Jumptable_40405: ; 40405 (10:4405)
dw Function4040d
@@ -45303,8 +45458,8 @@
dw Function40411
dw Function40415
dw Function4043a
+; 4040d
-
; no known jump sources
Function4040d: ; 4040d (10:440d)
ld b, $0
@@ -45367,7 +45522,7 @@
; no known jump sources
Function40471: ; 40471 (10:4471)
- ld de, $449e
+ ld de, Unknown_4049e
call Function4135a
call Function40f4f
call c, Function40fa8
@@ -45393,8 +45548,67 @@
ret
; 4049e (10:449e)
-INCBIN "baserom.gbc",$4049e,$4050a - $4049e
+Unknown_4049e: ; 4049e
+ dw $04c0
+ dw $c4f2
+ dw $c51a
+ dw $c5a6
+ dw $c5ce
+; 404a8
+Jumptable_404a8: ; 404a8
+ dw Function404b0
+ dw Function404b0
+ dw Function404b7
+ dw Function40501
+; 404b0
+
+Function404b0: ; 404b0
+ call Function40f84
+ call Function40fa8
+ ret
+; 404b7
+
+Function404b7: ; 404b7
+ call Function41086
+ callba Function441cf
+ ld a, [$c7d7]
+ and a
+ jr nz, .asm_404dc
+ call Function40bdc
+ call Function41107
+ xor a
+ ld [hBGMapMode], a
+ call Function408f0
+ call Function4134f
+ call Function40fa8
+ call WaitBGMap
+ ret
+
+.asm_404dc
+ ld [$c7d2], a
+ ld a, [$c7d0]
+ ld [$c7e0], a
+ ld a, [$c7d1]
+ ld [$c7e1], a
+ ld a, [$c2d6]
+ ld [$cf65], a
+ xor a
+ ld [$c7d0], a
+ ld [$c7d1], a
+ call Function41401
+ ld a, $9
+ ld [$cf63], a
+ ret
+; 40501
+
+Function40501: ; 40501
+ call Function41401
+ ld a, $0
+ ld [$cf63], a
+ ret
+; 4050a
+
; no known jump sources
Function4050a: ; 4050a (10:450a)
xor a
@@ -45513,9 +45727,9 @@
jr .asm_4060f
.asm_40603
- ld hl, $550e
+ ld hl, PokedexLZ
ld de, $9310
- ld bc, $103a
+ lb bc, BANK(PokedexLZ), $3a
call Functione73
.asm_4060f
@@ -45578,7 +45792,7 @@
ld c, $5a
asm_4065d: ; 4065d (10:465d)
ld e, a
- ld d, $0
+ ld d, 0
ld hl, $4a40
add hl, de
add hl, de
@@ -45751,7 +45965,7 @@
; known jump sources: 40169 (10:4169)
Function4074c: ; 4074c (10:474c)
ld hl, $c5f4
- ld de, $47f2
+ ld de, Unknown_407f2
call Function40acd
ld a, $32
ld hl, TileMap ; $c4a0 (aliases: SpritesEnd)
@@ -45764,7 +45978,7 @@
ld bc, $607
call Function40ad5
ld hl, $c57d
- ld de, $47e1
+ ld de, Unknown_407e1
call Function40acd
ld hl, PokedexSeen ; $deb9 (aliases: EndPokedexSeen)
ld b, $20
@@ -45774,7 +45988,7 @@
ld bc, $103
call PrintNum
ld hl, $c5b9
- ld de, $47e6
+ ld de, Unknown_407e6
call Function40acd
ld hl, PokedexCaught ; $de99
ld b, $20
@@ -45784,7 +45998,7 @@
ld bc, $103
call PrintNum
ld hl, $c5f5
- ld de, $47ea
+ ld de, Unknown_407ea
call Function40acd
ld hl, $c4bc
ld b, $7
@@ -45806,7 +46020,15 @@
ret
; 407e1 (10:47e1)
-INCBIN "baserom.gbc",$407e1,$407fd - $407e1
+Unknown_407e1: ; 407e1
+ db "SEEN", $ff
+Unknown_407e6: ; 407e6
+ db "OWN", $ff
+Unknown_407ea: ; 407ea
+ db $3b, $48, $49, $4a, $44, $45, $46, $47 ; SELECT > OPTION
+Unknown_407f2: ; 407f2
+ db $3c, $3b, $41, $42, $43, $4b, $4c, $4d, $4e, $3c, $ff ; START > SEARCH
+; 407fd
Function407fd: ; 407fd
call Function40aa6
@@ -45829,19 +46051,27 @@
ld a, $7f
call ByteFill
ld hl, $c535
- ld de, $4852
+ ld de, Unknown_40852
call Function40acd
ld hl, $c55d
- ld de, $485c
+ ld de, Unknown_4085c
call Function40acd
ld hl, $c5f4
- ld de, $4867
+ ld de, Unknown_40867
call Function40acd
call Function40ab2
ret
; 4084f
-INCBIN "baserom.gbc",$4084f,$4087c - $4084f
+Unknown_4084f: ; 4084f
+ db $5c, $5d, $ff ; No.
+Unknown_40852: ; 40852
+ db "HT ?", $5e, "??", $5f, $ff ; HT ?'??"
+Unknown_4085c: ; 4085c
+ db "WT ???lb", $ff ; WT ???lb
+Unknown_40867: ; 40867
+ db $3b, " PAGE AREA CRY PRNT", $ff
+; 4087c
; known jump sources: 403a3 (10:43a3)
Function4087c: ; 4087c (10:487c)
@@ -45853,22 +46083,34 @@
ld bc, $412
call Function40ad5
ld hl, $c4b4
- ld de, $48b2
+ ld de, Unknown_408b2
call Function40acd
ld hl, $c4f3
- ld de, $48bd
+ ld de, String_408bd
call PlaceString
ld a, [$c7dc]
and a
ret z
ld hl, $c56b
- ld de, $48e5
+ ld de, String_408e5
call PlaceString
ret
; 408b2 (10:48b2)
-INCBIN "baserom.gbc",$408b2,$408f0 - $408b2
+Unknown_408b2: ; 408b2
+ db $3b, " OPTION ", $3c, $ff
+; 408bd
+String_408bd: ; 408bd
+ db "NEW #DEX MODE", $4e
+ db "OLD #DEX MODE", $4e
+ db "A to Z MODE@"
+; 408e5
+
+String_408e5: ; 408e5
+ db "UNOWN MODE@"
+; 408f0
+
; known jump sources: 40449 (10:4449)
Function408f0: ; 408f0 (10:48f0)
call Function40aa6
@@ -45876,25 +46118,40 @@
ld bc, $e12
call Function40ad5
ld hl, $c4b4
- ld de, $492a
+ ld de, Unknown_4092a
call Function40acd
ld hl, $c4f8
- ld de, $4935
+ ld de, Unknown_40935
call Function40acd
ld hl, $c520
- ld de, $4935
+ ld de, Unknown_40935
call Function40acd
ld hl, $c4f3
- ld de, $4940
+ ld de, String_40940
call PlaceString
ld hl, $c5a7
- ld de, $494c
+ ld de, String_4094c
call PlaceString
ret
; 4092a (10:492a)
-INCBIN "baserom.gbc",$4092a,$40962 - $4092a
+Unknown_4092a: ; 4092a
+ db $3b, " SEARCH ", $3c, $ff
+; 40925
+Unknown_40935: ; 40935
+ db $3d, " ", $3e, $ff
+; 40940
+
+String_40940: ; 40940
+ db "TYPE1", $4e
+ db "TYPE2@"
+; 4094c
+
+String_4094c: ; 4094c
+ db "BEGIN SEARCH!!", $4e, "CANCEL@"
+; 40962
+
; known jump sources: 40534 (10:4534)
Function40962: ; 40962 (10:4962)
call Function40aa6
@@ -45905,7 +46162,7 @@
ld bc, $512
call Function40ad5
ld hl, $c591
- ld de, $49ae
+ ld de, String_409ae
call PlaceString
ld de, $c7d7
ld hl, $c5e1
@@ -45927,7 +46184,11 @@
ret
; 409ae (10:49ae)
-INCBIN "baserom.gbc",$409ae,$409cf - $409ae
+String_409ae: ; 409ae
+ db "SEARCH RESULTS", $4e
+ db " TYPE", $4e
+ db " FOUND!@"
+; 409cf
; known jump sources: 40523 (10:4523), 4054e (10:454e)
Function409cf: ; 409cf (10:49cf)
@@ -45973,7 +46234,7 @@
and a
jr z, .asm_40a39
push af
- ld hl, $4a3e
+ ld hl, Unknown_40a3e
add hl, de
add hl, de
add hl, de
@@ -45994,7 +46255,34 @@
ret
; 40a3e (10:4a3e)
-INCBIN "baserom.gbc",$40a3e,$40aa6 - $40a3e
+Unknown_40a3e: ; 40a3e
+ dw $c580, $c57f
+ dw $c56c, $c56b
+ dw $c558, $c557
+ dw $c544, $c543
+ dw $c530, $c52f
+ dw $c51c, $c51b
+ dw $c508, $c507
+ dw $c4f4, $c4f3
+ dw $c4e0, $c4cb
+ dw $c4e1, $c4cd
+ dw $c4e2, $c4ce
+ dw $c4e3, $c4cf
+ dw $c4e4, $c4d0
+ dw $c4e5, $c4d1
+ dw $c4e6, $c4d2
+ dw $c4e7, $c4d3
+ dw $c4e8, $c4d4
+ dw $c4e9, $c4d5
+ dw $c4ea, $c4d7
+ dw $c4fe, $c4ff
+ dw $c512, $c513
+ dw $c526, $c527
+ dw $c53a, $c53b
+ dw $c54e, $c54f
+ dw $c562, $c563
+ dw $c576, $c577
+; 40aa6
Function40aa6: ; 40aa6
ld hl, TileMap
@@ -46175,13 +46463,15 @@
call Function40bd0
ret nz
inc hl
- ld de, $4b9a
+ ld de, String_40b9a
call PlaceString
scf
ret
; 40b9a (10:4b9a)
-INCBIN "baserom.gbc",$40b9a,$40ba0 - $40b9a
+String_40b9a: ; 40b9a
+ db "-----@"
+; 40ba0
Function40ba0: ; 40ba0
ld hl, $c4c6
@@ -46243,7 +46533,7 @@
xor a
call ByteFill
ld a, [$c7d4]
- ld hl, $4bf0
+ ld hl, Jumptable_40bf0
call Function41432
jp [hl]
; 40bf0
@@ -46258,9 +46548,9 @@
; no known jump sources
Function40bf6: ; 40bf6 (10:4bf6)
- ld de, $4d60
- ld hl, PlayerSDefLevel ; $c6d0
- ld c, $fb
+ ld de, NewPokedexOrder
+ ld hl, $c6d0
+ ld c, NUM_POKEMON
.asm_40bfe
ld a, [de]
inc de
@@ -46272,9 +46562,9 @@
; no known jump sources
Function40c08: ; 40c08 (10:4c08)
- ld hl, PlayerSDefLevel ; $c6d0
+ ld hl, $c6d0
ld a, $1
- ld c, $fb
+ ld c, NUM_POKEMON
.asm_40c0f
ld [hli], a
inc a
@@ -46286,7 +46576,7 @@
; known jump sources: 40c04 (10:4c04), 40c14 (10:4c14)
Function40c18: ; 40c18 (10:4c18)
ld hl, $c7ca
- ld d, $fb
+ ld d, NUM_POKEMON
ld e, d
.asm_40c1e
ld a, [hld]
@@ -46304,9 +46594,9 @@
Function40c30: ; 40c30
xor a
ld [$c7d2], a
- ld hl, PlayerSDefLevel
+ ld hl, $c6d0
ld de, AlphabeticalPokedexOrder
- ld c, $fb
+ ld c, NUM_POKEMON
.asm_40c3c
push bc
ld a, [de]
@@ -46325,9 +46615,9 @@
dec c
jr nz, .asm_40c3c
ld a, [$c7d2]
- ld c, $0
+ ld c, 0
.asm_40c5b
- cp $fb
+ cp NUM_POKEMON
jr z, .asm_40c64
ld [hl], c
inc hl
@@ -46351,7 +46641,7 @@
ld bc, $0412
call Function40ad5
ld a, [$c7d8]
- ld hl, $4e7d
+ ld hl, Unknown_40e7d
call Function41432
ld e, l
ld d, h
@@ -46362,8 +46652,33 @@
ret
; 40e7d
-INCBIN "baserom.gbc",$40e7d,$40f08 - $40e7d
+Unknown_40e7d: ; 40e7d
+ dw String_40e85
+ dw String_40ea6
+ dw String_40ec6
+ dw String_40ee4
+; 40e85
+String_40e85: ; 40e85
+ db $e1, $e2, " are listed by", $4e
+ db "evolution type.@"
+; 40ea6
+
+String_40ea6: ; 40ea6
+ db $e1, $e2, " are listed by", $4e
+ db "official type.@"
+; 40ec6
+
+String_40ec6: ; 40ec6
+ db $e1, $e2, " are listed", $4e
+ db "alphabetically.@"
+; 40ee4
+
+String_40ee4: ; 40ee4
+ db "UNOWN are listed", $4e
+ db "in catching order.@"
+; 40f08
+
; known jump sources: 40424 (10:4424)
Function40f08: ; 40f08 (10:4f08)
xor a
@@ -46378,7 +46693,7 @@
ld [hBGMapMode], a ; $ff00+$d4
ld c, $40
call DelayFrames
- ld de, $15
+ ld de, SFX_CHANGE_DEX_MODE
call PlaySFX
ld c, $40
call DelayFrames
@@ -46385,7 +46700,9 @@
ret
; 40f32 (10:4f32)
-INCBIN "baserom.gbc",$40f32,$40f4f - $40f32
+String_40f32: ; 40f32
+ db "Changing modes.", $4e, "Please wait.@"
+; 40f4f
; known jump sources: 40477 (10:4477)
Function40f4f: ; 40f4f (10:4f4f)
@@ -46398,7 +46715,7 @@
jr nz, .asm_40f65
ld a, [hl]
and $10
- jr nz, .asm_40f84
+ jr nz, Function40f84
.asm_40f63
and a
ret
@@ -46424,7 +46741,9 @@
.asm_40f82
scf
ret
-.asm_40f84
+; 40f84
+
+Function40f84: ; 40f84
ld a, [$c7d8]
and a
jr nz, .asm_40f99
@@ -46472,8 +46791,8 @@
Function40fcd: ; 40fcd (10:4fcd)
push hl
ld e, a
- ld d, $0
- ld hl, $4fe4
+ ld d, 0
+ ld hl, Strings_40fe4
add hl, de
add hl, de
add hl, de
@@ -46490,8 +46809,143 @@
ret
; 40fe4 (10:4fe4)
-INCBIN "baserom.gbc",$40fe4,$41148 - $40fe4
+Strings_40fe4: ; 40fe4
+ db " ---- @"
+ db " NORMAL @"
+ db " FIRE @"
+ db " WATER @"
+ db " GRASS @"
+ db "ELECTRIC@"
+ db " ICE @"
+ db "FIGHTING@"
+ db " POISON @"
+ db " GROUND @"
+ db " FLYING @"
+ db "PSYCHIC @"
+ db " BUG @"
+ db " ROCK @"
+ db " GHOST @"
+ db " DRAGON @"
+ db " DARK @"
+ db " STEEL @"
+; 41086
+Function41086: ; 41086
+ ld a, [$c7d6]
+ and a
+ call nz, Function41095
+ ld a, [$c7d5]
+ and a
+ call nz, Function41095
+ ret
+; 41095
+
+Function41095: ; 41095
+ dec a
+ ld e, a
+ ld d, 0
+ ld hl, Unknown_410f6
+ add hl, de
+ ld a, [hl]
+ ld [$c7df], a
+ ld hl, $c6d0
+ ld de, $c6d0
+ ld c, NUM_POKEMON
+ xor a
+ ld [$c7d7], a
+.asm_410ad
+ push bc
+ ld a, [hl]
+ and a
+ jr z, .asm_410e0
+ ld [$d265], a
+ ld [CurSpecies], a
+ call Function40bc4
+ jr z, .asm_410e0
+ push hl
+ push de
+ call GetBaseData
+ pop de
+ pop hl
+ ld a, [$c7df]
+ ld b, a
+ ld a, [BaseType1]
+ cp b
+ jr z, .asm_410d4
+ ld a, [BaseType2]
+ cp b
+ jr nz, .asm_410e0
+
+.asm_410d4
+ ld a, [$d265]
+ ld [de], a
+ inc de
+ ld a, [$c7d7]
+ inc a
+ ld [$c7d7], a
+
+.asm_410e0
+ inc hl
+ pop bc
+ dec c
+ jr nz, .asm_410ad
+ ld l, e
+ ld h, d
+ ld a, [$c7d7]
+ ld c, 0
+.asm_410ec
+ cp NUM_POKEMON
+ jr z, .asm_410f5
+ ld [hl], c
+ inc hl
+ inc a
+ jr .asm_410ec
+
+.asm_410f5
+ ret
+; 410f6
+
+Unknown_410f6: ; 410f6
+ db NORMAL
+ db FIRE
+ db WATER
+ db GRASS
+ db ELECTRIC
+ db ICE
+ db FIGHTING
+ db POISON
+ db GROUND
+ db FLYING
+ db PSYCHIC
+ db BUG
+ db ROCK
+ db GHOST
+ db DRAGON
+ db DARK
+ db STEEL
+; 41107
+
+Function41107: ; 41107
+ xor a
+ ld [hBGMapMode], a
+ ld hl, $c590
+ ld bc, $0412
+ call Function40ad5
+ ld de, String_41126
+ ld hl, $c5b9
+ call PlaceString
+ ld a, $1
+ ld [hBGMapMode], a
+ ld c, $80
+ call DelayFrames
+ ret
+; 41126
+
+String_41126: ; 41126
+ db "The specified type", $4e
+ db "was not found.@"
+; 41148
+
; known jump sources: 40190 (10:4190), 401c9 (10:41c9)
Function41148: ; 41148 (10:5148)
ld a, [$c7d4]
@@ -46503,26 +46957,105 @@
; known jump sources: 4114d (10:514d), 41286 (10:5286)
Function41157: ; 41157 (10:5157)
- ld hl, $5167
+ ld hl, Unknown_41167
ld a, [$c7d1]
or a
jr nz, .asm_41163
- ld hl, $51c8
+ ld hl, Unknown_411c8
.asm_41163
call Function412f1
ret
; 41167 (10:5167)
-INCBIN "baserom.gbc",$41167,$41229 - $41167
+Unknown_41167: ; 41167
+; OAM
+ db $18, $47, $30, $07
+ db $10, $47, $31, $07
+ db $10, $4f, $32, $07
+ db $10, $57, $32, $07
+ db $10, $5f, $32, $07
+ db $10, $67, $33, $07
+ db $10, $7e, $33, $27
+ db $10, $86, $32, $27
+ db $10, $8e, $32, $27
+ db $10, $96, $32, $27
+ db $10, $9e, $31, $27
+ db $18, $9e, $30, $27
+ db $20, $47, $30, $47
+ db $28, $47, $31, $47
+ db $28, $4f, $32, $47
+ db $28, $57, $32, $47
+ db $28, $5f, $32, $47
+ db $28, $67, $33, $47
+ db $28, $7e, $33, $67
+ db $28, $86, $32, $67
+ db $28, $8e, $32, $67
+ db $28, $96, $32, $67
+ db $28, $9e, $31, $67
+ db $20, $9e, $30, $67
+ db $ff
+; 411c8
+Unknown_411c8: ; 411c8
+; OAM
+ db $18, $47, $30, $07
+ db $10, $47, $34, $07
+ db $10, $4f, $35, $07
+ db $10, $57, $35, $07
+ db $10, $5f, $35, $07
+ db $10, $67, $36, $07
+ db $10, $7e, $36, $27
+ db $10, $86, $35, $27
+ db $10, $8e, $35, $27
+ db $10, $96, $35, $27
+ db $10, $9e, $34, $27
+ db $18, $9e, $30, $27
+ db $20, $47, $30, $47
+ db $28, $47, $31, $47
+ db $28, $4f, $32, $47
+ db $28, $57, $32, $47
+ db $28, $5f, $32, $47
+ db $28, $67, $33, $47
+ db $28, $7e, $33, $67
+ db $28, $86, $32, $67
+ db $28, $8e, $32, $67
+ db $28, $96, $32, $67
+ db $28, $9e, $31, $67
+ db $20, $9e, $30, $67
+ db $ff
+; 41229
+
; known jump sources: 41150 (10:5150)
Function41229: ; 41229 (10:5229)
- ld hl, $5230
+ ld hl, Unknown_41230
call Function412f1
ret
; 41230 (10:5230)
-INCBIN "baserom.gbc",$41230,$41281 - $41230
+Unknown_41230: ; 41230
+; OAM
+ db $1b, $47, $30, $07
+ db $13, $47, $31, $07
+ db $13, $4f, $32, $07
+ db $13, $57, $32, $07
+ db $13, $5f, $33, $07
+ db $13, $80, $33, $27
+ db $13, $88, $32, $27
+ db $13, $90, $32, $27
+ db $13, $98, $31, $27
+ db $1b, $98, $30, $27
+ db $23, $47, $30, $47
+ db $2b, $47, $31, $47
+ db $2b, $4f, $32, $47
+ db $2b, $57, $32, $47
+ db $2b, $5f, $33, $47
+ db $2b, $80, $33, $67
+ db $2b, $88, $32, $67
+ db $2b, $90, $32, $67
+ db $2b, $98, $31, $67
+ db $23, $98, $30, $67
+ db $ff
+; 41281
; known jump sources: 40551 (10:4551), 40573 (10:4573)
Function41281: ; 41281 (10:5281)
@@ -46529,12 +47062,39 @@
ld a, [$c7d4]
cp $1
jp z, Function41157
- ld hl, $5290
+ ld hl, Unknown_41290
call Function412f1
ret
; 41290 (10:5290)
-INCBIN "baserom.gbc",$41290,$412f1 - $41290
+Unknown_41290: ; 41290
+; OAM
+ db $1b, $47, $30, $07
+ db $13, $47, $31, $07
+ db $13, $4f, $32, $07
+ db $13, $57, $32, $07
+ db $13, $5f, $32, $07
+ db $13, $67, $33, $07
+ db $13, $7e, $33, $27
+ db $13, $86, $32, $27
+ db $13, $8e, $32, $27
+ db $13, $96, $32, $27
+ db $13, $9e, $31, $27
+ db $1b, $9e, $30, $27
+ db $23, $47, $30, $47
+ db $2b, $47, $31, $47
+ db $2b, $4f, $32, $47
+ db $2b, $57, $32, $47
+ db $2b, $5f, $32, $47
+ db $2b, $67, $33, $47
+ db $2b, $7e, $33, $67
+ db $2b, $86, $32, $67
+ db $2b, $8e, $32, $67
+ db $2b, $96, $32, $67
+ db $2b, $9e, $31, $67
+ db $23, $9e, $30, $67
+ db $ff
+; 412f1
; known jump sources: 41163 (10:5163), 4122c (10:522c), 4128c (10:528c)
Function412f1: ; 412f1 (10:52f1)
@@ -46627,15 +47187,15 @@
call Function413e0
ld hl, hJoyPressed ; $ffa7
ld a, [hl]
- and $60
+ and D_LEFT | D_UP
and b
jr nz, .asm_4138f
ld a, [hl]
- and $90
+ and D_RIGHT | D_DOWN
and b
jr nz, .asm_413a0
ld a, [hl]
- and $4
+ and SELECT
and b
jr nz, .asm_413c1
call Function413f5
@@ -46642,11 +47202,11 @@
jr c, .asm_413bf
ld hl, $ffa9
ld a, [hl]
- and $60
+ and D_LEFT | D_UP
and b
jr nz, .asm_4138f
ld a, [hl]
- and $90
+ and D_RIGHT | D_DOWN
and b
jr nz, .asm_413a0
jr .asm_413bf
@@ -46744,6 +47304,8 @@
call ByteFill
pop af
ld [rSVBK], a ; $ff00+$70
+
+Function41415: ; 41415
ld a, $ff
call DmgToCgbBGPals
ld a, $ff
@@ -46754,6 +47316,8 @@
Function41423: ; 41423
ld b, a
call GetSGBLayout
+
+Function41427: ; 41427
ld a, $e4
call DmgToCgbBGPals
ld a, $e0
@@ -46764,7 +47328,7 @@
Function41432: ; 41432
ld e, a
- ld d, $0
+ ld d, 0
add hl, de
add hl, de
ld a, [hli]
@@ -46854,11 +47418,11 @@
ld bc, $0310
xor a
call ByteFill
- call .asm_414fb
+ call Function414fb
call Functione5f
ld hl, $9600
ld bc, $0200
- call asm_41504
+ call Function41504
call Function41a24
jr nz, .asm_414e0
callba Function1ddf1c
@@ -46865,12 +47429,12 @@
jr .asm_414e9
.asm_414e0
- ld hl, $550e
+ ld hl, PokedexLZ
ld de, $9310
call Decompress
.asm_414e9
- ld hl, $56b0
+ ld hl, PokedexSlowpokeLZ
ld de, VTiles0
call Decompress
ld a, $6
@@ -46877,11 +47441,13 @@
call Function3cb4
call EnableLCD
ret
-.asm_414fb: ; 414fb
+
+Function414fb: ; 414fb
call Functione51
ld hl, VTiles1
ld bc, $0800
-asm_41504
+
+Function41504: ; 41504
ld a, [hl]
xor $ff
ld [hli], a
@@ -46888,12 +47454,16 @@
dec bc
ld a, b
or c
- jr nz, asm_41504
+ jr nz, Function41504
ret
; 4150e
-INCBIN "baserom.gbc",$4150e,$41a24 - $4150e
+PokedexLZ: ; 4150e
+INCBIN "baserom.gbc",$4150e,$416b0 - $4150e
+; 416b0
+PokedexSlowpokeLZ: ; 416b0
+INCBIN "baserom.gbc",$416b0,$41a24 - $416b0
Function41a24: ; 41a24
ld a, [hCGB]
@@ -46907,17 +47477,17 @@
Function41a2c: ; 41a2c
ld a, $0
call GetSRAMBank
- ld hl, Pokedex
+ ld hl, UnownFont
ld de, $a188
- ld bc, Function270
- ld a, $77
+ ld bc, $0270
+ ld a, BANK(UnownFont)
call FarCopyBytes
ld hl, $a188
ld bc, $01b0
- call asm_41504
+ call Function41504
ld de, $a188
ld hl, $9400
- ld bc, $101b
+ lb bc, $10, $1b
call Request2bpp
call CloseSRAM
ret
@@ -46935,7 +47505,7 @@
add hl, de
ld a, [hl]
ld [UnownLetter], a ; $d234
- ld a, $c9
+ ld a, UNOWN
ld [CurPartySpecies], a ; $d108
call GetBaseData
ld de, $9000
@@ -47049,7 +47619,7 @@
cp $ff
jp z, Function423ff
- ld [MagikarpLength], a
+ ld [Buffer1], a
push hl
ld a, [CurPartyMon]
@@ -47061,7 +47631,7 @@
and a
jp z, Function421f5
- ld a, [MagikarpLength]
+ ld a, [Buffer1]
dec a
ld b, 0
ld c, a
@@ -47357,9 +47927,9 @@
jp .asm_42230
; 423fe
-INCBIN "baserom.gbc", $423fe, $423ff - $423fe
+Function423fe: ; 423fe
+ pop hl
-
Function423ff: ; 423ff
pop de
pop bc
@@ -47457,7 +48027,7 @@
ld a, [$d265]
ld [CurPartySpecies], a
dec a
- ld b, $0
+ ld b, 0
ld c, a
ld hl, EvosAttacksPointers
add hl, bc
@@ -47653,7 +48223,7 @@
; Return carry and the new species in CurPartySpecies
; if a pre-evolution is found.
- ld c, BULBASAUR - 1
+ ld c, 0
.asm_42583
ld hl, EvosAttacksPointers
ld b, 0
@@ -47698,8 +48268,6 @@
-
-
SECTION "bank11", ROMX, BANK[$11]
INCLUDE "engine/fruit_trees.asm"
@@ -47913,13 +48481,13 @@
Function441cf: ; 441cf
- ld hl, $41fc
- ld b, $19
+ ld hl, Unknown_441fc
+ ld b, 25
.asm_441d4
ld a, [hli]
cp $fe
jr nz, .asm_441dd
- ld hl, $41fc
+ ld hl, Unknown_441fc
ld a, [hli]
.asm_441dd
@@ -47942,12 +48510,19 @@
ret
; 441fc
-INCBIN "baserom.gbc",$441fc,$44207 - $441fc
+Unknown_441fc: ; 441fc
+ db $00, $07
+ db $01, $07
+ db $02, $07
+ db $03, $07
+ db $04, $07
+ db $fe
+; 44207
Function44207: ; 44207
ld a, [$c7db]
- ld hl, $4228
+ ld hl, Unknown_44228
ld de, Sprites
.asm_44210
ld a, [hli]
@@ -47972,7 +48547,18 @@
jr .asm_44210
; 44228
-INCBIN "baserom.gbc",$44228,$4424d - $44228
+Unknown_44228: ; 44228
+ db $58, $48, $00, $00
+ db $58, $50, $01, $00
+ db $58, $58, $02, $00
+ db $60, $48, $10, $00
+ db $60, $50, $11, $00
+ db $60, $58, $12, $00
+ db $68, $48, $20, $00
+ db $68, $50, $21, $00
+ db $68, $58, $22, $00
+ db $ff
+; 4424d
Function4424d: ; 4424d
call GetPokemonName
@@ -48102,7 +48688,9 @@
ret
; 44331
-INCBIN "baserom.gbc",$44331,$44333 - $44331
+String_44331: ; 44331
+ db "#@"
+; 44333
Function44333: ; 44333
push hl
@@ -48109,7 +48697,7 @@
ld hl, PokedexDataPointerTable
ld a, b
dec a
- ld d, $0
+ ld d, 0
ld e, a
add hl, de
add hl, de
@@ -48121,7 +48709,7 @@
rlca
and $3
ld hl, PokedexEntryBanks
- ld d, $0
+ ld d, 0
ld e, a
add hl, de
ld b, [hl]
@@ -48143,9 +48731,38 @@
db BANK(PokedexEntries4)
; 44355
-INCBIN "baserom.gbc", $44355, $44378 - $44355
+Function44355: ; 44355
+ call Function44333
+ push hl
+ ld h, d
+ ld l, e
+.asm_4435b
+ ld a, b
+ call GetFarByte
+ inc hl
+ cp $50
+ jr nz, .asm_4435b
+ inc hl
+ inc hl
+ inc hl
+ inc hl
+ dec c
+ jr z, .asm_44374
+.asm_4436b
+ ld a, b
+ call GetFarByte
+ inc hl
+ cp $50
+ jr nz, .asm_4436b
+.asm_44374
+ ld d, h
+ ld e, l
+ pop hl
+ ret
+; 44378
+
PokedexDataPointerTable: ; 0x44378
INCLUDE "stats/pokedex/entry_pointers.asm"
@@ -48359,7 +48976,7 @@
call AddNTimes
ld d, h
ld e, l
- ld hl, DefaultFlypoint
+ ld hl, $d002
ld bc, $0021
ld a, $0
call GetSRAMBank
@@ -48734,6 +49351,7 @@
db "ATTACH MAIL@"
db "CANCEL@"
+
SECTION "bank12", ROMX, BANK[$12]
Function48000: ; 48000
@@ -48784,11 +49402,11 @@
call Functione5f
ld de, $48c3
ld hl, $9100
- ld bc, $1201
+ lb bc, $12, $01
call Request1bpp
ld de, $48cb
ld hl, $9110
- ld bc, $1201
+ lb bc, $12, $01
call Request1bpp
call Function4a3a7
call WhiteBGMap
@@ -48800,9 +49418,9 @@
.asm_4808a
ld a, $5
ld [MusicFade], a ; $c2a7
- ld a, $5e
+ ld a, MUSIC_MOBILE_ADAPTER_MENU % $100
ld [MusicFadeIDLo], a ; $c2a9
- ld a, $0
+ ld a, MUSIC_MOBILE_ADAPTER_MENU / $100
ld [MusicFadeIDHi], a ; $c2aa
ld c, $14
call DelayFrames
@@ -48870,7 +49488,7 @@
ld c, $12
call TextBox
ld hl, $c5e1
- ld de, $4275
+ ld de, String_48275
call PlaceString
call Function48187
call Function3200
@@ -48967,13 +49585,15 @@
jr nz, .asm_48201
.asm_481f8
ld hl, $c573
- ld de, $4202
+ ld de, String_48202
call PlaceString
.asm_48201
ret
; 48202 (12:4202)
-INCBIN "baserom.gbc",$48202,$4820d - $48202
+String_48202: ; 48202
+ db "Tell Later@"
+; 4820d
; known jump sources: 48161 (12:4161)
Function4820d: ; 4820d (12:420d)
@@ -49005,7 +49625,17 @@
jr .asm_4825c
; 48241 (12:4241)
-INCBIN "baserom.gbc",$48241,$4825c - $48241
+ ld hl, $c5cd
+ ld b, $2
+ ld c, $12
+ call ClearBox
+ ld de, $44a1
+ ld hl, $c5e1
+ call PlaceString
+ call WaitBGMap
+ ld c, $30
+ call DelayFrames
+
.asm_4825c
call WhiteBGMap
call Function48d30
@@ -49023,7 +49653,9 @@
jp Function4840c
; 48275 (12:4275)
-INCBIN "baserom.gbc",$48275,$48283 - $48275
+String_48275: ; 48275
+ db "Personal Info@"
+; 48283
; known jump sources: 4828d (12:428d), 48304 (12:4304), 4840f (12:440f), 4876f (12:476f), 488d3 (12:48d3)
Function48283: ; 48283 (12:4283)
@@ -49220,7 +49852,7 @@
call Function48187
call Function48283
ld hl, $c5e1
- ld de, $4275
+ ld de, String_48275
call PlaceString
call Function486bf
pop bc
@@ -49247,7 +49879,7 @@
push af
push de
push hl
- ld hl, $445d
+ ld hl, Unknown_4845d
.asm_4844b
and a
jr z, .asm_48453
@@ -49266,8 +49898,85 @@
ret
; 4845d (12:445d)
-INCBIN "baserom.gbc",$4845d,$48689 - $4845d
+Unknown_4845d: ; 4845d
+; 4845d
+ db "0@"
+ db "1@"
+ db "2@"
+ db "3@"
+ db "4@"
+ db "5@"
+ db "6@"
+ db "7@"
+ db "8@"
+ db "9@"
+ db " Mobile Profile@"
+ db "Gender@"
+ db "Age@"
+ db "Address@"
+ db "Zip Code@"
+ db "OK@"
+ db "Profile Changed@"
+ db "Boy or girl?@"
+ db "How old are you?@"
+ db "Where do you live?@"
+ db "Your zip code?@"
+; 484f1
+INCBIN "baserom.gbc",$484f1,$48552 - $484f1
+
+; 48552
+ db "がぎぐげござじず", $ff
+
+Aichi: db "あいちけん@" ; Aichi
+AomoriPrefecture: db "あおもりけん@" ; Aomori Prefecture
+AkitaKen: db "あきたけん@" ; Akita-ken
+IshikawaKen: db "いしかわけん@" ; Ishikawa-ken
+Ibaraki: db "いばらきけん@" ; Ibaraki
+Iwate: db "いわてけん@" ; Iwate
+EhimePrefecture: db "えひめけん@" ; Ehime Prefecture
+OitaPrefecture: db "おおいたけん@" ; Oita Prefecture
+Osakafu: db "おおさかふ@" ; Osakafu
+OkayamaPrefecture: db "おかやまけん@" ; Okayama Prefecture
+Okinawa: db "おきなわけん@" ; Okinawa
+Kagawa: db "かがわけん@" ; Kagawa
+KagoshimaPrefecture: db "かごしまけん@" ; Kagoshima Prefecture
+Kanagawa: db "かながわけん@" ; Kanagawa
+GifuKen: db "ぎふけん@" ; Gifu-ken
+Kyotofu: db "きょうとふ@" ; Kyotofu
+KumamotoPrefecture: db "くまもとけん@" ; Kumamoto Prefecture
+GunmaPrefecture: db "ぐんまけん@" ; Gunma Prefecture
+Kochi: db "こうちけん@" ; Kochi
+Saitama: db "さいたまけん@" ; Saitama
+SagaKen: db "さがけん@" ; Saga-ken
+ShigaKen: db "しがけん@" ; Shiga-ken
+ShizuokaPrefecture: db "しずおかけん@" ; Shizuoka Prefecture
+ShimanePrefecture: db "しまねけん@" ; Shimane Prefecture
+ChibaKen: db "ちばけん@" ; Chiba-ken
+Tokyo: db "とうきょうと@" ; Tokyo
+Tokushima: db "とくしまけん@" ; Tokushima
+Tochigi: db "とちぎけん@" ; Tochigi
+TottoriPrefecture: db "とっとりけん@" ; Tottori Prefecture
+Toyama: db "とやまけん@" ; Toyama
+Nagasaki: db "ながさきけん@" ; Nagasaki
+NaganoKen: db "ながのけん@" ; Nagano-ken
+Naraken: db "ならけん@" ; Naraken
+NiigataPrefecture: db "にいがたけん@" ; Niigata Prefecture
+HyogoKen: db "ひょうごけん@" ; Hyogo-ken
+HiroshimaPrefecture: db "ひろしまけん@" ; Hiroshima Prefecture
+FukuiKen: db "ふくいけん@" ; Fukui-ken
+FukuokaKen: db "ふくおかけん@" ; Fukuoka-ken
+Fukushima: db "ふくしまけん@" ; Fukushima
+Hokkaido: db "ほっかいどう@" ; Hokkaido
+MieKen: db "みえけん@" ; Mie-ken
+Miyagi: db "みやぎけん@" ; Miyagi
+MiyazakiKen: db "みやざきけん@" ; Miyazaki-ken
+Yamagata: db "やまがたけん@" ; Yamagata
+KenYamaguchi: db "やまぐちけん@" ; Ken Yamaguchi
+YamanashiPrefecture: db "やまなしけん@" ; Yamanashi Prefecture
+WakayamaPrefecture: db "わかやまけん@" ; Wakayama Prefecture
+; 48689
+
; known jump sources: 48085 (12:4085)
Function48689: ; 48689 (12:4689)
ld c, $7
@@ -55286,15 +55995,14 @@
INCBIN "baserom.gbc",$4dcf7,$4dd2a - $4dcf7
StatsScreenPointerTable: ; 4dd2a
- dw $5d72 ; regular pokémon
+ dw Function4dd72 ; regular pokémon
dw EggStatsInit ; egg
- dw $5de6
- dw $5dac
- dw $5dc6
- dw $5de6
- dw $5dd6
- dw $5d6c
-
+ dw Function4dde6
+ dw Function4ddac
+ dw Function4ddc6
+ dw Function4dde6
+ dw Function4ddd6
+ dw Function4dd6c
; 4dd3a
@@ -61724,8 +62432,73 @@
ret
; 8442c
-INCBIN "baserom.gbc",$8442c,$844bc - $8442c
+Function8442c: ; 8442c
+ ld a, [$cf65]
+ push af
+ ld hl, VTiles1
+ ld de, Function84000
+ ld bc, $3680
+ call Request1bpp
+ xor a
+ ld [$ffac], a
+ call Function8474c
+ ld a, [rIE]
+ push af
+ xor a
+ ld [rIF], a
+ ld a, $9
+ ld [rIE], a
+ call Function84000
+ ld a, $10
+ ld [$cbfa], a
+ callba Function1dc1b0
+ call ClearTileMap
+ ld a, $e4
+ call DmgToCgbBGPals
+ call DelayFrame
+ ld hl, $ff9e
+ ld a, [hl]
+ push af
+ ld [hl], $4
+ ld a, $8
+ ld [$cf65], a
+ call Function84742
+ call Function843f0
+ jr c, .asm_8449d
+ call Function84411
+ ld c, $c
+ call DelayFrames
+ xor a
+ ld [hBGMapMode], a
+ call Function84000
+ ld a, $3
+ ld [$cbfa], a
+ callba Function1dc213
+ call Function84742
+ ld a, $4
+ ld [$cf65], a
+ call Function843f0
+.asm_8449d
+ pop af
+ ld [$ff9e], a
+ call Function84411
+ xor a
+ ld [rIF], a
+ pop af
+ ld [rIE], a
+ call Function84425
+ ld c, $8
+.asm_844ae
+ call LowVolume
+ call DelayFrame
+ dec c
+ jr nz, .asm_844ae
+ pop af
+ ld [$cf65], a
+ ret
+; 844bc
+
; no known jump sources
Function844bc: ; 844bc (21:44bc)
ld a, [$cf65]
@@ -105363,7 +106136,110 @@
INCBIN "gfx/misc/unown_font.2bpp"
; 1dc1b0
-INCBIN "baserom.gbc",$1dc1b0,$1dc381 - $1dc1b0
+Function1dc1b0: ; 1dc1b0
+ ld hl, TileMap
+ ld de, $ca90
+ ld bc, $0154
+ call CopyBytes
+ ld hl, $cab5
+ ld a, $62
+ ld [hli], a
+ inc a
+ ld [hl], a
+ ld hl, $cac9
+ ld a, $64
+ ld [hli], a
+ inc a
+ ld [hl], a
+ ld hl, $cb45
+ ld a, $7f
+ ld [hli], a
+ ld [hl], a
+ ld hl, $cb59
+ ld a, $61
+ ld [hli], a
+ ld [hl], a
+ ld hl, $cb6e
+ ld bc, $0512
+ call ClearBox
+ ld a, [$d265]
+ dec a
+ call CheckCaughtMon
+ push af
+ ld a, [$d265]
+ ld b, a
+ ld c, $1
+ callba Function44355
+ pop af
+ ld a, b
+ ld hl, $cb6d
+ call nz, Function13d4
+ ld hl, $caa3
+ ld [hl], $35
+ ld de, $0014
+ add hl, de
+ ld b, $f
+.asm_1dc20a
+ ld [hl], $37
+ add hl, de
+ dec b
+ jr nz, .asm_1dc20a
+ ld [hl], $3a
+ ret
+; 1dc213
+
+Function1dc213: ; 1dc213
+ ld hl, $ca90
+ ld bc, $00a0
+ ld a, $7f
+ call ByteFill
+ ld hl, $ca90
+ ld a, $36
+ ld b, $6
+ call Function1dc26a
+ ld hl, $caa3
+ ld a, $37
+ ld b, $6
+ call Function1dc26a
+ ld hl, $cb08
+ ld [hl], $38
+ inc hl
+ ld a, $39
+ ld bc, $0012
+ call ByteFill
+ ld [hl], $3a
+ ld hl, $cb1c
+ ld bc, $0014
+ ld a, $32
+ call ByteFill
+ ld a, [$d265]
+ dec a
+ call CheckCaughtMon
+ push af
+ ld a, [$d265]
+ ld b, a
+ ld c, $2
+ callba Function44355
+ pop af
+ ld hl, $caa5
+ ld a, b
+ call nz, Function13d4
+ ret
+; 1dc26a
+
+Function1dc26a: ; 1dc26a
+ push de
+ ld de, $0014
+.asm_1dc26e
+ ld [hl], a
+ add hl, de
+ dec b
+ jr nz, .asm_1dc26e
+ pop de
+ ret
+; 1dc275
+
+INCBIN "baserom.gbc", $1dc275, $1dc381 - $1dc275
Function1dc381: ; 1dc381
call WhiteBGMap