You've already forked pokecrystal-board
mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2025-04-09 05:44:44 -07:00
Use :: to export labels between objects.
This fixes the build.
This commit is contained in:
@@ -166,7 +166,7 @@ INCBIN "baserom.gbc",$17982d, $1799ef - $17982d
|
|||||||
|
|
||||||
SECTION "Cries", ROMX, BANK[CRIES]
|
SECTION "Cries", ROMX, BANK[CRIES]
|
||||||
|
|
||||||
CryHeaders: INCLUDE "audio/cry_headers.asm"
|
CryHeaders:: INCLUDE "audio/cry_headers.asm"
|
||||||
|
|
||||||
INCBIN "baserom.gbc",$f2d69, $f3fb6 - $f2d69
|
INCBIN "baserom.gbc",$f2d69, $f3fb6 - $f2d69
|
||||||
|
|
||||||
|
@@ -7,7 +7,7 @@
|
|||||||
; PlayStereoSFX
|
; PlayStereoSFX
|
||||||
; PlayCry
|
; PlayCry
|
||||||
|
|
||||||
_SoundRestart: ; e8000
|
_SoundRestart:: ; e8000
|
||||||
; restart sound operation
|
; restart sound operation
|
||||||
; clear all relevant hardware registers & wram
|
; clear all relevant hardware registers & wram
|
||||||
push hl
|
push hl
|
||||||
@@ -84,7 +84,7 @@ MusicOff: ; e8057
|
|||||||
ret
|
ret
|
||||||
; e805c
|
; e805c
|
||||||
|
|
||||||
_UpdateSound: ; e805c
|
_UpdateSound:: ; e805c
|
||||||
; called once per frame
|
; called once per frame
|
||||||
; no use updating audio if it's not playing
|
; no use updating audio if it's not playing
|
||||||
ld a, [MusicPlaying]
|
ld a, [MusicPlaying]
|
||||||
@@ -2322,7 +2322,7 @@ SetLRTracks: ; e8b1b
|
|||||||
ret
|
ret
|
||||||
; e8b30
|
; e8b30
|
||||||
|
|
||||||
_PlayMusic: ; e8b30
|
_PlayMusic:: ; e8b30
|
||||||
; load music
|
; load music
|
||||||
call MusicOff
|
call MusicOff
|
||||||
ld hl, MusicID
|
ld hl, MusicID
|
||||||
@@ -2365,7 +2365,7 @@ _PlayMusic: ; e8b30
|
|||||||
ret
|
ret
|
||||||
; e8b79
|
; e8b79
|
||||||
|
|
||||||
PlayCry: ; e8b79
|
PlayCry:: ; e8b79
|
||||||
; Play cry de using parameters:
|
; Play cry de using parameters:
|
||||||
; CryPitch
|
; CryPitch
|
||||||
; CryEcho
|
; CryEcho
|
||||||
@@ -2479,7 +2479,7 @@ PlayCry: ; e8b79
|
|||||||
ret
|
ret
|
||||||
; e8c04
|
; e8c04
|
||||||
|
|
||||||
_PlaySFX: ; e8c04
|
_PlaySFX:: ; e8c04
|
||||||
; clear channels if they aren't already
|
; clear channels if they aren't already
|
||||||
call MusicOff
|
call MusicOff
|
||||||
ld hl, $c1cc ; Channel5Flags
|
ld hl, $c1cc ; Channel5Flags
|
||||||
@@ -2580,7 +2580,7 @@ _PlaySFX: ; e8c04
|
|||||||
; e8ca6
|
; e8ca6
|
||||||
|
|
||||||
|
|
||||||
PlayStereoSFX: ; e8ca6
|
PlayStereoSFX:: ; e8ca6
|
||||||
; play sfx de
|
; play sfx de
|
||||||
|
|
||||||
call MusicOff
|
call MusicOff
|
||||||
@@ -2759,7 +2759,7 @@ ChannelInit: ; e8d5b
|
|||||||
ret
|
ret
|
||||||
; e8d76
|
; e8d76
|
||||||
|
|
||||||
LoadMusicByte: ; e8d76
|
LoadMusicByte:: ; e8d76
|
||||||
; input:
|
; input:
|
||||||
; de = current music address
|
; de = current music address
|
||||||
; output:
|
; output:
|
||||||
@@ -3156,7 +3156,7 @@ ChannelPointers: ; e8fd9
|
|||||||
dw Channel8
|
dw Channel8
|
||||||
; e8fe9
|
; e8fe9
|
||||||
|
|
||||||
ClearChannels: ; e8fe9
|
ClearChannels:: ; e8fe9
|
||||||
; runs ClearChannel for all 4 channels
|
; runs ClearChannel for all 4 channels
|
||||||
; doesn't seem to be used, but functionally identical to SoundRestart
|
; doesn't seem to be used, but functionally identical to SoundRestart
|
||||||
ld hl, rNR50
|
ld hl, rNR50
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
; Currently, must be in the same bank as the sound engine.
|
; Currently, must be in the same bank as the sound engine.
|
||||||
|
|
||||||
PlayTrainerEncounterMusic: ; e900a
|
PlayTrainerEncounterMusic:: ; e900a
|
||||||
; input: e = trainer type
|
; input: e = trainer type
|
||||||
; turn fade off
|
; turn fade off
|
||||||
xor a
|
xor a
|
||||||
|
@@ -335,7 +335,7 @@ Functioncc293: ; cc293
|
|||||||
|
|
||||||
|
|
||||||
; no known jump sources
|
; no known jump sources
|
||||||
BattleAnimCommands: ; cc2a4 (33:42a4)
|
BattleAnimCommands:: ; cc2a4 (33:42a4)
|
||||||
dw BattleAnimCmd_D0
|
dw BattleAnimCmd_D0
|
||||||
dw BattleAnimCmd_D1
|
dw BattleAnimCmd_D1
|
||||||
dw BattleAnimCmd_D2
|
dw BattleAnimCmd_D2
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
BattleAnimations: ; c906f
|
BattleAnimations:: ; c906f
|
||||||
dw BattleAnim_0
|
dw BattleAnim_0
|
||||||
dw BattleAnim_Pound
|
dw BattleAnim_Pound
|
||||||
dw BattleAnim_KarateChop
|
dw BattleAnim_KarateChop
|
||||||
|
@@ -4761,7 +4761,7 @@ Function3df2c: ; 3df2c
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
Function3df48: ; 3df48
|
Function3df48:: ; 3df48
|
||||||
push hl
|
push hl
|
||||||
push de
|
push de
|
||||||
push bc
|
push bc
|
||||||
@@ -4907,7 +4907,7 @@ PrintPlayerHUD: ; 3dfbf
|
|||||||
jp PrintLevel
|
jp PrintLevel
|
||||||
; 3e036
|
; 3e036
|
||||||
|
|
||||||
Function3e036: ; 3e036
|
Function3e036:: ; 3e036
|
||||||
push hl
|
push hl
|
||||||
push de
|
push de
|
||||||
push bc
|
push bc
|
||||||
@@ -7191,7 +7191,7 @@ EmptyBattleTextBox: ; 3edd1
|
|||||||
; 3edd8
|
; 3edd8
|
||||||
|
|
||||||
|
|
||||||
_BattleRandom: ; 3edd8
|
_BattleRandom:: ; 3edd8
|
||||||
; If the normal RNG is used in a link battle it'll desync.
|
; If the normal RNG is used in a link battle it'll desync.
|
||||||
; To circumvent this a shared PRNG is used instead.
|
; To circumvent this a shared PRNG is used instead.
|
||||||
|
|
||||||
|
@@ -865,7 +865,7 @@ Function9853: ; 9853
|
|||||||
; 9890
|
; 9890
|
||||||
|
|
||||||
|
|
||||||
Function9890: ; 9890
|
Function9890:: ; 9890
|
||||||
call CheckCGB
|
call CheckCGB
|
||||||
ret z
|
ret z
|
||||||
ld a, $1
|
ld a, $1
|
||||||
|
@@ -114,7 +114,7 @@ const_value SET -7
|
|||||||
const CREDITS_END
|
const CREDITS_END
|
||||||
|
|
||||||
|
|
||||||
Function109847: ; 109847
|
Function109847:: ; 109847
|
||||||
bit 6, b
|
bit 6, b
|
||||||
ld a, $0
|
ld a, $0
|
||||||
jr z, .asm_10984f
|
jr z, .asm_10984f
|
||||||
|
@@ -3,7 +3,7 @@ INCLUDE "includes.asm"
|
|||||||
|
|
||||||
SECTION "Events", ROMX, BANK[EVENTS]
|
SECTION "Events", ROMX, BANK[EVENTS]
|
||||||
|
|
||||||
OverworldLoop: ; 966b0
|
OverworldLoop:: ; 966b0
|
||||||
xor a
|
xor a
|
||||||
ld [MapStatus], a
|
ld [MapStatus], a
|
||||||
.loop
|
.loop
|
||||||
@@ -30,7 +30,7 @@ Function966cb: ; 966cb
|
|||||||
ret
|
ret
|
||||||
; 966d0
|
; 966d0
|
||||||
|
|
||||||
Function966d0: ; 966d0
|
Function966d0:: ; 966d0
|
||||||
ld a, $ff
|
ld a, $ff
|
||||||
ld [ScriptFlags3], a
|
ld [ScriptFlags3], a
|
||||||
ret
|
ret
|
||||||
@@ -419,7 +419,7 @@ CheckTileEvent: ; 96874
|
|||||||
; 968c7
|
; 968c7
|
||||||
|
|
||||||
|
|
||||||
Function968c7: ; 968c7
|
Function968c7:: ; 968c7
|
||||||
ld hl, $d452
|
ld hl, $d452
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
and a
|
and a
|
||||||
|
@@ -5,14 +5,14 @@ INCLUDE "includes.asm"
|
|||||||
|
|
||||||
SECTION "Events 2", ROMX, BANK[EVENTS]
|
SECTION "Events 2", ROMX, BANK[EVENTS]
|
||||||
|
|
||||||
Function97c28: ; 97c28
|
Function97c28:: ; 97c28
|
||||||
ld hl, StatusFlags2
|
ld hl, StatusFlags2
|
||||||
res 1, [hl]
|
res 1, [hl]
|
||||||
res 2, [hl]
|
res 2, [hl]
|
||||||
ret
|
ret
|
||||||
; 97c30
|
; 97c30
|
||||||
|
|
||||||
Function97c30: ; 97c30
|
Function97c30:: ; 97c30
|
||||||
ld a, [$d45c]
|
ld a, [$d45c]
|
||||||
and a
|
and a
|
||||||
ret z
|
ret z
|
||||||
@@ -32,7 +32,7 @@ Function97c30: ; 97c30
|
|||||||
ret
|
ret
|
||||||
; 97c4f
|
; 97c4f
|
||||||
|
|
||||||
Function97c4f: ; 97c4f
|
Function97c4f:: ; 97c4f
|
||||||
ld hl, $d45c
|
ld hl, $d45c
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
and a
|
and a
|
||||||
@@ -48,7 +48,7 @@ Function97c4f: ; 97c4f
|
|||||||
ret
|
ret
|
||||||
; 97c5f
|
; 97c5f
|
||||||
|
|
||||||
Function97c5f: ; 97c5f
|
Function97c5f:: ; 97c5f
|
||||||
call GetFacingTileCoord
|
call GetFacingTileCoord
|
||||||
ld [EngineBuffer1], a
|
ld [EngineBuffer1], a
|
||||||
ld c, a
|
ld c, a
|
||||||
@@ -99,7 +99,7 @@ Function97c5f: ; 97c5f
|
|||||||
; 97cc0
|
; 97cc0
|
||||||
|
|
||||||
|
|
||||||
Function97cc0: ; 97cc0
|
Function97cc0:: ; 97cc0
|
||||||
; Rock Smash encounter
|
; Rock Smash encounter
|
||||||
|
|
||||||
call Function968c7
|
call Function968c7
|
||||||
@@ -146,7 +146,7 @@ RockSmashBattleScript: ; 97cf9
|
|||||||
end
|
end
|
||||||
; 97cfd
|
; 97cfd
|
||||||
|
|
||||||
Function97cfd: ; 97cfd
|
Function97cfd:: ; 97cfd
|
||||||
ld hl, StatusFlags
|
ld hl, StatusFlags
|
||||||
bit 5, [hl]
|
bit 5, [hl]
|
||||||
jr nz, .asm_97d21
|
jr nz, .asm_97d21
|
||||||
@@ -178,7 +178,7 @@ Function97d23: ; 97d23
|
|||||||
ret
|
ret
|
||||||
; 97d31
|
; 97d31
|
||||||
|
|
||||||
Function97d31: ; 97d31
|
Function97d31:: ; 97d31
|
||||||
; Pick a random mon out of ContestMons.
|
; Pick a random mon out of ContestMons.
|
||||||
|
|
||||||
.asm_97d31
|
.asm_97d31
|
||||||
@@ -266,7 +266,7 @@ ContestMons: ; 97d87
|
|||||||
db -1, VENOMOTH, 30, 40
|
db -1, VENOMOTH, 30, 40
|
||||||
; 97db3
|
; 97db3
|
||||||
|
|
||||||
Function97db3: ; 97db3
|
Function97db3:: ; 97db3
|
||||||
nop
|
nop
|
||||||
nop
|
nop
|
||||||
; fallthrough
|
; fallthrough
|
||||||
@@ -319,7 +319,7 @@ Function97db5: ; 97db5
|
|||||||
ret
|
ret
|
||||||
; 97df9
|
; 97df9
|
||||||
|
|
||||||
Function97df9: ; 97df9
|
Function97df9:: ; 97df9
|
||||||
ld hl, $d6de
|
ld hl, $d6de
|
||||||
ld de, $0006
|
ld de, $0006
|
||||||
ld c, $4
|
ld c, $4
|
||||||
@@ -332,7 +332,7 @@ Function97df9: ; 97df9
|
|||||||
ret
|
ret
|
||||||
; 97e08
|
; 97e08
|
||||||
|
|
||||||
Function97e08: ; 97e08
|
Function97e08:: ; 97e08
|
||||||
ld hl, $d6de
|
ld hl, $d6de
|
||||||
xor a
|
xor a
|
||||||
.asm_97e0c
|
.asm_97e0c
|
||||||
@@ -365,7 +365,7 @@ Function97e25: ; 97e25
|
|||||||
ret
|
ret
|
||||||
; 97e31
|
; 97e31
|
||||||
|
|
||||||
Function97e31: ; 97e31
|
Function97e31:: ; 97e31
|
||||||
push bc
|
push bc
|
||||||
push de
|
push de
|
||||||
call Function97e45
|
call Function97e45
|
||||||
@@ -403,7 +403,7 @@ Function97e45: ; 97e45
|
|||||||
ret
|
ret
|
||||||
; 97e5c
|
; 97e5c
|
||||||
|
|
||||||
Function97e5c: ; 97e5c
|
Function97e5c:: ; 97e5c
|
||||||
ld hl, $d6de
|
ld hl, $d6de
|
||||||
ld de, $0006
|
ld de, $0006
|
||||||
ld c, $4
|
ld c, $4
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
FruitTreeScript: ; 44000
|
FruitTreeScript:: ; 44000
|
||||||
3callasm GetCurTreeFruit
|
3callasm GetCurTreeFruit
|
||||||
loadfont
|
loadfont
|
||||||
copybytetovar CurFruit
|
copybytetovar CurFruit
|
||||||
|
@@ -15,7 +15,7 @@ GetLandmarkCoords: ; 0x1ca896
|
|||||||
; 0x1ca8a5
|
; 0x1ca8a5
|
||||||
|
|
||||||
|
|
||||||
GetLandmarkName: ; 0x1ca8a5
|
GetLandmarkName:: ; 0x1ca8a5
|
||||||
; Copy the name of landmark e to StringBuffer1.
|
; Copy the name of landmark e to StringBuffer1.
|
||||||
push hl
|
push hl
|
||||||
push de
|
push de
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
; Event scripting commands.
|
; Event scripting commands.
|
||||||
|
|
||||||
|
|
||||||
Function96c56: ; 96c56
|
Function96c56:: ; 96c56
|
||||||
push af
|
push af
|
||||||
ld a, 1
|
ld a, 1
|
||||||
ld [ScriptMode], a
|
ld [ScriptMode], a
|
||||||
@@ -10,7 +10,7 @@ Function96c56: ; 96c56
|
|||||||
; 96c5e
|
; 96c5e
|
||||||
|
|
||||||
|
|
||||||
ScriptEvents: ; 96c5e
|
ScriptEvents:: ; 96c5e
|
||||||
call StartScript
|
call StartScript
|
||||||
.loop
|
.loop
|
||||||
ld a, [ScriptMode]
|
ld a, [ScriptMode]
|
||||||
@@ -1658,7 +1658,7 @@ ScriptCall: ; 0x974cb
|
|||||||
ret
|
ret
|
||||||
; 0x974f3
|
; 0x974f3
|
||||||
|
|
||||||
Unknown_0x974f3: ; 0x974f3
|
Unknown_0x974f3:: ; 0x974f3
|
||||||
ld a, [ScriptBank]
|
ld a, [ScriptBank]
|
||||||
or $80
|
or $80
|
||||||
ld [ScriptBank], a
|
ld [ScriptBank], a
|
||||||
@@ -2952,7 +2952,7 @@ Script_changeblock: ; 0x97acc
|
|||||||
ret
|
ret
|
||||||
; 0x97ae3
|
; 0x97ae3
|
||||||
|
|
||||||
Script_reloadmappart: ; 0x97ae3
|
Script_reloadmappart:: ; 0x97ae3
|
||||||
; script command 0x7c
|
; script command 0x7c
|
||||||
|
|
||||||
xor a
|
xor a
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
StdScripts: ; bc000
|
StdScripts:: ; bc000
|
||||||
dbw BANK(PokeCenterNurseScript), PokeCenterNurseScript
|
dbw BANK(PokeCenterNurseScript), PokeCenterNurseScript
|
||||||
dbw BANK(UnknownScript_0xbc162), UnknownScript_0xbc162
|
dbw BANK(UnknownScript_0xbc162), UnknownScript_0xbc162
|
||||||
dbw BANK(UnknownScript_0xbc166), UnknownScript_0xbc166
|
dbw BANK(UnknownScript_0xbc166), UnknownScript_0xbc166
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
; Functions to copy data from ROM.
|
; Functions to copy data from ROM.
|
||||||
|
|
||||||
|
|
||||||
Functiondc9: ; dc9
|
Functiondc9:: ; dc9
|
||||||
ld a, [rLCDC]
|
ld a, [rLCDC]
|
||||||
bit 7, a
|
bit 7, a
|
||||||
jp z, Copy2bpp
|
jp z, Copy2bpp
|
||||||
@@ -17,7 +17,7 @@ Functiondc9: ; dc9
|
|||||||
ret
|
ret
|
||||||
; ddc
|
; ddc
|
||||||
|
|
||||||
Functionddc: ; ddc
|
Functionddc:: ; ddc
|
||||||
ld a, [rLCDC]
|
ld a, [rLCDC]
|
||||||
bit 7, a
|
bit 7, a
|
||||||
jp z, Copy1bpp
|
jp z, Copy1bpp
|
||||||
@@ -33,7 +33,7 @@ Functionddc: ; ddc
|
|||||||
ret
|
ret
|
||||||
; def
|
; def
|
||||||
|
|
||||||
Functiondef: ; def
|
Functiondef:: ; def
|
||||||
ld [hBuffer], a
|
ld [hBuffer], a
|
||||||
ld a, [hROMBank]
|
ld a, [hROMBank]
|
||||||
push af
|
push af
|
||||||
@@ -45,7 +45,7 @@ Functiondef: ; def
|
|||||||
ret
|
ret
|
||||||
; dfd
|
; dfd
|
||||||
|
|
||||||
Functiondfd: ; dfd
|
Functiondfd:: ; dfd
|
||||||
dec c
|
dec c
|
||||||
ld a, [hBGMapMode]
|
ld a, [hBGMapMode]
|
||||||
push af
|
push af
|
||||||
@@ -105,37 +105,37 @@ Functiondfd: ; dfd
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
Functione4a: ; e4a
|
Functione4a:: ; e4a
|
||||||
callba Function14135
|
callba Function14135
|
||||||
ret
|
ret
|
||||||
; e51
|
; e51
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Functione51: ; e51
|
Functione51:: ; e51
|
||||||
callba Functionfb449
|
callba Functionfb449
|
||||||
ret
|
ret
|
||||||
; e58
|
; e58
|
||||||
|
|
||||||
Functione58: ; e58
|
Functione58:: ; e58
|
||||||
callba Functionfb4be
|
callba Functionfb4be
|
||||||
ret
|
ret
|
||||||
; e5f
|
; e5f
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Functione5f: ; e5f
|
Functione5f:: ; e5f
|
||||||
callba Functionfb48a
|
callba Functionfb48a
|
||||||
callba Functionfb4b0
|
callba Functionfb4b0
|
||||||
ret
|
ret
|
||||||
; e6c
|
; e6c
|
||||||
|
|
||||||
Functione6c: ; e6c
|
Functione6c:: ; e6c
|
||||||
callba Functionfb4b0
|
callba Functionfb4b0
|
||||||
ret
|
ret
|
||||||
; e73
|
; e73
|
||||||
|
|
||||||
Functione73: ; e73
|
Functione73:: ; e73
|
||||||
push de
|
push de
|
||||||
ld a, $0
|
ld a, $0
|
||||||
call GetSRAMBank
|
call GetSRAMBank
|
||||||
@@ -153,7 +153,7 @@ Functione73: ; e73
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
FarCopyBytes: ; e8d
|
FarCopyBytes:: ; e8d
|
||||||
; copy bc bytes from a:hl to de
|
; copy bc bytes from a:hl to de
|
||||||
|
|
||||||
ld [hBuffer], a
|
ld [hBuffer], a
|
||||||
@@ -170,7 +170,7 @@ FarCopyBytes: ; e8d
|
|||||||
; 0xe9b
|
; 0xe9b
|
||||||
|
|
||||||
|
|
||||||
FarCopyBytesDouble: ; e9b
|
FarCopyBytesDouble:: ; e9b
|
||||||
; Copy bc bytes from a:hl to bc*2 bytes at de,
|
; Copy bc bytes from a:hl to bc*2 bytes at de,
|
||||||
; doubling each byte in the process.
|
; doubling each byte in the process.
|
||||||
|
|
||||||
@@ -209,7 +209,7 @@ FarCopyBytesDouble: ; e9b
|
|||||||
; 0xeba
|
; 0xeba
|
||||||
|
|
||||||
|
|
||||||
Request2bpp: ; eba
|
Request2bpp:: ; eba
|
||||||
ld a, [hBGMapMode]
|
ld a, [hBGMapMode]
|
||||||
push af
|
push af
|
||||||
xor a
|
xor a
|
||||||
@@ -283,7 +283,7 @@ Request2bpp: ; eba
|
|||||||
; f1e
|
; f1e
|
||||||
|
|
||||||
|
|
||||||
Request1bpp: ; f1e
|
Request1bpp:: ; f1e
|
||||||
ld a, [hBGMapMode]
|
ld a, [hBGMapMode]
|
||||||
push af
|
push af
|
||||||
xor a
|
xor a
|
||||||
@@ -356,12 +356,12 @@ Request1bpp: ; f1e
|
|||||||
; f82
|
; f82
|
||||||
|
|
||||||
|
|
||||||
Get2bpp: ; f82
|
Get2bpp:: ; f82
|
||||||
ld a, [rLCDC]
|
ld a, [rLCDC]
|
||||||
bit 7, a
|
bit 7, a
|
||||||
jp nz, Request2bpp
|
jp nz, Request2bpp
|
||||||
|
|
||||||
Copy2bpp: ; f89
|
Copy2bpp:: ; f89
|
||||||
; copy c 2bpp tiles from b:de to hl
|
; copy c 2bpp tiles from b:de to hl
|
||||||
|
|
||||||
push hl
|
push hl
|
||||||
@@ -387,12 +387,12 @@ Copy2bpp: ; f89
|
|||||||
; f9d
|
; f9d
|
||||||
|
|
||||||
|
|
||||||
Get1bpp: ; f9d
|
Get1bpp:: ; f9d
|
||||||
ld a, [rLCDC]
|
ld a, [rLCDC]
|
||||||
bit 7, a
|
bit 7, a
|
||||||
jp nz, Request1bpp
|
jp nz, Request1bpp
|
||||||
|
|
||||||
Copy1bpp: ; fa4
|
Copy1bpp:: ; fa4
|
||||||
; copy c 1bpp tiles from b:de to hl
|
; copy c 1bpp tiles from b:de to hl
|
||||||
|
|
||||||
push de
|
push de
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
CopyBytes: ; 0x3026
|
CopyBytes:: ; 0x3026
|
||||||
; copy bc bytes from hl to de
|
; copy bc bytes from hl to de
|
||||||
inc b ; we bail the moment b hits 0, so include the last run
|
inc b ; we bail the moment b hits 0, so include the last run
|
||||||
inc c ; same thing; include last byte
|
inc c ; same thing; include last byte
|
||||||
@@ -14,7 +14,7 @@ CopyBytes: ; 0x3026
|
|||||||
jr nz, .CopyByte
|
jr nz, .CopyByte
|
||||||
ret
|
ret
|
||||||
|
|
||||||
SwapBytes: ; 0x3034
|
SwapBytes:: ; 0x3034
|
||||||
; swap bc bytes between hl and de
|
; swap bc bytes between hl and de
|
||||||
.Loop
|
.Loop
|
||||||
; stash [hl] away on the stack
|
; stash [hl] away on the stack
|
||||||
@@ -37,7 +37,7 @@ SwapBytes: ; 0x3034
|
|||||||
jr nz, .Loop
|
jr nz, .Loop
|
||||||
ret
|
ret
|
||||||
|
|
||||||
ByteFill: ; 0x3041
|
ByteFill:: ; 0x3041
|
||||||
; fill bc bytes with the value of a, starting at hl
|
; fill bc bytes with the value of a, starting at hl
|
||||||
inc b ; we bail the moment b hits 0, so include the last run
|
inc b ; we bail the moment b hits 0, so include the last run
|
||||||
inc c ; same thing; include last byte
|
inc c ; same thing; include last byte
|
||||||
@@ -51,7 +51,7 @@ ByteFill: ; 0x3041
|
|||||||
jr nz, .PutByte
|
jr nz, .PutByte
|
||||||
ret
|
ret
|
||||||
|
|
||||||
GetFarByte: ; 0x304d
|
GetFarByte:: ; 0x304d
|
||||||
; retrieve a single byte from a:hl, and return it in a.
|
; retrieve a single byte from a:hl, and return it in a.
|
||||||
; bankswitch to new bank
|
; bankswitch to new bank
|
||||||
ld [hBuffer], a
|
ld [hBuffer], a
|
||||||
@@ -72,7 +72,7 @@ GetFarByte: ; 0x304d
|
|||||||
ld a, [hBuffer]
|
ld a, [hBuffer]
|
||||||
ret
|
ret
|
||||||
|
|
||||||
GetFarHalfword: ; 0x305d
|
GetFarHalfword:: ; 0x305d
|
||||||
; retrieve a halfword from a:hl, and return it in hl.
|
; retrieve a halfword from a:hl, and return it in hl.
|
||||||
; bankswitch to new bank
|
; bankswitch to new bank
|
||||||
ld [hBuffer], a
|
ld [hBuffer], a
|
||||||
@@ -92,7 +92,7 @@ GetFarHalfword: ; 0x305d
|
|||||||
ret
|
ret
|
||||||
; 0x306b
|
; 0x306b
|
||||||
|
|
||||||
FarCopyWRAM: ; 306b
|
FarCopyWRAM:: ; 306b
|
||||||
ld [hBuffer], a
|
ld [hBuffer], a
|
||||||
ld a, [rSVBK]
|
ld a, [rSVBK]
|
||||||
push af
|
push af
|
||||||
@@ -104,7 +104,7 @@ FarCopyWRAM: ; 306b
|
|||||||
ret
|
ret
|
||||||
; 307b
|
; 307b
|
||||||
|
|
||||||
GetFarWRAMByte: ; 307b
|
GetFarWRAMByte:: ; 307b
|
||||||
ld [hBuffer], a
|
ld [hBuffer], a
|
||||||
ld a, [rSVBK]
|
ld a, [rSVBK]
|
||||||
push af
|
push af
|
||||||
@@ -118,7 +118,7 @@ GetFarWRAMByte: ; 307b
|
|||||||
ret
|
ret
|
||||||
; 308d
|
; 308d
|
||||||
|
|
||||||
GetFarWRAMWord: ; 308d
|
GetFarWRAMWord:: ; 308d
|
||||||
ld [hBuffer], a
|
ld [hBuffer], a
|
||||||
ld a, [rSVBK]
|
ld a, [rSVBK]
|
||||||
push af
|
push af
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
FarDecompress: ; b40
|
FarDecompress:: ; b40
|
||||||
; Decompress graphics data at a:hl to de
|
; Decompress graphics data at a:hl to de
|
||||||
|
|
||||||
; put a away for a sec
|
; put a away for a sec
|
||||||
@@ -20,7 +20,7 @@ FarDecompress: ; b40
|
|||||||
; b50
|
; b50
|
||||||
|
|
||||||
|
|
||||||
Decompress: ; b50
|
Decompress:: ; b50
|
||||||
; Pokemon Crystal uses an lz variant for compression.
|
; Pokemon Crystal uses an lz variant for compression.
|
||||||
|
|
||||||
; This is mainly used for graphics, but the intro's
|
; This is mainly used for graphics, but the intro's
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
DelayFrame: ; 45a
|
DelayFrame:: ; 45a
|
||||||
; Wait for one frame
|
; Wait for one frame
|
||||||
ld a, 1
|
ld a, 1
|
||||||
ld [VBlankOccurred], a
|
ld [VBlankOccurred], a
|
||||||
@@ -13,7 +13,7 @@ DelayFrame: ; 45a
|
|||||||
; 468
|
; 468
|
||||||
|
|
||||||
|
|
||||||
DelayFrames: ; 468
|
DelayFrames:: ; 468
|
||||||
; Wait c frames
|
; Wait c frames
|
||||||
call DelayFrame
|
call DelayFrame
|
||||||
dec c
|
dec c
|
||||||
|
@@ -5,20 +5,20 @@
|
|||||||
; and double speed at any time, but LCD output
|
; and double speed at any time, but LCD output
|
||||||
; collapses during the switch.
|
; collapses during the switch.
|
||||||
|
|
||||||
DoubleSpeed: ; 2fef
|
DoubleSpeed:: ; 2fef
|
||||||
ld hl, rKEY1
|
ld hl, rKEY1
|
||||||
bit 7, [hl]
|
bit 7, [hl]
|
||||||
jr z, SwitchSpeed
|
jr z, SwitchSpeed
|
||||||
ret
|
ret
|
||||||
; 2ff7
|
; 2ff7
|
||||||
|
|
||||||
NormalSpeed: ; 2ff7
|
NormalSpeed:: ; 2ff7
|
||||||
ld hl, rKEY1
|
ld hl, rKEY1
|
||||||
bit 7, [hl]
|
bit 7, [hl]
|
||||||
ret z
|
ret z
|
||||||
; 2ffd
|
; 2ffd
|
||||||
|
|
||||||
SwitchSpeed: ; 2ffd
|
SwitchSpeed:: ; 2ffd
|
||||||
set 0, [hl]
|
set 0, [hl]
|
||||||
xor a
|
xor a
|
||||||
ld [rIF], a
|
ld [rIF], a
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user