How to Hack ASM for Emulated Games

Skiller
VCR instructions Peeps :p


How to Hack ASM for Emulated games

For starters things you will need.
1. USB Gecko And WiiRD
2. A game there are lots of VC games out there. Also the game East Data Uses the Wiis Emu but on their Disk
3. AsmWiiRd
3. Knowing some ASM yourself for PowerPC does help allot ..

Note I'm going to assume u know how to find codes so I'm skipping some things.
K now what you ask . Just go about finding yourself a code ..  Arcade games easy thing to start with is the Credits since u control them fairly simple and you can put allot of search time to do this :p
Game being used is E6WE=Golden Axe Arcade(NTSC)
K once u have found a code Set a Breakpoint on Write

My Game I'm BPW on 815F5D60 (Using Exact Match Set) And it brings me to
80441080:  7CA701AE   stbx   r5,r7,r0

Address ASM break down Add r0 to R7 and write R5 to it. so if this is right that would mean R0 is the address that is shown below (note not all ASM is setup using STBX so u might need the steps below.)

Registers look like this
CR  : 42000888  XER : 00000000  CTR : 80408DD0  DSIS: 02400000
DAR : 815F5D60  SRR0: 80441080  SRR1: 0000A032  LR  : 803FF2DC
r0  : 00002C00  r1  : 80206BA8  r2  : 801FE000  r3  : 80FDDA20
r4  : 00FFEC00  r5  : 00000007  r6  : 0000EC00  r7  : 815F3160
r8  : 00FFEC00  r9  : 815730B0  r10 : 00000000  r11 : 80206BA8
r12 : 80408DD0  r13 : 801FB760  r14 : 00000000  r15 : 00000014
r16 : 00000000  r17 : 80FE4E60  r18 : 00000050  r19 : 00000005
r20 : 00000002  r21 : 00000014  r22 : 00000050  r23 : 815DD8A8
r24 : 815DD8A0  r25 : 80158B70  r26 : 00000002  r27 : 000004EC
r28 : 81573120  r29 : 81573120  r30 : 815736F8  r31 : 00000007

K so now we need to find out one thing what register is holding the data we need to set a BNE to Easy way to do this is now to take the address your code BPW on and Breakpoint on Execute with it ..  (80441080:  7CA701AE) so let's BPE on that and see what registers change .

CR  : 42000888  XER : 00000000  CTR : 80408DD0  DSIS: 02400000
DAR : 815F5D60  SRR0: 80441080  SRR1: 0000A032  LR  : 803F79D4
r0  : 00002C04  r1  : 80206BA8  r2  : 801FE000  r3  : 80FDDA20
r4  : 00FFEC04  r5  : 00000001  r6  : 0000EC04  r7  : 815F3160
r8  : 00FFEC04  r9  : 815730B0  r10 : 00000000  r11 : 80206BD8
r12 : 80408DD0  r13 : 801FB760  r14 : 00000000  r15 : 00000014
r16 : 00000000  r17 : 80FE4E60  r18 : 00000050  r19 : 00000005
r20 : 00000002  r21 : 00000014  r22 : 00000050  r23 : 815DD8A8
r24 : 815DD8A0  r25 : 80158B70  r26 : 00000002  r27 : 000004EA
r28 : 81573120  r29 : 81573120  r30 : 00000001  r31 : 815736F8

See that R0,R4,R6,R8.. k now take one of the values and set the Break only If section of WiiRd
Example Set it with R0 = 00002C00 and BreakonEXE  then add a credit or do something that changes the value of the address u first found. And see if it breaks only at time of changing.

if it does u have the right Register if it breaks  when you did not want it to that means it's not right.  so try another Register. Until you find the right one. K so in this games case R0 works for what we need.

time to set up your Sub code (C2 codetype)
K so the main function is to Check to make sure R0 is = to 2c00 before writing what we want to that ASM again.  so u will need to use the cmpwi op

cmpwi r0,(Value)
bne- 0x08
li r5, 9
stbx   r5,r7,r0

Put the Value in as Dec not hex if you're using asmwiird then BNE will make sure that it skips the lines u put next if the value is Not Equal you just have to tell it the right amount to skip in our case we will skip only 2 address away so that be 0x8 as shown above.

Code output

Unlimited 25Cents (Credits)
C2441080 00000003
2C002C00 40820008
38A00001 7CA701AE
60000000 00000000

Wll now that your at the bottom of this and seen the op codes u could just use this op code as a Building block. since its normaly always the same as what i did unless u need to extend your BNE jump for More Lines of your own Op codes ..
also  you can add more than 1 code to this all u need to do is stack the cmpwi and Bne before your code Value change

cmpwi r0,(Value)
bne- 0x08
li r5, 9
cmpwi r0,(Value)
bne- 0x08
li r5, 9
stbx   r5,r7,r0

the first BNE would check to see if the Cmpwi is = if it's not Skip to check the next Cmpwi  and so on ..
hope this helps i don't really write guides I just do what i need to do :p

Note this is alot easyer to do with your own Custom Branch and Custom code same setup u just need to Branch
to the area u want most people use 0x80002F00 and on to 0x80002FFC. Gives u 99 addresses to play with but this is for more advanced users. And if your already doin it im betting the guide can help u as well :p

doin all the Branching and Not using the C2 codetype alows u to set up individual codes not all in one code ..
Note though u can use this guide to just print the Pointer to an address in 0x80002F00 section then use wiirds pointer codes as well lol . but whats the fun in that