[A83] Re: Font hooks


[Prev][Next][Index][Thread]

[A83] Re: Font hooks




Here is some info that Dan Englender gave me some time
ago. I hope he dosent mind me reposting it. All the
info is a direct copy from an email he sent me so make
sure to give him all the credit. Hope that this can
help you.

(ignore the colons, this is a paste from a TI-92 Plus)
 :Char hook info...
 :This is in fact the custom font hook.  It is
triggered during character puts of both large and
variable fonts.
 :Input A=0 for variable font and A=1 for large font. 
Input B will be the character number.
 :Output B=character number, NZ=use TIOS character
map, Z= use custom map.  if using custom map, it
should be loaded into sFont_record for variable font
and lFont_record for large font, and point HL to those
places.  Actually, you don't really need to use those
addresses in particular, it's the HL part that's
important, but they're convenient places to put the
data.
 :
 :B_CALL to enable is 4FE4 (78EA,1B)
 :B_CALL to disable is 4FE7 (77CC,1B)
 :
 :Triggered during VPutS run (and others ?)
 :Bit 5,(iy+35h)
 :when triggered, char number is in reg B, and A=0. 
Trigger calls this code onpage 1B
 :
 :77C0:
 :     push af
 :     push hl
 :     ld   hl,9B9C   ;charHookPtr
 :     call 76CC      ;RunHook
 :     pop  hl
 :     jr   z,77A7
 :     pop  af
 :     res  5,(iy+35)
 :     ret
 :
 :77A7:
 :     jr   z,74
 :
 :7744:
 :     pop  af
 :     push hl
 :     ld   hl,9B75
 :     ex   (sp),hl
 :     jp    28EF
 :
 :28EF:
 :     ex   (sp),hl
 :     push af
 :     push de
 :     ld   e,(hl)
 :     inc  hl
 :     ld   d,(hl)
 :     inc  hl
 :     ld   a,(hl)
 :     out  (06),a
 :     ex   de,hl
 :     pop  de
 :     pop  af
 :     ex   (sp),hl
 :     ret


So Basically do something like this

 ld hl,fonthook
 B_CALL 4fe4h
 ret

fonthook:
 db 83h     ;tios checks this byte always 83h
 ;do custom font hook stuff
 cp a        ;set z flag telling tios to use
             ;   custom font
 ret

Goodluck!
-Andy Hochhaus

--- Ronald Teune <rtwolf@gmx.net> wrote:
> 
> ti83plus.inc:
> (...)
> localLanguage        EQU  9B73h
> cursorHookPtr        EQU  9B7Ch
> rawKeyHookPtr        EQU  9B84h
> getKeyHookPtr        EQU  9B88h
> fontHookPtr          EQU  9B9Ch        -->So there
> is a font hook! Probably.
> (...)
> 
> Ronald.
> 
> 
> 


__________________________________________________
Do You Yahoo!?
Listen to your Yahoo! Mail messages from any phone.
http://phone.yahoo.com




References: