Maes
I like big butts!

Posts: 8664
Registered: 07-06 |
printz said:
Are you trying to emulate those bugs, or to fix them? I prefer the latter.
I only "emulate" them deliberately to the degree that they don't result in catastrophic crashes (e.g. I can't emulate "tutti frutti" because in Java it will result in an immediate overflow exception, so I have to eliminate it completely like e.g. ZDoom does).
Also, even if not widely publicized. Mocha Doom is 100% limit removing with regards to the following:
- Drawsegs
- Visplanes
- Spechits
- BSG segs trasversal (triggered e.g. in TNT MAP30 when raising the stairs in the cyberdemon fight) -> Asymptomatic in vanilla?
- Vissprites (only partially, but will be fully implemented soon).
Most of the time "emulating" just means leaving the code as it is: most bugs are not simply the result of C's artifacts, but plain old wrong code, which I don't always fix (e.g. I left ouchface bug in).
The only overflow feature I deliberately emulated is the finetangent overflow (which however only affects the renderer), by allowing accesses beyond the 4095 mark and copying some of the values of finesine after that. From a programming point of view, it's easy to do and makes the code automatically overflow-proof, so why not?
Other stuff I tested and which I found to work exactly like in vanilla:
- Voodoo dolls
- Ghost monster bug
- Telefrag deaths
- Dead player linedef activation
- Infinitely raising ceilings (well, just did that).
For the latter however, it worked because the status that led to it happening was already saved in the savegame. It's unclear if it could be generated during normal gameplay (if actual overflow breaking is involved, by overwriting part of the memory contents, then probably not, and you'd get an overflow exception somewhere along the way). As I said, Mochadoom is not like that infamous MS-DOS emulator written in Java that also runs Doom, and emulating the memory model exactly is not its goal: it's simply a reasonably "close" or "faithful" port, to the extent possible with "clean" code.
Of course, it's possible to include code to deliberately induce bug-compatible behavior. An immense advantage of Mocha Doom over anything written in C/C++ is that debugging is MUCH simpler, and even vexing bugs can be pinpointed in great detail, even stuff that is normally asymptomatic in vanilla or other C/C++ based ports (e.g. none was aware of the finetangent overflow in the vanilla renderer, and I never heard of solidsegs overflows in the BSP, either).
Last edited by Maes on 05-28-11 at 13:14
|