From 51106cccd02ba305b1aa12b644f5a0e9193fd555 Mon Sep 17 00:00:00 2001 From: Adelaide Walter Date: Wed, 3 Jan 2018 00:19:54 -0500 Subject: [PATCH] Scrub WRAM addresses from comments & use WRAM1_Begin where appropriate. --- data/default_options.asm | 3 +-- engine/events/battle_tower.asm | 2 +- engine/gbc_only.asm | 4 ++-- engine/link.asm | 7 ------- home/init.asm | 2 +- 5 files changed, 5 insertions(+), 13 deletions(-) diff --git a/data/default_options.asm b/data/default_options.asm index 8787b00c7..a4b8979d6 100644 --- a/data/default_options.asm +++ b/data/default_options.asm @@ -11,8 +11,7 @@ DefaultOptions: ; 14f7c db GBPRINTER_NORMAL ; Options2: menu account on db 1 << MENU_ACCOUNT -; $cfd2: ?? + db $00 -; $cfd3: ?? db $00 ; 14f84 diff --git a/engine/events/battle_tower.asm b/engine/events/battle_tower.asm index a0de6ee84..530bdf41c 100644 --- a/engine/events/battle_tower.asm +++ b/engine/events/battle_tower.asm @@ -100,7 +100,7 @@ Function_LoadRandomBattleTowerPkmn: ; 1f8081 .FindARandomBattleTowerPkmn: ; From Which LevelGroup are the Pkmn loaded ; a = 1..10 - ld a, [wBTChoiceOfLvlGroup] ; [$d800] + ld a, [wBTChoiceOfLvlGroup] dec a ld hl, BattleTowerMons ld bc, BattleTowerMons2 - BattleTowerMons1 diff --git a/engine/gbc_only.asm b/engine/gbc_only.asm index efceae701..ad2785fa9 100644 --- a/engine/gbc_only.asm +++ b/engine/gbc_only.asm @@ -10,7 +10,7 @@ GBCOnlyScreen: ; 4ea82 call ClearTileMap ld hl, GBCOnlyGFX - ld de, $d000 + ld de, WRAM1_Begin ld a, [rSVBK] push af ld a, 0 @@ -19,7 +19,7 @@ GBCOnlyScreen: ; 4ea82 pop af ld [rSVBK], a - ld de, $d000 + ld de, WRAM1_Begin ld hl, vTiles2 lb bc, BANK(GBCOnlyGFX), $54 call Get2bpp diff --git a/engine/link.asm b/engine/link.asm index 5c45707d7..30d775350 100755 --- a/engine/link.asm +++ b/engine/link.asm @@ -811,31 +811,24 @@ Link_PrepPartyData_Gen2: ; 28595 inc de dec b jr nz, .loop1 - ; de = $c806 ld hl, PlayerName ld bc, NAME_LENGTH call CopyBytes - ; de = $c811 ld hl, PartyCount ld bc, 1 + PARTY_LENGTH + 1 call CopyBytes - ; de = $c819 ld hl, PlayerID ld bc, 2 call CopyBytes - ; de = $c81b ld hl, PartyMon1Species ld bc, PARTY_LENGTH * PARTYMON_STRUCT_LENGTH call CopyBytes - ; de = $c93b ld hl, PartyMonOT ld bc, PARTY_LENGTH * NAME_LENGTH call CopyBytes - ; de = $c97d ld hl, PartyMonNicknames ld bc, PARTY_LENGTH * PKMN_NAME_LENGTH call CopyBytes - ; de = $c9bf ; Okay, we did all that. Now, are we in the trade center? ld a, [wLinkMode] diff --git a/home/init.asm b/home/init.asm index 8895da0f9..a65f75332 100644 --- a/home/init.asm +++ b/home/init.asm @@ -55,7 +55,7 @@ Init:: ; 17d ld [rOBP1], a ld [rTMA], a ld [rTAC], a - ld [$d000], a + ld [WRAM1_Begin], a ld a, %100 ; Start timer at 4096Hz ld [rTAC], a