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

Hello everyone

I want to make an "Unlimited Arrows"-Code for Samurai Warrior Katan PAL
(RS5PC8).

So far, I'm going with the following code:

48000000 804D1F74
DE000000 00008180
14000363 00000009
E0000000 80008000

This one works like a charm, but unfortunately the game freezes
at each level-change with a black screen.

Could someone test this code or point out mistakes, i made?

Thanks in advance for every usefull comment...

Greetings lindtec

EDIT: I made a damn typo... It should be DE000000 80008180...
Maybe that will solve my problem (can't test it right now)...

EDIT 2: That was the problem, now this code works.

lindtec

Sorry for the double post, but another problem popped up...

The same problem like above (Game freezes at level-change), but
with another code:

[Refill Musou]
48000000 9FFF6000
4A000000 81000000
146B6084 42FA0000
E0000000 80008000 (tried 81008100 too)

I hope someone can help me. This time I double checked for Typos beforehand ^_^

James0x57

48000000 9FFF6000 1
4A000000 81000000 2
146B6084 42FA0000 3
E0000000 80008000 4 (tried 81008100 too)

1) This should freeze the game right away. What you're doing there is loading the value at address 9FFF6000 into the pointer. That address is invalid, memory 2 ranges from 90000000 - 93800000

2) This loads directly into the pointer- the value 81000000, which makes line 1 completely pointless (but line 1 will still be executed and should freeze the game)

3 is fine

4) the value should only ever be 80008000 as it sets the base address and pointer address both to 80000000.


If line2 is a mistake,
DE000000 XXXXYYYY
should go where line 2 is.
What it does is check that the value that got loaded is between XXXX0000 and YYYY0000 (makes sure it's an address) and only if it is will it execute line 3.


edit: btw, Your first code needs to have "DE000000 80008100" instead of "DE000000 00008180"


lindtec

Ah sorry, the first line is wrong. It should be 285D4FDA 9FFF6000 (thats how i have it in WiiRD) and is meant for the combination of C+Z.

And shoudn't that last line be "DE000000 80008180" (not like you said 80008100)?

James0x57

Then this code should be:

285D4FDA 9FFF6000
056B6084 42FA0000 <-- 32 bit write at 816B6084
E0000000 80008000

If it's still freezing then you need to use a pointer because address 816B6084 may only be the correct address for that one level. Load a different level and check to see if the value you were searching for has moved. :)


lindtec

Thanks...

I allready checked different levels and it works. In fact my code works like it should,
just that it freezes up, whenever the level is changed.

I never thought of using 05 in front of the 32 bit write line. I didn't see this code in the codetypelist.

James0x57

Well the reason it's 05 is because the codetype is only the first 7 bits.. I don't know if that will make sense to you but ... well I could try to explain if you want.

My guess is that the address is used for something else while the level loads, you'll need to use a pointer.
Or deactivate the code with a conditional that says the level is loading. Might be hard to find though.


edit: Wait, is it freezing even when you're not pressing the buttons??


lindtec

I guess this is beyond a beginner like me.

If its possible to explain how to do this with a pointer in simple words,
I would appreciate it.

And thanks again for lending me a bit of your wisdom.

James0x57

Well you already know what a pointer is and you must know how to find it. (based on the fist code you posted here)

So what is it that you'll need help with?

I enjoy teaching, you're welcome. :D


lindtec

Well, I tried your Code:

Quote285D4FDA 9FFF6000
056B6084 42FA0000 <-- 32 bit write at 816B6084
E0000000 80008000

But it still freezes up.

It looks like you were right. Maybe the game wants to write
to the same (still locked) address after that level-change.

Is there a way to open up the address again after each
execution of the code above?

James0x57

Try this.
285D4FDA 9FFF6000
48000000 816B6084
DE000000 3A004300
056B6084 42FA0000
E0000000 80008000

If it works, I'll explain it.

(the only way this may work is if the game uses the same address UNLESS it is loading)


lindtec

Sorry, but that still didn't work.

The strange thing is, that the first level works just fine,
the second level freezes with a black screen right after battle and
the third level freezes at the statistic-screen after battle.

James0x57

You need a pointer. Just hack one for it like you did in the first code. :)


On another note, the fact that that worked in the first level makes my use of the address range check pretty cool. :)


lindtec

Sorry to sound stupid, but how do i "hack" my own pointer?

The one in the first code was, what I found using WiiRD's Pointer Search and dexter0's tutorial

I don't understand, how this address-range-check you mentioned works,
but is there a way to adapt it for all levels (hopefully not for each level by hand)?

James0x57

Do it the same way you did it before.
I haven't used the pointer search tab yet so I can't help there. :p I still do mine the "hard" way.


The "DE" line is the address range check codetype. I just used it to check a 32 bit value instead of an address.