Teensy instead of FPGA for retro goodness

Status
Not open for further replies.

cbmeeks

Member
I'm designing another SBC based around the 65C02 (I did a simple one back in 2018). This time, I'm looking for VGA support.
Having researched both the Parallax mcu and the TinyFPGA (BX), the conclusion is that both of them are "almost" good enough for what I need. I have some experience with the Propeller but I'm not crazy about learning FPGA (for now).

So that brings me here. I actually own a Teensy 3.5 but, to be honest, haven't even turned it on.

I just discovered the 4.0 and 4.1 version of Teensy so I guess I need to decide if the Teensy is going to be a good fit.

Here is what I am looking to do:

1) Clock the 65C02 between 1 - 4 MHz (4 MHz would be ideal..but 6 MHz would be nice too).

2) Use the Teensy as "glue logic" for the 65C02 and all of the peripherals. This would mean the Teensy would be the "bus master" and turn on/off chips as needed such as RAM/ROM/ACIA/etc.

3) Teensy would perform like the TMS9918 in that it would accept requests from the 65C02 via registers (memory maps) and then draw on the screen.

4) The Teensy would draw to a VGA screen with a resolution of 640x480. However, it would use "fat pixels" so that the effective resolution would be 320x240 and possibly 64 or 256 colors. Oh, and it would be character based like the C64 so it would only take a couple K of memory.

5) The Teensy would also have a basic sprite system down the road...assuming it had enough horsepower left over.


Granted, the Teensy 4.1 seems way overkill for this.

However, in my experience, it's the concurrency that really hurts you (where FPGA's shine). As my 4 MHz computer loads an address, for example, it expects that address to be ready to go in roughly 125ns based on the fact the 65C02 does its internal work in half-phases of the clock. So even at 600 MHz, you don't have tons of time in 125ns.

This is why the Propeller won't work. It has a hard time responding to external events at above 1 MHz.

I hope this long winded post makes sense. My question out of all of this, is can the Teensy do this? If so, which version?

Thanks!
 
FYI ... Check out :: github.com/FrankBoesing/Teensy64

If a Teensy could interface to 6502 perhaps ... though ...

Frank used a T_3.6 - with VGA or LCD output to emulate everything including the 6502 for a C64.
Code:
Features
Supports Commodore Serial IEC Bus
For ILI9341 SPI Display [U]{ or VGA }[/U]
USB-Keyboards (wireless too)
31kHz reSID Audio emulation
Audio Line-Out
Compatible to SD2IEC
Simple drive emulation included (load "whatever.prg" or load "$" )
Supports original joysticks

The VGA library that worked for T_3.6 has not been revisited or ported to T_4.1 usage.
 
Thanks, that's very cool but I want to be clear. I'm not looking to emulate any existing computer. I am building my own and I want to use actual vintage parts (ACIA, 65C02, etc.) and need a VGA solution along with glue logic. Audio will come from an AY-3-8912, etc.
 
Thanks, that's very cool but I want to be clear. I'm not looking to emulate any existing computer. I am building my own and I want to use actual vintage parts (ACIA, 65C02, etc.) and need a VGA solution along with glue logic. Audio will come from an AY-3-8912, etc.

Understood - just saying a T_3.6 has power to do a whole emulation including processor - so other than specific timing for interfacing - it should have the power needed to do part of a computer - and Ideally a much more powerful and efficient T_4.1 might make that easier - except that exact timing will need care and attention and may be limiting.
 
Right, but emulation (other than video) is not anything I'm interested in. My current PC could emulate it many times over as well. And I'm only interested in video emulation because there isn't a "VGA on a chip" solution like there is for NTSC back in the day. The closest thing I've seen is the Propeller but it can't handle the fast external switching. At any rate...no worries if the Teensy isn't a good fit...I'm just brainstorming at this point anyway.
 
as noted ... understood ... only saying the power to do that and more is there - if the I/O can be handled. Interrupts can be responsive - but incur overhead. Polling is faster but takes the loop() code offline. The display can be driven with DMA ( C64 demonstrates that for T_3.6 on ILI9341 and I expect VGA as well ) - and perhaps the reading from the 6502 can be done that way as well? at the same time? - leaving loop to read the input and write the output.

@mjs513 did find a VGA board - like $50? some months back [ T_4.0 beta thread? ]. He saw it work - but didn't work with it extensively after that.

The VGA on T_3.6 thread was before T_4.0 went beta - and I wired it up to work - and got and assembled Frank's C64 PCB for VGA and it worked.
 
Status
Not open for further replies.
Back
Top