![]() |
Visual Basic 6.0 HEX Editing Functions - For Hacking ROMs.
2 Attachment(s)
Before we start:
Today I'm going to teach you how to make a basic program to Hack Diamond/Pearl in Visual Basic 6.0. :) Please, before reading on make sure you learn the very basics of Visual Basic 6.0 from somewhere, Google it or something. I'd give you links, but I do believe that is against the rules. :P Also, be sure you already own a Copy of VB6, you cannot download it from Microsoft anymore. You will have to find other ways of locating it. :D Now, I'm going to show you how to make a Starter Editor for D/P. :D _______________ Before you start coding... Step 1: Before you even think of beginning to code you will need several Functions and of course the remarkable 'clsCommonDialog' Class Module. :D First off, let's get you the Class Module, it is very helpful. And it stops people from getting the annoying "Component 'comdlg32.ocx' or one of its dependencies not correctly registered: a file is missing or invalid." Error. :) You can get it here. Please note, I have no idea who wrote it, but whoever they were they were truly a genius. :) Also, you will need the HEX Editing Module, with all Functions made by me. You can get that here. Add those 2 files into your project, and then we can continue. _______________ Now, let's begin. Step 2: Now, you will want to make 2 Buttons. 1 Named "cmdOpen" and the Caption "Open" 1 Named "cmdSave" and the Caption "Save" And also, make 3 ComboBoxes. (These will hold which Pokemon will be in the PokeBalls.) 1 Named "cmbPoke1" and the Style set to 2. 1 Named "cmbPoke2" and the Style set to 2. 1 Named "cmbPoke3" and the Style set to 2. You also have to make the List Property of all the ComboBoxes to this: Code:
_______________ Now, let's begin coding. Step 3: Ok. After reading the basic I'm sure you'll know what this line of code does. Code:
Alright, so put that code at the very start of your Code. That way you can use it all through-out the current Form. :) _______________ Making and decoding the 'Open' Button. Step 4: Ok, in the 'View Object' Mode, double click your Open Button. Now, you should get something that looks like this in your code window: Code:
Code:
Spoiler:
_______________ How to make a 'Save' Button. Step 5: Ok, we are nearly there. We just have to make this Save Button, then we are basically finished. :D Once again go into 'Design Mode' and double click your Save Button. You should get some code that looks like this: Code:
Ok... So, in the blank area there, put this code in. Code:
Spoiler:
Woot! Nearly finished now... All you have to do is add the other 2 ComboBoxes, with the fixed offsets to write to and you are done. :D I'll let you do that, to see if you've learned anything. :) _______________ Pretty your program up a little. Step 6: All you got to do here is make your program look nice, add some picture or something. Just something to make it look original, and to help make using your tool more enjoyable. :) _______________ FINISHED!. Step 7: Finally, you are done. Your code should now look like this: Code:
Disclaimer: If you use these Functions you must Credit me, Darthatron. If you do not credit me, I will cry. If you think I should waive this rule for you, please PM me about it. If you want to post this on your website or repost it somewhere please PM me. |
Wahaay Darthatron!
I've been looking through that source code you sent me every day, trying to make heads or tails of it and making <ahem> not much progress! This is great that you've taken the time to do this though, I should be able to understand from this. If not, well I guess I'm just not a programmer! Well done mate, hopefully aa lot of talent will emerge from this! |
I wish you'd posted this before I read through all the source code of other programs. This way looks lots easier than the way I found. I did it everything one byte at a time (without your functions:P). I'll have to read through this in more detail sometime soon. I'll be sure to save a lot of time.
|
Great, tut, Now I can make some tools
Something's wrong with the link |
Quote:
Quote:
Quote:
____________ I'm gonna add pictures after dinner. :P |
Quote:
"Before you start coding... Step 1:" There are two links there which does not work. |
Quote:
|
Quote:
|
Quote:
Code:
Code:
_______________ Hope that helped. |
Thank you Darthatron! I've always wanted to be able to make my own rom hacking tools, but couldn't because I had no idea how to make the program read hex! At the very least I'm going to start making my own G/S editor.
|
Quote:
I dont quite understand the procedure |
Quote:
Code:
|
I guess this is how decompiling and recompiling scripts work...
|
Could anyone tell me how to declare a list of numbers (233243) as byte?
Dim x as byte x = "233243" I tried this, it doesn't work, could anyone help? |
Quote:
Quote:
|
Quote:
Dim x as byte x = "" How do you declare a list of bytes? I want to do this: Dim Data as Byte Data = "23232323" Put #FileNum, &H800000, Data Inserting 23 23 23 at 800000 |
Quote:
So...... Code:
|
Um, Darthatron, Im stuck, Could you give a code, how do you use writehex to: write:
"39600AE202B4024900F000F80F470000" in HEX at Offset "406C0"??? Quote:
|
Quote:
If you've read it, you should know how to write that line of code to your ROM. And, as you see, offsets are in decimal ;) |
Quote:
One more thing how do you use the reverse hex for writing pointers? eg. "21348008"? |
Quote:
And, to answer on your question: ReverseHEX(HEXString) will ^^ So ReverseHEX(08123456) will return 56341208 Good Night (2:30AM !!) |
yep, so far everything's working fine,
Now, I need a code that does this: there's a textbox(named txtR)which is used for inputting offsets(6 digits), I need a code that changes the number value in the textbox to decimal, so I can use writehex, romlocation, "offset" how do you do it? |
Quote:
Code:
|
Quote:
Thanks again, Darthatron |
Quote:
Code:
The code "If Len(txtR.Text) > 0 Then" checks if the Length of the Data in the String is above 0. 'If' it is then it will do the code before 'End If'. |
| All times are GMT -8. The time now is 8:41 AM. |
![]()
© 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.