Hello, I'm a high school math teacher with an irrational attachment to our old TI-83 Plus graphing calculators (perhaps you can relate). I'm decent at creating simple BASIC programs, and I'm OK with Javascript. I have no experience with assembly, but I would like an excuse to learn.

Our students have a hard time with the learning curve on the 83+ (even when just using the calculator for simple arithmetic), but much less difficulty with the TI-84+. This appears to be because the TI-84+ lets you scroll up the home screen using the up arrow, while the TI-83+ only has [2nd][Entry] to view previous entries.

I already install Omnicalc on these calculators (I like the thousands separators and parentheses assistant). Since Omnicalc already re-maps some keys (like re-directing [Entry] to its Entries menu), I thought it would be a fun project to see if I can modify Omnicalc to re-map the Up arrow to [Entry]. This would make the button more like the up arrow in Bash or Powershell.

The logic would work something like this:

Code:
IF (the current screen is the home screen) AND (the current line is blank)
THEN ([Up arrow] sends [Entry])
ELSE ([Up arrow] does what it normally does)


From my preliminary research, it looks like I'll need to understand how hooks work, and maybe my plan won't work because there isn't a hook for the up-arrow key.

If I can get this to work, my stretch goals are:
  • Change default cursor behavior to Insert instead of Over-type.
  • Pressing [Y=] a second time returns you to the home screen (students get stuck on the "Y=" page all the time because they're used to using [Clear] to get back home, and they don't know about [2nd][Quit]).

So far, I've downloaded the source code for Omnicalc, as well as Learn TI-83 Plus Assembly in 28 Days.

Any recommendations or advice y'all have is greatly appreciated.
  • Is this a feasible project?
  • Has this already been done? Do you know of any similar projects?
  • Will I be able to do this in a reasonable amount of time (e.g. weeks or months, not years)?
  • Can you recommend other good books or tutorials for getting started with assembly?
I am by no means an expert on the subject (I have never written a hook) but I believe you could use a Raw Key hook to achieve this. It would activate anytime immediately after GetKey is called.

You could compare A to the up arrow and if they do not match, do nothing and return.
If they do match, you will need a way to check if the calculator is on the homescreen and that the cursor line is blank (not sure how to do these). As long as both of these are satisfied, load the [Entry] key into register A and return.
The homescreen hook may be a better fit for changing recall behavior, since it triggers specifically on the homescreen.

Some kind of key hook would probably also work (and you probably need it for the graph thing): I suppose the raw key hook is the right option, since you can pretty easy generate kQuit or kLastEnt for the desired application. I'm not certain which RAM location (if any) stores the current context, but the symbolic constants you want appear to be cxCmd for the homescreen and cxEquEdit for the Y= editor. Possibly _CompareContext is the intended romcall to check which context is active, but I'm not aware of any documentation for that so somebody would need to do a little reverse-engineering to check.

As far as how difficult this might be, I don't think it's that hard because you probably only need to add to hooks that already exist in Omnicalc rather than starting from scratch.
Given we have the signing key I wonder how difficult it would be to backport that or the rest of the MathPrint functionality to the 83+ version of the OS? That is assuming it doesn't use the additional ram in the 84+ asic but I didn't believe that was the case. This is obviously likely a larger project than what the original poster broolaf suggested but would also bring in some additional features and the final result could possibly be distributed as a patch to avoid issues with distributing TI code.
Agree the homescreen hook is what you want, you can check for the up arrow and just return kLastEnt instead.

Main issue is that the omnicalc src is old and was made in ZDS...

Don't think omnicalc actually installs a homescreen hook so you'd have to add it, but I think it would not be that difficult.

Issue with your logic might be concerning the "AND (the current line is blank)" part, since this would only allow you to press Up once, as once you've recalled a previous entry the line is no longer blank. Was the intent to be able to cycle through many previous entries just by pressing up?

EDIT - Had a quick crack at it ... note that I've only tested this very briefly in an emulator:
https://tr1p1ea.net/files/downloads/omnicalc_upmod.8xk


Enable the option in settings and then the up arrow on the homescreen does the same thing as "2nd+ENTER".
Thanks, tr1p1ea! Any chance you could share the source code?

Test Results
I tried out omnicalc_upmod.8xk in the TilEm emulator, and it froze up if I Installed Omnicalc first and then Catalog Helps (but not if I Installed Catalog Helps first).

I also tried it out on a real TI-83+ (with some broken pixels). It's working great so far. No conflicts with Catalog Helps, regardless of the install order.

One feature of Omnicalc that doesn't seem to be working is the "partial clear" OS extension:
Quote:
With Omnicalc, a 89-style CLEAR functionality is enabled, depending on the cursor location. If the cursor is at the end of the current entry in the homescreen, pressing CLEAR will erase the entire line. However, if the cursor is located inside the entry, pressing CLEAR will erase only tokens to the right of the cursor. Pressing CLEAR immediately again will clear the entire line.

All the other Omnicalc features I've tested seem to be working. It seems likely that "partial clear" is also using the Homescreen hook (On another calculator where "partial clear" does work on the homescreen, it didn't work in the [Y=] editor).

Regarding blank lines
Quote:
Issue with your logic might be concerning the "AND (the current line is blank)" part, since this would only allow you to press Up once, as once you've recalled a previous entry the line is no longer blank. Was the intent to be able to cycle through many previous entries just by pressing up?

That's a good point. Maybe the logic could be something like this instead:

Code:
IF (the current screen is the home screen) AND (𝐜𝐮𝐫𝐬𝐨𝐫 𝐢𝐬 𝐚𝐭 𝐭𝐡𝐞 𝐛𝐞𝐠𝐢𝐧𝐧𝐢𝐧𝐠 𝐨𝐟 the line)
THEN ([Up arrow] sends [Entry][𝟐𝐧𝐝][𝐋𝐞𝐟𝐭 𝐀𝐫𝐫𝐨𝐰])
ELSE ([Up arrow] does what it normally does)

That way, pressing [Up arrow] again immediately would cycle through previous entries, but if you start editing an entry, you won't lose your work if you press Up Arrow by mistake. People are unlikely to press [Up arrow] unless the entry spans multiple lines and their cursor is on one of those extra lines.
I got the basic version working! "Partial clear" is also working. Thank you to everyone for your support. I posted my results to Github.

Here's what I learned:

  • Michael Vincent called it the "cxMain" instead of the "Homescreen" hook.
  • adding an option to the menu is easy (add line 219 to settings.asm).
  • Reading an option from settings is hard (see lines 175 to 192 of cxmain.asm)
  • You can find the different keys and their hex codes in ti83plus.inc
  • With Zilog Developer Studio (ZDS) You have to use the original ti83plus.inc, not one of the ones upgraded to work with TASM or SPASM.
  • Unsigned apps have the .hex extension.
  • It looks like Wabbitsign doesn't work with .hex files created by ZDS. You have to use Wappsign (included with TI-83 Plus Flash Debgugger).
  
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