summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--home.asm41
-rw-r--r--home/audio.asm7
-rw-r--r--home/copy.asm378
-rw-r--r--home/decompress.asm2
-rw-r--r--home/joypad.asm4
-rw-r--r--home/palettes.asm2
-rw-r--r--home/text.asm783
-rw-r--r--main.asm17
-rw-r--r--wram.asm493
9 files changed, 435 insertions, 1292 deletions
diff --git a/home.asm b/home.asm
index bb5e7807..cd159b6e 100644
--- a/home.asm
+++ b/home.asm
@@ -21,9 +21,8 @@ INCLUDE "home/serial.asm"
INCLUDE "home/joypad.asm"
INCLUDE "home/decompress.asm"
INCLUDE "home/palettes.asm"
-
-Functiond70::
- dr $d70, $1458
+INCLUDE "home/copy.asm"
+INCLUDE "home/text.asm"
UpdateBGMapBuffer::
dr $1458, $14bb
@@ -41,7 +40,10 @@ Function162b::
dr $162b, $1642
Function1642::
- dr $1642, $1eb3
+ dr $1642, $196f
+
+UpdateSprites::
+ dr $196f, $1eb3
PrinterReceive::
dr $1eb3, $1ebf
@@ -68,7 +70,10 @@ Function30ff::
dr $30ff, $311a
CopyBytes::
- dr $311a, $314c
+ dr $311a, $313c
+
+GetFarHalfword::
+ dr $313c, $314c
ByteFill::
dr $314c, $3158
@@ -94,12 +99,30 @@ ReloadTilesFromBuffer_::
jp CopyBytes
Function317b::
- dr $317b, $344c
+ dr $317b, $31e2
+
+Function31e2::
+ dr $31e2, $323d
+
+PrintNum::
+ dr $323d, $344c
-Function344c::
- dr $344c, $3564
+WaitBGMap::
+ dr $344c, $3472
+
+ApplyTilemap::
+ dr $3472, $3564
Function3564::
- dr $3564, $3d4f
+ dr $3564, $35b9
+
+GetWeekday::
+ dr $35b9, $39f9
+
+PlayCry::
+ dr $39f9, $3ade
+
+PrintBCDNumber::
+ dr $3ade, $3d4f
INCLUDE "home/audio.asm"
diff --git a/home/audio.asm b/home/audio.asm
index 1c58598f..7144914d 100644
--- a/home/audio.asm
+++ b/home/audio.asm
@@ -1,5 +1,8 @@
DisableAudio::
dr $3d4f, $3e24
-PlaySound::
- dr $3e24, $3fee
+PlaySFX::
+ dr $3e24, $3e56
+
+WaitSFX::
+ dr $3e56, $3fee
diff --git a/home/copy.asm b/home/copy.asm
index 08eb5c10..879abb60 100644
--- a/home/copy.asm
+++ b/home/copy.asm
@@ -1,151 +1,49 @@
-; Functions to copy data from ROM.
-
-
-Get2bpp_2:: ; dc9
- ld a, [rLCDC]
- bit 7, a
- jp z, Copy2bpp
-
- ld a, [hROMBank]
- push af
- ld a, BANK(_Get2bpp)
- rst Bankswitch
- call _Get2bpp
- pop af
- rst Bankswitch
-
- ret
-; ddc
-
-Get1bpp_2:: ; ddc
- ld a, [rLCDC]
- bit 7, a
- jp z, Copy1bpp
-
- ld a, [hROMBank]
- push af
- ld a, BANK(_Get1bpp)
- rst Bankswitch
- call _Get1bpp
- pop af
- rst Bankswitch
-
- ret
-; def
-
-FarCopyBytesDouble_DoubleBankSwitch:: ; def
- ld [hBuffer], a
+Functiond70:: ; d70 (0:0d70)
+ ld b, a
ld a, [hROMBank]
push af
- ld a, [hBuffer]
- rst Bankswitch
-
- call FarCopyBytesDouble
-
- pop af
+ ld a, b
rst Bankswitch
- ret
-; dfd
-OldDMATransfer:: ; dfd
- dec c
- ld a, [hBGMapMode]
- push af
+ ld a, BANK(sDecompressBuffer)
+ call OpenSRAM
+ ld hl, sDecompressBuffer
+ ld bc, 7 * 7 * $10
xor a
- ld [hBGMapMode], a
- ld a, [hROMBank]
- push af
- ld a, b
- rst Bankswitch
+ call ByteFill
-.loop
-; load the source and target MSB and LSB
- ld a, d
- ld [rHDMA1], a ; source MSB
- ld a, e
- and $f0
- ld [rHDMA2], a ; source LSB
- ld a, h
- and $1f
- ld [rHDMA3], a ; target MSB
- ld a, l
- and $f0
- ld [rHDMA4], a ; target LSB
-; stop when c < 8
- ld a, c
- cp $8
- jr c, .done
-; decrease c by 8
- sub $8
- ld c, a
-; DMA transfer state
- ld a, $f
- ld [hDMATransfer], a
- call DelayFrame
-; add $100 to hl and de
- ld a, l
- add $100 % $100
+ ld hl, wcf3c
+ ld a, [hli]
+ ld h, [hl]
ld l, a
- ld a, h
- adc $100 / $100
- ld h, a
- ld a, e
- add $100 % $100
- ld e, a
- ld a, d
- adc $100 / $100
- ld d, a
- jr .loop
+ ld de, sDecompressBuffer
+ call Decompress
-.done
- ld a, c
- and $7f ; pretty silly, considering at most bits 0-2 would be set
- ld [hDMATransfer], a
- call DelayFrame
+ call CloseSRAM
pop af
rst Bankswitch
-
- pop af
- ld [hBGMapMode], a
ret
-; e4a
-
-
-ReplaceKrisSprite:: ; e4a
- callba _ReplaceKrisSprite
- ret
-; e51
-
-
-
-LoadStandardFont:: ; e51
- callba _LoadStandardFont
+Functiond97::
+ callba Function1413c
ret
-; e58
-LoadFontsBattleExtra:: ; e58
- callba _LoadFontsBattleExtra
+Functiond9e::
+ callba Functionf8000
ret
-; e5f
-
-
-LoadFontsExtra:: ; e5f
- callba _LoadFontsExtra1
- callba _LoadFontsExtra2
+Functionda5::
+ callba Functionf8032
ret
-; e6c
-LoadFontsExtra2:: ; e6c
- callba _LoadFontsExtra2
+Functiondac::
+ callba Functionf800c
ret
-; e73
-DecompressRequest2bpp:: ; e73
+DecompressRequest2bpp::
push de
ld a, BANK(sScratch)
- call GetSRAMBank
+ call OpenSRAM
push bc
ld de, sScratch
@@ -159,236 +57,134 @@ DecompressRequest2bpp:: ; e73
call Request2bpp
call CloseSRAM
ret
-; e8d
-
-
-FarCopyBytes:: ; e8d
-; copy bc bytes from a:hl to de
-
- ld [hBuffer], a
+FarCopyBytes:: ; dcd (0:0dcd)
+ ld [wBuffer], a
ld a, [hROMBank]
push af
- ld a, [hBuffer]
+ ld a, [wBuffer]
rst Bankswitch
-
call CopyBytes
-
pop af
rst Bankswitch
ret
-; 0xe9b
-
-FarCopyBytesDouble:: ; e9b
-; Copy bc bytes from a:hl to bc*2 bytes at de,
-; doubling each byte in the process.
-
- ld [hBuffer], a
+FarCopyBytesDouble:: ; ddd (0:0ddd)
+ ld [wBuffer], a
ld a, [hROMBank]
push af
- ld a, [hBuffer]
+ ld a, [wBuffer]
rst Bankswitch
-
-; switcheroo, de <> hl
ld a, h
ld h, d
ld d, a
ld a, l
ld l, e
ld e, a
-
inc b
inc c
- jr .dec
+ jr .enter_loop
-.loop
+.copy
ld a, [de]
inc de
-rept 2
ld [hli], a
-endr
-.dec
+ ld [hli], a
+.enter_loop
dec c
- jr nz, .loop
+ jr nz, .copy
dec b
- jr nz, .loop
-
+ jr nz, .copy
pop af
rst Bankswitch
ret
-; 0xeba
-
-Request2bpp:: ; eba
-; Load 2bpp at b:de to occupy c tiles of hl.
+Request2bpp:: ; dfe (0:0dfe)
ld a, [hBGMapMode]
push af
xor a
ld [hBGMapMode], a
-
ld a, [hROMBank]
push af
ld a, b
rst Bankswitch
-
- ld a, [hTilesPerCycle]
- push af
- ld a, $8
- ld [hTilesPerCycle], a
-
- ld a, [wLinkMode]
- cp LINK_MOBILE
- jr nz, .NotMobile
- ld a, [hMobile]
- and a
- jr nz, .NotMobile
- ld a, $6
- ld [hTilesPerCycle], a
-
-.NotMobile
ld a, e
- ld [Requested2bppSource], a
+ ld [wRequested2bppSource], a
ld a, d
- ld [Requested2bppSource + 1], a
+ ld [wRequested2bppSource + 1], a
ld a, l
- ld [Requested2bppDest], a
+ ld [wRequested2bppDest], a
ld a, h
- ld [Requested2bppDest + 1], a
-.loop
+ ld [wRequested2bppDest + 1], a
+.check
ld a, c
- ld hl, hTilesPerCycle
- cp [hl]
- jr nc, .iterate
-
- ld [Requested2bpp], a
-.wait
+ cp $8 ; TilesPerCycle
+ jr nc, .cycle
+ ld [wRequested2bpp], a
call DelayFrame
- ld a, [Requested2bpp]
- and a
- jr nz, .wait
-
- pop af
- ld [hTilesPerCycle], a
-
pop af
rst Bankswitch
-
pop af
ld [hBGMapMode], a
ret
-.iterate
- ld a, [hTilesPerCycle]
- ld [Requested2bpp], a
-
-.wait2
+.cycle
+ ld a, $8 ; TilesPerCycle
+ ld [wRequested2bpp], a
call DelayFrame
- ld a, [Requested2bpp]
- and a
- jr nz, .wait2
-
ld a, c
- ld hl, hTilesPerCycle
- sub [hl]
+ sub $8 ; TilesPerCycle
ld c, a
- jr .loop
-; f1e
-
+ jr .check
-Request1bpp:: ; f1e
-; Load 1bpp at b:de to occupy c tiles of hl.
+Request1bpp:: ; e38 (0:0e38)
ld a, [hBGMapMode]
push af
xor a
ld [hBGMapMode], a
-
ld a, [hROMBank]
push af
ld a, b
rst Bankswitch
-
- ld a, [hTilesPerCycle]
- push af
-
- ld a, $8
- ld [hTilesPerCycle], a
- ld a, [wLinkMode]
- cp LINK_MOBILE
- jr nz, .NotMobile
- ld a, [hMobile]
- and a
- jr nz, .NotMobile
- ld a, $6
- ld [hTilesPerCycle], a
-
-.NotMobile
ld a, e
- ld [Requested1bppSource], a
+ ld [wRequested1bppSource], a
ld a, d
- ld [Requested1bppSource + 1], a
+ ld [wRequested1bppSource + 1], a
ld a, l
- ld [Requested1bppDest], a
+ ld [wRequested1bppDest], a
ld a, h
- ld [Requested1bppDest + 1], a
-.loop
+ ld [wRequested1bppDest + 1], a
+.check
ld a, c
- ld hl, hTilesPerCycle
- cp [hl]
- jr nc, .iterate
-
- ld [Requested1bpp], a
-.wait
+ cp $8 ; TilesPerCycle
+ jr nc, .cycle
+ ld [wRequested1bpp], a
call DelayFrame
- ld a, [Requested1bpp]
- and a
- jr nz, .wait
-
- pop af
- ld [hTilesPerCycle], a
-
pop af
rst Bankswitch
-
pop af
ld [hBGMapMode], a
ret
-.iterate
- ld a, [hTilesPerCycle]
- ld [Requested1bpp], a
-
-.wait2
+.cycle
+ ld a, $8 ; TilesPerCycle
+ ld [wRequested1bpp], a
call DelayFrame
- ld a, [Requested1bpp]
- and a
- jr nz, .wait2
-
ld a, c
- ld hl, hTilesPerCycle
- sub [hl]
+ sub $8 ; TilesPerCycle
ld c, a
- jr .loop
-; f82
-
+ jr .check
-Get2bpp:: ; f82
+Get2bpp::
ld a, [rLCDC]
bit 7, a
jp nz, Request2bpp
-
-Copy2bpp:: ; f89
-; copy c 2bpp tiles from b:de to hl
-
+Copy2bpp::
push hl
ld h, d
ld l, e
pop de
-
-; bank
ld a, b
-
-; bc = c * $10
push af
swap c
ld a, $f
@@ -398,37 +194,45 @@ Copy2bpp:: ; f89
and c
ld c, a
pop af
-
jp FarCopyBytes
-; f9d
-
-Get1bpp:: ; f9d
+Get1bpp::
ld a, [rLCDC]
bit 7, a
jp nz, Request1bpp
-
-Copy1bpp:: ; fa4
-; copy c 1bpp tiles from b:de to hl
-
+Copy1bpp::
push de
ld d, h
ld e, l
-
-; bank
ld a, b
-
-; bc = c * $10 / 2
push af
- ld h, 0
+ ld h, $0
ld l, c
-rept 3
add hl, hl
-endr
+ add hl, hl
+ add hl, hl
ld b, h
ld c, l
pop af
-
pop hl
jp FarCopyBytesDouble
-; fb6
+
+Functionea6::
+ ld a, [rLCDC]
+ add a
+ jp c, Request2bpp
+Functioneac::
+ push de
+ push hl
+ ld a, b
+ ld h, $0
+ ld l, c
+ add hl, hl
+ add hl, hl
+ add hl, hl
+ add hl, hl
+ ld b, h
+ ld c, l
+ pop de
+ pop hl
+ jp FarCopyBytes
diff --git a/home/decompress.asm b/home/decompress.asm
index 13613f64..11283966 100644
--- a/home/decompress.asm
+++ b/home/decompress.asm
@@ -16,7 +16,7 @@ FarDecompress:: ; b40
Decompress:: ; b50
-; Pokemon Crystal uses an lz variant for compression.
+; Pokemon Gold and Silver use an lz variant for compression.
; This is mainly (but not necessarily) used for graphics.
; This function decompresses lz-compressed data from hl to de.
diff --git a/home/joypad.asm b/home/joypad.asm
index de2c792f..7fd92fb4 100644
--- a/home/joypad.asm
+++ b/home/joypad.asm
@@ -197,7 +197,7 @@ WaitButton::
push af
ld a, $1
ld [hOAMUpdate], a
- call Function344c
+ call WaitBGMap
call JoyWaitAorB
pop af
ld [hOAMUpdate], a
@@ -271,7 +271,7 @@ ButtonSound::
call JoyWaitInput
push de
ld de, SFX_READ_TEXT_2
- call PlaySound
+ call PlaySFX
pop de
ret
diff --git a/home/palettes.asm b/home/palettes.asm
index 961327d5..384df17b 100644
--- a/home/palettes.asm
+++ b/home/palettes.asm
@@ -181,7 +181,7 @@ ClearVBank1::
Functiond2a::
ld hl, wTileMap
- ld de, wccd9
+ ld de, wAttrMap
ld bc, SCREEN_WIDTH * SCREEN_HEIGHT
.asm_d33
ld a, [hli]
diff --git a/home/text.asm b/home/text.asm
index e3dacb47..8be33fd9 100644
--- a/home/text.asm
+++ b/home/text.asm
@@ -10,80 +10,56 @@ TEXTBOX_INNERY EQU TEXTBOX_Y + 2
TEXTBOX_PAL EQU 7
-
-ClearBox:: ; fb6
-; Fill a c*b box at hl with blank tiles.
-
- ld a, " "
-
+ClearBox:: ; ebd (0:0ebd)
+ ld a, $7f
FillBoxWithByte::
+ ld de, SCREEN_WIDTH
.row
- push bc
push hl
+ push bc
.col
ld [hli], a
dec c
jr nz, .col
- pop hl
- ld bc, SCREEN_WIDTH
- add hl, bc
pop bc
+ pop hl
+ add hl, de
dec b
jr nz, .row
ret
-; fc8
-
-ClearTileMap:: ; fc8
-; Fill TileMap with blank tiles.
-
- hlcoord 0, 0
- ld a, " "
- ld bc, TileMapEnd - TileMap
+ClearTileMap::
+ ld hl, wTileMap
+ ld a, $7f
+ ld bc, SCREEN_WIDTH * SCREEN_HEIGHT
call ByteFill
-
- ; Update the BG Map.
ld a, [rLCDC]
bit 7, a
ret z
jp WaitBGMap
-; fdb
-
-ClearScreen:: ; fdb
- ld a, TEXTBOX_PAL
- hlcoord 0, 0, AttrMap
+FillScreenWithTextboxPal::
+ ld a, $7
+ hlcoord 0, 0, wAttrMap
ld bc, SCREEN_WIDTH * SCREEN_HEIGHT
call ByteFill
jr ClearTileMap
-; fe8
-
-
-TextBox:: ; fe8
-; Draw a text box at hl with room for
-; b lines of c characters each.
-; Places a border around the textbox,
-; then switches the palette to the
-; text black-and-white scheme.
+TextBox:: ; eef (0:0eef)
push bc
push hl
call TextBoxBorder
pop hl
pop bc
jr TextBoxPalette
-; ff1
-
-TextBoxBorder:: ; ff1
-
- ; Top
+TextBoxBorder:: ; ef8 (0:0ef8)
push hl
ld a, "┌"
ld [hli], a
- inc a ; "─"
- call .PlaceChars
- inc a ; "┐"
+ inc a
+ call TextBoxBorder_PlaceTiles
+ inc a
ld [hl], a
pop hl
@@ -95,7 +71,7 @@ TextBoxBorder:: ; ff1
ld a, "│"
ld [hli], a
ld a, " "
- call .PlaceChars
+ call TextBoxBorder_PlaceTiles
ld [hl], "│"
pop hl
@@ -108,33 +84,25 @@ TextBoxBorder:: ; ff1
ld a, "└"
ld [hli], a
ld a, "─"
- call .PlaceChars
+ call TextBoxBorder_PlaceTiles
ld [hl], "┘"
-
ret
-; 101e
-.PlaceChars: ; 101e
-; Place char a c times.
+TextBoxBorder_PlaceTiles:: ; f25 (0:0f25)
ld d, c
.loop
ld [hli], a
dec d
jr nz, .loop
ret
-; 1024
-
-TextBoxPalette:: ; 1024
-; Fill text box width c height b at hl with pal 7
- ld de, AttrMap - TileMap
+TextBoxPalette
+ ld de, wAttrMap - wTileMap
add hl, de
-rept 2
inc b
-endr
-rept 2
+ inc b
+ inc c
inc c
-endr
ld a, TEXTBOX_PAL
.col
push bc
@@ -150,58 +118,41 @@ endr
dec b
jr nz, .col
ret
-; 103e
-
-SpeechTextBox:: ; 103e
-; Standard textbox.
- hlcoord TEXTBOX_X, TEXTBOX_Y
- ld b, TEXTBOX_INNERH
- ld c, TEXTBOX_INNERW
+SpeechTextBox:: ; f45 (0:0f45)
+ hlcoord 0, 12
+ ld b, $4
+ ld c, $12
jp TextBox
-; 1048
-TestText:: ; 1048
+TestText::
text "ゲームフりーク!"
done
-; 1052
RadioTerminator:: ; 1052
ld hl, .stop
ret
-.stop db "@"
-; 1057
+.stop db "@"
-PrintText:: ; 1057
+PrintText::
call SetUpTextBox
-BuenaPrintText:: ; 105a
- push hl
- hlcoord TEXTBOX_INNERX, TEXTBOX_INNERY
- lb bc, TEXTBOX_INNERH - 1, TEXTBOX_INNERW
- call ClearBox
- pop hl
-
-PrintTextBoxText:: ; 1065
- bccoord TEXTBOX_INNERX, TEXTBOX_INNERY
- call PlaceWholeStringInBoxAtOnce
+ bccoord 1, 14
+ call PlaceHLTextAtBC
ret
-; 106c
-SetUpTextBox:: ; 106c
+SetUpTextBox:: ; f68 (0:0f68)
push hl
call SpeechTextBox
call UpdateSprites
call ApplyTilemap
pop hl
ret
-; 1078
-
-PlaceString:: ; 1078
+PlaceString:: ; f74 (0:0f74)
push hl
-PlaceNextChar:: ; 1079
+PlaceNextChar:: ; f75 (0:0f75)
ld a, [de]
cp "@"
jr nz, CheckDict
@@ -209,13 +160,13 @@ PlaceNextChar:: ; 1079
ld c, l
pop hl
ret
- pop de
-NextChar:: ; 1083
+ pop de
+NextChar:: ; f7f (0:0f7f)
inc de
jp PlaceNextChar
-CheckDict:: ; 1087
+CheckDict
dict: macro
if \1 == 0
and a
@@ -226,29 +177,14 @@ endc
endm
dict2: macro
-if \1 == 0
- and a
-else
cp \1
-endc
- jr nz, \@
+ jr nz, ._\@
ld a, \2
-\@:
-endm
-
-dict3: macro
-if \1 == 0
- and a
-else
- cp \1
-endc
- jr z, \2
+._\@:
endm
- dict "<DAY>", Char15
dict "<LINE>", LineChar
dict "<NEXT>", NextLineChar
- dict TX_FAR, TextFar
dict $00, NullChar
dict $4c, Char4C
dict $4b, Char4B
@@ -267,7 +203,7 @@ endm
dict "<TM>", TMChar
dict "<TRNER>", TrainerChar
dict $23, PlaceKougeki
- dict "<LNBRK>", Char22
+ dict "<LNBRK>", HalfLineChar
dict "<CONT>", ContText
dict "<......>", SixDotsChar
dict "<DONE>", DoneText
@@ -280,60 +216,48 @@ endm
dict "<TARGET>", PlaceMoveTargetsName
dict "<USER>", PlaceMoveUsersName
dict "<ENEMY>", PlaceEnemysName
- dict "<PLAY_G>", PlaceGenderedPlayerName
- dict3 $e4, .place
- dict3 $e5, .place
- jr .nope
+ cp $e4
+ jr z, .diacritic
+ cp $e5
+ jr nz, .not_diacritic
+.diacritic
ld b, a
call Diacritic
jp NextChar
-.nope
+.not_diacritic
cp $60
jr nc, .place
-
cp $40
jr nc, .handakuten
-
-.dakuten
-
cp $20
jr nc, .daku1
add $80
jr .daku2
+
.daku1
add $90
.daku2
- ld b, $e5 ; dakuten
+ ld b, $e5
call Diacritic
jr .place
.handakuten
- cp "ぱ"
+ cp $44
jr nc, .han1
- add "ハ" - "パ"
+ add $59
jr .han2
+
.han1
- add "は" - "ぱ"
+ add $86
.han2
- ld b, $e4 ; handakuten
+ ld b, $e4
call Diacritic
-
.place
ld [hli], a
- call PrintLetterDelay
+ call Function31e2
jp NextChar
-; 0x117b
-
-
-Char15:: ; 117b
- ld c, l
- ld b, h
- callba Function17f036
- jp PlaceNextChar
-; 1186
-
print_name: macro
push de
@@ -341,244 +265,185 @@ print_name: macro
jp PlaceCommandCharacter
endm
-PrintMomsName: print_name MomsName ; 1186
-PrintPlayerName: print_name PlayerName ; 118d
-PrintRivalName: print_name RivalName ; 1194
-PrintRedsName: print_name RedsName ; 119b
-PrintGreensName: print_name GreensName ; 11a2
-
-TrainerChar: print_name TrainerCharText ; 11a9
-TMChar: print_name TMCharText ; 11b0
-PCChar: print_name PCCharText ; 11b7
-RocketChar: print_name RocketCharText ; 11be
-PlacePOKe: print_name PlacePOKeText ; 11c5
-PlaceKougeki: print_name KougekiText ; 11cc
-SixDotsChar: print_name SixDotsCharText ; 11d3
-PlacePKMN: print_name PlacePKMNText ; 11da
-PlacePOKE: print_name PlacePOKEText ; 11e1
-Char35: print_name Char35Text ; 11e8
-Char36: print_name Char36Text ; 11ef
-Char37: print_name Char37Text ; 11f6
-
-
-PlaceMoveTargetsName:: ; 11fd
+PrintMomsName:: print_name wMomsName ; 1066 (0:1066)
+PrintPlayerName:: print_name wPlayersName ; 106d (0:106d)
+PrintRivalName:: print_name wRivalsName ; 1074 (0:1074)
+PrintRedsName:: print_name wRedsName ; 107b (0:107b)
+PrintGreensName:: print_name wGreensName ; 1082 (0:1082)
+
+TrainerChar:: print_name TrainerCharText ; 1089 (0:1089)
+TMChar:: print_name TMCharText ; 1090 (0:1090)
+PCChar:: print_name PCCharText ; 1097 (0:1097)
+RocketChar:: print_name RocketCharText ; 109e (0:109e)
+PlacePOKe:: print_name POKeCharText ; 10a5 (0:10a5)
+PlaceKougeki:: print_name KougekiText ; 10ac (0:10ac)
+SixDotsChar:: print_name SixDotsCharText ; 10b3 (0:10b3)
+PlacePKMN:: print_name PKMNText ; 10ba (0:10ba)
+PlacePOKE:: print_name POKEText ; 10c1 (0:10c1)
+Char35:: print_name Char35Text ; 10c8 (0:10c8)
+Char36:: print_name Char36Text ; 10cf (0:10cf)
+Char37:: print_name Char37Text ; 10d6 (0:10d6)
+
+PlaceMoveTargetsName:: ; 10dd (0:10dd)
ld a, [hBattleTurn]
- xor 1
- jr PlaceMoveTargetsName_5A
+ xor $1
+ jr PlaceMonsName
-PlaceMoveUsersName:: ; 1203
+PlaceMoveUsersName:: ; 10e3 (0:10e3)
ld a, [hBattleTurn]
-
-PlaceMoveTargetsName_5A: ; 1205
+PlaceMonsName::
push de
and a
jr nz, .enemy
-
- ld de, BattleMonNick
+ ld de, wBattleMonNick
jr PlaceCommandCharacter
.enemy
- ld de, EnemyText ; Enemy
+ ld de, EnemyText
call PlaceString
ld h, b
ld l, c
- ld de, EnemyMonNick
+ ld de, wEnemyMonNick
jr PlaceCommandCharacter
-
-PlaceEnemysName:: ; 121b
+PlaceEnemysName:: ; 10fb (0:10fb)
push de
-
ld a, [wLinkMode]
and a
jr nz, .linkbattle
-
- ld a, [TrainerClass]
+ ld a, [wTrainerClass]
cp RIVAL1
jr z, .rival
cp RIVAL2
jr z, .rival
-
- ld de, OTClassName
+ ld de, wOTClassName
call PlaceString
ld h, b
ld l, c
- ld de, String12a2
+ ld de, String116a
call PlaceString
+
push bc
callab Battle_GetTrainerName
pop hl
- ld de, StringBuffer1
+
+ ld de, wStringBuffer1
jr PlaceCommandCharacter
.rival
- ld de, RivalName
+ ld de, wRivalsName
jr PlaceCommandCharacter
.linkbattle
- ld de, OTClassName
+ ld de, wOTClassName
jr PlaceCommandCharacter
-
-PlaceGenderedPlayerName:: ; 1252
- push de
- ld de, PlayerName
- call PlaceString
- ld h, b
- ld l, c
- ld a, [PlayerGender]
- bit 0, a
- ld de, String_kun
- jr z, PlaceCommandCharacter
- ld de, String_chan
- jr PlaceCommandCharacter
-
-
-PlaceCommandCharacter:: ; 126a
+PlaceCommandCharacter:: ; 1132 (0:1132)
call PlaceString
ld h, b
ld l, c
pop de
jp NextChar
-; 0x1273
-
-TMCharText:: db "TM@" ; 1273
-TrainerCharText:: db "TRAINER@" ; 1276
-PCCharText:: db "PC@" ; 127e
-RocketCharText:: db "ROCKET@" ; 1281
-PlacePOKeText:: db "POKé@" ; 1288
-KougekiText:: db "こうげき@" ; 128d
-SixDotsCharText:: db "……@" ; 1292
-EnemyText:: db "Enemy @" ; 1295
-PlacePKMNText:: db "<PK><MN>@" ; PK MN ; 129c
-PlacePOKEText:: db "<PO><KE>@" ; PO KE ; 129f
-String12a2:: db " @" ; 12a2
-Char35Text::
-Char36Text::
-Char37Text:: db "@" ; 12a4
-String_kun:: db "@" ; 12a5
-String_chan:: db "@" ; 12a6
-; 12a7
-
-NextLineChar:: ; 12a7
+
+TMCharText:: ; 113b (0:113b)
+ db "TM@"
+
+TrainerCharText:: ; 113e (0:113e)
+ db "TRAINER@"
+
+PCCharText:: ; 1146 (0:1146)
+ db "PC@"
+
+RocketCharText:: ; 1149 (0:1149)
+ db "ROCKET@"
+
+POKeCharText:: ; 1150 (0:1150)
+ db "POKé@"
+
+KougekiText:: ; 1155 (0:1155)
+ db "こうげき@"
+
+SixDotsCharText:: ; 115a (0:115a)
+ db "……@"
+
+EnemyText:: ; 115d (0:115d)
+ db "Enemy @"
+
+PKMNText:: ; 1164 (0:1164)
+ db "<PK><MN>@"
+
+POKEText:: ; 1167 (0:1167)
+ db "<PO><KE>@"
+
+String116a:: ; 116a (0:116a)
+ db " @"
+
+Char35Text:: ; 116c (0:116c)
+Char36Text:: ; 116c (0:116c)
+Char37Text:: ; 116c (0:116c)
+ db "@"
+
+NextLineChar:: ; 116d (0:116d)
pop hl
ld bc, SCREEN_WIDTH * 2
add hl, bc
push hl
jp NextChar
-; 12b0
-Char22:: ; 12b0
+HalfLineChar:: ; 1176 (0:1176)
pop hl
ld bc, SCREEN_WIDTH
add hl, bc
push hl
jp NextChar
-; 12b9
-
-TextFar:: ; 12b9
- pop hl
- push de
- ld bc, -TileMap + $10000
- add hl, bc
- ld de, -SCREEN_WIDTH
- ld c, 1
-.loop
- ld a, h
- and a
- jr nz, .next
- ld a, l
- cp SCREEN_WIDTH
- jr c, .done
-
-.next
- add hl, de
- inc c
- jr .loop
-
-.done
- hlcoord 0, 0
- ld de, SCREEN_WIDTH
- ld a, c
-.loop2
- and a
- jr z, .done2
- add hl, de
- dec a
- jr .loop2
-
-.done2
- pop de
- inc de
- ld a, [de]
- ld c, a
- ld b, 0
- add hl, bc
- push hl
- jp NextChar
-; 12ea
-
-LineChar:: ; 12ea
+LineChar:: ; 117f (0:117f)
pop hl
- hlcoord TEXTBOX_INNERX, TEXTBOX_INNERY + 2
+ hlcoord 1, 16
push hl
jp NextChar
-; 0x12f2
-Paragraph:: ; 12f2
+Paragraph:: ; 1187 (0:1187)
push de
-
ld a, [wLinkMode]
- cp LINK_COLOSSEUM
- jr z, .linkbattle
- cp LINK_MOBILE
- jr z, .linkbattle
+ cp $3
+ jr z, .asm_1192
call LoadBlinkingCursor
-
-.linkbattle
- call Function13b6
+.asm_1192
+ call Text_WaitBGMap
call ButtonSound
- hlcoord TEXTBOX_INNERX, TEXTBOX_INNERY
- lb bc, TEXTBOX_INNERH - 1, TEXTBOX_INNERW
+ hlcoord 1, 14
+ lb bc, 3, 18
call ClearBox
call UnloadBlinkingCursor
ld c, 20
call DelayFrames
- hlcoord TEXTBOX_INNERX, TEXTBOX_INNERY
+ hlcoord 1, 14
pop de
jp NextChar
-; 131f
-
-Char4B:: ; 131f
+Char4B:: ; 11b0 (0:11b0)
ld a, [wLinkMode]
or a
- jr nz, .communication
+ jr nz, .link_battle
call LoadBlinkingCursor
-
-.communication
- call Function13b6
-
+.link_battle
+ call Text_WaitBGMap
push de
call ButtonSound
pop de
-
ld a, [wLinkMode]
or a
call z, UnloadBlinkingCursor
-
-Char4C:: ; 1337
+Char4C:: ; 11c8 (0:11c8)
push de
call TextScroll
call TextScroll
- hlcoord TEXTBOX_INNERX, TEXTBOX_INNERY + 2
+ hlcoord 1, 16
pop de
jp NextChar
-; 1345
-
-ContText:: ; 1345
+ContText:: ; 11d6 (0:11d6)
push de
ld de, .cont
ld b, h
@@ -590,179 +455,146 @@ ContText:: ; 1345
jp NextChar
.cont db $4b, "@"
-; 1356
-
-PlaceDexEnd:: ; 1356
-; Legacy: ends a Pokédex entry (Red).
-; Dex entries are now regular strings.
+PlaceDexEnd:: ; 11e7 (0:11e7)
ld [hl], "."
pop hl
ret
-; 135a
-PromptText:: ; 135a
+PromptText:: ; 11eb (0:11eb)
ld a, [wLinkMode]
cp LINK_COLOSSEUM
jr z, .ok
- cp LINK_MOBILE
- jr z, .ok
call LoadBlinkingCursor
.ok
- call Function13b6
+ call Text_WaitBGMap
call ButtonSound
ld a, [wLinkMode]
- cp LINK_COLOSSEUM
- jr z, DoneText
- cp LINK_MOBILE
+ cp $3
jr z, DoneText
call UnloadBlinkingCursor
-DoneText:: ; 137c
+DoneText:: ; 1205 (0:1205)
pop hl
ld de, .stop
dec de
ret
-.stop db "@"
-; 1383
-
-NullChar:: ; 1383
- ld a, "?"
- ld [hli], a
- call PrintLetterDelay
- jp NextChar
-; 138c
-
-TextScroll:: ; 138c
- hlcoord TEXTBOX_INNERX, TEXTBOX_INNERY
- decoord TEXTBOX_INNERX, TEXTBOX_INNERY - 1
- ld a, TEXTBOX_INNERH - 1
-.col
- push af
- ld c, TEXTBOX_INNERW
+.stop db "@"
-.row
- ld a, [hli]
- ld [de], a
- inc de
- dec c
- jr nz, .row
+NullChar:: ; 120c (0:120c)
+ ld b, h
+ ld c, l
+ pop hl
+ ld de, .ErrorText
+ dec de
+ ret
-rept 2
- inc de
-endr
-rept 2
- inc hl
-endr
- pop af
- dec a
- jr nz, .col
+.ErrorText
+ deciram hObjectStructIndexBuffer, 1, 2
+ text "エラー"
+ done
- hlcoord TEXTBOX_INNERX, TEXTBOX_INNERY + 2
+TextScroll:: ; 121d (0:121d)
+ hlcoord 0, 14
+ decoord 0, 13
+ ld bc, 3 * SCREEN_WIDTH
+ call CopyBytes
+ hlcoord 1, 16
ld a, " "
- ld bc, TEXTBOX_INNERW
+ ld bc, 18
call ByteFill
ld c, 5
call DelayFrames
ret
-; 13b6
-Function13b6:: ; 13b6
+Text_WaitBGMap:: ; 123a (0:123a)
push bc
ld a, [hOAMUpdate]
push af
- ld a, 1
+ ld a, $1
ld [hOAMUpdate], a
-
call WaitBGMap
-
pop af
ld [hOAMUpdate], a
pop bc
ret
-; 13c6
-Diacritic:: ; 13c6
+Diacritic:: ; 124a (0:124a)
+ push af
+ push hl
+ ld a, b
+ ld bc, -SCREEN_WIDTH
+ add hl, bc
+ ld [hl], a
+ pop hl
+ pop af
ret
-; 13c7
-LoadBlinkingCursor:: ; 13c7
+LoadBlinkingCursor:: ; 1255 (0:1255)
ld a, "▼"
- ldcoord_a 18, 17
+ Coorda 18, 17
ret
-; 13cd
-UnloadBlinkingCursor:: ; 13cd
- lda_coord 17, 17
- ldcoord_a 18, 17
+UnloadBlinkingCursor:: ; 125b (0:125b)
+ ld a, "─"
+ Coorda 18, 17
ret
-; 13d4
-FarString:: ; 13d4
+FarString::
ld b, a
ld a, [hROMBank]
push af
-
ld a, b
rst Bankswitch
call PlaceString
-
pop af
rst Bankswitch
ret
-; 13e0
-PokeFluteTerminatorCharacter:: ; 13e0
+PokeFluteTerminatorCharacter::
ld hl, .stop
ret
.stop db "@"
-; 13e5
-
-PlaceWholeStringInBoxAtOnce:: ; 13e5
- ld a, [TextBoxFlags]
+PlaceHLTextAtBC:: ; 1272 (0:1272)
+ ld a, [wTextBoxFlags]
push af
set 1, a
- ld [TextBoxFlags], a
+ ld [wTextBoxFlags], a
call DoTextUntilTerminator
pop af
- ld [TextBoxFlags], a
+ ld [wTextBoxFlags], a
ret
-; 13f6
-DoTextUntilTerminator:: ; 13f6
+DoTextUntilTerminator:: ; 1283 (0:1283)
ld a, [hli]
cp "@"
ret z
- call .TextCommand
+ call TextCommand
jr DoTextUntilTerminator
-.TextCommand:
+TextCommand:: ; 128c (0:128c)
push hl
push bc
ld c, a
- ld b, 0
+ ld b, $0
ld hl, TextCommands
-rept 2
add hl, bc
-endr
+ add hl, bc
ld e, [hl]
inc hl
ld d, [hl]
pop bc
pop hl
-
- ; jp de
push de
ret
-; 1410
-TextCommands:: ; 1410
+TextCommands:: ; 129d (0:129d)
dw Text_TX
dw Text_TX_RAM
dw Text_TX_BCD
@@ -771,28 +603,23 @@ TextCommands:: ; 1410
dw Text_TX_LOW
dw Text_WAIT_BUTTON
dw Text_TX_SCROLL
- dw Text_START_ASM
+ dw Text_TX_ASM
dw Text_TX_NUM
dw Text_TX_EXIT
- dw Text_PlaySound ; $0b
+ dw Text_TX_SFX
dw Text_TX_DOTS
- dw Text_0D
- dw Text_PlaySound ; $0e
- dw Text_PlaySound ; $0f
- dw Text_PlaySound ; $10
- dw Text_PlaySound ; $11
- dw Text_PlaySound ; $12
- dw Text_PlaySound ; $13
- dw Text_TX_STRINGBUFFER
+ dw Text_TX_0D
+ dw Text_TX_SFX
+ dw Text_TX_SFX
+ dw Text_TX_SFX
+ dw Text_TX_SFX
+ dw Text_TX_SFX
+ dw Text_TX_SFX
+ dw Text_TX_BUFFER
dw Text_TX_DAY
dw Text_TX_FAR
-; 143e
-
-Text_TX:: ; 143e
-; TX
-; write text until "@"
-; [$00]["...@"]
+Text_TX:: ; 12cb (0:12cb)
ld d, h
ld e, l
ld h, b
@@ -802,14 +629,8 @@ Text_TX:: ; 143e
ld l, e
inc hl
ret
-; 1449
-
-Text_TX_RAM:: ; 1449
-; text_from_ram
-; write text from a ram address
-; little endian
-; [$01][addr]
+Text_TX_RAM:: ; 12d6 (0:12d6)
ld a, [hli]
ld e, a
ld a, [hli]
@@ -820,44 +641,28 @@ Text_TX_RAM:: ; 1449
call PlaceString
pop hl
ret
-; 1455
-
-Text_TX_FAR:: ; 1455
-; text_jump
-; write text from a different bank
-; little endian
-; [$16][addr][bank]
+Text_TX_FAR:: ; 12e2 (0:12e2)
ld a, [hROMBank]
push af
-
ld a, [hli]
ld e, a
ld a, [hli]
ld d, a
ld a, [hli]
-
ld [hROMBank], a
ld [MBC3RomBank], a
-
push hl
ld h, d
ld l, e
call DoTextUntilTerminator
pop hl
-
pop af
ld [hROMBank], a
ld [MBC3RomBank], a
ret
-; 1470
-
-Text_TX_BCD:: ; 1470
-; TX_BCD
-; write bcd from address, typically ram
-; [$02][addr][flags]
-; flags: see PrintBCDNumber
+Text_TX_BCD:: ; 12fd (0:12fd)
ld a, [hli]
ld e, a
ld a, [hli]
@@ -872,28 +677,17 @@ Text_TX_BCD:: ; 1470
ld c, l
pop hl
ret
-; 1480
-
-Text_TX_MOVE:: ; 1480
-; TX_MOVE
-; move to a new tile
-; [$03][addr]
+Text_TX_MOVE:: ; 130d (0:130d)
ld a, [hli]
- ld [wMenuScrollPosition + 2], a
+ ld [wcfd6], a
ld c, a
ld a, [hli]
- ld [wMenuScrollPosition + 2 + 1], a
+ ld [wcfd7], a
ld b, a
ret
-; 148b
-
-Text_TX_BOX:: ; 148b
-; TX_BOX
-; draw a box
-; little endian
-; [$04][addr][height][width]
+Text_TX_BOX:: ; 1318 (0:1318)
ld a, [hli]
ld e, a
ld a, [hli]
@@ -908,28 +702,15 @@ Text_TX_BOX:: ; 148b
call TextBox
pop hl
ret
-; 149b
-
-Text_TX_LOW:: ; 149b
-; TX_LOW
-; write text at (1,16)
-; [$05]
- bccoord TEXTBOX_INNERX, TEXTBOX_INNERY + 2
+Text_TX_LOW:: ; 1328 (0:1328)
+ bccoord 1, 16
ret
-; 149f
-
-Text_WAIT_BUTTON:: ; 149f
-; TX_WAITBUTTON
-; wait for button press
-; show arrow
-; [06]
+Text_WAIT_BUTTON:: ; 132c (0:132c)
ld a, [wLinkMode]
cp LINK_COLOSSEUM
- jp z, Text_0D
- cp LINK_MOBILE
- jp z, Text_0D
+ jp z, Text_TX_0D
push hl
call LoadBlinkingCursor
@@ -939,36 +720,20 @@ Text_WAIT_BUTTON:: ; 149f
call UnloadBlinkingCursor
pop hl
ret
-; 14ba
-Text_TX_SCROLL:: ; 14ba
-; pushes text up two lines and sets the BC cursor to the border tile
-; below the first character column of the text box.
+Text_TX_SCROLL:: ; 1342 (0:1342)
push hl
call UnloadBlinkingCursor
call TextScroll
call TextScroll
pop hl
- bccoord TEXTBOX_INNERX, TEXTBOX_INNERY + 2
+ bccoord 1, 16
ret
-; 14c9
-
-Text_START_ASM:: ; 14c9
-; TX_ASM
- bit 7, h
- jr nz, .not_rom
+Text_TX_ASM:: ; 1351 (0:1351)
jp [hl]
-.not_rom
- ld a, "@"
- ld [hl], a
- ret
-; 14d2
-
-Text_TX_NUM:: ; 14d2
-; TX_NUM
-; [$09][addr][hi:bytes lo:digits]
+Text_TX_NUM:: ; 1352 (0:1352)
ld a, [hli]
ld e, a
ld a, [hli]
@@ -983,35 +748,29 @@ Text_TX_NUM:: ; 14d2
ld a, b
and $f0
swap a
- set PRINTNUM_RIGHTALIGN_F, a
+ set 6, a
ld b, a
call PrintNum
ld b, h
ld c, l
pop hl
ret
-; 14ed
-Text_TX_EXIT:: ; 14ed
+Text_TX_EXIT:: ; 136d (0:136d)
push hl
push bc
call GetJoypad
ld a, [hJoyDown]
and A_BUTTON | B_BUTTON
- jr nz, .done
+ jr nz, .skip
ld c, 30
call DelayFrames
-.done
+.skip
pop bc
pop hl
ret
-; 1500
-
-Text_PlaySound:: ; 1500
-; chars:
-; $0b, $0e, $0f, $10, $11, $12, $13
-; see TextSFX
+Text_TX_SFX:: ; 1380 (0:1380)
push bc
dec hl
ld a, [hli]
@@ -1023,13 +782,12 @@ Text_PlaySound:: ; 1500
cp -1
jr z, .done
cp b
- jr z, .play
-rept 2
+ jr z, .sound
+ inc hl
inc hl
-endr
jr .loop
-.play
+.sound
push de
ld e, [hl]
inc hl
@@ -1037,14 +795,12 @@ endr
call PlaySFX
call WaitSFX
pop de
-
.done
pop hl
pop bc
ret
-; 1522
-Function1522:: ; 1522
+Text_TX_CRY
push de
ld e, [hl]
inc hl
@@ -1054,9 +810,8 @@ Function1522:: ; 1522
pop hl
pop bc
ret
-; 152d
-TextSFX:: ; 152d
+TextSFX:: ; 13ad (0:13ad)
dbw TX_SOUND_0B, SFX_DEX_FANFARE_50_79
dbw TX_SOUND_12, SFX_FANFARE
dbw TX_SOUND_0E, SFX_DEX_FANFARE_20_49
@@ -1065,16 +820,13 @@ TextSFX:: ; 152d
dbw TX_SOUND_11, SFX_DEX_FANFARE_80_109
dbw TX_SOUND_13, SFX_SLOT_MACHINE_START
db -1
-; 1543
-Text_TX_DOTS:: ; 1543
-; [$0C][num]
+Text_TX_DOTS:: ; 13c3 (0:13c3)
ld a, [hli]
ld d, a
push hl
ld h, b
ld l, c
-
.loop
push de
ld a, "…"
@@ -1089,43 +841,27 @@ Text_TX_DOTS:: ; 1543
pop de
dec d
jr nz, .loop
-
ld b, h
ld c, l
pop hl
ret
-; 1562
-Text_0D:: ; 1562
-; wait for key down
-; display arrow
+Text_TX_0D:: ; 13e2 (0:13e2)
push hl
push bc
call ButtonSound
pop bc
pop hl
ret
-; 156a
-
-Text_TX_STRINGBUFFER:: ; 156a
-; Print a string from one of the following:
-; 0: StringBuffer3
-; 1: StringBuffer4
-; 2: StringBuffer5
-; 3: StringBuffer2
-; 4: StringBuffer1
-; 5: EnemyMonNick
-; 6: BattleMonNick
-; [$14][id]
+Text_TX_BUFFER:: ; 13ea (0:13ea)
ld a, [hli]
push hl
ld e, a
- ld d, 0
+ ld d, $0
ld hl, StringBufferPointers
-rept 2
add hl, de
-endr
+ add hl, de
ld a, BANK(StringBufferPointers)
call GetFarHalfword
ld d, h
@@ -1135,20 +871,16 @@ endr
call PlaceString
pop hl
ret
-; 1582
-
-Text_TX_DAY:: ; 1582
-; TX_DAY
+Text_TX_DAY:: ; 1402 (0:1402)
call GetWeekday
push hl
push bc
ld c, a
- ld b, 0
+ ld b, $0
ld hl, .Days
-rept 2
add hl, bc
-endr
+ add hl, bc
ld a, [hli]
ld h, [hl]
ld l, a
@@ -1163,7 +895,7 @@ endr
pop hl
ret
-.Days ; 15a2
+.Days: ; 1422 (0:1422)
dw .Sun
dw .Mon
dw .Tues
@@ -1172,12 +904,11 @@ endr
dw .Fri
dw .Satur
-.Sun db "SUN@"
-.Mon db "MON@"
-.Tues db "TUES@"
-.Wednes db "WEDNES@"
-.Thurs db "THURS@"
-.Fri db "FRI@"
-.Satur db "SATUR@"
-.Day db "DAY@"
-; 15d8
+.Sun: db "SUN@"
+.Mon: db "MON@"
+.Tues: db "TUES@"
+.Wednes: db "WEDNES@"
+.Thurs: db "THURS@"
+.Fri: db "FRI@"
+.Satur: db "SATUR@"
+.Day: db "DAY@"
diff --git a/main.asm b/main.asm
index 5acf2dd7..d43ef0e7 100644
--- a/main.asm
+++ b/main.asm
@@ -38,7 +38,9 @@ Function14032:: ; 14032
StartClock:: ; 14089
dr $14089, $140ff
Function140ff:: ; 140ff
- dr $140ff, $18000
+ dr $140ff, $1413c
+Function1413c:: ; 413c
+ dr $1413c, $18000
SECTION "bank6", DATA, BANK[$6]
dr $18000, $1c000
@@ -50,6 +52,7 @@ SECTION "bank8", DATA, BANK[$8]
dr $20000, $24000
SECTION "bank9", DATA, BANK[$9]
+StringBufferPointers::
dr $24000, $28000
SECTION "banka", DATA, BANK[$a]
@@ -65,7 +68,10 @@ SECTION "bankd", DATA, BANK[$d]
dr $34000, $38000
SECTION "banke", DATA, BANK[$e]
- dr $38000, $3c000
+ dr $38000, $398f2
+
+Battle_GetTrainerName:: ; 398f2
+ dr $398f2, $3c000
SECTION "bankf", DATA, BANK[$f]
dr $3c000, $40000
@@ -218,7 +224,12 @@ SECTION "bank3d", DATA, BANK[$3d]
dr $f4000, $f8000
SECTION "bank3e", DATA, BANK[$3e]
- dr $f8000, $fc000
+Functionf8000::
+ dr $f8000, $f800c
+Functionf800c::
+ dr $f800c, $f8032
+Functionf8032::
+ dr $f8032, $fc000
SECTION "bank3f", DATA, BANK[$3f]
dr $fc000, $100000
diff --git a/wram.asm b/wram.asm
index b45da878..35cd76b5 100644
--- a/wram.asm
+++ b/wram.asm
@@ -199,6 +199,7 @@ wOAMBuffer:: ; c300
SECTION "TileMap", WRAM0
wTileMap:: ; c3a0
ds SCREEN_HEIGHT * SCREEN_WIDTH
+wTileMapEnd:: ; c508
SECTION "Animated Objects", WRAM0
wTileMapBackup:: ; c508
@@ -1566,28 +1567,10 @@ wcaf2:: ds 1 ; caf2
wcaf3:: ds 1 ; caf3
wcaf4:: ds 1 ; caf4
wcaf5:: ds 1 ; caf5
-wcaf6:: ds 1 ; caf6
-wcaf7:: ds 1 ; caf7
-wcaf8:: ds 1 ; caf8
-wcaf9:: ds 1 ; caf9
-wcafa:: ds 1 ; cafa
-wcafb:: ds 1 ; cafb
-wcafc:: ds 1 ; cafc
-wcafd:: ds 1 ; cafd
-wcafe:: ds 1 ; cafe
-wcaff:: ds 1 ; caff
-wcb00:: ds 1 ; cb00
-wcb01:: ds 1 ; cb01
-wcb02:: ds 1 ; cb02
-wcb03:: ds 1 ; cb03
-wcb04:: ds 1 ; cb04
-wcb05:: ds 1 ; cb05
-wcb06:: ds 1 ; cb06
-wcb07:: ds 1 ; cb07
-wcb08:: ds 1 ; cb08
-wcb09:: ds 1 ; cb09
-wcb0a:: ds 1 ; cb0a
-wcb0b:: ds 1 ; cb0b
+
+wEnemyMonNick:: ds PKMN_NAME_LENGTH ; caf6
+wBattleMonNick:: ds PKMN_NAME_LENGTH ; cb01
+
wcb0c:: ds 1 ; cb0c
wcb0d:: ds 1 ; cb0d
wcb0e:: ds 1 ; cb0e
@@ -1628,17 +1611,9 @@ wcb30:: ds 1 ; cb30
wcb31:: ds 1 ; cb31
wcb32:: ds 1 ; cb32
wcb33:: ds 1 ; cb33
-wcb34:: ds 1 ; cb34
-wcb35:: ds 1 ; cb35
-wcb36:: ds 1 ; cb36
-wcb37:: ds 1 ; cb37
-wcb38:: ds 1 ; cb38
-wcb39:: ds 1 ; cb39
-wcb3a:: ds 1 ; cb3a
-wcb3b:: ds 1 ; cb3b
-wcb3c:: ds 1 ; cb3c
-wcb3d:: ds 1 ; cb3d
-wcb3e:: ds 1 ; cb3e
+
+wOTClassName:: ds NAME_LENGTH ; cb34
+
wcb3f:: ds 1 ; cb3f
wcb40:: ds 1 ; cb40
wcb41:: ds 1 ; cb41
@@ -2049,366 +2024,11 @@ wccd5:: ds 1 ; ccd5
wccd6:: ds 1 ; ccd6
wccd7:: ds 1 ; ccd7
wccd8:: ds 1 ; ccd8
-wccd9:: ds 1 ; ccd9
-wccda:: ds 1 ; ccda
-wccdb:: ds 1 ; ccdb
-wccdc:: ds 1 ; ccdc
-wccdd:: ds 1 ; ccdd
-wccde:: ds 1 ; ccde
-wccdf:: ds 1 ; ccdf
-wcce0:: ds 1 ; cce0
-wcce1:: ds 1 ; cce1
-wcce2:: ds 1 ; cce2
-wcce3:: ds 1 ; cce3
-wcce4:: ds 1 ; cce4
-wcce5:: ds 1 ; cce5
-wcce6:: ds 1 ; cce6
-wcce7:: ds 1 ; cce7
-wcce8:: ds 1 ; cce8
-wcce9:: ds 1 ; cce9
-wccea:: ds 1 ; ccea
-wcceb:: ds 1 ; cceb
-wccec:: ds 1 ; ccec
-wcced:: ds 1 ; cced
-wccee:: ds 1 ; ccee
-wccef:: ds 1 ; ccef
-wccf0:: ds 1 ; ccf0
-wccf1:: ds 1 ; ccf1
-wccf2:: ds 1 ; ccf2
-wccf3:: ds 1 ; ccf3
-wccf4:: ds 1 ; ccf4
-wccf5:: ds 1 ; ccf5
-wccf6:: ds 1 ; ccf6
-wccf7:: ds 1 ; ccf7
-wccf8:: ds 1 ; ccf8
-wccf9:: ds 1 ; ccf9
-wccfa:: ds 1 ; ccfa
-wccfb:: ds 1 ; ccfb
-wccfc:: ds 1 ; ccfc
-wccfd:: ds 1 ; ccfd
-wccfe:: ds 1 ; ccfe
-wccff:: ds 1 ; ccff
-wcd00:: ds 1 ; cd00
-wcd01:: ds 1 ; cd01
-wcd02:: ds 1 ; cd02
-wcd03:: ds 1 ; cd03
-wcd04:: ds 1 ; cd04
-wcd05:: ds 1 ; cd05
-wcd06:: ds 1 ; cd06
-wcd07:: ds 1 ; cd07
-wcd08:: ds 1 ; cd08
-wcd09:: ds 1 ; cd09
-wcd0a:: ds 1 ; cd0a
-wcd0b:: ds 1 ; cd0b
-wcd0c:: ds 1 ; cd0c
-wcd0d:: ds 1 ; cd0d
-wcd0e:: ds 1 ; cd0e
-wcd0f:: ds 1 ; cd0f
-wcd10:: ds 1 ; cd10
-wcd11:: ds 1 ; cd11
-wcd12:: ds 1 ; cd12
-wcd13:: ds 1 ; cd13
-wcd14:: ds 1 ; cd14
-wcd15:: ds 1 ; cd15
-wcd16:: ds 1 ; cd16
-wcd17:: ds 1 ; cd17
-wcd18:: ds 1 ; cd18
-wcd19:: ds 1 ; cd19
-wcd1a:: ds 1 ; cd1a
-wcd1b:: ds 1 ; cd1b
-wcd1c:: ds 1 ; cd1c
-wcd1d:: ds 1 ; cd1d
-wcd1e:: ds 1 ; cd1e
-wcd1f:: ds 1 ; cd1f
-wcd20:: ds 1 ; cd20
-wcd21:: ds 1 ; cd21
-wcd22:: ds 1 ; cd22
-wcd23:: ds 1 ; cd23
-wcd24:: ds 1 ; cd24
-wcd25:: ds 1 ; cd25
-wcd26:: ds 1 ; cd26
-wcd27:: ds 1 ; cd27
-wcd28:: ds 1 ; cd28
-wcd29:: ds 1 ; cd29
-wcd2a:: ds 1 ; cd2a
-wcd2b:: ds 1 ; cd2b
-wcd2c:: ds 1 ; cd2c
-wcd2d:: ds 1 ; cd2d
-wcd2e:: ds 1 ; cd2e
-wcd2f:: ds 1 ; cd2f
-wcd30:: ds 1 ; cd30
-wcd31:: ds 1 ; cd31
-wcd32:: ds 1 ; cd32
-wcd33:: ds 1 ; cd33
-wcd34:: ds 1 ; cd34
-wcd35:: ds 1 ; cd35
-wcd36:: ds 1 ; cd36
-wcd37:: ds 1 ; cd37
-wcd38:: ds 1 ; cd38
-wcd39:: ds 1 ; cd39
-wcd3a:: ds 1 ; cd3a
-wcd3b:: ds 1 ; cd3b
-wcd3c:: ds 1 ; cd3c
-wcd3d:: ds 1 ; cd3d
-wcd3e:: ds 1 ; cd3e
-wcd3f:: ds 1 ; cd3f
-wcd40:: ds 1 ; cd40
-wcd41:: ds 1 ; cd41
-wcd42:: ds 1 ; cd42
-wcd43:: ds 1 ; cd43
-wcd44:: ds 1 ; cd44
-wcd45:: ds 1 ; cd45
-wcd46:: ds 1 ; cd46
-wcd47:: ds 1 ; cd47
-wcd48:: ds 1 ; cd48
-wcd49:: ds 1 ; cd49
-wcd4a:: ds 1 ; cd4a
-wcd4b:: ds 1 ; cd4b
-wcd4c:: ds 1 ; cd4c
-wcd4d:: ds 1 ; cd4d
-wcd4e:: ds 1 ; cd4e
-wcd4f:: ds 1 ; cd4f
-wcd50:: ds 1 ; cd50
-wcd51:: ds 1 ; cd51
-wcd52:: ds 1 ; cd52
-wcd53:: ds 1 ; cd53
-wcd54:: ds 1 ; cd54
-wcd55:: ds 1 ; cd55
-wcd56:: ds 1 ; cd56
-wcd57:: ds 1 ; cd57
-wcd58:: ds 1 ; cd58
-wcd59:: ds 1 ; cd59
-wcd5a:: ds 1 ; cd5a
-wcd5b:: ds 1 ; cd5b
-wcd5c:: ds 1 ; cd5c
-wcd5d:: ds 1 ; cd5d
-wcd5e:: ds 1 ; cd5e
-wcd5f:: ds 1 ; cd5f
-wcd60:: ds 1 ; cd60
-wcd61:: ds 1 ; cd61
-wcd62:: ds 1 ; cd62
-wcd63:: ds 1 ; cd63
-wcd64:: ds 1 ; cd64
-wcd65:: ds 1 ; cd65
-wcd66:: ds 1 ; cd66
-wcd67:: ds 1 ; cd67
-wcd68:: ds 1 ; cd68
-wcd69:: ds 1 ; cd69
-wcd6a:: ds 1 ; cd6a
-wcd6b:: ds 1 ; cd6b
-wcd6c:: ds 1 ; cd6c
-wcd6d:: ds 1 ; cd6d
-wcd6e:: ds 1 ; cd6e
-wcd6f:: ds 1 ; cd6f
-wcd70:: ds 1 ; cd70
-wcd71:: ds 1 ; cd71
-wcd72:: ds 1 ; cd72
-wcd73:: ds 1 ; cd73
-wcd74:: ds 1 ; cd74
-wcd75:: ds 1 ; cd75
-wcd76:: ds 1 ; cd76
-wcd77:: ds 1 ; cd77
-wcd78:: ds 1 ; cd78
-wcd79:: ds 1 ; cd79
-wcd7a:: ds 1 ; cd7a
-wcd7b:: ds 1 ; cd7b
-wcd7c:: ds 1 ; cd7c
-wcd7d:: ds 1 ; cd7d
-wcd7e:: ds 1 ; cd7e
-wcd7f:: ds 1 ; cd7f
-wcd80:: ds 1 ; cd80
-wcd81:: ds 1 ; cd81
-wcd82:: ds 1 ; cd82
-wcd83:: ds 1 ; cd83
-wcd84:: ds 1 ; cd84
-wcd85:: ds 1 ; cd85
-wcd86:: ds 1 ; cd86
-wcd87:: ds 1 ; cd87
-wcd88:: ds 1 ; cd88
-wcd89:: ds 1 ; cd89
-wcd8a:: ds 1 ; cd8a
-wcd8b:: ds 1 ; cd8b
-wcd8c:: ds 1 ; cd8c
-wcd8d:: ds 1 ; cd8d
-wcd8e:: ds 1 ; cd8e
-wcd8f:: ds 1 ; cd8f
-wcd90:: ds 1 ; cd90
-wcd91:: ds 1 ; cd91
-wcd92:: ds 1 ; cd92
-wcd93:: ds 1 ; cd93
-wcd94:: ds 1 ; cd94
-wcd95:: ds 1 ; cd95
-wcd96:: ds 1 ; cd96
-wcd97:: ds 1 ; cd97
-wcd98:: ds 1 ; cd98
-wcd99:: ds 1 ; cd99
-wcd9a:: ds 1 ; cd9a
-wcd9b:: ds 1 ; cd9b
-wcd9c:: ds 1 ; cd9c
-wcd9d:: ds 1 ; cd9d
-wcd9e:: ds 1 ; cd9e
-wcd9f:: ds 1 ; cd9f
-wcda0:: ds 1 ; cda0
-wcda1:: ds 1 ; cda1
-wcda2:: ds 1 ; cda2
-wcda3:: ds 1 ; cda3
-wcda4:: ds 1 ; cda4
-wcda5:: ds 1 ; cda5
-wcda6:: ds 1 ; cda6
-wcda7:: ds 1 ; cda7
-wcda8:: ds 1 ; cda8
-wcda9:: ds 1 ; cda9
-wcdaa:: ds 1 ; cdaa
-wcdab:: ds 1 ; cdab
-wcdac:: ds 1 ; cdac
-wcdad:: ds 1 ; cdad
-wcdae:: ds 1 ; cdae
-wcdaf:: ds 1 ; cdaf
-wcdb0:: ds 1 ; cdb0
-wcdb1:: ds 1 ; cdb1
-wcdb2:: ds 1 ; cdb2
-wcdb3:: ds 1 ; cdb3
-wcdb4:: ds 1 ; cdb4
-wcdb5:: ds 1 ; cdb5
-wcdb6:: ds 1 ; cdb6
-wcdb7:: ds 1 ; cdb7
-wcdb8:: ds 1 ; cdb8
-wcdb9:: ds 1 ; cdb9
-wcdba:: ds 1 ; cdba
-wcdbb:: ds 1 ; cdbb
-wcdbc:: ds 1 ; cdbc
-wcdbd:: ds 1 ; cdbd
-wcdbe:: ds 1 ; cdbe
-wcdbf:: ds 1 ; cdbf
-wcdc0:: ds 1 ; cdc0
-wcdc1:: ds 1 ; cdc1
-wcdc2:: ds 1 ; cdc2
-wcdc3:: ds 1 ; cdc3
-wcdc4:: ds 1 ; cdc4
-wcdc5:: ds 1 ; cdc5
-wcdc6:: ds 1 ; cdc6
-wcdc7:: ds 1 ; cdc7
-wcdc8:: ds 1 ; cdc8
-wcdc9:: ds 1 ; cdc9
-wcdca:: ds 1 ; cdca
-wcdcb:: ds 1 ; cdcb
-wcdcc:: ds 1 ; cdcc
-wcdcd:: ds 1 ; cdcd
-wcdce:: ds 1 ; cdce
-wcdcf:: ds 1 ; cdcf
-wcdd0:: ds 1 ; cdd0
-wcdd1:: ds 1 ; cdd1
-wcdd2:: ds 1 ; cdd2
-wcdd3:: ds 1 ; cdd3
-wcdd4:: ds 1 ; cdd4
-wcdd5:: ds 1 ; cdd5
-wcdd6:: ds 1 ; cdd6
-wcdd7:: ds 1 ; cdd7
-wcdd8:: ds 1 ; cdd8
-wcdd9:: ds 1 ; cdd9
-wcdda:: ds 1 ; cdda
-wcddb:: ds 1 ; cddb
-wcddc:: ds 1 ; cddc
-wcddd:: ds 1 ; cddd
-wcdde:: ds 1 ; cdde
-wcddf:: ds 1 ; cddf
-wcde0:: ds 1 ; cde0
-wcde1:: ds 1 ; cde1
-wcde2:: ds 1 ; cde2
-wcde3:: ds 1 ; cde3
-wcde4:: ds 1 ; cde4
-wcde5:: ds 1 ; cde5
-wcde6:: ds 1 ; cde6
-wcde7:: ds 1 ; cde7
-wcde8:: ds 1 ; cde8
-wcde9:: ds 1 ; cde9
-wcdea:: ds 1 ; cdea
-wcdeb:: ds 1 ; cdeb
-wcdec:: ds 1 ; cdec
-wcded:: ds 1 ; cded
-wcdee:: ds 1 ; cdee
-wcdef:: ds 1 ; cdef
-wcdf0:: ds 1 ; cdf0
-wcdf1:: ds 1 ; cdf1
-wcdf2:: ds 1 ; cdf2
-wcdf3:: ds 1 ; cdf3
-wcdf4:: ds 1 ; cdf4
-wcdf5:: ds 1 ; cdf5
-wcdf6:: ds 1 ; cdf6
-wcdf7:: ds 1 ; cdf7
-wcdf8:: ds 1 ; cdf8
-wcdf9:: ds 1 ; cdf9
-wcdfa:: ds 1 ; cdfa
-wcdfb:: ds 1 ; cdfb
-wcdfc:: ds 1 ; cdfc
-wcdfd:: ds 1 ; cdfd
-wcdfe:: ds 1 ; cdfe
-wcdff:: ds 1 ; cdff
-wce00:: ds 1 ; ce00
-wce01:: ds 1 ; ce01
-wce02:: ds 1 ; ce02
-wce03:: ds 1 ; ce03
-wce04:: ds 1 ; ce04
-wce05:: ds 1 ; ce05
-wce06:: ds 1 ; ce06
-wce07:: ds 1 ; ce07
-wce08:: ds 1 ; ce08
-wce09:: ds 1 ; ce09
-wce0a:: ds 1 ; ce0a
-wce0b:: ds 1 ; ce0b
-wce0c:: ds 1 ; ce0c
-wce0d:: ds 1 ; ce0d
-wce0e:: ds 1 ; ce0e
-wce0f:: ds 1 ; ce0f
-wce10:: ds 1 ; ce10
-wce11:: ds 1 ; ce11
-wce12:: ds 1 ; ce12
-wce13:: ds 1 ; ce13
-wce14:: ds 1 ; ce14
-wce15:: ds 1 ; ce15
-wce16:: ds 1 ; ce16
-wce17:: ds 1 ; ce17
-wce18:: ds 1 ; ce18
-wce19:: ds 1 ; ce19
-wce1a:: ds 1 ; ce1a
-wce1b:: ds 1 ; ce1b
-wce1c:: ds 1 ; ce1c
-wce1d:: ds 1 ; ce1d
-wce1e:: ds 1 ; ce1e
-wce1f:: ds 1 ; ce1f
-wce20:: ds 1 ; ce20
-wce21:: ds 1 ; ce21
-wce22:: ds 1 ; ce22
-wce23:: ds 1 ; ce23
-wce24:: ds 1 ; ce24
-wce25:: ds 1 ; ce25
-wce26:: ds 1 ; ce26
-wce27:: ds 1 ; ce27
-wce28:: ds 1 ; ce28
-wce29:: ds 1 ; ce29
-wce2a:: ds 1 ; ce2a
-wce2b:: ds 1 ; ce2b
-wce2c:: ds 1 ; ce2c
-wce2d:: ds 1 ; ce2d
-wce2e:: ds 1 ; ce2e
-wce2f:: ds 1 ; ce2f
-wce30:: ds 1 ; ce30
-wce31:: ds 1 ; ce31
-wce32:: ds 1 ; ce32
-wce33:: ds 1 ; ce33
-wce34:: ds 1 ; ce34
-wce35:: ds 1 ; ce35
-wce36:: ds 1 ; ce36
-wce37:: ds 1 ; ce37
-wce38:: ds 1 ; ce38
-wce39:: ds 1 ; ce39
-wce3a:: ds 1 ; ce3a
-wce3b:: ds 1 ; ce3b
-wce3c:: ds 1 ; ce3c
-wce3d:: ds 1 ; ce3d
-wce3e:: ds 1 ; ce3e
-wce3f:: ds 1 ; ce3f
-wce40:: ds 1 ; ce40
+
+wAttrMap:: ; ccd9
+ ds SCREEN_HEIGHT * SCREEN_WIDTH
+wAttrMapEnd:: ; ce41
+
wce41:: ds 1 ; ce41
wce42:: ds 1 ; ce42
wce43:: ds 1 ; ce43
@@ -2445,16 +2065,15 @@ wce63:: ds 1 ; ce63
wce64:: ds 1 ; ce64
wce65:: ds 1 ; ce65
wce66:: ds 1 ; ce66
-wce67:: ds 1 ; ce67
-wce68:: ds 1 ; ce68
-wce69:: ds 1 ; ce69
-wce6a:: ds 1 ; ce6a
-wce6b:: ds 1 ; ce6b
-wce6c:: ds 1 ; ce6c
-wce6d:: ds 1 ; ce6d
-wce6e:: ds 1 ; ce6e
-wce6f:: ds 1 ; ce6f
-wce70:: ds 1 ; ce70
+
+wRequested2bpp:: ds 1 ; ce67
+wRequested2bppSource:: dw ; ce68
+wRequested2bppDest:: dw ; ce6a
+
+wRequested1bpp:: ds 1 ; ce6c
+wRequested1bppSource:: dw ; ce6d
+wRequested1bppDest:: dw ; ce6f
+
wce71:: ds 1 ; ce71
wce72:: ds 1 ; ce72
wce73:: ds 1 ; ce73
@@ -3059,7 +2678,7 @@ wd119:: ds 1 ; d119
wd11a:: ds 1 ; d11a
wd11b:: ds 1 ; d11b
wd11c:: ds 1 ; d11c
-wd11d:: ds 1 ; d11d
+wTrainerClass:: ds 1 ; d11d
wd11e:: ds 1 ; d11e
wd11f:: ds 1 ; d11f
wd120:: ds 1 ; d120
@@ -3116,7 +2735,7 @@ wd152:: ds 1 ; d152
wd153:: ds 1 ; d153
wd154:: ds 1 ; d154
wROMBankBackup:: ds 1
-wd156:: ds 1 ; d156
+wBuffer:: ds 1 ; d156
wd157:: ds 1 ; d157
wd158:: ds 1 ; d158
wd159:: ds 1 ; d159
@@ -3186,68 +2805,20 @@ wd198:: ds 1 ; d198
wd199:: ds 1 ; d199
wd19a:: ds 1 ; d19a
wd19b:: ds 1 ; d19b
-wd19c:: ds 1 ; d19c
+wTextBoxFlags:: ds 1 ; d19c
wd19d:: ds 1 ; d19d
wd19e:: ds 1 ; d19e
wd19f:: ds 1 ; d19f
wd1a0:: ds 1 ; d1a0
wd1a1:: ds 1 ; d1a1
wd1a2:: ds 1 ; d1a2
-wd1a3:: ds 1 ; d1a3
-wd1a4:: ds 1 ; d1a4
-wd1a5:: ds 1 ; d1a5
-wd1a6:: ds 1 ; d1a6
-wd1a7:: ds 1 ; d1a7
-wd1a8:: ds 1 ; d1a8
-wd1a9:: ds 1 ; d1a9
-wd1aa:: ds 1 ; d1aa
-wd1ab:: ds 1 ; d1ab
-wd1ac:: ds 1 ; d1ac
-wd1ad:: ds 1 ; d1ad
-wd1ae:: ds 1 ; d1ae
-wd1af:: ds 1 ; d1af
-wd1b0:: ds 1 ; d1b0
-wd1b1:: ds 1 ; d1b1
-wd1b2:: ds 1 ; d1b2
-wd1b3:: ds 1 ; d1b3
-wd1b4:: ds 1 ; d1b4
-wd1b5:: ds 1 ; d1b5
-wd1b6:: ds 1 ; d1b6
-wd1b7:: ds 1 ; d1b7
-wd1b8:: ds 1 ; d1b8
-wd1b9:: ds 1 ; d1b9
-wd1ba:: ds 1 ; d1ba
-wd1bb:: ds 1 ; d1bb
-wd1bc:: ds 1 ; d1bc
-wd1bd:: ds 1 ; d1bd
-wd1be:: ds 1 ; d1be
-wd1bf:: ds 1 ; d1bf
-wd1c0:: ds 1 ; d1c0
-wd1c1:: ds 1 ; d1c1
-wd1c2:: ds 1 ; d1c2
-wd1c3:: ds 1 ; d1c3
-wd1c4:: ds 1 ; d1c4
-wd1c5:: ds 1 ; d1c5
-wd1c6:: ds 1 ; d1c6
-wd1c7:: ds 1 ; d1c7
-wd1c8:: ds 1 ; d1c8
-wd1c9:: ds 1 ; d1c9
-wd1ca:: ds 1 ; d1ca
-wd1cb:: ds 1 ; d1cb
-wd1cc:: ds 1 ; d1cc
-wd1cd:: ds 1 ; d1cd
-wd1ce:: ds 1 ; d1ce
-wd1cf:: ds 1 ; d1cf
-wd1d0:: ds 1 ; d1d0
-wd1d1:: ds 1 ; d1d1
-wd1d2:: ds 1 ; d1d2
-wd1d3:: ds 1 ; d1d3
-wd1d4:: ds 1 ; d1d4
-wd1d5:: ds 1 ; d1d5
-wd1d6:: ds 1 ; d1d6
-wd1d7:: ds 1 ; d1d7
-wd1d8:: ds 1 ; d1d8
-wd1d9:: ds 1 ; d1d9
+
+wPlayersName:: ds NAME_LENGTH ; d1a3
+wMomsName:: ds NAME_LENGTH ; d1ae
+wRivalsName:: ds NAME_LENGTH ; d1b9
+wRedsName:: ds NAME_LENGTH ; d1c4
+wGreensName:: ds NAME_LENGTH ; d1cf
+
wd1da:: ds 1 ; d1da
wd1db:: ds 1 ; d1db
wd1dc:: ds 1 ; d1dc