Welcome, Guest
You have to register before you can post on our site.

Username
  

Password
  





Search Forums

(Advanced Search)

Forum Statistics
» Members: 647
» Latest member: shaymcn02
» Forum threads: 1,815
» Forum posts: 14,004

Full Statistics

Online Users
There are currently 113 online users.
» 2 Member(s) | 109 Guest(s)
Bing, Google, shaymcn02

Latest Threads
Make it to 10,000
Forum: General Discussion
Last Post: Fifty
4 minutes ago
» Replies: 7,341
» Views: 5,674,314
MKW Coder/Developer of th...
Forum: Coding & Hacking General Discussion
Last Post: Fifty
Today, 05:06 AM
» Replies: 11
» Views: 13,892
Allow Pausing Before Race...
Forum: Offline Non-Item
Last Post: Vega
Yesterday, 07:47 PM
» Replies: 0
» Views: 33
Top 10 Most Influential C...
Forum: Coding & Hacking General Discussion
Last Post: Vega
Yesterday, 03:27 PM
» Replies: 2
» Views: 7,364
Show Ice Cube on Online P...
Forum: Online Non-Item
Last Post: _Ro
Yesterday, 08:23 AM
» Replies: 0
» Views: 42
CPU Control Cycler [Ro]
Forum: Offline Non-Item
Last Post: _Ro
Yesterday, 07:56 AM
» Replies: 7
» Views: 1,037
Thunder Cloud Effect Modi...
Forum: Offline; Item
Last Post: JerryHatrick
01-10-2025, 11:13 PM
» Replies: 11
» Views: 1,133
Miniturbos and Inside Dri...
Forum: Coding & Hacking General Discussion
Last Post: JerryHatrick
01-10-2025, 09:54 AM
» Replies: 1
» Views: 864
Code request???
Forum: Code Support / Help / Requests
Last Post: DrTap
01-09-2025, 06:06 PM
» Replies: 3
» Views: 4,970
CPUs/Online Players Have ...
Forum: Visual & Sound Effects
Last Post: Zeraora
01-09-2025, 02:26 AM
» Replies: 2
» Views: 518

 
  Random Character but w/ Best Bike For Every Race Online [Vega]
Posted by: Vega - 01-06-2020, 02:22 PM - Forum: Online Non-Item - No Replies

Random Character but w/ Best Bike For Every Race Online [Vega]

Online only. Does NOT work in battle.

A slight mod to my original random character+combo code HERE to suit users who want to race more competitively. You will get a random character to race as (except Mii) for every online race (except Battle), but you will always use the best bike for w/e weight class of character you get. This means if you get a random lightweight, you are using bullet bike. If you get a random middleweight, you will be using machbike. And you will use flame runner for the random heavyweight chracter.

NOTE: This code makes use of memory address 0x800004C0. Make sure no other codes in your GCT/Cheat-Manager are using that address.

Region-Free
C0000000 00000026
7CA802A6 3D808000
896C04C0 396B0001
280B0018 41A00008
39600000 996C04C0
38000015 2C0B0001
41820084 2C0B0004
4182007C 2C0B0005
41820074 2C0B0006
4182006C 2C0B0008
41820064 2C0B000C
4182005C 2C0B000D
41820054 2C0B000E
4182004C 38000016
2C0B0000 41820040
2C0B0007 41820038
2C0B000A 41820030
2C0B000F 41820028
2C0B0010 41820020
2C0B0011 41820018
2C0B0012 41820010
2C0B0014 41820008
38000017 898C5F27
2C0C00EC 41820020
2C0C0010 41820024
2C0C0054 41820028
3D808061 618C2328
48000024 3D808064
618C374C 48000018
3D808064 618C2DB4
4800000C 3D808063
618C1A60 3D403880
7D4A5B78 914C0000
48000019 3D4038A0
7D4A0378 398C0004
914C0000 7CA803A6
7C00606C 7C0004AC
7C0067AC 4C00012C
4E800020 00000000

#~~~~~~~~~~~~~~~~~~~~~~~~#
# START ASSEMBLY C0 Code #
#~~~~~~~~~~~~~~~~~~~~~~~~#

#######################
#NOTES ABOUT COMPILING#
#######################

#(Even if you use PyiiASMH), compile this as a C2 (no address), then change C2 to C0.
#If you compile as a C0 in PyiiASMH, there will be an extra unnecessary blr at the very end
#Makes no difference, just an fyi

#~~~~~~~~~~~~~~#
# Memory Notes #
#~~~~~~~~~~~~~~#

#0x800004C0 = Byte cycle character

#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# Backup C0 LR, Setup Vector Address, Increment Character Value #
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#

mflr r5
lis r12, 0x8000
lbz r11, 0x04C0 (r12)

addi r11, r11, 1

cmplwi r11, 0x18 #range 0 thru 0x17
blt+ store_char_byte

li r11, 0 #Reset cycle

store_char_byte:
stb r11, 0x04C0 (r12)

#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# Set r9 for leightweight lbzx load offst #
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#

li r0, 0x15

cmpwi r11, 1
beq- check_region
cmpwi r11, 4
beq- check_region
cmpwi r11, 5
beq- check_region
cmpwi r11, 6
beq- check_region
cmpwi r11, 8
beq- check_region
cmpwi r11, 0xC
beq- check_region
cmpwi r11, 0xD
beq- check_region
cmpwi r11, 0xE
beq- check_region

#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# Set r9 to 1 add middleweight pattern add. Check for middleweight #
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#

li r0, 0x16

cmpwi r11, 0
beq- check_region
cmpwi r11, 7
beq- check_region
cmpwi r11, 0xA
beq- check_region
cmpwi r11, 0xF
beq- check_region
cmpwi r11, 0x10
beq- check_region
cmpwi r11, 0x11
beq- check_region
cmpwi r11, 0x12
beq- check_region
cmpwi r11, 0x14
beq- check_region

#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# Character is heavyweight. Set r9 to add 2 for pattern #
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#

li r0, 0x17

check_region:
lbz r12, 0x5F27 (r12) #Instruction here is vital. Virtually impossible for this to be modded by something unrelated

cmpwi r12, 0xEC
beq- pal
cmpwi r12, 0x10
beq- japan
cmpwi r12, 0x54
beq- korea

#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# Apply Character Address Based on Game Region #
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#

#usa
lis r12, 0x8061
ori r12, r12, 0x2328
b write_values

pal:
lis r12, 0x8064
ori r12, r12, 0x374C
b write_values

japan:
lis r12, 0x8064
ori r12, r12, 0x2DB4
b write_values

korea:
lis r12, 0x8063
ori r12, r12, 0x1A60

#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# Write New Instructions to Static Memory #
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#

write_values:
lis r10, 0x3880
or r10, r10, r11
stw r10, 0 (r12) #Store Character Value

bl clear_cache

lis r10, 0x38A0
or r10, r10, r0
addi r12, r12, 4 #Needed for upcoming cache flush
stw r10, 0 (r12) #Store Vehicle Value

#~~~~~~~~~~~~~~~#
# Restore C0 LR #
#~~~~~~~~~~~~~~~#

mtlr r5

#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# Clear Cache, so Instructions always update #
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#

clear_cache:
dcbst 0, r12
sync
icbi 0, r12
isync
blr #When called 2nd time, this will be the C0 LR

#~~~~~~~~~~~~~~#
# END ASSEMBLY #
#~~~~~~~~~~~~~~#

Print this item

  have to load a codes twice
Posted by: RamboMKW - 01-05-2020, 05:54 PM - Forum: Coding & Hacking General Discussion - Replies (2)

I'm trying to use these two codes:
Star Power Lasts Forever [Bully@Wiiplaza]
F6000001 80008100
D01C017C 807C0000
14000018 38600FFF
140001CC 38600FFF
E0000000 80008000

Mega Mushroom Lasts Forever [Bully@Wiiplaza]
F6000001 80008100
B01C0102 7F83E378
14000020 38600FFF
E0000000 80008000

but i have to "load them twice" by loading them with Gecko using the Homebrew channel then go back to the Wii menu after the game has startet and then load them again the same way. I don't get them to work in any other way. I'm using a German Mario Kart Wii disc on a PAL Wii. These two codes don't work on Dolphin emulator at all and I don't know of any other code with this strange behavior. Does someone knows why this happens or how to fix the codes?

Print this item

  Random Character+Vehicle Combo For Every Race -Online- [Vega]
Posted by: Vega - 01-03-2020, 10:01 PM - Forum: Online Non-Item - Replies (6)

Random Character+Vehicle Combo For Every Race -Online- [Vega]

