Kodewerx
https://www.kodewerx.org/forum/

Setting a Watchpoint/Breakpoint?
https://www.kodewerx.org/forum/viewtopic.php?f=2&t=6286
Page 1 of 1

Author:  Zamurick [ Tue Nov 11, 2008 6:28 pm ]
Post subject:  Setting a Watchpoint/Breakpoint?

Both the "Killing Timers" and "Walk Through Walls" tutorials in the EnHacklopedia mention using a write watchpoint or a breakpoint on write, but I can't find any information anywhere regarding how to set any type of watchpoint or breakpoint, so that kind of makes it difficult to follow.

Sorry to ask another question so soon, but without this bit of info, both of the guides are somewhat useless.

Author:  HyperHacker [ Tue Nov 11, 2008 11:23 pm ]
Post subject:  Re: Setting a Watchpoint/Breakpoint?

I do it by clicking Add in the breakpoint window and typing the address range, optionally separated by a hyphen, prefixed with 'r' for read, 'w' for write, or 'x' or nothing for execute. You, however, may use a different method depending what system and hacking tools you're talking about.

Author:  Hextator [ Wed Nov 12, 2008 2:31 pm ]
Post subject: 

I usually end up hitting "Toggle break point" while a NOP instruction in the middle of some code I wrote is selected such that the NOP only executes when the address of concern is being accessed, thereby granting me a break on read or write.

And I usually do that with Cheat Engine, which I do NOT recommend for debugging if you don't even know what a break or watch point is (hopefully you will soon; it's not hard to Google what they are).

LOL at HH's "descriptive" post.

Author:  Zamurick [ Wed Nov 12, 2008 5:20 pm ]
Post subject:  Re: Setting a Watchpoint/Breakpoint?

HyperHacker wrote:
I do it by clicking Add in the breakpoint window and typing the address range, optionally separated by a hyphen, prefixed with 'r' for read, 'w' for write, or 'x' or nothing for execute. You, however, may use a different method depending what system and hacking tools you're talking about.


Could you explain what software you're using?



I'd use Zeld's method but I've no idea how to use ASM to tell when an address has been accessed, as Google seems to have a lack of good information on assembly.

Author:  HyperHacker [ Wed Nov 12, 2008 11:15 pm ]
Post subject:  Re: Setting a Watchpoint/Breakpoint?

I'm using an old version of the Linux port of Mupen64Plus. If you're hacking N64 on Linux, that's probably what you want to use too. Unfortunately we still have no idea what game, system, or code you're trying to hack and what OS, software, and hardware you're using to do it.

Author:  Zamurick [ Thu Nov 13, 2008 3:40 pm ]
Post subject:  Re: Setting a Watchpoint/Breakpoint?

Ah, my apologies.

I'm using Windows Vista Home Premium x86 (32-bit), and I'm trying to hack a Walk Through Walls code for a Nintendo DS game.

Author:  jleemero [ Thu Nov 13, 2008 4:53 pm ]
Post subject:  Re: Setting a Watchpoint/Breakpoint?

HyperHacker wrote:
we still have no idea what game, software, and hardware you're using to do it.

Author:  Zamurick [ Thu Nov 13, 2008 5:19 pm ]
Post subject:  Re: Setting a Watchpoint/Breakpoint?

Castlevania: Order of Ecclesia and Renegade64/No$GBA.

I don't understand what you mean by what hardware I'm using.

Author:  Parasyte [ Fri Nov 14, 2008 6:06 pm ]
Post subject:  Re: Setting a Watchpoint/Breakpoint?

Since you are using an emulator, no hardware is involved (generally speaking).

I avoid no$xxx like the plague, so I have no idea if it can do anything.

I was going to make the suggestion that you could wait for someone to add a debugger to a decent emulator or wait for our "Universal Debugger Project" ... but then I realized: 1) There are no decent Nintendo DS emulators. 2) The "best" NDS emulator is not open source, so no one is capable of fixing or replacing its shitty debugger. 3) The asshat author will never embrace upon standards like what we are developing, so that option is shot to hell, too.

Sounds a bit like you're SOL. Good luck!

Author:  Zamurick [ Fri Nov 14, 2008 8:08 pm ]
Post subject:  Re: Setting a Watchpoint/Breakpoint?

Having someone or a team of members code an emulator to go with this "Universal Debugger Project".

Author:  HyperHacker [ Sat Nov 15, 2008 8:53 pm ]
Post subject:  Re: Setting a Watchpoint/Breakpoint?

Sentence fragment.

Author:  Hextator [ Sat Nov 15, 2008 9:23 pm ]
Post subject: 

You don't need to do any debugging to make a walk through walls code.

I wrote the pseudo code for the walk through walls code I used for Metroid Prime: Hunter's working walk through walls code on GFAQs in the Order of Ecclesia board where someone had requested a walk through walls code for the same game as the one you want to make it for.

I broke down pretty much the whole process over there if you feel like digging through the thread called Action Replay.

Including a possible, easier alternative to making the code.

Hell, you could just wait for someone else to make the code.

A code like walk through walls is actually very easy in spite of the time it takes to make it (sometimes).

An exception would be Super Mario 64 because of its ungodly collision routines.

Just a note, Para, regardless of how bad Martin's implementation of standards may be, his debugger really is an excellent tool. I'm not saying you have to use it, but you should know that if you ever do, it will likely meet the (likely minimum) requirements you have for getting use out of it, though it certainly won't meet your requirements for making it into something as limitless and encompassing as a UD - don't be afraid to suggest it to others unless you're worried about the promotion of your UDP.

Author:  Zamurick [ Sat Nov 15, 2008 10:39 pm ]
Post subject:  Re: Setting a Watchpoint/Breakpoint?

HyperHacker wrote:
Sentence fragment.

Whoops, I meant to add "wouldn't be a bad idea" to the end of that.

*Goes to look for said thread*

Author:  HyperHacker [ Sun Nov 16, 2008 2:10 pm ]
Post subject:  Re: Setting a Watchpoint/Breakpoint?

The proper response is "'Sentence fragment' is also a sentence fragment", but anyway.

True, No$GBA's debugger is quite powerful when it works, but a proper open-source emulator with a remote debugging protocol would be a lot better, as it'd be expandable, fixable, portable, and not go to such efforts to annoy you every time you use it "for antipiracy purposes". :roll: (Passwords, what the shit? If he put as much effort into improving the program as he does into ineffective DRM, it'd be incredible.)

Author:  Zamurick [ Sun Nov 16, 2008 2:59 pm ]
Post subject:  Re: Setting a Watchpoint/Breakpoint?

I'm actually thinking about buying the debug version of No$GBA, as I don't mind its quality at all. My only complaint is the problems with TWEWY and the lack of support for games which are played with the DS sideways.


@Zeld: Basically increasing the speed at which the Y coordinate changes would somewhat trigger a walk through walls effect?

Author:  Hextator [ Sun Nov 16, 2008 5:45 pm ]
Post subject: 

What? No. There's a glitch that makes it look that way in Metroid Prime: Hunters, but the concept here is that if YOU modify your Y AND X coordinates, then you're doing so outside of the routine the game normally does so in where the position validation (collision detection, and maybe other stuff) occurs, so the game doesn't know to keep you within bounds.

If you only change your Y coordinate you'll only be able to pass through floors and ceilings, as far as 2D games go.

Author:  Zamurick [ Sun Nov 16, 2008 6:43 pm ]
Post subject:  Re: Setting a Watchpoint/Breakpoint?

I actually meant to say X coordinate. My bad, not that it's relevant since I'd have to change both of them.

But wouldn't modifying your X and Y coordinates just warp you to the coordinates you've set and keep you there?

Author:  HyperHacker [ Mon Nov 17, 2008 5:56 pm ]
Post subject:  Re: Setting a Watchpoint/Breakpoint?

Yes, but his codes basically re-implement movement, so that you can move to wherever you want. A rather roundabout way to bypass hit detection, but it's portable.

Author:  Hextator [ Mon Nov 17, 2008 8:27 pm ]
Post subject: 

Precisely.

Now, we're not SETTING X and Y. We're incrementing or decrementing them based on user input.

This is achieved with the E code type on GBA games.

With the DS, you should be using the load value code types, the add to value code type, and then the store code types, also with user input based activators to achieve the same effect.

You have no idea how many codes I've made using just a small amount of information from a game, given to me by someone else, and applying basic code making algorithms like this to make codes for games I don't even play until after I've made the code.

If you want to be a good hacker you'll have to read over lots of the better codes and see how they work, because you'll eventually get to a point where you know how to make a code just by reading someone's notes.

Author:  Zamurick [ Tue Nov 18, 2008 6:22 pm ]
Post subject:  Re: Setting a Watchpoint/Breakpoint?

I've made the assumption that using ASM would be easier than using said code types, but my assembly knowledge is very limited.

The following code should simply add 5 to the value of the X address...

Code:
x:
.word 0x0218E046

ldr r0,x
ldr r1,[r0]
add r1,#5
str r1,[r0]
bx r14


But because of an error I can't identify (due to my lack of knowledge on ASM), it's not working when I add the D-Pad right activator to Kenobi's ASM to ARDS output.

In theory this will just raise the X coordinate by five when I press right on the D-Pad.

ARDS Code:
Code:
94000130 FFEF0000
023FE074 012FFF11
E0000000 00000018
E59F000C E5901000
E2811005 E50F1008
E12FFF1E 0218E046
023FE074 E3520003
D2000000 00000000



What's wrong? :?

Author:  HyperHacker [ Wed Nov 19, 2008 12:10 am ]
Post subject:  Re: Setting a Watchpoint/Breakpoint?

Doesn't ARDS have code types to add to a variable, instead of needing ASM?

Author:  Zamurick [ Wed Nov 19, 2008 8:26 am ]
Post subject:  Re: Setting a Watchpoint/Breakpoint?

The only thing I can find is adding to a data register.

Author:  Zamurick [ Wed Nov 19, 2008 6:42 pm ]
Post subject:  Re: Setting a Watchpoint/Breakpoint?

Code:
94000130 FFEF0000
DA000000 0218E046
D4000000 00000001
D7000000 0218E046
D2000000 00000000
94000130 FFDF0000
DA000000 0218E046
D4000000 FFFFFFFF
D7000000 0218E046
D2000000 00000000
94000130 FF7F0000
DA000000 0218E04A
D4000000 00000001
D7000000 0218E04A
D2000000 00000000
94000130 FFBF0000
DA000000 0218E04A
D4000000 FFFFFFFF
D7000000 0218E04A
D2000000 00000000


I just got this working for Sonic Rush Adventure, but gravity is getting in the way.

I thought the following would basically rule out gravity by locking the X and Y coordinates when no buttons were pressed...

Code:
A4000130 FFCF0000
DA000000 0218E046
D7000000 0218E046
D2000000 00000000
A4000130 FF3F0000
DA000000 0218E04A
D7000000 0218E04A
D2000000 00000000


But it didn't. >_>



EDIT: I got it working. The gravity thing was simple enough, I just changed the moon jump so the Y speed was zero and removed the activator, which causes the character to slowly descend instead of falling quickly.

I also had to use a pointer to get it working on all levels.


Final Code:
Code:
92133CD4 00000001
62133884 00000000
B2133884 00000000
0000009C FFFFFFFF
D2000000 00000000
94000130 FFEF0000
B2133884 00000000
B000052C 00000000
DA000000 00000046
D4000000 00000001
D7000000 00000046
D2000000 00000000
94000130 FFDF0000
B2133884 00000000
B000052C 00000000
DA000000 00000046
D4000000 FFFFFFFF
D7000000 00000046
D2000000 00000000
94000130 FF7F0000
B2133884 00000000
B000052C 00000000
DA000000 0000004A
D4000000 00000001
D7000000 0000004A
D2000000 00000000
94000130 FFBF0000
B2133884 00000000
B000052C 00000000
DA000000 0000004A
D4000000 FFFFFFFF
D7000000 0000004A
D2000000 00000000


Thanks everyone. :D

Page 1 of 1 All times are UTC - 8 hours [ DST ]
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/