VOGONS


First post, by Yesterplay80

User metadata
Rank Oldbie
Rank
Oldbie

SDL provides a lot of features (like ALSA, OSS, a PS2 graphic driver, etc.), but surely not all of them are actually needed for the use with DosBox. Where can I find information about the SDL subsystems DosBox does make use of?

My full-featured DOSBox SVN builds (without debugger) for Windows: Vanilla DOSBox and DOSBox ECE (Enhanced Community Edition)

Reply 1 of 9, by BloodyCactus

User metadata
Rank Oldbie
Rank
Oldbie

sdl options are set when configured + built (ie: if you dont have png libs, it wont compile png support into sdl image), and in often runtime loaded for certain things. dosbox when run with ./configure will show you what its using (sdl, sdl image, sdl net, sdl ttf, sdl mixer) when it looks for them.

look in the autoconf files, grep the source files for SDL etc..

--/\-[ Stu : Bloody Cactus :: http://kråketær.com :: http://mega-tokyo.com ]-/\--

Reply 2 of 9, by Dominus

User metadata
Rank DOSBox Moderator
Rank
DOSBox Moderator

BloddyCactus this is not what yesterplay was asking. You listed other libraries that are dependant on SDL. Dosbox only uses SDL_net (for network support) and SDL_sound (for mp3/ogg support in bin/cue images) of those. Png is used directly via Libpng.
Yesterplay: the whole backend of Dosbox, communication with the host OS and hardware is being done via SDL. Display, fullscreen, windowed window, keyboard, CD-Rom, Joystick etc... is all being passed through SDL. Which one could do without SDL but that is reinventing the wheel and of course prone to many bugs since everything you do on your own isn't as much tested as SDL. AND if you want easy portability (Windows, linux, os x...) that problem multiplies.
Go through the source and look for instances wher SDL_something is used to tell where it is used exactly...

Windows 3.1x guide for DOSBox
60 seconds guide to DOSBox

Reply 3 of 9, by BloodyCactus

User metadata
Rank Oldbie
Rank
Oldbie
Dominus wrote:

BloddyCactus this is not what yesterplay was asking. You listed other libraries that are dependant on SDL.

The OP specifically spoke about SDL with ALSA, OSS etc, those are backend libraries SDL compiles against. That SDL gets built against many back end libraries, does not mean they get used. OP seems confused by backend libraries and front end apps interfacing with SDL.

--/\-[ Stu : Bloody Cactus :: http://kråketær.com :: http://mega-tokyo.com ]-/\--

Reply 4 of 9, by Dominus

User metadata
Rank DOSBox Moderator
Rank
DOSBox Moderator

yeah, same as you seem confused about things you can configure SDL for 😉 (png for example has nothing to do with SDL 😉)

Windows 3.1x guide for DOSBox
60 seconds guide to DOSBox

Reply 5 of 9, by Yesterplay80

User metadata
Rank Oldbie
Rank
Oldbie

Maybe I should clarify what my intention is: Since the sdl.dll that comes with the precompiled development libraries of SDL doesn't support DirectDraw, I wanted to compile a new, DirectDraw capable sdl.dll for my DosBox builds. So I downloaded the SDL source code for SDL 1.2.15, changed the parts of the video code that ripsaw8080 told me and tried to compile the DLL. In Visual Studio 2015 the DLL came out with about 500 KByte in size but is depending on 2 runtime DLLs from Visual C. And it doesn't work in older Windows any more. So I tried to compile it under MinGW, as well as I do with DosBox. The DLL came out with 1,3 MByte and is still looking for a libgcc_s_dw2-1.dll.

Now I stumbled over all the features that SDL supports, that one can list with

./configure --help

Things like ALSA, PulseAudio, etc. And I thought, that maybe I could reduce the size of the DLL by disabling features that DosBox doesn't even need and/or support. And maybe that would get rid of the remaining dependancy with the libgcc_s_dw2-1.dll (LDFLAGS="-static-libgcc -static libc++" didn't work).

My full-featured DOSBox SVN builds (without debugger) for Windows: Vanilla DOSBox and DOSBox ECE (Enhanced Community Edition)

Reply 6 of 9, by BloodyCactus

User metadata
Rank Oldbie
Rank
Oldbie
Dominus wrote:

yeah, same as you seem confused about things you can configure SDL for 😉 (png for example has nothing to do with SDL 😉)

it has nothing to do with sdl and everything to do with sdl_image tho.

presuming that you want png support in sdl_image...

as I said, if you dont have png libs, and you build sdl_image... sdl_image wont have png support.. or if you want jpg support in sdl_image you need libjpeg.. want tiff support? you need libtiff, libjpeg and libz.. (or dll's if your a windows user).

this is in the sdl_image docs.

maybe were crosstalking something different..

--/\-[ Stu : Bloody Cactus :: http://kråketær.com :: http://mega-tokyo.com ]-/\--

Reply 7 of 9, by Dominus

User metadata
Rank DOSBox Moderator
Rank
DOSBox Moderator

Bloody Cactus, it's just that you brought up SDL_image that has no relation to Dosbox...

Yesterplay, when you compile SDL everything that does not apply to Windows (Alsa, pulseaudio, x11...) is disabled. No need to tinker with it.
The size of the mingw compiled sdl.dll can be further reduced by using strip. As for the dll dependency, you might need to google how to make a static compile for that dll. The sdl.dll that comes with Dosbox was cross-compiled on linux AFAIK, btw - maybe that got rid of that dependency.

I'd also recommend using the current code of the SDL-1.2 branch of SDL's mercurial. It might have additional fixes for Windows since the SDL 1.2.15 release. Not 100% sure if there are any since I left the Windows world mostly behind some years ago, so I don't look out for that.

Windows 3.1x guide for DOSBox
60 seconds guide to DOSBox

Reply 8 of 9, by bloodbat

User metadata
Rank Oldbie
Rank
Oldbie
Yesterplay80 wrote:

Maybe I should clarify what my intention is: Since the sdl.dll that comes with the precompiled development libraries of SDL doesn't support DirectDraw, I wanted to compile a new, DirectDraw capable sdl.dll for my DosBox builds. So I downloaded the SDL source code for SDL 1.2.15, changed the parts of the video code that ripsaw8080 told me and tried to compile the DLL. In Visual Studio 2015 the DLL came out with about 500 KByte in size but is depending on 2 runtime DLLs from Visual C. And it doesn't work in older Windows any more.

Platform Toolset: Visual Studio 2015 - Windows XP, though it won't work with Windows older than that (which is pretty, pretty old).
Runtime Library: Multi-threaded (/MT) negates the dependency on Visual Studio runtimes at the expense of file size.

Reply 9 of 9, by Yesterplay80

User metadata
Rank Oldbie
Rank
Oldbie

Thanks, bloodbat, I managed to compile SDL and so far it looks quite promising. I tested it with a physical Windows 7 machine and a virtual XP machine, though in which DDRAW didn't strecth when using fullscreen, the pictuer remained small in the centre of the screen. If anyone (especially with a real XP machine) would like to try out the new SDL.DLL, please feel free to do so: https://drive.google.com/open?id=0BxEUSpZ8xHk … T0Q2RFZOenBBR3c

I'd be glad if you could give me some feedback if you try out the DLL!

My full-featured DOSBox SVN builds (without debugger) for Windows: Vanilla DOSBox and DOSBox ECE (Enhanced Community Edition)