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

Username
  

Password
  





Search Forums

(Advanced Search)

Forum Statistics
» Members: 547
» Latest member: Orenemas1
» Forum threads: 1,666
» Forum posts: 12,028

Full Statistics

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

Latest Threads
Make it to 10,000
Forum: General Discussion
Last Post: Vega
2 hours ago
» Replies: 5,761
» Views: 4,230,870
Connect to AltWFC again
Forum: Incomplete & Outdated Codes
Last Post: marito_yo
05-03-2024, 06:27 AM
» Replies: 0
» Views: 83
Request: Mission Mode - P...
Forum: Code Support / Help / Requests
Last Post: Wingcapman
05-02-2024, 08:54 PM
» Replies: 0
» Views: 90
Custom Kart Working on Do...
Forum: Code Support / Help / Requests
Last Post: CorvoPSY
04-27-2024, 01:14 PM
» Replies: 1
» Views: 153
Boot into TT cup selectio...
Forum: Misc/Other
Last Post: Vega
04-26-2024, 08:27 PM
» Replies: 3
» Views: 2,960
Request: Custom brsars pe...
Forum: Code Support / Help / Requests
Last Post: lschlick
04-25-2024, 05:45 PM
» Replies: 0
» Views: 67
E-mails not working on th...
Forum: General Discussion
Last Post: Fifty
04-19-2024, 04:56 AM
» Replies: 3
» Views: 454
More missing info from Br...
Forum: Coding & Hacking General Discussion
Last Post: Vega
04-15-2024, 10:04 PM
» Replies: 0
» Views: 273
Request: Custom music vol...
Forum: Code Support / Help / Requests
Last Post: lschlick
04-15-2024, 06:13 PM
» Replies: 0
» Views: 233
Request: Additional sound...
Forum: Code Support / Help / Requests
Last Post: _Ro
04-15-2024, 01:50 AM
» Replies: 6
» Views: 290

 
  Set Wii To Shutdown After Specific Time [Vega]
Posted by: Vega - 12-27-2018, 08:39 PM - Forum: Misc/Other - No Replies

Set Wii To Shutdown After Specific Time [Vega]

I always wanted to make a code where you could set a time limit for how long you can play MKWii after you first boot it. Well, here it is.

This code allows the user to set a specific time to force the Wii to shutdown regardless of what you are doing in the game. The shutdown is handled automatically.

NOTE: This code makes use of memory addresses 0x80001640 thru 0x80001643. Make sure no other codes are using those memory addresses.

NTSC-U
C21AA92C 00000007
3D808000 816C1640
396B0001 3880XXXX
A3CC1640 7C04F000
41A10014 3D80801A
618CB8C0 7D8803A6
4E800020 916C1640
7C7E1B78 00000000

PAL
C21AA9CC 00000007
3D808000 816C1640
396B0001 3880XXXX
A3CC1640 7C04F000
41A10014 3D80801A
618CB960 7D8803A6
4E800020 916C1640
7C7E1B78 00000000

NTSC-J
C21AA8EC 00000007
3D808000 816C1640
396B0001 3880XXXX
A3CC1640 7C04F000
41A10014 3D80801A
618CB880 7D8803A6
4E800020 916C1640
7C7E1B78 00000000

NTSC-K
C21AAD28 00000007
3D808000 816C1640
396B0001 3880XXXX
A3CC1640 7C04F000
41A10014 3D80801A
618CBCBC 7D8803A6
4E800020 916C1640
7C7E1B78 00000000

XXXX= Time Amount
0001 = Roughly 1 Minute and 10 seconds (70 seconds)
0005 = Roughly 5 Minutes and 50 seconds (350 seconds)
7FFF = Around 637 hours (lol)




Source (NTSC-K version):
#~~~~~~~~~~~~~~~~#
# START ASSEMBLY #
#~~~~~~~~~~~~~~~~#

#~~~~~~~~#
# NTSC-K #
#~~~~~~~~#

#

#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# Set Address (Load/Store) Reference #
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#

lis r12, 0x8000 #Set upper 16 bits of r12 to 0x8000, lower 16 bits are cleared

#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# Load & Update Frame Counter #
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#

lwz r11, 0x1640 (r12) #Load the word from address 0x80001640 into r11
addi r11, r11, 1 #Add one to r11, value at 0x80001640 will increase by one per every fram

#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# Set User's Shutoff Time Value #
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#

li r4, 0xXXXX #Load user's designated frame/time shutoff value

#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# Load Byte for Comparison Check #
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#

##Since the frame ammount plain word value can exceed a high amount##
##Load the haldword instead of the of word to prevent an overflow##

lhz r30, 0x1640 (r12) #Load byte from 0x80001641 into r30

#~~~~~~~~~~~~~~~~~~#
# Comparison Check #
#~~~~~~~~~~~~~~~~~~#

cmpw r4, r30 #Compare the value in r4 to value in r30
bgt+ dont_shutdown #If r4's value is greater than r30's value, jump to dont_shutdown label

#~~~~~~~~~~~~~~#
# Shutdown Wii #
#~~~~~~~~~~~~~~#

lis r12, 0x801A #Set upper 16 bits of r12 to 0x801A, lower 16 bits are cleared
ori r12, r12, 0xBCBC #Set lower 16 bits of r12 to 0xBCBC, r12 is now 0x801ABCBC
mtlr r12 #Copy value of r12 to the Link Register
blr #Branch to Link Register

#~~~~~~~~~~~~~~~~~~~~~#
# dont_shutdown Label #
#~~~~~~~~~~~~~~~~~~~~~#

dont_shutdown:
stw r11, 0x1640 (r12) #Store updated frame count (word of r11) to 0x80001640

#~~~~~~~~~~~~~#
# Default ASM #
#~~~~~~~~~~~~~#

mr r30, r3

#~~~~~~~~~~~~~~~~~~~~~~#
# Notes about r4 & r30 #
#~~~~~~~~~~~~~~~~~~~~~~#

##r30 is safe to use because it get's overwritten by the Default ASM##
##r4 is safe to use because after the BL function, it gets overwritten by a rlwinm function##

#

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




Code creator: Vega
Code credits: Megazig (OSSleepThread subroutine; _OSShutdownToSBY subroutine)

Print this item

  Explanation of Hooktypes
Posted by: Vega - 12-26-2018, 10:30 PM - Forum: Coding & Hacking General Discussion - Replies (1)

What are Hooktypes?

I get asked this question by noobs quite a bit. For starters, if you are new to playing with Cheat Codes (GCTs), let's go over some basics.

The Basics

Every Disc/ISO Loader application for the Homebrew Channel comes with a "Cheat" setting of some sorts. This "Cheat" setting is usually referred to as the Ocarina Setting. It has two options. ON or OFF. Simple to understand. ON would be to activate your GCT file aka your cheat codes, and off would be to not activate your GCT file.

Underneath the Ocarina Setting (or nearby; depends on which HBC app you are using), there is a setting called HookType.

These are the following Hooktype Options


- None (in some modern HBC apps, setting None is the same as VI/VBI)
- VI (can also be referred to as VBI)
- KPAD Read
- Joypad
- GXDraw
- GXFlush
- OSSleepThread
- AXNextFrame


Technical Details

In memory, there are groups of executable instructions known as 'functions'. A lot of the same functions are used across multiple Wii games, and some functions can even be found in every Wii game. These functions have names. The names of the Hooktypes are the name of these functions.

However these functions are not always located in the same spot of memory, it depends on what game is being played. Your Disc/ISO loader has a string of instructions that are used to find where all these functions/hooktypes are in the game's memory.

Let's say you choose GXDraw for your hooktype. During the early booting stages of your game, your Disc/ISO loader will have a string of instruction data that it uses to search for the GXDraw function. Once the GXDraw function has been found, your loader will 'inject' the Gecko codehandler at that spot into memory. Technically, you cannot 'inject' within memory itself, so a 'subroutine' is created at the GXDraw function that will execute the Gecko codehandler whenever the game executes the GXDraw function.

All of the hooktypes listed above are functions that occur every frame (60 times per second). Thus the Gecko codehandler gets executed every frame.

Due to the complexity of certain games and/or limitations of the Gecko code handler, some hooktypes may not work well on those games. GXDraw and OSSleepthread work on 99% of all Wii games. Regarding MKWii, VBI works fine.

More Important Notes

Some Disc/ISO loaders may still be using a very archaic version of the Gecko Code Handler. This can actually cause Hooktypes to be unreliable. For example, if you are using Riivolution, you must use the GXDraw hooktype for cheat codes to work reliably for MKWii.

If you are using codes for a game you have never played on before or a rare/unpopular Wii game, use GXDraw or OSSleepThread hooktype first before 'defaulting' to VBI/VI.

Thanks for reading!

Print this item

  Region ID Algorithm Modifier [Vega]
Posted by: Vega - 12-26-2018, 08:20 PM - Forum: Misc/Other - No Replies

Region ID Algorithm Modifier [Vega]

I have decided to release this code to the public. You can call this my crown jewel. This isn't 'powerful' or anything like that, but if you want to change your Region ID to official Nintendo 'spec', this is how you would do it.

This code changes the byte that the game writes to set its Region ID. The game writes this byte from scratch via a 'Load Immediate' function. Please note there are two different versions for PAL & NTSC-J, as those games' region IDs will change depending on what country code is loaded from Wii SYSCONF.

If for some reason you don't want to use this code and want to instead change the Region ID Algorithm permanently via hex edits on the main.dol, view this thread HERE

NTSC-U
0000AE73 0000000X

PAL
(When not having AUS/NZ country code)
0000AEAF 0000000X

(When having AUS/NZ country code)
0000AF0F 0000000X

NTSC-J
(When not having TWN country code)
0000AE03 0000000X

(When having TWN country code)
0000AE33 0000000X

NTSC-K
0000AFBF 0000000X

X = Desired True Region ID
0 = Japan
1 = Americas
2 = Europe
3 = AUS/NZ
4 = Taiwan
5 = S. Korea
6 = China

Code creator: Vega  Heart

Print this item

  Globe Position Changer #2 [Vega]
Posted by: Vega - 12-26-2018, 08:12 PM - Forum: Incomplete & Outdated Codes - No Replies

Globe Position Changer #2 [Vega]

NOTE: Outdated by Anarions' single line version

This code will allow you to set a custom Globe Mii Location than what is on stored on your Wii/NAND. This code will only take effect if you have your flag settings working. Either do that legitimately or use this code - http://mkwii.com/showthread.php?tid=94

NTSC-U
C200AE58 00000003
3CA0ZZZZ 60A5zzzz
90BF10FC A0BF10FC
60000000 00000000

PAL
C200AE94 00000003
3CA0ZZZZ 60A5zzzz
90BF10FC A0BF10FC
60000000 00000000

NTSC-J
C200ADE8 00000003
3CA0ZZZZ 60A5zzzz
90BF10FC A0BF10FC
60000000 00000000

NTSC-K
C200AFA4 00000003
3CA0ZZZZ 60A5zzzz
90BF10FC A0BF10FC
60000000 00000000

ZZZZzzzz = Globe location

Source:
lis r5, 0xZZZZ #Load the ZZZZ value into the upper 16 bits of Register 5, lower 16 bits are cleared
ori r5, r5, 0xzzzz #Load the zzzz value into the lower 16 bits of Register 5
stw r5, 0x10FC (r31) #Store the word of Register 5 at the address of Register 31 plus offset 0x10FC
lhz r5, 0x10FC (r31) #Load the halfword at the address of Register 31 offset 0x10FC into Register 5; Default Instruction

Code creator: Vega

Print this item

  Globe Position Changer #1 [Vega]
Posted by: Vega - 12-26-2018, 08:09 PM - Forum: Incomplete & Outdated Codes - No Replies

Globe Position Changer #1 [Vega]

NOTE: Outdated by Anarion's single line version

This code will allow you to set a custom Globe Mii Location than what is on stored on your Wii/NAND. This code will only take effect if you have your flag settings working. Either do that legitimately or use this code - http://mkwii.com/showthread.php?tid=94

NTSC-U
C200AFF0 00000003
3C00ZZZZ 6000zzzz
900310FC A00310FC
60000000 00000000

PAL
C200B090 00000003
3C00ZZZZ 6000zzzz
900310FC A00310FC
60000000 00000000

NTSC-J
C200AFB4 00000003
3C00ZZZZ 6000zzzz
900310FC A00310FC
60000000 00000000

NTSC-K
C200B13C 00000003
3C00ZZZZ 6000zzzz
900310FC A00310FC
60000000 00000000

ZZZZzzzz = Globe Position

Source:
lis r0, 0xZZZZ #Load the ZZZZ into upper 16 bits of Register 0, lower 16 bits are cleared.
ori r0, r0, 0xzzzz #Load the zzzz value into lower 16 bits of Register 0.
stw r0, 0x10FC (r3) #Store the word (ZZZZzzzz value) of Register 0 at address of Register 3 plus offset 0x10FC
lhz r0, 0x10FC (r3) #Load the halfword at Register 3 plus offset 0x10FC into Register 0; Default Instruction

Code creator: Vega

Print this item

  Country Flag Changer #2 [Vega]
Posted by: Vega - 12-26-2018, 08:03 PM - Forum: Incomplete & Outdated Codes - No Replies

Country Flag Changer #2 [Vega]

NOTE: Outdated by Anarion's single line version

This code will allow you to change your country code to whatever you want. It also sets your flag image automatically if the country code has an image. Region residence ID is also set ofc.

NTSC-U
C200AE50 00000002
3C80XX01 909F00F8
60000000 00000000

PAL
C200AE8C 00000002
3C80XX01 909F00F8
60000000 00000000

NTSC-J
C200ADE0 00000002
3C80XX01 909F00F8
60000000 00000000

NTSC-K
C200AF9C 00000002
3C80XX01 909F00F8
60000000 00000000

XX = Country Code in Hex

Source:
lis r4, 0xXX01 #Load 0xXX01 into upper 16 bits of Register 4, lower 16 bits are cleared
stw r4, 0x00F8 (r31) #Store the word of r4 (XX010000) to the address of r31 plus offset 0x00F8

#Default instruction of lwz r4, 0x00F8 (r31) not needed

Code creator: Vega

Print this item

  Country Flag Changer #1 [Vega]
Posted by: Vega - 12-26-2018, 07:59 PM - Forum: Incomplete & Outdated Codes - No Replies

Country Flag Changer #1 [Vega]

NOTE: Outdated by Anarions' single line version

This code will allow you to change your country code to whatever you want. It also sets your flag image automatically if the country code has an image. Region residence ID is also set ofc.

NTSC-U
C200AF4C 00000002
3CC0XX01 90C300F8
60000000 00000000

PAL
C200AFEC 00000002
3CC0XX01 90C300F8
60000000 00000000

NTSC-J
C200AF10 00000002
3CC0XX01 90C300F8
60000000 00000000

NTSC-K
C200B098 00000002
3CC0XX01 90C300F8
60000000 00000000

XX = Country code in Hex

Source:
lis r6, 0xXX01 #Load the XX01 value into upper 16 bits of Register 6. Lower 16 bits are cleared.
stw r6, 0x00F8 (r3) #Store the word (XX010000 value) of Register 6 into address of Register 3 plus offset 0x00F8 

#Default instruction of lwz r6, 0x00F8 (r3) not needed

Code creator: Vega

Print this item

  Region ID Changer #2 [Vega]
Posted by: Vega - 12-26-2018, 07:57 PM - Forum: Incomplete & Outdated Codes - Replies (5)

Region ID Changer #2 [Vega]

NOTE: Outdated by Anarion's version

This version of my Region ID Changer codes only works reliably on Dolphin Emulator.

This code allows you to set a custom region ID when connecting online. The code only effects the Region ID when connecting online, thus there will be no prompt from the game to reset the data save due to a region ID change.

NTSC-U
C200AFC4 00000002
3800000X 90030084
60000000 00000000

PAL
C200B064 00000002
3800000X 90030084
60000000 00000000

NTSC-J
C200AF88 00000002
3800000X 90030084
60000000 00000000

