Welcome, Guest |
You have to register before you can post on our site.
|
Online Users |
There are currently 93 online users. » 1 Member(s) | 88 Guest(s) Applebot, Bing, Discord, Google, Vega
|
Latest Threads |
Thunder Cloud Effect Modi...
Forum: Offline; Item
Last Post: JerryHatrick
4 hours ago
» Replies: 11
» Views: 1,054
|
MKW Coder/Developer of th...
Forum: Coding & Hacking General Discussion
Last Post: Vega
6 hours ago
» Replies: 10
» Views: 13,775
|
Make it to 10,000
Forum: General Discussion
Last Post: Vega
7 hours ago
» Replies: 7,338
» Views: 5,667,409
|
Miniturbos and Inside Dri...
Forum: Coding & Hacking General Discussion
Last Post: JerryHatrick
Yesterday, 09:54 AM
» Replies: 1
» Views: 855
|
Code request???
Forum: Code Support / Help / Requests
Last Post: DrTap
01-09-2025, 06:06 PM
» Replies: 3
» Views: 4,941
|
CPUs/Online Players Have ...
Forum: Visual & Sound Effects
Last Post: Zeraora
01-09-2025, 02:26 AM
» Replies: 2
» Views: 499
|
Offline Hide and Seek
Forum: Code Support / Help / Requests
Last Post: FelX
01-08-2025, 03:43 PM
» Replies: 11
» Views: 725
|
Show Nametags During Coun...
Forum: Visual & Sound Effects
Last Post: _Ro
01-08-2025, 07:48 AM
» Replies: 1
» Views: 666
|
Item Reset Code with Time...
Forum: Code Support / Help / Requests
Last Post: WaluigiisFluffy
01-07-2025, 11:20 PM
» Replies: 6
» Views: 235
|
Racer Count Modifier
Forum: Offline Non-Item
Last Post: Vega
01-07-2025, 06:30 PM
» Replies: 1
» Views: 123
|
|
|
Show Everyone's True Region ID [Vega] |
Posted by: Vega - 11-27-2018, 10:07 PM - Forum: Online Non-Item
- No Replies
|
|
Show Everyone's True Region ID [Vega]
I made this code because I got tired of seeing White Line (CTGP region ID's) everywhere on Wiimmfi. This code will put the correct line color (on your screen only) for all players in a race. The line color will first be based on what version of MKW Disc/ISO they are using and secondly based on their country code + globe position.
Some notes about using this code:
- This only effects the output of the opponent's line color during the actual race. Live View is not effected by this code.
- This doesn't effect any opponent's geo location nor country flag when you see them on the globe
NTSC-U
C261E0CC 00000015
88830184 2C040045
41820024 2C04004A
4182002C 2C04004B
4182001C 2C040050
41820038 3880000F
48000078 38800001
48000070 38800005
48000068 89830178
2C0C0080 41A2FFE0
2C0C00FF 41820030
38800000 4800004C
89830178 2C0C0041
4182003C 2C0C005F
41820034 2C0C00FF
4182001C 38800002
48000028 8983017C
2C0C0011 41A2FFA0
4BFFFFC8 8983017C
2C0C00E6 41820008
4BFFFFDC 38800003
60000000 00000000
PAL
C26513E0 00000015
88830184 2C040045
41820024 2C04004A
4182002C 2C04004B
4182001C 2C040050
41820038 3880000F
48000078 38800001
48000070 38800005
48000068 89830178
2C0C0080 41A2FFE0
2C0C00FF 41820030
38800000 4800004C
89830178 2C0C0041
4182003C 2C0C005F
41820034 2C0C00FF
4182001C 38800002
48000028 8983017C
2C0C0011 41A2FFA0
4BFFFFC8 8983017C
2C0C00E6 41820008
4BFFFFDC 38800003
60000000 00000000
NTSC-J
C2650A4C 00000015
88830184 2C040045
41820024 2C04004A
4182002C 2C04004B
4182001C 2C040050
41820038 3880000F
48000078 38800001
48000070 38800005
48000068 89830178
2C0C0080 41A2FFE0
2C0C00FF 41820030
38800000 4800004C
89830178 2C0C0041
4182003C 2C0C005F
41820034 2C0C00FF
4182001C 38800002
48000028 8983017C
2C0C0011 41A2FFA0
4BFFFFC8 8983017C
2C0C00E6 41820008
4BFFFFDC 38800003
60000000 00000000
NTSC-K
C263F6F8 00000015
88830184 2C040045
41820024 2C04004A
4182002C 2C04004B
4182001C 2C040050
41820038 3880000F
48000078 38800001
48000070 38800005
48000068 89830178
2C0C0080 41A2FFE0
2C0C00FF 41820030
38800000 4800004C
89830178 2C0C0041
4182003C 2C0C005F
41820034 2C0C00FF
4182001C 38800002
48000028 8983017C
2C0C0011 41A2FFA0
4BFFFFC8 8983017C
2C0C00E6 41820008
4BFFFFDC 38800003
60000000 00000000
Source:
####################
###START ASSEMBLY###
####################
#
#########################
##Grab Disc/ISO Version##
#########################
lbz r4, 0x0184 (r3) #Grab the byte that determines a user's Disc/ISO
########################
##Disc/ISO Byte Checks##
########################
cmpwi r4, 0x45 #Compare byte to 0x45 (USA game)
beq- usa_regid #If equal to 0x45, jump to usa_regid label
cmpwi r4, 0x4A #Compare byte to 0x4A (JAPAN game)
beq- jpn_ortwn #If equal to 0x4A, jump to jpn_twn label
cmpwi r4, 0x4B #Compare byte to 0x4B (KOREA game)
beq- kor_regid #If equal to 0x4B, jump to kor_regid label
cmpwi r4, 0x50 #Compare byte to 0x50 (PAL game)
beq- euro_oraus #If equal to 0x50, jump to euro_oraus label
####################
##White Line Label##
####################
##This label will apply white line as a safety net if the disc/iso byte is not recognized.##
##If somebody has a Taiwan white line, they will also get navigated to this label.##
white_line:
li r4, 0xF #Load 0xF into r4 (this is what the game uses as a safety net, if a region ID value is unreadable)
b the_end #White line applied, jump to the_end label
###################
##Blue Line Label##
###################
usa_regid:
li r4, 0x1 #Load 0x1 into r4
b the_end #Blue line applied, jump to the_end label
#####################
##Purple Line Label##
#####################
kor_regid:
li r4, 0x5 #Load 0x5 into r4
b the_end #Purple line applied, jump to the_end label
#################################
##JAPAN Game Country Code Check##
#################################
##Since Taiwan region is part of the Japan disc/ISO, we need to check the person's country code to see if they have the Taiwan country code##
##That is how Taiwan region is reached legitimately.##
##If the user hasn't set their flag, their country code will be 0xFF. Meaning we will later need to check their globe position##
jpn_ortwn:
lbz r12, 0x0178 (r3) #Load country code from user's USER RECORD
cmpwi r12, 0x80 #Compare country code to Taiwan's country code (0x80)
beq- white_line #If player has Taiwan country code, jump to white_line label
cmpwi r12, 0xFF #See if player hasn't set their flag
beq- check_globe1 #If country code value is 0xFF, user hasn't set flag. Jump to check_globe1 label
##If user has flag set with a country code other than Taiwan, we know to give that user a red line.##
##Proceed down to Red Line Label##
##################
##Red Line Label##
##################
its_jpn:
li r4, 0x0 #Load 0x0 into r4
b the_end #Red line applied, jump to the_end label
###############################
##PAL Game Country Code Check##
###############################
##Since AUS/NZ region is part of the PAL disc/ISO, we need to check the person's country code to see if they have the AUS or NZ country code##
##That is how AUS/NZ region is reached legitimately##
##If the user hasn't set their flag, their country code will be 0xFF. Meaning we will later need to check their globe position##
euro_oraus:
lbz r12, 0x178 (r3) #Load country code from user's USER RECORD
cmpwi r12, 0x41 #Compare country code to Australia's country code (0x41)
beq- its_aus #If player has Australia country code, jump to its_aus label
cmpwi r12, 0x5F #Compare country code to New Zealand's country code (0x5F)
beq- its_aus #If player has New Zealand country code, jump to its_aus label
cmpwi r12, 0xFF #See if player hasn't set their flag
beq- check_globe2 #If country code value is 0xFF, user hasn't set flag. Jump to check_globe2 label
####################
##Green Line Label##
####################
its_eur:
li r4, 0x2 #Load 0x2 into r4
b the_end #Green line applied, jump to the_end label
########################################
##Globe Position Checks for JAPAN Game##
########################################
check_globe1:
lbz r12, 0x017C (r3) #Load 1st byte value of word of Globe Position from user's USER RECORD
cmpwi r12, 0x11 #Compare byte to 0x11 (Taiwan Region ID default geo-location of Taipei City)
beq- white_line #If equal to 0x11, we know to give the user a white line. Jump to white_line label
b its_jpn #If user doesn't have the Taiwan Region ID default geo-location, we know to give them red line. Jump to red_line label.
######################################
##Globe Position Checks for PAL Game##
######################################
check_globe2:
lbz r12, 0x17C (r3) #Load 1st byte value of word of Globe Position from user's USER RECORD
cmpwi r12, 0xE6 #Compare byte to 0xE6 (AUS/NZ Region ID default geo-location of Australian Capital Territory)
beq- its_aus #If equal to 0xE6, we know to give the user a yellow line. Jump to its_aus label
b its_eur #If user doesn't have the AUS/NZ Region ID default geo-location, we know to give them green line. Jump to its_eur label
#####################
##Yellow Line Label##
#####################
its_aus:
li r4, 0x3 #Load 0x3 into r4, no need to add a branch funciton, since next step below is the the_end label.
#################
##The End Label##
#################
the_end: #Default Instruction not needed
#
##################
###END ASSEMBLY###
##################
Code creator: Vega
Code contributor(s): Star (subroutine founder)
|
|
|
Friend Roster Plus Your Mii; Name Changer & Extender [Vega] |
Posted by: Vega - 11-25-2018, 09:46 PM - Forum: Online Non-Item
- No Replies
|
|
Friend Roster Plus Your Mii; Name Changer & Extender [Vega]
This code will allow you to put in a custom Mii name when online. Only you can see it. You also have the ability to extend the max length of the Mii name from 10 to 29 characters. If you don't want the max length, just fill in the unused values with 0's.
This will also effect every Mii name for every friend of your entire friend roster.
Also, this may not work on all MKW servers (such as Wiimmfi). There's no point adding button activators to this if the code isn't working on a particular MKW server as the ASM function gets called upon when transitioning from the Wifi Main menu to the menu where you can see your Mii plus name.
Please also note that this will also set all names of anyone you meet (during the sequence when Miis are being shown on the game) before a the track voting is done. However during track vote, and actual racing, opponents' names will be normal.
NTSC-U
C274BF0C 0000000D
38A40066 48000045
0000WXYZ WXYZWXYZ
WXYZWXYZ WXYZWXYZ
WXYZWXYZ WXYZWXYZ
WXYZWXYZ WXYZWXYZ
WXYZWXYZ WXYZWXYZ
WXYZWXYZ WXYZWXYZ
WXYZWXYZ WXYZWXYZ
WXYZWXYZ 00000000
7D8802A6 A56C0002
B5650002 2C0B0000
4082FFF4 80A40068
60000000 00000000
PAL
C275144C 0000000D
38A40066 48000045
0000WXYZ WXYZWXYZ
WXYZWXYZ WXYZWXYZ
WXYZWXYZ WXYZWXYZ
WXYZWXYZ WXYZWXYZ
WXYZWXYZ WXYZWXYZ
WXYZWXYZ WXYZWXYZ
WXYZWXYZ WXYZWXYZ
WXYZWXYZ 00000000
7D8802A6 A56C0002
B5650002 2C0B0000
4082FFF4 80A40068
60000000 00000000
NTSC-J
C2750AB8 0000000D
38A40066 48000045
0000WXYZ WXYZWXYZ
WXYZWXYZ WXYZWXYZ
WXYZWXYZ WXYZWXYZ
WXYZWXYZ WXYZWXYZ
WXYZWXYZ WXYZWXYZ
WXYZWXYZ WXYZWXYZ
WXYZWXYZ WXYZWXYZ
WXYZWXYZ 00000000
7D8802A6 A56C0002
B5650002 2C0B0000
4082FFF4 80A40068
60000000 00000000
NTSC-K
C273F80C 0000000D
38A40066 48000045
0000WXYZ WXYZWXYZ
WXYZWXYZ WXYZWXYZ
WXYZWXYZ WXYZWXYZ
WXYZWXYZ WXYZWXYZ
WXYZWXYZ WXYZWXYZ
WXYZWXYZ WXYZWXYZ
WXYZWXYZ WXYZWXYZ
WXYZWXYZ 00000000
7D8802A6 A56C0002
B5650002 2C0B0000
4082FFF4 80A40068
60000000 00000000
WXYZ = Mii Character ASCII Value
Example ASCII Values:
0020 = Space
0041 = A
0061 = a
E017 = DSi Heart
Use 0000 for unfilled values if you don't want to use the full length of 29 characters.
Source (using 01230123012301230123456789905 as the Mii Name):
#Address ports
# 8074BF0C = NTSC-U
# 8075144C = PAL
# 80750AB8 = NTSC-J
# 8073F80C = NTSC-K
#Safe registers
#LR, r0, r5, r11, r12
#Start of Mii Name is at r4+0x68 (where loop writing starts at)
#Mii Name characters are halfword a piece, loop will transfer a halfword at a time
#Thus use r5 to point to r4+0x66
addi r5, r4, 0x66
#Use BL Trick to write out Mii Name
bl mii_name
.short 0x0000
.llong 0x0030003100320033
.llong 0x0030003100320033
.llong 0x0030003100320033
.llong 0x0030003100320033
.llong 0x0030003100320033
.llong 0x0034003500360037
.llong 0x0038003900390030
.short 0x0035
.short 0x0000
.short 0x0000
mii_name:
mflr r12
the_loop:
lhzu r11, 0x2 (r12) #Load Mii Name from BL Trick
sthu r11, 0x2 (r5) #Store Mii Name to dynamic memory
cmpwi r11, 0 #Check for null halfword (end of Mii Name)
bne+ the_loop #If NOT null, keep loop going
#Default Instruction
lwz r5, 0x0068 (r4)
Code creator: Vega
Code credits: Star (used his Mii Extender Code to help setup a Breakpoint)
|
|
|
Friend Roster Mii Name Changer & Extender [Vega] |
Posted by: Vega - 11-25-2018, 07:59 PM - Forum: Online Non-Item
- No Replies
|
|
Friend Roster Mii Name Changer & Extender [Vega]
This code will allow you to put in a custom Mii name for every friend of your friend roster online. Your Mii name will NOT be effected. Every friend will have the same Mii name that was set on the code. You also have the ability to extend the Mii Name from 10 to 29 characters in max length. If you don't want to use the full length of 29 characters, simply fill in the non-used values with 0's.
NTSC-U
C25CF7F0 0000000E
7C0802A6 38E40066
48000045 0000WXYZ
WXYZWXYZ WXYZWXYZ
WXYZWXYZ WXYZWXYZ
WXYZWXYZ WXYZWXYZ
WXYZWXYZ WXYZWXYZ
WXYZWXYZ WXYZWXYZ
WXYZWXYZ WXYZWXYZ
WXYZWXYZ WXYZWXYZ
00000000 7D8802A6
A56C0002 B5670002
2C0B0000 4082FFF4
7C0803A6 80E40068
60000000 00000000
PAL
C25E55CC 0000000E
7C0802A6 38E40066
48000045 0000WXYZ
WXYZWXYZ WXYZWXYZ
WXYZWXYZ WXYZWXYZ
WXYZWXYZ WXYZWXYZ
WXYZWXYZ WXYZWXYZ
WXYZWXYZ WXYZWXYZ
WXYZWXYZ WXYZWXYZ
WXYZWXYZ WXYZWXYZ
00000000 7D8802A6
A56C0002 B5670002
2C0B0000 4082FFF4
7C0803A6 80E40068
60000000 00000000
NTSC-J
C25E4EA8 0000000E
7C0802A6 38E40066
48000045 0000WXYZ
WXYZWXYZ WXYZWXYZ
WXYZWXYZ WXYZWXYZ
WXYZWXYZ WXYZWXYZ
WXYZWXYZ WXYZWXYZ
WXYZWXYZ WXYZWXYZ
WXYZWXYZ WXYZWXYZ
WXYZWXYZ WXYZWXYZ
00000000 7D8802A6
A56C0002 B5670002
2C0B0000 4082FFF4
7C0803A6 80E40068
60000000 00000000
NTSC-K
C25D3768 0000000E
7C0802A6 38E40066
48000045 0000WXYZ
WXYZWXYZ WXYZWXYZ
WXYZWXYZ WXYZWXYZ
WXYZWXYZ WXYZWXYZ
WXYZWXYZ WXYZWXYZ
WXYZWXYZ WXYZWXYZ
WXYZWXYZ WXYZWXYZ
WXYZWXYZ WXYZWXYZ
00000000 7D8802A6
A56C0002 B5670002
2C0B0000 4082FFF4
7C0803A6 80E40068
60000000 00000000
WXYZ = Mii Character ASCII Value
Example ASCII Values:
0020 = Space
0041 = A
0061 = a
E017 = DSi Heart
Use 0000 for unfilled values if you don't want to use the full length of 29 characters.
Source (using 01230123012301230123456789905 as the Mii Name):
#Address ports
# 805CF7F0 = NTSC-U
# 805E55CC = PAL
# 805E4EA8 = NTSC-J
# 805D3768 = NTSC-K
#Safe registers
#r0, r7, r11, r12
#Save LR, fyi: r0 good to use for this instruction
mflr r0
#Start of Mii Name is at r4+0x68 (where loop writing starts at)
#Mii Name characters are halfword a piece, loop will transfer a halfword at a time
#Thus use r7 to point to r4+0x66
addi r7, r4, 0x66
#Use BL Trick to write out Mii Name
bl mii_name
.short 0x0000
.llong 0x0030003100320033
.llong 0x0030003100320033
.llong 0x0030003100320033
.llong 0x0030003100320033
.llong 0x0030003100320033
.llong 0x0034003500360037
.llong 0x0038003900390030
.short 0x0035
.short 0x0000
.short 0x0000
mii_name:
mflr r12
the_loop:
lhzu r11, 0x2 (r12) #Load Mii Data from BL Trick
sthu r11, 0x2 (r7) #Store Mii Data to dynamic memory
cmpwi r11, 0 #Check for null halfword (end of Mii Data)
bne+ the_loop #If NOT null, keep loop going
mtlr r0 #Move to Link Register, this copies r0's value (original LR) to the Link Register
lwz r7, 0x0068 (r4) #Default Instruction
Code creator: Vega
|
|
|
Install PyiiASMH (ASM Code Compiler + Decompiler) |
Posted by: Vega - 11-24-2018, 02:42 AM - Forum: Purgatory
- No Replies
|
|
Install PyiiASMH (ASM Code Compiler + Decompiler)
NOTE: This is now outdated by PyiiASMH 3, which can be found here: https://mkwii.com/showthread.php?tid=1529
Intro
PyiiASMH is an alternative compiler+decompiler for your ASM codes. WiiRDGUI is proven and it works. The problem with WiiRDGUI is that if a hash-tagged comment is too long and enters into a new line below, WiiRDGUI will try to read it as an ASM instruction, thus giving you a compilation error. WiiRDGUI also does not allow the use of keyboard shortcuts (such as CTRL+A to select the entire source), which can be a nuisance.
PyiiASMH solves these issues. PyiiASMH also has options to compile C0 codes, RAW ASM, add in XOR checksum for F2 type codes, etc. The GUI is also more aesthetically pleasing to the eye.
Installation for Windows (confirmed working for Windows 7 SP3, haven't tried other versions)
Step 1. Install Python and PyQt
You will first need PyQt4 and Python 2.7.11 installed on your Windows computer.
Download Python 2.7.11 MSI x86 Installer - https://www.python.org/downloads/release/python-2711/
Choose the bottom option (Windows x86 Installer with the MD5 checksum of 241bf8e097ab4e1047d9bb4f59602095)
Download PyQt4 for x86 - https://sourceforge.net/projects/pyqt/fi...Qt-4.11.4/
Choose - PyQt4-4.11.4-gpl-Py2.7-Qt4.8.7-x32.exe (29.5 MB in size).
Run the Python MSI Installer first. Complete the installer, then run the PyQt4 exe application. Complete the installation.
Step 2. Download and launch PyiiASMH
Download PyiiASMH HERE.
Unzip/Extract the download. You will see a file called pyiiasmh.py (should have a python logo due to installing python earlier). Open the file. Command prompt will appear then the PyiiASM GUI will launch. Congratz!
You may want to create a desktop shortcut of the pyiiasmh.py file.
Installation for Linux (Debian 9 only, this may work for Ubuntu 16.04)
Here's how you can install PyiiASMH on Debian 9. In theory, this should also work on Ubuntu Linux, but I've never tested it.
1. sudo apt-get update
2. sudo apt-get install python-pyside
3. Download PyiiASMH HERE. Sha256 checksum for download is HERE.Extract the download. You will see a shell script file simply named 'PyiiASMH'. Open/launch the file. PyiiASMH GUI now appears. Congratz!
Downsides of PyiiASMH for Debian 9 only:
On Debian 9, PyiiASMH cannot decompile codes. It can only compile. It appears the linux64bit library for 'vdappc' (the disassembler) was compiled incorrectly from Gecko's vdappc.exe. A ldd command with grep not, shows I have no missing libraries, but the file won't even execute. There is a linux32bit version of the vdappc but it appears to not disassemble codes correctly.
Install PyiiASMH on Wine (Debian 9)
Requirements: Have a full working installation of Wine (plenty of tutorials all over google), have a file manager capable of launching windows-python .py files.
If you can't get PyiiASMH to install on Linux natively, you can try installing through Wine.
1. Download the msi and exe files that were shown for the Windows guide.
2. Open a terminal where you have downloaded the files
msiexec /a python-2.7.11.msi
Follow the installation wizard, leave everything default for any options.
3. Now run the PyQt4...exe via Wine, however you prefer to do it.
Follow the installation wizard, leave everything default for any options.
4. Download PyiiASMH HERE. Sha256 checksum for download is HERE.Extract the download. Right click on the file 'pyiiasmh.py', your file manager will show a list of options to run the file. There should be an option 'python' with the python logo next to it. If not, choose Open With..., and try searching around for it. Click on the 'python' logo to launch PyiiASMH.
NOTE: Do NOT click on the 'pythonw' logo.
PyiiASMH GUI now launches, a terminal screen (for wine.exe) will load alongside it. Congratz!
Troubleshooting (PyiiASMH via Wine-Linux) for launching the pyiiasmh.py file:
If your file manager doesn't automatically configure a launch path/logo when right-clicking on the pyiiasmh.py file, try this...
Run this command (you can replace nano with w/e text editor you want):
gedit ~/.local/share/applications/OpenWithPython.desktop
Fill the file with these contents..
[Desktop Entry]
Type=Application
Name=python
MimeType=text/x-python;
Exec=env WINEPREFIX="/home/yourusernameHERE/.wine" wine-stable start /ProgIDOpen Python.File %f
NoDisplay=true
StartupNotify=true
Icon=9C50_python.0
Save and close, try again. If that doesn't work, try this for the file's contents...
[Desktop Entry]
Name=Python
Exec=wine C:/python27/python.exe %F
Icon=python
Type=Application
Categories=Viewer
StartupNotify=false
Terminal=true
MimeType=application/py
|
|
|
Useless Coin Runners (Offline) [Vega] |
Posted by: Vega - 11-21-2018, 10:09 PM - Forum: Time Trials & Battle
- No Replies
|
|
Useless Coin Runners (Offline) [Vega]
Offline only
This code will make all players always have 0 coins (even though the animated coin stack will still show actual collected coins). Both teams will always finish 0-0. A tie is recorded for every match done. Nopping this code makes your team always lose with a final score of 120 to 144.
NTSC-U
04534D2C 38000000
PAL
04539874 38000000
NTSC-J
045391F4 38000000
NTSC-K
045278CC 38000000
Code creator: Vega
|
|
|
Ghost Always Saves [Diamond] |
Posted by: Diamond - 11-19-2018, 03:11 AM - Forum: Time Trials & Battle
- Replies (3)
|
|
Ghost Always Saves [Diamond]
This will save any run you complete, regardless of whether it's a PR or not. Note that since the game can only store one ghost per track, this will overwrite the former ghost that you have saved on said track, even if it's your PR. Leaderboard and timescroll are affected as well.
NTSC-U
04543C78 41820018
PAL
045491B4 41820018
NTSC-J
04548B34 41820018
NTSC-K
0453720C 41820018
Code creator: Diamond
|
|
|
Mega Mushroom Timer (Online only) [Vega] |
Posted by: Vega - 11-18-2018, 07:28 PM - Forum: Incomplete & Outdated Codes
- Replies (2)
|
|
Mega Mushroom Timer (Online only) [Vega]
NOTE: Outdated by JoshuaMK's Item Timer Code
Works Online only!
This code will keep track (via Milliseconds in timer) of how long you have left before your Mega runs out. Whenever you are not using a Mega, the timer will function normally.
NTSC-U
C2658828 00000003
3D808053 3D6080A1
616B0024 916C10A0
9903001F 00000000
C2572D90 00000006
3803FFFF 3D808053
2C000000 41820010
3D6038A0 7D6B0214
4800000C 3D6080A1
616B0024 916C10A0
60000000 00000000
PAL
C2660764 00000003
3D808053 3D6080A1
616B0024 916C5BE8
9903001F 00000000
C25795F4 00000006
3803FFFF 3D808053
2C000000 41820010
3D6038A0 7D6B0214
4800000C 3D6080A1
616B0024 916C5BE8
60000000 00000000
NTSC-J
C265FDD0 00000003
3D808053 3D6080A1
616B0024 916C5568
9903001F 00000000
C2578F74 00000006
3803FFFF 3D808053
2C000000 41820010
3D6038A0 7D6B0214
4800000C 3D6080A1
616B0024 916C5568
60000000 00000000
NTSC-K
C264EA7C 00000003
3D808052 3D6080A1
616B0024 916C3C40
9903001F 00000000
C256764C 00000006
3803FFFF 3D808052
2C000000 41820010
3D6038A0 7D6B0214
4800000C 3D6080A1
616B0024 916C3C40
60000000 00000000
Source for Timer Reset In Between Races:
#Values per Region
.set region, '' #Must set region value, or else source will not compile
.if (region == 'E' || region == 'e') # RMCE
.set _1sthalf, 0x8053
.set _2ndhalf, 0x10A0
.elseif (region == 'P' || region == 'p') # RMCP
.set _1sthalf, 0x8053
.set _2ndhalf, 0x5BE8
.elseif (region == 'J' || region == 'j') # RMCJ
.set _1sthalf, 0x8053
.set _2ndhalf, 0x5568
.elseif (region == 'K' || region == 'k') # RMCK
.set _1sthalf, 0x8052
.set _2ndhalf, 0x3C40
.else # Invalid Region
.abort
.endif
lis r12, _1sthalf
lis r11, 0x80A1 #Default Word Value (instruction) at Millisecond Display Code Address
ori r11, r11, 0x0024
stw r11, _2ndhalf (r12)
stb r8, 0x001F (r3) #Default Instruction
=====
Source for Mega Mushroom Timer (NTSC-K):
subi r0, r3, 1 #Default ASM, r0 holds mega time limit value
lis r12, 0x8052 #Set 1st half address for Millisecond Code
cmpwi r0, 0x0 #Compare mega time limit value to zero
beq- fix_timer #If equal, we need to fix the timer, let's fix it, jump to fix_timer label
lis r11, 0x38A0 #Set 1st half word value to write
add r11, r11, r0 #Add r11 and r0 together to get finalized word value to write
b the_end #No need to fix the timer ofc, jump to the_end
fix_timer:
lis r11, 0x80A1 #Set 1st half default word value
ori r11, r11, 0x0024 #Set 2nd half default word value
the_end:
stw r11, 0x3C40 (r12) #Store word of r11 to 0x80523C40
Code creator: Vega
Code credits: Bully (Millisecond Display Modifier & Address founder for Mega ASM)
|
|
|
Star Timer (Online only) [Vega] |
Posted by: Vega - 11-18-2018, 07:07 PM - Forum: Incomplete & Outdated Codes
- No Replies
|
|
Star Timer (Online only) [Vega]
NOTE: Outdated by JoshuaMK's Item Timer Code
Works Online only!
This code will keep track (via Milliseconds in timer) of how long you have left before your Star runs out. Whenever you are not using a Star, the timer will function normally.
NTSC-U
C2658828 00000003
3D808053 3D6080A1
616B0024 916C10A0
9903001F 00000000
C2572EC4 00000006
3803FFFF 3D808053
2C000000 41820010
3D6038A0 7D6B0214
4800000C 3D6080A1
616B0024 916C10A0
60000000 00000000
PAL
C2660764 00000003
3D808053 3D6080A1
616B0024 916C5BE8
9903001F 00000000
C2579728 00000006
3803FFFF 3D808053
2C000000 41820010
3D6038A0 7D6B0214
4800000C 3D6080A1
616B0024 916C5BE8
60000000 00000000
NTSC-J
C265FDD0 00000003
3D808053 3D6080A1
616B0024 916C5568
9903001F 00000000
C25790A8 00000006
3803FFFF 3D808053
2C000000 41820010
3D6038A0 7D6B0214
4800000C 3D6080A1
616B0024 916C5568
60000000 00000000
NTSC-K
C264EA7C 00000003
3D808052 3D6080A1
616B0024 916C3C40
9903001F 00000000
C2567780 00000006
3803FFFF 3D808052
2C000000 41820010
3D6038A0 7D6B0214
4800000C 3D6080A1
616B0024 916C3C40
60000000 00000000
Source for Timer Reset In Between Races:
#Values per Region
.set region, '' #Must set region value, or else source will not compile
.if (region == 'E' || region == 'e') # RMCE
.set _1sthalf, 0x8053
.set _2ndhalf, 0x10A0
.elseif (region == 'P' || region == 'p') # RMCP
.set _1sthalf, 0x8053
.set _2ndhalf, 0x5BE8
.elseif (region == 'J' || region == 'j') # RMCJ
.set _1sthalf, 0x8053
.set _2ndhalf, 0x5568
.elseif (region == 'K' || region == 'k') # RMCK
.set _1sthalf, 0x8052
.set _2ndhalf, 0x3C40
.else # Invalid Region
.abort
.endif
lis r12, _1sthalf
lis r11, 0x80A1 #Default Word Value (instruction) at Millisecond Display Code Address
ori r11, r11, 0x0024
stw r11, _2ndhalf (r12)
stb r8, 0x001F (r3) #Default Instruction
=====
Source for Star Timer (NTSC-K):
subi r0, r3, 1 #Default ASM, r0 holds star time limit value
lis r12, 0x8052 #Set 1st half address for Millisecond Code
cmpwi r0, 0x0 #Compare star time limit value to zero
beq- fix_timer #If equal, we need to fix the timer, let's fix it, jump to fix_timer label
lis r11, 0x38A0 #Set 1st half word value to write
add r11, r11, r0 #Add r11 and r0 together to get finalized word value to write
b the_end #No need to fix the timer ofc, jump to the_end
fix_timer:
lis r11, 0x80A1 #Set 1st half default word value
ori r11, r11, 0x0024 #Set 2nd half default word value
the_end:
stw r11, 0x3C40 (r12) #Store word of r11 to 0x80523C40
Code creator: Vega
Code credits: Bully (Millisecond Display Modifier & Address founder for Star ASM)
|
|
|
Golden Mushroom Timer (Online only) [Vega] |
Posted by: Vega - 11-17-2018, 09:52 PM - Forum: Incomplete & Outdated Codes
- Replies (12)
|
|
Golden Mushroom Timer (Online only) [Vega]
NOTE: Outdated by JoshuaMK's Item Timer Code
Works Online only!
This code will keep track (via Milliseconds in timer) of how long you have left before your Golden Mushroom runs out. Whenever you are not using a Golden, the timer will function normally.
NTSC-U
C2658828 00000003
3D808053 3D6080A1
616B0024 916C10A0
9903001F 00000000
C27ADD30 00000005
3403FFFF 3D808053
41820010 3D6038A0
7D6B0214 4800000C
3D6080A1 616B0024
916C10A0 00000000
PAL
C2660764 00000003
3D808053 3D6080A1
616B0024 916C5BE8
9903001F 00000000
C27BC790 00000005
3403FFFF 3D808053
41820010 3D6038A0
7D6B0214 4800000C
3D6080A1 616B0024
916C5BE8 00000000
NTSC-J
C265FDD0 00000003
3D808053 3D6080A1
616B0024 916C5568
9903001F 00000000
C27BBDFC 00000005
3403FFFF 3D808053
41820010 3D6038A0
7D6B0214 4800000C
3D6080A1 616B0024
916C5568 00000000
NTSC-K
C264EA7C 00000003
3D808052 3D6080A1
616B0024 916C3C40
9903001F 00000000
C27AAB50 00000005
3403FFFF 3D808052
41820010 3D6038A0
7D6B0214 4800000C
3D6080A1 616B0024
916C3C40 00000000
Source for Timer Reset In Between Races:
#Values per Region
.set region, '' #Must set region value, or else source will not compile
.if (region == 'E' || region == 'e') # RMCE
.set _1sthalf, 0x8053
.set _2ndhalf, 0x10A0
.elseif (region == 'P' || region == 'p') # RMCP
.set _1sthalf, 0x8053
.set _2ndhalf, 0x5BE8
.elseif (region == 'J' || region == 'j') # RMCJ
.set _1sthalf, 0x8053
.set _2ndhalf, 0x5568
.elseif (region == 'K' || region == 'k') # RMCK
.set _1sthalf, 0x8052
.set _2ndhalf, 0x3C40
.else # Invalid Region
.abort
.endif
lis r12, _1sthalf
lis r11, 0x80A1 #Default Word Value (instruction) at Millisecond Display Code Address
ori r11, r11, 0x0024
stw r11, _2ndhalf (r12)
stb r8, 0x001F (r3) #Default Instruction
=====
Source for Golden Mushroom Timer (NTSC-K):
subic. r0, r3, 1 #Default ASM, Condition Register is now set
lis r12, 0x8052 #Set 1st half address for Millisecond Display Modifier address
beq- fix_timer #If value in r0 is equal to 0, we need to now set the timer back to normal, jump to fix_timer label
lis r11, 0x38A0 #Set 1st half of word value to write to Millisecond Display address
add r11, r11, r0 #Add r11 and r0 together to get finalized word value
b the_end #No need to fix timer ofc, jump to the_end label
fix_timer:
lis r11, 0x80A1 #Set 1st half of default word value to write to Millisecond Display address
ori r11, r11, 0x0024 #Set 2nd half of default word value
the_end:
stw r11, 0x3C40 (r12) #Store word of r11 to 0x80523C40, 2nd half of address completed by offset
Code creator: Vega
Code credits: Bully (Millisecond Display Modifier & Address founder for Golden Mushroom ASM)
|
|
|
|