First post, by Rincewind42
I've recently started testing demoscene productions in DOSBox, and a strangely high number of them cause MCB chain corruptions which ultimately results in all sorts of misbehaviour and/or a hard DOSBox process crash.
That's with the stock settings, so UMB enabled. Now the strange thing is that if I disable UMB, then virtually all these misbehaving programs start acting normally and they don't corrupt the MCB chain.
Why I suspect this is a bit suspicious and should not be just shrugged off is that I did run a lot of these demoscene productions on my 486 DX2/66 + GUS setup back in the 90s and I don't remember this level of stability issues. My DOS setup was rock stable and I was running all the demos and tools written by demosceners that hit the hardware directly and have a lot of "dirty" code. Which makes me suspect that something is not completely right on the emulation side of things, therefore I wanted to raise awareness on this potential issue.
As I said, I can trigger these problems with UMB enabled with a rather large set of programs. But the erratic behaviour or crash is not always immediately apparent, so I've included one very particular case in a reproduction pack I've attached. Using this repro pack and my specific instructions, the crash can be triggered 100% of the time with UMB on, and the same steps result in no crash and no MCB corruption 100% of the time with UMB off. Better yet, the program that triggers the bad behaviour is a 256-byte intro with the full asm source included, which should hopefully help in narrowing down the issue even further and hopefully fixing it (if it's indeed an emulation issue as per my suspicion).
All the files in the attached ZIP are either shareware (DOS Navigator, the shareware version of PKZIP) or free to copy (the intro in question).
I've conducted my testing using Dominus' SVN build from https://www.dosbox.com/wiki/SVN_Builds, but I can reproduce the exact same behaviour in other DOSBox variants too (unsurprisingly).
Repro steps:
1. Unpack the repro pack to a directory and start DOSBox SVN from that directory.
2. DOS Navigator will be started automatically, the cursor is on puls4x1.com in the left pane. Press enter to start the 256-byte intro.
3. Let it run for a few seconds, then hold Esc to quit.
4. Press Tab to move the cursor to the right pane, then press enter on imphob6.zip to browse the contents of the ZIP file.
5. Press F3 on any file inside the ZIP archive to view its contents. This will invariably result in a hard crash with the "Exit to error: Corrupt MCB chain" message in the console.
6. Now repeat the exact same steps from 1 but with UMB disabled in the config (uncomment umb = false in dosbox.conf). The crash will never happen.
If anyone more experienced with the low-level workings of DOS memory management is willing to look into this, that would be greatly appreciated! I can share further test cases and a list of erratically behaving programs with UMB enabled on further request! (all public domain scene stuff and free to copy)
Thanks!
DOS: Soyo SY-5TF, MMX 200, 128MB, S3 Virge DX, ESS 1868F, AWE32, QWave, S2, McFly, SC-55, MU80, MP32L
Win98: Gigabyte K8VM800M, Athlon64 3200+, 512MB, Matrox G400, SB Live
WinXP: Gigabyte P31-DS3L, C2D 2.33 GHz, 2GB, GT 430, Audigy 4