VOGONS

Common searches


First post, by Kerr Avon

User metadata
Rank Oldbie
Rank
Oldbie

Sorry if this is in the wrong forum, but I'm trying to get a DOS program to run under DOSBox, and whilst it runs, it has two slight problems. The program is X128, a ZX Spectrum emulator, and whilst it runs fine in Windows 98 (it's a DOS program), it will not run under XP.

My system is a 2GHz laptop, 512MB RAM and Windows XP. Using DOSBox, I can run X128 almost perfectly, but with two slight problems; the first is that ths sound is delayed slightly - it playes OK, but seems to start a half-second or so later than it should, so say in game, when I press FIRE and the space ship fires, there's a half second pause before the sound commences. The game runs fine, with no pauses or jerkiness, just that the sound is constantly half a second or so behind everything else.

Secondly, I don't use X128 on it's own, I use SGD (Spectrum Games Database) as a front-end. This is a DOS menu program, that allows you to select a Spectrum game file, and then call up an emulator to play that file. So that you load up SGD, select a game from the menu, and SGD exits and loads up X128 plus the Spectrum game. When you exit X128, SGD reloads automatically (I don't think SGD exist when you load X128, it just pages itself out, or something). Anyway, it doesn't quite work like this at the moment under DOSBox. When I load SGD (under DOSBox, of course) then I can select a game, and X128 loads with the game, and I can play it, but when I exit X128, instead of SGD reloading so that I can select another game, as it should, DOSBox just exits, presumable as it somehow thinks that since X128 has exited, then DOSBox's job is finished.

Can anyone suggest any solutions for these problems? Thanks for any answers.

Reply 1 of 13, by Qbix

User metadata
Rank DOSBox Author
Rank
DOSBox Author

as experiment:
before starting that SGD run command.com
See what happends.

The sounds. Well 1/2 a second isn't "caused" by dosbox. dosbox it's buffers are much smaller. You might want to look into the emulator you are running to see if they have anything for it.

Water flows down the stream
How to ask questions the smart way!

Reply 2 of 13, by Kerr Avon

User metadata
Rank Oldbie
Rank
Oldbie

Thanks for replying.

Qbix wrote:

as experiment:
before starting that SGD run command.com
See what happends.

I did, but it din't make any difference, DOSBox still exits when X128 does. I even tried COMMAND.COM twice, once inside another, but it gave the same result. I think I can see what you were trying for - that DOSBox wouldn't terminate until the COMMAND.COM that I called up was terminated via an "EXIT" command, but it doesn't do that.

The sounds. Well 1/2 a second isn't "caused" by dosbox. dosbox it's buffers are much smaller. You might want to look into the emulator you are running to see if they have anything for it.

Well, maybe it's half a second or less. The emulator worked fine on my Win98 P3-700 laptop, and also on my Win95 P-75 laptop years ago, and in fact I just copied the "Spectrum" directory (which contains the other directories such as X128, SGD and game files over from my old laptop (the Win98 P3-700) to this one (XP P4-2GHz), and the sound delay only occurs on this machine (under DOSBox, I can't run X128 in XP, X128 just exits again, and of course I never used DOSBox to run X128 on my other laptop as Win95/98 allowed DOS programs to run natively.

Anyway, the sound delay might only be a half of a second or less, it's enough to be noticable, but not enough to ruin the games. If it can't be solved then fair enough, but are there any options I can try to eliminate the delay? I'm using MAX cycles and the dynamic core settings, if that's important.

By the way, I see you're the author of DOSBox - thanks very much for such a superb piece of software, it really is amazing. Thanks to emulators like DOSBox, X128, ZSNES, STEEM etc we can play our old games whenever we like, instead of losing them altogether whenever a new OS or new incompatible hardware is forced on us. And DOSBox especially seems comprehensive and ambitious.

I first discovered DOSBox, incidentally, when a fellow poster on the World of Spectrum (worldofspectrum.org) forum recommended it for running The Sentinel at proper speed on a modern PC, and it does so brilliantly - I was using Win98 then, so it wouldn't have occured to me to run a DOS emulator, as Win98 runs DOS programs very well, but The Sentinel is old enough not to adjust it's speed well on a relatively fast (P3-700) CPU, so it ran too fast natively. Under DOSBox it was great though.

Reply 3 of 13, by DosFreak

User metadata
Rank l33t++
Rank
l33t++

If you open up the dosbox.conf and modify the buffers value for whichever sound card your DOS program is using then you might probably fix your problem.

Look under [mixer] and modify blocksize and prebuffer

How To Ask Questions The Smart Way
Make your games work offline

Reply 4 of 13, by Kerr Avon

User metadata
Rank Oldbie
Rank
Oldbie
DosFreak wrote:

If you open up the dosbox.conf and modify the buffers value for whichever sound card your DOS program is using then you might probably fix your problem.

Look under [mixer] and modify blocksize and prebuffer

Thanks, I've halved the two values I found in D.O.G. (the Windows front-end I'm using for DOSBox) and it seems to have fixed the sound problem. Actually, I think the problem might be there but reduced, but I can of course try reducing the buffer even further. Plus, considering that if the problem still exists, then it's at the limits of perception, so it's as good as cured anyway! Thanks for that suggestion.

The other problem still exists though, and I've experimented with it further. Turns out that if I just call X128 from DOSBox, then DOSBox does NOT exit when X128 is exited. Likewise, if I just call SGD (so that SGD is run by DOSBox, then when I select a game in SGD, SGD calls up a batch file, and the batch file instead of calling X128 does nothing (the X128 command is REM'd out in the batch file), and SGD is re-entered OK. So DOSBox only exits prematurely if DOSBox runs SGD then SGD calles X128 then X128 is quitted. Either X128 or SGD on their own don't cause DOSBox to exit. Does this imply that SGD + X128 together create the problem? They work fine under real DOS and Win95/98 (full screen) DOS boxes (the DOS Windows, not DOSBox). In fact, SGD (hosted at worldofspectrum.org, as is X128) is designed to work with X128 (and several other DOS based Spectrum emulators) and has never given me any problems before.

Any ideas?

Reply 5 of 13, by Kerr Avon

User metadata
Rank Oldbie
Rank
Oldbie

I've just discovered that DOSBox has been giving me an error message when it exits ( 😊 ), I didn't notice it because it's in a DOS Window behind the other DOS Window that comes up, and both close very quickly. Anyway, after [ALT GR] + [PRNT SCRN]-ing it, I find that the error message is:

CONFIG:Loading primary settings from config file E:\Emulator\Spectrum\DOSBXSGD\S
GD.conf
MIDI:Opened device:win32
Exit to error: INT:Gate Selector points to illegal descriptor with type 0

Does this shed any light on the cause of the problem?

Reply 9 of 13, by MiniMax

User metadata
Rank Moderator
Rank
Moderator
Kerr Avon wrote:

I've just discovered that DOSBox has been giving me an error message when it exits ( 😊 ), I didn't notice it because it's in a DOS Window behind the other DOS Window that comes up, and both close very quickly.

My guess is that close because you have asked (via D.O.G) to exit DOSBox automatically.

Front-ends are fine beasts, but when you have problems, I prefer the good old command line.

DOSBox 60 seconds guide | How to ask questions
_________________
Lenovo M58p | Core 2 Quad Q8400 @ 2.66 GHz | Radeon R7 240 | LG HL-DT-ST DVDRAM GH40N | Fedora 32

Reply 10 of 13, by Kerr Avon

User metadata
Rank Oldbie
Rank
Oldbie

>Program, just type it before running your program.

OK, I'll try it now, thanks.

>My guess is that close because you have asked (via D.O.G) to exit DOSBox automatically.

No, I checked that originally, it's not that. Thanks for the suggestion, though.

Reply 11 of 13, by Kerr Avon

User metadata
Rank Oldbie
Rank
Oldbie

I tried using loadfix before SGD, with no success, so I told SGD to call a batch file instead of X128.EXE, and the batch file called loadfix then X128, but still with no success. Are there any command line arguments for loadfix, that I can try? And does loadfix have to be on the same line, or the line above, the program to be loaded, i.e.:

loadfix
x128.exe

or

loadfix x128.exe

in the batch file? I tried both ways, but it didn't seem to make a difference.

I disabled XMS, but then SGD wouldn't run, so instead I disabled EMS, but DOSBox still has the same problem (ending after X128 is exited), and disabling UMB makes no noticable difference either.

Does DOSBox create a log file, that I can post up here?

Reply 12 of 13, by Qbix

User metadata
Rank DOSBox Author
Rank
DOSBox Author

for logging
check the development forum for the debugger version of dosbox.
for the syntax of loadfix check the readme of dosbox

Water flows down the stream
How to ask questions the smart way!