9 August 2019

The NEC PC-8401 Reexamined: Part 1

Leave a Comment
A few years back I came across an NEC PC-8401 and proceeded to write up a number of articles during a Retro Challenge month on the machine. Going by blog statistics since RC2017 ended, the NEC PC-8401 is just about as popular in 2019 as it was in 1984. Which is to say not at all. A sad state of affairs then, unlikely to be remedied by further posts concerning this laptop-esque computer. Still, no harm in trying is there?

NEC PC-8401 with PC-8431A, PC-8441A & PC-8406A Expansions

A quick re-acquaintance With the PC-8401

For those who haven't read previous articles on the subject; the PC-8401 series of computers was one of NEC's attempts at introducing portable computing to the business masses. It's main focus is productivity applications, with Wordstar-To-Go, Calc-To-Go, Filer (card filing program) and telecommunications software built into ROM all spring boarding off a CP/M 2.2 OS core.

On the hardware front the 8401 comes with a Z80A CPU, 64k battery backed static RAM (this is shared between RAM and RAM Disk), a rather splendid mechanical Alps keyboard and a just reasonable 80 column x 16 line reflective LCD display panel. Additionally some versions came with a built in 300 Baud modem (sadly not much use today).

When at home or in the office, the machine is powered externally via a suitable 5v to 9v power brick. But what good is a laptop if you can't use it at the pub? Four C Cell batteries answer this pressing need, providing portable power while additionally retaining computer settings and program memory.

Not Quite the Standalone Computing Powerhouse

There are 2 major issues with the PC-8401 as a standalone laptop computer. Firstly and most importantly is the lack of physical memory. While the computer has 64k, 32k is devoted to file storage. This is just enough to keep some documents and spreadsheets stored on the device, but severally restricts what ever else you might like to store on the computer.

Secondly, the screen is problematic, it is usable sure, but it isn't great by any stretch of the imagination. The contrast is poor, and compared to the LCD panel clarity of something like the Tandy model 100 it is not up to the task as a main display for extended periods of time.

It's the Peripherals that Make the PC-8401

It  is the bewildering array of peripherals that lift the PC-8401 onto another level. Memory expansion modules, disk drive adapters and CRT monitor modules turn the basic unit into a fully functional C/PM workhorse. Turning the humble PC-8401 into just the kind of computer you'd want if determined to look oh so very serious about your office computing in 1985.

Perhaps the most valuable peripherals are the Disk adapter, CRT/disk adapter and memory expansions unlock the 32k constraints on storage. The base memory can be configured to use the full 64k, with all storage being taken care of by 3.5" DD disks or the memory expansion modules.

OK so Why the Renewed Interest?

Up until now I've not had more than the base unit to play with, and unfortunately even that started to suffer from some LCD problems with the conductive backing peeling of the panel. Luckily, over the past few months I've managed to secure a number of the much vaunted peripherals and a mostly working LCD panel.

So with a (mostly) working LCD panel in place, we can begin exploring the following over the next couple of blog entries:
  • PC-8406A 32k RAM Cartridge
  • PC-8441A CRT/Disk Adapter
  • PC-8431A Micro Floppy Disk Unit

I can confirm that the PC-8441A and PC-8406A are working just fine, however the PC-8431A is yet to be tested as it's a USA version with the wrong power supply for Australia. Not a huge obstacle, although it has delayed testing.

NEC PC-8401 with working PC-8441A CRT/Disk Adapter
In Part 2 we'll begin getting to grips with the expansion units and some of the issues I have with them. This all promises to be quite interesting, hopefully serving to bring this unique CP/M laptop somewhat out of obscurity.

Read More

30 June 2019

UK IBM Model-F XT Keyboard in LINUX

Leave a Comment
UK IBM Model F XT Keyboard and Soarer's Converter

The Model F keyboards produced for IBMs original PC's the 5150 and 5160s don't play nicely with modern computers. Incompatibility is largely due to the changes in the key encoding protocols adopted for AT style PC keyboards. This lack of compatibility has been a real shame as by enlarge the keyboards are mechanically superior to the latter Model M.

Like the Model M, the F's mechanical keys are designed around buckling springs, unlike Model M's however the F series use capacitive PCB's and not rubber membranes to register key travel, leading to a superior if more costly to produce mechanical keyboard.

Of course all this history is largely redundant if you can't actually use a Model F keyboard on today's PC's. Luckily for us with the use of an easy to come by adapter the "XT Keyboard To USB Soarer's Converter" it's quite a simple task getting a 38 year old keyboard up and running without much fuss. If wish to build your own adaptor all the plans and files are available for the Soarer converter on Geekhack.

Having come across a Model F recently, I took the easy option of ordering a pre-made converter. Everything worked brilliantly and I had a perfectly functional keyboard in minutes. Although there was a minor issue with the keyboard layout. Oddly for Australia where we normally have US keyboards, the Model F in my possession has a UK layout this takes a little extra configuration before working just right with LINUX.

UK Keyboard, the Simple Part

The easy part is simply adding a standard UK layout to the existing keyboard configurations. In XFCE this is normally done from Settings/Keyboard. The exact location and nature of the settings tool will vary between XFCE, GNOME or the KDE desktops, but process remains the same. The UK mapping will take care of 95% of out layout changes, however there are 3 keys on the UK layout that do not match with the standard 101 AT layouts. The misbehaving keys are " \ ", " ' " and " # ".

Quick and Dirty Config Change

Ubuntu based LINUX distributions use XKB to configure and drive keyboard layouts. To make lasting changes that will survive all distribution and package upgrades we would need to write configuration files specifically for the Model F keyboard, but there is a quick and dirty hack we can employ. As long as the Model F is your only intended UK keyboard, and we are aware we may need to redo any changes after a package upgrade, we can simple edit the default UK layout file.

First open XBB's keyboard UK symbols file for editing

sudo nano /usr/share/X11/xkb/symbols/gb

Find the default layout, this should be at the top of the file and make the below changes highlighted in red.

