I wrote this thing for Geekboy1011 to help him with his job, which seems increasingly less like Product Designer/Engineer and more like Doer of the Thing. Either way, he wanted something that would stick the appropriate SI prefix (e.g. 'k' for kilo, or 'n' for nano) after the answer so he wouldn't have to remember what exponent goes with which prefix.

After some twiddling around with calculator settings and observing the results (which was rather educational), I was going to tell him to change it to ENG mode (as opposed to NORMAL or SCI; these modes are at/near the top of the mode menu) and to just memorize the more-or-less fixed exponents that mode produces.

Nah. That'd be too easy.

So I wrote a RAM-resident homescreen hook that would do the job. It compiles three separate binaries: one for the monochrome calcs (83+/84+), the forgotten calculator (84+CSE), and the most fun calculators (TI-84+CE and related).

Example output


Restricted to ENG mode. Mathprint must be disabled. I figure I'd post this here because somebody might want an example of a homescreen hook working in all the wrong ways for various calculators
Nobody ever commented on this, which seems sad. It's pretty cool! I feel like the most common exponents aren't hard to remember, though the small end is a little difficult more difficult (nano-, pico-).

Any chance of uploading precompiled binaries to the archives rather than requiring users to build it themselves?
I agree with Tari, this had been overlooked but shouldn't have!

Great work, I'm sure this will be useful for a couple of people.

How are you handling the hook address and such?
Tari wrote:
Nobody ever commented on this, which seems sad. It's pretty cool! I feel like the most common exponents aren't hard to remember, though the small end is a little difficult more difficult (nano-, pico-).

Any chance of uploading precompiled binaries to the archives rather than requiring users to build it themselves?


I agree that it isn't hard to remember, but I was asked to do it and it didn't look too hard to do, so I did it.

The Github repo linked above does, in fact, contain precompiled binaries for each of the calculators that I support, though I also uploaded a copy of this to Cemetech's archives.assuming it gets accepted

tr1p1ea wrote:
I agree with Tari, this had been overlooked but shouldn't have!

Great work, I'm sure this will be useful for a couple of people.

How are you handling the hook address and such?


Since the hook is RAM-resident, the method of installation is pretty much all the same. Even the ABI for all the system calls are (mostly) the sameThe call to install the hook isn't but because register A is ignored for the CE, I can get away with setting it regardless, and it works with just HL so long as it points to RAM in any case. . Most of the differences are in the labels/addresses and tokens, so I use the batch file to define a label to specify a target device and the series of #ifdef directives in the main source assigns the appropriate labels.

The RAM locations that I chose are safe-ish and shouldn't cause too many problems unless you run other ASM programs/games. This install method was chosen because it was quick and dirty and the guy I wrote this for either doesn't use his calculator for much other than math and has the patience to deal with possible problems.

I do not recommend using this for anything if you need a more safe/resilient homescreen hook install.

Also, thanks for the comments; Never thought anyone would for how niche this thing is

EDIT: This project has been accepted to the Cemetech archives. Find it here

Also just remembered an additional detail with regards to system calls. CreateTStrng and SetHomescreenHook wasn't found in all include files nor were they documented for some calcs, so I spent some time searching for the calls in each OS (which was a lot easier than it sounds since calls tend to be ordered consistently across OSes). I also spent time verifying the behavior of the hook, it's enable function, and the inputs across calculators.
  
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