RetroPie forum home
    • Recent
    • Tags
    • Popular
    • Home
    • Docs
    • Register
    • Login

    Real-time clock with lr-gambatte?

    Scheduled Pinned Locked Moved General Discussion and Gaming
    5 Posts 5 Posters 6.3k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • M
      moi403
      last edited by

      So, my question is about a certain file created by most gbc emulators, the rtc file.
      What it does is readjust the game clock to the system clock. It works flawlessly for just about every android emulator.
      Not on the retropie one, though.

      I've been looking just about everywhere, but even though the rtc (real time clock) file is generated by lr-gambatte, it doesn't seem to read it.
      That means it won't recalculate the time spent while the raspberry pi was off or running a different game, causing the game time to constantly desynchronize.

      I know this is only useful for real-time-based games (Pokémon GSC being the most obvious examples), but if someone could point me towards the direction of a solution or alternative, I would deeply appreciate that.

      Thanks in advance!

      glennlakeG 1 Reply Last reply Reply Quote 1
      • A
        Ajakson
        last edited by

        A little late but here goes...

        I was just looking into this, too!

        Been playing through Pokemon Crystal for GBC on RetroPie. I was very confused how the game clock is managed by RetroArch. It desyncs on shutdown/reboot basically, but seems to work great in game.

        I found that manually editing the system clock while I had the game running successfully changed in-game time.

        For example:
        I wanted to participate in the Bug Catching Contest which Crystal only allows on Tues, Thurs, and Sat. But my in-game time resets to Sunday for no reason.

        I used ssh to remote into my pi and changed the time while my game was running. This is the command.

        sudo date -s "172800 seconds"

        This moved my in-game forward 2 days immediately. Since it was then Tuesday, I could enter the contest.

        YMMV.
        -Ajakson

        1 Reply Last reply Reply Quote 0
        • edmaul69E
          edmaul69
          last edited by edmaul69

          Would adding a rtc (real time clock) to the pi fix it? Since it keeps time even when the pi is off

          1 Reply Last reply Reply Quote 2
          • markyh444M
            markyh444
            last edited by

            You could try this: https://thepihut.com/blogs/raspberry-pi-tutorials/17209332-adding-a-real-time-clock-to-your-raspberry-pi

            Seems inexpensive enough.

            Retropie in a NES - Pi 3 with Mausberry circuit shutdown switch wired to buttons and 8bitdo NesPro30 controller
            Retropie in a Saturn Controller - Pi Zero, GPIO controls using DB9 driver
            Retropie in a PSX - Pi3
            https://markyh444.wordpress.com

            1 Reply Last reply Reply Quote 2
            • glennlakeG
              glennlake @moi403
              last edited by

              @moi403 If you are connected to the internet you can try this. First you need to install "rdate". Then place this line in file /etc/rc.local. "sudo rdate -n -4 time-a.nist.gov &" just before the "exit 0" line. Sometimes it will take a few times to connect. If you have trouble connecting you can go to this site and try other time servers. "http://tf.nist.gov/tf-cgi/servers.cgi" I hope this works for you. At any rate it's free!

              1 Reply Last reply Reply Quote 3
              • First post
                Last post

              Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.

              Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.