Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Testing Mouse desyncs in different video modes using Neopaint 3.2a #2013

Open
stuaxo opened this issue Jun 6, 2023 · 28 comments
Open

Testing Mouse desyncs in different video modes using Neopaint 3.2a #2013

stuaxo opened this issue Jun 6, 2023 · 28 comments

Comments

@stuaxo
Copy link
Contributor

stuaxo commented Jun 6, 2023

Neopaint has an option to set the video mode
image

I used this to check the default mouse behaviour for these modes, to see if the pointer becomes desynced when you move the cursor off the window and back:

Mode Horizontal Movement Vertical Movement Synched
320x200x256 Appears Doubled Correct
320x200x32k Appears Doubled Correct
320x200x64k Appears Doubled Correct
320x200x16m Appears Doubled Correct
640x350x2 Correct Limited to top of the screen
640x350x16 Correct Limited to top of the screen
640x480x2 Correct Limited to top of the screen
640x480x16 Correct Limited to top of the screen
640x480x256 No desync No desync ✔️
640x480x32k No desync No desync ✔️
640x480x64k No desync No desync ✔️
640x480x16m No desync No desync ✔️
800x600x256 No desync No desync ✔️
800x600x32k Desync No desync
800x600x64k No desync No desync ✔️
800x600x16m No desync No desync ✔️
1024x768x256 No desync No desync ✔️
1024x768x32k No desync No desync ✔️
1024x768x64k No desync No desync ✔️
1024x768x16m Desync No desync
@stuaxo stuaxo changed the title Mouse desyncs in Neopaint 3.2a Testing Mouse desyncs in different video modes using Neopaint 3.2a Jun 6, 2023
@stsp
Copy link
Member

stsp commented Jun 6, 2023

For "appears doubled" case try
emumouse x 16.

@stuaxo
Copy link
Contributor Author

stuaxo commented Jun 6, 2023

I haven't been able to get 320x200 to do anything sensible yet, I'll get some results for that, but making emumouse x bigger or smaller than 8 is not helping.

For 640x480 16 color emumouse x 6 y 40 is synced in horizontal and vertical, however if you then switch to a vesa 640x480 mode like 640x480x256, 640x480x32k etc those modes are no longer synced.

@stuaxo
Copy link
Contributor Author

stuaxo commented Jun 6, 2023

Here are some screenshots of 320x200. The cursor is positioned close to the right-most point of the window (the big cursor being the one inside the app, and little one is the native one outside dosemu)

Screenshot from 2023-06-06 12-21-53
Screenshot from 2023-06-06 12-21-03
Screenshot from 2023-06-06 12-24-57

It shows minimum internal x resolution as 640 and minimum internal y resolution as 200 - (though it's in text mode when it displays that).

@stuaxo
Copy link
Contributor Author

stuaxo commented Jun 6, 2023

Re: 640x480x16 vs the vesa modes of that res.
Is there something special the mouse does in vesa modes (hence the 'ignore vesa modes' setting), that doesn't have an equivalent in the vanilla 640x480x16 vga mode ?

@stsp
Copy link
Member

stsp commented Jun 6, 2023

This was done 7 years ago: f8891e0
So I can't properly recall.
But IIRC the problem was that the MS
mouse driver is not aware of VESA modes,
and some progs relied on that fact.
I think the problem was that GEOS had
the cursor de-syncs, so maybe @bolle732
remembers something.

Overall the desyncs are not a bug.
But AFAIK dosbox and virtualbox mouse
add-on use different technique than dosemu2
does. So if you have no desyncs in dosbox
then it would be possible to add another
compatibility knob to emumouse.com.

@stuaxo
Copy link
Contributor Author

stuaxo commented Jun 6, 2023

I need to have a further look..

dosbox - by default has an "auto capture" thing turned on and is desynced when I hit Ctrl-F10 to toggle it off.

dosbox-x - seemed to work out of the box, I only tried 640x480x16, 320x200x256 and 1024x768 but they were all correct.

I'll see if these are extras added to dosbox-x or settings that exist in doxbox I can apply.

As a first impression of dosbox-x, it's nice that debugging tools are available straight from a menu along with options to change disk etc.

On the mouse front It tells me it's using internal emulation, so I'll see what info there is on that.

@stsp
Copy link
Member

stsp commented Jun 6, 2023

Please try $_mouse_ungrab_tweak = (on)

@stuaxo
Copy link
Contributor Author

stuaxo commented Jun 6, 2023

With that setting 640x480x16 is correct, and of course no issue on 640x480x256 either.

320x200 didn't seem correct, I'll try some of the other modes when I get back in a bit.

Off topic I got distracted for a moment that dosbox-x has an HX dos release, which runs in dosemu:
image

@stsp
Copy link
Member

stsp commented Jun 6, 2023

Uh, wow!
How's the speed?
Should we document that finding?
Its amazing that dosbox-X can do
such things while we only got an
arm support...

@stuaxo
Copy link
Contributor Author

stuaxo commented Jun 6, 2023

I'll open a new ticket for it, we can work out those details and do a bit of testing with it.

@stsp
Copy link
Member

stsp commented Jun 6, 2023

I added U opt for emumouse to enable
the ungrabbed tweak. Ideally it should be
dosbox-X compatible. Although you indicate
its not quite there yet...

I'll open a new ticket for it, we can work out those details and do a bit of testing with it.

Don't expect me to do much until I complete
my tool-chain for comcom32. Hopefully this
year it will be completed...

@stuaxo
Copy link
Contributor Author

stuaxo commented Jun 7, 2023

Nice, I might have to try emumouse u when this build appears on the PPA, I upgraded to a ubuntu lunar (23.04) and some things broke in the build, I'll have a stare at them tomorrow - one bit might be that clang seems to now be 15.

gcc-ia-16 needs a little more baking before it's available on lunar
tkchia/gcc-ia16#138

@stsp
Copy link
Member

stsp commented Jun 7, 2023

emumouse u is the same as ungrab
tweak in dosemurc.
ia16-gcc is not needed to build any
component of dosemu2.
clang-15 and lunar is supported, in fact
I use lunar myself.

@bolle732
Copy link
Contributor

bolle732 commented Jun 7, 2023

I think the problem was that GEOS had
the cursor de-syncs, so maybe @bolle732
remembers something.

There has been different problems with the mouse during the evolution of DOSEmu which all get sorted out fine. One problem I remember was that the mouse has been clipped into a small space, not being able to access all the screen space. The other problem has been with artifacts due to mouse cursor not being delete completely.

But syncing, I don't remember.

@stsp
Copy link
Member

stsp commented Jun 7, 2023

One problem I remember was that the mouse has been clipped into a small space, not
being able to access all the screen space.

Do you need to run emumouse s 1
these days to circumvent the problem,
or the problem is gone completely?

@stuaxo
Copy link
Contributor Author

stuaxo commented Jun 7, 2023

I'm having a play with vs dos to build DOS executables, having integration tests is needed - I can only really guess what neopaint does in different situations, I'd like to reproduce any behaviour under code we control (and more selfishly play with some dos graphics code 🖥️)

@bolle732
Copy link
Contributor

bolle732 commented Jun 9, 2023

Do you need to run emumouse s 1
these days to circumvent the problem,
or the problem is gone completely?

I'll have to check this on another machine when I get on it. My machine here is still Ubuntu 20.04 and I can't upgrade in the near future.

@stsp
Copy link
Member

stsp commented Jun 9, 2023

What's the problem with 20.04?
It should be supported, see here:
https://code.launchpad.net/~dosemu2/+recipe/dosemu2-daily

@bolle732
Copy link
Contributor

bolle732 commented Jun 9, 2023

I'll compile it on that machine by myself for being able to bisect. Wasn't there a problem with the version of LLD? Is that resolved?

@bolle732
Copy link
Contributor

bolle732 commented Jun 9, 2023

Ok, I retested compiling current GIT versions of comcom32, fdpp and dosemu2 on Ubuntu 20.04 and everything worked without an issue ;-) Holy smoke, I didn't noticed it before...

@bolle732
Copy link
Contributor

bolle732 commented Jun 9, 2023

Do you need to run emumouse s 1
these days to circumvent the problem,
or the problem is gone completely?

No, I reviewed my installation and there's no manual emumouse invocation anywhere.

@stsp
Copy link
Member

stsp commented Jun 9, 2023

Thanks for info, so that option was added
for something else we can't remember.
Use ppa builds and you will be up to date
with everything.

@bolle732
Copy link
Contributor

bolle732 commented Jun 9, 2023

Thanks, I'll have the PPA on another machine. This one is for testing and bisecting. But really good to know, that I can compile again ;-)

@stuaxo
Copy link
Contributor Author

stuaxo commented Jun 10, 2023

Updated from ppa and things work as expected with the ungrab tweak.

@stsp
Copy link
Member

stsp commented Jun 11, 2023

Which things?
What was fixed?

@stuaxo
Copy link
Contributor Author

stuaxo commented Jun 11, 2023

Apologies for being unclear :)

The mouse ungrab tweak works as expected with neopaint: I can choose graphics modes that were an issue before - move the mouse off the window and then back on again and it doesn't move in X or Y.

With mouse ungrab tweak disabled things are the still the same (as expected).

So the + is that ungrab is a good workaround.

I'm still interested in seeing if it's possible to get the mouse to behave in this app in the same way by default (without necessarily setting the ungrab tweak) - for instance seeing if I can reproduce the difference between 640x480x16 color and 640x480x256 color outside of neopaint, and build out some tests.

@stsp
Copy link
Member

stsp commented Jun 11, 2023

The mouse ungrab tweak works as expected with neopaint

This is strange because earlier it didn't
work for you when enabled via config.
Its the same thing. Yes, I applied a small
mouse fix in between, but it was supposed
to be completely unrelated. If it occasionally
fixed all the neopaint's problems, then I am
surprised.

I'm still interested in seeing if it's possible to get the mouse to behave in this app in the same way by default

Either by creating the .bat file for startup, or
by applying that setting into a config.

640x480x16 color and 640x480x256 color outside of neopaint, and build out some tests.

SerfCity game was such a test.
It made me to implement the very complex
scheme that can produce desyncs. I don't
suppose you can play SerfCity with ungrabbed
mouse under dosbox-X.

@stuaxo
Copy link
Contributor Author

stuaxo commented Jun 11, 2023

I'll give it a go in the next few days and see what happens.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants