The PokéCommunity Forums

The PokéCommunity Forums (https://www.pokecommunity.com/index.php)
-   Binary ROM Hacking (https://www.pokecommunity.com/forumdisplay.php?f=284)
-   -   Script Hex via scripts (https://www.pokecommunity.com/showthread.php?t=380953)

Froosty October 22nd, 2016 9:56 PM

Hex via scripts
 
Hello everyone...
I wanted to ask if we can make changes to the hex values in a rom via scripts...

For eg.
If there is 12 34 56 at pointer 0x800000 then can i make such acript that i can change the bytes from 12 34 56 to AB CD EF....
I have actually got a cool idea about using the season system with this edit...
So if anyone know if this can be done or not pls tell me... :)

Joexv October 22nd, 2016 10:02 PM

Sadly you can't change bytes mid game.

Froosty October 22nd, 2016 10:54 PM

Quote:

Originally Posted by Joexv (Post 9460337)
Sadly you can't change bytes mid game.

Its so sad... if it would have been possible then I had a nice idea for season (graphical) :(
still thanks for the reply :)

miksy91 October 23rd, 2016 4:02 AM

You can achieve this by asm hacking. What you're practically trying to do is to make CPU read values "12 34 56" from address 0x8000000 if some bit a == 0. In case a == 1 instead, it should read from some other address than 0x8000000 where you may have written your hard-coded values AB CD EF.

You have probably done these kind of things by scripting already. Now all you have to do is to write an asm routine that does a similar thing:

1. Read byte value from ram address X where bit a resides.
2. Check bit a in the byte you read.
3. if a == 0: read values starting at 0x8000000.
4. else: read values from some other address.

BluRose October 23rd, 2016 4:48 AM

+ if you'd like hook positions they should all be here:
http://www.pokecommunity.com/showthread.php?t=270288

it really shouldn't be that hard and i'm sort of surprised no one has done it yet, to be honest. you can just increment the value loaded into the register signifying tileset number and then have the game load that instead. myou can even make the value a constant increment , but you still need to make it like te EXACT same tileset but with a different season in mind

Froosty October 23rd, 2016 5:19 AM

Quote:

Originally Posted by miksy91 (Post 9460565)
You can achieve this by asm hacking. What you're practically trying to do is to make CPU read values "12 34 56" from address 0x8000000 if some bit a == 0. In case a == 1 instead, it should read from some other address than 0x8000000 where you may have written your hard-coded values AB CD EF.

You have probably done these kind of things by scripting already. Now all you have to do is to write an asm routine that does a similar thing:

1. Read byte value from ram address X where bit a resides.
2. Check bit a in the byte you read.
3. if a == 0: read values starting at 0x8000000.
4. else: read values from some other address.

This seems a good idea to me.... if i remember well its something similar that jambo51 has done with day night shift ox pokemon.... i will try it out once though :)
Thanks for helping out.



Quote:

Originally Posted by BluRose (Post 9460600)
+ if you'd like hook positions they should all be here:
http://www.pokecommunity.com/showthread.php?t=270288

it really shouldn't be that hard and i'm sort of surprised no one has done it yet, to be honest. you can just increment the value loaded into the register signifying tileset number and then have the game load that instead. myou can even make the value a constant increment , but you still need to make it like te EXACT same tileset but with a different season in mind

Well i understood somehow what you said... but i am unfamiliar to asm writing though :P

Froosty October 23rd, 2016 5:30 AM

Y the way can the work done with writebyte to offset command???
Its used in ruby(might be) for transparent... will it work ???

Blah October 23rd, 2016 8:08 AM

No, writebytetooffset is for RAM only, ROM as it's name suggest cannot be written to.


All times are GMT -8. The time now is 9:18 AM.


Like our Facebook Page Follow us on Twitter © 2002 - 2018 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 - 2016 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.

Acknowledgements
Use of PokéCommunity Assets
vB Optimise by DragonByte Technologies Ltd © 2023.