Atxmega NEW powerkill CONSOLE

Discuss anything not related to the current Uzebox design like successors and other open source gaming hardware
User avatar
mast3rbug
Posts: 81
Joined: Sat Jan 08, 2011 8:15 am

Re: Atxmega NEW powerkill CONSOLE

Post by mast3rbug » Tue Nov 13, 2012 9:35 am

Nice 38USD - 40USD very good price.
Will you sell programed and build-up product with programed xmaga (in future)?
I have no xmega prog...

The Xmega I use is programmable via JTAG. I have a dragon and it work fine to program/debug. What do you use for the UZEBOX?
Of course I will include some basic demo and source code with it.
I am from EU. I have PAY-PAL.
How much will postage cost from CAN to EU?

Shipping from Canada to USA is about 7$ for a small air pack and take from 7 to 14 days to reach your destination.


I'm so excited, It's the first time I do mixed ASM and C code in avr studio, and now, the kernel is working in a C project. The porting from ASM to C/ASM took about 4 hours. For a first C / ASM mixed project, I found it easier than expected.

My next post will be a demo with a rotozoomer! Yeah! I wanted to do it for long time, but with a tile mapped console it's impossible to do, and also in ASM language is really long to code.

In C, it will be easier and more fun. We will see if the Xmega at 72 MHZ is powerful enough to do this realtime trick... It's direct RAM manipulation of a texture. Need fast RAM copy in Blank raster only...

Mast3rbug

Tinctu
Posts: 64
Joined: Sun Aug 31, 2008 2:22 pm

Re: Atxmega NEW powerkill CONSOLE

Post by Tinctu » Tue Nov 13, 2012 9:14 pm


User avatar
mast3rbug
Posts: 81
Joined: Sat Jan 08, 2011 8:15 am

Re: Atxmega NEW powerkill CONSOLE

Post by mast3rbug » Mon Nov 19, 2012 1:24 pm

Ok, here some development of the console.

I finished writing most video drivers, so I had to make something to see if the Atxmega can handle some hard stuff. Like I said, the console have no sprites at all. All is managed by the ASM code itself, but the DEMO is coded in C.



This console have a lot of power. Only a few line of code to generate the animation:

first, the Main LOOP:

Code: Select all

do

		{

		for (xx=0;xx!=8;xx++)
			{
			DoParallax();
			DoHorse0();		
			}

		for (xx=0;xx!=10;xx++)
			{
			DoParallax();
			DoHorse1();		
			}

		for (xx=0;xx!=8;xx++)
			{
			DoParallax();
			DoHorse2();		
			}

		}
	
	while (z!=100);

The main loop call the events.

here is the parallax effect function:

Code: Select all

void DoParallax(void)
{
	parallax_zone(0,25,(unsigned char)x1);			//cloud3
	parallax_zone(26,39,(unsigned char)x2);			//cloud2
	parallax_zone(40,52,(unsigned char)x3);			//cloud1
	parallax_zone(53,105,(unsigned char)x4);		//cliff
	parallax_zone(106,131,(unsigned char)x5);		//bush 1
	parallax_zone(132,149,(unsigned char)x6);		//seed 1
	parallax_zone(150,180,(unsigned char)x7);		//bush 2
	parallax_zone(181,211,(unsigned char)x8);		//floor1
	parallax_zone(212,239,(unsigned char)x9);		//floor2
	x1=x1+0.3;
	x2=x2+0.2;
	x3=x3+0.1;
	x4=x4+0.4;
	x5=x5+0.5;
	x6=x6+0.6;
	x7=x7+1;
	x8=x8+2;
	x9=x9+3;
}
the parallax effect is processed at the render time, you can do a parallax effect on each of the 256 lines if you want.

and the last, one of the function of the 3 horses aninations:

Code: Select all

void DoHorse0(void)
{
	wait_vsync();
	backpic_VIDEORAMtoRAM(40,100,89,94,0x5678);
	putpic_FLASHtoVIDEORAM(horse,40,100);
	_delay_ms(3);
	restorepic_RAMtoVIDEORAM(40,100,89,94,0x5678);
}
since there is no sprite, you have to manually manage the background by backup zone and restore zone after you are done with the current picture. All the overlay on the parallax effect is managed by the ASM routines.

Thats all!

Now we can have an Idea of what the console is capable of. I think we can recreate some Amiga game (like this one, all is taken from Wrath of the demon on Amiga).

See you next time with more updates.


Mast3rbug

User avatar
uze6666
Site Admin
Posts: 4448
Joined: Tue Aug 12, 2008 9:13 pm
Location: Montreal, Canada
Contact:

Re: Atxmega NEW powerkill CONSOLE

Post by uze6666 » Mon Nov 19, 2012 6:11 pm

Pretty awesome, I'm impressed! Really cool to see Multi level parallax and big sprites on a 8bit micro. Btw, at what speed is it running in the demo?

User avatar
Roukan
Posts: 113
Joined: Sat Oct 27, 2012 7:50 pm
Location: Lancashire / England

Re: Atxmega NEW powerkill CONSOLE

Post by Roukan » Mon Nov 19, 2012 7:55 pm

Mighty impressive performance you have there, look forward to your next update.

Keep up the great work.

User avatar
mast3rbug
Posts: 81
Joined: Sat Jan 08, 2011 8:15 am

Re: Atxmega NEW powerkill CONSOLE

Post by mast3rbug » Mon Nov 19, 2012 9:18 pm

uze6666 wrote:Pretty awesome, I'm impressed! Really cool to see Multi level parallax and big sprites on a 8bit micro. Btw, at what speed is it running in the demo?

Finally, the Atxmega was not stable at 72 MHZ with some code running. Now it run at 64 MHZ, stable.

Mast3rbug

User avatar
D3thAdd3r
Posts: 2422
Joined: Wed Apr 29, 2009 10:00 am
Location: Minneapolis, United States

Re: Atxmega NEW powerkill CONSOLE

Post by D3thAdd3r » Tue Nov 20, 2012 12:20 am

Wow :shock:

Tinctu
Posts: 64
Joined: Sun Aug 31, 2008 2:22 pm

Re: Atxmega NEW powerkill CONSOLE

Post by Tinctu » Thu Nov 22, 2012 8:45 am

Very cool demo!!!

User avatar
TonyD
Posts: 134
Joined: Mon Oct 27, 2008 2:23 pm
Location: Newcastle, UK
Contact:

Re: Atxmega NEW powerkill CONSOLE

Post by TonyD » Thu Nov 22, 2012 11:32 am

agree, very cool demo

User avatar
mast3rbug
Posts: 81
Joined: Sat Jan 08, 2011 8:15 am

Re: Atxmega NEW powerkill CONSOLE

Post by mast3rbug » Tue Nov 27, 2012 10:28 am

Ok a little post for the fun since I was busy with the audio routine (Increasing the audio resolution, adding volume effect, and sampling loop...) and some annoying bug in the video routine, here posting a little new video showing sinwave with 114 characters. It's not bad for a no sprite routine and also if you take into account that the SIN function take 2600 CPU cycles for each letter!!! Damn, these "double type" function calls eat a lot of resources. I can do the same effect with a table lookup for about 10 cycles. (I tested it with the SIN in ASM and it's about 20 times faster)

here the youtube link.



Mast3rbug

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests