Don't Get Blued In 1st
#1
Don't Get Blued In 1st

This code greatly reduces the chances of you getting blued when you are in 1st place.

Instructions:
First note: Do not activate until 30 seconds has elapsed in the race!

Get in 1st place. Right before grabbing an item box, activate the code. The closer you are to the box before you activate, the better. Now since you grabbed an item, it shows to everyone else you are holding the blue. If anyone else was holding the blue, the code will not activate. This will stop any chances of you getting a shroom (item value 0x14) in first, except for one scenario which is..... If you activate too early when grabbing the box, it runs a small risk that somebody launched a blue in the air but has not hit anyone yet, so then you grab a box and get the mushroom because a blue is still currently in play.

Two other ASM codes are added in to spoof your trailed mode and tail_mode. This is to stop advanced cheat detectors from knowing you are using this code. Let's say you picked up a green when you activated the code before grabbing a box, when you pull out the green, opponents can now get a blue shell from a box. So try to time out pulling out trailed/circling items right before grabbing another box. This is done for the trailed/circling mode spoofing. The key is to have an item in inventory, that is what stops anyone else from getting the blue. 

If you are holding an item like a green shell behind you, opponents cannot see it nor be effected by it. When you launch the green shell, it simply looks like you were holding it in inventory then launched it without ever having it trailed behind you. This is done for the tail_mode spoofing.

Whenever you lose 1st place, deactivate the code! If desired, you can keep it activated to help a friend in 1st not get blued. Just remember to get an item in inventory.

Also don't forget to deactivate once the race finishes!

Special shout outs to Star and Phyz!

NTSC-U
C265EE14 00000003
88030001 1D960004
3D8C8168 980C0193
60000000 00000000
C265EE30 00000003
88100011 1D960004
3D8C8168 980C0193
60000000 00000000
2834XXXX YYYYZZZZ
C265D3A0 0000001B
9421FFB0 BDC10008
3E408000 3E208168
62310190 3A000007
81F10000 7C0F8000
4182008C 81F10004
7C0F8000 41820080
81F10008 7C0F8000
41820074 81F1000C
7C0F8000 41820068
81F10010 7C0F8000
4182005C 81F10014
7C0F8000 41820050
81F10018 7C0F8000
41820044 81F1001C
7C0F8000 41820038
81F10020 7C0F8000
4182002C 81F10024
7C0F8000 41820020
81F10028 7C0F8000
41820014 81F1002C
7C0F8000 41820008
48000010 3A600001
92721570 48000010
3A600002 92721570
3BE00007 9BE50001
B9C10008 38210050
60000000 00000000
C265FCC8 00000006
9421FFB0 BDC10008
3E808000 82B41570
2C150002 41820008
48000008 3B800014
9B830002 B9C10008
38210050 00000000
C265FCCC 00000006
9421FFB0 BDC10008
3EE08000 83171570
2C180002 41820008
48000008 3BE00000
9BE30004 B9C10008
38210050 00000000
E0000000 00000000
2834XXXX YYYYZZZZ
0465D3A0 9BE50001
0465FCC8 9B830002
0465FCCC 9BE30004
E0000000 80008000

PAL
C265E18C 00000003
88030001 1D960004
3D8C8168 980C0193
60000000 00000000
C265E1A8 00000003
88100011 1D960004
3D8C8168 980C0193
60000000 00000000
2834XXXX YYYYZZZZ
C265C718 0000001B
9421FFB0 BDC10008
3E408000 3E208168
62310190 3A000007
81F10000 7C0F8000
4182008C 81F10004
7C0F8000 41820080
81F10008 7C0F8000
41820074 81F1000C
7C0F8000 41820068
81F10010 7C0F8000
4182005C 81F10014
7C0F8000 41820050
81F10018 7C0F8000
41820044 81F1001C
7C0F8000 41820038
81F10020 7C0F8000
4182002C 81F10024
7C0F8000 41820020
81F10028 7C0F8000
41820014 81F1002C
7C0F8000 41820008
48000010 3A600001
92721570 48000010
3A600002 92721570
3BE00007 9BE50001
B9C10008 38210050
60000000 00000000
C265F040 00000006
9421FFB0 BDC10008
3E808000 82B41570
2C150002 41820008
48000008 3B800014
9B830002 B9C10008
38210050 00000000
C265F044 00000006
9421FFB0 BDC10008
3EE08000 83171570
2C180002 41820008
48000008 3BE00000
9BE30004 B9C10008
38210050 00000000
E0000000 00000000
2834XXXX YYYYZZZZ
0465C718 9BE50001
0465F040 9B830002
0465F044 9BE30004
E0000000 80008000

NTSC-J
C265D7F8 00000003
88030001 1D960004
3D8C8168 980C0193
60000000 00000000
C265D814 00000003
88100011 1D960004
3D8C8168 980C0193
60000000 00000000
2834XXXX YYYYZZZZ
C265BD84 0000001B
9421FFB0 BDC10008
3E408000 3E208168
62310190 3A000007
81F10000 7C0F8000
4182008C 81F10004
7C0F8000 41820080
81F10008 7C0F8000
41820074 81F1000C
7C0F8000 41820068
81F10010 7C0F8000
4182005C 81F10014
7C0F8000 41820050
81F10018 7C0F8000
41820044 81F1001C
7C0F8000 41820038
81F10020 7C0F8000
4182002C 81F10024
7C0F8000 41820020
81F10028 7C0F8000
41820014 81F1002C
7C0F8000 41820008
48000010 3A600001
92721570 48000010
3A600002 92721570
3BE00007 9BE50001
B9C10008 38210050
60000000 00000000
C265E6AC 00000006
9421FFB0 BDC10008
3E808000 82B41570
2C150002 41820008
48000008 3B800014
9B830002 B9C10008
38210050 00000000
C265E6B0 00000006
9421FFB0 BDC10008
3EE08000 83171570
2C180002 41820008
48000008 3BE00000
9BE30004 B9C10008
38210050 00000000
E0000000 00000000
2834XXXX YYYYZZZZ
0465BD84 9BE50001
0465E6AC 9B830002
0465E6B0 9BE30004
E0000000 80008000

NTSC-K
C264C4A4 00000003
88030001 1D960004
3D8C8168 980C0193
60000000 00000000
C264C4C0 00000003
88100011 1D960004
3D8C8168 980C0193
60000000 00000000
2833XXXX YYYYZZZZ
C264AA30 0000001B
9421FFB0 BDC10008
3E408000 3E208168
62310190 3A000007
81F10000 7C0F8000
4182008C 81F10004
7C0F8000 41820080
81F10008 7C0F8000
41820074 81F1000C
7C0F8000 41820068
81F10010 7C0F8000
4182005C 81F10014
7C0F8000 41820050
81F10018 7C0F8000
41820044 81F1001C
7C0F8000 41820038
81F10020 7C0F8000
4182002C 81F10024
7C0F8000 41820020
81F10028 7C0F8000
41820014 81F1002C
7C0F8000 41820008
48000010 3A600001
92721570 48000010
3A600002 92721570
3BE00007 9BE50001
B9C10008 38210050
60000000 00000000
C264D358 00000006
9421FFB0 BDC10008
3E808000 82B41570
2C150002 41820008
48000008 3B800014
9B830002 B9C10008
38210050 00000000
C264D35C 00000006
9421FFB0 BDC10008
3EE08000 83171570
2C180002 41820008
48000008 3BE00000
9BE30004 B9C10008
38210050 00000000
E0000000 00000000
2833XXXX YYYYZZZZ
0464AA30 9BE50001
0464D358 9B830002
0464D35C 9BE30004
E0000000 80008000



Source <3 (not including Bully's two USB Gecko item spy codes)

###Blue Shell Player Checker Code###

stwu r1,-80(r1) #Register Safety
stmw r14,8(r1) #Register Safety

lis r18, 0x8000 #Set first half of address for read-value storage, use offset values to complete rest of address later

lis r17, 0x8168 #Set Address, 1st half, to read the values from Bully's USB Gecko Item Spy Codes
ori r17, r17, 0x0190 #Set Address, 2nd half

li r16, 0x7 #Set Blue Shell Item Value

##The following is simply comparing everyone's held item values to the value of 0x7 (blue), if anyone is holding 0x7, the code will jump to 'no_go' label. If nobody is holding 0x7, the code will jump to 'green_light'##

lwz r15,0(r17)
cmpw r15,r16
beq- no_go

lwz r15,4(r17)
cmpw r15,r16
beq- no_go

lwz r15,8(r17)
cmpw r15,r16
beq- no_go

lwz r15,12(r17)
cmpw r15,r16
beq- no_go

lwz r15,16(r17)
cmpw r15,r16
beq- no_go

lwz r15,20(r17)
cmpw r15,r16
beq- no_go

lwz r15,24(r17)
cmpw r15,r16
beq- no_go

lwz r15,28(r17)
cmpw r15,r16
beq- no_go

lwz r15,32(r17)
cmpw r15,r16
beq- no_go

lwz r15,36(r17)
cmpw r15,r16
beq- no_go

lwz r15,40(r17)
cmpw r15,r16
beq- no_go

lwz r15,44(r17)
cmpw r15,r16
beq- no_go
b green_light

##Fail safe, don't execute code if someone is holding the Blue##
no_go:
li r19, 0x1 #Set value to 1 (don't execute later ASMs)
stw r19, 0x1570 (r18) #Store value of 1 to the Mem80 location in crash handler that will be read later by the other ASMs
b finish_code #Skip green_light label, and finish the code off##

##Nobody is holding the blue, execute the green light##
green_light:
li r19, 0x2 #Set value to 2 (execute later ASMs)
stw r19, 0x1570 (r18) #Store value of 2 to Mem80 location
li r31, 0x7 #Activate Anti-Item spy code, once you grab an item, it shows to others you got the blue, therefore they cannot grab one now!!

finish_code:
stb r31, 0x0001 (r5) #Default ASM
lmw r14,8(r1) #End Register Safety
addi r1,r1,80 #End Register Safety
##End code##


###Trailing/Circling Mode Spoofer Code###
stwu r1,-80(r1) #Register Safety
stmw r14,8(r1) #Register Safety

lis r20, 0x8000 #Set first half of Mem80 address, offset will be used to complete 2nd half

lwz r21, 0x1570 (r20) #Read the value at Mem80 address 80001570, it will be either 1 (dont execute) or 2 (execute) from the first ASM code

cmpwi r21, 0x2 #Compare Mem80 address value to 2
beq- good_togo #If equal to 2, we can execute, jump to good_togo label
b finish_code #If not equal to 2, do NOT execute, skip good_togo label, finish off code

good_togo:
li r28, 0x14 #Activate Anti-Trailed Item Spy. If you pull out your item, it shows to others you launched the blue. Is in place to render cheat detectors useless

finish_code:
stb r28,2(r3) #Default ASM
lmw r14,8(r1) #End Register Safety
addi r1,r1,80 #End Register Safety
##End Code##


###Tail_Mode Spoofer Code###
stwu r1,-80(r1) #Register Safety
stmw r14,8(r1) #Register Safety

lis r23, 0x8000 #Set first half of Mem80 address, offset will be used to complete 2nd half

lwz r24, 0x1570 (r23) #Read the value at Mem80 address 80001570, it will be either 1 (dont execute) or 2 (execute) from the first ASM code

cmpwi r24, 0x2 #Compare Mem80 address value to 2
beq- good_togo #If equal to 2, we can execute, jump to good_togo label
b finish_code #If not equal to 2, do NOT execute, skip good_togo label, finish off code

good_togo:
li r31, 0 #Activate Anti-Tail_Mode Item Spy. If you launch your item, it mimics the Tail_Mode value of launching a blue. Is in place to render cheat detectors useless

finish_code:
stb r31, 0x0004 (r3) 
lmw r14,8(r1) #End Register Safety
addi r1,r1,80 #End Register Safety
##End Code##
###End All Codes###

Code creator: zak  Rolleyes
Code contributors(s): Bully (USB Gecko Item Spy Codes), Star (Anti Trailed Item Spy Code)
Reply
#2
Wow. Very interesting concept! Quick question though, why do you use the instructions for the register safety though? Like is it necessary to prevent game crashes, etc?
Reply
#3
(09-10-2018, 06:22 AM)420 Matt Wrote: Wow. Very interesting concept! Quick question though, why do you use the instructions for the register safety though? Like is it necessary to prevent game crashes, etc?

http://mkwii.org/showthread.php?tid=873

A small thread about Register Safety.

I probably didn't have to do the Register Safety ASM functions for the Anti-Trailed and Anti-Tail_Mode ASM codes, but I did anyway because I was lazy to check for available registers.

In fact, you don't have to always use the Register Safety ASM functions to allow you to use Registers 14 to 31. Whenever you set a Mem Breakpoint on Dolphin, any registers not in red are currently not being used by the Address or nearby Address's. Thus you can use a non-red Register 14 thru 31, you just have to set the default value back. However there are exceptions to this. So its safer to just push/pop the stack.

For example in Mdmwii's original MAC Spoofer code he uses Register 19.

li r19, 0xZZ
stb r19,5(r4)
li r19,0
li r5,6
nop

As you can see he sets r19 back to 0. I did a Instruction Breakpoint on the code's address and saw that Register 19 was NOT highlighted in Red and its value is 0.

Keep in mind, you can NEVER use Registers 2 and 13 no matter what. Also only use Register 1 for the Safety ASM functions.
Reply
#4
(09-10-2018, 04:52 PM)zak Wrote:
(09-10-2018, 06:22 AM)420 Matt Wrote: Wow. Very interesting concept! Quick question though, why do you use the instructions for the register safety though? Like is it necessary to prevent game crashes, etc?

http://mkwii.org/showthread.php?tid=873

A small thread about Register Safety.

I probably didn't have to do the Register Safety ASM functions for the Anti-Trailed and Anti-Tail_Mode ASM codes, but I did anyway because I was lazy to check for available registers.

In fact, you don't have to always use the Register Safety ASM functions to allow you to use Registers 14 to 31. Whenever you set a Mem Breakpoint on Dolphin, any registers not in red are currently not being used by the Address or nearby Address's. Thus you can use a non-red Register 14 thru 31, you just have to set the default value back. However there are exceptions to this. So its safer to just push/pop the stack.

For example in Mdmwii's original MAC Spoofer code he uses Register 19.

li r19, 0xZZ
stb r19,5(r4)
li r19,0
li r5,6
nop

As you can see he sets r19 back to 0. I did a Instruction Breakpoint on the code's address and saw that Register 19 was NOT highlighted in Red and its value is 0.

Keep in mind, you can NEVER use Registers 2 and 13 no matter what. Also only use Register 1 for the Safety ASM functions.

I see... Does this go for any ASM code or just certain instructions in an ASM code?
Reply
#5
I think you mean by code. Like I said it all depends. If you are making a code and want to play it safe (plus not worrying about restoring Register value defaults), then just do the ASM functions to push/pop the stack.
Reply
#6
(09-13-2018, 01:46 PM)zak Wrote: I think you mean by code. Like I said it all depends. If you are making a code and want to play it safe (plus not worrying about restoring Register value defaults), then just do the ASM functions to push/pop the stack.

Yeah. I get it. Thx.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)