📜 ⬆️ ⬇️

Review of Psion Organizer II XP with internals and Tetris



The Psion Organizer II XP handheld computer was released by the British company Psion in 1986. He became a successful representative of the Psion Organizer line, in which the firstborn was Organizer I, which came off the assembly line in 1984. The last representative of the series was Organizer II LZ, which appeared on sale in 1989.

Psion Organizer is often titled as the first PDA in the world (what we called PDAs) and although this statement is controversial in my opinion, Organizers did have unique features for the handheld computers of those years.

Brief characteristics


Year of release : 1986
CPU : 8-bit CMOS Hitachi HD6303X operating at 0.92 MHz
ROM : 32K or 64KB (for multilingual version)
RAM : 16 or 32KB
Screen : LCD, 2 lines of 16 characters.
Power supply : 9 V battery type “krone” or from the adapter (not included)
Keyboard : 36-button, “ABC” layout
Size : 142 x 78 x 29mm (with the protective cover closed)
Weight : 250g
Price : 139 pounds at the start of sales
')

A little background



The copy that you see in the photos was bought on ebay for a modest (for a working device in 1986) the amount of $ 30. Such a low cost is apparently related to the device’s former popularity (more than a million devices of this line were sold), as well as its survivability. Surprisingly, the lot was marked as "BRAND NEW", as far as this is true, I do not presume to judge, but the device actually arrived in a close to perfect condition.

Overview



The packaging is essentially battered by time. Inside, under the protection of the foam, there is the Psion itself, the instruction manual, a description of the warranty, and an unfilled warranty card. Unfortunately, the instruction and warranty card stuck together and in the process of separation the instruction cover was damaged, the box was apparently kept in a place with excessive humidity.


The case of the device is made of very durable plastic, it is noted in almost every description. I happened to test his strength in practice - accidentally dropped from the table on a laminate, height ~ 75cm, I did not manage to find traces of a fall. The Psion case has another feature - a downward sliding cover protecting the keyboard and plug-in memory modules. The cover is removable, so Psion looks without it:


Such attention to strength is due to the fact that the device was largely aimed at business applications. On its basis, for example, mobile POS terminals were widely distributed; Sony used Psion's in its European service centers; they were used in geodetic works, and in other areas of activity.


The dimensions of the Psion are approximately the same as the current 5 "phones. For example, in comparison with the Nexus 5X:


The phone, however, is somewhat thinner.

The screen is a symbolic LCD indicator, has 2 lines of 16 characters each. 5x8 character resolution. Unfortunately, there is no direct access to individual pixels, which significantly limits the graphics capabilities (if of course you can even talk about graphics capabilities with 80x16 pixels), while the symbol table is completely missing pseudo-graphics. But the developers left a loophole - 8 redefinable characters, so that 320 pixels at the same time at our disposal.
If you have the effect of deja vu, it is not surprising. The display controller is built on the basis of the Hitachi HD44780 , and the matrix itself and the controller, as well as their counterparts, are actively used in DIY (and not only) to this day, that same “green screen”, which can be found everywhere to connect Arduino, its direct descendant.

Keyboard - 36-button membrane, “ABC” layout. Each alphanumeric button is responsible for entering two characters, switching between them is classic - with the SHIFT clamped, or the SHIFT + NUM combination. In addition to the Alphanumeric keys, the keyboard has cursor control buttons; standard SHIFT, DEL, SPACE, EXE (analogue of Enter); the ON button, which even after 30 years regularly switches on the device, in the on state it performs the Esc functions; The MODE button brings up something like a context menu.


The absence of the shutdown button may seem somewhat unexpected, you can only turn off the device from the main menu or, as advised in the instructions, do not turn off at all, the device will go into standby mode and after switching on the user will start work from the place where he finished. You can also note the absence of such common punctuation marks as exclamation and interrogative, a bit strange for a device with the function of a notebook.

The vertical “calculator” form factor, in my opinion, wins over the horizontal one, which was much more common among handheld computers of the 80s, you can even type on the go.

On the back of the case there are two slots for memory modules. Unfortunately, they were not part of the standard sales kit, instead I just have two plugs.



Memory modules existed of several types:

Datapack - on the EPROM chip, the user could record data for long-term storage on it, but the deleted files were simply marked as deleted, the memory could only be ultraviolet irradiated, for which a special device was purchased (it was probably easier to buy a new module). Up until the end of the 90s, the Psion user community published addresses of people across Europe who could send a memory module to erase by paying only postage. Memory capacity from 8 to 128KB. These modules were the most popular.

With EPROM, so-called Programpack - modules with ready software were also distributed inside, although some of them used non-erasable PROMs. Programpack'i released both Psion and numerous independent developers. The programs were the most diverse - games, dictionaries and translators, a file manager, spreadsheets, and more, even an assembler.


From left to right: 64KB Datapack, 32KB Rampak, 256KB Flashpak. Photos taken from the site www.jaapsch.net

Rampack - volatile SRAMs were used, they could be recorded and erased, but the storage time was limited to several years, there was a non-battery inside and the cost of the modules was significantly higher than that of the datapack. Rampacks were up to 512KB in size.

Flashpack - as the name implies, NOR-type flash memory chips inside, although these modules appeared much later than the start of sales of Organizer II, in 1986 this type of chips was not yet on sale. Because of this, they were not fully supported.

The device is powered by a single 9-volt battery 6F22 or more simply from the “Crown”. Even in parallel with the purchase of the Organizer, I ordered a pair of batteries of this size, rechargeable via USB - I did not want to go broke on batteries. I have never used these batteries, the usual alkaline crown was enough for all my research. Judging by the user reviews, with active work, the battery had to be changed every couple of months.


Above, under the protection of a sliding curtain, there is a connector for connecting external devices.


Unfortunately, I don’t have a single external device, so I’d just note that a large number of peripherals were released for the Organizer, both by Psion and third-party manufacturers. Among them were, for example, printers, barcode scanners, a modem, a pager, a magnetic card reader, RS232 converters, a power bank, and many other devices. An interesting feature was that when the device was connected, Psion automatically ran the code contained in its memory (if it was), thus connecting, for example, a barcode scanner, the user needed additional programs and additional functions for OPL were added to the user.


From left to right: modem, pager, barcode scanner, thermal printer. Photos taken from the site www.jaapsch.net

Geekporn


Of course, the psion has been opened.


Judging by the stamps on the boards, my copy was assembled at the end of '87. Piezodinamic is highly oxidized, but, fortunately, it is the only part with signs of corrosion.


All components are located on two boards connected by a loop, on top of the power board, which also contains connectors for connecting peripherals, below the main board, on which 6 microcircuits are located - microprocessor, display controllers, 32KB RAM and 32KB ROM and one semi-custom multifunctional chip.


Top 2 chips - Hitachi DG44100H and HD44780A00 . HD44780 is the main chip of the display controller, but since it can control only 2 lines of 8 characters each, there is an auxiliary DG44100H in the diagram . As I already wrote, HD44780 based controllers are still widely distributed.

Just below the Hitachi HD6303XF . This is an 8-bit CMOS microprocessor (more precisely, MPU) from the HD6301-HD6303 family that were backward compatible with the well-known Motorola 6800 . The processor operates at a frequency of 0.9216 MHz.

Even lower, to the left is the RAM chip - HM62256LFP-12T , the promised 32KB of SRAM memory.

To her right is a semi-custom chip that performs several functions at once: it controls the on and off of the processor, polls the keyboard, provides the functionality of a real-time clock and some others.

And at the very bottom of the chip, from the recently founded Atmel company, the AT27C256 is a single-programmable memory chip (OTP) of 32KB EPROM.

Here you have some more microprocessor with a bobbler:


Back side collage of both boards:


Tetris


While buying the Organizer, there was a thought to write something for him. And initially I wanted to completely immerse myself in antiquity and write directly on it, so I did not even consider buying a Com adapter, which I quickly regretted - it is very difficult to program on the screen in 2 lines, something like claustrophobia occurs. As a result, I had to open Notepad ++, but there was an acute problem of transferring the code - of course it is possible to type on the calculator ABC keyboard after some getting used, but difficult, so debugging was also decided to be transferred to a computer.

For Psion Organizer II, there was an official commercially distributed SDK, including a code editor, translator, debugger, simulator, and a utility for creating an image of memory modules.


Left editor, right debug process

Everything in it is good, but, due to the fact that the simulator is bundled and not a full-fledged emulator, we cannot work with low-level functions like peek, poke and run machine code, which is why test programs that work with redefined characters (User Defined Graphics or UDG, the same 320 pixels) becomes problematic.

Fortunately for Psion's keyboard and for my fingers, in 98, independent developer Paul Robson wrote a full-fledged emulator of the entire Psion Organizer II line, for which Psion Inc. officially provided the images.


I used this emulator in conjunction with the translator from the official SDK for development.

On the development tools told, now briefly about the language itself OPL.
OPL (Organizer Programming Language) is a BASIC-like interpreted programming language. The translator built into the Organizer creates a byte-code, which is already being executed by the interpreter, thus achieving relatively high speed of the programs. A distinctive feature of the OPL is the ability to perform machine instructions out of the box, thanks to which the device is at the complete disposal of the developer.

So, after some thought about what to write under Psion, the choice fell on Tetris (yes, very original). Firstly, in 30 years it was never written for the two-line Psion (maybe it is, but I found only an implementation for the four-line LZ model). Secondly, you can use the graphics capabilities of the device and most importantly they are enough (almost). There were some doubts about whether the interpreted language would have enough speed for Tetris on such a low-performance device, but the very first tests showed that there would be enough speed and this was completely confirmed - Tetris was written entirely in OPL and only at the end, more for interest, A couple of the most loaded sections for drawing were rewritten in machine codes.

The main point was to draw a “glass” with figures so that there were no noticeable spaces between the characters, for this I divided each character into six 2x2 pixel squares, in this form it turns out to evenly fill the entire playing field with beautiful squares (like a brick game), this type:


But here we are in for an unpleasant moment - the limit of 8 UDGs, this would be enough only for the playing field measuring 6x8 squares, is clearly not enough. Therefore, added to the game "feature" - "fog of war." We draw from top to bottom the entire playing field and the falling figure as long as there are free UDGs and fill in the rest with the symbol "█", like this:


Now we can make the height of the glass almost canonical - 19 rows (the 20th row is busy drawing the bottom of the glass to separate the playing field from the information text), the width is only 6 bricks instead of the 10, but there's nothing you can do. The free space left on the left is filled with the number of points scored, the level and the hint for the next figure. Unfortunately, we don’t have the UDG left and had to display the next figure in letters (I didn’t know before, but it turns out that there are well-established letters “OISZLJT” for Tetris figures), as a result, the game takes the following form:


Well, as a cherry, I drew a headband inspired by a picture from Tetris’s GameBoy version:


Mm ... in my defense, let me just note that I had very few pixels!

I will not dwell on the code in detail, there is nothing particularly interesting there. I will note only a few specific moments that I encountered:

- OPL is far from a record for compactness of the code, all these% $ in variable names as in BASIC, the absence of a for loop, the inability to initialize variables (especially arrays) when describing them lead to a strong redundancy of writing. And in my head I always kept that moment that every 50 characters is an extra minute to enter the code in Psion, so I had to save letters hard, in the end I got into 3.5KB (“only” an hour and a half for manual input);

- Although OPL has support for procedures and functions, but it is implemented specifically - each procedure is described in a separate file and is accessible from any other program (which is the procedure). This is probably convenient for use in small user-defined subroutines, but rather uncomfortable when writing a game, parts of which will not be clearly reused, and the overhead of calling functions is substantial. In addition, several files are less convenient to synchronize manually. This forced me to give up functions and limit myself to GOTO (the first program in which I used this operator, such is the experience);

- You can fill an array only by sequential assignment of values ​​to each element. This led to terrible things like “f% (2) = 24: f% (3) = 24: f% (6) = 24” ... and further to 112 index (for storing figures). In arrays, you also need to store machine code and of course the screensaver. Hands on the keyboard Psion'a it can not enter, the psyche is not iron, I had to store such things as strings and convert them when you start the program.

