Close

20230211b -- Textual healing...

A project log for ROM Disassembly - AlphaSmart Pro

Wherein I disassemble the ROM from a vintage typewriter-thing

ziggurat29ziggurat29 02/15/2023 at 19:170 Comments

Operating under the current assumptions, I first marked out what appeared to be text strings.  It seems that largely a 'nul-terminated string' ('nts') scheme is used.  Then I backtracked into the code to find address references to these strings.  In the course, this led me to discover that there /seems/ to be a 'display text' routine at F669 which takes a pointer to the nts string in the X register.

F669             ; XXX show nts text @ X?
F669             xxxShowText_F669:
F669 E6 00           ldab    0,x
F66B 27 06           beq     locret_F673
F66D BD F6 74        jsr     sub_F674        ; XXX show char?
F670 08              inx
F671 20 F6           bra     xxxShowText_F669 ; XXX show nts text @ X?
F673             locret_F673:
F673 39              rts

Operating under this new assumption, it appears that there is a routine F674 that shows a character at the current cursor position, and advancing the cursor.  I'll look into that more closely later.  For now it is useful for me to cross-reference all references to this F669 routine and backtrack to all text messages, propagating comments.  Associating text messages with routines gives us a clue as to the routines' purposes.

One thing you'll note is some patterns in how I generate hypothetical labels.
One is that I tend to put XXX on things that I am guessing.  This gives me a visual indication that it is something I currently believe, but don't consider proven.  So take with a grain of salt.  When I later gain more or less confidence in the hypothesis, then I'll either remove the XXX or remove the label altogether.  The label propagation feature of this disassembler is wonderful for automatically fixing that stuff up through the listing.

Another is that I put the address at the end of the label.  This is handy because it disambiguates what otherwise would be label collisions.  So, for instance, if I had a candidate for 'showText' and then later found another one I like better as 'showText', I can effectively call them both that until I figure out which one is the 'real' showText, and the other maybe like 'showTextCommon' or something.

Doubtless you'll develop your own methodologies.

Discussions