News:

11 March 2016 - Forum Rules

Main Menu

Wolfenstein3D - SNES Uncut hack

Started by Fire-WSP, March 19, 2018, 10:19:14 PM

Previous topic - Next topic

Fire-WSP

I am working on a uncut hack for Wolfenstein3D on the SNES.
The goal is to restore the stuff which was censored because of Nintendo's guidelines back then.
Somebody else did somesthing similar for the wall textures already but there he just scaled the GFX down to 32x32.

In the original Game and in that hack, lots of the wall textures are poorly scaled.
Since they are just 32x32 they need some optimazion too.
I reworked the sprites and cleaned the pixels.
Here is a example:


Replacing the wall textures in the game is no problem. I use TileMolester.
They can be found at offset 0x020000 8Bit linear 2Dimensional
For the Palette I am using a zsnes save state.

The walls are already in the game.
Titlescreen and other ingame screns are also no problem.
The problem are the Sprites for the enemies and some other stuff.
I want to replace them with the sprites from the beta version because they are completely uncut
in there except for the dog/rat.

Sprites start at Offset 0x030000
With Tilemolester I can recognize them and see parts of them clearly
when set to 8Bit linear 2Dimensional. I dont think there is any compression.
But I can not get a clear picture. 8bit linear is propably the wrong format.
I tried others but that did not work either.
Can anybody point me in the right direction?

Thanks


sluffy

All I can think atm is that they're packed funny. Meaning per row or columns. Data interleaved with 8-bpp graphics. Probably need a tool to get at them correctly.

SCD

#2
That's really cool that you're going to make a uncensored hack for the SNES port of Wolfenstein 3D.

You did a great job on decensoring those wall tiles, they came out great.

You can try using the YY-CHR tool to check out the sprites.

The next stuff you should do is:

Replace the rat enemy with the original dog enemy.
Restore Hitler's mustache & gory death.
Switch the music tracks of the first two levels around.
Replace the voice tracks of both the enemies & the bosses with the ones from the Jaguar port.
Restore the blood back to the enemies, the bosses & some of the decorations.

Fire-WSP

#3
Quote from: sluffy on March 19, 2018, 11:37:49 PM
All I can think atm is that they're packed funny. Meaning per row or columns.
Data interleaved with 8-bpp graphics. Probably need a tool to get at them correctly.

Yes it seems so. The info I got from the guy who made the the phyton extractor told me,
that the GFX inside the SNES rom is basically the same way stored like in the VGA version.
Here is that extractor script:
https://github.com/adambiser/snes-wolf3d-extractor

It was done for the PC Wolf3D community to exctract all the content from a SNES rom.
It works with SNES US/JP/EU and both beta versions without problems.
It extracts everything including sound and music but both will be converted on the fly to wav.
So that WAV part is not helpful for us.
Also it extracts the map files but converts them to the PC version format.
So with the extracted material you can directly put everything in the PC version
and play the SNES version on the PC.

But this tool was not made for any console hacking in mind.
It is one way only. There is no way to put the stuff back in the rom with it
and the autor of this tool has no time for it.

The tool is good but for the wall textures for example it is not necessary needed.
for that Tilemolester is very good.

Here is the code part for how the script is extracting the GFX and Sprites:
https://github.com/adambiser/snes-wolf3d-extractor/blob/master/extractor/roms/wolfenstein_3d.py
The sprite stuff starts at line 160 or so.

I can do all the GFX stuff but I do not have the skillz for a tool or own script to put the stuff back.
I would like to ask for help here.

Quote from: SCD on March 20, 2018, 01:15:20 AM
That's really cool that you're going to make a uncensored hack for the SNES port of Wolfenstein 3D.
You did a great job on decensoring those wall tiles, they came out great.
You can try using the YY-CHR tool to check out the sprites.
The next stuff you should do is:
Replace the rat enemy with the original dog enemy.
Restore Hitler's mustache & gory death.
Switch the music tracks of the first two levels around.
Replace the voice tracks of both the enemies & the bosses with the ones from the Jaguar port.
Restore the blood back to the enemies, the bosses & some of the decorations.

Thanks. :)
I have already most of your points on my list and even a few more.
My brother is a real WOlf3D crack. He pointed me already to all the things that should be done ^^

There is however one problem with the Wall Tiles I saw already.
In the snes game the wall sprites are often mirrored for some reasons I dont know.
With the original censored GFX this does not matter but if you put in the correct
uncut GFX, it can look very weired if symbols appears mirrored.
This is something to look into.

In general it seems that this game uses fancy storing but no compression
With the tool source infos above maybe somebody with coding or scripting
skillz can whip up some code/script?

GFX wise it is not a big thing but it stays or falls with the ability to touch the sprites.

SCD

#4
You're welcome, I'm glad that you like all the stuff from my list and you had most of them in your list.

One thing I forgot to add on there is you should change H.P. & Shot back to being called Health & Ammo on the HUD once again, like it was in the prototype version, including it will make it look more like the PC HUD.

Fire-WSP


SCD

Alright, that's cool to hear.

Including you should also change all the mission briefing scripts to the ones from the Jaguar port as well.

My theory on why it mirrors the tiles is maybe it's a mode 7 thing, but I'm not sure.

Fire-WSP

Thanks for the suggestions. We will come to this eventually but first I want to clarify the sprite stuff.
A proper uncut hack makes no sense if we can not touch them ;)

sluffy

a6054 = hud sprites, plus weapons
4-bpp planar composite, 1-dimensional


Jumping back on Canoe so won't spend much on this.

Squall_FF8

Quote from: Fire-WSP on March 19, 2018, 10:19:14 PM
Sprites start at Offset 0x030000
With Tilemolester I can recognize them and see parts of them clearly
when set to 8Bit linear 2Dimensional. I dont think there is any compression.
But I can not get a clear picture. 8bit linear is propably the wrong format.
I tried others but that did not work either.
Can anybody point me in the right direction?

I'm surprised that you can see something ... the internal format is quite complicated:
    def load(self, rom):
        self._load_palette(rom)
        rom.seek(self.offset)
        """Loads and converts sprite data into pixel data."""
        pixels = [[self._transparency_color_index for x in range(self._width)] for y in range(self._height)]
        page_offset = (self.offset & 0xffff0000)
        pixel_x = (self._width - self._column_count) / 2
        for line in range(self._column_count):
            rom.seek(self.offset + line * 2)
            line_offset = page_offset + rom.read_ushort()
            while True:
                rom.seek(line_offset)
                line_offset += 6
                top_y = rom.read_ushort()
                if top_y == 0xffff:
                    break
                top_y >>= 1
                bottom_y = rom.read_ushort() / 2
                pixel_offset = rom.read_ushort()
                rom.seek(page_offset + pixel_offset + top_y)
                for y in range(top_y, bottom_y):
                    pixels[y - 1][pixel_x] = rom.read_ubyte()
            pixel_x += 1
        self._pixels = pixels


Now I don't know Python, but from what I understood:
- the sprites are help by columns, rather regular by rows
- for each column you read start and end index
- weird addressing: page_offset = (self.offset & 0xffff0000) ... why use only upper nibble from the offset?
- marker for end: if top_y == 0xffff: break
Welcome to the FF5 Den: https://discord.gg/AUqDF85

zstandig

Have you checked the prototype?  That one had some uncensored stuff.

https://tcrf.net/Proto:Wolfenstein_3D_(SNES)

Fire-WSP

Quote from: zstandig on March 20, 2018, 03:39:32 PM
Have you checked the prototype?  That one had some uncensored stuff.

https://tcrf.net/Proto:Wolfenstein_3D_(SNES)

That is from where we will take the sprites.

Squall_FF8

Fire-WSP, I tried to see walls in Tilemolester, but couldn't. Could you tell me exactly what adress and settings you use? (maybe a screenshot too)
Also if you can share a screenshot of what you see as sprites.
Welcome to the FF5 Den: https://discord.gg/AUqDF85

Fire-WSP

