DOSBox and input?

DOS specific questions.
Post Reply
mcbiff
Posts: 45
Joined: Jun 20, 2007 21:35

DOSBox and input?

Post by mcbiff »

Does anyone else have this problem?

Code: Select all

dim as string blah
input blah
sleep
Compiling that with 0.18.5b and running it, DOSBox crashes with either an error about a pagefault or "stack segment zero" (the exact message varies from version to version). It crashes for me when you enter a 2nd character.
DrV
Site Admin
Posts: 2116
Joined: May 27, 2005 18:39
Location: Midwestern USA
Contact:

Post by DrV »

It crashes here for me with a SIGSEGV as soon as I hit a key at the input prompt with DOSBox 0.72; it seems to be crashing inside __dpmi_int in __dpmi_yield, but I don't see any reason why it should. Could be a DOSBox bug, as I can't reproduce it elsewhere. For some reason a selector value (the error= part in a General Protection Fault) is actually the ASCII value of the character I just entered masked off in some way...
rugxulo
Posts: 219
Joined: Jun 30, 2006 5:31
Location: Usono (aka, USA)
Contact:

Post by rugxulo »

Report it as a bug (e.g. on Freenode.net in #dosbox), but if no game uses it, they may not fix it (why??). Then again, aren't there plenty of example FreeBASIC games which could be compiled for DOS with a little effort? ;-)
rCX
Posts: 26
Joined: Jun 29, 2008 19:14
Location: New York or Maryland

Solution

Post by rCX »

I know this is old but I found a solution. The program works when HDPMI32.exe is used instead of CWSDMPI.exe. Maybe someone should post this on the wiki for those emulating DOS.
Moguera
Posts: 11
Joined: Nov 13, 2010 18:48

Re: DOSBox and input?

Post by Moguera »

Rather surprising, considering how critical the issue, that this page is the only mention of this issue I could find on the entire Internet. Kudos to rCX for the solution, I would have been dead in the water without it. But it would have been nice had he also described HOW to implement it.

After some experimentation, I concluded that all that is necessary is to load HDPMI32.EXE into memory using "HDPMI32.EXE -r" by manually typing in, or in a batch file, or in the DOSBox .conf file [autoexec} section for Input to work instead of causing the program to freeze. "HDPMI32.EXE -u" unloads it. Both of course without the double quotes. It consumes just 13 Kb of conventional memory.
angros47
Posts: 2326
Joined: Jun 21, 2005 19:04

Re: DOSBox and input?

Post by angros47 »

This is very interesting. By changing the extender, does this example work, too?

viewtopic.php?t=28482

Edit: tried,it doesn't work

And does multithreading examples work?
Because I know signals aren't processed correctly under the emulator
Post Reply