Source code under spoiler
TETRIS: local brd%(11),bra%,cur%(11),cra%,f$(112),f% local nf%,row%,x%,y%,a%,px%,py%,pa% local i%,j%,k%,b% local un%,um%,s$(32),s%,mc$(255),mc% local tmr%,scr,scr$(47),lvl%,lns% local kbdl%,bzmt%,mute%,kbmt% REM     hex-,      ""   mc$="040404CE00030436378401C4014848481B16581BC6027D01802BFBB701815A2EF52D044F0926EF333226DB39" mc%=ADDR(mc$)+1 do i%=PEEKB(mc%)-48 :j%=PEEKB(mc%+1)-48 mc$=mc$+CHR$((i%-i%/16*7)*16+j%-j%/16*7) mc%=mc%+2 until i%*10+j%=39 REM    -           ,        kbdl%=PEEKB($77) POKEB $77,3 bzmt%=PEEKB($A4) kbmt%=PEEKB($20C0) POKEB $20C0,0 ONERR EXIT:: REM     ,         Psion' f$="04000001>>44zg>m0002000 000000270004>oo>376539llg>mkvo0o8L<Lhb72" POKEB $180,64 i%=0 do i%=i%+1 POKEB $181,PEEKB(ADDR(f$)+i%)-16 AND $1F until i%=64 CLS :AT 10,1 :PRINT "* ."+CHR$(0)+CHR$(1)+CHR$(2),"TETRIS ",CHR$(3)+CHR$(4)+CHR$(5)+CHR$(6)+CHR$(7)+CHR$(1) GET MENU:: b%=MENU("START,INFO,QUIT") if b%=2 AT 3,2 :PRINT "by azya, 2017" VIEW(1,"Q - quit, P - pause, Arrows - move, A - rotate, M - mute") :goto MENU:: elseif b%=3 goto EXIT:: endif REM       ,   ""        0F f$="06600660066006600o0022220o00222203602310036023100630132006301320074022301700622007103220470022600720232027002620" lns%=0 :scr=0 bra%=ADDR(brd%()) cra%=ADDR(cur%()) RANDOMIZE PEEKW($20CB) nf%=INT(RND*7) brd%(10)=$00FF s%=ADDR(s$) NEWF:: row%=0 f%=ADDR(f$)+1+nf%*16 um%=5+(nf%=0) tmr%=PEEKW($20CB) nf%=INT(RND*7) x%=4 :y%=0 :a%=0 :py%=0 REM    i%=18 :b%=18 do POKEB bra%+b%,PEEKB(bra%+i%)+PEEKB(cra%+i%) OR $81 POKEB cra%+b%,0 if PEEKB(bra%+b%)<>$FF b%=b%-1 endif i%=i%-1 until i%=0 REM   if b%>0 scr=scr+40-60*(b%>1)-200*(b%>2)-900*(b%>3) lns%=lns%+b% if lns%<151 lvl%=lns%/10 endif i%=800 do BEEP 17,i% :BEEP 15,i%-200 i%=i%+100 until i%>1100 endif REM   s$=REPT$(" ",9)+GEN$(1000000+scr,7)+REPT$(" ",10)+CHR$(91) POKEB s%+10,32 s$=s$+MID$("OISZLJT",nf%+1,1)+CHR$(93)+GEN$(100+lvl%,3) POKEB s%+30,%L AT 1,1 :PRINT s$ un%=0 :i%=1 POKEB $180,64 do j%=0 do if brd%(i%) AND $E0E*(j%*7+1) POKEB s%+i%+16*j%,255 if un%<um% REM     mc$ USR(mc%+3-3*j%,brd%(i%)) POKEB s%+i%+16*j%,un% un%=un%+1 endif endif j%=j%+1 until j%>1 i%=i%+1 until i%>10 while KEY :endwh MAIN:: POKEB cra%+py%,0 REM ,       ,       ,        i%=y%+4 do i%=i%-1 b%=(PEEKB(f%+a%-y%+i%) AND $F)*x% if PEEKB(bra%+i%) AND b% if y%=0 AND x%=4 goto GOVR:: elseif b% AND $80 x%=x%/2 elseif b% AND 1 x%=x%*2 else row%=y%>py% x%=px% :y%=py% :a%=pa% endif goto MAIN:: endif POKEB cra%+i%, b% until i%=y% px%=x% :py%=y% :pa%=a% if row% i%=2000 do BEEP 2,i% i%=i%+200 until i%>4400 goto NEWF:: endif REM   un%=um% i%=y%/2+1 AT 1,1 :PRINT s$ do b%=cur%(i%) OR brd%(i%) if cur%(i%) AND $E0E POKEB $180,64+un%*8 USR(mc%+3,b%) AT i%,1 :POKEB $181,un% un%=un%+1 endif if cur%(i%) AND $7070 POKEB $180,64+un%*8 USR(mc%,b%) AT i%,2 :POKEB $181,un% un%=un%+1 endif i%=i%+1 until cur%(i%)=0 REM        do k%=KEY AND 95 if k%=0 PAUSE -1 endif if PEEKW($20CB)-tmr%>17-lvl% tmr%=PEEKW($20CB) y%=y%+1 goto MAIN:: elseif k% while KEY :endwh if k%=6 scr=scr+1 y%=y%+1 elseif k%=3 BEEP 15,500 x%=x%-x%/2 elseif k%=4 BEEP 15,500 x%=x%+x% elseif k%=%A BEEP 15,750 a%=a%+4 AND 15 elseif k%=%P AT 1,1 :PRINT "PAUSE" :GET elseif k%=%M mute%=-(mute%-1) POKEB $A4,mute% elseif k%=%Q BREAK endif goto MAIN:: endif until 0 GOVR:: scr$="Scores:"+GEN$(scr,6)+" Level:"+GEN$(lvl%,2)+" Lines:"+GEN$(lns%,6) if k%<>%Q scr$="GAME OVER"+CHR$(33)+" "+scr$ endif do b%=DISP(1,scr$+CHR$(9)+" QUIT GAME"+CHR$(63)+" Y/N ") and 95 if b%=%N AND k%=%Q goto MAIN:: elseif b%=%N TETRIS: endif until b%=%Y EXIT:: POKEB $77,kbdl% POKEB $A4,bzmt% POKEB $20C0,kbmt% 


And finally, a video of what happened:


Selection of references:

→ A very large collection of documents, photos and programs for all Psion Organizer models.
→ Mirror of the original Psion Organizer user community site, which was closed in 2002
→ User and Developer Forum
→ Development kit - collected in one archive the tools that I used during development.

Source: https://habr.com/ru/post/373655/


All Articles