• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • Forum moderator applications are now open! Click here for details.
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

Visual Basic 6.0 HEX Editing Functions - For Hacking ROMs.

D-Trogh

Dead
439
Posts
18
Years
Sorry, D-trogh, I didn't notice, well, its fixed now. Thanks alot, I'll credit you.

One more thing how do you use the reverse hex for writing pointers?
eg.
"21348008"?
You don't need to credit me.. Next time just try and read, k?
And, to answer on your question: ReverseHEX(HEXString) will ^^
So ReverseHEX(08123456) will return 56341208

Good Night (2:30AM !!)
 

ZodiacDaGreat

Working on a Mobile System
429
Posts
17
Years
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?
 

Darthatron

巨大なトロール。
1,152
Posts
18
Years
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?
Code:
WriteHex ROMLocation, CLng("&H" & txtR.Text), Data
That should do it.
 

ZodiacDaGreat

Working on a Mobile System
429
Posts
17
Years
That should do it.

Worked again!, now how about a code that checks whether theres a value in the textbox, in my case txtR. So there wont be any mis-compilation of bytes into the ROM

Thanks again, Darthatron
 

Darthatron

巨大なトロール。
1,152
Posts
18
Years
Worked again!, now how about a code that checks whether theres a value in the textbox, in my case txtR. So there wont be any mis-compilation of bytes into the ROM

Thanks again, Darthatron
Code:
If Len(txtR.Text) > 0 Then
    WriteHex ROMLocation, CLng("&H" & txtR.Text), Data
End If

The Len() Function checks the length of a String. It is used mostly for checking if you have any data held in a Variant. :D

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'.
 

cooley

///Keepin' it simple
1,148
Posts
17
Years
It was a great Idea to make this Thread. Especially for me!
I have a question, will these commands work for Visual basic 2008 Express edition? Because I can't find VB 6.0 anywhere!

Oh yeah, another thing, As long as you have the data for the Rom, you can make tools for it right?
 

Darthatron

巨大なトロール。
1,152
Posts
18
Years
It was a great Idea to make this Thread. Especially for me!
I have a question, will these commands work for Visual basic 2008 Express edition? Because I can't find VB 6.0 anywhere!

Oh yeah, another thing, As long as you have the data for the Rom, you can make tools for it right?

No, I don't think they will work with VB 2008. Although these languages are similar, they also have some major differences. When I get time I will try and make functions for .Net 2008. :)
 

Swampert 22

Is making tools for you...
393
Posts
18
Years
Hey everyone. The development of new tools is coming along at a simply staggering pace now. I wish to add my own to the mix!

It is a RBY gym and elite4 editor.

It reads data from the rom ok, but writing it back is the only problem. We all know (well most of us) that a Pokémon's "hexbyte" only lasts one byte in RBYGSC, but whenever my program writes, it writes 2 bytes, and erases the byte after the desired one aswell. Does anyone know how to get it to write just one byte?

Thanks
 

Darthatron

巨大なトロール。
1,152
Posts
18
Years
Hey everyone. The development of new tools is coming along at a simply staggering pace now. I wish to add my own to the mix!

It is a RBY gym and elite4 editor.

It reads data from the rom ok, but writing it back is the only problem. We all know (well most of us) that a Pokémon's "hexbyte" only lasts one byte in RBYGSC, but whenever my program writes, it writes 2 bytes, and erases the byte after the desired one aswell. Does anyone know how to get it to write just one byte?

Thanks
Code:
WriteHEX LoadedROM, Offset, Right("00" & Data, 2)
That should work a charm. :)
 

Reaper 6

(Reaper 6) the six samurai YGO
122
Posts
16
Years
  • Seen Dec 8, 2009
how do u make other tools such as a tile editor
 

Darthatron

巨大なトロール。
1,152
Posts
18
Years
how do u make other tools such as a tile editor
Well.... You would have to decompile the actual tile image and then get the program to read it and make it editable, then work out how to recompile it and insert it into the ROM. :)

Good luck, I don't know how to do it.
 

Swampert 22

Is making tools for you...
393
Posts
18
Years
Thanks Darthatron buddy, I'd tryed that but it hadn't worked before, I think I didn't Dim LoadedRom as String???

Thanks again. My tool will be out soon!
 

Reaper 6

(Reaper 6) the six samurai YGO
122
Posts
16
Years
  • Seen Dec 8, 2009
Well.... You would have to decompile the actual tile image and then get the program to read it and make it editable, then work out how to recompile it and insert it into the ROM. :)

Good luck, I don't know how to do it.

oh i dont understand it that much but thanks anyway
 

ZodiacDaGreat

Working on a Mobile System
429
Posts
17
Years
Where do I make it the tools? In which program?

lol, a programming language of course, people here mostly use VisualBasic 6, just as the thread suggests, a download can be found if you search at wikipedia, thats where I found mine.

It isn't simple though, to code
 
712
Posts
16
Years
  • Age 31
  • Seen Mar 25, 2024
and how do you use it?

messagetoshortmessagetoshortmessagetoshortmessagetoshortmessagetoshortmessagetoshort
 
8
Posts
16
Years
  • Seen Sep 30, 2010
sweet! I finally fulfilled my dream of making a tool! lol

Darthatron, do you mind if i take this tutorial for a youtube video? I'll give you all the credit!
 

Lin

JohtoMap/ZOLE Creator
51
Posts
16
Years
  • Age 29
  • Seen Apr 26, 2014
This is pretty much useless to me, because I've like mastered VB and already know ROM Hacking: This just uses methods that contain Get, Seek, Put, Open, etc... And here's my main question: I need to know how to hack graphics. Get this: I've been trying for almost a year now. I've tried the set pixel method, Line, etc... And looked at so many sources, even the EM sources and I can't grab graphics. I went to Jathy's IRC channel (Creator of SMILE) and tried to learn to graphics hack from him. He just explained to me what I needed to know, the format of the gb/c/a, and that just made it worse, because I already knew the format of the graphics. I've edited the graphics of a ROM via hex editor, like I did in Zelda LA, and I can't display the graphics in VB. I just don't know how to check the byte on an offset and display that pixel. I know how the hex editing works, byte pairs, offsets, etc... And the format of the systems. I was wondering if you knew how and could teach me; I've gone on long enough without knowing... Thanks, and sorry for the super long reply for a simple question :)

EDIT: I already know you use ASM for uncompressing the graphics and then recompressing them, but in the games I want to hack, such as Zelda LA, a bunch of the tiles aren't compressed. So I just need to know the method...
 
Back
Top