ZX80 / ZX81 Emulator for the Raspberry Pi Pico

Emulator and emulator development specific topics
Exile
Posts: 45
Joined: Tue Jan 03, 2023 9:50 pm

Re: ZX80 / ZX81 Emulator for the Raspberry Pi Pico

Post by Exile »

Spinnetti wrote: Mon Aug 21, 2023 3:16 am Real thing on the left, mine on the right, with the real circuit board in my case.
That looks excellent!
computergui
Posts: 21
Joined: Tue Mar 09, 2021 10:56 pm

Re: ZX80 / ZX81 Emulator for the Raspberry Pi Pico

Post by computergui »

Fully functional in one of those nice Spinnetti cases. This is a really awesome project!!

Image
Timex Sinclair 1000 with ZXPand
Timex Sinclair 1500 - 4
Timex Sinclair 2068 -2
ZX Spectrum 48K - 12ish...
ZX Spectrum Plus
ZX Spectrum 128K
ZX Spectrum Plus 2
ZX Spectrum Plus 3
Sinclair QL
ZX Spectrum Next KS 2 (when it lands!)
ZX 48K Spider
ZX Max 128
Spinnetti
Posts: 255
Joined: Sat Sep 12, 2020 11:29 pm

Re: ZX80 / ZX81 Emulator for the Raspberry Pi Pico

Post by Spinnetti »

Cool Don!

Is there a usb a to mini so you could just plug the kbd adapter right into the pi? and/or solder the keyboard wires directly into the kbd circuit (just cutting down on connectors).....

Either way, good stuff....
Zeddy: ZX80, ZX81/ZXpand, TS1000/ZXpand, TS1500/Zxpand+,Printer
Speccy: 48k, +, +2, +3, TS2068, "Bare Metal" Pi, Next KS2, IF1/Microdrives/Vdrive/Light Gun/VGA-Joy
QL: Minerva/QL-VGA/Custom PSU
C5: 24v, LiFE battery, Disc brakes
computergui
Posts: 21
Joined: Tue Mar 09, 2021 10:56 pm

Re: ZX80 / ZX81 Emulator for the Raspberry Pi Pico

Post by computergui »

Certainly could, the challenge with the board is that connecting it to the pico will cause space issues with the top of the ZX80 case. In fact, I had to cut down the pcb mounts you had to get it to fit properly. Unfortunately, as the developer mentions, the Pico doesn't provide enough available pins to program the keyboard input similar to what the bare metal spectrum does on the Raspberry Pi. Still, this is way cooler IMHO!

I used an AVR Minimus dev board. You could do the same with any number of other products like a USB Teensy.

As for direct wiring...yea, straight forward. Unfortunately, I never seem to wire the damn things correctly, so using the connectors was a lifesaver!

D
Timex Sinclair 1000 with ZXPand
Timex Sinclair 1500 - 4
Timex Sinclair 2068 -2
ZX Spectrum 48K - 12ish...
ZX Spectrum Plus
ZX Spectrum 128K
ZX Spectrum Plus 2
ZX Spectrum Plus 3
Sinclair QL
ZX Spectrum Next KS 2 (when it lands!)
ZX 48K Spider
ZX Max 128
Exile
Posts: 45
Joined: Tue Jan 03, 2023 9:50 pm

Re: ZX80 / ZX81 Emulator for the Raspberry Pi Pico

Post by Exile »

It's really great to see the emulator in the case :D Would you mind if I share a picture on the github page for the project?

Recently I have made some updates to the emulator. The most significant is that there is now a branch that sends audio over the hdmi connector.

There have also been some changes specifically for the ZX80 emulation. It is now possible to save and load named .o files. Also the emulator menus now use the ZX80 font (rather than the ZX81 font) when a ZX80 is being emulated.

