Need help with a code for Samurai Warrior Katana Pal

Started by lindtec, July 27, 2008, 09:58:50 AM

Previous topic - Next topic

lindtec

The problem with Pointer Search in WiiRD is, that you need two different
addresses (and two RAM-Dumps of different levels).

Since the address I want to change stays the same in each level (816B6084),
this Pointer Search won't work.

Whats the "hard" way, you mentioned.

James0x57

I'm sure that it would work if you just use the same address..



If not:
While 816B6084 is the address for the code,
Do a 32bit search for 816B????   The ? means any value.
Look at the results. Typically the pointer will have a value lower than the code address (so the offset is positive).
To narrow the results, check that the code address is still the same first. Then do equal to last searches.

If you don't see the code address change then you can't really narrow the results any more.

One more thing to note is that this pointer's address will usually be lower in memory (maybe around 80300000-80500000). So a good pointer should be near the top of the search results.

Once you've found what might be a good pointer, use windows calculator in scientific mode then switch to hex.
Take your code address: 816B6084
and subtract the pointer value: 816B????
This is your offset.

285D4FDA 9FFF6000
48000000 (POINTER ADDRESS)
DE000000 80008180
1400(OFFSET) (CODE VALUE)
E0000000 80008000


lindtec

Man I feel stupid...

The problem was with another code, that was running (simply forgot, to
deactivate it).

It was an Infinite-Life-Code, where the game wanted to write to the same
address after the level was done (Hail to the Memory Viewer with Auto-Update).
After using an unused button for refilling life, the code works properly now.

And with that, there are no more freezes with any code in my list.

Sorry again to trouble you, just to find out, that a stupid little mistake was
at the root of this problem.

But non the less, I've gained quite a bit of knowledge (compared to what I
knew before).

Thanks for all your help...

One last code left to figure out and then I should have everything one should need.
After a bit of testing I'll submit it to the code-section here (hope, nobody else is faster than me)

Link

Infintie life codes can also be used for "forever" use. Simply try to search for an unknown 32 bit value while you're on the menu.

-Unknown - 32 bit - Equal
then enter the game
-Unknown - 32 bit - Not Equal
-->now WiiRd will detect all 32 bit values which have changed
stay in the game - do not leave the level
-Unknown - 32 bit - Equal
-->WiiRd will now check which 32 bit values from the list it already has have not changed (remained the same)
change the stage:
-Unknown - 32 bit - Equal
-->does the same
return to the menus:
-Unknown - 32 bit - Not Equal
stay in them
-Unknown - 32 bit - Equal
enter a level.. and return
-Unknown - 32 bit - Equal

continue until you've narrowed down possible addresses.
Using this trick you're searching for a 32 bit address which clearly identifies whether you're in-game (where the infinite life code would work) or not.

Now you found an address and you can use the
20______ YYYYYYYY : 32bits If equal (ba)
code type.. imagine your address is 80123458 - and the value of it is 00000001

Then you can do:

20123458 00000001
[infinite life]
E0000000 80008000

Your infinite life code will only be executed if 80123458 is 00000001 then!

James0x57

The one that I posted up there ^ using the address range check to check a value works too. If you don't check what the value is when you're out of game then it could get a false positive.. but it's a good idea if you know what values are there. :) It just makes sure that the current value is a float then it writes its own float. The idea is if it's not a float then it's not in game.
:D


lindtec

@Link

Thanks for this idea. I'll try it and see, if I can find a good address to work with.


@James

Thanks to you too. Since I'm allready at it, I'll try your idea too.
Never wrong to use different approaches.

James0x57



lindtec

#22
This check for wether I'm ingame or in the menu works like a charm.

Now there is another problem.

I have the following code:
80498F7C YYXX0000

How can I check, if only XX is greater than a specific value.
Unfortunatly the if-greater-than-code seems to only exist for 16 or 32 bit values.
The YY value can change, but is not important.

EDIT: Thanks James0x57 for solving this problem in this thread.

lindtec

Sorry for the double post.

Can someone tell me, why this code won't execute via a button combination?

285D4FDA AFFF5000 (this is the right address, tested with other codes)
CC000000 00000000
48000000 804D1F74
DE000000 80008180
14000363 00000009
E0000000 80008000

If I leave out the first 2 lines, it works.

James0x57

Get rid of the second line.
(why did you put that in there though?)
Perhaps you wanted a "not equal" comparison?





This line:
14000363 00000009
Is probably wrong. You said it worked without the first two though... perhaps it's just a typo?
This looks more accurate:
14000364 00000009


lindtec

The second line is for switching on<->off the code, like it is explained in the codetypelist.
Tested it with other codes as well and it works.

And this 14000363 00000009 is really correct (copied it from the wgc of WiiRD).