foft Posted June 25, 2013 Share Posted June 25, 2013 (edited) 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 June 25, 2013 by foft 21 Quote Link to comment Share on other sites More sharing options...
foft Posted June 25, 2013 Author Share Posted June 25, 2013 A few pictures: Self test menu: Loading English software: Starting to test PMGs: 10 Quote Link to comment Share on other sites More sharing options...
OBO Posted June 25, 2013 Share Posted June 25, 2013 Yes, that's interesting Quote Link to comment Share on other sites More sharing options...
xdslx Posted June 25, 2013 Share Posted June 25, 2013 (edited) 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 June 25, 2013 by xdslx 1 Quote Link to comment Share on other sites More sharing options...
candle Posted June 25, 2013 Share Posted June 25, 2013 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 ) 2 Quote Link to comment Share on other sites More sharing options...
+Stephen Posted June 25, 2013 Share Posted June 25, 2013 Awesome - hope work on this progresses. Quote Link to comment Share on other sites More sharing options...
mimo Posted June 25, 2013 Share Posted June 25, 2013 Nice, I am VERY interested Quote Link to comment Share on other sites More sharing options...
sodarun Posted June 25, 2013 Share Posted June 25, 2013 Sweet Quote Link to comment Share on other sites More sharing options...
kenjennings Posted June 25, 2013 Share Posted June 25, 2013 Holy BLEEP is that awesome looking! Stretch goal 47 -- dual pokey (if not quad core). heh. 1 Quote Link to comment Share on other sites More sharing options...
foft Posted June 26, 2013 Author Share Posted June 26, 2013 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. Quote Link to comment Share on other sites More sharing options...
+slx Posted June 26, 2013 Share Posted June 26, 2013 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....) Quote Link to comment Share on other sites More sharing options...
foft Posted June 26, 2013 Author Share Posted June 26, 2013 (edited) @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 June 26, 2013 by foft Quote Link to comment Share on other sites More sharing options...
sack-c0s Posted June 26, 2013 Share Posted June 26, 2013 (edited) 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 June 26, 2013 by sack-c0s Quote Link to comment Share on other sites More sharing options...
tcdev Posted June 26, 2013 Share Posted June 26, 2013 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!?! Quote Link to comment Share on other sites More sharing options...
foft Posted June 26, 2013 Author Share Posted June 26, 2013 @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! Quote Link to comment Share on other sites More sharing options...
JamesD Posted June 26, 2013 Share Posted June 26, 2013 (edited) 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 June 26, 2013 by JamesD Quote Link to comment Share on other sites More sharing options...
vanfanel Posted June 27, 2013 Share Posted June 27, 2013 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? 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/viewtopic.php?f=9&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 1 Quote Link to comment Share on other sites More sharing options...
tcdev Posted June 27, 2013 Share Posted June 27, 2013 What other computer/console cores have you seen ported for the DE1? Apple II+ (Alex Freed) Apple II+ (Stephen Edwards) Apple IIe (Gary Becker) Vector-06C (Viacheslav Slavinsky) ZX-81 (Alex Freed) 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) Quote Link to comment Share on other sites More sharing options...
foft Posted June 27, 2013 Author Share Posted June 27, 2013 (edited) There is a zx spectrum too. http://www.mike-stirling.com/2010/11/zx-spectrum-on-altera-de1-source-code/ Edited June 27, 2013 by foft Quote Link to comment Share on other sites More sharing options...
Torlus Posted June 27, 2013 Share Posted June 27, 2013 (edited) -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 June 27, 2013 by Torlus Quote Link to comment Share on other sites More sharing options...
vanfanel Posted June 27, 2013 Share Posted June 27, 2013 (edited) 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! 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 June 27, 2013 by vanfanel Quote Link to comment Share on other sites More sharing options...
npturton Posted June 27, 2013 Share Posted June 27, 2013 fantastic, carry on FOFT Quote Link to comment Share on other sites More sharing options...
Thelen Posted June 28, 2013 Share Posted June 28, 2013 This is very, very cool ! Quote Link to comment Share on other sites More sharing options...
foft Posted June 29, 2013 Author Share Posted June 29, 2013 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... Quote Link to comment Share on other sites More sharing options...
phaeron Posted June 29, 2013 Share Posted June 29, 2013 Which Acid800 test is failing? If reasonably feasible I'd like to adjust the test so it can report a failure instead of crashing. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.