NTSC-K
C200B110 00000002
3800000X 90030084
60000000 00000000

X = Desired Region ID

X Values:
0 = Japan
1 = Americas
2 = Europe
3 = Aus/NZ
4 = Taiwan
5 = S. Korea
6 = China

Source:
li r0, X #Load X value (Region ID number) into Register 0
stw r0, 0x0084 (r3) #Store the value of Register 0 at the address of Register 3 plus an offset of 0x0084

#Default instruction of lwz r0, 0x0084 (r3) not needed

Code creator: Vega

Print this item

  Millisecond Display Cycler [Dea]
Posted by: Vega - 12-25-2018, 07:02 PM - Forum: Visual & Sound Effects - No Replies

Millisecond Display Cycler [Dea]

This code is used as a supplementation to another code to display a specific value at a desired memory address (designated by the XXXXXXXX value). Simply configure your other ASM to store your desired halfword or word value to the desired memory address. This code will display that value in decimal form cycling thru the entire value and repeating nonstop. There will be two seconds of '000' shown after your read halfword/word to help you identify the beginning of the read value if there are duplicate numbers shown.

Please note this code makes use of the following addresses:
0x81450000 thru 0x81450004
Your Memory address of XXXXXXXX thru XXXXXXXX + 6.

Z Values (for making the code show two seconds of '000' after your display halfword/word):
4 = For Halfwords (2 bytes/2-seconds of display data)
6 = For Words (4 bytes/4-seconds of displayed data)

XXXX XXXX = Memory address for timer to read from

Example Z/X values:
You have a word value and want it stored at 0x800015A0.
Z would equal 6.
XXXX XXXX would equal 8000 15A0

Final note: This code makes use to mem81. If you are displaying data on the Timer in TT mode, restarting the TT doesn't clear mem81, thus the code won't function properly after a TT restart. You must go to something like the character select screen to clear mem81. Just an FYI.

NTSC-U
C25310A0 00000008
3CA08145 81650000
89850004 7C1C5800
4182000C 93850000
398C0001 2C0C000Z
40A20008 39800000
99850004 3D60XXXX
398CXXXX 7CAC58AE
60000000 00000000

PAL
C2535BE8 00000008
3CA08145 81650000
89850004 7C1C5800
4182000C 93850000
398C0001 2C0C000Z
40A20008 39800000
99850004 3D60XXXX
398CXXXX 7CAC58AE
60000000 00000000

NTSC-J
C2535568 00000008
3CA08145 81650000
89850004 7C1C5800
4182000C 93850000
398C0001 2C0C000Z
40A20008 39800000
99850004 3D60XXXX
398CXXXX 7CAC58AE
60000000 00000000

NTSC-K
C2523C40 00000008
3CA08145 81650000
89850004 7C1C5800
4182000C 93850000
398C0001 2C0C000Z
40A20008 39800000
99850004 3D60XXXX
398CXXXX 7CAC58AE
60000000 00000000



Source (Using 0x6 for Z value for reading a word of data with 2 bytes/seconds of zeros afterwards, using 0x800015A0 for X values):
#~~~~~~~~~~~~~~~~#
# START ASSEMBLY #
#~~~~~~~~~~~~~~~~#

#

#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# r5 = Real Milliseconds Value #
#    r28 = Seconds Value      #
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#

#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# 0x800015A0 thru 0x800015A3 = Where Byte/Halfword/Word Resides At For Displaying On Timer #
#                              0x81450000 = Seconds Tracker                              #
#                  0x81450004 = Offset Value for final instruciton  (Byte)                #
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#

#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
#                                            First Notes:                                          #
# 0x81450000 thru 0x81450004 are in Dynamic Memory, it gets reseted after every race/restart/event. #
#  Therefore, we don't need to set the values to 0 at the beginning of the code nor do any sort...  #
#                          ..of checks to see if we set the initial values already                #
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#

#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# Load Seconds Tracker Value and Offset Value #
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#

