There are at least two models of mice available, the Japanese HKT-9900 and
the American HKT-4200. The latter has three buttons (two on top and one
thumb button) and a mouse wheel. The earlier seems to have the same set
of features, but this has not yet been verified. The mouse is connected
to the Maple Bus, just like other controller-type
peripherals.
The current state of a mouse is queried with the Get condition request.
The condition stucture for the Mouse function code ($200) is as follows:
int32 buttons ; digital buttons bitfield (little endian)
int16 axis1 ; horizontal movement (0-$3FF) (little endian)
int16 axis2 ; vertical movement (0-$3FF) (little endian)
int16 axis3 ; mouse wheel movement (0-$3FF) (little endian)
int16 axis4 ; ? movement (0-$3FF) (little endian)
int16 axis5 ; ? movement (0-$3FF) (little endian)
int16 axis6 ; ? movement (0-$3FF) (little endian)
int16 axis7 ; ? movement (0-$3FF) (little endian)
int16 axis8 ; ? movement (0-$3FF) (little endian)
The buttons bitfield contains zeroes for pressed buttons, and ones for
unpressed buttons (only the 8 least significant bits are used).
Bit | Button |
0 |
Middle button (C) |
1 |
Right button (B) |
2 |
Left button (A) |
3 |
Thumb button (START) |
4 |
? button |
5 |
? button |
6 |
? button |
7 |
? button |
|
The axis movement fields contain the amount of movement since the last
poll, as an offseted integer. $200 means no movement, $0 is maximum movement
to the left / up, and $3FF is maximum movement to the right / down.
The function_data for the
Mouse function code is a bitfield describing which controls are present
on the particular device (zero = not present, one = present):
Bit | Control |
0 |
Axis 1 |
1 |
Axis 2 |
2 |
Axis 3 |
3 |
Axis 4 |
4 |
Axis 5 |
5 |
Axis 6 |
6 |
Axis 7 |
7 |
Axis 8 |
8 |
Middle button |
9 |
Right button |
10 |
Left button |
11 |
Thumb button |
12 |
? button |
13 |
? button |
14 |
? button |
15 |
? button |
|
Dreamcast Programming by Marcus Comstedt
Last modified: Tue Dec 12 00:09:49 MET 2000