Casio Basic to SDK
- aapman55
- Senior Member
-
- Posts: 66
- Joined: Sun Apr 15, 2012 4:00 pm
- Calculators: Casio fx-9860G
thanks simon, my program has been finished. Still some tweaking needs to be done.
I still have some questions. The random number generator isnt as random as i hoped. Every time i start the add in the first game (maybe also other games but i especiaklly remember the first one) the pattern is the same.
I tried changing the icon with paint.NET, setting the colors to black and white but it still keeps saying it isnt. which program do you recommend to do the icons?
I still have some questions. The random number generator isnt as random as i hoped. Every time i start the add in the first game (maybe also other games but i especiaklly remember the first one) the pattern is the same.
I tried changing the icon with paint.NET, setting the colors to black and white but it still keeps saying it isnt. which program do you recommend to do the icons?
- 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
Name collision with the SDK-library! I shouldn't have used rand() as name for my random-function.aapman55 wrote:The random number generator isnt as random as i hoped. Every time i start the add in the first game (maybe also other games but i especiaklly remember the first one) the pattern is the same.
Either rename my function to xrand(), f.i..
or
remove my random function and
use the SDK-library function srand( RTC_GetTicks() ) to initialize the SDK-librarY's random generator
and the SDK-library function rand() to get the random-numbers.
I use Paint. 30x19, b/w. The SDK only binds the inner 17 rows.aapman55 wrote:I tried changing the icon with paint.NET, setting the colors to black and white but it still keeps saying it isnt. which program do you recommend to do the icons?
I'll be back!
- aapman55
- Senior Member
-
- Posts: 66
- Joined: Sun Apr 15, 2012 4:00 pm
- Calculators: Casio fx-9860G
Here is the result.
[ATTACH]48[/ATTACH]
if i want to put your syscalls in a seperate file. it needs to be a .h file right? and can i just do it in notepad?
[ATTACH]48[/ATTACH]
if i want to put your syscalls in a seperate file. it needs to be a .h file right? and can i just do it in notepad?
- Attachments
-
Fusebomb.zip
- (0 Bytes) Downloaded 858 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
aapman55 wrote:if i want to put your syscalls in a seperate file. it needs to be a .h file right??
Yes, but do not forget to enclose the code in the following defines to prevent multiple inclusion
#ifndef __<filename>_H__
#define __<filename>_H__
...
#endif
And you must know, that every sourcefile, where you include this syscall-header-file produces the same code again.
Yes, use a simple editor without formatting. I prefer notepad++.aapman55 wrote:and can i just do it in notepad?
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
aapman55 wrote:I want to put a highscore in it. This will require writing some numbers in a file. How can i best do it?
If the amount of data is small, you should best use the main memory.
Look for the SDK's Bfile-functions.
Bfile_CreateMainMemory;
Bfile_OpenMainMemory;
Bfile_ReadFile
Bfile_WriteFile
Bffile_CloseFile
I'll be back!
- aapman55
- Senior Member
-
- Posts: 66
- Joined: Sun Apr 15, 2012 4:00 pm
- Calculators: Casio fx-9860G
hmm. will look into that later when i have some more experience with programming.
Another question: i installed kucalcs revolution fx. I included the revolution.h file and used the cooltext function. it works in the casio sdk, but when i put it on my calc it doesnt appear.
Anyone has experience with revolution fx?
Another question: i installed kucalcs revolution fx. I included the revolution.h file and used the cooltext function. it works in the casio sdk, but when i put it on my calc it doesnt appear.
Anyone has experience with revolution fx?
- 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
It's the old VRAM-address problem:
http://www.casio-scene.com/showthread.php?965-Revolution-FX-problem
http://www.casio-scene.com/showthread.php?1321-prob-learning-syscall-0x135
http://www.casio-scene.com/showthread.php?965-Revolution-FX-problem
http://www.casio-scene.com/showthread.php?1321-prob-learning-syscall-0x135
I'll be back!
- aapman55
- Senior Member
-
- Posts: 66
- Joined: Sun Apr 15, 2012 4:00 pm
- Calculators: Casio fx-9860G
So the idea is, cooltext writes in the buffer SDK_VRAM that is referring to the old VRAM adress. So using memcpy to copy the buffer SDK_VRAM to the new VRAM address which is defined in the beginning of the program and then subsequently using the other SDK functions like Bdisp_DrawLine_VRAM() the build the screen further. and finally using Bdisp_PutDisp_DD() to get the total screen? Am I right?
what i tried is:
in the begin of the program
and then in the body
but it didnt work.
I also tried some other codes but they give some more error messages.
what i tried is:
in the begin of the program
- Code: Select all
unsigned char vram_address[1024];
vram_address = syscall(0,0,0,0,0x135);
and then in the body
- Code: Select all
CoolText(27, 8, FONT_SEVEN, "Fusebombs", SDK_VRAM);
memcpy(SDK_VRAM, vram_address, 1024);
Bdisp_PutDisp_DD();
but it didnt work.
I also tried some other codes but they give some more error messages.
- 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:
- Code: Select all
CoolText(27, 8, FONT_SEVEN, "Fusebombs", SDK_VRAM);
memcpy(SDK_VRAM, vram_address, 1024);
Bdisp_PutDisp_DD();
if SDK_VRAM is some RAM where CoolText writes to, then I would expect this
- Code: Select all
memcpy(SDK_VRAM, vram_address, 1024);
CoolText(27, 8, FONT_SEVEN, "Fusebombs", SDK_VRAM);
memcpy(vram_address, SDK_VRAM, 1024);
Bdisp_PutDisp_DD();
I'll be back!
Who is online
Users browsing this forum: No registered users and 21 guests