Posts: 6
Threads: 5
Joined: May 2019
Reputation:
3
09-15-2021, 09:45 AM
(This post was last modified: 09-16-2021, 07:36 AM by Dea00.)
CPU bot[Dea]
Works every game mode but offline only.
NTSC-J
C252EEB8 00000003
801E0018 2C000000
40820008 38000001
60000000 00000000
C27258DC 00000003
80630038 2C030000
40820008 38600001
60000000 00000000
NTSC-U
C252A9F0 00000003
801E0018 2C000000
40820008 38000001
60000000 00000000
C2721E40 00000003
80630038 2C030000
40820008 38600001
60000000 00000000
PAL(untested)
C252F538 00000003
801E0018 2C000000
40820008 38000001
60000000 00000000
C2726270 00000003
80630038 2C030000
40820008 38600001
60000000 00000000
NTSC-K(untested)
C251D590 00000003
801E0018 2C000000
40820008 38000001
60000000 00000000
C2714618 00000003
80630038 2C030000
40820008 38600001
60000000 00000000
Reference https://youtu.be/PuNHqc29_u4
Posts: 65
Threads: 3
Joined: Jun 2021
Reputation:
2
Loaded up wstrt and threw in the addresses and quickly tested NTSC-U, and it worked. wstrt port is awesome (and I'm a noob lol)
Code: #───────────────────────────────────────────────────────────────────────────────
# PAL USA JAP KOR where status
#───────────────────────────────────────────────────────────────────────────────
0x8052f538 0x8052a9f0 0x8052eeb8 0x8051d590 REL1 0: verified
0x80726270 0x80721e40 0x807258dc 0x80714618 REL1 0: verified
#───────────────────────────────────────────────────────────────────────────────
NTSC-U
C252A9F0 00000003
801E0018 2C000000
40820008 38000001
60000000 00000000
C2721E40 00000003
80630038 2C030000
40820008 38600001
60000000 00000000
PAL
C252F538 00000003
801E0018 2C000000
40820008 38000001
60000000 00000000
C2726270 00000003
80630038 2C030000
40820008 38600001
60000000 00000000
KOR
C251D590 00000003
801E0018 2C000000
40820008 38000001
60000000 00000000
C2714618 00000003
80630038 2C030000
40820008 38600001
60000000 00000000
I confirmed NTSC-U working, but not PAL or KOR. Awesome code by the way, better than MarioBOT, it acts just like the CPUs (mostly, my test run it got stuck on the water at the very end of Koopa Cape >.>), including drifts and item usage.
Posts: 4,226
Threads: 894
Joined: Feb 2018
Reputation:
96
09-16-2021, 09:36 PM
(This post was last modified: 09-16-2021, 09:36 PM by Vega.)
Considering this code only requires a hook address port, and it's now ported, I went ahead and moved the thread out of incomplete/outdated to Offline: Non Item.
Posts: 2
Threads: 0
Joined: Jul 2022
Reputation:
0
Could it be possible to make variants of this code to affect just a certain player? As if you'd be playing in splitscreen mode but you're just 1 and still want to see a 2-4 player perspective
Posts: 12
Threads: 1
Joined: Jun 2024
Reputation:
0
(07-09-2022, 10:56 PM)AGES Wrote: Could it be possible to make variants of this code to affect just a certain player? As if you'd be playing in splitscreen mode but you're just 1 and still want to see a 2-4 player perspective
Bumping this. I'd love to race against my Miis in 4 player mode.
Posts: 4,226
Threads: 894
Joined: Feb 2018
Reputation:
96
06-03-2024, 02:28 AM
(This post was last modified: 06-03-2024, 01:12 PM by Vega.)
Frankenstein'd this up really quick, try this out. untested. In PAL, too lazy to port.
X = slot that code effects, make sure both X values match
PAL
C252F538 00000004
2C1A000X 801E0018
40A20010 2C000000
40820008 38000001
60000000 00000000
C272625C 00000002
5460063E 5464063E
60000000 00000000
C272627C 00000003
2C04000X 5403D97E
40A20008 38600001
60000000 00000000
Code: #PAL
#8052F538
#r26 always = slot
cmpwi r26, 0
lwz r0, 0x0018 (r30) #OG instruction, 0 = Human? 1 = CPU? 3 = idk?
bne+ end
cmpwi r0, 0 #Just incase r0 is 3, we don't wanna change 3 to 1 for w/e reason???
bne- end
li r0, 1 #Force to CPU?
end:
=============
#8072625C
#Original Instruction
#Slot in r3, extract byte and place in r0
rlwinm r0, r3, 0, 24, 31
#Also Save Slot in r4 (safe, preserved til next ASM code)
rlwinm r4, r3, 0, 24, 31
=============
#8072627C
#Appears that r3 is suppose to return some sort of bool? Idk
#Check slot (r4)
cmpwi r4, 0
rlwinm r3, r0, 27, 5, 31
bne+ 0x8
li r3, 1 #When slot is met, force return of True
Posts: 12
Threads: 1
Joined: Jun 2024
Reputation:
0
(06-03-2024, 02:28 AM)Vega Wrote: Frankenstein'd this up really quick, try this out. untested. In PAL, too lazy to port.
X = slot that code effects, make sure both X values match
PAL
C252F538 00000004
2C1A000X 801E0018
40A20010 2C000000
40820008 38000001
60000000 00000000
C272625C 00000002
5460063E 5464063E
60000000 00000000
C272625C 00000002
2C04000X 41820008
5403D97E 00000000
Code: #PAL
#8052F538
#r26 always = slot
cmpwi r26, 0
lwz r0, 0x0018 (r30) #OG instruction, 0 = Human? 1 = CPU? 3 = idk?
bne+ end
cmpwi r0, 0 #Just incase r0 is 3, we don't wanna change 3 to 1 for w/e reason???
bne- end
li r0, 1 #Force to CPU?
end:
=============
#8072625C
#Original Instruction
#Slot in r3, extract byte and place in r0
rlwinm r0, r3, 0, 24, 31
#Also Save Slot in r4 (safe, preserved til next ASM code)
rlwinm r4, r3, 0, 24, 31
=============
#8072627C
#Appears that r3 is suppose to return some sort of bool? Idk
#Check slot (r4)
cmpwi r4, 0
beq- 0x8 #if eq, go to end
#Original instruction, why mask bits 5 thru 31?
rlwinm r3, r0, 27, 5, 31
I don't have the PAL version of the game, how would I go about getting it / porting this code to NTSC-U? Sorry for the inconvenience.
Posts: 12
Threads: 1
Joined: Jun 2024
Reputation:
0
(06-03-2024, 02:55 AM)emeraldvixen Wrote: (06-03-2024, 02:28 AM)Vega Wrote: Frankenstein'd this up really quick, try this out. untested. In PAL, too lazy to port.
X = slot that code effects, make sure both X values match
PAL
C252F538 00000004
2C1A000X 801E0018
40A20010 2C000000
40820008 38000001
60000000 00000000
C272625C 00000002
5460063E 5464063E
60000000 00000000
C272625C 00000002
2C04000X 41820008
5403D97E 00000000
Code: #PAL
#8052F538
#r26 always = slot
cmpwi r26, 0
lwz r0, 0x0018 (r30) #OG instruction, 0 = Human? 1 = CPU? 3 = idk?
bne+ end
cmpwi r0, 0 #Just incase r0 is 3, we don't wanna change 3 to 1 for w/e reason???
bne- end
li r0, 1 #Force to CPU?
end:
=============
#8072625C
#Original Instruction
#Slot in r3, extract byte and place in r0
rlwinm r0, r3, 0, 24, 31
#Also Save Slot in r4 (safe, preserved til next ASM code)
rlwinm r4, r3, 0, 24, 31
=============
#8072627C
#Appears that r3 is suppose to return some sort of bool? Idk
#Check slot (r4)
cmpwi r4, 0
beq- 0x8 #if eq, go to end
#Original instruction, why mask bits 5 thru 31?
rlwinm r3, r0, 27, 5, 31
I don't have the PAL version of the game, how would I go about getting it / porting this code to NTSC-U? Sorry for the inconvenience.
Nevermind. I was able to get the PAL version. I tried the code and got some errors, I took a screenshot of the first one.
After a few, I hit "ignore" and when the race started it didn't work (I set both X values to 2, so that should mean Player 2 gets set to a CPU, right?)
For further information I tested with CPUs off in a 2 player VS match. Don't know if that effects anything.
Thanks for your help so far, it's greatly appreciated
Posts: 2
Threads: 0
Joined: Jul 2022
Reputation:
0
(06-03-2024, 02:55 AM)emeraldvixen Wrote: (06-03-2024, 02:28 AM)Vega Wrote: Frankenstein'd this up really quick, try this out. untested. In PAL, too lazy to port.
X = slot that code effects, make sure both X values match
PAL
C252F538 00000004
2C1A000X 801E0018
40A20010 2C000000
40820008 38000001
60000000 00000000
C272625C 00000002
5460063E 5464063E
60000000 00000000
C272625C 00000002
2C04000X 41820008
5403D97E 00000000
Code: #PAL
#8052F538
#r26 always = slot
cmpwi r26, 0
lwz r0, 0x0018 (r30) #OG instruction, 0 = Human? 1 = CPU? 3 = idk?
bne+ end
cmpwi r0, 0 #Just incase r0 is 3, we don't wanna change 3 to 1 for w/e reason???
bne- end
li r0, 1 #Force to CPU?
end:
=============
#8072625C
#Original Instruction
#Slot in r3, extract byte and place in r0
rlwinm r0, r3, 0, 24, 31
#Also Save Slot in r4 (safe, preserved til next ASM code)
rlwinm r4, r3, 0, 24, 31
=============
#8072627C
#Appears that r3 is suppose to return some sort of bool? Idk
#Check slot (r4)
cmpwi r4, 0
beq- 0x8 #if eq, go to end
#Original instruction, why mask bits 5 thru 31?
rlwinm r3, r0, 27, 5, 31
I don't have the PAL version of the game, how would I go about getting it / porting this code to NTSC-U? Sorry for the inconvenience.
I was also wondering for an NTSC version
Posts: 4,226
Threads: 894
Joined: Feb 2018
Reputation:
96
Apologies. I've made two silly mistakes with the code. Regarding slots....
Slot 0 = P1
Slot 1 = P2/CPU1
Slot 2 = P3/CPU2
.. ..
Slot B = Final CPU
X = slot that code effects, make sure both X values match
PAL
C252F538 00000004
2C1A000X 801E0018
40A20010 2C000000
40820008 38000001
60000000 00000000
C272625C 00000002
5460063E 5464063E
60000000 00000000
C272627C 00000003
2C04000X 5403D97E
40A20008 38600001
60000000 00000000
Here's NTSC-U
C252A9F0 00000004
2C1A000X 801E0018
40A20010 2C000000
40820008 38000001
60000000 00000000
C2721E2C 00000002
5460063E 5464063E
60000000 00000000
C2721E4C 00000003
2C04000X 5403D97E
40A20008 38600001
60000000 00000000
|