fx-Remote Maintenance BETA

 

Mainly fx-Remote-Maintenance should provide for fx-Backup/Recovery. For the GII-calculators there are no OS Updaters available yet (June 2010), which allow to repair a damaged OS. fx-Remote-Maintenance cannot modify (hack or patch) an OS image!

 

The program requires the CESG502 driver. The driver is installed together with FA-124.

WINDOWS 64bit is not supported by CASIO. Workaround: VM.

Win7 32bit needs FA-124 v1.02+.

 

Possible reasons for a recovery

 

OS corruption

It has been reported, that after an accidently applied fx-OS updater (designed for a different calculator type), a GII came up with the primary emergency OS update. This has been due to the four byte invalidation, any fx-OS updater applies, when detecting problems during the update.

Using flash-erasing or –writing code lightheadedly can damage the OS, too.

 

Main memory corruption

It has been reported, that after running a certain G1A or provoking a crash with a certain PRGM-bug, the calculator does not come up again. Most probably this has been a main memory corruption. As main memory resides in RAM, it is possible, that this area can be corrupted by a G1A going berserk in the RAM. Under normal circumstances the main memory is recovered from the autobackup in the flash. But if the calculator can perform a normal shutdown the corruption is backed up, too, and the calculator possibly cannot startup any more.

 

Storage memory corruption

It could be possible, f. i. after an interrupted storage memory optimization, the calculator wouldn’t start up any more. Usually the OS detects such a situation and resets the storage memory automatically, but it seems possible, that if the OS tries to build up the main menu, which includes scanning the storage memory for G1As, the OS hangs. This cannot be mended by an OS recovery. A special binary has to be uploaded, to reset the storage memory. That would mean erasure of sectors 0x80270000 to 0x803F0000.

 

Some References related to this:

http://www.casiokingdom.org/modules.php?name=Forums&file=viewtopic&p=14338#14338

http://www.casiocalc.org/?showtopic=4868

http://www.casiokingdom.org/modules.php?name=Forums&file=viewtopic&p=14059#14059

 

-----

 

It is very important to make sure that a valid backup is available before starting any recovery. If the recovery process does not detect any incompatibilities, it will erase the OS immediately. The calculator will enter coma, until a valid OS image is reloaded.

 

The toolkit consists of a PC-program pfxRecover.exe (remote-controller) and the SH3-binary OSRecover.SH3.

 

OSRecover.SH3 is not a hacked “UpdateExe.BIN”. OSRecover.SH3 follows a completely different scheme and is programmed from scratch. It has been assembled and linked with the standard tools (assembler, linker) included in the CASIO fx-9860-SDK.

 

The toolkit has been tested on two fx-9860G, two fx-9860G SD, two fx-9860 slim, an fx-9860GII SD and an fx-9750GII. Disconnecting during erasure and flash writing has been performed several times without any harm, t. i. after restart the process succeeded.

 

Standard procedure:

Connect the calculator via USB.

If the the OS is still operable, start LINK/Receive (the recovery process will enter the primary OS updater automatically).

If the OS is corrupt, the primary OS updater should come up automatically, when the calculator is switched on.

If even this does not happen any more, start the primary OS updater by resetting the calculator with the P-button while having P104 closed or as P104 is not easily reachable with a GII (9860 as well as 9750), trigger the primary emergency OS update on the GII-types by simultaneously holding down F2, 4 and AC/ON and pressing the RESTART-button (the calc should show a blank display after releasing the keys) and finally pressing 9 and x consecutively.

Start pfxRecover.exe.

The first thing one should make is a backup of the calculator’s flash (if still possible).

The button “Backup” starts a backup of the memory range 0x80000000 to 0x8026FFFF of the connected calculator.

The button “Recover” starts a recovery of the memory range 0x80010000 to 0x8026FFFF of the connected calculator. The image loaded must have the same calculator ID as the connected calculator. Before the recovery process enters the erase-phase, the remote-controller asks for a confirmation.

If the recovering process should go out of sync or if the process is interrupted by disconnecting the calculator, restart the process.

 

It is possible, that OSRecover.SH3 cannot start the primary OS updater automatically from out of the OS (f. i. on a slim with OS 1.10). Sometimes it is sufficient to switch the calculator off (SHIFT + AC/ON) and ON again. If this should not work, start the primary OS updater manually (see above). P104 on the slim is hidden behind a piece of adhesive tape inside of the battery compartment (NW of the P-button).

 

Security considerations

 

The only real danger would be writing or erasing the flash below the address 0x80010000. Therefore the central flash write- and erase-routines, which are used in OSRecover.SH3, block out such addresses.

 

If the calculator’s BIOS is not known to OSRecover.SH3, it will show a message and freeze, waiting for the P/RESTART button to be pressed.

 

The checksum of the image, which should be recovered is checked by the tool. The process is cancelled, if the checksum is not correct.