Build DOSBox just with Heavy Debug feature with Visual Studio 2019.
<Prerequisite>
- SDL 1.2 and PDCurses are needed.
1. Download binary of SDL 1.2 built with VS2019 from
drive.google.com/file/d/10RDtCzyoiSji2upii-L7QBOskA7cf-kU/view?usp=sharing and extract it -> path ex)SDL-1.2-VS2019
if something is wrong, you can build it yourself (see Appendix).
2. Download built binary of PDCurses 3.4 from sourceforge.net/projects/pdcurses/files/pdcurses/3.4/pdc34dllw.zip/download and extract it -> path ex) pdc34dllw
<Building DOSBox>
1. Download DOSBox source.
sourceforge.net/p/dosbox/code-0/HEAD/tree/dosbox/trunk/
-> Download Snapshot and extract zip somewhere (ex. dosbox_dir)
(I downloaded dosbox-code-0-r4444-dosbox-trunk.zip)
2. dosbox_dir/visualc_net
-> Double click dosbox.sln (VS2019 installed)
-> Upgrade.. OK
3. Solution Explorer
-> Source Files -> visualc -> double click config.h
#define C_DEBUG -> set to 1
#define C_SSHOT -> set to 0
#define C_SRECORD -> set to 0
#define C_MODEM 1 -> set to 0
#define C_IPX -> set to 0
#define C_HEAVY_DEBUG -> set to 1
-> save changed source with 'Ctrl + S'
4. Solution Explorer
1)
-> Right click project name "dosbox" and left click -> Properties
-> Configuration Properties -> C/C++ -> General -> Additional Include Directories -> Dropdown arrow -> <Edit..>
-> Add "<C:\... your actual path>/SDL-1.2-VS2019/include" prepared from Prerequisite in the last blank line -> OK
-> Add "<C:\... your actual path>/pdc34dllw" prepared from Prerequisite in the last blank line -> OK
2)
-> Configuration Properties -> Linker -> General -> Additional Library Directories -> Dropdown arrow -> <Edit..>
-> Add "<D:\... your actual path>/SDL-1.2-VS2019" prepared from Prerequisite in the last blank line -> OK
-> Add "<D:\... your actual path>/pdc34dllw" prepared from Prerequisite in the last blank line -> OK
3)
-> Configuration Properties -> Linker -> Input -> Additional Dependencies -> Dropdown arrow -> <Edit..>
a) remove sdl_net.lib, zlib.lib, libpng.lib -> OK
b) rename curses.lib to pdcurses.lib
4) Click 'Apply' and OK
5. Build -> Solution Build -> Success
6.
1) Copy 'dosbox_dir/visualc_net/Debug or Release/dosbox.exe' to a new directory (ex. 'Result_DOSBox')
2) Copy 'SDL-1.2-VS2019/SDL.dll' to 'Result_DOSBox'
3) Copy 'pdc34dllw/pdcurses.dll' to 'Result_DOSBox'
4) Run 'dosbox.exe' in Result_DOSBox
<Appendix. Building SDL 1.2 (higher version such as 2.0 don't work)>
1) Download extract(ex. directory SDL-1.2.15)
https://www.libsdl.org/release/SDL-1.2.15.zip
2)
SDL-1.2.15/VisualC
Double click SDL.sln -> Upgrade.. OK
Change Debug -> Release (Win32)
Solution Build -> Fail (c2118: negative subscript in winnt.h)
github.com/urho3d/Urho3D/issues/2545
Solution Explorer -> Right click 'SDL' -> Properties -> 'Windows SDK Version' -> Change to 10.0.16299.0 -> Apply
Build -> Clean Solution -> Solution Build -> Success
3) Copy built files to one directory (ex. SDL-1.2-VS2019)
- SDL-1.2.15/VisualC/Release/SDL.lib to SDL-1.2-VS2019
- SDL-1.2.15/VisualC/SDL/Release/SDL.dll to SDL-1.2-VS2019
- SDL-1.2.15/VisualC/SDLMain/Release/SDLmain.lib to SDL-1.2-VS2019
4) Copy SDL-1.2.15/include directory to SDL-1.2-VS2019