Close
0%
0%

Loki

Loki is something like a cyberdeck, dual booting between Raspberry Pi (obvs) and an honest-to-goodness ZX Spectrum FPGA analogue!

Similar projects worth following
Loki is an in-progress, vaguely cyberdeckish project. Like roughly 102% of cyberdeck builds there's a Raspberry Pi inside; unlike those builds Loki also has hardware-level ZX Spectrum compatibility thanks to a ZX Uno FPGA board lurking in there as well. Both can operate at the same time, with the 2K display and hand-wired keyboard switching between the HDMI and USB of the Pi, and the VGA and PS/2 of the ZX Uno. The keyboard is run by a Raspberry Pi Pico and status LEDs have given way to an OLED screen. Power is provided by a USB battery pack or a 12V PSU from a dead 3D printer.

The project has been poorly planned and continually built in chunks, so the case is a patchwork of different printed elements. I'm not too worried, the truck bed paint on the screen case will end up covering all the mistakes!

Much more info on my website, but that's not in the Hackaday contest jurisdiction...

An explanation as to what's going on here.

💾 Loki is sort of a cyberdeck, although I don't like to call it that because it's not set out to be hyper-portable. It does however have a battery pack, as well as taking a 12V PSU input.

🎰 Loki has both a Raspberry Pi 4 and a ZX Uno inside (that's an FPGA recreation of the 1980s Sinclair ZX Spectrum hardware). The display is connected to both, as is the keyboard, using different technology for each system. The Pi also has a trackpad liberated from an OG Pi-top case.

📺Loki's display is a 2K screen from an iPad. The driver board has both HDMI and VGA inputs, so they can be switched from one to the other. The HDMI input passes through a KVM switch so that external boards can use the keyboard, trackpad and screen as well. The KVM requires physical switching, so that's been extended to a little soft tact switch alongside the display controls, but for the LEDs that show which input is active I've decided to go mad and use 3D printed clips to hold flexible light pipes. Why? If you have to ask, you wouldn't understand. 

⌨ Loki's keyboard is a hand-wired mechanical keyboard, powered by a Raspberry Pi Pico. I'm writing the firmware myself because I need to be able to switch between USB and PS/2, so I'm taking the opportunity to replace the status LEDs with an OLED screen and will add macros for things like key mapping information (the Spectrum has multiple commands per key, whereas my keycaps don't). All the key switches are blue Cherry clones, pulled from an absurdly cheap gaming keyboard I got on eBay, and the keycaps are a mixture of heritage - mostly from my old Corsair K65, but with some spares from other places and one key has been 3D printed, just to see if I liked it.

🛠 Loki has been in progress for some time and is getting gradually put together as I get bits designed and printed, and there's four different PLAs in play depending on what I have to hand. The case, therefore, is currently a mess (and the base of it is mostly 3mm plywood). There's various seams that need filling, but that will come at the end of the build. On the screen case I've used primer and black truck bed paint which did a great job of hiding the joins and wood filler on the front - less so on the back because I rushed it, so there's going to be some liberal application of stickers at some point. To deal with the fact Loki is made from so many slapped-together case pieces there's threaded rods running across the top and bottom of the keyboard and across the back of the base. They provide a noticeable strength and rigidity, and the locknuts at the ends look interesting!

📃 Loki isn't named after the Marvel antihero (although I loved the show), nor (directly) to the Norse god, but after a mocked-up "Super Spectrum" that Sinclair User magazine made a big deal about, and that young me wanted desperately to own, but didn't actually exist. Given that was a dream computer to me then, and this is whatever I want it to be, this is my Loki.

There's lots (and lots) more over on my website. It rarely gets visited, but I don't mind; it's more a chance for me to write words for my own satisfaction than it is for broadcasting those words into peoples' faces. (I used to write for money! About Spectrums!! 30 years ago!!!) I'll keep updating here as well, but that's where there's going to be the fuller details of what's happening. (I get a bit overwhelmed by the amount of options and things here as well, and imposter syndrome is less of an issue on a platform of one.)

  • A couple of WIP renders

    Steve Anderson08/11/2022 at 13:50 0 comments

    TBH there's only really one, but I hid some elements in Fusion 360 to make it possible to see inside.

    The mish-mash of colours reflects the actual state of the build. There's black, neon orange, silver and two brands of white PLA, together with black PETG for the keyboard plate. Everything is being printed on my (somewhat modified) Ender 3 Pro.

    With the keyboard plate hidden you get a look at the battery (shown in orange), the ZX Uno location next to it and the opposite end which plays host to the RTC module now. All the base parts clamp around the plywood (shown here in plywood colour) and dinky self-tapping screws are inserted from below, breaching the cylindrical features. That works pretty well, considering I was, then and now, making it up on the hoof. Two of the three 6mm threaded rods are visible as well; these brace things well and I'm glad I thought of that! The indentations that the rods protrude from are perfectly sized for a 6mm socket - a very early prototype of the keyboard had the locknuts sticking out which looked funky but wasn't actually very practical.

View project log

Enjoy this project?

Share

Discussions

Steve Anderson wrote 08/12/2022 at 10:10 point

I get you. Actually one of the reasons I started making this was specifically to use the ZX Uno - I'd backed it in 2015/16 and it had been sitting unused for a while. Sinclair computers have been part of my life for nearly 40 years and while emulation has often been enough for me, the Uno is a hardware clone - perfect Z80 and reverse engineered custom chips. It's actually more compatible than later Spectrum models were!

So the important bit to me was always about getting the ZX Uno doing things. Not "be able to play Spectrum games", but "be the best Spectrum I can make".

  Are you sure? yes | no

tormozedison wrote 08/12/2022 at 18:49 point

That's true, many retrocomputing hobbyists prefer real hardware over FPGA, and FPGA over emulation. For me, it makes no difference, i equally like real hardware, FPGA and emulation.

  Are you sure? yes | no

tormozedison wrote 08/10/2022 at 17:56 point

The Pico you use in your keyboard is powerful enough to emulate ZX Spectrum by itself without any additional FPGAs, there exist such projects. Therefore your device, despite being very cool, is a bit over-engineered.

  Are you sure? yes | no

Steve Anderson wrote 08/10/2022 at 21:56 point

That's the point 😀 I'm doing all this for my own entertainment. I addressed this over on my blog:

“There's something quite perverse about using a 32 bit, dual core processor with a wodge of RAM to make a keyboard for an 8 bit computer, but I don't care!”

https://twindx.com/cyberdeck-report-ii/

  Are you sure? yes | no

tormozedison wrote 08/12/2022 at 06:19 point

I mean a different approach: not "use something less powerful for keyboard", but "combine keyboard and ZX Spectrum emulator in one Pico".

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates