CPU bot[Dea]
#11
(06-03-2024, 01:17 PM)Vega Wrote: 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

Getting closer! Tested the NTSC-U version in 2 Player Mode, with Player 2 set to CPU using this code. P2 drives automatically like intended, however P1 still has the CPU's automatic turning.
Reply
#12
(06-03-2024, 07:14 PM)emeraldvixen Wrote:
(06-03-2024, 01:17 PM)Vega Wrote: 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

Getting closer! Tested the NTSC-U version in 2 Player Mode, with Player 2 set to CPU using this code. P2 drives automatically like intended, however P1 still has the CPU's automatic turning.

NEVERMIND!! I did a dumb thing and had the original code on when I tested this. I tested it without it and it works fine. My bad!! Thanks so much
Reply
#13
(06-03-2024, 08:47 PM)emeraldvixen Wrote:
(06-03-2024, 07:14 PM)emeraldvixen Wrote:
(06-03-2024, 01:17 PM)Vega Wrote: 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

Getting closer! Tested the NTSC-U version in 2 Player Mode, with Player 2 set to CPU using this code. P2 drives automatically like intended, however P1 still has the CPU's automatic turning.

NEVERMIND!! I did a dumb thing and had the original code on when I tested this. I tested it without it and it works fine. My bad!! Thanks so much

I did however test with two of this cheat running at the same time (one made P3 a CPU and the other P4) and when I ran it P3 was not a CPU. So only one player will be a CPU at a time sadly. If there's a way to set multiple players as CPUs at once that'd be really cool, so for example P1 could be a player and P2, P3, P4 could be CPUs, or P1 and P2 as players while P3 and P4 are CPUs. Sorry if I'm asking for a lot.
Reply
#14
Try this. You need to fill in the truth table. Each byte (pair of hex digits) represents the Slot.

01 = Use code on that slot.
00 = Don't use code on that slot.

LL = Slot 0
NN = Slot 1
PP = Slot 2
QQ = Slot 3
RR = Slot 4
SS = Slot 5
TT = Slot 6
UU = Slot 7
VV = Slot 8
XX = Slot 9
YY = Slot A
ZZ = Slot B

NTSC-U
06001500 0000000C
LLNNPPQQ RRSSTTUU
VVXXYYZZ 00000000
C252A9F0 00000005
3D808000 618C1500
7D8CD0AE 2C0C0000
801E0018 41820010
2C000000 40820008
38000001 00000000
C2721E2C 00000002
5460063E 5464063E
60000000 00000000
C2721E4C 00000005
3D808000 618C1500
7D8C20AE 2C0C0000
4182000C 38600001
48000008 5403D97E
60000000 00000000

PAL
06001500 0000000C
LLNNPPQQ RRSSTTUU
VVXXYYZZ 00000000
C252F538 00000005
3D808000 618C1500
7D8CD0AE 2C0C0000
801E0018 41820010
2C000000 40820008
38000001 00000000
C272625C 00000002
5460063E 5464063E
60000000 00000000
C272627C 00000005
3D808000 618C1500
7D8C20AE 2C0C0000
4182000C 38600001
48000008 5403D97E
60000000 00000000

NTSC-J
too lazy to port

NTSC-K
too lazy to port

Code:
#Address Ports
#All = 0x80001500
#1 = True, 0 = False
.long 0x00000000 #Slots 0 thru 3
.long 0x00000000 #Slots 4 thru 7
.long 0x00000000 #Slots 8 thru B

==========

#1st ASM (change byte value that gets read)
# 0 = Human, 1 = CPU, 2 = unused?, 3 = CPU?
#Address Ports
#NTSC-U 8052A9F0
#PAL 8052F538
#Set Truth Table addr
lis r12, 0x8000
ori r12, r12, 0x1500

#r26 = slot code is currently hooked on
#Load truth table byte based on r26
lbzx r12, r12, r26
cmpwi r12, 0
lwz r0, 0x0018 (r30) #OG Instruction; regardless of truth table byte, we need to do this instruction
beq- end

#Slot matches Truth Table
#However only change it if zero (human). As other values can exist (such as 1 and 3)
cmpwi r0, 0
bne- end

#Everything good to go, force 0x1
li r0, 1
end:

==========

#2nd ASM (get slot for 3rd ASM)

#Address Ports
#NTSC-U 80721E2C
#PAL 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

==========

#3rd ASM (return bool for parent func??. 1 = CPU bot, 0 = Human)

#Address Ports
#NTSC-U 80721E4C
#PAL 8072627C

#Set Truth Table addr
lis r12, 0x8000
ori r12, r12, 0x1500

#r4 = slot code is currently hooked on
#Load truth table byte based on r26
lbzx r12, r12, r4
cmpwi r12, 0
beq- 0xC
li r3, 1 #When slot & truth table is met, force return of True
b 0x8
rlwinm r3, r0, 27, 5, 31 #Why the mask?
Reply
#15
(06-04-2024, 12:19 AM)Vega Wrote: Try this. You need to fill in the truth table. Each byte (pair of hex digits) represents the Slot.

01 = Use code on that slot.
00 = Don't use code on that slot.

