VOGONS


First post, by superfury

User metadata
Rank l33t++
Rank
l33t++

When I try to compile the current version of UniPCemu(which compiles and runs without problems on Visual Studio Community 2015 with SDL2 2.0.5), it compiles and runs without problems. But when I try to compile and run it with MinGW(32-bit) on Windows 10, for some reason the application crashes completely. I notice it's trying to log an error message, but it fails for some unknown reason(MinGW doesn't have a good debugger to use in these release builds). Is there any way to find out what's going wrong? The emulation initialization seems to go without problems (it runs the entire initialization procedure without problems and tries to start the main emulation loop). But somewhere, something then goes completely wrong for some reason. I cannot find the exact source(except that the raiseError procedure seems to crash when trying to log to logs/error.log, creating an empty file but not writing anything to it).

Author of the UniPCemu emulator.
UniPCemu Git repository
UniPCemu for Android, Windows, PSP, Vita and Switch on itch.io

Reply 1 of 2, by vladstamate

User metadata
Rank Oldbie
Rank
Oldbie

You can actually debug using Visual Studio. Just launch the exe via Visual Studio and it should be able to show stack at the point of crash and everything else.

YouTube channel: https://www.youtube.com/channel/UC7HbC_nq8t1S9l7qGYL0mTA
Collection: http://www.digiloguemuseum.com/index.html
Emulator: https://sites.google.com/site/capex86/
Raytracer: https://sites.google.com/site/opaqueraytracer/

Reply 2 of 2, by superfury

User metadata
Rank l33t++
Rank
l33t++

Executing gdb and printing a backtrace:

Starting program: Z:\MinGW\msys\1.0\home\Tim\projects_build\UniPCemu/dbgUniPCemu.exe
[New Thread 19480.0x4230]
[New Thread 19480.0x1638]
[New Thread 19480.0x1f48]
[New Thread 19480.0x3884]
[New Thread 19480.0x4700]
gdb: unknown target exception 0x406d1388 at 0x776fa832

Program received signal ?, Unknown signal.
[Switching to Thread 19480.0x4700]
0x776fa832 in RaiseException () from C:\WINDOWS\SysWoW64\KernelBase.dll
(gdb) backtrace
#0 0x776fa832 in RaiseException () from C:\WINDOWS\SysWoW64\KernelBase.dll
#1 0x6c81b14c in SDL_LogCritical () from Z:\MinGW\msys\1.0\home\Tim\projects_build\UniPCemu\SDL2.dll
#2 0x406d1388 in ?? ()
#3 0x00000000 in ?? ()
(gdb)

So there's a problem in the SDL2 dll?

Edit: It seems it does something wrong trying to build Dosbox's VGA ROM Video Parameter Table. When it actually builds it, it seems to go past the 32KB range of the VGA ROM?(C0000-C7FFFF range)? Is that supposed to happen? Increasing the ROM to 64K won't work.

Edit: I've managed to fix the ROM creation by increasing the ROM to the full 64K required. Now it creates properly without crashing. But for some reason, the BIOS doesn't seem to call my initialize script anymore(the hook required for the video interrupt to be hooked into the emulator)? The callback won't be called(is there a problem with the checksum?) It seems to hang reading port 0x3DA(probably waiting for vretrace)?

Edit: This problem has now been fixed. There also were some problems with the BIOS ROM containing the 0x40 byte(saying 64 512-byte blocks instead of 128) and the ROMs being incorrectly decoded(cases with 64K+ Option ROMs weren't supported up until now. This is now properly implemented).

Author of the UniPCemu emulator.
UniPCemu Git repository
UniPCemu for Android, Windows, PSP, Vita and Switch on itch.io