Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!bloom-beacon!mit-eddie!uw-beaver!cornell!batcomputer!itsgw!steinmetz!uunet!wucs1!dale From: dale@wucs1.UUCP (Dale Frye) Newsgroups: comp.sys.ibm.pc Subject: Re: Serial Mouse Data Format Summary: Microsoft won't tell but not hard to figure out. Message-ID: <762@wucs1.UUCP> Date: 7 Jun 88 05:45:39 GMT References: <1988Jun5.120653.7373@gpu.utcs.toronto.edu> Organization: Washington University, St. Louis Lines: 38 In article <1988Jun5.120653.7373@gpu.utcs.toronto.edu>, lharris@gpu.utcs.toronto.edu (Leonard Harris) writes: > > Does anyone know the details of the format of serial data coming > from a serial mouse such as the Microsoft mouse. I'd like to be > able to control it directly from a program without having to > go through their drivers. > Any info would be most welcome I working from memory so I might miss a detail or two. 1200 baud 7 data bits no parity 1 stop bit Each time you move the mouse or press or release a button 3 bytes are sent. These three bytes are literally seperated by 1 stop bit so make certain your software can empty the buffer (i.e. read the data) of the UART before the next charater is recieved. Suggest using interrupts. The three bytes are: 1st byte: sign bits for x and y directions bits for status of buttons the high order bit is always set to 1 (this is a good way to check for this byte as the next two bytes always have this bit set to 0) 2nd byte: delta x - change in x position -- 6 bits only I think this is 2's comp. for neg. numbers. (I don't remember) The sign bit is in the first byte. 3nd byte: delta y -- same as above I did this a few years ago so please verify this info. I called Microsoft for this info. They said it was against corp. policy to release it. One hour later using debug and a small BASIC program, I came up with thiese results. Dale Frye @ Washington University in St. Louis