Kodewerx
https://www.kodewerx.org/forum/

NDS AR Code Type Information
https://www.kodewerx.org/forum/viewtopic.php?f=11&t=98
Page 2 of 6

Author:  Parasyte [ Mon Feb 12, 2007 11:01 am ]
Post subject: 

Bits 12 and 14 (0x1000 and 0x4000, respectively) are unused. I am not certain why Nintendo decided to skip those. Perhaps it's due to the way they setup the hardware and/or they had additional switches configured in the early design stages.

Author:  James0x57 [ Mon Feb 12, 2007 11:25 am ]
Post subject: 

What about the Mic? Do you think that it could send out like a High Pitch and Low Pitch flag with 0x1000 and 0x4000?

Author:  Baphomet [ Mon Feb 12, 2007 11:58 am ]
Post subject: 

That be nice if we could use the mic as an activator.

Author:  Kyle [ Mon Feb 12, 2007 3:10 pm ]
Post subject: 

I could just see the code potential in that. :)

"Scream for full health"

Author:  James0x57 [ Mon Feb 12, 2007 3:19 pm ]
Post subject: 

Kyle wrote:
"Scream for full health"
LMAO :lol:

Author:  Dualscreenman [ Mon Feb 12, 2007 4:05 pm ]
Post subject: 

If you sneak in a "voice chat always on" code into the "scream for health" code....

You will have abundance in lulz!

Author:  jawatlynn1292 [ Mon Feb 12, 2007 4:45 pm ]
Post subject: 

Parasyte wrote:
Here are some universal Activator codes which will work on all games:

Activator 1 (GBA buttons):
94000130 xxxx0000

For xxxx:
FFFE: A
FFFD: B
FFFB: Select
FFF7: Start
FFEF: Right
FFDF: Left
FFBF: Up
FF7F: Down
FEFF: R
FDFF: L


Activator 2 (NDS buttons):
927FFFA8 xxxx0000

For xxxx:
FBFF: X
F7FF: Y
DFFF: Debug Button (not available on commercial NDS)
7FFF: NDS not folded


To combine one or more buttons together, use bitwise AND:

(A & B) = (FFFE & FFFD) = FFFC

I dont understand how to combine buttons together. could you please explain?

Author:  dlong [ Mon Feb 12, 2007 6:22 pm ]
Post subject: 

Quote:
To combine one or more buttons together, use bitwise AND


Seems clear to me!

Author:  jawatlynn1292 [ Mon Feb 12, 2007 6:31 pm ]
Post subject: 

How do you use bitwise AND with hex

Author:  Sniping Ferret [ Mon Feb 12, 2007 7:56 pm ]
Post subject: 

we figured it out, we don't need help any more

Author:  Parasyte [ Tue Feb 13, 2007 2:32 am ]
Post subject: 

Windows Calculator in Scientific Mode and/or learn your bitwise arithmetic.

The mic is not on the button registers, nor is the touch screen.

Author:  kickenchicken57 [ Tue Feb 13, 2007 5:52 am ]
Post subject: 

jawatlynn1292 wrote:
How do you use bitwise AND with hex


Just use Baphomet's or My programs to create a joker code for you

as for hex

http://www.lyzrdstomp.com/binary/hex1.html

Author:  jawatlynn1292 [ Tue Feb 13, 2007 3:18 pm ]
Post subject: 

thx but i figured out bitwise AND finally

Author:  dexter0 [ Sat Feb 17, 2007 6:14 pm ]
Post subject: 

Any way to perform an 8-bit compare (==) other than padding the 16-bit if statement with 2 0s.

Author:  dlong [ Sat Feb 17, 2007 10:12 pm ]
Post subject: 

That won't work actually.

Example:

Addr Val
0000 ff
0001 00

8-bit compare to 0x00 will return true, but if you do a 16-bit compare with the 0-pad (0x0000), it will return false.

Author:  Parasyte [ Sat Feb 17, 2007 10:19 pm ]
Post subject: 