LL = Slot 0
NN = Slot 1
PP = Slot 2
QQ = Slot 3
RR = Slot 4
SS = Slot 5
TT = Slot 6
UU = Slot 7
VV = Slot 8
XX = Slot 9
YY = Slot A
ZZ = Slot B

NTSC-U
06001500 0000000C
LLNNPPQQ RRSSTTUU
VVXXYYZZ 00000000
C252A9F0 00000005
3D808000 618C1500
7D8CD0AE 2C0C0000
801E0018 41820010
2C000000 40820008
38000001 00000000
C2721E2C 00000002
5460063E 5464063E
60000000 00000000
C2721E4C 00000005
3D808000 618C1500
7D8C20AE 2C0C0000
4182000C 38600001
48000008 5403D97E
60000000 00000000

PAL
06001500 0000000C
LLNNPPQQ RRSSTTUU
VVXXYYZZ 00000000
C252F538 00000005
3D808000 618C1500
7D8CD0AE 2C0C0000
801E0018 41820010
2C000000 40820008
38000001 00000000
C272625C 00000002
5460063E 5464063E
60000000 00000000
C272627C 00000005
3D808000 618C1500
7D8C20AE 2C0C0000
4182000C 38600001
48000008 5403D97E
60000000 00000000

NTSC-J
too lazy to port

NTSC-K
too lazy to port

Code:
#Address Ports
#All = 0x80001500
#1 = True, 0 = False
.long 0x00000000 #Slots 0 thru 3
.long 0x00000000 #Slots 4 thru 7
.long 0x00000000 #Slots 8 thru B

==========

#1st ASM (change byte value that gets read)
# 0 = Human, 1 = CPU, 2 = unused?, 3 = CPU?
#Address Ports
#NTSC-U 8052A9F0
#PAL 8052F538
#Set Truth Table addr
lis r12, 0x8000
ori r12, r12, 0x1500

#r26 = slot code is currently hooked on
#Load truth table byte based on r26
lbzx r12, r12, r26
cmpwi r12, 0
lwz r0, 0x0018 (r30) #OG Instruction; regardless of truth table byte, we need to do this instruction
beq- end

#Slot matches Truth Table
#However only change it if zero (human). As other values can exist (such as 1 and 3)
cmpwi r0, 0
bne- end

#Everything good to go, force 0x1
li r0, 1
end:

==========

#2nd ASM (get slot for 3rd ASM)

#Address Ports
#NTSC-U 80721E2C
#PAL 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

==========

#3rd ASM (return bool for parent func??. 1 = CPU bot, 0 = Human)

#Address Ports
#NTSC-U 80721E4C
#PAL 8072627C

#Set Truth Table addr
lis r12, 0x8000
ori r12, r12, 0x1500

#r4 = slot code is currently hooked on
#Load truth table byte based on r26
lbzx r12, r12, r4
cmpwi r12, 0
beq- 0xC
li r3, 1 #When slot & truth table is met, force return of True
b 0x8
rlwinm r3, r0, 27, 5, 31 #Why the mask?

OMG it works!! For whatever reason the character/vehicle choice gets screwed up a bit (P4's choice gets assigned to P1, P1's to P2's, ect) but other than that it works exactly how I wanted it to! Thank you so much, I'm going to have so much fun using this lol.
Reply
#16
Huh, that is strange. Probably because the code I added on is "hacky", I haven't had time to do any real debugging, just disassembled Dea's codes, did a quick view of Dolphin to get some slot info, and mashed it up.
Reply
#17
So, using this code online causes a weird side effect where you will be in a "Live View" state while being forced to spectate the host of the room. The game crashes at the end of the race.

(I know that this code is specified for offline only but, its a weird side effect none the less)
~MarioKartWii.com #1~
Reply
#18
Hey I've noticed that sometimes when a CPU-controlled player falls off the course, the CPU will get stuck. I think it's because when the CPU is controlling a player and that player falls off the course, the CPU's goal isn't reset or anything? Not sure how the CPUs function but I imagine they have a checkpoint system of some kind. Would it be possible to fix this? I've had to avoid racing on courses like Rainbow Road or Koopa Cape because the CPU will frequently get stuck. This doesn't appear to be an issue for the actual CPUs though, if that helps any. Thanks!!

edit: Also if it's possible to fix the whole thing with the character/vehicle combos being pushed downwards that'd be nice!!
Reply
#19
(07-03-2024, 05:31 AM)emeraldvixen Wrote: Hey I've noticed that sometimes when a CPU-controlled player falls off the course, the CPU will get stuck. I think it's because when the CPU is controlling a player and that player falls off the course, the CPU's goal isn't reset or anything? Not sure how the CPUs function but I imagine they have a checkpoint system of some kind. Would it be possible to fix this? I've had to avoid racing on courses like Rainbow Road or Koopa Cape because the CPU will frequently get stuck. This doesn't appear to be an issue for the actual CPUs though, if that helps any. Thanks!!

edit: Also if it's possible to fix the whole thing with the character/vehicle combos being pushed downwards that'd be nice!!

I’ve noticed a lot of the bot codes do this similar behavior. If I had to guess, the bot follows a specific path and when the bot falls off and respawn, it doesn’t reset where the bot thinks it is. So it tries to make a direct straight line to the last position they were which on certain maps puts in a direct path of an out of bounds area.
~MarioKartWii.com #1~
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)