Atxmega Videogame Console NEW!

Discuss anything not related to the current Uzebox design like successors and other open source gaming hardware
HardlyUnique
Posts: 65
Joined: Tue Dec 08, 2009 7:44 pm

Re: Atxmega Videogame Console NEW!

Post by HardlyUnique »

Thanks for sharing! I often find myself wishing the Uzebox was just a little beefier but not a totally different architecture. I want to build this but that price - ouch! It's hard to justify buying that chip when I can get an entire STM32F4 discovery board instead.

I thought it was interesting that you're not using DMA. I can't tell you how many times I've wanted DMA on the Uzebox and I think that would be my first choice for outputting pixels on hardware that has it...
User avatar
mast3rbug
Posts: 81
Joined: Sat Jan 08, 2011 8:15 am

Re: Atxmega Videogame Console NEW!

Post by mast3rbug »

martinsustek wrote:You're right at colors part, I didn't noticed that twice output means not only twice memory, but also twice computational power.
Necessity of pre-loading tile data into RAM should be an issue, because it will limit us in count of useable tiles than keeping tiles in FLASH.
You wrote that maximum sprites per line is 6, that lead me to hypothesis, that you're using Mode-2 approach (generating picture data on-line for each scanline) instead of Mode-3 approach (precomputing tile data at spare time, not during rendering). I believe, that atxmega has enough computational power to load tile data from flash. How many instructions do you have for each pixel to render?
Interlacing is good idea to get more processing power, but it should be tested on more monitors (old analog and new digital ones - in fact my current TV shows Uzebox's picture interlaced).

About controllers: I know, that USB protocol is very hard to implement, but I'll be great way to open uzebox for different types of controllers (gamepad, joystick, racing wheel, guitar, etc.). Gameport has support for only 4 buttons (2x2 for 2 players), I think, and it's too few. So we'll probably keep SNES.

About sound: I've fiddled with atxmega datasheet, and found, that it has 2 12bit DAC channels. I don't know if it has audio quality, but at least it's good think to test if sound can be generated using it.
-For the sprites, I precompute them in the Vertical 25 PORSH lines, and I render them in the blank scan line. ha have only one cycle left for blasting out pixels. like that:

ld pixel,X+
nop
out port,pixel

So, there is no room for even loading a pointer to the next tile in FLASH or in RAM. It's for that reason that I compute the ACTIVE line in a BLANK line. And for monitor compatibility, no problem, It see a normal black line because I do the horizontal SYNC before starting to work on the pixels for the next line.

Mast3rbug
hpglow
Posts: 269
Joined: Wed Apr 14, 2010 6:06 am

Re: Atxmega Videogame Console NEW!

Post by hpglow »

Very nice, I would like to see something come out of this. The Xmega is faster per clock than the ATMega so that alone should net some gains if used properly.

I'm just here to give you the nod for using that image from the Angry Video Game nerd Cheatamen episode. I love some AVGN can't wait for the movie to come out.
User avatar
mast3rbug
Posts: 81
Joined: Sat Jan 08, 2011 8:15 am

Re: Atxmega Videogame Console NEW!

Post by mast3rbug »

hpglow wrote:Very nice, I would like to see something come out of this. The Xmega is faster per clock than the ATMega so that alone should net some gains if used properly.

I'm just here to give you the nod for using that image from the Angry Video Game nerd Cheatamen episode. I love some AVGN can't wait for the movie to come out.
Hi. Good to see that I'm not the only one to know about his videos lol. I'm waiting for that movie too!

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

Re: Atxmega Videogame Console NEW!

Post by mast3rbug »

Hi All.

It's an update of the work made on the video console. The past week, instead of sleeping I have worked on the Music part. Now, the Atxmega is able to play .MOD files. I have a Youtube video of it. The song in the video is WALKIN.MOD an old .MOD file I had on my Amiga (Back in time...)




Ok, There is some limitations to be able (MAYBE ABLE) to incorporate the routine in the HSYNC-VSYNC of the video signal. No specials effect will be played at all. Also, I will have to manage to reduce the Note Pitch routine, It take 13.16 uS to update 1 Sample (of 4 channels) In the youtube video, the update is at 31 kHZ. It's fine, but when integrated into the console it will be at 15 kHZ. (This sound is still fine at this frequency). I will need to find extra cycles to precalculate the sample. I have no more room in the HSYNC. Ony about 30 Cycles in the VSYNC. But at 13.16 uS, I can update only 2 samples in 1 free Hframe of the VSYNC, it will pre-render about only 60 Samples, I need 525 lines/2 = 262 precalculated sample... It's a lot. I will really need to find a way to optimize the routine.

UZE: What is your method to get the note pitch in your UZEBOX? maybe you have a special trick that I have not already in mind with lower computation time than my already optimized one? (lol)? Do you have some explenation somewhere on the forum?

UPDATE: I think I have an idea with a precomputed 128 or 256 byte lookuptable. I will try tonight. It if work fine maybe I will have free CPU time to compute at least the volume effect.


Thanks!

If you have questions, feel free to ask!

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

Re: Atxmega Videogame Console NEW!

Post by uze6666 »

UZE: What is your method to get the note pitch in your UZEBOX? maybe you have a special trick that I have not already in mind with lower computation time than my already optimized one? (lol)? Do you have some explenation somewhere on the forum?
The engine use a simple lookup table, can't be faster! :)

I was wondering...can we have VGA work in interlace mode? I could not find any info on such a mode. That would halve the line rate and it would be a totally different game!

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

Re: Atxmega Videogame Console NEW!

Post by mast3rbug »

By interlaced, you mean, to be able to reduce the scan speed to 15 khz instead of 31khz? I know that RGB signal at component level (The 3 R G B separate cable) run at 15 khZ. But the lowest setting of a VGA signal is 31 khz. I don't know any monitors that will stay ON at a signal lower than 31khz. They all auto shut off. But Anyway like said previously, I use some kind of interlaced because I process only half lines. the other 50% is blank with only HSYNC information.

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

Re: Atxmega Videogame Console NEW!

Post by mast3rbug »

Ok, Now after a lot of works, here is the total integration, .MOD audio file format compatible with VGA output, SPRITES and TILES. I think it's never seen before... There is no room for other tasks in the video interrupt. A little optimisation can be done, but it's enough for now.

Sorry for the bad patterns from my old mariobros project again, but it's just a test, I promise the next video will have a good demo of performance with animation and maybe realtime rotation and / or realtime 3d graphics.

Ho and the song, It's an old composition I made 19 years ago, with a lot of things removed to fit in the 64k limitation of the actual player.




Mast3rbug
HardlyUnique
Posts: 65
Joined: Tue Dec 08, 2009 7:44 pm

Re: Atxmega Videogame Console NEW!

Post by HardlyUnique »

Congratulations on all your quick progress! Keep it up! :mrgreen:
hpglow
Posts: 269
Joined: Wed Apr 14, 2010 6:06 am

Re: Atxmega Videogame Console NEW!

Post by hpglow »

Awsome, glad to see you have made good progress.
Post Reply