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

Username
  

Password
  





Search Forums

(Advanced Search)

Forum Statistics
» Members: 66
» Latest member: bawp
» Forum threads: 1,024
» Forum posts: 1,789

Full Statistics

Online Users
There are currently 25 online users.
» 0 Member(s) | 24 Guest(s)
Google

Latest Threads
DWC_Authdata NAND File Mo...
Forum: Cheat Codes
Last Post: zak
9 hours ago
» Replies: 0
» Views: 25
Annoucements/Updates
Forum: Site Advancement
Last Post: zak
02-14-2019, 05:13 PM
» Replies: 33
» Views: 5,367
Freeze Certain Menu/Scree...
Forum: Cheat Codes
Last Post: zak
02-14-2019, 05:05 PM
» Replies: 0
» Views: 44
Freeze Certain Menu/Scree...
Forum: Incomplete/Outdated Codes
Last Post: zak
02-14-2019, 05:03 PM
» Replies: 0
» Views: 26
Lightning & Thunder Cloud...
Forum: Cheat Codes
Last Post: zak
02-13-2019, 07:44 PM
» Replies: 0
» Views: 69
Force 30 FPS
Forum: Cheat Codes
Last Post: Cameron_MKW
02-13-2019, 07:54 AM
» Replies: 4
» Views: 146
Ultimate Region ID Cycler...
Forum: Cheat Codes
Last Post: zak
02-12-2019, 07:11 PM
» Replies: 0
» Views: 66
Graphical Item Warning -O...
Forum: Cheat Codes
Last Post: zak
02-11-2019, 08:27 PM
» Replies: 0
» Views: 46
Graphical Item Warning; O...
Forum: Cheat Codes
Last Post: zak
02-11-2019, 08:26 PM
» Replies: 0
» Views: 34
Change Earth Rotation Spe...
Forum: Cheat Codes
Last Post: zak
02-10-2019, 08:10 PM
» Replies: 0
» Views: 50

 
  Mushroom Bug Item Modifier
Posted by: zak - 01-28-2019, 07:52 PM - Forum: Cheat Codes - No Replies

Mushroom Bug Item Modifier

The mushroom bug is a 'feature' implemented in the game to give you a mushroom for your 17th item, and also continually give you mushrooms nonstop for your 19th item and beyond.  This code allows you modify what item to get from the Mushroom Bug instead of a single mushroom.

NTSC-U
007AB6DB 000000XX

PAL
007BA13B 000000XX

NTSC-J
007B97A7 000000XX

NTSC-K
007A84FB 000000XX

XX = Item Value

XX Values:
00 = Green Shell
01 = Red Shell
02 = Banana
03 = Fib
04 = Shroom (default value)
05 = Triple Shrooms
06 = Bomb
07 = Blue Shell
08 = Shock
09 = Star
0A = Golden
0B = Mega
0C = Blooper
0D = POW
0E = TC
0F = Bullet Bill
10 = Triple Greens
11 = Triple Reds
12 = Triple Nanas

Code creator: zak

Print this item

  Beginner's Guide For Calling Functions (ASM)
Posted by: zak - 01-27-2019, 06:15 PM - Forum: Guides/How-To's - No Replies

Beginner's Guide For Calling Functions (ASM)

NOTE: This is for real code creators who already know how to read/write ASM.



Chapter 1: Intro


Mario Kart Wii was written in C++. Thus, it contains many generic C++ type functions (such as memcpy, memset, printf, sqrt,etc). Obviously, the game has its own unique functions as well such DWC_Auth, DWC_Login, etc.

You can create a cheat code by including the calling of one of these functions or just calling the function by itself. The majority of the time, these functions will start off with an ASM instruction that uses the stack frame (aka sp, aka r1) in some way.

During a subroutine, certain instructions will occur, then a 'branch then link' (bl) instruction will follow. After the 'bl' instruction, you will be at the beginning of some sort of function call. The end of a function call results in a Branch to Link Register (blr).

I won't get into all the endless technical details of subroutines in Power PC ASM, this guide will simply demo how to call some very basic functions.

A list of generic C++ functions for MKW can be found HERE (PAL); some Wii & MKW specific functions are also included. Credits to Megazig for the original list. Credits to Star for finding the list and posting the thread plus additional new functions. Credits to RiiDefi for also the addition of new functions.




Chapter 2: Manipulating the Link Register to Call a Function

You should already know what the Link Register is since you know some ASM. An easy way to call a function, is to have the address of that function in the Link Register, then branch to the Link Register. The function called OSRestart (responsible for restarting the game/disc) starts at address 0x801A8688 (PAL). Let's look at a set of ASM instructions below to see how we would call that function:

lis r12, 0x801A #Set 1st half address of PAL OS Restart
ori r12, r12, 0x8688 #Set 2nd half address
mtlr r12 #Copy value of r12 (0x801A8688) to the Link Register
blr #Branch to Link Register (Call/Start the function)

Once the blr instruction is executed, you will be sent to address 0x801A8688 and start executing the following ASM instructions that are there in memory. If one were to make a cheat code out of the above list of ASM instructions, this will cause the game/disc to reboot whenever that cheat code is used/activated.

A completed activate-able code of this function is located HERE




Chapter 3: Arguments

Certain functions need 'arguments' established before being called or else the calling of said function will cause the game to freeze or black-screen. Usually the game prefers starting off with r3 as the first argument. Then proceeding to r4, then r5 etc etc for any other added arguments if required.

If a certain function you are calling is not working or you need to figure out what the arguments are, it is best the take the address of said function and set an instruction breakpoint on Dolphin. Do whatever is necessary in the game to make the game call the function. Then the game will 'break'. Take a look at r3, r4, and r5. Sometimes the register values are actual integers values, or they are memory addresses pointing to the location of necessary integer values. They can also be memory addresses that hold another address which points to the location of a desired integer value.

The function known as SCGetSimpleAddressData has 1 argument. This function is responsible for grabbing your country code (byte), residence code (byte), and globe location/ (word) from your SYSCONF file of your Wii NAND. The argument (r3) acts as a 'reference pointer/navigator' of where the country code and globe location will be stored at in mid mem80. r3's exact value is your country code will be stored. r3's value plus 0x2 is where your region residence code will be stored. r3's value plus 0x1004 is where your globe location will be stored.




Chapter 4: Conclusion

As you can see, this is simple ASM. Unfortunately, there is no database/list/reference of arguments for functions calls that require them. Calling/utilizing some of these functions can get very complex. I am by no means an expert in any way, shape, or form in regards to function calls/utilization. If you have more questions, it may be best for you join the discord server (https://discord.gg/jCj2kaU); there are others in this server who know a lot about these functions.

Print this item

  Always Crushed
Posted by: RoGamer - 01-26-2019, 03:47 AM - Forum: Cheat Codes - No Replies

Always Crushed

This code will force your character to always be crushed. The player speed will be normal, but the crush-to-normal sound will be there, looping. 
A cool effect of this code is that you can use items while being damaged, and drive normally when you are being damaged, similar to Toyota Moving Speed code.

NTSC-U
04597E3C 9703000A

PAL
045A2E74 9703000A

NTSC-J
045A27F4 9703000A

NTSC-K
04590ECC 9703000A

Original Value = 80030008

Code creator: RoGamer

Print this item

  Crazy Bomb Spin
Posted by: RoGamer - 01-26-2019, 03:42 AM - Forum: Cheat Codes - No Replies

Crazy Bomb Spin

This code will make you spin like crazy when you get damaged by a bomb. This code is very simple.

NTSC-U
0488D1B8 C9000000

PAL
04891600 C9000000

NTSC-J
04890C50 C9000000

NTSCK
0487FA08 C9000000

Original Value = 41B00000

Code creator: RoGamer

Print this item

  No Invincibility Frames
Posted by: RoGamer - 01-26-2019, 03:40 AM - Forum: Cheat Codes - No Replies

No Invincibility Frames

This code removes the Invincibility Frames, meaning that when you get hit, you won't be invincible while being damaged. While using item hack, you can drop a lot of items at once because the effect of the code.

NTSC-U
04563418 60000000

PAL
04567798 60000000

NTSC-J
04567118 60000000

NTSC-K
045557F0 60000000

Original Value = 2C05FFFF

Code creator: RoGamer

Print this item

  Items Disappear When Collided -all region
Posted by: RoGamer - 01-26-2019, 03:38 AM - Forum: Graveyard - Replies (1)

Items Disappear When Collided

This code will make the items disappear when they collide with each other. It will also work with dropped items when you use drop items code, meaning it can also be used to "Anti-Drop Item Freeze".

NTSC-U
0479896c 00000000

PAL
047A1978 00000000

NTSC-J
047A0FE4 00000000



Original Value = 41820014

Print this item

  Growing Dropped Star
Posted by: RoGamer - 01-25-2019, 09:06 PM - Forum: Incomplete/Outdated Codes - Replies (3)

Growing Dropped Star

This code makes a star that is dropped grow bigger, depending in the value you put. If the value is smaller than original, the star won't change.
Changing the value too high might cause lag or problems to see the track.

NTSC-U
049BE968 XXXXXXXX

PAL
049C3160 XXXXXXXX

NTSC-J
049C21C0 XXXXXXXX

NTSC-K
Needs porting

XXXXXXXX = Star Size

Example Value (very large size): 41200000

Original value: 40200000

Code creator: RoGamer

Print this item

  Initial Size of Dropped Star Modifier
Posted by: RoGamer - 01-25-2019, 09:03 PM - Forum: Incomplete/Outdated Codes - Replies (3)

Initial Size of Dropped Star Modifier

This code changes the star size when dropped, if the value is smaller than original, the star will spawn with the correct value, if the value is bigger than normal, the star will spawn with the correct value, however, the effect will be permanent.

NTSC-U
049BE964 XXXXXXXX

PAL
049C315C XXXXXXXX

NTSC-J
049C21BC XXXXXXXX

NTSC-K
Needs porting

XXXXXXXX = Star Size

Example Value (medium-large): 3FA00000

Original value: 3F800000

Code creator: RoGamer

Print this item

  Speed-O-Meter; Vehicle Based; TTs Only (zak's version)
Posted by: zak - 01-25-2019, 08:20 PM - Forum: Incomplete/Outdated Codes - No Replies

Speed-O-Meter; Vehicle Based; TTs Only (zak's version)

NOTE: Outdated by all other Speed-O-Meter codes

For Time Trials Mode only. Only works for Solo Racing.

This code will tell you your speed of your vehicle in the milliseconds section of the timer. Only works in TT mode (solo race only). Works for all character/vehicle combos. Reverse speed also works. All speed measurements are rounded to their nearest whole number shown on the timer. This will get rid of the '96/97' issue with Funky Kong/Flame runner (codes that don't fix this issue will show 96 for both Daisy/Mach and Funky/Flame runner at max wheelie speed).

NTSC-U
C25743CB 00000002
3D808000 D00C1660
D01D0020 00000000
0653108C 00000010
3D808000 C00C1660
FC000210 FC00001C

PAL
C257AC2C 00000002
3D808000 D00C1660
D01D0020 00000000
06535BD4 00000010
3D808000 C00C1660
FC000210 FC00001C

NTSC-J
C257A5AC 00000002
3D808000 D00C1660
D01D0020 00000000
06535554 00000010
3D808000 C00C1660
FC000210 FC00001C

NTSC-K
C2568C84 00000002
3D808000 D00C1660
D01D0020 00000000
06523C2C 00000010
3D808000 C00C1660
FC000210 FC00001C




List of Sources:

Source for ASM
lis r12, 0x8000 #Load 0x8000 into upper 16 bits of r12, lower 16 bits are cleared
stfs f0, 0x1660(r12) #Store the float (single precision) to address 0x80001660
stfs f0, 0x0020 (r29) #Default ASM; Store the float (single precision) to address of r29 plus offset 0x0020

Source for Gecko String Write
3D808000 (lis r12, 0x8000) #Load 0x8000 into upper 16 bits of r12, lower 16 bits are cleared
C00C1660 (lfs f0, 0x1660 (r12)) #Load the float (single precision) from 0x80001660 into FPR 0
FC000210 (fabs f0, f0) #The value of FPR 0 is converted to its absolute value, stored back into FPR 0; this resolves the reverse issue
FC00001C (fctiw f0, f0) #The value in FPR 0 is converted to the integer, but it is NOT rounded to zero; this resolves the funky kong 96/97 issue

#After the string write is done, the default instructions ahead will store the float (double precision) to the stack, then load the integer from the lower 32 bits that was in f0 into r5. r5 contains integer value of converted float which will be used to display in the milliseconds#




Code creator: zak
Code contributor(s): Mdmwii (original TT Speed-O-Meter)

Print this item

  TT Recorder's Resource Page
Posted by: zak - 01-23-2019, 06:06 PM - Forum: Time Trials - No Replies

TT Recorder's Resource Page

Here are a list of codes plus guides that can be useful to a TT Recorder.




Live Replay Code - https://mkwii.org/showthread.php?tid=1035

Ghost Always Saves - https://mkwii.org/showthread.php?tid=952
No Ghost Data Saving - https://mkwii.org/showthread.php?tid=349
Time Trial Record Resetter - https://mkwii.org/showthread.php?tid=614

Graphical Speed-O-Meter (displays speed as its own graphical separate image, Vehicle based; code does NOT work in Dolphin) - http://mkwii.org/showthread.php?tid=911

Remove Mini Map and Character Icon - https://mkwii.org/showthread.php?tid=61
No Background Music - https://mkwii.org/showthread.php?tid=45
No Voice Sounds (Offline) - https://mkwii.org/showthread.php?tid=482
Tagname Size Modifier (set code's value to 2EDBE6FF to remove tagname) - https://mkwii.org/showthread.php?tid=88
Timer Color Modifier - https://mkwii.org/showthread.php?tid=129

Guide to replace Expert Staff Ghost - https://mkwii.org/showthread.php?tid=31




List of Millisecond Display Codes (Can only use one at a time. With exception to the 1st code listed, all these codes in TT mode only work when Solo Race is chosen)
Speed-O-Meter; Vehicle Based - https://mkwii.org/showthread.php?tid=983
Speed-O-Meter; XYZ Coordinate Based - https://mkwii.org/showthread.php?tid=968
Air-O-Meter - https://mkwii.org/showthread.php?tid=988
Mini Turbo Charge Meter - https://mkwii.org/showthread.php?tid=984
Mushroom Boost Meter - https://mkwii.org/showthread.php?tid=985
Trick Boost Meter - https://mkwii.org/showthread.php?tid=1037
Boost From MT and Stand-Still Release Meter - https://mkwii.org/showthread.php?tid=1038
Boost From Only MT Release Meter - https://mkwii.org/showthread.php?tid=1030
Stand Still Charge Meter - https://mkwii.org/showthread.php?tid=986
Checkpoint Counter - https://mkwii.org/showthread.php?tid=1017

Print this item