The PokéCommunity Forums  

Go Back   The PokéCommunity Forums > Creative Discussions > Emulation & ROM Hacking > Research & Development
Register New Account FAQ/Rules Chat 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!
New threads in this forum are to be approved by a moderator before they are displayed. The thread revival limit does not apply here.



Reply
Thread Tools
  #26  
Unread January 1st, 2011, 10:35 AM
Jambo51's Avatar
Jambo51
Thinking about quitting...
 
Join Date: Jun 2009
Location: Livingston, Scotland
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.
__________________


Guys, please don't send me question which belong in the Simple Questions or Scripting Help threads. I don't mind the occasional question about ASM or something, though. And definitely don't send me PMs or VMs asking for help with your hack or requesting custom ASM. I will not answer.
Reply With Quote
  #27  
Unread January 1st, 2011, 07:34 PM
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 07:48 PM.
Reply With Quote
  #28  
Unread January 1st, 2011, 10:43 PM
Jambo51's Avatar
Jambo51
Thinking about quitting...
 
Join Date: Jun 2009
Location: Livingston, Scotland
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
__________________


Guys, please don't send me question which belong in the Simple Questions or Scripting Help threads. I don't mind the occasional question about ASM or something, though. And definitely don't send me PMs or VMs asking for help with your hack or requesting custom ASM. I will not answer.

Last edited by Jambo51; January 2nd, 2011 at 11:42 AM.
Reply With Quote
  #29  
Unread January 2nd, 2011, 03:13 AM
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 10:43 AM.
Reply With Quote
  #30  
Unread January 2nd, 2011, 11:46 AM
Jambo51's Avatar
Jambo51
Thinking about quitting...
 
Join Date: Jun 2009
Location: Livingston, Scotland
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.
__________________


Guys, please don't send me question which belong in the Simple Questions or Scripting Help threads. I don't mind the occasional question about ASM or something, though. And definitely don't send me PMs or VMs asking for help with your hack or requesting custom ASM. I will not answer.
Reply With Quote
  #31  
Unread January 2nd, 2011, 08: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 08:43 AM.
Reply With Quote
  #32  
Unread January 22nd, 2012, 04:53 PM
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  
Unread January 22nd, 2012, 05:25 PM
shiny quagsire's Avatar
shiny quagsire
I'm pixular!
 
Join Date: May 2009
Location: In a House, duh!
Age: 15
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

Forum Jump


All times are UTC. The time now is 06:21 AM.


Style by Perdition Haze, artwork by Sa-Dui.
Like our Facebook Page Follow us on TwitterMessage Board Statistics | © 2002 - 2013 The PokéCommunity™, pokecommunity.com.
Pokémon characters and images belong to Pokémon USA, Inc. and Nintendo. This website is in no way affiliated with or endorsed by Nintendo, Creatures, GAMEFREAK, The Pokémon Company, Pokémon USA, Inc., The Pokémon Company International, or Wizards of the Coast. We just love Pokémon.
All forum styles, their images (unless noted otherwise) and site designs are © 2002 - 2013 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 posts belong to the user.