Coding Questions and other Quandaries
#86
"How are you actually applying the cheats in Dolphin?"

Saving them in the Gecko folder in the cheat manager. Using the activate/deactivate button. And then of course, button activators therein.

"Clears the code execution status" simply means that this codetype Ends all current If-Statements (i.e. 16-bit for controller line). At the start of any GCT, the BA (base address) and PO (pointer) start as both 0x800000000. You would use 'E0000000 00000000' to end If-Statement(s) but any modifications to ba and po are kept intact. The use of 'E0000000 80008000' resets ba and po to the Code Handler's default values (0x80000000)."

I get that. Let me rephrase my question:

Let's say, like I said above, that I save my pokemon full menues code, in the Gecko folder (has its own Activate/deactivate button).

This code establishes a pointer.

Now a little down the road, I find another code, (unrelated to the menu code), that I would like to add to the Gecko folder. With that new code, would I be able to use the
pointer established in the first code if need be?? Hope that makes more sense.

"I would highly advise getting better at Assembly and getting more intuitive with it instead of 'defaulting' to using Gecko Codetypes. Most Codetypes really only exist because many beginners back in the day (2008 - 2010) didn't want to learn Assembly. Well written Assembly code(s) (C0 and/or C2) will 99% of the time be more optimized compared to the same code(s) that is 'clobbered' together with various Gecko Codetypes."

Oh yeah!

I'm getting better at it, can't you tell from the Pokemon code LOL!!

I scored a nice victory yesterday hacking "Alien Hominid (USA) GCN"

I started trying to hack infinite grenades/lives codes a couple years ago. This always ended in frustration and game crashes, because of incorrect ASM.
Are you ready for a laugh??
I was under the misguided assumption that the line of code that bp's set on those things, broke on, were ONLY used for writing to those things.

i.e. stw r0, 0x016C (r31)

I had no idea that (r31) could be any number of addresses and used for just as many functions in the game.

Using the compare and branch techniques you've shown me, I was able to hack both in about 30 minutes:

Infinite grenades:

lis r12, 0xFFFF
ori r12, r12, 0xFFFF
cmpw r12, r31
bne- not_grenade
li r31, 0x0

not_grenade:
add r0, r0, r31

And Infinite Lives:

cmpwi r19, 0x3F #ASM 0x3F consistently in r19 when losing a life.
bne- not_lives
li r3, 0x5

not_lives:
stw r3, 0x8 (r30)

They work great on the Wii. Good thing too, because this game is insanely hard.

I'm getting there.
Reply


Messages In This Thread
RE: Coding Questions and other Quandaries - by Hackwiz - 01-03-2022, 01:18 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)