Programming under SIBO (EPOC16) today

Inspired by a five-year-old article by my friend @dlinyj about programming for PalmOS, I decided to continue the theme of developing for long-dead platforms.

It just so happened that I (like many of those present here) are fond of various ancient hardware, including, of course, the PDA. And today we will talk about one PDA line from the Psion company that has gone down in history forever.

Generally

Despite the fact that devices like the Psion 5 based on the EPOC32 OS with an ARM processor have become much more famous, today we will talk about a much older platform that became widespread in the early nineties – SIBO (Sixteen bit organizer), aka EPOC16. Typical PDAs running this OS are the Psion Series 3, Psion Siena, and the Psion Workabout TSD.

All of these devices were equipped with an NEC V30 processor (more precisely, a system on a chip based on this processor), a monochrome display, and several megabytes of volatile memory. To connect to a computer, a regular RS-232 was used together with a proprietary 3Link cable. PsiWin (Windows 9x) or RCOM (DOS) software was installed on the PC.

Equipment overview

Alas, I don’t have the Psion Series 3, and neither does the Psion Siena. Due to their rather high price and the lack of original accessories, I decided not to buy any of them yet.

Therefore, in order to play around with EPOC16 “in hardware”, I found a Psion Workabout MX TSD. In combination with my love for industrial and other specialized PDAs, this is generally an ideal option.

Psion Workabout MX 2MB, general view
Psion Workabout MX 2MB, general view

The condition, of course, is not the best: there is no stand, no memory modules (Psion SSD), the case is worn out. However, given the conditions under which I got it, nothing like a copy.

In front we have all the main controls. The green key in the center activates the barcode scanner. By the way, the scanning direction can be changed by turning the scanning unit to an angle convenient for you.

Psion Workabout MX 2MB, reverse side
Psion Workabout MX 2MB, reverse side

There is nothing particularly remarkable behind – the name of the model, the holes for the mounting screws that once held the strap on the arm, the button for opening the tray. The red detail allows you to block the tray from opening.

Psion Workabout MX 2MB Tray
Psion Workabout MX 2MB Tray

And here is the tray itself. It contains a main battery compartment, a backup battery compartment, and two Psion SSD slots. Alas, due to the discharge of the backup battery, the contents of the memory are “rotten”. I could not find any data collection software for EPOC16, if you suddenly have it and are willing to share, I will be very glad.

Psion Workabout MX 2MB, ports
Psion Workabout MX 2MB, ports

And here are the ports. On the left is a regular COM, on the right is a proprietary connector for connecting a 3Link cable.

The COM port is an indisputable advantage of this device – it can be connected to a computer using a conventional null-modem cable. You can either buy it or make it yourself. I used the cable from the Felix-02K cash register, everything worked perfectly.

Psion Workabout MX 2MB board
Psion Workabout MX 2MB board

What do we do when another interesting piece of iron falls into our hands? That’s right: we understand it. This is how the motherboard of this device looks like. The proprietary NEC chip, RAM and flash memory chips, and some discrete logic are clearly visible.

On what generally programmed under EPOC16?

We figured out the hardware, now let’s see how things are with programming tools. The manufacturer offers three options at once:

  • OPL (Organiser Programming Language). Applications are written in some BASIC-like language, and you can develop them directly on the device itself, the interpreter is already installed on Workabout. This language is quite ancient, it was possible to write on OPL even under Psion Organizer.

  • OVAL (Object-based Visual Application Language). The language this time resembles VBA, there is even a special development environment for Windows.

  • C. Well, that’s clear what it is. Development is carried out using SIBO C SDK.

With BASIC and VBA, something didn’t work out for me back in my school years, so my choice is clearer than ever. For those who want to try other options, I will also post links at the end of the post.

Where can I find SIBO C SDK?

For some reason, even somewhat unsurprisingly, finding the SDK turned out to be not so easy. All links are traditionally dead, and the only thing that can be found is some kind of manuals.

Finally, the SDK was found, not without difficulty, in the vastness of the Web Archive. So now we can finally start developing for EPOC16.

Components

So, in order to start developing under EPOC16, we need something like this:

  • Directly SIBO C SDK itself. Like everything else, a link to it will be at the end of this post.

  • Clarion TopSpeed ​​C Compiler.

  • DOSBox or any similar software. As you might guess, the compiler runs under DOS. The Psion PLC itself gave instructions on how to run it under Windows 2000, but all the steps below were done by me in pure DOS installed on a VMWare Workstation. However, the compiler is not particularly demanding and does not throw errors when launched on a new processor, so there should be no problems installing it.

  • emulator. On it we will test what we wrote.

  • RCOM or PsiWin. In the case of using an “iron” device, this software will be necessary to load the program into the device’s memory.

We install software

In general, there should not be any problems with the installation. I got it right the first time with no problems. But I’ll describe the process anyway.

So, first we need to install the compiler. Run Install in the COMPILER folder, start the installation.

Without changing anything, we continue.

Here you need to make sure that the “Small memory model libraries for DOS” option is activated.

Similarly, we install the software from the DOSENV folder. Everything, the compiler is installed.

Now it’s the SDK’s turn. We insert the first floppy disk with it and run the install.bat batch file. We put it directly on the root of drive C. We perform the same operation with two other drives. We put everything, it definitely will not be superfluous.

Now open AUTOEXEC.BAT in a text editor and add a line there:

PATH C:\DOS;C:\TS\SYS;C:\SIBOSDK\SYS;C:\SIBOSDK\INCLUDE;C:\SIBOSDK\LIB

If you already have something specified there, just add the last four paths separated by semicolons. Now we reboot and use the PATH command to make sure that everything is correct.

Now it’s the turn of the configuration. We execute the following commands:

CD \TS\SYS
COPY \SIBOSDK\SYS\TSMAIN.TXT
COPY \SIBOSDK\SYS\TSPRJ.TXT
TSCFG

We agree with overwriting files and run TSCFG. If everything was done correctly, it will look something like this:

All finished with the installation. You can proceed directly to programming.

First program

Create a folder in the root of drive C, for example, WORK. The name doesn’t really matter here. Next, copy the TS.RED file into it from the C:\SIBOSDK\SYS folder. And create some more files:

HELLO.C with the following content:

#include <stdio.h>
int main (void)
{
  printf("Hello, world!");
  getchar();
  return(0);
}

HELLO.PR with the following content:

#system epoc img
#model small jpi

#compile hello
#link hello

Some batch file (for example, S.BAT) with the following content:

TSC /R /M HELLO

For the lazy, the HELLO.C and HELLO.PR files are in the \SIBOSDK\DEMO folder.

So, we launch S.BAT and see what happens. And it should turn out something like this:

emulator

Of course, I want to try running our program and see what happens. To do this, download the emulator, run the INSTALL.BAT batch file in the folder with it. After that, a folder with the emulator will be created on drive C:. Run RUNME.BAT, then press the F9 key in the emulator, select “Special\Remote Link”. We activate the connection with the PC.

Everything, the emulator is ready to accept executable files. Along the way, you can play with standard software.

launch

Well, now it’s the turn to launch our program.

Go to our C:\WORK folder and run MCLINK. If this utility does not run, check your PATH.

After opening the program, you must wait for the message “Link established” to appear. I did not suffer much, but simply connected DOSBox and VMWare using the Virtual Serial Port Driver.

We copy our executable file, for which we type:

copy hello.img rem::m:\img\hello.img

If everything was copied successfully, our program will appear in the emulator.

We launch it, and if we didn’t mess up anywhere in the previous steps, something like the following should appear on the screen:

And how is it on the iron?

Of course, after a successfully assembled program, I want to try it out on a real device.

So, we take our Workabout, insert batteries, set up Remote Link, change COM port forwarding in VMWare settings…

And it does work.

More correct option

Even though our program works fine, Psion recommends using its own libraries. Using them, the code looks like this:

#include <p_std.h>
#include <p_sys.h>
int main(void)
    {
    p_puts("Hello world");
    p_getch();
    return(0);
    }

In this case, the project file must be changed:

#system epoc img
#set epocinit=iplib
#model small jpi

#compile simple.c
#link simple

What to do next with this?

Of course, this is not an exhaustive guide to programming these devices, but just a small manual on where to find the right software, how to install it and build the program. Now, if you want to write something for this platform, you no longer have to look for everything you need among a bunch of broken links.

Despite the difficulty in finding the SDK itself, it is quite easy to find documentation related to programming under SIBO/EPOC16. What is worth, for example, Programming Psion computers by Leigh Edwards from EMCC Software. There is a good description of programming not only in C, but also in OVAL / OPL.

Also, good documentation, along with sample programs, comes with the SIBO C SDK itself.

Links

SIBO C SDK and compiler: http://old-dos.ru/index.php?page=files&mode=files&do=show&id=101191

OPL: http://old-dos.ru/index.php?page=files&mode=files&do=show&id=101072

OVAL: http://old-dos.ru/index.php?page=files&mode=files&do=show&id=101071

PsiWin and RCOM: http://old-dos.ru/index.php?page=files&mode=files&do=show&id=101064

Psion 3a emulator: http://old-dos.ru/index.php?page=files&mode=files&do=show&id=6043

Psion 3c emulator: http://old-dos.ru/index.php?page=files&mode=files&do=show&id=6045

Psion Workabout Emulator: http://old-dos.ru/index.php?page=files&mode=files&do=show&id=6058

Psion Siena Emulator: http://old-dos.ru/index.php?page=files&mode=files&do=show&id=6044

Programming Psion Computers: https://tobidog.com/ppc.pdf

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *