Casio Basic to SDK
- 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
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!
- aapman55
- Senior Member
-
- Posts: 66
- Joined: Sun Apr 15, 2012 4:00 pm
- Calculators: Casio fx-9860G
i want to clear an area of the DD. My syntax is
but it doesnt seem to be right.
Bdisp_AreaReverseVRAM(0,0,50,50); does work.
so the parameters inside are wrong?
- 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?
- helder7
- Senior Member
- Posts: 369
- Joined: Tue Jan 03, 2012 11:24 pm
- Calculators: Casio Afx 1.0, Casio fx-9860GII SD, Casio Classpad 330, Casio fx-CG20, Casio Classpad fx-CP400
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
- Dark Storm
- Junior Member
-
- Posts: 11
- Joined: Sun Jun 03, 2012 12:27 am
- Location: Lyon, FRANCE
- Calculators: Casio fx-9750GII, Casio Classpad 330 plus
I had the same error, but comment this lines, compile, and decomment. Next, compile, this error will quit
Sorry for my bad English...
Sorry for my bad English...
- aapman55
- Senior Member
-
- Posts: 66
- Joined: Sun Apr 15, 2012 4:00 pm
- Calculators: Casio fx-9860G
ok the dispbox works, but on the left side there is something strange.
this is the code i use
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?
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 (0 Bytes) Viewed 25788 times
- 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
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().
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!
As I said before, you should really use MonochromeLib by Pierrotll, which provides lots of useful graphics functions.
Who is online
Users browsing this forum: No registered users and 18 guests