How to Make your own Cheat Codes
#28
Code:
8018b4c8 stfs f3, 0x010C (r3) - Levels 1 to 5 (Full Bar)

Just to clarify, does this instruction only occur when the exact specific Levels change?

If so, I was hoping you would find the instruction that occurs when the Bar increases/decreases in value regardless of a Level change or not, or does the Bar not work in such a manner?

Regarding your question on lis+ori... these 2 instructions can be used to write in any custom 32-bit value to a GPR. It's covered in Chapter 7 of the Beginner's Assembly Tutorial - https://mariokartwii.com/showthread.php?tid=940

Example: I want to write 0x1234ABCD to r12
Code:
lis r12, 0x1234
ori r12, r12, 0xABCD

You cannot use this method for the float values in FPRs. Therefore you need to use lis+ori first. Then store that GPR value to memory. And finally, load value from memory into the desired FPR.

So let's say you want f3 (in the first instruction) to be 0x3F4CCCCD. You can do this...
Code:
lis r12, 0x3F4C
ori r12, r12, 0xCCCD
stw r12, 0x010C (r3)
lfs f3, 0x010C (r3)

If you are wondering which GPR to choose for lis+ori, read this thread on Register Safety ---> https://mariokartwii.com/showthread.php?tid=873

It discusses what registers you can freely use that aren't part of your Original/Default code instruction.

Going back again to your first code instruction ... 8018b4c8 stfs f3, 0x010C (r3),
you can write something funny that may force Level 5 to be reached the moment you hit a new level, regardless of what the current Level is...

Code:
lis r12, 0x3F80 #Write 0x3F800000 to r12
stw r12, 0x010C (r3)
lfs f3, 0x010C (r3)

There's no need to add in an ori instruction if the ori instruction is utilizing a zero value (i.e. ori r12, r12, 0x0000). Using an ori instruction with the value of zero literally does nothing.

With your second code instruction, you may be able to "nop" it. A nop is an instruction that simply 'tells' the CPU to do nothing. This nop instruction is meant to overwrite the 'stfs f0, 0x010C (r5)' instruction.

To do that, you don't need a C2 ASM code. You can use a 32-bit RAM Write code to overwrite the instruction.

Example:
0418B224 60000000

This will write 60000000 at memory address 8018B224. 60000000 is the hex-compiled form of the Nop PPC instruction. This will write the nop instruction over the store-float instruction.

With this nop, this may prevent the Level Bar being reset to 0 once you use the Special Attack. Ofc nothing is assumed, that's why we always test our codes.

Fyi, nop is what is known as a "simplified mnemonic". It's actually an ori instruction (ori r0, r0, 0x0000).
Reply


Messages In This Thread
How to Make your own Cheat Codes - by Vega - 08-12-2018, 12:34 AM
RE: How to Make your own Cheat Codes - by Vega - 04-03-2023, 11:52 PM
RE: How to Make your own Cheat Codes - by Vega - 04-06-2023, 11:06 PM
RE: How to Make your own Cheat Codes - by Vega - 04-10-2023, 03:18 PM
RE: How to Make your own Cheat Codes - by Vega - 04-12-2023, 02:32 PM
RE: How to Make your own Cheat Codes - by Vega - 04-13-2023, 01:05 AM
RE: How to Make your own Cheat Codes - by Vega - 04-14-2023, 12:41 AM
RE: How to Make your own Cheat Codes - by Vega - 04-14-2023, 06:01 PM
RE: How to Make your own Cheat Codes - by Vega - 04-14-2023, 08:20 PM
RE: How to Make your own Cheat Codes - by Vega - 04-26-2023, 01:16 AM
RE: How to Make your own Cheat Codes - by Vega - 04-29-2023, 12:54 PM
RE: How to Make your own Cheat Codes - by Hackwiz - 04-29-2023, 02:41 PM
RE: How to Make your own Cheat Codes - by Hackwiz - 05-01-2023, 11:17 AM
RE: How to Make your own Cheat Codes - by Hackwiz - 05-01-2023, 05:57 PM
RE: How to Make your own Cheat Codes - by Vega - 05-01-2023, 10:05 PM
RE: How to Make your own Cheat Codes - by Hackwiz - 05-02-2023, 10:19 AM
RE: How to Make your own Cheat Codes - by Hackwiz - 05-02-2023, 11:32 PM
RE: How to Make your own Cheat Codes - by Vega - 05-03-2023, 12:12 AM
RE: How to Make your own Cheat Codes - by Hackwiz - 05-03-2023, 10:59 AM
RE: How to Make your own Cheat Codes - by Hackwiz - 05-03-2023, 05:06 PM
RE: How to Make your own Cheat Codes - by Hackwiz - 05-03-2023, 08:51 PM
RE: How to Make your own Cheat Codes - by Vega - 05-03-2023, 09:32 PM
RE: How to Make your own Cheat Codes - by Hackwiz - 05-04-2023, 11:15 AM
RE: How to Make your own Cheat Codes - by Vega - 05-05-2023, 12:13 AM
RE: How to Make your own Cheat Codes - by Vega - 05-05-2023, 02:08 PM
RE: How to Make your own Cheat Codes - by Vega - 05-06-2023, 12:51 AM
RE: How to Make your own Cheat Codes - by Hackwiz - 05-06-2023, 03:57 PM
RE: How to Make your own Cheat Codes - by Vega - 05-08-2023, 01:22 AM
RE: How to Make your own Cheat Codes - by Vega - 05-10-2023, 03:42 PM
RE: How to Make your own Cheat Codes - by Unnamed - 06-08-2023, 02:56 PM
RE: How to Make your own Cheat Codes - by Vega - 06-18-2023, 11:58 PM
RE: How to Make your own Cheat Codes - by Unnamed - 10-10-2024, 11:38 AM

Forum Jump:


Users browsing this thread: 16 Guest(s)