Yes, 8-bit conditions are supported with the 'mask' portion of the value. Use 0xFF00 as your mask, as it will mask out the upper byte, or use 0x00FF as the mask to mask out the lower byte. (Remember, the mask is inverse. Logically it will be ~0xFF00 or ~0x00FF) And you must keep the address aligned to 16-bits, or you will have some weird shifting problems with the data.

Author:  dexter0 [ Sun Feb 18, 2007 6:22 pm ]
Post subject: 

Thank you again Parasyte.

Author:  kickenchicken57 [ Thu Feb 22, 2007 6:46 am ]
Post subject: 

kenobi wrote:
Type D8 : 8-bits incrementive write of the data register (strb).
D8000000 XXXXXXXX : writes the 'Dx data' byte to [XXXXXXXX+offset], and
increments the offset by 1.


can you hack the d6~d8 codetypes so that they do not modify the offset?

Author:  kenobi [ Thu Feb 22, 2007 11:31 am ]
Post subject: 

kickenchicken57 wrote:
kenobi wrote:
Type D8 : 8-bits incrementive write of the data register (strb).
D8000000 XXXXXXXX : writes the 'Dx data' byte to [XXXXXXXX+offset], and
increments the offset by 1.


can you hack the d6~d8 codetypes so that they do not modify the offset?


I could, but it would be 'easier' (and compatible with all AR versions) if you used the DC code to add 0xFFFFFFFF (0xFFFFFFFE, 0xFFFFFFFC) to the offset right after the D8 (D7, D6) codes type.

Author:  kickenchicken57 [ Thu Feb 22, 2007 12:24 pm ]
Post subject: 

ok, thats what I have been doing. I Also have a problem with a code I am trying. I know I have the right address because I have modified it with one of the constant write codes. here is my code so far:
Code:
023FE4D8 0A000003 - DB Code Fix
023FE424 E1833004  - D4 code executes an 'ORR'
C0000000 00000032 - loop 50 times
DB000000 22188479 - load the ammo into the data register
D4000000 00000007 - max the ammo out
D8000000 22188479 - write data back into address and increment offset by 1
DC000000 0000000D - Add 13 to the offset for a total of 14 each loop
D2000000 00000000 - end and clear loop counter and data register
023FE424 E0833004 - Set D4 back to 'ADD'

The lowest 3 bits of the value at 22188479 hold the ammo. The upper bits hold some status flags and info that CAN NOT be written to without affecting the game play. If I ORR the value with 0x7 (111b) then the lowest 3 bits will always be on and ammo will be maxed out. there are 50 units so I loop 50 times to get them all (I have also tried this without a loop on one single unit with no luck). I applied the DB code fix and loaded the value into the data register ORRed it and write it back. The next unit's data is 0xE (14) away. The DB increments the offset by one and then I add 0xD (13) to the offset to get a total of 0xE (14).

Is there a flaw in my logic? or is there a flaw in the way I set up my code? When I run the game with this code, absolutely nothing happens to my ammo. Its like the 'Dx data' is not getting written back into the address. It also causes some black lines across the screen :x

Author:  kenobi [ Thu Feb 22, 2007 2:34 pm ]
Post subject: 

Just for info, what game is that code for ?

Edit :
Also, you shouldn't loop 50 times, but 49. The number in the C code data is the number of time to repeat.

For exemple 0x00000000 means no repeat (it doesn't mean 'skip codes', so the codes are still executed once).
0x00000031 (=49) will mean : execute the code once, then repeat the codes 49 times, so in the end the codes will be executed 50 time.

(But I doubt this is the actual problem that makes your code not work properly)

Edit 2 :
Erm... That 22188479 address seems quite wrong... I guess it should be 02188479 ?

Author:  Parasyte [ Thu Feb 22, 2007 3:03 pm ]
Post subject: 

Yes. I find that people are getting confused quite a lot about the code types being a part of the address.

Code:
023FE4D8 0A000003 - DB Code Fix
023FE424 E1833004 - D4 code executes an 'ORR'
C0000000 00000031 - loop 50 times
DB000000 02188479 - load the ammo into the data register
D4000000 00000007 - max the ammo out
D8000000 02188479 - write data back into address and increment offset by 1
DC000000 0000000D - Add 13 to the offset for a total of 14 each loop
D2000000 00000000 - end and clear loop counter and data register
023FE424 E0833004 - Set D4 back to 'ADD'

Author:  kenobi [ Thu Feb 22, 2007 3:36 pm ]
Post subject: 

Also, be aware that one thing that still could prevent the codes using the hacks I made from working properly would be the game having a 'custom' (m) code. As I don't know what game you're using, I can't verify that. But a 'custom' (m) code should (would) mean that the code handler moved from its default place, hence the hacks I made won't work (as they are patching the 'default' location of the code handler, which is used when no (m) code is entered).

As we speak I still haven't gotten what the values of the custom (m) code do (even if I tried more than once...), so I don't know where the code handler is located when a custom (m) code is used. But I'll surely get more infos about that once I'll have the trainer toolkit in my hands !

And, well, even if I tested my hacks, their are still chances that they won't work properly for every cases. I recall having tried the ORR code on Parasyte's universal activator 2 address, and I didn't get the expected results (it was like the ORR hack wasn't applied, so the D4 code type was still using ADD), but - shame on me - I didn't bothered checking what was the problem back then :/... I might try some new tests soon to verify everything is working as expected.

Author:  kickenchicken57 [ Thu Feb 22, 2007 9:16 pm ]
Post subject: 

Awesome, It wasn't that I meant to add the code 'type' into the code, I just copy pasted and plain forgot about the codetype (can you tell I am a true programmer at heart?). I 100% guarantee that is most likely the problem. There is no M code and this is for advance wars ds. Will post an update if thats the problem. also, thanks kenobi for the heads up on the loop amount too.

EDIT: Fixed the problem, BUT I still get the black lines across the screen so I'll try putting it in a joker code :?

Author:  Parasyte [ Thu Feb 22, 2007 9:56 pm ]
Post subject: 

Anything that screws with the screen is typically the code handler taking too long to finish its job.

And your signature is HUEG LIEK XBOX. It is eating my screen. Fix it!

Author:  kickenchicken57 [ Thu Feb 22, 2007 10:08 pm ]
Post subject: 

Fixed the code by adding a joker so it only glitches when it's used. Also fixed the sig. Z3R0 made me one, then the other shortly after and I couldn't see it go to waste as he is my Bro :| was big though...

Author:  kenobi [ Thu Feb 22, 2007 10:20 pm ]
Post subject: 

Good to hear the code worked.
About the black lines, you might want to make a custom asm routine to make the job, it'll take way less cpu time and could fix the problem...

Author:  kickenchicken57 [ Thu Feb 22, 2007 10:31 pm ]
Post subject: 

Would you mind sending me an AIM or ICQ or IRC via PM for discussion about things like these later as to not clog the forums? While my questions do pertain to the 'code types' I don't think it belongs here and since you and para are usually the only ones able to answer these types of questions it is probably better to do so over IM than create a new thread or clog up this one.

About the ASM routine, I don't know how to find a free area to place it. care to explain?

Author:  lemmayoshi [ Fri Feb 23, 2007 7:14 am ]
Post subject: 

irc://irc.ashlandpc.com/#kodewerx

Author:  kenobi [ Fri Feb 23, 2007 10:15 am ]
Post subject: 

I honestly think this thread is a good place to discuss about AR codes creation/problems. There are no clogging or whatever, as any inportant information I'll add will be updated in the very first post. Also I'm always reachable using PMs if you prefer it that way.

Now, no need for free space for the asm routine, just use the hack #4 I made (one of the listed advantages of this hack is "- no need to find free space to store your asm routine."). If you need a step by step, I can provide it.

Page 2 of 6 All times are UTC - 8 hours [ DST ]
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/