default  partial alphanumeric_keys
xkb_symbols "basic" {

    // Describes the differences between a very simple en_US
    // keyboard and a very simple U.K. keyboard layout defined by
    // the SVR4 European Language Supplement and sometimes also
    // known as the IBM 166 layout.
    // Modifications for IBM Model-F Keyboard

    include "latin"

    name[Group1]="English (UK)";

    key  { [         2,   quotedbl,  twosuperior,    oneeighth ] };
    key  { [         3,   sterling, threesuperior,    sterling ] };
    key  { [         4,     dollar,     EuroSign,   onequarter ] };

    key  { [apostrophe,         at, dead_circumflex, dead_caron] };

    // key  { [     grave,    notsign,          bar,          bar ] };
    key  { [    numbersign,     asciitilde,          bar,          bar ] };

    // key  { [numbersign, asciitilde,   dead_grave,   dead_breve ] };
    key  { [ backslash,        bar,       notsign,        brokenbar ] };

    // key  { [ backslash,        bar,          bar,    brokenbar ] };
    key  { [ backslash,   bar,            backslash,      bar ] };

    include "level3(ralt_switch_multikey)"

After saving you'll need to log out or reboot the Computer. Once logged back in again the Model F should work like a charm in UK mode. You could even right a blog post with it.

Read More

29 May 2019

ZX-Key, External Keyboard For ZX81s and Other Micro Computers: Part 5

Leave a Comment

The Full Case For ZX-Keys

I've been promising a full keyboard case for the ZX-Keys ZX81 keyboard for a while, now at long last it is (almost) complete. Complete enough that have in my hands a freshly minted case fresh from Shapeways, and it looks gorgeous.

The Full Case builds on the Starter Case covered in the previous blog post, adding the top half and a bottom plate. As mentioned previously only the Starter case is really required, but for some smart good looks the top half is a must have. Of course for the sake of competness a bottom plate may also be attached.

Exploded Viw of the ZX-Keys Case Components
 The top half of the case is really where all the action takes place. The ZX-Keys mode indicator LEDs and reset switch are slightly recessed at the back, with some nice speed lines running either side, lending a retro 80s feel. A small hole is left open to the right of the case allowing a USB lead to be plugged in when using the keyboard with a PC or MAC. At the rear of the case the IDC connectors for serial out and direct connection the ZX-Key expansion interface are nicely flush.

The Rear of the ZX-Keys Keyboard Case, Showing the Flush Mounted IDC Headers.
The whole unit is help together with 3mm diameter case bolts. A 6mm bolt and nut hold the centre of the base plate to the keyboard, all other bolts are 8mm in length and may be screwed firmly into to case holding the unit tightly in place.

Right of the ZX-Keys Keyboard Case, with cutout for micro USB Access.
Attached to the inside of the top case is a sprew containing two Switch Cover components for mounting on the keyboards reset switch. The exact Switch Cover to be fitted on assembly depends on the micro switch found on the ZX-Keys PCB. A hollow stemmed version for use with long barreled micro switchs, or a flat bottom variety if shallow micro switch is in place. The Switch Covers should be placed inside the top shell the before assembly.

ZX-Keys Base Plate and Mounting Bolts.
The only real issue I have with the beta case print is with the base plate. I found the plate to be a little flimsy, and it'll need to strengthening it before general release. Notably the grill like pattern on the base will be removed and made solid. Additionally the riser bars along inner sides will be widened to add a little extra rigidity.

My ZX81, pictured with the complete ZX-Key Case and ZX-Keys Interface Card.
The ZX-Keys itself is for sale on Sell My Retro, At the time of writing there is one unit available, never fear more are on their way very soon. The Starter Case can be found on Shapeways., and the Full Case will be made ready for purchase there very soon.

Once I've completed work on the Full Case design a DIY Beginners Case for home 3D printing will also be made avaliable. The Beginners case will be based on the Starter Case design, although it will not be full compatible with the complete case units. All will be announced ASAP.

Update: All Case Parts are now avaliable for order from my Shapeways Shop.

See more entries for this project: Part 1Part 2Part 3Part 4, Part 5

Read More

10 March 2019

ZX-Key, External Keyboard For ZX81s and Other Micro Computers: Part 4

Leave a Comment
Some of you may have noticed that a batch of ZX-Key units went up for sale on Sell My Retro over the weekend. This has been a great achievement and would not have been possible without some much valued help. When I started this project I'd only intended to make a keyboard for myself but soon found a lot support and others desiring a modern mechanical keyboard implementation for 80s micro computers.

To that end I would very much like to thank Spencer Owen of RC2014 fame for his contributions and ZXkim81 for embracing the idea so fully that he's about to test out the first DIY kit version of the ZX-Key.

Now onto some more about the project so far.

Sundry ZX-Key Design Decisions 

This post is primarily centred around some design decisions on the Case for the Keyboard and the Selection of Key Switches.

Mechanical Key Selection

Selecting the right Mechanical switches for the keyboard was a slightly more difficult task than you might imagine; in the end I chose Gateron Yellows, a firm to medium weight linear switch. The reason for this is twofold, and all to do with how the ZX81 registers key presses.

The ZX81 can be somewhat sluggish in registering keystrokes. While this is normally quite fine when entering text with the membrane keyboard, moving to a mechanical keyboard makes this lack of speed somewhat more noticeable. This is the reason behind the use of a linear switch, over a clicky one such as MX Blues. While a real keyboard is far more tactile, the use of a clicky switch would give an undue impression that a ZX81 had actually registered the key press when in reality it hadn't.

Gateron Yellow Keyswitch, the Perfect Match for a ZX81 Keyboard

Related to the above;  the use a firm linear switch adds a certain amount of weight, possibly unconsciously slowing down the natural typing rate, bringing key strokes more into line with what a ZX81 expects. On testing I found Gateron Yellow switches a nice match to requirements, and the main reason for not going with the firmer MX black was in keeping the typing experience pleasant, particularly for people not used to (overly) heavily weighted switches.

A Case to Start

All keyboards need a case of some sort. The trouble here of course is that all bespoke keyboards require a very specific case, one that can end up being quite the expense. For the ZX-Key keyboard case my main goal was to first make it relatively affordable, and secondly I desired a design that could be upgraded over time.

Essentially the Starter case I came up with is more of a keyboard frame than a full case. The ZX-Key keyboard is screwed in place with some 3mm diameter 6mm long case bolts. Provision on the base has been made for standard 12 x 12mm rubber feet to stop the keyboard from sliding around on a table.
ZX81 Mechanical Keyboard in Case
The ZX-Key Keyboard Mounted on the Prototype Keyboard 'Starter' Case
Also of note, the case has a gentle 2 degree slope from front to back for an easy typing angle. A higher angle felt a little exaggerated on such a small keyboard.

I've been using the initial prototype for some time now, and have found it provides quite a good level of rigidity. I did make a few errors on the original, mostly around spacing, and in the height of the lip around the keyboard PCB. All issues have been addressed and the fully revised version of the ZX-KEY Keyboard 'Starter' Case has been made  made available on Shapeways.

Bottom of the Prototype Keyboard 'Starter' Case
As alluded to, there will be 2 more case parts designed, a simple backing for underneath the keyboard and a somewhat more elaborate top half styled to suit a Sinclair product. However I felt it important to make these components entirely optional, particularity as larger 3D printed objects can become quite expensive.

Of course the case as a whole is entirely optional, and if you make your own then I would welcome seeing pictures.

Final Production Ready ZX-KEY Keyboard 'Starter' Case as Found on Shapeways

I will be releasing the complete set of case parts to Shapeways in the coming month or so, if you would rather wait for the complete unit.

See more entries for this project: Part 1Part 2Part 3Part 4Part 5

Read More

7 March 2019

ZX-Key, External Keyboard For ZX81s and Other Micro Computers: Part 3


The main goals of the ZX-Key project has been to build a mechanical keyboard usable on real ZX81s, PCs (particularly in emulators) and on the RC2014 or other computers with serial keyboard inputs. This entry we'll go over a couple of the details relating specifically to the Keyboard component of the build.

Final prototype ZX-Key ZX81 Keyboard
The ZX-Key Keyboard

The ZX-Key Keyboard

The keyboard layout is based around the 8x5 matrix format found on the Sinclair ZX81 and ZX Spectrums, which makes sense as that's what it's designed to be used with.

The main keyboard circuit is also almost identical to a ZX81s, with the addition of a Arduino Pro Micro enabling the ZX-Key to be used as a regular USB PC keyboard. Connection to the ZX-Key ZX81 expansion interface is facilitated by  a 16 pin IDC header.

Additional diodes have been added to the 5 row lines, these  prevent some issues found when testing the prototype keyboard with a ZXpand expansion card. When the ZXPand read an SD card, its current draw caused some instability with the Arduino. This problem was also addressed on the ZX-Key interface card by proving it with an independent voltage regulator.

A reset line has been brought out from the ZX-Key interface card, and is presented on the 16 IDC header so there is no need to turn the ZX81 off an on to restart the computer. Similarly the 6 pin IDC connector provided for TTL serial communication also provides a reset line broken out for using the keyboard in conjunction with a RC2014 micro.

The pull down 100k Resistor on Column 8 allows the Arduino to detect the presence of a ZX81. As the Arduino powers on or when reset it first tests the status of this column to determine what mode it should start in, either Standard USB / PC or ZX81 mode.

ZX-Key Keyboard Schematic

The Arduino Bit

While connected to a ZX81 the Arduino is essentially dormant, only handling some minor LED visual indicators. However when not connected to a ZX81 the Arduino Pro MIcro takes control, turning the keyboard into a fully functional USB HID (device).

In ZX81 mode with the ZX-key interface connected via an IDC ribbon cable, the ZX-Key will behave as a standard ZX81 keyboard, except with a much improved typing experience. When the keyboard is unconnected, plugged in via USB or serial port the keyboard will start in Standard PC mode.

Keyboard modes and selected layers are indicated by a cluster of three LEDs on the right hand side of the keyboard. There are three keyboard Layers, Standard, Emulator and ZX81. You can switch between Standard and Emulator layers by holding down SHIFT, FUNCTION (ENTER), and GRAPHICS (9) key combinations. The Standard layer has 3 main modes and each of these has a SHIFT layer, this gives access 98% of the keys to be found on a normal USB keyboard.

LED States
Layer & Mode Selected
Standard Layers: Keyboard Mode and Function Selection
NormalNormal mode. All keys are in Standard US Keyboard configuration.
SHIFTWhen in Normal Mode: Symbols in Red are selected. Where these red keys are commands, for example 'EDIT or SLOW' they have been replaced by another symbol. All common symbols are present on the keyboard. Note that SHIFT keys effects vary in each of the other modes
SHIFT,FUNCTIONChanges to Function mode. This selects upper case characters. Pressing the SHIFT key in this mode will select symbols as normal.
SHIFT,GRAPHICSAll the number keys are now there equivalent 'Fx' key, ie. '1' becomes 'F1'. All Letter keys become 'CTRL Letter'. Holding down the SHIFT key in Graphics mode changes the letter keys to 'ALT Letter', number keys '1' and '2' become 'F11' & 'F12'.
Emulation Layer: For use with ZX81 or ZX Spectrum Emulators
SHIFT, FUNCTION, GRAPHICSKeyboard will enter the emulation mode. All Standard Layer mode functions are disabled. This allows Emulation packages to detect key presses as using a standard USB / PS2 keyboard.

You can go back to the Standard layers at any point for entering program Emulator menus with 'F' keys for example.
ZX81 Layer: For use with a real ZX81 plugged into the ZX-Key Interface
Auto DetectionThe ZX81 layer is selected automatically if the keyboard is connected to a ZX81 using the ZX-Key Interface. You can't deselect this mode.

Next time: I'll finalise with the 3D printed case, attach the software and more.

See more entries for this project: Part 1Part 2Part 3Part 4Part 5

Read More

27 February 2019

ZX-Key, External Keyboard For ZX81s and Other Micro Computers: Part 2

Leave a Comment
This blog entry I'll take a quick look into the ZX-Key Expansion interface required to get the ZX-Key Keyboard working with a ZX81.

Final Production ZX-Key Expansion Interface

The ZX-Key Expansion Interface for the ZX81

Primarily the expansion board is based on Wilf Rigters' designs. Changes I've made along the way have been minor, and don't on the whole modify how the original design works. Best refer to Wilfs article for an excellent account and explanation. It's enough to say that there are two 74HC245 ICs that handle the decoding of the ZX81s BUS and afford the implementation of a matrix keyboard.

The modifications I've ended up making to the original design have been necessitated by the desire to use the Keyboard component of the project with ZX81s, the RC2014, (or other mircos) and PCs via USB.

First Iterations

Initially I breadboarded a portion of the circuit for some basic testing, just for a bit of satisfaction. Unsurprisingly that worked perfectly fine, so went ahead and built up a prototype PCB version.

Breadboard Test
For the PCB I added a +5v rail for powering an Arduino Pro Micro which is located on the keyboard PCB and also broke out the ZX81s reset line. In addition diodes used on the row lines have been moved from the Interface to the Keyboard PCB (See the Keyboard Blog Entry - Coming in Part 3).

All seemed to work just fine (after a stupid layout issue and a bit of trace cutting), however on deeper inspections I ran into a major problem when using the popular ZXpand SD card reader in conjunction with the keyboard. The ZXPand would often not read an SD card, or if it did would load corrupted applications or files.

This seemed to be a power related issue, as powering the Arduino Micro via USB instead of through the ZX81 mostly resolved the problem. Removing the Arduino entirely completly solved the issue, with the keyboard working normally. In summary while the decoder interface worked fine, it didn't in combination with the enhanced keyboard.

Testing the ZX-Key Prototype Keyboard and Interface with a ZX81
The First Iteration: Well it seemed to work fine, but a ZXPand looms in the background.

Second Iterations 

To resolve the power problems I added voltage regulator, this takes power from the +9v rail supplying both the interface and the attached keyboard. Additional diodes on the column lines were also added to the keyboard PCB.  Thankfully these changes solved all the niggling issues with the ZXpand.

Due to the additional diodes on the Keyboard increasing the voltage drop the CMOS 74HC245 ICs were replaced with 74HCT245 ICs, the TTL level equivalents. TTL signals provide an extended logic level voltage range counteracting the voltage drop in the signals coming from the Keyboard.

Interestingly, the changes made to the keyboard and the changes made to the interface both worked independently. So I've managed to solve the problem twice.

ZX-Key Expansion Card Schematic

See more entries for this project: Part 1Part 2Part 3Part 4Part 5

Read More