ZX80 / ZX81 Emulator for the Raspberry Pi Pico

Emulator and emulator development specific topics
User avatar
Paul
Posts: 1517
Joined: Thu May 27, 2010 8:15 am
Location: Germanys west end

Re: ZX80 / ZX81 Emulator for the Raspberry Pi Pico

Post by Paul »

Another thing I suggest is a ROM keyword for the INI file:

Code: Select all

[Default]
# The default settings for HiRes programs using RAM in 8 to 16K range
Computer = ZX81
ROM = H4th.BIN;0
ROM = TK8.bin;8192
Sound = ZONX
Memory = 16
This way the ROM file could be selected e.g. the ZX80 ROM in ZX81 mode or the Azmic ROM instead.
Allowing for 16K ROMs would make running SPONZY possible, a B/W Spectrum ROM for the Zeddy.
It could also be added in the Program sector so the TOOLKIT can be added for a single Program instead of the whole group in the directory.
The number after the filename could be the start address.
In theory, there is no difference between theory and practice. But, in practice, there is.
Exile
Posts: 45
Joined: Tue Jan 03, 2023 9:50 pm

Re: ZX80 / ZX81 Emulator for the Raspberry Pi Pico

Post by Exile »

Paul wrote: Fri May 19, 2023 3:39 pm Did you add this to the Emulator?
I thought it would be added to the USB-Keyboard enabling the usb keyboard to be used for other purposes as well (other emulators for example)
And it would be great if the (or an added) LED could show this new mode of the Keyboard.
I did think of putting it in the keyboard, but then decided against. My reasoning was:
1. Keep the USB keyboard code generic and modify the emulator, so that the Pico emulator can then work with a wider range of keyboards
2. Other emulators, such as sz81, EO etc run on O/S that are designed around a full keyboard and mouse. I think it would be difficult to start, run and configure those emulators without dedicated cursor keys and/or a mouse. So unlike the Pico emulator, which now can be run from only a ZX81 keyboard, I think users of sz81 and EO will need to use their main mouse and keyboard at some point anyway.
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 pushed source and executable updates to github. The main changes are:

1) Support for the PicoMite VGA board, many thanks to Paul for sending me a board to work on :D
2) An option to select the Big Bang ROM, instead of the standard ZX81 ROM, to accelerate BASIC. Added examples.
3) Extensions to the Readme, including how to adjust the tolerance to regaining vertical sync
User avatar
Paul
Posts: 1517
Joined: Thu May 27, 2010 8:15 am
Location: Germanys west end

Re: ZX80 / ZX81 Emulator for the Raspberry Pi Pico

Post by Paul »

In theory, there is no difference between theory and practice. But, in practice, there is.
User avatar
marste
Posts: 250
Joined: Sun Aug 10, 2014 9:58 pm
Location: Italy
Contact:

Re: ZX80 / ZX81 Emulator for the Raspberry Pi Pico

Post by marste »

Exile wrote: Wed May 17, 2023 8:54 pm This may be a very niche area, but I’ve recently pulled together code from the community to create a ZX80/81 emulator running on the Raspberry Pi Pico
I've not a pico around me just now but for what I've seen I would like to give my plause to you @Exile !!

PS: for information I'm trying to have an authorization from John Grant (thru Randall Kindig) to allow the distribution of the ZX80 and ZX81 ROMs, and the current reply is that John is ok for anything that is not commercial.
Exile
Posts: 45
Joined: Tue Jan 03, 2023 9:50 pm

Re: ZX80 / ZX81 Emulator for the Raspberry Pi Pico

Post by Exile »

@marste thank you! I can promise John that everything I'm doing is for fun and for free :D

I've made some updates, many suggested by @Paul. The list is:

1. Support for the Olimex RP2040-PICO-PC board. This is a nice board that has HDMI and sound. It is small, so ideal to put in a 3d printed case. It is also less expensive than the others. In the UK thepihut.com sells them for £13 (plus £4.80 for a Pico with headers, postage is £2.99).
2. Support to load and save memory blocks, using a similar syntax to ZXpand. Together with directory support, it is good enough to allow me to run the great PT3 and STC players that have been uploaded to the forum. I've spent the weekend listening to ABBA and others coming through the emulated AY chip :)
3. Easier navigation of the file menu, including highlighting directories and allowing all files (whatever the extension) to be optionally viewed
4. Changes to the "double shift" mechanism to generate function keys on a Zeddy keyboard, my earlier implementation was not quite what was requested
5. Several updates to the Readme

The updates (including pre-built binaries) are on GitHub at https://github.com/ikjordan/picozx81
Exile
Posts: 45
Joined: Tue Jan 03, 2023 9:50 pm

Re: ZX80 / ZX81 Emulator for the Raspberry Pi Pico

Post by Exile »

There have been some more updates and fixes, plus there is now a release on github, which makes it possible to set up the emulator by downloading a couple of files - no need to touch git, or compile anything!

The emulator now supports 720 by 576 at 50 Hz as well as the original 640 by 480 at 60Hz. This allows the Pico to be connected to a TV, and create a display that is similar to a "real" ZX81 connected to a home TV. It also means that QS Defenda, 25thanni and rezurrection can be seen in their full glory.

The emulator also takes advantage of "software driven" VGA and DVI by offering the option of driving a 720 by 576 display at 50.65 Hz. This
pretty much matches the natural framerate of a ZX81 when running BASIC.

There are now options to synchronise frame display with vertical sync, to avoid tearing. There is also a mode that synchronises interlaced updates.This avoids jumping by one frame, which destroys interlace effects. The final part of rezurrection now displays the "3 head" logo in uniform grey without glitching. Also, Ilena can now be viewed with minimal flashing :D

The emulator can still be configured using config files on the SD Card, but now there is also an option to change the settings through interactive menus. As previously, it is still possible to fully control the emulator using the 40 keys available on a classic ZX81 or ZX80. The emulator boots from cold to the K prompt effectively in the time it takes the emulated ZX81 to check its memory.

If you are interested, the main components are on special offer at Pimoroni UK at the moment:

1) A Pico H (i.e. a Pico board with pre-soldered headers) £4.80
2) A Pimoroni Pico DV Demo Base board with HDMI, sound and SD Card reader - £9.90
3) A USB to microUSB OTG convert shim as a keyboard adapter - £2.10
4) UK Shipping £3

Total: £19.80

The quick start guide with links to downloads is at:
https://github.com/ikjordan/picozx81#quick-start
Spinnetti
Posts: 255
Joined: Sat Sep 12, 2020 11:29 pm

Re: ZX80 / ZX81 Emulator for the Raspberry Pi Pico

Post by Spinnetti »

Awesome, thanks! I finally got a real ZX80, so was able to refine my replica case to be exact. Replica Pico ZX will go nicely alongside the real thing.
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
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: Sat Aug 19, 2023 8:11 pm Awesome, thanks! I finally got a real ZX80, so was able to refine my replica case to be exact. Replica Pico ZX will go nicely alongside the real thing.
That sounds great! Do you have pictures of the case? :)
Spinnetti
Posts: 255
Joined: Sat Sep 12, 2020 11:29 pm

Re: ZX80 / ZX81 Emulator for the Raspberry Pi Pico

Post by Spinnetti »

Real thing on the left, mine on the right, with the real circuit board in my case.
Attachments
H3NYnWp_T_6F3MqsckOj3A.jpg
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
Post Reply