PLEASE NOTE: This guide is now outdated. Please instead follow this guide from WikiPrizm:
http://prizm.cemetech.net/index.php?title=PrizmSDK_Setup_Guide

---------------------
So, you've seen how easy it is to write fast, powerful, graphically-intense programs and games on the Casio Prizm in C, and now you want to write your own. Good for you! Unfortunately, the information on how to do so is scattered and disorganized, so it took me quite a while to realize that all the tools to do so were already available. I hope to save future Prizm coders my confusion, and to promote the creation of as many nifty Prizm games as possible as fast as possible, so without further ado, how to set up a Prizm C development environment

What You'll Need
:: Casio fx-9860 SDK: Note that you need to have an fx-9860 calculator to download this SDK (http://edu.casio.com/products/sdk/9860sdk.html)
:: Casio Prizm Mini-SDK: Download here
:: A Casio Prizm (fx-cg10 or fx-cg20) graphing calculator
:: A computer running Windows or Wine

Qwerty.55 wrote:
The SDK is now available for download here. Please note that you must provide a Prizm Serial ID number in order to download it.


Setting Up the SDK
1. First, you'll need to install the Casio fx-9860 SDK. It will run through a normal Windows installation, including creating a C:\Program Files\CASIO folder (on 32-bit machines) or a C:\Program Files (x86)\CASIO folder (on 64-bit machines).
2. Next, you will need to install the miniSDK by copying the contents of its zip to a folder. In my experience, the path to the miniSDK must have no spaces. Therefore, I ended up creating a C:\CASIO folder and unpacking the miniSDK into that folder. I also don't recommend any folder that requires administrative permissions to write to, as that will require you to compile your programs as an administrator. Once you have unpacked the miniSDK zip file, you will need to copy some folders and files from the Casio SDK into the miniSDK.
3. Copy everything from inside the fx-9860 SDK \OS\SH\BIN\ directory into the C:\CASIO\BIN directory (or whatever the BIN directory of your miniSDK is)
4. In the OS\FX\lib directory of the Casio SDK, find fx9860G_library.lib, and copy this to the miniSDK's \BIN\ directory.
5. Find the \tools\pCGSDK.exe executable in the miniSDK and run it to create and build projects.

How to Open and Build Projects
All projects are stored in the \projects\ folder of the miniSDK. For instance, try opening INSIGHT.INI from the \projects\ folder:
1. Start pCGSDK.exe
2. Choose File->Open project, and open INSIGHT.INI
3. Go to File->Full Setup, then click Save in the window that opens
4. Return to the main pCGSDK window, and press F9 (or click File->Build Project)

If anything goes wrong, you will see errors in the miniSDK's output window. If all goes well, you'll see something like this at the end:

Code:
Start! MAKEG3A.PSC
113 lines processed.
Ready! MAKEG3A.PSC 00:00:00.005
Ready


How to Create New Projects
You're probably already excited to write some programs of your own; great! The easiest thing to do is clone an existing project. Follow steps 1-3 (inclusive!) above on the DEFAULT.INI project, then go to File->Save Project As. Choose your new project's name, and it will be created in the \projects\ directory. You can then open \projects\MyPROJ\MYPROJ.CPP and edit to your heart's content!

Resources
:: Need sprites for your game? Create them as .bmp or .png images, then use SourceCoder 2.5 to generate Prizm-compatible 16-bit-color data that you can embed in your program.
:: Routines: We have a rapidly-growing thread of Useful Prizm Routines for your perusal, mostly involving graphics at this point, but expanding into other areas as well.
:: Dev Tools: You can find some helpful tools or post your own in this thread.
:: Downloads: You can download existing Prizm games and tools from the Prizm folder in the Cemetech archives
:: Uploads: You are strongly encouraged to upload your creations as well!
:: Wiki: There is also a wiki set up with useful Prizm information.
If you want to use Visual Studio, you can use this tool to create a new project for both visual studio and the pCGSDK program. Once we have the ability to use make files, you'll be able to do it all in Visual Studio.
This information, all of it, looks really useful. Thanks, if I ever get a PRIZM, this may turn out useful.
I'm sure you'd be able to somehow plug the g3a creator into Visual Studio, Shaun. Smile Scout, thanks! Everyone, I should also mention that Jonimus and a few others are investigating a gcc-based toolchain, which would remove the fx9860 SDK requirement.
Uhm...

How are we supposed to even follow this if we can't even get the 9860 SDK?
Raylin, it might be available elsewhere.
KermMartian wrote:
I'm sure you'd be able to somehow plug the g3a creator into Visual Studio, Shaun. Smile Scout, thanks! Everyone, I should also mention that Jonimus and a few others are investigating a gcc-based toolchain, which would remove the fx9860 SDK requirement.
Probably, but that seems more temporary, and I'd rather spend my time coding than figuring that out. Once there's a make file, that'll be more permanent.
Shaun, that's fair enough, although I think I'm missing why that would be more temporary. Smile
Kerm, getting a GCC setup going would make the fx-9860 SDK unneeded. I am making progress on the libs, though we still need a g3a wrapper program.
TheStorm wrote:
Kerm, getting a GCC setup going would make the fx-9860 SDK unneeded. I am making progress on the libs, though we still need a g3a wrapper program.
Exactly, that's what I was saying. Smile
KermMartian wrote:
Everyone, I should also mention that Jonimus and a few others are investigating a gcc-based toolchain, which would remove the fx9860 SDK requirement.
Screw GCC, investigate an LLVM-based toolchain (produces faster code than GCC, actually - we are seeing 10-30% faster code just by switching to LLVM from GCC)
Kllrnohj, I actually looked into it but I couldn't find the documentation on how to build a quick and dirty sh3 cross compiler with it, if it even supports sh3. I did some searching but I couldn't find that info so I went with GCC because I know it works and there are already docs for compiling programs for the older Casio calcs with GCC.
As long as your LLVM toolchain was built with the support, I don't think you don't need a cross-compiler at all, provided your build of llc supports the desired architecture.
Using the binaries distributed from the Arch repositories, for example, you could compile for MSP430:

Code:
clang -S -emit-llvm -o foo.ir foo.c
llc -arch msp430 -o foo.s foo.ir

That gets you target-native assembly in foo.s; a list of supported architectures can be found in the output from llc --version.
I'm having difficulty with (long long int) and (int64_t). Anyone have any ideas on this?
Good to know Tari, I will keep that in mind.
The SDK is now available for download here. Please note that you must provide a Prizm Serial ID number in order to download it.
Just for others reading this topic, as far as I could tell llc, the llvm ir compiler does not support sh targets.

EDIT: On a related note I now have a good system for linking against the Prism syscalls with GCC, now we are just missing the g3awrapper program to include bitmaps and set everything up.

For those wondering http://sourceforge.net/apps/trac/fxsdk/wiki/UsingGCC this is where I am getting the info for how to compile the programs using the crt0.s and addin.ld from this post http://ourl.ca/9205/174367 though until we have a g3awrapper I have no clue if its gonna work.
Thanks for that, Jonimus. Qwerty, I have updated the first post of this topic with that link. Regarding my 64-bit math problems, I am writing a 32-bit fixed-point math library that will hopefully solve these problems.
I now have a gcc linkable syscall library for the prizm, I will be uploading a zip of the source soon. I renamed and reorganized some of the header files as the the ones used in the miniSDK weren't all that intuitive and I'll take suggestions on better organization since it is dearly needed.

We can also start looking at adding our own libraries and helper fuctions. I know the miniSDK already has some stuff but we'll want to add more of our own.

Without further ado http://jonimoose.net/calcstuff/prizm/libfxcg.zip
I've been writing tons and tons of them, mostly in two main areas of graphics and math thus far. Once I get the rest of my floating point math library working, I'll upload it to the useful routines topic. Great job on the linkable syscall library! Do you know how Tari is doing on the linker?
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
» Goto page 1, 2, 3, 4, 5, 6, 7  Next
» View previous topic :: View next topic  
Page 1 of 7
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement