Hi everybody,

I was wondering where/how the ti83+ stores the visual data to represent its small, variable-width text.

Don't bother reverse-engineering a rom call for the sake of answering this question, I'm already doing that, but if anybody knows off the top of their head where to find the text, let me know.

Thanks Smile,
John
IIRC, it's a giant bitmap table, just like the big font. The only difference is that there are width bytes.
That's what I figured. Do you have the address and flash/ROM page # handy?
Take a look at the LoadPattern and Load_SFont ROM calls, they might be useful.
Thanks Ben. I'll do that sometime tonight and post what I learn.
benryves wrote:
Take a look at the LoadPattern and Load_SFont ROM calls, they might be useful.
You beat me to it. Smile These are exactly the two bcalls that you should be using, because the exact location of the data changes from OS to OS.
Awesome. So I just have to have my code inspect these rom calls to get the locations of the bitmaps?
I think those just load a character into sFont_record ($8462). Just remember to multiply the character by 8:

Code:
   ld hl,'a'            ;or just ld hl,'a'*8
   add hl,hl
   add hl,hl
   add hl,hl
   bcall(_Load_SFont)
   inc hl               ;skip the size byte

On my 83+ OS 1.19, it seems like the data starts at address $4E7C on page 3.
On my 84+ OS 2.43: 03:$4AC5
My 84+SE has the same OS as my 84+.

There are actually 8 bytes before that (if you load hl with 0), but they don't look like actual data. Loading 0 into

I'm not sure it's on page 3 in all OS versions, but it may very well be.
As before, I warn very seriously against trying to read the font table directly, since it can move around and change format between versions. Just call those BCALLs for your program, and all will be well.
I agree, there's an old post i made about the same thing almost a decade ago:
http://www.maxcoderz.org/forum/viewtopic.php?f=5&t=2680

Benryves gave me almost the exact same answer as the one they gave you today, and it's definitely the easiest option.

This is the code i pulled from _Load_SFont:

Code:
_Load_SFont:
   push bc
      bit fontHookActive,(iy+fontHookFlag)
       jr z,fontHookNotActive      ;$49C4
      ld b,a
      ld a,$00
      call $3604
      ld a,b
       jr z,end_Load_SFont
fontHookNotActive:
      bit localizeHookActive,(iy+localizeHookFlag)
       jr z,localizeHookNotActive   ;$49D3
      ld b,a                  ;save a
      ld a,$75
      call $3A60
      ld a,b                  ;restore a
       jr z,end_Load_SFont
localizeHookNotActive:
      ld de,$4ABD               ;start of font data for OS 2.43
      add hl,de               ;hl = offset in font table
      ld de,sFont_record         ;where to load the character
      call $1400               ;just does 8 ldis
      ld hl,sFont_record
end_Load_SFont:
   pop bc
   ret


Your best bet is probably just to load the characters you're going to need into saferam somewhere. Your other option i think would be loading the bcall yourself (finding the bcall LUT and pulling the flash page and address where the code starts) and searching for the address. A lot of work and not really certain to work on every OS...
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 1
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement