• Updated 2023-07-12: Hello, Guest! Welcome back, and be sure to check out this follow-up post about our outage a week or so ago.

Skunkworks PS-2 <-> ADB Project

Trash80toHP_Mini

NIGHT STALKER
Here are the shots I promised of my KeyStone Converter:

file.php


file.php


file.php


file.php


file.php


 

zuiko21

Well-known member
OK, now we're talking ;)

First of all: please cover that EPROM quartz window! We don't want that valuable code erased by ambient UV light...

I shouldn't be writing this (nor even lurking the 68kmla forums) becasue I'm on the last days of a terrible fortnight at work... but I promise to get back to this very interesting project as soon as possible -- not only for the convenient use of popular PS/2 keyboards, but because it may shed some light on the obscure ADB protocol...

Let's go with the ICs: the brain of this device is the Micro Controller, MC68L11D0 -- this is one of the many variants of the popular MC68HC11, with the following differences:

-Works on supply voltages as low as 3 V (although 5 V is fine with it)

-Has no built-in ROM (the -D0 part)

Like many other MCUs, this family may work, among others, in two modes: single-chip (code is executed from internal ROM, and most pins are dedicated to I/O functions) and extended-multiplexed mode; where data and address buses are externally accesible, and code is to be found on an external (EP)ROM chip. This version lacking the internal ROM, obviously is configured to work on this last mode. From my datasheets, it seems that this one can't go over 2 MHz.

Then there's the TC232CPE, close to a bunch of electrolytic capacitors... as the name suggests, this is an equivalent of the popular MAX232, just a converter from TTL/CMOS levels to the +12...-12 V required by th RS-232C serial port -- all from a single +5 V supply!

The EPROM is a 27C64-200DC: a mere 8 KiB EPROM in a rather slow (200 ns) version -- nothing out from the ordinary and shouldn't have that much code to investigate... anyway, this is easily read/copied on the cheapest EPROM programmer (it is socketed, isn't it?)

The remaining ICs are simple logic devices: 74LS05 (open-collector inverters), 74HC00 (quad 2-input NAND gates) and featuring the 74HC573: 8-bit latch for the multiplexed address/data bus.

Save for capacitors and resistor packs, passive components are clear -- although the exact frequency of the crystal might be critical for the interface timing.

The PCB seems to be a simple 2-layer design... shouldn't be that difficult to reverse-engineer -- as soon as I get some time, of course. I don't expect many surprises with the well known pinouts of these ICs, but another picture of the board with the ICs off from their sockets could discard any doubts... ;)

For the general public information: the Keyboard input on your device is the older AT standard on 5-pin full-size DIN connector, but this is electrically compatible (protocol included) with the PS/2 standard, just using a 6-pin Mini-DIN.

So many hacks, so little time... :b&w:

 

Trash80toHP_Mini

NIGHT STALKER
The board is most always in its case and I was careful not to have any sunlight available to the quartz window. But I'll cover it up! [;)] ]'>

I knew about the AT connector, I just can't find my adapter . . . also forgot to mention the traces & a few jumper wires are all out there in the open, Two layer PCB it is!

Today, I'll look for the OmniView Converter to document, it works with "Windows KBDs". IIRC you needed to choose either the left of right control key to use as the Command Key. It also does a full KVM conversion, which isn't necessary for Sam's case, but would be for a non-AIO Mac or the KVM setups I habitually use.

Pics up of empty socketed KeyStone and OmniView box coming up!

 

Trash80toHP_Mini

NIGHT STALKER
I'd MUCH rather see these boxes clean-room cloned rather than copied, we don't allow software piracy . . .

. . . as a mod, I can't condone outright hardware/firmware piracy.

 

zuiko21

Well-known member
Right. As already mentioned, the main use for this is not the mere keyboard adaptation (with ADB peripherals sort-of-readily available) but to learn things about the ADB protocol. That would imply examining the original code in order to get the required specs of the protocol, and then creating from the scratch some new code (not necessarily for this MCU) with similar functionality. Is that OK? ;)

The 68HC11 being a derivative of the 6800 family, like the 6502 I'm used to, makes the task of interpreting the original code, by no means a trivial task, but at least feasible.

 

Trash80toHP_Mini

NIGHT STALKER
NoPro, DeclROM spelunking & ROM tweaking are time honored traditions here at the 68kMLA. Outright copying for re-use as is, with the exception of missing or damaged ROMs, or requesting images for emulation purposes, would be the only intolerable aspects under current policy, AFAIK. :approve:

 

Trash80toHP_Mini

NIGHT STALKER
If we actually clone this device, let's spec a large enough ROM and the lines for it to implement a programmable key re-mapping device.

 

MidnightCommando

Well-known member
As per OtherThread...

Has anyone looked at the Keyboard Babel project for ADB -> PS/2 conversion to implement in a microcontroller of some description? They've done a great job documenting the low-level protocols for various means of turning button-mashing into characters.

Dealing with the mouse could be done in discrete logic with apparent ease, if the stream of bits coming down the serial or PS/2 could be reduced (again, on a micro) to its base "events" - motion forwards/backwards on axis x/y, and button_down and button_up - examining how the teardrop ADB mouse does this would be a good strategy to reproduce the desired behaviour. Better yet, a two or three button ADB mouse (such as the one on some NeXTstations?) so that it's apparent how to handle multiple buttons. Not sure how scroll wheels would work, but examining existing implementations would once again prove beneficial there.

An elegant solution taking minimal space would involve a CPLD with a softcore microcontroller onboard (6811, 6502, whatever), and using the remaining space for the (negligible) logic necessary to turn mouse input into Magical Wonderful ADB Goodness.

Even were one not to use a CPLD, such a converter could be made sufficiently compact by the use of SMT devices and (of course) a double-layer PCB.

Of course, to be truly impressive, the Power button needs to be a big red palm-sized thing on the top of the converter, not that tiny little thing on the Keystone box ... we need some sense of theatrics after all! }:)

 

olePigeon

Well-known member
An elegant solution taking minimal space would involve a CPLD with a softcore microcontroller onboard (6811, 6502, whatever), and using the remaining space for the (negligible) logic necessary to turn mouse input into Magical Wonderful ADB Goodness.
My only contribution to this thread is to put in an official vote for the 6502. :p
 

Trash80toHP_Mini

NIGHT STALKER
While I appreciate the significance of the 6502, I'd much rather see an overkill Proc with enough I/O lines to do ASCII conversion of old VT100 KBDs and all the crazy layout WorkStation Clicky-Boards. I, for one, am getting really tired of MembraneMushPush .TXT input devices. Let's do some ReallyRetro forward I/O compatibility with this puppy as well as the obvious backwards conversion of the current crop-o-KBDcrap! [}:)] ]'>

. . . gotta dig out some pics from old threads . . .

This is another vote for programability of multitudinous command key sets with Alps KeySwitches Inside! [:D] ]'>

. . . and a Newton KBD would go great sitting in front of my CD SC NetTop hack! :approve:

 

Mk.558

Well-known member
Does this mean we can work on a USB > ADB adaptor?

We already have ADB > USB. But optical mice rule on old games.

 

MacJunky

Well-known member
I'd much rather see an overkill Proc with enough I/O lines to do ASCII conversion of old VT100 KBDs and all the crazy layout WorkStation Clicky-Boards. I, for one, am getting really tired of MembraneMushPush .TXT input devices. Let's do some ReallyRetro forward I/O compatibility with this puppy as well as the obvious backwards conversion of the current crop-o-KBDcrap! [}:)] ]'>
Have you looked at what Unicomp offers? Is this not enough keyboard for you?http://pckeyboards.stores.yahoo.net//122keyterkey.html

And look at the options you have for connectivity!

More here: http://pckeyboards.stores.yahoo.net//keyboards.html

And here is a list that has some details about a few of our modern options: http://www.overclock.net/t/491752/mechanical-keyboard-guide#post_6025204

 

techknight

Well-known member
I wrote AVR code to read a PS/2 mouse and output its direction, button status and amount the mouse has moved in a project to connect an optical PS/2 mouse to a mac plus, a project that never materialized. Written in BASCOM-AVR. I could publish it if it would do anyone any good, and could finish what I started.

I never messed with the ADB protocol.

 

techknight

Well-known member
I found a GNU based full ADB library for the AVR series in C. One problem, i dont program in C so some of the operators throw me off.

my PS/2 code is written in BASIC, which that compiler is not free. So you would have to find PS/2 source code in C which i dont i have, or i could convert the ADB library to BASCOM BASIC. either way.

 
Top