The Leyden Jar, a tentative PCB replacement for the Brand New Model F Keyboards

Hello all,

Just to let you know that I resumed not too long ago the work on PS2 connectivity on the Leyden Jar controller.

This is a project I left untouched for quite a while given the incredible amount of work to do and the lack of hardware to test on my side.

To be honest I have been discouraged by the amount of work and risks associated to this task and this is why I did not persisted on it for quite a while.

But Deskthority user Arkku recently made PS2 support for the good old XWhatsit controller:

This significant achievement gave me a strong push to resume this effort :stuck_out_tongue:

So I resumed the development effort, but with the help of Claude (on a tight leash) this time.

Claude wrote most of the new code with a lot of supervision and back and forth modifications with my feedbacks.

It also created a lot of test programs based on PS2 specification (well documented), checked and validated PS2 scan codes using as many sources that I could find.

I am in a state where my test program is fully implementing set 2 protocol and behaves like a real keyboard!

One caveat, set 1 and set 3 are coded but only statically tested with emulation test suites, those modes are not very common as set 2 is what is mostly used.

Another caveat, I could only test using an active PS2 to USB converter bought online: this does not fully validate that it will work on a computer with a PS2 connection.

Anyway this is still a big milestone as it validates both the code and also the PS2 PCB daughterboard.

The code is using parts of the GitHub project called ps2x2pico:

https://github.com/No0ne/ps2x2pico

I reused only the PIO program that implement the hardware bitbanging protocol and rewrote the CPU code to my liking (with the help of Claude).

I used the remaining of this project as a known working PS2 reference that both me and Claude could look at in case of any implementation doubt.

You can see below the picture of the harness used to do the hardware validation part:

  • A Leyden Jar controller.
  • A test matrix keyboard (yes you can detect mechanical keypress with an EC controller :wink: ).
  • A PS2 daughterboard.
  • A PS2 pico SWD debugger.
  • An active PS2 to USB adapter.
  • The red USB cable is used to provide serial console output support (read by both Claude and me for debugging purposes).

That is a total of 3 USB connections used just to validate that everything works as it should !

See you guys !

2 Likes