July 06, 2020, 06:25:02 am

The shoutbox is currently out of service. Join us on Discord instead.
You can help CodeWalrus stay online by donating here.

WARNING: DO NOT UPGRADE your TI-83 Premium CE or TI-84 Plus CE to OS 5.5.1 and higher. It removes all compatibility with most games and removes ASM/C programming! DOWNGRADING IS IMPOSSIBLE. BE WARNED! Likewise, do NOT update your TI-Nspire CX past OS 4.5.0, else using Ndless and ASM/C programs will be impossible.

A new Casio PRIZM calculator: The fx-CG50

Started by DJ Omnimaga, January 14, 2017, 03:04:54 pm

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

gbl08ma

July 04, 2017, 11:46:44 am #45 Last Edit: July 04, 2017, 11:49:22 am by gbl08ma
I am aware of that and I've seen the issue that was opened in the Eigenmath GitHub.

I have also identified the problem, in fact I did so some months ago. The VRAM address is hardcoded. Utilities doesn't have this problem, as it reads the VRAM address using the appropriate syscall when it starts, caching that address to RAM and using it for custom VRAM manipulation functions from then on. Eigenmath uses a hardcoded address for these custom functions, which is why on some calculators the graphics are glitched.
It appears that the Graph 90+E uses a different VRAM address than the fx-CG50 (since on the emulator for the latter at least, the add-in doesn't show any problems).

I also know how to fix this in terms of code, it's a matter of reusing the solution from Utilities.
Now, you may think that the problem is basically solved as the steps that are usually 90% of the work are done (identifying the problem and drafting a solution). The problem is that I no longer have a Prizm development environment on any of my machines. And it's a bit tricky to set one up.
First, I need a custom mkg3a (because the add-in has a eActivity strip, and vanilla mkg3a doesn't have support for that) and I'm not sure I still have the source code to that custom mkg3a anywhere.
Second, I need to use my fork of libfxcg (this is not very hard).
Third, if I recall correctly there are some library shenanigans regarding the C math functions. I'm not sure but I think Eigenmath was the add-in where I had to use a library frankensteined from miniSDK or whatever that terrible libfxcg alternative was called.
Finally, ideally I'd like to use the same 4.x GCC I used before, as a long long time ago I tried GCC 5 and 6 without success. It appears that at the time these versions of GCC had some problem emitting code for the Prizm SH4 CPU architecture. It's probably fixed by now, or the problem might be in my code, or in libfxcg, after all. But I don't want to waste time figuring that out.

I'll see if I can boot the Linux install I supposedly still have on the hard disk I used to have on my laptop. That's supposedly where I had the environment I used to develop Eigenmath and Utilities.
This will take a while though, and there's a chance I'll have to fight bitrot, and that's why I haven't started yet. Furthermore, fixing Eigenmath is obviously not the only thing I had postponed to the summer and there are more urgent things in my to-do list.

@critor, how do you prefer I send you builds for testing?

critor

July 04, 2017, 11:54:16 am #46 Last Edit: July 04, 2017, 11:56:02 am by critor
Quote from: gbl08ma on July 04, 2017, 11:46:44 amIt appears that the Graph 90+E uses a different VRAM address than the fx-CG50 (since on the emulator for the latter at least, the add-in doesn't show any problems).

I'd advise you not to trust the Casio emulator. Even in Graph 90+E mode apps are working, although most of them don't on real hardware.

From what I could read on http://www.casiopeia.net/forum/viewtopic.php?f=2&t=1783 , the real fx-CG50 is sharing the same problem as the real Graph 90+E.

Quote from: gbl08ma on July 04, 2017, 11:46:44 am@critor, how do you prefer I send you builds for testing?

Email to [email protected] would be better - since I might not get the PM notification.


Thank you very much for your very prompt reply. :)

gbl08ma

That's sad. It means the emulator OS diverges from the OS running on real hardware even more than with the fx-CG10/20. It's probably a good time for someone to resume working on a QEMU-based emulator, or to figure out a way to run OS images on the official emulator that are closer to what runs on real hardware. Fortunately I don't intend to develop anything else for this platform other than one-off fixes like this.

Can you check if my image viewer still runs fine on real hardware for both JPEG and PNG?

critor

Quote from: gbl08ma on July 04, 2017, 11:58:13 amCan you check if my image viewer still runs fine on real hardware for both JPEG and PNG?

JPEG/PNG images seem to be working perfectly. The scrolling is so fast compared to the fx-CG10/20 ! :D

The file browser though has the same kind of graphic glitches as eigenmath :

gbl08ma

OK, fortunately if I manage to fix Eigenmath I can also fix the Image Viewer very easily. It's just a matter of getting to my old development environment, if it still works. Perhaps later today I'll be able to do that.

gbl08ma

@critor, I sent you test builds. If everything works fine then the only thing left to do is to tag the git commit, rebuild them so the version strings gets updated, and upload them to the various places on the internet where I originally uploaded them.

Icons will stay in the fx-CG 10/20 style for now. I hope someone works on a solution to automatically and safely swap the icon on the first run, so separate builds for different models are not needed. Given the trouble previous Prizm OS versions had when writing or otherwise manipulating g3a files from add-ins, I'm not hopeful...

critor

Ok, thanks you very much. :)

Are they supposed to still work on the fx-CG10/20 ?
(I don't have it anymore)

gbl08ma

Yes, they will work on previous versions as well. But you don't need to test that, as the emulator does an OK job and I already checked.

critor

So it's great if the same build is working on all models - thanks ! :)

DJ Omnimaga

A community emulator would definitively be a must for adequate C development on this calculator series, even though the audience would be smaller. The official emulator costs $200 anyway. (almost twice as much as the original PRIZM calculator)

critor

Not $200, worse.
It's a subscription now - you have to go on paying forever :P

DJ Omnimaga

Wait, so it's now like Xbox Live, PS Plus, World of Warcraft and MS Office?

gbl08ma

And unfortunately, unlike earlier versions of the fx-CG10/20 manager, I have not been made aware of any registry hacks for the newer emulators.

If you use PlayOnLinux you can always create a new virtual disk (Wine config) every time the 90-day trials expire, though. This is what I used to do...
For Windows I'm not sure if there's any sandboxing tool that will allow for something like that.

I think in the longer run it'd be best to get an open-source alternative going on so we can stop pretending we didn't read EULAs.

gbl08ma

critor says the image viewer appears to be fixed, but Eigenmath is crashing and causing system instability.

In the interest of the public, here's a copy of the email I just sent him, as it summarizes the situation very well.

----
I have bad news. I can't reproduce the problem on the previous model, neither on the emulator nor on real hardware, and I can't do it on the emulator for the new models, no matter which mode is selected.

I also have little idea of what could be causing the crashes and general instability. Only thing that comes to mind is if they changed the RAM areas in size or the way they are supposed to be initialized. But that doesn't explain how other add-ins run so well.

It could also have something to do with one user timer that the add-in installs (and carefully uninstalls when it's supposed to), to be able to abort computations. Maybe tomorrow I'll send you a build that doesn't install any timers, to see if that fixes the problem. Maybe Casio broke the timer API, or the timer system entirely, with the new OS. I don't think it's a functionality that official add-ins use.

I might give this problem some more hours of attention tomorrow, but failing the timer idea, I'm afraid this can't be fixed unless the OS change that causes the problems is identified. I don't own one of these calculators and since the emulator is significantly different, it makes everything very hard. I have also lost all familiarity with the code of my Eigenmath port, which was never exactly a miracle of software engineering to begin with. In fact, I lost familiarity with lots of quirks of the Casio syscalls. So things take a lot of time and effort as I need to restudy everything.

Is the PC and target always the same?

At least the image viewer appears to be fixed.

gbl08ma

An update to the image viewer has been released. The g3a works on all Prizm models.

For Eigenmath, I don't know what to do and I've given up for now.

Powered by EzPortal