private void buttonPatchRegion_Click(object sender, EventArgs e) { try { SSROMInfo ssRomInfo = new SSROMInfo(_path); string newCompatibleAreaSymbols = textBoxCompatibleAreaSymbol.Text; ssRomInfo.WriteCompatibleAreaSymbol(newCompatibleAreaSymbols); MessageBox.Show(@"Region updated.", @"Success", MessageBoxButtons.OK, MessageBoxIcon.Information); } catch (Exception exception) { MessageBox.Show(exception.ToString(), @"Error", MessageBoxButtons.OK, MessageBoxIcon.Error); //Console.WriteLine(exception); //throw; } }
private void buttonPatchHeader_Click(object sender, EventArgs e) { try { SSROMInfo ssRomInfo = new SSROMInfo(_path); string newHardwareIdentifier = textBoxHardwareIdentifier.Text; string newMakerId = textBoxMakerId.Text; string newProductNumber = textBoxProductNumber.Text; string newVersion = textBoxVersion.Text; string newReleaseDate = textBoxReleaseDate.Text; string newDeviceInformation = textBoxDeviceInformation.Text; string newCompatibleAreaSymbols = textBoxCompatibleAreaSymbol.Text; string newCompatiblePeripheralsString = textBoxCompatiblePeripheral.Text; string newGameTitle = textBoxGameTitle.Text; string newIpSize = textBoxIpSize.Text; string newStackM = textBoxStackM.Text; string newStackS = textBoxStackS.Text; string newFirstReadAddress = textBoxFirstReadAddress.Text; string newFirstReadSize = textBoxFirstReadSize.Text; ssRomInfo.WriteHardwareIdentifier(newHardwareIdentifier); ssRomInfo.WriteMakerId(newMakerId); ssRomInfo.WriteProductNumber(newProductNumber); ssRomInfo.WriteVersion(newVersion); ssRomInfo.WriteReleaseDate(newReleaseDate); ssRomInfo.WriteDeviceInformation(newDeviceInformation); ssRomInfo.WriteCompatibleAreaSymbol(newCompatibleAreaSymbols); ssRomInfo.WriteCompatiblePeripherals(newCompatiblePeripheralsString); ssRomInfo.WriteGameTitle(newGameTitle); ssRomInfo.WriteIpSize(newIpSize); ssRomInfo.WriteStackM(newStackM); ssRomInfo.WriteStackS(newStackS); ssRomInfo.WriteFirstReadAddress(newFirstReadAddress); ssRomInfo.WriteFirstReadSize(newFirstReadSize); MessageBox.Show(@"Header updated.", @"Success", MessageBoxButtons.OK, MessageBoxIcon.Information); } catch (Exception exception) { MessageBox.Show(exception.ToString(), @"Error", MessageBoxButtons.OK, MessageBoxIcon.Error); //Console.WriteLine(exception); //throw; } }
private void ParseROMFile() { SSROMInfo ssRomInfo = new SSROMInfo(_path); string compatibleAreaSymbols = ssRomInfo.GetCompatibleAreaSymbol(); string compatiblePeripherals = ssRomInfo.GetCompatiblePeripheral(); textBoxHardwareIdentifier.Text = ssRomInfo.GetHardwareIdentifier(); textBoxMakerId.Text = ssRomInfo.GetMakerId(); textBoxProductNumber.Text = ssRomInfo.GetProductNumber(); textBoxVersion.Text = ssRomInfo.GetVersion(); textBoxReleaseDate.Text = ssRomInfo.GetReleaseDate(); textBoxDeviceInformation.Text = ssRomInfo.GetDeviceInformation(); textBoxCompatibleAreaSymbol.Text = compatibleAreaSymbols; textBoxCompatiblePeripheral.Text = compatiblePeripherals; textBoxGameTitle.Text = ssRomInfo.GetGameTitle(); textBoxIpSize.Text = ssRomInfo.GetIpSize(); textBoxStackM.Text = ssRomInfo.GetStackM(); textBoxStackS.Text = ssRomInfo.GetStackS(); textBoxFirstReadAddress.Text = ssRomInfo.GetFirstReadAddress(); textBoxFirstReadSize.Text = ssRomInfo.GetFirstReadSize(); SetCompatibleAreaSymbolsCheckboxes(compatibleAreaSymbols); SetCompatiblePeripheralsCheckBoxes(compatiblePeripherals); }