Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doom v1.6 emulation #819

Open
wants to merge 2 commits into
base: v12
Choose a base branch
from
Open

Doom v1.6 emulation #819

wants to merge 2 commits into from

Conversation

nukeykt
Copy link
Contributor

@nukeykt nukeykt commented Nov 23, 2016

Doom 1.6 emulation.
I was working on Doom 1.6 emulation this summer. It is nearly completed(including savegame compatiblity). The only issue i know is demo compatiblity. Some demos go out of sync. It is likely due to Pain Elementals.

@fragglet
Copy link
Member

This is certainly comprehensive. I'll need some time to properly review it.

OTOH: It isn't necessary to disable certain command line arguments when emulating old versions. For example you can get rid of the conditional code around -timer and -cdrom.

@fabiangreffrath
Copy link
Member

fabiangreffrath commented Nov 24, 2016

o_O Wow, what a massive effort.

Though, I really dislike the fact that it requires re-definition of most of info.c in d_compat.c. Is it possible to somehow circumvent this?

@chungy
Copy link
Contributor

chungy commented Nov 26, 2016

Does this emulate the beta shareware or the leaked/hacked 1.6 patch?

@nukeykt
Copy link
Contributor Author

nukeykt commented Nov 26, 2016

This emulates beta shareware. But are their EXEs different?

@chungy
Copy link
Contributor

chungy commented Nov 26, 2016

I don't know, I haven't managed to find a copy of the other release.

chungy referenced this pull request Nov 28, 2016
We are now working to emulate older (pre-v1.9) Doom versions, so it
is worth clarifying the goals of the project slightly.

Also add Chex Quest to the list of games.
@fragglet
Copy link
Member

fragglet commented Feb 3, 2017

So I've been blocking progress by not reviewing this and I apologize.

I have some reservations about the approach taken. First, this is a really big merge and it would make a lot more sense if this was broken up into a series of smaller changes, ideally on a branch that we can test things on. This is how we've developed other such large features.

In terms of the changes here, the main thing that I don't think is a good approach is the d_compat.c file, because:

  • It has almost no comments.
  • It does a bunch of state table changes in code rather than in tables.
  • The mapping functions in it are called throughout the codebase in places including the renderer.

From what I understand, this file is solving two problems:

  1. Some of the table entries from info.c did not appear in older versions of Doom.
  2. Some of the table entries in v1.6 were different and changed in development between the beta version and the v1.666 release.

In addressing (1), maybe a simpler approach is to just add a field to the types used in info.c documenting when each entry was added? For example, for D_Compat_MobjExists(m), you essentially are just trying to answer the question, "is gameversion >= v, where v is the version of Doom in which m was added?". These "Exists" methods then become so simple that you probably don't even need them as a function.

There are a few places where you need to map from one table index to another (D_Compat_SpriteToNew, D_Compat_SpriteToOld, etc.). I think these are limited to: savegames; dehacked; error messages. In each of these cases performance isn't important, so it should be possible to calculate the mapping in real time using a range scan over the table without needing to maintain a mapping table.

Regarding (2) above, I actually wonder whether this should be out of scope for the project. Or at the very least: is this best achieved in code? Could you get the same result by using an auxiliary dehacked patch? I suspect that you probably can, and it's probably a lot cleaner. There's already precedent for this with chexdeh.zip (see idgames) which stores the changes needed to emulate Chex Quest in Chocolate Doom. There's the additional advantage that you also make this work available to users of other source ports who may be interested to experience some of the differences from the v1.6 beta.

@nukeykt
Copy link
Contributor Author

nukeykt commented Feb 5, 2017

Ok, Thanks for reply.
Unfortunately there are differences in sprite/state/mobj tables item sequence between 1.6 and 1.666 (e.g. Keen's states are next to torch in 1.6, but before in 1.666). So there will be some troubles with your suggested approach.
Dehacked patch seems to be interesting. I'll try to make patch soon. But on the another side there bunch of differences in action functions, that cannot be done via dehacked, which make it a bit useless in other ports.

@jmtd jmtd added the Doom label Feb 28, 2017
rfomin pushed a commit to rfomin/chocolate-doom that referenced this pull request Apr 21, 2023
* Fix Heretic automap view reset

* Add support for Heretic widescreen assets

* Add Heretic status bar bezel in widescreen

* Use SHORT() for patch_t members
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants