Jump to main content

Jump to main menu

Henryk Richter

Amiga PS/2 Mouse Adapter

PIC based PS/2 to Amiga Mouse

You are here: Homepage » Hardware » PS/2 Amiga Mouse 

Introduction

Properly functioning Amiga compatible mouses have naturally become quite rare these days. Consequently, ways are needed to make standard mouses usable for the Amiga. One variant I applied in the 90s was to put the Amiga mouse PCB inside a PC mouse.

Another choice for the protocol conversion task are the popular microcontrollers. The best adapter I found so far is the PIC MCU based approach by Denis Sotchenko (http://ps2m.sotchenko.ru/). While many other Amiga hardware projects are available for purchase only, this one is completely open source.

Practically all current mouses come along with a USB plug. As I didn't want to incorporate an additional adapter, I directly soldered a USB-A-Socket instead of the PS/2 to my PCB. The mouse protocol is of course still PS/2 in this case and needs to be supported by the particular mouse.

Hardware

My main concern with the hardware part was that I wanted mechanical robustness. I didn't see the need for a true PCB in this case. So I just dremeled out a piece from a prototyping board and soldered the components together. The schematics including a USB port instead of PS/2 are shown below.

As seen in the images, I included an additional resistor. This one is just a workaround for a problem with the mouse port of my Amiga 4000. Sadly, the pullup on pin 1 of my mouse port was not working properly. After including a 2k resistor between RA1 of the PIC and VCC, the adapter started operating as expected with respect to vertical movements. Interestingly, the Amiga mouse worked without complaints (obviously not using open collector outputs). After working with the initial adapter for a while, I started missing the mouse wheel support. So I went to build a second one, customized for my A4000.

Schematics with USB-A instead of PS/2
finished adapter 1
finished adapter 2
second version with Wheel support

Software

I didn't bother to build myself a Parport programmer for the Amiga. Instead, a PicKit2 programmer was used in conjunction with PikDev on a Linux computer. In this process, the PikDev IDE didn't much like the Hex-file from Aminet. To make sure, that the program was installed into the PIC as intended, the source code was modified to fit gpasm/mpasm and re-assembled. We made sure that the resulting Hex-file exactly matches the original implementation. For this to work, some port assignment calls (PORTB+0x80, TRISB+0x80 etc.) have been replaced by simple TRISB instructions which generate the same code without complaints by the assembler. The assembler still complains at some places about deprecated mnemonics but generates the proper code. The Hex-file in the archive references the PIC16F628. Thanks to Stephan Lange for the work on the PIC sources.

Amiga software

The mouse adapter needs an additional program on the Amiga side for multi-button and scroll-wheel support. The tool is called WBM (wheel bus mouse) and available on Aminet.

I've noticed some timing issues on my Vampire Card. Window refresh got sluggish due to an overly high amount of interrupts. So I've recompiled WBM to use a different timing approach by means of the DOS Delay() call. You find it in the downloads section.

Downloads

ps2m.tgz

PIC source code and Hex-File, adapted to gpasm/mpasm

wbm-apollo.lha

WheelBusMouse 1.4, recompiled to work better with Vampire Cards