Jump to content

Photo

Potential new hardware

FPGA DE1 Hardware

787 replies to this topic

#1 foft ONLINE  

foft

    Dragonstomper

  • 597 posts
  • Location:Nyon, Switzerland

Posted Tue Jun 25, 2013 2:31 PM

As I promised in another thread, here are some details of a project I'm working on. I hope it will be of interest.

I studied microprocessor design at University some 10-15 years ago. Since I work as a software developer I have never had a chance to put it into practice. Now an opportunity has presented itself since I'm on gardening leave from work for 6 months! I decided to spend much of this time learning about hardware by building a new Atari 8-bit computer.

I'm doing the development for now on an Altirra DE1 FPGA board. An FPGA is basically re-configurable hardware. A special chip with a bunch of logic gates that can be connected any how. Used usually for prototyping new hardware, with lower cost than actually creating an ASIC. They are also used on Atari for a few things - e.g. VBXE and the recently discussed accelerator board.

My development is done in VHDL. This is a hardware description language. It can be written very low level, i.e. this logic gate connects to this. It can also be written as a slightly higher level behavioral description. Which is simpler but leads to slower hardware. It is easier to understand and I've mostly written (register aware) behavioral code for now - later we can write faster implementations if we need to! Or even base the logic on the de-cap projects for more accuracy.

The current status is:
i) Basic runs, including all non-gtia modes.
ii) SIO working, so I can boot via SIO2PC.
iii) Self test runs.
iv) Much software 'almost' runs. I think a few big issues will fix 80% and the rest will be harder...

A little more detail on the chip status:
i) Pokey. All sound features including 2-tone. I'm doing non-linear mixing in hardware for now, though we could use an equivalent analog circuit for more accuracy. SIO working. Interrupts working though I need to verify correct timing. Keyboard support via PS2 port. I plan to later add support for the XEGS keyboards.
ii) Antic. All modes and correct DMA/(fake) refresh timing/PMG DMA. I think DLI timing and VBI timing is incorrect. I think bugs here are preventing me running much software for now.
iii) PIA. Near complete - at least all the features used on the Atari.
iv) GTIA. AN0-AN2 and sync support done. Sound and consol buttons. All colour registers and palette done. PMGs partial. GTIA modes not yet done. I'm currently part way through GTIA...
v) Memory. The board has 512MB SRAM. This can easily be mapped 130XE style etc with Antic/CPU bank switching. The board also has a large ROM, though this is slower.
vi) CPU. Runs at ~1.8MHz by default for compatibility. There is a switch to run the CPU at 25MHz. I hope to run at 40MHz to 50MHz eventually. Currently I'm using T65. I plan to write my own 6502 implementation with illegal instructions, or at a minimum, implement the illegal instructions in T65.

I will complete the functionality in the next week or so. Then I will work on debugging and improving reliability. It will pass Acid 800 by the end of August (I'm unable to work on this for much of July...).

Then I will work on some break out boards to allow real joysticks to be connected, real sio devices and cartrides + hopefully ECI.

As 'stretch goals' I then intend to try a few things like - for now just a brain dump:
a) Adding SD card support
b) Adding double/quad colour clock modes.
c) Scan double for VGA?
d) HQ2X
e) Quad Antic with GTIA to overlay?
f) VBXE?! Is the VHDL or verilog available?

Any questions? If anyone is interested in trying out the SOF file for the DE1 then send me PM. I'm keeping the VHDL code private for the time being, at least until I finish the project. If anyone is interested in doing a commercial version and building real hardware let me know please.

Mark

Edited by foft, Tue Jun 25, 2013 2:35 PM.


#2 foft ONLINE  

foft

    Dragonstomper

  • Topic Starter
  • 597 posts
  • Location:Nyon, Switzerland

Posted Tue Jun 25, 2013 2:56 PM

A few pictures:

Self test menu:
Posted Image
Loading English software:
Posted Image
Starting to test PMGs:
Posted Image

#3 OBO OFFLINE  

OBO

    Moonsweeper

  • 461 posts
  • Location:Land of Wine&Cheese (aka France...)

Posted Tue Jun 25, 2013 3:26 PM

Yes, that's interesting :)

#4 xdslx OFFLINE  

xdslx

    Space Invader

  • 45 posts
  • Location:Turkey

Posted Tue Jun 25, 2013 3:35 PM

carry on , I hope we will have a new atari , but , lately I have seen a Commodore 64 new version , which also works as a PC too , something like that would sell more I think :)

Edited by xdslx, Tue Jun 25, 2013 3:37 PM.


#5 candle OFFLINE  

candle

    River Patroller

  • 2,793 posts
  • Location:Lublin, Poland

Posted Tue Jun 25, 2013 3:45 PM

could you post bitstream so those of us who have de1 could check this out? (me me me me me, ok, i'm better now... me me )

#6 Stephen OFFLINE  

Stephen

    Quadrunner

  • 6,081 posts
  • A8 Gear Head
  • Location:Akron, Ohio

Posted Tue Jun 25, 2013 3:49 PM

Awesome - hope work on this progresses.

#7 mimo OFFLINE  

mimo

    Preppie!

  • 6,802 posts
  • It's easy living in a bubble

Posted Tue Jun 25, 2013 3:52 PM

Nice, I am VERY interested

#8 sodarun OFFLINE  

sodarun

    Star Raider

  • 51 posts

Posted Tue Jun 25, 2013 4:20 PM

Sweet

#9 kenjennings OFFLINE  

kenjennings

    Dragonstomper

  • 736 posts
  • Me + sio2pc-usb + 70 old floppies
  • Location:Florida, USA

Posted Tue Jun 25, 2013 5:46 PM

Holy BLEEP is that awesome looking!

Stretch goal 47 -- dual pokey (if not quad core). heh.

#10 foft ONLINE  

foft

    Dragonstomper

  • Topic Starter
  • 597 posts
  • Location:Nyon, Switzerland

Posted Wed Jun 26, 2013 12:58 AM

It already has dual Pokey, that one is easy:)

@Candle: I'll post a bitstream shortly. May not be in the 'office' for a few days- hopefully my backup here has some:) To run it properly you need to load the rom image to the flash (basic and xl os) and to connect a pin to the max232 for command. There are also some switches. The left one is turbo, the right is cpu reset, next on right is sound unit enable. Oh and plug in a ps2 keyboard. For now consol is on f2 to f4 - will be on gpio too later.

#11 slx OFFLINE  

slx

    Dragonstomper

  • 904 posts
  • Location:Vienna, Austria

Posted Wed Jun 26, 2013 1:14 AM

Wow! Keep on with this, sounds awesome.

And let those of us who can't help with FPGA design at least assist you by starting a naming contest ;-)

What about a 1800XE? (extra letters a la XLD would result in too long a name with all the possible features....)

#12 foft ONLINE  

foft

    Dragonstomper

  • Topic Starter
  • 597 posts
  • Location:Nyon, Switzerland

Posted Wed Jun 26, 2013 1:29 AM

@candle here is the sof file. http://ssh.scrameta..../experiment.sof
The flash much be loaded with the OS at 0x0000 and then basic at 0xc000.
The switches I did not mention are to enable pokey sound output channels.


1800XE sounds interesting. Or perhaps 524XE if its based on the DE1:-) I'm not in a position to design case plastics. Is there anyone who can? How about techniques for small volume manufacture? Unless we design our own FPGA board then it will be a DE1 (or another commodity board) + a break out PCB or two. So it will need to be big enough to accommodate that. Anyway getting ahead of myself - I have lots of debugging to do yet!

Edited by foft, Wed Jun 26, 2013 1:30 AM.


#13 sack-c0s OFFLINE  

sack-c0s

    Stargunner

  • 1,154 posts
  • Location:Scheveningen, Netherlands

Posted Wed Jun 26, 2013 2:55 AM

just a thought - would it be possible to get it to artifact in hardware?

It strikes me as something that would be 'fairly simple' to do, but then again I've spent weeks on things that seemed 'fairly simple' before I started actually doing them, so I'm not going to say that :)




edit: I *really* need to build an FPGA TED that can sit on a daughterboard and drop into a Commodore 16 - my first ever computer is sat around broken and there's no way in hell that's going in a skip...

Edited by sack-c0s, Wed Jun 26, 2013 3:04 AM.


#14 tcdev OFFLINE  

tcdev

    Star Raider

  • 99 posts
  • Location:Sydney, Australia

Posted Wed Jun 26, 2013 9:04 AM

Wow, that's awesome indeed! I've got a DE1 myself, so I'll try out the SOF when I get the chance (work is super, super busy atm) - thanks!

I'm also using the T65 core, and grabbed the POKEY and PIA from other projects. Everything else is my own design. I'll be interested to see your clocking architecture!

No doubt I'll hit you up with some questions as I progress if you don't mind answering them!?!

#15 foft ONLINE  

foft

    Dragonstomper

  • Topic Starter
  • 597 posts
  • Location:Nyon, Switzerland

Posted Wed Jun 26, 2013 9:11 AM

@tcdev. Sure, happy to discuss how I'm implementing stuff. It looks like you have much more experience than me so I'm probably doing some things in a sub-optimal way!

#16 JamesD OFFLINE  

JamesD

    Quadrunner

  • 7,211 posts

Posted Wed Jun 26, 2013 11:12 AM

I also have a DE1 but I have to work out a software issue before I can program it again.
I have used it for the FPGA CoCo3 and FPGA Spectrum so far though there are a lot of other machines in various stages of development out there that run on it.
I'm looking forward to the day when I can boot any of the systems in my collection on it so I don't need so much desk space.

