Reply 21 of 26, by Nikita Afanasev
Thanks for your kind attention. I attached the executable file. You can directly run it by clicking bat file.
https://drive.google.com/file/d/1nFKXvoVsyIiS … iew?usp=sharing
Reply 22 of 26, by ripsaw8080
Nikita Afanasev wrote on 2021-07-15, 11:16:
But if the pointer is on any edge of the screen, game unexpectedly exits, Dosbox says general protection fault error.
I want to clarify that it is the 32-bit DPMI host included with your program, CWSDPMI, that is exiting and reporting an error. DOSBox continues to work normally after your program exits back to DOS.
That said, I see that you use a mouse user routine with INT 33h/AX=000Ch. However, there are calls to INT 33h/AX=000Bh when the pointer reaches the edge of the screen. Perhaps those calls to function 0Bh are diagnostic code you put in, but if not then I suggest examining what you do with that function because it may very well relate to the problem.
Reply 23 of 26, by Nikita Afanasev
Thank you for your reply.
At the moment, mouse operation is supported by calling allegro library function install_mouse() simply and other supplementary codes in the game.
When I just remove that function only, dosbox never quits.
So is it correct to say that there is a problem in allegro library?
Or do I need to replace DPMI.exe?
Reply 24 of 26, by ripsaw8080
Reply 25 of 26, by Ringding
You should try to get a symbolic stack trace (with DJGPP gdb perhaps?)
I also tried to run it in qemu with the Microsoft mouse driver, where this crash does not happen, which certainly is a bit odd.
Reply 26 of 26, by ripsaw8080
Going by the EIP in the error message, the problem appears to involve pushing and popping SS without doing anything with ESP, which raises red flags in my mind. The subroutine in question is in DEADSEAS.EXE at offset 1765C0, and seems be used for the DPMI function call for real mode interrupts. The real mode interrupt being called is INT 33h/AX=000Bh to read mouse mickeys, which as I mentioned before seems to only happen when the pointer is at the edge of the screen. I'm not sure if the subroutine is part of the Allegro library or not, but I tried NOPing the instructions related to modifying SS and the GPF does not occur.