Register

Protocol 7.00 - Error 0x04 and tests

Discuss issues related to Calculator Hacking/Modding.
Senior Member
User avatar
Posts: 101
Joined: Sun Mar 27, 2016 10:24 am
Location: France
Calculators: Casio Afx 1.0, Casio fx-9860GII, Casio fx-CG50

Re: Protocol 7.00 - Error 0x04 and tests

Postby cakeisalie5 » Sun Sep 18, 2016 10:38 am

There is no unique way across the different types and years.


Yep, but if you have got a list of command knocking per model, as usual, I'll take it :P

This I found somewhere in my docs

I generally use the bootcode OS updater as environment for 0x56


I know, I've been using this page (and UpdateExe.bin/UpdateExe) as a reference for OS Updating ! But the 0x56 command is supported by all environments : do you know the difference between them all ? (actions being done before, ...)
I'm trying to use Receive Mode for testing and there is this "Enable Flashrom erase and OS Updating..." message I'm unsure about (I'm blocked on a System ERROR saying "Illegal Code Err" right after it for now, but I think that's my fault)...
Part of the Planète Casio community (FR) - main author of Cahute

Senior Member
User avatar
Posts: 605
Joined: Sat Sep 15, 2012 6:59 am
Location: Krautland ****
Calculators: Casio fx-7400GII, Casio fx-7400GII (SH4), Casio fx-9750GII, Casio fx-9750GII (SH4), Casio fx-9860G, Casio fx-9860G SD, Casio fx-9860G Slim, Casio fx-9860GII SD, Casio fx-9860GII SD Power Graphic 2, Casio Classpad 330 plus, Casio fx-CG20, Casio fx-CG50, Casio Classpad fx-CP400

Re: Protocol 7.00 - Error 0x04 and tests

Postby SimonLothar » Sun Sep 18, 2016 12:10 pm

cakeisalie5 wrote:I'm blocked on a System ERROR saying "Illegal Code Err" right after it for now...
When does this message occur? Did you successfully transfer the last block of code to RAM?
I'll be back!

Senior Member
User avatar
Posts: 101
Joined: Sun Mar 27, 2016 10:24 am
Location: France
Calculators: Casio Afx 1.0, Casio fx-9860GII, Casio fx-CG50

Re: Protocol 7.00 - Error 0x04 and tests

Postby cakeisalie5 » Sun Sep 18, 2016 3:43 pm

Well, it looks like my program doesn't transfer the complete program, so that's not a Protocol 7 related error, that's just me failing. xD (I'll bring the results here as soon as it works)
Part of the Planète Casio community (FR) - main author of Cahute

Senior Member
User avatar
Posts: 605
Joined: Sat Sep 15, 2012 6:59 am
Location: Krautland ****
Calculators: Casio fx-7400GII, Casio fx-7400GII (SH4), Casio fx-9750GII, Casio fx-9750GII (SH4), Casio fx-9860G, Casio fx-9860G SD, Casio fx-9860G Slim, Casio fx-9860GII SD, Casio fx-9860GII SD Power Graphic 2, Casio Classpad 330 plus, Casio fx-CG20, Casio fx-CG50, Casio Classpad fx-CP400

Re: Protocol 7.00 - Error 0x04 and tests

Postby SimonLothar » Sun Sep 18, 2016 5:19 pm

If your program is not uploaded completely, the calculator would wait or report a receive error due to timeout. It would not enter an "Illegal Code Err".

The message
System ERROR saying "Illegal Code Err"
can occur, if your uploaded program runs and contains "Illegal Code".
Hint: Your program must not end, except with a reboot (jump to 0xA0000000).

Or possibly your upload corrupts the stack, causing a function to jump back to nowhere land.
I'll be back!

Senior Member
User avatar
Posts: 101
Joined: Sun Mar 27, 2016 10:24 am
Location: France
Calculators: Casio Afx 1.0, Casio fx-9860GII, Casio fx-CG50

Re: Protocol 7.00 - Error 0x04 and tests

Postby cakeisalie5 » Sun Sep 18, 2016 10:47 pm

Well in fact, the logs were telling my program (on the PC) was sending crap. But it looks like it works fine now (and I didn't modify anything, I don't really understand what went on). Basically my program just loops for nothing then reboots (using a method lephe gave me), but I'll try implementing USB using add-ins to test, to avoid using proprietary code. ^^

I'm using Receive Mode and it looks like it works fine... is there a real difference (and/or dangers) of not using bootcode OS Updater ? Oo
Part of the Planète Casio community (FR) - main author of Cahute

Senior Member
User avatar
Posts: 605
Joined: Sat Sep 15, 2012 6:59 am
Location: Krautland ****
Calculators: Casio fx-7400GII, Casio fx-7400GII (SH4), Casio fx-9750GII, Casio fx-9750GII (SH4), Casio fx-9860G, Casio fx-9860G SD, Casio fx-9860G Slim, Casio fx-9860GII SD, Casio fx-9860GII SD Power Graphic 2, Casio Classpad 330 plus, Casio fx-CG20, Casio fx-CG50, Casio Classpad fx-CP400

Re: Protocol 7.00 - Error 0x04 and tests

Postby SimonLothar » Mon Sep 19, 2016 9:14 pm

cakeisalie5 wrote:I'm using Receive Mode and it looks like it works fine... is there a real difference (and/or dangers) of not using bootcode OS Updater ? Oo
No, there is no danger. It's only that I got used to the bootcode OS updater, because I sometimes killed my calculator's OSes in the course of my experiments. The receive mode is more convenient, indeed. As long as the OS is operable, the receive mode is OK to check the capabilities of ST:0x56. Except perhaps the choice of the RAM range is limited, if an OS is running.
I'll be back!

Senior Member
User avatar
Posts: 101
Joined: Sun Mar 27, 2016 10:24 am
Location: France
Calculators: Casio Afx 1.0, Casio fx-9860GII, Casio fx-CG50

Re: Protocol 7.00 - Error 0x04 and tests

Postby cakeisalie5 » Tue Sep 20, 2016 10:33 am

What do you mean it sometimes killed your calculator's OSes ? The fact that UpdateExe-s reboot shouldn't cause problems (as soon as we keep 64Kio from 0x88030000 for the ROM and 48Kio from 0x08024000 for the RAM)... right ? Oo

Unless you was trying to use the flash ROM ?
Part of the Planète Casio community (FR) - main author of Cahute

Senior Member
User avatar
Posts: 605
Joined: Sat Sep 15, 2012 6:59 am
Location: Krautland ****
Calculators: Casio fx-7400GII, Casio fx-7400GII (SH4), Casio fx-9750GII, Casio fx-9750GII (SH4), Casio fx-9860G, Casio fx-9860G SD, Casio fx-9860G Slim, Casio fx-9860GII SD, Casio fx-9860GII SD Power Graphic 2, Casio Classpad 330 plus, Casio fx-CG20, Casio fx-CG50, Casio Classpad fx-CP400

Re: Protocol 7.00 - Error 0x04 and tests

Postby SimonLothar » Tue Sep 20, 2016 6:35 pm

cakeisalie5 wrote:What do you mean it sometimes killed your calculator's OSes ?
Not "it", but "I" destroyed my calculators' OSes. Mostly during the development of things like fxRemote.

cakeisalie5 wrote:The fact that UpdateExe-s reboot shouldn't cause problems (as soon as we keep 64Kio from 0x88030000 for the ROM and 48Kio from 0x08024000 for the RAM)... right ?
If you upload'n'run (ST:0x56) from out of an OS, you never can tell. On the 512k RAM calculators the upper half of RAM seems to be unused as far as I experienced up to now. But again, with new OS-versions you never can tell. Though the worst thing to happen is some error message or a calculator, which only answers to the restart button.
I'll be back!

Senior Member
User avatar
Posts: 101
Joined: Sun Mar 27, 2016 10:24 am
Location: France
Calculators: Casio Afx 1.0, Casio fx-9860GII, Casio fx-CG50

Re: Protocol 7.00 - Error 0x04 and tests

Postby cakeisalie5 » Fri Sep 23, 2016 6:21 pm

I might try until I'm too afraid to go further. Right now, I have to try and implement USB (using gint, a library written by lephe that takes hold of the interrupt handler and other things). I'll tell you if I make any progress :P

By the way, about the addendum to the chm, have you got the Hardware ID (8-chars identifier, like "Gy363007") list returned in the answer to command 0x01 of all of the devices you use in it ? I am making a list of commands and accessible devices corresponding to hardware IDs (to make unambiguious error 0x04's meaning), that's why :)
Part of the Planète Casio community (FR) - main author of Cahute

Senior Member
User avatar
Posts: 605
Joined: Sat Sep 15, 2012 6:59 am
Location: Krautland ****
Calculators: Casio fx-7400GII, Casio fx-7400GII (SH4), Casio fx-9750GII, Casio fx-9750GII (SH4), Casio fx-9860G, Casio fx-9860G SD, Casio fx-9860G Slim, Casio fx-9860GII SD, Casio fx-9860GII SD Power Graphic 2, Casio Classpad 330 plus, Casio fx-CG20, Casio fx-CG50, Casio Classpad fx-CP400

Re: Protocol 7.00 - Error 0x04 and tests

Postby SimonLothar » Fri Sep 23, 2016 6:59 pm

If I remember well, TeamFX once tried to gather a complete list.

