UnclePunch
Smash Ace
- Joined
- Nov 9, 2014
- Messages
- 673
You can have MCM manually change the hex in the start.dol by dissecting the gecko code.I don't know how much you know about MCM, but if I wanted to convert a gecko code into a format that MCM can read, would I need the assembly code too?
Codes that start with 04 are just static overwrites. The process for these codes consist of taking the 04, replacing it with 80, putting that address into MCM's memory offset -> dol offset tool, and placing that address in the mod construction under static overwrite > offset.
Codes that start with C2 are injection codes, meaning these run additional codelines where one codeline was. It does this by branching off to free space in the .dol, running its code, and returning to the line after the injection point (effectively adding code to that spot). The process for converting these to dol mods consist of taking the C2, replacing it with 80, putting that address into MCM's memory offset -> dol offset tool, and placing that address in the mod construction under injection mod > offset. Then take the remaining lines (excluding the 000000XX to the right of the C2 line) and paste that in the injection code area.
Yes the gecko codehandler (or engine as you referred to it as) will run with the game and it will place gecko codes into the start.dol every frame (most codes only need to be placed once, but this is just the nature of how the codehandler works).Also, you said that MCM inserts the gecko codehandler into the iso...does this mean that the game is able to run the gecko 'engine' in-game on its own, allowing for any gecko code to be run independently, or does it mean that the codes themselves are put into some format that the game reads as if it was in the game's code originally?
Note that MCM Static Overwrites and Injection Mods are doing what the codehandler is doing outside of the game. MCM changes the code and saves the .dol when you save it on the program. Using the code handler is technically modifying a (mostly) vanilla dol during runtime.
Yes the PPC Processor is godlike, I pray to it every morning.I think my biggest question is how a game can actually run a code. Is the PowerPC processor really able to do thousands of computations every frame?
I will have to briefly explain how the game engine functions to answer this question. Every in-game frame, each player has about 4 big functions that run. These functions are unique to each action state and are a big part of how the move functions. I'm talking about the move logic functions you may have seen in Crazy Hand. The big ones are IASA interrupt function (change action state with button inputs), animation interrupt function (change action state when an action state ends naturally), collision interrupt (change action state when interacting with the environment (ground to air, air to ground, wall interactions), and physics function.I understand how it can execute code through moving and manipulating values, but how is the processor able to know when something happens in-game (like a character landing, for example)? When it knows that a memory value changes, does it know from checking to see if it changed, or is it 'told' by memory? Is the game constantly scanning every single value all the time to determine when something changes? This is a concept that I don't understand. Sorry if I am not making much sense.
What you're asking about pertains to the collision function. I'll use the aerial Falcon Punch collision function as an example. This collision function is unique to aerial Falcon Punch and runs every frame Falcon is in this state. It's main purpose is to determine if Falcon is still in the air by calling other in-game functions that check for this. These functions return 0 for still airborne, and 1 for touching the ground. When the collision function see's that it returned a 1, it enters Falcon into the grounded Falcon Punch action state. The grounded Falcon Punch has its own collision function that will run next frame. This function will check for if Falcon went from ground -> air and adjust his action state accordingly.
It may sound confusing and I'm sorry I can't explain it better at the moment but I hope this answered your question.
Last edited: