Shiny Quagsire
I'm Still Alive, Elsewhere
- 697
- Posts
- 15
- Years
- Age 27
- Hoenn Safari Zone
- Seen Aug 8, 2020
Make sure VBA's RTC clock is on. :)
Make sure VBA's RTC clock is on. :)
that would be: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
that would be:
XX XX XX XX XX YY XX XX XX
the YY is the day of the week, it's at: 300554C
I'm trying to use the RTC to get the day of the week byte so that I can have day specific events, but every time I copy the byte stored at 0x305540 (I also checked offsets on either side of this), it returns 0 as the result.
I'm running Windows 7 and i'm just wondering if it's a problem with VBA's time call, or if i'm looking in the wrong offset for the day of the week byte, or if i'm scripting it wrong, or if there's a problem with the RTC itself.
I haven't yet checked if it works on Vista, but will try shortly.
That said, i'm fairly sure that the RTC works fine, so if it's related to the time call function of VBA, then that would explain a lot.
Can someone show me the part of the ASM that reads out the time value (=without the mainloop-hook and date-conversion). I can't understand GBATEK in this point.
Aw, but that'll ruin the fun. It took me months to figure out how to read the time. Trust me, you'll feel a lot better if you figure it out yourself than if you take the easy way out.
How come it works for me? :\The RTC doesn't provide a day-of-the-week byte.
How come it works for me? :\
I understand how to insert it and all, but how would you actually use this in-game? Would you put a script on the berry tree? If so, what would the script be?
Thanks!
Yep, you would use a script, however, the script you would have to do yourself, as he said in the front post that he doesn't want anyone to give it away.