• Just a reminder that providing specifics on, sharing links to, or naming websites where ROMs can be accessed is against the rules. If your post has any of this information it will be removed.
  • Ever thought it'd be cool to have your art, writing, or challenge runs featured on PokéCommunity? Click here for info - we'd love to spotlight your work!
  • Which Pokémon Masters protagonist do you like most? Let us know by casting a vote in our Masters favorite protagonist poll here!
  • Red, Hilda, Paxton, or Kellyn - which Pokémon protagonist is your favorite? Let us know by voting in our poll!
  • 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.

Currently making a GBA Pokemon ROM Hacking tool, any idea what's wrong with this code? (C#)

Momoro

I'm gonna put some dirt in your eye..
  • 269
    Posts
    5
    Years
    Hello 😃

    I recently revisited an old project of mine called Advance Edit (no idea if that name's taken 🤔 hope it isn't!), and I was going to make a sprite editor, but I've hit a roadblock 😕

    I program mainly in Windows Forms C#, so this is the code I wrote:

    Code:
    BinaryReader br = new BinaryReader(File.OpenRead(filename));
    
    br.BaseStream.Seek(0x728B04, SeekOrigin.Begin);
    
    byte[] bitmap = br.ReadBytes(Convert.ToInt32(br.BaseStream.Length));
    
    Bitmap myBitmap = new Bitmap(new MemoryStream(bitmap));
    
    pictureBox1.Image = myBitmap;
    
    br.Close();

    It should work to get the image from the ROM, but for some reason, it doesn't.

    The image I'm trying to get is Bulbasaur, and from a Firered ROM.

    Any ideas? Thanks 😄

    *Sorry if this is the wrong place to post this, I'm not good at forum areas 😛
     
    Please post anything related to ROM hacking in the appropriate section.
     
    Back
    Top