Jump to content

Recommended Posts

Posted

I have an emerald with a dead battery that I've replaced and I can't seem to properly reset the RTC. I usually use the rtcread homebrew tool via flashcart to set the date and time, and this usually works (reasonably) well. So the following I have tested to be working:

  1. the clock in Littleroot is displaying the correct time
  2. Events are occurring on the TV
  3. Berries are growing normally

However,

  • Pacifidlog man quotes a massive number of days before he will give a TM again.

In playing with rtcread, I have moved the clock to the last possible date...12/31/2099 23:59:30 (some time to open the game) and the man then states 8 days. Great. So after waiting 30 seconds and the day elapsing it did switch back to 1/1/2000 0:0:0...however the man now says he will get a new TM in 65,227 days...that equates to over 178 years. And considering the RTC cycle for this game only covers 100 years, that number appears theoretically impossible to hit. I have advanced the clock 24 years into the present and the man accurately states that he will get a new TM in about 56,144 days. 

It almost seems like the timestamp that the last TM was received was corrupted...obtained at an impossible time.

Also tried resetting the RTC inside PKHeX but that yielded no new results.

Have also tried my save inside an emulator and gotten the same results...what else can I try?

Posted
5 hours ago, BlackShark said:

In PKHeX you can set constant 194 in the event flags research to the current number of elapsed days, or any lower number. That should fix it.

Much appreciated; Counter has reset to 7 days. Will see if it drops to 6 tomorrow. 

 

Posted

These are the relevant function:

https://github.com/pret/pokeemerald/blob/master/src/field_specials.c#L1555

u16 GetDaysUntilPacifidlogTMAvailable(void)
{
    u16 tmReceivedDay = VarGet(VAR_PACIFIDLOG_TM_RECEIVED_DAY);
    if (gLocalTime.days - tmReceivedDay >= 7)
        return 0;
    else if (gLocalTime.days < 0)
        return 8;

    return 7 - (gLocalTime.days - tmReceivedDay);
}

u16 SetPacifidlogTMReceivedDay(void)
{
    VarSet(VAR_PACIFIDLOG_TM_RECEIVED_DAY, gLocalTime.days);
    return gLocalTime.days;
}

gLocalTime.days returns the current days from the RTC. In the Get function the last line "gLocalTime.days - tmReceivedDay" can result in a negative value if tmReceivedDay is greater gLocalTime.days, which can then result in high numbers. But it shouldn't be as high as 65,227.

  • Like 1
  • 1 year later...
Posted (edited)

@BlackShark I've got another Emerald RTC problem oddity for your consideration:

Recently upgraded an Emerald to a battery socket; board is pristine, battery is Panasonic, socket seems fine. Did a quick test to make sure the dry battery message was gone and then got out my flashcard to reset the RTC. 

If you've ever used the home-brew tool you'll know that it takes a couple of tries to get it right. After the first try I found I got the dry battery message back. I equated this to an improper solder connection, or the socket not making good contact. I redid the solder job and this was fixed again.

Now however the GBA RTCReset tool won't work, and always says 'Power Flag Raised - Battery probably bad'. I check the clock in little root and the most bizarre thing happens: It shows a time of 12:00AM for a moment, then quickly changes to 10:57PM. Leaving the room and coming back results in the same effect. The clock is noticeably not progressing...have waited an extended period of time.

Have tried the reset flags in PKHeX and Days passed as other posts have done, but it's literally the same time every time with the same behavior. Saw other another post on GBATemp saying to reset the PKHeX flags and use the hidden time set tool at the start screen...but that seems to be only for Ruby/Sapphire. Launching that hidden menu opens the Berry Fix Program. 

Can you please take a look?

EDIT: Got the dry battery message again. Took just the battery out and found an enormous amount of flux in the socket, likely preventing contact with the battery. 'No Clean Flux'; if I had seen it I would have cleaned it though. Cleaned and it is now working fine.

POKEMONE.SAV

Edited by 3rd Gen Expert

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...