Solved

Mouse driver

Posted on 1998-10-11
11
206 Views
Last Modified: 2010-04-15
I need to write a mouse driver for hi resolution in real mode .It's meens no Interapts .
Thanks and answer in C,C++,Pascal,Asmbler will do
By.
0
Comment
Question by:samcurr
11 Comments
 
LVL 6

Expert Comment

by:snoegler
Comment Utility
"It's meens no Interapts" ...  what does that mean? No BIOS mouse interrupts?
If not, you'd need to read directly from RS-232. I can explain, if you want this.
Otherwise, if you'd like a list of int 33 handlers which do the hi res mouse position reading
for you, i have a book which lists them. I could post you the ones you need, if you tell
which operations you need.
0
 
LVL 6

Expert Comment

by:thresher_shark
Comment Utility
Just out of curiousity, why can't you use interupts (providing that is what you mean by "Interapts")?
0
 

Author Comment

by:samcurr
Comment Utility
I already tried  interrupts they doesn't work with the graphic library I use .
RS-232 that’s the thing I need (I think).

0
 
LVL 6

Expert Comment

by:snoegler
Comment Utility
I have done this some time ago, and i can't find the sources for my code again :(
But i remember how it was done:
All microsoft compatible mouses use the communication params 9600,n,8,1. You can ignore
the handshaking signals, i think. The you will always receive 3 byte pairs of information.
The first one contains information about the status of the mouse buttons, the second
(third) contains the delta value in x(y) direction.
Of course, all features like mouse acceleration and bounds checking you'd need to code
yourself. Also if you don't want to poll the mouse events, you'd need to write a IRQ 4 handler
for COM1(or IRQ3 for COM2).
I will search again for my old source code, maybe i'll find it.

Can you explain why the interrupts don't work? They would save you a good piece of time :)
0
 

Author Comment

by:samcurr
Comment Utility
interrupts do work but only in part the mouse pointer is not displayed on the screen I don’t won’t to write a program which will constantly check thought the interrupts for mouse position.


0
What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 

Author Comment

by:samcurr
Comment Utility
interrupts do work but only in part the mouse pointer is not displayed on the screen I don’t won’t to write a program which will constantly check thought the interrupts for mouse position.
I will really if you find a source code I not very good in hardware.

0
 
LVL 6

Expert Comment

by:snoegler
Comment Utility
You don't need to check the mouse position constantly using the mouse interrupts.
The mouse interrupt handlers support a user defined callback function which is called
everytime the mouse moves. But it is very much to post here ...
I would suggest that you buy yourself a book about system interrupts (perhaps an older
book) - shouldn't cost much money.
If you like me to explain, i will try, but i think you'll be better off having a book.
In short, you need to define an own interrupt handler which is called by the mouse support.
I would say that it's less effort to implement this instead of writing a mouse driver by yourself
But if you like, i'll post you the details - either on mouse interrupts or on mouse serial input.
0
 

Author Comment

by:samcurr
Comment Utility
Thanks I will try to find a book but first if don't mind send to me anything you can on the
subject THe E.M.: b_samon@hotmail.com
Thanks , and if I still don't get it I will by a book .(by the way which book will you Suggest on programing hardware in general)
0
 
LVL 1

Accepted Solution

by:
cph earned 100 total points
Comment Utility
Have a look at ctmousexx.zip where xx is the version (I think 1.5 is the latest)
It is part of the FreeDos Project on the web. the site is www.FreeDos.org
0
 

Author Comment

by:samcurr
Comment Utility
to cph there exactly i looked for two hours sweept the
feedos up down & still didn't found it !!!!
0
 
LVL 1

Expert Comment

by:sergelebel
Comment Utility
in case your still looking!  I have some good assembler code for mouse support fot text base & graphics mode...I would suspect you want interrupt driven mouse control since attempting to control it trough the port is a huge task..especially if your not to good in hardware... you can reach me at  <Assemblr@hotmail.com>
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Preface I don't like visual development tools that are supposed to write a program for me. Even if it is Xcode and I can use Interface Builder. Yes, it is a perfect tool and has helped me a lot, mainly, in the beginning, when my programs were small…
This tutorial is posted by Aaron Wojnowski, administrator at SDKExpert.net.  To view more iPhone tutorials, visit www.sdkexpert.net. This is a very simple tutorial on finding the user's current location easily. In this tutorial, you will learn ho…
The goal of this video is to provide viewers with basic examples to understand opening and writing to files in the C programming language.
The goal of this video is to provide viewers with basic examples to understand how to use strings and some functions related to them in the C programming language.

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now