I wanted to put out an update about my various Psion projects. I’ve been away for a while, thanks to some mental health issues culminating in a career change. It’s only in the last week or so that I’ve felt able to look at projects like this again; projects I enjoy but for which I just didn’t have the mental energy.
I have started to work on something again, something I had kept quiet about because I didn’t want the outside pressure. But now I think that outside input might help, and I thought this would be the best place to post about it.
TL;DR: I’m designing a Psion SSD Drive, based on the RP2040, that will work over USB-C.
I had originally thought about using the ESP32 for this, and the early stages of this project were based on the ESP32. But I don’t need WiFi and I really want to play with the RP2040’s PIOs!
Near the end of last year I decided to take the code from SIBODUMP and SIBOIMG and squash them together on an ESP32. With the help of some friends at my local Hackspace, I picked some level shifters that do an excellent job of converting 3.3v to 5v and (with one chip) back again. I bought a small stock in case I blew one up (which I did), plus some breakout boards. I also bought a Raspberry Pi Pico, simply because it was cheap and I thought it might be fun. Then, with more help from the Hackspace lads, I worked out what circuitry I’d need to write to a Flash SSD. Finally, I tried to design a board, got too bogged down in the details, got annoyed with the project and put it in my Psion cabinet, where it sat for 6 months.
Last week I decided I’d take another look at the project. Long story short and almost on a whim, I decided to get the Pico out and try converting the code over. I then discovered TinyUSB, and in a moment decided that the RP2040 would be far more fun to play with than the ESP32.
To be fully compliant with the Psion SIBO HDK, I need 4 pins: DATA, CLK, DATA_DIR (to say which direction DATA is going), and CLK_OE (to disable CLK when it’s not in use). CLK_OE isn’t necessary for communication, but it makes the drive fully compliant with the HDK, so I’d like to try to implement it.
For USB communication, I’m planning on using TinyUSB in two ways. I’d like to make this a block device, but I’m not clear on how to do this well. But I would really like to implement a dummy ethernet device and run a web interface. This is going to give users a huge amount of flexibility, plus make the Drive as cross-platform as possible. I’ll probably keep some sort of serial comms available for debugging, too.
I want the Drive to be able to do regular read-write actions, but also rip and burn SSD images, show full details of the SSD hardware, and (if I can work out how) show the battery status of a RAM SSD.
I’m currently prototyping with a Raspberry Pi Pico and the Arduino libraries on PlatformIO. As time goes on I will probably try to use the Arduino libraries less and go straight for the RP2040 C/C++ SDK, but for now it’s made the code a lot easier to port to the Pico. Even switching from Arduino’s digitalWrite() to the SDK’s gpio_put() has given the code a huge speed boost; toggling CLK goes from about 350KHz to well over 20MHz, and that’s without using PIO. I’m also still not sure if PlatformIO is making my life easier or harder…
My next steps in no particular order are:
- Move communication from software to PIO. There are four basic types of “frame”: Device Reset, Send Control Command, Send Data and Receive Data. Then I need to add DATA_DIR and CLK_OE.
- Convert the Flash FS code from a series of functions to a class.
- Work out how to write to a Flash SSD.
- Work out how to read RAM SSDs (they use FAT) over SIBO-SP.
- Add a simple web interface via TinyUSB.
- Design a proper prototype board, rather than having everything on a breadboard.
I’d really love to hear your thoughts on this. I’ll be working on it at my own pace when time allows, so don’t expect it to be done in a month or even in a year. I haven’t created a GitHub repo yet, but I will once the code is at a suitable point. But I can see that I’m going to need some input from the outside world to make this work.
As an aside, rest assured that I will be revisiting the WiFi Pack at some point, but it’s not my priority right now.