I had time, not a lot of money and the keenness to build something cool. Having already built a ticket printer for a PC (which is actually quite a capable POS system now, and it's on Gitorious, I wanted to make something a bit more portable for when we're really busy! Initially it's going to be for people who've already purchased tickets (so I don't need to make transactions) but it should also be usable as a standalone ticket selling device.
The Psion HC110 popped up on eBay for £20, and a bit of searching revealed that there's a C SDK for it. With this in hand, (and having managed to install it on DOSBox), I bought it and started to code.
The HC came with 2 storage cards, a printer and a broken TTL/PFS module. I had to replace that with something useful, so I bought an RS232/TTL module from Pulster. This allowed me to use PsiWin to transfer files to and from the device.
The HC I received had a copy of something called "NETA" on one of the flash cards. This is a very out-of-date program for generating parking tickets. This particular machine, it would appear, had been used by Southwark Council. Sadly I could not get NETA to work, as it complained about some missing data. Some judicious use of REVTRAN in a Psion 3a emulator, however, gave me some readable OPL code.
From this code, it became apparent that formatting the "A" card (RAM, with a newly replaced battery) and making a file with a machine ID in it, would allow the program to function - the installer worked, the utility functions worked (the backdoor password is hardcoded, and was easy to decipher). This became a great asset in later work, as a number of printer utility functions became very important.
At this point it's probably important to note that I didn't get NETA fully working as it needed to be loaded up with a load of databases of things like street names, offences, car makes etc. which I couldn't be bothered to generate data for. It would only help me generate parking tickets anyway, which aren't interesting to me, surprisingly!
So what did I get from NETA? Battery charging routines for the printer (it has a built-in battery), initialisation code and usage examples.
I'm not going to post any code from NETA, because it's all proprietary and honestly it's not all that interesting, but there are some things that I will post, as they're necessary for proper printer usage.
Before I get into that, however, I'll post a few lines of OPL code.
- PROC main:
- LOPEN "PAR:A"
- PRINT "Printing..."
- LPRINT "Imperial Cinema Presents"
- LPRINT "Life of Pi"
- LPRINT "Thursday 27th August at 19:30"
- LPRINT "Member £3.00"
- PRINT "Finished"