Works for Online only. Doesn't work in battle.

This code will give you a completely random character+Vehicle combo for each race you do Online. There's no telling what character+vehicle combo you will be when the race begins! Have fun.

This code will NEVER give you the Mii as a character to use, and your chosen drift/transmission mode is NEVER effected.

NOTE: This code makes use of memory addresses 0x800004C0 and 0x800004C1. Make sure no other codes in your GCT/Cheat-Manager are using those addresses!

Region-Free
C0000000 0000002B
7CA802A6 3D808000
896C04C0 396B0001
280B0018 41A00008
39600000 996C04C0
894C04C1 394A0003
280A0024 41A00008
39400000 994C04C1
39200000 2C0B0001
41820084 2C0B0004
4182007C 2C0B0005
41820074 2C0B0006
4182006C 2C0B0008
41820064 2C0B000C
4182005C 2C0B000D
41820054 2C0B000E
4182004C 39200001
2C0B0000 41820040
2C0B0007 41820038
2C0B000A 41820030
2C0B000F 41820028
2C0B0010 41820020
2C0B0011 41820018
2C0B0012 41820010
2C0B0014 41820008
39200002 7C0A4A14
28000024 41A00008
7D204B78 898C5F27
2C0C00EC 41820020
2C0C0010 41820024
2C0C0054 41820028
3D808061 618C2328
48000024 3D808064
618C374C 48000018
3D808064 618C2DB4
4800000C 3D808063
618C1A60 3D403880
7D4A5B78 914C0000
48000019 3D4038A0
7D4A0378 398C0004
914C0000 7CA803A6
7C00606C 7C0004AC
7C0067AC 4C00012C
4E800020 00000000



Code creator: Vega



#~~~~~~~~~~~~~~~~~~~~~~~~#
# START ASSEMBLY C0 Code #
#~~~~~~~~~~~~~~~~~~~~~~~~#

#######################
#NOTES ABOUT COMPILING#
#######################

#(Even if you use PyiiASMH), compile this as a C2 (no address), then change C2 to C0.
#If you compile as a C0 in PyiiASMH, there will be an extra unnecessary blr at the very end
#Makes no difference, just an fyi

#~~~~~~~~~~~~~~#
# Memory Notes #
#~~~~~~~~~~~~~~#

#0x800004C0 = Byte cycle character
#0x800004C1 = Byte cycle for vehicle (+3 per increment)

#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# Backup C0 LR, Setup Vector Address, Increment Character Value #
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#

mflr r5
lis r12, 0x8000
lbz r11, 0x04C0 (r12)

addi r11, r11, 1

cmplwi r11, 0x18 #range 0 thru 0x17
blt+ store_char_byte

li r11, 0 #Reset cycle

store_char_byte:
stb r11, 0x04C0 (r12)

#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# Increment Vehicle. Gaps of 3 due to how Game sorts Vehicle-to-Class Values #
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#

lbz r10, 0x04C1 (r12)

addi r10, r10, 3

cmplwi r10, 0x24 #range 0 thru 0x23
blt+ store_veh_group_byte

li r10, 0 #Reset cycle

store_veh_group_byte:
stb r10, 0x04C1 (r12)

#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# Check Lightweight, then Middleweight. If not those, ofc its Heavy #
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#

#The Vehicle values in the game as listed by weight class as L, M, W, L, M, W etc etc.
#This pattern of grouping helps a lot.
#If lightweight character is r11, then just add 0 to the loaded vehicle byte value
#If middleweight for r11, then just add 1
#If heavy, add 2
#This allows vehicle byte to always be aligned with the weight class, ofc there's a max check further down

#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# Set r9 to 0 add lightweight pattern add. Check for lightweight #
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#

li r9, 0

cmpwi r11, 1
beq- add_values
cmpwi r11, 4
beq- add_values
cmpwi r11, 5
beq- add_values
cmpwi r11, 6
beq- add_values
cmpwi r11, 8
beq- add_values
cmpwi r11, 0xC
beq- add_values
cmpwi r11, 0xD
beq- add_values
cmpwi r11, 0xE
beq- add_values

#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# Set r9 to 1 add middleweight pattern add. Check for middleweight #
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#

li r9, 1

cmpwi r11, 0
beq- add_values
cmpwi r11, 7
beq- add_values
cmpwi r11, 0xA
beq- add_values
cmpwi r11, 0xF
beq- add_values
cmpwi r11, 0x10
beq- add_values
cmpwi r11, 0x11
beq- add_values
cmpwi r11, 0x12
beq- add_values
cmpwi r11, 0x14
beq- add_values

#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# Character is heavyweight. Set r9 to add 2 for pattern #
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#

li r9, 2

#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# Add the pattern (r9) amount to the loaded vehicle value #
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#

add_values:
add r0, r10, r9

cmplwi r0, 0x24 #Make sure Max isn't exceeded
blt+ check_region

mr r0, r9 #Very rare for this to occur. Max was exceeded, use default 1st vehicle (standard kart) of weight class aka the pattern value

#~~~~~~~~~~~~~~~~~~~~~~#
# Find the Game Region #
#~~~~~~~~~~~~~~~~~~~~~~#

check_region:
lbz r12, 0x5F27 (r12) #Instruction here is vital. Virtually impossible for this to be modded by something unrelated

cmpwi r12, 0xEC
beq- pal
cmpwi r12, 0x10
beq- japan
cmpwi r12, 0x54
beq- korea

#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# Apply Character Address Based on Game Region #
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#

#usa
lis r12, 0x8061
ori r12, r12, 0x2328
b write_values

pal:
lis r12, 0x8064
ori r12, r12, 0x374C
b write_values

japan:
lis r12, 0x8064
ori r12, r12, 0x2DB4
b write_values

korea:
lis r12, 0x8063
ori r12, r12, 0x1A60

#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# Write New Instructions to Static Memory #
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#

write_values:
lis r10, 0x3880
or r10, r10, r11
stw r10, 0 (r12) #Store Character Value

bl clear_cache

lis r10, 0x38A0
or r10, r10, r0
addi r12, r12, 4 #Needed for upcoming cache flush
stw r10, 0 (r12) #Store Vehicle Value

#~~~~~~~~~~~~~~~#
# Restore C0 LR #
#~~~~~~~~~~~~~~~#

mtlr r5

#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# Clear Cache, so Instructions always update #
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#

clear_cache:
dcbst 0, r12
sync
icbi 0, r12
isync
blr #When called 2nd time, this will be the C0 LR

#~~~~~~~~~~~~~~#
# END ASSEMBLY #
#~~~~~~~~~~~~~~#

Print this item

  Auto Attempt to Use Dodge Item When Shocked -Online- [Vega]
Posted by: Vega - 12-31-2019, 06:14 PM - Forum: Incomplete & Outdated Codes - Replies (6)

Auto Attempt to Use Dodge Item When Shocked -Online- [Vega]

Outdated by Unnamed's version which works 100% reliably.

Online only.

If you are holding a Mega, Star, or Bullet Bill when the shock occurs, you will automatically attempt to use your item and dodge the shock. Whether or not you dodge the shock depends a lot on the natneg between the clients.

Non-stable natneg between the clients will most likely cause a missed dodge, therefore I wouldn't call this code reliable enough to depend on as a way to always dodge shocks. Also for any moments where you normally can't use an item (i.e. during exit of cannon, spinning from getting hit by an item, etc), the code also won't work.

If desired, you can actually edit this code to effect other items instead of the 3 default ones. The compiled lines of "2C0C0009, 000B, and 000F" are the checks for Mega, Star, and Bill.

NOTE: This code makes use of memory addresses 0x80000298 thru 0x8000029A. Make sure no other codes in your GCT/Cheat-Manager are using those addresses!

NTSC-U
C265EE14 00000002
88030001 3D808000
980C0299 00000000
C21D1880 00000004
81670008 7D4902A6
2C0A007B 40A20010
556A463E 3D208000
99490298 00000000
C251CE8C 0000000C
3D808000 896C0298
2C0B0026 41820010
39600000 996C029A
4800003C 896C029A
2C0B0000 40820030
39600001 996C029A
898C0299 2C0C0009
41820018 2C0C000B
41820010 2C0C000F
41820008 48000008
60000004 B01E002C
60000000 00000000

PAL
C265E18C 00000002
88030001 3D808000
980C0299 00000000
C21D1920 00000004
81670008 7D4902A6
2C0A007B 40A20010
556A463E 3D208000
99490298 00000000
C2521300 0000000C
3D808000 896C0298
2C0B0026 41820010
39600000 996C029A
4800003C 896C029A
2C0B0000 40820030
39600001 996C029A
898C0299 2C0C0009
41820018 2C0C000B
41820010 2C0C000F
41820008 48000008
60000004 B01E002C
60000000 00000000

