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

Please delete this. My post got partially deleted.

Recommended Posts

Please delete this. I lost a significant chunk of this post and I want to get rid of this. It was originally a doom snes rom hacking guide but I accidentally hit reset message, and well I lost about 15kilobytes of data. please delete this.

Share this post


Link to post

So you're suggesting that maybe a random comment in the code that says "save ID code" is a sort of thesis statement arguing to strive to "save id software's original source code", and not an offhand comment explaining "save identification code"?

That's... far fetched.

Share this post


Link to post

Keep up good work ! I hope that your hacking will be successful. Maybe in the future we can finally create some SNES Doom hack with custom maps ! I´m currently porting my pc doom maps into GBA so if this will be sucessful I´m interested to port them also on SNES. Try to contact Kaiser- he hacked jag based Doom ports. Maybe he can help you with this.

Share this post


Link to post

Regarding map structure, everything seems to be quite similar, meaning it was easy to "copy, paste, edit" from the IWAD, but most evidence suggests the engine itself was built from the ground up. Naturally there will be some similarities, but I don't necessarily think this brings us any closer to modding SNES Doom.

I don't mean to discourage you from your hunt - by all means, keep digging - but unless we get one of the local gurus on the case, or the source code itself (probably never gonna happen, considering it's a Nintendo game) SNES modding seems to be one of those "payoff ain't worth the hassle" situations. History has shown that doesn't stop Doomers though, so who knows what could happen. :)

Share this post


Link to post

That any part of it was based on DOOM contradicts statements made by Williams and by John Romero, who claimed that the game was brought to id mostly or even completely finished as a surprise to get permission for its publishing. He stated their reaction was, "Oh hell yeah!". Without a previous professional relationship existing between Sculptured Software and id Software, there is no way they'd have access to the DOOM source code, and reverse engineering it at that point in time would have been both extremely difficult and, most importantly - not very helpful. The SNES is architecturally too different from a DOS PC for anything discovered beyond high-level algorithmic principles like BSP to be helpful - and those were far more easily available by reading college research papers or Mike Abrash's books by that point.

Most importantly, that snippet of 65816 assembly has an obvious purpose. It is maintaining CPU-side information about the assignment of sound channels on the SPC700 chip. A and X are 65816 regs so I know it is not SPC700 code; in addition, if you see what the code is doing, it is saving the "ID" of the sound into one of the game's sound channel slots in memory.

Sorry to burst your bubble so completely. The data similarities exist because obviously Sculptured Software did *not* recreate the game's data from scratch. They based it on the commercial DOOM IWAD. But in the process of adapting it to their custom engine and its totally different platform, they obviously made a lot of changes and simplifications.

Share this post


Link to post
Quasar said:

That any part of it was based on DOOM contradicts statements made by Williams and by John Romero, who claimed that the game was brought to id mostly or even completely finished as a surprise to get permission for its publishing. He stated their reaction was, "Oh hell yeah!". Without a previous professional relationship existing between Sculptured Software and id Software, there is no way they'd have access to the DOOM source code, and reverse engineering it at that point in time would have been both extremely difficult and, most importantly - not very helpful. The SNES is architecturally too different from a DOS PC for anything discovered beyond high-level algorithmic principles like BSP to be helpful - and those were far more easily available by reading college research papers or Mike Abrash's books by that point.

Most importantly, that snippet of 65816 assembly has an obvious purpose. It is maintaining CPU-side information about the assignment of sound channels on the SPC700 chip. A and X are 65816 regs so I know it is not SPC700 code; in addition, if you see what the code is doing, it is saving the "ID" of the sound into one of the game's sound channel slots in memory.

Sorry to burst your bubble so completely. The data similarities exist because obviously Sculptured Software did *not* recreate the game's data from scratch. They based it on the commercial DOOM IWAD. But in the process of adapting it to their custom engine and its totally different platform, they obviously made a lot of changes and simplifications.


Nothing useful beyond high-level stuff? BSP is considerably high level, compared to most of the other stuff in the ROM. I get there is still collision detection and raycasting to take care of, but those have something to do with BSP (i think)

Share this post


Link to post

Interesting update. I will check the disassembler tomorrow. If I find something, I will make an update.

Share this post


Link to post
Kloki38 said:

Interesting update. I will check the disassembler tomorrow. If I find something, I will make an update.


If possible, pm me the decompiled asm code, and I can start getting to work on figuring out what does what in the code, or do basic documentation and distribute the code. I may have to get in contact with Williams/sculpted software or whoever made it for release permission (I believe the company who made doom SNES went defunct however, which makes it legally distributable as no existing, non defunct company has copyright on it, technically making it legal)

Share this post


Link to post

I didn´t decompiled the code, because I honestly don´t know what to do with it (I´m modder not a programmer). I have only checked the programs what they can do (you probably checked them too). But I tried to contact Randy Linden, the programmer of the engine. I found his email adress on the internet but it´s probably fake because I haven´t received any response- randylinden@gmail.com. I have also checked the ROM with hex editor and I discovered, taht there is no text messages. Well, there is one "Hangar" on the beginning- maybe there the main iwad starts. The messages are probably in form of pictures as the original Doom. Also the maps are probably compressed- if they are stored in wad file.

Share this post


Link to post

I doubt Doom for SNES has anything resembling a WAD considering it was built on a custom in house engine. The graphics and sounds were probably ripped from the IWAD and implemented into that engine and the levels, I wouldn't be surprised if they were built from scratch.

I'm sort of curious about Doom II for GBA though. That one used a custom engine too. Does anyone know if that ROMs been hacked to see if it uses an IWAD?

Share this post


Link to post
hobblinharry said:

I doubt Doom for SNES has anything resembling a WAD considering it was built on a custom in house engine. The graphics and sounds were probably ripped from the IWAD and implemented into that engine and the levels, I wouldn't be surprised if they were built from scratch.

I'm sort of curious about Doom II for GBA though. That one used a custom engine too. Does anyone know if that ROMs been hacked to see if it uses an IWAD?

I can confirm there is no such thing as an IWAD in SNES DOOM. Most of the resources are in console-specific formats - tiles, SPC700 samples, etc. Levels - or at least SOME of the levels - are NOT compressed, as I already explained before by having identified several of the map data structures in a hex editor. This would not be possible if they were compressed.

AFAIK, no one has ever looked into Doom II GBA because we have no reference to work off, which would make it a lot more difficult to reverse engineer than something based on the Doom source. Whereas, just working off the Jag source, I was able to fill out most of the function names in GBA Doom 1 in IDA Pro in an hour :P

Share this post


Link to post
Quasar said:

I can confirm there is no such thing as an IWAD in SNES DOOM. Most of the resources are in console-specific formats - tiles, SPC700 samples, etc. Levels - or at least SOME of the levels - are NOT compressed, as I already explained before by having identified several of the map data structures in a hex editor. This would not be possible if they were compressed.

AFAIK, no one has ever looked into Doom II GBA because we have no reference to work off, which would make it a lot more difficult to reverse engineer than something based on the Doom source. Whereas, just working off the Jag source, I was able to fill out most of the function names in GBA Doom 1 in IDA Pro in an hour :P


If you were able to find the tile data, please consider attempting to do a tile hack at least, as you know, i have no access to a PC so i am using my tablet, and a tile hack might be intresting. An SPC hack would be cool too, but as far as i know not many music hacks for any SNES games have been done, and I find there is a total lack of SPC import tools available. One theory I have is that the levels for doom snes were made like any normal level, due to using tiles like all snes games do. So maybe they use a similiar map formatting structure as the dos versin as stated in your post about the map data similarities, while still incorporating elements of standard snes level limits, data, and functionality, How they did this I do not know, however this is only just a theory, I find my thesis on that to be a little far fetched as doom is the only snes game to even lay a line of code on BSP, let alone 2.5d rendering. It has to have stuff in common with regular snes games though. It still has to use the same kinds of data, otherwise the SNES would find the files unreadable. Because remember, games from all systems, even the NES had files in the ROMs. Not files in the sense of preprogrammed data (they did do that quite often though, to make data.) But physical files (by that i mean a computer readable file, like say for example an .exe file, but replace that with .nsf for example) Either way, hacking doom snes is going to be a challenge, but certainly possible. if they can make it, we can too.

Share this post


Link to post

The people posting here probably know a hell of a lot about the snes...
but i googled the snes internals more than once because i was interested in knowing a bit more, google now tends to provide me with instant interresting results ;

SNES Graphics information (and more), a programmers document for emulators and such ;
http://web.archive.org/web/20071111200111/http://www.geocities.com/Qwertie256/attic/snesemu/qsnesdoc.html

Share this post


Link to post
TheLoneSurvivor said:

I find my thesis on that to be a little far fetched as doom is the only snes game to even lay a line of code on BSP, let alone 2.5d rendering.

Not true; John Carmack recoded Wolfenstein 3D to use BSP for its SNES port, because it was much faster on that platform than raycasting, even though BSP is not needed to render the geometry of Wolf3D maps.

There are other examples of technologically similar games on the platform as well:

  • Faceball 2000 implements a 3D maze projection similar to Hovertank or Catacomb 3D.
  • The indoor sections of Jurassic Park are more or less a direct calque of Wolfenstein 3D in terms of rendering and gameplay.

Share this post


Link to post
TheLoneSurvivor said:

mov tempword,A ; save ID code
mov PlayChan+X,A
mov PlayCurVelocity+

Notice the comment ; save ID code?

Yes, the identification code (stored in A) is saved by being copied into tempword.


Also you will find that the string "tempword" appears exactly zero time in the id (Software) (source) code.

TheLoneSurvivor said:

So again, It may be saving an identifier code, but thanks to Quasar's and my discovery, that is quite unlikely.


Sorry, but even if SNES Doom was a direct port of the original code, the explanation for this particular comment would still most likely be about the fact that it's saving an identifier code, since this is what the mov instruction does: it keeps a copy of the value, which we can presume is the identifier code.

Note also how this is assembly that, per your say, you found in an SPC file. Aren't those music? Why would they contain remnants of the game's code, instead of instructions for playing music on the SPC700 chip? Notice the name of the variables used next: PlayChan, PlayCurVelocity. It's about setting the velocity on the channel identified by A, so your ID code is the channel's identification code.

