Register

Casio Basic to SDK

Discuss issues related to the fx-9860G Software Development Kit
Senior Member
User avatar
Posts: 66
Joined: Sun Apr 15, 2012 4:00 pm
Calculators: Casio fx-9860G

Postby aapman55 » Fri Jun 01, 2012 9:15 pm

is the part with the syscall correct? cause i dont really understand that part

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

Postby SimonLothar » Fri Jun 01, 2012 9:48 pm

aapman55 wrote:is the part with the syscall correct? cause i dont really understand that part

That's one of my oldies. Nowadays I'd rather use this

Code: Select all
// instant syscalls (fx-9860)
#define SCA 0xD201D002
#define SCB 0x422B0009
#define SCE 0x80010070
typedef int(*sc_iv)(void);

const unsigned int iGetVRAMPtr[] = { SCA, SCB, SCE, 0x0135 };
//
int GetVRAMPtr( void ){
    return (*(sc_iv)iGetVRAMPtr)();
}


Syscalls are compiled C-functions inside of the OS. You need the interface only.
Advantages:
it is not necessary to write the code yourself; the code does not load your G1A-size; the code is well checked.

SCA, SCB, SCE represent the MPU-instructions to call a syscall on a fx-9860.
You can find further explanations here
http://www.casiopeia.net/forum/viewtopic.php?f=20&t=1376
I'll be back!

Senior Member
User avatar
Posts: 66
Joined: Sun Apr 15, 2012 4:00 pm
Calculators: Casio fx-9860G

Postby aapman55 » Sat Jun 02, 2012 9:11 am

woohooo, simon you are the best! It is working now :D

Senior Member
User avatar
Posts: 66
Joined: Sun Apr 15, 2012 4:00 pm
Calculators: Casio fx-9860G

Postby aapman55 » Wed Jun 06, 2012 6:11 pm

i want to clear an area of the DD. My syntax is

Code: Select all
Bdisp_AreaClr_DD(0,0,50,50);


but it doesnt seem to be right.
Bdisp_AreaReverseVRAM(0,0,50,50); does work.
so the parameters inside are wrong?

Senior Member
Posts: 369
Joined: Tue Jan 03, 2012 11:24 pm
Calculators: Casio Afx 1.0, Casio fx-9860 GII SD, Casio Classpad 330, Casio fx-CG 20, Casio Classpad fx-cp400

Postby helder7 » Wed Jun 06, 2012 6:56 pm

Try this code:

Code: Select all
DISPBOX clear_area;

clear_area.left = 0;
clear_area.top = 0;
clear_area.right = 50;
clear_area.bottom = 50;

Bdisp_AreaClr_DD(&clear_area);
SiO2 + CaCO3 ----------> CaSiO3 + CO2

Junior Member
User avatar
Posts: 11
Joined: Sun Jun 03, 2012 12:27 am
Location: Lyon, FRANCE
Calculators: Casio fx-9750 G II, Casio Classpad 330 plus

Postby Dark Storm » Wed Jun 06, 2012 7:09 pm

I had the same error, but comment this lines, compile, and decomment. Next, compile, this error will quit

Sorry for my bad English...

Senior Member
User avatar
Posts: 66
Joined: Sun Apr 15, 2012 4:00 pm
Calculators: Casio fx-9860G

Postby aapman55 » Wed Jun 06, 2012 7:34 pm

ok the dispbox works, but on the left side there is something strange.
this is the code i use

Code: Select all
int AddIn_main(int isAppli, unsigned short OptionNum)
{
    unsigned int key;
DISPBOX clear_area;
Bdisp_AllClr_DDVRAM();
Bdisp_AreaReverseVRAM(0,0,127,63);
clear_area.left = 0;
clear_area.top = 0;
clear_area.right = 127;
clear_area.bottom = 63;

Bdisp_PutDispArea_DD(&clear_area);

    while(1){
    }

    return 1;
}


as getkey puts the whole screen i left it out.

here is the pic of what the result is
[ATTACH=CONFIG]49[/ATTACH]

so what might be the problem?
Attachments
fx.jpg
fx.jpg (0 Bytes) Viewed 18373 times

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

Postby SimonLothar » Thu Jun 07, 2012 12:11 pm

I used the original SDK and my mini-SDK and observed exactly the same erroneous result in both environments.

Looks like there is some bug in Bdisp_PutDispArea_DD().
I'd rather avoid this function for the time being.

So relax. Seems to be not your fault.

If you want to clear an area you could use Bdisp_AreaClr_DD() as well.
If you want to draw a certain bitmap you could use Bdisp_WriteGraph_DD().
I'll be back!

Member
User avatar
Posts: 33
Joined: Sat Apr 07, 2012 10:08 am
Location: France

Postby Purobaz » Fri Jun 08, 2012 12:35 pm

As I said before, you should really use MonochromeLib by Pierrotll, which provides lots of useful graphics functions.

Senior Member
User avatar
Posts: 66
Joined: Sun Apr 15, 2012 4:00 pm
Calculators: Casio fx-9860G

Postby aapman55 » Thu Jul 05, 2012 8:40 pm

is there a plot function in the sdk or do i have to write an own one?

PreviousNext

Return to Casio fx-9860 SDK

Who is online

Users browsing this forum: No registered users and 5 guests