Alternatively, join us on Discord.

+-Recent Topics

[fx-CG10/20] Utilities for the Casio Prizm (v2.1: text editor and PicoC!)

Started by gbl08ma, June 21, 2016, 08:56:51 pm

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

gbl08ma

Utilities, now with a thread at CodeWalrus! Since projects for Prizm calculators are not seen here very often, I thought I might as well post this here...

The Utilities add-in enhances your Casio Prizm calculator by providing functionality not originally found in the OS, or by providing enhanced alternatives to existing functionality.
Download links are after the screenshots, on the "Download" section.



Features

It's a big list! See here: https://github.com/gbl08ma/utilities#features
 
Some remarks:
  - Weights less than 185 KiB, saving space on your Prizm's storage memory and speeding up its transfer between calculators.
  - Really fast to start up - it's usually even faster than the built-in app Run-Mat!
  - It's open source (GitHub)

Download
Download g3a directly (simpler, you can even download directly to the calculator drive)
Download ZIP archive with Read-Me

Download ZIP archive for the PicoC edition - Information about PicoC

If you are planning on hosting Utilities on calculator software archives, please use the unmodified ZIP file which has the Read-Me and license files.
Still, I would appreciate you didn't host it yourself, and just linked to the above links. It makes updating easier and also lets me count the downloads better.
For sending directly to your friends' calculators, you don't need to send the Read-Me or the license.

 
Installation instructions
[spoiler]To install, connect the Prizm calculator to the computer with a miniUSB<->USB cable. On the calculator, press F1 when a pop-up appears on the screen. Wait for the USB connection to be established. When it's finished, your Prizm will appear on your computer as if it were a pendisk.

Copy "utilities.g3a" to the root folder of the pendisk (i.e., out of any folders but inside the pendisk) and safely remove it. Wait for the calculator to finish "updating the Main Memory". When it does, you should notice a new Menu item, with a Clock icon, called "Utilities".

The first time you run Utilities you'll be presented with the tny. internet media group logo and then a screen with some important notes about the add-in. You should definitely read them. You will then be guided to adjust the clock, something you'll have to do every time you take the batteries off. Don't worry, Utilities will remind and guide you through the process.[/spoiler]
 
Update instructions
Copy the new utilities.g3a over the old one. Refer to the installation instructions for more details. If you used a version of Utilities older than Beta 9, see here.

Usage instructions
[spoiler]Everything should be pretty much self-explanatory - Utilities is made to dispense the Read-Me :). Because of that, only less obvious things will be detailed here. To open the settings menu, press Shift+Menu while Utilities is running.

The calculator lock function will guide you through the process of setting a password, the first time you use it. You can contact gbl08ma if for some reason you wish to disable this function (be prepared to follow instructions in a very exact way).

The Add-In Manager only becomes available when the "Show advanced tools" setting is enabled. It is still unstable and may cause system errors. If you see a System Error, you should try pressing Menu and then 1 to try to dismiss it, or you can press EXIT to reboot the calculator. 99% of the times no data is lost or serious damage is done in the event of System Errors.[/spoiler]

Checking for updates
Starting with the v1.2 release, Utilities includes a little function that, assuming the calculator's clock is adjusted, will remind you to check for updates after a certain date in the future. However, you do not need to wait for that message to appear. You should check for updates to Utilities periodically, to ensure you have the greatest feature pack and the most stable version. To check for new versions, you should visit this thread or the following page:
http://gbl08ma.com/casio-prizm-software/

License
The add-in is available under the GNU GPL version 2. The license text is available online at https://www.gnu.org/licenses/gpl-2.0.html

Last words
Utilities is the result of over four years of research, work and extensive testing. That said, we can't guarantee you will have no problems using the add-in or that everything will work as described. You are welcome to report problems, as well as modify the source code to your needs as long as you respect the license.

We hope you enjoy using Utilities as much as we did developing it. And if this add-in ever becomes useful, you just found a secret feature ;)

DJ Omnimaga

I didn't look at this much before but this seems a nice set of utilities that could be very useful in school. I would really recommend this package. Also I like that clock. I didn't know the PRIZM had anything that allowed a clock to be possible, though?

Also nice to see people still develop for the PRIZM. The reason why I don't is because BASIC is just unbearably slow for anything that has actual graphics and there is no ASM lib for use in BASIC programs (such as CE Textlib or xLIBCE). I'll take a more in-dept look at PrizmUtilities features when I get a chance and batteries. :)

gbl08ma

It's funny, because Utilities addresses a few of your concerns...

First of all, we found that the Prizm had a RTC more than four years ago. It's documented at http://prizm.cemetech.net/index.php/Real-Time_Clock . Utilities had a clock since its inception; actually, at the beginning it was just a way to see and set the time and date. Before Utilities, other tools existed (at least, one made by AHelper, I don't remember the name).

The clock seen in the screenshot is just one of eight (I think?) different layouts possible. And you can also change how the long date is displayed, and use a 12-hour format for the clock, as well as change the date format. These settings are respected throughout all of the Utilities features - for example, when displaying calendar events. Or you can go for something completely different and just use an empty home screen.

Indeed, many of the features in Utilities are useful in school. I developed this add-in as I went through high school and I know this first-hand. Being able to see the dates of your exams right in your calculator is really useful; personally I also used the task list to manage homework, and the file manager (much, much superior to that in the OS) is very handy for organizing notes. Now, after two years in college I don't use my Prizm nearly as much but ever since I added the balance manager, I use it to keep track of my money (very useful if you only have one bank account, but some of your money is "personal" and the other part is for "student expenses").

And yes, Casio's BASIC is extremely slow and doesn't support C or assembly extensions. There are other scripting languages for the Prizm. Many years ago, KermM released a (more or less unfinished/incomplete, but working, like so many of his projects) Lua port. On the math side, I ported Eigenmath, which also supports scripting.
...and today, I released my PicoC port, built in to Utilities. PicoC is interpreted C. The PicoC port in Utilities can use all of the currently known OS syscalls plus all of the functions in Utilities, including some very useful UI routines, for making menus, selectors, text areas, text editors, and more. Just make sure to choose the PicoC edition of Utilities (PicoC greatly increases the file size of the add-in, which is why it is in a separate edition). More information here: https://github.com/gbl08ma/utilities/wiki/PicoC-information

I didn't do any benchmarks but PicoC is definitely faster than BASIC, even the untrained eye can see it. But then again, Casio BASIC really sets the bar low when it comes to speed.

Juju

Oooh, nice. Been a while I messed with my Prizm (blame my brother), I'll definitely try it out.
Read Zarmina!
YUKI-CHAAAANNNN
In the beginning there was walrii. In the end there will be walrii. All hail our supreme leader :walrii: --Snektron



if you wanna throw money at me and/or CodeWalrus monthly it's here

DJ Omnimaga

Quote from: gbl08ma on June 21, 2016, 11:40:49 pm
It's funny, because Utilities addresses a few of your concerns...

First of all, we found that the Prizm had a RTC more than four years ago. It's documented at http://prizm.cemetech.net/index.php/Real-Time_Clock . Utilities had a clock since its inception; actually, at the beginning it was just a way to see and set the time and date. Before Utilities, other tools existed (at least, one made by AHelper, I don't remember the name).

The clock seen in the screenshot is just one of eight (I think?) different layouts possible. And you can also change how the long date is displayed, and use a 12-hour format for the clock, as well as change the date format. These settings are respected throughout all of the Utilities features - for example, when displaying calendar events. Or you can go for something completely different and just use an empty home screen.

Indeed, many of the features in Utilities are useful in school. I developed this add-in as I went through high school and I know this first-hand. Being able to see the dates of your exams right in your calculator is really useful; personally I also used the task list to manage homework, and the file manager (much, much superior to that in the OS) is very handy for organizing notes. Now, after two years in college I don't use my Prizm nearly as much but ever since I added the balance manager, I use it to keep track of my money (very useful if you only have one bank account, but some of your money is "personal" and the other part is for "student expenses").

And yes, Casio's BASIC is extremely slow and doesn't support C or assembly extensions. There are other scripting languages for the Prizm. Many years ago, KermM released a (more or less unfinished/incomplete, but working, like so many of his projects) Lua port. On the math side, I ported Eigenmath, which also supports scripting.
...and today, I released my PicoC port, built in to Utilities. PicoC is interpreted C. The PicoC port in Utilities can use all of the currently known OS syscalls plus all of the functions in Utilities, including some very useful UI routines, for making menus, selectors, text areas, text editors, and more. Just make sure to choose the PicoC edition of Utilities (PicoC greatly increases the file size of the add-in, which is why it is in a separate edition). More information here: https://github.com/gbl08ma/utilities/wiki/PicoC-information

I didn't do any benchmarks but PicoC is definitely faster than BASIC, even the untrained eye can see it. But then again, Casio BASIC really sets the bar low when it comes to speed.
Interesting, I did not know about the RTC. I am surprised that Casio never bothered implementing it in the OS. Maybe they wanted to keep user RAM as high as they could (since it was already under the fx-9860G by 3 KB) or the speed? Or maybe they wanted this implemented but ran into too many bugs or issues and gave up?

As for BASIC/C/Lua I never got into Lua since back then I had no interest in coding for the Nspire and thought LuaZM lacked sprite support. I always found C and Axe Parser way too difficult to learn, though, same for ASM, which is why I stayed away from those, hence my remark about BASIC. If the PRIZM had a parser hook feature allowing inline ASM/C code execution from BASIC programs or modifying the behavior of certain commands (like real() on z80 calcs), then an ASM/C extension would have been possible. But the lack of such extension and the fact I had limited interest in getting further into the other languages made me stick to HP PPL and TI-Z80 Basic (the latter blows Casio BASIC out of the water, especially with extensions)

gbl08ma

Quote from: DJ Omnimaga on June 22, 2016, 01:33:07 am
I am surprised that Casio never bothered implementing it in the OS. Maybe they wanted to keep user RAM as high as they could (since it was already under the fx-9860G by 3 KB) or the speed? Or maybe they wanted this implemented but ran into too many bugs or issues and gave up?


If by "implementing it" you mean adding a function for seeing and setting the time, if they didn't do so it's because they didn't want to, and not because of any technical difficulties. None of their previous graphic calculators told the time, despite some of them (like the popular fx-9860G models) having RTCs too. Since it was not a feature in earlier models, perhaps they didn't feel the need to add the functionality when porting the OS to newer models.

The OS has syscalls for setting and reading the RTC and makes extensive use of it, for example for knowing when to blink the cursor or rotate the loading indicator, or in ECon2/ECon3 for knowing when to take measurements. The newest OS version with examination mode support also uses it to know when the mode expires (waiting 12 hours is one of the ways to exit the mode). We know at least five of those syscalls: http://prizm.cemetech.net/index.php/Category:Syscalls:RTC . The OS uses the RTC in a relative fashion, i.e. it doesn't care about absolute time but only about time differences. So it doesn't have any UI for setting the RTC. Add-ins can set it, without issues so far. Perhaps they thought, since users would presumably already have a watch in their wrist (a Casio one, no less), they wouldn't need to bother users with having to set the time on their calculators too (which would need to be done every time the batteries are taken out). Less features -> simpler UI -> better user experience.

DJ Omnimaga

Yeah it's possible that since the PRIZM OS was pretty much a colored version of the 9860G OS that they didn't bother adding a clock in the OS. It's a good thing they use the RTC for some purposes, though.

And lol yeah the Casio watch argument might actually be valid if they're trying to sell new watches. :P But the simpler interface thing is also another good one.

Juju

Yeah, Casio does quite a lot of electronics.  My theory, they probably didn't need an RTC but the chip they chose for the Prizm probably came with one anyway, so I guess it's a bonus for them. That or they planned things with the RTC that got cut when it came to port the OS. That would probably been nice they included some BASIC functions about time like TI did on the 84+.
Read Zarmina!
YUKI-CHAAAANNNN
In the beginning there was walrii. In the end there will be walrii. All hail our supreme leader :walrii: --Snektron



if you wanna throw money at me and/or CodeWalrus monthly it's here

gbl08ma

The chips in the Prizm and other Casio caclulators are customized Renesas cores. They have a pretty strong relationship with Renesas; now that they are seemingly discontinuing the SuperH architecture (which has been stagnant with SH4 for years), we'll see what happens - will Casio switch to ARM?

Because of this, I'm pretty sure they could take the RTC out if they didn't need it - it would result in less power consumption, and better standby battery life. But they need it, because for measuring long intervals for use with ECon2/3 there's no other solution (I guess they could get away with tight loops/counting the CPU cycles for shorter time intervals like those for the cursor blinking, but for anything longer than a few seconds that wouldn't be very accurate). Again, the reason for not including a user-visible clock was not due to technical difficulties. There was either a deliberate decision to not include it on the Prizm and earlier calcs, or it is something that simply never got done because it wasn't in the feature specification list, and of course developers can't just go around implementing whatever features they want.

It's not just Casio calculators that could have had a clock by default. Not all product designers have the creativity of the guy that decided microwave ovens could use their displays to show the time when not in use. It's possible Casio wanted to avoid yet another VHS-scheduler situation - in most people's homes, they would stay blinking at 00:00 or --:-- because people wouldn't know how/bother to set the time (this also happens to a lesser extent with microwave ovens).

DJ Omnimaga

The main issue with VCR's is that they were often complicated to program by technology-illiterate people, even if they were part of the target audience. Also, many people probably just used their VCR to watch movies and such things.

As for Casio calcs, there would be more coders if they used ARM or ez80 processors, but all compatibility with old games and programs would be lost.

Powered by EzPortal