ZX80 / ZX81 Emulator for the Raspberry Pi Pico

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

Re: ZX80 / ZX81 Emulator for the Raspberry Pi Pico

Post by Exile »

Either of the Olimex uf2 files will work.

picozx81_olimexpc.uf2 will provide sound over the 3.5mm audio connection
picozx81_olimexpc_hdmi_sound.uf2 will provide sound over the hdmi cable

There was an issue with the original Olimex firmware, where stereo audio over the 3.5mm audio connection was not possible with a display, as the PWM clock for the left audio channel was shared by the pin used for the DVI clock. This was fixed in later releases of picozx81 by using a PIO state machine to generate the DVI clock.
zx4ever
Posts: 18
Joined: Wed Jun 27, 2018 10:58 pm

Re: ZX80 / ZX81 Emulator for the Raspberry Pi Pico

Post by zx4ever »

Exile wrote: Tue Mar 19, 2024 7:19 pm Either of the Olimex uf2 files will work.

picozx81_olimexpc.uf2 will provide sound over the 3.5mm audio connection
picozx81_olimexpc_hdmi_sound.uf2 will provide sound over the hdmi cable

There was an issue with the original Olimex firmware, where stereo audio over the 3.5mm audio connection was not possible with a display, as the PWM clock for the left audio channel was shared by the pin used for the DVI clock. This was fixed in later releases of picozx81 by using a PIO state machine to generate the DVI clock.
Thanks.
In the meantime, I tried a friend's hybrid monitor/TV with an HDMI input, but there is still no image.
I decided to solder anyway, just to be sure, do I need to solder this two tabs, marked in the picture ?
Image
Exile
Posts: 51
Joined: Tue Jan 03, 2023 9:50 pm

Re: ZX80 / ZX81 Emulator for the Raspberry Pi Pico

Post by Exile »

Yes, the photo shows the two pads that need to be joined.
zx4ever
Posts: 18
Joined: Wed Jun 27, 2018 10:58 pm

Re: ZX80 / ZX81 Emulator for the Raspberry Pi Pico

Post by zx4ever »

Exile wrote: Wed Mar 20, 2024 8:23 am Yes, the photo shows the two pads that need to be joined.
Last night I managed to solder these pins and it finally worked !
There is one minor issue left, but first a few words about the emulator itself.
He is simply awesome and works flawlessly. :)
Very easy to use, all the software I tried works perfectly including hdmi sound.
It's very easy to configure and I especially like the video sync at real 50.6Hz for smooth scrolling.
I really must congratulate you on this great job. :)
First, about issue i mentioned.
When I first ran the emulator through the Olimex board, everything worked great, but after I turned the device off and on, there was no signal again.
It turned out that I had to physically disconnect hdmi cable from the Olimex board when it was powered off, connect it again and after powered on, I got the picture.
Interestingly, reconnecting the hdmi cable while the Olimex is still powered on, does not solve the problem.
This is a strange side effect and its not related to the emulator itself, but it happens always with any software I flashed.
I don't know if there is a solution for this or why it happens, but for some reason only reconnecting the hdmi cable while board is off, fixes this.
So far I can be satisfied that software working well, but it seems that Olimex and my TV, for some reasons are not a happy couple.
I'm no hardware expert, but if anyone knows what would be causing this behavior, I'd love to hear it.
Ofc, it's not a critical problem, but it's certainly annoying.
Just a few more questions about the emulator.
Is it possible to use a video output other than VGA/HDMI, like a simple composite out, somehow?
Also, is there a possibility to get Chroma color support for the remaining supported boards, including this one?
For now, I can only say that its a great pleasure to use this emulator and honestly, I have not seen anything better not only on Pico, but also on some stronger platforms.
Too long post, sorry for that... ;)
Exile
Posts: 51
Joined: Tue Jan 03, 2023 9:50 pm

Re: ZX80 / ZX81 Emulator for the Raspberry Pi Pico

Post by Exile »

Thank you for the feedback, I appreciate it :-)

Sometimes there are options within the TV set-up that can help with re detection of HDMI devices.It may be related to how the TV does hot plug detection through HDMI pin 19. There are some sites that describe workaround for this by blocking connection of pin 19, but I am not an expert in this area and have never tried such a fix. What make of TV has issues with detecting the pico please?

With respect to your questions:

1) Composite
There are no pre-built boards that I know of for the Pico that support composite out. However a veroboard solution could be made as an add-on for the Cytron Maker board. Colour composite output is surprisingly difficult on the Pico. Currently I'm focusing on VGA, HDMI and LCD.

2) HDMI Chroma support
There is better news on Chroma support. Up to now the HDMI support in picozx81 has been monochrome (including a monochrome keyboard image). I am working on a colour HDMI + sound solution that will support Chroma emulation.
zx4ever
Posts: 18
Joined: Wed Jun 27, 2018 10:58 pm

