PS2 Mouse Interpreter


Results 1 to 3 of 3

Threaded View

  1. #1
    Join Date
    Aug 2003
    Posts
    985

    Default PS2 Mouse Interpreter

    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.
    Last edited by Art; - 3rd December 2015 at 12:05.

Similar Threads

  1. PS2 wireless gamepad
    By ndalisay in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 17th August 2009, 02:46
  2. AT/PS2 Keybord - PIC Interface?
    By Kamikaze47 in forum Code Examples
    Replies: 73
    Last Post: - 9th August 2009, 16:10
  3. reducing shiftout clock freq and PS2/PC interfacing ....
    By wireless magic in forum mel PIC BASIC Pro
    Replies: 18
    Last Post: - 26th February 2008, 20:15
  4. PS2 Keyboard not funny !!
    By Jųan in forum General
    Replies: 1
    Last Post: - 20th December 2007, 22:13
  5. PS2 keyboard emulator
    By robertg in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 5th July 2007, 20:40

Members who have read this thread : 1

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts