News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Handling mouse

Started by zak100, December 31, 2009, 05:30:56 PM

Previous topic - Next topic

zak100

Hi,
I cant find support.asm. Kindly guide me in this regard.

Zulfi.

MichaelW

eschew obfuscation

zak100

Thanks. I would try it shortly.

Zulfi.

zak100

Hi,
I named this file as mouse.bin. I compiled and linked without any error. Then I copied the bootsector and this mouse.bin. I saw 'A' but I pressed enter key , I didnt find the mouse cursor on the screen. Kindly help me in this regard.

Zulfi.

FORTRANS

Hello,

   The mouse cursor in DOS is managed by a mouse
driver.  When you boot your own code you do not have
those drivers loaded.  You have to write the equivalent
of a driver to manage the cursor.

Regards,

Steve N.

zak100

Hi,
Thanks. I think I saw mouse cursor shape in cutemouse. Okay what is the function of code provided by MichealW, if its not a driver?

Zulfi.

MichaelW

The last code I provided is just a test. I determined that getting the mouse button status is easy, so I focused on the more difficult problem of getting the mouse cursor position in some useful form. If I can find time to make that work, the next task will be the mouse cursor. The "pointer" cursor is for the graphics modes. For the alphanumeric modes the cursor is normally a solid block the size of the character box. The main source of information I'm using for the cursor position code is here:

http://www.computer-engineering.org/ps2mouse/

eschew obfuscation

zak100

Thanks for solving this confusion. Thanks for your good intentions. I think I should also work on that. This can be a good learning exercise.

Zulfi.

FORTRANS

Hi,

   Thanks for the link.  That has some good information
that I had not seen.  I have got my variant of the program
working with a "standard" mouse.  But am having some
problems with the "Intellimouse" procedures described.  So
no Z motion yet.  Setting the data packet to 4 bytes locks
up the old HP laptop I'm using when running MS-DOS.  Odd
that.

Regards,

Steve N.

FORTRANS

#39
Hi,

   In the towel I will throw.  Getting nowhere we are.  May
the farce be kinder to you.  Here is what I have got up to
now.  Hope someone finds something of interest in it.  Way
too many reboots here.  The testcase programs are attached.
Only of note for Real Mode environments.  Looks like a two
button mouse can be used with this kind of setup.

   Thanks MichaelW for the posted code and link.

Best regards,

Steve N.

        COMMENT |
M = Microsoft "Mouse Port Compatible Mouse 2.1A" (Two button ball)
L = Logitech "MouseMan Traveler" (~3 button optical + wheel)
D = Dell OEM Microsoft "IntelliMouse 1.3A PS/2 Compatible" (~3 button
    ball + wheel)

0 = Packet size not set
3 = Packet size 3
4 = Packet size 4

   Results with the IntelliMouse sequence should only apply to the case
of packet size 4, but was used sometimes with packet size 3 as well.  L
and D respond to the IntelliMouse sequence by changing the device ID to
03, M stays with 00.  My HP laptop responds to packet size of 3 and the
IntelliMouse sequence by having the now enabled fourth byte, Z movement
or wheel motion, as a new mouse event data packet overwriting the first
packet.  This trashes the mouse button and motion reports.

   "Normal responses" means that the test case program reported success
to the BIOS interrupt 15H.  Some of the following is from leaky memory.
Windows hides the BIOS interrupt.  The OS/2 VDM supplies "fake" data to
the program.  Real data, give or take, but not reported directly by the
Int 15H call.

        HP OmniBook 800 CS (SystemSoft BIOS)
L 0 3 4   OS/2 VDM      Acts as 2 button, third button = spurious movement.
L 0       DOS 6.2x      Normal responses, but no mouse events.
L 3       DOS 6.2x      Normal 3 button mouse, no wheel (see above).
L 4       DOS 6.2x      Normal responses, hard lock on mouse event, video
                        corrupted (at one time).
M 3       DOS 6.2x      Normal 2 button mouse.
M 4       DOS 6.2x      Normal responses, hard lock on movement.

        ITOX P-III (Award BIOS, (now Pheonix))
M         Windows 2000  Error_Not_Implemented2.
M 0 3 4   OS/2 VDM      Acts as 2 button mouse.
L   3 4   OS/2 VDM      Acts as 2 button, third button = spurious data,
                        wheel was either nothing or up and down arrows
                        (cursor motion).
D   3 4   OS/2 VDM      Acts as 2 button mouse, third button is a zero
                        mouse event, wheel is up and down arrows.
M 0       DOS 6.2x      Normal responses, but no mouse events.
M 3       DOS 6.2x      Acts as 2 button mouse.
M 4       DOS 6.2x      Normal responses, but no mouse events.
L 3       DOS 6.2x      Normal 3 button mouse, no wheel.
D 3       DOS 6.2x      Normal 3 button mouse, no wheel.
L 4       DOS 6.2x      Normal responses, movement: X gone, Y on X, Z on Y.
D 4       DOS 6.2x      Normal responses, movement: X gone, Y on X, Z on Y.
                        (Z movement very small)

        Quantex P-90
          DOS 6.2x      Error_Not_Implemented (No PS/2 port) test of error.
                |


Edit:
   In the cut and paste to post the above comments, I overwrote
them with an older version.  I tried to recreate them to clarify
things a bit.

SRN

FORTRANS

Hi,

   Fixed last post.

Sorry,

Steve

zak100

Hi,
Thanks for help on this. Actually I have downloaded the link but I am not getting time to go through it. But i surely want to tackle this issue and hope soon.

Zulfi.