I have been trying for 3 weeks to find info I can use to: initialize, and read from a serial mouse in c, I have tried the source for GPM, libsvga, selection, allegro, and the linux drivers, the problem is that these files are made to support ALL kinds of mice, and I need to write code for just one, mine.(MS Serial)
I have code for in dos using int86() and 33, but since i use linux, thats not going to work, I can't use gpm, because there is not enough room on the micro-kernel floppy i'm using, so low-level serial code is my only choice.
I have tried reading the /dev/mouse character file, but since my kernel isn't compiled with mouse support, that wont work either.
If someone could post a small bit of code just to write to port 3f8 (to turn on, and set the mouse settings) then a read function (to read the mouse data, all i really need in the state of the left button, and wether or not it is moving left or right)
I have looked everywhere, and tried all the irc programming and linux chat rooms, and nothing, well nothing but people saying use gpm.
Can it be that I'm the only person in the world who has ever tried to create a console only program with mouse support for linux?
Please help, any info at all would be great.
Even some code to do this in dos with c and no dos.h int86(), would be great. Like an old dos program written in c with native mouse support, even with no mouse driver loaded as a TSR.
And if no one has any ideas, how about how to put a read(fd, mousebuf, 3); into an array, so that mousebuf, which is supposed to be a 3 byte array, now is split into say an array of 24-bits so I can view the state of each bit without doing a binary AND or OR on them. And is the above line putting 3-bytes into mousebuf[0], or is it puting byte 1 into mousebuf[0] byte 2 into mousebuf[1] and so on..
Please help, I have tried for so long.
I have code for in dos using int86() and 33, but since i use linux, thats not going to work, I can't use gpm, because there is not enough room on the micro-kernel floppy i'm using, so low-level serial code is my only choice.
I have tried reading the /dev/mouse character file, but since my kernel isn't compiled with mouse support, that wont work either.
If someone could post a small bit of code just to write to port 3f8 (to turn on, and set the mouse settings) then a read function (to read the mouse data, all i really need in the state of the left button, and wether or not it is moving left or right)
I have looked everywhere, and tried all the irc programming and linux chat rooms, and nothing, well nothing but people saying use gpm.
Can it be that I'm the only person in the world who has ever tried to create a console only program with mouse support for linux?
Please help, any info at all would be great.
Even some code to do this in dos with c and no dos.h int86(), would be great. Like an old dos program written in c with native mouse support, even with no mouse driver loaded as a TSR.
And if no one has any ideas, how about how to put a read(fd, mousebuf, 3); into an array, so that mousebuf, which is supposed to be a 3 byte array, now is split into say an array of 24-bits so I can view the state of each bit without doing a binary AND or OR on them. And is the above line putting 3-bytes into mousebuf[0], or is it puting byte 1 into mousebuf[0] byte 2 into mousebuf[1] and so on..
Please help, I have tried for so long.