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

Is there a way to view data in PSX Doom IMG files?

Recommended Posts

I've been recently poking through my PSX Final Doom disc and I've come across something that may be of interest. As you may or may not know, PSX Final Doom has entries for a Map 31 and 32 on the disc, yet there are only 30 maps in game. Each PSX Doom level has roughly 5 files associated with it, a WAD file (ROM file on PSX Final Doom), 2 IMG files in the same folder for sprites and textures, and 2 LCD files for music samples and sound effects used on the level.

Now, the "extra" 2 maps of PSX Final Doom have no LCD files associated with them, and both the MAP31 and MAP32 ROM files and TEX IMG files have only 1KB of data (most likely just dummy data). However, the file MapSPR31.IMG has a "whopping" 642kb of data. I'm wondering if it could just be the sprite data for the ending cast screen as the MAP60SPR file from the PSX Doom disc is a similar size (a 4kb difference), but running both IMG files through a hex editor and comparing both files does come up with numerous minor 1 and 2 byte differences.

Anyway, does anyone know of a tool or am I just looking over something extremely obvious? All google searches and searches of this forum acknowledge the files existence, but no way to see the file's actual contents.

Also, yay 500th post.

Share this post

Link to post

The compression method is identical to the iwad compression.
You can find a description of the compression on the wad wiki page.
The IMG file's first 4 bytes are the size of the current chunk. (including the size field)
You can find the next chunk immediately after the current one.
The compressed data starts at 0x18 of each IMG chunk.
MAPSPR31.IMG contains no surprises.

Share this post

Link to post

Yes, the file's first 4 bytes are the size of the current chunk but, the offset 0x0C is the lump number of the PSXDOOM.WAD which gives the true size to decompile the lump


00 01 02 03|04 05 06 07|08 09 0A 0B|0C 0D 0E 0F|10 11 12 13|14 15 16 17|18 19 1A 1B


Off 0x00   |           |           |Off 0x0C   |           |           |Off 0x18   
58 02 00 00|C8 F4 0A 80|08 00 4A 1D|04 00 00 00|24 0C 0F 80|40 06 0F 80|00 03 00 13
chunk size |unk1       |unk2       |lump number|unk3       |unk4       |start      
           |           |           |PSXDOOM.WAD|           |           |decode     

Share this post

Link to post

Interesting, good to have more header info.
PSXDOOM.EXE also has a function (000228D4/800320D4) that determines the decompressed size by running through the control blocks and counting copies.

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