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

Dissecting Sega Saturn Doom

Recommended Posts

Great read Mattfriel. I wasn't even aware of a Sega Saturn Doom port. The only console ports from back in the day I knew were the PS1 3DO SNES Jaguar and 32X ports. And IMO PS1 got the best console Doom port for the time, wasn't really until Doom 3 BFG edition when consoles finally got a 100% accurate port of the PC version.

Share this post


Link to post

My goodness, the frame rate on Saturn Doom is just miserable even when relatively little is going on.

Share this post


Link to post

The saturn version of doom is the very first doom i ever played, and it's really what got me interested in doom as a whole. Still have my saturn and copy of doom for it, I enjoyed it and still do. The framerate can get pretty bad, and having played tons of other ports of doom, i really have come to dislike the music. When i had nothing to compare it to it was alright but i think doing something like 3do version did with the soundtrack would have really been awesome

Share this post


Link to post
19 hours ago, Mattfrie1 said:

- All of the map files for the Saturn port are the same exact file size as the map files for the PSX port, and examining the files in a hex editor reveals absolutely NO difference between the files as well. Since the files are an exact match, I wonder if all the information about colored lighting and sound reverberation are still included in the Saturn files...

Almost certainly. Both fields are in the mapsector_t struct, though I have yet to figure out the meaning of the SPU control field's values in PSX. The lighting field is a byte index (0-255) into the LIGHTS lump.

 

If you've isolated the assembly for P_LoadSectors, I'd be happy to post the MIPS ASM from the PSX version for a direct comparison.

Share this post


Link to post
1 hour ago, imradlol said:

When i had nothing to compare it to it was alright but i think doing something like 3do version did with the soundtrack would have really been awesome

There's an ISO hack of the Saturn DOOM that replaces all the songs with the 3DO port songs. I have yet to try it, but you can search for it on Google.

Share this post


Link to post
1 hour ago, Quasar said:

If you've isolated the assembly for P_LoadSectors, I'd be happy to post the MIPS ASM from the PSX version for a direct comparison.

I'll just post a screen grab of what I'm seeing in the hex editor, I'm pretty sure this is what you're looking for.

 

https://imgur.com/68uuEbx

 

Aside from that, I did another comparison of the source WAD files (PSXDOOM.WAD and JIMSDOOM.WAD) between the two ports in Slade. Both of these files are ALMOST identical, but there are several entries which appear to be corrupted in JIMSDOOM.WAD. BSPIC2C8 (an arachnotron walking sprite) is only 5.52 kb in JIMSDOOM, whereas it's 7.02 kb in PSXDOOM. SKELG2 (A revenant punching sprite) also doesn't display in JIMSDOOM, but is the same file size as PSXDOOM. Both of these sprites still display correctly in game however.

 

Just for the hell of it, I put both PSXDOOM.WAD and JIMSDOOM.WAD through the hex editor, even though I already know that JIMSDOOM is a lot bigger in file size than PSXDOOM. I've attached screen grabs of the end of both WADS in hex below.

 

https://imgur.com/pYzAzZS

 

https://imgur.com/7a1LWHp

 

Edited by Mattfrie1 : Fixed picture formatting, since the internal forum software wanted to shrink the picture size...

Share this post


Link to post
On 1/14/2018 at 8:17 PM, Mattfrie1 said:

- I also feel the need to point out that since the Saturn uses an entirely different sound engine from the PSX version, there was no possible way that this port could have supported sound reverberation effects, especially since the reverberation effect was a feature of the PSX's sound processor. As far as I know, the Sega Saturn's sound processor had no equivalent feature.

 

First at all, thanks for you research and post.

 

Only one note. SS have this effect by hardware. Even more effects. SS have a DSP in sound chip. The problem here is that not than easy use like PSX. In SS is necessary more work to make the same, and in this years, extra SoundBox for that. In the end of life all sound stuff improve it, and not necesary Soundbox, like the 3D and lighting  in SS.

 

Regards,

Share this post


Link to post
Posted (edited)

I've gotten a new capture card setup recently, so I figured I'd revisit my old friend Saturn Doom.


As stated on it's Doomwiki page, PSX Doom has a bug where lost souls outside of level boundaries can cause a level to get corrupted. I figured that since many aspects of PSX Doom are mirrored in the Saturn port, the bug would be possible to duplicate in this version as well.

 

 

The video features two instances of the bug happening. Perhaps the most interesting event occurs at the 3 1/2 minute mark where I look on the other side of a transparent gate texture. The game draws a bunch of random colored pixels on the other side of transparent textures. Although it is distorted, you can see some of the blocks of color flashing to different colors in a fixed pattern. The way they are laid out remind me of a color palette, but I have no way of proving exactly what it is at this time. The same effect can be spotted again for a split second right before the 9 1/2 minute mark on the other side of the cages where the pain elementals spawn in the final area. Not sure if this same thing happens when the glitch is done in PSX Doom, but I couldn't spot it from the one YouTube video that exists of the glitch.

 

I actually manage to exit the level on the first attempt shown in the video, but the game freezes on the other attempt. No error message or black screen like PSX Doom however (even though all the error messages remain in the Saturn version's code), just the screen freezing with the game's music still playing unaffected in the background.

Edited by Mattfrie1

Share this post


Link to post
On 6/25/2019 at 8:18 PM, Mattfrie1 said:

The game draws a bunch of random colored pixels on the other side of transparent textures. Although it is distorted, you can see some of the blocks of color flashing to different colors in a fixed pattern. The way they are laid out remind me of a color palette, but I have no way of proving exactly what it is at this time. The same effect can be spotted again for a split second right before the 9 1/2 minute mark on the other side of the cages where the pain elementals spawn in the final area. Not sure if this same thing happens when the glitch is done in PSX Doom.

 

Hey, I'm sure that rainbow thing means the back side of the midgate lacks the texture (on its other side only). I'm familiar with that thing, as happens in the psx as well (we did map conversions for [GEC] project where you often could see reason of this in your custom levels).

Share this post


Link to post

Thanks for the heads up @mr-around. Not surprising to hear the same thing happens in PSX Doom.

 

I've been looking around some more in a Saturn emulator to try to figure out some more clues as to how the game operates:

 

- Level rendering appears to be handled in the same way as the PSX version as described on the last page, but instead of using quads the system is using distorted sprites to draw each individual column. This was a very common practice that Saturn programmers used in many 3D games on the system, and rendering of these sprites is handled by the Saturn's VDP1 graphics chip. Keep in mind however Saturn Doom emulation is still very buggy, so I'm assuming this is actually how the system operates and not a bug of the emulator.

 

- There's a few Action Replay / Gameshark codes for the Saturn port floating around the web. Most of the codes are for rather simplisitic things such as maxing out your ammo or giving certain inventory items, but one is for changing the firing speed of your weapons which I found rather interesting. I messed around with the values on my actual console and found that setting the bytes to all zeroes cause the weapons to not load in at all, leaving you running around the level helpless. Setting to any other value besides 0001 causes weapon behavior to become very glitchy and hang up on random firing frames.

 

Using the Saturn emulator's memory editor for reference and the Action Replay I've been able to edit a few things here and there in memory without making the game crash. I'm trying to cross-reference with the PSX port as well (PSXDOOM.EXE from the game disc) to see any noticeable differences between the two.

 

- Changing the two bytes between LIGHTS and PLAYPAL change the overall intensity of the lights in a level. The higher the value entered, the darker the lighting becomes overall.

 

- In regards to this, the Saturn version looks like it could be using it's own unique PLAYPAL file instead of the one supplied in the main resource WAD. There is an extra file on the Saturn Doom disc called PLAYPAL.PAL which is referenced after LIGHTS in memory. Keep in mind that PSX Doom's PLAYPAL is still on the disc in the overall resource WAD (JIMSDOOM.WAD).

Share this post


Link to post

I've managed to somewhat fix the issue this port has with displaying the Doom II city sky for levels that originally had the animated fire sky in the PSX version. SKY3 from Ultimate Doom was converted to the new sky format for this version as well but never appears normally during gameplay (Stored as SKY03.CHR and SKY03.MAP). By switching around the order that the sky files are ordered in the system's memory will allow the previously unseen SKY3 to take the place of another sky texture.


I'm assuming that the Doom II Cityscape texture appears on the fire sky levels due to a simple programming error. The devs probably meant for the Inferno sky to take the place of the animated fire sky, but probably mistakenly point to the cityscape sky when loading in the level (SKY05 instead of SKY03 to %s.CHR and %s.MAP after P_LoadSectors).

 

 

I've also been looking more into why this version doesn't display colored lighting despite all the files and code still being in place:

 

- As mentioned in the previous post, Saturn Doom has it's own separate PLAYPAL file that it loads outside of the main IWAD. However when comparing this file with PLAYPAL extracted from the PSXDOOM.WAD shows absolutely no differences between the two files at all.

 

- Saturn Doom also has additional .PAL files for the fire sky that appears on the title screen, the title screen itself, the background of the cast sequence at the end of the game, the three legal/logo screens at the start of the game and unused files for IDCRED1 and IDLOGO. The aforementioned SKY20 and SKY21 also have .PAL files.

 

- I'm wondering since the LIGHTS lump wasn't included as it's own separate .PAL file could be a reason as to why colored lighting isn't displayed in-game, but it's only a theory at this point.

 

Finally as a random side-note, both DEMO3.LMP and DEMO4.LMP are identical files, which is why one of the demos appears to repeat itself twice.

Share this post


Link to post
Posted (edited)
1 hour ago, Mattfrie1 said:

- I'm wondering since the LIGHTS lump wasn't included as it's own separate .PAL file could be a reason as to why colored lighting isn't displayed in-game, but it's only a theory at this point.

No, it's because the game is rendered almost entirely by software and then put into the screen by the GPU. Just as in Vanilla Doom, and it limits the devs to the same old 256-color limit. Using colored lights like this looks absolutely horrendous so i guess that's #1 reason colored lights got cut.

 

EDIT: Wait no that's not the reason, i saw that video and there's full 16-bit (or 32-bit, not sure) color so that's not actually the reason colored lights got cut.

Share this post


Link to post
On 6/29/2019 at 2:30 PM, Mattfrie1 said:

- Level rendering appears to be handled in the same way as the PSX version as described on the last page, but instead of using quads the system is using distorted sprites to draw each individual column. This was a very common practice that Saturn programmers used in many 3D games on the system, and rendering of these sprites is handled by the Saturn's VDP1 graphics chip. Keep in mind however Saturn Doom emulation is still very buggy, so I'm assuming this is actually how the system operates and not a bug of the emulator.

I should note that "the system is using distorted sprites instead of using quads" is kind of erroneous thinking - the distorted sprites are the quads. I don't think any other means of rendering 3D geometry was used on the system (barring using the Mode 7-like effect one of the VDPs could do to a background layer - the Panzer Dragoon series used that one a lot to create vast expanses of things).

 

Also all of those graphics are typically paletted to my understanding, too; I'm guessing, but don't hold me to this, that there wasn't enough room in the Saturn's palette RAM to define all the colored lighting tints, so they just didn't bother. That said, perhaps I should poke at palette RAM and see what's actually loaded in there before I commit to this theory.

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

×