Kodewerx https://www.kodewerx.org/forum/ |
|
16 bit Constant OR codetype? https://www.kodewerx.org/forum/viewtopic.php?f=2&t=578 |
Page 1 of 1 |
Author: | DimondEdge [ Fri Jan 19, 2007 8:34 pm ] |
Post subject: | 16 bit Constant OR codetype? |
Which one is this (AR DS) I'm trying to "press" the debug button with it... |
Author: | kenobi [ Sat Jan 20, 2007 1:04 am ] |
Post subject: | |
edit : see below post |
Author: | tiger21820. [ Sat Jun 07, 2008 10:27 am ] |
Post subject: | Re: 16 bit Constant OR codetype? |
How do you use this code? |
Author: | HyperHacker [ Sat Jun 07, 2008 10:30 am ] |
Post subject: | Re: 16 bit Constant OR codetype? |
I doubt you'll get very far with that method, as the value is likely to be overwritten before it's read again. Worth a shot, but don't be too disappointed. |
Author: | kenobi [ Sun Jun 08, 2008 12:23 am ] |
Post subject: | Re: 16 bit Constant OR codetype? |
Indeed, this method I posted will get you nowhere because I don't set the debug button "On" but "Off"... (1=off, 0=on). The "good" way to do it should be : This will 'enable' the AND code type, use this code : 023FE424 E0033004 // Changes the D4 code type to AND then use the D4 code type : DA000000 027FFFA8 // Loads the 16 bits value at 0x027FFFA8 D4000000 0000DFFF // AND it with 0xDFFF D7000000 027FFFA8 // Writes back the value at 0x027FFFA8 or 927FFFA8 DFFF2000 // If (the 16bits value at 0x027FFFA8 AND 0x2000) == 0x2000 DA000000 027FFFA8 // Loads the 16 bits value at 0x027FFFA8 D4000000 0000E000// ADD 0xE000 to it (= substracts 0x2000 from it) D7000000 027FFFA8 // Writes back the value at 0x027FFFA8 D0000000 00000000 // Endif And yes, the value gets overwritten by the ARM9, but what is important is that the code is executed before the value is readen by the ARM7 (which could be always the case with the AR's hook?)... And btw this method (writing directly to 027FFFA8) is what I used for the 'enable debug vcr' code for DQIV. |
Author: | HyperHacker [ Sun Jun 08, 2008 11:57 pm ] |
Post subject: | Re: 16 bit Constant OR codetype? |
Hm, so some games do respond to that even when swiIsDebugger() returns false? Could be an interesting hack. Can AR patch ARM7 binaries? Those flags are only accessible by ARM7 and have to be copied somewhere for ARM9 to see, so there's probably only one read of the hardware register you could patch, and not have to worry about anything overwriting it. |
Author: | kenobi [ Mon Jun 09, 2008 11:14 am ] |
Post subject: | Re: 16 bit Constant OR codetype? |
Erm I've mixed up ARM9/ARM7. I meant the data is written by the AR just after ARM7 wrote it, and before ARM9 reads it. And yes, you can patch ARM7/ARM9 with the AR. Usually the NDS button data is copied at 0x027FFFA8, so setting a bpw on it (or a bpr on 0x04000136?) will be enough to find the ARM7 routine that writes it (and then being able to patch it). I wanted, some time ago, to test the Debug button code for each and every game, but it sounded like too much work... For DQ I just got lucky : I looked at the ARM9 pad read routine for some reasons while hacking it, and I saw there was a "test" for the debug button value in it. |
Author: | tiger21820. [ Mon Jun 09, 2008 4:24 pm ] |
Post subject: | Re: 16 bit Constant OR codetype? |
I still dont get it... Nothing happens... What do you have to do to press the debug button? I really want to do it... |
Author: | HyperHacker [ Tue Jun 10, 2008 12:31 am ] |
Post subject: | Re: 16 bit Constant OR codetype? |
Well, like I said, that method might not work in all games, and most games probably just won't respond to it. |
Page 1 of 1 | All times are UTC - 8 hours [ DST ] |
Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |