Announcement

Collapse
No announcement yet.

[NDS] Execute an AR Code only once?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • MichiS97
    replied
    Originally posted by dlevere View Post
    You have to make a deactivator code.

    AR DS Code Basics Guide by Crazasta
    I can't because I don't have any initial value I could assign when the deactivator is pressed

    Leave a comment:


  • Pyriel
    replied
    That increments the offset value, not the data value, right? And unless you took control of setting the offset, all it would do is keep writing whatever is in Dx to the next address on subsequent passes.

    Is there a section of memory that isn't used by the games, that is accessible to the AR, and is initialized on start up? That's the easiest way to handle something like this. Check an address there for not-equal <value> and then at the tail end of your code, set the address to that value.

    Edit: Button activators may or may not work. The code engine usually executes several times in the duration of one button press, so checking that usually isn't sufficient to limit a code to one write.
    Last edited by Pyriel; 07-23-2015, 08:19:26 AM.

    Leave a comment:


  • dlevere
    replied
    You have to make a deactivator code.

    AR DS Code Basics Guide by Crazasta

    Leave a comment:


  • MichiS97
    replied
    Uhm yeah...that's the code I've been using to increment my value. But I've already got that working, my question is how I can keep the code from looping.
    An educated guess I've just come up with is to put a button activator at the last line of the code and give it a pretty much impossible button combo, like pressing every button there is
    Last edited by MichiS97; 07-23-2015, 07:52:52 AM.

    Leave a comment:


  • dlevere
    replied
    Type 0xD8
    8-Bit Incrementive Write
    D8000000 XXXXXXXX Writes the 'Dx data' byte to [XXXXXXXX+offset], and increments the offset by 1.

    Source

    Leave a comment:


  • MichiS97
    started a topic [NDS] Execute an AR Code only once?

    [NDS] Execute an AR Code only once?

    Hey, is there a way to make an AR Code for the Nintendo DS that is only executed once? I'm asking this because I'm making a code for Phantom Hourglass which would require me to increment a specific value by 1. I managed to pull that off already but the code is executed in a loop of course which makes my value go up the entire time the code is activated. Would it be possible to change some kind of execution state so that the code is only executed once?
    Last edited by MichiS97; 07-23-2015, 06:45:36 AM.
Working...
X