Close

A Long-Overdue Update - PCBs, Emulators And More

A project log for The Last Psion

Resurrecting Psion's SIBO/EPOC16 Platform For The 21st Century

alex-brownAlex Brown 08/13/2023 at 09:020 Comments

Two copies of MAME, built from git, running ROMs from the Series 3c and 3mx.

It's been a while, hasn't it?

My work on this project has been relatively sporadic over the past 12 months. I've not found it easy to find a balance between this, my day job, and other projects I'm working on. As a result, there have been some relatively intensive periods of work on Psion shenanigans, followed by burnout or other priorities needing to take precedence.

Yesterday I hit a mental brick wall and decided it was time to take a break for a few days. But before I do, I thought I'd post a quick update on what I've been up to Psion-wise over the past year.

EDisAsm

At the beginning of the year, I decided that I needed a small project to ease me back into the world of SIBO/EPOC16. After some thought, I decided to pick up an old open source project.

EDisAsm was a project by Matt Gumbley. The original aim was for it to become an EPOC16 disassembler, but it never quite reached that stage. However, it is a great tool for poking around the memory of a SIBO machine. It could also dump the memory of a SIBO machine over serial, including the EPOC16 ROM. (Bear this in mind for later.)

I felt that it would be a great scaffold for getting back into programming and getting to grips with Psion's proprietary C libraries. So, I asked Matt if he would be happy for me to adopt EDisAsm and take it further. He very kindly agreed to release the code under the Apache2 License, and I was away!


There were a few small bugs, but they didn't take long to fix. I then set to work on adding features. In no particular order:

I'll write a full tutorial on EDisAsm in the future. For now, if you want to play with it, the latest release is on GitHub.

PsiDrive (Psion SIBO USB Drive)

If you've followed this project for a while, you will know that I've been able to dump SIBO SSDs for a few years. The earliest attempts were done by Karl and I on an Arduino Uno. Richard Warrenden then added directly calling the Uno's pin registers, dramatically increasing the speed.

After spending weeks looking for appropriate level shifters to move between 3.3v and 5v logic, I migrated the code over to ESP32, and then to the Raspberry Pi Pico. I also moved from the Arduino IDE to PlatformIO (a decision I'm still wrestling with). The humble Dump.ino was merged with some of my FEFS code, became libsibo.

Last year I decided that I'd had enough of having everything running on a breadboard and started to work on a PCB. For some reason, I just couldn't work out how to route the board properly. In the end I shelved it, knowing that I'd have to come back to it at some point.

Last weekend I decided that I wanted to have another crack at routing it. After some major shuffling around, I had most of it done by the end of Sunday. On Monday I did some fine-tuning and then checked my work. On Tuesday I ordered five PCBs from PCBWay, and on Thursday I ordered the parts.

PsiDrive PCB version 0.0.1

At some point during the rework, I decided to name the project PsiDrive. I've asked around and people seem to like it, so it's sticking for now.

I'll be doing a few write-ups of this in the coming months. I'm considering writing a new document about the SIBO Serial Protocol (SIBO-SP), based on the HDK but adding my observations.

libsibo

Other than one bug fix two weeks ago, I have done very little work on libsibo over the past year. My excuse was that I put it on hold until I'd finished the first PsiDrive board. Soon there will be no excuse!

What I will say is that I did do a little testing with libsibo and tinyusb. With some very hacky code, I was able to mount a RAM SSD as a proper FAT12 drive. Writing wasn't stable at all, but reading seemed pretty reliable. It's a good omen for the future.

You can use libsibo by downloading it from GitHub.

MAME

Earlier this year, emulation for a range of SIBO machines was added to MAME. I haven't written any code for this, but I've been part of a small group of people helping out the developer, providing information and ROMs for testing.

For example, I wrote KeyScan, a little tool that shows the column and row of a key on a keyboard, so that the developer could emulate a Siena keyboard properly.


Currently emulated are all ASIC9 machines (Series 3a/c/mx, Siena, Workabout and Workabout mx), the HC and the classic Series 3. MC machines aren't working yet due to an issue with RAM initialisation.

Having an emulator that runs on a modern OS without DOSBox has been fantastic. You can pick your machine and ROM (including the Acorn Pocket Books and some non-English versions of EPOC16), mount SSDs and run games. It will also write to RAM SSD images (just FAT12 volumes made with mtools) and remember your RAMDrive between launches.

Columns v2.21 by S.G. Software, dated 15th October 1998.

A screenshot of Columns running in MAME.

One thing that doesn't work perfectly yet is serial comms, which is something I'm really eager for.

You will need to obtain your own EPOC16 ROMs and SSD images. Many of these are obtainable online from wherever you get your MAME ROMs. Eventually you will be able to generate FEFS images, which leads me to...

SIBOIMG and FEFSgen

One thing I did discover this year is that the Psion Flash Filesystem is actually called FEFS. It was originally designed by Microsoft in the 80s and heavily adapted by Psion for their needs.

The other thing that I discovered is that there are two main types of FEFS. 99% of the time, FEFS uses 24-bit pointers. However, a handful very old FEFS volumes use 32-bit pointers. This includes original MC System Disk SSDs and some Psion test SSD images I've found. I've called these FEFS24 and FEFS32 for ease.

FEFS32 makes up a tiny minority of volumes. It's largely not needed, because Psion didn't make SSDs bigger than 8MB. However, I'd be negligent if I didn't include it in my code, so SIBOIMG can now extract files from FEFS32 images. I haven't got around to releasing compiled binaries for this yet, but you can compile it yourself for Linux, BSD, macOS and Windows from the GitHub repo.

But what about making FEFS images? Well, that's where FEFSgen comes in.

FEFSgen is a project written in Go that I started last weekend. Eventually it will make SSD images from a set of switches and a folder structure. Right now it's a private repository on GitHub that I'm using as a playground for me to work out what I'm doing.

FEFSgen is giving me a way to quickly prototype making and modifying FEFS volumes. Eventually I will rewrite these routines and put them into libsibo.

Digging up other Open Source apps

If you look around my GitHub account, you will see a couple of other repos. These are open source apps and games written for EPOC16 that I have found online, checked that they compile, and published them with binaries. These are:

This game is impossible.
A picture of a Psion Series 3mx running Pyramid.

There is also an empty repo for Elvis, a clone of Vi modified for EPOC16. I do have the code for this, but it currently won't compile with version 2.20 of the SDK. I haven't tested it with earlier versions yet, but I will when I get the chance. At some point soon I will upload the code in its current state, whether or not it compiles.

I'm also working with a handful of other developers who have provided me with their source code. I won't talk about these right now - there may be issue with copyright due to them having had commerical releases through software houses. As I'm sure you realise, if I can release the code, I will.

Mastodon

I've spent a lot of time in the Fediverse this year. The retro computing community has been so incredibly supportive. If I ask a question, I've had a reply almost every single time. People have encouraged me every step of the way, even (and especially) when I've needed to take a break. I've even had a little mention from Sean of Action Retro! You can follow me at bitbang.social.

Discord

The Psion Users Discord has been invaluable. A lot of the work on this project happens over there, both in public channels and behind-the-scenes. We've had people looking at new metal cases for Series 5 machines, new software being developed, investigations into long-abandoned code. In fact, most of the research discussion around the MAME project has happened on Discord. If you're interested in joining in, sign up here.

The Documentation Project

I've really not done enough work on this! I have a lot of notes that desperately need writing up. I also need to think about whether to stick with BookStack or move to something else. I welcome feedback on this. In the meantime, head over there and see what information you can find, as it might help you out.

Final Thoughts

Reading this back, I've done a lot more work than I thought I had. As someone who finds it difficult to recognise his own achievements, this is actually good to acknowledge. It's a tiny drop in the sea of Psion research, let alone the vast oceans of retrocomputing, but it something.

I do want to write more up, and I'll try not to leave it as long next time.

Discussions