The PokéCommunity Forums  

Go Back   The PokéCommunity Forums > ROM Hacking > Research & Development
Sign Up Rules/FAQ Live Battle Blogs Mark Forums Read

Notices

Research & Development Got a well-founded knack with ROM hacking? Love reverse-engineering the Pokémon games? Or perhaps you love your assembly language. This is the spot for polling and gathering your ideas, and then implementing them! Share your hypothesis, get ideas from others, and collaborate to create!
Research & Development programs in this forum are subject to moderator approval before they are displayed.


Reply
Click here to go to the first staff post in this thread.  
Thread Tools
  #26    
Old January 1st, 2011, 02:35 AM
Jambo51's Avatar
Jambo51
Glory To Arstotzka
 
Join Date: Jun 2009
Gender: Male
Nature: Quiet
Quote:
Originally Posted by NintendoBoyDX View Post
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!
Reply With Quote
  #27    
Old January 1st, 2011, 11:34 AM
NintendoBoyDX
Togepi
 
Join Date: Jul 2010
Gender: Male
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?

Last edited by NintendoBoyDX; January 1st, 2011 at 11:48 AM.
Reply With Quote
  #28    
Old January 1st, 2011, 02:43 PM
Jambo51's Avatar
Jambo51
Glory To Arstotzka
 
Join Date: Jun 2009
Gender: Male
Nature: Quiet
Quote:
Originally Posted by NintendoBoyDX View Post
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!

Last edited by Jambo51; January 2nd, 2011 at 03:42 AM.
Reply With Quote
  #29    
Old January 1st, 2011, 07:13 PM
NintendoBoyDX
Togepi
 
Join Date: Jul 2010
Gender: Male
Thanks, so there are multiple places to store values near LASTRESULT?

Last edited by NintendoBoyDX; January 2nd, 2011 at 02:43 AM.
Reply With Quote
  #30    
Old January 2nd, 2011, 03:46 AM
Jambo51's Avatar
Jambo51
Glory To Arstotzka
 
Join Date: Jun 2009
Gender: Male
Nature: Quiet
Quote:
Originally Posted by NintendoBoyDX View Post
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!
Reply With Quote
  #31    
Old January 2nd, 2011, 12:47 PM
NintendoBoyDX
Togepi
 
Join Date: Jul 2010
Gender: Male
Got to be careful on that though jpan uses some of the variables for his hacked engine. Quick question about 0x80xx variables, are 0x8014 through 0x80ff static? If so why wouldn't they work in the same way as 0x8000 through 0x8013?

Last edited by NintendoBoyDX; January 4th, 2011 at 12:43 AM.
Reply With Quote
  #32    
Old January 22nd, 2012, 08:53 AM
xephos's Avatar
xephos
xephos Inc.
 
Join Date: Jan 2012
Location: U.S.A
Gender: Male
Nature: Quiet
Is there a video on how to do this, because it just flew over my head
Reply With Quote
  #33    
Old January 22nd, 2012, 09:25 AM
Shiny Quagsire's Avatar
Shiny Quagsire
Being a Wizard
 
Join Date: May 2009
Location: Hoenn Safari Zone
Age: 16
Gender: Male
Nature: Jolly
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.
__________________



Reply With Quote
Reply
Quick Reply

Sponsored Links
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Minimum Characters Per Post: 25



All times are UTC -8. The time now is 04:15 PM.


Style by Nymphadora, artwork by Sa-Dui.
Like our Facebook Page Follow us on Twitter © 2002 - 2014 The PokéCommunity™, pokecommunity.com.
Pokémon characters and images belong to The Pokémon Company International and Nintendo. This website is in no way affiliated with or endorsed by Nintendo, Creatures, GAMEFREAK, The Pokémon Company or The Pokémon Company International. We just love Pokémon.
All forum styles, their images (unless noted otherwise) and site designs are © 2002 - 2014 The PokéCommunity / PokéCommunity.com.
PokéCommunity™ is a trademark of The PokéCommunity. All rights reserved. Sponsor advertisements do not imply our endorsement of that product or service. User generated content remains the property of its creator.