Fix usage of rIE and rSC constants

This commit is contained in:
mid-kid
2019-05-05 18:14:46 +02:00
parent 40766b9a76
commit 13cfe356d6
13 changed files with 77 additions and 76 deletions

View File

@@ -28,9 +28,9 @@ Serial::
cp USING_INTERNAL_CLOCK
jr z, .player2
ld a, 0 << rSC_ON
ld a, (0 << rSC_ON) | (0 << rSC_CLOCK)
ldh [rSC], a
ld a, 1 << rSC_ON
ld a, (1 << rSC_ON) | (0 << rSC_CLOCK)
ldh [rSC], a
jr .player2
@@ -65,9 +65,9 @@ Serial::
bit 7, a
jr nz, .wait_bit_7
ld a, 0 << rSC_ON
ld a, (0 << rSC_ON) | (0 << rSC_CLOCK)
ldh [rSC], a
ld a, 1 << rSC_ON
ld a, (1 << rSC_ON) | (0 << rSC_CLOCK)
ldh [rSC], a
jr .player2
@@ -130,9 +130,9 @@ Serial_ExchangeByte::
ldh a, [hSerialConnectionStatus]
cp USING_INTERNAL_CLOCK
jr nz, .not_player_2
ld a, (0 << rSC_ON) | 1
ld a, (0 << rSC_ON) | (1 << rSC_CLOCK)
ldh [rSC], a
ld a, (1 << rSC_ON) | 1
ld a, (1 << rSC_ON) | (1 << rSC_CLOCK)
ldh [rSC], a
.not_player_2
.loop2
@@ -352,9 +352,9 @@ LinkTransfer::
ldh a, [hSerialConnectionStatus]
cp USING_INTERNAL_CLOCK
jr nz, .player_1
ld a, (0 << rSC_ON) | 1
ld a, (0 << rSC_ON) | (1 << rSC_CLOCK)
ldh [rSC], a
ld a, (1 << rSC_ON) | 1
ld a, (1 << rSC_ON) | (1 << rSC_CLOCK)
ldh [rSC], a
.player_1
@@ -382,9 +382,9 @@ LinkDataReceived::
ldh a, [hSerialConnectionStatus]
cp USING_INTERNAL_CLOCK
ret nz
ld a, (0 << rSC_ON) | 1
ld a, (0 << rSC_ON) | (1 << rSC_CLOCK)
ldh [rSC], a
ld a, (1 << rSC_ON) | 1
ld a, (1 << rSC_ON) | (1 << rSC_CLOCK)
ldh [rSC], a
ret
@@ -396,8 +396,8 @@ Unreferenced_Function919::
ldh [rSB], a
xor a
ldh [hSerialReceive], a
ld a, 0 << rSC_ON
ld a, (0 << rSC_ON) | (0 << rSC_CLOCK)
ldh [rSC], a
ld a, 1 << rSC_ON
ld a, (1 << rSC_ON) | (0 << rSC_CLOCK)
ldh [rSC], a
ret