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

46 minutes ago, P41R47 said:

And there are quite a good number of D64 mods by now

GZDoom mods don't count, though. I'm talking about running the actual game, not an approximation made with a different engine.

Share this post


Link to post
27 minutes ago, hfc2x said:

GZDoom mods don't count, though. I'm talking about running the actual game, not an approximation made with a different engine.

i wasn't talking about GZDoom.
You better inform yourself of what i was talking, take a look, there quite a good number of mapsets for Doom64 already, and some more are being developed:
https://www.doomworld.com/forum/post/2205191

Share this post


Link to post

That's actually pretty cool, and it's true I didn't know about it. However, there's 13 of the items in the list that are actually just Doom 2 mods with "Doom 64 flavor".

 

Still, having 76 mapsets (and counting) made specifically for Doom 64 is really cool, and it's a very nice to keep in mind.

Share this post


Link to post
5 hours ago, hfc2x said:

That's actually pretty cool, and it's true I didn't know about it. However, there's 13 of the items in the list that are actually just Doom 2 mods with "Doom 64 flavor".

 

Still, having 76 mapsets (and counting) made specifically for Doom 64 is really cool, and it's a very nice to keep in mind.

And those were made when the source code was incomplete and with a buggy builder, as Doombuilder64 never get out of alpha or beta state.

 

So, with the source code and a proper source port, new thing will be  properly available for all to give it a try. :)

Share this post


Link to post
On 11/29/2020 at 5:34 AM, P41R47 said:

with a buggy builder, as Doombuilder64 never get out of alpha or beta state.

Side note, but I think I remember Quasar mentioned at one point that DB64 will not get any more development at this point (unless someone picks it up, of course), since they used the publicly-available build to make the new levels for the rerelease.

Share this post


Link to post
9 hours ago, hfc2x said:

Side note, but I think I remember Quasar mentioned at one point that DB64 will not get any more development at this point (unless someone picks it up, of course), since they used the publicly-available build to make the new levels for the rerelease.

Yeah, pretty much that was what could be done with the incomplete and not faithful code made for D64 Ex.

But with the new source code things will change for sure.

Not inmediatelly, just slowly but surely.

Share this post


Link to post

So with this information in mind, would it be possible to create a vanilla-accurate source port based around this code? And if so, is there anyone working on one?

Share this post


Link to post
3 minutes ago, OpenRift said:

So with this information in mind, would it be possible to create a vanilla-accurate source port based around this code? And if so, is there anyone working on one?

Oh my god i literally just thought of this. But Doom 64 is already perfectly accurate, no/

 

You mean a DOS version?

Share this post


Link to post
8 minutes ago, Redneckerz said:

Oh my god i literally just thought of this. But Doom 64 is already perfectly accurate, no/

  

You mean a DOS version?

Oh nono, I mean like a port accurate to the vanilla N64 version, like a D64 equivalent of Chocolate or Crispy Doom.

Share this post


Link to post
Just now, OpenRift said:

Oh nono, I mean like a port accurate to the vanilla N64 version, like a D64 equivalent of Chocolate or Crispy Doom.

But that exists. But i think i get it now. You mean something using the actual engine, not Kex. Something more like PsyDoom, a reverse engineered engine.

Share this post


Link to post
Just now, Redneckerz said:

But that exists. But i think i get it now. You mean something using the actual engine, not Kex. Something more like PsyDoom, a reverse engineered engine.

I know about the Kex remaster, that's how I've been playing Doom 64 for a while (it's a pretty good port for the most part). But yeah, I mean something that uses the original engine.

Share this post


Link to post
3 hours ago, OpenRift said:

I know about the Kex remaster, that's how I've been playing Doom 64 for a while (it's a pretty good port for the most part). But yeah, I mean something that uses the original engine.

i may be wrong, but Kex engine is actually a wrapper, kinda like Unity is on the Doomnity port.
So probably Nightdive own approximation of the source code was use to make Doom 64 Remastered.

I'm probably wrong, but @Edward850 surelly could help in sorting this doubt...

Share this post


Link to post
39 minutes ago, P41R47 said:

i may be wrong, but Kex engine is actually a wrapper, kinda like Unity is on the Doomnity port.
So probably Nightdive own approximation of the source code was use to make Doom 64 Remastered.

I'm probably wrong, but @Edward850 surelly could help in sorting this doubt...

Kex could be described as a wrapper, but not like the one Doom on Unity uses. The Unity wrapper is running Doom as a sub-process library (the same library used for the ports contained in Doom3 on the original Xbox and BFG edition, and the XBLA version) and just renders the output as a texture in its own world space. Kex however we replace the interface but the core game is running natively, so you could describe it as SDL2-but-more, the Kex core game loop can be literally anything we want it to be so we just give it the Doom64 code, adapt the renderer to use the Kex RHI, etc.

 

The source code is also not really an approximation (or at least that's not a great choice of word), it was disassembled from the original binary using PC Doom's source as a point of comparison. It is pretty much the original engine. Much like Chocolate Doom itself, we have the demo playback support to prove it, you can only do that if you have identical physics and logic like with PC Doom. Heck we even kept the same rendering bugs with how it handled sprite clipping against subsectors.

Edited by Edward850

Share this post


Link to post
53 minutes ago, Edward850 said:

Kex could be described as a wrapper, but not like the one Doom on Unity uses. The Unity wrapper is running Doom as a sub-process library (the same library used for the ports contained in Doom3 on the original Xbox and BFG edition, and the XBLA version) and just renders the output as a texture in its own world space. Kex however we replace the interface but the core game is running natively, so you could describe it as SDL2-but-more, the Kex core game loop can be literally anything we want it to be so we just give it the Doom64 code, adapt the renderer to use the Kex RHI, etc.

 

The source code is also not really an approximation (or at least that's not a great choice of word), it was disassembled from the original binary using PC Doom's source as a point of comparison. It is pretty much the original engine. Much like Chocolate Doom itself, we have the demo playback support to prove it, you can only do that if you have identical physics and logic like with PC Doom. Heck we even kept the same rendering bugs with how it handled sprite clipping against subsectors.


thanks for clarifying, Ed :)

And sorry for the silly use of words. :P

There was no ill intent.

On my language approximation can be use indistinctively as ''the way you reached the proper result intended, as opposed to the other way proposed'', and not only as ''to deem something similar, but not the same, to another thing''.

As i am not tech savy at all, i can't say if there is a difference on the code you guys use, to the one offered on this thread.
Probably there is no difference, but as i can't tell, i use that silly choice of words.
Sorry for the confusion!

Share this post


Link to post
On 11/24/2020 at 8:02 PM, Immorpher said:

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 

 

I have seen two examples of nearest-neighbor rendering on the N64. For whatever reason, the badges in Star Fox 64 (they are awarded for completing missions and appear on the overworld hun) are unfiltered, as are the background buildings in the opening map for Perfect Dark 

Share this post


Link to post
1 hour ago, Koko Ricky said:

I have seen two examples of nearest-neighbor rendering on the N64. For whatever reason, the badges in Star Fox 64 (they are awarded for completing missions and appear on the overworld hun) are unfiltered, as are the background buildings in the opening map for Perfect Dark 


Oh! Very interesting, I never noticed that myself! But I have since learned that the N64 was capable of classic dithering too. I've noticed they have used it for clouds in a scene in Super Mario 64 and a few other places. And because of this decompiled code, I was able to add those video options to a Doom 64 rom mod!
 

 

Share this post


Link to post
4 hours ago, P41R47 said:

i may be wrong, but Kex engine is actually a wrapper, kinda like Unity is on the Doomnity port.
So probably Nightdive own approximation of the source code was use to make Doom 64 Remastered.

Well, yeah I knew that. It wouldn't be nearly as dead-on if they made it entirely from scratch.

Share this post


Link to post

The easiest thing to do would be to strip down to the very core an SDL2 source port that basically then provides a framework to which you can add the code back to it, function by function, porting it along the way.

 

I generally find this the simplest and least error-prone way to do it.  Strip something down, add the gameplay stuff to it, generally this is very cross platform.  The MIPS NEC4300 assembler for some of the math stuff is a quick fix because taking one look, it is just assembler versions of the existing C code for many historic source ports.  It absolutely can be done, it just takes someone to do it.  A couple of months could have it on SDL2.  It isn't always so simple, but it isn't an impossibility.

 

Don't look at me :)

Edited by Gibbon

Share this post


Link to post
11 hours ago, OpenRift said:

Well, yeah I knew that. It wouldn't be nearly as dead-on if they made it entirely from scratch.

 

18 hours ago, OpenRift said:

But yeah, I mean something that uses the original engine.

 

Yeah, but what i tried to point out is that, even when Kex is uses as somewhat a wrapper, the engine is the original one, the same use on Doom 64 for Nintendo 64.
I quoted that part of your reply, as is the one that got me confuse.

 

 

Share this post


Link to post
Posted (edited)
19 hours ago, Gibbon said:

The easiest thing to do would be to strip down to the very core an SDL2 source port that basically then provides a framework to which you can add the code back to it, function by function, porting it along the way.

 

I’m confused because this is essentially what NightDive did.  Are you wanting a new source port so mod support can be expanded?

 

@OpenRift

 

The new retail release is effectively using the original engine.  The changes that were made are more about sound and video output rather than anything to do with gameplay.  

 

Edit:

 

You can’t use the same code that was used on the Nintendo 64 because it won’t run on modern PC and console hardware.  Are you wanting a Nintendo 64 emulator that runs DOOM 64 and has some QoL features hacked in?

Edited by KainXavier

Share this post


Link to post
Posted (edited)
18 minutes ago, KainXavier said:

 

I’m confused because this is essentially what NightDive did.  Are you wanting a new source port so mod support can be expanded?

 

@OpenRift

 

The new retail release is effectively using the original engine.  The changes that were made are more about sound and video output rather than anything to do with gameplay.  

 

Edit:

 

You can’t use the same code that was used on the Nintendo 64 because it won’t run on modern PC and console hardware.  Are you wanting a Nintendo 64 emulator that runs DOOM 64 and has some QoL features hacked in?

It would be nice, at least then others can expand it rather than being stuck with a non FOSS closed source implementation.  If things can be fixed, then others can do it, rather than just what Zenimax says.

 

That is why I proposed the same solution.  Obviously, you cannot use MIPS R4300 assembler on anything but the N64 but the gameplay code is still not platform specific, so this would likely be the 'go to' way to get it done without needlessly porting the entire codebase.

Share this post


Link to post
Posted (edited)
26 minutes ago, KainXavier said:

 

I’m confused because this is essentially what NightDive did.  Are you wanting a new source port so mod support can be expanded?

  

@OpenRift

 

The new retail release is effectively using the original engine.  The changes that were made are more about sound and video output rather than anything to do with gameplay.  

  

Edit:

 

You can’t use the same code that was used on the Nintendo 64 because it won’t run on modern PC and console hardware.  Are you wanting a Nintendo 64 emulator that runs DOOM 64 and has some QoL features hacked in?

I'm talking about like the Doom 64 equivalent of PsyDoom, where it's dead-accurate while also including mouse + keyboard controls. A Chocolate 64 of sorts.

 

Or just a port similar to the Nightdive port, but with multiplayer support and no Bethesda integration (yes, I know EX does these things, but it has some issues aside from just accuracy).

Share this post


Link to post

@Gibbon

 

Okay, I understand what you’re getting at now.  It would be nice to have a comparable, open-source solution so the community won’t have to depend on id, Microsoft, or its partners to port the game to future platforms.

 

@OpenRift

 

I would argue that Nightdive’s port is comparable to PsyDoom.  I believe PsyDoom takes a more emulation-centric approach but the end-result is more or less the same.  Both teams had to reverse-engineer the game engine and recreate any quirks specific to the platform it ran on.  One team replaced the renderer with something that uses Vulcan natively.  The other team probably wrote overrides for it so Vulcan winds up being used instead.  Hell, the KEX engine could very well be doing this too.  I’m not sure how much detail @Edward850 can go into because it’s proprietary, and he likely signed an NDA. 

Share this post


Link to post

Kex is more of a intermediate solution: Not so much an engine and not so much a framework, rather, a generalized piece of middleware with generalized functions that can replace the functions from games they wish to re-release.

 

 

Share this post


Link to post
8 hours ago, Gibbon said:

It would be nice, at least then others can expand it rather than being stuck with a non FOSS closed source implementation.  If things can be fixed, then others can do it, rather than just what Zenimax says.

not only that but also improve the performance man i love the remaster but i really hate how my laptop becomes a nuclear reactor when im playing it

Share this post


Link to post
32 minutes ago, omalefico32x said:

not only that but also improve the performance man i love the remaster but i really hate how my laptop becomes a nuclear reactor when im playing it

Too many layers.  They should have just ported it to a newer source port than slapping yet another layer on top for Zenimax's horrible integration.  It definitely cuts performance somewhat.

Share this post


Link to post
2 minutes ago, Gibbon said:

Too many layers.  They should have just ported it to a newer source port than slapping yet another layer on top for Zenimax's horrible integration.  It definitely cuts performance somewhat.

i like how night dive is bringing all these games back to life but for me their ports are always 50/50

 

system shock was great blood was garbage

 

doom 64 is great but bloated

 

i also dislike how much heavier their rereleases are some even requiring modern hardware to run well with is something that i dont think should be happening with old games (with some exceptions of course like the quake port with used advanced features)

 

im here hoping that powerslave will be great (and im not gonna lie i wanna buy a new pc to play the system shock remake when it releases )

 

 (i know we have people who work on night dive on our community and im not dismissing your work i have even seen some games where you had to basically rebuild the game from scratch and this is really is amazing. and you also seen to fix any problems with ports showing you guys really do listen to the what the community has to say with is kinda rare on game development. so that this post just how i feel about them personaly not as an attack to your work)

 

i have heard that they use some closed source code on their rereleases so it might be impossible for them to fully release the source from them any time in the future so that sucks playing these games on windows 20 years from now will probably be a huge pain

 

on my experience wine on linux has better legacy program support then windows so i dont think this will be too much of a problem in the future for linux users

 

overall i see night dive the same way i see travellers tales great tech but their projects are always kinda meh

Share this post


Link to post
Posted (edited)

The sad thing is, Blood didn't even need a rerelease, the NBlood reversed engineered source port blows it away by comparison.  Shame, it's just $$

Share this post


Link to post
1 hour ago, Gibbon said:

The sad thing is, Blood didn't even need a rerelease, the NBlood reversed engineered source port blows it away by comparison.  Shame, it's just $$

The thing is, NBlood wasn't NEARLY as good as it is now compared to when Fresh Supply came out (it is now though, and it's honestly the definitive way to play Blood on modern machines). The problem with Fresh Supply was that Atari didn't give them enough time because they're just cheap assholes.

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

×