Post: Pokemon Rom Identifier (GB/GBC Only)
05-16-2012, 04:26 AM #1
Pichu
RIP PICHU.
(adsbygoogle = window.adsbygoogle || []).push({}); I've been wanting to do this for a while and so I am starting my venture on Rom Hacking.

I haven't been able to locate good tools for the the early Pokemon games Red/Blue/Crystal that has a lot of features jam packed into one. All I have really found is a sprite editor here and there or a starter modifier, no real map/tile editors.

I know it won't be a simple task but I think it would be fun to actually create something that can be used. This is basically a program that I made that reads a small portion of the Pokemon Games hex to identify what game version it is. I didn't have GBA files downloaded and this was something that I wanted to just quickly compile so I didn't bother adding GBA.

The file is 12.5kb and the download is here: You must login or register to view this content.

The reader is very basic, ShowDialog/BinaryReader + positioning where it starts reading at.

You must login or register to view this content.

You must login or register to view this content.

    

string path;
string version = "null";
private void button1_Click(object sender, EventArgs e)
{
OpenFileDialog ofd = new OpenFileDialog();
ofd.Filter = "Gameboy|*.gb|Gameboy Color|*.gbc";
if (ofd.ShowDialog() == DialogResult.OK)
{
if (ofd.SafeFileName.EndsWith(".gb") || ofd.SafeFileName.EndsWith(".gbc") /*|| ofd.SafeFileName.EndsWith(".gba")*/)
{
path = ofd.FileName;
BinaryReader br = new BinaryReader(File.OpenRead(path));
br.BaseStream.Position = 0x13B;
byte[] buffer = br.ReadBytes(2);
Array.Reverse(buffer);
version = BitConverter.ToInt16(buffer, 0).ToString("x");
if (version == "2059")
{
this.Text = "Pokemon ROM Identifier - " + ofd.SafeFileName;
textBox1.Text = path;
textBox2.Text = "Pokemon Yellow Version - GameBoy";
textBox3.Text = version.ToUpper();
}
else if(version == "2052")
{
this.Text = "Pokemon ROM Identifier - " + ofd.SafeFileName;
textBox1.Text = path;
textBox2.Text = "Pokemon Red Version - GameBoy";
textBox3.Text = version.ToUpper();
}
else if (version == "2042")
{
this.Text = "Pokemon ROM Identifier - " + ofd.SafeFileName;
textBox1.Text = path;
textBox2.Text = "Pokemon Blue Version - GameBoy";
textBox3.Text = version.ToUpper();
}
else if (version == "5f47")
{
this.Text = "Pokemon ROM Identifier - " + ofd.SafeFileName;
textBox1.Text = path;
textBox2.Text = "Pokemon Gold Version - GameBoy";
textBox3.Text = version.ToUpper();
}
else if (version == "5f53")
{
this.Text = "Pokemon ROM Identifier - " + ofd.SafeFileName;
textBox1.Text = path;
textBox2.Text = "Pokemon Silver Version - GameBoy";
textBox3.Text = version.ToUpper();
}
else if (version == "5f43")
{
this.Text = "Pokemon ROM Identifier - " + ofd.SafeFileName;
textBox1.Text = path;
textBox2.Text = "Pokemon Crystal Version - GameBoy";
textBox3.Text = version.ToUpper();
}
else
{
this.Text = "Pokemon ROM Identifier";
textBox1.Text = path;
textBox2.Text = "Pokemon Game Unidentified";
textBox3.Text = "null";
}
br.Dispose();
}
else
{
MessageBox.Show("Dumbass, this only recognizes POKEMON games!", "Hey Idiot!");
}
}
}

(adsbygoogle = window.adsbygoogle || []).push({});

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo