MONOCHRON PEW-PEW-PEW

For RTC breakouts, etc., use the Other Products from Adafruit forum

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
morcheeba
 
Posts: 10
Joined: Sun Jan 13, 2008 2:53 am

MONOCHRON PEW-PEW-PEW

Post by morcheeba »

I just wanted to share the fruits of some weekend hacking :-)

>>> MONOCHRON PEW-PEW-PEW video <<<

Some background: this is a port of the code from my homemade retro game watch. The code was already cross-platform (it worked on the watch with an 8051, and under osx using ASCII graphics), but there's some weirdness with the AVR's memory that I need to account for. As you can see, there are still bugs!

Original project (which has been neglected since I joined a startup, so I thought I'd put the code to good use on the monochron):
Game watch video
Watch circuit board (much smaller than the monochron!)

User avatar
ericgus
 
Posts: 33
Joined: Mon Mar 01, 2010 11:10 am

Re: MONOCHRON PEW-PEW-PEW

Post by ericgus »

I was wondering the other day if that could be done on the MONOCHRON .. it would make a great mode for just showing the time.

User avatar
dataman
 
Posts: 98
Joined: Wed May 20, 2009 7:03 pm

Re: MONOCHRON PEW-PEW-PEW

Post by dataman »

Share your code and I'll help you port it to Pew3Chron!
Take a look at our work at http://github.com/BANNED/MultiChron

Basically, you'd add a new module, anin_pew3.c
You'd need to code init, display, and step
It's pretty easy.
Take a look at anim_ts or anim_int

-Dataman

morcheeba
 
Posts: 10
Joined: Sun Jan 13, 2008 2:53 am

Re: MONOCHRON PEW-PEW-PEW

Post by morcheeba »

I based it off the latest version of the ratt code, so it has the same basic modules. Now, if I can only get it to fit in negative 12K of code :-)

It still has some very basic work to go, which I'll be getting... the original display was 96x64x4 bit and I use anti-aliased sprites -- it should be easy to make it 128x64, but I'm not sure what to do with the sprites yet -- aim for software dithering, or reduce the size to 1/4. I also have pre-shifted sprites (2 copies of each one), which are useless now and need to be trashed.

I'm not sure of the code size yet... that'll be interesting :-)

User avatar
ericgus
 
Posts: 33
Joined: Mon Mar 01, 2010 11:10 am

Re: MONOCHRON PEW-PEW-PEW

Post by ericgus »

dataman wrote:Share your code and I'll help you port it to Pew3Chron!
Take a look at our work at http://github.com/BANNED/MultiChron
"That page doesn't exist!"

I looked around and found something that looks similar at http://github.com/BANNED/monochron

morcheeba
 
Posts: 10
Joined: Sun Jan 13, 2008 2:53 am

Re: MONOCHRON PEW-PEW-PEW

Post by morcheeba »

Here's an initial release!

Notes:
- doesn't keep time :-( ... it keeps score instead. The goal is to make the score follow the time; if the score it too low the AI should become better (or get a bonus alien); if it's too high it should get worse.
- I detect player collisions with rocks, but I don't do anything about it (except flash the screen).
- AI might not be working great since I ported it (a bug here wouldn't show up easily)
- 3 rocks only at start. We can go higher; what do you think?
- Based on adafruit-monochron-e6e4061 (~sept 9 2010)
- monochrom.hex (included so you don't need to compile it from scratch) is about 26kB
- all fixed point. And not just integers, either. It has 1/2 pixel resolution for most sprites. Angles are in fixed point, too. Atan2 function provided. Yeah, I am a masochist that way.
- Things I dropped from the watch OLED implementation: anti-aliased sprites (can someone hack some grayscale in to this display?), pre-computed shifted sprites (not needed)
- The sprites are implemented for my OLED display (4 bits/pixel, horizontal orientation); they haven't been re-implemented in a way that suits the LCD display (1 but/pixel, vertical orientation). There's code to do the translation on-the-fly & it's horribly inefficient. But frame rate seems fine!

Creative commons license by-nc-sa.
Last edited by morcheeba on Wed Sep 15, 2010 9:33 am, edited 1 time in total.

User avatar
caitsith2
 
Posts: 217
Joined: Thu Jan 18, 2007 11:21 pm

Re: MONOCHRON PEW-PEW-PEW

Post by caitsith2 »

You might want to post a link or attach a file, because how are we supposed to try the initial release if it is not provided in some way?

morcheeba
 
Posts: 10
Joined: Sun Jan 13, 2008 2:53 am

Re: MONOCHRON PEW-PEW-PEW

Post by morcheeba »

Good idea :-) Sorry about that... it takes a few more steps here than what I'm used to with gmail

>>>
firmware-pew-pew-pew-sep14-release.zip
pew pew pew alpha release sept 14
(123.89 KiB) Downloaded 132 times
<<<[/b]

User avatar
dataman
 
Posts: 98
Joined: Wed May 20, 2009 7:03 pm

Re: MONOCHRON PEW-PEW-PEW

Post by dataman »

Ok, BANNED is a serious code masochist.
He's busy on another project right now.
When he come up for air, we'll have to see if we can jam code into MultiChron.
Sorry about the bad url, I was jamming kinda fast.
Glad you found our repository.

Yes, floating point is very very costly in tiny CPUs.
If you can do it int, it's always faster.
We converted pong fron FP to int.
Uses approximates now.
Works very well.

morcheeba
 
Posts: 10
Joined: Sun Jan 13, 2008 2:53 am

Re: MONOCHRON PEW-PEW-PEW

Post by morcheeba »

I'm excited about multichron... I'll download it tonight! I was looking forward to getting rid of the float stuff, too .,. darn, it'll be harder for me to find more optimizations :-) ... it'll be fun to see what you guys did!

my original pong watch fit in to a processor with only 2KB!

Locked
Please be positive and constructive with your questions and comments.

Return to “Clock Kits (discontinued)”