The Debug Mode

Aug 7, 2006 at 4:02 PM
The Bartender
"All your forum are belong to us!"
Join Date: Jun 18, 2006
Location: Montreal, Canada
Posts: 581
Age: 40
I would've posted this a little while back but I had no means of getting the offsets over here. No means, that is, until I found an item that would change my life! I speak of no other than... a pen and some paper.

Anyhow. This is for version 1.0.0.6

I've been using the debug mode for a little while and figured I'd share. It's nothing too fancy, but it saves quite a bit of time. Two menu options end up removed when the game creates the window, via the Win32 API. All's I did was locate the menu IDs, change the resource number to an invalid one, and since Pixel doesn't do error-checking in this part, the function fails to remove the menus quietly and moves on with the rest of the game.

00012D50 FF FF

The debug save menu allows you to save anywhere, anytime, and under any name (not just profile.dat.) Sadly it doesn't allow you to load anything but profile.dat, but it's good for backups.

00012D88 FF FF

The mute menu can mute any of the 8 sound channels. Useless, but interesting.

The game also produces a debug.txt file, but the function never seems to be called. I never bothered to look into it.

Enjoy!
 
Aug 7, 2006 at 5:27 PM
Hoxtilicious
"Life begins and ends with Nu."
Join Date: Dec 30, 2005
Location: Germany
Posts: 3218
Age: 33
Pronouns: No homie
Hmm I changed the $12D50, $12D51 and $12D89 all to FF but there is a Debug Save Menu and a Mute Menu but It wouldn't produce a debug.txt file... If I change $12D88 to FF the game crashes O_o
 
Aug 7, 2006 at 5:39 PM
The Bartender
"All your forum are belong to us!"
Join Date: Jun 18, 2006
Location: Montreal, Canada
Posts: 581
Age: 40
I could be off by one for the offset, but either way 89 sets a different menu ID (that doesn't exist) so it comes out being the same. I jotted this down on a piece of paper in a hurry - it's basically just a matter of changing the values the two PUSH instructions push on the stack.

You might want to re-read my post again. I never said anything about there being a debug.txt file when editing these two values. ;)
 
Aug 28, 2006 at 2:55 PM
Senior Member
"Huzzah!"
Join Date: Mar 24, 2006
Location:
Posts: 194
Age: 35
Pronouns: he/him
it doesn't work for me at all
 
Aug 28, 2006 at 3:13 PM
The Bartender
"All your forum are belong to us!"
Join Date: Jun 18, 2006
Location: Montreal, Canada
Posts: 581
Age: 40
Seeing as it worked for ShiningPhantom, I'm going to assume you either don't have 1.0.0.6 or you have been unable to follow my instructions in the way SP did. Try it again, and make sure your copy of CS is the right version. Otherwise, take a stroll through the assembly dump I posted in the assembly thread and locate the two PUSH instructions I mentionned in my post (now would be a good time to experiment with Discrete.)
 
Aug 28, 2006 at 4:39 PM
Senior Member
"Huzzah!"
Join Date: Mar 24, 2006
Location:
Posts: 194
Age: 35
Pronouns: he/him
I have version 1.0.0.6 & I changed the adresses $12D50, $12D51 and $12D89 to FF
& I get no debug option in the menu screen & like ShInInG PhAnToM said the game crashes if I change $12D88 to FF
 
Aug 28, 2006 at 4:49 PM
The Bartender
"All your forum are belong to us!"
Join Date: Jun 18, 2006
Location: Montreal, Canada
Posts: 581
Age: 40
There is no reason why it wouldn't work for you if it worked for a few other people already. Assuming you aren't mistaken about your version number (which I doubt, frankly... let's not look for problems where none exist) chances are you've simply patched the wrong offsets.

Take a look at the assembly dump and change the menu IDs (they're 4000-something, if memory serves right, something around 0x9C00-0x9D00 give or take.) They should be REALLY easy to spot. Just locate those and change them to 0xFFFF.
 
Aug 28, 2006 at 6:28 PM
Junior Member
"Wow! The more I drink of this magical beverage, the more games I can play! Wheee!"
Join Date: Nov 30, 2005
Location:
Posts: 25
It's easy to do this in Resource Hacker. Open the EXE, then open the Menu folder, than MENU_MAIN, then 1033. It should show the names of all the Menu options, including Debug Save and Mute. Duplicate Debug Save and Mute so it looks like this:
diph.php

After you do that, click "Compile Script" then save and exit. The options should be available, and they won't have any problems as far as I know.
 
Aug 28, 2006 at 6:39 PM
The Bartender
"All your forum are belong to us!"
Join Date: Jun 18, 2006
Location: Montreal, Canada
Posts: 581
Age: 40
Anything that will invalidate the resource IDs for the menus will work. Be it editing the resource script or the call which masks the menu. ;)

But of course, the assembly way is a good way to practice learning assembly, being such an easy modification.
 
Aug 28, 2006 at 10:48 PM
Senior Member
"Huzzah!"
Join Date: Mar 24, 2006
Location:
Posts: 194
Age: 35
Pronouns: he/him
RuneLancer said:
There is no reason why it wouldn't work for you if it worked for a few other people already. Assuming you aren't mistaken about your version number (which I doubt, frankly... let's not look for problems where none exist) chances are you've simply patched the wrong offsets.

Take a look at the assembly dump and change the menu IDs (they're 4000-something, if memory serves right, something around 0x9C00-0x9D00 give or take.) They should be REALLY easy to spot. Just locate those and change them to 0xFFFF.

nope I have version 1.0.0.6 & I patched the right offsets

does it ony work on an unmodified exe?
 
Aug 30, 2006 at 6:51 PM
The Bartender
"All your forum are belong to us!"
Join Date: Jun 18, 2006
Location: Montreal, Canada
Posts: 581
Age: 40
Care to post the code at the lines you patched, and a line or two from your hex editor around those offsets? I'll see if anything's missing.
 
Sep 5, 2006 at 9:04 PM
Hoxtilicious
"Life begins and ends with Nu."
Join Date: Dec 30, 2005
Location: Germany
Posts: 3218
Age: 33
Pronouns: No homie
hmm maybe you started in fullscreen? u must start in window mode ^^
 
Back
Top