|
Post by sebazzz on Jan 23, 2014 12:14:27 GMT -8
I cannot run the program because it crashes. Argc in main is some garbage value like 2127380480. Why does this happen?
Compiler options:
/GS- /TC /analyze- /W3 /Zc:wchar_t /ZI /Gm- /Od /sdl /Fd"Debug\vc120.pdb" /fp:precise /D "_MBCS" /errorReport:prompt /WX- /Zc:forScope /RTC1 /Gd /Oy- /MD /Fa"Debug\" /nologo /Fo"Debug\" /Fp"Debug\8086tiny.pch"
Linker options: /OUT:"C:\Users\Sebastiaan\Desktop\8086tiny\8086tiny\Debug\8086tiny.exe" /MANIFEST:NO /NXCOMPAT:NO /PDB:"C:\Users\Sebastiaan\Desktop\8086tiny\8086tiny\Debug\8086tiny.pdb" /DYNAMICBASE "SDL.lib" "SDLmain.lib" "kernel32.lib" "user32.lib" "gdi32.lib" "winspool.lib" "comdlg32.lib" "advapi32.lib" "shell32.lib" "ole32.lib" "oleaut32.lib" "uuid.lib" "odbc32.lib" "odbccp32.lib" /DEBUG /MACHINE:X86 /ENTRY:"SDL_main" /INCREMENTAL /PGD:"C:\Users\Sebastiaan\Desktop\8086tiny\8086tiny\Debug\8086tiny.pgd" /SUBSYSTEM:WINDOWS /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /ManifestFile:"Debug\8086tiny.exe.intermediate.manifest" /ERRORREPORT:PROMPT /NOLOGO /TLBID:1
|
|
|
Post by Adrian Cable on Jan 23, 2014 16:12:02 GMT -8
sebazzz, Which version of SDL are you using? SDL 1.2 and VS 2013 compile OK for me. I will try your compiler/linker options shortly and see what happens.
-Adrian
|
|
|
Post by sebazzz on Jan 23, 2014 22:53:15 GMT -8
Hi,
I compiled against SDL 2.5.
I am compiling in 32-bit mode. Does the emulator need a 64-bit compiler?
|
|
|
Post by Adrian Cable on Jan 24, 2014 0:46:35 GMT -8
Hi, There are two versions of SDL: 1.2 and 2.0. We need 1.2 for the emulator. There is no 2.5 yet so can you confirm?
The emulator should work fine in 32-bit and 64-bit mode, as long as the SDL libraries you are using match.
Thanks!
-Adrian
|
|
|
Post by sebazzz on Jan 27, 2014 10:17:41 GMT -8
Hi and thank you,
I did a new try, compiled under SDL 1.2.
Some critical compiler and linker switches (for reference): - Entry point: not set (linker will infer WinMain in SDLmain.lib) - Subsystem: Console - Language level: Compile as C (/Tp) - SDL and security checks off
I got it to compile and argc was not garbage anymore. Probably the entry point was messed up.
I however ran into another issue, in 8086tiny.c line 293 the input files are read. However the disk array contains of the following values: 0, -1, -1. The program crashes on that line, because of an invalid parameter. It appears opening of the bios and fd.img file didn't work.
--
Edit: Found out the subsystem needs to be console instead of Windows. And the working directory is the project directory so the BIOS and fd.img files needs to be there.
|
|