By popular demand, I've decided that the first game that I will attempt to make for the Casio Prizm in C will be a port of Obliterate 1.0, my scorched earth / tanks-style game for the TI-83+/84+ series. C is going to make my life so much easier in terms of math, the AI, etc. I'll still have to deal with fixed point (no FPU in a calculator??), but it's gonna be fun, I think. I upgraded SourceCoder to be able to generate sprites and images in the 16-bit Prizm image format (take note, Prizm coders!), and I've mocked up the Obliterate icon and title screen and successfully compiled it onto my Prizm. I'm afraid that the photo doesn't do it justice at all, so I also uploaded the raw titlescreen image.

This is going to be awesome, Kerm! I <3 your title screen picture.
souvik1997 wrote:
This is going to be awesome, Kerm! I <3 your title screen picture.
Thanks very much! It looks quite awesome on the LCD of the Prizm; I'm happy how it turned out. I sorta sidestepped the fact that the OS wants to draw a border on the sides and the battery icon at the top by basically freezing it; I'm going to have to figure out a getkey call that doesn't do that. I'd appreciate any feedback if you Casio hackers have encountered this issue before.
I should get a PRIZM. I forgot about C, maybe that makes the beauty thing look better.
You should probably disable the interrupts.
Qwerty.55 wrote:
You should probably disable the interrupts.
Ah yes, that would probably do the trick. What about the getkey() function; would that still work properly, if you happen to know offhand? Scout, true story. And I also need to compress that titlescreen somehow; 160KB of image data is a lot.
I love this title screen, one of the best I have ever seen on a calculator. Gonna be awesome on a 16-bit color screen.
juju2143 wrote:
I love this title screen, one of the best I have ever seen on a calculator. Gonna be awesome on a 16-bit color screen.
Thanks very much, I appreciate the complement! I hope that the game will live up to your expectations. Smile
KermMartian wrote:
Qwerty.55 wrote:
You should probably disable the interrupts.
Ah yes, that would probably do the trick. What about the getkey() function; would that still work properly, if you happen to know offhand?.


It should, as the keyboard is memory mapped. I imagine the OS just reads the relevant memory locations as soon as you call it.
I love the vertigo inducing calc photo Razz

Sounds like a fun project to get gCn to the Prizm as well!
comicIDIOT wrote:
I love the vertigo inducing calc photo Razz

Sounds like a fun project to get gCn to the Prizm as well!


Yeah i told Kerm to get the Prizm on GCN when in IRC, i am not sure if he seen me say it or not.

Great job Kerm. the more of this i see the more i want a Prizm
oh dear. I do think the nspire has been pwned in various places by the prizm

that is it, I am getting a prizm, too many good programs are being made.... this is the first program that will go on my prizm Very Happy
ComicIDIOT, that's because it's hard to take a photo of this type of LCD normally, because you can't see any colors. As it is you can barely see them. Smile Madmax, don't worry, it something I've been planning for a while. but it's a more advanced problem once I learn more about SH3/4 ASM and the link hardware in the Prizm.
Kerm, the link hardware in the processor isn't the link hardware used to connect to the link ports or the USB.
Qwerty.55 wrote:
Kerm, the link hardware in the processor isn't the link hardware used to connect to the link ports or the USB.
That's fair. I don't know anything about any of the link hardware though, so I have no preconceived notions. Qwerty, maybe you know: how can I voluntarily cede control back to the Menu? As if the user pressed Menu? Alternatively, can you help me learn how to look through GetKey() to see how it does it if you don't happen to know?
Well, my point about the link hardware not being the documented stuff means that it's undocumented Wink

Also, it's very easy to return control to the menu, although I'm not sure how conducive compiled C is to it. Basically, when the program is loaded, the OS stores the address to return to in a register called PR. To return to this, you need to push that register into PC. This is accomplished with the RTS instruction. However, using subroutines destroys PR, so you need to push it onto the stack. Here's the code to return:


Code:

STS PR,R1
MOV.L R1,@-R15

<rest of code>

MOV.L @R15+,R1
LDS R1,PR
RTS


The hex, if you'd like to insert it directly, is

Code:

012A
2F16

<rest of code>

6F16
412A
000B


I'm not sure how you would end it with C. It'd be whatever you use to end subroutines.

As for the Getkey() routine, you first have to have an OS dump. Once you have that, you have to figure out the address of the code, which is kind of complicated. Then you can look at the code in the OS and try to figure it out, which is made more difficult by the fact that it's spaghetti code.

You could do that or just recognize that the keyboard is memory mapped to specific bits between A44B0000 and A44B000A and just read those.
wow, the title screen does look impressive ^-^ it can still be worked on (spritist sayings FTW) but it does a great job atm. Smile

The tank icon works for now too -- but I think there should be some logo on it or something -- that's just my feeling Wink It does look great, but for the flavor of title screen you have, they don't taste perfect together. I would say either add a logo to it, or cartoonize it, or both before final release -- however, coding IS most important Rolling Eyes
does this mean Calcnet is coming to the Prizm?
Ashbad, if I were to show you the tank icon on the Prizm homescreen, you might change your mind; I think it looks pretty snazzy if I may say so myself. Smile Elfprince, eventually, but this is going to be a single-player AI version to start with.
I'll take your word for it Kerm Wink maybe one of these days I'll be able to see for myself.
  
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
Page 1 of 4
» 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