Here is a quick video on how you can find the wall tiles and also what we can see from the sprites.
https://www.dropbox.com/s/p0jdby5wamy7yt1/W3DTiles.mov?dl=0

I have now finished all the Wall Tiles and put them into the rom.
I make a IPS file later and put a link here.

Squall_FF8

Great, worked as charm, Thank you very much!

As a token of appreciation, I did some digging based on the export tool you shared, so I will share my results, might be helpful for you:
- You will need this tool: Visual SAK
- Get this file: Wolfenstein 3D.vsk

In order to view what I found, first start the tool, open Wolfenstein 3D (USA) ROM and then open Wolfenstein 3d.vsk  :beer:
Welcome to the FF5 Den: https://discord.gg/AUqDF85

ShadowOne333

I gotta say I'm very excited about this project.
The SNES version always got the backlash because of the awful censorship that Nintendo did during the NES/SNES times.
It's amazing to hear that people are working on restoring the uncensored material to the SNES ROM. :)

SCD's suggestions are also very good, if they can be implemented we will have the closest thing to one of the best ports of Wolfenstein 3D on a console (that's not the 3DO version lol).

Though, I'd be happy if we get the uncensored sprites and putting the right music tracks and levels in the correct order will do it for me :P
Restoring the Soldier's German quotes would be a cherry on top of the cake and a milestone if it can be done.

Fire-WSP

@Squall_FF8
I just tried your tool. Works out great. Cool program.
Just this "button 2" makes some fancy stuff. Getting a Access Violation.

Saving everything into a file to open it later again is cool.
With TileMolester I always need to do everything again and sometimes this sucks.
As a suggestion, it is cool to always see the correct palette from the game on the right side.
It would be very helpful if that palette could be saved to a 8bit indexed png file to always work
in the correct palette space for the GFX.
The Status Bar for example is using the full Pal of the game and it would be nice to have
that pal as a clean picture.







Squall_FF8

Quote from: Fire-WSP on March 21, 2018, 01:02:51 PM
@Squall_FF8
I just tried your tool. Works out great. Cool program.
Just this "button 2" makes some fancy stuff. Getting a Access Violation.
Thank you very much! It is still WIP. I forgot to remove the last experiments I've done trough "Button 2", sorry  :-[

QuoteSaving everything into a file to open it later again is cool.
With TileMolester I always need to do everything again and sometimes this sucks.
Yes 'saving' and 'naming' GFX was one of the main goals. This allow continuation of your work rather always start from scratch.

QuoteAs a suggestion, it is cool to always see the correct palette from the game on the right side.
It would be very helpful if that palette could be saved to a 8bit indexed png file to always work
in the correct palette space for the GFX.
The Status Bar for example is using the full Pal of the game and it would be nice to have
that pal as a clean picture.
Thank you for the suggestion! I'm planning on saving/loading the palette in a number of popular formats (Windows Pal, Ace,...). On top of that each GFX holds its own palette. Currently you can load a palette from the ROM, as far as you know the address.

One trick - since most of the GFX use the same palette, you may copy the ROM address from 'Status Bar' and then just paste on every GFX that need same palette and click 'Load Palette'  :thumbsup:

Welcome to the FF5 Den: https://discord.gg/AUqDF85

John Enigma

This project looks cool, @Fire-WSP.

Do you think you can do an "Uncut" hack for DOOM for SNES in the future as well?

Fire-WSP

Okay guys, here is my first patch for you to try.
https://www.dropbox.com/s/s8flsw7b1xrf5xv/Wolf3D%28USNTSC%29WallsUncut.zip?dl=0

Use this on the latest NoIntro US rom of Wolfenstein3D.
This replaces all the censored Walls.
Most textures have been cleaned up and optimized for a 32x32 resolution.

Next I want to clean up the Mission Briefing picture. The original picture is in a bad quality with a automated pixel patern for reducing colors. Very ugly.

Also now would be the perfect time for a Sprite ex/importer  ;D

@John Enigma I don't know yet if I would touch it. Also it is Super FX. Could be much more complicated.