VOGONS


First post, by `Moe`

User metadata
Rank Oldbie
Rank
Oldbie

Hi!

I'm seeing alot of dosbox crashes on newer (>1995) dos-extender games when using dynamic core. Did anyone else see that?
It reliably vanishes on core=full, but then speed is too low for them. The crash message is always the same unhelpful text.

At least in some games, it seems to have something to do with sound, as it (quite reliably) happens in the moment a sound should just begin to play. Siedler 2, M.A.X. or Schleichfahrt are examples of that, while Advanced Civilizations and Earthsiege don't work at all on core=dynamic.

I'm using latest CVS.

Reply 1 of 5, by Zup

User metadata
Rank Oldbie
Rank
Oldbie

Dynamic core is the fastest cpu mode and also the least compatible. Full core, on the other hand is most compatible and slower mode. A trade-off between speed and compatibility is normal core.

Maybe a "normal" core is all you need, but maybe using DOS32 instead os DOS4GW may allow you to use a "dynamic" core with your programs. Go search for DOS32 in this forum...

Reply 2 of 5, by `Moe`

User metadata
Rank Oldbie
Rank
Oldbie

dynamic core isn't the least compatible core. Dynamic core does everything the full core does, just faster. Well, and obviously with some hidden bugs, since it is experimental. Given the games I mentioned, there's not the slightest chance that normal core works. Unfortunately, the workings (and debuggability) of dynamic core is still beyond me, so I can just ask for help.

On a sidenote, dynamic core has some very strange timing behaviour sometimes. Depending on the program, I get different maximum CPU cycles. Most notorious is QPV, which is just a simple image viewer (again, protected mode), but which makes dosbox miss cycles at settings as low as 10 000, while several demanding action games run fine at 35 000. Is this a known issue, and could this behaviour perhaps lead to the crashes?

Is there a way to debug dynamic core well? I found that it's difficult, if not impossible, to find out where what exactly crashed, let alone what instructions currently execute.

Reply 3 of 5, by Zorbid

User metadata
Rank Member
Rank
Member

I know that in order to debug his dynamic recompiler, Hacktarux (from Mupen64), runs both his interpreter and his recompiler side by side, and compares the output.

I don't know if it's possible to do that in DOSBox..

Reply 4 of 5, by Qbix

User metadata
Rank DOSBox Author
Rank
DOSBox Author

for non-self modyfing code it is possible.
but it would require some recoding though.

The dynamic core isn't written with debugging in mind
the best way to debug it is to simply remove instructions from it till the game works. then check that instruction.

btw the games don't work in normal core ? hmm that is special. and easier to debug as normal and full can make log files.
so they are comparable.

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

Reply 5 of 5, by `Moe`

User metadata
Rank Oldbie
Rank
Oldbie

No, normal won't help for them, some of them are late protected-mode games with virtual memory and all that stuff.

Logging instuctions in full mode is a bit impractical, as you get 5 GB of cpu log faster than you can spell out that number. The crashes I encounter (dosbox segfaults) are not deterministic. They do appear, but sometimes I am lucky to have 10 minutes of gameplay, other times it crashes after 60 seconds.

I have really no idea how to track down the problem. gdb shows an unhelpful "SIGSEGV in ??" with no useful backtrace, and where the DOS program's IP currently is I don't know either.