Toad's Factory Conveyor Looper [CLF78, Ismy]
#1
This code makes the curved conveyors (BeltCurveA) from Toad's Factory keep running after the first three cycles, by altering their timers.

NTSC-U
C27F0804 00000006
800300BC 3B7EFFC4
7C00D800 40A2001C
7C0E0378 7FA57050
7DCEEA14 91C300B8
7DCEEA14 91C300BC
60000000 00000000

PAL
C27FD3C4 00000006
800300BC 3B7EFFC4
7C00D800 40A2001C
7C0E0378 7FA57050
7DCEEA14 91C300B8
7DCEEA14 91C300BC
60000000 00000000

NTSC-J
C27FCA30 00000006
800300BC 3B7EFFC4
7C00D800 40A2001C
7C0E0378 7FA57050
7DCEEA14 91C300B8
7DCEEA14 91C300BC
60000000 00000000

NTSC-K
C27EB784 00000006
800300BC 3B7EFFC4
7C00D800 40A2001C
7C0E0378 7FA57050
7DCEEA14 91C300B8
7DCEEA14 91C300BC
60000000 00000000

Source:

Code:
# Original instruction
lwz r0, 0xBC(r3)

# Subtract one second to let the animation play
subi r27, r30, 60
cmpw r0, r27
bne+ end

# Copy to r14
mr r14, r0

# Calculate the difference between first timer (r5) and second timer (r14)
sub r29, r14, r5

# Add the result once to the first timer and twice to the second timer
add r14, r14, r29
stw r14, 0xB8(r3)
add r14, r14, r29
stw r14, 0xBC(r3)

end:


Code created by: CLF78 & Ismy
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)