Jump to content

About the savegame buffer


rpeter

Recommended Posts

Quasar said:
So for these types of bugs there are three possibilities:

It really just depends on what type of port or engine you're working on. In engines like PrBoom and Chocolate Doom, that strive for compatibility as a main feature, 1 seems more or less the way to go, while option 3 may apply for engines that seek compatibility in most cases but don't bother with the finer points (perhaps Eternity is a case in point). As for things being impossible, we just need to quote Sedlo the speed runner.

Share this post


Link to post

Note I didn't say impossible, just nearly impossible. With enough effort I'm sure it's doable. But the payoff is going to be very small for that effort. I am certain that Chocolate Doom needs to make at least some allocations in the process of setting up the SDL library, and perhaps yet others required to make use of it at runtime. The only way to fix those will be to stop putting such allocations onto the zone heap. You'll have to fall back onto the C heap. Using two heaps in the same program is certainly far from ideal, but I suppose it can be tolerated in the name of absolute compatibility.

EDIT: Well, I did say impossible once at the beginning, but in that statement I was including certain other classes of errors beside the main one being described here, some of which may be genuinely impossible to guarantee.

Here's an example. Let us suppose that it is possible in a certain case for uninitialized data to be using a virgin part of the zone heap. The values in those memory locations are impossible to know, because they may be truly random (resulting from uncertainty at machine boot), left over from another program (purgable part of command.com, some program that was ran before Doom, etc.), or God knows what else. In this case it doesn't matter if you emulate Doom to down to the individual machine code instructions -- the behavior is undefined and cannot be predicted.

Only in the case that the use of uninitialized zone memory is strictly using parts of RAM that DOOM is guaranteed to have already touched in a deterministic manner can emulation hope to be achieved.

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...