summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPikalaxALT <pikalaxalt@gmail.com>2018-06-02 22:44:35 -0400
committerPikalaxALT <pikalaxalt@gmail.com>2018-06-02 22:57:52 -0400
commit8787aac995922a6b0cc342cc280707365c206f0f (patch)
treed41bf97e0fb6bfde435f160344974a7445b9b447
parent4a5b6ec3e6ca11dd2042384a3f68c865271a8b54 (diff)
parent51282e60298fa9566dd320615fdb177fa33780a7 (diff)
Merge branch 'master' into build_more_roms
-rw-r--r--Makefile1
-rw-r--r--README.md2
-rw-r--r--constants/misc_constants.asm6
-rw-r--r--engine/gfx.asm139
-rw-r--r--gfx.asm113
-rw-r--r--gfx/battle/hp_bar.pngbin0 -> 199 bytes
-rw-r--r--gfx/battle/hp_exp_bar_border.1bpp.pngbin140 -> 0 bytes
-rw-r--r--gfx/battle/hp_exp_bar_parts0.1bpp.pngbin0 -> 111 bytes
-rw-r--r--gfx/battle/hp_exp_bar_parts0.pngbin0 -> 111 bytes
-rw-r--r--gfx/battle/hp_exp_bar_parts1.1bpp.pngbin0 -> 92 bytes
-rw-r--r--gfx/battle/hp_exp_bar_parts2.1bpp.pngbin0 -> 84 bytes
-rw-r--r--gfx/battle/hp_exp_bar_parts3.1bpp.pngbin0 -> 82 bytes
-rw-r--r--gfx/battle/levelup.pngbin0 -> 112 bytes
-rw-r--r--gfx/battle/markers.pngbin0 -> 111 bytes
-rw-r--r--gfx/font/font_extra.ab.pngbin0 -> 90 bytes
-rw-r--r--gfx/font/font_extra.cdefghivslm.pngbin0 -> 153 bytes
-rw-r--r--gfx/font/font_extra.pngbin287 -> 0 bytes
-rw-r--r--gfx/font/gfx_f9322.1bpp.pngbin90 -> 0 bytes
-rw-r--r--gfx/font/small_kana_punctuation.pngbin0 -> 156 bytes
-rw-r--r--gfx/frames/1.pngbin0 -> 189 bytes
-rw-r--r--gfx/misc/black_tile_cursor.1bpp.pngbin0 -> 87 bytes
-rw-r--r--gfx/misc/empty_tile.1bpp.pngbin0 -> 71 bytes
-rw-r--r--gfx/misc/poke_balls.pngbin0 -> 124 bytes
-rw-r--r--gfx/pokedex/locations.pngbin0 -> 146 bytes
-rw-r--r--gfx/pokedex/m_kg.pngbin104 -> 0 bytes
-rw-r--r--gfx/pokedex/pokedex.pngbin145 -> 181 bytes
-rw-r--r--gfx/pokegear/town_map.pngbin394 -> 337 bytes
-rw-r--r--gfx/trainer_card/colon.pngbin0 -> 76 bytes
-rw-r--r--gfx/trainer_card/id_no.pngbin0 -> 92 bytes
-rw-r--r--gfx/trainer_card/leaders.pngbin317 -> 622 bytes
-rw-r--r--gfx/trainer_card/trainer_card.pngbin619 -> 369 bytes
-rw-r--r--home/pokemon.asm2
-rw-r--r--home/print_hex.asm10
-rw-r--r--home/util.asm (renamed from home/math.asm)24
-rw-r--r--shim_gold.sym1
-rw-r--r--shim_gold_debug.sym1
-rw-r--r--shim_silver.sym1
-rw-r--r--shim_silver_debug.sym1
-rw-r--r--tools/dump_text.py9
-rw-r--r--wram.asm39
40 files changed, 279 insertions, 70 deletions
diff --git a/Makefile b/Makefile
index e6ee492..7e9ff33 100644
--- a/Makefile
+++ b/Makefile
@@ -82,6 +82,7 @@ $(BUILD)/gfx/sgb/sgb_border_silver.2bpp: tools/gfx += --trim-whitespace
$(BUILD)/gfx/title/title_gold.2bpp: tools/gfx += --trim-whitespace
$(BUILD)/gfx/title/title_silver.2bpp: tools/gfx += --trim-whitespace
$(BUILD)/gfx/trainer_card/leaders.2bpp: tools/gfx += --trim-whitespace
+$(BUILD)/gfx/trainer_card/trainer_card.2bpp: tools/gfx += --trim-whitespace
$(BUILD)/gfx/minigames/slots.2bpp: tools/gfx += --trim-whitespace
$(BUILD)/gfx/minigames/poker.2bpp: tools/gfx += --trim-whitespace
$(BUILD)/gfx/intro/purin_pikachu.2bpp: tools/gfx += --trim-whitespace
diff --git a/README.md b/README.md
index 63aaedb..5ba4cee 100644
--- a/README.md
+++ b/README.md
@@ -6,5 +6,3 @@ pokegold_spaceworld.gb (MD5: 3c407114de28d17b7113a2c0cee9a37c)
pokegold_debug_spaceworld.gb (MD5: 2eadbed83b775c097ff79e5128d1184f)
pokesilver_spaceworld.gb (MD5: c52a677c35f15320d5b495e14809f00d)
pokesilver_debug_spaceworld.gb (MD5: fa65d3759bb17c489de171a598ba4913)
-
-At this current stage, only pokegold_debug_spaceworld.gb builds a functioning ROM.
diff --git a/constants/misc_constants.asm b/constants/misc_constants.asm
index d01de98..05508e6 100644
--- a/constants/misc_constants.asm
+++ b/constants/misc_constants.asm
@@ -22,3 +22,9 @@ D_DOWN EQU 1 << D_DOWN_F
BUTTONS EQU A_BUTTON | B_BUTTON | SELECT | START
D_PAD EQU D_RIGHT | D_LEFT | D_UP | D_DOWN
+
+; backpack
+
+ const_def 1
+ const REGULAR_ITEM_POCKET
+ const KEY_ITEM_POCKET \ No newline at end of file
diff --git a/engine/gfx.asm b/engine/gfx.asm
new file mode 100644
index 0000000..2c19fe6
--- /dev/null
+++ b/engine/gfx.asm
@@ -0,0 +1,139 @@
+INCLUDE "constants.asm"
+
+SECTION "Misc GFX Loading Functions", ROMX[$4000], BANK[$3E]
+
+LoadFontGraphics:: ; f8000 (3e:4000)
+ ld de, FontGFX
+ ld hl, $8800
+ lb bc, BANK(FontGFX), ((FontGFXEnd - FontGFX) / LEN_1BPP_TILE)
+ jp CopyVideoDataDoubleOptimized
+LoadFontExtraGraphicsWithCursor:: ; f800c (3e:400c)
+ ld de, FontExtraCDEFGHIVSLM_GFX
+ ld hl, $9620
+ lb bc, BANK(FontExtraCDEFGHIVSLM_GFX), ((FontSmallKanaPunctuationGFXEnd - FontExtraCDEFGHIVSLM_GFX) / LEN_2BPP_TILE)
+ call CopyVideoDataOptimized
+ ld de, BlackTileAndCursor1bppGFX
+ ld hl, $9600
+ lb bc, BANK(BlackTileAndCursor1bppGFX), ((BlackTileAndCursor1bppGFXEnd - BlackTileAndCursor1bppGFX) / LEN_1BPP_TILE)
+ call CopyVideoDataDoubleOptimized
+ jr LoadActiveFrameGraphics
+LoadPokemonMenuGraphics:: ; f8026 (3e:4026)
+ ld de, BattleHPBarGFX
+ ld hl, $9600
+ lb bc, BANK(BattleHPBarGFX), ((LevelUpGFXEnd - BattleHPBarGFX) / LEN_2BPP_TILE)
+ call CopyVideoDataOptimized
+ jr LoadActiveFrameGraphics
+LoadHexadecimalFontOrHUDGraphics:: ; f8034 (3e:4034)
+ call LoadActiveFrameGraphics
+ ld hl, $d153
+ bit 0, [hl]
+ jr z, LoadHudGraphics
+ ld hl, $9660
+ ld de, FontGFX + (("0" - "ア") * $08)
+ lb bc, BANK(FontGFX), ("9" - "0" + 1)
+ call CopyVideoDataDoubleOptimized
+ ld hl, $9700
+ ld de, FontExtraAB_GFX
+ lb bc, BANK(FontExtraAB_GFX), ("F" - "A" + 1)
+ call CopyVideoDataOptimized
+ ret
+LoadHudGraphics:: ; f8057 (3e:4057)
+ ld hl, $9660
+ ld de, FontGFX + (("0" - "ア") * $08)
+ lb bc, BANK(FontGFX), ("9" - "0" + 1)
+ call CopyVideoDataDoubleOptimized
+ ld hl, $9700
+ ld de, $7381
+ ld bc, $0401
+ call CopyVideoDataOptimized
+ ld hl, $9710
+ ld de, HUD_GFX
+ lb bc, BANK(HUD_GFX), ((HUD_GFXEnd - HUD_GFX) / LEN_2BPP_TILE)
+ call CopyVideoDataOptimized
+ ret
+LoadActiveFrameGraphics:: ; f807c (3e:407c)
+ ld a, [wActiveFrame]
+ ld bc, (FrameGFXFirstFrameEnd - FrameGFXFirstFrame)
+ ld hl, FrameGFX
+ call AddNTimes
+ ld d, h
+ ld e, l
+ ld hl, $9790
+ lb bc, BANK(FrameGFX), ((FrameGFXFirstFrameEnd - FrameGFXFirstFrame) / LEN_1BPP_TILE)
+ call CopyVideoDataDoubleOptimized
+ ld hl, $97f0
+ ld de, EmptyTile1bppGFX
+ lb bc, BANK(EmptyTile1bppGFX), ((EmptyTile1bppGFXEnd - EmptyTile1bppGFX) / LEN_1BPP_TILE)
+ call CopyVideoDataDoubleOptimized
+ ret
+LoadPokeDexGraphics:: ; f80a0 (3e:40a0)
+ call LoadPokemonMenuGraphics
+ ld de, PokedexGFX
+ ld hl, $9600
+ lb bc, BANK(PokedexGFX), ((PokedexLocationGFXEnd - PokedexGFX) / LEN_2BPP_TILE)
+ call CopyVideoDataOptimized
+ ld de, PokeBallsGFX
+ ld hl, $9720
+ lb bc, BANK(PokeBallsGFX), 1 ; 1 of 4 tiles
+ jp CopyVideoDataOptimized
+LoadBattleGraphics:: ; f80bb (3e:40bb)
+ ld de, BattleHPBarGFX
+ ld hl, $9600
+ lb bc, BANK(BattleHPBarGFX), ((BattleHPBarGFXEnd - BattleHPBarGFX) / LEN_2BPP_TILE)
+ call CopyVideoDataOptimized
+ ld hl, $9700
+ ld de, BattleMarkersGFX
+ lb bc, BANK(BattleMarkersGFX), ((BattleMarkersGFXEnd - BattleMarkersGFX) / LEN_2BPP_TILE)
+ call CopyVideoDataOptimized
+ call LoadActiveFrameGraphics
+ ld de, HpExpBarParts0GFX
+ ld hl, $96c0
+ lb bc, BANK(HpExpBarParts0GFX), ((HpExpBarParts0GFXEnd - HpExpBarParts0GFX) / LEN_1BPP_TILE)
+ call CopyVideoDataDoubleOptimized
+ ld de, HpExpBarParts1GFX
+ ld hl, $9730
+ lb bc, BANK(HpExpBarParts1GFX), ((HpExpBarParts3GFXEnd - HpExpBarParts1GFX) / LEN_1BPP_TILE)
+ call CopyVideoDataDoubleOptimized
+ ld de, ExpBarGFX
+ ld hl, $9550
+ lb bc, BANK(ExpBarGFX), ((ExpBarGFXEnd - ExpBarGFX) / LEN_2BPP_TILE)
+ call CopyVideoDataOptimized
+ ret
+LoadPokemonStatsGraphics:: ; f80fb (3e:40fb)
+ call LoadPokemonMenuGraphics
+ ld de, HpExpBarParts0GFX
+ ld hl, $96c0
+ lb bc, BANK(HpExpBarParts0GFX), ((HpExpBarParts0GFXEnd - HpExpBarParts0GFX) / LEN_1BPP_TILE)
+ call CopyVideoDataDoubleOptimized
+ ld de, HpExpBarParts1GFX
+ ld hl, $9780
+ lb bc, BANK(HpExpBarParts1GFX), 1 ; 1 of 6 tiles
+ call CopyVideoDataDoubleOptimized
+ ld de, HpExpBarParts2GFX
+ ld hl, $9760
+ lb bc, BANK(HpExpBarParts0GFX), ((HpExpBarParts2GFXEnd - HpExpBarParts2GFX) / LEN_1BPP_TILE)
+ call CopyVideoDataDoubleOptimized
+ ld de, ExpBarGFX
+ ld hl, $9550
+ lb bc, BANK(ExpBarGFX), ((ExpBarGFXEnd - ExpBarGFX) / LEN_2BPP_TILE)
+ call CopyVideoDataOptimized
+ ld de, StatsGFX
+ ld hl, $9310
+ lb bc, BANK(StatsGFX), ((StatsGFXEnd - StatsGFX) / LEN_2BPP_TILE)
+ call CopyVideoDataOptimized
+ ret
+LoadBackpackGraphics:: ; f813b (3e:413b)
+ ld de, BlackTileAndCursor1bppGFX
+ ld hl, $9600
+ lb bc, BANK(BlackTileAndCursor1bppGFX), ((BlackTileAndCursor1bppGFXEnd - BlackTileAndCursor1bppGFX) / LEN_1BPP_TILE)
+ call CopyVideoDataDoubleOptimized
+ ld de, PackIconGFX
+ ld hl, $9620
+ lb bc, BANK(PackIconGFX), 12 ; 12 of 15 tiles
+ call CopyVideoDataOptimized
+ ld de, FontSmallKanaPunctuationGFX
+ ld hl, $96e0
+ lb bc, BANK(FontSmallKanaPunctuationGFX), ((FontSmallKanaPunctuationGFXEnd - FontSmallKanaPunctuationGFX) / LEN_2BPP_TILE)
+ call CopyVideoDataOptimized
+ jp LoadActiveFrameGraphics
+; 0xf8162 \ No newline at end of file
diff --git a/gfx.asm b/gfx.asm
index 46f404b..fdd576b 100644
--- a/gfx.asm
+++ b/gfx.asm
@@ -54,16 +54,20 @@ MailIconGFX::
INCBIN "gfx/icons/mail.2bpp"
SECTION "Trainer Card GFX", ROMX[$7171], BANK[$04]
-TrainerCardGFX::
-INCBIN "gfx/trainer_card/trainer_card.2bpp"
-TrainerCardLeadersGFX::
-INCBIN "gfx/trainer_card/leaders.2bpp"
+TrainerCardGFX:: INCBIN "gfx/trainer_card/trainer_card.2bpp" ; 0x013171--0x013381
+TrainerCardColonGFX:: INCBIN "gfx/trainer_card/colon.2bpp" ; 0x013381--0x013391
+TrainerCardIDNoGFX:: INCBIN "gfx/trainer_card/id_no.2bpp" ; 0x013391--0x0133B1
+TrainerCardIDNoGFXEnd::
+TrainerCardLeadersGFX:: INCBIN "gfx/trainer_card/leaders.2bpp" ; 0x0133B1--0x013BA1
+if DEBUG || def(GOLD)
+ db $18, $00 ; leftover of previous graphics
+else
+ db $b2, $aa ; leftover of previous graphics?
+endc
if DEBUG
; Not sure how to parse this from the non-debug ROM, so I'll leave this be for now
-SECTION "Unused Leader", ROMX[$7BA3], BANK[$04]
-UnusedLeaderNameGFX::
-INCBIN "gfx/trainer_card/unused_leader_name.2bpp"
+Unreferenced_UnusedLeaderNameGFX:: INCBIN "gfx/trainer_card/unused_leader_name.2bpp" ; 0x13ba3
endc
SECTION "Bank 6 Tilesets 00", ROMX[$4000], BANK[$06]
@@ -146,6 +150,10 @@ SECTION "Bank C Tilesets 0c", ROMX[$7100], BANK[$0C]
Tileset_0c_GFX:
INCBIN "gfx/tilesets/tileset_0c.2bpp"
+SECTION "PokeBalls GFX", ROMX[$4494], BANK[$0E]
+
+PokeBallsGFX:: INCBIN "gfx/misc/poke_balls.2bpp" ; 0x038494--0x0384d4
+
SECTION "Pokedex GFX", ROMX[$40D5], BANK[$11]
PokedexButtonsGFX::
INCBIN "gfx/pokedex/buttons.2bpp"
@@ -414,44 +422,63 @@ INCBIN "gfx/intro/fushigibana.2bpp"
SECTION "Misc GFX", ROMX[$4162], BANK[$3E]
FontExtraGFX::
-INCBIN "gfx/font/font_extra.2bpp"
-FontGFX::
-INCBIN "gfx/font/font.1bpp"
+FontExtraAB_GFX:: INCBIN "gfx/font/font_extra.ab.2bpp" ; 0x0f8162--0x0f8182
+FontExtraCDEFGHIVSLM_GFX:: INCBIN "gfx/font/font_extra.cdefghivslm.2bpp" ; 0x0f8182--0x0f8242
+FontSmallKanaPunctuationGFX:: INCBIN "gfx/font/small_kana_punctuation.2bpp" ; 0x0f8242--0x0f82f2
+FontSmallKanaPunctuationGFXEnd::
+Unreferenced_DefaultFrame0GFX:: INCBIN "gfx/frames/1.2bpp" ; 0x0f82f2--0x0f8362
+FontGFX:: INCBIN "gfx/font/font.1bpp" ; 0x0f8362--0x0f8712 kana
+FontGFXEnd:: ; 0x0f8712--0x0f8762 numbers
FontBattleExtraGFX::
-INCBIN "gfx/font/font_battle_extra.2bpp"
+BattleHPBarGFX:: INCBIN "gfx/battle/hp_bar.2bpp" ; 0x0f8762--0x0f8822
+BattleHPBarGFXEnd::
+HpExpBarParts0_2bppGFX:: INCBIN "gfx/battle/hp_exp_bar_parts0.2bpp" ; 0x0f8822--0x0f8862
+BattleMarkersGFX:: INCBIN "gfx/battle/markers.2bpp" ; 0x0f8862--0x0f8892
+BattleMarkersGFXEnd::
+LevelUpGFX:: INCBIN "gfx/battle/levelup.2bpp" ; 0x0f8892--0x0f88f2
+LevelUpGFXEnd::
+Unreferenced_DefaultFrame1:: INCBIN "gfx/frames/1.2bpp" ; 0x0f88f2--0x0f8962
FrameGFX::
-INCBIN "gfx/frames/1.1bpp"
-INCBIN "gfx/frames/2.1bpp"
-INCBIN "gfx/frames/3.1bpp"
-INCBIN "gfx/frames/4.1bpp"
-INCBIN "gfx/frames/5.1bpp"
-INCBIN "gfx/frames/6.1bpp"
-INCBIN "gfx/frames/7.1bpp"
-INCBIN "gfx/frames/8.1bpp"
-INCBIN "gfx/frames/9.1bpp"
-StatsSeparatorGFX::
-INCBIN "gfx/stats/separator.2bpp"
-StatsGFX::
-INCBIN "gfx/stats/stats.2bpp"
-HPExpBarBorderGFX::
-INCBIN "gfx/battle/hp_exp_bar_border.1bpp"
-ExpBarGFX::
-INCBIN "gfx/battle/exp_bar.2bpp"
-PokedexUnitsGFX::
-INCBIN "gfx/pokedex/m_kg.2bpp"
-PokedexGFX::
-INCBIN "gfx/pokedex/pokedex.2bpp"
-TownMapGFX::
-INCBIN "gfx/pokegear/town_map.2bpp"
-HUD_GFX::
-INCBIN "gfx/hud/hud.2bpp"
-BoldAlphabetGFX::
-INCBIN "gfx/font/alphabet.1bpp"
-AnnonAlphabetGFX::
-INCBIN "gfx/font/annon_alphabet.1bpp"
-INCBIN "gfx/font/gfx_f9322.1bpp"
-PackIconGFX::
-INCBIN "gfx/pack/pack_icons.2bpp"
+FrameGFXFirstFrame:: INCBIN "gfx/frames/1.1bpp" ; 0x0f8962--0x0f8992
+FrameGFXFirstFrameEnd::
+ INCBIN "gfx/frames/2.1bpp" ; 0x0f8992--0x0f89c2
+ INCBIN "gfx/frames/3.1bpp" ; 0x0f89c2--0x0f89f2
+ INCBIN "gfx/frames/4.1bpp" ; 0x0f89f2--0x0f8a22
+ INCBIN "gfx/frames/5.1bpp" ; 0x0f8a22--0x0f8a52
+ INCBIN "gfx/frames/6.1bpp" ; 0x0f8a52--0x0f8a82
+ INCBIN "gfx/frames/7.1bpp" ; 0x0f8a82--0x0f8ab2
+ INCBIN "gfx/frames/8.1bpp" ; 0x0f8ab2--0x0f8ae2
+ INCBIN "gfx/frames/9.1bpp" ; 0x0f8ae2--0x0f8b12
+StatsGFX:: INCBIN "gfx/stats/separator.2bpp" ; 0x0f8b12--0x0f8b22
+ INCBIN "gfx/stats/stats.2bpp" ; 0x0f8b22--0x0f8c22
+StatsGFXEnd::
+
+HpExpBarParts0GFX:: INCBIN "gfx/battle/hp_exp_bar_parts0.1bpp" ; 0x0f8c42--0x0f8c5a
+HpExpBarParts0GFXEnd::
+HpExpBarParts1GFX:: INCBIN "gfx/battle/hp_exp_bar_parts1.1bpp" ; 0x0f8c42--0x0f8c5a
+HpExpBarParts1GFXEnd::
+HpExpBarParts2GFX:: INCBIN "gfx/battle/hp_exp_bar_parts2.1bpp" ; 0x0f8c5a--0x0f8c6a
+HpExpBarParts2GFXEnd::
+HpExpBarParts3GFX:: INCBIN "gfx/battle/hp_exp_bar_parts3.1bpp" ; 0x0f8c6a--0x0f8c72
+HpExpBarParts3GFXEnd::
+ExpBarGFX:: INCBIN "gfx/battle/exp_bar.2bpp" ; 0x0f8c72--0x0f8cf2
+ExpBarGFXEnd::
+PokedexGFX:: INCBIN "gfx/pokedex/pokedex.2bpp" ; 0x0f8cf2--0x0f8dc2
+PokedexGFXEnd::
+PokedexLocationGFX:: INCBIN "gfx/pokedex/locations.2bpp" ; 0x0f8dc2--0x0f8e12
+PokedexLocationGFXEnd::
+TownMapGFX:: INCBIN "gfx/pokegear/town_map.2bpp" ; 0x0f8e12--0x0f8fc2
+TownMapGFXEnd::
+HUD_GFX:: INCBIN "gfx/hud/hud.2bpp" ; 0x0f8fc2--0x0f9052
+HUD_GFXEnd::
+BoldAlphabetGFX:: INCBIN "gfx/font/alphabet.1bpp"
+AnnonAlphabetGFX:: INCBIN "gfx/font/annon_alphabet.1bpp"
+EmptyTile1bppGFX:: INCBIN "gfx/misc/empty_tile.1bpp" ; 0x0f9322--0x0f932a
+EmptyTile1bppGFXEnd::
+BlackTileAndCursor1bppGFX:: INCBIN "gfx/misc/black_tile_cursor.1bpp" ; 0x0f932a--0x0f933a
+BlackTileAndCursor1bppGFXEnd::
+PackIconGFX:: INCBIN "gfx/pack/pack_icons.2bpp" ; 0x0f933a--0x0f941a
+PackIconGFXEnd::
SECTION "Town Map Cursor", ROMX[$506F], BANK[$3F]
TownMapCursorGFX::
diff --git a/gfx/battle/hp_bar.png b/gfx/battle/hp_bar.png
new file mode 100644
index 0000000..0492de5
--- /dev/null
+++ b/gfx/battle/hp_bar.png
Binary files differ
diff --git a/gfx/battle/hp_exp_bar_border.1bpp.png b/gfx/battle/hp_exp_bar_border.1bpp.png
deleted file mode 100644
index b2017a5..0000000
--- a/gfx/battle/hp_exp_bar_border.1bpp.png
+++ /dev/null
Binary files differ
diff --git a/gfx/battle/hp_exp_bar_parts0.1bpp.png b/gfx/battle/hp_exp_bar_parts0.1bpp.png
new file mode 100644
index 0000000..c598e00
--- /dev/null
+++ b/gfx/battle/hp_exp_bar_parts0.1bpp.png
Binary files differ
diff --git a/gfx/battle/hp_exp_bar_parts0.png b/gfx/battle/hp_exp_bar_parts0.png
new file mode 100644
index 0000000..1adb633
--- /dev/null
+++ b/gfx/battle/hp_exp_bar_parts0.png
Binary files differ
diff --git a/gfx/battle/hp_exp_bar_parts1.1bpp.png b/gfx/battle/hp_exp_bar_parts1.1bpp.png
new file mode 100644
index 0000000..e61d42d
--- /dev/null
+++ b/gfx/battle/hp_exp_bar_parts1.1bpp.png
Binary files differ
diff --git a/gfx/battle/hp_exp_bar_parts2.1bpp.png b/gfx/battle/hp_exp_bar_parts2.1bpp.png
new file mode 100644
index 0000000..d47530d
--- /dev/null
+++ b/gfx/battle/hp_exp_bar_parts2.1bpp.png
Binary files differ
diff --git a/gfx/battle/hp_exp_bar_parts3.1bpp.png b/gfx/battle/hp_exp_bar_parts3.1bpp.png
new file mode 100644
index 0000000..ccec114
--- /dev/null
+++ b/gfx/battle/hp_exp_bar_parts3.1bpp.png
Binary files differ
diff --git a/gfx/battle/levelup.png b/gfx/battle/levelup.png
new file mode 100644
index 0000000..65e0df2
--- /dev/null
+++ b/gfx/battle/levelup.png
Binary files differ
diff --git a/gfx/battle/markers.png b/gfx/battle/markers.png
new file mode 100644
index 0000000..23894da
--- /dev/null
+++ b/gfx/battle/markers.png
Binary files differ
diff --git a/gfx/font/font_extra.ab.png b/gfx/font/font_extra.ab.png
new file mode 100644
index 0000000..94f4ec6
--- /dev/null
+++ b/gfx/font/font_extra.ab.png
Binary files differ
diff --git a/gfx/font/font_extra.cdefghivslm.png b/gfx/font/font_extra.cdefghivslm.png
new file mode 100644
index 0000000..ebfe02c
--- /dev/null
+++ b/gfx/font/font_extra.cdefghivslm.png
Binary files differ
diff --git a/gfx/font/font_extra.png b/gfx/font/font_extra.png
deleted file mode 100644
index d0eb38f..0000000
--- a/gfx/font/font_extra.png
+++ /dev/null
Binary files differ
diff --git a/gfx/font/gfx_f9322.1bpp.png b/gfx/font/gfx_f9322.1bpp.png
deleted file mode 100644
index e386063..0000000
--- a/gfx/font/gfx_f9322.1bpp.png
+++ /dev/null
Binary files differ
diff --git a/gfx/font/small_kana_punctuation.png b/gfx/font/small_kana_punctuation.png
new file mode 100644
index 0000000..b02480d
--- /dev/null
+++ b/gfx/font/small_kana_punctuation.png
Binary files differ
diff --git a/gfx/frames/1.png b/gfx/frames/1.png
new file mode 100644
index 0000000..dca07fe
--- /dev/null
+++ b/gfx/frames/1.png
Binary files differ
diff --git a/gfx/misc/black_tile_cursor.1bpp.png b/gfx/misc/black_tile_cursor.1bpp.png
new file mode 100644
index 0000000..7fdc4f1
--- /dev/null
+++ b/gfx/misc/black_tile_cursor.1bpp.png
Binary files differ
diff --git a/gfx/misc/empty_tile.1bpp.png b/gfx/misc/empty_tile.1bpp.png
new file mode 100644
index 0000000..3233c13
--- /dev/null
+++ b/gfx/misc/empty_tile.1bpp.png
Binary files differ
diff --git a/gfx/misc/poke_balls.png b/gfx/misc/poke_balls.png
new file mode 100644
index 0000000..830f72b
--- /dev/null
+++ b/gfx/misc/poke_balls.png
Binary files differ
diff --git a/gfx/pokedex/locations.png b/gfx/pokedex/locations.png
new file mode 100644
index 0000000..c7e37a2
--- /dev/null
+++ b/gfx/pokedex/locations.png
Binary files differ
diff --git a/gfx/pokedex/m_kg.png b/gfx/pokedex/m_kg.png
deleted file mode 100644
index e26dada..0000000
--- a/gfx/pokedex/m_kg.png
+++ /dev/null
Binary files differ
diff --git a/gfx/pokedex/pokedex.png b/gfx/pokedex/pokedex.png
index 143835e..d4637ce 100644
--- a/gfx/pokedex/pokedex.png
+++ b/gfx/pokedex/pokedex.png
Binary files differ
diff --git a/gfx/pokegear/town_map.png b/gfx/pokegear/town_map.png
index 7889b09..69c06b4 100644
--- a/gfx/pokegear/town_map.png
+++ b/gfx/pokegear/town_map.png
Binary files differ
diff --git a/gfx/trainer_card/colon.png b/gfx/trainer_card/colon.png
new file mode 100644
index 0000000..56039e7
--- /dev/null
+++ b/gfx/trainer_card/colon.png
Binary files differ
diff --git a/gfx/trainer_card/id_no.png b/gfx/trainer_card/id_no.png
new file mode 100644
index 0000000..ad0f7d6
--- /dev/null
+++ b/gfx/trainer_card/id_no.png
Binary files differ
diff --git a/gfx/trainer_card/leaders.png b/gfx/trainer_card/leaders.png
index dceb21f..66c0919 100644
--- a/gfx/trainer_card/leaders.png
+++ b/gfx/trainer_card/leaders.png
Binary files differ
diff --git a/gfx/trainer_card/trainer_card.png b/gfx/trainer_card/trainer_card.png
index 8fa51d1..ecce895 100644
--- a/gfx/trainer_card/trainer_card.png
+++ b/gfx/trainer_card/trainer_card.png
Binary files differ
diff --git a/home/pokemon.asm b/home/pokemon.asm
index f990393..6cf1eb5 100644
--- a/home/pokemon.asm
+++ b/home/pokemon.asm
@@ -22,7 +22,7 @@ GetMonHeader:: ; 3a4b (0:3a4b)
dec a
ld bc, MonBaseStatsEnd - MonBaseStats
ld hl, MonBaseStats
- call AddAMulBC
+ call AddNTimes
ld de, wMonHeader
ld bc, MonBaseStatsEnd - MonBaseStats
call CopyBytes
diff --git a/home/print_hex.asm b/home/print_hex.asm
index 993e210..8292884 100644
--- a/home/print_hex.asm
+++ b/home/print_hex.asm
@@ -7,6 +7,7 @@ SECTION "Print Hexadecimal functions", ROM0[$355B]
endc
PrintHexBytes: ; 3597 (0:3597)
+; Print c hex bytes located at de to hl
.loop
push bc
call PrintHexByte
@@ -16,19 +17,22 @@ PrintHexBytes: ; 3597 (0:3597)
ret
PrintHexByte:: ; 35a0 (0:35a0)
+; Print one hex byte located at de to hl
ld a, [de]
swap a
and $0f
- call PrintHexDigit
+ call GetHexDigit
ld [hli], a
ld a, [de]
and $0f
- call PrintHexDigit
+ call GetHexDigit
ld [hli], a
inc de
ret
-PrintHexDigit: ; 35b2 (0:35b2)
+GetHexDigit: ; 35b2 (0:35b2)
+; Get a hex digit tile number
+; in a.
ld bc, .hexDigitTable
add c
ld c, a
diff --git a/home/math.asm b/home/util.asm
index 2f3b408..6591da2 100644
--- a/home/math.asm
+++ b/home/util.asm
@@ -1,9 +1,9 @@
-include "constants.asm"
+INCLUDE "constants.asm"
if DEBUG
-SECTION "Home Math", ROM0[$341F]
+SECTION "Misc Utility Functions", ROM0[$341F]
else
-SECTION "Home Math", ROM0[$33E3]
+SECTION "Misc Utility Functions", ROM0[$33E3]
endc
_341F:: ; 341f
@@ -17,15 +17,15 @@ _341F:: ; 341f
jr nz, .loop
ret
-AddAMulBC:: ; 3429
-; Returns hl + a * bc
- and a
- ret z
-.loop:
- add hl, bc
- dec a
- jr nz, .loop
- ret
+AddNTimes:: ; 3429 (0:3429)
+ and a
+ ret z
+.asm_342b
+ add hl, bc
+ dec a
+ jr nz, .asm_342b
+ ret
+; 0x3430
memcmp:: ; 3430
; Compare c bytes at hl and de
diff --git a/shim_gold.sym b/shim_gold.sym
index 2606b7e..a564b03 100644
--- a/shim_gold.sym
+++ b/shim_gold.sym
@@ -169,7 +169,6 @@
00:CDBE wTargetMapUnk
00:CDBF wTargetMapGroup
00:CDC0 wTargetMapId
-00:CE62 wTextBoxFlags
00:CE67 wPlayerName
01:D165 wTMCounts
01:D19E wItems
diff --git a/shim_gold_debug.sym b/shim_gold_debug.sym
index 036cc77..3106d67 100644
--- a/shim_gold_debug.sym
+++ b/shim_gold_debug.sym
@@ -169,7 +169,6 @@
00:CDBE wTargetMapUnk
00:CDBF wTargetMapGroup
00:CDC0 wTargetMapId
-00:CE62 wTextBoxFlags
00:CE67 wPlayerName
01:D165 wTMCounts
01:D19E wItems
diff --git a/shim_silver.sym b/shim_silver.sym
index 2606b7e..a564b03 100644
--- a/shim_silver.sym
+++ b/shim_silver.sym
@@ -169,7 +169,6 @@
00:CDBE wTargetMapUnk
00:CDBF wTargetMapGroup
00:CDC0 wTargetMapId
-00:CE62 wTextBoxFlags
00:CE67 wPlayerName
01:D165 wTMCounts
01:D19E wItems
diff --git a/shim_silver_debug.sym b/shim_silver_debug.sym
index 036cc77..3106d67 100644
--- a/shim_silver_debug.sym
+++ b/shim_silver_debug.sym
@@ -169,7 +169,6 @@
00:CDBE wTargetMapUnk
00:CDBF wTargetMapGroup
00:CDC0 wTargetMapId
-00:CE62 wTextBoxFlags
00:CE67 wPlayerName
01:D165 wTMCounts
01:D19E wItems
diff --git a/tools/dump_text.py b/tools/dump_text.py
index 057de04..808f674 100644
--- a/tools/dump_text.py
+++ b/tools/dump_text.py
@@ -163,7 +163,7 @@ control_codes = {
}
def print_location(data):
- return '.loc_{0:04X}:\n'.format(data['offset'])
+ return '.loc_{0:04X}:\n'.format(data['offset'] + (bank_size if data['source'] > bank_size else 0))
if __name__ == '__main__':
# argument parser
@@ -212,7 +212,12 @@ if __name__ == '__main__':
f.seek(bank_addr)
bank_data = f.read(bank_size)
- data = {'offset': offset, 'bytes': bank_data, 'len': min(end_offset, len(bank_data)), 'textmode': args.textmode}
+ data = {'offset': offset,
+ 'bytes': bank_data,
+ 'len': min(end_offset, len(bank_data)),
+ 'textmode': args.textmode,
+ 'source': bank_addr,
+ }
with open(outfile, 'wb') if outfile != sys.stdout else outfile.buffer as f:
string = print_location(data)
diff --git a/wram.asm b/wram.asm
index 44a4323..2209d5b 100644
--- a/wram.asm
+++ b/wram.asm
@@ -119,11 +119,22 @@ wVBCopyFarSrc:: ds 2 ; cb72
wVBCopyFarDst:: ds 2 ; cb74
wVBCopyFarSrcBank:: ds 1 ; cb76
-
SECTION "CBD2", WRAM0[$CBD2]
wcbd2:: ; cbd2
ds $14
+SECTION "CBF7", WRAM0[$CBF7]
+
+wActiveBackpackPocket:: db ; cbf7
+
+SECTION "CC09", WRAM0[$CC09]
+
+wMenuCursorBuffer:: db ; cc09
+
+SECTION "CC2A", WRAM0[$CC2A]
+
+wMenuCursorY:: db ; cc2a
+
SECTION "CC32", WRAM0[$CC32] ; Please merge when more is disassembled
wVBlankJoyFrameCounter: db ; cc32
@@ -184,7 +195,16 @@ SECTION "CD31", WRAM0[$CD31]
wcd31:: ; cd31
db
-SECTION "CD4A", WRAM0[$CD4A]
+SECTION "CD3E", WRAM0[$CD3D]
+
+wRegularItemsCursor:: db ; cd3d
+wBackpackAndKeyItemsCursor:: db ;cd3e
+wStartmenuCursor:: db ; cd3f
+ ds 4 ; TODO
+wRegularItemsScrollPosition:: db ; cd44
+wBackpackAndKeyItemsScrollPosition:: db ; cd45
+ ds 3 ; TODO
+wMenuScrollPosition:: db ; cd49
wTextDest:: ds 2; cd4a
@@ -321,7 +341,11 @@ SECTION "CE5F", WRAM0[$CE5F]
wce5f:: ; ce5f ; TODO
db
-SECTION "CE63", WRAM0[$CE63]
+SECTION "CE61", WRAM0[$CE61]
+
+wActiveFrame:: db ; ce61
+
+wTextBoxFlags:: db ; ce62
wce63:: db ; ce63
; 76543210
@@ -356,6 +380,15 @@ SECTION "D19E", WRAM0[$D19E]
wNumBagItems:: ; d19e
db
+SECTION "D1C8", WRAM0[$D1C8]
+
+wNumKeyItems:: db ; d1c8
+
+SECTION "D1DE", WRAM0[$D1DE]
+
+wNumBallItems:: db ; d1de
+
+
SECTION "D4AB", WRAM0[$D4AB]
wJoypadFlags:: db ; d4ab