I adapted what I could, but I am still not quite understanding how this hook works. The customCharacter still seems to have no affect on anything. Is there anything I'm forgetting?

Code:
.nolist
#include "ti84pcse.inc"
#define PutMapFlags $4a
#define PutMapUseColor 4
.list
.db tExtTok,tAsm84CCmp
hookBackup              equ     appBackUpScreen
.org userMem
      bcall(_NewLine)
      ld hl,FontHook
      ;in a,(6)
      bcall(_SetFontHook)
      ld hl,eq3
      bcall(_VPutS)
      bcall(_GetKey)
      ret
FontHook:
  .db 83h             ; Required for all hooks
  or a
  jr z,+_
  cp a
  ret
_:
  ld a,h
  or a,l
  rrca
  rrca
  rrca
  cp $80
  ret nz
  ;ld hl,customCharacter
  ;ld de,lFont_record
  ;ld bc,7
  ;ldir
  ld hl,customCharacter
  cp a
  ret
customCharacter:
       .db %00000000
       .db %00001100
       .db %00010110
       .db %00011110
       .db %00010110
       .db %00010110
       .db %00000000
eq3:   
      .db "V",$12,"=V",$80,$12,"+2a",$BE,"X ";$80 displays the original $80
Move your hook somewhere safe. You set the hook to its copy when your program was moved to usermem; which is removed when your program finishes.

Also; please for the love of everything don't use hooks to do this. I can't believe no one (besides Tari) has said this. You will just confuse yourself and it is a lot of needless work. Just use a custom character printing routine.
prgmTrouble wrote:
I adapted what I could, but I am still not quite understanding how this hook works. The customCharacter still seems to have no affect on anything. Is there anything I'm forgetting?

You deleted the byte I said needed to be present rather than uncommenting it.
Tari wrote:
Fine, but the initial width byte should be present otherwise this data is telling it that the width of the character is zero.
  
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 2 of 2
» 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