With regard to controlling the keyboard directly from the Pico, it is possible to juggle the available GPIO to make it work, and there is a ZX Spectrum emulator for the Pico that does it. However it requires a specialist "home brew" board, with less IO used for the display, to allow enough free GPIO for the keyboard. I just used another Pico to control the keyboard, and then interfaced them via USB, but the solution using the Minimus is more compact than mine.
computergui
Posts: 21
Joined: Tue Mar 09, 2021 10:56 pm

Re: ZX80 / ZX81 Emulator for the Raspberry Pi Pico

Post by computergui »

Absolutely use the picture!

As for the GPIO, not sure I'd want to sacrifice display output, especially when other solutions and fill the gap. The fact that I could go get off the shelf PICO products to put together a fully functional ZX80 was too much to ignore! LOL

Sound via HDMI you say...interesting next up I'm going to put this in a old TS1500 case with a custom keyboard. ZONX output through hdmi would be interesting indeed.

Excellent job Exile!

D
Timex Sinclair 1000 with ZXPand
Timex Sinclair 1500 - 4
Timex Sinclair 2068 -2
ZX Spectrum 48K - 12ish...
ZX Spectrum Plus
ZX Spectrum 128K
ZX Spectrum Plus 2
ZX Spectrum Plus 3
Sinclair QL
ZX Spectrum Next KS 2 (when it lands!)
ZX 48K Spider
ZX Max 128
computergui
Posts: 21
Joined: Tue Mar 09, 2021 10:56 pm

Re: ZX80 / ZX81 Emulator for the Raspberry Pi Pico

Post by computergui »

Image
Timex Sinclair 1000 with ZXPand
Timex Sinclair 1500 - 4
Timex Sinclair 2068 -2
ZX Spectrum 48K - 12ish...
ZX Spectrum Plus
ZX Spectrum 128K
ZX Spectrum Plus 2
ZX Spectrum Plus 3
Sinclair QL
ZX Spectrum Next KS 2 (when it lands!)
ZX 48K Spider
ZX Max 128
Exile
Posts: 45
Joined: Tue Jan 03, 2023 9:50 pm

Re: ZX80 / ZX81 Emulator for the Raspberry Pi Pico

Post by Exile »

I've been away on holiday for a while, but am back now and have updated the project Readme with the pictures - thank you :)

Sound over hdmi is currently implemented on a separate branch - the hdmi_audio branch in Github. However, it does appear robust, and the uf2 files that support audio over hdmi are included in the latest release on Github.

I will probably merge the hdmi_audio branch back into main after someone other than me confirms it is working for them ;-)
Blackbird60
Posts: 4
Joined: Thu Mar 15, 2018 2:17 am

Re: ZX80 / ZX81 Emulator for the Raspberry Pi Pico

Post by Blackbird60 »

Could this be made to work with mini displays like the pico display2.0" from Pimoroni?
Exile
Posts: 45
Joined: Tue Jan 03, 2023 9:50 pm

Re: ZX80 / ZX81 Emulator for the Raspberry Pi Pico

Post by Exile »

In think it could be made to work with small SPI displays such as the 2inch display (320x240). But some programming is required.

One of the 2 cores of the Pi Pico is currently dedicated to generating the VGA or HDMI display. The challenge is to write to the small display fast enough over SPI using that core. I've had a quick play with the 1.3 inch display (240x240) and the demo code in the Pico SDK (in the PIO section) appears to achieve a good speed, although I've not measured the actual frame rate. There would be work to translate the black and white display buffer into the 16 bits required by the LCD. However, that might actually be easier than the current VGA and HDMI solution, where timing is very tight as the processor has to "chase the beam".

The displays are designed to connect direct to a Pico, but that introduces the challenge that an SD Card and sound output is also required. I'd probably go for something like the Cytron Maker Pi Pico board (https://thepihut.com/products/maker-pi- ... dered-pico), which includes an SD Card and audio line out, and then connect the screen using jumper wires.

Perhaps something to look at during the long winter nights...

You need good eyesight to use a 2" screen effectively though :D
Post Reply