Originally posted by cpuHacka101
Originally posted by ShenoxVII
Remember to give out the source, everything in the mario64 hacking community should be open source IMO.
Nice job.
The source is relatively simple, I spent most of my time with the layout.
I can offer some of the samples, such as:
The BinaryWriter -
private void button24_Click(object sender, EventArgs e)
{
//This is for the message dialog saying that it patched, even though it may have not
MessageBox.Show("The penguin got new feet!", "Patched!")
//This is where it actually writes bytes to the ROM.
BinaryWriter bw = new BinaryWriter(File.OpenWrite(ofd.FileName))
{
//This is where I tell the code to read from the textboxes, and use the text as a hexadecimal format.
//Feet address
bw.BaseStream.Position = 0x8fe62c;
//first textBox
bw.Write(int.Parse(textBox130.Text, System.Globalization.NumberStyles.HexNumber))
bw.BaseStream.Position = 0x8fe62d;
//Second textBox
bw.Write(int.Parse(textBox131.Text, System.Globalization.NumberStyles.HexNumber))
bw.BaseStream.Position = 0x8fe62e;
//Third textBox
bw.Write(int.Parse(textBox132.Text, System.Globalization.NumberStyles.HexNumber))
}
The textBoxes' Keypress -
private void textBox17_KeyPress(object sender, KeyPressEventArgs e)
{
//Only 1 byte per textbox. (2 integers.)
textBox17.MaxLength = 2;
char c = e.KeyChar;
//Here is a formula to only allow hexadecimal characters/integers
if (c != '\b' && !((c <= 0x66 && c >= 0x61) || (c <= 0x46 && c >= 0x41) || (c >= 0x30 && c <= 0x39) || (c == 0x2c)))
{
e.Handled = true;
}
If you know how to program in C#, this should be pretty easy, as long as you know how to locate 0x03 addresses.
C# is .NET lol, It's very simple along with VB.
Anyways thanks for the source, the gameshark patcher I made which was never finished may be a good project for you.
|