Alright, by request, I'm making a tutorial on how to write your own hacking program, just to change a simple value, in Visual Basic 6.0.
This might work on previous/newer versions of VB, but I don't have, so I can't check.
What you'll need?
1)Microsoft Visual Basic 6.0
2)An UNMODIFIED Sonic 3D Blast ROM. (Don't try this with a hack, eh?)
3)A knowledge of how hex works. A good knowledge.
4)A scientific calculator capable of conversion between hex and decimal (Windows calc. works just fine.)
5)A basic knowledge of Visual Basic will definitely help.
Ready?
Start a "New Standard EXE Project."
Make the form a decent size, it doesn't matter how big, really.
Make a button on the form called "btnOpenROM". It needs to be called this (without the quotation marks) so we can refer to it later in code. It's caption/size/color/etc. doesn't matter. It can say "Die!" for all I care.
Now-a very important step before you put any code in-go to the toolbar. Right-click and add the "Microsoft Common Dialog Control 6.0". Then, you'll see a new button on the toolbar, and create one of those objects in the form, naming it "cdlROM".
Now let's add some code.
Double click on the form, and it will open up a "code" window.
Type in the following. It will not function yet.
Now, in General Declarations, (you can select this at the top, it might take a little fooling around) type the following code.
This is declaring the variables we'll use later. You can already see that we've given ROMsize a value of zero. Obviously, this is because there is no ROM loaded.
Before we do anything else, I want to make a blank label called "Label1". Make sure it's visible and a decent size.
Now, let's get onto that button.
In the code for the button, type the following...
...and that makes you read the hit count of the boss for Green Grove Zone in Sonic 3D Blast, unfourtunately in ASCII format.
If there's any demand, I'll give a tutorial for converting between ASCII and Hex, or Decimal, and how to save. I figured this would get people going, at least.
If you want the tutorial in a little zip file, here it is.
Comments are appreciated!
END OF STEP 1, STEP 2 COMING SOON.
This might work on previous/newer versions of VB, but I don't have, so I can't check.
What you'll need?
1)Microsoft Visual Basic 6.0
2)An UNMODIFIED Sonic 3D Blast ROM. (Don't try this with a hack, eh?)
3)A knowledge of how hex works. A good knowledge.
4)A scientific calculator capable of conversion between hex and decimal (Windows calc. works just fine.)
5)A basic knowledge of Visual Basic will definitely help.
Ready?
Start a "New Standard EXE Project."
Make the form a decent size, it doesn't matter how big, really.
Make a button on the form called "btnOpenROM". It needs to be called this (without the quotation marks) so we can refer to it later in code. It's caption/size/color/etc. doesn't matter. It can say "Die!" for all I care.
Now-a very important step before you put any code in-go to the toolbar. Right-click and add the "Microsoft Common Dialog Control 6.0". Then, you'll see a new button on the toolbar, and create one of those objects in the form, naming it "cdlROM".
Now let's add some code.
Double click on the form, and it will open up a "code" window.
Type in the following. It will not function yet.
ROMsize = 0 Set gcdg = cdlROM
Now, in General Declarations, (you can select this at the top, it might take a little fooling around) type the following code.
Option Explicit Dim gcdg As Object Dim ROMname As String Dim ROMsize As Long Dim offSetPos As String
This is declaring the variables we'll use later. You can already see that we've given ROMsize a value of zero. Obviously, this is because there is no ROM loaded.
Before we do anything else, I want to make a blank label called "Label1". Make sure it's visible and a decent size.
Now, let's get onto that button.
In the code for the button, type the following...
Dim ROM
Dim name As String
Dim hitcount As String
Dim location As Long
ROM = FreeFile
With cdlROM
.Filter = "Binary extension files|*.bin|SMD extention files|*.smd|All Files|*.*"
.FilterIndex = 1
.ShowOpen
If LenB(.FileName) Then
ROMname = (.FileName)
Open gcdg.FileName For Binary As #ROM
ROMsize = LOF(ROM)
If Not ROMsize = "4194304" Then
MsgBox ("Um, this isn't a Sonic 3D Blast ROM, or you patched some stuff on the end of it that makes it the wrong size. Just warning you, it MAY NOT WORK.")
End If
End If
Seek #ROM, (56763 + 1)
Get #ROM, (56763 + 1), hitcount
hitcount = Input(1, 1)
Label1.Caption = hitcount
End With
...and that makes you read the hit count of the boss for Green Grove Zone in Sonic 3D Blast, unfourtunately in ASCII format.
If there's any demand, I'll give a tutorial for converting between ASCII and Hex, or Decimal, and how to save. I figured this would get people going, at least.
If you want the tutorial in a little zip file, here it is.
Comments are appreciated!
END OF STEP 1, STEP 2 COMING SOON.
This post has been edited by lostgame: 05 August 2005 - 05:38 PM


00