wDavies wrote:
Thank you for all the replies, i will be sure to implement all of them into the Schematic, however i've been wondering, Would it be possible to use the Arduino Nano, or the atmega 328P as a Graphics Processor? In theory, it would be able to take characters from the CPU (after being addressed in the IO space), and an XY position and it would interface with some form of VGA driver?
In theory, yes. In practice yes, but its not easy.
There are many ATmega/Arduino video devices out there - including some here. Google for "Arduino TVout" for many examples.
The issue is making the ATmega and the 6502 talk. If you have serial then it's fine, but if not, then it starts to become more challenging. An ATmega running at 16Mhz might just be able to act as a register device directly to a 6502 bus running at 1Mhz. Maybe. You need to be able to reliably sample the edge of a 1Mhz clock (the 'chip select' signal that your decoding generates), then read the data directly off the data bus, but the timing is tight and you have less than 0.5µS to do it. (8 cycles on a 16Mhz ATmega)
You can decouple the timing issues using the VIA in handshake mode. You write the byte to the VIA, it generates the "strobe" signal which the ATmega is listening for, then the ATmega reads the byte, sends the 'ack' signal back to the VIA which then signals to the 6502 side that it can send another byte. You can then invent your own protocol for sending bytes over, however the speed that the ATmega will be governed by the spare CPU cycles it has left over from 'racing the beam' to generate the video signal.
Making the ATmega generate characters is not hard, making it generate graphics is harder. I put together a system (Atmega12804p) to generate a 320x240x1 display for my early 6502 systems but later abandoned that idea - mostly because generating that video signal (and this was PAL composite video, not VGA) required between 60 and 70% of all cycles that the ATmega had and I had other uses for it. (Like serial and SD card access)
This:
https://www.youtube.com/watch?v=09zhGUbVxdU is a quick demo of that ATmega system. (There was no 6502 at that point)
If you want VGA, then Quinn Dunki's Veronica project is a good read:
http://quinndunki.com/blondihacks/?page_id=1761 She uses n ATmega with external RAM to implement a low resolution VGA system. It's very tight AVR assembler though.
Cheers,
-Gordon
_________________
--
Gordon Henderson.
See my
Ruby 6502 and 65816 SBC projects here:
https://projects.drogon.net/ruby/