Author Topic: RTC Question???  (Read 5559 times)

0 Members and 1 Guest are viewing this topic.

Offline Shadow666

  • Hero Member
  • *****
  • Posts: 503
  • Karma: +15/-0
    • View Profile
RTC Question???
« on: September 03, 2016, 09:23 AM »
@KRIKzz In GBAOS v1.10 you have "3)Rom setting option: individual save and rtc settings for each ROM." does this mean the Pokemon game R/S/E will not mess up each others clock now and use ther own or is that still a problem being looked into?

Offline KRIKzz

  • Administrator
  • Hero Member
  • *****
  • Posts: 3383
  • Karma: +510/-2
    • View Profile
Re: RTC Question???
« Reply #1 on: September 03, 2016, 11:17 AM »
@KRIKzz In GBAOS v1.10 you have "3)Rom setting option: individual save and rtc settings for each ROM." does this mean the Pokemon game R/S/E will not mess up each others clock now and use ther own or is that still a problem being looked into?
This option allow to disable or enable RTC for certain game, nothing else

Offline Shadow666

  • Hero Member
  • *****
  • Posts: 503
  • Karma: +15/-0
    • View Profile
Re: RTC Question???
« Reply #2 on: September 03, 2016, 11:29 AM »
@KRIKzz In GBAOS v1.10 you have "3)Rom setting option: individual save and rtc settings for each ROM." does this mean the Pokemon game R/S/E will not mess up each others clock now and use ther own or is that still a problem being looked into?
This option allow to disable or enable RTC for certain game, nothing else

Oh ok hope you can find the solution to the RTC reset problem this problem has never been fixed in any gba flashcart before for example M3 Perfect series of flashcarts that have RTC

Thanks

Offline KRIKzz

  • Administrator
  • Hero Member
  • *****
  • Posts: 3383
  • Karma: +510/-2
    • View Profile
Re: RTC Question???
« Reply #3 on: September 03, 2016, 11:46 AM »
Solution required dual rtc, this is the only way which i can see at this moment. One rtc for games, and another for system time, which can be used for restoring time on game rtc. There is no other ways to keep own time for each game.
Of course i can save and load game time when you change the game, but at this case time will freeze on point when you change the game
« Last Edit: September 03, 2016, 11:50 AM by KRIKzz »

Offline bardiir

  • Newbie
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Re: RTC Question???
« Reply #4 on: October 21, 2016, 11:46 AM »
Solution required dual rtc, this is the only way which i can see at this moment. One rtc for games, and another for system time, which can be used for restoring time on game rtc. There is no other ways to keep own time for each game.
Of course i can save and load game time when you change the game, but at this case time will freeze on point when you change the game

Couldn't you do a virtual RTC? You save the current state of the RTC as well as the offsets for a game. So if a user loads a game you would write a temp file with the current timestamp. Also each game has a offset to the "virtual time from the temp file" and a "last time" which is the state of the virtual system time the last time the game saved.
Then you load the game time for a specific game, the game is played and once the user is back from the game you restore the saved timestamp and save the new game time as well as it's new offset to the system time. This would just halt the RTC for all games except the active one while another game plays but not while the system is offline.

Or, if the RTC read/writes are going through the FPGA you could potentially do this on the fly, just have the system RTC ticking away and read/write the offset for a game each time it reads/writes the RTC.
« Last Edit: October 21, 2016, 12:10 PM by bardiir »