As we were discussing on IRC last night, I'm working on a tool to pack compiler output into a straight g3a file, in combination with a linker script. I seem to have a very basic thing that works, but the code is hideous and doesn't handle anything but very basic options yet.
I'll probably look at writing a linker script a bit later tonight, and I'll post updates when there's something useful to use.
You are awesome! Please keep us posted; for the sake of my sanity I've basically given up on a div_64_32() routine using the Casio compiling with its lack of long long / int64_t support with the hope that the GCC chain will make my life easier.
We have libgcc so we should be able to pull that off. And if that isn't enough we can look at using newlib for the rest of the missing stdlib functions and similar.
TheStorm wrote:
We have libgcc so we should be able to pull that off. And if that isn't enough we can look at using newlib for the rest of the missing stdlib functions and similar.
libgcc is good enough, and it will know what a 64-bit type is. My fixed-point library can handle the rest of the math stuff that we're missing, especially floating point things, although it suddenly occurs to me that I bet the Prizm team has a fixed-point library somewhere in the device.
Well from what Fishbot has said there are over 4000 syscalls, though I find that rather hard to believe.
On a related note we have gcc spiting out g3a's! \m/ The only remaining issue is when I built Merth's heart program the resulting binary is crashing do to some funky interrupt stuff. At least that is what I gather from what Fishbot was saying while looking at the disassembly.
Since I have no clue where to really attack this part I have uploaded the whole setup as PrizmSDK.tar.* to
http://jonimoose.net/calcstuff/prizm/ that should have all the info you need to get started.
I also am working on cleaning up the libfxcg source files to the libfxcg.a are included with the SDK and will most likely be throwing that on github soon. Once there we can look at adding some extra tools and libraries such as graphics and math related functions but for right now I want to keep it syscalls only as to not clutter up the source tree.
Oh and in a related note, if it turns out the Prizm is missing a large chunk of the standard C lib I can start to look at porting newlib as from what I have seen it is fairly easy to do, though it isn't as small as say ulibc and similar.
I understood Fishbot to be saying that when interrupts trigger (for example, when the GetKey() syscall turns them on) that the program had an invalid interrupt table which caused funkiness to happen. I could be entirely wrong, though.
Edit: And of course, stupendous job on this! And amazing dedication staying up that late working on it.
I've dealt with interrupt routine a little on the RX with GCC too, so I can try to have a look at what's required to make it do so.
Jonimus reports that the issues we were having with mkg3a had to do with MinGW not defining LITTLE_ENDIAN as I might have expected (my cygwin setup does), so I'll be working on configuring it with Cmake for bonus portability, then hacking in icon support.
That's great, can't wait to feature this on the front page.
I think this will be ready today...? Other than the interrupt issue, I should be able to test Obliterate with this today.
This sounds really cool. I was just starting to use bitmaps in C, C+ the last time I programmed in another langauge other than Basic, but I found the commands fairly easy to use. Just how hard is it to make a program on a Prizm in C for someone at my level of experience in C. Is this fairly simple to do or would I have to start hacking things on the Calc to make a program? (Is this a standard feature on the Prizm that can be used?)
basicman wrote:
(Is this a standard feature on the Prizm that can be used?)
What do you mean by it being a standard feature? All Prizms can run any valid program without installing any hacks, but program development isn't supported by Casio at all.
JosJuice wrote:
basicman wrote:
(Is this a standard feature on the Prizm that can be used?)
What do you mean by it being a standard feature? All Prizms can run any valid program without installing any hacks, but program development isn't supported by Casio at all.
That answers the quesion. Thanks. I did not know that the Prizm environment could run any valid program. I need one. I may never see another TI?
It's really easy to get started, and everything I've released so far has been open-source, so you're welcome to look at those for an idea of how it all fits together.
You should definitely consider a Prizm! As JosJuice said, installing add-ins written by the community on the Prizm requires no hacking, cracking, jailbreaking, etc; you simply plug in your calculator as a mass storage device and copy over the .g3a program. No exploits, no transfer software to install, no ridiculous company hatred of the community (yet, at least).
BASIC programs aren't super-duper fast, but my C programs can display full-screen, full-color frames of 384x216 pixels (that's 82,944 pixels per frame times two bytes = 165,888 bytes per frame if you're counting) at 22 frames per second, or 3.65MBps (29Mbps) to the screen every second. That doesn't seem to slow to me.
And the Prizm processor is actually faster than the Nspire CX's processor, although in the OS it's underclocked to save battery life. The color graphics are very, very, VERY far from limited on the Prizm; they're more or less as good as the colors on your computer LCD, at least to the degree that your eyes can tell.
I really need help getting that Casio SDK. Fishbot's thing didn't work on his website, it just gave me a dowloads.php file that was 0 bytes large, and when I tried again it said "file already in downloads" or something like that.
Though, if GCC is somewhat working, I'd rather go with that.
Help?
EDIT: and yes, I bought a prizm just an hour ago
I'd wait for Qwerty / Fishbot to return and answer your question; hopefully he'll fix it for you. The GCC toolchain solution doesn't yet completely work well enough.
I set it all up the way I was supposed to, but when I hit 'Save' as directed in step 3 of how to build your own programs, it said I'm apparently missing a file called 'filebios.h'
Ashbad wrote:
I set it all up the way I was supposed to, but when I hit 'Save' as directed in step 3 of how to build your own programs, it said I'm apparently missing a file called 'filebios.h'
What project are you trying to build, out of curiosity?
insight -- do I need to download the headers for that somewhere else?
Also, just wondering, can someone explain in detail the process of setting up your own project and how each of the files work?