NTSC-J
C265D7F8 00000002
88030001 3D808000
980C0299 00000000
C21D1840 00000004
81670008 7D4902A6
2C0A007B 40A20010
556A463E 3D208000
99490298 00000000
C2520C80 0000000C
3D808000 896C0298
2C0B0026 41820010
39600000 996C029A
4800003C 896C029A
2C0B0000 40820030
39600001 996C029A
898C0299 2C0C0009
41820018 2C0C000B
41820010 2C0C000F
41820008 48000008
60000004 B01E002C
60000000 00000000

NTSC-K
C264C4A4 00000002
88030001 3D808000
980C0299 00000000
C21D1C7C 00000004
81670008 7D4902A6
2C0A007B 40A20010
556A463E 3D208000
99490298 00000000
C250F324 0000000C
3D808000 896C0298
2C0B0026 41820010
39600000 996C029A
4800003C 896C029A
2C0B0000 40820030
39600001 996C029A
898C0299 2C0C0009
41820018 2C0C000B
41820010 2C0C000F
41820008 48000008
60000004 B01E002C
60000000 00000000



Code creator: Vega

Code credits: Seeky (Timed Item Usage Hook), Bully (Local Item Spy Hook)





List of Sources:

1st ASM: (Store Held Item to Memory)
Address Ports
NTSC-U = 0x8065EE14
PAL = 0x8065E18C
NTSC-J = 0x8065D7F8
NTSC-K = 0x8064C4A4

lbz r0, 0x1 (r3) #Default Instruction
lis r12, 0x8000
stb r0, 0x0299 (r12)

=====

2nd ASM: (Store Item Event to Memory)
Address Ports
NTSC-U = 0x801D1880
PAL = 0x801D1920
NTSC-J = 0x801D1840
NTSC-K = 0x801D1C7C

lwz r11, 0x0008 (r7) #Default Instruction
mfctr r10 #r10 safe for use
cmpwi r10, 0x7B #When CTR is decremented to 0x7B, r11's first byte will hold proper Item Event byte slot
bne+ the_end

srwi r10, r11, 24 #Item Event (that holds Shock) now only byte left in register
lis r9, 0x8000 #r12 NOT safe for use!
stb r10, 0x0298 (r9)

the_end:

=====

3rd ASM: (Auto Use Dodge Item When Shocked)

#~~~~~~~~~~~~~~~~#
# START ASSEMBLY #
#~~~~~~~~~~~~~~~~#

#

#~~~~~~~~~~~~~~~#
# Address Ports #
#~~~~~~~~~~~~~~~#

#0x8051CE8C NTSC-U
#0x80521300 PAL
#0x80520C80 NTSC-J
#0x8050F324 NTSC-K

#~~~~~~~~~~~~~~~~~~~~~~~~#
# Exception Vector Notes #
#~~~~~~~~~~~~~~~~~~~~~~~~#

#0x80000298 = Event Type
#0x80000299 = Your Held Item
#0x8000029A = Shock Status; Custom

#~~~~~~~~~~~~~~~~~~~~~~~~~~#
# Load & Verify Event Type #
#~~~~~~~~~~~~~~~~~~~~~~~~~~#

lis r12, 0x8000
lbz r11, 0x0298 (r12)
cmpwi r11, 0x26
beq- shock_event_occurring

#~~~~~~~~~~~~~~~~~~~#
# Reset Status Byte #
#~~~~~~~~~~~~~~~~~~~#

li r11, 0 #Always reset when shock event isn't occuring
stb r11, 0x029A (r12)
b default_instruction

#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# Load & Verify Shock Status Byte #
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#

shock_event_occurring:
lbz r11, 0x029A (r12)
cmpwi r11, 0
bne- default_instruction

#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# Update Status Byte, Load & Verify Item #
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#

#The 0x26 event byte can last for a tiny bit cause of natneg, therefore
#we set this status byte to 1, so the code won't autouse your
#next item if you chain right before a box and your next
#item is a bill, mega, or star.

#Once event byte is no longer 0x26, the status byte
#gets reset to 0, refer to "Reset Status Byte" portion of source

li r11, 1
stb r11, 0x029A (r12)

lbz r12, 0x0299 (r12)

cmpwi r12, 0x9 #Star
beq- go
cmpwi r12, 0xB #Mega
beq- go
cmpwi r12, 0xF #Bullet
beq- go
b default_instruction

#~~~~~~~~~~~~~~~~~~~~~~~~~~#
# Flip the Item Usage Bit! #
#~~~~~~~~~~~~~~~~~~~~~~~~~~#

go:
ori r0, r0, 0x0004

#~~~~~~~~~~~~~~~~~~~~~#
# Default Instruction #
#~~~~~~~~~~~~~~~~~~~~~#

default_instruction:
sth r0, 0x002C (r30)

#

#~~~~~~~~~~~~~~#
# END ASSEMBLY #
#~~~~~~~~~~~~~~#


Print this item

  "Easter Egg" in MKW?
Posted by: JoshuaMK - 12-29-2019, 07:48 AM - Forum: Coding & Hacking General Discussion - Replies (1)

When the game firsts boots (Use boot to pause in Dolphin), at address 0x80003114 (and a few others right after it) contain the hex word "DEADBEEF".

I understand this is a weird developer's thing to use this for guides, placeholder text, and ofc easter eggs. I figured they probably inserted this in for the heck of it lol.

Print this item

  How to Extend Your GCT Space using LE-CODE
Posted by: JoshuaMK - 12-28-2019, 09:38 PM - Forum: Other - No Replies

This tutorial assumes you are familiar with creating an LE-CODE based distribution (Tutorial on this soon) and using Wiimm's Tools, have a pre-compiled lecode*.bin, and have my LE-CODE based code extender here: https://mkwii.com/showthread.php?tid=1403



Patching the main.dol with my code extender + LE-CODE

For this, grab a clean main.dol from an extracted ISO and with my code "code extender" in gct file "NAME.gct", run this command in cmd: wstrt PATCH main.dol --add-section NAME.gct --add-lecode --DEST ./lecode/main.dol -o

Now a patched main.dol will be located at the relative directory "./lecode/" with LE-CODE and my code extender built in.



Patching an lecode*.bin with your code list

With your choice codes in a gct and an lecode.bin open in HxD, follow this video (without the mistake at the end (I put 12279, 12278 was the correct value Tongue)):




Patching an ISO/Riivolution setup



ISO:

To patch an iso, copy your main.dol to the directory "/sys" in your extracted ISO, overwriting if needed. Then copy your lecode*.bin to the directory "/files/rel and overwrite if needed. Then, in the directory where the extracted ISO's folder is at, run the command: wit copy FOLDERNAME NAME.iso

When it finishes compiling the ISO, run it and play! This ofc assumes you've patched the menus and have all the track files needed, which the upcoming tutorial will cover.



Riivolution:

To set this up, simply copy the main.dol to where the xml states, and the same for the lecode*.bin Now simply run the xml in Riivolution and play! This ofc assumes you've patched the menus and have all the track files needed, which the upcoming tutorial will cover.



