joncampbell123 / dosbox-x

DOSBox-X fork of the DOSBox project

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

MrMadguy64 opened this issue · comments

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?

  • I have searched and didn't find any similar question.

Code of Conduct & Contributing Guidelines

  • I agree to follow the code of conduct and the contributing guidelines.

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.

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.