Author Topic: Negotiating the RTC on the GBA X5  (Read 679 times)

0 Members and 1 Guest are viewing this topic.

Offline Advert2020

  • Newbie
  • *
  • Posts: 6
  • Karma: +0/-0
    • View Profile
Negotiating the RTC on the GBA X5
« on: January 09, 2020, 08:09 PM »
I just got a GBA X5 after trying to decide between it, the EZ Flash Omega, and waiting for the X5 mini. I’m loving it so far and the minimal interface and low power consumption is a massive plus over the EZ.

The only thing that I am concerned about at the moment is the RTC clock. From what I’ve read, if you start more than one Pokemon game with a RTC it will reset it in the earlier games. What does this mean in practice, and what is the best work around? I’ve seen posts about it on here, but they are a bit lacking on the specifics.

Is it just that the in-game wall clock will be a bit off? Or will it mean that berries will stop growing and time based events will not work? If it’s the former it’s irrelevant to me, but the latter would be a real pain. I was wondering if starting a save file on each game in short succession might solve the problem?

Thanks for any advice!

Offline taiyotenko

  • Newbie
  • *
  • Posts: 9
  • Karma: +1/-0
    • View Profile
Re: Negotiating the RTC on the GBA X5
« Reply #1 on: January 10, 2020, 04:54 AM »
Pokémon Ruby / Sapphire / Emerald reset the clock at the beggining of a new game file and there's no way in game to change the clock outside of daylight savings.
One suggestion is to start a new game and set the clock to three minutes after midnight. After that, load a Boktai: The sun is in your hand game rom just to change the clock to the right time at the in-game options. The issue is that GBA Everdrive X5 uses the same time for all games and unfortunately you can't change it directly from the menu.
Another ideia is to import a save file generated on a emulator to your Everdrive and avoid the clock reset.

Offline Advert2020

  • Newbie
  • *
  • Posts: 6
  • Karma: +0/-0
    • View Profile
Re: Negotiating the RTC on the GBA X5
« Reply #2 on: January 10, 2020, 05:00 AM »
Thanks for the reply. But is that the only issue, that the in game clock is wrong? Or does it prevent berries from growing etc. like the berry glitch does? If it is just that the clock is a bit off, I’m not really concerned!

Offline Shadow666

  • Sr. Member
  • ****
  • Posts: 409
  • Karma: +13/-0
    • View Profile
Re: Negotiating the RTC on the GBA X5
« Reply #3 on: January 10, 2020, 06:47 AM »
Thanks for the reply. But is that the only issue, that the in game clock is wrong? Or does it prevent berries from growing etc. like the berry glitch does? If it is just that the clock is a bit off, I’m not really concerned!
the RTC is not isolated on the X5 it is isolated on Omega

Offline Advert2020

  • Newbie
  • *
  • Posts: 6
  • Karma: +0/-0
    • View Profile
Re: Negotiating the RTC on the GBA X5
« Reply #4 on: January 10, 2020, 09:50 AM »
Thanks, but I know the RTC isn’t isolated. The question I have is what effect this has on the games. (Please don’t say it resets the clock when a new game is started – I know it resets the clock, the question is what impact this has on the game being played). I guess this is kind of what I meant by the other answers being quite abstract. No one seems to know what actual impact the reset has on the games.

My specific worry is that it will generate something equivalent to the ‘Berry Glitch’ in Pokemon and stop berries from growing on trees etc. Is this the case? Or will it just mess up the clock in the bedroom of your house (if so who cares)?

Offline taiyotenko

  • Newbie
  • *
  • Posts: 9
  • Karma: +1/-0
    • View Profile
Re: Negotiating the RTC on the GBA X5
« Reply #5 on: January 11, 2020, 04:45 AM »
Thanks, but I know the RTC isn’t isolated. The question I have is what effect this has on the games. (Please don’t say it resets the clock when a new game is started – I know it resets the clock, the question is what impact this has on the game being played). I guess this is kind of what I meant by the other answers being quite abstract. No one seems to know what actual impact the reset has on the games.

My specific worry is that it will generate something equivalent to the ‘Berry Glitch’ in Pokemon and stop berries from growing on trees etc. Is this the case? Or will it just mess up the clock in the bedroom of your house (if so who cares)?

First, let's make one thing clear. Just Ruby and Sapphire have the berry glitch, Emerald doesn't. So, if you only play Emerald you will never have any kind of issues.

Even in the case you really would like to play R/S you will still have some options to avoid this kind of problem:
  • Easier option is to use a PC utility called GBATA to patch the roms before playing;
  • Alternatively, you can link to Pokémon FireRed, LeafGreen or Emerald to change the clock on your save;
  • Another option is to just use another game to change the clock to something after January 2, 2002 on your Everdrive x5 and the glitch won't affect your save. This must be done before 365 days pass after the begginning of your save file or it won't work. That was the option I mentioned on my first post.

Pokémon R/S/E count just the time passed, not the exact date like other GBA games with clocks, besides it does a clock reset at each new game file. In these games, you can't see the date, so it doesn't matter a lot. However, that can be a pain if you play multiple games with clocks and that's the real issue, not berry glitch.
Basically, in Pokémon R/S, the days are counted as numbers instead of a date and when the count reachs 366 days it will only add one more day to the counter after 365 days, so the events that depend on the day number will not function properly.

If you need more information, read this:
https://bulbapedia.bulbagarden.net/wiki/Berry_glitch

Offline nuu

  • Hero Member
  • *****
  • Posts: 1224
  • Karma: +58/-2
    • View Profile
Re: Negotiating the RTC on the GBA X5
« Reply #6 on: January 11, 2020, 04:29 PM »
I still don't see an answer to the question. The berry glitch seems to be an unrelated bug (I don't fully understand the explanation at bulbapedia but it seems it never happens again after January 2, 2002) which happens on real Ruby and Sapphire cartridges as well.

If the RTC is reset so that the time goes backwards the game will probably act either like no time has passed or act like a lot of time has passed depending on how it calculates the passed time (I'm guessing). But if the RTC can be set again in Boktai for example (preferably to real time or at least sometime after January 2, 2002 to fix the berry glitch as well), I think everything should be fixed. Player planted berries might wilt when doing this, but after that I think everything should work as it should? If a new save file is created on any other Pokemon game, the RTC will be reset again and it must be fixed using Boktai again. This is how the berry glitch is fixed using the patching methods mentioned so I can't imagine it doing anything bad to the save file.

So more concretely what happens if playing Pokemon after RTC is reset (without fixing it in Boktai)? Given that most time events only seems to be based on days passed since last happening (rather than being based on certain dates) and resets when enough time has passed, they should be fine. Berries might wilt if it acts like a lot of time passed, or nothing will happen at all if it acts like no time has passed. Since day/night cycles, water tides and Eevee evolutions are only based on hours/minutes, those types of events should be fine as long as the RTC is set to match real time of the day (or whatever time you want it to be).

Only problem I could think of is if there is an event that happens at regular intervals and keeps count of it, say something that happens every month and increments a counter every time. In that case the counter would go up a lot when setting the time (by 12 per year you set time forward for the month event example). But this would happen with Nintendo's berry glitch patch as well. I haven't played this game very much so I don't know if such events exists.

Is this correct?

Offline Galron

  • Hero Member
  • *****
  • Posts: 617
  • Karma: +14/-0
    • View Profile
Re: Negotiating the RTC on the GBA X5
« Reply #7 on: January 11, 2020, 04:58 PM »
Quote
X5 mini

Just to be clear the "X5 Mini" as a name hasn't been confirmed? We don't even know what this 'mini' sized model will be named... as far as  I know. Maybe it'll be split into 2-3 different models with different price points and features (x3, x5, and x7)? Maybe it will be a "Pro" and replace X5 outright?

Offline taiyotenko

  • Newbie
  • *
  • Posts: 9
  • Karma: +1/-0
    • View Profile
Re: Negotiating the RTC on the GBA X5
« Reply #8 on: January 11, 2020, 05:15 PM »
I still don't see an answer to the question. The berry glitch seems to be an unrelated bug (I don't fully understand the explanation at bulbapedia but it seems it never happens again after January 2, 2002) which happens on real Ruby and Sapphire cartridges as well.

If the RTC is reset so that the time goes backwards the game will probably act either like no time has passed or act like a lot of time has passed depending on how it calculates the passed time (I'm guessing). But if the RTC can be set again in Boktai for example (preferably to real time or at least sometime after January 2, 2002 to fix the berry glitch as well), I think everything should be fixed. Player planted berries might wilt when doing this, but after that I think everything should work as it should? If a new save file is created on any other Pokemon game, the RTC will be reset again and it must be fixed using Boktai again. This is how the berry glitch is fixed using the patching methods mentioned so I can't imagine it doing anything bad to the save file.

So more concretely what happens if playing Pokemon after RTC is reset (without fixing it in Boktai)? Given that most time events only seems to be based on days passed since last happening (rather than being based on certain dates) and resets when enough time has passed, they should be fine. Berries might wilt if it acts like a lot of time passed, or nothing will happen at all if it acts like no time has passed. Since day/night cycles, water tides and Eevee evolutions are only based on hours/minutes, those types of events should be fine as long as the RTC is set to match real time of the day (or whatever time you want it to be).

Only problem I could think of is if there is an event that happens at regular intervals and keeps count of it, say something that happens every month and increments a counter every time. In that case the counter would go up a lot when setting the time (by 12 per year you set time forward for the month event example). But this would happen with Nintendo's berry glitch patch as well. I haven't played this game very much so I don't know if such events exists.

Is this correct?

There isn't cumulative events. At each new day the game generate some random numbers to change some things on the game and that's all.

From https://bulbapedia.bulbagarden.net/wiki/Time#Generation_III

Quote
Unlike Generation II, Generation III had no separate time periods, or even an ability to check the time in-game unless the player traveled back to Littleroot Town, where he or she had set an analog clock at the beginning of the game. Also, unlike Generation II, the time-based events were very few and extremely far between, with the clock mostly running to keep track of the growth of planted Berries (although this was not completely foolproof). Additionally, there was no way to change the clock in this generation, not even for daylight saving time.

There were, however, some time-based functions in the games. For example, Shoal Cave's water level would change every six hours, at 3:00 and 9:00 a.m. and p.m. (03:00, 09:00, 15:00, 21:00). Just the same, Eevee would be able to evolve into Espeon if the in-game time was between 12:00 p.m. and 11:59 p.m. (12:00 - 23:59). Eevee would be able to evolve into Umbreon if the in-game time was between 12:00 a.m. and 11:59 a.m. (00:00 - 11:59).

Time-based evolutions

Day Evolution
12:00 a.m. - 11:59 a.m.
(00:00 - 11:59)

Night Evolution
12:00 p.m. - 11:59 p.m.
(12:00 - 23:59)    

Although a small part of the game, some events occur on a daily basis. Lilycove Department Store gives out Pokémon Loto Tickets for the Pokémon Lottery Corner, with the winning number changing daily. An old man who lives in Pacifidlog Town looks out for Mirage Island, and will, every day, generate a random number between 0 and 65535 and if this number matches the personality value of any of the Pokémon in the party, Mirage Island will appear in the game.

Offline Advert2020

  • Newbie
  • *
  • Posts: 6
  • Karma: +0/-0
    • View Profile
Re: Negotiating the RTC on the GBA X5
« Reply #9 on: January 11, 2020, 08:03 PM »
First, let's make one thing clear. Just Ruby and Sapphire have the berry glitch, Emerald doesn't. So, if you only play Emerald you will never have any kind of issues.

Even in the case you really would like to play R/S you will still have some options to avoid this kind of problem:
  • Easier option is to use a PC utility called GBATA to patch the roms before playing;
  • Alternatively, you can link to Pokémon FireRed, LeafGreen or Emerald to change the clock on your save;
  • Another option is to just use another game to change the clock to something after January 2, 2002 on your Everdrive x5 and the glitch won't affect your save. This must be done before 365 days pass after the begginning of your save file or it won't work. That was the option I mentioned on my first post.

Pokémon R/S/E count just the time passed, not the exact date like other GBA games with clocks, besides it does a clock reset at each new game file. In these games, you can't see the date, so it doesn't matter a lot. However, that can be a pain if you play multiple games with clocks and that's the real issue, not berry glitch.
Basically, in Pokémon R/S, the days are counted as numbers instead of a date and when the count reachs 366 days it will only add one more day to the counter after 365 days, so the events that depend on the day number will not function properly.

If you need more information, read this:
https://bulbapedia.bulbagarden.net/wiki/Berry_glitch

Thanks for your answer, I think that solves the problem! If I understand correctly, all we need to avoid is the date being between 01 Jan 2000 - 01 Jan 2002 once 365 days have elapsed for the save as that will stop any new days and events being generated (as per the bulbapedia article), and that is easy to do with Boktai etc. So the only worry is that the in game clock will be a bit off, but as I mentioned before that is really irrelevant all things considered.

Offline nuu

  • Hero Member
  • *****
  • Posts: 1224
  • Karma: +58/-2
    • View Profile
Re: Negotiating the RTC on the GBA X5
« Reply #10 on: January 11, 2020, 09:04 PM »
Yes although that's only for taking care of the berry glitch which is mostly unrelated to your question. If I'm right you need to set the RTC in Boktai every time you start a new file in the Pokemon games (or play any other game that resets the RTC).

Why would the wall clock be off if you set the time correctly in Boktai though?

Offline Advert2020

  • Newbie
  • *
  • Posts: 6
  • Karma: +0/-0
    • View Profile
Re: Negotiating the RTC on the GBA X5
« Reply #11 on: January 12, 2020, 12:25 AM »
Yes although that's only for taking care of the berry glitch which is mostly unrelated to your question. If I'm right you need to set the RTC in Boktai every time you start a new file in the Pokemon games (or play any other game that resets the RTC).

Why would the wall clock be off if you set the time correctly in Boktai though?

I guess I was mainly worried about the berry glitch as I’m not sure what else could go wrong, though I agree with you that it’s a bit tangential to what I originally asked. The reason I mentioned about the wall clock is that I remember reading that setting the Boktai time didn’t necessarily correspond 1:1 to the wall clock and seemed to be ‘random’.

My best guess for why that would be (if it is actually the case) is that the original Pokemon cart isn’t actually writing to the clock IC when you set the time, but establishing a ratio between the time you set and the time the IC is telling it. So if you say that the time is (e.g.) 1:15 and the IC is saying that the time is 1:00, then the game knows to display the time 15mins ahead of the IC time. That’s fine if the clock is stable, but in this case it will result in it being 15min ahead of whatever the time is set to in Boktai. I guess you can adjust accordingly in Boktai if it is just the one game, but anymore than that and things are going to be out and hence ‘random’. That’s why people talk about starting r/s/e all at the same time. That’s just a guess though!

Offline nuu

  • Hero Member
  • *****
  • Posts: 1224
  • Karma: +58/-2
    • View Profile
Re: Negotiating the RTC on the GBA X5
« Reply #12 on: January 12, 2020, 12:56 AM »
So in other words it could be storing the time that is set on the wall clock at the start of the game as an offset relative to the time the RTC was at, and it uses that to calculate time whenever needed, rather than just use the time value that the RTC reports as is. If you want that offset to be close to 0 you would need to start the game sometime close to 00:00 at midnight, since that's what the RTC is reset to at that point.

Now I see what taiyotenko was talking about.

Offline Advert2020

  • Newbie
  • *
  • Posts: 6
  • Karma: +0/-0
    • View Profile
Re: Negotiating the RTC on the GBA X5
« Reply #13 on: January 12, 2020, 01:18 AM »
So in other words it could be storing the time that is set on the wall clock at the start of the game as an offset relative to the time the RTC was at, and it uses that to calculate time whenever needed, rather than just use the time value that the RTC reports as is. If you want that offset to be close to 0 you would need to start the game sometime close to 00:00 at midnight, since that's what the RTC is reset to at that point.

Now I see what taiyotenko was talking about.

Yeah that’s my guess anyway. Perhaps that might also explain why Krikzz couldn’t find a solution to the problem since the issue was really the game dependent offset rather than the hardware dependent reset. But I have no idea really. Starting the game at midnight is a nice idea though and would be a good test of the theory.

Offline taiyotenko

  • Newbie
  • *
  • Posts: 9
  • Karma: +1/-0
    • View Profile
Re: Negotiating the RTC on the GBA X5
« Reply #14 on: January 12, 2020, 05:40 AM »
So in other words it could be storing the time that is set on the wall clock at the start of the game as an offset relative to the time the RTC was at, and it uses that to calculate time whenever needed, rather than just use the time value that the RTC reports as is. If you want that offset to be close to 0 you would need to start the game sometime close to 00:00 at midnight, since that's what the RTC is reset to at that point.

Now I see what taiyotenko was talking about.

Yes, it works exactly as you described. The wall clock is just a reference for the internal game clock. I already did some tests with Everdrive GBA X5 and even mGBA emulator (it lets you freely change the clock on its menu in realtime). The hours and minutes you set on the wall clock are added to the hours and minutes detected by the internal game clock giving you the current time in game.

So in other words it could be storing the time that is set on the wall clock at the start of the game as an offset relative to the time the RTC was at, and it uses that to calculate time whenever needed, rather than just use the time value that the RTC reports as is. If you want that offset to be close to 0 you would need to start the game sometime close to 00:00 at midnight, since that's what the RTC is reset to at that point.

Now I see what taiyotenko was talking about.

Yeah that’s my guess anyway. Perhaps that might also explain why Krikzz couldn’t find a solution to the problem since the issue was really the game dependent offset rather than the hardware dependent reset. But I have no idea really. Starting the game at midnight is a nice idea though and would be a good test of the theory.

I already had tested this ideia some years ago when I got my Everdrive and it worked. I even made a post back at 2016, however I lost my account trying to change e-mail and username and the post simply vanished too.
The wayback machine lists the post, but it isn't archived anywhere unfortunately.

https://web.archive.org/web/20160904200830/http://krikzz.com:80/forum/index.php?board=22.0

When the game asks you the time, set the clock to 00:03 (3 minutes is the lenght of the intro, you have to consider that too). Change the time using Boktai and enjoy.