[A83] Re: Font hooks


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

[A83] Re: Font hooks




I can't defend how it works with rom source but the
code I posted before does stay 'active' when you
return with nz. I have it working in my current
project.

In my experiences, when you return with nz the default
font is displayed and the hook remains 'installed.'

-Andy Hochhaus

P.S. If you want to see it in action goto
eea83.cjb.net and download the BETA of eea. The custom
font works fine in there. (and I exit the hook with nz
most of the time)

--- BRANDON STERNER <bms9019@osfmail.isc.rit.edu>
wrote:
> 
> If for any reason you exit your font hook routine
> with nz, then the TIOS
> will uninstall your fonk hook routine as you can see
> from this code 
> segment taken from the rom:
> 
>      call 76CC      ;RunHook
>      pop  hl
>      jr   z,77A7    ;use custom bitmap
>      pop  af
>      res  5,(iy+35)
>      ret
> 
> So this routine you wrote would only work if you
> tried displaying small
> stars all the time otherwise you would end up
> uninstalling your hook upon
> exiting with nz.  
> 
> I think you could get around this by creating your
> own exit routine to
> bypass the res 5,(iy+35) <- the bit that tells the
> os if a font hook is
> installed or not.  Writing an entire font set would
> be tedious if you
> wanted to change the bitmap of only one character.
> 
> Brandon Sterner
> 
> On Thu, 4 Oct 2001, Andy Hochhaus wrote:
> > 
> > I have only done this on an 83+ all that other
> info is
> > for the 83+ as well. Not sure if it will work or
> how
> > to do a custom font on the 83-.
> > 
> > Below is an example from a program I am writing.
> It
> > replaces the small font character '*' with a dot.
> > 
> > ;To enable: (or else do a B_CALL)
> > 	ld	hl,fonthook
> > 	in	a,(6)	
> > 	ld	(9b9ch),hl  ;start of font hook
> > 	ld	(9b9eh),a   ;page num font hook is on
> > 	set	5,(IY+35h)  ;flag for font hook
> > 
> > ;Then the font hook itself:
> > ;in: a=0 if big font, a=1 if small font
> > ;    b=ascii of char to be displayed
> > 
> > ;out: nz if display default tios bitmap
> > ;     z if display custom font then also
> > ;        hl->bitmap
> > fonthook:
> > 	db	83h
> > 	cp	0
> > 	ret	nz ;don't do anything if BIG font
> > 
> > 	ld	a,b
> > 	cp	2ah ;acsii of '*' 2ah
> > 	ret	nz ;if any key other than '*' return
> > 	push	af
> > 	push	bc
> > 	ld	hl,newmult
> > 	ld	de,sfont_record
> > 	ld	bc,8
> > 	ldir ;copy new bitmap to safe ram location
> > 	pop	bc
> > 	pop	af
> > 	ld	hl,sfont_record ;hl->new bitmap
> > 	ret
> > 	
> > newmult:
> > 	db	2 ;char width
> > 	db	00000000b ;bitmap right justified
> > 	db	00000000b
> > 	db	00000000b
> > 	db	00000010b
> > 	db	00000000b
> > 	db	00000000b
> > 	db	00000000b
> > 
> > I hope that this explains a bit. Let me know if
> you
> > want further clarification about anything.
> > 
> > -Andy Hochhaus
> > 
> > --- Ronald Teune <rtwolf@gmx.net> wrote:
> > > 
> > > >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)
> > > 
> > > Is this possible on a TI-83+ too?
> > > And what would the custom stuff look like?
> > > Something like this?
> > > 
> > >     .db %00010000
> > >     .db %00101000
> > >     .db %01111100
> > >     .db %01000100
> > >     .db %01000100
> > >     .db %01000100
> > > 
> > > and so on for all 256 characters?
> > > 
> > > >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!
> > > 
> > > Thanks!
> > > 
> > > >-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!?
> > NEW from Yahoo! GeoCities - quick and easy web
> site hosting, just $8.95/month.
> > http://geocities.yahoo.com/ps/info1
> > 
> > 
> > 
> 
> 
> 


__________________________________________________
Do You Yahoo!?
NEW from Yahoo! GeoCities - quick and easy web site hosting, just $8.95/month.
http://geocities.yahoo.com/ps/info1




Follow-Ups: References: