Site hosted by Angelfire.com: Build your free website today!
 

 

1. Using list files
2. Ran# test
3. Other pages
4. Hacking
5. Text commands

 

1. Using list files

List files are one type of calculators memories. Saving numbers to this memory is safer than saving them to different variables, becourse many programs use the same variables, but list files are not so used.
Before you start using list files in your game, you have to select a location that no other game uses. Casio CFX-9850G/CFX-9950G has 6 list files, and each file includes 6 lists, and each list has almost infinitive number of lines. It means, you can save numbers to the list files as many as you want.

Here is a small example of using list files in programs:

Command Explanation
File 2 //selects the list file 2
If P>List 3[2] //if variable P larger than line 2 of list 3
Then P->List 3[2] //then change the line 2 of list 3 to same as the variable P
IfEnd //end of commands under If
File1 //returns to the list file 1 (default)

This code can be used when making a highscore table. If variable P is your points, the program checks that if it is larger than the highscore (List 3[2]), it will change the highscore to same as your points are.

One very important thing when using list files is if you use other files than file 1, you always have to return to file 1 at the end of the program, becourse if another program uses list files, it always thinks that the list file selected is file 1 (which is default).

Another thing is, that if you want to use a list in your game, you'll have to give those lines you'll be using a value. If you try to save data to line that doesn't exist (which is not initialized), it will only cause an error.

 

2. Ran# test

Command Ran# creates randomized numbers. If you don't give any number, the command creates a random number between 0 and 1. I made a simple test, that shows that Casios randomizer is not as good as it could be. I ran two test, both two times, first looping 1000 times and then 500 times. The commands I used were Int 2Ran# and 2Ran#. The first one prints numbers 1 or 0 (not anything from between) and another one prints out any number between 0 and 2.

The code I used was this:


In the other test I changed Int 2Ran# with 2Ran#.

This is what the variables mean:

B = random number
A = all the random numbers
C = show how many times the program has been looped
D = A devided with C (average)

Results:

Command Looptime (about) Average Average should be
Int 2Ran# 1000 0.4864130435 0.5
Int 2Ran# 500 0.4961879256 0.5
2Ran# 1000 0.971978854 1.0
2Ran# 500 0.9856555298 1.0

These results show that at least with these numbers Casios randomizer generates a little bit too low numbers. This also shows that the average goes lower when you take more numbers.

 

3. Other pages

I have listed few links to pages that include programming tips etc. Some of these pages can be also found from links section. If you know another site including programming tips, just email me and I'll add it to this list.

Casio Corner: Programming
Includes pixel test. Check it out!

Jaakko Heinonen's Casio Page: Casio Help
Complete where are the keys table in PDF-format.

Casio Graphical Calculator Encyclopaedia
Encyclopaedic guide to the Casio graphical calculators.

Charlie's Graphics Calculator Site - CFX v THE REST
A great speed test between different calcultator models.

 

4. Hacking

Here are few good links for those, who believe that they are advanced coders. Please report me if one of these links is broken. If you know another good Casio hacking site, just email me. I take no responsibility for the contents of these sites.

Casio Calculator Hacking
A popular page from the creator of CaS.

Casio Hacking Page
Great page! Includes some hacking tips and good Casio-emulator.

 

5. Text commands

Casio calculators (CFX-9850G compatibles) have three different text commands which are all meant to be used in very different situations. This simple guide includes instructions how to use them, info about each command and a little speed test (coming soon).

Info table

Here is a table that shows some info about different text commands.

Few explanations:

Mode Command uses text mode (run) of graphical mode (graph).
Colour Shows if command can be used to print coloured text.

Command Mode Colour Estimated speed Short explanation
" " Low Prints text to the next available line at the text screen.
Locate High Locates text anywhere wanted at the text screen.
Text Quite high Locates text to graphical screen using pixel coordinates.

How to use them

"CASIO"
This prints the text CASIOS to next available in blue color line like you were writing it.

Orange "CASIO"
This prints the text CASIOS to next available line on orange. You can also replace Orange with Green.

Locate X,Y,"CASIO"
This locates text CASIO to coordinates X,Y. X should be between 1 and 21 and Y should be between 1 and 7. You can't use Locate with colour commands exept with the next trick:

Orange " "
Locate X,1,"CASIO"

This draws orange space to first line and then when you locate text CASIO to that same line it'll be orange too! But this trick is a little slow and it can't be used to locate multiple words with different colours to the same line.

Text Y,X,"CASIO"
This locates text CASIO to graphics screen to coordinates Y,X. X should be between 1 and 127 and Y should be between 1 and 63. Coordinate 1,1 is placed at the left top of the screen. Notice that with this command Y goes first.

Orange Text Y,X,"CASIO"
You can also use Text with colour commands by placing Orange or Green as exampled.

I will add more info to this text commands guide sometime later, but I think this is the most important stuff...

 

 

OS 98