Video output from Teensy 3.1

Status
Not open for further replies.
I'm tied up with my current QL keyboard I wrote about elsewhere, but I'm thinking about feasibility of future projects.

I'm wondering would it be possible to build an emulator for an 8-bit micro using nothing but a Teensy 3.1. The computers I'm interested in are the Sinclair ZX81 and Spectrum. Here's a picture for anyone too young to remember:

image.jpg

They both ran off a Z80 processor, which I'd be fairly confident the ARM on the Teensy could easily handle by emulation. There are plenty of open source Z80 emulators out there. Like my QL case project, I'd like to house the emulator in the original case. Handling the keyboard ribbon cables would be even easier than for the QL, as both the ZX81 and Spectrum used a simple 8x5 matrix arrangement.

The one place I see a problem is video output. The ZX81 had a very simple monochrome display with a resolution of 256x192 pixels. The spectrum had a slightly more complex arrangement, with the same resolution, but 8 colours.

Would it be insane to try to drive composite video output from the Teensy's IO ports, or would I need something more complex?

James
 
Thanks! I've been looking at composite video generation, and it does look feasible. There would be some timings to work out, but the 12-bit DAC on the Teensy 3.1 should make basic video output relatively straightforward. The tricky part would be to keep the Z80 emulator ticking over at the same time.

These computers only had a resolution of 256x192, which should be fairly easy. The ZX81 has monochrome output, which is a lot easier to produce, so I'll start with that, and see about adding colour later.

James
 
Well another thought is not to do composite video, but use a TFT or OLED display controlled straight from the Teensy, such as the Adafruit 2.2" 18-bit color display that is 320x240 pixels: https://www.adafruit.com/products/1480. I don't have that display, but I see Paul has included the library in the latest Teensy 1.21-beta7 release, that has mods for Teensy, so I imagine it should work.

I'm not sure about the other Adafruit displays like the 2.8"/3.5" displays with touch screen support. There doesn't seem to be Teensy mods to the libraries, but I may not be looking in the right places (or else nobody has done it yet).
 
Last edited:
That's a cute idea! It would be fun to have a tiny screen built into the old computer case.

I still want to fiddle with generating video signal from the Teensy itself.

James
 
Any update on video out for Teensy3.1?

I got video overlay working with the TVOut library on Arduino Uno, Arduino Pro Mini and Arduino Mega 2560 R3. But I want better resolution :)
- 128x72 on Uno, Mega2560 R3 and Pro Mini with video overlay.
- 224x130 on Mega 2560 R3 with only video out. (Not with overlay)

From the specs, the Teensy3.1 should easily be able to do video overlay with 640x360 in resolution.
 
Asking again in 2016: did anyone eventually adapt this fine library for Teensy 3.1?
It would be nice to steer an old CRT with the extra memory and speed from a Teensy…
 
Status
Not open for further replies.
Back
Top