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

Broken wad file... is this repairable?

Recommended Posts

OK so I had this 2 map wad with lots of new entries which I added via XWE and built the maps in doombuilder1

it was really nice until I came home and the file was there but it contained Nothing

I tried to open my file with doombuilder and XWE but there is no maps, no textures and no other entry, it is totally clean and it was kinda scary since the file is still over 40 MB large

so, what should I do (exept enabling DB to make backup ever bloody time)?

it was jsut 2 maps but, those were great I tell you

Share this post


Link to post

Might be repairable but it's a job for a Hex editor. Could you upload a copy for inspection?

Share this post


Link to post
D_GARG said:

OK so I had this 2 map wad with lots of new entries which I added via XWE and built the maps in doombuilder1

it was really nice until I came home and the file was there but it contained Nothing

Yeah, XWE tends to do that when a file is opened simultaneously in it and in something else.

Share this post


Link to post
GreyGhost said:

Might be repairable but it's a job for a Hex editor. Could you upload a copy for inspection?


uploaded here : http://musho.org/gargwads/
file name is: -- THE FAKKED DOOMDESERT.wad

if you manage to fix it you may take a look on these maps ;) GZDOOM engine is used for these

your attention is highly appreciated C:

Share this post


Link to post

Haven't found anything in the wad that looks like a directory (which isn't a good sign) but I'll take another look in the morning when I'm slightly more awake.

Share this post


Link to post

No, there is no directory. So whether it is recoverable depends on what you want.

With a lot of work it might be possible to extract all lumps and save them under some generic file names.

If, however, you want to save the work compiling this file, I'm sorry bue there's nothing that can be done anymore. No directory means that all lump names have been lost forever.

(Yet another project nuked by XWE's inept file handling...)

Share this post


Link to post

It'd be possible, though tedious, to salvage the resources with a hex editor since text lumps are easy to find, and the PNG and OGG resources have identifiers letting one know where they end and start.

If one removed all these identifiable resources from the blob of data, then what would remain would be the maybe-salvageable map data.

Funny, isn't it? If you used UDMF, you could easily extract your map data with any hex editor and recover it this way. But with the old binary formats, forget it. There's no markers or signatures or identifiers anywhere, just raw data dump.

In any case, there's no warranty any map data wouldn't have been corrupted anyway. I looked to see if there were an XNOD/ZNOD/XGLN/ZGLN signature, as it would have allowed to find the vicinity of a map data, but no dice; either you used the vanilla node format, or nodes didn't get written, or the data was corrupted beyond recognition.

Share this post


Link to post

Do you have any backup files? If configured in a certain way, XWE can generate a new backup file at every save.

Share this post


Link to post

if the maps could be recovered, I'd be happy with that, I have a Very alpha backup but entire map02 is missing from there

I can restore everything exept the maps from scratch

Share this post


Link to post

Should have mapped in UDMF format then :P Getting the binary map data separated from all the other binary data without the file header/directory is a complete nightmare.

Share this post


Link to post

Ouch that's harsh. I had the same issue with XWE but I was lucky. I saved my map and noticed I had XWE and Doom Builder 2 open at the same time, probably due to me having to leave in the middle of adding textures. XWE refused to close... blah blah blah. My map ended up with lines stretched to hell and back. Thankfully DB2 had just backed up my map and I didn't lose any work.

It sucks you lost your work D_GARG. :/ Welcome to the club tho, I've lost work b4 including work on some Hexen 2 maps due to a weird Qoole bug..meh.

Share this post


Link to post
D_GARG said:

if the maps could be recovered

Haven't yet found anything that looks like a SIDEDEFS or SECTORS lump, so map recovery's still a somewhat forlorn hope.

Share this post


Link to post
GreyGhost said:

Haven't yet found anything that looks like a SIDEDEFS or SECTORS lump, so map recovery's still a somewhat forlorn hope.


gotta keep hope up, its ones strength

Share this post


Link to post
D_GARG said:

gotta keep hope up, its ones strength

He probably looked for texture and flat names and didn't find any...

Share this post


Link to post

all that is needed to save is sectors, lines, things

texureing can I take care of

Share this post


Link to post

Yeah but sectors and sidedefs contain texture names, so if you want to find map data you can look for texture names and you'll find them.

Share this post


Link to post

hmmmm .... which editor should I use to take a look around with?
kinda many out there

Share this post


Link to post

Hexplorer.

Edit: from a quick look around, I have bad news: not only have I not found anything resembling a directory (BTW, the header's stated WAD size entry has been zapped to 12 bytes, and the directory pointer to zero!), but there's nothing resembling a level, either. While I managed to find the PNAMES lump,there's no identifiable TEXTURES1 lump, and nothing resembling a LINEDEFS or SECTORS structure (if there was, there'd be readable references to names looking like textures).

I'd be looking for XWE's .backup files if I were you....if you find a backup created just before you started adding stuff, you might have a hope.

Share this post


Link to post

oh wow ... this wad project is SO Dead
thing is, I was building after Ive managed all decorate etc etc
and it is also possible that I shut down my PC in stress wile DB was saving the map

but I'll take a look around with hexplorer

Share this post


Link to post
D_GARG said:

and it is also possible that I shut down my PC in stress wile DB was saving the map


[/facepalm]

Share this post


Link to post

That's to be expected if you haven't used a hex editor before and binary data is pretty much impenetrable without some knowledge of its structure. For Doom wads Matt Fell's Unofficial Specs are a good starting point, though that assumes the wad is more or less readable and this one isn't. Without a directory, finding the SIDEDEFS and SECTORS lumps by searching for flat and texture names that would be embedded in them was the best hope for finding the maps. Unfortunately, I can't find them. :(

Maes said:

Hexplorer.

Interesting, I'll have to try that out.

Share this post


Link to post
D_GARG said:

and it is also possible that I shut down my PC in stress wile DB was saving the map


Very, very, VERY bad: due to the way WAD files are built, usually editors write the "directory" and stated PWAD file size as the very last item in a WAD file, once everything else is in place.

This allows for easy appending of resources and dynamically growing WAD files and resource tables, but has the side effect of losing everything if the write doesn't go all the way through.

Also, since you added your map as the last item in the file, it would normally get appended after all the sound & texture data, and then the table after that. Also, once these were written, the header of the WAD would be updated with the actual position of the resource directory, AND the stated size of the WAD file, including the header, any data gaps and the directory itself (yeah, you first have to find out how long the file you're writing written is gonna be, and then state it in the header).

Anyway, the point is when saving "inside" an existing WAD file: DB and most other editors first have to read all other data in the WAD file, copy it over (essentially creating a new temp WAD file) and then add your map as the very last thing, before the directory.

Interrupting it (especially with very large WAD files) may cause your map data to not even get actually copied (the fact that the directory was still set to 0 and the WAD size to 12 mean that the write didn't complete at all, and that you "severed" your WAD file, possibly losing non-map stuff too.

Keeping files open in XWE also causes the table and header to be considered "volatile", as they may change a lot. Only once you close a file they get actually written down in "fixated" PWAD files. There are safer ways of editing PWAD files, but at the expense of speed and memory.

TL;DR: that's one dead PWAD file. Sorry :-(

Share this post


Link to post
Maes said:

and nothing resembling a LINEDEFS or SECTORS structure (if there was, there'd be readable references to names looking like textures).

Not even vertices? I'd say those, along with linedefs, are the most important.

Share this post


Link to post
printz said:

Not even vertices? I'd say those, along with linedefs, are the most important.


Nope. Even the last lump (by order) is obviously compressed binary, so either PNG or OGG, without any VERTEXES-like regularity, and probably was cut short, too. That file was nuked way before reaching the map data, and probably didn't even save all previous non-map data before failing.

D_GARG, do you remember how large it used to be BEFORE you started editing it in DB?

Share this post


Link to post

The Bulletin of the Atomic Scientist moved the Doomsday clock to a minute til midnight upon receiving word that Quasar had learned of yet another wad file ruined by XWE. It is predicted that the next time this happens, his head will explode with multi-megaton force.

Share this post


Link to post

Remind me to somewhere else when that happens.

@D_GARG - to minimize the chances of this happening again, I'd suggest you keep maps and resources in separate wads until you're ready for final assembly, and backup! Backup! Backup!

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
×