ESPectrum, the ESP32 SoC based ZX Spectrum emulator

Struggling with Fuse or trying to find an emulator with a specific feature. Ask your questions here.
Post Reply
User avatar
Eremus
Drutt
Posts: 17
Joined: Sun Feb 05, 2023 12:58 pm
Contact:

ESPectrum, the ESP32 SoC based ZX Spectrum emulator

Post by Eremus »

Hello!

After a few months of work and preparation, and after presenting the project on Saturday, June 3rd, at RetroReal (Ciudad Real, Spain), we are proud and excited to introduce:

Image

What is ESPectrum?

ESPectrum is an emulator of the 48K and 128K models of the Sinclair ZX Spectrum microcomputer that runs on Espressif ESP32 microcontrollers.

A microcontroller is a small computer dedicated to specific tasks (usually industrial) with limited processing power, memory, and storage. Fortunately, even with its limitations, the ESP32 has proven to have sufficient processing power for the development and execution of various emulation projects.

The chip is offered to manufacturers and makers for integration into other boards, and luckily for us, there are boards on the market that, in addition to the ESP32, include the necessary electronics, components, and connectors for the perfect operation of our project. One of the most affordable options is the Lilygo TTGo VGA32 board.

This small board includes everything needed for enjoying an emulated Spectrum, at a price of around €15: a VGA connector, two PS/2 connections for keyboard and mouse, a pre-amplified minijack audio output, an SD card slot, and a microUSB connector for power and USB communication.

We have also collaborated with Antonio Villena, a well-known retro hardware manufacturer who has created a compatible board for the project, featuring some enhancements, including the ability to use a real Sinclair ZX Spectrum keyboard as an input device.

Image

Therefore, if we have a board equipped with the necessary connectors, a keyboard that supports the PS/2 protocol or a real ZX Spectrum keyboard, a VGA monitor, and, although not essential since the ESP32 includes internal storage, a microSD card as a storage medium, thanks to ESPectrum, we can enjoy a mature and accurate emulator that perfectly implements features such as contended memory, floating bus, beeper and AY sound, cycle-perfect timing, and video generation identical to the real machine.

