01-06-2020, 08:04 PM
Hiya.
So I’ve just started looking into making ASM based hacks today. I’ve found many of the tutorials on this forum very helpful. I’ve so far managed to make a couple of simple codes for the sake of learning what to do (although I’ve had experience with modding, NDS Action Replay codes and programming in the past, so it’s not completely new to me). I made a code to never increment the lap counter and a code to always force a specific item from a box.
Anyway, I started looking into what happens when the player runs into an item box, and I believe I’ve found various functions that get called when a box is run into. However, whenever I try to call any of the functions from my ASM (I’m using the CTR method specified in the “calling functions” tutorial), Dolphin throws some errors and either the game or dolphin itself crashes. I used my lap counter code as a base, so the idea is that whenever the start line is passed, the player should receive an item as if they had hit a box. The crash happens right as I go to pass the start line.
I understand that part of the reason for the crash is because certain registers need to be set properly, as they are used as function arguments. But some of the functions I found look as though they use registers that aren’t predictable (I can’t just set them to the same value each time). So how can I reliably call one of these functions? Or is it just not possible through these means, or am I horribly misunderstanding something? I also tried calling functions that appeared to have consistent arguments but still ran into crashes. I guess at this stage I’m probably punching above my weight and I should probably stick to simpler stuff, but I thought I’d ask anyway.
Thanks in advance.
So I’ve just started looking into making ASM based hacks today. I’ve found many of the tutorials on this forum very helpful. I’ve so far managed to make a couple of simple codes for the sake of learning what to do (although I’ve had experience with modding, NDS Action Replay codes and programming in the past, so it’s not completely new to me). I made a code to never increment the lap counter and a code to always force a specific item from a box.
Anyway, I started looking into what happens when the player runs into an item box, and I believe I’ve found various functions that get called when a box is run into. However, whenever I try to call any of the functions from my ASM (I’m using the CTR method specified in the “calling functions” tutorial), Dolphin throws some errors and either the game or dolphin itself crashes. I used my lap counter code as a base, so the idea is that whenever the start line is passed, the player should receive an item as if they had hit a box. The crash happens right as I go to pass the start line.
I understand that part of the reason for the crash is because certain registers need to be set properly, as they are used as function arguments. But some of the functions I found look as though they use registers that aren’t predictable (I can’t just set them to the same value each time). So how can I reliably call one of these functions? Or is it just not possible through these means, or am I horribly misunderstanding something? I also tried calling functions that appeared to have consistent arguments but still ran into crashes. I guess at this stage I’m probably punching above my weight and I should probably stick to simpler stuff, but I thought I’d ask anyway.
Thanks in advance.