Hi Guys
I’ve been playing with this PS2 Mouse to Amiga mouse port translator,
so I thought I might as well wrap it in BASIC to compile it, and it can be used if needed.
It’s essentially still assembler in the manner DT’s Elapsed Timer code is.
You can still access variables from PBP code.
It receives packets from the mouse, converts to pulses for vintage Commodore Amiga computers.
The PS2 (3 byte packets) are easy enough to interpret, but I have left the Amiga output code as well.
The Amiga expects mouse buttons to be individual pins, so it physically converts back to individual button signals.
There are some important notes to go with this:
1. The schematic is correct other than portB.2 is used for hardware serial out.
2. The Amiga mouse port connector need not be connected for use with PBP, other than the circuit needs power of course.
3. The PS2 main routine should become a subroutine which will only be practical in a real time cyclic program.
You can’t neglect to repeditively call the code, or the mouse will not be responsive.
4. Timing is important for the PS2 reading routine. I have not even tried a 4MHz crystal.
5. Configuration for the demo I will show later are: WDT OFF, BOD OFF, XT Clock, Powerup delay ENABLE.
6. Decoded PS2 serial packets are re-encoded to 2400 8N1 and passed out the hardware serial port.
7. The middle button is disabled if present. Instead, while the middle button is held, the left & right
buttons provide two additional outputs.
8. Blocking HPWM (multiple bytes send in one command) loses mouse responsiveness.
It’s just a cool way to demonstrate, and is easy to set up and look at with a serial terminal program
and real mouse port for viewing both outputs on one screen at the same time!
Enjoy
Cheers, Art.
Bookmarks