Share this post


Link to post
Gez said:

Why would they contain remnants of the game's code, instead of instructions for playing music on the SPC700 chip?

The code pictured is likely boilerplate 65816 assembly generated by a song compiler tool that turned music created by the musician into a SPC700 program and the 65816 code necessary to boot up that SPC700 program.

My best theory is that there was a bug in that song compiler which accidentally copied part of its 65816 source code output into the SPC700 program as well. This must end up in a header or padding area of some sort or it'd likely crash the game :P Note these uncompiled instructions only appear in SNES memory after a song program is decompressed. They're not found in the ROM directly.

Share this post


Link to post

I like where this is going.

Just think about it, the Reality engine can be done the same way the DOOM 64 engine was done by Kaiser into Doom64 EX.

Share this post


Link to post
Quasar said:

Not true; John Carmack recoded Wolfenstein 3D to use BSP for its SNES port, because it was much faster on that platform than raycasting, even though BSP is not needed to render the geometry of Wolf3D maps.

There are other examples of technologically similar games on the platform as well:

  • Faceball 2000 implements a 3D maze projection similar to Hovertank or Catacomb 3D.
  • The indoor sections of Jurassic Park are more or less a direct calque of Wolfenstein 3D in terms of rendering and gameplay.


But you have to remember too, we are talking about more advanced BSP, Doom uses (by todays standards) a bad BSP system, but it is capable of alot more than wolfenstein 3d. I should have stated "to lay a line of code on true 2.5d bsp" Because wolf3d does classify as 2.5d but it is so basic its practically 2.25d (which does not even exist) Also, if they had used a bigger ROM size (such as 4mb, which is HiROM) they could have done a fast raycasting renderer on the SNES.
Remember, the SNES is not primitive. It may be old and outdated, but it is still respectable considering the time it was made. If it can run a BSP engine, then it is obviously a good system, due to the amount of resources that uses. They could have also done better math ASM routines to do math more efficently as raycasting is VERY mathematical.

Share this post


Link to post
TheLoneSurvivor said:

But you have to remember too, we are talking about more advanced BSP, Doom uses (by todays standards) a bad BSP system, but it is capable of alot more than wolfenstein 3d. I should have stated "to lay a line of code on true 2.5d bsp" Because wolf3d does classify as 2.5d but it is so basic its practically 2.25d (which does not even exist)

You have no evidence that the BSP tree used in Wolf3D SNES is different at all from the ones used by DOOM. The rest of this post is almost indecipherable to me so I'm not bothering to comment on it, except to say that the amount of ROM you throw at an SNES game will never make a particular algorithm run faster on its CPU. Completely irrelevant to the matter.

Share this post


Link to post
TheLoneSurvivor said:

They could have also done better math ASM routines to do math more efficently as raycasting is VERY mathematical.

Math.

Oh well, either way the baby steps towards modding SNES Doom are pretty neat.

Share this post


Link to post

This is interesting, I hope it goes somewhere. I made a partial sound hack years ago, adding psx sounds into the snes rom. A couple are loaded into spcs though and I couldn't do those. .

Share this post


Link to post
ShaneAmp said:

This is interesting, I hope it goes somewhere. I made a partial sound hack years ago, adding psx sounds into the snes rom. A couple are loaded into spcs though and I couldn't do those. .

I want a video of that partial hack.

BTW, are you still making the SNES DOOM TC? I really love it.

Share this post


Link to post
ShaneAmp said:

This is interesting, I hope it goes somewhere. I made a partial sound hack years ago, adding psx sounds into the snes rom. A couple are loaded into spcs though and I couldn't do those. .


Can you provide info please?
If you found some of the games sounds are loaded into spcs, do you know where the music data is in the ROM? I have been trying to trace the APU ram to find the music data in the ROM but i cant.

What format does Doom SNES use (say for example 8bit little endian compressed) for sounds?

What is the offsets for the sounds, and how do you insert new sounds?

Did you have to repoint anything?

Share this post


Link to post

I used a tool made for ripping sounds, snessor95 I think it was called? It will load a list of sounds that it finds, you can extract them to wav files, and you can re insert and overwrite them into the Rom or spc file. I couldnt tell you anything more then that they are 8bit, and that you could insert any type of wav, it would auto convert it! You also would have to make sure the file was no longer then the original. I had to edit some sounds so that they wouldn't cut off! I made a snes mod years ago and used this program to used the actual sounds from the rom. Look into that program, it may help you out. I know literally nothing about hacking roms unless its an easy to use tool, unfortunately..

Share this post


Link to post

Nice :) Music and text hack. So the rest of text is stored near the "HANGAR" string ? BTW good work !

Share this post


Link to post
Jaxxoon R said:

Math.

Oh well, either way the baby steps towards modding SNES Doom are pretty neat.


Meth.

Oh well, either way the Walter White steps towards modding crystal meth are pretty neat.

I think I am done with the meth jokes, even though I have a university degree in methematics and cooking...

(insert lenny face here)

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
×