12-30-2020, 08:55 PM
(This post was last modified: 03-19-2021, 12:54 AM by 1superchip.)
Shock Recovery Timer [1superchip]
This code displays how long until you recover from being shrunk by a Thundercloud, Koopa Cape Zapper, or Shock on the Milliseconds timer. The timer will function normally when not shocked.
Works everywhere
NTSC-U
C27ED9F8 00000007
A3840008 3D80809B
618CD110 818C0000
818C0020 818C0000
818C0010 818C0010
A96C018C 2C0B0000
40A10008 7D7C5B78
60000000 00000000
PAL
C27F84F8 00000007
A3840008 3D80809C
618C18F8 818C0000
818C0020 818C0000
818C0010 818C0010
A96C018C 2C0B0000
40A10008 7D7C5B78
60000000 00000000
NTSC-J
C27F7B64 00000007
A3840008 3D80809C
618C0958 818C0000
818C0020 818C0000
818C0010 818C0010
A96C018C 2C0B0000
40A10008 7D7C5B78
60000000 00000000
NTSC-K
C27E68B8 00000007
A3840008 3D80809A
618CFF38 818C0000
818C0020 818C0000
818C0010 818C0010
A96C018C 2C0B0000
40A10008 7D7C5B78
60000000 00000000
Source:
.set region, ''
.if (region == 'E' || region == 'e') # RMCE
.set playerBase, 0x809bd110
.elseif (region == 'P' || region == 'p') # RMCP
.set playerBase, 0x809c18f8
.elseif (region == 'J' || region == 'j') # RMCJ
.set playerBase, 0x809c0958
.elseif (region == 'K' || region == 'k') # RMCK
.set playerBase, 0x809aff38
.else # Invalid Region
.abort
.endif
lhz r28, 0x8 (r4)
lis r12, playerBase@h
ori r12, r12, playerBase@l
lwz r12, 0x0 (r12)
lwz r12, 0x20 (r12)
lwz r12, 0x0 (r12)
lwz r12, 0x10 (r12)
lwz r12, 0x10 (r12)
lha r11, 0x18C (r12)
cmpwi r11, 0
ble+ end
mr r28, r11
end:
Code Creator: 1superchip
Code Contributors: JoshuaMK
This code displays how long until you recover from being shrunk by a Thundercloud, Koopa Cape Zapper, or Shock on the Milliseconds timer. The timer will function normally when not shocked.
Works everywhere
NTSC-U
C27ED9F8 00000007
A3840008 3D80809B
618CD110 818C0000
818C0020 818C0000
818C0010 818C0010
A96C018C 2C0B0000
40A10008 7D7C5B78
60000000 00000000
PAL
C27F84F8 00000007
A3840008 3D80809C
618C18F8 818C0000
818C0020 818C0000
818C0010 818C0010
A96C018C 2C0B0000
40A10008 7D7C5B78
60000000 00000000
NTSC-J
C27F7B64 00000007
A3840008 3D80809C
618C0958 818C0000
818C0020 818C0000
818C0010 818C0010
A96C018C 2C0B0000
40A10008 7D7C5B78
60000000 00000000
NTSC-K
C27E68B8 00000007
A3840008 3D80809A
618CFF38 818C0000
818C0020 818C0000
818C0010 818C0010
A96C018C 2C0B0000
40A10008 7D7C5B78
60000000 00000000
Source:
.set region, ''
.if (region == 'E' || region == 'e') # RMCE
.set playerBase, 0x809bd110
.elseif (region == 'P' || region == 'p') # RMCP
.set playerBase, 0x809c18f8
.elseif (region == 'J' || region == 'j') # RMCJ
.set playerBase, 0x809c0958
.elseif (region == 'K' || region == 'k') # RMCK
.set playerBase, 0x809aff38
.else # Invalid Region
.abort
.endif
lhz r28, 0x8 (r4)
lis r12, playerBase@h
ori r12, r12, playerBase@l
lwz r12, 0x0 (r12)
lwz r12, 0x20 (r12)
lwz r12, 0x0 (r12)
lwz r12, 0x10 (r12)
lwz r12, 0x10 (r12)
lha r11, 0x18C (r12)
cmpwi r11, 0
ble+ end
mr r28, r11
end:
Code Creator: 1superchip
Code Contributors: JoshuaMK