summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.travis.yml24
-rw-r--r--engine/add_mon.asm78
-rw-r--r--engine/bcd.asm146
-rw-r--r--home.asm10
-rw-r--r--hram.asm1
-rwxr-xr-xscripts/oakslab.asm38
-rw-r--r--sram.asm8
-rw-r--r--text.asm26
-rwxr-xr-xwram.asm4
9 files changed, 179 insertions, 156 deletions
diff --git a/.travis.yml b/.travis.yml
new file mode 100644
index 00000000..bd38f51b
--- /dev/null
+++ b/.travis.yml
@@ -0,0 +1,24 @@
+language: c
+install:
+ - |-
+ path="$(pwd)"; cd;
+ wget https://github.com/rednex/rgbds/archive/v0.2.5.tar.gz -O rgbds.tar.gz &&
+ tar xf rgbds.tar.gz &&
+ cd rgbds-0.2.5 &&
+ sudo make install &&
+ cd - &&
+ rm -rf rgbds &&
+ cd "$path"
+before_script:
+ - |-
+ function check_status() {
+ if ! git diff-index --quiet --ignore-submodules=all HEAD --; then
+ echo 'Uncommitted changes detected:';
+ git diff-index HEAD --;
+ return 1;
+ fi;
+ }
+script:
+ - make
+ - make compare
+ - check_status
diff --git a/engine/add_mon.asm b/engine/add_mon.asm
index 19d03942..b2feeb12 100644
--- a/engine/add_mon.asm
+++ b/engine/add_mon.asm
@@ -340,13 +340,14 @@ _AddEnemyMonToPlayerParty:
_MoveMon:
ld a, [wMoveMonType]
- and a
+ and a ; BOX_TO_PARTY
jr z, .checkPartyMonSlots
cp DAYCARE_TO_PARTY
jr z, .checkPartyMonSlots
cp PARTY_TO_DAYCARE
ld hl, wDayCareMon
- jr z, .asm_f575
+ jr z, .findMonDataSrc
+ ; else it's PARTY_TO_BOX
ld hl, wNumInBox
ld a, [hl]
cp MONS_PER_BOX
@@ -369,24 +370,26 @@ _MoveMon:
ld a, [wMoveMonType]
cp DAYCARE_TO_PARTY
ld a, [wDayCareMon]
- jr z, .asm_f556
+ jr z, .copySpecies
ld a, [wcf91]
-.asm_f556
+.copySpecies
ld [hli], a ; write new mon ID
ld [hl], $ff ; write new sentinel
+.findMonDataDest
ld a, [wMoveMonType]
dec a
ld hl, wPartyMons
ld bc, wPartyMon2 - wPartyMon1 ; $2c
ld a, [wPartyCount]
- jr nz, .skipToNewMonEntry
+ jr nz, .addMonOffset
+ ; if it's PARTY_TO_BOX
ld hl, wBoxMons
ld bc, wBoxMon2 - wBoxMon1 ; $21
ld a, [wNumInBox]
-.skipToNewMonEntry
+.addMonOffset
dec a
call AddNTimes
-.asm_f575
+.findMonDataSrc
push hl
ld e, l
ld d, h
@@ -394,16 +397,16 @@ _MoveMon:
and a
ld hl, wBoxMons
ld bc, wBoxMon2 - wBoxMon1 ; $21
- jr z, .asm_f591
+ jr z, .addMonOffset2
cp DAYCARE_TO_PARTY
ld hl, wDayCareMon
- jr z, .asm_f597
+ jr z, .copyMonData
ld hl, wPartyMons
ld bc, wPartyMon2 - wPartyMon1 ; $2c
-.asm_f591
+.addMonOffset2
ld a, [wWhichPokemon]
call AddNTimes
-.asm_f597
+.copyMonData
push hl
push de
ld bc, wBoxMon2 - wBoxMon1
@@ -411,84 +414,85 @@ _MoveMon:
pop de
pop hl
ld a, [wMoveMonType]
- and a
- jr z, .asm_f5b4
+ and a ; BOX_TO_PARTY
+ jr z, .findOTdest
cp DAYCARE_TO_PARTY
- jr z, .asm_f5b4
+ jr z, .findOTdest
ld bc, wBoxMon2 - wBoxMon1
add hl, bc
- ld a, [hl]
+ ld a, [hl] ; hl = Level
inc de
inc de
inc de
- ld [de], a
-.asm_f5b4
+ ld [de], a ; de = BoxLevel
+.findOTdest
ld a, [wMoveMonType]
cp PARTY_TO_DAYCARE
ld de, wDayCareMonOT
- jr z, .asm_f5d3
- dec a
+ jr z, .findOTsrc
+ dec a
ld hl, wPartyMonOT
ld a, [wPartyCount]
- jr nz, .asm_f5cd
+ jr nz, .addOToffset
ld hl, wBoxMonOT
ld a, [wNumInBox]
-.asm_f5cd
+.addOToffset
dec a
call SkipFixedLengthTextEntries
ld d, h
ld e, l
-.asm_f5d3
+.findOTsrc
ld hl, wBoxMonOT
ld a, [wMoveMonType]
and a
- jr z, .asm_f5e6
+ jr z, .addOToffset2
ld hl, wDayCareMonOT
cp DAYCARE_TO_PARTY
- jr z, .asm_f5ec
+ jr z, .copyOT
ld hl, wPartyMonOT
-.asm_f5e6
+.addOToffset2
ld a, [wWhichPokemon]
call SkipFixedLengthTextEntries
-.asm_f5ec
+.copyOT
ld bc, NAME_LENGTH
call CopyData
ld a, [wMoveMonType]
+.findNickDest
cp PARTY_TO_DAYCARE
ld de, wDayCareMonName
- jr z, .asm_f611
+ jr z, .findNickSrc
dec a
ld hl, wPartyMonNicks
ld a, [wPartyCount]
- jr nz, .asm_f60b
+ jr nz, .addNickOffset
ld hl, wBoxMonNicks
ld a, [wNumInBox]
-.asm_f60b
+.addNickOffset
dec a
call SkipFixedLengthTextEntries
ld d, h
ld e, l
-.asm_f611
+.findNickSrc
ld hl, wBoxMonNicks
ld a, [wMoveMonType]
and a
- jr z, .asm_f624
+ jr z, .addNickOffset2
ld hl, wDayCareMonName
cp DAYCARE_TO_PARTY
- jr z, .asm_f62a
+ jr z, .copyNick
ld hl, wPartyMonNicks
-.asm_f624
+.addNickOffset2
ld a, [wWhichPokemon]
call SkipFixedLengthTextEntries
-.asm_f62a
+.copyNick
ld bc, NAME_LENGTH
call CopyData
pop hl
ld a, [wMoveMonType]
cp PARTY_TO_BOX
- jr z, .asm_f664
+ jr z, .done
cp PARTY_TO_DAYCARE
- jr z, .asm_f664
+ jr z, .done
push hl
srl a
add $2
@@ -507,6 +511,6 @@ _MoveMon:
add hl, bc
ld b, $1
call CalcStats
-.asm_f664
+.done
and a
ret
diff --git a/engine/bcd.asm b/engine/bcd.asm
index 3e693e1f..2d0b43df 100644
--- a/engine/bcd.asm
+++ b/engine/bcd.asm
@@ -6,155 +6,157 @@ DivideBCDPredef4::
DivideBCD::
xor a
- ld [$ffa5], a
- ld [$ffa6], a
- ld [$ffa7], a
+ ld [hDivideBCDBuffer], a
+ ld [hDivideBCDBuffer+1], a
+ ld [hDivideBCDBuffer+2], a
ld d, $1
-.asm_f72a
- ld a, [$ffa2]
+.mulBy10Loop
+; multiply the divisor by 10 until the leading digit is nonzero
+; to set up the standard long division algorithm
+ ld a, [hDivideBCDDivisor]
and $f0
- jr nz, .asm_f75b
+ jr nz, .next
inc d
- ld a, [$ffa2]
+ ld a, [hDivideBCDDivisor]
swap a
and $f0
ld b, a
- ld a, [$ffa3]
+ ld a, [hDivideBCDDivisor+1]
swap a
- ld [$ffa3], a
+ ld [hDivideBCDDivisor+1], a
and $f
or b
- ld [$ffa2], a
- ld a, [$ffa3]
+ ld [hDivideBCDDivisor], a
+ ld a, [hDivideBCDDivisor+1]
and $f0
ld b, a
- ld a, [$ffa4]
+ ld a, [hDivideBCDDivisor+2]
swap a
- ld [$ffa4], a
+ ld [hDivideBCDDivisor+2], a
and $f
or b
- ld [$ffa3], a
- ld a, [$ffa4]
+ ld [hDivideBCDDivisor+1], a
+ ld a, [hDivideBCDDivisor+2]
and $f0
- ld [$ffa4], a
- jr .asm_f72a
-.asm_f75b
+ ld [hDivideBCDDivisor+2], a
+ jr .mulBy10Loop
+.next
push de
push de
- call DivideBCD_f800
+ call DivideBCD_getNextDigit
pop de
ld a, b
swap a
and $f0
- ld [$ffa5], a
+ ld [hDivideBCDBuffer], a
dec d
- jr z, .asm_f7bc
+ jr z, .next2
push de
- call DivideBCD_f7d7
- call DivideBCD_f800
+ call DivideBCD_divDivisorBy10
+ call DivideBCD_getNextDigit
pop de
- ld a, [$ffa5]
+ ld a, [hDivideBCDBuffer]
or b
- ld [$ffa5], a
+ ld [hDivideBCDBuffer], a
dec d
- jr z, .asm_f7bc
+ jr z, .next2
push de
- call DivideBCD_f7d7
- call DivideBCD_f800
+ call DivideBCD_divDivisorBy10
+ call DivideBCD_getNextDigit
pop de
ld a, b
swap a
and $f0
- ld [$ffa6], a
+ ld [hDivideBCDBuffer+1], a
dec d
- jr z, .asm_f7bc
+ jr z, .next2
push de
- call DivideBCD_f7d7
- call DivideBCD_f800
+ call DivideBCD_divDivisorBy10
+ call DivideBCD_getNextDigit
pop de
- ld a, [$ffa6]
+ ld a, [hDivideBCDBuffer+1]
or b
- ld [$ffa6], a
+ ld [hDivideBCDBuffer+1], a
dec d
- jr z, .asm_f7bc
+ jr z, .next2
push de
- call DivideBCD_f7d7
- call DivideBCD_f800
+ call DivideBCD_divDivisorBy10
+ call DivideBCD_getNextDigit
pop de
ld a, b
swap a
and $f0
- ld [$ffa7], a
+ ld [hDivideBCDBuffer+2], a
dec d
- jr z, .asm_f7bc
+ jr z, .next2
push de
- call DivideBCD_f7d7
- call DivideBCD_f800
+ call DivideBCD_divDivisorBy10
+ call DivideBCD_getNextDigit
pop de
- ld a, [$ffa7]
+ ld a, [hDivideBCDBuffer+2]
or b
- ld [$ffa7], a
-.asm_f7bc
- ld a, [$ffa5]
- ld [$ffa2], a
- ld a, [$ffa6]
- ld [$ffa3], a
- ld a, [$ffa7]
- ld [$ffa4], a
+ ld [hDivideBCDBuffer+2], a
+.next2
+ ld a, [hDivideBCDBuffer]
+ ld [hDivideBCDQuotient], a ; the same memory location as hDivideBCDDivisor
+ ld a, [hDivideBCDBuffer+1]
+ ld [hDivideBCDQuotient+1], a
+ ld a, [hDivideBCDBuffer+2]
+ ld [hDivideBCDQuotient+2], a
pop de
- ld a, $6
+ ld a, $6
sub d
and a
ret z
-.asm_f7ce
+.divResultBy10loop
push af
- call DivideBCD_f7d7
+ call DivideBCD_divDivisorBy10
pop af
dec a
- jr nz, .asm_f7ce
+ jr nz, .divResultBy10loop
ret
-DivideBCD_f7d7:
- ld a, [$ffa4]
+DivideBCD_divDivisorBy10:
+ ld a, [hDivideBCDDivisor+2]
swap a
and $f
ld b, a
- ld a, [$ffa3]
+ ld a, [hDivideBCDDivisor+1]
swap a
- ld [$ffa3], a
+ ld [hDivideBCDDivisor+1], a
and $f0
or b
- ld [$ffa4], a
- ld a, [$ffa3]
+ ld [hDivideBCDDivisor+2], a
+ ld a, [hDivideBCDDivisor+1]
and $f
ld b, a
- ld a, [$ffa2]
+ ld a, [hDivideBCDDivisor]
swap a
- ld [$ffa2], a
+ ld [hDivideBCDDivisor], a
and $f0
or b
- ld [$ffa3], a
- ld a, [$ffa2]
+ ld [hDivideBCDDivisor+1], a
+ ld a, [hDivideBCDDivisor]
and $f
- ld [$ffa2], a
+ ld [hDivideBCDDivisor], a
ret
-DivideBCD_f800:
+DivideBCD_getNextDigit:
ld bc, $3
-.asm_f803
- ld de, $ff9f
- ld hl, $ffa2
+.loop
+ ld de, hMoney ; the dividend
+ ld hl, hDivideBCDDivisor
push bc
call StringCmp
pop bc
ret c
inc b
- ld de, $ffa1
- ld hl, $ffa4
+ ld de, hMoney+2 ; since SubBCD works starting from the least significant digit
+ ld hl, hDivideBCDDivisor+2
push bc
call SubBCD
pop bc
- jr .asm_f803
+ jr .loop
AddBCDPredef::
diff --git a/home.asm b/home.asm
index cd2e0fdd..9fee1ed0 100644
--- a/home.asm
+++ b/home.asm
@@ -30,7 +30,7 @@ SECTION "joypad", ROM0 [$60]
reti
-SECTION "Home", ROM0
+SECTION "Home", ROM0 [$61]
DisableLCD::
xor a
@@ -99,7 +99,7 @@ SECTION "Header", ROM0 [$104]
-SECTION "Main", ROM0
+SECTION "Main", ROM0 [$150]
Start::
cp GBC
@@ -208,7 +208,7 @@ DrawHPBar::
and a
jr nz, .fill
- ; If c iz nonzero, draw a pixel anyway.
+ ; If c is nonzero, draw a pixel anyway.
ld a, c
and a
jr z, .done
@@ -2539,7 +2539,7 @@ EngageMapTrainer::
ld a, [hli] ; load trainer class
ld [wEngagedTrainerClass], a
ld a, [hl] ; load trainer mon set
- ld [wEnemyMonAttackMod], a
+ ld [wEngagedTrainerSet], a
jp PlayTrainerMusic
PrintEndBattleText::
@@ -4124,7 +4124,7 @@ EraseMenuCursor::
; The reason is that most functions that call this initialize H_DOWNARROWBLINKCNT1 to 0.
; The effect is that if the tile at hl is initialized with a down arrow,
; this function will toggle that down arrow on and off, but if the tile isn't
-; initliazed with a down arrow, this function does nothing.
+; initialized with a down arrow, this function does nothing.
; That allows this to be called without worrying about if a down arrow should
; be blinking.
HandleDownArrowBlinkTiming::
diff --git a/hram.asm b/hram.asm
index f5817fa4..9c13e5a1 100644
--- a/hram.asm
+++ b/hram.asm
@@ -155,6 +155,7 @@ hCoins EQU $FFA0 ; 2-byte BCD number
hDivideBCDDivisor EQU $FFA2 ; 3-byte BCD number
hDivideBCDQuotient EQU $FFA2 ; 3-byte BCD number
+hDivideBCDBuffer EQU $FFA5 ; 3-byte BCD number
hSerialReceivedNewData EQU $FFA9
diff --git a/scripts/oakslab.asm b/scripts/oakslab.asm
index b91abd43..e73d7cf8 100755
--- a/scripts/oakslab.asm
+++ b/scripts/oakslab.asm
@@ -712,7 +712,7 @@ OaksLabScript_1d02b:
ret
OaksLabScript_1d076:
- ld hl, OaksLabTextPointers + $36 ; starts at OaksLabText28
+ ld hl, OaksLabTextPointers2
ld a, l
ld [wMapTextPtr], a
ld a, h
@@ -747,19 +747,20 @@ OaksLabTextPointers:
dw OaksLabText25
dw OaksLabText26
dw OaksLabText27
- dw OaksLabText28
- dw OaksLabText29
- dw OaksLabText30
- dw OaksLabText31
- dw OaksLabText32
- dw OaksLabText33
- dw OaksLabText34
- dw OaksLabText35
- dw OaksLabText36
- dw OaksLabText37
- dw OaksLabText38
-
-OaksLabText28:
+
+OaksLabTextPointers2:
+ dw OaksLabText1
+ dw OaksLabText2
+ dw OaksLabText3
+ dw OaksLabText4
+ dw OaksLabText5
+ dw OaksLabText6
+ dw OaksLabText7
+ dw OaksLabText8
+ dw OaksLabText9
+ dw OaksLabText10
+ dw OaksLabText11
+
OaksLabText1:
TX_ASM
CheckEvent EVENT_FOLLOWED_OAK_INTO_LAB_2
@@ -791,7 +792,6 @@ OaksLabText41:
TX_FAR _OaksLabText41
db "@"
-OaksLabText29:
OaksLabText2:
TX_ASM
ld a, STARTER2
@@ -802,7 +802,6 @@ OaksLabText2:
ld b, $2
jr OaksLabScript_1d133
-OaksLabText30:
OaksLabText3:
TX_ASM
ld a, STARTER3
@@ -813,7 +812,6 @@ OaksLabText3:
ld b, $3
jr OaksLabScript_1d133
-OaksLabText31:
OaksLabText4:
TX_ASM
ld a, STARTER1
@@ -1070,8 +1068,6 @@ OaksLabText_1d31d:
TX_FAR _OaksLabText_1d31d
db "@"
-OaksLabText34:
-OaksLabText33:
OaksLabText7:
OaksLabText6:
TX_ASM
@@ -1083,12 +1079,10 @@ OaksLabText_1d32c:
TX_FAR _OaksLabText_1d32c
db "@"
-OaksLabText35:
OaksLabText8:
TX_FAR _OaksLabText8
db "@"
-OaksLabText36:
OaksLabText9:
TX_ASM
ld hl, OaksLabText_1d340
@@ -1227,8 +1221,6 @@ OaksLabText27:
TX_FAR _OaksLabText27
db "@"
-OaksLabText38:
-OaksLabText37:
OaksLabText11:
OaksLabText10:
TX_ASM
diff --git a/sram.asm b/sram.asm
index 3e7b3e16..3b51df77 100644
--- a/sram.asm
+++ b/sram.asm
@@ -1,4 +1,4 @@
-SECTION "Sprite Buffers", SRAM, BANK[0]
+SECTION "Sprite Buffers", SRAM[$a000], BANK[0]
sSpriteBuffer0:: ds SPRITEBUFFERSIZE ; a000
sSpriteBuffer1:: ds SPRITEBUFFERSIZE ; a188
@@ -9,7 +9,7 @@ sSpriteBuffer2:: ds SPRITEBUFFERSIZE ; a310
sHallOfFame:: ds HOF_TEAM * HOF_TEAM_CAPACITY ; a598
-SECTION "Save Data", SRAM, BANK[1]
+SECTION "Save Data", SRAM[$a000], BANK[1]
ds $598
sPlayerName:: ds NAME_LENGTH ; a598
@@ -21,7 +21,7 @@ sTilesetType:: ds 1 ; b522
sMainDataCheckSum:: ds 1 ; b523
-SECTION "Saved Boxes 1", SRAM, BANK[2]
+SECTION "Saved Boxes 1", SRAM[$a000], BANK[2]
sBox1:: ds wBoxDataEnd - wBoxDataStart ; a000
sBox2:: ds wBoxDataEnd - wBoxDataStart ; a462
@@ -33,7 +33,7 @@ sBank2AllBoxesChecksum:: ds 1 ; ba4c
sBank2IndividualBoxChecksums:: ds 6 ; ba4d
-SECTION "Saved Boxes 2", SRAM, BANK[3]
+SECTION "Saved Boxes 2", SRAM[$a000], BANK[3]
sBox7:: ds wBoxDataEnd - wBoxDataStart ; a000
sBox8:: ds wBoxDataEnd - wBoxDataStart ; a462
diff --git a/text.asm b/text.asm
index 5f958021..96101583 100644
--- a/text.asm
+++ b/text.asm
@@ -19,7 +19,7 @@ INCLUDE "macros.asm"
INCLUDE "hram.asm"
-SECTION "Text 1", ROMX, BANK[TEXT_1]
+SECTION "Text 1", ROMX[$4000], BANK[TEXT_1]
_CardKeySuccessText1::
text "Bingo! @@"
@@ -205,7 +205,7 @@ INCLUDE "text/maps/silph_co_4f.asm"
INCLUDE "text/maps/silph_co_5f_1.asm"
-SECTION "Text 2", ROMX, BANK[TEXT_2]
+SECTION "Text 2", ROMX[$4000], BANK[TEXT_2]
INCLUDE "text/maps/silph_co_5f_2.asm"
INCLUDE "text/maps/silph_co_6f.asm"
@@ -237,7 +237,7 @@ INCLUDE "text/maps/agatha.asm"
INCLUDE "text/maps/rock_tunnel_b2f_1.asm"
-SECTION "Text 3", ROMX, BANK[TEXT_3]
+SECTION "Text 3", ROMX[$4000], BANK[TEXT_3]
INCLUDE "text/maps/rock_tunnel_b2f_2.asm"
INCLUDE "text/maps/seafoam_islands_b4f.asm"
@@ -2097,7 +2097,7 @@ INCLUDE "text/maps/saffron_gates.asm"
INCLUDE "text/maps/daycare_1.asm"
-SECTION "Text 4", ROMX, BANK[TEXT_4]
+SECTION "Text 4", ROMX[$4000], BANK[TEXT_4]
INCLUDE "text/maps/daycare_2.asm"
INCLUDE "text/maps/underground_path_route_6_entrance.asm"
@@ -2136,7 +2136,7 @@ INCLUDE "text/maps/route_10.asm"
INCLUDE "text/maps/route_11_1.asm"
-SECTION "Text 5", ROMX, BANK[TEXT_5]
+SECTION "Text 5", ROMX[$4000], BANK[TEXT_5]
INCLUDE "text/maps/route_11_2.asm"
INCLUDE "text/maps/route_12.asm"
@@ -2154,7 +2154,7 @@ INCLUDE "text/maps/route_23.asm"
INCLUDE "text/maps/route_24_1.asm"
-SECTION "Text 6", ROMX, BANK[TEXT_6]
+SECTION "Text 6", ROMX[$4000], BANK[TEXT_6]
INCLUDE "text/maps/route_24_2.asm"
INCLUDE "text/maps/route_25.asm"
@@ -2503,7 +2503,7 @@ INCLUDE "text/maps/museum_2f.asm"
INCLUDE "text/maps/pewter_gym_1.asm"
-SECTION "Text 7", ROMX, BANK[TEXT_7]
+SECTION "Text 7", ROMX[$4000], BANK[TEXT_7]
INCLUDE "text/maps/pewter_gym_2.asm"
INCLUDE "text/maps/pewter_house_1.asm"
@@ -2535,7 +2535,7 @@ INCLUDE "text/maps/vermilion_mart.asm"
INCLUDE "text/maps/vermilion_gym_1.asm"
-SECTION "Text 8", ROMX, BANK[TEXT_8]
+SECTION "Text 8", ROMX[$4000], BANK[TEXT_8]
INCLUDE "text/maps/vermilion_gym_2.asm"
INCLUDE "text/maps/vermilion_house.asm"
@@ -2567,7 +2567,7 @@ INCLUDE "text/maps/safari_zone_entrance.asm"
INCLUDE "text/maps/fuchsia_gym_1.asm"
-SECTION "Text 9", ROMX, BANK[TEXT_9]
+SECTION "Text 9", ROMX[$4000], BANK[TEXT_9]
INCLUDE "text/maps/fuchsia_gym_2.asm"
INCLUDE "text/maps/fuchsia_meeting_room.asm"
@@ -2827,7 +2827,7 @@ _CableClubNPCLinkClosedBecauseOfInactivityText::
done
-SECTION "Text 10", ROMX, BANK[TEXT_10]
+SECTION "Text 10", ROMX[$4000], BANK[TEXT_10]
_CableClubNPCPleaseComeAgainText::
text "Komm jederzeit"
@@ -3212,7 +3212,7 @@ _BoxFullCannotThrowBallText::
prompt
-SECTION "Text 11", ROMX, BANK[TEXT_11]
+SECTION "Text 11", ROMX[$4000], BANK[TEXT_11]
_ItemUseText001::
text "<PLAYER> setzt@@"
@@ -3427,11 +3427,11 @@ _UsedCutText::
prompt
-SECTION "Pokedex Text", ROMX, BANK[POKEDEX_TEXT]
+SECTION "Pokedex Text", ROMX[$4000], BANK[POKEDEX_TEXT]
INCLUDE "text/pokedex.asm"
-SECTION "Move Names", ROMX, BANK[MOVE_NAMES]
+SECTION "Move Names", ROMX[$4000], BANK[MOVE_NAMES]
INCLUDE "text/move_names.asm"
diff --git a/wram.asm b/wram.asm
index ebfd8aa5..de038c5c 100755
--- a/wram.asm
+++ b/wram.asm
@@ -60,7 +60,7 @@ battle_struct: MACRO
ENDM
-SECTION "WRAM Bank 0", WRAM0
+SECTION "WRAM Bank 0", WRAM0 [$c000]
wUnusedC000:: ; c000
ds 1
@@ -1416,7 +1416,7 @@ wStatusScreenHPBarColor:: ; cf25
ds 7
-wCopyingSGBTileData:: ; c2fd
+wCopyingSGBTileData:: ; cf2d
wWhichPartyMenuHPBar:: ; cf2d