Day/Night Switching of Wild Pokémon
View Single Post
January 10th, 2011, 03:42 PM
Glory To Arstotzka
Join Date: Jun 2009
Originally Posted by
I'm not sure what you're trying to say. Here, '0x03000dc0' is where the game writes the RTC data immediately after they are read from the RTC chip. When the game is being emulated on a PC, the time will be whatever time it is on the player's computer. If the game is on a game pak (with a RTC chip), then it just reads whatever the RTC gives it. Then, at a later time, the game reads the hour, minute, and second bytes from '0x03000dc0', converts them to hexadecimal, offsets them based on a value which is calculated when the player sets the clock in his/her room, and then stores the new values at '0x03005cfa'. At least, that's my understanding of it.
What I'm meaning is that the time update routine I found (the one which updates 0x03000DC0) can be used to update the main one manually, as long as it's updated at the same time. What I would do is load the values of the RTC at 0x03000DC0 before updating into the registers, then update the time. Then calculate the difference in time between the pre-update time and the post update time. Then using that difference, update the time at the offset 0x03005CFA.
Does that make sense?
Hey guys, please check out my recreations of the gen 1 and 2 music on my custom engine at my SoundCloud! -
View Public Profile
Send a private message to Jambo51
Find all posts by Jambo51
Find threads started by Jambo51
Ignore Posts by Jambo51