Page 1 of 1

Dosbox exits when mouse pointer is on the edge of screen

Posted: Thu Jul 15, 2021 6:33 am
by Nikita Afanasev
I'm making my own game engine and RTS game using Allegro 4 library and Djgpp cross-compiler.
And I'm working and testing on Ubuntu 20.04. The game runs well on Ubuntu.
But when I cross-compile the game for DOS and run it on Dosbox, a serious problem occurs.
From the first screen, where the user can select the menu, mouse pointer moves according to the movement of my mouse.
But if the pointer is on any edge of the screen, game unexpectedly exits, Dosbox says general protection fault error.
I removed all source codes associated to mouse operation, except the install_mouse() function, but it's still same.
Could anybody please help me?
I can't find any reason why it exits in Dosbox so badly. It runs very well on Ubuntu.

Dosbox exits when mouse pointer is on the edge of screen

Posted: Thu Jul 15, 2021 11:38 am
by MrFlibble
Hi. I think you'd better address this question to DOSBox devs at VOGONS forums.

Oh, I see you've already done that.

Also there's a version of DOSBox with a built-in debugger, which maybe could also help troubleshoot your problem.

Dosbox exits when mouse pointer is on the edge of screen

Posted: Sun Nov 27, 2022 3:22 pm
by kronoman
Have you tried the examples that come with Allegro for MS DOS? Let's see if they work? EXMOUSE.EXE thats the one to try, works almost perfect for me (allegro 4.2, gcc 9.2, dosbos 0.74-3) - bugs,it does not detect middle mouse button or mouse wheel movement, and crashes when drawing hardware cursor, try to draw cursor yourself

Did you try downgrading your version of Allegro to an older one? Allegro 4.4 did not work properly for me, had to go to Allegro 4.2 and gcc 9.2 (DJGPP)

What version of Allegro are you using to compile? What flags do you set to the compiler? What DJGPP version are you using? There are many moving parts that can explode your emulator, it happened to me.

I also make DOS games with Allegro 4 and had to revert to older versions, the latest version of Allegro 4 doesn't seem to work very well on DOSBOX, for example the grabber doesn't work.

Try downgrading your version of DJGPP and your version of Allegro to older versions, closer to the MS DOS era. That worked for me, also removing some flags from DJGPP like optimizations and so on, and also setting the CPU target to 386 or 486 in the build.

I would give you my latest game, which compiles perfectly for MS DOS, but since I am a new user it won't let me put links to you. I have a makefile that works perfect for MS DOS with DOSBOX, DJGPP and Allegro, I will post a tutorial soon (when I can paste links here).

Dosbox exits when mouse pointer is on the edge of screen

Posted: Wed Nov 30, 2022 12:07 pm
by MrFlibble
kronoman wrote: I would give you my latest game, which compiles perfectly for MS DOS, but since I am a new user it won't let me put links to you.
Just break down the link, e.g. by removing the full stops (webpage com instead of webpage.com).

Edit: I think you've got enough posts now to allow posting URLs.