VOGONS


First post, by qv90

User metadata
Rank Newbie
Rank
Newbie

Hi,

I downloaed Dosbox-installer available at http://prdownloads.sourceforge.net/dosbox/DOS … er.exe?download . Starting the task manager it showed that dosbox consumes round about 1% cpu usage (using default dosbox.conf).

Then I created my own Dosbox file following the instructions available at http://dosbox.sourceforge.net/wiki/index.php? … =BuildingDOSBox
for Win32 environment (without SDL_net.dll). Starting the task manager it showed that dosbox consumes round about 88% cpu usage (using default dosbox.conf).

I would assume, both executables consumes the same ammount of cpu.

What went wrong? Any hints available?

Last edited by qv90 on 2007-06-26, 12:13. Edited 1 time in total.

Reply 2 of 16, by Qbix

User metadata
Rank DOSBox Author
Rank
DOSBox Author

if you used the 0.65 source then the keyreading routine is the same as in that bineary.

Which compiler did you use (version ?)

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

Reply 4 of 16, by Qbix

User metadata
Rank DOSBox Author
Rank
DOSBox Author

did you try the sdl.dll that comes with the official installer with your own bineary
(the distributed sdl.dll isn't the stock sdl.dll)

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

Reply 5 of 16, by qv90

User metadata
Rank Newbie
Rank
Newbie

I could not use the SDL.dll provided with installer.

DosBox needs SDL.h. So I downloaded SDL-1.2.11. After compiling Dosbox (with correct include path) and starting it, I got a error "entry point SDL_strlcpy could not be located in SDL.dll". That's the reason why I had to build a fresh copy of SDL.dll and could not use the provided dll

Reply 6 of 16, by qv90

User metadata
Rank Newbie
Rank
Newbie

I found a solution for my purposes. Using Visual C++ and compiling SDL.dll and DosBox in "Release" modus slowed down CPU usage dramatically (and beside reduces DosBox.exe from round about 12MB to 1,2 MB).

Thx for your suggestions

Reply 7 of 16, by CarlKenner

User metadata
Rank Newbie
Rank
Newbie

I compiled the source, and it has the following problems:

1. It won't work with the SDL.DLL that comes with DOSBox, because that doesn't include a function that the source code uses.

2. When used with my own compiled SDL.DLL file, or with one from the website, it won't work in DirectDraw mode.

3. It is extremely slow.

4. It doesn't have an icon.

Clearly this is NOT the same source code used to create the real DOSBox.
I NEED to make one that works in ddraw mode, since the other modes are 50x slower.

When I say it is slow, I mean I am trying to play Adventure In Serenia, which is a very very very old sierra adventure with static CGA pictures and text, and it is running too slow.

The change I am making adds a key to change the CGA palette, since some games look terrible in their default palette, and would look better in red, green, and brown or whatever other CGA palette you want.

Reply 8 of 16, by wd

User metadata
Rank DOSBox Author
Rank
DOSBox Author

> Clearly this is NOT the same source code used to create the real DOSBox.

It is.
But it sounds like something is pretty wrong with your compiler flags,
what compiler are you using btw.? And which SDL sources? Try the 1.2.8 ones

Reply 9 of 16, by Dominus

User metadata
Rank DOSBox Moderator
Rank
DOSBox Moderator

1. Thats certainly truy if the sdl stuff your compiler uses is newer than the sdl.dll in Dosbox directory. So if you use SDL 1.2.11 sources for compiling Dosbox and you use the sdl.dll that comes with the last release of Dosbox you run into incompatibilities.

2.For DirectDraw you have to make a special compile of SDL, I quote someone else from this board:

The old hack was (I think) to allow hardware surfaces in windowed mode. To do that, open SDL_dx5video.c, search for #if 0 and change it to #if 1. I'm not sure whether it's still needed but it probably is.

It turns out that they've also now changed it so that windib always takes precedence over ddraw (in fullscreen and windowed alike), so as Harekiet mentioned you also have to open sdl_video.c and swap the section on windib with the section on ENABLE_WINDIB with the section on ENABLE_DIRECTX so that the directx part comes first.

(for SDL 1.2.11 it's ENABLE_DIRECT_DRAW I think)

3. make sure you haven't enabled debug and/or your compiler optimizes for x86. Is it slower than the last release of Dosbox with the same settings?

4. My msys/mingw compile of Dosbox has the icon

Windows 3.1x guide for DOSBox
60 seconds guide to DOSBox
DOSBox SVN snapshot for macOS (10.4-11.x ppc/intel 32/64bit) notarized for gatekeeper

Reply 10 of 16, by CarlKenner

User metadata
Rank Newbie
Rank
Newbie

Well, I've got it compiling in Release mode now (which was tricky in and of itself). Haven't got around to changing the SDL source code yet.

Might I suggest that if DOSBox requires a specially modified DOSBox version of the SDL source code, then you actually include that code with the DOSBox source? Also a working project file for Visual Studio Express 2005 (the free C compiler which Windows users will have) would be nice. We are people who grew up with DOS, not unix.

Reply 11 of 16, by Qbix

User metadata
Rank DOSBox Author
Rank
DOSBox Author

it doesn't need a special sdl source. except if you want hardware surfaces.
it runs fine without.

there is a visual studio.net project file. Should be enough I suppose.
I think unix is at the moment closer to dos then winxp is btw..

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

Reply 12 of 16, by CarlKenner

User metadata
Rank Newbie
Rank
Newbie

When would you ever not want hardware surfaces? Everything else is way too slow. Hardware surfaces should be the default, with it dropping down to some other setting if they are not available.

Reply 13 of 16, by Qbix

User metadata
Rank DOSBox Author
Rank
DOSBox Author

complaign to the sdl people about it ?
We modify SDL because we agree with you on it.

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

Reply 14 of 16, by wd

User metadata
Rank DOSBox Author
Rank
DOSBox Author

> Well, I've got it compiling in Release mode now (which was tricky in and of itself).

??? It's much like one klick if you got the required additional libraries,
and three klicks+line editing if you don't have them.

Reply 15 of 16, by CarlKenner

User metadata
Rank Newbie
Rank
Newbie

If you follow the instructions at the start of this thread, you need to copy some of the settings from the debug properties over to the release properties which are mostly blank. Particularly under the linking section. But don't copy the msvcrt one which is different, or it won't work. I might make some more complete instructions later if anyone else is having troubles.