VOGONS

Common searches


First post, by mik

User metadata
Rank Newbie
Rank
Newbie

I tried to stop execution of populous 2 when mouse button has been pressed.
Unfortunatley I am not able to stop program execution after mouse click.
I tried BPINT 33 and BPINT 74 but the game is not frozen when pressing mouse button.

Every hint what I am doing wrong is very welcome.

Thx

Reply 1 of 2, by ripsaw8080

User metadata
Rank DOSBox Author
Rank
DOSBox Author

Hardware interrupts, like IRQ 12 (mouse), do not trigger interrupt breakpoints (BPINT) -- only INT instructions executed by the CPU will trigger them.

However, you can set an address breakpoint on an interrupt handler address: INTHAND 74 and then F9 will set a breakpoint at the IRQ 12 handler address, but note that it will break on all mouse events, including mouse movement.

Some games use a mouse UIR (user interrupt routine), and you can check for that by setting a breakpoint in an SVN debug build for the specific function (BPINT 33 00 0C). If the function is called with an address in ES:DX then you can set a breakpoint there to break on the events selected by the function, which might include movement and/or buttons.

Reply 2 of 2, by mik

User metadata
Rank Newbie
Rank
Newbie

Thank you for your hint with BPINT 33 00 0C.

At startup I set the breakpoint and was able to determine ES:DX address for the FAR routine => 11A5:00A5 .

As you said every mouse movement is calling the code at this position.

But not far away a check for left button press is happening:

11A5:00CB F7C30100 test bx,0001
11A5:00CF 7438 je 00000109 ($+38)
11A5:00D1 833EB41700 cmp word [17B4],0000 => handling left mouse button press

For debugging only left mouse button press I will use break point at 11A5:00D1 .

Many thanks

BTW: A break on memory read would be cool to make it easier to find specific handling routines for click coordinates, currently I have no clue to do ... so i have to debug step by step 🙁