Text drawing works with modified font

This commit is contained in:
StewBC 2021-04-30 14:17:31 -07:00
parent 565f343bdd
commit dfa049472d

View File

@ -31,6 +31,8 @@ read:
lda PLACEHOLDER, x ; get the character in the string
sec
sbc #32 ; the font only starts at space (char 32 or $20)
beq :+
sbc #9 ; gap after space
asl ; mult by 16 as that's how wide a char is in bytes
asl
rol fontH
@ -38,6 +40,7 @@ read:
rol fontH
asl
rol fontH ; srcPtr now points at the char but $0000 based
:
adc #<font ; add the font start
sta fontL
lda fontH
@ -177,6 +180,8 @@ read:
lda PLACEHOLDER, x ; get the character in the string
sec
sbc #32 ; the font only starts at space (char 32 or $20)
beq :+ ; gap after space
sbc #9
asl ; mult by 16 as that's how wide a char is in bytes
asl
rol srcPtrH
@ -184,6 +189,7 @@ read:
rol srcPtrH
asl
rol srcPtrH ; srcPtr now points at the char but $0000 based
:
adc #<font ; add the font start
sta srcPtrL
lda srcPtrH