16 bytes to a line is goodCode:LG_Font_Base: @ db 0x00,0x00,...................................
good
note 64k address limitCode:@ GetAddress _LG_Font_Base, _Font_Base_Address
Code:@ GetAddress _Med_Font_Base, _Font_Base_Address ;note 64k address limit Font_Index = (Med_font - 45)* (40*2) ' remove the ascii chr value 45 offset * font chr length in index endif Address = Font_Base_Address + Font_Index 'gets you to the start of the glyph for gl_y = y_save to gl_yb ' y scan lines, start to finish values gl_x = x_save ' clear x position to start point (keep it an 8bit multiple) gosub gl_gaddr ' Set address for gl_xb = 1 to X_scan ' gl_x byte x X scan bytes on each line readcode Address,gl_byte ' read the indexed byte in ;note 64k address limit for readcode glcd_msb = gl_byte glcd_cmd = DATA_WR_INC ' write and increment gosub send_1 ' send to glcd Address = Address+1 ' inc address here +2 cos each byte includes , as data start at 0 not 1 as per lookup tables previously next gl_xb ' next byte of font next gl_y ' next scan line of font
look at my tft font and tft-spi.pbpmod (gcga: subroutine)
there are other ways to get around the 64k limitation in that code too




Bookmarks