Omnimaga

Calculator Community => TI Calculators => ASM => Topic started by: utz on March 14, 2015, 11:47:33 am

Title: Z80 system fonts
Post by: utz on March 14, 2015, 11:47:33 am
Hiya folks, does anybody know where in ROM the small system font is stored, and how it is encoded? I'd need the locations for TI-82, TI-83, TI83Plus, and TI84Plus. Though one of the machines is probably enough as a start, the rest I can find via pattern search.
Title: Re: Z80 system fonts
Post by: Sorunome on March 14, 2015, 11:50:10 am
As mentioned in https://www.omnimaga.org/general-calculator-help/where-does-ti-%2884%29-os-store-the-sprite-sheets-for-chars/?topicseen it is different for every OS
Title: Re: Z80 system fonts
Post by: utz on March 14, 2015, 12:01:56 pm
Ah, thanks Soru. Think I'll be better off making my own bitmaps then, even though I'd prefer not to waste a ton of bytes on this...
Title: Re: Z80 system fonts
Post by: Runer112 on March 14, 2015, 12:03:18 pm
What do you want to access the font data for?
Title: Re: Z80 system fonts
Post by: utz on March 14, 2015, 12:05:02 pm
I'm writing a custom print driver, which should be both ultra-compact and ultra-fast... yeah I know. lol.
Title: Re: Z80 system fonts
Post by: chickendude on March 16, 2015, 06:55:45 am
There is a way to get access to the font data, though, eg. using the _LoadPattern bcall. You put the character you want in a and the sprite gets loaded to lFont_record (that's an L) if you are using the large font, to sFont_record if you're using the small (_vPutS) font. The first byte is the width of the character, the next seven bytes are the character's sprite. That just loads one character at a time, but you could presumably loop through all the characters and save them into saferam if you really wanted to. The bcall might even set hl to lFont_record for you to make an ldir easier.
Title: Re: Z80 system fonts
Post by: utz on March 19, 2015, 10:19:40 am
Cheers @chickendude, good to know. However I need this to work on TI-82 as well and iirc there is no equivalent ROM call available on that one. Ended up using my own fixed-width font which currently uses 70 bytes + 27 bytes decruncher (omitting a few chars that I don't need). Hoping to optimize it even further.