lis r5, 0x8145 #Set upper 16 bits of r5 to 0x8145, lower 16 bits are cleared
lwz r11, 0x0 (r5) #Load word (seconds tracker) from 0x81450000; always zero at start of race before code address is executed
lbz r12, 0x0004 (r5) #Load byte (offset value) from 0x81450004; always zero at start of race before code address is executed

#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# Check If One Second Has Elapsed In Game #
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#

cmpw r28, r11 #Compare value in r28 (updated seconds) to value in r11 (stored seconds; seconds tracker)
beq- checkfor_rescroll #If equal, we don't need to update the seconds tracker, jump to checkfor_rescroll label

#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# Store New Seconds Value to 0x81450000 #
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#

stw r28, 0x0 (r5) #If not equal, we need to update the seconds tracker, store new updated seconds value to 0x81450000

#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# Calculate (Update) New Offset Value #
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#

addi r12, r12, 1 #Since one second (difference occurred) has elapsed since last offset update, we need to increase the offset value by 1.

#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
#                    checkfor_rescroll Label                      #
# NOTE: Once the timer reads the value from mem address 0x800015A6 #
# We want it to re-scroll beginning at initial address 0x800015A0  #
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#

checkfor_rescroll:
cmpwi r12, 0x6 #Compare calculated/updated offset value to 0x6
bne+ no_rescroll #If not equal to 0x6, we know to not rescroll yet (reset offset to 0), jump to no_rescroll label

#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# Re-Scroll the Millisecond Display; Reset Offset Value #
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#

li r12, 0x0 #If equal to 6, then we need to reset the offset value. Offset value of 0x6 is too high as we only want two bytes of zero to scroll after the word of data. Reset Offset Value.

#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
#      no_rescroll Label; set r5 to finalized value; restore r6's original value          #
# NOTE: No need for the exact Default ASM. We are overwriting what is being loaded into r5 #
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#

no_rescroll:
stb r12, 0x0004 (r5) #Store byte of r12 (finalized offset value) to 0x81450004

lis r11, 0x8000 #Set 1st half address for desired read data
addi r12, r12, 0x15A0 #Add 15A0 to r12, final result is offset value used for middle register in lbzx

lbzx r5, r12, r11 #Load desired read value (can be anywhere from 0x800015A0 thru 0x800015A6 depending on r12's result from the addi instruction one step earlier)

#

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



Code creator: Dea
Code credits: Vega (completely overhauled plus shortened entire source); Mdmwii (address founder)

Print this item

Exclamation Disclaimer. READ THIS!
Posted by: Vega - 12-24-2018, 08:38 PM - Forum: Welcome to MarioKartWii.com! - No Replies

Disclaimer

This website (MarioKartWii.com) is not affiliated, associated, authorized, endorsed by, or in any way officially connected with the Nintendo Co., Ltd., or any of its subsidiaries or its affiliates. The official Nintendo website can be found at https://www.nintendo.com. All names, logos, images, and brands are property of their respective owners.

Any actions and or activities related to the material contained within this Website (MarioKartWii.com) is solely your responsibility. The misuse of the information in this website can result in criminal charges brought against the persons in question. The authors of MariokartWii.com will not be held responsible in the event any criminal charges be brought against any individuals misusing the information in this website to break the law.

This site contains materials that can be potentially damaging or dangerous. If you do not fully understand please LEAVE THIS WEBSITE. Also be sure to check laws in your province/country before accessing MarioKartWii.com.

All content posted on MarioKartWii.com are for educational and research purposes only.

It may occur that the content of MarioKartWii.com is incomplete, outdated and/or incorrect. Therefore the content of MarioKartWii.com is provided to you without any form of guarantee or liability on its accuracy.

Do not attempt to violate the law with anything contained here. Administrators of this server, the authors of this material, or anyone else affiliated in any way, are not going to accept responsibility for your actions. Neither the creator nor MarioKartWii.com are responsible for the comments posted on this website.

Any linked sites are not under the control of the authors or MarioKartWii.com, thus its authors are not responsible for the contents of any linked site or any link contained in a linked site, or any changes or updates to such sites.

The inclusion of any link does not imply endorsement by MarioKartWii.com.

MarioKartWii.com does not condone crime to be committed through use of its content.

Print this item