Author: gbl08ma
Posted: 21 Jan 2013 03:26:35 pm (GMT -5)
I modified the source code of the beta1 of mkg3a in order to support eAct strips. No, not even Simon got something as obvious as this right.
Apart from the additional languages and monochrome/3 color icon (turns out it's 3-color even though the OS only uses black) Tari and Simon both documented (in varying degrees of spelling and grammar, and in various mediums, from a C header file to an ancient Windows help file format), there was something very obvious I found out when comparing the headers of Casio's strip-enabled add-ins and our add-ins.
The byte at 0x12b in the header (just before the version number) needs to be set to 0x01 for the OS to know the add-in has a strip... Tari previously thought this was part of some padding, but it isn't. Now, who knows that the remaining "padding" bytes are hiding from us...
My modifications to mkg3a are very hackish, plus they were done on an old source code release. It works for me but it's not something I'd like to see go to the official code tree. So either give me time to implement it properly or implement it yourself.
Apart from that, there's (or at least there was, in the fx-9860Gs) a parameter that says if the add-in is launched from the Menu or from a strip... even though I don't need this for this add-in, it'd be good if someone found out how that works...
Process switching within those strips works just fine without any code modification, you only need to use GetKey. When process-switching, the whole stack is preserved (I know this because I use almost all of it on this add-in, for caching images in memory). Didn't check the heap (as I said before, I really don't like Casio's malloc and friends).
Each strip has its own main memory (and of course setup), which is stored in the eActivity file. Since files have a size limit of about 30 KB (not including g3p pictures), the main memory usage is more or less faked to give the guest add-in the impression 34-36 KB of it are already in use. If you decide to fill the main memory provided to a strip, there won't be any space left for eActivity root content or other strips. This is actually documented in the Prizm's software manual, of course with user friendly terms. There's also a function to see how much of a file the strip is taking with its main memory: when the cursor is on a strip, do File[F1]->Size[F5]
I'm busy with school and I added this strip functionality in a hurry because a friend of mine can't open g3p files embedded inside eActivities with her calculator (the outside says it's a CG-20, the main board has been replaced and when I updated to OS 1.04 the OS version string became 01.04.3200, instead of the usual 01.04.0200 of CG-20s). I also like using JPEG images much more than g3p (unlimited image dimensions, easy to convert...) but they couldn't be pointed to from an eActivity document... here's my solution![Smile]()
_________________
My blog, where I write about random things... | tiny URL shortener
View JPEG images on your Prizm | Utilities for the Casio Prizm - clock, stopwatch, calendar/agenda, add-in manager and more!
Posted: 21 Jan 2013 03:26:35 pm (GMT -5)
I modified the source code of the beta1 of mkg3a in order to support eAct strips. No, not even Simon got something as obvious as this right.
Apart from the additional languages and monochrome/3 color icon (turns out it's 3-color even though the OS only uses black) Tari and Simon both documented (in varying degrees of spelling and grammar, and in various mediums, from a C header file to an ancient Windows help file format), there was something very obvious I found out when comparing the headers of Casio's strip-enabled add-ins and our add-ins.
The byte at 0x12b in the header (just before the version number) needs to be set to 0x01 for the OS to know the add-in has a strip... Tari previously thought this was part of some padding, but it isn't. Now, who knows that the remaining "padding" bytes are hiding from us...
My modifications to mkg3a are very hackish, plus they were done on an old source code release. It works for me but it's not something I'd like to see go to the official code tree. So either give me time to implement it properly or implement it yourself.
Apart from that, there's (or at least there was, in the fx-9860Gs) a parameter that says if the add-in is launched from the Menu or from a strip... even though I don't need this for this add-in, it'd be good if someone found out how that works...
Process switching within those strips works just fine without any code modification, you only need to use GetKey. When process-switching, the whole stack is preserved (I know this because I use almost all of it on this add-in, for caching images in memory). Didn't check the heap (as I said before, I really don't like Casio's malloc and friends).
Each strip has its own main memory (and of course setup), which is stored in the eActivity file. Since files have a size limit of about 30 KB (not including g3p pictures), the main memory usage is more or less faked to give the guest add-in the impression 34-36 KB of it are already in use. If you decide to fill the main memory provided to a strip, there won't be any space left for eActivity root content or other strips. This is actually documented in the Prizm's software manual, of course with user friendly terms. There's also a function to see how much of a file the strip is taking with its main memory: when the cursor is on a strip, do File[F1]->Size[F5]
I'm busy with school and I added this strip functionality in a hurry because a friend of mine can't open g3p files embedded inside eActivities with her calculator (the outside says it's a CG-20, the main board has been replaced and when I updated to OS 1.04 the OS version string became 01.04.3200, instead of the usual 01.04.0200 of CG-20s). I also like using JPEG images much more than g3p (unlimited image dimensions, easy to convert...) but they couldn't be pointed to from an eActivity document... here's my solution

_________________
My blog, where I write about random things... | tiny URL shortener
View JPEG images on your Prizm | Utilities for the Casio Prizm - clock, stopwatch, calendar/agenda, add-in manager and more!