A few days ago I was given a wonderful birthday gift. NC100 is an A4-sheet-sized (exactly!) portable computer, intended for word processing. With its comfortable, full-sized keyboard and built-in Protext word processor (real word processor, which visualises formatting, justifies the text etc.) it's really good as a "typewriter", but not only. After all, it's a regular computer, driven by a 6 MHz Z80A processor, with BBC BASIC onboard (and an inline assembler accessible directly from BASIC code!).
Why am I writing here about such a huge and heavy (almost 1 kg) stuff? Well, in fact NC100 is twice as big as a Portfolio (not to mention Psion Siena), but still it is easily portable (it's about the size and weight of a book, so it can be packed into a backpack just like, say, textbooks are), it runs several (over 20, according to the Internet) hours on 4 AA batteries and it can be held with one hand (not when typing, but e.g. when viewing a text). And it is much smaller than an average laptop of today (and really tiny compared to the laptops from 1992, when the NC100 was introduced).
Unlike Atari Portfolio (sad to say), Amstrad NC100 is designed with usefulness out of the box. Built-in programming language is something that the Portfolio is really lacking. Another great feature is a serial and a parallel port with typical RS-232 and Centronics sockets (custom sockets become a pain in the ass when you have bought a second-hand computer without any cable). You don't even need extra software on your PC, since the NC100 supports an Xmodem protocol.
What else... Maybe CP/M? Yes, there is a CP/M 2.2 clone for the NC. I haven't tested it yet (it wouldn't fit in the 64 KB memory, so a RAM card is required), but it seems that it is possible to run such goldies as WordStar or dBase, or even Turbo Pascal 3.0.
For more info see:
- Tim's Amstrad NC Users' Site - documentation, software and much more
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.
- Install Essential Disk Utilities and give CheckDisk a chance, at least once a month.
- Backup your data (at least those really important).
- When a problem appears, DON'T PANIC
- First try to solve the problem with CheckDisk.
- 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.
- If there are any files left that couldn't be copied to the PC, copy them to the ramdisk of your Psion.
- When your data are secure (make sure!), format the card to FAT filesystem. Copy the files back and run CheckDisk.
Thanks to its popularity back then, Portfolio experienced a flood of software for virtually all applications. However, when the hype had gone down, most of the dedicated websites started to disappear and some FTP archives have become inaccessible. Nowadays, a new fortunate user of a Portfolio (with some file transfer hardware) faces the problem: where to find anything useful that I could load to my little computer and be happy with it?
Here's a short list of the sources where you can still find software for the Portfolio. They are redundant, of course, but that increases the chance, that Pofo software will survive on the Internet and we won't wake up one day to find out that the only place where the programs used to be is down.
- http://files.pofowiki.de/ - a huge collection of applications, utilities and games, including programs written for Portfolio Club Deutschland; some directories include short descriptions in
- http://www.atari-portfolio.co.uk/library/tx-downloads.html - another great source of Portfolio software
- http://www.umich.edu/~archive/atari/Portfolio/ - huge repository of various programs
- http://portfolio.wz.cz/sw.htm - several tools and games (cz)
- http://www.pofo.website.pl/pliki.htm - some useful utilities (pl - don't switch to English version since it lacks some entries)
- http://leute.server.de/peichl/pfe.htm - Klaus Peichl's homepage with his superb programs (including the last version of Folidash and Phoenix)
- http://mbcorp.wu.cz/atari/hry.htm - games with screenshots and short descriptions (cz)
- http://www.pingweb.de/gunni/epofo.htm - website that no more exists (access via Web Archive) with the author's programs (including AportisDoc reader for Atari Portfolio)
"Don't be kidding", you say. A vintage palmtop is an ideal toy, a collector's item, a nostalgic artifact. It's also great for digging in its guts - say Atari Portfolio owners with electronic skills - just like ZX Spectrum.
Ok, but now try to think about our cuties as of everyday tools. Weird? No, my Psion 5mx serves me as a real personal digital assistant and no way I would change it to something newer. The list below is based mainly, but not only on my personal experience:
- ebook reader
MobiPocket, EBook (S5)
- text games
DOS games (PF, S5 + xtm), roguelike (S3, S5), Infocom games (S5)
- logic games
Chess, Backgammon, Quad etc. (PF, S3, S5)
- agenda / year planner
PF, S3, S5
- taking quick notes
PF, S3, S5
- amateur astronomy
Solun (S5), Procyon (S3)
- pocket translator / dictionary / thesaurus / encyclopedia
SDict, TomeRaider (S5)
- language learning
PF, S3, S5
- scientific calculations
PF, S3, S5
- fuel expense tracking
FaBu (PF), MyCar (S3, S5)
PF - Atari Portfolio; S3 - Psion Series 3, 3a, 3mx, Siena; S5 - Psion Series 5, 5mx, Revo. The list isn't accurate (some software may not work on, say, Series 3), it's rather an outline of how I see it. I included only these models, since I have little experience with other computers, like Palm.
Any other suggestions?
-  I know that it's hard to call games "a tool", but this blog post is not about using vintage palmtops in your professional work, but rather about using them for any purpose that is not related with themselves. ↩
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
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.
Marcus von Cube's page (emxutil.zip)
Last weekend the well-known demoscene party was held in Głuchołazy, Poland. Though it's traditionally associated with "big" Atari systems like XL/XE, ST and Falcon, I think it's worth mentioning, that a new Portfolio initiative was born this year. We already have a graphician, musician, hardware constructor, coder and tons of ideas. If we succeed, you'll probably hear about Portfolio once more.
This year, however, we spent the party in a mourning mood, having heard about the death of one of us. Radek "Raster" Štěrba was a "one-man army" in the Atari community - a talented coder, musician and hardware constructor. As if it hadn't been enough, another friend of us - Artur "Jurgi" Jurgawka - has gone on sunday.
We'll never forget you, friends!
So you want to write programs. Ok, here are the first steps you should follow:
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?
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?
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.
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.
Code, code, code. Practice makes perfect.
Portfolio's display is controlled by a Hitachi HD61830 chip. As I previously said, this makes it incompatible with the PC and more difficult to program. However, the only way to use dynamic graphics in your programs is to access the controller directly.
If you'd like to update the graphics in real time (e.g. in a game), the best idea would be to redraw the screen at once, so that you don't need to bother drawing each pixel separately. It is possible thanks to the routine by Milan and Martin Hrdlička:
refresh: cld push ax push cx push dx push si push di push ds mov si, 0 mov ax, 0b000h mov ds, ax mov di, 64 ref2: mov cx, 30 mov bx, si mov al, 0ah mov dx, 8011h cli out dx, al mov al, bl dec dx out dx, al sti mov al, 0bh inc dx cli out dx, al dec dx mov al, bh and al, 7 out dx, al sti ref1: lodsb ror al, 1 mov ah, al and ah, 136 ror al, 1 ror al, 1 mov bl, al and bl, 68 or ah, bl ror al, 1 ror al, 1 mov bl, al and bl, 34 or ah, bl ror al, 1 ror al, 1 and al, 17 or al, ah mov ah, al inc dx mov al, 0ch cli out dx, al mov al, ah dec dx out dx, al sti loop ref1 dec di jnz ref2 pop ds pop di pop si pop bx pop dx pop cx pop ax ret
Now, all you need to do is to update the graphics at B000:0000 each time before refreshing the screen. One pixel is one bit, so there are 64 lines by 240/8=30 bytes. That makes 1920 bytes and the actual position of a pixel in memory may be calculated using this formula:
byte = y * 30 + x / 8
bit = x mod 8
so, for example to draw the point at x=50, y=17 (0,0 is the top-left corner, 239,63 is the bottom-right) you need to set the bit number 2 at B000:0204 (that is 516 decimal). Obviously, clearing the bit clears the pixel.
More tips on programming graphics:
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! 
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
- "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
-  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. ↩
One of Atari Portfolio's weak points is the graphics. Not only has Portfolio very modest graphics capabilites (what can be understood), but also is hardly compatible with PCs. I think this is why there were so few games written for Pofo (Folidash and Phoenix are two of them).
There are two ways to display graphics on Portfolio: using interrupt 10h or sending data directly to the graphics controller. The former is very slow, so it's only intended to use when you want to introduce simple graphic elements (e.g. in board games), but its advantage is the compatibility - you'll be able to run your program on a PC. The latter is much faster - it's actually the only way to program animations - but your code will hang the PC.
Using int 10h is also much easier. If you want to draw an oblique line, you may type:
mov ax, 4 ; set graphics mode 4 int 10h mov cx, 0 ; initial X coordinate mov dx, 0 ; initial Y loop: mov ax,0c01h ; set pixel mov bh, 0 int 10h cmp cx, 63 je end inc cx inc dx jmp loop end: mov ah, 1 ; wait for a keypress int 21h mov ax, 7 ; set graphics mode 7 int 10h int 20h ; exit to DOS