[SOLVED] How to make own G1A run in SDK?
12 posts
• Page 1 of 2 • 1, 2
- RunasSudo
- Junior Member
- Posts: 7
- Joined: Sat Sep 07, 2013 1:51 am
- Location: The Land Down Under
- Calculators: Casio fx-9860G AU PLUS
[SOLVED] How to make own G1A run in SDK?
Background Information:
I am running Ubuntu Linux 12.04.2 amd64, running the Casio fx-9860G SDK under WINE/PlayOnLinux. I am compiling my programs using the method described on the UsingGCC page on the fxSDK wiki (I compiled my own sh3eb-elf-gcc).
I have written my own program to create G1A files based on the documentation in fxReverse2x.pdf in fx_calculators_SuperH_based_18.zip, the reason being that g1awrapper produced G1A files that were completely screwed up that the SDK emulator refused to load.
Here is the G1A file produced by int main(){return 1;}.
I am loading the G1A files into the emulator by copying my G1A files (actually symlinking, but same thing) into the SDCard directory of a random project, then loading it onto the storage memory through the MEMORY application. The application shows correctly on the menu screen, icon and all.
Problem:
The problem I am having is that when attempting to open the application, I get the ‘This Application is not available on the emulator.’ message. Other programs that I load on, such as Insight, do not show this error and open correctly.
What is the cause of this error, and how can I get my G1As to load correctly in the SDK emulator?
I am running Ubuntu Linux 12.04.2 amd64, running the Casio fx-9860G SDK under WINE/PlayOnLinux. I am compiling my programs using the method described on the UsingGCC page on the fxSDK wiki (I compiled my own sh3eb-elf-gcc).
I have written my own program to create G1A files based on the documentation in fxReverse2x.pdf in fx_calculators_SuperH_based_18.zip, the reason being that g1awrapper produced G1A files that were completely screwed up that the SDK emulator refused to load.
Here is the G1A file produced by int main(){return 1;}.
I am loading the G1A files into the emulator by copying my G1A files (actually symlinking, but same thing) into the SDCard directory of a random project, then loading it onto the storage memory through the MEMORY application. The application shows correctly on the menu screen, icon and all.
Problem:
The problem I am having is that when attempting to open the application, I get the ‘This Application is not available on the emulator.’ message. Other programs that I load on, such as Insight, do not show this error and open correctly.
What is the cause of this error, and how can I get my G1As to load correctly in the SDK emulator?
Last edited by RunasSudo on Mon Sep 09, 2013 8:26 am, edited 2 times in total.
- SimonLothar
- Senior Member
- 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: How to make own G1A run in SDK?
I could reproduce this behaviour. Very interesting.RunasSudo wrote:The problem I am having is that when attempting to open the application, I get the ‘This Application is not available on the emulator.’ message. Other programs that I load on, such as Insight, do not show this error and open correctly.
Travel light. Let's hunt some bug...RunasSudo wrote:What is the cause of this error, and how can I get my G1As to load correctly in the SDK emulator?
I'll be back!
- RunasSudo
- Junior Member
- Posts: 7
- Joined: Sat Sep 07, 2013 1:51 am
- Location: The Land Down Under
- Calculators: Casio fx-9860G AU PLUS
Re: How to make own G1A run in SDK?
I'm stumped. I can't see any differences in the headers of the two apart from title, filesize, etc.
EDIT: I stripped the header from INSIGHT.G1A and ran it through my G1A maker and it loads correctly. Something could be wrong with the way I'm compiling my programs, or with the programs themselves… I'm following the instructions here.
EDIT: I stripped the header from INSIGHT.G1A and ran it through my G1A maker and it loads correctly. Something could be wrong with the way I'm compiling my programs, or with the programs themselves… I'm following the instructions here.
Last edited by RunasSudo on Sun Sep 08, 2013 9:31 am, edited 1 time in total.
- SimonLothar
- Senior Member
- 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: How to make own G1A run in SDK?
Stay put. I think the problem is connected with byte 0x16 and 0x17 of the header. Some control bytes, which seem to be heeded for with the emulator, but not on the calculator. The moment I change either of these bytes, the "Application is not available on the emulator"-thing appears.
I'll be back!
- RunasSudo
- Junior Member
- Posts: 7
- Joined: Sat Sep 07, 2013 1:51 am
- Location: The Land Down Under
- Calculators: Casio fx-9860G AU PLUS
Re: How to make own G1A run in SDK?
SimonLothar wrote:Stay put. I think the problem is connected with byte 0x16 and 0x17 of the header. Some control bytes, which seem to be heeded for with the emulator, but not on the calculator. The moment I change either of these bytes, the "Application is not available on the emulator"-thing appears.
I noticed when I was writing my program that those two bytes were different for some programs. I just decided to use the one from Insight; perhaps that's why my g1a generator works for Insight, but not for anything else?
EDIT: I just checked, the G1A files generated by the SDK have these two bits set, with different values than Insight. It could be a hash/checksum of some sort… Anyone here a cryptography expert?
- SimonLothar
- Senior Member
- 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: How to make own G1A run in SDK?
They tried to be smart. Alas, in vain...
The word at 0x16 is the inverted word sum of 8 words starting at 0x300.
This would be 0xD7A5 for your NULL.G1A.
BTW: with the fxCG (G3A) it is the inverted word sum of 8 words starting at 0x7100.
The word at 0x16 is the inverted word sum of 8 words starting at 0x300.
This would be 0xD7A5 for your NULL.G1A.
BTW: with the fxCG (G3A) it is the inverted word sum of 8 words starting at 0x7100.
I'll be back!
- gbl08ma
- Senior Member
- Posts: 141
- Joined: Wed May 16, 2012 2:50 pm
- Location: Portugal
- Calculators: Casio fx-CG20
Re: How to make own G1A run in SDK?
The checksums on the add-in headers are actually very useful to check that an add-in did not get corrupt in the transfer. That way we avoid problems because of broken files, they simply won't run. The trick is knowing how to calculate the checksum
- RunasSudo
- Junior Member
- Posts: 7
- Joined: Sat Sep 07, 2013 1:51 am
- Location: The Land Down Under
- Calculators: Casio fx-9860G AU PLUS
Re: How to make own G1A run in SDK?
Whoo (number 1)!
It worked! Another detail to add to fx_calculators_SuperH_based.chm?
Whoo (number 2)!
My program didn't crash! I have successfully created a ‘miniSDK’ for the fx-9860G! Tappity tap, time to write instructions…
Un-Whoo…
xfer9860 is not working. Dammit. New thread-y time.
It worked! Another detail to add to fx_calculators_SuperH_based.chm?
Whoo (number 2)!
My program didn't crash! I have successfully created a ‘miniSDK’ for the fx-9860G! Tappity tap, time to write instructions…
Un-Whoo…
xfer9860 is not working. Dammit. New thread-y time.
Last edited by RunasSudo on Mon Sep 09, 2013 8:26 am, edited 1 time in total.
- SimonLothar
- Senior Member
- 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: How to make own G1A run in SDK?
You bet!RunasSudo wrote:Another detail to add to fx_calculators_SuperH_based.chm?
I'll be back!
Re: [SOLVED] How to make own G1A run in SDK?
I don't know whether it's interesting for you, but the "locked" applications in the emulator can be started with system calls.
12 posts
• Page 1 of 2 • 1, 2
Who is online
Users browsing this forum: No registered users and 1 guest