ZX-Picocalc (Sinclair ZX Spectrum emulator)

Hi, I’m working on emulating Sinclair ZX Spectrum 8-bit computer on PicoCalc.

PicoCalc, with its color 320x320 display and rubber qwerty keyboard is in many ways so much similar to ZX Spectrum…

And so I have zx-2040 emulator somewhat running now on Picocalc. Main issue is a low-level keyboard driver, or lack of it. I’d love to have it interrupt-based, but I can’t find information how to do it or whether it’s possible. If you have a knowledge on advanced I2C keyboard programming - please contact me.

Anyway, here are some Spectrum games I tried:

More information about zx-picocalc project on my blog.

7 Likes

interrupt-driven keyboard polling isn’t possible because that’s not how the I2C keyboard communicates to the pico

Blair Leduc’s picocalc-text-starter has a good example of polling the keyboard with a timer detached from the main loop however, and from there you can make a soft-“interrupt” which calls your emulator to let it know there’s a key being pressed: picocalc-text-starter/drivers/keyboard.c at main · BlairLeduc/picocalc-text-starter · GitHub

2 Likes

Thanks, I’ll look into it

You should upload your source to your fork to let people in with the fun

1 Like

I’m very interested in this port also (played too much time with a ZX Spectrum as a kid). Something super cool would be to map the Kempston joystick input to the cursor keys in the PicoCalc, so it’s a lot more straightforward experience.

I just got a PicoCal over the weekend, could try to add that mapping if you post a link to your code?

1 Like

Nice project, thanks !
Since the pico keyboard is quite cramped, i would remap the direction keys as follow :

Up = Q

DOWN = C

RIGHT = P

LEFT = U

SHOOT = SPACEBAR

And have a remap option built into the emulator (could be inside a config text file)