Advertiser Content

Development Berry system for Fire Red with RTC Page 2

Started by JPAN February 15th, 2010 10:28 PM
  • 14232 views
  • 33 replies

Jambo51

Glory To Arstotzka

Male
Seen January 28th, 2018
Posted December 6th, 2015
732 posts
10.5 Years
Sorry to resurrect an old topic, but I needed to ask, is there a way to get the time of the RTC clock? If so it would be pretty easily to script the entire GSC berry system(no planting/watering or moving icons involved, just pick a tree OW sprite, and give it a script to check the time, and if so use the giveitem command to give the person a berry once per day.
In a script, simply put the following command:

copybyte 0x020370D0 0x03005542

That'll copy the hour byte of the RTC to the Lastresult variable for you to use.
Although JPAN's system would be better IMO, so you should at least consider it.
Hey guys, please check out my recreations of the gen 1 and 2 music on my custom engine at my SoundCloud! - Here!

Jambo51

Glory To Arstotzka

Male
Seen January 28th, 2018
Posted December 6th, 2015
732 posts
10.5 Years
Thanks, is there also a way to copy the contents of the day/month/year as well? I'm assuming that hours uses 0x9 for 9am and 0x15 for 9pm? Also is there a way to check if the lastresult
contents are greater or less than instead of equal or not equal to?
Yes, 0x9 is 9AM and 0x15 is 9PM.
Day of Month: 0x03005540
Day of Week: 0x03005541
Month: 0x0300553F

There is no way to call the year in the same fashion as it is a half word, rather than a byte. You would have to write a small asm routine to write it to a variable or something. For reference, add or subtract 2 to the lastresult ram pointer to change it to a preceding or following variable.

I forget the exact numbers which in a script indicate greater than or less than, but, if you're using XSE, you can simply do this instead, and XSE replaces it upon compile:

compare LASTRESULT 0x9
if B_>= call/goto @wherever

Upon compile to the rom, XSE replaces it with the relevant value, so it's not a problem. Isn't HackMew's tool wonderful? XD
Hey guys, please check out my recreations of the gen 1 and 2 music on my custom engine at my SoundCloud! - Here!

Jambo51

Glory To Arstotzka

Male
Seen January 28th, 2018
Posted December 6th, 2015
732 posts
10.5 Years
Thanks, so there are multiple places to store values near LASTRESULT?
All of the 0x80XX family of variables are static, unlike the DMA protected majority (they move around the ram constantly), so anything from 0x8000 to 0x8013 will work with that formula. However, DO NOT USE 0x800F as it is the LASTTALKED variable, and is important for various other background routines. Other than that, you should be safe.

LASTRESULT = 0x800D in case you didn't know.
Hey guys, please check out my recreations of the gen 1 and 2 music on my custom engine at my SoundCloud! - Here!

Shiny Quagsire

I'm Still Alive, Elsewhere

Age 21
Male
Hoenn Safari Zone
Seen 3 Weeks Ago
Posted April 17th, 2017
700 posts
10.6 Years
Nope. There isn't a patch either. I can honestly say that it took me weeks to get this to fully work, including custom ASM. I even hacked the berry bag so I could choose a berry from there. I'll have to upload a video sometime. Maybe a tutorial for that part.
Male
Seen 5 Days Ago
Posted July 6th, 2019
208 posts
2.9 Years
Fire Red ROM with only the Day Night System by Interdpth & ZodiacDaGreat, using the Real Time Clock that comes with it.
Man, is there any possibility of making this research compatible with RTC from primal's dns tool?
Or they both use same RTC?
Plz some1 help me!!
Thanks ;)
Advertiser Content