diff --git a/home.asm b/home.asm index a2aca0577..67a590fa6 100644 --- a/home.asm +++ b/home.asm @@ -67,7 +67,7 @@ INCLUDE "home/flag.asm" Function2ebb:: ; 2ebb - ld a, [$c2cc] + ld a, [wc2cc] bit 1, a ret z ld a, [hJoyDown] @@ -88,7 +88,7 @@ Function2ec8:: ; 2ec8 Function2ecb:: ; 2ecb push hl - ld hl, $c2cc + ld hl, wc2cc bit 1, [hl] pop hl ret @@ -103,13 +103,13 @@ Function2ed3:: ; 0x2ed3 res 0, a ld [VramState], a ld a, $0 - ld [$c2ce], a + ld [wc2ce], a ret ; 0x2ee4 Function2ee4:: ; 2ee4 ld a, $1 - ld [$c2ce], a + ld [wc2ce], a ld a, [VramState] set 0, a ld [VramState], a @@ -218,7 +218,7 @@ Function309d:: ; 309d ld a, 2 ld [rSVBK], a ld hl, TileMap - ld de, $d000 + ld de, wd000 ld bc, TileMapEnd - TileMap call CopyBytes pop af @@ -240,7 +240,7 @@ Function30bf:: ; 30bf push af ld a, 2 ld [rSVBK], a - ld hl, $d000 + ld hl, wd000 ld de, TileMap ld bc, TileMapEnd - TileMap call CopyBytes @@ -323,15 +323,15 @@ PrintLetterDelay:: ; 313d ; mid: 3 frames ; slow: 5 frames -; $cfcf[!0] and A or B override text speed with a one-frame delay. -; Options[4] and $cfcf[!1] disable the delay. +; TextBoxFrame + 1[!0] and A or B override text speed with a one-frame delay. +; Options[4] and TextBoxFrame + 1[!1] disable the delay. ld a, [Options] bit NO_TEXT_SCROLL, a ret nz ; non-scrolling text? - ld a, [$cfcf] + ld a, [TextBoxFrame + 1] bit 1, a ret z @@ -348,7 +348,7 @@ PrintLetterDelay:: ; 313d ld [hl], a ; force fast scroll? - ld a, [$cfcf] + ld a, [TextBoxFrame + 1] bit 0, a jr z, .fast @@ -367,7 +367,7 @@ PrintLetterDelay:: ; 313d call GetJoypad ; input override - ld a, [$c2d7] + ld a, [wc2d7] and a jr nz, .wait @@ -482,16 +482,16 @@ CallPointerAt:: ; 31be Function31cd:: ; 31cd -; Push pointer hl in the current bank to $d0e8. +; Push pointer hl in the current bank to wd0e8. ld a, [hROMBank] Function31cf:: ; 31cf -; Push pointer a:hl to $d0e8. - ld [$d0e8], a +; Push pointer a:hl to wd0e8. + ld [wd0e8], a ld a, l - ld [$d0e9], a + ld [wd0e9], a ld a, h - ld [$d0ea], a + ld [wd0e9 + 1], a ret ; 31db @@ -578,7 +578,7 @@ Function321c:: ; 321c and a jr z, .dmg - ld a, [$c2ce] + ld a, [wc2ce] cp 0 jr z, .dmg @@ -789,7 +789,7 @@ GetHPPal:: ; 3353 CountSetBits:: ; 0x335f ; Count the number of set bits in b bytes starting from hl. -; Return in a, c and [$d265]. +; Return in a, c and [wd265]. ld c, 0 .next @@ -809,7 +809,7 @@ CountSetBits:: ; 0x335f jr nz, .next ld a, c - ld [$d265], a + ld [wd265], a ret ; 0x3376 @@ -839,7 +839,7 @@ NamesPointers:: ; 33ab ; 33c3 GetName:: ; 33c3 -; Return name CurSpecies from name list $cf61 in StringBuffer1. +; Return name CurSpecies from name list wcf61 in StringBuffer1. ld a, [hROMBank] push af @@ -847,12 +847,12 @@ GetName:: ; 33c3 push bc push de - ld a, [$cf61] + ld a, [wcf61] cp PKMN_NAME jr nz, .NotPokeName ld a, [CurSpecies] - ld [$d265], a + ld [wd265], a call GetPokemonName ld hl, PKMN_NAME_LENGTH add hl, de @@ -861,7 +861,7 @@ GetName:: ; 33c3 jr .done .NotPokeName - ld a, [$cf61] + ld a, [wcf61] dec a ld e, a ld d, 0 @@ -885,9 +885,9 @@ GetName:: ; 33c3 .done ld a, e - ld [$d102], a + ld [wd102], a ld a, d - ld [$d103], a + ld [wd103], a pop de pop bc @@ -946,7 +946,7 @@ GetBasePokemonName:: ; 3420 GetPokemonName:: ; 343b -; Get Pokemon name $d265. +; Get Pokemon name wd265. ld a, [hROMBank] push af @@ -955,7 +955,7 @@ GetPokemonName:: ; 343b rst Bankswitch ; Each name is ten characters - ld a, [$d265] + ld a, [wd265] dec a ld d, 0 ld e, a @@ -985,18 +985,18 @@ GetPokemonName:: ; 343b GetItemName:: ; 3468 -; Get item name $d265. +; Get item name wd265. push hl push bc - ld a, [$d265] + ld a, [wd265] cp TM_01 jr nc, .TM ld [CurSpecies], a ld a, ITEM_NAME - ld [$cf61], a + ld [wcf61], a call GetName jr .Copied .TM @@ -1010,12 +1010,12 @@ GetItemName:: ; 3468 GetTMHMName:: ; 3487 -; Get TM/HM name by item id $d265. +; Get TM/HM name by item id wd265. push hl push de push bc - ld a, [$d265] + ld a, [wd265] push af ; TM/HM prefix @@ -1037,7 +1037,7 @@ GetTMHMName:: ; 3487 ; TM/HM number push de - ld a, [$d265] + ld a, [wd265] ld c, a callab GetTMHMNumber pop de @@ -1075,7 +1075,7 @@ GetTMHMName:: ; 3487 ld [de], a pop af - ld [$d265], a + ld [wd265], a pop bc pop de pop hl @@ -1125,9 +1125,9 @@ GetMoveName:: ; 34f8 push hl ld a, MOVE_NAME - ld [$cf61], a + ld [wcf61], a - ld a, [$d265] ; move id + ld a, [wd265] ; move id ld [CurSpecies], a call GetName @@ -1153,7 +1153,7 @@ Function350c:: ; 350c pop af rst Bankswitch - ld a, [$cf73] + ld a, [wcf73] ret ; 3524 @@ -1165,16 +1165,16 @@ Function3524:: ; 3524 ; 352f Function352f:: ; 352f - ld a, [$cf82] + ld a, [wcf82] dec a ld b, a - ld a, [$cf84] + ld a, [wcf84] sub b ld d, a - ld a, [$cf83] + ld a, [wcf83] dec a ld c, a - ld a, [$cf85] + ld a, [wcf85] sub c ld e, a push de @@ -1266,11 +1266,11 @@ Function3599:: ; 3599 ; 35b0 Function35b0:: ; 35b0 - ld hl, $dbfc + ld hl, wdbf9 + 3 ld a, [hli] ld h, [hl] ld l, a - ld a, [$dbfb] + ld a, [wdbf9 + 2] and a jr z, .asm_35d3 @@ -1304,7 +1304,7 @@ Function35b0:: ; 35b0 .asm_35d5 pop af ld d, a - ld a, [$dbfb] + ld a, [wdbf9 + 2] sub d inc a scf @@ -1451,17 +1451,17 @@ CheckTrainerBattle:: ; 360d pop af ld [$ffe0], a ld a, b - ld [$d03f], a + ld [CurFruit], a ld a, c - ld [$d040], a + ld [wd040], a jr Function367e ; 3674 Function3674:: ; 3674 ld a, $1 - ld [$d03f], a + ld [CurFruit], a ld a, $ff - ld [$d040], a + ld [wd040], a Function367e:: ; 367e call GetMapScriptHeaderBank @@ -1472,12 +1472,12 @@ Function367e:: ; 367e add hl, bc ld a, [EngineBuffer1] call GetFarHalfword - ld de, $d041 + ld de, wd041 ld bc, $000d ld a, [EngineBuffer1] call FarCopyBytes xor a - ld [$d04d], a + ld [wd04d], a scf ret ; 36a5 @@ -1596,15 +1596,15 @@ Function3718:: ; 3718 cp BATTLETYPE_CANLOSE jr .asm_3724 - ld hl, $d047 + ld hl, WalkingTile jr .asm_3731 .asm_3724 - ld a, [$d0ee] - ld hl, $d047 + ld a, [wd0ee] + ld hl, WalkingTile and $f jr z, .asm_3731 - ld hl, $d049 + ld hl, wd048 + 1 .asm_3731 ld a, [hli] @@ -1702,7 +1702,7 @@ DrawHPBar:: ; 3750 Function3786:: ; 3786 ld a, $1 - ld [$c2c6], a + ld [wc2c6], a Function378b:: ; 378b ld a, [CurPartySpecies] @@ -1718,12 +1718,12 @@ Function378b:: ; 378b lb bc, 7, 7 predef FillBox xor a - ld [$c2c6], a + ld [wc2c6], a ret .not_pokemon xor a - ld [$c2c6], a + ld [wc2c6], a inc a ld [CurPartySpecies], a ret @@ -1759,15 +1759,15 @@ Function383d:: ; 383d ; 3842 Function3842:: ; 3842 - ld [$d265], a - ld de, $d265 + ld [wd265], a + ld de, wd265 ld b, 1 << 6 + 1 jp PrintNum ; 384d Function384d:: ; 384d - ld hl, $d25e + ld hl, wd25e ld c, a ld b, 0 add hl, bc @@ -2057,13 +2057,13 @@ Function3b0c:: ; 3b0c Function3b2a:: ; 3b2a - ld [$c3b8], a + ld [wc3b8], a ld a, [hROMBank] push af ld a, BANK(Function8cfd6) rst Bankswitch - ld a, [$c3b8] + ld a, [wc3b8] call Function8cfd6 @@ -2076,13 +2076,13 @@ Function3b2a:: ; 3b2a Function3b3c:: ; 3b3c - ld [$c3b8], a + ld [wc3b8], a ld a, [hROMBank] push af ld a, BANK(Function8d120) rst Bankswitch - ld a, [$c3b8] + ld a, [wc3b8] call Function8d120 @@ -2226,7 +2226,7 @@ Function3f7c:: ; 3f7c ; 3f88 Function3f88:: ; 3f88 - ld hl, $d000 + ld hl, wd000 ld b, $0 .asm_3f8d push bc @@ -2247,7 +2247,7 @@ Function3f88:: ; 3f88 ; 3f9f Function3f9f:: ; 3f9f - ld hl, $d000 + ld hl, wd000 .asm_3fa2 push bc ld c, $8 diff --git a/home/audio.asm b/home/audio.asm index 8130cf2c5..331999e78 100644 --- a/home/audio.asm +++ b/home/audio.asm @@ -399,7 +399,7 @@ EnterMapMusic:: ; 3d03 push af xor a - ld [$c2c1], a + ld [wc2c1], a ld de, MUSIC_BICYCLE ld a, [PlayerState] cp PLAYER_BIKE @@ -424,7 +424,7 @@ EnterMapMusic:: ; 3d03 ; 3d2f Function3d2f:: ; 3d2f - ld a, [$c2c1] + ld a, [wc2c1] and a jr z, RestartMapMusic xor a @@ -433,7 +433,7 @@ Function3d2f:: ; 3d2f call PlayMusic call DelayFrame xor a - ld [$c2c1], a + ld [wc2c1], a ret ; 3d47 @@ -509,16 +509,16 @@ Function3d9f:: ; 3d9f ; upper center of the screen. ; Unreferenced. ld a, $20 - ld [$c498], a - ld [$c49c], a + ld [Sprites + $98], a + ld [Sprites + $9c], a ld a, $50 - ld [$c499], a + ld [Sprites + $99], a ld a, $58 - ld [$c49d], a + ld [Sprites + $9d], a xor a - ld [$c49b], a - ld [$c49f], a - ld a, [$c296] + ld [Sprites + $9b], a + ld [Sprites + $9f], a + ld a, [wc296] cp $64 jr nc, .max add 1 @@ -527,17 +527,17 @@ Function3d9f:: ; 3d9f swap a and $f add "0" - ld [$c49a], a + ld [Sprites + $9a], a ld a, b and $f add "0" - ld [$c49e], a + ld [Sprites + $9e], a ret .max ld a, "9" - ld [$c49a], a - ld [$c49e], a + ld [Sprites + $9a], a + ld [Sprites + $9e], a ret ; 3dde @@ -564,7 +564,7 @@ CheckSFX:: ; 3dde Function3dfe:: ; 3dfe xor a - ld [$c1cc], a + ld [Channel5Flags], a ld [SoundInput], a ld [rNR10], a ld [rNR11], a diff --git a/home/battle.asm b/home/battle.asm index d1f59ad81..758c15ae1 100644 --- a/home/battle.asm +++ b/home/battle.asm @@ -275,7 +275,7 @@ Function3a90:: ; 3a90 ld l, a ld a, d ld h, a - ld de, $d00c + ld de, wd00c ld bc, $0028 call CopyBytes pop af diff --git a/home/cry.asm b/home/cry.asm index 19723643a..456037db4 100644 --- a/home/cry.asm +++ b/home/cry.asm @@ -1,7 +1,7 @@ PlayStereoCry:: ; 37b6 push af ld a, 1 - ld [$c2bc], a + ld [wc2bc], a pop af call _PlayCry call WaitSFX @@ -13,7 +13,7 @@ PlayStereoCry2:: ; 37c4 ; Used during pic animations. push af ld a, 1 - ld [$c2bc], a + ld [wc2bc], a pop af jp _PlayCry ; 37ce @@ -28,7 +28,7 @@ PlayCry2:: ; 37d5 ; Don't wait for the cry to end. push af xor a - ld [$c2bc], a + ld [wc2bc], a ld [CryTracks], a pop af call _PlayCry diff --git a/home/farcall.asm b/home/farcall.asm index 8539fcc2f..f54ba0df0 100644 --- a/home/farcall.asm +++ b/home/farcall.asm @@ -33,18 +33,18 @@ ReturnFarCall:: ; 2d6e ; To do this, we can pop to bc instead of af. ld a, b - ld [$cfb9], a + ld [PredefAddress + 2], a ld a, c - ld [$cfba], a + ld [PredefAddress + 3], a ; Restore the working bank. pop bc ld a, b rst Bankswitch - ld a, [$cfb9] + ld a, [PredefAddress + 2] ld b, a - ld a, [$cfba] + ld a, [PredefAddress + 3] ld c, a ret ; 2d82 diff --git a/home/flag.asm b/home/flag.asm index dba06532c..98b7f6526 100644 --- a/home/flag.asm +++ b/home/flag.asm @@ -14,7 +14,7 @@ Function2e56:: ; 2e56 ; 2e5d Function2e5d:: ; 2e5d - ld a, [$d19a] + ld a, [wd19a] cp $2 jr z, .asm_2e69 cp $1 diff --git a/home/game_time.asm b/home/game_time.asm index 23f0cfe63..94539cd6a 100644 --- a/home/game_time.asm +++ b/home/game_time.asm @@ -33,7 +33,7 @@ UpdateGameTimer:: ; 20ad ; Don't update if game logic is paused. - ld a, [$c2cd] + ld a, [wc2cd] and a ret nz diff --git a/home/handshake.asm b/home/handshake.asm index b72b861c2..68dad5cb7 100644 --- a/home/handshake.asm +++ b/home/handshake.asm @@ -1,15 +1,15 @@ AskSerial:: ; 2063 ; send out a handshake while serial int is off - ld a, [$c2d4] + ld a, [wc2d4] bit 0, a ret z - ld a, [$c2d5] + ld a, [wc2d5] and a ret nz ; once every 6 frames - ld hl, $ca8a + ld hl, wca8a inc [hl] ld a, [hl] cp 6 @@ -19,7 +19,7 @@ AskSerial:: ; 2063 ld [hl], a ld a, $c - ld [$c2d5], a + ld [wc2d5], a ; handshake ld a, $88 diff --git a/home/init.asm b/home/init.asm index 20e043180..be6bfe99b 100644 --- a/home/init.asm +++ b/home/init.asm @@ -10,7 +10,7 @@ Reset:: ; 150 ld [rIE], a ei - ld hl, $cfbe + ld hl, wcfbe set 7, [hl] ld c, 32 diff --git a/home/joypad.asm b/home/joypad.asm index 532763914..ae2ab92be 100644 --- a/home/joypad.asm +++ b/home/joypad.asm @@ -28,12 +28,12 @@ Joypad:: ; 935 ; hJoypadSum: pressed so far ; Any of these three bits can be used to disable input. - ld a, [$cfbe] + ld a, [wcfbe] and %11010000 ret nz ; If we're saving, input is disabled. - ld a, [$c2cd] + ld a, [wc2cd] and a ret nz @@ -365,7 +365,7 @@ Functiona80:: ; a80 ld [$ffb0], a .asm_a8d push hl - ld hl, $c606 + hlcoord 18, 17 call Functionb06 pop hl call Functiona57 @@ -438,10 +438,10 @@ Functionaf5:: ; af5 jr .asm_b02 .asm_aff - ld a, [$c605] + ld a, [TileMap + 17 + 17 * SCREEN_WIDTH] .asm_b02 - ld [$c606], a + ld [TileMap + 18 + 17 * SCREEN_WIDTH], a ret ; b06 diff --git a/home/map.asm b/home/map.asm index a42469687..d5e83ca3a 100644 --- a/home/map.asm +++ b/home/map.asm @@ -1,7 +1,7 @@ ; Functions dealing with rendering and interacting with maps. Function210f:: ; 210f - ld hl, $c7e8 + ld hl, wc7e8 ld bc, $0018 ld a, $0 call ByteFill @@ -10,7 +10,7 @@ Function210f:: ; 210f Function211b:: ; 211b push hl - ld hl, $dbf7 + ld hl, BikeFlags + 2 ld a, [hli] ld h, [hl] ld l, a @@ -30,14 +30,14 @@ GetCurrentMapTrigger:: ; 212a ld a, [MapNumber] ld c, a xor a - ld [$dbf7], a - ld [$dbf8], a + ld [BikeFlags + 2], a + ld [BikeFlags + 3], a call GetMapTrigger ret c ld a, e - ld [$dbf7], a + ld [BikeFlags + 2], a ld a, d - ld [$dbf8], a + ld [BikeFlags + 3], a xor a ret ; 2147 @@ -116,11 +116,11 @@ Function217a:: ; 217a ; 2198 Function2198:: ; 2198 - ld a, [$d194] + ld a, [wd194] ld e, a - ld a, [$d195] + ld a, [wd195] ld d, a - ld hl, $c608 + ld hl, wEnemyMoveStruct ld b, $5 .asm_21a5 @@ -250,11 +250,11 @@ Function2266:: ; 2266 ld a, [MapX] sub $4 ld d, a - ld a, [$dbfb] + ld a, [wdbfb] and a ret z ld c, a - ld hl, $dbfc + ld hl, wdbfc ld a, [hli] ld h, [hl] ld l, a @@ -286,7 +286,7 @@ Function2266:: ; 2266 pop hl call Function22a3 ret nc - ld a, [$dbfb] + ld a, [wdbfb] inc a sub c ld c, a @@ -316,7 +316,7 @@ Function22a7:: ; 22a7 Function22b4:: ; 22b4 push bc - ld hl, $dbfc + ld hl, wdbfc ld a, [hli] ld h, [hl] ld l, a @@ -329,22 +329,22 @@ Function22b4:: ; 22b4 ld a, [hli] cp $ff jr nz, .asm_22d0 - ld hl, $dcac + ld hl, wdcac ld a, [hli] .asm_22d0 pop bc - ld [$d146], a + ld [wd146], a ld a, [hli] - ld [$d147], a + ld [wd147], a ld a, [hli] - ld [$d148], a + ld [wd148], a ld a, c - ld [$d149], a + ld [wd149], a ld a, [MapGroup] - ld [$d14a], a + ld [wd14a], a ld a, [MapNumber] - ld [$d14b], a + ld [wd14b], a scf ret ; 22ee @@ -500,11 +500,11 @@ GetMapConnection:: ; 23a3 Function23ac:: ; 23ac ld a, [hli] ld c, a - ld [$dc07], a + ld [wdc07], a ld a, l - ld [$dc08], a + ld [wdc07 + 1], a ld a, h - ld [$dc09], a + ld [wdc09], a ld a, c and a ret z @@ -516,11 +516,11 @@ Function23ac:: ; 23ac Function23c3:: ; 23c3 ld a, [hli] ld c, a - ld [$dc0a], a + ld [wdc0a], a ld a, l - ld [$dc0b], a + ld [wdc0b], a ld a, h - ld [$dc0c], a + ld [wdc0b + 1], a ld a, c and a ret z @@ -532,11 +532,11 @@ Function23c3:: ; 23c3 Function23da:: ; 23da ld a, [hli] ld c, a - ld [$dbfb], a + ld [wdbfb], a ld a, l - ld [$dbfc], a + ld [wdbfc], a ld a, h - ld [$dbfd], a + ld [wdbfd], a ld a, c and a ret z @@ -548,11 +548,11 @@ Function23da:: ; 23da Function23f1:: ; 23f1 ld a, [hli] ld c, a - ld [$dbfe], a + ld [wdbfe], a ld a, l - ld [$dbff], a + ld [wdbff], a ld a, h - ld [$dc00], a + ld [wdc00], a ld a, c and a ret z @@ -564,11 +564,11 @@ Function23f1:: ; 23f1 Function2408:: ; 2408 ld a, [hli] ld c, a - ld [$dc01], a + ld [wdc01], a ld a, l - ld [$dc02], a + ld [wdc02], a ld a, h - ld [$dc03], a + ld [wdc03], a ld a, c and a ret z @@ -581,17 +581,17 @@ Function241f:: ; 241f push hl call Function2471 pop de - ld hl, $d72e + ld hl, MapObjects + OBJECT_LENGTH ld a, [de] inc de - ld [$dc04], a + ld [wdc04], a ld a, e - ld [$dc05], a + ld [wdc05], a ld a, d - ld [$dc06], a - ld a, [$dc04] + ld [wdc06], a + ld a, [wdc04] call Function2457 - ld a, [$dc04] + ld a, [wdc04] ld c, a ld a, $10 sub c @@ -688,11 +688,11 @@ Function248a:: ; 248a ; 24ba Function24ba:: ; 24ba - ld a, [$d149] - ld [$dcac], a - ld a, [$d14a] + ld a, [wd149] + ld [wdcac], a + ld a, [wd14a] ld [BackupMapGroup], a - ld a, [$d14b] + ld a, [wd14b] ld [BackupMapNumber], a ret ; 24cd @@ -939,7 +939,7 @@ FillEastConnectionStrip:: ; 25f6 ; 261b Function261b:: ; 261b - ld [$d432], a + ld [MapStatus], a ret ; 261f @@ -989,11 +989,11 @@ Function263b:: ; 263b ; 2653 Function2653:: ; 2653 - ld a, [$dc0a] + ld a, [wdc0a] ld c, a and a ret z - ld hl, $dc0b + ld hl, wdc0b ld a, [hli] ld h, [hl] ld l, a @@ -1161,7 +1161,7 @@ Function2707:: ; 2707 ld a, [hConnectionStripLength] ld e, a ld d, $0 - ld hl, $d81e + ld hl, wd81e add hl, de ld a, [hl] ret @@ -1171,7 +1171,7 @@ Function2712:: ; 2712 ld a, [hConnectionStripLength] ld e, a ld d, $0 - ld hl, $d81e + ld hl, wd81e add hl, de ld [hl], $ff ret @@ -1181,7 +1181,7 @@ Function271e:: ; 271e ld a, [hConnectionStripLength] ld e, a ld d, $0 - ld hl, $d81e + ld hl, wd81e add hl, de ld [hl], $0 ret @@ -1194,9 +1194,9 @@ Function272a:: ; 272a call Function27b7 ld c, $28 call Functiondbd - ld a, [$d152] + ld a, [wd152] ld e, a - ld a, [$d153] + ld a, [wd153] ld d, a call Function27d3 ld a, $1 @@ -1210,9 +1210,9 @@ Function2748:: ; 2748 call Function27b7 ld c, $28 call Functiondbd - ld a, [$d152] + ld a, [wd152] ld l, a - ld a, [$d153] + ld a, [wd153] ld h, a ld bc, $0200 add hl, bc @@ -1233,9 +1233,9 @@ Function2771:: ; 2771 call Function27c0 ld c, $24 call Functiondbd - ld a, [$d152] + ld a, [wd152] ld e, a - ld a, [$d153] + ld a, [wd153] ld d, a call Function27f8 ld a, $1 @@ -1249,7 +1249,7 @@ Function278f:: ; 278f call Function27c0 ld c, $24 call Functiondbd - ld a, [$d152] + ld a, [wd152] ld e, a and $e0 ld b, a @@ -1258,7 +1258,7 @@ Function278f:: ; 278f and $1f or b ld e, a - ld a, [$d153] + ld a, [wd153] ld d, a call Function27f8 ld a, $1 @@ -1376,9 +1376,9 @@ Function2821:: ; 2821 ld a, $6 ld [rSVBK], a ld a, e - ld de, $d000 + ld de, w6_d000 call FarDecompress - ld hl, $d000 + ld hl, w6_d000 ld de, VTiles2 ld bc, $0600 call CopyBytes @@ -1386,7 +1386,7 @@ Function2821:: ; 2821 push af ld a, $1 ld [rVBK], a - ld hl, $d600 + ld hl, w6_d600 ld de, VTiles2 ld bc, $0600 call CopyBytes @@ -1394,7 +1394,7 @@ Function2821:: ; 2821 ld [rVBK], a pop af ld [rSVBK], a - ld a, [$d199] + ld a, [wd199] cp $1 jr z, .asm_286f cp $2 @@ -1413,11 +1413,11 @@ Function2821:: ; 2821 ; 2879 Function2879:: ; 2879 - ld hl, $d194 + ld hl, wd194 ld a, [hli] ld h, [hl] ld l, a - ld de, $dcb9 + ld de, XCoord + 1 ld c, $5 ld b, $6 .asm_2886 @@ -1442,15 +1442,15 @@ Function2879:: ; 2879 ; 289d Function289d:: ; 289d - ld hl, $d194 + ld hl, wd194 ld a, [hli] ld h, [hl] ld l, a - ld de, $dcb9 + ld de, XCoord + 1 ld a, [MapWidth] add $6 ld [hConnectionStripLength], a - ld a, [$d151] + ld a, [wd151] and a jr z, .asm_28cb cp $1 @@ -1462,7 +1462,7 @@ Function289d:: ; 289d ret .asm_28c0 - ld de, $dcbf + ld de, wdcbf ld a, [hConnectionStripLength] ld c, a ld b, $0 @@ -1470,7 +1470,7 @@ Function289d:: ; 289d jr .asm_28ce .asm_28cb - ld de, $dcb9 + ld de, XCoord + 1 .asm_28ce ld b, $6 @@ -1478,12 +1478,12 @@ Function289d:: ; 289d jr Function28f7 .asm_28d4 - ld de, $dcba + ld de, XCoord + 2 inc hl jr .asm_28dd .asm_28da - ld de, $dcb9 + ld de, XCoord + 1 .asm_28dd ld b, $5 @@ -1492,14 +1492,14 @@ Function289d:: ; 289d Function28e3:: ; 28e3 - ld hl, $d194 + ld hl, wd194 ld a, [hli] ld h, [hl] ld l, a ld a, [MapWidth] add $6 ld [hConnectionStripLength], a - ld de, $dcb9 + ld de, XCoord + 1 ld b, $6 ld c, $5 @@ -1771,7 +1771,7 @@ Function2a66:: ; 2a66 add $6 ld c, a ld b, $0 - ld hl, $c801 + ld hl, wc801 add hl, bc ld a, e srl a @@ -1806,7 +1806,7 @@ CheckFacingSign:: ; 2a8b ld a, e sub 4 ld e, a - ld a, [$dc01] + ld a, [wdc01] and a ret z ld c, a @@ -1821,7 +1821,7 @@ CheckFacingSign:: ; 2a8b ; 2aaa Function2aaa:: ; 2aaa - ld hl, $dc02 + ld hl, wdc02 ld a, [hli] ld h, [hl] ld l, a @@ -1859,7 +1859,7 @@ Function2aaa:: ; 2aaa ; 2ad4 Function2ad4:: ; 2ad4 - ld a, [$dbfe] + ld a, [wdbfe] and a ret z ld c, a @@ -1874,7 +1874,7 @@ Function2ad4:: ; 2ad4 ; 2ae7 Function2ae7:: ; 2ae7 - ld hl, $dbff + ld hl, wdbff ld a, [hli] ld h, [hl] ld l, a @@ -1969,7 +1969,7 @@ Function2b5c:: ; 2b5c Function2b74:: ; 0x2b74 push af ld a, $1 - ld [$c2ce], a + ld [wc2ce], a call WhiteBGMap call ClearSprites call Function2bae @@ -2131,7 +2131,7 @@ Function2c3d:: ; 2c3d ld a, BANK(MapGroupPointers) rst Bankswitch call GetMapHeaderPointer - ld de, $d198 + ld de, wd197 + 1 ld bc, $0005 call CopyBytes pop af @@ -2335,7 +2335,7 @@ LoadTilesetHeader:: ; 2d27 ld hl, Tilesets ld bc, Tileset01 - Tileset00 - ld a, [$d199] + ld a, [wd199] call AddNTimes ld de, TilesetBank diff --git a/home/map_objects.asm b/home/map_objects.asm index a20a06779..2a78bfaa5 100644 --- a/home/map_objects.asm +++ b/home/map_objects.asm @@ -18,7 +18,7 @@ GetSpritePalette:: ; 17ff Function180e:: ; 180e push hl push bc - ld hl, $d156 + ld hl, UsedSprites + 2 ld c, $1f ld b, a ld a, [hConnectionStripLength] @@ -32,12 +32,12 @@ Function180e:: ; 180e inc hl dec c jr nz, .asm_181d - ld a, [$d155] + ld a, [UsedSprites + 1] scf jr .asm_1833 .asm_182b - ld a, [$d155] + ld a, [UsedSprites + 1] jr .asm_1833 .asm_1830 @@ -359,18 +359,18 @@ Function1967:: ; 1967 ; 1985 Function1985:: ; 1985 - ld hl, $d4cd + ld hl, wd4cd cp [hl] jr z, .asm_1990 - ld hl, $d4ce + ld hl, wd4ce cp [hl] ret nz .asm_1990 callba Function581f ld a, $ff - ld [$d4cd], a - ld [$d4ce], a + ld [wd4cd], a + ld [wd4ce], a ret ; 199f @@ -411,11 +411,11 @@ Function19b8:: ; 19b8 cp $d ret nc ld b, a - ld a, [$d4cd] + ld a, [wd4cd] cp b jr nz, .asm_19de ld a, $ff - ld [$d4cd], a + ld [wd4cd], a .asm_19de ld a, b @@ -427,14 +427,14 @@ Function19b8:: ; 19b8 Function19e9:: ; 19e9 - ld [$c2e2], a + ld [wc2e2], a ld a, [hROMBank] - ld [$c2e3], a + ld [wc2e3], a ld a, l - ld [$c2e4], a + ld [wc2e3 + 1], a ld a, h - ld [$c2e5], a - ld a, [$c2e2] + ld [wc2e3 + 2], a + ld a, [wc2e2] call Function18de ret c ld hl, $0003 diff --git a/home/menu.asm b/home/menu.asm index ad52741f2..8c2b562fc 100644 --- a/home/menu.asm +++ b/home/menu.asm @@ -7,16 +7,16 @@ LoadMenuDataHeader:: ; 0x1d35 ret Function1d3c:: ; 0x1d3c - ld de, $cf81 + ld de, wcf81 ld bc, $0010 call CopyBytes ld a, [hROMBank] - ld [$cf8a], a + ld [wcf8a], a ret ; 0x1d4b Function1d4b:: ; 1d4b - ld [$cf88], a + ld [wcf88], a ret ; 1d4f @@ -79,7 +79,7 @@ Function1d81:: ; 0x1d81 call Function1c89 call Function321c call Function1c66 - ld a, [$cf91] + ld a, [wcf91] bit 7, a jr z, .asm_1da7 ; 0x1d98 $d call Function1c10 @@ -99,7 +99,7 @@ Function1dab:: ; 1dab call LoadMenuDataHeader call Function1d81 call Function1c17 - ld a, [$cfa9] + ld a, [wcfa9] ret ; 1db8 @@ -107,7 +107,7 @@ Function1db8:: ; 0x1db8 push hl push bc push af - ld hl, $cf86 + ld hl, wcf86 ld a, [hli] ld h, [hl] ld l, a @@ -148,13 +148,13 @@ _YesNoBox:: ; 1dd9 .asm_1de9 ld a, b - ld [$cf83], a + ld [wcf83], a add $5 - ld [$cf85], a + ld [wcf85], a ld a, c - ld [$cf82], a + ld [wcf82], a add $4 - ld [$cf84], a + ld [wcf84], a call Function1c00 Function1dfe:: ; 1dfe @@ -165,7 +165,7 @@ Function1dfe:: ; 1dfe call Function1c17 pop af jr c, .asm_1e16 - ld a, [$cfa9] + ld a, [wcfa9] cp 2 ; no jr z, .asm_1e16 and a @@ -173,7 +173,7 @@ Function1dfe:: ; 1dfe .asm_1e16 ld a, $2 - ld [$cfa9], a + ld [wcfa9], a scf ret ; 1e1d @@ -203,24 +203,24 @@ Function1e35:: ; 1e35 push de call Function1d3c pop de - ld a, [$cf83] + ld a, [wcf83] ld h, a - ld a, [$cf85] + ld a, [wcf85] sub h ld h, a ld a, d - ld [$cf83], a + ld [wcf83], a add h - ld [$cf85], a - ld a, [$cf82] + ld [wcf85], a + ld a, [wcf82] ld l, a - ld a, [$cf84] + ld a, [wcf84] sub l ld l, a ld a, e - ld [$cf82], a + ld [wcf82], a add l - ld [$cf84], a + ld [wcf84], a ret ; 1e5d @@ -238,7 +238,7 @@ SetUpMenu:: ; 1e70 call MenuFunc_1e7f ; ??? call MenuWriteText call Function1eff ; set up selection pointer - ld hl, $cfa5 + ld hl, wcfa5 set 7, [hl] ret @@ -266,27 +266,27 @@ MenuWriteText:: ; 0x1e8c ; 0x1ea6 Function1ea6:: ; 1ea6 - ld a, [$cf83] + ld a, [wcf83] ld c, a - ld a, [$cf85] + ld a, [wcf85] sub c ld c, a - ld a, [$cf92] + ld a, [wcf92] add a inc a ld b, a - ld a, [$cf82] + ld a, [wcf82] add b - ld [$cf84], a + ld [wcf84], a ret ; 1ebd Function1ebd:: ; 1ebd - ld hl, $cf93 + ld hl, wcf93 ld a, [hli] ld h, [hl] ld l, a - ld a, [$cf76] + ld a, [wcf76] and a jr z, .asm_1ed3 ld b, a @@ -302,7 +302,7 @@ Function1ebd:: ; 1ebd ld d, h ld e, l ld a, [hl] - ld [$cf92], a + ld [wcf92], a ret ; 1eda @@ -320,7 +320,7 @@ Function1eda:: ; 1eda push hl ld d, h ld e, l - ld hl, $cf95 + ld hl, wcf95 call Function1efb pop hl ld de, $0028 @@ -338,14 +338,14 @@ Function1efb:: ; 1efb Function1eff:: ; 1eff call Function1c10 - ld hl, $cfa8 - ld a, [$cf91] + ld hl, wcfa8 + ld a, [wcf91] bit 3, a jr z, .asm_1f0e set 3, [hl] .asm_1f0e - ld a, [$cf91] + ld a, [wcf91] bit 2, a jr z, .asm_1f19 set 5, [hl] @@ -358,14 +358,14 @@ Function1eff:: ; 1eff Function1f1a:: ; 1f1a call Function1bd3 - ld hl, $cfa8 + ld hl, wcfa8 and [hl] jr Function1f2a ; 1f23 Function1f23:: ; 1f23 xor a - ld [$cf73], a + ld [wcf73], a call Function1bc9 ; 1f2a @@ -381,39 +381,39 @@ Function1f2a:: ; 1f2a bit 5, a jr nz, .asm_1f4b xor a - ld [$cf73], a + ld [wcf73], a jr .asm_1f57 .asm_1f44 ld a, $10 - ld [$cf73], a + ld [wcf73], a jr .asm_1f57 .asm_1f4b ld a, $20 - ld [$cf73], a + ld [wcf73], a jr .asm_1f57 .asm_1f52 ld a, $1 - ld [$cf73], a + ld [wcf73], a .asm_1f57 call Function1ebd - ld a, [$cfa9] + ld a, [wcfa9] ld l, a ld h, $0 add hl, de ld a, [hl] ld [MenuSelection], a - ld a, [$cfa9] - ld [$cf88], a + ld a, [wcfa9] + ld [wcf88], a and a ret .asm_1f6d ld a, $2 - ld [$cf73], a + ld [wcf73], a ld a, $ff ld [MenuSelection], a scf @@ -422,7 +422,7 @@ Function1f2a:: ; 1f2a Function1f79:: ; 1f79 push de - ld hl, $cf97 + ld hl, wcf97 ld a, [hli] ld h, [hl] ld l, a @@ -471,7 +471,7 @@ Function1fa7:: ; 1fa7 Function1fb1:: ; 1fb1 ld e, a ld d, $0 - ld hl, $cf97 + ld hl, wcf97 ld a, [hli] ld h, [hl] ld l, a @@ -483,13 +483,13 @@ Function1fb1:: ; 1fb1 ; 1fbf Function1fbf:: ; 1fbf - ld hl, $cf71 + ld hl, wcf71 call Function1ff0 - ld hl, $cf81 + ld hl, wcf81 call Function1ff0 - ld hl, $cf91 + ld hl, wcf91 call Function1ff0 - ld hl, $cfa1 + ld hl, wcfa1 call Function1ff0 ld a, [rSVBK] push af @@ -500,9 +500,9 @@ Function1fbf:: ; 1fbf ld [hld], a ld [hld], a ld a, l - ld [$cf71], a + ld [wcf71], a ld a, h - ld [$cf72], a + ld [wcf72], a pop af ld [rSVBK], a ret @@ -519,7 +519,7 @@ Function1ff8:: ; 1ff8 push af and $3 jr z, .asm_2007 - ld hl, $cf81 + ld hl, wcf81 bit 3, [hl] jr nz, .asm_2007 call PlayClickSFX @@ -561,25 +561,25 @@ Function201c:: ; 201c Function202a:: ; 202a ld a, [hROMBank] - ld [$cf94], a + ld [wcf94], a callba Function2400e - ld a, [$cf88] + ld a, [wcf88] ret ; 2039 Function2039:: ; 2039 ld a, [hROMBank] - ld [$cf94], a + ld [wcf94], a callba Function24022 - ld a, [$cf88] + ld a, [wcf88] ret ; 2048 Function2048:: ; 2048 ld a, [hROMBank] - ld [$cf94], a + ld [wcf94], a callba Function2403c - ld a, [$cf88] + ld a, [wcf88] ret ; 2057 diff --git a/home/movement.asm b/home/movement.asm index 4925ffe74..cd6476bc9 100644 --- a/home/movement.asm +++ b/home/movement.asm @@ -1,9 +1,9 @@ Function1b1e:: ; 1b1e - ld [$d003], a + ld [wd003], a xor a ld [DefaultFlypoint], a ld a, $0 - ld [$d004], a + ld [wd004], a ld a, $7 ld [StartFlypoint], a ld a, $d0 @@ -122,7 +122,7 @@ Function1b92:: ; 1b92 Function1bb1:: ; 1bb1 push hl push bc - ld hl, $cfa1 + ld hl, wcfa1 ld b, $8 .asm_1bb8 ld a, [de] @@ -171,7 +171,7 @@ Function1bdd:: ; 1bdd ; 1bee Function1bee:: ; 1bee - ld hl, $cfac + ld hl, wcfac ld a, [hli] ld h, [hl] ld l, a @@ -180,7 +180,7 @@ Function1bee:: ; 1bee ; 1bf7 Function1bf7:: ; 1bf7 - ld hl, $cfac + ld hl, wcfac ld a, [hli] ld h, [hl] ld l, a diff --git a/home/palettes.asm b/home/palettes.asm index a4400f76a..68e85f503 100644 --- a/home/palettes.asm +++ b/home/palettes.asm @@ -175,8 +175,8 @@ Functioncf8:: ; cf8 push af ld a, $5 ld [rSVBK], a - ld hl, $d0c0 - ld de, MartPointer + ld hl, OBPals + ld de, Unkn2Pals ld a, [rOBP0] ld b, a ld c, $1 @@ -207,8 +207,8 @@ Functiond24:: ; d24 push af ld a, $5 ld [rSVBK], a - ld hl, $d0c8 - ld de, $d048 + ld hl, OBPals + 8 + ld de, Unkn2Pals + 8 ld a, [rOBP1] ld b, a ld c, $1 diff --git a/home/random.asm b/home/random.asm index 2ec490cc1..46b3e7571 100644 --- a/home/random.asm +++ b/home/random.asm @@ -42,10 +42,10 @@ BattleRandom:: ; 2f9f call _BattleRandom - ld [$cfb6], a + ld [PredefTemp + 1], a pop af rst Bankswitch - ld a, [$cfb6] + ld a, [PredefTemp + 1] ret ; 2fb1 diff --git a/home/rtc.asm b/home/rtc.asm index 33176e722..1e42bf47d 100644 --- a/home/rtc.asm +++ b/home/rtc.asm @@ -2,7 +2,7 @@ RTC:: ; 46f ; update time and time-sensitive palettes ; rtc enabled? - ld a, [$c2ce] + ld a, [wc2ce] cp 0 ret z diff --git a/home/serial.asm b/home/serial.asm index ca0155c87..e7dac7d07 100644 --- a/home/serial.asm +++ b/home/serial.asm @@ -10,7 +10,7 @@ Serial:: ; 6ef and a jr nz, .asm_71c - ld a, [$c2d4] + ld a, [wc2d4] bit 0, a jr nz, .asm_721 @@ -147,7 +147,7 @@ Function78a:: ; 78a jr z, .asm_7c0 call .asm_825 push hl - ld hl, $cf5c + ld hl, wcf5c inc [hl] jr nz, .asm_7b7 dec hl @@ -164,13 +164,13 @@ Function78a:: ; 78a and $f cp $8 jr nz, .asm_79b - ld a, [$cf5d] + ld a, [wcf5d] dec a - ld [$cf5d], a + ld [wcf5d], a jr nz, .asm_79b - ld a, [$cf5e] + ld a, [wcf5d + 1] dec a - ld [$cf5e], a + ld [wcf5d + 1], a jr nz, .asm_79b ld a, [$ffcb] cp $1 @@ -187,9 +187,9 @@ Function78a:: ; 78a and $f sub $8 jr nz, .asm_7f8 - ld [$cf5d], a + ld [wcf5d], a ld a, $50 - ld [$cf5e], a + ld [wcf5d + 1], a .asm_7f8 ld a, [hSerialReceive] @@ -198,7 +198,7 @@ Function78a:: ; 78a call Function82b jr z, .asm_813 push hl - ld hl, $cf5c + ld hl, wcf5c ld a, [hl] dec a ld [hld], a @@ -232,7 +232,7 @@ Function78a:: ; 78a Function82b:: ; 82b push hl - ld hl, $cf5b + ld hl, wcf5b ld a, [hli] or [hl] pop hl @@ -241,14 +241,14 @@ Function82b:: ; 82b Function833:: ; 833 dec a - ld [$cf5b], a - ld [$cf5c], a + ld [wcf5b], a + ld [wcf5c], a ret ; 83b Function83b:: ; 83b - ld hl, $cf56 - ld de, $cf51 + ld hl, wcf56 + ld de, wcf51 ld c, $2 ld a, $1 ld [$ffcc], a @@ -290,14 +290,14 @@ Function871:: ; 871 Function87d:: ; 87d ld a, $ff - ld [$cf52], a + ld [wcf52], a .asm_882 call Function8c1 call DelayFrame call Function82b jr z, .asm_89e push hl - ld hl, $cf5c + ld hl, wcf5c dec [hl] jr nz, .asm_89d dec hl @@ -311,7 +311,7 @@ Function87d:: ; 87d pop hl .asm_89e - ld a, [$cf52] + ld a, [wcf52] inc a jr z, .asm_882 ld b, $a @@ -326,8 +326,8 @@ Function87d:: ; 87d call Function908 dec b jr nz, .asm_8b1 - ld a, [$cf52] - ld [$cf51], a + ld a, [wcf52] + ld [wcf51], a ret ; 8c1 @@ -346,7 +346,7 @@ Function8c1:: ; 8c1 .asm_8d7 call Function8f3 - ld a, [$cf56] + ld a, [wcf56] add b ld [hSerialSend], a ld a, [$ffcb] @@ -365,15 +365,15 @@ Function8c1:: ; 8c1 Function8f3:: ; 8f3 ld a, [hSerialReceive] - ld [$cf51], a + ld [wcf51], a and $f0 cp b ret nz xor a ld [hSerialReceive], a - ld a, [$cf51] + ld a, [wcf51] and $f - ld [$cf52], a + ld [wcf52], a ret ; 908 diff --git a/home/text.asm b/home/text.asm index ee4b7174d..feb3eb734 100644 --- a/home/text.asm +++ b/home/text.asm @@ -661,13 +661,13 @@ Diacritic:: ; 13c6 Function13c7:: ; 13c7 ld a, "▼" - ld [$c606], a + ld [TileMap + 18 + 17 * SCREEN_WIDTH], a ret ; 13cd Function13cd:: ; 13cd - ld a, [$c605] - ld [$c606], a + ld a, [TileMap + 17 + 17 * SCREEN_WIDTH] + ld [TileMap + 18 + 17 * SCREEN_WIDTH], a ret ; 13d4 @@ -694,15 +694,15 @@ Function13e0:: ; 13e0 Function13e5:: ; 13e5 - ld a, [$cfcf] + ld a, [TextBoxFrame + 1] push af set 1, a - ld [$cfcf], a + ld [TextBoxFrame + 1], a call Function13f6 pop af - ld [$cfcf], a + ld [TextBoxFrame + 1], a ret ; 13f6 @@ -850,10 +850,10 @@ Text_03:: ; 1480 ; [$03][addr] ld a, [hli] - ld [$d0e6], a + ld [wd0e4 + 2], a ld c, a ld a, [hli] - ld [$d0e6 + 1], a + ld [wd0e4 + 2 + 1], a ld b, a ret ; 148b diff --git a/home/tilemap.asm b/home/tilemap.asm index 4042eb7a8..6eadba1a0 100644 --- a/home/tilemap.asm +++ b/home/tilemap.asm @@ -21,7 +21,7 @@ Function1c30:: ; 0x1c30 Function1c47:: ; 0x1c47 ld b, $10 - ld de, $cf81 + ld de, wcf81 .asm_1c4c ld a, [hld] ld [de], a @@ -31,14 +31,14 @@ Function1c47:: ; 0x1c47 ret Function1c53:: ; 0x1c53 - ld a, [$cf82] + ld a, [wcf82] ld b, a - ld a, [$cf84] + ld a, [wcf84] sub b ld b, a - ld a, [$cf83] + ld a, [wcf83] ld c, a - ld a, [$cf85] + ld a, [wcf85] sub c ld c, a ret @@ -49,11 +49,11 @@ Function1c66:: ; 1c66 push de push bc push af - ld hl, $cf86 + ld hl, wcf86 ld a, [hli] ld h, [hl] ld l, a - ld de, $cf91 + ld de, wcf91 ld bc, $0010 call CopyBytes pop af @@ -64,7 +64,7 @@ Function1c66:: ; 1c66 ; 1c7e Function1c7e:: ; 1c7e - ld hl, $cf71 + ld hl, wcf71 ld a, [hli] ld h, [hl] ld l, a @@ -77,7 +77,7 @@ Function1c7e:: ; 1c7e Function1c89:: ; 1c89 call Function1c66 - ld hl, $cf86 + ld hl, wcf86 ld e, [hl] inc hl ld d, [hl] @@ -96,7 +96,7 @@ Function1c89:: ; 1c89 pop bc dec b jr nz, .asm_1c9c - ld a, [$cf91] + ld a, [wcf91] bit 4, a ret z call Function1cfd @@ -117,19 +117,19 @@ Function1cbb:: ; 1cbb ; 1cc6 Function1cc6:: ; 1cc6 - ld a, [$cf82] + ld a, [wcf82] ld b, a inc b - ld a, [$cf83] + ld a, [wcf83] ld c, a inc c - ld a, [$cf91] + ld a, [wcf91] bit 6, a jr nz, .asm_1cd8 inc b .asm_1cd8 - ld a, [$cf91] + ld a, [wcf91] bit 7, a jr z, .asm_1ce0 inc c @@ -160,9 +160,9 @@ Function1cf1:: ; 1cf1 Function1cfd:: ; 1cfd - ld a, [$cf83] + ld a, [wcf83] ld c, a - ld a, [$cf82] + ld a, [wcf82] ld b, a ; 1d05 @@ -190,9 +190,9 @@ GetTileCoord:: ; 1d05 ; 1d19 Function1d19:: ; 1d19 - ld a, [$cf83] + ld a, [wcf83] ld c, a - ld a, [$cf82] + ld a, [wcf82] ld b, a GetAttrCoord:: ; 1d21 diff --git a/home/time.asm b/home/time.asm index e6c70824b..6c1aaec5f 100644 --- a/home/time.asm +++ b/home/time.asm @@ -191,17 +191,17 @@ Function658:: ; 658 xor a ld [StringBuffer2], a ld a, $0 - ld [$d089], a + ld [StringBuffer2 + 3], a jr Function677 Function663:: ; 663 call UpdateTime ld a, [hHours] - ld [$d087], a + ld [StringBuffer2 + 1], a ld a, [hMinutes] - ld [$d088], a + ld [StringBuffer2 + 2], a ld a, [hSeconds] - ld [$d089], a + ld [StringBuffer2 + 3], a jr Function677 Function677:: ; 677 diff --git a/home/vblank.asm b/home/vblank.asm index 38dc02800..563e705fe 100644 --- a/home/vblank.asm +++ b/home/vblank.asm @@ -246,11 +246,11 @@ UpdatePals:: ; 37f jp nz, UpdateCGBPals ; update gb pals - ld a, [$cfc7] + ld a, [wcfc7] ld [rBGP], a - ld a, [$cfc8] + ld a, [wcfc8] ld [rOBP0], a - ld a, [$cfc9] + ld a, [wcfc9] ld [rOBP1], a and a diff --git a/wram.asm b/wram.asm index 30cb86055..7ace81bb4 100644 --- a/wram.asm +++ b/wram.asm @@ -872,7 +872,8 @@ wc7e0:: ds 1 wc7e1:: ds 1 wc7e2:: ds 1 wc7e3:: ds 1 -wc7e4:: ds 28 +wc7e4:: ds 4 +wc7e8:: ds 24 SECTION "Overworld Map", WRAM0 [$c800] @@ -2241,7 +2242,12 @@ BikeFlags:: ; dbf5 ds 3 -wdbf9:: ds 7 +wdbf9:: ds 2 +wdbfb:: ds 1 +wdbfc:: ds 1 +wdbfd:: ds 1 +wdbfe:: ds 1 +wdbff:: ds 1 wdc00:: ds 1 wdc01:: ds 1 wdc02:: ds 1 @@ -2365,7 +2371,9 @@ YCoord:: ; dcb7 XCoord:: ; dcb8 ds 1 ; current x coordinate relative to top-left corner of current map - ds 30 + ds 6 +wdcbf:: ds 1 + ds 23 SECTION "Party", WRAMX, BANK [1] @@ -2582,6 +2590,12 @@ BattleAnimTemps:: ; d419 w5_d422:: ds $40 +SECTION "WRAM 6", WRAMX, BANK [6] + +w6_d000:: ds $600 +w6_d600:: ds $600 + + SECTION "Scratch", SRAM, BANK [0]