add custom chars

This commit is contained in:
matthias@arch 2023-12-16 02:44:47 +01:00
parent 68df62164b
commit fcdedd02dc
2 changed files with 60 additions and 0 deletions

26
system/chars.h65 Normal file
View File

@ -0,0 +1,26 @@
.ifndef INCLUDE_CHARS
INCLUDE_CHARS = 1
.include "system.h65"
.scope chars
ARROW_RIGHT = $7E
ARROW_LEFT = $7F
DOT = $A5
Import chars, CAT, SMILEY, SMILEY_XD
.macro SetCustomChar charaddr,asciinr
lda #<charaddr
sta ARG0
lda #>charaddr
sta ARG1
lda #asciinr
jsr lcd::set_custom_char
.endmacro
.endscope
.endif

34
system/chars.s65 Normal file
View File

@ -0,0 +1,34 @@
.include "chars.h65"
Export chars, CAT, SMILEY, SMILEY_XD
.rodata
CAT:
.byte %00000
.byte %10001
.byte %11111
.byte %11111
.byte %01110
.byte %11111
.byte %01110
.byte %00000
SMILEY_XD:
.byte %00000
.byte %01010
.byte %00100
.byte %01010
.byte %00000
.byte %11111
.byte %01110
.byte %00000
SMILEY:
.byte %00000
.byte %00000
.byte %01010
.byte %00000
.byte %11111
.byte %01110
.byte %00000
.byte %00000