Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Sign in to follow this  
Blastfrog

Dehacked (BEX) won't load in Boom (DOS)

Recommended Posts

For a project I've been working on for Boom, for the longest time I was testing it on ZDoom, even though it's for Boom. Bad idea. It works fine in ZDoom. but when I try to load the BEX file in the original Boom for DOS, it crashes and spits out an error at me, saying "Segmentation violation". It works fine in PrBoom, though. Picture of it here:

If it helps any, I'm using DosBox.

The BEX file that I'm working on is here: http://www.mediafire.com/?ssb9oj8ykucag89 Please help, I have no idea what is in there that it's not happy about. (note that this is an old version of my patch, but the exact same problem remains in the current version)

I've since removed the header information that whacked gave it, as I was told on another forum that this is what prevented it from working, but it still comes up with the same error.

Share this post


Link to post
Bloodshedder said:

Doesn't Boom use a separate -bex parameter?

-deh and -bex are considered aliases of each other, so that has nothing to do with this problem.

Share this post


Link to post

If you replace the two LoadShotgun code ptrs with LoadShotgun2 and OpenShotgun with OpenShotgun2 it should then load without the segmentation violation.

Share this post


Link to post
4mer said:

If you replace the two LoadShotgun code ptrs with LoadShotgun2 and OpenShotgun with OpenShotgun2 it should then load without the segmentation violation.

Any clue what's causing this? I'm thinking about pulling the old DJGPP setup off my Win98 box and compiling BOOM in debug mode just to try to find out what the culprit is. I have a few hunches already, of course, based on problems that were fixed in Eternity a long time ago...

Share this post


Link to post

The comparison of lookup with NULL probably:

typedef struct {
  actionf_t cptr;  // actual pointer to the subroutine
  char *lookup;  // mnemonic lookup string to be specified in BEX
} deh_bexptr;

...

deh_bexptr deh_bexptrs[] =
{
...
  // This NULL entry must be the last in the list
  {{NULL},             "A_NULL"},  // Ty 05/16/98
};

...

while (!found && (deh_bexptrs[i].lookup != NULL));
There will be no match.

Share this post


Link to post
Quasar said:

Any clue what's causing this? I'm thinking about pulling the old DJGPP setup off my Win98 box and compiling BOOM in debug mode just to try to find out what the culprit is. I have a few hunches already, of course, based on problems that were fixed in Eternity a long time ago...


The original doom actions are "Openshotgun2" and "Loadshotgun2".

There are no codepointers in the original Doom called "Openshotgun" and "Loadshotgun".

Share this post


Link to post
Vermil said:

The original doom actions are "Openshotgun2" and "Loadshotgun2".

There are no codepointers in the original Doom called "Openshotgun" and "Loadshotgun".

I knew that but it's not supposed to crash when this happens ;)

An error message is supposed to be issued, as such:

   } while (!found && (deh_bexptrs[i].lookup != NULL));
   if (!found)
      if (fpout) fprintf(fpout,
                         "Invalid frame pointer mnemonic '%s' at %d\n",
                         mnemonic, indexnum);
}
return;
The problem is that Ty Halderman has programmed it to look at the wrong field... it should be testing (deh_bexptrs[i].cptr != NULL), not lookup... I would assume this didn't crash under DOS always just by pure chance. I never actually ran into this during Eternity development, and the code hasn't existed there for years now since I added hashing to the lookup mechanism for efficiency.

Share this post


Link to post
Vermil said:

The original doom actions are "Openshotgun2" and "Loadshotgun2".

There are no codepointers in the original Doom called "Openshotgun" and "Loadshotgun".


That's not my fault, blame WhackEd2. I have to manually correct it in a text editor, and when I load the file in WhackEd2 again, it removes the code ponters and replaces them with Null.

Are there any better Dehacked editors that can edit BEX files out there? And if not, is there any way to fix this shit-tastic bug?

Share this post


Link to post

Open up boom.cfg in the /config directory of your WHackEd2 folder, find the "codepointermnemonics" section, and add the missing '2' to "OpenShotgun" and "LoadShotgun". Not sure why they're not there, though -- the version I have doesn't and I thought it was the latest (though a moot point for me since I use the WhackEd3 beta anyway).

Share this post


Link to post

Whacked 3?! I had no idea it existed. Is it possible that I could have a copy?

EDIT: Never mind, I found it.

Share this post


Link to post
Sodahollic said:

Are there any better Dehacked editors that can edit BEX files out there? And if not, is there any way to fix this shit-tastic bug?

I guess one can do a community service and improve the Whacked2 source code. Too bad it's in fricking Visual Basic.

Share this post


Link to post

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  
×