Credits: Wiimm/Leseratte (Wiimm's Tools and LE-CODE)

Print this item

  LE-CODE Code List Extender [JoshuaMK]
Posted by: JoshuaMK - 12-28-2019, 06:59 PM - Forum: Misc/Other - Replies (1)

LE-CODE Code List Extender [JoshuaMK]

A tutorial for how to use this code can be found here: https://mkwii.com/showthread.php?tid=1406

This code is designed to be injected into the main.dol using wstrt PATCH main.dol --add-section NAME.gct --add-lecode --DEST ./lecode/main.dol -o, although it can be properly run in the dolphin codehandler (Not Riivolution's nor Gecko OS's due to differing instructions).

When run, this code constantly checks for the file header of the lecode.bin file (LECT), and when found, it grabs the file's size from the file header, adds it to the base address of 0x808DD400 to reach the end of the file. It then does a check for the existence of the F0000000 00000000 found at the end of a gct, and if found, loops backwards in the file until it finds 00DEC0DE 00DEC0DE, in which it stores the new pointer address at 0x80002FFC. Then it finally modifies the codehandler to load the pointer address as the start of the code list instead of the static styled (lis, ori) method it normally uses.



(Region Free)
C0000000 0000000F
3D80808D 618CD400
3D604C45 616B4354
814C0000 7C0A5800
4CA20020 3D604E80
616B0020 916F0000
816C0014 7D4C5A14
3D20F000 856AFFF8
7C0B4800 4C820020
3D2000D0 6129C0DE
856AFFFC 7C0B4800
4082FFF8 3D808000
394AFFFC 914C2FFC
3D4081EF 614A2FFC
914C1908 7C0004AC
4E800020 00000000



Code Creator: JoshuaMK

Print this item

  Always Receive New Item [Elias_]
Posted by: Vega - 12-28-2019, 06:55 PM - Forum: Offline Non-Item - Replies (1)

Always Receive New Item [Elias_]

You now have the ability to pickup a new item from the item box while already having an item in inventory.

NTSC-U
0478FC4C 38000014

PAL
04798C58 38000014

NTSC-J
047982C4 38000014

NTSC-K
04787018 38000014

Code creator: Elias_

Print this item

  Enable All Tracks in LE-CODE TTs [JoshuaMK]
Posted by: JoshuaMK - 12-28-2019, 06:32 PM - Forum: Misc/Other - Replies (12)

Enable All Tracks in LE-CODE TTs [JoshuaMK]

Normally, LE-CODE distributions are limited to the original 8 cups in Time Trials. This code removes that limit by searching for the instructions in LE-CODE that handle the amount of cups at a given time, and overwrites the li r28, 8 instruction with: lwz r28, 0x2894 (r30), which loads how many cups there are in the distribution.

NOTE This could CORRUPT your SAVE FILE currently, so please be careful and not save ghosts outside the first 8 cups.



(Region Free)
C0000000 0000000C
3D80808E 3C60808F
3D603FC0 616B808E
3D403BA0 3D203B80
61290008 7C0C1800
4C800020 84AC0004
7C055800 4082FFF0
80AC0004 7C055000
40A2FFE4 80AC0008
7C054800 40A2FFD8
816C0018 916C0008
3D604E80 616B0020
916F0000 4E800020



Code Creator: JoshuaMK

Print this item

  Your favorite codes of 2019
Posted by: Vega - 12-28-2019, 04:02 PM - Forum: Coding & Hacking General Discussion - Replies (3)

A lot of good codes were made by many people this entire year. We see some new faces as well. So with the end of 2019 here, and 2020 is just around the corner, I'd figure I would make this thread. Post your Top 10 fave codes that were made in 2019. Doesn't matter what they are, just list your personal favorites.

Here's mine...

1. Remote Code Execution [Star]
Summary: For obvious reasons

2. Screenshot [Star]
Summary: What an awesome code, take a pic of your screen anywhere and it saves to your Wii. Use Star's computer program to convert it to a viewable image.

3. Automated License Unlock + VR/BR Mod [Vega]
Summary: Something I always wanted to make as all the other unlock codes are pretty poor. Unlock everything for every license for all your data saves. Just run it once and you're back the Wii menu!

4. Draw Text to Screen [Star / Rii]
Summary: So useful, as using YS's Draw code is super long, and this one works on Dolphin. 

5. Perfect Start Everytime [JoshuaMK]
Summary: I can't recall how many times a burnout has made me upset lol. Ty so much for this code Joshua!

6. Wheelie Never Times Out [JoshuaMK]
Summary: Hate doing Chains? This code is for you

7. Live Replay [Vega]
Summary: First ever controller-free Live replay. I made this for obvious reasons. Only 4 lines in compiled length.

8. Exception Recovery [Star]
Summary: Doesn't stop every freeze code, but ty Star for making this! It helped against quite a bit of noob freezers on ALTWFC

9. Auto POW Dodge [Seeky]
Summary: He just made this yesterday! Something I always wanted, tried to make but couldn't. Seeky to the rescue.

10. Perfect Character/Vehicle Selection [Vega]
Summary: Always get the best char/veh combo based for w/e track+CC combo is the next race

Honorable Mentions!
Join any Friend's Regional Race [Star]
Drop Items on Command [Fishguy]
Auto Forward Past Strap Screen [Elias]
Can't get Passed TCs + Perfect Shock Invincibility [Vega]
Vehicle Stats Mod [JoshuaMK]
Play VS Race Alone [Elias]
End Race on Command [JoshuaMK]
Auto Attempt to Use Dodge Item When Shocked -Online- [Vega]
Timed Item Usage [Seeky]

Print this item