Whilst trawling the web for information I've found that a couple of sites no longer exist - thank heaven for the wayback machine!
The purpose of this website is to provide an online location for the information that is only available in the wayback machine's archives, or which I've found useful during my HX-20 explorations.
A common issue with the HX-20 is dead batteries. You can replace the existing battery with a new set of Sub-C cell NiCADs, rated at 1.2 volt. These are commonly used for model aircraft glow-plug starters. Note that these are not the more commonly available NiMH batteries - these require a different charging regime. Do a search for NiMH and HX-20 to find more information.
If careful the existing shrink-wrap can be cut off the old battery using a scalpel and can be used to house the new battery, with the aid of some electrical tape. Cut the cable off the old battery at the battery end. Check both the cable and connector for corrosion - if the connector is corroded (which is quite common) you can find a suitable replacement or attempt to revive the connector if not too badly corroded by submersing in vinegar overnight. A replacement doesn't need to be polarised if you use colour coded cable as the PCB is marked with a '+' for the positive connection.
A replacement power supply can be used if selected carefully. There is a lot of debate about what is suitable, but I've found a regulated 6 Volt 300 ma adaptor works well with a charge time of eight hours. Remember the original manufacturers instructions - it's best not to leave the HX-20 plugged in except when charging. The charging circuit is very primitive which is why you have to be careful with NiMH batteries.
This is a portable machine anyway, with a daylight readable screen, so get yourself into the garden and enjoy the sunshine!
I've found the following the only reliable method to transfer programs back and forth between a Linux based PC and the HX-20.
Linux setup: if you are using a USB to Serial adapter the device name will be /dev/ttyUSB0. If you are using a traditional serial port the device name will probably be /dev/ttyS0
Setup the serial port on Linux using the following command:
stty 300 -parity cstopb crtscts igncr opost onlcr </dev/ttyUSB0
Go into the BASIC interpreter on the HX-20 and enter the following command, then press RETURN:
LOAD "COM0:(28N23)"
Then cat your BASIC program to the serial device, for example:
cat UPLOAD.BAS > /dev/ttyUSB0
When finished the linux command prompt will be returned. Press the red BREAK button on the HX-20, then check the downloaded program with the LIST command.
I've found anything over 300 baud to be unreliable, but your milage depending on cable may vary.
The serial cable pinout I used is shown below.
This is a DB9 to DIN-8 serial cable which plugs into the port on the HX-20 labelled RS/232. This port corresponds to COM0:
The cable information mirrors this page
HX-20 PC
8-pin DIN 9-pin subDE function
1 -------- 5 ------- GND
2 -------- 2 ------- HX-20 TxD, PC RxD
3 -------- 3 ------- HX-20 RxD, PC TxD
7 -+
| RTS - CTS loop
8 -+
6 -+
|
1 -+ DSR, CD, DTR loop
|
4 -+
This is a back up HX-20 related items on the the now defunct website which can be found on the wayback machine: Historic Computing by Martin Wölz
![]()
Modem CX-21 |
hx20wiring.txt | Serial cable wiring diagram for HX20-PC data transfer. |
| hx20man.pdf (880KB) | HX-20 Operations Manual (English) | |
| hx20qref.pdf (1.22MB) | Quick Reference | |
| SIDHA-Writer.tar | Powerful commercial text editor. Multipart BASIC and machine code. With installation instructions | |
| SIDHA-Dialog.tar | Commercial terminal program. With installation instructions for multipart code | |
| koch.bas | Recursively draws the fractal curve described by Helge von Koch in 1903. | |
| hx20bas.tar.gz | Example programs (including terminal) from ftp://ftp.epson.com/hxpxqx/ | |
| BASICsamples.tar | Collection from Albert Walter, including AI algorithm demo game. | |
| hx20directory.tar | Epson original microcassette managing software | |
| DUMP.BAS grab.c roms.bas |
Memory dump software. Can be used to produce images of the Epson firmware. | |
| hx20disass.tar | Disassembler in BASIC | |
| rom image | Assembler and Debugger written by Julian Wald "Burn to a 27C128 eprom and place in the expansion unit." |
|
| tecnical data (German) | contains all pinouts | |
| description (German) | by www.zock.com | |
| original ad | So it was! |
The two letter error message codes from the Quick Reference Manual
Here is a table of the error messsages (also available as a text file):
| Error Code | Error Number | Message |
|---|---|---|
| /0 | 11 | Division by zero |
| AO | 52 | File already open |
| BD | 58 | Bad data in file |
| BF | 51 | Bad file mode |
| BN | 50 | Bad file number |
| BO | 61 | Buffer overflow |
| BS | 9 | Bad subscript |
| CN | 17 | Can't continue |
| DD | 10 | Duplicate definition |
| DS | 56 | Direct statement in file |
| DU | 60 | Device unavailable |
| FC | 5 | Illegal function call |
| FD | 55 | Bad file descriptor |
| FN | 23 | FOR without NEXT |
| ID | 12 | illegal direct |
| IE | 54 | Input past end |
| IO | 53 | Device input/output error |
| IU | 59 | Device in use |
| LS | 15 | String loo long |
| MO | 22 | Missing operand |
| NE | 63 | File does not exist |
| NF | 1 | NEXT without FOR |
| NO | 57 | File not open |
| NR | 19 | No RESUME |
| OD | 4 | Out of data |
| OM | 7 | Out of memory |
| OS | 14 | Out of string space |
| OV | 6 | Overflow |
| PP | 62 | Protected Program |
| RG | 3 | RETURN without GOSUB |
| RW | 20 | RESUME without error |
| SN | 2 | Syntax error |
| ST | 16 | String formula too complex |
| TM | 13 | Type mismatch |
| UF | 18 | Undefined user function |
| UL | 8 | Undefined line number |
| UP | 21 | Unprintable error |
| WE | 24 | WHILE without WEND |
| WH | 25 | WEND without WHILE |
This is a BASIC and machine code based word processor for the HX-20. It can be found here: SIDHA-Writer.tar
The file WRITER06.BAS contains German instructions and commands. A version roughly translated into English can be found here: Writer06En.Bas
| Shortcut | German | English |
|---|---|---|
| A | Annulieren | Undo |
| B | Befehls-Modus | command mode |
| C | Copieren | Copier |
| D | ||
| E | Eingabe-Modus | Input mode |
| F | Finden | Find |
| G | Gehe zu(+-)Zeile | Go (+ -) line |
| H | Helfen | Help |
| I | Inhalt | Contents |
| J | Justieren | Adjust |
| K | Korrektur-Modus | correction mode |
| L | Laden | Load |
| M | Menge | quantity |
| P | Praeparieren | Prepare |
| Q | Querformat | Landscape |
| S | Sichern | Save |
| T | Tauschen | Trading |
| U | Uhrzeit | time |
| V | Verschieben | Move |
| W | Wegnehmen | removal |
| Z | Zu Ende | Too late |
**************************
Computer Archaeology
**************************
Description of
SIDHA-Writer V0.6 Ser.No. 00277
(c) 1983 SIDHA GmbH, Germany
Analysis by
Martin Woelz, July 2002
woelz@math.uni-goettingen.de
DESCRIPTION
-----------
SIDHA-Writer is a text editor for the EPSON HX-20 handheld
computer. Editing is done with the 20chars by 4lines display of the
computer, and output can be either the built-in or a full-size
external printer.
When the program runs, typing H produces a help on the built-in
printer. It says:
Befehle:
A = Annulieren
B = Befehls-Modus
C = Copieren
D = Drucken
E = Eingabe-Modus
F = Finden
G = Gehe zu(+-)Zeile
H = Helfen
I = Inhalt [Cassette Directory]
J = Justieren
K = Korrektur-Modus
L = Laden
M = Menge
P = Praeparieren [make Cassette "file system"]
Q = Querformat [number of columns/line]
S = Sichern
T = Tauschen
U = Uhrzeit
V = Verschieben
W = Wegnehmen
Z = Zu Ende [Quit]
The program consists of three files. Two are in BASIC, one is machine
code. Images are included in this package, and I will describe now how
to build a running version.
INSTALLATION PROCEDURE
----------------------
You need a serial link to the EPSON HX-20, and while you install the
software, you can also build a microcassette that will autoload the
software another time :)
The files on the original cassette are called
Writer06 Sys (BASIC loader)
Writer06 Com (the binary)
Writer06 Bas (BASIC)
Inserting the cassette, then typing "LOAD" and "RUN" would get
Writer06.Sys going. It would set MEMSET to &H1750 to make room for the
binary Writer06.Com, which loads itself into &H0A40 to &H174F. Then
Writer06.Bas is loaded and run.
Downloading the BASIC files to the EPSON is straightforward. Consult the
file 'hx20wiring.txt' for the serial cable. On the
EPSON HX-20, you type
LOAD"COM0:(38N23)"
and on your linux machine you do
# cat Writer06.Sys >/dev/ttyS0
When cat is done, you stop the EPSON by pressing BREAK. The above
assumes your serial port is /dev/ttyS0 and that you have set it up with
# stty 600 -parity cstopb crtscts igncr opost onlcr /dev/ttyS0
It takes some minutes.
Now your binary is in place. If you are making a microcassette tape, issue
SAVEM"CAS0:Writer06.Com",&H0A40,&H174F,&0B00
Then you load (and save) Writer06.Bas the same way as you loaded
Writer06.Sys and just run it!
DISASSEMBLER
------------
To make it easier for you to understand the code, I have included a
disassembler output for the binary part. Writer06.Bas mostly calls it
at address &H0B00 if I am not mistaken. See the file 'Writer06.Com.disass'
Enjoy! And please tell me if you ever use this software!
NEW: Download programs from the distant past that will make the world's first laptop (the Epson HX-20) come ALIVE again. Digitally restored from micro-tape. These programs are not compatible with other RETRO-PCs; not even the Commodore 64. The HX-20 allowed the programmer to use commands that were unique to its 120x32 pixel screen, piezo-electric speaker, 8-bit ASCII character set and RAM pointers; all which I took advantage of.