#165620 - HackLars - Tue Dec 30, 2008 9:51 am
Hello.
I'm a rom hacker and i've done a routine to change the palette at determined hour (excuse me for my bad english, but i'm italian).
I only want that my routine start many times every minute for ever.
How can i do?
#165627 - tepples - Tue Dec 30, 2008 4:04 pm
Are you trying to change the palette every hour in real time, like Animal Crossing does? Do you have a real-time clock in the cart you're using?
Or do you just want to change the palette every 60 seconds of time that the machine is powered on? For that, you could count vertical blanks. The refresh rate of the GBA is 16777216/280896 Hz; a minute is close to 3584 vblanks. Just start a counter at 3584, subtract 1 in your vblank handler, and then change the palette when it hits 0.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.
#165630 - HackLars - Tue Dec 30, 2008 9:19 pm
I want only repeat the routine every 60 second, then when are 18.59 the palette are sunny, when are 19.00 the palette are dark and during the game, when are 7.00 the palette are sunny. the routine must repeat every 60 second, how can i do that?