joncampbell123 / dosbox-x

DOSBox-X fork of the DOSBox project
GNU General Public License v2.0
2.68k stars 381 forks source link

INT 33h, 07h/08h: how to set arbitrary cursor ranges? #5000

Closed MrMadguy64 closed 4 months ago

MrMadguy64 commented 4 months ago

Question

I've analyzed mouse.cpp source and, as I understand, if mode is set to graphic prior to mouse reset call, then first INT 33h, 07h/08h calls after that should allow me to set arbitrary mouse cursor ranges. It doesn't happen. For example for Hercules even if I set 0x0449 = 0x06 and then try to set 720x348 cursor range - 640x200 is still used instead. Same for VGA 320x240. 320x200 is used anyway. What should I do?

P.S. Why so many difficulties? Why not just allow setting arbitrary cursor range? As I remember, when I was making Win3.1 mouse driver for PocketDOS, INT 33h just allowed me to set any arbitrary cursor range, including (0xffff, 0xffff), that was required by Win3.1. Mouse support in DOS is a little bit complicated.

Have you checked that no similar question(s) exist?

Code of Conduct & Contributing Guidelines

MrMadguy64 commented 4 months ago

One of problems is solved. It was caused by compiler optimization. Things work to some degree in Hercules mode: mode is still treated as text one, so granularity is set to 8. If I multiply resolution by 8 - mouse becomes slow. I'm not sure, if I should leave it as is or increase mickey to pixel ratio. But it still doesn't work for 320x240. 320x200 is still used, despite of having all mouse messages in log file.

MrMadguy64 commented 4 months ago

Sorry, my fault. My project's logic has changed at some point, so now mode init is deferred and it causes mouse init to be called at wrong moment.