Kodewerx https://www.kodewerx.org/forum/ |
|
[Help] Making a Button Switch code for DS https://www.kodewerx.org/forum/viewtopic.php?f=2&t=6255 |
Page 1 of 1 |
Author: | Cerepol [ Wed Oct 29, 2008 11:50 am ] |
Post subject: | [Help] Making a Button Switch code for DS |
Is there anyway to make a general code for getting say the L button to be mapped to the A button? If not what would be the best way to get it working for a specific game? |
Author: | HyperHacker [ Thu Oct 30, 2008 6:19 pm ] |
Post subject: | Re: [Help] Making a Button Switch code for DS |
If you're lucky the game copies the button state to memory; you can hook into the copy and twiddle bits to change what it thinks it's reading from the hardware. Otherwise you'd need to find all reads from the button state register that check for the A button, and change them to check for L instead. This would be better if you only want to change specific actions. On the DS, there are two button state registers; one for L/R/X/Y which for some reason is only readable on ARM7, and one for the others. So it's likely the game copies the L/R/X/Y state into shared memory where ARM9 can see it, but may not do the same for the other buttons. This copy may be done by the ARM7 itself (writing directly to memory instead of passing it to ARM9) by a routine in ARM7 work RAM; I'm not sure if AR can patch that. If not, you'd have to use the other method, or hack something up to patch the ARM7 binary another way. |
Page 1 of 1 | All times are UTC - 8 hours [ DST ] |
Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |