Vintage Palmtops Tips & Tricks

28Dec/125

Psion, Linux PC and a cable

I remember that I promised to write something about connecting Psion palmtop (either Series 3 or Series 5) to a Linux-based PC without using CF card. Just a PC-Link cable.

The great news is that many Linux distributions... already have everything we need. Yes. If you own Ubuntu or other debianoid, simply install plptools (sudo apt-get install plptools). The same for RedHat; I don't know about other distros.

Now the bad part. Since Ubuntu 11.04 (?) the "core" feature of plptools, called plpfuse, has been disabled. I read that it was because there had been some problems with it. Generally, it was a daemon mounting Psion's filesystems as a normal drive. I tried it in Ubuntu 10.04, but it really didn't work well, so no. We'll do it the other way.

There are two programs included in plptools (not only, but we'll focus on these): ncpd and plpftp. The former is a daemon that establishes connection between Psion and the PC, and the latter... as the name says 🙂

That's how I do it:

1. I connect the Psion with the PC using PC-Link cable.

2. From Psion's main menu I choose Special > Communications and set it to "Link cable" at 57600 baud. (Or whatever the maximum is; for Siena it would be 19200.)

3. I open a terminal window and type:

sudo ncpd -s/dev/ttyUSB0 -b57600 -d

for I have the cable plugged in to the USB port using an adaptor. In case the above code doesn't work, execute dmesg | tail and try to find out what the name of the device should be. Also remember to check the baud rate entered (the -b parameter).
If everything went alright, the daemon should start running without any message.

4. I open a second terminal window, change the directory to where my files for exchange are and launch plpftp:

plpftp

Plpftp complains about an error from OwnerInfo, but that doesn't matter. Commands are similar to those in every command line-driven ftp client:

cd DIR - changes the directory on Psion's drive
dir - lists the contents of the current directory (Psion)
lcd DIR - changes the directory on the PC
mkdir DIR - creates a directory on Psion's drive, in the current location
put FILE - sends a file to Psion
get FILE - you guess it
mput, mget - allow to use wildcards (*) in file names

Notice: file names on Psion's drives are case-insensitive. On the PC they are not.

And that's basically all you need to send and receive files between Psion and a PC. For more commands type help while in plpftp.

5. After a successful session I quit plpftp (bye) and shut down ncpd using Ctrl-C.


 

Happy vintage computing in the new year! 🙂


[Edit 2013/02/06]:

mii3 sent a useful shell script to synchronize the Psion. I guess it's taken from this forum post, where you can also find the required usbpsion script.

#!/bin/sh

# Requires:
# plptools_0.18-1_i386.deb
# for i386

if [ "$( dpkg -l | grep plptools )" = "" ] ; then
echo “Requires plptools”
exit
fi

if [ "$1" = "--help" ] ; then
echo “If you would like to sync from/to psion”
echo “irdabelkin to get the irattach”
echo “then you do ircp-tray with x11″
echo
echo “If you wanna with cable /dev/ttyUSB0 you shall do use this program with –sync”
echo “Place your file in the right directory, check –init”
exit
fi

if [ "$1" = "--rox" ] ; then
rox ~/Documents/mydevices/psion/pc2psion/
exit
fi

if [ "$1" = "--init" ] ; then
echo “Creating dirs”
mkdir -p ~/Documents/mydevices/psion/pc2psion/
exit
fi

if [ "$1" = "--sync" ] || [ "$1" = "" ] ; then

# check if usb serial is present
CHECKIFUSB0=` ls -1 /dev/ttyUSB0 `
if [ "$CHECKIFUSB0" = "" ] ; then
echo “** Warning: no USB cable for the psion detected. **”
exit
fi

CHECKSUDOUS=` sudo -l | grep usbpsion `
if [ "$CHECKSUDOUS" != "" ] ; then
# prepare
WOHOME=` whoami `
echo “** mount”
sudo usbpsion –mount $WOHOME

# Check mount
FILELISTC=` ls -1 /media/psion | grep “C” `
if [ "$FILELISTC" = "" ] ; then
echo “** Not Mounted **”
exit
else
echo “** Mounted **”
fi

echo “** LIST **”
ls /media/psion
echo

# check few dirs
[ ! -d ~/Documents/mydevices/psion/pc2psion/ ] && mkdir -p ~/Documents/mydevices/psion/pc2psion
ls ~/Documents/mydevices/psion

# operation of sync if possible
CHECKIFMOUNT=`ls ‘/media/psion/C:’ | grep System`
if [ "$CHECKIFMOUNT" != "" ] ; then
echo ” > Status: mounted”
echo “** Sync”

# ******* PC => PSION
echo
printf “33[32m%10s\n33[0m" "PC => Psion"
cd ~/Documents/mydevices/psion/
cp -av pc2psion/ '/media/psion/C:'
rm ~/Documents/mydevices/psion/pc2psion/*

# ******* PSION => PC
echo
printf "33[32m%10s\n33[0m" "Psion => PC"
[ ! -d '/media/psion/C:/psion2pc/emails/' ] && mkdir -p ‘/media/psion/C:/psion2pc/emails/’
ls ‘/media/psion/C:/psion2pc/’
cp -r -v ‘/media/psion/C:/psion2pc/’ ~/Documents/mydevices/psion/

# ******* BACKUP
echo
printf “33[32m%10s\n33[0m" "Backup: Psion => Psion (D:)"
[ ! -d '/media/psion/D:/backup/psion2pc/' ] && mkdir -p ‘/media/psion/D:/backup/psion2pc/’
ls ‘/media/psion/C:/psion2pc/’
cp -r -v ‘/media/psion/C:/psion2pc/’ ‘/media/psion/D:/backup/psion2pc/’
fi

echo “** Umount”
sudo usbpsion –umount
exit
fi
fi

28Sep/126

Games: A for Adventure

One of the fields where vintage palmtops can easily compete with modern gadgets, is adventure gaming. I mean those games where you type "examine box" and the computer tells you that there is a small piece of paper inside. Or something else. A lot of games were written for portable computers in the heyday of adventure gaming (80's and the beginning of 90's).

If you don't know, what these "adventures" are about, read the excellent introduction by Joe W Aultman or an exhausting beginner's guide at Brass Lantern.

Psion Organiser

Yes, there are adventures for the Organiser. You may download a port of Colossal Cave Adventure and an original game "City of Alzan" from The Psion Organiser II site. They should run on an CM! (haven't tested though)

Psion Series (SIBO)

With these machines you can access all Infocom titles (.IDF format) thanks to the ITF Interpreter by Bryan Scattergood. You can download it as well as Zork I from BioEddie's.

Psion Series (EPOC)

For Psion 5 (and higher) there is FrotzS5 Z-Code interpreter. This lets you play hundreds of games stored on Interactive Fiction Archive website and elsewhere on the Internet. You may also want to take a look at this page, where you can find a brief installation info together with an entire Zork trilogy for download.  (Here's an archived instruction manual for FrotzS5.)

Amstrad NC

There are a few amusing adventure games available from Tim's Amstrad NC Users' Site, like "Crystal of Nebumeth". NC's full-sized keyboard and large screen make it really comfortable to play adventures even for a long time. Amstrad has a BBC BASIC interpreter built in, so new games may be easily written (the source codes of existing games may help you get started).

Atari Portfolio

You can download a few games from atari-portfolio.co.uk. I don't think that any DOS Z-code interpreter would run on a Portfolio, but I didn't even try. Maybe there is a lightweight version, capable of running on a very basic XT?

EDIT: There is an interpreter with a few games (including Zork Trilogy). You can download it from PofoWiki's download section (infocom.zip).

HP LX

There are some titles on the S.U.P.E.R. site. You need to be patient, though, and click through those hundreds of programs listed (no categories). DZip (16-bit DOS version) should run on every LX (most likely on 200LX).

Palm

There are a few Z-code interpreters for Palms, like Pilot Frotz or Pilot Zip, but I've used only one of them - Frobnitz. It supports all Z-code file formats (except V6) and is quite powerful, but larger games are slow like hell on my IIIe.

Useful links:

17Sep/112

CompactFlash and the Lost Clusters

I experienced it twice. The PC suddenly refuses to write to Psion's CF and shows turd in filenames. First time I was scared to death - I was afraid that all my data are lost, but when I inserted the card back into my Psion, everything seemed to be alright. At first I suspected the card reader, but attempts with another device confirmed that something's wrong with the CF. I downloaded Essential Disk Utilities, but was unable to copy them to the card. However, I tried with another PC and... it worked. The .SIS was successfully written. I installed it and ran CheckDisk. The treatment was succesful.

This time CheckDisk didn't manage to "cure" the CF. It said that the disk contains lost clusters and the only way to get rid of them is to re-format it. I had to backup my data first. What I thought of was a cable link, but I quickly gave up (it would take hours). My laptop didn't even want to hear about copying anything from that filthy card, but - again - I found another computer and, one by one, started to copy the folders. All but one, which the PC refused to copy. So I opened it and started to copy subfolders. All but one... After a few "iterations" I found the culprit. For a while I hoped that removing it will remove the problem, but the problem remained. So, having made a backup, I formatted the card and copied everything back. On my Psion I ran CheckDisk and voilà. The day was saved.

My advices:

  1. Install Essential Disk Utilities and give CheckDisk a chance, at least once a month.
  2. Backup your data (at least those really important).
  3. When a problem appears, DON'T PANIC 🙂
  4. First try to solve the problem with CheckDisk.
  5. If it doesn't help, find a PC that will read your CF and make a backup. If your files don't take too much space and you have a cable, you may consider using it.
  6. If there are any files left that couldn't be copied to the PC, copy them to the ramdisk of your Psion.
  7. When your data are secure (make sure!), format the card to FAT filesystem. Copy the files back and run CheckDisk.

 

Filed under: Psion (EPOC) 2 Comments
13Aug/110

Psion in the Shell

Writing about programming tools for the Psion I mentioned about running the scripts from the shell. It sounds natural for someone who lives in the world of a prompt and a flashing cursor, but (un)fortunately Psion's philosophy denies the existence of this world. For the heretics several tools appeared, of which I'll try to review a few.

epocemx in fact isn't a shell. It's rather an environment, consisting of tools which facilitate the development of EPOC applications under Unix. Thanks to this project Python and Perl have been ported to Psion. epocemx provides a runtime environment for the Psion, and that's what I'm going to write about.

Upon installation, emx creates a directory on the target drive. This is its "filesystem", similar to that of Linux/Unix. You may find there such directories as /usr, /bin or /dev - something that will make a Linux user feel at home. To maintain compatibility with Unix, symlinks are also allowed. Apart from its own directory, emx is able to operate on the entire Psion filesystem. There are some essential Unix commands built in or included in the base package (emxuser.sis), like ls, cat, mkdir or cp, and much more can be found in emxutil.zip, e.g. less, grep and sed. Shell scripts with control structures like if, case, for, until and while may be created.

emx can run Psion executables (.exe) as well as application files (.app). The only drawback is that "alien" programs (not designed for emx) run as a separate instance, independent from the shell (well, it isn't that much of a drawback, as you can kill a stucked application without touching emx), and return to the system, leaving emx console in the background. Keep in mind, that a leading dot (i.e. ./program_name) is required to run a program from the current directory (the ".exe" extension may be omitted). Of course you can pass arguments to the programs, so ./Lua Examples/hello.lua or ./Vim newfile.txt will work (but in the latter case you may be surprised where Vim will put your file - it seems that "alien" programs don't follow the shell's current directory).

Shell5 is another shell for EPOC. At the first glance, it looks like something between DOS and Linux. Unix-style commands (ls, cp etc.), but backslashes in paths. Unix-style variables, but batch files like in DOS. Shell5, like epocemx, allows input/output redirection and "pipes". Also keyboard macros are possible to define.

The major drawback is that the shell doesn't run .exe files. Some have plugins for Shell5 (e.g. Lua), but the majority of software provided only with an .exe file won't run with it. Applications (.app) as well as compiled OPL programs (.opo) can be executed.

EpocDos is a choice for those who miss the good old C:\> prompt. It resembles MS-DOS with its commands, layout and overall philosophy. Simple, but well-designed it is really comfortable to use. With no redirections, no sophisticated shell scripting (only DOS-like batch files) and a simple set of commands it's rather intended for performing simple file tasks and running programs - but that is what it's good at. EpocDos can run all Psion executables: .exe, .app and .opo. You don't even need to specify the extension. After exiting, programs return gently to the console.

There are some drawbacks, obviously. To pass parameters to the program, you need to execute it with the command run or call (depending on the file type) and specify the full executable name (with extension). Unlike in previous shells, there's no filename completion (instead Tab acts like a file selector, showing the following files after each keypress) and you can't edit command line (but you can access the history, pressing up key). What I don't understand is the inability to access directories typing \directory or d:\directory. You can't change the directory with cd c:\. Instead you must type cd \. Combinations like ..\.. are also not permitted. I don't know, whether it's a bug or a feature, but it's really annoying.

Name Style .exe .app .opo Scripting I/O flow Download
epocemx Unix-like + + - shell scripts + Sourceforge
Marcus von Cube's page (emxutil.zip)
Shell5 Unix/DOS-like - + + batch files + Bioeddie's
EpocDos MS-DOS-like + + + batch files - SoftLow.com
Filed under: Psion (EPOC) No Comments
24Jul/112

Psionic programming, part 2

Go to part 1

First steps

So you want to write programs. Ok, here are the first steps you should follow:

1.

Sit down, take a deep breath and think, what kind of software you'd like to create. Should it be a game? a finance manager? a pack of useful scripts?

2.

What is the destination platform? In other words, on which model will you run your program? Organiser II? Series 5mx? Or maybe you're about to make a cross-platform application?

3.

Now that you've completed point 1 and 2, choose the best tool. OPL seems to be the best choice for most applications, at least for beginners. It will give you a wide variety of useful functions, covering graphics/animation, sound, GUI and integration with built-in software. On the other side, assembler will give you freedom, joy of hacking and great performance - of course if you're already familiar with assembly programming. However, it's pointless to write a home expense tracking suite with an extensive GUI in assembly language.

If you're planning a cross-psion application, running on the Series 7 as well as on Series 3, choose OPL. This will save you a lot of work you would spend porting your program to other platforms.

If your program will run only on EPOC machines, you may want to choose some more "mainstream" language, like Python, Perl, Java or Lua - especially if you have some previous experience. In this case, come back to the first part and read about the limitations. Having chosen one of the abovementioned, remember that you need to supply the users (if you're willing to publish your work) with the runtime libraries. It's really straightforward with Lua: there are separate .SIS packages available and all you need to do is to put them together with your application. Java needs JVM, the virtual machine available with the SDK (see part 1). Perl and Python require the interpreter to be installed.

4.

Ok, you have chosen your tool? It's time to learn to use it. For OPL and SIBO/EPOC machines, read "Programming Psion Computers" - the Bible of Psion programming. Organiser programming tutorials may be found on the Organiser II homepage (see part 1).

If you have chosen assembler, you not only need to learn the mnemonics (assembly commands) for your platform, but also should become familiar with your computer's internals - read "Programming Psion computers" or the manuals on Org II homepage.

For those who want to write in OPL, especially for future game developers, there's an excellent programming tutorial in EPOC Entertainer, covering everything needed to write your own application - the tutorial takes you through the steps of game development. You can also look for some OPL tutorials for Symbian, e.g. this one.

Perl, Python, Lua and Java tutorials were mentioned in the first part.

5.

Code, code, code. Practice makes perfect.

9Jul/114

Psionic programming, part 1

From Organiser to Series 5: Programming tools

It's not so far from the truth, that Psion Company has set the standards for many modern portable computers. Their sophisticated, sometimes revolutionary solutions pioneered the development of palmtops. Unfortunately, one of the great features of Psions not followed by today's palmtop market was the OPL. The idea of a built-in programming language wasn't new in those times - all home computers had BASIC interpreter on board - but OPL joined the ease of BASIC with the structural syntax and was well integrated with Psion's built-in facilities. And it was backwards compatible, as long as no system-specific functions were used. This means that you should be able to run your software written for the Organiser on a Symbian smartphone with just a few modifications! [1]

Apart from standalone programs, you can extend your system with OPL. The Calculator application on Series 3 Psions can perform calculations using built-in and user's own OPL functions. Also macros for Macro5 are written in OPL. On the Series 5 OPL programs can be extended by OPX modules written in C++. However, although OPL is the simplest way to write programs for Psions, it's not the only one.

On the opposite of OPL there are assemblers, allowing you to access directly machine's "guts". Since different models have different processors, it isn't possible to run your program designed for an Organiser on Series 3. Even Series 3 and 5 are incompatible.

Psion Organiser II models have an 8-bit HD6303 processor. You can program it using PCMAC. It's a cross-assembler, i.e. it's run on a PC and the generated machine code must be transferred to the Organiser.

All Series 3 models and the Siena have a 16-bit NEC V30 - which in fact is a low-consumption 8086 clone (although in different models it's clocked at different speeds). This means that you may use an x86 assembler, compile the code on a PC and it will be ready to run on the Psion. There are tons of commercial (TASM, MASM) as well as free- or shareware (A86, New Basic Assembler) assemblers. If you're willing to do the work on your Psion, there's even one that runs natively on your machine - S3A.

Series 5 models are powered by a 32-bit ARM710T. I know of two assemblers for them, both running on the Psion. The first is French Assembleur (unfortunately, the instruction manual is also in French) and the second is called simply ASM. I also read about "GB Assembler Studio" by Nicklas Larsson, but it seems to have disappeared from the Web.

Something else? Sure. Series 3 computers can be programmed in C. You'll find some good resources on Gareth and Jane Saunders' website. They have also some goodies for those who would like to write programs in C++ for their Series 5.

Of course that's not all. There are many more, especially for Psion Series 5. Among them are two Titans: Perl 5.6.1 and Python 2.2.1. (There's also Python 2.1 port, Epocpython). To me, the greatest drawback of these ports is the lack of Psion API (or I haven't found it). So they may be good for prototyping (in a limited manner, as Python 2.2 is an ancient version, eons before 2.7, not to mention 3k) or running some useful scripts (keep in mind, that they'll execute really slow), but nothing more. No real Psion applications written in Python/Perl. What a pity.

For those who want to program in a well-known, multi-platform and powerful language, there's Lua. Not only can you write standalone Lua programs, but also integrate Lua code into your OPL programs, making it possible to write applications utilizing Psion's features, such as GUI. Lua is available from FreEPOC.

You can also run Java programs on your Series 5 machine (Psion runs the Java Virtual Machine, programs need to be compiled on a PC). Among other, less known languages, is Prolog and even... a Brainfuck interpreter 🙂

Useful links:

  • "Programming Psion Computers" by Leigh Edwards and other free e-books and manuals for both SIBO and EPOC programming
  • Programming manuals for Psion Organiser II
  • HD6303 and ARM assembly mnemonics are described in the abovementioned packages (Assembler for the Org II) or on their websites (ASM for Psion 5)
  • Official home pages, where programming tutorials can be found: Python, Perl, Lua, Java

Go to part 2

  1. [1]Actually, Organiser's OPL is not a good example, since it uses a slightly different syntax (e.g. no PROC-ENDP statements). But programs developed for the Series 3, even those with GUI,  should work on Symbian.
28Jun/110

Vi vs. Emacs – now on your Psion’s screen

Vi and Emacs are two great text editors, famous for neverending fan wars between their users. Just type "vi vs emacs" in Google and you will find thousands of web pages full of pure hatred 🙂 If you've been in one of the camps, you're probably missing your favourite editor on the Psion. The good news is that you're one click from it. If you're an Emacs fanatic, visit this site. If you could kill for Vi - this one is for you.

Obviously, because of the limitations of Psion machines, these aren't fully functional ports. Zile is a "lightweight Emacs clone" - its installation file weighs 765 KB - and it lacks many of Emacs' "miscellaneous functions". Instead of Emacs Lisp, Zile uses Zile Lisp - its own subset of Emacs Lisp with only basic commands. Vim for Psion is larger (1.8 MB installation file), but - unlike Zile - it an accurate Vim port rather than clone. It is however an ancient version 5.5 of Vim, so those who use version 7 may feel a little confused with the differences. Psion port has also a few drawbacks, e.g. it doesn't appear as an application in the Extras bar and you have to run the EXE file manually. If you want to use Psion's file dialog windows from within Vim, you may install a little plugin (requires Macro5).

Filed under: Psion (EPOC) No Comments
19Jun/111

Psion as an ebook reader

Although nothing compares to a real book, smelling of ink and paper, ebooks have some advantages, including extreme portability. However, dedicated e-ink readers like Kindle are still expensive and limited only to reading books and other static content. Using modern gadgets with colour, backlit screen, like iPad doesn't seem a good idea to me (besides they're too damn large). Why not give your old Psion a try?

For me, the best application is MobiReader. Not only is the program so well designed, that reading books is a pleasure, but also there are thousands of good books available from MobiPocket and many other sources. You may find dozens of fine, usually free ebooks in MobileRead Wiki. I also recommend Cory Doctorow's books.

NOTE: MobiReader for Psion has been released free. In the registration menu type the key: CGHYCXYL.

Another ebook reading application worth a look is eBook by Simon Quinn. I use it to comfortably read books in raw text (txt) format. Many of these may be downloaded from Project Gutenberg's website. eBook now is also free, you'll find the registration key on author's homepage.

I wanted to write a bit about TomeRaider, which was free to download and a code generator was provided by Yadabyte, but I'm a bit puzzled, because now on Proporta's site it's for $24.80. Since there's only an old version (TR2) available for Psion, I think it's not worth its price.

The most widespread format for electronic publications is PDF. You can browse PDF documents on Psion, but the effect will be rather unlike reading them on the screen of your PC. Because of Psion's limited processing power, it is really slow. If you're reading mainly texts with no images or equations, the speed will be fair enough to not fall asleep when the page is rendering. But when most of your books are loaded with graphics, reading them may be annoying.

I know two programs that handle PDF files, both from mBrain Software. Pdf is released under GNU GPL license. It reads documents up to version 1.3. Pdf has very limited support for embedded objects such as equations. Also, don't expect reading texts with custom national characters (e.g. Polish). Unlike ebook readers described above, it lacks bookmarking, what makes it unsuitable for reading novels. An improved version of Pdf is Pdf+. It's shareware and it supports PDF 1.4 files.

There's also a DjVu reader for Psion, but use it only if you really need to view DjVu documents on Psion. It is sloooow, much slower than Pdf, and unregistered version marks the page with reminders. You may download SDjVu from here.

Filed under: Psion (EPOC) 1 Comment
15Jun/114

PC/XT in your Psion

Psion Series 5/5mx is powered by a 32-bit ARM710T processor. That's enough to emulate an 8086 (actually 80186) PC/XT. According to the producer's website Psion 5 runs Eratosthenes Sieve benchmark with 0.64 and integer calculations with 1.28 XT's speed (Psion 5mx reaches 1.43 and 2.72, respectively). That's fairly nice.

What else do we get?

  • 8087 math coprocessor emulation (maybe an older version of AutoCAD would run on it!)
  • MCGA graphics up to 640x200
  • mouse emulation (with the pen) and access to Psion's serial port (may be mapped as COM as well as LPT)
  • two FDD's using disk images (with full read/write support) and one or more HDD's operating on EPOC filesystem

The manual says that the installation of XTM is difficult. It isn't. The hardest step is the preparation of DOS disk, necessary to boot the emulator. You need to make an image (no matter its size) with a DOS that would run on an XT and a few important system files required by XTM. If you're lucky enough to have a PC with a floppy drive, just read the manual. If you aren't, follow these steps:

  1. Download FreeCOM. It's the only DOS I found to be working.
  2. Make a disk image. Under Linux you can use an "artificial filesystem":

    mkfs.vfat -C "floppy.img" 1440
    sudo mount -o loop,uid=$UID -t vfat floppy.img /mnt/floppy

    (I found this tip here)
    Under MS Windows you may do it with WinImage.
  3. Copy FreeCOM files to your "disk".
  4. Copy EPOCFS.SYS, EREDIR.EXE and XTMMOUSE.EXE from the XTM package.
  5. You can also write a minimal FDCONFIG.SYS:

    DEVICE=EPOCFS.SYS C:\XTM\HDD

    (or whatever your HDD directory is)
  6. Rename the image to DRIVEA.DSK and copy it to your Psion.

When you have XTM running, it's time to install some goodies 🙂 I managed to launch such essentials as Volkov Commander 4.0, Turbo C 2.01, Turbo Pascal 5.5 and Gnuplot 3.4 (you need to set terminal to mcga). Games, even those from XT era, don't work or run with an unplayable speed. Text games, however, do quite nice - e.g. Castle Adventure, one of the first PC games I played back then.

Among the software that runs under XTM is... MS Windows 3.0! It's very slow and the mouse doesn't work (because of non-standard mouse driver), but it works. You can even play solitaire 🙂

You can download XTM from here.