Is there an intro to hex editing/patching anywhere?

Anything related to Keen Modding.
Post Reply
User avatar
Paramultart
Posts: 86
Joined: Sun Jul 11, 2010 2:19 pm
Contact:

Is there an intro to hex editing/patching anywhere?

Post by Paramultart »

I've been going nutso fiddling with unpackers, hex editors, IDA and the DosBox debugger with the close assistance of ny000123, and I must say that I feel I am in over my head, and perhaps even absolutely lost. The DosBox debugger doesn't let you monitor the data/code overview in real-time, so it seems pretty useless for finding the offsets for useful variables. What approach should I be taking here? I am eager to learn, but I can't seem to find any relevant information or tutorials anywhere.
It should be noted that the game I'm trying to edit is not Keen, and it has been successfully unpacked with PKLITE.
Any help would be greatly appreciated.
levellass
Posts: 3001
Joined: Wed Oct 11, 2006 12:03 pm
Location: Ngaruawahia New Zealand

Post by levellass »

Ok, so what are you trying to do and how are you trying to do it?

Most of what I do is just simple tweaks, basic patches to non-Keen games. For this I use XVI32 which I open the executable in,search for stuff and tweak directly.

Of course I can speak machine code.


If you're looking at say, Monster Bash and you want to pick apart the game itself much like Keen then you'll want something more robust and Lemm is your go-t guy.


I should also note that making a CKPatch for other games is a trivial affair if you have its source code, it's how the Dave and Biomenace PATCHers were made.
User avatar
Paramultart
Posts: 86
Joined: Sun Jul 11, 2010 2:19 pm
Contact:

Post by Paramultart »

Monster Bash is correct. I'm trying to learn how to tweak certain variables, such as enemy speed, health, et cetera. I have no idea where to even start looking for the right places to modify.
levellass
Posts: 3001
Joined: Wed Oct 11, 2006 12:03 pm
Location: Ngaruawahia New Zealand

Post by levellass »

Well if'n it was me, first thing I'd do is find the sounds file. Then I'd try and tweak the highest (And thus least common) sound variable, which would tell me how the game handles sounds.

From that I'd then easily be able to get a list of all the sounds in the game and their location (As you can see I have done with all the Keen games on the wiki.)

An enemy's code will be near where its sound is, this will tell me the location of a few enemy's codes and let me see how the game handles things like speeds.

Having got one speed I would then know how the game handles at least half its speeds and would be able to make a list of unknown speeds in the game.


And so on, given a quick way to patch and the decompressed executable it'd take two weeks or so to pull out a basic framework of what is what. Of course you'd need a patch program to interest me, I work well with the xPatches.
User avatar
Paramultart
Posts: 86
Joined: Sun Jul 11, 2010 2:19 pm
Contact:

Post by Paramultart »

levellass wrote:Well if'n it was me, first thing I'd do is find the sounds file. Then I'd try and tweak the highest (And thus least common) sound variable, which would tell me how the game handles sounds.

From that I'd then easily be able to get a list of all the sounds in the game and their location (As you can see I have done with all the Keen games on the wiki.)

An enemy's code will be near where its sound is, this will tell me the location of a few enemy's codes and let me see how the game handles things like speeds.

Having got one speed I would then know how the game handles at least half its speeds and would be able to make a list of unknown speeds in the game.


And so on, given a quick way to patch and the decompressed executable it'd take two weeks or so to pull out a basic framework of what is what. Of course you'd need a patch program to interest me, I work well with the xPatches.
This sounds like a wonderful method, and I am quite possibly a dull and perseverant enough man to carry out these tasks... But how does one find that initial variable?
levellass
Posts: 3001
Joined: Wed Oct 11, 2006 12:03 pm
Location: Ngaruawahia New Zealand

Post by levellass »

By the looks of things you've already got a good grip on things. I've uploaded a list of all the MB sounds I could find. Since you know what they are that will let us pinpoint a few bits of code. (I see you found the Player_jump).
User avatar
Paramultart
Posts: 86
Joined: Sun Jul 11, 2010 2:19 pm
Contact:

Post by Paramultart »

Yeah, Lemm and ny00123 have taught me a lot.
One mistake I made in that .jpeg you're referring to is that I had the values as ten 8-bit values rather than five 16-bit values. I now have a better understanding of how the actor structures work. Glad to see you aboard the project.
levellass
Posts: 3001
Joined: Wed Oct 11, 2006 12:03 pm
Location: Ngaruawahia New Zealand

Post by levellass »

By the looks of things it's already beyond me. Lemm has taken complete control.
Post Reply