Moon Jump For Eldar Saga RVKP99

Started by Patedj, February 06, 2011, 11:25:40 AM

Previous topic - Next topic

Patedj

I can't seem to figure out why the vertical coordination don't do anything.

If I set a button activator (28)
and I set the ba (04) at a value of greater than floor value
and then restore(E)
This should make the avatar rise, correct?

In ASM this is what I'm doing
[spoiler]stw r12,12(r24)
addi r12,r12,1
stw r12,12(r24)
lfs   f29,12(r24)[/spoiler]

Breaks right away. (803C42E4)
registers
[spoiler]  CR:84200088  XER:00000000  CTR:80134F5C DSIS:00400000
DAR:803C42E4 SRR0:80135568 SRR1:0000B032   LR:80135020
 r0:00000001   r1:8062AE80   r2:8061FA20   r3:803E0000
 r4:00000009   r5:00000001   r6:00000000   r7:00000000
 r8:52290000   r9:00000000  r10:0000001A  r11:8062AFD0
r12:80134F5C  r13:8061D200  r14:00000000  r15:00000000
r16:00000000  r17:00000000  r18:00000000  r19:00000000
r20:00000000  r21:00000000  r22:43300000  r23:00000000
r24:803C42D8  r25:803C4348  r26:803C4348  r27:803C4058
r28:FFFFFFFF  r29:00000000  r30:803E34D0  r31:803C4058

 f0:484D1400   f1:3F4417C9   f2:BF4417C9   f3:BEE8B25A
 f4:BEE8B25A   f5:BEE8B25A   f6:C1700000   f7:41833E94
 f8:41200000   f9:59800000  f10:3EB8091A  f11:80000000
f12:00000000  f13:00000000  f14:00000000  f15:00000000
f16:00000000  f17:00000000  f18:00000000  f19:00000000
f20:00000000  f21:00000000  f22:00000000  f23:00000000
f24:00000000  f25:00000000  f26:00000000  f27:00000000
f28:00000000  f29:00000000  f30:59800000  f31:3F800000[/spoiler]

