Jump to content



1

building a custom FPGA system


15 replies to this topic

#1 Multijointed Monster Maker OFFLINE  

Multijointed Monster Maker

    Chopper Commander

  • 170 posts

Posted Mon Jan 3, 2011 5:57 PM

I am currently designing a custom computer-on-chip game system, and I have some very important questions.

1) Where do I find FPGAs? I can't seem to find them anywhere.

2) What kind of media storage would I use to store the games on?

3) When I'm finished with the system, how would I program it?

#2 Chilly Willy OFFLINE  

Chilly Willy

    Moonsweeper

  • 316 posts
  • Location:The Land of Enchantment

Posted Mon Jan 3, 2011 6:12 PM

You can get Altera FPGAs from DigiKey. I suggest you start with a devkit, like the DE1 or DE2.

Various Altera development boards: http://www.altera.co...edu-boards.html

All development boards: http://www.altera.co...v_platforms.jsp

Edited by Chilly Willy, Mon Jan 3, 2011 6:14 PM.


#3 Multijointed Monster Maker OFFLINE  

Multijointed Monster Maker

    Chopper Commander

  • 170 posts

Posted Tue Jan 4, 2011 9:05 AM

Wow, those are really expensive!

#4 5-11under OFFLINE  

5-11under

    Stargunner

  • 1,339 posts
  • Location:Ontario, Canada

Posted Tue Jan 4, 2011 9:40 AM

Most maybe, but not all. You could also try Xilinx. The development kits tend to cost a bit more, but the individual parts are a bit less (from the part categories I've looked for, anyway).

A development kit sounds like your best solution at this point. There's alternate sources, too, besides the chip manufacturers, which might be good, if you can find a source that has an active forum, for instance.

Sometimes there's also good deals on these kits... although I'm not aware of any at the moment.

#5 Chilly Willy OFFLINE  

Chilly Willy

    Moonsweeper

  • 316 posts
  • Location:The Land of Enchantment

Posted Tue Jan 4, 2011 2:46 PM

The student discount is your best bet for getting one at a lower price. Some of the boards are really freakin' expensive, which is why I pointed out the DE1 and DE2... they're about the only Altera boards anyone can afford, so most Cyclone-based projects (like MiniMig) tend to use one or the other.

The Cyclone 1/2/3 FPGAs by themselves are fairly cheap. If you look at the prices for a single FPGA on DigiKey, they're not very expensive. It's the board and all the rest of the stuff that makes the thing as a whole more expensive. So if you wanted to play around with FPGAs and could jury rig a minimal interface on your own, perhaps you would just get the FPGA instead of one of the pre-built developer kits.

#6 Keith Howell OFFLINE  

Keith Howell

    Combat Commando

  • 4 posts

Posted Sun Jan 9, 2011 1:13 PM

FPGAs use around 30 times the the number of transistors that a custom ASIC would use, so they cost more in silicon area.
The development boards don't sell in vast numbers, so they don't get economies of scale.

I don't use FPGA for functions I can already get off the shelf. For example, I can buy ROM, RAM and a 65C02 very cheaply.
I use FPGA for specialised functions, glue logic and functional copies of chips that are no longer made (e.g. 6847, 6809, POKEY, ANTIC, GTIA etc).

On the positive side, you can use one FPGA development board to develop many projects.

#7 Multijointed Monster Maker OFFLINE  

Multijointed Monster Maker

    Chopper Commander

  • 170 posts

Posted Mon Jan 10, 2011 4:17 PM

What I'm trying to do is come up with the perfect early-90s style 2D game machine.

CPU:

6309 @ 7.16 Mhz


Memory:

64 kB work ram
64 kB video ram
8 kB sprite attributes
512 bytes color ram
4 kB audio ram


video:

resolution: 336 x 224

sprites: 224
112 per scanline
sizes 16x16 to 16x256
join sprites together with join bit

colors: 32768
256 at once
16 per 16x16 sprite block

transparency


audio:

channels: 16 wavetable
256 samples per instrument
cross channel frequency modulation
dual echo/delay/feedback buffers
output: 8-bit 56kHz stereo


hardware features:

DMA @ 3.58 Mbps (7.16 million pixels per second)
affine graphics blitter @ 4.77 million pixels per second (7.16 / 3 * 2)
RLE graphic decompressor @ 4.41 million pixels per second (7.16 / 13 * 8 )
active display V-RAM accessing


These are not randomly thought out numbers. I drew pictures of circuitry, made memory map lists, and counted cycle usage of the video and audio chips to make sure these technical specifics are possible and actually make sense.

Edited by Multijointed Monster Maker, Mon Jan 10, 2011 4:19 PM.


#8 Chilly Willy OFFLINE  

Chilly Willy

    Moonsweeper

  • 316 posts
  • Location:The Land of Enchantment

Posted Mon Jan 10, 2011 5:51 PM

Sounds interesting. Did you mean 6809? That was big at the end of the 8-bit era... a very nice chip indeed.

Does the graphics have two layers? That's important for platformers in particular. Otherwise, the graphics sound good.

The audio might need a little more thought. Given how little memory you can devote to the samples, perhaps hardware ADPCM decompression would be appropriate. One thing I can think of now that would have helped systems back then would be hardware support for tracker format music. For example, maybe you could have hardware support for playing 8 channel/31 instrument MOD format files. Think of it like display lists for the sound instead of video. Maybe not MOD format directly, but something that you could convert a MOD into easily.

#9 Multijointed Monster Maker OFFLINE  

Multijointed Monster Maker

    Chopper Commander

  • 170 posts

Posted Mon Jan 10, 2011 9:56 PM

View PostBen Gay, on Mon Jan 10, 2011 5:51 PM, said:

Sounds interesting. Did you mean 6809? That was big at the end of the 8-bit era... a very nice chip indeed.

6309 is a slightly upgraded version of 6809.

View PostIyla Vass, on Mon Jan 10, 2011 5:51 PM, said:

Does the graphics have two layers? That's important for platformers in particular. Otherwise, the graphics sound good.

Well, actually it's based on Neo Geo's sprite system where every sprite is a tall stack of 16x16 tiles with separate attributes per 16x16 tiles, with a joining bit that places next sprite 16 pixels to the right of the last one. To create a background, join 22 16x256 sprites together and the background coordinates are controlled by the coordinates of the left most sprite, since the rest just follow the coordinates of the last.

There can be up to 112 sprites per line, so there can be up to 5 layers.

View PostEric Tyler Disfunction, on Mon Jan 10, 2011 5:51 PM, said:

The audio might need a little more thought. Given how little memory you can devote to the samples, perhaps hardware ADPCM decompression would be appropriate. One thing I can think of now that would have helped systems back then would be hardware support for tracker format music. For example, maybe you could have hardware support for playing 8 channel/31 instrument MOD format files. Think of it like display lists for the sound instead of video. Maybe not MOD format directly, but something that you could convert a MOD into easily.

It's just enough memory for each channel to have it's own 8-bit 256 sample instrument.

#10 Keatah OFFLINE  

Keatah

    River Patroller

  • 3,449 posts

Posted Thu Jan 13, 2011 12:02 AM

just to show what is possible with fpga stuff look here -- http://www.applelogic.org/

Edited by Keatah, Thu Jan 13, 2011 12:02 AM.


#11 Chilly Willy OFFLINE  

Chilly Willy

    Moonsweeper

  • 316 posts
  • Location:The Land of Enchantment

Posted Thu Jan 13, 2011 4:06 PM

View PostMultijointed Monster Maker, on Mon Jan 10, 2011 9:56 PM, said:

Quote

Sounds interesting. Did you mean 6809? That was big at the end of the 8-bit era... a very nice chip indeed.

6309 is a slightly upgraded version of 6809.

Thanks, I should probably look up some datasheets on it. And did you notice the quoting is having trouble getting the author right? Odd...

Quote

Quote

Does the graphics have two layers? That's important for platformers in particular. Otherwise, the graphics sound good.

Well, actually it's based on Neo Geo's sprite system where every sprite is a tall stack of 16x16 tiles with separate attributes per 16x16 tiles, with a joining bit that places next sprite 16 pixels to the right of the last one. To create a background, join 22 16x256 sprites together and the background coordinates are controlled by the coordinates of the left most sprite, since the rest just follow the coordinates of the last.

There can be up to 112 sprites per line, so there can be up to 5 layers.

That sounds really good. :)


Quote

Quote

The audio might need a little more thought. Given how little memory you can devote to the samples, perhaps hardware ADPCM decompression would be appropriate. One thing I can think of now that would have helped systems back then would be hardware support for tracker format music. For example, maybe you could have hardware support for playing 8 channel/31 instrument MOD format files. Think of it like display lists for the sound instead of video. Maybe not MOD format directly, but something that you could convert a MOD into easily.

It's just enough memory for each channel to have it's own 8-bit 256 sample instrument.

But 256 samples really isn't very good. You either need really short instruments (no base drums), or really low sample rates. Having 2:1 or 4:1 ADPCM for the channels means you can have higher sample rates and/or better sounding base instruments.

The hardware support for music isn't really needed, but would be nice. :)

#12 Multijointed Monster Maker OFFLINE  

Multijointed Monster Maker

    Chopper Commander

  • 170 posts

Posted Thu Jan 13, 2011 10:00 PM

View PostDick Hertzalot, on Thu Jan 13, 2011 4:06 PM, said:


And did you notice the quoting is having trouble getting the author right? Odd...


He He!!!

View PostHugh Janus, on Thu Jan 13, 2011 4:06 PM, said:


But 256 samples really isn't very good. You either need really short instruments (no base drums), or really low sample rates. Having 2:1 or 4:1 ADPCM for the channels means you can have higher sample rates and/or better sounding base instruments.

The hardware support for music isn't really needed, but would be nice. :)

I wanted to keep the waveforms simple, but use frequency modulation + detuning + reverberation to make instruments more lush sounding. I probably will allow channels to modulate the echo delay parameters so you can create phasing/flanging sounds too.

#13 Chilly Willy OFFLINE  

Chilly Willy

    Moonsweeper

  • 316 posts
  • Location:The Land of Enchantment

Posted Fri Jan 14, 2011 2:47 AM

View PostMultijointed Monster Maker, on Thu Jan 13, 2011 10:00 PM, said:

View PostDick Hertzalot, on Thu Jan 13, 2011 4:06 PM, said:


And did you notice the quoting is having trouble getting the author right? Odd...


He He!!!

Hmm - I'm almost positive there's something wrong, but I can't put my finger on it...
:?

:D

Quote

View PostHugh Janus, on Thu Jan 13, 2011 4:06 PM, said:


But 256 samples really isn't very good. You either need really short instruments (no base drums), or really low sample rates. Having 2:1 or 4:1 ADPCM for the channels means you can have higher sample rates and/or better sounding base instruments.

The hardware support for music isn't really needed, but would be nice. :)

I wanted to keep the waveforms simple, but use frequency modulation + detuning + reverberation to make instruments more lush sounding. I probably will allow channels to modulate the echo delay parameters so you can create phasing/flanging sounds too.

Well, it'll will be interesting to hear how it sounds. Certainly nicer than any existing 8 bit sound chip. :music:

#14 carmel_andrews OFFLINE  

carmel_andrews

    Quadrunner

  • 12,343 posts
  • Location:from somewhere, anywhere and no where

Posted Fri Jan 14, 2011 6:06 AM

I am guessing that a 6309 is somewhat comparable to an '816 (65816, WDC version)...given the clock speed you mentioned

If not, why not use a 20 mhz version of the '816 (which has a 6502 native mode built in) and emulate some other processors via fpga (i.e 6809, z80, TMS etc etc)

#15 Multijointed Monster Maker OFFLINE  

Multijointed Monster Maker

    Chopper Commander

  • 170 posts

Posted Fri Jan 14, 2011 2:31 PM

View Postcarmel_andrews, on Fri Jan 14, 2011 6:06 AM, said:

I am guessing that a 6309 is somewhat comparable to an '816 (65816, WDC version)...given the clock speed you mentioned

If not, why not use a 20 mhz version of the '816 (which has a 6502 native mode built in) and emulate some other processors via fpga (i.e 6809, z80, TMS etc etc)

I cheated a little bit. A hardware 7.16 Mhz 6309 doesn't really exist, but a 3.58 Mhz 6309 does. A 7.16 Mhz version was supposed to be released, but Motorola and Hitachi had a lawsuit over the chip and it was discontinued early. At least with emulation via FPGA, you can clock it to higher speeds than it originally was. If I can't find a 6309 FPGA core, than I'll go with a 6809 core instead.

I prefer the 6309 to the 65816. It's design is a bit more flexible. After programming an SNES for a long time, the 65816 starts to give you a headache.

#16 candle OFFLINE  

candle

    Stargunner

  • 1,909 posts
  • Location:Lublin, Poland

Posted Fri Jan 21, 2011 6:14 PM

if i may suggest you something, then altera de1 gives a lot of flexiblility for the price - i would say "power without the price" ;)
altera de2 board is full-blown system you could implement almost any design you desire (any 8, most 16bit, or simplier 32 bit design)

currently i'm using this setup for development:

Posted Image

er... don't mind the phones :/

Edited by candle, Fri Jan 21, 2011 6:15 PM.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users