fosstodon.org is one of the many independent Mastodon servers you can use to participate in the fediverse.
Fosstodon is an invite only Mastodon instance that is open to those who are interested in technology; particularly free & open source software. If you wish to join, contact us for an invite.

Administered by:

Server stats:

9.8K
active users

#topspeed

0 posts0 participants0 posts today

Someone asked me some questions on the #Psion Series 3, so I thought I'd post my response here in case anyone else is interested. #LongRead

Emulator

You've got two options. The first is the original "emulators" written by Psion, S3AEMUL.EXE and S3CEMUL.EXE. They both run in DOS and emulate the 3a and 3c. But they're less of an emulator than a runtime environment for #EPOC16 (the OS). There's good and bad to this. You can run S3AEMUL and S3CEMUL straight in #DOSBox and it will talk to your host OS's filesystem (Windows, Linux, macOS, whatever). You need to map an M: drive in DOSBox for the internal storage, but once that's done you can copy files straight into that folder on your host OS and run them in the emulators. The downside is that it's not true hardware emulation. You won't get a good judge of the speed of a real device, and some syscalls aren't implemented so will fail or crash the #emulator. They're bundled with the SDK (see below).

The alternative is #MAME. This is the closest to proper hardware emulation you're going to find. You can either dump your own ROMs using a tool called #EDisAsm, or you can find them in the usual MAME ROM repos. The one thing that is notably missing is RS232 emulation from the later models, because we haven't been able to find any documentation on the silicon, but it's working fine with the 3a.

Toolchain

At the moment you have only one option - the Psion SIBO C SDK with the #TopSpeed C Compiler. You're going to need DOSBox (I personally prefer DOSBox Staging). It's all available on the Internet Archive in one easy download, including all the documentation you will need.

archive.org/details/psion-sibo

From there, you have a few libraries you can use. There CLIB, which is a pure ANSI C implementation, designed to easily port apps - don't use it, it's slow and you'll be missing a lot of features. Then there's PLIB, which is Psion's C dialect - very nice to use, and you can put together a C app pretty quickly. Finally, there's OLIB, which is Psion's proprietary OO C - it feels very clunky, but once you get over that it can be very powerful.

EPOC16 apps are restricted to a very pure version of the small memory model, but you can split code up into libraries known as DYLs.

In the past I've written code using VS Code, which can be made to play nicely with the SDK's header files. I've not got it working with NeoVim and clangd yet, but it should be possible with cmake.

The SDK comes with a debugger (SDBG.EXE), a DOS GUI app. If you run SDBG.EXE in DOSBox Staging, run the Psion3a MAME emulation, and enable RS232 over TCP on both, you can use SDBG to send apps to MAME. If you enable symbols, you can step through the code. It's rudimentary by modern standards, but it works pretty well.

I say "at the moment" because I'm slowly rewriting the tools in the SDK. I already have a new working version of #CTRAN, the preprocessor for Psion OO C, but I'm a long way from a compiler. There have been efforts to coax gcc into compiling for SIBO/EPOC16, but I think they have stalled for now.

If you want some examples of EPOC16 C and OO C code, take a look at these:
github.com/thelastpsion/edisas
github.com/thelastpsion/pyrami
github.com/thelastpsion/nfsc
github.com/nickmat/Psion3-Wari
github.com/nickmat/Psion3-Vect

Device

The 3mx is the best choice. It's significantly faster than the earlier models (27.6 MHz vs 7.6 MHz), has a switchable backlight, the fastest RS232 and the best version of EPOC16. I "daily drive" one for journalling, adventure games, and a few other small tasks. After that I'd say the 3c (beware - they were covered in soft-touch rubber, so will need cleaning) and the 2MB 3a. The latter is the most common. Most 3c units came with a backlight, except for the early UK ones. The 3a doesn't. Arguably the non-backlit screens have better contrast so you don't need the backlight so much in lower light, but the backlight has obvious benefits.

Internet ArchivePsion SIBO C SDK and HDK for EPOC16 : Psion : Free Download, Borrow, and Streaming : Internet ArchiveThis is all you need to get started with developing software (and hardware!) for Psion's SIBO range of portable and handheld computers.It includes:A pre-built...

REPOST (JAN 2024): My first thoughts on #Psion's dialect of Object Oriented C for the Series 3 and related portable computers.

Includes the JPI/Clarion #TopSpeed #compiler, a proprietary preprocessor, the Eiffel programming language, and a handful of calling conventions.

Also, did somebody say Objective-C?

This is an old blog post from the beginning of the year. If you've been following my journey in recreating #CTRAN, this was written a week before I decided to take the plunge.

hackaday.io/project/161291-the

(Yes, I did say in the article that I definitely wouldn't be writing a compiler. I did say that.)

hackaday.ioBeginning OLIB: An entirely uneducated look at Psion's proprietary Object Oriented C | Details | Hackaday.io<blockquote><strong>Me: </strong>I could do with a quick win to get me going again.<br><br> <strong>Also me: </strong>I shall learn a proprietary object oriented dialect of C, where the only way to learn it is to plough through 1150 pages of documentation.</blockquote> <p>Psion doesn't have a formal name for the object oriented version of C that it created for EPOC16. I've been calling it "Psion OO C", but the main library that it uses is called <strong>OLIB</strong>, which contains the root class. The others are:</p> <ul><li><strong>HWIM: </strong>The OO graphics library</li><li><strong>FORM: </strong>On-screen formatting </li><li><strong>XADD: </strong>Additional graphics library for 3a onwards (but not the Series 3 "classic")</li></ul> <p>To Psion's credit, their OO ecosystem is well documented in the SIBO C SDK across 5 books (hence the 1150 pages mentioned above). Each of the libraries has its own, dedicated book. There's also an "Object Oriented Programming Guide" which acts as an introduction to the whole ecosystem. I don't have the latest versions of all of these books - they seem to be lost to time. But I have all the 3 and 3a features documented, plus (I think) all of the 3c/Siena extensions. (3mx-era EPOC16 remains sadly undocumented.)</p> <p>What's nice about Psion's approach to OO is that they assume no prior

Here's something I wish would be open sourced.

The #TopSpeed C #compiler is an integral part of the #Psion SIBO C SDK.

Old timers might remember JPI as a group of developers who left #Borland in 1987, after Borland decided not to use the team's new compiler technology. They took their code with them, and it became the TopSpeed compiler.

From what I gather, the TopSpeed compiler IP is now owned by #SoftVelocity, the company who now also owns Clarion. I emailed them about 6 years ago, asking them if they would consider open sourcing the compiler code. I got no response, which I guess is to be expected.

I even found someone who had a copy of the source code (written in Modula-2), but they understandably wouldn't give it to me without the IP owner's approval.

This is the situation with so many bits of software (including the SIBO C SDK tools) from this time. We are lucky that copies of the applications still exist, otherwise the job of building C software for #EPOC16 would be significantly more difficult. But it is likely that the original source code, along with many other codebases, will disappear thanks to copyright laws that don't support digital preservation.

The Aspark Owl SP600 just made history! Unofficially becoming the world's fastest EV, it hit a top speed of 272.6 mph (438.73 km/h) on a long road in Germany. With a 64kWh battery, 2,012bhp, and 1,475 lb-ft of torque, this Japanese electric supercar is a force to be reckoned with. Developed by Manifattura Automobili Torino, the Owl SP600 has undergone rigorous testing to achieve this milestone.

Thinking again about contacting companies regarding access to legacy code/docs.

- SoftVelocity (#TopSpeed compiler)
- Zebra (#Psion SIBO/EPOC16)

Ideally, it would be released under a FOSS or CC license, but I know there could be legal hurdles preventing this. e.g.: if licensed code was included, it's never going to happen.

It would at least be good to be allowed to see code for educational use or derivative works.

I've tried in the past but not got far. Maybe I need to push more?

Just tried compiling Wari, a game written in #Psion OO C. The project uses #Borland Make 3.6.

Got it to compile first time with my SIBO SDK setup - all good!

However... Borland Make uses 16-bit DPMI, and its extender won't load 32-bit DPMI binaries. If I pre-load the 32-bit extender, it won't load 16-bit DPMI binaries, so Make won't run!

TL;DR: I can't use the new #ctran with Borland Make 3.6.

Looks like I'll be converting that Makefile to GNU Make or a #TopSpeed project.

ICYMI: My first thoughts on #Psion's dialect of Object Oriented C for the Series 3 and related portable computers.

Includes the JPI/Clarion TopSpeed compiler, a proprietary preprocessor, the Eiffel programming language, and a handful of calling conventions.

Also, did somebody say Objective-C?

hackaday.io/project/161291-the

Continued thread

Well, this is interesting.

I knocked up a quick .PR file to use #TopSpeed's make/project system to launch #MASM.

Run it with TSC, it locks.

Run it with TSCX to force TopSpeed to load into expanded memory, it completes the assembly job, even when you reduce RAMSIZE back down to 8MB.

This does seem linked to the issue I have with TSC locking on certain compile jobs that TSCX completes fine. And as this happens with Borland MAKE, it's unlikely to be a TopSpeed bug.

Looking through some #Psion C code, I've seen `CDECL` a few times. Being a noob, I didn't know what they were or why they were there.

So, looking at Wikipedia...

#CDECL is a "caller clean-up" calling convention using the stack. This is pretty common in the x86 world, but is explicitly mentioned in Psion code. Why?

#TopSpeed C uses its own "callee clean-up" calling convention, using registers for the first 4 int parameters, which #EPOC16 really likes.

en.wikipedia.org/wiki/X86_call

Some slight tweaks to my @DOSBox_Staging config, and I think I've settled on a winning combination.

I think the only two things I'd like are a keybinding to switch between windowresolution settings, and a keybinding to switch between cycles=auto and cycles=max. But I could try to implement that myself.

Screenshots are of the #Psion SIBO Debugger, #OrCAD Draft 4.1,
#TopSpeed C, and the original DOS Psion Series 3c emulator (not the MAME one).