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

Mouse cursor lags in Lost in Time (CD version only) #2465

Closed
3 tasks done
KainXVIII opened this issue May 7, 2023 · 19 comments
Closed
3 tasks done

Mouse cursor lags in Lost in Time (CD version only) #2465

KainXVIII opened this issue May 7, 2023 · 19 comments
Labels
bug Something isn't working

Comments

@KainXVIII
Copy link

KainXVIII commented May 7, 2023

Are you using the latest Dosbox-Staging Version?

  • I have checked releases and am using the latest release.

Different version than latest?

No response

What Operating System are you using?

Windows 10

If Other OS, please describe

No response

Relevant hardware info

No response

Have you checked that no other similar issue already exists?

  • I have searched and not found similar issues.

A clear and concise description of what the bug is.

Mouse cursor lags heavily when i try playing the game (seems like not only cursor, but game itself too, like fmv transitions, but cursor is more apparent), but only when i try moving mouse around playscreen, when i enter the game menus (like options) - mouse cursor moves fine! It occurs only in CD version of Lost in Time (patch installed) and maybe in other Coktel Vision games, like Goblins 3.
Btw floppy version of Lost in Time does not have this issue, neither does it occur in other Dosbox builds (like ECE).
PS - another interesting issue, i cannot even launch this game in Dosbox Staging without this patch http://www.sierrahelp.com/Patches-Updates/Patches-Updates-Games/MiscGamesUpdates.html#LIT (This patch will fix problems that occur in conjunction with certain sound cards and CD ROM drives.), but it works fine without any patches in normal dosbox.

Steps to reproduce the behaviour.

Explain how to reproduce

  1. Run the game
  2. Try to move the cursor when ingame
  3. Try to move the cursor when entering options menu

Your configuration

https://gist.github.com/KainXVIII/654dbc8bc1b1458b94da5f05a175f5e3

Provide a Log

https://gist.github.com/KainXVIII/ee17cc49086b575b7fd66efc8b008398

Code of Conduct & Contributing Guidelines

  • Yes, I agree.
@KainXVIII KainXVIII added the bug Something isn't working label May 7, 2023
@FeralChild64
Copy link
Collaborator

A couple of things you might try (I intend to investigate the issue of course, but I don’t have time today):

  • retest with the current development build, https://dosbox-staging.github.io/downloads/development-builds/
  • disable dos_mouse_immediate
  • switch mouse_capture to onclick
  • try to load CtMouse driver 2.1b4 before launching the tame
  • set serial1 = mouse and load serial mouse driver before starting the game, like ctmouse.exe /S for CtMouse

@KainXVIII
Copy link
Author

A couple of things you might try (I intend to investigate the issue of course, but I don’t have time today):

  • retest with the current development build, https://dosbox-staging.github.io/downloads/development-builds/
  • disable dos_mouse_immediate
  • switch mouse_capture to onclick
  • try to load CtMouse driver 2.1b4 before launching the tame
  • set serial1 = mouse and load serial mouse driver before starting the game, like ctmouse.exe /S for CtMouse

I tried all of these steps, but alas. Maybe its not mouse related issue after all, i dunno..

@MasterO2
Copy link
Contributor

MasterO2 commented May 7, 2023

A couple of things you might try (I intend to investigate the issue of course, but I don’t have time today):

  • retest with the current development build, https://dosbox-staging.github.io/downloads/development-builds/
  • disable dos_mouse_immediate
  • switch mouse_capture to onclick
  • try to load CtMouse driver 2.1b4 before launching the tame
  • set serial1 = mouse and load serial mouse driver before starting the game, like ctmouse.exe /S for CtMouse

I tried all of these steps, but alas. Maybe its not mouse related issue after all, i dunno..

Have you tried either increasing or decreasing the mouse_sensitivity setting in dosbox-staging.conf?

Have you tried enabling mouse_raw_input, also in dosbox-staging.conf?

Have you also run the command mousectl dos -r 125? Maybe Lost in Time does not like high mouse sampling rates?

(-r 125 means a rate of 125 Hz)

@johnnovak
Copy link
Member

johnnovak commented May 7, 2023

I recommend to use small per-game configs; no need to specify all config params for every game, use the layered approach.

I think you're running out of CPU power. Set cycles to fixed 20000 or something then increase it to the minimum setting that runs the game well enough. I assume this is a protected mode game which defaults to max cycles. This can overload/starve other parts of the emulation.

@johnnovak
Copy link
Member

Also, test it on real hardware if possible before drawing any conclusions.

@KainXVIII
Copy link
Author

Have you tried either increasing or decreasing the mouse_sensitivity setting in dosbox-staging.conf?

Have you tried enabling mouse_raw_input, also in dosbox-staging.conf?

Have you also run the command mousectl dos -r 125? Maybe Lost in Time does not like high mouse sampling rates?

(-r 125 means a rate of 125 Hz)

Yes, nothing helped.

I think you're running out of CPU power. Set cycles to fixed 20000 or something then increase it to the minimum setting that runs the game well enough. I assume this is a protected mode game which defaults to max cycles. This can overload/starve other parts of the emulation.

No, its not protected mode game, it default to 3000 cycles (and runs just fine with these cycles and auto core/cpu settings in non-staging dosbox).

@kcgen
Copy link
Member

kcgen commented May 9, 2023

I tested it against 0.80.1, and the mouse is especially fluid - the game will re-draw cursor at 70 fps, steadily, when moving.

lost_in_time.mp4

Your display is 60 Hz, so I suspect there's something going on at the host-level. Try this minimal conf and experiment by commenting in the vsync = true and or the dos_rate = 60; if either show benefit, then your host might be struggling with > 60 FPS during the mouse movement sections (try forcing-disabling vsync in your nvidia drivers or get a 140+ Hz VRR display).

[sdl]
fullscreen = false
windowresolution = 960x720
# vsync = true

[dosbox]
startup_verbosity = quiet
# dos_rate = 60

[cpu]
core = dynamic
cycles = 4000

[sblaster]
sbtype = sbpro2

[midi]
mpu401 = none
mididevice = none

[gus]
gus = false

[speaker]
pcspeaker = none

[mouse]
mouse_raw_input = true
dos_mouse_immediate = true
ps2_mouse_model = none

[joystick]
joysticktype = disabled

[ethernet]
ne2000 = false

[autoexec]
imgmount d cd/opus/cdrom.cue -t cdrom
mount c .
c:
lost

@KainXVIII
Copy link
Author

I tested it against 0.80.1, and the mouse is especially fluid - the game will re-draw cursor at 70 fps, steadily, when moving.

Yeah, all is smooth in your video!

Your display is 60 Hz, so I suspect there's something going on at the host-level. Try this minimal conf and experiment by commenting in the vsync = true and or the dos_rate = 60

No luck, here is my video with this problem https://www.youtube.com/watch?v=E8ZPfAisFqk

if either show benefit, then your host might be struggling with > 60 FPS during the mouse movement sections

Yeah, interestingly that floppy version of Lost in Time (without CD audio music) is not affected.

or get a 140+ Hz VRR display

I wish i can 😅 I will just use non-staging Dosbox or ScummVM for now.

@kcgen
Copy link
Member

kcgen commented May 9, 2023

It looks you're mounting the physical CDROM disk -- can you rip your CD to bin/cue? That's what I'm using.

(And maybe SDL1's built-in CDROM access layer had caching and/or read-ahead)

@KainXVIII
Copy link
Author

It looks you're mounting the physical CDROM disk -- can you rip your CD to bin/cue? That's what I'm using.

I'm using cd image file mounted through daemon tools.

@MasterO2
Copy link
Contributor

MasterO2 commented May 9, 2023

It looks you're mounting the physical CDROM disk -- can you rip your CD to bin/cue? That's what I'm using.

I'm using cd image file mounted through daemon tools.

Have you tried using the imgmount command within Dosbox Staging, instead of Daemon Tools?

@Grounded0
Copy link
Collaborator

Looks like we found the problem here.

@kcgen
Copy link
Member

kcgen commented May 9, 2023

Go for direct imgmount @KainXVIII 😎

@Grounded0
Copy link
Collaborator

Grounded0 commented May 9, 2023

DAEMON Tools is excellent with Wine but i always do my DOSBox mounts through IMGMOUNT. The way the CD is accessed is different with DAEMON Tools vs MSCDEX that ruled in the DOS era and may cause compatibility problems:

https://en.wikipedia.org/wiki/MSCDEX

@FeralChild64
Copy link
Collaborator

I couldn't reproduce the problem on my Linux setup neither... tried both current GIT main and 0.80.1

@KainXVIII
Copy link
Author

Go for direct imgmount @KainXVIII 😎

Ha-ha, finally, imgmount did the job! Seems like Dosbox Staging has some troubles with daemon tools (unlike plain dosbox).

@kcgen
Copy link
Member

kcgen commented May 9, 2023

Excellent suggestion guys. Also, glad there's no regression with internal imgmount.

@kcgen kcgen closed this as completed May 9, 2023
@johnnovak
Copy link
Member

Go for direct imgmount @KainXVIII 😎

Ha-ha, finally, imgmount did the job! Seems like Dosbox Staging has some troubles with daemon tools (unlike plain dosbox).

Or Daemon Tools has some problem with emulating MSCDEX properly; they just haven't manifested in other DOSBox variants 😎

Seriously, accurate MSCDEX emulation is not the goal of Daemon Tools or other similar Windows programs. We should warn people in the manual that other image mounting tools than IMGMOUNT are discouraged and unsupported.

@MasterO2
Copy link
Contributor

MasterO2 commented May 9, 2023

I have created https://github.com/dosbox-staging/dosbox-staging/wiki/Tips-&-tricks#always-use-imgmount-for-mounting-disc-images-within-dosbox-staging.

Under https://github.com/dosbox-staging/dosbox-staging/wiki/Getting-started, I've also added a 2nd note about not using Daemon Tools in Dosbox Staging under the Install a Game header.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants