From: pfund3@uni2a.unige.ch (Daniel `HB9VBC' Pfund)
Newsgroups: comp.sys.psion.announce,comp.sys.palmtops,comp.answers,news.answers
Subject: PSION Series 3x palmtop FAQ part 5/6
Followup-To: comp.sys.psion.misc
Approved: news-answers-request@mit.edu,kaufman@mcs.com
Summary: This article is a collection of information on the Psion
         Series 3(a) palmtop computers. It should be read by anyone
         intending to post to the comp.sys.psion.* newsgroups.

Archive-name: psion-faq/part5
Version: $VER: Psion FAQ v1.6
Posting-Frequency: monthly
URL: http://www.geocities.com/SiliconValley/8130/faq.htm

part 5

See part 1 for complete table of contents of this FAQ (including this part's).

7. THE EMULATOR

Psion, in their great generosity, have released their Psion emulator for the Series 3 and later on for the Series 3a. This is a PC product. Also please note that it is completely *unsupported* by Psion and do not ask them for new versions, other platforms, etc... I think that it was quite nice of them to offer their users (and potential users) such a nice tool. We wouldn't want it to stop, would we? The files are available as usual in the IC archive in the development directory.

7.1 Limitations & bugs

The following limitations & bugs were reported:

7.2 Tips & tricks

7.3 Changing permanently the keyboard mapping (by Uwe Kallmeyer)

The keyboard map is held internally in the file EPOC.DLL. You must thus patch this file to suit your own keyboard. It contains three tables, one for Psion/Ctrl keys, one for shifted keys and one for normal keys. These tables start at locations (for the file dated 4.12.94, size 94736):

                        Psion/Ctrl     $35D8
                        Shift          $33D8
                        Normal         $32D8

8. PROGRAMMING

8.1 Overview of development possibilities

There are a number of ways in which you can program the Psion. Choose the one which fits your abilities, requirements, and budget.

8.2 OPL programming directly on the Psion

This is the most straightforward. If you can live with the cramped keyboard and screen, you can pursue this option with no further outlay, anywhere you can take your Psion.

If you haven't got the OPL Programming Manual, I suggest you order it. It's really a great manual (unlike most others I've seen). If you are impatient to receive it, it's also available online at: http://www.primate.wisc.edu/people/dubois/psion/oplman/

Some alleviators:

  1. A database of the OPL commands is available from the IC archive (see section 5) which you can load into the built-in DATA application.
  2. Switching off the clock in the OPL editor will give you more active screen width. CONTROL/menu toggles this.
  3. CONTROL/Word takes you straight to the OPL editor from the system screen.
  4. Get OPP from Andy Clarkson. This is really *the* programmer's tool for programming directly on the Psion. It allows you to have exactly the same functionnalities as with Psion's S3ATRAN and even more directly on your Psion!
  5. Get OPPDebug from Andy Clarkson. This is a fine debugger for OPL. Psion haven't written one themselves, so this is a must for all serious programmers!

You can also make use of some of the data which follows in this section, so read on.

8.3 OPL programming from a PC

You can compose your OPL text files on your PC and send them down to the Psion with the link for translation, or you can obtain S3ATRAN from the IC archive (Section 5). S3ATRAN will translate your OPL source into .OPO format which you can then use the link to move to the Psion. In addition to translating simple OPL, S3ATRAN understands a number of C-like pre-processor commands, which make source preparation easier. As well as this advantage, source preparation on a PC allows use of the full-sized keyboard and screen, use of whatever text editor you favour, convenient storage and archival of important source code, and access to printers. It also allows you to make bigger programs since you are not limited to a 64k source like on the Psion.

For those using windows, you can use Psion's Opl Development Environment (ODE) which is a *very* nice programmer's tool for developing OPL in windows. ODE is commercial.

There is a Psion 3 emulator for the Series 3 and another one for the Series 3a, both available in the IC archive, which allows you to run OPL programs on the PC. For more details, see elsewhere in this FAQ.

The "Psionics files" are a collection of information for the OPL programmer who wants to know more than is in the programming manual, but who doesn't want the expense and effort of getting the SDK. They include general explanations of system concepts, descriptions of all the system calls usable from OPL, information about some useful device drivers, and random other useful items. Much of the information is taken from the official Psion SDK manuals, with permission. Clive D.W. Feather is widely appreciated for having taken the time to bring this information to the Psion community. You can get the latest set of files (which change quite frequently), from the WWW site. See that section in the FAQ for the address.

Psion offer Software Development Kits - "SDKs". The lowest level is the documentation-only level. This currently includes two large ring-binders which document vast amounts of detail about the Psion. Though much is of prime relevance to C programmers, a lot of essential information can be gleened by the astute OPL programmer. System calls, file formats, transmission protocols, OS structure etc. are all to be had. The SDK costs 75 UKP. See the contacts section if you want to order it.

8.4 C Development on PC

The second level of SDK (see above) is called the "Standard SDK". It includes the documentation mentioned above, and some software on floppies. The software comprises the TopSpeed C language system, an interactive Psion debugger, some customisation files, and some examples. This costs 155 UKP.

"TopSpeed C" is a general purpose development environment and C compiler. You can use it to write C programs for your PC, and the development environment allows you to add other language compilers.

Psion's customisation files taylor TopSpeed C so that it can generate image files which will run on the Psion.

The Psion debugger allows C programs to be debugged. Debugging can be done at the C source code level, or at assembly language level, or in a mixture of the two. The debugger also allows programs to be run locally on the PC in a form of Psion emulator, or run on the Psion itself through the serial link. A slew of very useful features are included in the debugger.

Psion also provide some example programs which are referenced in the manuals. Going through these with the manual is a good way to learn about the Psion and the best way to program on it. The SPY application is amoung the examples included.

It is theoretically possible to write C programs for the Psion using other compilers, but extensive expertise would be needed to avoid the pitfalls. For example, Topspeed C implements parameter passing in a way which is compatible with the Epoc operating system.

Object-oriented programming is possible in this C environment.

8.4.1 Can I use another compiler than Topspeed? (by Dan Ramage)

"It is impossible to write sibo applications with anything but the sibo sdk for several reasons.

Topspeed can output small memory model code staying within the 64k code and data segment. In addition, Topspeeds calling conventions don't use the segment registers (which can really mess up your psion). Another reason is that topspeed code is compact and executes quickly on sibo machines."

8.5 Advanced C Development on a PC

The highest level of SDK is the "Professional SDK". This adds the source code of various device drivers to the Standard SDK. It costs 295 UKP.

8.6 Available books (by John A Watson)

In order of complexity, the following books are available.

  1. First Steps in Programming the Psion Series 3 by Mike Shaw, 14.95 GB ISBN 0-7457-0145-0 An introduction to the basic principles of programming.
  2. Graphic Programming on the Psion Series 3 by Bill Aitken, 14.95 GBP ISBN 0-7457-0156-6 As the title suggests this is for those interested in graphics.
  3. Serious Programming on the Psion 3a by Bill Aitken, 16.95 GBP ISBN 0-7457-0035-7 (Series 3) ISBN 0-7457-0282-1 (Series 3a) A complete OPL programming tutorial from basics to advanced especially graphics including sprite design.
  4. Machine Code Programming on the Psion Series 3a & 3 by John Farrant, 16.95 GBP As the title suggests this book tells you how to program in 8086 machine code and assembly language. The price/package includes a fully functional two-pass assembler with text editor and debugger.
  5. Introduction to Using the Psion Series 3 by Ros Lawton & Isaac Davis, 14.95 GBP ISBN 0-7457-0146-9 14.95.
  6. The 100 Most Frequently Asked Questions for You and Your Psion Series 3a & 3 by Richard Bloss & Adam Taylor, 9.95 GBP ISBN 0-7457-0300-3

8.7 How to do various things: tips & tricks

(Thanks to Andrew Baldwin for material)
  1. First - reading the programming manual which came with your Psion more than once is thoroughly recommended !
  2. REVTRAN - is a reverse translator available at the archive. It turns OPO modules back into OPL - though variable names may be lost. This program allows developers to see how others have implemented their programs, and this may give valuable insights into useful programming techniques. Please note that you should not use REVTRAN to circumvent protection mechanisms, to avoid paying shareware fees, to steal programs or fragments thereof, or to do anything else illegal or anti-social. Some OPL programs are protected against reverse translation.
  3. SPRITES - the manual doesn't make it clear. You can have only one sprite. You must emulate any further sprite functionality in OPL.
  4. MULTI-DIMENSIONAL ARRAYS - are not provided in OPL, but they can be emulated. For example, a two dimensional array: ARRAY%(X%,Y%) may be implemented by declaring ARRAY%(Z%) (where Z%=X%*Y%). You can now access element (a%,b%) as ARRAY((b%-1)*X% + a%). Each access requires arithmetic so this will incurr a speed penalty. OPP, the OPL preprocessor, implements this (exactly like described) but with complete transparency to the programmer.
  5. SPEED - OPL can get slow. Here are some ideas for speeding them up.

A. SHAREWARE/FREEWARE SOFTWARE

Please note that the software described here is just a small part of available software and that it would be impossible to track down every single share/freeware Psion program. If there is a program which you would like to see added to the list, please write a mini review in the same style as these here and mail it me. I'll gladly add it and give you credit!

Just some guidelines if you wish to submit a mini-review: mention the author (and Email address if possible), the exact filename and the type of program (free/share/cripple) as from the list below. Do not write more than 2-3 sentences and do not mention any "this is great" or "this is bad" comments, thanks!

If you want to know more about these programs, you may want to check out my Psion programmer's on the web list at: http://www.geocities.com/SiliconValley/8130/prgers.htm or alternatively, check out Steve Litchfield's review section at: http://ourworld.compuserve.com/homepages/slitchfield/reviews.htm

A.1 Applications

I've used the following definitions below. These may not accord with their standard meanings as used elsewhere.

Shareware
a fully functional program is provided, but the user is asked to pay for it.
Crippleware
as shareware, but the functionality of the program is restricted in some way to encourage registration. (This may not make it unusable - ANY restriction puts a program in this category.)
Freeware
the fully functional program is given away free. It is probably still copyright to the author and conditions may be imposed on redistribution.
GNUware
the program is distributed under the GNU General Public Licence: among other things, this means it will include source code.

Note that when ``*'' appears, this means the version number. New version come out very often, so I can't track down each program.

The following people have contributed their reviews (see the first part of this FAQ for their Email addresses):

Roger Burton-West     (RBW)
Andy Clarkson         (AC)
Steve Litchfield      (SL)
Neil Masson           (NM)
Daniel Pfund          (DP)

A.2 Games (by Dan Ko)

Name         Stars Zip  Exp  Mem  Type FMT Collection Description
------------ ----- ---- ---- ---- ---- --- ---------- ------------------
pipe3a.zip   ***** 9k   10k  12k  S    F   ?          exciting puzzle
stigma.zip   ****  63k  87k  39k  D+C  F   ?          rolling ball
fair22.zip   ****  115k 197k 46k  S+C  F+S GamesPck3a THE golf game
tetris_2.zip ***** 9k   16k  6k   S    F   ?          Tetris nuff said
Patience     ***   -    -    8k   C    R   1Mb/2MbS3a zzzzzzzz
bunnies.zip  **    15k  42k  ?    F    F              slow platform
lander3.zip  ****  33k  62k  ?    S    F+S GamesPck3a cool space game
risk101a.zip ***+  31k  81k  14k  S    F   ?          strategy
willy11.zip  **    40k  68k  ?    S    F   doubt it   2slow2big platform
Tanka.zip    **    9k   12k? ?    S    F              S3 was much better

Stars:  Arbitary rating units, overall personal impression includes
        adjustment for size.
        *     waste of space
        **    avoid; boring, limited appeal
        ***   OK, if you've nothing better to fill your flash with
        ****  excellent, recommended
        ***** can't live without it

Zip:        The zip file size
Exp:        How much space the installed components will take up
Mem:        Free system memory required to run in
Type:       S Shareware
            D Demo
            F Freeware/PD
            C Commercial
Format:     F floppy (ZIP file)
            S SSD
            R built into ROM
Collection: Name of collection which contains this game

End of part 5/6


(==[Go to previous part]
***[Go to the index]
==)[Go to next part]
All pages coming from http://www.geocities.com/SiliconValley/8130/ (and this is one of them!) are copyright 1996 Daniel Pfund.