Register

fx-9860GII OS footer question

Discuss issues related to the fx-9860G Software Development Kit
Member
Posts: 43
Joined: Wed Jul 24, 2013 3:33 am
Calculators: Casio fx-7400GII (SH4), Casio fx-9750 G II (SH4), Casio fx-9860 GII SD, Casio Classpad 330, Casio Classpad fx-cp400, Casio fx-CG 50

fx-9860GII OS footer question

Postby critor » Fri Dec 21, 2018 9:49 pm

Hi

Casio OSes are coming with a footer block which includes :
  • the OS checksum
  • the list and information about built-in languages

Once the OS is installed, this footer will end at the following Flash address :
  • fx-7400GII : 0x1E0000
  • fx-9860G 1.00-1.11 : 0x270000
  • fx-9750GII/9860GII and fx-9860G 2.00+ : 0x250000

On SH3 OSes, it's possible to move the footer. You just need to patch the matching adresses in the OS. For example on fx-9750GII/9860GII you can find :
  • A024FFE0 (OS datestamp, end of built-in languages list+information)
  • A024FFF0 (number of built-in languages)
  • A024FFF8 (OS checksum)
  • A024FFFC (?)

Is moving the footer still possible on more recent fx-9750GII/9860GII SH4 calculators ?
Even in the first 2.02 OS, I can't find anything like A024FF?? anymore, nor even 8024FF??.
Which is quite strange, since I can still find A0250000 and A0260000 which match the two MCS/RAM backups.
What happend ? How do SH4 OSes still access their footer ?


Thanks.

Senior Member
User avatar
Posts: 604
Joined: Sat Sep 15, 2012 6:59 am
Location: Krautland ****
Calculators: Casio fx-7400GII, Casio fx-7400GII (SH4), Casio fx-9750 G II, Casio fx-9750 G II (SH4), Casio fx-9860G, Casio fx-9860 G SD, Casio fx-9860G Slim, Casio fx-9860 GII SD, Casio fx-9860 GII SD Power Graphic 2, Casio Classpad 330 plus, Casio fx-CG 20, Casio Classpad fx-cp400, Casio fx-CG 50

Re: fx-9860GII OS footer question

Postby SimonLothar » Sun Dec 23, 2018 1:03 am

A few examples:

On fx9750 OS 2.02 with 8024FFE0:"2011.0801.1251" and 8024FFF8:h'10440FE6
there exists the TestChecksums-procedure at 800396C4.

On fx9860 OS 2.02 with 8024FFE0:"2011.0801.1921" and 8024FFF8:h'0F746332
there exists the TestChecksums-procedure at 8003E01C.

On fx9860 OS 2.09 with 8024FFE0:"2015.1204.1158" and 8024FFF8:h'0F2E15D4
there exists the TestChecksums-procedure at 80040714.

In this cases the system first loads A0270000 into r14 and then it subtracts h'20000 from r14 giving A0250000.
That is the reason why you cannot find a reference to A0250000. The address is calculated.

So if you search for A0270000 you will get some hits, which lead you to the locations, where A0250000 is calculated in the way described above.
I'll be back!

Member
Posts: 43
Joined: Wed Jul 24, 2013 3:33 am
Calculators: Casio fx-7400GII (SH4), Casio fx-9750 G II (SH4), Casio fx-9860 GII SD, Casio Classpad 330, Casio Classpad fx-cp400, Casio fx-CG 50

Re: fx-9860GII OS footer question

Postby critor » Sun Dec 23, 2018 10:33 pm

Hi Simon.


Thanks for your reply.

I had already successfully removed some builtin languages and moved the header in fx-9750GII SH3 OS images, in order to make them fit on fx-7400GII SH3 calculators.

Not possible with fx-7400GII SH4 calculators so far :
- because removing the builtin languages on fx-9750/9860GII SH4 OSes is not enough to make them smaller than 2MiB (not even considering the RAM backups yet)
- and anyway, fxRemote doesn't support the fx-7400GII SH4

What I was wondering about, was if it was possible to increase the 1.5MiB storage space on the fx-9860GII by doing this kind of things since they are now possible, thus by :
- removing some builtin languages
- moving the OS footer

Thanks to your explanations, I've now got a working fx-9860GII SH4 2.05 OS with :
- no builtin language other than english
- the OS footer moved from 0x25ee0 to 0x20ee0
- 1st RAM backup moved from 0x250000 to 0x210000
- 2nd RAM backup moved from 0x260000 to 0x220000

The patches I've applied in the OS are :
- replace all 0xA0250000 by 0xA0210000 (mask 0xFFFFFFFF) - 2 occurrences
- replace all 0xA0260000 by 0xA0220000 (mask 0xFFFFFFFF) - 2 occurrences
- replace all 0xA0270000 by 0xA0230000 (mask 0xFFFFFFFF) - 3 occurrences

But apparently, this is not enough to deal with the storage space.
After reflashing, my files are still listed in the storage space, so the OS apparently still checks the FAT at 0x270000.
Wiping out everything and optimizing doesn't give me more than 1.5MiB either.

Do you know why ?
Thanks.

Senior Member
User avatar
Posts: 604
Joined: Sat Sep 15, 2012 6:59 am
Location: Krautland ****
Calculators: Casio fx-7400GII, Casio fx-7400GII (SH4), Casio fx-9750 G II, Casio fx-9750 G II (SH4), Casio fx-9860G, Casio fx-9860 G SD, Casio fx-9860G Slim, Casio fx-9860 GII SD, Casio fx-9860 GII SD Power Graphic 2, Casio Classpad 330 plus, Casio fx-CG 20, Casio Classpad fx-cp400, Casio fx-CG 50

Re: fx-9860GII OS footer question

Postby SimonLothar » Mon Dec 24, 2018 9:26 am

In some cases the functions, which access the storage memory, use sector arrays like

.data.l h'270000, h'280000, h'290000, h'2A0000, h'2B0000
.data.l h'2C0000, h'2D0000, h'2E0000, h'2F0000, h'300000
.data.l h'310000, h'320000, h'330000, h'340000, h'350000
.data.l h'360000, h'370000, h'380000, h'390000, h'3A0000
.data.l h'3B0000, h'3C0000, h'3D0000, h'3E0000

to find a specific smem sector address. This kind of array escapes a search for A0xxxxxx or 80xxxxxx, too.
I'll be back!

Return to Casio fx-9860 SDK

Who is online

Users browsing this forum: No registered users and 3 guests