Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private void button1_Click(object sender, EventArgs e)
- {
- //when button is clicked, open file dialog
- OpenFileDialog ofd = new OpenFileDialog();
- ofd.Filter = "GB ROMs|*.gb";
- // if user selects a file, get the file name and display it in the label get only the name, not the path
- if (ofd.ShowDialog() == DialogResult.OK)
- {
- label1.Text = ofd.SafeFileName;
- }
- // get the map from the pointer
- // pointers are : 0x9800 to 0x9BFF for map 1 and 0x9C00 0x9FFF for map 2
- const int map1 = 0x9800;
- const int map2 = 0x9C00;
- // transform the data into a 2D array and display it in the textbox
Advertisement
Add Comment
Please, Sign In to add comment