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

ARDS copy code, and conditionals
https://www.kodewerx.org/forum/viewtopic.php?f=11&t=5558
Page 1 of 1

Author:  kelvSYC [ Mon Apr 28, 2008 10:00 pm ]
Post subject:  ARDS copy code, and conditionals

I have a question regarding the ARDS copy code: suppose I want to make a "always full health code" - I'd copy the Max HP to current HP, right? So here's what I have (I'll use the first Pokémon's HP in Mystery Dungeon Time as an example):

Code:
D3000000 021ACC54
021ACC52 00000002
D2000000 00000000


Is that correct?

Finally, can you nest the above in a conditional (for example, a button activator)? If so, how?

Author:  Hextator [ Tue Apr 29, 2008 8:21 am ]
Post subject: 

021ACC52 00000002

Wrong code type.

D3 sets the base address for the offset, and the address used in the second line becomes that offset because you used the word write code type.

You're effectively writing a word to the halfword-aligned-yet-unmapped-memory address 0x43598A6.

What you need to do is change the 0 in 021ACC52 to an "F", the value of the copy code type.

Since you already have a D2 line at the end of the code for clearing the base address, adding an activator is as easy as adding "94000130" in front of the D3 line, and ending the line with the value of the buttons you want to activate it.

9 is the 16 bit comparison code; the upper 16 bits of the value are a mask for which of the lower 16 bits are to be used in the comparison. 0 means they are used and 1 means they aren't. The lower 16 bits will all be 0, because the flags for which keys are pressed are cleared when the key is in use and 1 when they are not. The values of the masks for each key can be found in the EnHacklopedia:

Value Button
GBA Activator Values
FFFE A
FFFD B
FFFB Select
FFF7 Start
FFEF Right
FFDF Left
FFBF Up
FF7F Down
FEFF Right Trigger
FDFF Left Trigger

Alternatively, you can use the following buttons with the code 927FFFA8:

NDS Activator Values
FBFF X
F7FF Y
DFFF Debug Button
7FFF NDS Not Folded

You can use a combination of both by having two 9 code type lines instead of just one prior to the code.

Author:  iou [ Mon Jun 02, 2008 2:09 pm ]
Post subject:  Re: ARDS copy code, and conditionals

how do you get pokesave please tell me

Author:  iou [ Mon Jun 02, 2008 2:10 pm ]
Post subject:  Re: ARDS copy code, and conditionals

can you please tell me were pokesav is

Author:  Parasyte [ Mon Jun 02, 2008 7:33 pm ]
Post subject:  Re: ARDS copy code, and conditionals

http://justfuckinggoogleit.com/

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