Re: ZX80 / ZX81 Emulator for the Raspberry Pi Pico

Post by zx4ever »

Thanks @Exile for your reply, helpful as always.
I'll try to find out more about that HDMI hotplug fix, but now I have a place to start.
Honestly, I don't know what to say more about that HDMI detection issue, but I can try to do it more precisely.
Basically, if I leave the hdmi cable permanently connected to the Olimex board, the next time I turn it on, I get no signal again.
The only workaround is to disconnect the hdmi cable from the board and reconnect it, before each new session with Pico and this board.
Its important to say again, that this is not related to your emulator or any other software, this is obviously issue between my LCD TV and the Olimex board.
I've had this TV for a long time, connected various devices via the hdmi inputs, but none of them behaved like this.
btw, the TV model is Samsung UE32F5000AW 32".
Exile
Posts: 51
Joined: Tue Jan 03, 2023 9:50 pm

Re: ZX80 / ZX81 Emulator for the Raspberry Pi Pico

Post by Exile »

There is a new release for picozx81 at: https://github.com/ikjordan/picozx81/re ... tag/v1.0.4

This release adds the following, compared to the last release made in November:

+ Colour display emulating Chroma 81 and Chroma 80 for all board types, including HDMI
+ General support for ILI9341 and ST7789 320x240 LCDs on the Cytron Maker Pi Pico board
+ VGA RGB222 with CSYNC on the Cytron Maker Pi Pico board
+ Read support for the .p81 file format
+ Chroma and ARX Examples
+ Updated Readme with more images and description
Exile
Posts: 51
Joined: Tue Jan 03, 2023 9:50 pm

Re: ZX80 / ZX81 Emulator for the Raspberry Pi Pico

Post by Exile »

There is a new release. https://github.com/ikjordan/picozx81/releases

This supports 3 new board types (that makes 9 commercial board types in total):
  • Waveshare RP2040-PiZero (An inexpensive HDMI board, with sound over HDMI)
  • PICOZX with mechanical keyboard by Bobricius (VGA and runtime selectable VGA or LCD builds)
  • PICOZX motherboard for use in original case with original keyboard
It also allows the direct connection and use of 9 pin Atari / Sinclair joysticks on some boards, in addition to the existing USB joysticks support

The PICOZX boards were originally designed for the ZX-Spectrum Pico emulator, so now emulators for the 3 main 8 bit Sinclair computers can be run on the same dedicated hardware.

PICOZX with VGA output
3dmonster.jpg
PICOZX with LCD or VGA output, selectable at runtime
picozx_lcd.jpg
A PICOZX motherboard installed in a Spectrum case, but running as a ZX81
zx81_spectrum.jpg
Full information is at: https://github.com/ikjordan/picozx81
Exile
Posts: 51
Joined: Tue Jan 03, 2023 9:50 pm

Re: ZX80 / ZX81 Emulator for the Raspberry Pi Pico

Post by Exile »

Another large update. Possibly the last one with new features, as it is now at the CPU and RAM limit of the Raspberry Pi Pico. Additions for this release:

TV sound emulation
Select between sync sounds as generated by a TV or by a Chroma card
  • Chroma sound generates sound when the display is not synchronised
  • TV sound generates sound on VSYNC (ZX81) or HSYNC and VSYNC (ZX80)
  • Can now play 1-bit music such the beatles.p, or the programs created by kmurta
More accurate ZX80 hardware emulation
Can now select:
  • ZX80 hardware with 4K and 8K ROM
  • ZX81 hardware with Sinclair and BigBang ROMs
  • Both the ZX81 and ZX80 versions of Metropolis now run correctly
  • The ZX80 hardware emulation is based on the model used in the latest versions of the EightyOne emulator
Code and memory optimisations
Now 15 to 20% faster so:
  • Full speed Chroma emulation
  • Full speed sound emulation
Optional Load and Save graphics and sound
Relive the 1980s with Load and Save effects at cassette speed!
  • Generated through the IN and OUT commands executed during Load and Save. These create the characteristic display and triggers sound pulses to be played through the speakers. The save sounds generated for both the 4K and 8K ROMs have been recorded as wav files and then successfully loaded into the EightyOne emulator
  • When loading, picozx81 will read a p file and generate values which the ROM reads through IN statements. On the ZX81 and ZX80 with 8K ROM this causes sync pulses which create sound and visual effects. Note: A program cannot be loaded directly from a wav file
  • Load and Save sound generation will work regardless of which sound mode is selected in the emulator
No longer patches the ROM to detect load and save
  • This removes the risk of inaccurate emulation of pseudo hi-res displays
Run-time selectable LCD and VGA displays (for PICOZX with LCD)
  • The PICOZX + LCD code generates LCD output by default. To enable VGA output either hold down the the Fire button at start-up, or enable VGA in the config file
Post Reply