Go Down

Topic: AMIGA 500/1000/2000 Keyboard Interface (Read 79992 times) previous topic - next topic


Hi Polymorph thank you for reply  :)
I'm just starting, which files should I upload then on to Arduino Leonardo pro micro in order to work?

if I purchase Arduino Leonardo pro micro with ATMEGA32U4, should it be all right?

thank you

I attach the scheme of the two models, according to you and correct?
I've used the same board and your scheme for the connection. And it works. :)


I've used the same board and your scheme for the connection. And it works. :)
Thank you  :smiley-wink:

how did you program it?


Mar 28, 2018, 11:24 am Last Edit: Mar 28, 2018, 11:25 am by patts75
Thank you  :smiley-wink:

how did you program it?
I used @DrRemulak script on page 5 (post #60) and the latest IDE. And it works like a charm with Amibian. No joystick DSubs wired up just yet. But i'll try that out later.


Jun 30, 2018, 04:06 pm Last Edit: Jul 21, 2018, 03:42 pm by yserra
It works! I'm typing this text from my Amiga 1000 keyboard. I first experimented the same issues as Yorgle did (garbage text with an A1000 keyboard, as he mentioned on comment #63), but it appears the issue didn't come from a presumed specific clock speed (comment #68), it just came from a faulty adapter, making noise in the signal. Here is what I did to make it work:

- Plugging the RJ9 male jack from the Amiga 1000 keyboard cordon into a regular RJ45 CAT5e female connector

- Wiring pins 3, 4, 5 and 6 from the RJ45 to the pins 5v, 8, 9, GRND respectively on the Arduino Leonardo with CAT5e single-strand network cable (I think THIS PARTICULAR kind of cable makes it works without making any noise on the signal)

The wires are not soldered. They are crimped on the RJ45 side and have the right width for connecting them directly into the Arduino Leonardo headers.

My keyboard is a French version (ISO/European layout), and I use the code from DrRemulak (comment #60).

EDIT: the controller on my A1000 keyboard with ISO layout is a MOS 6570-36, the same one found on the other Amiga keyboard (500, 2000, 3000, 4000). I guess it's because this Amiga is the second generation of A1000, the PAL version, launched in Europe in 1986, just before the A500 and A2000. Yorgle seems to have an original A1000 NTSC, produced in 1985. On this earlier model the controller is a MOS 6570-33. Maybe that explains the incompatibility he experimented with the code we discuss here.


Jul 01, 2018, 02:04 am Last Edit: Jul 01, 2018, 02:08 am by Boss00
Hey guys, I'm new to the forum. sorry for my english.
I built an a500, inside I mounted a toshiba portege r830,
I adapted the a500 keyboard with arduino pro micro 5v. when windows started system everything works perfectly. often I use the bios to boot from cd ... every time I have to connect an external usb keyboard, because of the problem of hid leonardo recognition ... I also read a certain NICOHOOD who released patches in about. but let's say that I'm very good with wired electronics, and the electronics programmed for me is a bit difficult to understand ... someone would know how to help me about the problem of bios with an example to apply, and I would be grateful. :)


Here is code for early A1000 keyboards with the MOS 6570-33/328191-01 keyboard controller IC! My tests have all been great so far.

I also figured out the reboot issue! The A1000 keyboard does not have a separate RESET signal wire, it only has 4 wires on the connector. Also the 4-wire reboot code in this sketch can be applied to my previous A2000 code to make it work on 4-wire A2000 keyboards.


And here is a version for A2000 4-wire keyboards. I have not tried it on A500/A2000 with extra Reset wire, but it very well may work.

Annoyingly, my 4-wire A2000 keyboard (and possibly others), ignore the first keystroke. What happens is the Leonardo waits for the first keystroke to sync with the keyboard, and during that sync phase misses the keypress. However it does get the key release, so I added code there to process it as a press-and-release. Because of that, held-down modifiers (shift, ctrl, alt) are ignored. I did get CTRL+Amiga+Amiga to work as the first keystroke though.


I am a totally noob in Arduino,
i am trying program a Arduino Pro Micro with this code to use a spanish A2000 keyboard on a Raspberry Pi , when i connect the Arduino on the PC USB connector, the computer think that i has press CTRL+ALT+DEL,
Whats append?
Is problem of my Arduino Pro Micro?
I am doing something wrong?
Which code are you using? The original code by the original poster has this issue, but not my modified code. See the code attached to my latest posts.


I have discovered one more bug. The CTRL-ALT-DEL command is being sent on bootup and connection. I missed it because uploading the sketch and the reconnection/restart of the Arduino did not cause it. It is only when I boot up a PC, or when I plug the Arduino in to USB that the this happens. I discovered that I have no need for the CTRL+A+A reboot functionality, so I simply commented out the two lines that send it. They must be both commented out to avoid this issue. Not sure why both are being executed at connection, I will revisit this later.


Oct 02, 2018, 05:38 am Last Edit: Oct 02, 2018, 05:42 am by belfers
This is the keyboard mapping (with wire colors) that worked for my Amiga 500 …

Amiga 500 wire harness        Arduino pin

1   KBCLK   (bronze wire)          9
2   KBDATA (black wire)            8
3   KBRST   (red wire)              10
4   5v         (orange wire)          5v
5   NC
6   GND      (green wire)           GND
7   LED1     (blue wire)              5v      
8   LED2


Oct 05, 2018, 09:09 am Last Edit: Feb 06, 2019, 08:57 am by witchmaster
First of all, thank you @Olaf and @DrRemulak for the work on this, much appreciated! :)

Here is my version based on the latest 4-wire keyboard code by @DrRemulak. I included new code for joysticks based on the code by @Olaf but now there is no need to add HID descriptions in other files.

This version works fine on the MiSTer (Terasic DE10-Nano FPGA development board) with the Amiga core (joysticks included). I tested a CDTV keyboard and a A500 keyboard, the A500 keyboard works fine even if the RESET pin is not connected.

On this version CLOCK goes to pin 8 and DATA to pin 9, confusing. I included connection diagrams for joysticks and various Amiga keyboards in the code.



I am looking to use an Amiga 500 keyboard in a project I am working on.  I am wondering if it would be possible to alter this code to work as a serial keyboard, All I am looking to do is take the keystrokes from the Amiga keyboard and display them in the serial console.

I would be using an Arduino Nano instead of a Leonardo.

Any help appreciated.



Jan 06, 2019, 08:12 pm Last Edit: Jan 07, 2019, 04:16 am by yserra
Hi all,

I noticed the Amiga keys don't work correctly with DrRemulak's script. The lines:

// modifiers: Shift left, Shift right, -, Crtl left, Alt left, Alt right, Amiga left, Amiga right
  0x02, 0x20, 0x00, 0x01, 0x04, 0x40, 0xE3, 0xE7

Should be changed (from Olaf's original script) to:
// modifiers: Shift left, Shift right, -, Crtl left, Alt left, Alt right, Win (amiga) left, Ctrl (amiga) right
  0x02, 0x20, 0x00, 0x01, 0x04, 0x40, 0x08, 0x10

Or if you prefer having a Win Right on Amiga Right key, It should be:
// modifiers: Shift left, Shift right, -, Crtl left, Alt left, Alt right, Win (amiga) left, Win (amiga) right
  0x02, 0x20, 0x00, 0x01, 0x04, 0x40, 0x08, 0x80


So I realise this is a very old post indeed now, but I've just tried to get this working with an Amiga 3000 keyboard and haven't got anywhere. If I try it on a PC then I just keep on getting the ctrl+alt+delete sent to the PC. If I try it on the Mac then it just gives out this constantly:


As far as I know the keyboard works OK, but since I don't have a real Amiga knocking around any more I can't actually check it. I can get it onto my scope this evening and start to look at the data/clock, but I was wondering if anyone has tried it with an A3000 keyboard before.


@gavinsaxby: yes, the Amiga 3000 keyboard is exactly the same as the last A500/A2000/A4000 ones (and has the same controller as early A1000/A500/A2000 ones too). I suspect you mixed the connections. Here is the diagram :

Code: [Select]

// A2000/A3000 ---------
// Keyboard   Leonardo
// Connector  IO 
// 1 KBCLK    8
// 2 KBDATA   9
// 3 NC       -
// 4 GND      GND
// 5 5V       VCC (5V)

Go Up