Fix black screen, text rendering, and keyboard input issues
This commit is contained in:
10
graphics.s
10
graphics.s
@@ -60,7 +60,7 @@ ClearScreen:
|
||||
; DrawText
|
||||
; d0 = X, d1 = Y, a0 = String
|
||||
DrawText:
|
||||
movem.l d0-d3/a0-a2,-(sp)
|
||||
movem.l d0-d4/a0-a2,-(sp)
|
||||
|
||||
; d0 = Initial X (keep in d3 for CR)
|
||||
move.w d0,d3
|
||||
@@ -99,7 +99,7 @@ DrawText:
|
||||
bra.s .charLoop
|
||||
|
||||
.newline:
|
||||
addq.w #1,d1 ; Increment Y (lines)
|
||||
addq.w #8,d1 ; Increment Y (8 lines for font height)
|
||||
bsr .calcAddr ; Recalculate address (Resets X to d3)
|
||||
bra.s .charLoop
|
||||
|
||||
@@ -109,13 +109,13 @@ DrawText:
|
||||
bra.s .charLoop
|
||||
|
||||
.done:
|
||||
movem.l (sp)+,d0-d3/a0-a2
|
||||
movem.l (sp)+,d0-d4/a0-a2
|
||||
rts
|
||||
|
||||
.calcAddr:
|
||||
lea Bitplane1,a1
|
||||
move.l d1,d4 ; Copy Y
|
||||
mulu #320,d4 ; Y * 320
|
||||
mulu #40,d4 ; Y * 40 (Bytes per line)
|
||||
add.l d4,a1
|
||||
add.w d3,a1 ; Add Initial X
|
||||
rts
|
||||
@@ -125,7 +125,7 @@ DrawText:
|
||||
DrawChar:
|
||||
movem.l d0-d3/a0-a2,-(sp)
|
||||
lea Bitplane1,a1
|
||||
mulu #320,d1
|
||||
mulu #40,d1
|
||||
add.l d1,a1
|
||||
add.w d0,a1
|
||||
|
||||
|
||||
Reference in New Issue
Block a user