Remove all address comments

This commit is contained in:
mid-kid
2018-06-24 16:09:41 +02:00
parent 131875d3e3
commit 1d9a68dbdd
616 changed files with 12133 additions and 20380 deletions

View File

@@ -1,4 +1,4 @@
Printer_StartTransmission: ; 84000
Printer_StartTransmission:
ld hl, wGameboyPrinterRAM
ld bc, wGameboyPrinterRAMEnd - wGameboyPrinterRAM
xor a
@@ -14,9 +14,8 @@ Printer_StartTransmission: ; 84000
xor a
ld [wJumptableIndex], a
ret
; 84022
PrinterJumptableIteration: ; 84022
PrinterJumptableIteration:
ld a, [wJumptableIndex]
ld e, a
ld d, 0
@@ -27,7 +26,6 @@ PrinterJumptableIteration: ; 84022
ld h, [hl]
ld l, a
jp hl
; 84031
.Jumptable: ; 84031 (21:4031)
dw Print_InitPrinterHandshake ; 00
@@ -53,33 +51,33 @@ PrinterJumptableIteration: ; 84022
dw Printer_WaitLoopBack ; 12
dw Printer_WaitLoopBack_ ; 13
Printer_NextSection: ; 84059 (21:4059)
Printer_NextSection:
ld hl, wJumptableIndex
inc [hl]
ret
Printer_PrevSection: ; 8405e (21:405e)
Printer_PrevSection:
ld hl, wJumptableIndex
dec [hl]
ret
Printer_Quit: ; 84063 (21:4063)
Printer_Quit:
xor a
ld [wPrinterStatusFlags], a
ld hl, wJumptableIndex
set 7, [hl]
ret
Printer_NextSection_: ; 8406d (21:406d)
Printer_NextSection_:
call Printer_NextSection
ret
Printer_SectionOne: ; 84071 (21:4071)
Printer_SectionOne:
ld a, $1
ld [wJumptableIndex], a
ret
Print_InitPrinterHandshake: ; 84077 (21:4077)
Print_InitPrinterHandshake:
call Printer_ResetData
ld hl, PrinterDataPacket1
call Printer_CopyPacket
@@ -94,7 +92,7 @@ Print_InitPrinterHandshake: ; 84077 (21:4077)
ld [wPrinterStatus], a
ret
Printer_StartTransmittingTilemap: ; 84099 (21:4099)
Printer_StartTransmittingTilemap:
call Printer_ResetData
; check ???
ld hl, wPrinterRowIndex
@@ -118,7 +116,7 @@ Printer_StartTransmittingTilemap: ; 84099 (21:4099)
ld [wPrinterStatus], a
ret
Printer_EndTilemapTransmission: ; 840c5 (21:40c5)
Printer_EndTilemapTransmission:
; ensure that we go from here to routine 7
ld a, $6
ld [wJumptableIndex], a
@@ -133,7 +131,7 @@ Printer_EndTilemapTransmission: ; 840c5 (21:40c5)
call Printer_WaitHandshake
ret
Printer_SignalSendHeader: ; 840de (21:40de)
Printer_SignalSendHeader:
call Printer_ResetData
ld hl, PrinterDataPacket2 ; signal request print
call Printer_CopyPacket
@@ -151,7 +149,7 @@ Printer_SignalSendHeader: ; 840de (21:40de)
ld [wPrinterStatus], a
ret
Printer_SignalLoopBack: ; 84103 (21:4103)
Printer_SignalLoopBack:
call Printer_ResetData
; send packet 1
ld hl, PrinterDataPacket1 ; signal no transmission
@@ -166,7 +164,7 @@ Printer_SignalLoopBack: ; 84103 (21:4103)
call Printer_WaitHandshake
ret
Printer_WaitSerial: ; 84120 (21:4120)
Printer_WaitSerial:
ld hl, wPrinterSerialFrameDelay
inc [hl]
ld a, [hl]
@@ -177,7 +175,7 @@ Printer_WaitSerial: ; 84120 (21:4120)
call Printer_NextSection
ret
Printer_WaitSerialAndLoopBack2: ; 8412e (21:412e)
Printer_WaitSerialAndLoopBack2:
ld hl, wPrinterSerialFrameDelay
inc [hl]
ld a, [hl]
@@ -191,7 +189,7 @@ Printer_WaitSerialAndLoopBack2: ; 8412e (21:412e)
call Printer_PrevSection
ret
Printer_CheckConnectionStatus: ; 84143 (21:4143)
Printer_CheckConnectionStatus:
ld a, [wPrinterOpcode]
and a
ret nz
@@ -224,7 +222,7 @@ Printer_CheckConnectionStatus: ; 84143 (21:4143)
ld [wJumptableIndex], a
ret
Printer_TransmissionLoop: ; 84180 (21:4180)
Printer_TransmissionLoop:
ld a, [wPrinterOpcode]
and a
ret nz
@@ -246,7 +244,7 @@ Printer_TransmissionLoop: ; 84180 (21:4180)
ld [wJumptableIndex], a
ret
Printer_WaitUntilFinished: ; 841a1 (21:41a1)
Printer_WaitUntilFinished:
ld a, [wPrinterOpcode]
and a
ret nz
@@ -256,9 +254,9 @@ Printer_WaitUntilFinished: ; 841a1 (21:41a1)
call Printer_NextSection
ret
Printer_WaitLoopBack: ; 841b0 (21:41b0)
Printer_WaitLoopBack:
call Printer_NextSection
Printer_WaitLoopBack_: ; 841b3 (21:41b3)
Printer_WaitLoopBack_:
ld a, [wPrinterOpcode]
and a
ret nz
@@ -269,7 +267,7 @@ Printer_WaitLoopBack_: ; 841b3 (21:41b3)
ld [wJumptableIndex], a
ret
Printer_WaitHandshake: ; 841c3 (21:41c3)
Printer_WaitHandshake:
.loop
ld a, [wPrinterOpcode]
and a
@@ -287,7 +285,7 @@ Printer_WaitHandshake: ; 841c3 (21:41c3)
ld [rSC], a
ret
Printer_CopyPacket: ; 841e2 (21:41e2)
Printer_CopyPacket:
ld a, [hli]
ld [wPrinterData], a
ld a, [hli]
@@ -302,7 +300,7 @@ Printer_CopyPacket: ; 841e2 (21:41e2)
ld [wPrinterChecksum + 1], a
ret
Printer_ResetData: ; 841fb (21:41fb)
Printer_ResetData:
xor a
ld hl, wPrinterData
ld [hli], a
@@ -320,7 +318,7 @@ Printer_ResetData: ; 841fb (21:41fb)
call Printer_ByteFill
ret
Printer_ComputeChecksum: ; 84219 (21:4219)
Printer_ComputeChecksum:
ld hl, 0
ld bc, 4
ld de, wPrinterData
@@ -337,7 +335,7 @@ Printer_ComputeChecksum: ; 84219 (21:4219)
ld [wPrinterChecksum + 1], a
ret
.ComputeChecksum: ; 8423c (21:423c)
.ComputeChecksum:
.loop
ld a, [de]
inc de
@@ -352,7 +350,7 @@ Printer_ComputeChecksum: ; 84219 (21:4219)
jr nz, .loop
ret
Printer_StageHeaderForSend: ; 84249 (21:4249)
Printer_StageHeaderForSend:
ld a, $1
ld [wGameboyPrinter2bppSource + 0], a
ld a, [wcbfa]
@@ -363,7 +361,7 @@ Printer_StageHeaderForSend: ; 84249 (21:4249)
ld [wGameboyPrinter2bppSource + 3], a
ret
Printer_Convert2RowsTo2bpp: ; 84260 (21:4260)
Printer_Convert2RowsTo2bpp:
; de = wPrinterTileMapBuffer + 2 * SCREEN_WIDTH * ([wPrinterQueueLength] - [wPrinterRowIndex])
ld a, [wPrinterRowIndex]
xor $ff
@@ -420,7 +418,7 @@ Printer_Convert2RowsTo2bpp: ; 84260 (21:4260)
jr nz, .loop2
ret
Printer_ByteFill: ; 842ab
Printer_ByteFill:
push de
ld e, a
.loop
@@ -433,7 +431,6 @@ Printer_ByteFill: ; 842ab
ld a, e
pop de
ret
; 842b7
PrinterDataPacket1:
db 1, 0, $00, 0
@@ -453,9 +450,8 @@ PrinterDataPacket5: ; unused
PrinterDataPacket6: ; unused
db 15, 0, $00, 0
dw 15
; 842db
_PrinterReceive:: ; 842db
_PrinterReceive::
ld a, [wPrinterOpcode]
add a
ld e, a
@@ -466,9 +462,8 @@ _PrinterReceive:: ; 842db
ld h, [hl]
ld l, a
jp hl
; 842ea
.Jumptable: ; 842ea (21:42ea)
.Jumptable:
dw Printer_DoNothing ; 00
dw Printer_Send0x33 ; 01
@@ -505,45 +500,45 @@ _PrinterReceive:: ; 842db
dw Printer_ReceiveTowPrinterHandshakeAndSend0x00 ; 1e
dw Printer_ReceiveTowPrinterStatusFlagsAndExitSendLoop ; 1f
Printer_NextInstruction: ; 8432a (21:432a)
Printer_NextInstruction:
ld hl, wPrinterOpcode
inc [hl]
ret
Printer_DoNothing: ; 8432f (21:432f)
Printer_DoNothing:
ret
Printer_Send0x33: ; 84330 (21:4330)
Printer_Send0x33:
ld a, $33
call Printer_SerialSend
call Printer_NextInstruction
ret
Printer_SendPrinterData1: ; 84339 (21:4339)
Printer_SendPrinterData1:
ld a, [wPrinterData]
call Printer_SerialSend
call Printer_NextInstruction
ret
Printer_SendPrinterData2: ; 84343 (21:4343)
Printer_SendPrinterData2:
ld a, [wPrinterData + 1]
call Printer_SerialSend
call Printer_NextInstruction
ret
Printer_SendPrinterData3: ; 8434d (21:434d)
Printer_SendPrinterData3:
ld a, [wPrinterData + 2]
call Printer_SerialSend
call Printer_NextInstruction
ret
Printer_SendPrinterData4: ; 84357 (21:4357)
Printer_SendPrinterData4:
ld a, [wPrinterData + 3]
call Printer_SerialSend
call Printer_NextInstruction
ret
Printer_SendNextByte: ; 84361 (21:4361)
Printer_SendNextByte:
; decrement 16-bit counter
ld hl, wPrinterSendByteCounter
ld a, [hli]
@@ -573,25 +568,25 @@ Printer_SendNextByte: ; 84361 (21:4361)
.done
call Printer_NextInstruction
Printer_SendwPrinterChecksumLo: ; 8438b (21:438b)
Printer_SendwPrinterChecksumLo:
ld a, [wPrinterChecksum]
call Printer_SerialSend
call Printer_NextInstruction
ret
Printer_SendwPrinterChecksumHi: ; 84395 (21:4395)
Printer_SendwPrinterChecksumHi:
ld a, [wPrinterChecksum + 1]
call Printer_SerialSend
call Printer_NextInstruction
ret
Printer_Send0x00: ; 8439f (21:439f)
Printer_Send0x00:
ld a, $0
call Printer_SerialSend
call Printer_NextInstruction
ret
Printer_ReceiveTowPrinterHandshakeAndSend0x00: ; 843a8 (21:43a8)
Printer_ReceiveTowPrinterHandshakeAndSend0x00:
ld a, [rSB]
ld [wPrinterHandshake], a
ld a, $0
@@ -599,32 +594,32 @@ Printer_ReceiveTowPrinterHandshakeAndSend0x00: ; 843a8 (21:43a8)
call Printer_NextInstruction
ret
Printer_ReceiveTowPrinterStatusFlagsAndExitSendLoop: ; 843b6 (21:43b6)
Printer_ReceiveTowPrinterStatusFlagsAndExitSendLoop:
ld a, [rSB]
ld [wPrinterStatusFlags], a
xor a
ld [wPrinterOpcode], a
ret
Printer_Send0x0f: ; 843c0 (21:43c0)
Printer_Send0x0f:
ld a, $f
call Printer_SerialSend
call Printer_NextInstruction
ret
Printer_Send0x00_: ; 843c9 (21:43c9)
Printer_Send0x00_:
ld a, $0
call Printer_SerialSend
call Printer_NextInstruction
ret
Printer_Send0x08: ; 843d2 (21:43d2)
Printer_Send0x08:
ld a, $8
call Printer_SerialSend
call Printer_NextInstruction
ret
Printer_SerialSend: ; 843db (21:43db)
Printer_SerialSend:
ld [rSB], a
ld a, $1 ; switch to internal clock
ld [rSC], a
@@ -632,7 +627,7 @@ Printer_SerialSend: ; 843db (21:43db)
ld [rSC], a
ret
Printer_ReceiveTowPrinterStatusFlagsAndExitSendLoop_: ; 843e6 (21:43e6)
Printer_ReceiveTowPrinterStatusFlagsAndExitSendLoop_:
ld a, [rSB]
ld [wPrinterStatusFlags], a
xor a