Posted: Sun Apr 09, 2017 1:29 pm Post subject: Converting opcodes to bytecode for Gamecube Action Replay
Hi! Im trying to make a code for Eternal Darkness that doubles the damage taken. But I don't know how to write the opcodes as byte/hex? I just know how to NOP lines.
Problem:
I want to write a gamecube AR code that replaces the codeline at address 801A7518 with "slw 0x8120CBA4,r4,1".
This should shift the value in register r4 left 1 step (= multiply it with 2) and place it in memory address 0x8120CBA4 (8120CBA4 stores damage taken).
1. How should this instruction look in bytecode?
2.Is it even possible to use the full code address 0x8120CBA4 or is it too long to include in the instruction - (it needs to point to a register instead eg "slw r3,r4,1"?)
I looked around some more and I found the WiiRd tool that converts PPC ASM to hex codes. Theres also a useful list of ASM instructions on the wiibrew wiki Assembler_Tutorial page.
I made an AR code that doubles damage recieved for Eternal Darkness (US). I haven't tested very much yet but it seems to work ok (using Dolphin 4).
I took another look at this and made an addition - The old code also triggered when healing and in some other situations so I put in a fix for that. I also made a version for sanity damage.
This should make the game a bit harder.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum