Emulating ZX81 with mbed LPC1768

Emulator and emulator development specific topics
User avatar
RetroTechie
Posts: 379
Joined: Tue Nov 01, 2011 12:16 am
Location: Hengelo, NL
Contact:

Re: Emulating ZX81 with mbed LPC1768

Post by RetroTechie »

gertk wrote:Yes I already tried to understand some of the hires routines, basically they end up having some sort of framebuffer.
The ways you can force the ULA to display anything are quite limited so that should not be such a problem.
The VGA (sub)system is a library which I created together with Ivo van Poorten on the mbed platform. He had made a text only 80x25 output to VGA using the I2S port of the mbed. I modified it heavily to get the timing right and make it into a full 640x480 framebuffer. Alas I needed more ram so the output is reduced to 640x240 which for the ZX81 emulation does not matter, only for the other screens I had to revert to 8x8 pixel font instead of the nice 8x16 pixel font.
Not hindered by knowledge of any VGA (timing) specifics, :mrgreen: but: shouldn't a few line buffer be enough? For example the smallest multiple of "ZX81 outputs 1 screen line" and "VGA monitor sees 2 screen lines @ its input" ?

Pixel clock is a constant 6.5 MHz. Hsync's are on all the time with a 15.7 kHz frequency unless masked by software-generated vsync's. There's a variety of Hi-Res routines out there, but regardless of which, any Hi-Res routine only has so much wiggle room to mess with the sync signal, if it wants to keep TV synchronization. Software that steps outside that boundary will produce different results on different monitor types anyway (I'm thinking of Rezzurection style demo's).

Just saying that the number of variables are limited when it comes to ZX81 video output, and exactly doubling the line frequency should put you in supported range for most VGA monitors, I think.

Future-wise I'd prefer HDMI option, but VGA is also excellent. Because there's so many of those 14, 15" monitors out there that are a) perfect for ZX81 use, b) cheap & plentiful, and c) usually in good shape (used in offices, 3-5 yrs old for example).
User avatar
yerzmyey
Posts: 1240
Joined: Thu May 15, 2008 10:11 am
Location: Rubber Planet
Contact:

Re: Emulating ZX81 with mbed LPC1768

Post by yerzmyey »

gertk wrote: AY-3-8910 or YM2149 emulation

Make it twice, haha.


Well, I wonder actually, can such a machine be 100% compatible with original ZX81?
It might be a very interesting thing to buy, for example. If cased properly... Heh.
IN NIHILUM REVERTERIS - a big text-adventure game for ZX81: http://tiny.pl/g2m6m
"MONOCHROME" issue 5 - (Spring 2014) free paper/PDF magazine about ZX81: http://tiny.pl/q2m44
ZX81 COMPETITIONS 2007/2009: http://zx81.republika.pl/
User avatar
1024MAK
Posts: 5104
Joined: Mon Sep 26, 2011 10:56 am
Location: Looking forward to summer in Somerset, UK...

Re: Emulating ZX81 with mbed LPC1768

Post by 1024MAK »

Wow!
Nice work... :D

Please excuse the drool... :mrgreen:

Mark
ZX81 Variations
ZX81 Chip Pin-outs
ZX81 Video Transistor Buffer Amp

:!: Standby alert :!:
There are four lights!
Step up to red alert. Sir, are you absolutely sure? It does mean changing the bulb :!:
Looking forward to summer later in the year.
gertk
Posts: 14
Joined: Sun Oct 14, 2012 9:09 pm

Re: Emulating ZX81 with mbed LPC1768

Post by gertk »

Added ZX80 emulation too, selectable by F12 or holding '0' on the original keyboard during powerup.
Attachments
ZX80 Kong running
ZX80 Kong running
small_2013-01-13 15.42.32.jpg (103.89 KiB) Viewed 2692 times
Basic test program
Basic test program
small_2013-01-13 14.59.29.jpg (51.82 KiB) Viewed 2692 times
Post Reply