Coding Questions and other Quandaries
#11
(12-07-2021, 12:57 PM)Hackwiz Wrote: So here is a code for Super Mario Galaxy.

This is how I'm deciphering it

Mario Size Modifier [brkirch]

F6000001 80208030 #Searches for the following (single) line of code (C03E0024 7C7D1B78) in ram address range 0x80200000 -> 80300000
C03E0024 7C7D1B78 #String searched for in ram address range 0x80200000 -> 80300000

I believe this takes care of this part:

That is all correct.

(12-07-2021, 12:57 PM)Hackwiz Wrote: Creates an if (so this code requires an endif), then searches for the NN lines of Z values between XXXX0000 and YYYY0000 (or, if XXXX is 8000, between 80003000 and YYYY0000).

Since the F6 Codetype creates an If Statement, you need an End-If. These are also known as Halfway or Final Terminators. Simply put, at the end of your F6 Code, just add this ---> E0000000 80008000


(12-07-2021, 12:57 PM)Hackwiz Wrote: As far as the rest of the operation goes, is this done automatically?

To prevent this code from causing game lag, it will only search the first time it is read by the code handler (the result is saved to the code and reused). If the Z values are found, set po to the starting address of the values (SSSSSSSS) and replace the F6 line with F60003NN SSSSSSSS.
If the Z values are not found, then set code execution status to false and replace the F6 line with F60001NN XXXXYYYY.

So I just need to write the appropriate gecko code utilizing the po afterwards and hope for the best?

That part is all done automatically by the Gecko Code Handler. If it finds your unique string, it will set a pointer that will always 'hook' to the contents of your source within the F6 Code itself. That's why the Final Terminator is needed at the end (E0000000 80008000). That will reset all the Code Handler's saved pointers so other codes in your GCT/Cheat-Manager will work correctly.

(12-07-2021, 12:57 PM)Hackwiz Wrote: Also, you said "executed immediate upon boot. So if the string isn't found right away, it simply won't hook."

Is it possible to use a button activator to force it to try re-hooking?
You could use a button activator, but that would be annoying in my opinion to have to remember to always press a button before reaching a certain part of the game. The re-hooking (automatically with codetypes alone) is possible according to a post I found on the old WiiRD forums. It's a series of various uncommonly used Gecko codetypes that could force attempts on retrying the F6 'Hook'. --> https://mariokartwii.com/showthread.php?tid=743

I am not familiar with some of the other codetypes in that thread as I never needed to learn them and the documentation of the Codetypes is not explained all that well. Star simply copy pasted the content of that thread from another web source. We've never bothered to update it to be user friendly as Assembly (C2 and C0 codetypes) can solve most code problems.

Referring back to the Retry F6 Hook, it might be better and more efficient to write that out in Assembly. Honestly, a lot of those Gecko Codetypes were created by the Gecko team because beginners back in the day simply refused to learn Assembly.

Well in the mean time, I guess I'll be making that F6 tutorial Tongue
Reply


Messages In This Thread
RE: Coding Questions and other Quandaries - by Vega - 12-07-2021, 02:45 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)