Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Erick194

The Doom 64 Source Code Released! (Reverse Engineering)

Recommended Posts

Wow - that seemed to come together really quickly! Amazing work @Erick194! It'll be very interesting to be able to compare the evolution from PSX to N64 now that the code for both can be easily examined.

Share this post


Link to post

The pleasure was mine to test the ROMs! It is really awesome that you put so much effort in getting this reverse engineering completed. I will have to take a look at the code myself and see what I can see with my amatuer eyes. And as always I am happy to test anyone's compiled ROMs :D.

Share this post


Link to post

Great to see this project finally surface, awesome work. 💪

 

Admittedly curious to see how long it takes for a new port to grow from this — ideally, one that supports the wad from Nightdive's Doom64 rerelease.

Share this post


Link to post

So does this mean that Nightdive can GPL their version at all? Regardless of whatever complications may be the reason, I still find it irrirating that it's closed source.

Share this post


Link to post
6 minutes ago, Blastfrog said:

So does this mean that Nightdive can GPL their version at all? Regardless of whatever complications may be the reason, I still find it irrirating that it's closed source.

 

That depends on Zenimax, they still have the rights to it after all.

Share this post


Link to post
1 hour ago, Blastfrog said:

So does this mean that Nightdive can GPL their version at all? Regardless of whatever complications may be the reason, I still find it irrirating that it's closed source.

Of course not, that's a commercial product that they very much would like to make money off of, and Zenimax would have the final say on any of that anyway.

 

Realistically, this and Doom 64 EX are the closest you'll get to it.

Share this post


Link to post
3 hours ago, Dark Pulse said:

Of course not, that's a commercial product that they very much would like to make money off of, and Zenimax would have the final say on any of that anyway.

 

Realistically, this and Doom 64 EX are the closest you'll get to it.

Either way, do you know if this code could be used by Nightdive to update the official release to a closer thing or is there a legal problem with that?

Share this post


Link to post

they wouldn't have to use this, because the official port achieves demo-sync level compatibility already. It's based off of Kaiser's own efforts to reverse engineer the game.

Share this post


Link to post
12 minutes ago, SaladBadger said:

they wouldn't have to use this, because the official port achieves demo-sync level compatibility already. It's based off of Kaiser's own efforts to reverse engineer the game.

Yeah, but as Ed, if i remember right, told me on another thread, (or was it Gez quoting Kaiser?), the Official release is an aproximation, quite good and functional, but not all is properly there, and some problems make it not 1:1 with the original N64 release.

This could help to fix that, maybe? 

Share this post


Link to post

In certain cases, I can see that. From what I understand, Doom 64 under load tended not to be as "well defined" as PC doom is (where the game will always execute tics the same regardless of whether it's running at 10 FPS or 35 FPS or whatever). Things like this though really can't be simulated effectively without emulating the entire console, which would be a lot more work, so the source code won't provide much on that front.

Share this post


Link to post
4 hours ago, P41R47 said:

Either way, do you know if this code could be used by Nightdive to update the official release to a closer thing or is there a legal problem with that?

Pretty sure they did their own reverse engineering deep-dive, so I'd seriously doubt Erick uncovered anything Kaiser wouldn't know about for the most part (especially as they are in communication with each other).

 

The one thing that might be different though would be details on the compression algorithm. But that would mostly only matter for running it on an actual N64 or an N64 emulator; something like the remaster that got re-released isn't going to have the same issues of ROM size the original game did.

Share this post


Link to post
8 hours ago, P41R47 said:

Yeah, but as Ed, if i remember right, told me on another thread, (or was it Gez quoting Kaiser?), the Official release is an aproximation, quite good and functional, but not all is properly there, and some problems make it not 1:1 with the original N64 release.

Maybe you're confusing Doom64 EX with the official re-release? There's a few errors and mistakes in the Doom64 EX codebase that were found while redoing the reverse-engineering from scratch for the remaster; but the remaster itself is not reported to have any unwanted accuracy issues.

 

It does have some deliberate changes (notably to data formats used internally) but that's not a real problem, it was made for simpler mod support.

Share this post


Link to post
6 hours ago, Gez said:

Maybe you're confusing Doom64 EX with the official re-release?

Yep, i thought that what you quoted from Kaiser was about the rerelease.

Thanks for clearing up.

Share this post


Link to post

Check it out! The compiled Doom 64 RE code running on my N64. I have the texture filtering turned off on the N64. Who knew the N64 was capable of that? Looks beautiful to me :D 

 

Share this post


Link to post

Does this have better performance than the original? Because of the new compiler used?

Share this post


Link to post
4 hours ago, VGA said:

Does this have better performance than the original? Because of the new compiler used?


I asked Erick about that recently! I asked him if there were any compiler optimizations that could be had now that it is reverse engineered. This is what he told me:

"You could say yes, although it depends on the compiler, currently Doom64-RE is a little more optimized than the original, just a little, if I change the optimization level to O3 it will be a little more data in the ROM than an O2 optimization."

I don't think it is a case of like Mario 64, where Nintendo didnt use any optimizations at all, so a large improvement could be had.

Almost a week ago, I was streaming some Doom 64 RE, and two people in the Doom 64 speed running community were in the chat, peaches (the father of Doom 64 console speed running) and HeadshotTAS (someone who does tool assisted speed running for games like Doom 64). One of the techniques was using the double shotgun bullet puffs to slow down the frame rate to bug out the physics and squeeze through barriers.

They guided me to one of those squeeze throughs in Alpha Quadrant. I did notice that the double shotgun puffs would drop the frame rate a bit. But I couldn't get it to let me squeeze through the barrier. Either because I dont quite have the dexterity for that technique yet. Or the fame rate was improved a bit which prevented the physics from bugging out. Here's the part of the video where I was attempting that (13:00): 
 

 

Share this post


Link to post

Those glides are hard to pull off, this isn't any indication.

 

Is there a frame counter? Also, is it easy to replace maps with new ones?

Share this post


Link to post
On 11/20/2020 at 5:17 AM, Gez said:

but the remaster itself is not reported to have any unwanted accuracy issues.

IIRC, Kaiser at one point mentioned that the only discrepancy he knows about between the official remaster and the original N64 version is that Barons do less melee damage in the remaster. Other than that and what you mentioned about data formats, the rest of the engine is basically 1:1.

Share this post


Link to post
13 hours ago, hfc2x said:

IIRC, Kaiser at one point mentioned that the only discrepancy he knows about between the official remaster and the original N64 version is that Barons do less melee damage in the remaster. Other than that and what you mentioned about data formats, the rest of the engine is basically 1:1.

Curious as to why it's different if that's the case. Was it bugged or something? 

Share this post


Link to post

He apparently got the formula wrong, causing Barons in the remaster to do ((x*4)-x)+11 melee damage, when the actual formula in the N64 version is (x*11)+11, with "x" in both cases being a random value between 0 and 7.

Share this post


Link to post

Amazing that Bethesda can pimp the release but then not let them provide any post-release support.

 

Well with the source being reversed now, that will almost certainly put a damper in enthusiasm for it - PC users will generally move to that and source ports based on it, while jailbroken console users can also make advantage of those ports.

 

Pretty much only the people who don't do any of those are the only ones who'd stick to the official re-release.

Share this post


Link to post

I don't think Doom 64 is popular enough to get someone sufficiently dedicated to creating a source port that addresses something like that. Other than Kaiser himself, that is.

 

The sad part however, is that the only people I've seen online who would like a source port to happen are people who:

a) Have never written a single line of code in their lives
b) Are pissed that Bethesda has the nerve to charge for an inferior version to the superior Doom 64 EX port "that Kaiser guy" made years ago that you can play for free

c) Are pissed that you can't look up/down or jump in an official Doom game, or

d) All of the above

 

So I'm not confident that a source port really has enough reasons to exist, even though it'd be nice to happen IMO, if just for adding features I'd like to see like demo recording and playback.

Share this post


Link to post

Well, there is the good ol' Doom 64 EX. And there is the official Doom 64 rerelease which has new content, too. And there is GEC team's recreation by forking GZDoom. And there is a remastered, spruced up and expanded recreation in the form of a GZDoom mod called Doom 64 Retribution by @Nevander which is my favourite way to play Doom 64.

 

What the hell else would one want? :D

 

Interest in Doom 64 has increased compared to the past, surely.

Share this post


Link to post

Well, if you're talking about simply wanting to play the game, I know there's plenty of options out there, including N64 emulation.

 

My point is that compared to classic Doom, there's not nearly as much interest in Doom 64 and never will be, simply because it's a very niche game. Pretty much the same situation when compared to other Doom engine games, basically. There's very little content being created for the game, and the little there is is made for compatibility with both EX and the 2020 rerelease, and I'd say that's pretty great. But it's not the same level of interest that would make an actual source port dedicated to running game to happen.

 

Now, maybe GEC team can actually pull it off, but that would be my wishful thinking. Other than that, I don't see it happening.

Share this post


Link to post

well the source code is there, it won't be long until somebody want to try a different approach, maybe using Doom64 code to even load UDoom/Doom2/Final Doom as an enhanced PSX version.

And then you have a proper source port that has a lot of interesting features and adds a lot of possibilities to Doom modding.

 

Just wait a little, it will come, eventually, and it will have a lot of audience and reception as new things will be available to made.

And i was just talking about Doom64 code base.

If someone expande ir and adds Boom/MBF fearures it will be a hell of a sourceport.

Full of scripted scenes and a lot more.

 

And it wouldn't be a PC raper ad latest build or GZDoom are.

So yeah, lot of support from the get go i would say.

 

And there are quite a good number of D64 mods by now, so yeah, if a source port is released, they will multiplicate in short time.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×