The following warnings occurred:
Warning [2] Undefined variable $tcount - Line: 717 - File: portal.php PHP 8.2.18 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/portal.php 717 errorHandler->error_callback
Warning [2] Undefined variable $tcount - Line: 722 - File: portal.php PHP 8.2.18 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/portal.php 722 errorHandler->error_callback




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

Username
  

Password
  





Search Forums

(Advanced Search)

Forum Statistics
» Members: 664
» Latest member: cgar
» Forum threads: 1,845
» Forum posts: 14,940

Full Statistics

Online Users
There are currently 288 online users.
» 0 Member(s) | 286 Guest(s)
Bing, Google

Latest Threads
Make it to 10,000
Forum: General Discussion
Last Post: Fifty
1 hour ago
» Replies: 8,127
» Views: 6,174,168
(Request) Specific Items ...
Forum: Code Support / Help / Requests
Last Post: coolguy69
5 hours ago
» Replies: 2
» Views: 217
Character Size Modifier [...
Forum: Visual & Sound Effects
Last Post: coolguy69
5 hours ago
» Replies: 1
» Views: 6,930
Scalable Speed (GCN) [Jos...
Forum: Offline Non-Item
Last Post: Vega
6 hours ago
» Replies: 5
» Views: 4,892
No Invincibility Frames [...
Forum: Online Non-Item
Last Post: DrTap
03-23-2025, 09:33 AM
» Replies: 1
» Views: 5,368
Countdown v2.0 [MrBean350...
Forum: Code Support / Help / Requests
Last Post: BAMM99x
03-23-2025, 06:05 AM
» Replies: 7
» Views: 17,004
Do Wiimms MKW releases br...
Forum: Code Support / Help / Requests
Last Post: cgar
03-22-2025, 02:48 AM
» Replies: 0
» Views: 57
Modding Coconut Mall's In...
Forum: Coding & Hacking General Discussion
Last Post: Fifty
03-21-2025, 07:45 PM
» Replies: 2
» Views: 151
Show GP Points instead of...
Forum: Online Non-Item
Last Post: 456
03-20-2025, 08:41 AM
» Replies: 0
» Views: 69
Mushroom Pad Speed Modifi...
Forum: Offline Non-Item
Last Post: Luigi Hack Fan
03-19-2025, 10:38 PM
» Replies: 0
» Views: 58

 
  Do Wiimms MKW releases break codes?
Posted by: cgar - 03-22-2025, 02:48 AM - Forum: Code Support / Help / Requests - No Replies

I've tried a bunch of codes to get rid of the blue shell and most don't work.
I eventually did find "Disable Item Effect [Bully]" which does.
Though it now just makes the blue shell item a dud which though much much better is not ideal.

Ideally I'd love to be able to manually set item probabilities for all positions individually.
Something that would work for offline multiplayer with 1 other player and the rest as CPU, affecting all 12.

Would such a thing be possible on say "Wiimms MKW-History 2021.v2.usa"?
And if Wimms releases do disable codes, is it possible to disable that?

Print this item

  Modding Coconut Mall's Intro
Posted by: AngeloMKW - 03-20-2025, 02:03 PM - Forum: Coding & Hacking General Discussion - Replies (2)

So I'm currently trying to mod Coconut Mall's intro cutscene for a mod I'm working on. I want to only use the last intro camera (the one that shows the racers at the finish line), but modifying Coconut Mall's Intro in any way seems to freeze the game...

Print this item

  Show GP Points instead of VR
Posted by: 456 - 03-20-2025, 08:41 AM - Forum: Online Non-Item - No Replies

In the friends room, replace the rate display with GP points.

NOTE: This code makes use of memory addresses 0x80000198 thru 0x800001B0. Make sure no other codes you have equipped are using those addresses.


PAL:
046508D4 60000000
C27F5924 00000006
9421FF80 BC610008
3D808000 618E0198
1DF80002 7ED6EA14
7ECE7B2E B8610008
38210080 7F83E378
60000000 00000000
C264AC58 00000010
A06301FC 9421FFB0
BDC10008 3F00809C
83380E98 83590098
837A02D0 83390000
83390000 2C190060
41820020 2C190061
41820018 2C190064
41820010 2C190065
41820008 4800002C
1DFC0002 3D808000
618E0198 99EC01B0
2C1B0000 40820010
38600000 7C6E7B2E
48000008 7C6E7A2E
B9C10008 38210050
60000000 00000000
C264AD00 0000001C
9421FF80 BC610008
3A200000 3F00809C
83380E98 83590098
837A02D0 83390000
83390000 2C190060
41820020 2C190061
41820018 2C190064
41820010 2C190065
41820008 48000088
380025E4 38630158
388000DE 3D80805F
618C8CF0 3DC02C04
81EC0000 7C0F7000
4182000C 3A200001
398C0008 7D8903A6
4E800421 48000015
00700074 00730000
00700074 00000000
7D8802A6 3DC08000
61CF0198 8A0E01B0
7E0F822E 2C100001
40820008 398C0008
2C110001 40820008
38630040 81CC0000
91C30000 81CC0004
91C30004 B8610008
38210080 38C00000
60000000 00000000

NTSC-U:
0461D5C0 60000000
C27EB2FC 00000006
9421FF80 BC610008
3D808000 618E0198
1DF80002 7ED6EA14
7ECE7B2E B8610008
38210080 7F83E378
60000000 00000000
C264E3E0 00000010
A06301FC 9421FFB0
BDC10008 3F00809C
83380E98 83590098
837A02D0 83390000
83390000 2C190060
41820020 2C190061
41820018 2C190064
41820010 2C190065
41820008 4800002C
1DFC0002 3D808000
618E0198 99EC01B0
2C1B0000 40820010
38600000 7C6E7B2E
48000008 7C6E7A2E
B9C10008 38210050
60000000 00000000
C264E488 0000001C
9421FF80 BC610008
3A200000 3F00809C
83380E98 83590098
837A02D0 83390000
83390000 2C190060
41820020 2C190061
41820018 2C190064
41820010 2C190065
41820008 48000088
380025E4 38630158
388000DE 3D80805D
618C840C 3DC02C04
81EC0000 7C0F7000
4182000C 3A200001
398C0008 7D8903A6
4E800421 48000015
00700074 00730000
00700074 00000000
7D8802A6 3DC08000
61CF0198 8A0E01B0
7E0F822E 2C100001
40820008 398C0008
2C110001 40820008
38630040 81CC0000
91C30000 81CC0004
91C30004 B8610008
38210080 38C00000
60000000 00000000

NTSC-J:
0464FF40 60000000
C27F4F90 00000006
9421FF80 BC610008
3D808000 618E0198
1DF80002 7ED6EA14
7ECE7B2E B8610008
38210080 7F83E378
60000000 00000000
C264A2C4 00000010
A06301FC 9421FFB0
BDC10008 3F00809C
83380E98 83590098
837A02D0 83390000
83390000 2C190060
41820020 2C190061
41820018 2C190064
41820010 2C190065
41820008 4800002C
1DFC0002 3D808000
618E0198 99EC01B0
2C1B0000 40820010
38600000 7C6E7B2E
48000008 7C6E7A2E
B9C10008 38210050
60000000 00000000
C264A36C 0000001C
9421FF80 BC610008
3A200000 3F00809C
83380E98 83590098
837A02D0 83390000
83390000 2C190060
41820020 2C190061
41820018 2C190064
41820010 2C190065
41820008 48000088
380025E4 38630158
388000DE 3D80805F
618C85CC 3DC02C04
81EC0000 7C0F7000
4182000C 3A200001
398C0008 7D8903A6
4E800421 48000015
00700074 00730000
00700074 00000000
7D8802A6 3DC08000
61CF0198 8A0E01B0
7E0F822E 2C100001
40820008 398C0008
2C110001 40820008
38630040 81CC0000
91C30000 81CC0004
91C30004 B8610008
38210080 38C00000
60000000 00000000

NTSC-K:
0463EBEC 60000000
C27E3CE4 00000006
9421FF80 BC610008
3D808000 618E0198
1DF80002 7ED6EA14
7ECE7B2E B8610008
38210080 7F83E378
60000000 00000000
C2638F70 00000010
A06301FC 9421FFB0
BDC10008 3F00809C
83380E98 83590098
837A02D0 83390000
83390000 2C190060
41820020 2C190061
41820018 2C190064
41820010 2C190065
41820008 4800002C
1DFC0002 3D808000
618E0198 99EC01B0
2C1B0000 40820010
38600000 7C6E7B2E
48000008 7C6E7A2E
B9C10008 38210050
60000000 00000000
C2639018 0000001C
9421FF80 BC610008
3A200000 3F00809C
83380E98 83590098
837A02D0 83390000
83390000 2C190060
41820020 2C190061
41820018 2C190064
41820010 2C190065
41820008 48000088
380025E4 38630158
388000DE 3D80805E
618C7110 3DC02C04
81EC0000 7C0F7000
4182000C 3A200001
398C0008 7D8903A6
4E800421 48000015
00700074 00730000
00700074 00000000
7D8802A6 3DC08000
61CF0198 8A0E01B0
7E0F822E 2C100001
40820008 398C0008
2C110001 40820008
38630040 81CC0000
91C30000 81CC0004
91C30004 B8610008
38210080 38C00000
60000000 00000000


Code credits:B_squo(Show VR screen on Friend Room after each race)

Print this item

  Mushroom Pad Speed Modifier
Posted by: Luigi Hack Fan - 03-19-2025, 10:38 PM - Forum: Offline Non-Item - No Replies

Mushroom Pad Speed Modifier

This code allows you to change the 73km/h or 100km/h of mushroom pads to any speed you would like them to have. This does not affect the ramps on Mushroom Gorge

PAL
048B5C00 WWWWWWWW
048B5C04 XXXXXXXX
048B5C44 YYYYYYYY
048B5C48 ZZZZZZZZ

NTSC-U:
048b1340 WWWWWWWW
048b1344 XXXXXXXX
048b1384 YYYYYYYY
048b1388 ZZZZZZZZ

NTSC-J
048b4d60 WWWWWWWW
048b4d64 XXXXXXXX
048b4da4 YYYYYYYY
048b4da8 ZZZZZZZZ

NTSC-K
048a4078 WWWWWWWW
048a407c XXXXXXXX
048a40bc YYYYYYYY
048a40c0 ZZZZZZZZ

WWWWWWWW/XXXXXXXX = 73km/h Limit (Float)
YYYYYYYY/ZZZZZZZZ = 100km/h Limit (Float)

Print this item

  Fixing a Dolphin bug
Posted by: DrTap - 03-19-2025, 11:35 AM - Forum: Code Support / Help / Requests - Replies (2)

It's possible fix with a gecko code the visual bug in Dolphin where some vehicle and the road in the notes section in the ct Music Park appear invisible?

Here are the images to give a better idea of what I'm talking about ----> https://imgur.com/a/Dka5Q4d 
(I don't know a better way to display it let me know if there are any problems viewing it)

Print this item

  Help with custom VC games
Posted by: Zack - 03-15-2025, 07:09 PM - Forum: Coding & Hacking General Discussion - Replies (1)

So I've been trying to make a Wii Virtual Console WAD for the NES Dr. Mario. I got basically everything to run perfectly... expect for the fact that the banner still says "Double Dragon" and also the release year is wrong. I can't find a way to edit the banner.brlyt file, I tried using Wii Layout Editor, yet it gives me an error when I try to load the file (see picture). I extracted the layout banner.brlyt file from CustomizeMii if that's important.

Can someone please help me!

Wad file and banner.brlyt: https://drive.google.com/drive/u/0/folde...kmTmsZKN6M



Attached Files Thumbnail(s)
   
Print this item

  INCOMPLETE: How to create your own Local WiiLink Server (Debian Linux)
Posted by: Vega - 03-14-2025, 01:18 AM - Forum: Other - No Replies

How to create your own Local WiiLink Server (Debian Linux)

IMPORTANT: At the moment, I'm having trouble getting the Server to work beyond the localhost machine (whether its LAN or Global). Therefore this tutorial is kind of useless. If someone can chime in, that would be great. No matter how I generate the Gecko Codes, I keep getting 20912/20913 when trying to connect. Therefore this tutorial will only work for connecting to the Wii Link server using Dolphin on the localhost machine. Chapters 13+ are for LAN and Global Access which I couldn't get to work. If you know how to fix this, please let me know!

Chapter 1: Intro

This tutorial will only teach you how to get your own WiiLink server up and running for localhost ONLY.

Requirements:

  • Linux Debian 12 (should work w/ Ubuntu as well)
  • Basic Knowledge of how to run Terminal commands
  • Have a modern Dev Verson of Dolphin already installed or a real Wii

There are two agents to the WiiLink Server (as a whole)
  • wfc-server (The server that runs on the computer)
  • wfc-patcher (The program that generates files so the client can connect to the server)

We will get the wfc-server running first, then worry about the wfc-patcher afterwards.



Chapter 2: Update and Install Necessary Repo Packages

Let's update your system and install some software.
Code:
sudo apt update
sudo apt install git wget python3 python3-cryptography postgresql postgresql-client postgresql-contrib

We will install devkitpro. If you have devkitpro already installed, make sure it's fully updated.
Code:
wget https://apt.devkitpro.org/install-devkitpro-pacman
chmod +x ./install-devkitpro-pacman
sudo ./install-devkitpro-pacman
sudo dkp-pacman -Sy
sudo dkp-pacman -Syu
sudo dkp-pacman -S wii-dev

Now that devkitpro is installed, we need to add the following lines...

Code:
export DEVKITPRO=/opt/devkitpro
export DEVKITARM=${DEVKITPRO}/devkitARM
export DEVKITPPC=${DEVKITPRO}/devkitPPC
export PATH=${DEVKITPRO}/tools/bin:$PATH

...at the end of your /home/username/.bashrc file

Save changes and exit.



Chapter 3: Install & Configure Golang

Debian 12's standard repo version of Golang won't work for compiling the wfc-server. Therefore, we need to install golang by downloading it from go.dev. Afaik, Go version 1.23.2 works fine for building the wfc-server.

If you've installed golang in the past via standard Debian repos, we need to completely remove it.

Code:
sudo apt --purge autoremove golang

Download GoLang 1.23.2 from this link:
https://go.dev/dl/go1.23.2.linux-amd64.tar.gz

Navigate to where the tar file downloaded on your computer, and run the following command

Code:
cd /where/you/saved/the/go/tar/file
sudo rm -rf /usr/local/go && sudo tar -C /usr/local -xzf go1.23.2.linux-amd64.tar.gz

Golang has been installed, but we need to export its path. Add the following line....

export PATH=$PATH:/usr/local/go/bin

...at the very end for each of the following files...
  • /home/yourusername/.profile
  • /home/yourusername/.bashrc

Save changes and exit. Also, exit the current terminal you were using and open a new one.

Run this command...

Code:
go version

You should see you have version 1.23.2 of Go installed.



Chapter 4: Compiling the WFC-Server

Run the following commands~
Code:
cd $HOME
git clone https://github.com/WiiLink24/wfc-server.git
cd ./wfc-server
go build

The executable will be built with the name "wwfc". This may take a few minutes to compile. Now we need to edit the permissions of the executable.

Code:
chmod +x ./wwfc



Chapter 5: Postgresql

We got the wfc-server compiled, but it needs a database to connect to in order to keep all the online profiles stored.

Run the following commands~
Code:
cd $HOME
sudo -u postgres psql

You are now in the postgresql application logged in with the user postgres. However, the user postgres has no password set. We need to set one. Type in the following command..

Code:
\password


Enter your desired password and note it down somewhere. Now we need to create a database. For this tutorial, we'll call it "mkdata"

Code:
CREATE DATABASE mkdata;


At this point run the following command, you should see the mkdata database listed
Code:
\l


Now we need to create a new role/user called wiilink
Code:
CREATE USER wiilink;


To make sure the role was created, run this command
Code:
\du


You should see two roles: postgres and wiilink

And now we can quit psql
Code:
\q


We need to import the schema.sql file located from the wfc-server repo into the mkdata database. Close terminal and open a new one.

Code:
sudo -u postgres psql -d mkdata < "/home/yourusername/wfc-server/schema.sql"

There should be no error messages. Restart postgresql...

Code:
sudo service postgresql restart



Chapter 6: Config.xml and test launch

Make a copy of the config_example_.xml file and name it config.xml. Keep the original, don't delete it just in case you goof something up.

Open the config.xml with any text editor.

Underneath Database credentials, change the username to postgres, and change the password to what you've noted down from earlier
Underneath Database information, change the database name to mkdata

Save changes and exit.

At this point we can test launch the server really quick. It must be launched with sudo.

Code:
cd $HOME/wfc-server
sudo ./wwfc

There should be no errors. There should be all green status's except for 2 (front end & nas). The final message should be..
"FRONT END": connected to backend.

To stop the server at any time, press CTRL+C. Go ahead and shut down the server.



Chapter 7: Patcher

Okay we got the server side of things completed, now we need to focus on the patcher. We need to create the unique gecko code that will allow you to connect to your server

Code:
cd $HOME
git clone https://github.com/WiiLink24/wfc-patcher-wii.git


In the wfc-patcher-wii directory, there is a make.sh file. Open the make.sh file with any text editor, and change every instance of "python" to "python3". Should be 5 total changes. Save changes and exit.

Run the following terminal commands
Code:
cd $HOME/wfc-patcher-wii
chmod +x ./make.sh
./make.sh --all

This can take a bit to complete. Slow computers expect 10+ minutes, fast computers expect 60 seconds if that. This will create the payload and gecko codes for all the compatible games, not just MKWii.



Chapter 8: Move Payload and other new Items into the Server

Run the following commands...
Code:
cd $HOME/wfc-server
mkdir payload
cp -r $HOME/wfc-patcher-wii/dist/* $HOME/wfc-server/payload/

This will supply the newly created patcher-side files that the server needs.



Chapter 9: Apply Cheat Code

All cheat codes are located in $HOME/wfc-patcher-wii/patch/build

So let's say you wanna use the NTSC-U MKWii game (RMCE01), you will need to find the RMCED00.txt file.
  • RMCED00.txt = NTSC-U MKWii
  • RMCPD00.txt = PAL MKWii
  • RMCJD00.txt = NTSC-J MKWii
  • RMCKD00.txt = NTSC-K MKWii

Open the txt file and copy the contents as a cheat code into your Dolphin Emulator for your game. Apply and save changes.



Chapter 10: Full Test

Alright time for a real test, first be sure postgresql is running...

Code:
sudo service postgresql status

You should see a green dot along with other indicating info such as "ONLINE". Press q to exit the status message.

If postgresql isn't running, turn it on..
Code:
sudo service postgresql start


If something is wrong, try rebooting it...
Code:
sudo service postgresql restart


Okay now boot the server!!
Code:
cd $HOME/wfc-server
sudo ./wwfc


Alright, now launch Dolphin (or a real Wii), be sure Cheat Code is applied. Obviously, use a license that does NOT have a FC attached to it. Go connect to Nintendo WFC. As you do that, watch the wwfc terminal.

After some seconds, you should successfully connect and be greeted by the wiilink welcome message. If not, view the wwfc terminal. It will contain info/reasons as to why the connection failed.

If you didn't connect at all (nothing happended on wwfc terminal), then something got screwed up in Chapter 6 and/or Chapter 8. Be sure you completed those chapters correctly.



Chapter 11: Common Errors

Servide (computer) side:
If you see the message "E[BACKEND]:" in red font, that means you tried to launch the server without sudo. Launch it with sudo.
If you see the message "panic: listen tcp 127.0.0.1:80: bind: address already in use", then stop the server and run this terminal command...
sudo lsof -t -i tcp:80 -s tcp:listen | sudo xargs kill

Relaunch server, should now work.

Client (wii/dolphin) side:
EC 20100: Cannot connect to server (incorrect domain patch or no patch was done).
EC 20113: You didn't copy the files from wfc-patcher/dist into wfc-server/payload or the wrong files were placed in
EC 20400: A payload stage1.bin file was found in wfc-server/payload but other files are missing
EC 20912: Hash mismatch (do NOT use some other server's Gecko Code)
EC 20913: Hash mismatch (do NOT use some other server's Gecko Code)
EC 60000: You're using an FC that wasn't made on your server, use an approriate license



Chapter 12: GUI Assitance for Database

We're going to install some software so you can "see" your database content easier than using standard postgres terminal commands

Open the following file with root or sudo:

/etc/apt/sources.list

And add this line at the end...

deb http://deb.debian.org/debian bookworm-backports main

Save changes and exit. Now let's update your repos.

Code:
sudo apt update


Now we are going to install phppgadmin

Code:
sudo apt install -t bookworm-backports phppgadmin

Once installed we need to edit its config file

Using root or sudo, open this file..

/etc/phppgadmin/config.inc.php

Scroll down to this line...

$conf['extra_login_security'] = false;

and change the "false" to "true"

Save changes and restart postgressql

Code:
sudo service postgresql restart

Now we can "see" our databases. Open any web browser and go to this address

localhost/phppgadmin

On the left toolbar, click on PostgreSQL

Enter postgres as username and enter its password that you've noted down from earlier. Login

You should see two databases: mkdata and posgres

Click on mkdata and now you are in your mkwii database. Click public. You will see...
  • mariokartwiisake
  • users

the sake table is for your Top 10 Leaderboards. The users table is all the FC's registered. This is also the table you can edit to place in bans and what not.

Example: Click on users. Then at the top, click Browse. You will see all the profiles. You can then click Edit on one of them and edit what you need for whatever reason.



NOTE: All chapters past this point should work in theory, but for the life of me, I can't get it to work. I keep getting EC 20912/20913 (wii side). Yes I made sure the domains I was using was edited in wwfcLoaderTool.s & patch/wwfcPatch.s when generating new Gecko Codes. Yes I made sure to update the server files. I even blasted open all ports and wildcarded all domains for DNS. Still didn't work.

Chapter 13: LAN Expansion

At the moment, only you (the localhost) can use the server. To expand it to other devices in your LAN, you will need to first punch open some ports on your ISP-Provided network-box/router.

You will also need to know your machine's assigned LAN IP.

Run this command
Code:
hostname -I


The IPv4 address is what you need.

In your ISP network-box/router open up the following ports for your machine. Use the IPv4 that you've just received to help find your machine on your network-box/router settings.
  • 53 tcp
  • 80 tcp
  • 443 tcp
  • 27900 tcp
  • 27901 tcp
  • 28910 tcp
  • 29900 tcp
  • 29901 tcp
  • 29920 tcp
  • 29998 tcp
  • 29999 tcp
  • 2 thru 65535 udp

After that has been done, you need to open up those same ports on the Linux machine itself. We will use ufw as our firewall

Code:
sudo apt update
sudo apt install ufw
sudo ufw deny incoming
sudo ufw allow outgoing
sudo ufw allow 2:65535/udp
sudo ufw allow 53/tcp
sudo ufw allow 80/tcp
sudo ufw allow 443/tcp
sudo ufw allow 27900/tcp
sudo ufw allow 27901/tcp
sudo ufw allow 28910/tcp
sudo ufw allow 29900/tcp
sudo ufw allow 29901/tcp
sudo ufw allow 29920/tcp
sudo ufw allow 29998/tcp
sudo ufw allow 29999/tcp

Restart the firewall..

Code:
sudo ufw enable
sudo ufw reload

We will need the dnsmasq package

Code:
sudo apt update
sudo apt install dnsmasq


Once installed, open up the /etc/dnsmasq.conf file with your preferred text editor

Find the following line..

#address=/double-click.net/127.0.0.1

Do these 3 edits..
  1. Uncomment that line (remove the # symbol)
  2. Change the domain to nintendowifi.net
  3. Change the IP to what the command "hostname -I" gave you

Save changes and exit. Restart dnsmasq.

Code:
sudo service dnsmasq restart

Okay now lets reboot your networking and postgresql before launching the server...

Code:
sudo service networking restart
sudo service postgresql restart

Launch server!
Code:
cd $HOME/wfc-server
sudo ./wwfc

If testing on real Wii:
Boot up the Wii Console and go to your Connect Settings under Internet. Change Auto-Obtain DNS from No to Yes. Edit in your Machine's local IP for both DNS fields. Save connecting settings.

If testing on Dolphin:
Use a computer that is NOT running the server. Follow these steps at this tutorial - https://mariokartwii.com/showthread.php?tid=1184

However on step 4, enter in the IP of the Local Machine's IP (the one hosting the Server!)
Also, omit doing step 7. And on step 8, use the cheat code that was generated in Chapter 8.

When I've personally tried this, I was granted with 20912/20913 error codes. Maybe it will work for you.

If you longer want the server on your Machine, remove dnsmasq from the Server Machine

Code:
sudo apt --purge autoremove dnsmasq
sudo rm /etc/dnsmasq.conf


Then, if you did testing on Dolphin via a different Compter and you no longer want the custom DHCP edits, remove the steps you did on the linked tutorial. Remove the created file and remove the two lines you appended on step 4 of the linked tutorial.



Chapter 14: Global Access; Firewalls

You will need a VPS and already know how to use it (connect to it via ssh and control it). It's best to start with a fresh VPS. Launch a new VPS, get Debian 12 installed on it. And do all the steps from Chapter 1 thru 6. Once you've completed just those chapters, let's continue...

We need to allow incoming connections into your VPS. Run these terminal commands...

Code:
sudo apt update
sudo apt install ufw
sudo ufw allow incoming
sudo ufw allow outgoing
sudo ufw enable
sudo ufw reload


At this point we have a firewall within Debian OS that is allowing ALL connections thru. Now we need to edit the VPS firewall itself. Most VPS providers have their own propretiy firewall which supersedes the OS firewall. Most VPS providers will block all connections by default. Make a firewall for your VPS, and open/allow for ALL TCP & UDP connections for ALL ports.

This is dangerous, but this is purely for testing. Once we've tested everything works, we will tighten up the firewall.



Chapter 15: Global Access; Domain Name and DNS

You will need a domain name that you have full access/control to. For this tutorial our example domain will be mkserver.com. Your Domain provider will allow you to configure the name servers of your Domain. These name servers are provided by your VPS provider. For example linode uses 5 name servers that use the template: nsX.linode.com. WIth X being 1 thru 5. Find out what your VPS name servers our and on your Domain Name providers website (under your account) apply those name servers. This can make 15 minutes to an hour to update throught the Internet. So take a lunch and/or showever etc to kill some time.

Once time has passed by, log into your VPS Provider account. For your VPS there should be a seciton to edit Domains/DNS. Using our example domain you need to add the following domains/records
  • mkserver.com
  • *

For the IPv4 AND IPv6 address of your VPS. And, yes the bottom one is JUST an asterisk. This will use a wildcard to allow ALL subdomains of any combination to work. This is dangerous, but this is for testing. THis will be updated to something safer afterwards.

Save your changes and wait around 5 minutes. Afterwards do a hard reboot of your VPS.



Chapter 16: Global Access; Extra Configuration

Okay ssh into your VPS. Open up the config.xml file.

The lines that say..

<gsAddress>127.0.0.1</gsAddress>
<nasAddress>127.0.0.1</nasAddress>
<nasAddressHttps>127.0.0.1</nasAddressHttps>

Change their IP Addresses (127.0.0.1) changed to 0.0.0.0

Save changes and exit. This will allow incomings connections for the wiilink server (once they get thru the two firewalls).

Now you will need to do Chapter 7 (The patcher). Once you do the python to phython3 edits, do NOT run the make.sh just yet! We need a few more edits.

Open up the following two files in your wfc-patcher-wii repo
  • patch/wwfcLoaderTool.s
  • patch/wwfcPatch.s

...and change every isntance of "wiilink24.com" & "nwfc.wiinoma.com",  to "mkserver.com". Save changes, exit.

Now we can finally run the patcher...

Code:
cd $HOME/wfc-patcher-wii
chmod +x ./make.sh
./make.sh --all



Chapter 17: Global Access; re-doing other previous Chapters

Now re-do Chapters 7 and 8. Once you have created your unique gecko codes, transfer the 4 cheat code txt files from your VPS to your local machine. This varies per VPS provider btw. You are expected to know already how to do this. I use sftp with my linode VPS's.

Once the 4 txt files are on your local machine, grab the one for the region of MKWii you wanna use and apply that specific code to your Dolphin emulator (or real Wii if you prefer). Do NOT use the older gecko codes you've created before. Use the codes that you grabbed from your VPS!!!! IMPORTANT.

Okay now go back into your VPS and boot up the wfc-server. Be sure postgresql is running beforehand. Once the wfc-server has booted and there are no errors, use Dolphin (on your local machine) or real Wii to test connecting to the VPS Server.

Using a fresh (no-FC) license, connect to WFC.

At this point in my personal journey I was welcomed with EC 20912 or EC 20913. If this works for you, LET ME KNOW!!! If you've connected congratz, you did it.



Chapter 18: Global Access; refinements for safety

Okay lets redo some quick steps in regards to security. On your VPS firewall, update it to ONLY allow the following ports

TCP:
  • 53
  • 80
  • 443
  • 27900
  • 27901
  • 28910
  • 29900
  • 29901
  • 29920
  • 29998
  • 29999

The UDP ports are already good to go (all opened)

Save changes. We DON'T need to update UFW within the VPS. The VPS Provider's firewall supersedes it. Now go back and edit the VPS Domain/DNS settings to ONLY allow the following domains/records
  • mkserver.com
  • www
  • nas
  • naswii
  • dls1
  • conntest
  • *.gs

Make sure this is for BOTH IPv4 and IPv6 Addresses. Save changes, take a 5 minute break to let time go by.



Chapter 19: Global Access; FINAL TEST

Now do a hard reboot on your VPS. Launch the wfc-server. Make sure there's no errors. Launch game (Wii or Dolphin), connect to WFC. If no EC's, congratz youre 100% complete! Enjoy your server!



Chapter 20: Help

If you were able to get this to work or know how to fix the 20912/20913 issues please let me know! Thank you.

Print this item

  Diipfake [Vega]
Posted by: Vega - 03-12-2025, 07:17 PM - Forum: Online Non-Item - Replies (3)

Diipfake [Vega]

One of my favorite codes that I've created. Shoutout to Cealgair for the clever name!



Playlist of real WW usage: https://youtube.com/playlist?list=PL2UIu...4MTny9gvEy

WARNING: This code will probably get you banned from Wiimmfi (if used in public WWs/Battles) even though it gives you zero material racing advantages, and afaik violates zero current known Wiimmfi rules regarding what's being modified via codes. You've been warned. If unsure, just stick to using this with your friends in Private Rooms.

This code will allow you to clone anybody's attributes (except VR+BR as I aimed to make this Wiimmfi "safe") and play with those attributes on the next online race/battle. What does this mean?

Example:

  1. Code configured to clone Mii, Online Rank, Character & Vehicle
  2. Press activator at results of race. A random opponent is selected by the Code
  3. On next race, you will have that opponent's Mii, Rank, Character, and Vehicle
  4. Everyone will see the effects

XXXX = Controller Address
ZZZZ = Button to press to clone a random selected opponent
zzzz = Deactivator

Do NOT press/hold-down other buttons when pressing ZZZZ/zzzz. You don't need to spam the activator/deactivator. Simply press it.

q value (PAL Code Only):
5 = GCN
4 = non-GCN

The code is entirely configurable on what to clone via the "mimic" values below.

Mimic values (set 1 for true, 0 for false):
M = Mii
R = Region ID (line colour)
G = Flag & Globe Location
S = Online Rank Icon (Star rank)
K = Character & Vehicle

Appropriate Times of when to press ZZZZ/zzzz~
  • During a Race
  • At Results Screen
  • At Screen to choose between Next Race or Quit
  • At Character Selection that appears right after Host starts Friend Room

If you press ZZZZ/zzzz at any other time, de-syncing may occur (what you see on your Screen won't match what others see on their screens).

If you have already cloned somebody and want to clone a new person, just hit the ZZZZ button again. Keep in mind the selection is random so it's always possible the same opponent gets selected again. It's also possible that the code selects somebody who is in Live View (if using in WW), meaning once that opponent views the players list screen, they will see a clone of themselves, lol.

Code quirks:
  1. The code may not work correctly if you start off with a Player/Guest Mii. Start off with a regular/custom Mii. The code can CLONE player/guest Miis fine, just don't start with them.
  2. After using the code (even if you deactivate), when going offline, you will see your License Miis have been removed. Don't worry, your Miis have not been deleted forever. Simply go to License Options to Select Mii to reapply your Miis for each License.
  3. If enabling the K option, when you've cloned an Opponent's Char+Vehicle, you will NEVER see it during course selection. Don't worry, you will have it once the race starts, and everyone will see it.

Final NOTE: This code makes use of memory addresses 0x800006D0 thru 0x800006DD and 0x80004040 thru 0x80004094. Make sure no other codes you have equipped are using those addresses.

PAL
040006D4 00MRGSK0
C21AAA8C 00000045
3D80809C 818C2108
2C0C0000 41820210
896C0000 2C0B0000
41820204 3D40803q
A14AXXXX 280AZZZZ
3D608000 800B4040
2F800000 41820068
280Azzzz 40A201E0
419E01DC 38000000
980B06DD 3D408043
80CB408C 80EB4090
890B4094 90CAABD8
90EABBDC 990AAB67
990C00C5 74C000FF
4082001C 38C0FFFF
3C808024 60845DA8
55031838 38630004
7CE3202E 90CC00B8
90EC00BC 6169403E
48000138 40BE005C
812B06D0 89290008
814D9698 814A0010
1D29004A 7D4A4A14
394A0002 914B06D8
38000013 392C000C
6166403C 7C0903A6
84090004 94060004
4200FFF8 3D408043
80EAABD8 810ABBDC
892AAB67 90E60004
91060008 9926000C
3900000C 38EC0008
39200000 7D0903A6
840700C0 2C000000
41820008 39290001
4200FFF0 2C090000
418200FC 7CAC42E6
7CE54B96 7CE749D6
7CE72850 38E70001
38A00001 98AB06DD
7CE903A6 392C0008
38C00000 840900C0
38C60001 2C000000
41A2FFF4 4200FFF0
98CB06DC 810B06D4
3CE08043 75000001
41820010 88A900BD
98AC00C5 98A7AB67
71001000 41820040
800900B0 80C900B4
900C00B8 90CC00BC
2C00FFFF 40820020
3D408024 614A5DA8
54A51838 7C05502E
38A50004 5400063E
7CC5502E 9007ABD8
90C7BBDC 75000010
41820054 39290006
38C00025 814B06D8
398C000E 7CC903A6
A4090002 B40A0002
B40C0002 4200FFF4
A0090002 B00C0002
806B06D0 88830008
38000000 980300A4
3D808052 38A0FFFF
618C6020 7D8903A6
4E800421 80010014
60000000 00000000
C25FB0A4 00000002
3D808000 80030074
906C06D0 00000000
C2644370 0000000A
80632100 3D808000
880C06DD 2C000000
4182003C 816C06D4
898C06DC 2C0C0000
4182002C 1D8C0038
7D436214 71600100
4182000C 880A001F
9803001F 71600010
4182000C A00A001C
B003001C 00000000
C254A9D8 00000004
5405FFFE 3D808000
898C06DD 2C0C0001
40820008 38A00001
60000000 00000000
C254AA00 00000004
5405FFFE 3D808000
898C06DD 2C0C0001
40820008 38A00001
60000000 00000000
C254AA28 00000004
5405FFFE 3D808000
898C06DD 2C0C0001
40820008 38A00001
60000000 00000000

NTSC-U
040006D4 00MRGSK0
C21AA9EC 00000045
3D80809C 818CD958
2C0C0000 41820210
896C0000 2C0B0000
41820204 3D408034
A14AXXXX 280AZZZZ
3D608000 800B4040
2F800000 41820068
280Azzzz 40A201E0
419E01DC 38000000
980B06DD 3D408042
80CB408C 80EB4090
890B4094 90CA6858
90EA785C 990A67E7
990C00C5 74C000FF
4082001C 38C0FFFF
3C808024 60845A90
55031838 38630004
7CE3202E 90CC00B8
90EC00BC 6169403E
48000138 40BE005C
812B06D0 89290008
814D9698 814A0010
1D29004A 7D4A4A14
394A0002 914B06D8
38000013 392C000C
6166403C 7C0903A6
84090004 94060004
4200FFF8 3D408042
80EA6858 810A785C
892A67E7 90E60004
91060008 9926000C
3900000C 38EC0008
39200000 7D0903A6
840700C0 2C000000
41820008 39290001
4200FFF0 2C090000
418200FC 7CAC42E6
7CE54B96 7CE749D6
7CE72850 38E70001
38A00001 98AB06DD
7CE903A6 392C0008
38C00000 840900C0
38C60001 2C000000
41A2FFF4 4200FFF0
98CB06DC 810B06D4
3CE08042 75000001
41820010 88A900BD
98AC00C5 98A767E7
71001000 41820040
800900B0 80C900B4
900C00B8 90CC00BC
2C00FFFF 40820020
3D408024 614A5A90
54A51838 7C05502E
38A50004 5400063E
7CC5502E 90076858
90C7785C 75000010
41820054 39290006
38C00025 814B06D8
398C000E 7CC903A6
A4090002 B40A0002
B40C0002 4200FFF4
A0090002 B00C0002
806B06D0 88830008
38000000 980300A4
3D808052 38A0FFFF
618C1BAC 7D8903A6
4E800421 80010014
60000000 00000000
C25DA7C0 00000002
3D808000 80030074
906C06D0 00000000
C2612F50 0000000A
8063D930 3D808000
880C06DD 2C000000
4182003C 816C06D4
898C06DC 2C0C0000
4182002C 1D8C0038
7D436214 71600100
4182000C 880A001F
9803001F 71600010
4182000C A00A001C
B003001C 00000000
C254549C 00000004
5405FFFE 3D808000
898C06DD 2C0C0001
40820008 38A00001
60000000 00000000
C25454C4 00000004
5405FFFE 3D808000
898C06DD 2C0C0001
40820008 38A00001
60000000 00000000
C25454EC 00000004
5405FFFE 3D808000
898C06DD 2C0C0001
40820008 38A00001
60000000 00000000

NTSC-J
040006D4 00MRGSK0
C21AA9AC 00000045
3D80809C 818C1168
2C0C0000 41820210
896C0000 2C0B0000
41820204 3D408034
A14AXXXX 280AZZZZ
3D608000 800B4040
2F800000 41820068
280Azzzz 40A201E0
419E01DC 38000000
980B06DD 3D408043
80CB408C 80EB4090
890B4094 90CAA558
90EAB55C 990AA4E7
990C00C5 74C000FF
4082001C 38C0FFFF
3C808024 60845758
55031838 38630004
7CE3202E 90CC00B8
90EC00BC 6169403E
48000138 40BE005C
812B06D0 89290008
814D9698 814A0010
1D29004A 7D4A4A14
394A0002 914B06D8
38000013 392C000C
6166403C 7C0903A6
84090004 94060004
4200FFF8 3D408043
80EAA558 810AB55C
892AA4E7 90E60004
91060008 9926000C
3900000C 38EC0008
39200000 7D0903A6
840700C0 2C000000
41820008 39290001
4200FFF0 2C090000
418200FC 7CAC42E6
7CE54B96 7CE749D6
7CE72850 38E70001
38A00001 98AB06DD
7CE903A6 392C0008
38C00000 840900C0
38C60001 2C000000
41A2FFF4 4200FFF0
98CB06DC 810B06D4
3CE08043 75000001
41820010 88A900BD
98AC00C5 98A7A4E7
71001000 41820040
800900B0 80C900B4
900C00B8 90CC00BC
2C00FFFF 40820020
3D408024 614A5758
54A51838 7C05502E
38A50004 5400063E
7CC5502E 9007A558
90C7B55C 75000010
41820054 39290006
38C00025 814B06D8
398C000E 7CC903A6
A4090002 B40A0002
B40C0002 4200FFF4
A0090002 B00C0002
806B06D0 88830008
38000000 980300A4
3D808052 38A0FFFF
618C59A0 7D8903A6
4E800421 80010014
60000000 00000000
C25FA980 00000002
3D808000 80030074
906C06D0 00000000
C26439DC 0000000A
80631160 3D808000
880C06DD 2C000000
4182003C 816C06D4
898C06DC 2C0C0000
4182002C 1D8C0038
7D436214 71600100
4182000C 880A001F
9803001F 71600010
4182000C A00A001C
B003001C 00000000
C254A358 00000004
5405FFFE 3D808000
898C06DD 2C0C0001
40820008 38A00001
60000000 00000000
C254A380 00000004
5405FFFE 3D808000
898C06DD 2C0C0001
40820008 38A00001
60000000 00000000
C254A3A8 00000004
5405FFFE 3D808000
898C06DD 2C0C0001
40820008 38A00001
60000000 00000000

NTSC-K
040006D4 00MRGSK0
C21AADE8 00000045
3D80809B 818C0748
2C0C0000 41820210
896C0000 2C0B0000
41820204 3D408033
A14AXXXX 280AZZZZ
3D608000 800B4040
2F800000 41820068
280Azzzz 40A201E0
419E01DC 38000000
980B06DD 3D408042
80CB408C 80EB4090
890B4094 90CA8BF8
90EA9BFC 990A8B87
990C00C5 74C000FF
4082001C 38C0FFFF
3C808024 60845B88
55031838 38630004
7CE3202E 90CC00B8
90EC00BC 6169403E
48000138 40BE005C
812B06D0 89290008
814D96B8 814A0010
1D29004A 7D4A4A14
394A0002 914B06D8
38000013 392C000C
6166403C 7C0903A6
84090004 94060004
4200FFF8 3D408042
80EA8BF8 810A9BFC
892A8B87 90E60004
91060008 9926000C
3900000C 38EC0008
39200000 7D0903A6
840700C0 2C000000
41820008 39290001
4200FFF0 2C090000
418200FC 7CAC42E6
7CE54B96 7CE749D6
7CE72850 38E70001
38A00001 98AB06DD
7CE903A6 392C0008
38C00000 840900C0
38C60001 2C000000
41A2FFF4 4200FFF0
98CB06DC 810B06D4
3CE08042 75000001
41820010 88A900BD
98AC00C5 98A78B87
71001000 41820040
800900B0 80C900B4
900C00B8 90CC00BC
2C00FFFF 40820020
3D408024 614A5B88
54A51838 7C05502E
38A50004 5400063E
7CC5502E 90078BF8
90C79BFC 75000010
41820054 39290006
38C00025 814B06D8
398C000E 7CC903A6
A4090002 B40A0002
B40C0002 4200FFF4
A0090002 B00C0002
806B06D0 88830008
38000000 980300A4
3D808051 38A0FFFF
618C4044 7D8903A6
4E800421 80010014
60000000 00000000
C25E94C4 00000002
3D808000 80030074
906C06D0 00000000
C2632688 0000000A
80630740 3D808000
880C06DD 2C000000
4182003C 816C06D4
898C06DC 2C0C0000
4182002C 1D8C0038
7D436214 71600100
4182000C 880A001F
9803001F 71600010
4182000C A00A001C
B003001C 00000000
C2538A30 00000004
5405FFFE 3D808000
898C06DD 2C0C0001
40820008 38A00001
60000000 00000000
C2538A58 00000004
5405FFFE 3D808000
898C06DD 2C0C0001
40820008 38A00001
60000000 00000000
C2538A80 00000004
5405FFFE 3D808000
898C06DD 2C0C0001
40820008 38A00001
60000000 00000000



Code creator: Vega
Code credits: Anarion (local Geo info packet), Atlas (Default Geo table), Megazig (OSSleepThread addr)




RAM Write Source:
Code:
Write 0x00MRGSK0 at 0x800006D4.


First ASM:
Code:
#Hooked at epilogue of OSSleepthread
#Why was this hooked here? When i was hooking to a spot within SK_UserHandler_importRecvPackets, I received a obscure one-time bug. Granted the code was way different (with an extra ASM) at that time. So I just decided to revamp the entire code. Was the one-time bug the fault of that function hook? Probably not, but let's be safe.
#PAL    801AAA8C
#NTSC-U 801AA9EC
#NTSC-J 801AA9AC
#NTSC-K 801AADE8

#Region Assembling Option
.set region, '' #Fill in E, P, J, or K within the quotes for your region when Compiling! Lowercase letters can also be used.

#EVA Notes
#800006D0 (word) is Online Self Mii Struct Ptr
#800006D4 (word) Mimic config
#800006D8 (word) ptr-2 to saved Mii data
#800006DC (byte) random num+1 aka "count"
#800006DD (byte) Code-On flag for 3rd ASM

#NOTE: There's NO need to make a Stack Frame because we are hooked at first ins of epilogue (with the og instruction being at end), and there's no return value (r3) to preserve

#Directives
.if     (region == 'P' || region == 'p') #PAL
    .set USER_Static_ptr, 0x809c2108
    .macro load_unk_ptr register
        lwz \register, -0x6968 (r13) #func 0x800bc3e0
    .endm
    .set ChangeRawMiiToNetLite_Func, 0x80526020
    .set anarion, 0x8042AB67
    .set geo_table, 0x80245DA8
.elseif (region == 'E' || region == 'e') #NTSC-U
    .set USER_Static_ptr, 0x809bd958
    .macro load_unk_ptr register
        lwz \register, -0x6968 (r13) #func 0x800bc340
    .endm
    .set ChangeRawMiiToNetLite_Func, 0x80521BAC
    .set anarion, 0x804267E7
    .set geo_table, 0x80245A90
.elseif (region == 'J' || region == 'j') #NTSC-J
    .set USER_Static_ptr, 0x809c1168
    .macro load_unk_ptr register
        lwz \register, -0x6968 (r13) #func 0x800bc300
    .endm
    .set ChangeRawMiiToNetLite_Func, 0x805259A0
    .set anarion, 0x8042A4E7
    .set geo_table, 0x80245758
.elseif (region == 'K' || region == 'k') #NTSC-K
    .set USER_Static_ptr, 0x809b0748
    .macro load_unk_ptr register
        lwz \register, -0x6948 (r13) #func 0x800bc440
    .endm
    .set ChangeRawMiiToNetLite_Func, 0x80514044
    .set anarion, 0x80418B87
    .set geo_table, 0x80245B88
.else #Invalid Region
    .err #Region match not detected. Tell the Assembler to halt and throw an error.
.endif

#Check if a USER pointer exists, then check if a room exists
lis r12, USER_Static_ptr@ha
lwz r12, USER_Static_ptr@l (r12)
cmpwi r12, 0
beq- end
lbz r11, 0 (r12)
cmpwi r11, 0
beq- end

#Check if ZZZZ/zzzz was pressed
lis r10, 0x8035 #GCN PAL used for test source
lhz r10, 0xFFFF8200 (r10) #GCN PAL used for test source
cmplwi r10, 0x0880 #GCN Y button used for test source

#Do some stuff that both activator situations would require, yes this is slower code but will cut down in length
lis r11, 0x8000 #Set EVA Upper
lwz r0, 0x4040 (r11) #Has default contents already been saved? Null loaded here means NO
cmpwi cr7, r0, 0

#Now do rest of branches and checks
beq- activate_mimic
cmplwi r10, 0x0090 #GCN Z button used for test source
bne+ end

#De-mimic!
#Were defaults saved? If not, do nothing
beq- cr7, end

#Clear Code-On Flag
li r0, 0
stb r0, 0x6DD (r11)

#Set anarion ptr
lis r10, anarion@ha

#Restore Anarion Packet original contents and original Flag/Globe/RegID USER Packet contents
lwz r6, 0x4040+0x4C (r11)
lwz r7, 0x4040+0x50 (r11)
lbz r8, 0x4040+0x54 (r11)
stw r6, anarion+0x0071@l (r10)
stw r7, anarion+0x1075@l (r10)
stb r8, anarion@l (r10)
stb r8, 0xC5 (r12) #Region ID has no differences in Anarion vs USER Packet
andis. r0, r6, 0x00FF #Check if flag/region settings were configured
bne- mimic_deact_restore_falgregion_user_stuff
li r6, -1 #USER Packet uses -1 for non-configured flag/region settings
#Need to grab default globe location of region id for USER Packet
lis r4, geo_table@h
ori r4, r4, geo_table@l
slwi r3, r8, 3
addi r3, r3, 4
lwzx r7, r3, r4

mimic_deact_restore_falgregion_user_stuff:
stw r6, 0xB8 (r12)
stw r7, 0xBC (r12)

#Set r9 as -2 of your backed up Mii Data (USER-Packet specific, NOT Database)
ori r9, r11, 0x4040-2

#Copy all saved Mii data to Mii DB and USER packet; mii DB excludes checksum
b mimic_mii_data_set_ctr_amt

#____Mimic____!
activate_mimic:
#Check if your default stuff was already saved. If not, save it!
bne+ cr7, continue_activate_mimic

#Grab Online Self Mii ptr thingy to grab DB index
lwz r9, 0x6D0 (r11)
lbz r9, 0x8 (r9)

#Grab MiiData-2 ptr using DB root ptr and index, then save it to EVA. Rather do it in this code than the other code
load_unk_ptr r10
lwz r10, 0x10 (r10)
mulli r9, r9, 74
add r10, r10, r9
addi r10, r10, 2 #Account for RNOD word magic but only add 2 cuz of halfword loop
stw r10, 0x6D8 (r11)

#Backup your original USER Packet Mii Data + CRC16
li r0, 19 #Size in words
addi r9, r12, 0xC
ori r6, r11, 0x4040-4
mtctr r0
backup_mii_data_loop:
lwzu r0, 0x4 (r9)
stwu r0, 0x4 (r6)
bdnz+ backup_mii_data_loop

#Save Country, Globe, and Region ID stuff
lis r10, anarion@ha
lwz r7, anarion+0x0071@l (r10)
lwz r8, anarion+0x1075@l (r10)
lbz r9, anarion@l (r10)
stw r7, 0x4 (r6)
stw r8, 0x8 (r6)
stb r9, 0xC (r6)

#Calculate Room count (excluding yourself and guests), this is hacky, there's definitely better ways to do this.
continue_activate_mimic:
li r8, 12 #Max amt of opponent USER packets possible in USER handle as a whole (NOT included yours) is actually 12. A packet (at full room no guests) is left unused. Idk how sloting goes, so we need to check this extra packet.
addi r7, r12, 8 #Point to your USER packet (8 bytes past Root)
li r9, 0
mtctr r8
calc_room_size_loop:
lwzu r0, 0xC0 (r7)
cmpwi r0, 0
beq- 0x8
addi r9, r9, 1
bdnz+ calc_room_size_loop

#It may be possible for the ZZZZ to be pressed right before a room is actually made or right after it disssolves. Check for zero r9
check_for_no_opps:
cmpwi r9, 0
beq- end

#Generate Random number based on roomsize-1 count
mftbl r5
divwu r7, r5, r9
mullw r7, r7, r9
subf r7, r7, r5
addi r7, r7, 1

#Set Code-On flag high for 3rd ASM
li r5, 1
stb r5, 0x6DD (r11)

#Find opponent to mimic. Set CTR and r11 start ptr (-192 from first possible opp USER Packet)
mtctr r7
addi r9, r12, 8 #Point to your USER packet (8 bytes past Root)

#Set a count because we need to use this count to know how to navigate to opp's SELECT packet in 3rd ASM (cuz of spacing/unused SELECT packets). USER Packets align up with SELECT packets. We cannot use the random num for this!
li r6, 0

#Now loop thru all applicable USER packets
check_player_amt_in_user_pkt_loop:
lwzu r0, 0xC0 (r9)
addi r6, r6, 1
cmpwi r0, 0
beq- check_player_amt_in_user_pkt_loop #If no USER packet, reloop but do NOT decrement CTR
bdnz+ check_player_amt_in_user_pkt_loop

#Store "count" to EVA for 3rd ASM
stb r6, 0x6DC (r11)

#Get Mimic Settings
lwz r8, 0x6D4 (r11)

#preset anarion ptr
lis r7, anarion@ha #NOTE keep r7 intact til we get to mii copy stuff

#r11 (Opp USER Packet ptr) has now been set!
#Check Region ID copy flag
andis. r0, r8, 0x0001
beq- check_flagglobe_copy_flag

#Note -8's have to be done because opp USER doesn't have the 0x8 bytes in front like r11 (Your USER packet)
#Copy Opp's Region ID now
lbz r5, 0xC5-8 (r9) #NOTE keep r5 intact til once we're past geo table stuff
stb r5, 0xC5 (r12)
stb r5, anarion@l (r7) #For your screen

#Check Flag+Globe copy flag
check_flagglobe_copy_flag:
andi. r0, r8, 0x1000
beq- check_mii_copy_flag

#Copy Flag+Globe
lwz r0, 0xB8-8 (r9)
lwz r6, 0xBC-8 (r9)
stw r0, 0xB8 (r12)
stw r6, 0xBC (r12)

#Need to update Flag+Globe on your screen now
#Did opp have flag set?
cmpwi r0, -1
bne- write_flag_globe_your_screen
lis r10, geo_table@h
ori r10, r10, geo_table@l
slwi r5, r5, 3 #Multiply Region ID by 8 to get exact ptr within geo table
lwzx r0, r5, r10 #Load new flag+province+city values
addi r5, r5, 4
clrlwi r0, r0, 24 #Clear out everything but the country code byte
lwzx r6, r5, r10 #Load default globe location of reg id NOTE is this even needed because this is usually zero when province within country isnt set and game does its own geo table lookup, but whatever, JUST incase!

write_flag_globe_your_screen:
stw r0, anarion+0x0071@l (r7)
stw r6, anarion+0x1075@l (r7)

#Check for Mii copy flag
check_mii_copy_flag:
andis. r0, r8, 0x0010
beq- end

mimic_mii_data:
addi r9, r9, 0xE-8 #Point to -2 of Mii Data spot in Opp's USER Packet
mimic_mii_data_set_ctr_amt:
li r6, 37 #37 halfwords is 74 bytes
lwz r10, 0x6D8 (r11) #Set r10 as -2 to spot in Mii DB
addi r12, r12, 0xE #Point to -2 of Mii Data spot in destination/your USER Packet
mtctr r6
mimic_mii_loop:
lhzu r0, 0x2 (r9)
sthu r0, 0x2 (r10)
sthu r0, 0x2 (r12)
bdnz+ mimic_mii_loop

#Copy Opp's Mii Checksum from their USER to yours (this does NOT go into Mii DB!)
lhz r0, 0x2 (r9)
sth r0, 0x2 (r12)

#Grab Online Self Mii Struct ptr and DB index
lwz r3, 0x6D0 (r11)
lbz r4, 0x8 (r3)

#Now we need to update our Online Self Mii char/icon packet thingy
#Theres a byte held in the mii struct that tells the mii-related funcs that its already processed, clear this byte
li r0, 0
stb r0, 0x00A4 (r3)

#Call ChangeRawMiiToNetLite_Func
#r3 is ptr to Online Self Mii Struct thingy
#r4 is DB index byte
#r5 is always -1?
lis r12, ChangeRawMiiToNetLite_Func@h
li r5, -1
ori r12, r12, ChangeRawMiiToNetLite_Func@l
mtctr r12
bctrl

#Original Instruction, End Code
end:
lwz r0, 0x0014 (sp)

---------------

Second ASM:
Code:
#Summary: Store Online Self Mii Struct Ptr Thingy to EVA
#PAL    805FB0A4
#NTSC-U 805DA7C0
#NTSC-J 805FA980
#NTSC-K 805E94C4
lis r12, 0x8000
lwz r0, 0x0074 (r3) #Original Instruction
stw r3, 0x6D0 (r12)

---------------

Third ASM:
Code:
#Hooked at unk func at address right before it calls GetWinningTrack Appears to be only func that calls SK_SELECTHandler_getWinningVoter
#Hook occurs the moment the lottery starts. Only occurs once.
#Summary: Check user flag for online rank and character+vehicle. Switch those attributes if flag(s) are present

#PAL    80644370
#NTSC-U 80612F50
#NTSC-J 806439DC
#NTSC-K 80632688

#Region Setting
.set region, '' #p, e, j, or k

#Directives #TODO
.if     (region == 'P' || region == 'p') #PAL
    .macro og_instruction
        lwz r3, 0x2100 (r3)
    .endm
.elseif (region == 'E' || region == 'e') #NTSC-U
    .macro og_instruction
        lwz r3, -0x26D0 (r3)
    .endm
.elseif (region == 'J' || region == 'j') #NTSC-J
    .macro og_instruction
        lwz r3, 0x1160 (r3)
    .endm
.elseif (region == 'K' || region == 'k') #NTSC-K
    .macro og_instruction
        lwz r3, 0x0740 (r3)
    .endm
.else #Invalid Region
    .err #Region match not detected. Tell the Assembler to halt and throw an error.
.endif

#OG Instruction, finish loading SELECT Handle ptr
og_instruction

#Check Code-On Flag from 2nd ASM
lis r12, 0x8000
lbz r0, 0x6DD (r12)
cmpwi r0, 0
beq- end

#Load Mimic Config
lwz r11, 0x6D4 (r12)

#Load saved "count"
lbz r12, 0x6DC (r12)
cmpwi r12, 0
beq- end

#Multiply count by SELECT packet size
mulli r12, r12, 0x38 #Size of SELECT packets are 0x38 bytes

#Get opp's SELECT Packet ptr-8
add r10, r3, r12

#Check for Online Rank Icon Copy flag
andi. r0, r11, 0x0100
beq- check_kartvehicle_copy_flag

#Fyi, offsets are based for reading/writing data in your own SELECT Packet with using the SELECT Handle Root ptr.

#Copy Rank
lbz r0, 0x1F (r10)
stb r0, 0x1F (r3)

check_kartvehicle_copy_flag:
andi. r0, r11, 0x0010
beq- end

#Copy Character and Vehicle
lhz r0, 0x1C (r10)
sth r0, 0x1C (r3)

#End code
end:

------------

4th, 5th, and 6th ASM Sources:
Code:
#Hooked at r5 arg setup for the 3 parents that call SetCountryFunc, SetLatitudeFunc, and SetLongtitudeFunc respectively
#Hook Addresses
#PAL    8054A9D8 8054AA00 8054AA28
#NTSC-U 8054549C 805454C4 805454EC
#NTSC-J 8054A358 8054A380 8054A3A8
#NTSC-K 80538A30 80538A58 80538A80
#Summary: If code is active force the flag/region settings to be On

#Original Instruction. Extract "Display Flag & Region Settings?" bit from rksys.dat
rlwinm r5, r0, 31, 31, 31

#Check if Code is On
lis r12, 0x8000
lbz r12, 0x6DD (r12)
cmpwi r12, 1
bne- 0x8

#Force Game to use Flag and region info from Anarion's "packet" (the dumped SYSCONF)
li r5, 1

Print this item

  Enter Competition Leaderboards w/o connecting to Internet First [B_squo]
Posted by: Vega - 03-12-2025, 04:49 PM - Forum: Misc/Other - No Replies

Enter Competition Leaderboards w/o connecting to Internet First [B_squo]

(PAL)
045c491c 38600000
045c4bf8 38000000

(USA)
04624590 38600000
0462486c 38000000

(JPN)
045c429c 38600000
045c4578 38000000

(KOR)
045b2980 38600000
045b2c5c 38000000

Code creator: B_squo

Print this item

  Load WC24 Related Stuff w/o WC24 Enabled [B_squo]
Posted by: Vega - 03-12-2025, 12:19 PM - Forum: Misc/Other - No Replies

Load WC24 Related Stuff w/o WC24 Enabled [B_squo]

This can be used to load the contents of a wc24dl.vff file without having an Internet setting saved on the Wii to make the game load it. For example, you will be able to load competitions from a wc24dl.vff file that has one, even if your Wii is setup without any Internet-related feature enabled.

(PAL)
041dd0a0 38600001
041dd0a8 38600001
041dd0b0 38600001
041dd0f8 40820020

(USA)
041dd000 38600001
041dd008 38600001
041dd010 38600001
041dd058 40820020

(JPN)
041dcfc0 38600001
041dcfc8 38600001
041dcfd0 38600001
041dd018 40820020

(KOR)
041dd3fc 38600001
041dd404 38600001
041dd40c 38600001
041dd454 40820020

Code creator: B_squo

Print this item