Build the Virtual Console patches with make red_vc and make blue_vc (#351)

This commit is contained in:
vulcandth 2022-03-26 15:59:36 -05:00 committed by GitHub
parent 07df4a5f88
commit fe8d3c51a4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
24 changed files with 1752 additions and 34 deletions

View file

@ -124,18 +124,21 @@ CableClub_DoBattleOrTradeAgain:
ld hl, wSerialRandomNumberListBlock
ld de, wSerialOtherGameboyRandomNumberListBlock
ld bc, $11
vc_hook Network17
call Serial_ExchangeBytes
ld a, SERIAL_NO_DATA_BYTE
ld [de], a
ld hl, wSerialPlayerDataBlock
ld de, wSerialEnemyDataBlock
ld bc, $1a8
vc_hook Network424
call Serial_ExchangeBytes
ld a, SERIAL_NO_DATA_BYTE
ld [de], a
ld hl, wSerialPartyMonsPatchList
ld de, wSerialEnemyMonsPatchList
ld bc, $c8
vc_hook Network200
call Serial_ExchangeBytes
ld a, (1 << SERIAL) | (1 << TIMER) | (1 << VBLANK)
ldh [rIE], a
@ -859,6 +862,7 @@ TradeCenter_Trade:
ld de, TradeCompleted
call PlaceString
predef SaveSAVtoSRAM2
vc_hook save_game_end
ld c, 50
call DelayFrames
xor a

View file

@ -27,6 +27,7 @@ CableClubNPC::
xor a
ldh [hSerialReceiveData], a
ld a, START_TRANSFER_EXTERNAL_CLOCK
vc_hook linkCable_fake_begin
ldh [rSC], a
ld a, [wLinkTimeoutCounter]
dec a
@ -54,6 +55,7 @@ CableClubNPC::
ld a, [wCurrentMenuItem]
and a
jr nz, .choseNo
vc_hook linkCable_block_input
callfar SaveSAVtoSRAM
call WaitForSoundToFinish
ld a, SFX_SAVE
@ -66,8 +68,10 @@ CableClubNPC::
xor a
ld [hl], a
ldh [hSerialReceivedNewData], a
vc_hook linkCable_fake_end
ld [wSerialExchangeNybbleSendData], a
call Serial_SyncAndExchangeNybble
vc_hook Network_RECHECK
ld hl, wUnknownSerialCounter
ld a, [hli]
inc a