• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

Development: Christmas Present for PC! Your very own RTC for FR and LG

interdpth

I've seen things, man.
275
Posts
19
Years
  • Seen Jun 8, 2021
Added it to my hack earlier so I decided to just go and release.

Be sure to give me full credit.
Edit: I'm a hypocrite lolollo


I fudged my sources somehow and were unable to recover them properly.
Here's the ASM
Spoiler:
So here's the patch.
Download the IPS patch

I am not posting an example script, and to anyone else, PLEASE DO NOT POST AN EXAMPLE SCRIPT ANYWHERE except in your own hack
Why? Because then i'd see "RTC IN MY HACK" and properly my slightly modified example script. So you'll have to make your own from the data below, sorry for the earlier trouble.

I use No$GBA and vba-m for testing. :)

Patches on to the games main loop at 0x41E. Then executes my code at 0xb01000.

The time it gives you is stored at 0x300553C
In the following format.
Year u16
skip a byte
month u8
day u8
Day of week(mon-sun/1-7) u8
Hour u8
minute u8
second u8

at 0x3005537
is
u8 dayofweek;
u8 hours;
u8 minutes;

use that when you create your time setter function. code auto compensates(I didn't and don't plan on a date thing you can do that on your own)





Please give me credit.

Thanks to kawai/ZodiacDaGreat for helping me with an example script.

Merry Christmas everyone
 
Last edited:

ZodiacDaGreat

Working on a Mobile System
429
Posts
17
Years
So, it's approved uh? Well, here's my contribution. Merry Christmas guys :)

Spoiler:
Remember to credit me if you use my code, it's for Fire Red. The RTC is at 0x03004038. The format is:
[Year][Month][Date][Filler][Hour][Month][Date]
They are all a byte each in size.

Thanks to
HackMew - For RTC tips and hints on how it works
 
Last edited:

558122_DG

Learning how to make mistakes
737
Posts
14
Years
  • Seen May 27, 2021
hmmm, nice present although all it did was destroy what little understanding i had of asm :P
 

Sierraffinity

Desperately trying to retire from ROM hacking
1,069
Posts
16
Years
So, it's approved uh? Well, here's my contribution. Merry Christmas guys :)

Spoiler:

Remember to credit me if you use my code, it's for Fire Red. The RTC is at 0x03004038. The format is:
[Year][Month][Date][Filler][Hour][Minutes][Seconds]
They are all a byte each in size.

Thanks to
HackMew - For RTC tips and hints on how it works
Um, I think you meant to put that. :P
EDIT: Also, is it just me, or does this use the Windows clock?
Does this mean that it wouldn't work on an actual GBA?
 
1,323
Posts
16
Years
  • Seen Dec 9, 2023
Is this RTC identical to R/S/E? Also, if you were to put a FireRed or LeafGreen rom on a GBA Flashcart, would the RTC work correctly?
 

interdpth

I've seen things, man.
275
Posts
19
Years
  • Seen Jun 8, 2021
what i dont understand is what does it do?

I asked you not to post if you don't understand.

Um, I think you meant to put that. :P
EDIT: Also, is it just me, or does this use the Windows clock?
Does this mean that it wouldn't work on an actual GBA?

Is this RTC identical to R/S/E? Also, if you were to put a FireRed or LeafGreen rom on a GBA Flashcart, would the RTC work correctly?

I forgot to add some extra data to my post on how to offset the changes, added it, so please refer to it. And yes it should work on the real GBA, the emulators just base it off of a time() call, so it uses your OS's time.
 
1,323
Posts
16
Years
  • Seen Dec 9, 2023
I forgot to add some extra data to my post on how to offset the changes, added it, so please refer to it. And yes it should work on the real GBA, the emulators just base it off of a time() call, so it uses your OS's time.
So this is better than the R/S/E one? That's cool. Since the R/S/E RTC doesn't work on GBA flashcarts, you should see if you can add your FR/LG clock to R/S/E (and remove the clock that comes with R/S/E so then we don't have to see the "internal battery has run dry" message on a GBA flashcart).
 

ZodiacDaGreat

Working on a Mobile System
429
Posts
17
Years
AztecFire said:
So this is better than the R/S/E one? That's cool. Since the R/S/E RTC doesn't work on GBA flashcarts, you should see if you can add your FR/LG clock to R/S/E (and remove the clock that comes with R/S/E so then we don't have to see the "internal battery has run dry" message on a GBA flashcart).
I guess it depends on whether or not that the flash cart has the RTC chip built in if it doesn't then RTC doesn't work.
 

Haku.

(FLAME)...H....A...K..U
385
Posts
16
Years
Could anyone care to show me how do i insert this?
At which offset and how do i use it please?
I'm not very good with ASM yet.
Must i use setvar 0x8003 or 0x????.
 

interdpth

I've seen things, man.
275
Posts
19
Years
  • Seen Jun 8, 2021
No. You just apply it to the game and it runs every frame.

Did you not read the description?
 
1,323
Posts
16
Years
  • Seen Dec 9, 2023
I guess it depends on whether or not that the flash cart has the RTC chip built in if it doesn't then RTC doesn't work.
Well that's a bummer...

Would it ever be possible to add a RTC in R/S/FR/LG/E where it works like G/S/C's RTC?
 
Back
Top