summaryrefslogtreecommitdiff
path: root/engine/link
diff options
context:
space:
mode:
authorRangi <remy.oukaour+rangi42@gmail.com>2020-07-06 19:03:05 -0400
committerRangi <remy.oukaour+rangi42@gmail.com>2020-07-06 19:03:05 -0400
commit772fcc7588a4e1fbe146a02b429cf64282c81dcb (patch)
treef491fa1d38e37ab10534b3f18422e0149ad0deca /engine/link
parentc480632d5494d04f7f5f0298a31877a2293b564e (diff)
Specify the ldh instruction, don't turn ld into ldh
Diffstat (limited to 'engine/link')
-rwxr-xr-xengine/link/cable_club.asm26
-rwxr-xr-xengine/link/cable_club_npc.asm24
2 files changed, 25 insertions, 25 deletions
diff --git a/engine/link/cable_club.asm b/engine/link/cable_club.asm
index ca43a895..abb88cc0 100755
--- a/engine/link/cable_club.asm
+++ b/engine/link/cable_club.asm
@@ -102,25 +102,25 @@ CableClub_DoBattleOrTradeAgain:
ld a, SERIAL_PATCH_LIST_PART_TERMINATOR
ld [de], a ; end of part 2
call Serial_SyncAndExchangeNybble
- ld a, [hSerialConnectionStatus]
+ ldh a, [hSerialConnectionStatus]
cp USING_INTERNAL_CLOCK
jr nz, .skipSendingTwoZeroBytes
; if using internal clock
; send two zero bytes for syncing purposes?
call Delay3
xor a
- ld [hSerialSendData], a
+ ldh [hSerialSendData], a
ld a, START_TRANSFER_INTERNAL_CLOCK
- ld [rSC], a
+ ldh [rSC], a
call DelayFrame
xor a
- ld [hSerialSendData], a
+ ldh [hSerialSendData], a
ld a, START_TRANSFER_INTERNAL_CLOCK
- ld [rSC], a
+ ldh [rSC], a
.skipSendingTwoZeroBytes
call Delay3
ld a, (1 << SERIAL)
- ld [rIE], a
+ ldh [rIE], a
ld hl, wSerialRandomNumberListBlock
ld de, wSerialOtherGameboyRandomNumberListBlock
ld bc, $11
@@ -138,10 +138,10 @@ CableClub_DoBattleOrTradeAgain:
ld bc, $c8
call Serial_ExchangeBytes
ld a, (1 << SERIAL) | (1 << TIMER) | (1 << VBLANK)
- ld [rIE], a
+ ldh [rIE], a
ld a, SFX_STOP_ALL_MUSIC
call PlaySound
- ld a, [hSerialConnectionStatus]
+ ldh a, [hSerialConnectionStatus]
cp USING_INTERNAL_CLOCK
jr z, .skipCopyingRandomNumberList ; the list generated by the gameboy clocking the connection is used by both gameboys
ld hl, wSerialOtherGameboyRandomNumberListBlock
@@ -263,7 +263,7 @@ CableClub_DoBattleOrTradeAgain:
ld [wTradeCenterPointerTableIndex], a
ld a, SFX_STOP_ALL_MUSIC
call PlaySound
- ld a, [hSerialConnectionStatus]
+ ldh a, [hSerialConnectionStatus]
cp USING_INTERNAL_CLOCK
ld c, 66
call z, DelayFrames ; delay if using internal clock
@@ -551,7 +551,7 @@ TradeCenter_SelectMon:
Coorda 1, 16
.cancelMenuItem_JoypadLoop
call JoypadLowSensitivity
- ld a, [hJoy5]
+ ldh a, [hJoy5]
and a ; pressed anything?
jr z, .cancelMenuItem_JoypadLoop
bit 0, a ; A button pressed?
@@ -663,7 +663,7 @@ TradeCenter_PrintPartyListNames:
push de
push hl
ld a, c
- ld [hPastLeadingZeros], a
+ ldh [hPastLeadingZeros], a
call GetMonName
pop hl
call PlaceString
@@ -837,7 +837,7 @@ TradeCenter_Trade:
call LoadHpBarAndStatusTilePatterns
xor a
ld [wUnusedCC5B], a
- ld a, [hSerialConnectionStatus]
+ ldh a, [hSerialConnectionStatus]
cp USING_EXTERNAL_CLOCK
jr z, .usingExternalClock
predef InternalClockTradeAnim
@@ -914,7 +914,7 @@ CableClub_Run:
ld [wGrassRate], a
inc a ; LINK_STATE_IN_CABLE_CLUB
ld [wLinkState], a
- ld [hJoy5], a
+ ldh [hJoy5], a
ld a, 10
ld [wAudioFadeOutControl], a
ld a, BANK(Music_Celadon)
diff --git a/engine/link/cable_club_npc.asm b/engine/link/cable_club_npc.asm
index 6001c314..16c62f9e 100755
--- a/engine/link/cable_club_npc.asm
+++ b/engine/link/cable_club_npc.asm
@@ -15,27 +15,27 @@ CableClubNPC::
ld a, 90
ld [wLinkTimeoutCounter], a
.establishConnectionLoop
- ld a, [hSerialConnectionStatus]
+ ldh a, [hSerialConnectionStatus]
cp USING_INTERNAL_CLOCK
jr z, .establishedConnection
cp USING_EXTERNAL_CLOCK
jr z, .establishedConnection
ld a, CONNECTION_NOT_ESTABLISHED
- ld [hSerialConnectionStatus], a
+ ldh [hSerialConnectionStatus], a
ld a, ESTABLISH_CONNECTION_WITH_EXTERNAL_CLOCK
- ld [rSB], a
+ ldh [rSB], a
xor a
- ld [hSerialReceiveData], a
+ ldh [hSerialReceiveData], a
ld a, START_TRANSFER_EXTERNAL_CLOCK
- ld [rSC], a
+ ldh [rSC], a
ld a, [wLinkTimeoutCounter]
dec a
ld [wLinkTimeoutCounter], a
jr z, .failedToEstablishConnection
ld a, ESTABLISH_CONNECTION_WITH_INTERNAL_CLOCK
- ld [rSB], a
+ ldh [rSB], a
ld a, START_TRANSFER_INTERNAL_CLOCK
- ld [rSC], a
+ ldh [rSC], a
call DelayFrame
jr .establishConnectionLoop
.establishedConnection
@@ -65,7 +65,7 @@ CableClubNPC::
ld [hli], a
xor a
ld [hl], a
- ld [hSerialReceivedNewData], a
+ ldh [hSerialReceivedNewData], a
ld [wSerialExchangeNybbleSendData], a
call Serial_SyncAndExchangeNybble
ld hl, wUnknownSerialCounter
@@ -141,11 +141,11 @@ CableClubNPCMakingPreparationsText:
CloseLinkConnection:
call Delay3
ld a, CONNECTION_NOT_ESTABLISHED
- ld [hSerialConnectionStatus], a
+ ldh [hSerialConnectionStatus], a
ld a, ESTABLISH_CONNECTION_WITH_EXTERNAL_CLOCK
- ld [rSB], a
+ ldh [rSB], a
xor a
- ld [hSerialReceiveData], a
+ ldh [hSerialReceiveData], a
ld a, START_TRANSFER_EXTERNAL_CLOCK
- ld [rSC], a
+ ldh [rSC], a
ret