Using an Amiga mouse as a trackball

This was copied from Pyrofer's website, see here for the original article

This pinout has been worked out with a scope and voltmeter, So forgive me if something is wrong. 

I take NO RESPONSIBILITY in any way for anything that happens if you follow this pinout. 

IT IS NOT MY FAULT if anything blows up, this is a guide to how MY pcb is wired up only and I cannot garantee that yours will be the same.
ALWAYS CHECK FIRST.

Parts needed

Commodore Amiga Mouse
9 Pin D-type male connector
9 Pin D-type Hood
9 Wire Connector Cable
Game Connector (I assume you got that already!)

you should already KNOW the pinout for your PCB, Connect the mouse as Follows,

Pinout for Amiga Mouse

Your PCB

Pin

Mouse

X clk

Pin 1

X speed

X dir

Pin 2

X Quadrature

Y clk

Pin 3

Y speed

Y dir

Pin 4

Y Quadrature

Button 2/B

Pin 5

Right Button

Button 1/A

Pin 6

Left Button

+5v

Pin 7

+5v

GND

Pin 8

GND

Button 3/C

Pin 9

Center Button