FWIW, I purchased a project box some time ago that is large enough to hold the DE1 and any breakout boards.

Edited by JamesD, Wed Jun 26, 2013 11:13 AM.


#17 vanfanel OFFLINE  

vanfanel

    Star Raider

  • 67 posts

Posted Thu Jun 27, 2013 7:24 AM

I just registered to the Atariage forums because of this project. I'm drooling over these pictures, foft!! How can a simple system test be so beautifull? :D When you know it's going to be the first open hardware implementation of an Atari 8-bit computer, it becomes a beautiful view...
The Atari 800XL was my first "own" computer, when I was 9.
Now I have the Altera DE1 board (wich I use as an Atari800-descendant, the Amiga, given it has a pretty mature port you can find here: http://minimig.net/v...&t=552&start=50), but the perspective of making a new Atari 800XL from this board is fantastic.

JamesD: What other computer/console cores have you seen ported for the DE1? So far I know:
-1ChipMSX (MSX2+) ported by CARO
-The Minimig re-ported by Chaos (www.minimig.net). It's like an Amiga 600 with HDD, scandoubler and a good amount of RAM (8MB).
-The incomplete Torlus consoles (FPGAGen, PC Engine) wich lack roms-on-sd and a selector.
-CoCo3 by Gary Becker

#18 tcdev OFFLINE  

tcdev

    Star Raider

  • 99 posts
  • Location:Sydney, Australia

Posted Thu Jun 27, 2013 8:40 AM

What other computer/console cores have you seen ported for the DE1?

and a few others in various stages of completeness on my site of course (TRS-80 I/III, Coco 1/2, & the Adventure Vision Console)

#19 foft ONLINE  

foft

    Dragonstomper

  • Topic Starter
  • 597 posts
  • Location:Nyon, Switzerland

Posted Thu Jun 27, 2013 9:42 AM

There is a zx spectrum too.
http://www.mike-stir...e1-source-code/

Edited by foft, Thu Jun 27, 2013 9:57 AM.


#20 Torlus OFFLINE  

Torlus

    Space Invader

  • 14 posts

Posted Thu Jun 27, 2013 1:45 PM

-The incomplete Torlus consoles (FPGAGen, PC Engine) wich lack roms-on-sd and a selector.

My bad. In fact I've added a rough SD-card interface and selector for the Chameleon-64 hardware, but if it is of some interest, I could add them to the DE1 version. There will still remain the issue of joystick interface, though.

Nice work by the way, I've considered at one time working on Atari 8bit series of computers, but it seems useless now ;)

Edited by Torlus, Thu Jun 27, 2013 1:47 PM.


#21 vanfanel OFFLINE  

vanfanel

    Star Raider

  • 67 posts

Posted Thu Jun 27, 2013 2:36 PM

My bad. In fact I've added a rough SD-card interface and selector for the Chameleon-64 hardware, but if it is of some interest, I could add them to the DE1 version. There will still remain the issue of joystick interface, though.


Of course there is! :D
PCE with ROM selector on the DE1 would be beyond incredible. Magial Chase on VGA makes me bark and salivate... This board is getting a crazy little gem thanks to you guys!
What about the traditional joystick-on-gpio interface like Minimig and 1ChipMSX cores use? It's very easy to build (MMrobinsonb5 built mine and it works great!). It's based on simle pull-up resistors. And joystick emulation on keyboard (arrows, ctrl, alt) would suffice for people without such a home-made solution.

PD: I have a Chameleon64 too. Are you releasing a PC-Engine core for it, too? Oh man, oh man...

Edited by vanfanel, Thu Jun 27, 2013 2:42 PM.


#22 npturton OFFLINE  

npturton

    Chopper Commander

  • 187 posts
  • Location:Rotherham, UK

Posted Thu Jun 27, 2013 3:53 PM

fantastic, carry on FOFT

#23 Thelen OFFLINE  

Thelen

    Dragonstomper

  • 546 posts
  • Location:Holland

Posted Fri Jun 28, 2013 4:21 AM

This is very, very cool !

#24 foft ONLINE  

foft

    Dragonstomper

  • Topic Starter
  • 597 posts
  • Location:Nyon, Switzerland

Posted Sat Jun 29, 2013 1:37 PM

Did anyone try the sof?

I've added pmgs, collision detection and gtia modes today (unreleased). Now for lots and lots and lots of debugging! Acid800 is currently a litany of failures followed by a crash...

#25 phaeron OFFLINE  

phaeron

    River Patroller

  • 2,164 posts
  • Location:USA

Posted Sat Jun 29, 2013 1:54 PM

Which Acid800 test is failing? If reasonably feasible I'd like to adjust the test so it can report a failure instead of crashing.





Also tagged with one or more of these keywords: FPGA, DE1, Hardware

0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users