[spoiler]80134F5C:  9421FE80   stwu   r1,-384(r1)
80134F60:  7C0802A6   mflr   r0
80134F64:  90010184   stw   r0,388(r1)
80134F68:  DBE10170   stfd   f31,368(r1)
80134F6C:  F3E10178   psq_st   f31,376(r1),0,0
80134F70:  DBC10160   stfd   f30,352(r1)
80134F74:  F3C10168   psq_st   f30,360(r1),0,0
80134F78:  DBA10150   stfd   f29,336(r1)
80134F7C:  F3A10158   psq_st   f29,344(r1),0,0
80134F80:  39610150   addi   r11,r1,336
80134F84:  48080DF5   bl   0x801b5d78
80134F88:  880D9740   lbz   r0,-26816(r13)
80134F8C:  7C7F1B78   mr   r31,r3
80134F90:  7C000775   extsb.   r0,r0
80134F94:  40820018   bne-   0x80134fac
80134F98:  3C60803C   lis   r3,-32708
80134F9C:  38639F00   subi   r3,r3,24832
80134FA0:  4BEFF799   bl   0x80034738
80134FA4:  38000001   li   r0,1
80134FA8:  980D9740   stb   r0,-26816(r13)
80134FAC:  3C60803C   lis   r3,-32708
80134FB0:  38639F00   subi   r3,r3,24832
80134FB4:  8003420C   lwz   r0,16908(r3)
80134FB8:  2C000000   cmpwi   r0,0
80134FBC:  4082000C   bne-   0x80134fc8
80134FC0:  38600000   li   r3,0
80134FC4:  48000768   b   0x8013572c
80134FC8:  801F0020   lwz   r0,32(r31)
80134FCC:  2C000000   cmpwi   r0,0
80134FD0:  40820728   bne-   0x801356f8
80134FD4:  386100F8   addi   r3,r1,248
80134FD8:  38800004   li   r4,4
80134FDC:  38A00001   li   r5,1
80134FE0:  38C00000   li   r6,0
80134FE4:  480593F5   bl   0x8018e3d8
80134FE8:  3B1F0280   addi   r24,r31,640
80134FEC:  3E80803E   lis   r20,-32706
80134FF0:  907F027C   stw   r3,636(r31)
80134FF4:  7F1AC378   mr   r26,r24
80134FF8:  3B6100F8   addi   r27,r1,248
80134FFC:  3A9434D0   addi   r20,r20,13520
80135000:  3B200000   li   r25,0
80135004:  3B80FFFF   li   r28,-1
80135008:  480000A4   b   0x801350ac
8013500C:  82BB0000   lwz   r21,0(r27)
80135010:  2C150000   cmpwi   r21,0
80135014:  41820064   beq-   0x80135078
80135018:  7EA3AB78   mr   r3,r21
8013501C:  4BF030ED   bl   0x80038108
80135020:  2C030000   cmpwi   r3,0
80135024:  41820054   beq-   0x80135078
80135028:  2C150000   cmpwi   r21,0
8013502C:  93810078   stw   r28,120(r1)
80135030:  40820014   bne-   0x80135044
80135034:  8001007C   lwz   r0,124(r1)
80135038:  93810070   stw   r28,112(r1)
8013503C:  90010074   stw   r0,116(r1)
80135040:  48000024   b   0x80135064
80135044:  80950028   lwz   r4,40(r21)
80135048:  54801838   rlwinm   r0,r4,3,0,28
8013504C:  90810078   stw   r4,120(r1)
80135050:  7C740214   add   r3,r20,r0
80135054:  80030004   lwz   r0,4(r3)
80135058:  90810070   stw   r4,112(r1)
8013505C:  9001007C   stw   r0,124(r1)
80135060:  90010074   stw   r0,116(r1)
80135064:  80610070   lwz   r3,112(r1)
80135068:  80010074   lwz   r0,116(r1)
8013506C:  90610080   stw   r3,128(r1)
80135070:  90010084   stw   r0,132(r1)
80135074:  48000014   b   0x80135088
80135078:  8001006C   lwz   r0,108(r1)
8013507C:  93810068   stw   r28,104(r1)
80135080:  93810080   stw   r28,128(r1)
80135084:  90010084   stw   r0,132(r1)
80135088:  80610080   lwz   r3,128(r1)
8013508C:  3B7B0004   addi   r27,r27,4
80135090:  80010084   lwz   r0,132(r1)
80135094:  3B390001   addi   r25,r25,1
80135098:  907A0000   stw   r3,0(r26)
8013509C:  901A0004   stw   r0,4(r26)
801350A0:  3B5A001C   addi   r26,r26,28
801350A4:  906100A0   stw   r3,160(r1)
801350A8:  900100A4   stw   r0,164(r1)
801350AC:  801F027C   lwz   r0,636(r31)
801350B0:  7C190000   cmpw   r25,r0
801350B4:  4180FF58   blt+   0x8013500c
801350B8:  3AE00000   li   r23,0
801350BC:  3C60803E   lis   r3,-32706
801350C0:  3B3F02F0   addi   r25,r31,752
801350C4:  92FF0770   stw   r23,1904(r31)
801350C8:  C3C29350   lfs   f30,-27824(r2)
801350CC:  7FFBFB78   mr   r27,r31
801350D0:  CBA29360   lfd   f29,-27808(r2)
801350D4:  7F3ACB78   mr   r26,r25
801350D8:  3BC334D0   addi   r30,r3,13520
801350DC:  3AC00000   li   r22,0
801350E0:  3B80FFFF   li   r28,-1
801350E4:  3FA04330   lis   r29,17200
801350E8:  48000380   b   0x80135468
801350EC:  82BB006C   lwz   r21,108(r27)
801350F0:  88150BD9   lbz   r0,3033(r21)
801350F4:  2C000000   cmpwi   r0,0
801350F8:  418200AC   beq-   0x801351a4
801350FC:  2C150000   cmpwi   r21,0
80135100:  41820064   beq-   0x80135164
80135104:  7EA3AB78   mr   r3,r21
80135108:  4BF03001   bl   0x80038108
8013510C:  2C030000   cmpwi   r3,0
80135110:  41820054   beq-   0x80135164
80135114:  2C150000   cmpwi   r21,0
80135118:  93810058   stw   r28,88(r1)
8013511C:  40820014   bne-   0x80135130
80135120:  8001005C   lwz   r0,92(r1)
80135124:  93810050   stw   r28,80(r1)
80135128:  90010054   stw   r0,84(r1)
8013512C:  48000024   b   0x80135150
80135130:  80950028   lwz   r4,40(r21)
80135134:  54801838   rlwinm   r0,r4,3,0,28
80135138:  90810058   stw   r4,88(r1)
8013513C:  7C7E0214   add   r3,r30,r0
80135140:  80030004   lwz   r0,4(r3)
80135144:  90810050   stw   r4,80(r1)
80135148:  9001005C   stw   r0,92(r1)
8013514C:  90010054   stw   r0,84(r1)
80135150:  80610050   lwz   r3,80(r1)
80135154:  80010054   lwz   r0,84(r1)
80135158:  90610060   stw   r3,96(r1)
8013515C:  90010064   stw   r0,100(r1)
80135160:  48000014   b   0x80135174
80135164:  8001004C   lwz   r0,76(r1)
80135168:  93810048   stw   r28,72(r1)
8013516C:  93810060   stw   r28,96(r1)
80135170:  90010064   stw   r0,100(r1)
80135174:  801F0770   lwz   r0,1904(r31)
80135178:  80A10060   lwz   r5,96(r1)
8013517C:  54001838   rlwinm   r0,r0,3,0,28
80135180:  80810064   lwz   r4,100(r1)
80135184:  7C7F0214   add   r3,r31,r0
80135188:  90A10098   stw   r5,152(r1)
8013518C:  90A306F0   stw   r5,1776(r3)
80135190:  908306F4   stw   r4,1780(r3)
80135194:  807F0770   lwz   r3,1904(r31)
80135198:  9081009C   stw   r4,156(r1)
8013519C:  38030001   addi   r0,r3,1
801351A0:  901F0770   stw   r0,1904(r31)
801351A4:  88152C54   lbz   r0,11348(r21)
801351A8:  28000003   cmplwi   r0,3
801351AC:  408201CC   bne-   0x80135378
801351B0:  801F027C   lwz   r0,636(r31)
801351B4:  7FE5FB78   mr   r5,r31
801351B8:  3A800000   li   r20,0
801351BC:  7C0903A6   mtctr   r0
801351C0:  2C000000   cmpwi   r0,0
801351C4:  408101B4   ble-   0x80135378
801351C8:  80152C58   lwz   r0,11352(r21)
801351CC:  80752C5C   lwz   r3,11356(r21)
801351D0:  2C000000   cmpwi   r0,0
801351D4:  40800014   bge-   0x801351e8
801351D8:  2C000400   cmpwi   r0,1024
801351DC:  4180000C   blt-   0x801351e8
801351E0:  38600000   li   r3,0
801351E4:  48000024   b   0x80135208
801351E8:  54001838   rlwinm   r0,r0,3,0,28
801351EC:  7C9E0214   add   r4,r30,r0
801351F0:  80040004   lwz   r0,4(r4)
801351F4:  7C030040   cmplw   r3,r0
801351F8:  4182000C   beq-   0x80135204
801351FC:  38600000   li   r3,0
80135200:  48000008   b   0x80135208
80135204:  80640000   lwz   r3,0(r4)
80135208:  80050280   lwz   r0,640(r5)
8013520C:  80850284   lwz   r4,644(r5)
80135210:  2C000000   cmpwi   r0,0
80135214:  40800014   bge-   0x80135228
80135218:  2C000400   cmpwi   r0,1024
8013521C:  4180000C   blt-   0x80135228
80135220:  38000000   li   r0,0
80135224:  48000024   b   0x80135248
80135228:  54001838   rlwinm   r0,r0,3,0,28
8013522C:  7CDE0214   add   r6,r30,r0
80135230:  80060004   lwz   r0,4(r6)
80135234:  7C040040   cmplw   r4,r0
80135238:  4182000C   beq-   0x80135244
8013523C:  38000000   li   r0,0
80135240:  48000008   b   0x80135248
80135244:  80060000   lwz   r0,0(r6)
80135248:  7C030040   cmplw   r3,r0
8013524C:  40820120   bne-   0x8013536c
80135250:  2C150000   cmpwi   r21,0
80135254:  9A9A0000   stb   r20,0(r26)
80135258:  41820064   beq-   0x801352bc
8013525C:  7EA3AB78   mr   r3,r21
80135260:  4BF02EA9   bl   0x80038108
80135264:  2C030000   cmpwi   r3,0
80135268:  41820054   beq-   0x801352bc
8013526C:  2C150000   cmpwi   r21,0
80135270:  93810038   stw   r28,56(r1)
80135274:  40820014   bne-   0x80135288
80135278:  8001003C   lwz   r0,60(r1)
8013527C:  93810030   stw   r28,48(r1)
80135280:  90010034   stw   r0,52(r1)
80135284:  48000024   b   0x801352a8
80135288:  80950028   lwz   r4,40(r21)
8013528C:  54801838   rlwinm   r0,r4,3,0,28
80135290:  90810038   stw   r4,56(r1)
80135294:  7C7E0214   add   r3,r30,r0
80135298:  80030004   lwz   r0,4(r3)
8013529C:  90810030   stw   r4,48(r1)
801352A0:  9001003C   stw   r0,60(r1)
801352A4:  90010034   stw   r0,52(r1)
801352A8:  80610030   lwz   r3,48(r1)
801352AC:  80010034   lwz   r0,52(r1)
801352B0:  90610040   stw   r3,64(r1)
801352B4:  90010044   stw   r0,68(r1)
801352B8:  48000014   b   0x801352cc
801352BC:  8001002C   lwz   r0,44(r1)
801352C0:  93810028   stw   r28,40(r1)
801352C4:  93810040   stw   r28,64(r1)
801352C8:  90010044   stw   r0,68(r1)
801352CC:  80810040   lwz   r4,64(r1)
801352D0:  1C14001C   mulli   r0,r20,28
801352D4:  80610044   lwz   r3,68(r1)
801352D8:  909A0004   stw   r4,4(r26)
801352DC:  7CBF0214   add   r5,r31,r0
801352E0:  907A0008   stw   r3,8(r26)
801352E4:  80050280   lwz   r0,640(r5)
801352E8:  90810090   stw   r4,144(r1)
801352EC:  2C000000   cmpwi   r0,0
801352F0:  80850284   lwz   r4,644(r5)
801352F4:  90610094   stw   r3,148(r1)
801352F8:  40800014   bge-   0x8013530c
801352FC:  2C000400   cmpwi   r0,1024
80135300:  4180000C   blt-   0x8013530c
80135304:  38E00000   li   r7,0
80135308:  48000024   b   0x8013532c
8013530C:  54001838   rlwinm   r0,r0,3,0,28
80135310:  7C7E0214   add   r3,r30,r0
80135314:  80030004   lwz   r0,4(r3)
80135318:  7C040040   cmplw   r4,r0
8013531C:  4182000C   beq-   0x80135328
80135320:  38E00000   li   r7,0
80135324:  48000008   b   0x8013532c
80135328:  80E30000   lwz   r7,0(r3)
8013532C:  80C70050   lwz   r6,80(r7)
80135330:  386100E8   addi   r3,r1,232
80135334:  80070054   lwz   r0,84(r7)
80135338:  388100DC   addi   r4,r1,220
8013533C:  38B50050   addi   r5,r21,80
80135340:  90C100DC   stw   r6,220(r1)
80135344:  900100E0   stw   r0,224(r1)
80135348:  80070058   lwz   r0,88(r7)
8013534C:  900100E4   stw   r0,228(r1)
80135350:  4BF53539   bl   0x80088888
80135354:  386100E8   addi   r3,r1,232
80135358:  480AC211   bl   0x801e1568
8013535C:  D03A000C   stfs   f1,12(r26)
80135360:  3B5A0010   addi   r26,r26,16
80135364:  3AF70001   addi   r23,r23,1
80135368:  48000010   b   0x80135378
8013536C:  38A5001C   addi   r5,r5,28
80135370:  3A940001   addi   r20,r20,1
80135374:  4200FE54   bdnz+   0x801351c8
80135378:  80952CD0   lwz   r4,11472(r21)
8013537C:  2C040000   cmpwi   r4,0
80135380:  41820040   beq-   0x801353c0
80135384:  80752CC8   lwz   r3,11464(r21)
80135388:  6C808000   xoris   r0,r4,32768
8013538C:  90010114   stw   r0,276(r1)
80135390:  7C632050   sub   r3,r4,r3
80135394:  7C6319D6   mullw   r3,r3,r3
80135398:  93A10110   stw   r29,272(r1)
8013539C:  C8010110   lfd   f0,272(r1)
801353A0:  93A10108   stw   r29,264(r1)
801353A4:  EC00E828   fsubs   f0,f0,f29
801353A8:  6C608000   xoris   r0,r3,32768
801353AC:  9001010C   stw   r0,268(r1)
801353B0:  C8210108   lfd   f1,264(r1)
801353B4:  EC21E828   fsubs   f1,f1,f29
801353B8:  EC010024   fdivs   f0,f1,f0
801353BC:  48000008   b   0x801353c4
801353C0:  C0029350   lfs   f0,-27824(r2)
801353C4:  FC00F040   fcmpo   cr0,f0,f30
801353C8:  40810098   ble-   0x80135460
801353CC:  FFC00090   fmr   f30,f0
801353D0:  2C150000   cmpwi   r21,0
801353D4:  41820064   beq-   0x80135438
801353D8:  7EA3AB78   mr   r3,r21
801353DC:  4BF02D2D   bl   0x80038108
801353E0:  2C030000   cmpwi   r3,0
801353E4:  41820054   beq-   0x80135438
801353E8:  2C150000   cmpwi   r21,0
801353EC:  93810018   stw   r28,24(r1)
801353F0:  40820014   bne-   0x80135404
801353F4:  8001001C   lwz   r0,28(r1)
801353F8:  93810010   stw   r28,16(r1)
801353FC:  90010014   stw   r0,20(r1)
80135400:  48000024   b   0x80135424
80135404:  80950028   lwz   r4,40(r21)
80135408:  54801838   rlwinm   r0,r4,3,0,28
8013540C:  90810018   stw   r4,24(r1)
80135410:  7C7E0214   add   r3,r30,r0
80135414:  80030004   lwz   r0,4(r3)
80135418:  90810010   stw   r4,16(r1)
8013541C:  9001001C   stw   r0,28(r1)
80135420:  90010014   stw   r0,20(r1)
80135424:  80610010   lwz   r3,16(r1)
80135428:  80010014   lwz   r0,20(r1)
8013542C:  90610020   stw   r3,32(r1)
80135430:  90010024   stw   r0,36(r1)
80135434:  48000014   b   0x80135448
80135438:  8001000C   lwz   r0,12(r1)
8013543C:  93810008   stw   r28,8(r1)
80135440:  93810020   stw   r28,32(r1)
80135444:  90010024   stw   r0,36(r1)
80135448:  80610020   lwz   r3,32(r1)
8013544C:  80010024   lwz   r0,36(r1)
80135450:  90610088   stw   r3,136(r1)
80135454:  9001008C   stw   r0,140(r1)
80135458:  907F0774   stw   r3,1908(r31)
8013545C:  901F0778   stw   r0,1912(r31)
80135460:  3B7B0004   addi   r27,r27,4
80135464:  3AD60001   addi   r22,r22,1
80135468:  801F0068   lwz   r0,104(r31)
8013546C:  7C160000   cmpw   r22,r0
80135470:  4180FC7C   blt+   0x801350ec
80135474:  3877FFFF   subi   r3,r23,1
80135478:  39200000   li   r9,0
8013547C:  480000AC   b   0x80135528
80135480:  39490001   addi   r10,r9,1
80135484:  55402036   rlwinm   r0,r10,4,0,27
80135488:  7C9F0214   add   r4,r31,r0
8013548C:  7C0AB850   sub   r0,r23,r10
80135490:  390402F0   addi   r8,r4,752
80135494:  7C0903A6   mtctr   r0
80135498:  7C0AB800   cmpw   r10,r23
8013549C:  40800084   bge-   0x80135520
801354A0:  88190000   lbz   r0,0(r25)
801354A4:  88880000   lbz   r4,0(r8)
801354A8:  7C040040   cmplw   r4,r0
801354AC:  41800018   blt-   0x801354c4
801354B0:  40820064   bne-   0x80135514
801354B4:  C028000C   lfs   f1,12(r8)
801354B8:  C019000C   lfs   f0,12(r25)
801354BC:  FC010040   fcmpo   cr0,f1,f0
801354C0:  40800054   bge-   0x80135514
801354C4:  88F90000   lbz   r7,0(r25)
801354C8:  80D90004   lwz   r6,4(r25)
801354CC:  80B90008   lwz   r5,8(r25)
801354D0:  C039000C   lfs   f1,12(r25)
801354D4:  88080000   lbz   r0,0(r8)
801354D8:  98E100A8   stb   r7,168(r1)
801354DC:  98190000   stb   r0,0(r25)
801354E0:  80880004   lwz   r4,4(r8)
801354E4:  80080008   lwz   r0,8(r8)
801354E8:  90C100AC   stw   r6,172(r1)
801354EC:  90990004   stw   r4,4(r25)
801354F0:  90190008   stw   r0,8(r25)
801354F4:  C008000C   lfs   f0,12(r8)
801354F8:  90A100B0   stw   r5,176(r1)
801354FC:  D019000C   stfs   f0,12(r25)
80135500:  98E80000   stb   r7,0(r8)
80135504:  90C80004   stw   r6,4(r8)
80135508:  90A80008   stw   r5,8(r8)
8013550C:  D02100B4   stfs   f1,180(r1)
80135510:  D028000C   stfs   f1,12(r8)
80135514:  39080010   addi   r8,r8,16
80135518:  394A0001   addi   r10,r10,1
8013551C:  4200FF84   bdnz+   0x801354a0
80135520:  3B390010   addi   r25,r25,16
80135524:  39290001   addi   r9,r9,1
80135528:  7C091800   cmpw   r9,r3
8013552C:  4180FF54   blt+   0x80135480
80135530:  3C60803E   lis   r3,-32706
80135534:  CBC29388   lfd   f30,-27768(r2)
80135538:  C3E29358   lfs   f31,-27816(r2)
8013553C:  7FFBFB78   mr   r27,r31
80135540:  C3A29350   lfs   f29,-27824(r2)
80135544:  3BC334D0   addi   r30,r3,13520
80135548:  3A800000   li   r20,0
8013554C:  3AA00000   li   r21,0
80135550:  3EC04330   lis   r22,17200
80135554:  3BA00000   li   r29,0
80135558:  48000180   b   0x801356d8
8013555C:  B2980014   sth   r20,20(r24)
80135560:  B3B80016   sth   r29,22(r24)
80135564:  D3B80008   stfs   f29,8(r24)
80135568:  C3B8000C   lfs   f29,12(r24) Broke here with a read and exact value
8013556C:  D3A100D0   stfs   f29,208(r1)
80135570:  D3A100D4   stfs   f29,212(r1)
80135574:  D3A100D8   stfs   f29,216(r1)
80135578:  D3B80010   stfs   f29,16(r24)
8013557C:  480000AC   b   0x80135628
80135580:  881B02F0   lbz   r0,752(r27)
80135584:  7C150000   cmpw   r21,r0
80135588:  408200A8   bne-   0x80135630
8013558C:  801B02F4   lwz   r0,756(r27)
80135590:  807B02F8   lwz   r3,760(r27)
80135594:  2C000000   cmpwi   r0,0
80135598:  40800014   bge-   0x801355ac
8013559C:  2C000400   cmpwi   r0,1024
801355A0:  4180000C   blt-   0x801355ac
801355A4:  3B800000   li   r28,0
801355A8:  48000024   b   0x801355cc
801355AC:  54001838   rlwinm   r0,r0,3,0,28
801355B0:  7C9E0214   add   r4,r30,r0
801355B4:  80040004   lwz   r0,4(r4)
801355B8:  7C030040   cmplw   r3,r0
801355BC:  4182000C   beq-   0x801355c8
801355C0:  3B800000   li   r28,0
801355C4:  48000008   b   0x801355cc
801355C8:  83840000   lwz   r28,0(r4)
801355CC:  80DC0050   lwz   r6,80(r28)
801355D0:  38780008   addi   r3,r24,8
801355D4:  801C0054   lwz   r0,84(r28)
801355D8:  7C641B78   mr   r4,r3
801355DC:  38A100C4   addi   r5,r1,196
801355E0:  90C100C4   stw   r6,196(r1)
801355E4:  900100C8   stw   r0,200(r1)
801355E8:  801C0058   lwz   r0,88(r28)
801355EC:  900100CC   stw   r0,204(r1)
801355F0:  4BF53275   bl   0x80088864
801355F4:  A0780016   lhz   r3,22(r24)
801355F8:  3B7B0010   addi   r27,r27,16
801355FC:  3A940001   addi   r20,r20,1
80135600:  3803FFFA   subi   r0,r3,6
80135604:  54000FFE   rlwinm   r0,r0,1,31,31
80135608:  981C2C99   stb   r0,11417(r28)
8013560C:  A0180016   lhz   r0,22(r24)
80135610:  20000001   subfic   r0,r0,1
80135614:  54000FFE   rlwinm   r0,r0,1,31,31
80135618:  981C2C9A   stb   r0,11418(r28)
8013561C:  A0780016   lhz   r3,22(r24)
80135620:  38030001   addi   r0,r3,1
80135624:  B0180016   sth   r0,22(r24)
80135628:  7C14B800   cmpw   r20,r23
8013562C:  4180FF54   blt+   0x80135580
80135630:  A0180016   lhz   r0,22(r24)
80135634:  2C000000   cmpwi   r0,0
80135638:  41820028   beq-   0x80135660
8013563C:  90010114   stw   r0,276(r1)
80135640:  38780008   addi   r3,r24,8
80135644:  7C641B78   mr   r4,r3
80135648:  92C10110   stw   r22,272(r1)
8013564C:  C8010110   lfd   f0,272(r1)
80135650:  EC00F028   fsubs   f0,f0,f30
80135654:  EC3F0024   fdivs   f1,f31,f0
80135658:  4BF53255   bl   0x800888ac
8013565C:  48000074   b   0x801356d0
80135660:  80180000   lwz   r0,0(r24)
80135664:  80780004   lwz   r3,4(r24)
80135668:  2C000000   cmpwi   r0,0
8013566C:  40800014   bge-   0x80135680
80135670:  2C000400   cmpwi   r0,1024
80135674:  4180000C   blt-   0x80135680
80135678:  38800000   li   r4,0
8013567C:  48000024   b   0x801356a0
80135680:  54001838   rlwinm   r0,r0,3,0,28
80135684:  7C9E0214   add   r4,r30,r0
80135688:  80040004   lwz   r0,4(r4)
8013568C:  7C030040   cmplw   r3,r0
80135690:  4182000C   beq-   0x8013569c
80135694:  38800000   li   r4,0
80135698:  48000008   b   0x801356a0
8013569C:  80840000   lwz   r4,0(r4)
801356A0:  80040050   lwz   r0,80(r4)
801356A4:  80640054   lwz   r3,84(r4)
801356A8:  900100B8   stw   r0,184(r1)
801356AC:  80040058   lwz   r0,88(r4)
801356B0:  906100BC   stw   r3,188(r1)
801356B4:  C00100B8   lfs   f0,184(r1)
801356B8:  900100C0   stw   r0,192(r1)
801356BC:  C02100BC   lfs   f1,188(r1)
801356C0:  D0180008   stfs   f0,8(r24)
801356C4:  C00100C0   lfs   f0,192(r1)
801356C8:  D038000C   stfs   f1,12(r24)
801356CC:  D0180010   stfs   f0,16(r24)
801356D0:  3B18001C   addi   r24,r24,28
801356D4:  3AB50001   addi   r21,r21,1
801356D8:  801F027C   lwz   r0,636(r31)
801356DC:  7C150000   cmpw   r21,r0
801356E0:  4180FE7C   blt+   0x8013555c
801356E4:  38000000   li   r0,0
801356E8:  7FE3FB78   mr   r3,r31
801356EC:  901F13F0   stw   r0,5104(r31)
801356F0:  480006C5   bl   0x80135db4
801356F4:  48000034   b   0x80135728
801356F8:  7FE4FB78   mr   r4,r31
801356FC:  38A00000   li   r5,0
80135700:  38600000   li   r3,0
80135704:  48000010   b   0x80135714
80135708:  98640298   stb   r3,664(r4)
8013570C:  3884001C   addi   r4,r4,28
80135710:  38A50001   addi   r5,r5,1
80135714:  801F027C   lwz   r0,636(r31)
80135718:  7C050000   cmpw   r5,r0
8013571C:  4180FFEC   blt+   0x80135708
80135720:  7FE3FB78   mr   r3,r31
80135724:  480005A1   bl   0x80135cc4
80135728:  38600000   li   r3,0
8013572C:  E3E10178   psq_l   f31,376(r1),0,0
80135730:  CBE10170   lfd   f31,368(r1)
80135734:  E3C10168   psq_l   f30,360(r1),0,0
80135738:  CBC10160   lfd   f30,352(r1)
8013573C:  E3A10158   psq_l   f29,344(r1),0,0
80135740:  39610150   addi   r11,r1,336
80135744:  CBA10150   lfd   f29,336(r1)
80135748:  4808067D   bl   0x801b5dc4
8013574C:  80010184   lwz   r0,388(r1)
80135750:  7C0803A6   mtlr   r0
80135754:  38210180   addi   r1,r1,384
80135758:  4E800020   blr   
[/spoiler]

There are 4 other addresses and they don't relocate the avatar. Neither does the first one.
[spoiler]
803C42E4 804B56D0
804B56DC 804E4B54
[/spoiler]

Gecko Register Code (Float Avatar + 7f over the ground)  
[spoiler]283CB80A 00004000
82200001 803C42E4
86000001 0000007f
84200001 803C42E4
E0000000 80008000 [/spoiler]
You can pm me, I've got time for your troubles.

dcx2

You may have the right address, but you're not adding to the float correctly.  That's why you probably aren't seeing what you want to see.

Note that adding 0x7F to a float will only increase the value of the float by 1.7796490496925177e-43, which is practically 0.

Assuming the pointer in r24 doesn't change, you can use this Gecko op to do it.  However, if r24 does change, then you'll need to hook the ASM and it gets trickier because you'll want to use fadds and you can't directly load float registers, but you must go through memory first, which requires finding an unused address to build our float in.

283CB80A 00004000 # button activator
80000001 803C42E4 # gr1 = 803C42E4
86910001 3F800000 # [gr1] = fadds [gr1], 1.0
E0000000 80008000

I bolded the bits that I changed.

Patedj

#2
Can the unused address be after the hooked address?
Is there a fast way to find an unused address?

Can any address which relate to the Y axis be used to make the avatars jump?
You can pm me, I've got time for your troubles.

dcx2

If we abuse the architecture a bit, we can create what I've referred to as Small Data Areas in a C2 code...

hook - 80135568:  C3B8000C   lfs   f29,12(r24)


bl SKIP_DATA
.float 1.0

SKIP_DATA:
mflr r12
lfs f0,0(r12)
lfs f29,12(r24)
fadds f29,f29,f0
stfs f29,12(r24)

Compiled, this is

C2135568 00000004
48000009 3F800000
7D8802A6 C00C0000
C3B8000C EFBD002A
D3B8000C 00000000

As it stands now it just adds 1.0.  You could do the button activator with anti-code.  Or you can use a 4E code to put the address of the 3F800000 into the po, and then you could use a button activator and a 14 code type to over-write the 3F800000 based on whatever button activators.

Patedj

#4
No luck for lift off, but great lesson!

Here's a different address, The second off the list.
[spoiler] CR:84200022  XER:20000000  CTR:8008986C DSIS:00400000
DAR:804B56D0 SRR0:80088864 SRR1:0000B032   LR:80089E10
 r0:00000610   r1:8062ADE0   r2:8061FA20   r3:8062AE7C
 r4:804B56CC   r5:804B56E4   r6:40490FDB   r7:FFFFFFFF
 r8:FFFFFFFF   r9:8008986C  r10:8008986C  r11:FFFFFFFF
r12:8008986C  r13:8061D200  r14:00000000  r15:00000000
r16:00000000  r17:00000000  r18:00000000  r19:00000000
r20:00000000  r21:00000000  r22:00000000  r23:00000000
r24:00000000  r25:803C0000  r26:803B9F00  r27:803D0000
r28:803D2878  r29:904559A0  r30:904559A0  r31:804B562C

 f0:4155F0C0   f1:C3FE257E   f2:4155F0C0   f3:442C5618
 f4:3F7C1A78   f5:3E32B8C2   f6:BEE4E9EB   f7:3F64CB6C
 f8:BC936A60   f9:3D038FD3  f10:BF64F11F  f11:BEE518EF
f12:3F7FF13B  f13:BCADDA67  f14:00000000  f15:00000000
f16:00000000  f17:00000000  f18:00000000  f19:00000000
f20:00000000  f21:00000000  f22:00000000  f23:00000000
f24:00000000  f25:00000000  f26:00000000  f27:00000000
f28:00000000  f29:3E014FE6  f30:00000000  f31:00000000[/spoiler]

Here's the function... This is well over my head.
[spoiler]80088864:  E0040000   psq_l   f0,0(r4),0,0
80088868:  E0250000   psq_l   f1,0(r5),0,0
8008886C:  1040082A   ps_add   f2,f0,f1
80088870:  E0048008   psq_l   f0,8(r4),1,0
80088874:  E0258008   psq_l   f1,8(r5),1,0
80088878:  F0430000   psq_st   f2,0(r3),0,0
8008887C:  1040082A   ps_add   f2,f0,f1
80088880:  F0438008   psq_st   f2,8(r3),1,0
80088884:  4E800020   blr   
[/spoiler]

What does it mean and would this be a better address to use?

[spoiler]I tried something similar here for the floats
bl NO_DATA
.float 1.0

NO_DATA:
mflr r12
lfs f16,0(r12) ----> f14 because all the others have either a constant op or they keep changing
lfs f0,0(r4)
fadds f0,f0,f14
stfs f0,0(r4)

Nothing happens
[/spoiler]
You can pm me, I've got time for your troubles.

Patedj

#5
r5 seems to be the register that moves when I move with the 1st and 3rd y axes addresses. In this case, I thought of addi to r5, but this doesn't make the avatar move either...

the previous address DAR 804B56D0
it's f0 and f3 move when I move (they're always the same)

I also figure that it would be something like this for the psq but the asm can't read it...
[spoiler]bl NO_DATA
.float 1.0

NO_DATA:
mflr r12
psq_l f14,0(r12),0,0
psq_l f0,0(r4),0,0
psadd f0,f0,f14
psq_st f0,0(r4),0,0
psq_l f0,0(r4),0,0[/spoiler]

This is what it gives me with a combination of your asm that you gave me
[spoiler]C2088864 00000005
48000009 3F800000
7D8802A6 E1ec0000
E0040000 1000782a
f0040000 E0040000
60000000 00000000[/spoiler]

dcx2, why r28, 0?
I tried it without the r28, 0 which makes the bl 0x4 I wonder if this is wrong.
You can pm me, I've got time for your troubles.

Patedj

#6
SOMETHING HAPPENNED!!
OH YEAH!!

[spoiler]C2088864 00000003
7D8802A6 E1ec0000
E0040000 1000782a
f0040000 E0040000[/spoiler]

I took away the bl and r28 and now my avatars are all moving!! LOL but going into the earth instead...

[spoiler]C2088864 00000003
7D8802A6 E1ec0000
E0040000 10007828  ---> makes it sub instead
f0040000 E0040000[/spoiler]

This makes them lift from the ground, doesn't reset the register... when selecting the avatar
and blacks out the screen when in play mode
You can pm me, I've got time for your troubles.

Patedj

#7
I didn't find the Y address for the hero but I found the Y address for the game's sprites. the last code that I did works on that address and lifts all sprites!!  O0
Y axes
DAR 804B56D0
[spoiler]mflr r12
psq_l f15,0(r12),0,0
psq_l f0,0(r4),0,0
ps_add f0,f0,f15
psq_st f0,0(r4),0,0
nop
[/spoiler]
[spoiler]sprites levitate code
04088888 E0040000
283CB80E 00000008
C2088888 00000004
7D8802A6 E1EC0000
E0040000 1000782a
F0040000 E0040000
60000000 00000000
E0000000 80008000[/spoiler]
You can pm me, I've got time for your troubles.

dcx2

#8
I admire your experimentation...but you're a bit lost right now.  It's actually somewhat surprising that it works at all.

mflr = Move From Link Register.  By removing the bl part, you've made it so mflr is useless.  The point of bl was to skip over the data, because you cannot execute data as an ASM instruction.  The bl also puts a pointer to the data in the LR, which is why we used mflr.  The "r28" thing wasn't an ASM instruction.  It was the data that we're trying to add to your Y axis.  3F800000 = 1.0.  Which is why there's that line ".float 1.0" in the code.  That's the float we're actually adding...the assembler will turn that 1.0 into 3F800000.  Or you could put 32.0, and the assembler will figure that out for you too.

1.0 might have been too small.  Try recompiling it with, say, 100.0 or 1000.0

Also, your new breakpoint looks like it's in a leaf function that might be called from other places.  Which would explain why all the sprites are being affected instead of just one.  That's not a good read breakpoint to use...I bet if you change it to an execute breakpoint, you'd have to hit Set Breakpoint multiple times per frame, which means that many people are calling that piece of ASM.

EDIT: Also, because this function is a leaf function that does not back up the LR, we can't use the bl trick here. =(  But this is a bad breakpoint for other reasons anyway

EDIT2: We actually *can* use the bl trick, but we have to back up the LR ourselves, and we can use r0 to do that.  mflr r0, bl SKIP_DATA, .float, mflr r12, mtlr r0, [your ASM here]

---

After you do all that...look at the 4E code type.  http://www.geckocodes.org/index.php?arsenal=1#4E

Use that to put the address of the float in your ASM code into the po.

Then, after the ASM code, you can use several different button activators that use 14 writes to hot-swap different values into the float.

Patedj

#9
Lol, tell me about it! Thanks for the comment though. let's take the first bp and let's make it the way you're instructing me to.

[spoiler]
4E001000 00000000
C2135568 00000004
48000009 42C80000
7D8802A6 C00C0000
C3B8000C EFBD002A
D3B8000C 00000000
E0000000 80008000
283CB80A 00004000
14[address] 00002000 ---> DAR address 803C42E4? / ASM address 80135568?/ or the bolded one?
E0000000 80008000
this should replace the 4e?[/spoiler]
You can pm me, I've got time for your troubles.

dcx2

#10
Closer.  Break it down into chunks.  You have a C2 code that constantly tries to add 100.0 to 12(r24).  That looks good.

C2135568 00000004
48000009 42C80000
7D8802A6 C00C0000
C3B8000C EFBD002A
D3B8000C 00000000

Now, the purpose of the 4E code is to put the address of a code into the po.  This allows you to dynamically alter the code in the Wii's memory while the game is running.  However, you got the value for the 4E totally wrong.  You don't want an X of 0x1000.  You want the 4E to point to the float value in the C2 code; that is, 42C80000 in this case.  Given that an X of 0 will point at the first word of the next code line (that is, C2135568), and an X of 4 points to the second word (00000004), what value of X will point at the 42C80000?

---

After you get that result...you should get rid of the terminator.  You went through all that trouble to use the 4E to get a pointer to the data you wanted to modify in the po...and then you use the terminator to reset the po back to 80000000.

Regarding 14[address], you got this address from the 4E code and put it into po, so the [address] in this case is 0.  What you're doing is over-writing 42C80000 with different floats.  Over-write with 00000000 to prevent moon jump from working...or over-write with 42C80000 to start adding.  The C2 code just adds whatever, and it's the 28/14 codes' job to adjust what the C2 adds.

EDIT: this implies you'll need multiple button activators, by the way

Patedj

#11
the right value for 4e will be x of 0c  c= 12 which is the 4th word
so
Anti Code yes?
4E00000c 00000000
ASM [spoiler]C2135568 00000004
48000009 42C80000
7D8802A6 C00C0000
C3B8000C EFBD002A
D3B8000C 00000000[/spoiler]
Button Activator
1400000c 42c80000

You can pm me, I've got time for your troubles.

dcx2

#12
This isn't quite like an anti-code.  It doesn't replace the hack with the original instruction.  However, we will use it to turn the hack off, by making the "add to Y axis" float a 0 instead of 100.

You got the 4E right.  But then you added 0xC again in the 14 code.  You don't have to do that.  The 4E code already added 0xC to the po.

4E00000C 00000000 # put a pointer to the float in po
C2135568 00000004 # hook that constantly adds float to Y axis
48000009 42C80000
7D8802A6 C00C0000
C3B8000C EFBD002A
D3B8000C 00000000
283CB80A BFFF4000 # if holding C
14000000 42C80000 # make hook add 100.0
E2100001 00000000 # else without updating ba or po
14000000 00000000 # make hook add 0.0
E0000000 80008000 # terminator

EDIT:

it might help to see the code in action.  After applying the code, go to Memory Viewer, start at address 80000000, and do a Hex search for C2135568.  You should find where all the codes are.  Then turn on auto-update, and start pressing buttons.  For bonus points, go to the code's address in the Disassembly tab and you'll see the ASM that it's made of.  You could even set execute breakpoints on your code's ASM so you can step through it and see what it's doing.

Patedj

I see, Thank you again!
This is great! I'm glad I've got a genius helping us out!
You can pm me, I've got time for your troubles.

Patedj

#14
It doesn't work though... I tried making the float bigger but nothing and I mean float value of 47AFC800 and no movement whatsoever. Wrong address?
searched for C2135568 got 80002998

Registers
[spoiler]CR:48224482  XER:20000000  CTR:80306664 DSIS:00400000
DAR:80002998 SRR0:80001FA0 SRR1:0000B032   LR:80001904
  r0:20000000   r1:8062AF48   r2:8061FA20   r3:0000000C
  r4:800029A4   r5:00000007   r6:80000000   r7:80001808
  r8:00000000   r9:00000030  r10:00000002  r11:00000000
r12:80000000  r13:8061D200  r14:00000003  r15:80002998
r16:800029A4  r17:00000000  r18:00000000  r19:00000000
r20:CC000000  r21:000000FF  r22:00000000  r23:00000000
r24:00000000  r25:0000B032  r26:00000004  r27:803D0000
r28:000000FF  r29:80001904  r30:803D0000  r31:80000000

  f0:00000000   f1:00000000   f2:00000000   f3:00000000
  f4:00000000   f5:00000000   f6:00000000   f7:00000000
  f8:3E124924   f9:3DBA2E6E  f10:3D886B35  f11:3D4BDC9A
f12:3610765F  f13:390A99C3  f14:00000000  f15:00000000
f16:00000000  f17:00000000  f18:00000000  f19:00000000
f20:00000000  f21:00000000  f22:00000000  f23:00000000
f24:00000000  f25:00000000  f26:00000000  f27:00000000
f28:00000000  f29:00000000  f30:00000000  f31:00000000[/spoiler]

Function
[spoiler]80001FA0:  806F0000   lwz   r3,0(r15) :)
80001FA4:  808F0004   lwz   r4,4(r15)
80001FA8:  39EF0008   addi   r15,r15,8
80001FAC:  71090001   andi.   r9,r8,1
80001FB0:  2F890000   cmpwi   cr7,r9,0
80001FB4:  39200000   li   r9,0
80001FB8:  546A1F7E   rlwinm   r10,r3,3,29,31
80001FBC:  54653F7E   rlwinm   r5,r3,7,29,31
80001FC0:  746B1000   andis.   r11,r3,4096
80001FC4:  546301FE   rlwinm   r3,r3,0,7,31
80001FC8:  4082000C   bne-   0x80001fd4
80001FCC:  54CC000C   rlwinm   r12,r6,0,0,6
80001FD0:  48000008   b   0x80001fd8
80001FD4:  7E0C8378   mr   r12,r16
80001FD8:  2E050000   cmpwi   cr4,r5,0
80001FDC:  2C0A0001   cmpwi   r10,1
80001FE0:  41A0002C   blt+   0x8000200c
80001FE4:  41A200E4   beq+   0x800020c8
80001FE8:  2C0A0003   cmpwi   r10,3
80001FEC:  41A001AC   blt+   0x80002198
80001FF0:  41820250   beq-   0x80002240
80001FF4:  2C0A0005   cmpwi   r10,5
80001FF8:  418002D4   blt-   0x800022cc
80001FFC:  41A204E0   beq+   0x800024dc
80002000:  2C0A0007   cmpwi   r10,7
80002004:  41A0050C   blt+   0x80002510
80002008:  480005F0   b   0x800025f8
8000200C:  7D8C1A14   add   r12,r12,r3
80002010:  2C050003   cmpwi   r5,3
80002014:  41820048   beq-   0x8000205c
80002018:  41810060   bgt-   0x80002078
8000201C:  40BEFF84   bne-   cr7,0x80001fa0
80002020:  2E050001   cmpwi   cr4,r5,1
80002024:  4191002C   bgt-   cr4,0x80002050
80002028:  548A843E   rlwinm   r10,r4,16,16,31
8000202C:  41920010   beq-   cr4,0x8000203c
80002030:  7C8961AE   stbx   r4,r9,r12
80002034:  39290001   addi   r9,r9,1
80002038:  4800000C   b   0x80002044
8000203C:  7C89632E   sthx   r4,r9,r12
80002040:  39290002   addi   r9,r9,2
80002044:  354AFFFF   subic.   r10,r10,1
80002048:  40A0FFE4   bge-   0x8000202c
8000204C:  4BFFFF54   b   0x80001fa0
80002050:  558C003A   rlwinm   r12,r12,0,0,29
80002054:  908C0000   stw   r4,0(r12)
80002058:  4BFFFF48   b   0x80001fa0
8000205C:  7C892378   mr   r9,r4
80002060:  409E04C8   bne-   cr7,0x80002528
80002064:  3529FFFF   subic.   r9,r9,1
80002068:  418004C0   blt-   0x80002528
8000206C:  7CA978AE   lbzx   r5,r9,r15
80002070:  7CA961AE   stbx   r5,r9,r12
80002074:  4BFFFFF0   b   0x80002064
80002078:  39EF0008   addi   r15,r15,8
8000207C:  40BEFF24   bne-   cr7,0x80001fa0
80002080:  80AFFFF8   lwz   r5,-8(r15)
80002084:  816FFFFC   lwz   r11,-4(r15)
80002088:  54B1043E   rlwinm   r17,r5,0,16,31
8000208C:  54AA853E   rlwinm   r10,r5,16,20,31
80002090:  54A5273E   rlwinm   r5,r5,4,28,31
80002094:  2E850001   cmpwi   cr5,r5,1
80002098:  41960010   beq-   cr5,0x800020a8
8000209C:  41B50014   bgt+   cr5,0x800020b0
800020A0:  7C8961AE   stbx   r4,r9,r12
800020A4:  48000010   b   0x800020b4
800020A8:  7C89632E   sthx   r4,r9,r12
800020AC:  48000008   b   0x800020b4
800020B0:  7C89612E   stwx   r4,r9,r12
800020B4:  7C845A14   add   r4,r4,r11
800020B8:  7D298A14   add   r9,r9,r17
800020BC:  354AFFFF   subic.   r10,r10,1
800020C0:  4080FFD4   bge+   0x80002094
800020C4:  4BFFFEDC   b   0x80001fa0
800020C8:  546907FF   rlwinm.   r9,r3,0,31,31
800020CC:  41820010   beq-   0x800020dc
800020D0:  5508F87E   rlwinm   r8,r8,31,1,31
800020D4:  71090001   andi.   r9,r8,1
800020D8:  2F890000   cmpwi   cr7,r9,0
800020DC:  2E850004   cmpwi   cr5,r5,4
800020E0:  2D8A0005   cmpwi   cr3,r10,5
800020E4:  5108083C   rlwimi   r8,r8,1,0,30
800020E8:  409E0078   bne-   cr7,0x80002160
800020EC:  418D04B8   bgt-   cr3,0x800025a4
800020F0:  7D8C1A14   add   r12,r12,r3
800020F4:  418C000C   blt-   cr3,0x80002100
800020F8:  41940030   blt-   cr5,0x80002128
800020FC:  4800001C   b   0x80002118
80002100:  40940010   bge-   cr5,0x80002110
80002104:  558C003A   rlwinm   r12,r12,0,0,29
80002108:  816C0000   lwz   r11,0(r12)
8000210C:  4800001C   b   0x80002128
80002110:  558C003C   rlwinm   r12,r12,0,0,30
80002114:  A16C0000   lhz   r11,0(r12)
80002118:  7C8920F8   not   r9,r4
8000211C:  5529843E   rlwinm   r9,r9,16,16,31
80002120:  7D6B4838   and   r11,r11,r9
80002124:  5484043E   rlwinm   r4,r4,0,16,31
80002128:  7F0B2040   cmplw   cr6,r11,r4
8000212C:  70A90003   andi.   r9,r5,3
80002130:  41820018   beq-   0x80002148
80002134:  2C090002   cmpwi   r9,2
80002138:  41820018   beq-   0x80002150
8000213C:  4181001C   bgt-   0x80002158
80002140:  409A0020   bne-   cr6,0x80002160
80002144:  48000018   b   0x8000215c
80002148:  419A0018   beq-   cr6,0x80002160
8000214C:  48000010   b   0x8000215c
80002150:  41990010   bgt-   cr6,0x80002160
80002154:  48000008   b   0x8000215c
80002158:  41980008   blt-   cr6,0x80002160
8000215C:  61080001   ori   r8,r8,1
80002160:  408EFE40   bne+   cr3,0x80001fa0
80002164:  4194FE3C   blt+   cr5,0x80001fa0
80002168:  816FFFF8   lwz   r11,-8(r15)
8000216C:  409E0020   bne-   cr7,0x8000218c
80002170:  706C0008   andi.   r12,r3,8
80002174:  4182000C   beq-   0x80002180
80002178:  710C0001   andi.   r12,r8,1
8000217C:  41820010   beq-   0x8000218c
80002180:  398B0010   addi   r12,r11,16
80002184:  518B0336   rlwimi   r11,r12,0,12,27
80002188:  48000008   b   0x80002190
8000218C:  556B0716   rlwinm   r11,r11,0,28,11
80002190:  916FFFF8   stw   r11,-8(r15)
80002194:  4BFFFE0C   b   0x80001fa0
80002198:  40BEFE08   bne-   cr7,0x80001fa0
8000219C:  546916BA   rlwinm   r9,r3,2,26,29
800021A0:  546E87FE   rlwinm   r14,r3,16,31,31
800021A4:  2D8E0000   cmpwi   cr3,r14,0
800021A8:  2E050004   cmpwi   cr4,r5,4
800021AC:  70AE0003   andi.   r14,r5,3
800021B0:  2E8E0002   cmpwi   cr5,r14,2
800021B4:  41940014   blt-   cr5,0x800021c8
800021B8:  41960050   beq-   cr5,0x80002208
800021BC:  7C640734   extsh   r4,r3
800021C0:  7C847A14   add   r4,r4,r15
800021C4:  48000068   b   0x8000222c
800021C8:  5465A7FF   rlwinm.   r5,r3,20,31,31
800021CC:  4182000C   beq-   0x800021d8
800021D0:  7D27482E   lwzx   r9,r7,r9
800021D4:  7C844A14   add   r4,r4,r9
800021D8:  418E0008   beq-   cr3,0x800021e0
800021DC:  7C8C2214   add   r4,r12,r4
800021E0:  2E8E0001   cmpwi   cr5,r14,1
800021E4:  41960008   beq-   cr5,0x800021ec
800021E8:  80840000   lwz   r4,0(r4)
800021EC:  546367FF   rlwinm.   r3,r3,12,31,31
800021F0:  4182003C   beq-   0x8000222c
800021F4:  4090000C   bge-   cr4,0x80002200
800021F8:  7C843214   add   r4,r4,r6
800021FC:  48000030   b   0x8000222c
80002200:  7C848214   add   r4,r4,r16
80002204:  48000028   b   0x8000222c
80002208:  5465A7FF   rlwinm.   r5,r3,20,31,31
8000220C:  4182000C   beq-   0x80002218
80002210:  7D27482E   lwzx   r9,r7,r9
80002214:  7C844A14   add   r4,r4,r9
80002218:  4090000C   bge-   cr4,0x80002224
8000221C:  7CCC212E   stwx   r6,r12,r4
80002220:  4BFFFD80   b   0x80001fa0
80002224:  7E0C212E   stwx   r16,r12,r4
80002228:  4BFFFD78   b   0x80001fa0
8000222C:  4090000C   bge-   cr4,0x80002238
80002230:  7C862378   mr   r6,r4
80002234:  4BFFFD6C   b   0x80001fa0
80002238:  7C902378   mr   r16,r4
8000223C:  4BFFFD64   b   0x80001fa0
80002240:  54891E78   rlwinm   r9,r4,3,25,28
80002244:  39290040   addi   r9,r9,64
80002248:  2C050002   cmpwi   r5,2
8000224C:  41800048   blt-   0x80002294
80002250:  546B5003   rlwinm.   r11,r3,10,0,1
80002254:  41820014   beq-   0x80002268
80002258:  41810008   bgt-   0x80002260
8000225C:  48000010   b   0x8000226c
80002260:  41BEFD40   beq-   cr7,0x80001fa0
80002264:  48000008   b   0x8000226c
80002268:  40BEFD38   bne-   cr7,0x80001fa0
8000226C:  2C050003   cmpwi   r5,3
80002270:  41810010   bgt-   0x80002280
80002274:  41A20010   beq+   0x80002284
80002278:  7DE7482E   lwzx   r15,r7,r9
8000227C:  4BFFFD24   b   0x80001fa0
80002280:  7DE7492E   stwx   r15,r7,r9
80002284:  7C640734   extsh   r4,r3
80002288:  54841A78   rlwinm   r4,r4,3,9,28
8000228C:  7DEF2214   add   r15,r15,r4
80002290:  4BFFFD10   b   0x80001fa0
80002294:  40BEFD0C   bne-   cr7,0x80001fa0
80002298:  7CA74A14   add   r5,r7,r9
8000229C:  40920014   bne-   cr4,0x800022b0
800022A0:  5464043E   rlwinm   r4,r3,0,16,31
800022A4:  91E50000   stw   r15,0(r5)
800022A8:  90850004   stw   r4,4(r5)
800022AC:  4BFFFCF4   b   0x80001fa0
800022B0:  81250004   lwz   r9,4(r5)
800022B4:  2C090000   cmpwi   r9,0
800022B8:  41A2FCE8   beq-   0x80001fa0
800022BC:  3929FFFF   subi   r9,r9,1
800022C0:  91250004   stw   r9,4(r5)
800022C4:  81E50000   lwz   r15,0(r5)
800022C8:  4BFFFCD8   b   0x80001fa0
800022CC:  40BEFCD4   bne-   cr7,0x80001fa0
800022D0:  546B16BA   rlwinm   r11,r3,2,26,29
800022D4:  7F475A14   add   r26,r7,r11
800022D8:  813A0000   lwz   r9,0(r26)
800022DC:  546E67BE   rlwinm   r14,r3,12,30,31
800022E0:  41920084   beq-   cr4,0x80002364
800022E4:  2E050005   cmpwi   cr4,r5,5
800022E8:  40900174   bge-   cr4,0x8000245c
800022EC:  2E050003   cmpwi   cr4,r5,3
800022F0:  40900090   bge-   cr4,0x80002380
800022F4:  2E050001   cmpwi   cr4,r5,1
800022F8:  546587FF   rlwinm.   r5,r3,16,31,31
800022FC:  41820008   beq-   0x80002304
80002300:  7C8C2214   add   r4,r12,r4
80002304:  2F0E0001   cmpwi   cr6,r14,1
80002308:  40920024   bne-   cr4,0x8000232c
8000230C:  41B90018   bgt+   cr6,0x80002324
80002310:  419A000C   beq-   cr6,0x8000231c
80002314:  88840000   lbz   r4,0(r4)
80002318:  480000F8   b   0x80002410
8000231C:  A0840000   lhz   r4,0(r4)
80002320:  480000F0   b   0x80002410
80002324:  80840000   lwz   r4,0(r4)
80002328:  480000E8   b   0x80002410
8000232C:  5473E53E   rlwinm   r19,r3,28,20,31
80002330:  41B90020   bgt+   cr6,0x80002350
80002334:  419A0010   beq-   cr6,0x80002344
80002338:  99240000   stb   r9,0(r4)
8000233C:  38840001   addi   r4,r4,1
80002340:  48000018   b   0x80002358
80002344:  B1240000   sth   r9,0(r4)
80002348:  38840002   addi   r4,r4,2
8000234C:  4800000C   b   0x80002358
80002350:  91240000   stw   r9,0(r4)
80002354:  38840004   addi   r4,r4,4
80002358:  3673FFFF   subic.   r19,r19,1
8000235C:  4080FFD4   bge+   0x80002330
80002360:  4BFFFC40   b   0x80001fa0
80002364:  546587FF   rlwinm.   r5,r3,16,31,31
80002368:  41820008   beq-   0x80002370
8000236C:  7C846214   add   r4,r4,r12
80002370:  71C50001   andi.   r5,r14,1
80002374:  4182009C   beq-   0x80002410
80002378:  7C844A14   add   r4,r4,r9
8000237C:  48000094   b   0x80002410
80002380:  546A87BE   rlwinm   r10,r3,16,30,31
80002384:  548E16BA   rlwinm   r14,r4,2,26,29
80002388:  7E677214   add   r19,r7,r14
8000238C:  40920008   bne-   cr4,0x80002394
80002390:  3A6FFFFC   subi   r19,r15,4
80002394:  809A0000   lwz   r4,0(r26)
80002398:  81330000   lwz   r9,0(r19)
8000239C:  714B0001   andi.   r11,r10,1
800023A0:  41820008   beq-   0x800023a8
800023A4:  7C9A2378   mr   r26,r4
800023A8:  714B0002   andi.   r11,r10,2
800023AC:  41820010   beq-   0x800023bc
800023B0:  7D334B78   mr   r19,r9
800023B4:  40B20008   bne+   cr4,0x800023bc
800023B8:  7E6C9A14   add   r19,r12,r19
800023BC:  5465673F   rlwinm.   r5,r3,12,28,31
800023C0:  2C050009   cmpwi   r5,9
800023C4:  40800054   bge-   0x80002418
800023C8:  48000079   bl   0x80002440
800023CC:  7C892214   add   r4,r9,r4
800023D0:  48000040   b   0x80002410
800023D4:  7C8921D6   mullw   r4,r9,r4
800023D8:  48000038   b   0x80002410
800023DC:  7D242378   or   r4,r9,r4
800023E0:  48000030   b   0x80002410
800023E4:  7D242038   and   r4,r9,r4
800023E8:  48000028   b   0x80002410
800023EC:  7D242278   xor   r4,r9,r4
800023F0:  48000020   b   0x80002410
800023F4:  7D242030   slw   r4,r9,r4
800023F8:  48000018   b   0x80002410
800023FC:  7D242430   srw   r4,r9,r4
80002400:  48000010   b   0x80002410
80002404:  5D24203E   rlwnm   r4,r9,r4,0,31
80002408:  48000008   b   0x80002410
8000240C:  7D242630   sraw   r4,r9,r4
80002410:  909A0000   stw   r4,0(r26)
80002414:  4BFFFB8C   b   0x80001fa0
80002418:  2C05000A   cmpwi   r5,10
8000241C:  4181FB84   bgt+   0x80001fa0
80002420:  C05A0000   lfs   f2,0(r26)
80002424:  C0730000   lfs   f3,0(r19)
80002428:  4182000C   beq-   0x80002434
8000242C:  EC43102A   fadds   f2,f3,f2
80002430:  48000008   b   0x80002438
80002434:  EC4300B2   fmuls   f2,f3,f2
80002438:  D05A0000   stfs   f2,0(r26)
8000243C:  4BFFFB64   b   0x80001fa0
80002440:  7D4802A6   mflr   r10
80002444:  54A51E78   rlwinm   r5,r5,3,25,28
80002448:  7D4A2A14   add   r10,r10,r5
8000244C:  809A0000   lwz   r4,0(r26)
80002450:  81330000   lwz   r9,0(r19)
80002454:  7D4803A6   mtlr   r10
80002458:  4E800020   blr   
[/spoiler]
You can pm me, I've got time for your troubles.