Omnimaga

Calculator Community => Other Calc-Related Projects and Ideas => Casio PRIZM => Topic started by: Ashbad on May 01, 2011, 02:33:54 pm

Title: Prizm Snake
Post by: Ashbad on May 01, 2011, 02:33:54 pm
Hello, world:

I am going to start my prizm development legacy by making a simple game -- snake!

This will be essentially the original snake with a few added features like beautiful graphics and many modes of play!

Since I haven't even started coding it yet (still getting used to managin prizm projects) I'll just show you my first step, which was to create a SELECTED and UNSELECTED bitmap for each mode -- for your convenience I condensed the two together in a PNG file for you guys to see:

(http://img.removedfromgame.com/imgs/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.png)
Title: Re: Prizm Snake
Post by: Spyro543 on May 01, 2011, 02:58:39 pm
This is sure to be awesome!
Title: Re: Prizm Snake
Post by: z80man on May 01, 2011, 03:29:06 pm
So is this C or asm code. Either way it will be better than the Prizm snake I made in BASIC back in January. The problem with that was that drawing commands were way too slow and difficult to use.

btw you will want to remove the text at the bottom of the menu icons because the OS automatically adds the the name of the app. Or you could just wait for me to finish my asm shell, but that could take anywhere from 2 weeks to 1 month to finish :P
Title: Re: Prizm Snake
Post by: Stefan Bauwens on May 01, 2011, 03:40:54 pm
Good luck Ashbad!
Title: Re: Prizm Snake
Post by: Ashbad on May 01, 2011, 03:54:08 pm
So is this C or asm code. Either way it will be better than the Prizm snake I made in BASIC back in January. The problem with that was that drawing commands were way too slow and difficult to use.

btw you will want to remove the text at the bottom of the menu icons because the OS automatically adds the the name of the app. Or you could just wait for me to finish my asm shell, but that could take anywhere from 2 weeks to 1 month to finish :P

I'm making it in C right now, and thanks for the icon suggestions :) thanks all for support :D
Title: Re: Prizm Snake
Post by: AngelFish on May 01, 2011, 04:25:17 pm
Ashbad, also remember that if you use the Getkey() syscall, you will not have access to the entire screen for drawing. You will instead have access to that portion of the screen normally accessible from BASIC.

This looks nice. Good luck!
Title: Re: Prizm Snake
Post by: z80man on May 01, 2011, 10:32:59 pm
Or if you prefer you're own text, you could just leave the program name field blank. This isn't the name of the file, but just the text contained within the header that the OS uses. And don't worry to much about the getkey() call. Because the keys are memory mapped (you can view this in insight) it's really easy to make your own call that doesn't need any bloated OS call to work. Seriously getkey() is an overly bloated call that draws the screen, will run the screen receiver, does getkey duh, will exit your apps, and draw the status bar if shift or alpha is pressed. But then again getkey() is the only way I know of so far to exit apps :P
Title: Re: Prizm Snake
Post by: DJ Omnimaga on May 02, 2011, 05:34:21 pm
Awesome, I wish you good luck Ashbad! ALso feel free to ask help in the Prizm hacking section if you need any. I'm sure a lot of people there will be happy to help. :)
Title: Re: Prizm Snake
Post by: AngelFish on May 02, 2011, 06:15:28 pm
z80man, a way to exit apps:

Code: [Select]
sts.l pr,@-r15
...
stc @r15+,pr
rts
nop

The OS jumps to the program as if it's a subroutine, so you can just rts without generating any serious errors.
Title: Re: Prizm Snake
Post by: JosJuice on May 03, 2011, 08:14:29 am
The OS jumps to the program as if it's a subroutine, so you can just rts without generating any serious errors.
Are you sure about that? I've seen discussions on IRC where people have said that it's not like that...
Title: Re: Prizm Snake
Post by: Munchor on May 09, 2011, 07:39:41 am
So Ashbad, how's this going?
Title: Re: Prizm Snake
Post by: DJ Omnimaga on May 11, 2011, 09:18:08 pm
I'm also curious how is it progressing? Are you also going the same route as you told me via PM or will the game remains SFW?
Title: Re: Prizm Snake
Post by: z80man on May 11, 2011, 10:55:14 pm
The OS jumps to the program as if it's a subroutine, so you can just rts without generating any serious errors.
Are you sure about that? I've seen discussions on IRC where people have said that it's not like that...
Why don't we check what's in the PR when staring programs? We can check the code around the returned address and see how apps are initiated. And I did see how the code is loaded. As we know apps are ran from flash, but how it is done is the physical address of the app is mapped to virtual memory at 0x30000000. This would suggest that 0x30000000 is not a static address, but is remapped every time an app is ran.

@Qwerty you had a minor error in your code. fix'd it for ya ;)

Code: [Select]
sts.l pr,@-r15
...
lds.l @r15+,pr
rts
nop
Title: Re: Prizm Snake
Post by: Ashbad on May 12, 2011, 04:18:08 pm
This is on hold until a stable version of Emerald is released -- I plan to make this as an emerald-based game ;)
Title: Re: Prizm Snake
Post by: DJ Omnimaga on May 12, 2011, 04:25:55 pm
Ah ok. I hope you finish this, Pyrix, TanF and the others at one point too. I can't wait for screenshots too.