USB to quadrature encoder so you use modern USB mice on the Amiga.
Homepage
Introduction¶
This project is devised so you can attach a mouse (and/or steam controller) to a classic computer such as an Amiga. Computers of that era use bus mice which just send the pulses from the quadrature encoder wheels on the mouse directly to the computer with out interpretation.
Use¶
Program a build base on this repository to a STM32 nucleo board (I tested this on a NUCLEO STM32F411 board). You will then need connect the Nucleo board to your computers joystick and mouse ports as follows (if you only use a mouse you won't need a joystick lead :) ). If you use a steam controller the thumb stick and left pad are mapped to the Amiga's joystick port and the right pad and front trigger buttons are mapped to the mouse.
mouse_port_forward(D10) - Amiga Joystick pin 1 mouse_port_back(D11) - Amiga Joystick pin 2 mouse_port_left(D12) - Amiga Joystick pin 3 mouse_port_right(D13) - Amiga Joystick pin 4 mouse_port_left_button(D9) - Amiga Joystick pin 6 GND - Amiga joystick pin 8 mouse_port_right_button(D8) - Amiga Joystick pin 9
game_port_forward(PC_8) - Amiga Joystick pin 1 game_port_back(PC_12) - Amiga Joystick pin 2 game_port_left(PC_10) - Amiga Joystick pin 3 game_port_right(PC_11) - Amiga Joystick pin 4 game_port_left_button(PC_6) - Amiga Joystick pin 6 GND - Amiga joystick pin 8 game_port_right_button(PC_5) - Amiga Joystick pin 9
It is best NOT to use the 5V pin from the Amiga's joystick port to power the nucleo board as the power suppled by the Amiga is limited!
You will also need to attach a USB socket to the nuclea board so you can use the Nucleo's usb OTG support.
(1) 5V - 5v (2) PA11 - Data- (3) PA12 - Data+ (4) GND - GND
According to the usb spec it is required to attach a 15k ohm resistor between D-/+ and ground but it appears the USB host works fine without this.
NOTES:¶
- The right touch pad can take a little while before it generates mouse events.
- I found that the STM USBHost library needed some modifications to correctly work with boot protocol (it needs to call set protocol) and hubs (getSize doesn't report the correct size). This project uses a modified USB host library with fixes for this (they will need a little more work before I can create a pull request).