In its latest version, it can be connected not only to standard VGA monitors but also to CRT televisions through a simple modification to the Lilygo board (with direct support on Antonio Villena's ESPectrum board) and a quite affordable adapter using the exact video refresh rate as that of an original Sinclair ZX Spectrum.

Image

Features:

- Emulation of Spectrum 48K and 128K (no PSRAM required).
- Accurate Z80 emulation (core by José Luis Sánchez AKA zx81, author of the magnificent ZXBaremulator).
- Standard VGA, VGA 50hz, and CRT 50hz video modes.
- Support for 16:9 and 4:3 aspect ratios (using 360x200 or 320x240 modes).
- Emulated multicolor attribute effects (Bifrost*2, Nirvana, and Nirvana+ engines).
- Emulated border effects (Aquaplane, The Sentinel, Overscan demo).
- Emulated floating bus effect (Arkanoid, Sidewize).
- Contended memory and contended I/O emulation.
- AY-3-8912 sound emulation.
- Beeper & Mic emulation respecting their relative output levels (Cobra's Arc).
- PS/2 keyboard support and real Spectrum keyboard support (using Antonio Villena's ESPectrum board).
- Kempston and Cursor joystick emulation.
- Full OSD menu in two languages: English and Spanish.
- Real-time loading of TAP files.
- Loading of SNA and Z80 snapshots.
- Saving and loading of snapshots (both 48K and 128K supported).
- BMP screenshot capture to SD card.
- Simultaneous support for internal storage (SPIFFS) and external storage (SD card).

You can find more information on the project's website (still in Spanish, there will be an English version soon): https://zxespectrum.speccy.org, and on the Github repository: https://github.com/EremusOne/ZX-ESPectrum-IDF

We have also opened a Patreon at https://www.patreon.com/ESPectrum in case you would like to support the project.

The binaries for the latest version and the instructions for flashing them are now available at https://github.com/EremusOne/ZX-ESPectr ... g/v1.0.rc1 , and here are the release notes:
New features:

- Support for the real Spectrum 48K keyboard using the new ESPectrum board by Antonio Villena. From now on, there will be two binaries: one for the Lilygo VGA32 board and similar ones, and another for Villena's board.

- Support for three video modes: Standard VGA (60 and 70hz), VGA 33-40k 50hz, and CRT 15k 50hz. For VGA 50hz modes, you only need a monitor that supports them. The CRT 50hz mode is supported on the ESPectrum board through Antonio Villena's VGA-Scart adapter (it also works on the Lilygo board, but a small trick is required, which we will detail on the ESPectrum website).

You can switch between modes using the following key combinations during the emulator's boot sequence, and later check the current video mode on the bottom bar of the help screen:

1 + Q -> Standard VGA 4:3 (60hz)
1 + W -> Standard VGA 16:9 (70hz)
2 + Q -> VGA 40khz 50hz 4:3
2 + W -> VGA 33khz 50hz 16:9
3 + Q -> CRT 15khz 50hz 4:3
3 + W -> CRT 15khz 50hz 16:9

(On PS/2 keyboards, you should alternate between the two keys. On the ZX Spectrum keyboard, you can keep both keys pressed.)

Changes:

- More optimizations: improved emulation speed.
- Improved menu system: you can smoothly navigate forward and backward in menu levels.
- Multicolor "ESPectrum" name in the main menu.

Known issues:

- In rare cases, the sound may not initialize when starting the emulator or may become corrupted or muted after loading an SNA, Z80, or snapshot. Restarting the ESP32 (using F12 or turning it off and on) always solves the issue.
Regards!
User avatar
Nitrowing
Manic Miner
Posts: 616
Joined: Mon Sep 21, 2020 8:38 pm
Location: Cleethorpes

Re: ESPectrum, the ESP32 SoC based ZX Spectrum emulator

Post by Nitrowing »

i'm sure I have a pair of Lilygo TTGo VGA32 boards in my drawer somewhere... never even plugged them in to anythying
User avatar
Pegaz
Dynamite Dan
Posts: 1210
Joined: Mon Nov 13, 2017 1:44 pm

Re: ESPectrum, the ESP32 SoC based ZX Spectrum emulator

Post by Pegaz »

I like this project, really nice job.
Antonio's offer is currently out of stock, Is the price of 39 eur with or without the Spectrum case ?
Is it possible to load from an audio source, like ZX-Uno or at least pzx/tzx for custom loaders ?
User avatar
Eremus
Drutt
Posts: 17
Joined: Sun Feb 05, 2023 12:58 pm
Contact:

Re: ESPectrum, the ESP32 SoC based ZX Spectrum emulator

Post by Eremus »

Nitrowing wrote: Wed Jun 28, 2023 9:19 am i'm sure I have a pair of Lilygo TTGo VGA32 boards in my drawer somewhere... never even plugged them in to anythying
Then give it a try, I'm sure you'll like it :)

Even if your board is a 1.2 version (older). ESPectrum runs on TTGO VGA 1.2 and 1.4 boards because it doesn't need PSRAM.

Regards
User avatar
Eremus
Drutt
Posts: 17
Joined: Sun Feb 05, 2023 12:58 pm
Contact:

Re: ESPectrum, the ESP32 SoC based ZX Spectrum emulator

Post by Eremus »

Pegaz wrote: Thu Jun 29, 2023 7:49 pm I like this project, really nice job.
Antonio's offer is currently out of stock, Is the price of 39 eur with or without the Spectrum case ?
Is it possible to load from an audio source, like ZX-Uno or at least pzx/tzx for custom loaders ?
Thanks Pegaz!

39 eur is the price for the board only. With repro case I think its price its 89 eur (Disclaimer: we have no business with Antonio Villena's store. We've just collaborated with him in order to have a very cool option to run our emu)

You can always buy a Lilygo board (about 15 eur shipping included at Aliexpress) and run the emu on it. The only difference right now is the support for real ZX keyboard.

The real audio source loading is something we have on roadmap but it's soon to talk about it: it will require a lot of testing and coding but it's something we'd like ESPectrum be able to do in the future.
User avatar
oO cozy Oo
Manic Miner
Posts: 240
Joined: Sun Mar 28, 2021 2:00 pm
Location: Walsall UK

Re: ESPectrum, the ESP32 SoC based ZX Spectrum emulator

Post by oO cozy Oo »

This is a great project, well done!!!
Be Safe! Be Happy! and have some Speccy FUN!!!
highrise
Manic Miner
Posts: 321
Joined: Fri Mar 20, 2020 11:29 pm

Re: ESPectrum, the ESP32 SoC based ZX Spectrum emulator

Post by highrise »

This is not connected to Es.pectrum right? one of my favourite emulators. Could be confusing.

https://www.habisoft.com/espectrum/EN.htm
User avatar
PeterJ
Site Admin
Posts: 6930
Joined: Thu Nov 09, 2017 7:19 pm
Location: Surrey, UK

Re: ESPectrum, the ESP32 SoC based ZX Spectrum emulator

Post by PeterJ »

highrise wrote: Fri Jul 07, 2023 12:01 pm This is not connected to Es.pectrum right? one of my favourite emulators. Could be confusing.

https://www.habisoft.com/espectrum/EN.htm
No, the ESP is one of a series of IoT devices from:

https://www.espressif.com/

It's just a coincidence.
User avatar
ZjoyKiLer
Dizzy
Posts: 67
Joined: Thu Sep 09, 2021 3:20 pm

Re: ESPectrum, the ESP32 SoC based ZX Spectrum emulator

Post by ZjoyKiLer »

Presentation of the new version 1.0 rc2

User avatar
PeterJ
Site Admin
Posts: 6930
Joined: Thu Nov 09, 2017 7:19 pm
Location: Surrey, UK

Re: ESPectrum, the ESP32 SoC based ZX Spectrum emulator

Post by PeterJ »

Hi @ZjoyKiLer,

Great project!

For the UK readers, please could you confirm this is the correct board from Olimex board that you mention?

https://thepihut.com/products/olimex-es ... 4410253507

Are there any plans for English language installation video please?

Thanks
Peter
XoRRoX
Manic Miner
Posts: 233
Joined: Wed Jul 11, 2018 6:34 am

Re: ESPectrum, the ESP32 SoC based ZX Spectrum emulator

Post by XoRRoX »

PeterJ wrote: Fri Sep 01, 2023 9:17 pm Are there any plans for English language installation video please?
I just installed my Lilygo board with the video and info @ Github, @PeterJ. If you like you can also turn on CC with auto-translate.
As the instructions in the video are only for the Lilygo and Antonio's board, I think the Olimex one needs different instructions anyway.
User avatar
ZjoyKiLer
Dizzy
Posts: 67
Joined: Thu Sep 09, 2021 3:20 pm

Re: ESPectrum, the ESP32 SoC based ZX Spectrum emulator

Post by ZjoyKiLer »

PeterJ wrote: Fri Sep 01, 2023 9:17 pm Hi @ZjoyKiLer,

Great project!

For the UK readers, please could you confirm this is the correct board from Olimex board that you mention?

https://thepihut.com/products/olimex-es ... 4410253507

Are there any plans for English language installation video please?

Thanks
Peter
Hey, it's not me. The video is from @Eremus :)
User avatar
Eremus
Drutt
Posts: 17
Joined: Sun Feb 05, 2023 12:58 pm
Contact:

Re: ESPectrum, the ESP32 SoC based ZX Spectrum emulator

Post by Eremus »

XoRRoX wrote: Sat Sep 02, 2023 10:20 pm I just installed my Lilygo board with the video and info @ Github, @PeterJ. If you like you can also turn on CC with auto-translate.
As the instructions in the video are only for the Lilygo and Antonio's board, I think the Olimex one needs different instructions anyway.
Hi there!

My teammate, David Crespo, didn't have an Olimex board yet when he prepared the tutorial but the flashing procedure is exactly the same as for the other boards.

Also, since version 1.0rc2, the bin file is the same for the three boards.

Anyway, feel free to ask any doubt ;)
User avatar
Eremus
Drutt
Posts: 17
Joined: Sun Feb 05, 2023 12:58 pm
Contact:

Re: ESPectrum, the ESP32 SoC based ZX Spectrum emulator

Post by Eremus »

Hi Peter,
PeterJ wrote: Fri Sep 01, 2023 9:17 pm Great project!
Tyvm ;)
PeterJ wrote: Fri Sep 01, 2023 9:17 pm For the UK readers, please could you confirm this is the correct board from Olimex board that you mention?

https://thepihut.com/products/olimex-es ... 4410253507
That's the right board yes :)
PeterJ wrote: Fri Sep 01, 2023 9:17 pm Are there any plans for English language installation video please?
It's quite easy don't worry. You can find instructions in english at the release page:

https://github.com/EremusOne/ZX-ESPectr ... g/v1.0.rc2

Also, as XoRRoX noted before, you can turn on auto-translate at flashing tutorial:
)
It does a very accurate translation IMHO
Post Reply