Giter Club home page Giter Club logo

pico-zxspectrum's Introduction

pico-zxspectrum

48k/128k ZX Spectrum for Raspberry Pico Pi RP2040

This project is intended to be relatively easy to breadboard or prototype in some other way. It's just for fun and not a highly accurate emulation; hopefully it is good enough to be enjoyable.

Features

  • DVI/HDMI (Wren's Amazing PicoDVI)
  • LCD support (ST7789/ILI9341 320x240)
  • VGA video (RGB332, RGB222, RGBY1111)
  • USB keyboard & Joysticks
  • PS/2 keyboard
  • Martix keyboard
  • HDMI/PWM/I2S DAC audio for 48k buzzer and AY-3-8912
  • Audio input (load from tape)
  • 12 quick save slots
  • Load from .z80 snapshot files
  • Read from .tap & .tzx tape files
  • On screen menu system
  • Kempston and Sinclair joystick emulation
  • Kempston mouse emulation

Updates

11/08/24

  • In menu Spectrum keyboard to aid joystick use thanks to @DPRCZ

04/08/24

  • USB joystick can now be used for menu navigation thanks to @DPRCZ

22/07/24

  • Added support for USB mouse to act as joystick, with settings in the menu. Thanks to @javavi
  • Fixed an issue at with SD card access on startup; startup should be quicker and more reliable. Thanks to @LiCaNtRoPo-PCB

08/07/24

  • Added support for Kempston Mouse thanks to @javavi

23/06/24

  • Improvements for Kempston Joystick emulation thanks to @javavi

27/05/24

  • Handle longer HID descriptors for USB joysticks

13/05/24

  • CAPS-4 for page down and CAPS-9 for page up on rubber keyboard.
  • Simple first letter matching on Snapshot and Tape selectors.

11/05/24

  • Broader joystick/gamepad support (thanks to DPRCZ)

more...

Boards

Click on the images below for more inforation ...

Board Notes
HDMI breadboard Some breadboard HDMI options
VGA breadboard Some breadboard VGA options
PICO ZX48/128 ZX Spectrum 48K replacement board by Bobricius
PICOZX LCD ZX Spectrum with LCD and VGA by Bobricius
PICOZX ZX Spectrum with VGA by Bobricius
RetroVGA VGA micro-computer by Bobricius
PicomputerMax LCD micro-computer by Bobricius
PicomputerZX ZX Spectrum with LCD by Bobricius
Pimoroni Pico DV Pimoroni's Pico DV board
Pimoroni Pico VGA Pimoroni's Pico VGA board
HDMI + key matrix Breadboard with key matrix support
ArnoldUK Arnold UK's board
MURMULATOR Micro with VGA/HDMI and more
RP2040-PiZero Waveshare RP2040-PiZero Development Board

Screen shots

Audio samples

Firmware targets

Pre-built binary targets can be copied directly to a Pico Pi. They can be downloaded from the links on the page for the board below or found in the uf2 folder.

Before attempting to update the firmware on your Pico make sure power supplies and any USB host devices have been disconnected (hub, keyboard, joysticks, etc.).

Push and hold the BOOTSEL button and plug your Pico into the USB port of your computer. Release the BOOTSEL button after your Pico is connected. It will mount as a Mass Storage Device called RPI-RP2. Drag and drop the UF2 file onto the RPI-RP2 volume.

On hardware with a faceplate the button is usually accessible through a small hole; the PICOZX Lcd board has the Pico facing inwards and you will need to reach a finger inside to press the bootsel button.

e.g. for the HDMI breadboard wiring show above use:

cp ZxSpectrumBreadboardHdmi4PinAudio.uf2 /media/pi/RPI-RP2/

Audio output

There are three techniques for audio output.

  • A mixture of digital sound and PWM output, which comes in three variants.
  • A DAC connected to the Pico using I2S.
  • Audio over HDMI to the display.

PWM/Digital Audio

PWM audio output comes in 3 variants, using 1, 2 and 4 pin:

Label 1 Pin 2 Pin 4 Pin
RP AUDIO1 Buzzer & AY-3-8912 PWM AY-3-8912 PWM AY-3-8912 Channel A PWM
RP AUDIO2 - Buzzer Buzzer
RP AUDIO3 - - AY-3-8912 Channel B PWM
RP AUDIO4 - - AY-3-8912 Channel C PWM

High frequencies need to be filtered out of the PWM audio output and mixed with the Spectrum's digital audio. Here are some sample designs. Please note they are not carefully designed but made from components I found lying around. If you create a particularly nice sounding design please let me know and I will add it to the documentation.

Separating out the Spectrum buzzer from the AY-3-8912 improves the fidelity of the Spectrum beeps.

image

The best audio is achieved by having separate pins for the Spectrum buzzer and AY-3-8912 A,B & C channels.

image

The sound is actually quite good from the 4 pin filter and at some point I will do a stero version.

Designs that only have a single GPIO pin available can have the audio mixed digitally:

image

I2S DAC Audio

The emulation can drive a PCM5100A DAC for line out audio over I2S. It uses the RP_DAC_DATA, RP_DAC_BCLK and RP_DAC_LRCLK pin on the Pico. Currently, only tested on the Pimoroni Pico DV board.

HDMI audio

HDMI builds can now output 44.1kHz audio to the display.

Video output

DVI/HDMI

The following circuit shows roughly how to connect an HDMI socket; I have always used a breakout board...

...but this is what I think it boils down to:

image

So far, there are three supported VGA configurations, which can be found in the various build targets. They have all been designed with a combination of plagiarism and guesswork, so please let me know if you have better versions and I will update this document.

VGA RGBY 1111

Although this is the most complicated, it is my favourite as it only uses 5 pins on the Pico. The display is slightly paler than the other two versions, which is easier on the eyes.

image

See this CMakeLists.txt for an example configuration.

VGA RGB 222

image

See this CMakeLists.txt for an example configuration.

VGA RGB 332

image

See this CMakeLists.txt for an example configuration.

PS/2 Keyboards

The emulator targets can accept input from a PS/2 keyboard wired to RP_PS2_DATA and RP_PS2_CLK. A suggested circuit is shown below:

image

The resistors and Zeners are there in case the keyboard contains a pull-up resistor to 5v on either the data or clock lines; the data and clock lines are, in theory, open-collector with no pull-up.

I'm told most PS/2 keyboards can be run at 3.3v and the the extra components become redundant... but I've not tried with mine. You may find the Pico struggles to deliver enough power at 3.3v for the SD card writes and running a keyboard.

Currently there is no toggling on the lock keys (caps/num lock) and the indicator leds are not used.

Audio Input

Due to a great deal of help from badrianiulian, here is a suggested audio input circuit:

image

Suggestions to improve this circuit are appreciated and please post them here.

Components

Pico pinout

image

Display considerations

Firstly, the emulation does not have a screen buffer, and there is not enough RAM left to add one. Whichever dsiplay you use, it will not have exactly the same timing as the old PAL monitors. This is particularly noticable on 60Hz displays with programs on the Spectrum that try to synchronize their output with the display, or use the frame rate to control the speed of music. I'm gradually adding 50Hz modes to firmware for various boards.

Joysticks

There is basic support for connecting USB joysticks and have them appear as Kempston or Sinclair joysticks to the Spectrum.

For joysticks to work they have to provide a HID report, which is usually the case for generic PC joypads. Some manufacturers make joysticks that don't report their behaviour and hence require custom drivers; these are not going to work.

Basically, I don't know how many different joysticks will be usable. If you are having trouble raise an issue and attach a HID report descriptor from your device and I will have a look at it.

To get this to work I have done some hacking and slashing in TinyUSB (sorry Ha Thach):

https://github.com/fruit-bat/tinyusb/tree/hid_micro_parser

Build

The version of TinyUSB in the Pico SDK will need to be replaced with a version containing a HID report parser and USB hub support.

Using git protocol:

cd $PICO_SDK_PATH/lib/
mv tinyusb tinyusb.orig
git clone [email protected]:fruit-bat/tinyusb.git
cd tinyusb
git checkout hid_micro_parser

...or using https protocol:

cd $PICO_SDK_PATH/lib/
mv tinyusb tinyusb.orig
git clone https://github.com/fruit-bat/tinyusb.git
cd tinyusb
git checkout hid_micro_parser

Make a folder in which to clone the required projects e.g.

mkdir ~/pico
cd ~/pico

Clone the projects from github:

Using git protocol:

git clone [email protected]:raspberrypi/pico-extras.git
git clone [email protected]:fruit-bat/PicoDVI.git
git clone [email protected]:fruit-bat/pico-vga-332.git
git clone [email protected]:fruit-bat/pico-zxspectrum.git
git clone [email protected]:pimoroni/pimoroni-pico.git
git clone [email protected]:fruit-bat/pico-dvi-menu
git clone [email protected]:fruit-bat/pico-emu-utils
git clone [email protected]:redcode/Z80.git
git clone [email protected]:redcode/Zeta.git

...or using https protocol:

git clone https://github.com/raspberrypi/pico-extras.git
git clone https://github.com/fruit-bat/PicoDVI.git
git clone https://github.com/fruit-bat/pico-vga-332.git
git clone https://github.com/fruit-bat/pico-zxspectrum.git
git clone https://github.com/pimoroni/pimoroni-pico.git
git clone https://github.com/fruit-bat/pico-dvi-menu
git clone https://github.com/fruit-bat/pico-emu-utils
git clone https://github.com/redcode/Z80.git
git clone https://github.com/redcode/Zeta.git

Edit:

pimoroni-pico/drivers/fatfs/ffconf.h

and set FF_USE_FIND to 1

#define FF_USE_FIND            1

Switch to the audio branch of PicoDVI

cd PicoDVI
git checkout audio
cd -

Perform the build:

cd pico-zxspectrum
mkdir build
cd build
cmake -DPICO_COPY_TO_RAM=0 ..
make clean
make -j4

Building for the Pimoroni Pico VGA Demo Base needs a different cmake command:

cd build
cmake -DPICO_COPY_TO_RAM=0 -DPICO_BOARD=vgaboard ..
make -j4 ZxSpectrumPicoVga

Copy the relevant version to your board, which can be located with:

find . -name '*.uf2'

e.g.

cp ./bin/breadboard_hdmi/ZxSpectrumBreadboardHdmi.uf2 /media/pi/RPI-RP2/

Prepare an SD card

I have used the following SD card formats:

2 GB FAT16
2 GB FAT32
4 GB W95 FAT32 (LBA)

The table shows the folders used by the emulator on the SD card. If not already present, they will be created as the emulator starts up.

Folder Contents
zxspectrum/snapshots Put your .z80 snapshot files in here.
zxspectrum/snapshots/quicksaves Folder for quick saves.
zxspectrum/tapes Folder for .tap and .tzx tape files.

USB and PS2 Keyboard mappings

Key Action
AltGr Symbol
F1 Toggle on screen menu
F3 Toggle mute
F4 Toggle the Z80 moderator. Cycles through 3.5Mhz, 4.0Mhz and unmoderated
F8 Reload current snap
F9 previous snap
F10 next snap
F11 Reset as 48k Spectrum
F12 Reset as 128k Spectrum
LCtrl + F1-F12 Quick save (LCtrl+F1 = save slot 1, LCtrl+F2 = save slot 2, etc)
LAlt + F1-F12 Quick load (LAlt+F1 = load slot 1, LAlt+F2 = load slot 2, etc)

Debug

Pico pin Pico GPIO Adapter wire
1 GP0 White
2 GP1 Green
3 GND Black
tio -m ODELBS /dev/ttyUSB0

Thanks to

CarlK for the super no OS FAT FS for Pico
Damien G for maintaining and publishing some wonderful 8-bit fonts
Wren for the amazing PicoDVI
hathach for the embeded USB library TinyUSB
Lin Ke-Fong for the Z80 emulator
Pimoroni for lots of useful libraries
badrianiulian for help testing and design work on the audio circuitry
redcode for the Z80 emulator
Javavi for adding support for the MURMULATOR platform
ikjordan for his audio additions to PicoDVI

References

Z80 Test suite
Wren's Amazing PicoDVI
Z80 file format documentation
Fonts by DamienG
breakintoprogram - Screen memory layout
breakintoprogram - keyboard layout
breakintoprogram - interrupts
worldofspectrum - 48k ZX Spectrum reference
worldofspectrum - 128k ZX Spectrum reference
worldofspectrum - AY-3-8912 reference
JGH Spectrum ROM
48k ZX Spectrum service manual
GOSH ZX Spectrum ROM
Cassette input circuit design
ZX Spectrum ROM Images
AY-3-8912 - manual
AY-3-8912 - synth
USB HID 1.1
ST7789 LCD driver reference
RGB for 128k ZX Spectrum
PS/2 vs HID keyboard codes
PCM 5100A DAC
RP2040 Datasheet
Z80 Instruction set with XYH
Z80 Instruction set
Site with some WAV files
ZX Modules Software
TZX format
A decoder for ZX format
Circuit diagram editor

Interesting projects

Hermit Retro Products

pico-zxspectrum's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pico-zxspectrum's Issues

Kempston joystick issiue on PicoZX VGA Board with Pico W

Hi,

I build myself a PicoZX with VGA boards from Bobricius:
https://www.tindie.com/products/bobricius/picozx-zx-spectrum-128k-vga-emulator-on-rpi-pico/
with Fruit-bat onboard. However I used Pico W instead a regullar Pico and have a "semi non-working" 9pin- Kempston joystick on many games. Strange behaviour as around 20% .z80 are working flawlessly, 20% .z80s are freezing and the rest around 60% of .z80 are compleatly non responsive at all ;-(

PS:Joysticks are Competion Pro & 2xQuickshots(xtested on ZX Spectrum +2A and Clones like Didaktik Gama/M tested & fully working)

Thanks for any help or support

CVBS output

I don't know how to do this but it is interesting!

60 Hz refresh rate

** Raised on behalf of https://github.com/javavi **

There are a number of issues that I am currently working on and need your
advice.

  • 60Hz interrupt rate is not native to ZX Spectrum which has a 50Hz
    interrupt rate
    Because of this, the music is distorted, plays faster, a number of games
    crash.
    I've experimented with different approaches to convert interrupts to 50Hz.
    Music, gameplay restored to normal, but interrupts are out of sync with
    frame rate.
    Created a border buffer to display the border correctly but the border
    effects are jittery, maybe
    there is no clear stability in the execution time of processor command
    cycles.
    A more correct approach for negotiation is a frame buffer into which the
    input process writes to
    line emulation frequency of 50Hz, and the output process at VGA 60Hz.
    This approach is used by the authors of emulators for MURMULATOR and gives
    a good result.

Audio input suggestion

Since I figure that the ultimate goal is to recreate all functionality of the original ZX Spectrum, I am thinking that by using some modified hardware (or some new one even) from this microphone library, this goal can be achieved.
By adding a 100uF for isolation purposes as the guidelines for the analog module say maybe we can reach the goal.
I may be able (and willing) to test some hardware... I'm no audiophile but I got the tools to make what I usually need so that the analog "Line In" function can be available for the old cassette players out there... maybe even a save to ".tap" directly to the SD Card at the end... for comparison purposes since I still remember how error prone was this process in the old days.
I can try some different ways with the hardware part (will research more this part so we don't fry the pico) but since all this work is your baby, only you know if the analog part of the library can be adjusted to work with all the different layouts and if one input pin is available.

SD card access results in audio under-run

I think I just need the PIO program to emit the last value if no new values are available.
Currently, each under-run results in a 'tap' as the DAC mute switches on and off.

Firmware update manual needed

I have PICOZX and I'd like to be able to update my firmware once in a while.
Could you please add a section to the README.md file on how to do it?
Or if it's already explained somewhere, please just refer me to that manual.

Compiling with USB and Keyboard mapping question ?

I'm compiling the source on raspbian which is all setup and building fine but not sure which git source to use for the pico_sdk_extras with TinyUSB sources for HID keyboard. I'm currently following the instructions in the readme which
is to delete the original TinyUSB and use the following for TinyUSB:
cd $PICO_SDK_PATH/lib/
mv tinyusb tinyusb.orig
git clone [email protected]:fruit-bat/tinyusb.git
cd tinyusb
git checkout hid_micro_parser
Is this correct as conflicting info in the readme suggested by Ryzee119 are getting harder to merge into the latest code ? What is the correct way to make sure the TinyUSB sources are cloned from git ?

Also, attempting to remap the keyboard GPIO I found this defined macro function in pzx_keyscan.map
#define CP_JOIN_PZX(a) ((a & 15) | ((a >> 3) & (7 << 4)))
What exactly does this function do and what do and how does it relate to the other defines set for the GPIO Pins:
#define CN_PZX 7
#define RN_PZX 7
#define CP_PZX 19, 20, 21, 22, 26, 27, 28
#define RP_PZX 8, 9, 14, 15, 16, 17, 18
#define CP_SHIFT_PZX 19
Thanks and this a really interesting project to work on! Hoping to contribute somthing myself when I'm familair with the source code.

Composite Video output from VGA signals

I've been working on getting a composite video out signal by using an AD724 and the circuit taken from the datasheet, also used here for the Amstrad CPC.

Problem is that although I can get a colour image on my monitor, there is some kind of sync issue as the image is not stable and appears to roll around. I was wanting to find out if anyone has managed to get a stable composite video out signal ? I think the issue is to do with the CSYNC signal or timing from the Pi to the SYNC signal on the AD724. Or maybe there is a simpler circuit than using an AD724 decoding IC.

Pico W ?

Hi ,

Is it possible to use PicoW instead of a standard one? The Wi-fi options could be quite handy ;-D
Dont you think?

Thanks & regards for any feedback

Can not read .tap files from SD card.

I've hooked up the ZxSpectrum4PinAudioVga1111Ps2 on a perforated breadboard, it is working very well, except the fact that I can not read any .tap filefrom the SD card. I can do load .z80 files and save/load the snapshots. The Keyboard F5/F6/F7 keys are good, the .tap files are good (tested on an emulator).
Steps I am doing:
1 - Press F1,
2 - Choose .tap file,
3 - Motor on,
4 - Esc to go back to ZX screen,
5 - Press F5.
I've tried other ways with no success.

I created the folders as per instructions:
zxspectrum/snapshots Put your .z80 snapshot files in here.
zxspectrum/quicksaves Folder for quick saves.
zxspectrum/tapes Folder for .tap tape files.

Using F5/F6/F7 as per instructions:
F5 play current tape
F6 play previous tape
F7 play next tape

Any clue?

Thanks a lot.

Keyboard

I'm using a Pimoroni Pico VGA and everything works fine, except the USB keyboard. Only the basic keys work correctly on it, but it is impossible to get special characters through which it is impossible to program in Basic. :( Is there any way to get the correct key mapping of a standard USB keyboard? (Great project btw :) ).

Picomputer

Map Picomputer backspace key to Spectrum shift-0

Regarding Audio output

I think you should change the circuits for the audio pwm pin and discard the digital pin. The bad sound on the pwm pin is surely from wrongly used RC components.
Look at the audio circuit for Raspberry Pi.
By doing some math with a RC High Pass Filter calculator they allow frequencies over ~106 Hz and with a RC Low Pass Filter calculator they allow frequencies under ~17871 Hz.
Humans can detect sounds in a frequency range from about 20 Hz to 20000 Hz.
The BAV99 are used for ESD protection (electrostatic discharges).
I've been following your project and been waiting for components to build it.

cannot find hid_rip.h

Hi, I'm trying to compile the current sources with tinyusb and libdvi but I got error missing hid_rip.h referenced by hid_host_joy.h of pico-emu-utils - where can I get this file?

Flickering sprites in some games.

I've had some time over the weekend to play around with the emulator and in some games, Ghosts n Goblins for example, display sprite flickering, although the game plays fine. I'm using the VGA out build BTW.
Is this a known issue ?

I've noticed in the main.cpp code and the core1_main function that there is a comment in the code at this line:

if (y == 239) { // TODO use a const / get from vmode

Not quite sure what this means for what the 239 means either. I've also played around with changing the loop
variable i in this code here:
void __not_in_flash_func(main_loop)()
if (!showMenu) { for (int i = 1; i < 100; ++i) { if (lastInterruptFrame != _frames) { lastInterruptFrame = _frames; zxSpectrum.interrupt(); } zxSpectrum.step(); } } else if (frames != _frames) { frames = _frames; picoDisplay.refresh(); } }

Didn't make much of a differnece though but setting too high or too low would crash the emulator.

ps2kbd.h missing

Good afternoon,

I'm trying config ps2 and i need swap pines clk and data from keyboard, and I cant find ps2kbd.h.

Can you tell me where i can get it?

Best Regards.

Support for original ZX Spectrum Keyboard?

Hi Guys!

LOVE THIS PROJECT!

I´m wondering if it´s a way to use the original keyboard of a ZX Spectrum directly wo the Raspberry Pico for more enjoy of the project!?

I´ve one to make tests if needed.

Keep up going the good work!

Regards

SAVE "MyProgram" doesn't save anything

It would be nice be able to save a BASIC program or CODE.

Without it, the only way for me to save my mega program in BASIC is in the Snaps, of which I only have one available (I still haven't found a keyboard to work with my PICOZX). Which means I need to plug my micro SD in a computer to do the renaming to have more Snaps.

SD Card reading stuck on lots of files

Hi, noticed the SD Card loading gets stuck if I have a lot of files on the SD Card (280). Is it possible to add support for subfolders so we can have big collections in on a single SD Card (tried with subfolders and it doesn't display anything)? around 50 files works fine (talking about the tapes folder)

PS. Thanks for this amazing piece of work !

build failure

Setup environment and can build, compile and make other applications - so the environment is okay.

Followed the readme instructions as defined;

cmake -DPICO_COPY_TO_RAM=0 -DPICO_BOARD=vgaboard ..

Using PICO_SDK_PATH from environment ('/opt/pico-sdk')
PICO_SDK_PATH is /opt/pico-sdk
Defaulting PICO_PLATFORM to rp2040 since not specified.
Defaulting PICO platform compiler to pico_arm_gcc since not specified.
-- Defaulting build type to 'Release' since not specified.
PICO compiler is pico_arm_gcc
Using PICO_EXTRAS_PATH from environment ('/home/tony/dev/pico/c-code/pico-extras')
-- The C compiler identification is GNU 10.3.1
-- The CXX compiler identification is GNU 10.3.1
-- The ASM compiler identification is GNU
-- Found assembler: /usr/bin/arm-none-eabi-gcc
Build type is Release
PICO target board is vgaboard.
Using board configuration from /opt/pico-sdk/src/boards/include/boards/vgaboard.h
-- Found Python3: /usr/bin/python3.10 (found version "3.10.6") found components: Interpreter 
TinyUSB available at /opt/pico-sdk/lib/tinyusb/src/portable/raspberrypi/rp2040; enabling build support for USB.
cyw43-driver available at /opt/pico-sdk/lib/cyw43-driver
lwIP available at /opt/pico-sdk/lib/lwip
lwIP available at /home/tony/dev/pico/c-code/pico-extras/lib/lwip/src/core/tcp.c; TCP/IP support is available.
Zeta v0.1
CMake Warning (dev) at /usr/share/cmake-3.22/Modules/GNUInstallDirs.cmake:239 (message):
  Unable to determine default CMAKE_INSTALL_LIBDIR directory because no
  target architecture is known.  Please enable at least one language before
  including GNUInstallDirs.
Call Stack (most recent call first):
  /home/tony/dev/pico/c-code/zxspectrum/Zeta/CMakeLists.txt:17 (include)
This warning is for project developers.  Use -Wno-dev to suppress it.

Z80 v0.2
-- Found Zeta: /home/tony/dev/pico/c-code/zxspectrum/Zeta (found version "v0.1") 
-- Configuring done
-- Generating done
-- Build files have been written to: /home/tony/dev/pico/c-code/zxspectrum/pico-zxspectrum/build

however when I get to this point the build fails:
make -j4 ZxSpectrumPicoVga

[ 37%] Building C object bin/picovga/CMakeFiles/ZxSpectrumPicoVga.dir/opt/pico-sdk/src/rp2_common/pico_stdlib/stdlib.c.obj
[ 37%] Building C object bin/picovga/CMakeFiles/ZxSpectrumPicoVga.dir/opt/pico-sdk/src/rp2_common/hardware_gpio/gpio.c.obj
/home/tony/dev/pico/c-code/zxspectrum/pico-zxspectrum/src/ZxSpectrumMenu.cpp: In member function 'void ZxSpectrumMenu::nextSnap(int)':
/home/tony/dev/pico/c-code/zxspectrum/pico-zxspectrum/src/ZxSpectrumMenu.cpp:452:39: error: type-specifier invalid in lambda
  452 |   _chooseSnap.next([](FILINFO* finfo) bool {
      |                                       ^~~~
[ 37%] Building C object bin/picovga/CMakeFiles/ZxSpectrumPicoVga.dir/opt/pico-sdk/src/rp2_common/hardware_claim/claim.c.obj
[ 37%] Building C object bin/picovga/CMakeFiles/ZxSpectrumPicoVga.dir/opt/pico-sdk/src/rp2_common/pico_platform/platform.c.obj
[ 37%] Building C object bin/picovga/CMakeFiles/ZxSpectrumPicoVga.dir/opt/pico-sdk/src/rp2_common/hardware_sync/sync.c.obj
[ 37%] Building C object bin/picovga/CMakeFiles/ZxSpectrumPicoVga.dir/opt/pico-sdk/src/rp2_common/hardware_irq/irq.c.obj
[ 37%] Building ASM object bin/picovga/CMakeFiles/ZxSpectrumPicoVga.dir/opt/pico-sdk/src/rp2_common/hardware_irq/irq_handler_chain.S.obj
[ 37%] Building C object bin/picovga/CMakeFiles/ZxSpectrumPicoVga.dir/opt/pico-sdk/src/common/pico_sync/sem.c.obj
make[3]: *** [bin/picovga/CMakeFiles/ZxSpectrumPicoVga.dir/build.make:622: bin/picovga/CMakeFiles/ZxSpectrumPicoVga.dir/__/ZxSpectrumMenu.cpp.obj] Error 1
make[3]: *** Waiting for unfinished jobs....
make[2]: *** [CMakeFiles/Makefile2:3128: bin/picovga/CMakeFiles/ZxSpectrumPicoVga.dir/all] Error 2
make[1]: *** [CMakeFiles/Makefile2:3135: bin/picovga/CMakeFiles/ZxSpectrumPicoVga.dir/rule] Error 2
make: *** [Makefile:663: ZxSpectrumPicoVga] Error 2

Looking at the code in ZxSpectrumMenu.cpp it is just stepping through the snapshot images, so if I comment it out it gets further but then fails here on the same type of declaration:

[ 25%] Building C object bin/picovga/CMakeFiles/ZxSpectrumPicoVga.dir/home/tony/dev/pico/c-code/pico-extras/src/common/pico_scanvideo/vga_modes.c.obj
/home/tony/dev/pico/c-code/zxspectrum/pico-dvi-menu/src/PicoExplorer.cpp: In constructor 'PicoExplorer::PicoExplorer(SdCardFatFsSpi*, FatFsFilePath*, int32_t, int32_t, int32_t, int32_t, int32_t)':
/home/tony/dev/pico/c-code/zxspectrum/pico-dvi-menu/src/PicoExplorer.cpp:21:40: error: type-specifier invalid in lambda
   21 |   _cache.filter([] (const char *fname) bool {
      |                                        ^~~~
[ 25%] Building C object bin/picovga/CMakeFiles/ZxSpectrumPicoVga.dir/home/tony/dev/pico/c-code/pico-extras/src/common/pico_util_buffer/buffer.c.obj
make[3]: *** [bin/picovga/CMakeFiles/ZxSpectrumPicoVga.dir/build.make:1899: bin/picovga/CMakeFiles/ZxSpectrumPicoVga.dir/home/tony/dev/pico/c-code/zxspectrum/pico-dvi-menu/src/PicoExplorer.cpp.obj] Error 1
make[3]: *** Waiting for unfinished jobs....
make[2]: *** [CMakeFiles/Makefile2:3128: bin/picovga/CMakeFiles/ZxSpectrumPicoVga.dir/all] Error 2
make[1]: *** [CMakeFiles/Makefile2:3135: bin/picovga/CMakeFiles/ZxSpectrumPicoVga.dir/rule] Error 2
make: *** [Makefile:663: ZxSpectrumPicoVga] Error 2

Wild guess from me - but is this a C compiler version problem? have you used a new way of defining a function with a bool return or something relating to the []'s? or are you needing a different C ompiler version? any ideas how to over come this would be great.

The pre-built .uf2 file works great on my picodemovga, but I need to modify it a bit that's why I'm looking at build/compile myself.

Pimoroni DV

Hi, I got the Pimoroni DV board thinking that I could drop the precompiled UF2 on and the emulator would be ready to go. But nothing happens, no video output, no LEDs flash, nothing.

Do I need to do anything else? Is the emulator in the UF2 or do I need to put it onto an SD card?

I'm sure I'm not the only untechnical (would be) user. Some instructions would be a great help.

cant get sound

hello i build your pi pico zx spectrum. every thing works perfectly except i cant get any sound,. i am using retroVGA configuration. And i tried to get sound from all the pin combinations you have mentioned. any suggestions ??

error: 'CFG_TUH_ENDPOINT_MAX' undeclared here

Hello Again,

I'm using your pre-built binary, and its work on my new pcb. I got sound, video, keyboard, all less sd-card access because i havent sd-card detect line.

When i'm trying compile (in the past I got it) now i'm getting next error:
/pipico/PicoDVI/software/apps/pico-emu-utils/src/hid_host_info.c:26:38: error: 'CFG_TUH_ENDPOINT_MAX' undeclared here (not in a function)

imagen

whats i'm doing wrong?

Best Regards,
Shaeon.

Kempston Joystick

I use the ingenious emulator PICOZX from Bobricius. Everything works very well but there is a problem with the Kempston interface:
When loading programs with the load function for TZX files, the joystick works fine, with a snapshot not. The USB joystick always works.
Unfortunately I'm not a programmer so I can't find any hints about the bug in the sources.

file missing

When i try compile i got this error:

PicoDVI/software/apps/zxspectrum/src/ZxSpectrumAy.h:3:20: fatal error: memory.h: No such file or directory

Can you upload memory.h file?

SD card problem

Hello, I made a project on the breadboard.
VGA connected according to the RGBY 1111 scheme.
Keyboard via USB.
It works!

Emulator does not see memory card
I used data from table Wiring->General->MicroSD 0
But doesn't work.
The SD card is formatted with FAT32.
I created folders
zxspectrum/snapshots
zxspectrum/quicksaves
zxspectrum/tapes

Firmware: ZxSpectrumPicomputerVga1111Zx.uf2
Where are the pins to connect the SD card?
In which file can I see the connection of peripherals?

Where I can find the USB pins?

Hello, I am assembling the Breadboard Version of pico-zxspectrum and I saw it is compatible with USB and PS2 keyboards.

I do not have any PS2 keyboards with me, but I looked for the D+ and D- pins to connect to my USB keyboard at pinout figure but I did not find any dedicated pin.

Could someone help me finding that? Thanks in advance!

PICOZX TFT

I accidentally bought HC28010-D TFT displays. Unlike the HC28010-ISP displays, these display the image inversely. Is it possible to adjust this in the software without much effort? Maybe I am not the only one who wants to use such "inverse displays".

Matthias

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.