Commodore 64 VIC Emulation on the Teensy

Status
Not open for further replies.
New Thread started from a project proposal from the Commodore 64 on an Teensy 3.6 thread.

After seeing the Commodore 64 emulator running on the Teensy 3.6, I thought it may also be interesting to port the VIC emulation code to see if a project which replaces the VIC chip in the C64 with a Teensy with VGA output would be possible.


Frank B
Hm, might be possible.. But it would -still- be an emulation. I wonder, if a FPGA wouldn't be better.
The crystal input might be a bit problematic - on the other hand, it can be ignored, maybe ? The would mean, the c64-clock would be drivenby the teensy. We should take a look at the shematic - I'm not sure.

Reading through the schematic this afternoon, it looks like address and data lines could be grabbed from the C64's expansion port. The actual VIC chip could remain in the circuit, resolving the timing issues, etc.

Could your VIC-II code accept data from the data and address lines and act as an video output device?
The R/W. BA. Dot Clock, and IRQ lines appear to be easily accessible as well. Also will your code run on the slower Teensy 3.5?

Referenced from here: https://www.c64-wiki.com/wiki/Expansion_Port
C64 schematic: http://www.zimmers.net/anonftp/pub/cbm/schematics/computers/c64/250469-rev.A-right.gif

Sadly, my experience with Teensy is beginner level, since most of my previous work has been with Propeller, and PIC. I'm not afraid to dig into this as I suspect it would be a great project.
 
You'd have to remove the original VIC anyway, i think... or do you know a way to deactivate it ?
The 3.5 would be better, yes, but I really don't know if it is fast enough. Needs testing...

On the other hand, the VIC is the most important chip on the C64 Board - an emulation can never be as good as the original...
It would be good to repair broken C64s - but i'd never replace a working VIC... you ??

In the emulation, the VIC Code makes calls to the CPU, the VIC Code is "master" in the emulation. So it should be quite easy to remove all other code.
 
You'd have to remove the original VIC anyway, i think... or do you know a way to deactivate it ?
The 3.5 would be better, yes, but I really don't know if it is fast enough. Needs testing...

Would you really need to deactivate it if the emulated VIC is only mirroring what is actually happening by reading the address and data lines? Let the actual VIC handle the control of the 64's CPU, timing ect. Plugging the Teensy into the expansion port provides less physical modification to a historic machine.

Can the VIC code become the slave to the data/address lines or am I missing something here that the emulated VIC needs to be in control of? I can't help but think that the emulated VIC would simply be and output device in this situation.
 
Now I got it..
Oh es, this would make some things even more easy.

Edit:
There are easy to use parts like this (?)
https://www.youtube.com/watch?v=hU-Sz3fqyVU

Yes, and they are all junk... (except for that $400 Framemeister unit from Japan)

I'm shooting for crisp VGA video output direct from the 64. :) The CBM community has talked about a VGA interface for the last decade. Your VIC code running on the Teensy certainly looks like a working candidate.

Guess it's time to break out my wallet, and purchase a couple of these boards and see what is possible here.
 
Wait, all the GPIO can be a problem. Sorry I didn't think of that before. I guess I need some free time... or more sleep..
GPIO that often will disturb the VGA output - please read the VGA thread about that problem. GPIO and DMA are on the same internal BUS in the ARM. And on top, the VGA output uses GPIO, too. So, I fear, this would result in very flickery output :-(
There's a tricky way for the C64 emulation to get around this - but this would not work with your aproach.

Edit: We have to wait if QIX finds a solution with external memory.
 
Last edited:
Read the entire thread.. Good read..

Yes, it looks like I'm going to hold a bit and watch to see what QIX comes up with. It'll give me a chance to get up to speed on the Teensy... :)
 
Status
Not open for further replies.
Back
Top