Using Mem81 to Auto-Clear Data for ASM Codes (MKWii only)
#1
Using Mem81 to Auto-Clear Data for ASM Codes (MKWii only)

NOTE: This is an MKWii specific 'feature', this most likely won't work for other Wii games.
NOTE: For beginner ASM Coders that have already been utilizing the Exception Vector Area in previous codes.


Let's say you have an ASM code that originally stores data/values to the Exception Vector Area. You wanted these values to clear after every race. So you write another ASM code (that occurs only in between races) to zero/null out all the values.

Seems pretty silly to write another whole ASM code just to clear values. Instead of storing your data/values to the Exception Vector Area, you store them to Mem81. Mem81 auto-clears after every race/battle. The only time is doesn't auto clear is pressing restart in TT mode. I don't know the entire exact allowable region of Mem81 but here is a LARGE chunk used many various codes over time and I have seen no issues with any of those codes' functionality.

0x81400000 thru 0x81701000

As you can see this is a very large region of memory to have at your expense. And there you go, a great place to store values that need to be cleared per race. Happy coding!
Reply


Messages In This Thread
Using Mem81 to Auto-Clear Data for ASM Codes (MKWii only) - by Vega - 03-18-2019, 02:45 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)