I contributed a few:
get device info results of some calculators bootcode: Show
fx-7400GII (2009.0327.1515):
HardwareIdentifier: Gy362000
ProcessorIdentifier: RENESAS SH735501
PreprogrammedROMcapacity:
FlashROMcapacity:
RAMcapacity:
PreprogrammedROMversion:
Bootcodeversion: 02.00.0000
Bootcodeoffset: 00000000
Bootcodesize: 00000064
OScodeversion:
OScodeoffset:
OScodesize:
 
fx-7400GII-2 (2011.0531.1709):
HardwareIdentifier: Gy490000
ProcessorIdentifier: RENESAS SH735501
PreprogrammedROMcapacity: 00000000
FlashROMcapacity: 00002048
RAMcapacity:
PreprogrammedROMversion:
Bootcodeversion:
Bootcodeoffset:
Bootcodesize:
OScodeversion: 00.10.0300
OScodeoffset: 00010000
OScodesize: 00002432
 
fx-9860GII-2 SD (2011.0525.1010)
HardwareIdentifier: Gy363000
ProcessorIdentifier: RENESAS SH735501
PreprogrammedROMcapacity: 00000000
FlashROMcapacity: 00004096
RAMcapacity:
PreprogrammedROMversion:
Bootcodeversion:
Bootcodeoffset:
Bootcodesize:
OScodeversion: 00.10.0300
OScodeoffset: 00010000
OScodesize: 00002432
 
fx-9860GII SD (2009.0203.1852)
HardwareIdentifier: Gy362000
ProcessorIdentifier: RENESAS SH735501
PreprogrammedROMcapacity:
FlashROMcapacity:
RAMcapacity:
PreprogrammedROMversion:
Bootcodeversion: 02.00.0000
Bootcodeoffset: 00000000
Bootcodesize: 00000064
OScodeversion:
OScodeoffset:
OScodesize:
 
fx-9750GII (2009.0203.1852)
HardwareIdentifier: Gy362000
ProcessorIdentifier: RENESAS SH735501
PreprogrammedROMcapacity:
FlashROMcapacity:
RAMcapacity:
PreprogrammedROMversion:
Bootcodeversion: 02.00.0000
Bootcodeoffset: 00000000
Bootcodesize: 00000064
OScodeversion:
OScodeoffset:
OScodesize:
 
fx-9750GII-2 (2011.0525.1010)
HardwareIdentifier: Gy363000
ProcessorIdentifier: RENESAS SH735501
PreprogrammedROMcapacity: 00000000
FlashROMcapacity: 00004096
RAMcapacity:
PreprogrammedROMversion:
Bootcodeversion:
Bootcodeoffset:
Bootcodesize:
OScodeversion: 00.10.0300
OScodeoffset: 00010000
OScodesize: 00002432
 
fx-9860G slim (2007.0206.1914)
HardwareIdentifier: Gy363000
ProcessorIdentifier: RENESAS SH733701
PreprogrammedROMcapacity: 00000000
FlashROMcapacity: 00004096
RAMcapacity: 00000128
PreprogrammedROMversion:
Bootcodeversion: 00.10.0010
Bootcodeoffset: 00000000
Bootcodesize: 00000064
OScodeversion: 01.01.0000
OScodeoffset: 00010000
OScodesize: 00002496
 
fx-9860G SD (2005.0623.1652)
HardwareIdentifier: Gy363000
ProcessorIdentifier: RENESAS SH733701
PreprogrammedROMcapacity: 00000000
FlashROMcapacity: 00004096
RAMcapacity: 00000128
PreprogrammedROMversion:
Bootcodeversion: 00.10.0010
Bootcodeoffset: 00000000
Bootcodesize: 00000064
OScodeversion: 01.01.0000
OScodeoffset: 00010000
OScodesize: 00002496
 
fx-9860G (2005.0623.1652)
HardwareIdentifier: Gy363000
ProcessorIdentifier: RENESAS SH733701
PreprogrammedROMcapacity: 00000000
FlashROMcapacity: 00004096
RAMcapacity: 00000128
PreprogrammedROMversion:
Bootcodeversion: 00.10.0010
Bootcodeoffset: 00000000
Bootcodesize: 00000064
OScodeversion: 01.01.0000
OScodeoffset: 00010000
OScodesize: 00002496
 
fx-9860G (2007.1122.1619)
HardwareIdentifier: Gy363000
ProcessorIdentifier: RENESAS SH733701
PreprogrammedROMcapacity: 00000000
FlashROMcapacity: 00004096
RAMcapacity: 00000128
PreprogrammedROMversion:
Bootcodeversion: 00.10.0010
Bootcodeoffset: 00000000
Bootcodesize: 00000064
OScodeversion: 01.01.0000
OScodeoffset: 00010000
OScodesize: 00002496
You will notice, that the SH-4 calculators still report a ProcessorIdentifier RENESAS SH735501. This is no typo. They did not bother to change it to SH7305.
I'll be back!

PreviousNext

Return to Calculator Hacking/Modding Discussions

Who is online

Users browsing this forum: No registered users and 35 guests