Tuesday, November 16, 2010

KeyMouse low level information on the Amstrad PCW

During development of Quijote, I discovered the following low level information about the PCW KeyMouse.

In the last 16 bytes of bank 3 (keyboard mapping):
0xBFFB Bit 7 is the middle button status (1=pressed).
0xBFFD Bits b4 to b0 are the low bits of the vertical movement counter.

Then, plus the addition of the very valuable information showed in the Richard Fairhurst website the low level interface of PCW KeyMouse is:
0xBFFB b7: middle button status
b6 to b0: horizontal movement counter
0xBFFC b7 to b6: high bits of vertical movement counter
0xBFFD b4 to b0: low bits of vertical movement counter
0xBFFE b7: left button status
b6: right button status

For button status: Bit = 1 if button pressed, otherwise = 0.

Values for movement counters: 0 to 127, but when 0 is decreased in 1, 127 is the result, and when 127 is increased in 1, 0 is the result.

No comments:

Post a Comment