[Release] RTCChanger NDS

MegaBoyEXE Sep 22, 2019.

  1. MegaBoyEXE
    OP

    MegaBoyEXE GBAtemp Regular

    Member
    2
    Dec 27, 2015
    Brazil
    It's been a while that I have been searching for a tool that could change the NDS hardware RTC, without triggering the "anti-time travel" feature that blocks in-game time events for 24h (eg. Pokemon games), but never found one.
    So I decided to create one myself.
    I've used the "GBA rtcread" tool as base code for GUI, so if you used that tool before, you should be familiar with it.

    Just be advised that you are responsible to sync the "week day" value too when changing the Date.

    I was able to successfully do in-game events without penalties, like growing berries by changing time in increments of 4 hours, and saving again.

    This tool changes the RTC without modifying the "RTC Offset" data in the firmware, so games cannot detect time changes.

    Source code is included.

    Latest version: v1.2.0

    Download
    https://gbatemp.net/download/rtcchanger-nds.36158/
     
    Last edited by MegaBoyEXE, Sep 24, 2019
  2. DeadSkullzJr

    DeadSkullzJr Developer

    pip Developer
    7
    Sep 28, 2017
    United States
    Did a small update to the homebrew application. Also created an RTCChanger plugin icon for the SuperCard DSTWO.

    Changelog:

    v1.1.0 - September 22, 2019 (Updated by DeadSkullzJr)
    - Added a new homebrew icon
    - Added a new homebrew description
     

    Attached Files:

  3. MichiS97

    MichiS97 "Leftist snowflake milennial"

    Member
    9
    GBAtemp Patron
    MichiS97 is a Patron of GBAtemp and is helping us stay independent!

    Our Patreon
    Jun 14, 2011
    Germany
    Munich
    I tried to do this myself a few months ago but couldn't figure out how to actually do it. This is awesome, thank you!!

    EDIT: I just found a bug in the source code. Line 115 in the arm9 source code. The day is rolled over when it is set to 9 in a leap year in February when it should be rolled over at 29.
    Code:
    if((edit_datetime[_YEAR]%4==0 && edit_datetime[_DAY]==9)
    should be

    Code:
    if((edit_datetime[_YEAR]%4==0 && edit_datetime[_DAY]==29)
     
    Last edited by MichiS97, Sep 22, 2019
    alexander1970 likes this.
  4. MegaBoyEXE
    OP

    MegaBoyEXE GBAtemp Regular

    Member
    2
    Dec 27, 2015
    Brazil
    I saw your post when I was searching about.
    Just FYI, in case you wanna try other apps, the inter-CPU communication is done through a special hardware that arbitrates the buses with interruptions, so you pass messages with content or addresses to data that will become visible to the other side. That other side then should pool the channels checking for incoming data, then you can process them.

    There's a template in libnds named "combined" that generates both ARM7 and ARM9 binary from code, so you can modify as you please, and also check the FIFO API from libnds to choose the appropriate way to share your data.

    This is probably a bug that came from rtcread code as I didn't checked for logic, it always worked for me before.
    I will see if I can fix the rtcread tool too (if it actually compiles with current devkitPRO versions), and post the updated tools here too.
     
    Last edited by MegaBoyEXE, Sep 22, 2019
    zfreeman and alexander1970 like this.
  5. MichiS97

    MichiS97 "Leftist snowflake milennial"

    Member
    9
    GBAtemp Patron
    MichiS97 is a Patron of GBAtemp and is helping us stay independent!

    Our Patreon
    Jun 14, 2011
    Germany
    Munich
    No no, the bug is in your source file :) Just look at the line I quoted in my post
     
    alexander1970 likes this.
  6. MegaBoyEXE
    OP

    MegaBoyEXE GBAtemp Regular

    Member
    2
    Dec 27, 2015
    Brazil
    I know, I "imported" the bug from the other tool code that had the nice clock console GUI.
    As I never changed the clock in Feb 29, never found it on the other tool, which I used A LOT for changing the GBA cart RTC.

    Edit: Bug was fixed, and new version is available in first post.
     
    Last edited by MegaBoyEXE, Sep 23, 2019
    MichiS97 likes this.
  7. DeadSkullzJr

    DeadSkullzJr Developer

    pip Developer
    7
    Sep 28, 2017
    United States
    Another update!

    Changelog:
    v1.2.0 - September 23, 2019 (Updated by DeadSkullzJr)
    - Tweaked some of the text
    - Added the homebrew application version number to the title in the menu.
     

    Attached Files:

    MegaBoyEXE and zfreeman like this.
  8. MegaBoyEXE
    OP

    MegaBoyEXE GBAtemp Regular

    Member
    2
    Dec 27, 2015
    Brazil
    Thx! I uploaded this version to the tools section, and edited first post to point to the download page.
     
  9. DeadSkullzJr

    DeadSkullzJr Developer

    pip Developer
    7
    Sep 28, 2017
    United States
    No problem, I do have a request though, I’m not entirely sure what I was doing wrong yesterday, but I was trying to swap the month and the day around. It worked to an extent, however it seems I either missed something or edited the wrong thing (no clue honestly). So I’m going to leave that part up to you. Seeing the day in front of the month like that just feels weird to me, hence why I tried to change it. Also you should consider making the time more “real time” when editing the time as the seconds don’t go up at all while editing, thus makes it easy to mess up the time when saving a new date.
     
  10. MegaBoyEXE
    OP

    MegaBoyEXE GBAtemp Regular

    Member
    2
    Dec 27, 2015
    Brazil
    Keeping time in sync while editing only the Date is not worth. Whenever you edit the RTC, you must set the entire register file at once, so it will always have a minor de-sync of a few seconds.

    It will create too much sync issues, like time rollover when 59 minutes, and even day rollover, then month, then year.
    The purpose was to create a very simple tool: the user is entirely responsible for setting the complete configuration.
    Anything above that I would prefer someone else take ownership and develop a more robust app.

    Now about swapping Day and Month, it will only benefits English culture Countries while about all the rest of the world become affected.
    I can propose changing the display of date to the more universal ISO 8601 format (YYYY-MM-DD).
     
  11. DeadSkullzJr

    DeadSkullzJr Developer

    pip Developer
    7
    Sep 28, 2017
    United States
    Leave it as is then, it works good already, I guess don’t break what isn’t broken am I right lol?
     
    MegaBoyEXE likes this.
Quick Reply
Draft saved Draft deleted
Loading...