Lab 4: PS/2 Mouse Packets
Generated folder: labs/mouse/
Lab 4 extends the i8042 controller idea to the auxiliary PS/2 mouse. The mouse reports packets containing button state, movement deltas, sign bits, and overflow flags.
Device Model
| Packet byte | Contains |
|---|---|
| byte 0 | buttons, sign bits, overflow bits, synchronization bit |
| byte 1 | X movement low byte |
| byte 2 | Y movement low byte |
The first byte includes a synchronization bit that helps recover alignment.
Plan
- Enable data reporting.
- Validate command responses.
- Feed bytes into a packet builder.
- Use the sync bit to align packets.
- Sign-extend X and Y movement.
Next: implementation tasks.