Coding Questions and other Quandaries
#24
Ok, so this worked great. Booted up 5 times and it worked like a champ.
Waited to activate until I took control of Celia.

Celia and enemies have infinite health:

285F036A 00001000 #Button activator. Press (-)
F6000001 80E080FF #Example unique string takes up 1 row/line. Search from 0x80E00000 thru 0x80FF0000
907D0014 887D0020 #Example unique string to look for
D2000000 00000002 #Insert ASM at pointer (zero offset); D2 = Codetype for Pointer ASM
386000C8 907D0014 #ASM code (li r3, 0xC8; stw r3, 0x0014 (r29)
60000000 00000000 #End of ASM code
E0000000 80008000 #End if (final terminator)

This didn't work:

Only Celia should have infinite health:

285F036A 00001000 #Control line activator. Press (-)
F6000001 80E080FF #Example unique string takes up 1 row/line. Search from 0x80E00000 thru 0x80FF0000
907D0014 887D0020 #Example unique string to look for
D2000000 00000004 #Insert ASM at pointer (zero offset); D2 = Codetype for Pointer ASM
39800004 73AC000F #ASM code: li r12, 0x4; andI. r12, r29, 0X000F
2C0C0004 40820008 #ASM code: cmpwi r12, 0x4; Bne- default_instruction
386000C8 907D0014 #ASM code: li r3, 0xC8; default_instruction: stw r3, 0x0014 (r29)
60000000 00000000 #End of ASM code
E0000000 80008000 #End if (final terminator)

So I did a bp on her health, and was looking at r29.
It dawned on me we hadn't taken into account the 0x0014, so I changed the compare value to 0x0.
And it worked Smile Smile Smile

However, I found that when I got into an area where multiple enemies spawned I could only kill 3 out of the
four, because apparently enemies addresses can end with 0x0 also.

Any other tricks up your sleeve???
Reply


Messages In This Thread
RE: Coding Questions and other Quandaries - by Hackwiz - 12-10-2021, 01:27 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)