FX-9860 GII system error when launching G1As
8 posts
• Page 1 of 1
- wisemoth
- Junior Member
- Posts: 4
- Joined: Sun Mar 12, 2017 12:19 am
- Calculators: Casio fx-9860GII
FX-9860 GII system error when launching G1As
Hello
I've just got a new fx-9860 GII, running OS 02.09.0201. I've got a few G1As that are running OK in the emulator (eg Gravity Duck, and Periodic Table) but fail to start when I've sent them over FA-124. Each appears with their correct icon in the menu, but when I launch them I get "System ERROR". I've also got FTune, and that actually works fine on the calculator.
I'm I doing something wrong?
Thanks for any advice!
I've just got a new fx-9860 GII, running OS 02.09.0201. I've got a few G1As that are running OK in the emulator (eg Gravity Duck, and Periodic Table) but fail to start when I've sent them over FA-124. Each appears with their correct icon in the menu, but when I launch them I get "System ERROR". I've also got FTune, and that actually works fine on the calculator.
I'm I doing something wrong?
Thanks for any advice!
- wisemoth
- Junior Member
- Posts: 4
- Joined: Sun Mar 12, 2017 12:19 am
- Calculators: Casio fx-9860GII
Re: FX-9860 GII system error when launching G1As
I should say my current guess is that it relates to the GII being an SH4 processor and the failing apps may have been coded for the original G/SH3 ?
I'd also rebuilt locally the Gravity Duck from source, which still fails. I suppose the new OS requires source changes rather than just a binary rebuild (changed syscalls ?) ?
I'd also rebuilt locally the Gravity Duck from source, which still fails. I suppose the new OS requires source changes rather than just a binary rebuild (changed syscalls ?) ?
- 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: FX-9860 GII system error when launching G1As
Yes. There are a few syscalls, which are no longer supported with newer OSes (f. i. MMU syscalls).
Syscall 0x42E (Bfile_GetMediaFree_OS) is sometimes the reason for problems.
Some older addins bypass syscalls. The use of absolute addresses or direct register accesses usually leads to incompatible programs someday.
You have to inspect the source to find the problem.
Modify the source to encircle the cause of the error.
In Gravity Duck I suspect
unsigned char key_down(unsigned char code)
in key.c. It uses register addresses, which are not compatible with the SH7305.
Syscall 0x42E (Bfile_GetMediaFree_OS) is sometimes the reason for problems.
Some older addins bypass syscalls. The use of absolute addresses or direct register accesses usually leads to incompatible programs someday.
You have to inspect the source to find the problem.
Modify the source to encircle the cause of the error.
In Gravity Duck I suspect
unsigned char key_down(unsigned char code)
in key.c. It uses register addresses, which are not compatible with the SH7305.
I'll be back!
- 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: FX-9860 GII system error when launching G1As
Another issue in Gravity Duck's time.c:
static int SysCallCode[] = {0xD201422B,0x60F20000,0x80010070};
must be replaced by
const int SysCallCode[] = {0xD201422B,0x60F20000,0x80010070};
It is not possible to run code out of RAM using virtual addresses with the newer machines.
Key.c and MonochromeLib.c are affected, too.
- Code: Select all
#include "time.h"
static int SysCallCode[] = {0xD201422B,0x60F20000,0x80010070};
static int (*SysCall)( int R4, int R5, int R6, int R7, int FNo ) = (void*)&SysCallCode;
int time_getTicks()
{
return (*SysCall)(0, 0, 0, 0, 0x3B);
}
static int SysCallCode[] = {0xD201422B,0x60F20000,0x80010070};
must be replaced by
const int SysCallCode[] = {0xD201422B,0x60F20000,0x80010070};
It is not possible to run code out of RAM using virtual addresses with the newer machines.
Key.c and MonochromeLib.c are affected, too.
I'll be back!
- 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: FX-9860 GII system error when launching G1As
I also replaced key_down (in key.c) with
So far Gravity Duck runs without detectable errors.
- Code: Select all
unsigned char key_down(unsigned char code)
{
short keycode;
keycode = ( ( code & 0xF0 ) << 4 ) | ( code & 0x0F );
return (*SysCall)((int)&keycode, 0, 0, 0, 0x24A);
}
So far Gravity Duck runs without detectable errors.
I'll be back!
- wisemoth
- Junior Member
- Posts: 4
- Joined: Sun Mar 12, 2017 12:19 am
- Calculators: Casio fx-9860GII
Re: FX-9860 GII system error when launching G1As
Thanks so much Simon, much appreciated! I'll give that a go.
- 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: FX-9860 GII system error when launching G1As
Alas, syscall 0x24A is no longer compatible between SH-3- and SH-4A-systems. Hence the SH-4A version would not work with SH-3 machines.
Above that syscall 024A is not able to detect more than one key hit at a time. Possibly this could be a problem with the difficult parts of the game.
So I provided for some different approach:
http://www.casiopeia.net/forum/download ... &df_id=157
G1A and changed source files are included.
Above that syscall 024A is not able to detect more than one key hit at a time. Possibly this could be a problem with the difficult parts of the game.
So I provided for some different approach:
http://www.casiopeia.net/forum/download ... &df_id=157
G1A and changed source files are included.
I'll be back!
- wisemoth
- Junior Member
- Posts: 4
- Joined: Sun Mar 12, 2017 12:19 am
- Calculators: Casio fx-9860GII
Re: FX-9860 GII system error when launching G1As
Many thanks Simon - that's most interesting.
8 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 19 guests