diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..be0ff70 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,12 @@ +# EditorConfig is awesome: https://EditorConfig.org + +# top-most EditorConfig file +root = true + +# Unix-style newlines with a newline ending every file +[*] +end_of_line = lf +insert_final_newline = true +charset = utf-8 +indent_style = space +indent_size = 4 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..bf93424 --- /dev/null +++ b/.gitignore @@ -0,0 +1,8 @@ +################################################################################ +# This .gitignore file was automatically created by Microsoft(R) Visual Studio. +################################################################################ + +/.vs +/obj +*.rom +*.mdb diff --git a/App.config b/App.config deleted file mode 100644 index 3a4868f..0000000 --- a/App.config +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/PolarisBiosEditor.Designer.cs b/PolarisBiosEditor.Designer.cs index 9e3be62..1cbe7c7 100644 --- a/PolarisBiosEditor.Designer.cs +++ b/PolarisBiosEditor.Designer.cs @@ -28,459 +28,479 @@ protected override void Dispose(bool disposing) /// private void InitializeComponent() { - System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(PolarisBiosEditor)); - this.open = new System.Windows.Forms.Button(); - this.save = new System.Windows.Forms.Button(); - this.txtChecksum = new System.Windows.Forms.TextBox(); - this.txtBIOSBootupMessage = new System.Windows.Forms.TextBox(); - this.boxROM = new System.Windows.Forms.GroupBox(); - this.tableROM = new System.Windows.Forms.ListView(); - this.columnHeader1 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); - this.columnHeader2 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); - this.boxPOWERPLAY = new System.Windows.Forms.GroupBox(); - this.tablePOWERPLAY = new System.Windows.Forms.ListView(); - this.columnHeader3 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); - this.columnHeader4 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); - this.boxPOWERTUNE = new System.Windows.Forms.GroupBox(); - this.tablePOWERTUNE = new System.Windows.Forms.ListView(); - this.columnHeader5 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); - this.columnHeader6 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); - this.boxFAN = new System.Windows.Forms.GroupBox(); - this.tableFAN = new System.Windows.Forms.ListView(); - this.columnHeader9 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); - this.columnHeader10 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); - this.boxGPU = new System.Windows.Forms.GroupBox(); - this.tableGPU = new System.Windows.Forms.ListView(); - this.columnHeader11 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); - this.columnHeader12 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); - this.boxMEM = new System.Windows.Forms.GroupBox(); - this.tableMEMORY = new System.Windows.Forms.ListView(); - this.columnHeader13 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); - this.columnHeader14 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); - this.boxVRAM = new System.Windows.Forms.GroupBox(); - this.tableVRAM_TIMING = new System.Windows.Forms.ListView(); - this.columnHeader15 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); - this.columnHeader16 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); - this.listVRAM = new System.Windows.Forms.ComboBox(); - this.tableVRAM = new System.Windows.Forms.ListView(); - this.columnHeader7 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); - this.columnHeader8 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); - this.editSubItem1 = new System.Windows.Forms.TextBox(); - this.editSubItem2 = new System.Windows.Forms.TextBox(); - this.apply = new System.Windows.Forms.Button(); - this.button1 = new System.Windows.Forms.Button(); - this.linkLabel1 = new System.Windows.Forms.LinkLabel(); - this.boxROM.SuspendLayout(); - this.boxPOWERPLAY.SuspendLayout(); - this.boxPOWERTUNE.SuspendLayout(); - this.boxFAN.SuspendLayout(); - this.boxGPU.SuspendLayout(); - this.boxMEM.SuspendLayout(); - this.boxVRAM.SuspendLayout(); - this.SuspendLayout(); - // - // open - // - this.open.Location = new System.Drawing.Point(12, 12); - this.open.Name = "open"; - this.open.Size = new System.Drawing.Size(75, 23); - this.open.TabIndex = 0; - this.open.Text = "OPEN BIOS"; - this.open.UseVisualStyleBackColor = true; - this.open.Click += new System.EventHandler(this.OpenFileDialog_Click); - // - // save - // - this.save.Location = new System.Drawing.Point(93, 12); - this.save.Name = "save"; - this.save.Size = new System.Drawing.Size(75, 23); - this.save.TabIndex = 1; - this.save.Text = "SAVE AS"; - this.save.UseVisualStyleBackColor = true; - this.save.Click += new System.EventHandler(this.SaveFileDialog_Click); - // - // txtChecksum - // - this.txtChecksum.Font = new System.Drawing.Font("Courier New", 8.25F); - this.txtChecksum.Location = new System.Drawing.Point(174, 14); - this.txtChecksum.Name = "txtChecksum"; - this.txtChecksum.Size = new System.Drawing.Size(100, 20); - this.txtChecksum.TabIndex = 2; - // - // txtBIOSBootupMessage - // - this.txtBIOSBootupMessage.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.txtBIOSBootupMessage.Font = new System.Drawing.Font("Courier New", 8.25F); - this.txtBIOSBootupMessage.Location = new System.Drawing.Point(277, 15); - this.txtBIOSBootupMessage.Name = "txtBIOSBootupMessage"; - this.txtBIOSBootupMessage.Size = new System.Drawing.Size(531, 20); - this.txtBIOSBootupMessage.TabIndex = 5; - // - // boxROM - // - this.boxROM.Controls.Add(this.tableROM); - this.boxROM.Location = new System.Drawing.Point(9, 41); - this.boxROM.Name = "boxROM"; - this.boxROM.Size = new System.Drawing.Size(265, 140); - this.boxROM.TabIndex = 3; - this.boxROM.TabStop = false; - this.boxROM.Text = "ROM"; - // - // tableROM - // - this.tableROM.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { - this.columnHeader1, - this.columnHeader2}); - this.tableROM.Dock = System.Windows.Forms.DockStyle.Fill; - this.tableROM.Font = new System.Drawing.Font("Courier New", 8.25F); - this.tableROM.Location = new System.Drawing.Point(3, 16); - this.tableROM.Name = "tableROM"; - this.tableROM.Size = new System.Drawing.Size(259, 121); - this.tableROM.TabIndex = 4; - this.tableROM.UseCompatibleStateImageBehavior = false; - this.tableROM.View = System.Windows.Forms.View.Details; - // - // columnHeader1 - // - this.columnHeader1.Text = "Name"; - this.columnHeader1.Width = 40; - // - // columnHeader2 - // - this.columnHeader2.Text = "Value"; - // - // boxPOWERPLAY - // - this.boxPOWERPLAY.Controls.Add(this.tablePOWERPLAY); - this.boxPOWERPLAY.Location = new System.Drawing.Point(9, 184); - this.boxPOWERPLAY.Name = "boxPOWERPLAY"; - this.boxPOWERPLAY.Size = new System.Drawing.Size(265, 157); - this.boxPOWERPLAY.TabIndex = 0; - this.boxPOWERPLAY.TabStop = false; - this.boxPOWERPLAY.Text = "POWERPLAY"; - // - // tablePOWERPLAY - // - this.tablePOWERPLAY.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { - this.columnHeader3, - this.columnHeader4}); - this.tablePOWERPLAY.Dock = System.Windows.Forms.DockStyle.Fill; - this.tablePOWERPLAY.Font = new System.Drawing.Font("Courier New", 8.25F); - this.tablePOWERPLAY.Location = new System.Drawing.Point(3, 16); - this.tablePOWERPLAY.Name = "tablePOWERPLAY"; - this.tablePOWERPLAY.Size = new System.Drawing.Size(259, 138); - this.tablePOWERPLAY.TabIndex = 5; - this.tablePOWERPLAY.UseCompatibleStateImageBehavior = false; - this.tablePOWERPLAY.View = System.Windows.Forms.View.Details; - // - // columnHeader3 - // - this.columnHeader3.Text = "Name"; - // - // columnHeader4 - // - this.columnHeader4.Text = "Value"; - // - // boxPOWERTUNE - // - this.boxPOWERTUNE.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Left))); - this.boxPOWERTUNE.Controls.Add(this.tablePOWERTUNE); - this.boxPOWERTUNE.Location = new System.Drawing.Point(277, 374); - this.boxPOWERTUNE.Name = "boxPOWERTUNE"; - this.boxPOWERTUNE.Size = new System.Drawing.Size(260, 252); - this.boxPOWERTUNE.TabIndex = 0; - this.boxPOWERTUNE.TabStop = false; - this.boxPOWERTUNE.Text = "POWERTUNE"; - // - // tablePOWERTUNE - // - this.tablePOWERTUNE.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Left))); - this.tablePOWERTUNE.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { - this.columnHeader5, - this.columnHeader6}); - this.tablePOWERTUNE.Font = new System.Drawing.Font("Courier New", 8.25F); - this.tablePOWERTUNE.Location = new System.Drawing.Point(3, 16); - this.tablePOWERTUNE.Name = "tablePOWERTUNE"; - this.tablePOWERTUNE.Size = new System.Drawing.Size(254, 233); - this.tablePOWERTUNE.TabIndex = 6; - this.tablePOWERTUNE.UseCompatibleStateImageBehavior = false; - this.tablePOWERTUNE.View = System.Windows.Forms.View.Details; - // - // columnHeader5 - // - this.columnHeader5.Text = "Name"; - // - // columnHeader6 - // - this.columnHeader6.Text = "Value"; - // - // boxFAN - // - this.boxFAN.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Left))); - this.boxFAN.Controls.Add(this.tableFAN); - this.boxFAN.Location = new System.Drawing.Point(9, 344); - this.boxFAN.Name = "boxFAN"; - this.boxFAN.Size = new System.Drawing.Size(265, 282); - this.boxFAN.TabIndex = 0; - this.boxFAN.TabStop = false; - this.boxFAN.Text = "FAN"; - // - // tableFAN - // - this.tableFAN.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Left))); - this.tableFAN.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { - this.columnHeader9, - this.columnHeader10}); - this.tableFAN.Font = new System.Drawing.Font("Courier New", 8.25F); - this.tableFAN.Location = new System.Drawing.Point(3, 16); - this.tableFAN.Name = "tableFAN"; - this.tableFAN.Size = new System.Drawing.Size(259, 263); - this.tableFAN.TabIndex = 7; - this.tableFAN.UseCompatibleStateImageBehavior = false; - this.tableFAN.View = System.Windows.Forms.View.Details; - // - // columnHeader9 - // - this.columnHeader9.Text = "Name"; - // - // columnHeader10 - // - this.columnHeader10.Text = "Value"; - // - // boxGPU - // - this.boxGPU.Controls.Add(this.tableGPU); - this.boxGPU.Location = new System.Drawing.Point(277, 41); - this.boxGPU.Name = "boxGPU"; - this.boxGPU.Size = new System.Drawing.Size(260, 203); - this.boxGPU.TabIndex = 0; - this.boxGPU.TabStop = false; - this.boxGPU.Text = "GPU"; - // - // tableGPU - // - this.tableGPU.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { - this.columnHeader11, - this.columnHeader12}); - this.tableGPU.Dock = System.Windows.Forms.DockStyle.Fill; - this.tableGPU.Font = new System.Drawing.Font("Courier New", 8.25F); - this.tableGPU.Location = new System.Drawing.Point(3, 16); - this.tableGPU.Name = "tableGPU"; - this.tableGPU.Size = new System.Drawing.Size(254, 184); - this.tableGPU.TabIndex = 8; - this.tableGPU.UseCompatibleStateImageBehavior = false; - this.tableGPU.View = System.Windows.Forms.View.Details; - // - // columnHeader11 - // - this.columnHeader11.Text = "MHz"; - // - // columnHeader12 - // - this.columnHeader12.Text = "mV"; - // - // boxMEM - // - this.boxMEM.Controls.Add(this.tableMEMORY); - this.boxMEM.Location = new System.Drawing.Point(277, 247); - this.boxMEM.Name = "boxMEM"; - this.boxMEM.Size = new System.Drawing.Size(260, 124); - this.boxMEM.TabIndex = 0; - this.boxMEM.TabStop = false; - this.boxMEM.Text = "MEMORY"; - // - // tableMEMORY - // - this.tableMEMORY.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { - this.columnHeader13, - this.columnHeader14}); - this.tableMEMORY.Dock = System.Windows.Forms.DockStyle.Fill; - this.tableMEMORY.Font = new System.Drawing.Font("Courier New", 8.25F); - this.tableMEMORY.Location = new System.Drawing.Point(3, 16); - this.tableMEMORY.Name = "tableMEMORY"; - this.tableMEMORY.Size = new System.Drawing.Size(254, 105); - this.tableMEMORY.TabIndex = 9; - this.tableMEMORY.UseCompatibleStateImageBehavior = false; - this.tableMEMORY.View = System.Windows.Forms.View.Details; - // - // columnHeader13 - // - this.columnHeader13.Text = "MHz"; - // - // columnHeader14 - // - this.columnHeader14.Text = "mV"; - // - // boxVRAM - // - this.boxVRAM.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.boxVRAM.Controls.Add(this.tableVRAM_TIMING); - this.boxVRAM.Controls.Add(this.listVRAM); - this.boxVRAM.Controls.Add(this.tableVRAM); - this.boxVRAM.Location = new System.Drawing.Point(540, 41); - this.boxVRAM.Name = "boxVRAM"; - this.boxVRAM.Size = new System.Drawing.Size(268, 585); - this.boxVRAM.TabIndex = 0; - this.boxVRAM.TabStop = false; - this.boxVRAM.Text = "VRAM"; - // - // tableVRAM_TIMING - // - this.tableVRAM_TIMING.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.tableVRAM_TIMING.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { - this.columnHeader15, - this.columnHeader16}); - this.tableVRAM_TIMING.Font = new System.Drawing.Font("Courier New", 8.25F); - this.tableVRAM_TIMING.Location = new System.Drawing.Point(3, 209); - this.tableVRAM_TIMING.Name = "tableVRAM_TIMING"; - this.tableVRAM_TIMING.Size = new System.Drawing.Size(262, 373); - this.tableVRAM_TIMING.TabIndex = 11; - this.tableVRAM_TIMING.UseCompatibleStateImageBehavior = false; - this.tableVRAM_TIMING.View = System.Windows.Forms.View.Details; - // - // columnHeader15 - // - this.columnHeader15.Text = "MHz"; - // - // columnHeader16 - // - this.columnHeader16.Text = "Timing Strap"; - this.columnHeader16.Width = 110; - // - // listVRAM - // - this.listVRAM.Dock = System.Windows.Forms.DockStyle.Top; - this.listVRAM.Font = new System.Drawing.Font("Courier New", 8.25F); - this.listVRAM.FormattingEnabled = true; - this.listVRAM.Location = new System.Drawing.Point(3, 16); - this.listVRAM.Name = "listVRAM"; - this.listVRAM.Size = new System.Drawing.Size(262, 22); - this.listVRAM.TabIndex = 12; - this.listVRAM.SelectedIndexChanged += new System.EventHandler(this.listVRAM_SelectedIndexChanged); - this.listVRAM.SelectedValueChanged += new System.EventHandler(this.listVRAM_SelectionChanged); - // - // tableVRAM - // - this.tableVRAM.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.tableVRAM.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { - this.columnHeader7, - this.columnHeader8}); - this.tableVRAM.Font = new System.Drawing.Font("Courier New", 8.25F); - this.tableVRAM.Location = new System.Drawing.Point(3, 43); - this.tableVRAM.Name = "tableVRAM"; - this.tableVRAM.Size = new System.Drawing.Size(262, 160); - this.tableVRAM.TabIndex = 10; - this.tableVRAM.UseCompatibleStateImageBehavior = false; - this.tableVRAM.View = System.Windows.Forms.View.Details; - // - // columnHeader7 - // - this.columnHeader7.Text = "Name"; - // - // columnHeader8 - // - this.columnHeader8.Text = "Value"; - // - // editSubItem1 - // - this.editSubItem1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.editSubItem1.Font = new System.Drawing.Font("Courier New", 8.25F); - this.editSubItem1.Location = new System.Drawing.Point(100, 644); - this.editSubItem1.Name = "editSubItem1"; - this.editSubItem1.Size = new System.Drawing.Size(220, 20); - this.editSubItem1.TabIndex = 2; - // - // editSubItem2 - // - this.editSubItem2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.editSubItem2.Font = new System.Drawing.Font("Courier New", 8.25F); - this.editSubItem2.Location = new System.Drawing.Point(9, 688); - this.editSubItem2.Name = "editSubItem2"; - this.editSubItem2.Size = new System.Drawing.Size(799, 20); - this.editSubItem2.TabIndex = 2; - this.editSubItem2.Click += new System.EventHandler(this.editSubItem2_Click); - // - // apply - // - this.apply.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); - this.apply.Location = new System.Drawing.Point(10, 642); - this.apply.Name = "apply"; - this.apply.Size = new System.Drawing.Size(84, 23); - this.apply.TabIndex = 0; - this.apply.Text = "APPLY CHG"; - this.apply.UseVisualStyleBackColor = true; - this.apply.Click += new System.EventHandler(this.apply_Click); - // - // button1 - // - this.button1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.button1.Location = new System.Drawing.Point(558, 642); - this.button1.Name = "button1"; - this.button1.Size = new System.Drawing.Size(241, 23); - this.button1.TabIndex = 4; - this.button1.Text = "ONE CLICK TIMING PATCH"; - this.button1.UseVisualStyleBackColor = true; - this.button1.Click += new System.EventHandler(this.button1_Click); - // - // linkLabel1 - // - this.linkLabel1.AutoSize = true; - this.linkLabel1.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.linkLabel1.LinkColor = System.Drawing.Color.Red; - this.linkLabel1.Location = new System.Drawing.Point(12, 669); - this.linkLabel1.Name = "linkLabel1"; - this.linkLabel1.Size = new System.Drawing.Size(275, 16); - this.linkLabel1.TabIndex = 6; - this.linkLabel1.TabStop = true; - this.linkLabel1.Text = "BUY PolariBiosEditor Pro performance"; - this.linkLabel1.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabel1_LinkClicked); - // - // PolarisBiosEditor - // - this.ClientSize = new System.Drawing.Size(820, 733); - this.Controls.Add(this.linkLabel1); - this.Controls.Add(this.button1); - this.Controls.Add(this.boxFAN); - this.Controls.Add(this.boxVRAM); - this.Controls.Add(this.boxMEM); - this.Controls.Add(this.boxGPU); - this.Controls.Add(this.boxPOWERTUNE); - this.Controls.Add(this.boxPOWERPLAY); - this.Controls.Add(this.boxROM); - this.Controls.Add(this.txtChecksum); - this.Controls.Add(this.txtBIOSBootupMessage); - this.Controls.Add(this.save); - this.Controls.Add(this.open); - this.Controls.Add(this.editSubItem1); - this.Controls.Add(this.editSubItem2); - this.Controls.Add(this.apply); - this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); - this.Name = "PolarisBiosEditor"; - this.Text = "PBE"; - this.Load += new System.EventHandler(this.PolarisBiosEditor_Load); - this.boxROM.ResumeLayout(false); - this.boxPOWERPLAY.ResumeLayout(false); - this.boxPOWERTUNE.ResumeLayout(false); - this.boxFAN.ResumeLayout(false); - this.boxGPU.ResumeLayout(false); - this.boxMEM.ResumeLayout(false); - this.boxVRAM.ResumeLayout(false); - this.ResumeLayout(false); - this.PerformLayout(); - + System.Windows.Forms.ColumnHeader VddciFakeIgnoredColumnToForbidEdits; + this.open = new System.Windows.Forms.Button(); + this.save = new System.Windows.Forms.Button(); + this.txtChecksum = new System.Windows.Forms.TextBox(); + this.txtBIOSBootupMessage = new System.Windows.Forms.TextBox(); + this.boxROM = new System.Windows.Forms.GroupBox(); + this.tableROM = new System.Windows.Forms.ListView(); + this.columnHeader1 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); + this.columnHeader2 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); + this.boxPOWERPLAY = new System.Windows.Forms.GroupBox(); + this.tablePOWERPLAY = new System.Windows.Forms.ListView(); + this.columnHeader3 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); + this.columnHeader4 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); + this.boxPOWERTUNE = new System.Windows.Forms.GroupBox(); + this.tablePOWERTUNE = new System.Windows.Forms.ListView(); + this.columnHeader5 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); + this.columnHeader6 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); + this.boxFAN = new System.Windows.Forms.GroupBox(); + this.tableFAN = new System.Windows.Forms.ListView(); + this.columnHeader9 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); + this.columnHeader10 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); + this.boxGPU = new System.Windows.Forms.GroupBox(); + this.tableGPU = new System.Windows.Forms.ListView(); + this.columnHeader11 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); + this.columnHeader12 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); + this.boxMEM = new System.Windows.Forms.GroupBox(); + this.tableMEMORY = new System.Windows.Forms.ListView(); + this.VddciMhz = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); + this.VddcimV = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); + this.boxVRAM = new System.Windows.Forms.GroupBox(); + this.tableVRAM_TIMING = new System.Windows.Forms.ListView(); + this.columnHeader15 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); + this.columnHeader16 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); + this.listVRAM = new System.Windows.Forms.ComboBox(); + this.tableVRAM = new System.Windows.Forms.ListView(); + this.columnHeader7 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); + this.columnHeader8 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); + this.editSubItem1 = new System.Windows.Forms.TextBox(); + this.editSubItem2 = new System.Windows.Forms.TextBox(); + this.apply = new System.Windows.Forms.Button(); + this.button1 = new System.Windows.Forms.Button(); + this.linkLabel1 = new System.Windows.Forms.LinkLabel(); + this.vddciIndex = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); + VddciFakeIgnoredColumnToForbidEdits = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); + this.boxROM.SuspendLayout(); + this.boxPOWERPLAY.SuspendLayout(); + this.boxPOWERTUNE.SuspendLayout(); + this.boxFAN.SuspendLayout(); + this.boxGPU.SuspendLayout(); + this.boxMEM.SuspendLayout(); + this.boxVRAM.SuspendLayout(); + this.SuspendLayout(); + // + // open + // + this.open.Location = new System.Drawing.Point(12, 12); + this.open.Name = "open"; + this.open.Size = new System.Drawing.Size(75, 23); + this.open.TabIndex = 0; + this.open.Text = "OPEN BIOS"; + this.open.UseVisualStyleBackColor = true; + this.open.Click += new System.EventHandler(this.OpenFileDialog_Click); + // + // save + // + this.save.Location = new System.Drawing.Point(93, 12); + this.save.Name = "save"; + this.save.Size = new System.Drawing.Size(75, 23); + this.save.TabIndex = 1; + this.save.Text = "SAVE AS"; + this.save.UseVisualStyleBackColor = true; + this.save.Click += new System.EventHandler(this.SaveFileDialog_Click); + // + // txtChecksum + // + this.txtChecksum.Font = new System.Drawing.Font("Courier New", 8.25F); + this.txtChecksum.Location = new System.Drawing.Point(174, 14); + this.txtChecksum.Name = "txtChecksum"; + this.txtChecksum.Size = new System.Drawing.Size(100, 20); + this.txtChecksum.TabIndex = 2; + // + // txtBIOSBootupMessage + // + this.txtBIOSBootupMessage.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.txtBIOSBootupMessage.Font = new System.Drawing.Font("Courier New", 8.25F); + this.txtBIOSBootupMessage.Location = new System.Drawing.Point(277, 15); + this.txtBIOSBootupMessage.Name = "txtBIOSBootupMessage"; + this.txtBIOSBootupMessage.Size = new System.Drawing.Size(531, 20); + this.txtBIOSBootupMessage.TabIndex = 5; + // + // boxROM + // + this.boxROM.Controls.Add(this.tableROM); + this.boxROM.Location = new System.Drawing.Point(9, 41); + this.boxROM.Name = "boxROM"; + this.boxROM.Size = new System.Drawing.Size(265, 140); + this.boxROM.TabIndex = 3; + this.boxROM.TabStop = false; + this.boxROM.Text = "ROM"; + // + // tableROM + // + this.tableROM.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { + this.columnHeader1, + this.columnHeader2}); + this.tableROM.Dock = System.Windows.Forms.DockStyle.Fill; + this.tableROM.Font = new System.Drawing.Font("Courier New", 8.25F); + this.tableROM.HideSelection = false; + this.tableROM.Location = new System.Drawing.Point(3, 16); + this.tableROM.Name = "tableROM"; + this.tableROM.Size = new System.Drawing.Size(259, 121); + this.tableROM.TabIndex = 4; + this.tableROM.UseCompatibleStateImageBehavior = false; + this.tableROM.View = System.Windows.Forms.View.Details; + // + // columnHeader1 + // + this.columnHeader1.Text = "Name"; + this.columnHeader1.Width = 40; + // + // columnHeader2 + // + this.columnHeader2.Text = "Value"; + // + // boxPOWERPLAY + // + this.boxPOWERPLAY.Controls.Add(this.tablePOWERPLAY); + this.boxPOWERPLAY.Location = new System.Drawing.Point(9, 184); + this.boxPOWERPLAY.Name = "boxPOWERPLAY"; + this.boxPOWERPLAY.Size = new System.Drawing.Size(265, 157); + this.boxPOWERPLAY.TabIndex = 0; + this.boxPOWERPLAY.TabStop = false; + this.boxPOWERPLAY.Text = "POWERPLAY"; + // + // tablePOWERPLAY + // + this.tablePOWERPLAY.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { + this.columnHeader3, + this.columnHeader4}); + this.tablePOWERPLAY.Dock = System.Windows.Forms.DockStyle.Fill; + this.tablePOWERPLAY.Font = new System.Drawing.Font("Courier New", 8.25F); + this.tablePOWERPLAY.HideSelection = false; + this.tablePOWERPLAY.Location = new System.Drawing.Point(3, 16); + this.tablePOWERPLAY.Name = "tablePOWERPLAY"; + this.tablePOWERPLAY.Size = new System.Drawing.Size(259, 138); + this.tablePOWERPLAY.TabIndex = 5; + this.tablePOWERPLAY.UseCompatibleStateImageBehavior = false; + this.tablePOWERPLAY.View = System.Windows.Forms.View.Details; + // + // columnHeader3 + // + this.columnHeader3.Text = "Name"; + // + // columnHeader4 + // + this.columnHeader4.Text = "Value"; + // + // boxPOWERTUNE + // + this.boxPOWERTUNE.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left))); + this.boxPOWERTUNE.Controls.Add(this.tablePOWERTUNE); + this.boxPOWERTUNE.Location = new System.Drawing.Point(277, 374); + this.boxPOWERTUNE.Name = "boxPOWERTUNE"; + this.boxPOWERTUNE.Size = new System.Drawing.Size(260, 252); + this.boxPOWERTUNE.TabIndex = 0; + this.boxPOWERTUNE.TabStop = false; + this.boxPOWERTUNE.Text = "POWERTUNE"; + // + // tablePOWERTUNE + // + this.tablePOWERTUNE.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left))); + this.tablePOWERTUNE.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { + this.columnHeader5, + this.columnHeader6}); + this.tablePOWERTUNE.Font = new System.Drawing.Font("Courier New", 8.25F); + this.tablePOWERTUNE.HideSelection = false; + this.tablePOWERTUNE.Location = new System.Drawing.Point(3, 16); + this.tablePOWERTUNE.Name = "tablePOWERTUNE"; + this.tablePOWERTUNE.Size = new System.Drawing.Size(254, 233); + this.tablePOWERTUNE.TabIndex = 6; + this.tablePOWERTUNE.UseCompatibleStateImageBehavior = false; + this.tablePOWERTUNE.View = System.Windows.Forms.View.Details; + // + // columnHeader5 + // + this.columnHeader5.Text = "Name"; + // + // columnHeader6 + // + this.columnHeader6.Text = "Value"; + // + // boxFAN + // + this.boxFAN.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left))); + this.boxFAN.Controls.Add(this.tableFAN); + this.boxFAN.Location = new System.Drawing.Point(9, 344); + this.boxFAN.Name = "boxFAN"; + this.boxFAN.Size = new System.Drawing.Size(265, 282); + this.boxFAN.TabIndex = 0; + this.boxFAN.TabStop = false; + this.boxFAN.Text = "FAN"; + // + // tableFAN + // + this.tableFAN.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left))); + this.tableFAN.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { + this.columnHeader9, + this.columnHeader10}); + this.tableFAN.Font = new System.Drawing.Font("Courier New", 8.25F); + this.tableFAN.HideSelection = false; + this.tableFAN.Location = new System.Drawing.Point(3, 16); + this.tableFAN.Name = "tableFAN"; + this.tableFAN.Size = new System.Drawing.Size(259, 263); + this.tableFAN.TabIndex = 7; + this.tableFAN.UseCompatibleStateImageBehavior = false; + this.tableFAN.View = System.Windows.Forms.View.Details; + // + // columnHeader9 + // + this.columnHeader9.Text = "Name"; + // + // columnHeader10 + // + this.columnHeader10.Text = "Value"; + // + // boxGPU + // + this.boxGPU.Controls.Add(this.tableGPU); + this.boxGPU.Location = new System.Drawing.Point(277, 41); + this.boxGPU.Name = "boxGPU"; + this.boxGPU.Size = new System.Drawing.Size(260, 203); + this.boxGPU.TabIndex = 0; + this.boxGPU.TabStop = false; + this.boxGPU.Text = "GPU"; + // + // tableGPU + // + this.tableGPU.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { + this.columnHeader11, + this.columnHeader12}); + this.tableGPU.Dock = System.Windows.Forms.DockStyle.Fill; + this.tableGPU.Font = new System.Drawing.Font("Courier New", 8.25F); + this.tableGPU.HideSelection = false; + this.tableGPU.Location = new System.Drawing.Point(3, 16); + this.tableGPU.Name = "tableGPU"; + this.tableGPU.Size = new System.Drawing.Size(254, 184); + this.tableGPU.TabIndex = 8; + this.tableGPU.UseCompatibleStateImageBehavior = false; + this.tableGPU.View = System.Windows.Forms.View.Details; + // + // columnHeader11 + // + this.columnHeader11.Text = "MHz"; + // + // columnHeader12 + // + this.columnHeader12.Text = "mV"; + // + // boxMEM + // + this.boxMEM.Controls.Add(this.tableMEMORY); + this.boxMEM.Location = new System.Drawing.Point(277, 247); + this.boxMEM.Name = "boxMEM"; + this.boxMEM.Size = new System.Drawing.Size(260, 124); + this.boxMEM.TabIndex = 0; + this.boxMEM.TabStop = false; + this.boxMEM.Text = "vddci:edit by hex editor-adjust mV AND index"; + // + // tableMEMORY + // + this.tableMEMORY.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { + this.VddciMhz, + VddciFakeIgnoredColumnToForbidEdits, + this.VddcimV, + this.vddciIndex}); + this.tableMEMORY.Dock = System.Windows.Forms.DockStyle.Fill; + this.tableMEMORY.Font = new System.Drawing.Font("Courier New", 8.25F); + this.tableMEMORY.HideSelection = false; + this.tableMEMORY.Location = new System.Drawing.Point(3, 16); + this.tableMEMORY.Name = "tableMEMORY"; + this.tableMEMORY.Size = new System.Drawing.Size(254, 105); + this.tableMEMORY.TabIndex = 9; + this.tableMEMORY.UseCompatibleStateImageBehavior = false; + this.tableMEMORY.View = System.Windows.Forms.View.Details; + // + // VddciMhz + // + this.VddciMhz.Text = "MHz"; + // + // VddcimV + // + this.VddcimV.Text = "mV"; + // + // boxVRAM + // + this.boxVRAM.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.boxVRAM.Controls.Add(this.tableVRAM_TIMING); + this.boxVRAM.Controls.Add(this.listVRAM); + this.boxVRAM.Controls.Add(this.tableVRAM); + this.boxVRAM.Location = new System.Drawing.Point(540, 41); + this.boxVRAM.Name = "boxVRAM"; + this.boxVRAM.Size = new System.Drawing.Size(268, 585); + this.boxVRAM.TabIndex = 0; + this.boxVRAM.TabStop = false; + this.boxVRAM.Text = "VRAM"; + // + // tableVRAM_TIMING + // + this.tableVRAM_TIMING.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.tableVRAM_TIMING.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { + this.columnHeader15, + this.columnHeader16}); + this.tableVRAM_TIMING.Font = new System.Drawing.Font("Courier New", 8.25F); + this.tableVRAM_TIMING.HideSelection = false; + this.tableVRAM_TIMING.Location = new System.Drawing.Point(3, 209); + this.tableVRAM_TIMING.Name = "tableVRAM_TIMING"; + this.tableVRAM_TIMING.Size = new System.Drawing.Size(262, 373); + this.tableVRAM_TIMING.TabIndex = 11; + this.tableVRAM_TIMING.UseCompatibleStateImageBehavior = false; + this.tableVRAM_TIMING.View = System.Windows.Forms.View.Details; + // + // columnHeader15 + // + this.columnHeader15.Text = "MHz"; + // + // columnHeader16 + // + this.columnHeader16.Text = "Timing Strap"; + this.columnHeader16.Width = 110; + // + // listVRAM + // + this.listVRAM.Dock = System.Windows.Forms.DockStyle.Top; + this.listVRAM.Font = new System.Drawing.Font("Courier New", 8.25F); + this.listVRAM.FormattingEnabled = true; + this.listVRAM.Location = new System.Drawing.Point(3, 16); + this.listVRAM.Name = "listVRAM"; + this.listVRAM.Size = new System.Drawing.Size(262, 22); + this.listVRAM.TabIndex = 12; + this.listVRAM.SelectedIndexChanged += new System.EventHandler(this.listVRAM_SelectedIndexChanged); + this.listVRAM.SelectedValueChanged += new System.EventHandler(this.listVRAM_SelectionChanged); + // + // tableVRAM + // + this.tableVRAM.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.tableVRAM.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { + this.columnHeader7, + this.columnHeader8}); + this.tableVRAM.Font = new System.Drawing.Font("Courier New", 8.25F); + this.tableVRAM.HideSelection = false; + this.tableVRAM.Location = new System.Drawing.Point(3, 43); + this.tableVRAM.Name = "tableVRAM"; + this.tableVRAM.Size = new System.Drawing.Size(262, 160); + this.tableVRAM.TabIndex = 10; + this.tableVRAM.UseCompatibleStateImageBehavior = false; + this.tableVRAM.View = System.Windows.Forms.View.Details; + // + // columnHeader7 + // + this.columnHeader7.Text = "Name"; + // + // columnHeader8 + // + this.columnHeader8.Text = "Value"; + // + // editSubItem1 + // + this.editSubItem1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.editSubItem1.Font = new System.Drawing.Font("Courier New", 8.25F); + this.editSubItem1.Location = new System.Drawing.Point(100, 644); + this.editSubItem1.Name = "editSubItem1"; + this.editSubItem1.Size = new System.Drawing.Size(165, 20); + this.editSubItem1.TabIndex = 2; + // + // editSubItem2 + // + this.editSubItem2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.editSubItem2.Font = new System.Drawing.Font("Courier New", 8.25F); + this.editSubItem2.Location = new System.Drawing.Point(9, 688); + this.editSubItem2.Name = "editSubItem2"; + this.editSubItem2.Size = new System.Drawing.Size(799, 20); + this.editSubItem2.TabIndex = 2; + this.editSubItem2.Click += new System.EventHandler(this.editSubItem2_Click); + // + // apply + // + this.apply.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.apply.Location = new System.Drawing.Point(10, 642); + this.apply.Name = "apply"; + this.apply.Size = new System.Drawing.Size(84, 23); + this.apply.TabIndex = 0; + this.apply.Text = "APPLY CHG"; + this.apply.UseVisualStyleBackColor = true; + this.apply.Click += new System.EventHandler(this.apply_Click); + // + // button1 + // + this.button1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.button1.Location = new System.Drawing.Point(608, 642); + this.button1.Name = "button1"; + this.button1.Size = new System.Drawing.Size(191, 23); + this.button1.TabIndex = 4; + this.button1.Text = "ONE CLICK TIMING PATCH"; + this.button1.UseVisualStyleBackColor = true; + this.button1.Click += new System.EventHandler(this.button1_Click); + // + // linkLabel1 + // + this.linkLabel1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.linkLabel1.AutoSize = true; + this.linkLabel1.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.0F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.linkLabel1.Location = new System.Drawing.Point(280, 644); + this.linkLabel1.Name = "linkLabel1"; + this.linkLabel1.Size = new System.Drawing.Size(300, 16); + this.linkLabel1.TabIndex = 6; + this.linkLabel1.TabStop = true; + this.linkLabel1.Text = "BUY PolarisBiosEditor Pro performance GUI for miners\n\n(link kept from upstream vesrsion)"; + this.linkLabel1.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabel1_LinkClicked); + // + // VddciFakeIgnoredColumnToForbidEdits + // + VddciFakeIgnoredColumnToForbidEdits.Text = ""; + VddciFakeIgnoredColumnToForbidEdits.Width = 0; + // + // vddciIndex + // + this.vddciIndex.Text = "VddcIndex"; + // + // PolarisBiosEditor + // + this.ClientSize = new System.Drawing.Size(820, 733); + this.Controls.Add(this.linkLabel1); + this.Controls.Add(this.button1); + this.Controls.Add(this.boxFAN); + this.Controls.Add(this.boxVRAM); + this.Controls.Add(this.boxMEM); + this.Controls.Add(this.boxGPU); + this.Controls.Add(this.boxPOWERTUNE); + this.Controls.Add(this.boxPOWERPLAY); + this.Controls.Add(this.boxROM); + this.Controls.Add(this.txtChecksum); + this.Controls.Add(this.txtBIOSBootupMessage); + this.Controls.Add(this.save); + this.Controls.Add(this.open); + this.Controls.Add(this.editSubItem1); + this.Controls.Add(this.editSubItem2); + this.Controls.Add(this.apply); + this.Name = "PolarisBiosEditor"; + this.Text = "PBE"; + this.Load += new System.EventHandler(this.PolarisBiosEditor_Load); + this.boxROM.ResumeLayout(false); + this.boxPOWERPLAY.ResumeLayout(false); + this.boxPOWERTUNE.ResumeLayout(false); + this.boxFAN.ResumeLayout(false); + this.boxGPU.ResumeLayout(false); + this.boxMEM.ResumeLayout(false); + this.boxVRAM.ResumeLayout(false); + this.ResumeLayout(false); + this.PerformLayout(); + } #endregion @@ -515,8 +535,8 @@ private void InitializeComponent() private System.Windows.Forms.ColumnHeader columnHeader10; private System.Windows.Forms.ColumnHeader columnHeader11; private System.Windows.Forms.ColumnHeader columnHeader12; - private System.Windows.Forms.ColumnHeader columnHeader13; - private System.Windows.Forms.ColumnHeader columnHeader14; + private System.Windows.Forms.ColumnHeader VddciMhz; + private System.Windows.Forms.ColumnHeader VddcimV; private System.Windows.Forms.ColumnHeader columnHeader15; private System.Windows.Forms.ColumnHeader columnHeader16; private System.Windows.Forms.ColumnHeader columnHeader7; @@ -524,7 +544,8 @@ private void InitializeComponent() private System.Windows.Forms.TextBox editSubItem1; private System.Windows.Forms.TextBox editSubItem2; private System.Windows.Forms.Button apply; - private System.Windows.Forms.Button button1; - private System.Windows.Forms.LinkLabel linkLabel1; + private System.Windows.Forms.Button button1; + private System.Windows.Forms.LinkLabel linkLabel1; + private System.Windows.Forms.ColumnHeader vddciIndex; } } diff --git a/PolarisBiosEditor.cs b/PolarisBiosEditor.cs index 049ef8a..d204910 100644 --- a/PolarisBiosEditor.cs +++ b/PolarisBiosEditor.cs @@ -1,1674 +1,2951 @@ -using System; -using System.Collections.Generic; -using System.Drawing; -using System.Text; -using System.Windows.Forms; -using System.IO; -using System.Runtime.InteropServices; -using System.Windows; -using System.Linq; -using System.ComponentModel; -using System.Net; - -namespace PolarisBiosEditor -{ - public partial class PolarisBiosEditor : Form - { - - /* DATA */ - - string version = "1.7.3"; - string programTitle = "PolarisBiosEditor"; - - - string[] manufacturers = new string[] - { - "SAMSUNG", - "ELPIDA", - "HYNIX", - "MICRON" - }; - - string[] supportedDeviceID = new string[] { "67DF", "67EF", "1002", "67FF", "699F" }; - - string[] timings = new string[] - { - - // UberMix 3.1 - "777000000000000022CC1C00AD615C41C0590E152ECCA60B006007000B031420FA8900A00300000010122F3FBA354019", // new, please test - //"777000000000000022CC1C00AD615C41C0590E152ECC8608006007000B031420FA8900A00300000010122F3FBA354019", //old - - // FIXME Try UberMix 3.2 Timing - "777000000000000022CC1C00CEE55C46C0590E1532CD66090060070014051420FA8900A00300000012123442C3353C19", - - // Good HYNIX_3 BY VASKE - "999000000000000022CC1C00ADDD5B44A0551315B74C450A00400600750414206A8900A00200312010112D34C5303F17", - - // Good HYNIX_2 - "777000000000000022AA1C00B56A6D46C0551017BE8E060C006AE6000C081420EA8900AB030000001B162C31C0313F17", - - // Good Micron - //"777000000000000022AA1C0073626C41B0551016BA0D260B006AE60004061420EA8940AA030000001914292EB22E3B16", old - "777000000000000022AA1C0073626C41B0551016BA0D260B0060060004061420EA8940AA030000001914292EB22E3B16", // new tested timings (much better xmr performance @ rx560 sapphire pulse) - "777000000000000022AA1C00B56A6D4690551014BE8E060C0060060074081420EA8900AB020000001B162C31C02E3F15",// new Micron timing it's actually from Samsung - - // Good Hynix_1 - "999000000000000022559D0010DE5B4480551312B74C450A00400600750414206A8900A00200312010112D34A42A3816", - - // Good Elpida (fixed by VASKE) - "777000000000000022AA1C00EF595B36A0550F15B68C1506004082007C041420CA8980A9020004C01712262B612B3715", - //"777000000000000022AA1C00AC615B3CA0550F142C8C1506006004007C041420CA8980A9020004C01712262B612B3715" // new, please test - - // Universal Hynix - "777000000000000022AA1C00B56A6D46C0551017BE8E060C006006000C081420EA8900AB030000001B162C31C0313F17", - - //Hynix 4 by vaske - "999000000000000022559D0031626C46905F1015BC0D060C004004007D0714204A8900A0020071241B12312CC02D3C17", //new, please test - - //Samsung K4G80325FC // let's call it samsung4 pro timing - "777000000000000022CC1C00106A5D4DD0571016B90D060C0060070014051420FA8900A0030000001011333DC0303A17", //new, please test - - //Samsung K4G80325FC // let's call it samsung4 basic timing - "777000000000000022CC1C00106A6D4DD0571016B90D060C0060070014051420FA8900A0030000001B11333DC0303A17" //new, please test - }; - - Dictionary rc = new Dictionary(); - - [StructLayout(LayoutKind.Explicit, Size = 96, CharSet = CharSet.Ansi)] - public class VRAM_TIMING_RX - { - - } - - Byte[] buffer; - Int32Converter int32 = new Int32Converter(); - UInt32Converter uint32 = new UInt32Converter(); - - string deviceID = ""; - Boolean hasInternetAccess = false; - - int atom_rom_checksum_offset = 0x21; - int atom_rom_header_ptr = 0x48; - int atom_rom_header_offset; - ATOM_ROM_HEADER atom_rom_header; - ATOM_DATA_TABLES atom_data_table; - - int atom_powerplay_offset; - ATOM_POWERPLAY_TABLE atom_powerplay_table; - - int atom_powertune_offset; - ATOM_POWERTUNE_TABLE atom_powertune_table; - - int atom_fan_offset; - ATOM_FAN_TABLE atom_fan_table; - - int atom_mclk_table_offset; - ATOM_MCLK_TABLE atom_mclk_table; - ATOM_MCLK_ENTRY[] atom_mclk_entries; - - int atom_sclk_table_offset; - ATOM_SCLK_TABLE atom_sclk_table; - ATOM_SCLK_ENTRY[] atom_sclk_entries; - - int atom_vddc_table_offset; - ATOM_VOLTAGE_TABLE atom_vddc_table; - ATOM_VOLTAGE_ENTRY[] atom_vddc_entries; - - int atom_vram_info_offset; - ATOM_VRAM_INFO atom_vram_info; - ATOM_VRAM_ENTRY[] atom_vram_entries; - ATOM_VRAM_TIMING_ENTRY[] atom_vram_timing_entries; - int atom_vram_index = 0; - const int MAX_VRAM_ENTRIES = 48; // e.g. MSI-Armor-RX-580-4GB has 36 entries - int atom_vram_timing_offset; - - [StructLayout(LayoutKind.Sequential, Pack = 1)] - struct ATOM_COMMON_TABLE_HEADER - { - public Int16 usStructureSize; - public Byte ucTableFormatRevision; - public Byte ucTableContentRevision; - } - - [StructLayout(LayoutKind.Sequential, Pack = 1)] - struct ATOM_ROM_HEADER - { - public ATOM_COMMON_TABLE_HEADER sHeader; - //public UInt32 uaFirmWareSignature; - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 0x4)] - public Char[] uaFirmWareSignature; - public UInt16 usBiosRuntimeSegmentAddress; - public UInt16 usProtectedModeInfoOffset; - public UInt16 usConfigFilenameOffset; - public UInt16 usCRC_BlockOffset; - public UInt16 usBIOS_BootupMessageOffset; - public UInt16 usInt10Offset; - public UInt16 usPciBusDevInitCode; - public UInt16 usIoBaseAddress; - public UInt16 usSubsystemVendorID; - public UInt16 usSubsystemID; - public UInt16 usPCI_InfoOffset; - public UInt16 usMasterCommandTableOffset; - public UInt16 usMasterDataTableOffset; - public Byte ucExtendedFunctionCode; - public Byte ucReserved; - public UInt32 ulPSPDirTableOffset; - public UInt16 usVendorID; - public UInt16 usDeviceID; - } - - String BIOS_BootupMessage; - - [StructLayout(LayoutKind.Sequential, Pack = 1)] - struct ATOM_DATA_TABLES - { - public ATOM_COMMON_TABLE_HEADER sHeader; - public UInt16 UtilityPipeLine; - public UInt16 MultimediaCapabilityInfo; - public UInt16 MultimediaConfigInfo; - public UInt16 StandardVESA_Timing; - public UInt16 FirmwareInfo; - public UInt16 PaletteData; - public UInt16 LCD_Info; - public UInt16 DIGTransmitterInfo; - public UInt16 SMU_Info; - public UInt16 SupportedDevicesInfo; - public UInt16 GPIO_I2C_Info; - public UInt16 VRAM_UsageByFirmware; - public UInt16 GPIO_Pin_LUT; - public UInt16 VESA_ToInternalModeLUT; - public UInt16 GFX_Info; - public UInt16 PowerPlayInfo; - public UInt16 GPUVirtualizationInfo; - public UInt16 SaveRestoreInfo; - public UInt16 PPLL_SS_Info; - public UInt16 OemInfo; - public UInt16 XTMDS_Info; - public UInt16 MclkSS_Info; - public UInt16 Object_Header; - public UInt16 IndirectIOAccess; - public UInt16 MC_InitParameter; - public UInt16 ASIC_VDDC_Info; - public UInt16 ASIC_InternalSS_Info; - public UInt16 TV_VideoMode; - public UInt16 VRAM_Info; - public UInt16 MemoryTrainingInfo; - public UInt16 IntegratedSystemInfo; - public UInt16 ASIC_ProfilingInfo; - public UInt16 VoltageObjectInfo; - public UInt16 PowerSourceInfo; - public UInt16 ServiceInfo; - }; - - [StructLayout(LayoutKind.Sequential, Pack = 1)] - unsafe struct ATOM_POWERPLAY_TABLE - { - public ATOM_COMMON_TABLE_HEADER sHeader; - public Byte ucTableRevision; - public UInt16 usTableSize; - public UInt32 ulGoldenPPID; - public UInt32 ulGoldenRevision; - public UInt16 usFormatID; - public UInt16 usVoltageTime; - public UInt32 ulPlatformCaps; - public UInt32 ulMaxODEngineClock; - public UInt32 ulMaxODMemoryClock; - public UInt16 usPowerControlLimit; - public UInt16 usUlvVoltageOffset; - public UInt16 usStateArrayOffset; - public UInt16 usFanTableOffset; - public UInt16 usThermalControllerOffset; - public UInt16 usReserv; - public UInt16 usMclkDependencyTableOffset; - public UInt16 usSclkDependencyTableOffset; - public UInt16 usVddcLookupTableOffset; - public UInt16 usVddgfxLookupTableOffset; - public UInt16 usMMDependencyTableOffset; - public UInt16 usVCEStateTableOffset; - public UInt16 usPPMTableOffset; - public UInt16 usPowerTuneTableOffset; - public UInt16 usHardLimitTableOffset; - public UInt16 usPCIETableOffset; - public UInt16 usGPIOTableOffset; - public fixed UInt16 usReserved[6]; - }; - - [StructLayout(LayoutKind.Sequential, Pack = 1)] - struct ATOM_MCLK_ENTRY - { - public Byte ucVddcInd; - public UInt16 usVddci; - public UInt16 usVddgfxOffset; - public UInt16 usMvdd; - public UInt32 ulMclk; - public UInt16 usReserved; - }; - - [StructLayout(LayoutKind.Sequential, Pack = 1)] - struct ATOM_MCLK_TABLE - { - public Byte ucRevId; - public Byte ucNumEntries; - // public unsafe fixed byte ATOM_MCLK_ENTRY entries[ucNumEntries]; [3] - }; - - [StructLayout(LayoutKind.Sequential, Pack = 1)] - struct ATOM_SCLK_ENTRY - { - public Byte ucVddInd; - public UInt16 usVddcOffset; - public UInt32 ulSclk; - public UInt16 usEdcCurrent; - public Byte ucReliabilityTemperature; - public Byte ucCKSVOffsetandDisable; - public UInt32 ulSclkOffset; - // Polaris Only, remove for compatibility with Fiji - }; - - [StructLayout(LayoutKind.Sequential, Pack = 1)] - struct ATOM_SCLK_TABLE - { - public Byte ucRevId; - public Byte ucNumEntries; - // public unsafe fixed byte ATOM_SCLK_ENTRY entries[ucNumEntries]; [8] - }; - - [StructLayout(LayoutKind.Sequential, Pack = 1)] - struct ATOM_VOLTAGE_ENTRY - { - public UInt16 usVdd; - public UInt16 usCACLow; - public UInt16 usCACMid; - public UInt16 usCACHigh; - }; - - [StructLayout(LayoutKind.Sequential, Pack = 1)] - struct ATOM_VOLTAGE_TABLE - { - public Byte ucRevId; - public Byte ucNumEntries; - // public unsafe fixed byte ATOM_VOLTAGE_ENTRY entries[ucNumEntries]; [8] - }; - - [StructLayout(LayoutKind.Sequential, Pack = 1)] - struct ATOM_FAN_TABLE - { - public Byte ucRevId; - public Byte ucTHyst; - public UInt16 usTMin; - public UInt16 usTMed; - public UInt16 usTHigh; - public UInt16 usPWMMin; - public UInt16 usPWMMed; - public UInt16 usPWMHigh; - public UInt16 usTMax; - public Byte ucFanControlMode; - public UInt16 usFanPWMMax; - public UInt16 usFanOutputSensitivity; - public UInt16 usFanRPMMax; - public UInt32 ulMinFanSCLKAcousticLimit; - public Byte ucTargetTemperature; - public Byte ucMinimumPWMLimit; - public UInt16 usFanGainEdge; - public UInt16 usFanGainHotspot; - public UInt16 usFanGainLiquid; - public UInt16 usFanGainVrVddc; - public UInt16 usFanGainVrMvdd; - public UInt16 usFanGainPlx; - public UInt16 usFanGainHbm; - public UInt16 usReserved; - }; - - [StructLayout(LayoutKind.Sequential, Pack = 1)] - struct ATOM_POWERTUNE_TABLE - { - public Byte ucRevId; - public UInt16 usTDP; - public UInt16 usConfigurableTDP; - public UInt16 usTDC; - public UInt16 usBatteryPowerLimit; - public UInt16 usSmallPowerLimit; - public UInt16 usLowCACLeakage; - public UInt16 usHighCACLeakage; - public UInt16 usMaximumPowerDeliveryLimit; - public UInt16 usTjMax; - public UInt16 usPowerTuneDataSetID; - public UInt16 usEDCLimit; - public UInt16 usSoftwareShutdownTemp; - public UInt16 usClockStretchAmount; - public UInt16 usTemperatureLimitHotspot; - public UInt16 usTemperatureLimitLiquid1; - public UInt16 usTemperatureLimitLiquid2; - public UInt16 usTemperatureLimitVrVddc; - public UInt16 usTemperatureLimitVrMvdd; - public UInt16 usTemperatureLimitPlx; - public Byte ucLiquid1_I2C_address; - public Byte ucLiquid2_I2C_address; - public Byte ucLiquid_I2C_Line; - public Byte ucVr_I2C_address; - public Byte ucVr_I2C_Line; - public Byte ucPlx_I2C_address; - public Byte ucPlx_I2C_Line; - public UInt16 usReserved; - }; - - [StructLayout(LayoutKind.Sequential, Pack = 1)] - struct ATOM_VRAM_TIMING_ENTRY - { - public UInt32 ulClkRange; - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 0x30)] - public Byte[] ucLatency; - }; - - [StructLayout(LayoutKind.Sequential, Pack = 1)] - struct ATOM_VRAM_ENTRY - { - public UInt32 ulChannelMapCfg; - public UInt16 usModuleSize; - public UInt16 usMcRamCfg; - public UInt16 usEnableChannels; - public Byte ucExtMemoryID; - public Byte ucMemoryType; - public Byte ucChannelNum; - public Byte ucChannelWidth; - public Byte ucDensity; - public Byte ucBankCol; - public Byte ucMisc; - public Byte ucVREFI; - public UInt16 usReserved; - public UInt16 usMemorySize; - public Byte ucMcTunningSetId; - public Byte ucRowNum; - public UInt16 usEMRS2Value; - public UInt16 usEMRS3Value; - public Byte ucMemoryVenderID; - public Byte ucRefreshRateFactor; - public Byte ucFIFODepth; - public Byte ucCDR_Bandwidth; - public UInt32 ulChannelMapCfg1; - public UInt32 ulBankMapCfg; - public UInt32 ulReserved; - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 20)] - public Byte[] strMemPNString; - }; - - [StructLayout(LayoutKind.Sequential, Pack = 1)] - struct ATOM_VRAM_INFO - { - public ATOM_COMMON_TABLE_HEADER sHeader; - public UInt16 usMemAdjustTblOffset; - public UInt16 usMemClkPatchTblOffset; - public UInt16 usMcAdjustPerTileTblOffset; - public UInt16 usMcPhyInitTableOffset; - public UInt16 usDramDataRemapTblOffset; - public UInt16 usReserved1; - public Byte ucNumOfVRAMModule; - public Byte ucMemoryClkPatchTblVer; - public Byte ucVramModuleVer; - public Byte ucMcPhyTileNum; - // public ATOM_VRAM_ENTRY aVramInfo[ucNumOfVRAMModule]; - } - - [STAThread] - static void Main(string[] args) - { - PolarisBiosEditor pbe = new PolarisBiosEditor(); - Application.Run(pbe); - } - - static byte[] getBytes(object obj) - { - int size = Marshal.SizeOf(obj); - byte[] arr = new byte[size]; - IntPtr ptr = Marshal.AllocHGlobal(size); - - Marshal.StructureToPtr(obj, ptr, true); - Marshal.Copy(ptr, arr, 0, size); - Marshal.FreeHGlobal(ptr); - - return arr; - } - - static T fromBytes(byte[] arr) - { - T obj = default(T); - int size = Marshal.SizeOf(obj); - IntPtr ptr = Marshal.AllocHGlobal(size); - - Marshal.Copy(arr, 0, ptr, size); - obj = (T)Marshal.PtrToStructure(ptr, obj.GetType()); - Marshal.FreeHGlobal(ptr); - - return obj; - } - - public void setBytesAtPosition(byte[] dest, int ptr, byte[] src) - { - for (var i = 0; i < src.Length; i++) - { - dest[ptr + i] = src[i]; - } - } - - private ListViewItem handler; - - private void listView_ChangeSelection(object sender, EventArgs e) - { - ListView lb = sender as ListView; - String sel_name = lb.SelectedItems[0].Text; - - for (var i = 0; i < lb.Items.Count; i++) - { - - ListViewItem container = lb.Items[i]; - var name = container.Text; - var value = container.SubItems[1].Text; - - if (name == sel_name) - { - editSubItem1.Text = name; - editSubItem2.Text = value; - handler = container; - } - - } - } - - private void apply_Click(object sender, EventArgs e) - { - if (handler != null) - { - handler.Text = editSubItem1.Text; - handler.SubItems[1].Text = editSubItem2.Text; - } - } - - public PolarisBiosEditor() - { - InitializeComponent(); - this.Text = this.programTitle + " " + this.version + " " + "Tweaked By VASKE"; - - try - { - - WebClient myWebClient = new WebClient(); - Stream myStream = myWebClient.OpenRead("https://raw.githubusercontent.com/vvaske/PolarisBiosEditor/master/version"); - StreamReader sr = new StreamReader(myStream); - string newVersion = sr.ReadToEnd().Trim(); - if (!newVersion.Equals(version)) { - MessageBox.Show("There is a new version available! " + version + " -> " + newVersion); - } - myStream.Close(); - - myStream = myWebClient.OpenRead("https://raw.githubusercontent.com/vvaske/PolarisBiosEditor/master/notice"); - sr = new StreamReader(myStream); - string notice = sr.ReadToEnd().Trim(); - - MessageBoxButtons buttons = MessageBoxButtons.YesNo; - DialogResult result; - - result = MessageBox.Show(notice + "\n\nClick Yes button to copy to clipboard", "A message from the developer", buttons); - - if (result == System.Windows.Forms.DialogResult.OK) - { - - Clipboard.SetText(notice); - - } - - myStream.Close(); - - hasInternetAccess = true; - - } catch (System.Net.WebException) { - this.Text += " (offline mode)"; - } - - rc.Add("MT51J256M3", "MICRON"); - rc.Add("EDW4032BAB", "ELPIDA"); - rc.Add("H5GC4H24AJ", "HYNIX_1"); - rc.Add("H5GQ4H24AJ", "HYNIX_2"); - rc.Add("H5GQ8H24MJ", "HYNIX_2"); - rc.Add("H5GC8H24MJ", "HYNIX_3"); - rc.Add("H5GC8H24AJ", "HYNIX_4"); - rc.Add("K4G80325FB", "SAMSUNG"); - rc.Add("K4G41325FE", "SAMSUNG"); - rc.Add("K4G41325FC", "SAMSUNG"); - rc.Add("K4G41325FS", "SAMSUNG"); - rc.Add("K4G80325FC", "SAMSUNG4"); - - save.Enabled = false; - boxROM.Enabled = false; - boxPOWERPLAY.Enabled = false; - boxPOWERTUNE.Enabled = false; - boxFAN.Enabled = false; - boxGPU.Enabled = false; - boxMEM.Enabled = false; - boxVRAM.Enabled = false; - - tableVRAM.MouseClick += new MouseEventHandler(listView_ChangeSelection); - tableVRAM_TIMING.MouseClick += new MouseEventHandler(listView_ChangeSelection); - tableMEMORY.MouseClick += new MouseEventHandler(listView_ChangeSelection); - tableGPU.MouseClick += new MouseEventHandler(listView_ChangeSelection); - tableFAN.MouseClick += new MouseEventHandler(listView_ChangeSelection); - tablePOWERTUNE.MouseClick += new MouseEventHandler(listView_ChangeSelection); - tablePOWERPLAY.MouseClick += new MouseEventHandler(listView_ChangeSelection); - tableROM.MouseClick += new MouseEventHandler(listView_ChangeSelection); - - } - - private void PolarisBiosEditor_Load(object sender, EventArgs e) - { - - } - - private void editSubItem2_Click(object sender, EventArgs e) - { - MouseEventArgs me = (MouseEventArgs)e; - if (me.Button == MouseButtons.Right) - { - if (editSubItem2.Text.Length == 96) - { - byte[] decode = StringToByteArray(editSubItem2.Text); - MessageBox.Show("Decode Memory Timings " + decode + " / not implemented yet!"); - } - } - } - - private void OpenFileDialog_Click(object sender, EventArgs e) - { - Console.WriteLine("OpenFileDialog"); - OpenFileDialog openFileDialog = new OpenFileDialog(); - openFileDialog.Filter = "BIOS (.rom)|*.rom|All Files (*.*)|*.*"; - openFileDialog.FilterIndex = 1; - openFileDialog.Multiselect = false; - - if (openFileDialog.ShowDialog() == DialogResult.OK) - { - save.Enabled = false; - - tableROM.Items.Clear(); - tablePOWERPLAY.Items.Clear(); - tablePOWERTUNE.Items.Clear(); - tableFAN.Items.Clear(); - tableGPU.Items.Clear(); - tableMEMORY.Items.Clear(); - tableVRAM.Items.Clear(); - tableVRAM_TIMING.Items.Clear(); - - this.Text = this.programTitle + " " + this.version + " tweaked by VASKE" + " - " + "[" + openFileDialog.SafeFileName + "]"; - - System.IO.Stream fileStream = openFileDialog.OpenFile(); - if ((fileStream.Length != 524288) && (fileStream.Length != 524288 / 2)) - { - MessageBox.Show("This BIOS is non standard size.\nFlashing this BIOS may corrupt your graphics card.", "WARNING", MessageBoxButtons.OK, MessageBoxIcon.Warning); - } - using (BinaryReader br = new BinaryReader(fileStream)) - { - buffer = br.ReadBytes((int)fileStream.Length); - - atom_rom_header_offset = getValueAtPosition(16, atom_rom_header_ptr); - atom_rom_header = fromBytes(buffer.Skip(atom_rom_header_offset).ToArray()); - deviceID = atom_rom_header.usDeviceID.ToString("X"); - fixChecksum(false); - - String firmwareSignature = new string(atom_rom_header.uaFirmWareSignature); - if (!firmwareSignature.Equals("ATOM")) - { - MessageBox.Show("WARNING! BIOS Signature is not valid. Only continue if you are 100% sure what you are doing!"); - } - - DialogResult msgSuported = DialogResult.Yes; - if (!supportedDeviceID.Contains(deviceID)) - { - msgSuported = MessageBox.Show("Unsupported DeviceID 0x" + deviceID + " - Continue?", "WARNING", MessageBoxButtons.YesNo, MessageBoxIcon.Warning); - } - if (msgSuported == DialogResult.Yes) - { - StringBuilder sb = new StringBuilder(); - - Int32 ptr = atom_rom_header.usBIOS_BootupMessageOffset+2; - while (ptr != -1) - { - Char c = (Char)buffer[ptr]; - if (c == '\0') { - ptr = -1; - } else if(c == '\n' || c == '\r') { - ptr++; - } else { - sb.Append(c); - ptr++; - } - } - - BIOS_BootupMessage = sb.ToString(); - - txtBIOSBootupMessage.Text = BIOS_BootupMessage; - txtBIOSBootupMessage.MaxLength = BIOS_BootupMessage.Length; - - atom_data_table = fromBytes(buffer.Skip(atom_rom_header.usMasterDataTableOffset).ToArray()); - atom_powerplay_offset = atom_data_table.PowerPlayInfo; - atom_powerplay_table = fromBytes(buffer.Skip(atom_powerplay_offset).ToArray()); - - atom_powertune_offset = atom_data_table.PowerPlayInfo + atom_powerplay_table.usPowerTuneTableOffset; - atom_powertune_table = fromBytes(buffer.Skip(atom_powertune_offset).ToArray()); - - atom_fan_offset = atom_data_table.PowerPlayInfo + atom_powerplay_table.usFanTableOffset; - atom_fan_table = fromBytes(buffer.Skip(atom_fan_offset).ToArray()); - - atom_mclk_table_offset = atom_data_table.PowerPlayInfo + atom_powerplay_table.usMclkDependencyTableOffset; - atom_mclk_table = fromBytes(buffer.Skip(atom_mclk_table_offset).ToArray()); - atom_mclk_entries = new ATOM_MCLK_ENTRY[atom_mclk_table.ucNumEntries]; - for (var i = 0; i < atom_mclk_entries.Length; i++) - { - atom_mclk_entries[i] = fromBytes(buffer.Skip(atom_mclk_table_offset + Marshal.SizeOf(typeof(ATOM_MCLK_TABLE)) + Marshal.SizeOf(typeof(ATOM_MCLK_ENTRY)) * i).ToArray()); - } - - atom_sclk_table_offset = atom_data_table.PowerPlayInfo + atom_powerplay_table.usSclkDependencyTableOffset; - atom_sclk_table = fromBytes(buffer.Skip(atom_sclk_table_offset).ToArray()); - atom_sclk_entries = new ATOM_SCLK_ENTRY[atom_sclk_table.ucNumEntries]; - for (var i = 0; i < atom_sclk_entries.Length; i++) - { - atom_sclk_entries[i] = fromBytes(buffer.Skip(atom_sclk_table_offset + Marshal.SizeOf(typeof(ATOM_SCLK_TABLE)) + Marshal.SizeOf(typeof(ATOM_SCLK_ENTRY)) * i).ToArray()); - } - - atom_vddc_table_offset = atom_data_table.PowerPlayInfo + atom_powerplay_table.usVddcLookupTableOffset; - atom_vddc_table = fromBytes(buffer.Skip(atom_vddc_table_offset).ToArray()); - atom_vddc_entries = new ATOM_VOLTAGE_ENTRY[atom_vddc_table.ucNumEntries]; - for (var i = 0; i < atom_vddc_table.ucNumEntries; i++) - { - atom_vddc_entries[i] = fromBytes(buffer.Skip(atom_vddc_table_offset + Marshal.SizeOf(typeof(ATOM_VOLTAGE_TABLE)) + Marshal.SizeOf(typeof(ATOM_VOLTAGE_ENTRY)) * i).ToArray()); - } - - atom_vram_info_offset = atom_data_table.VRAM_Info; - atom_vram_info = fromBytes(buffer.Skip(atom_vram_info_offset).ToArray()); - atom_vram_entries = new ATOM_VRAM_ENTRY[atom_vram_info.ucNumOfVRAMModule]; - var atom_vram_entry_offset = atom_vram_info_offset + Marshal.SizeOf(typeof(ATOM_VRAM_INFO)); - for (var i = 0; i < atom_vram_info.ucNumOfVRAMModule; i++) - { - atom_vram_entries[i] = fromBytes(buffer.Skip(atom_vram_entry_offset).ToArray()); - atom_vram_entry_offset += atom_vram_entries[i].usModuleSize; - } - - atom_vram_timing_offset = atom_vram_info_offset + atom_vram_info.usMemClkPatchTblOffset + 0x2E; - atom_vram_timing_entries = new ATOM_VRAM_TIMING_ENTRY[MAX_VRAM_ENTRIES]; - for (var i = 0; i < MAX_VRAM_ENTRIES; i++) - { - atom_vram_timing_entries[i] = fromBytes(buffer.Skip(atom_vram_timing_offset + Marshal.SizeOf(typeof(ATOM_VRAM_TIMING_ENTRY)) * i).ToArray()); - - // atom_vram_timing_entries have an undetermined length - // attempt to determine the last entry in the array - if (atom_vram_timing_entries[i].ulClkRange == 0) - { - Array.Resize(ref atom_vram_timing_entries, i); - break; - } - } - - tableROM.Items.Add(new ListViewItem(new string[] { - "BootupMessageOffset", - "0x" + atom_rom_header.usBIOS_BootupMessageOffset.ToString ("X") - } - )); - tableROM.Items.Add(new ListViewItem(new string[] { - "VendorID", - "0x" + atom_rom_header.usVendorID.ToString ("X") - } - )); - tableROM.Items.Add(new ListViewItem(new string[] { - "DeviceID", - "0x" + atom_rom_header.usDeviceID.ToString ("X") - } - )); - tableROM.Items.Add(new ListViewItem(new string[] { - "Sub ID", - "0x" + atom_rom_header.usSubsystemID.ToString ("X") - } - )); - tableROM.Items.Add(new ListViewItem(new string[] { - "Sub VendorID", - "0x" + atom_rom_header.usSubsystemVendorID.ToString ("X") - } - )); - tableROM.Items.Add(new ListViewItem(new string[] { - "Firmware Signature", - //"0x" + atom_rom_header.uaFirmWareSignature.ToString ("X") - new string(atom_rom_header.uaFirmWareSignature) - } - )); - - tablePOWERPLAY.Items.Clear(); - tablePOWERPLAY.Items.Add(new ListViewItem(new string[] { - "Max GPU Freq. (MHz)", - Convert.ToString (atom_powerplay_table.ulMaxODEngineClock / 100) - } - )); - tablePOWERPLAY.Items.Add(new ListViewItem(new string[] { - "Max Memory Freq. (MHz)", - Convert.ToString (atom_powerplay_table.ulMaxODMemoryClock / 100) - } - )); - tablePOWERPLAY.Items.Add(new ListViewItem(new string[] { - "Power Control Limit (%)", - Convert.ToString (atom_powerplay_table.usPowerControlLimit) - } - )); - - tablePOWERTUNE.Items.Clear(); - tablePOWERTUNE.Items.Add(new ListViewItem(new string[] { - "TDP (W)", - Convert.ToString (atom_powertune_table.usTDP) - } - )); - tablePOWERTUNE.Items.Add(new ListViewItem(new string[] { - "TDC (A)", - Convert.ToString (atom_powertune_table.usTDC) - } - )); - tablePOWERTUNE.Items.Add(new ListViewItem(new string[] { - "Max Power Limit (W)", - Convert.ToString (atom_powertune_table.usMaximumPowerDeliveryLimit) - } - )); - tablePOWERTUNE.Items.Add(new ListViewItem(new string[] { - "Max Temp. (C)", - Convert.ToString (atom_powertune_table.usTjMax) - } - )); - tablePOWERTUNE.Items.Add(new ListViewItem(new string[] { - "Shutdown Temp. (C)", - Convert.ToString (atom_powertune_table.usSoftwareShutdownTemp) - } - )); - tablePOWERTUNE.Items.Add(new ListViewItem(new string[] { - "Hotspot Temp. (C)", - Convert.ToString (atom_powertune_table.usTemperatureLimitHotspot) - } - )); - tablePOWERTUNE.Items.Add(new ListViewItem(new string[] { - "Clock Stretch Amount", - Convert.ToString (atom_powertune_table.usClockStretchAmount) - } - )); - - tableFAN.Items.Clear(); - tableFAN.Items.Add(new ListViewItem(new string[] { - "Temp. Hysteresis", - Convert.ToString (atom_fan_table.ucTHyst) - } - )); - tableFAN.Items.Add(new ListViewItem(new string[] { - "Min Temp. (C)", - Convert.ToString (atom_fan_table.usTMin / 100) - } - )); - tableFAN.Items.Add(new ListViewItem(new string[] { - "Med Temp. (C)", - Convert.ToString (atom_fan_table.usTMed / 100) - } - )); - tableFAN.Items.Add(new ListViewItem(new string[] { - "High Temp. (C)", - Convert.ToString (atom_fan_table.usTHigh / 100) - } - )); - tableFAN.Items.Add(new ListViewItem(new string[] { - "Max Temp. (C)", - Convert.ToString (atom_fan_table.usTMax / 100) - } - )); - tableFAN.Items.Add(new ListViewItem(new string[] { - "Target Temp. (C)", - Convert.ToString (atom_fan_table.ucTargetTemperature) - } - )); - tableFAN.Items.Add(new ListViewItem(new string[] { - "Legacy or Fuzzy Fan Mode", - Convert.ToString (atom_fan_table.ucFanControlMode) - } - )); - tableFAN.Items.Add(new ListViewItem(new string[] { - "Min PWM (%)", - Convert.ToString (atom_fan_table.usPWMMin / 100) - } - )); - tableFAN.Items.Add(new ListViewItem(new string[] { - "Med PWM (%)", - Convert.ToString (atom_fan_table.usPWMMed / 100) - } - )); - tableFAN.Items.Add(new ListViewItem(new string[] { - "High PWM (%)", - Convert.ToString (atom_fan_table.usPWMHigh / 100) - } - )); - tableFAN.Items.Add(new ListViewItem(new string[] { - "Max PWM (%)", - Convert.ToString (atom_fan_table.usFanPWMMax) - } - )); - tableFAN.Items.Add(new ListViewItem(new string[] { - "Max RPM", - Convert.ToString (atom_fan_table.usFanRPMMax) - } - )); - tableFAN.Items.Add(new ListViewItem(new string[] { - "Sensitivity", - Convert.ToString (atom_fan_table.usFanOutputSensitivity) - } - )); - tableFAN.Items.Add(new ListViewItem(new string[] { - "Acoustic Limit (MHz)", - Convert.ToString (atom_fan_table.ulMinFanSCLKAcousticLimit / 100) - } - )); - - tableGPU.Items.Clear(); - for (var i = 0; i < atom_sclk_table.ucNumEntries; i++) - { - tableGPU.Items.Add(new ListViewItem(new string[] { - Convert.ToString (atom_sclk_entries [i].ulSclk / 100), - Convert.ToString (atom_vddc_entries [atom_sclk_entries [i].ucVddInd].usVdd) - } - )); - } - - tableMEMORY.Items.Clear(); - for (var i = 0; i < atom_mclk_table.ucNumEntries; i++) - { - tableMEMORY.Items.Add(new ListViewItem(new string[] { - Convert.ToString (atom_mclk_entries [i].ulMclk / 100), - Convert.ToString (atom_mclk_entries [i].usMvdd) - } - )); - } - - listVRAM.Items.Clear(); - for (var i = 0; i < atom_vram_info.ucNumOfVRAMModule; i++) - { - if (atom_vram_entries[i].strMemPNString[0] != 0) - { - - var mem_id = Encoding.UTF8.GetString(atom_vram_entries[i].strMemPNString).Substring(0, 10); - string mem_vendor; - if (rc.ContainsKey(mem_id)) - { - mem_vendor = rc[mem_id]; - } - else - { - mem_vendor = "UNKNOWN"; - } - - listVRAM.Items.Add(mem_id + " (" + mem_vendor + ")"); - } - } - listVRAM.SelectedIndex = 0; - atom_vram_index = listVRAM.SelectedIndex; - - tableVRAM_TIMING.Items.Clear(); - for (var i = 0; i < atom_vram_timing_entries.Length; i++) - { - uint tbl = atom_vram_timing_entries[i].ulClkRange >> 24; - tableVRAM_TIMING.Items.Add(new ListViewItem(new string[] { - tbl.ToString () + ":" + (atom_vram_timing_entries [i].ulClkRange & 0x00FFFFFF) / 100, - ByteArrayToString (atom_vram_timing_entries [i].ucLatency) - } - )); - } - - save.Enabled = true; - boxROM.Enabled = true; - boxPOWERPLAY.Enabled = true; - boxPOWERTUNE.Enabled = true; - boxFAN.Enabled = true; - boxGPU.Enabled = true; - boxMEM.Enabled = true; - boxVRAM.Enabled = true; - } - fileStream.Close(); - } - } - tableROM.AutoResizeColumns(ColumnHeaderAutoResizeStyle.ColumnContent); - tableROM.AutoResizeColumns(ColumnHeaderAutoResizeStyle.HeaderSize); - - tableFAN.AutoResizeColumns(ColumnHeaderAutoResizeStyle.ColumnContent); - tableFAN.AutoResizeColumns(ColumnHeaderAutoResizeStyle.HeaderSize); - - tablePOWERPLAY.AutoResizeColumns(ColumnHeaderAutoResizeStyle.ColumnContent); - tablePOWERPLAY.AutoResizeColumns(ColumnHeaderAutoResizeStyle.HeaderSize); - - tableGPU.AutoResizeColumns(ColumnHeaderAutoResizeStyle.ColumnContent); - tableGPU.AutoResizeColumns(ColumnHeaderAutoResizeStyle.HeaderSize); - - tablePOWERTUNE.AutoResizeColumns(ColumnHeaderAutoResizeStyle.ColumnContent); - tablePOWERTUNE.AutoResizeColumns(ColumnHeaderAutoResizeStyle.HeaderSize); - - tableMEMORY.AutoResizeColumns(ColumnHeaderAutoResizeStyle.ColumnContent); - tableMEMORY.AutoResizeColumns(ColumnHeaderAutoResizeStyle.HeaderSize); - - tableVRAM.AutoResizeColumns(ColumnHeaderAutoResizeStyle.ColumnContent); - tableVRAM.AutoResizeColumns(ColumnHeaderAutoResizeStyle.HeaderSize); - - tableVRAM_TIMING.AutoResizeColumns(ColumnHeaderAutoResizeStyle.ColumnContent); - tableVRAM_TIMING.AutoResizeColumns(ColumnHeaderAutoResizeStyle.HeaderSize); - } - - public Int32 getValueAtPosition(int bits, int position, bool isFrequency = false) - { - int value = 0; - if (position <= buffer.Length - 4) - { - switch (bits) - { - case 8: - default: - value = buffer[position]; - break; - case 16: - value = (buffer[position + 1] << 8) | buffer[position]; - break; - case 24: - value = (buffer[position + 2] << 16) | (buffer[position + 1] << 8) | buffer[position]; - break; - case 32: - value = (buffer[position + 3] << 24) | (buffer[position + 2] << 16) | (buffer[position + 1] << 8) | buffer[position]; - break; - } - if (isFrequency) - return value / 100; - return value; - } - return -1; - } - - public bool setValueAtPosition(int value, int bits, int position, bool isFrequency = false) - { - if (isFrequency) - value *= 100; - if (position <= buffer.Length - 4) - { - switch (bits) - { - case 8: - default: - buffer[position] = (byte)value; - break; - case 16: - buffer[position] = (byte)value; - buffer[position + 1] = (byte)(value >> 8); - break; - case 24: - buffer[position] = (byte)value; - buffer[position + 1] = (byte)(value >> 8); - buffer[position + 2] = (byte)(value >> 16); - break; - case 32: - buffer[position] = (byte)value; - buffer[position + 1] = (byte)(value >> 8); - buffer[position + 2] = (byte)(value >> 16); - buffer[position + 3] = (byte)(value >> 32); - break; - } - return true; - } - return false; - } - - private bool setValueAtPosition(String text, int bits, int position, bool isFrequency = false) - { - int value = 0; - if (!int.TryParse(text, out value)) - { - return false; - } - return setValueAtPosition(value, bits, position, isFrequency); - } - - private void SaveFileDialog_Click(object sender, EventArgs e) - { - SaveFileDialog SaveFileDialog = new SaveFileDialog(); - SaveFileDialog.Title = "Save As"; - SaveFileDialog.Filter = "BIOS (*.rom)|*.rom"; - - if (SaveFileDialog.ShowDialog() == DialogResult.OK) - { - FileStream fs = new FileStream(SaveFileDialog.FileName, FileMode.Create); - BinaryWriter bw = new BinaryWriter(fs); - - for (var i = 0; i < tableROM.Items.Count; i++) - { - ListViewItem container = tableROM.Items[i]; - var name = container.Text; - var value = container.SubItems[1].Text; - - if (name == "VendorID") - { - var num = (int)int32.ConvertFromString(value); - atom_rom_header.usVendorID = (UInt16)num; - } - else if (name == "DeviceID") - { - var num = (int)int32.ConvertFromString(value); - atom_rom_header.usDeviceID = (UInt16)num; - } - else if (name == "Sub ID") - { - var num = (int)int32.ConvertFromString(value); - atom_rom_header.usSubsystemID = (UInt16)num; - } - else if (name == "Sub VendorID") - { - var num = (int)int32.ConvertFromString(value); - atom_rom_header.usSubsystemVendorID = (UInt16)num; - } - else if (name == "Firmware Signature") - { - atom_rom_header.uaFirmWareSignature = value.ToCharArray(); - } - } - - for (var i = 0; i < tablePOWERPLAY.Items.Count; i++) - { - ListViewItem container = tablePOWERPLAY.Items[i]; - var name = container.Text; - var value = container.SubItems[1].Text; - var num = (int)int32.ConvertFromString(value); - - if (name == "Max GPU Freq. (MHz)") - { - atom_powerplay_table.ulMaxODEngineClock = (UInt32)(num * 100); - } - else if (name == "Max Memory Freq. (MHz)") - { - atom_powerplay_table.ulMaxODMemoryClock = (UInt32)(num * 100); - } - else if (name == "Power Control Limit (%)") - { - atom_powerplay_table.usPowerControlLimit = (UInt16)num; - } - } - - for (var i = 0; i < tablePOWERTUNE.Items.Count; i++) - { - ListViewItem container = tablePOWERTUNE.Items[i]; - var name = container.Text; - var value = container.SubItems[1].Text; - var num = (int)int32.ConvertFromString(value); - - if (name == "TDP (W)") - { - atom_powertune_table.usTDP = (UInt16)num; - } - else if (name == "TDC (A)") - { - atom_powertune_table.usTDC = (UInt16)num; - } - else if (name == "Max Power Limit (W)") - { - atom_powertune_table.usMaximumPowerDeliveryLimit = (UInt16)num; - } - else if (name == "Max Temp. (C)") - { - atom_powertune_table.usTjMax = (UInt16)num; - } - else if (name == "Shutdown Temp. (C)") - { - atom_powertune_table.usSoftwareShutdownTemp = (UInt16)num; - } - else if (name == "Hotspot Temp. (C)") - { - atom_powertune_table.usTemperatureLimitHotspot = (UInt16)num; - } - else if (name == "Clock Stretch Amount") - { - atom_powertune_table.usClockStretchAmount = (UInt16)num; - } - } - - for (var i = 0; i < tableFAN.Items.Count; i++) - { - ListViewItem container = tableFAN.Items[i]; - var name = container.Text; - var value = container.SubItems[1].Text; - var num = (int)int32.ConvertFromString(value); - - if (name == "Temp. Hysteresis") - { - atom_fan_table.ucTHyst = (Byte)num; - } - else if (name == "Min Temp. (C)") - { - atom_fan_table.usTMin = (UInt16)(num * 100); - } - else if (name == "Med Temp. (C)") - { - atom_fan_table.usTMed = (UInt16)(num * 100); - } - else if (name == "High Temp. (C)") - { - atom_fan_table.usTHigh = (UInt16)(num * 100); - } - else if (name == "Max Temp. (C)") - { - atom_fan_table.usTMax = (UInt16)(num * 100); - } - else if (name == "Target Temp. (C)") - { - atom_fan_table.ucTargetTemperature = (Byte)num; - } - else if (name == "Legacy or Fuzzy Fan Mode") - { - atom_fan_table.ucFanControlMode = (Byte)(num); - } - else if (name == "Min PWM (%)") - { - atom_fan_table.usPWMMin = (UInt16)(num * 100); - } - else if (name == "Med PWM (%)") - { - atom_fan_table.usPWMMed = (UInt16)(num * 100); - } - else if (name == "High PWM (%)") - { - atom_fan_table.usPWMHigh = (UInt16)(num * 100); - } - else if (name == "Max PWM (%)") - { - atom_fan_table.usFanPWMMax = (UInt16)num; - } - else if (name == "Max RPM") - { - atom_fan_table.usFanRPMMax = (UInt16)num; - } - else if (name == "Sensitivity") - { - atom_fan_table.usFanOutputSensitivity = (UInt16)num; - } - else if (name == "Acoustic Limit (MHz)") - { - atom_fan_table.ulMinFanSCLKAcousticLimit = (UInt32)(num * 100); - } - } - - for (var i = 0; i < tableGPU.Items.Count; i++) - { - ListViewItem container = tableGPU.Items[i]; - var name = container.Text; - var value = container.SubItems[1].Text; - var mhz = (int)int32.ConvertFromString(name) * 100; - var mv = (int)int32.ConvertFromString(value); - - atom_sclk_entries[i].ulSclk = (UInt32)mhz; - atom_vddc_entries[atom_sclk_entries[i].ucVddInd].usVdd = (UInt16)mv; - if (mv < 0xFF00) - { - atom_sclk_entries[i].usVddcOffset = 0; - } - } - - for (var i = 0; i < tableMEMORY.Items.Count; i++) - { - ListViewItem container = tableMEMORY.Items[i]; - var name = container.Text; - var value = container.SubItems[1].Text; - var mhz = (int)int32.ConvertFromString(name) * 100; - var mv = (int)int32.ConvertFromString(value); - - atom_mclk_entries[i].ulMclk = (UInt32)mhz; - atom_mclk_entries[i].usMvdd = (UInt16)mv; - } - - updateVRAM_entries(); - for (var i = 0; i < tableVRAM_TIMING.Items.Count; i++) - { - ListViewItem container = tableVRAM_TIMING.Items[i]; - var name = container.Text; - var value = container.SubItems[1].Text; - var arr = StringToByteArray(value); - UInt32 mhz; - if (name.IndexOf(':') > 0) - { - mhz = (UInt32)uint32.ConvertFromString(name.Substring(name.IndexOf(':') + 1)) * 100; - mhz += (UInt32)uint32.ConvertFromString(name.Substring(0, name.IndexOf(':'))) << 24; // table id - } - else - { - mhz = (UInt32)uint32.ConvertFromString(name) * 100; - } - atom_vram_timing_entries[i].ulClkRange = mhz; - atom_vram_timing_entries[i].ucLatency = arr; - } - - setBytesAtPosition(buffer, atom_rom_header_offset, getBytes(atom_rom_header)); - setBytesAtPosition(buffer, atom_powerplay_offset, getBytes(atom_powerplay_table)); - setBytesAtPosition(buffer, atom_powertune_offset, getBytes(atom_powertune_table)); - setBytesAtPosition(buffer, atom_fan_offset, getBytes(atom_fan_table)); - - for (var i = 0; i < atom_mclk_table.ucNumEntries; i++) - { - setBytesAtPosition(buffer, atom_mclk_table_offset + Marshal.SizeOf(typeof(ATOM_MCLK_TABLE)) + Marshal.SizeOf(typeof(ATOM_MCLK_ENTRY)) * i, getBytes(atom_mclk_entries[i])); - } - - for (var i = 0; i < atom_sclk_table.ucNumEntries; i++) - { - setBytesAtPosition(buffer, atom_sclk_table_offset + Marshal.SizeOf(typeof(ATOM_SCLK_TABLE)) + Marshal.SizeOf(typeof(ATOM_SCLK_ENTRY)) * i, getBytes(atom_sclk_entries[i])); - } - - for (var i = 0; i < atom_vddc_table.ucNumEntries; i++) - { - setBytesAtPosition(buffer, atom_vddc_table_offset + Marshal.SizeOf(typeof(ATOM_VOLTAGE_TABLE)) + Marshal.SizeOf(typeof(ATOM_VOLTAGE_ENTRY)) * i, getBytes(atom_vddc_entries[i])); - } - - var atom_vram_entry_offset = atom_vram_info_offset + Marshal.SizeOf(typeof(ATOM_VRAM_INFO)); - for (var i = 0; i < atom_vram_info.ucNumOfVRAMModule; i++) - { - setBytesAtPosition(buffer, atom_vram_entry_offset, getBytes(atom_vram_entries[i])); - atom_vram_entry_offset += atom_vram_entries[i].usModuleSize; - } - - atom_vram_timing_offset = atom_vram_info_offset + atom_vram_info.usMemClkPatchTblOffset + 0x2E; - for (var i = 0; i < atom_vram_timing_entries.Length; i++) - { - setBytesAtPosition(buffer, atom_vram_timing_offset + Marshal.SizeOf(typeof(ATOM_VRAM_TIMING_ENTRY)) * i, getBytes(atom_vram_timing_entries[i])); - } - - BIOS_BootupMessage = txtBIOSBootupMessage.Text.Substring(0, BIOS_BootupMessage.Length); - - setBytesAtPosition(buffer, atom_rom_header.usBIOS_BootupMessageOffset+2, Encoding.ASCII.GetBytes(BIOS_BootupMessage)); - fixChecksum(true); - bw.Write(buffer); - - fs.Close(); - bw.Close(); - } - } - - private void fixChecksum(bool save) - { - Byte checksum = buffer[atom_rom_checksum_offset]; - int size = buffer[0x02] * 512; - Byte offset = 0; - - for (int i = 0; i < size; i++) - { - offset += buffer[i]; - } - if (checksum == (buffer[atom_rom_checksum_offset] - offset)) - { - txtChecksum.ForeColor = Color.Green; - } - else if (!save) - { - txtChecksum.ForeColor = Color.Red; - MessageBox.Show("Invalid checksum - Save to fix!", "WARNING", MessageBoxButtons.OK, MessageBoxIcon.Warning); - } - if (save) - { - buffer[atom_rom_checksum_offset] -= offset; - txtChecksum.ForeColor = Color.Green; - } - txtChecksum.Text = "0x" + buffer[atom_rom_checksum_offset].ToString("X"); - } - - public static string ByteArrayToString(byte[] ba) - { - string hex = BitConverter.ToString(ba); - return hex.Replace("-", ""); - } - - public static byte[] StringToByteArray(String hex) - { - if (hex.Length % 2 != 0) - { - MessageBox.Show("Invalid hex string", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); - throw new InvalidDataException(); - } - byte[] bytes = new byte[hex.Length / 2]; - for (int i = 0; i < hex.Length; i += 2) - { - bytes[i / 2] = Convert.ToByte(hex.Substring(i, 2), 16); - } - return bytes; - } - - public void updateVRAM_entries() - { - for (var i = 0; i < tableVRAM.Items.Count; i++) - { - ListViewItem container = tableVRAM.Items[i]; - var name = container.Text; - var value = container.SubItems[1].Text; - var num = (int)int32.ConvertFromString(value); - - if (name == "VendorID") - { - atom_vram_entries[atom_vram_index].ucMemoryVenderID = (Byte)num; - } - else if (name == "Size (MB)") - { - atom_vram_entries[atom_vram_index].usMemorySize = (UInt16)num; - } - else if (name == "Density") - { - atom_vram_entries[atom_vram_index].ucDensity = (Byte)num; - } - else if (name == "Type") - { - atom_vram_entries[atom_vram_index].ucMemoryType = (Byte)num; - } - } - } - - private void listVRAM_SelectionChanged(object sender, EventArgs e) - { - updateVRAM_entries(); - tableVRAM.Items.Clear(); - if (listVRAM.SelectedIndex >= 0 && listVRAM.SelectedIndex < listVRAM.Items.Count) - { - atom_vram_index = listVRAM.SelectedIndex; - tableVRAM.Items.Add(new ListViewItem(new string[] { - "VendorID", - "0x" + atom_vram_entries [atom_vram_index].ucMemoryVenderID.ToString ("X") - } - )); - tableVRAM.Items.Add(new ListViewItem(new string[] { - "Size (MB)", - Convert.ToString (atom_vram_entries [atom_vram_index].usMemorySize) - } - )); - tableVRAM.Items.Add(new ListViewItem(new string[] { - "Density", - "0x" + atom_vram_entries [atom_vram_index].ucDensity.ToString ("X") - } - )); - tableVRAM.Items.Add(new ListViewItem(new string[] { - "Type", - "0x" + atom_vram_entries [atom_vram_index].ucMemoryType.ToString ("X") - } - )); - tableVRAM.Items.Add(new ListViewItem(new string[] { - "Num Of VRAM Module", - atom_vram_info.ucNumOfVRAMModule.ToString ("X") - } - )); - } - } - - private void listVRAM_SelectedIndexChanged(object sender, EventArgs e) - { - - } - - private void apply_timings(int vendor_index, int timing_index) - { - for (var i = 0; i < tableVRAM_TIMING.Items.Count; i++) - { - ListViewItem container = tableVRAM_TIMING.Items[i]; - var name = container.Text; - UInt32 real_mhz = 0; - int mem_index = -1; - - if (name.IndexOf(':') > 0) - { - // get mem index - mem_index = (Int32)int32.ConvertFromString(name.Substring(0, 1)); - } - else - { - mem_index = 32768; - } - - real_mhz = (UInt32)uint32.ConvertFromString(name.Substring(name.IndexOf(':') + 1)); - - if (real_mhz >= 1500 && (mem_index == vendor_index || mem_index == 32768)) - { - // set the timings - container.SubItems[1].Text = timings[timing_index]; - } - } - } - - private void apply_timings1(int vendor_index, int timing_index) - { - for (var i = 0; i < tableVRAM_TIMING.Items.Count; i++) - { - ListViewItem container = tableVRAM_TIMING.Items[i]; - var name = container.Text; - UInt32 real_mhz = 0; - int mem_index = -1; - - if (name.IndexOf(':') > 0) - { - // get mem index - mem_index = (Int32)int32.ConvertFromString(name.Substring(0, 1)); - } - else - { - mem_index = 32768; - } - - real_mhz = (UInt32)uint32.ConvertFromString(name.Substring(name.IndexOf(':') + 1)); - - if (real_mhz >= 1750 && (mem_index == vendor_index || mem_index == 32768)) - { - // set the timings - container.SubItems[1].Text = timings[timing_index]; - } - } - } - - private void button1_Click(object sender, EventArgs e) - { - /* - int samsung_index = -1; - int micron_index = -1; - int elpida_index = -1; - int hynix_1_index = -1; - int hynix_2_index = -1; - int hynix_3_index = -1; - for (var i = 0; i < atom_vram_info.ucNumOfVRAMModule; i++) - { - string mem_vendor; - if (atom_vram_entries[i].strMemPNString[0] != 0) - { - var mem_id = Encoding.UTF8.GetString(atom_vram_entries[i].strMemPNString).Substring(0, 10); - - if (rc.ContainsKey(mem_id)) - { - mem_vendor = rc[mem_id]; - } - else - { - mem_vendor = "UNKNOWN"; - } - - switch (mem_vendor) - { - case "SAMSUNG": - samsung_index = i; - break; - case "MICRON": - micron_index = i; - break; - case "ELPIDA": - elpida_index = i; - break; - case "HYNIX_1": - hynix_1_index = i; - break; - case "HYNIX_2": - hynix_2_index = i; - break; - case "HYNIX_3": - hynix_3_index = i; - break; - } - } - } - */ - int samsung_index = -1; - int samsung4_index = -1; - int micron_index = -1; - int elpida_index = -1; - int hynix_1_index = -1; - int hynix_2_index = -1; - int hynix_3_index = -1; - int hynix_4_index = -1; - for (int index = 0; index < (int)this.atom_vram_info.ucNumOfVRAMModule; ++index) - { - if ((int)this.atom_vram_entries[index].strMemPNString[0] != 0) - { - string key = Encoding.UTF8.GetString(this.atom_vram_entries[index].strMemPNString).Substring(0, 10); - string str = !this.rc.ContainsKey(key) ? "[ UNKNOWN ]" : this.rc[key]; - if (!(str == "SAMSUNG")) - { - if (!(str == "MICRON")) - { - if (!(str == "ELPIDA")) - { - if (!(str == "HYNIX_1")) - { - if (!(str == "HYNIX_2")) - { - if (!(str == "HYNIX_3")) - { - if (!(str == "HYNIX_4")) - { - if (str == "SAMSUNG4") - samsung4_index = index; - } - else - hynix_4_index = index; - } - else - hynix_3_index = index; - } - else - hynix_2_index = index; - } - else - hynix_1_index = index; - } - else - elpida_index = index; - } - else - micron_index = index; - } - else - samsung_index = index; - } - } - - if (samsung_index != -1) - { - if (MessageBox.Show("Do you want faster Uber-mix 3.1?", "Important Question", MessageBoxButtons.YesNo) == DialogResult.Yes) - { - int num = (int)MessageBox.Show("Samsung Memory found at index #" + (object)samsung_index + ", now applying UBERMIX 3.1 timings to 1750+ strap(s)"); - this.apply_timings1(samsung_index, 0); - } - else - { - int num = (int)MessageBox.Show("Samsung Memory found at index #" + (object)samsung_index + ", now applying UBERMIX 3.2 timings to 1750+ strap(s)"); - this.apply_timings1(samsung_index, 1); - } - } - - if (samsung4_index != -1) - { - if (MessageBox.Show("Do you want pro Samsung timing?", "Important Question", MessageBoxButtons.YesNo) == DialogResult.Yes) - { - MessageBox.Show("Samsung4 Memory found at index #" + (object)samsung4_index + ", now applying pro Samsung 30Mh/s timings to 1750+ strap(s)"); - this.apply_timings1(samsung4_index, 10); - MessageBox.Show("Little help for testing timing, set Core clock to 1150mhz and Memory clock to 2100mhz", "Hint!"); - } - else - { - MessageBox.Show("Samsung4 Memory found at index #" + (object)samsung4_index + ", now applying Samsung4 basic 29Mh/s timings to 1750+ strap(s)"); - this.apply_timings1(samsung4_index, 11); - } - } - - if (hynix_3_index != -1) - { - if (MessageBox.Show("Do you want Universal Hynix Timing?", "Important Question", MessageBoxButtons.YesNo) == DialogResult.Yes) - { - MessageBox.Show("Hynix (3) Memory found at index #" + hynix_3_index + ", now applying Universal HYNIX MINING timings to 1500+ strap(s)"); - apply_timings(hynix_3_index, 8); - } - else - { - MessageBox.Show("Hynix (3) Memory found at index #" + hynix_3_index + ", now applying GOOD HYNIX MINING timings to 1500+ strap(s)"); - apply_timings(hynix_3_index, 2); - } - } - - if (hynix_2_index != -1) - { - if (MessageBox.Show("Do you want Universal Hynix Timing?", "Important Question", MessageBoxButtons.YesNo) == DialogResult.Yes) - { - MessageBox.Show("Hynix (2) Memory found at index #" + hynix_2_index + ", now applying Universal HYNIX MINING timings to 1500+ strap(s)"); - apply_timings(hynix_2_index, 8); - } - else - { - int num = (int)MessageBox.Show("Hynix (2) Memory found at index #" + (object)hynix_2_index + ", now applying GOOD Hynix timings to 1500+ strap(s)"); - this.apply_timings(hynix_2_index, 3); - } - } - - if (hynix_4_index != -1) - { - if (MessageBox.Show("Do you want Universal Hynix Timing?", "Important Question", MessageBoxButtons.YesNo) == DialogResult.Yes) - { - MessageBox.Show("Hynix (2) Memory found at index #" + hynix_4_index + ", now applying Universal HYNIX MINING timings to 1500+ strap(s)"); - apply_timings(hynix_4_index, 8); - } - else - { - int num = (int)MessageBox.Show("Hynix (4) Memory found at index #" + (object)hynix_4_index + ", now applying Hynix timings to 1500+ strap(s)"); - this.apply_timings(hynix_4_index, 9); - } - } - - if (micron_index != -1) - { - if (MessageBox.Show("Do you want Good Micron Timing?", "Important Question", MessageBoxButtons.YesNo) == DialogResult.Yes) - { - int num = (int)MessageBox.Show("Micron Memory found at index #" + (object)micron_index + ", now applying Good Micron timings to 1500+ strap(s)"); - this.apply_timings(micron_index, 4); - } - else - { - int num = (int)MessageBox.Show("Micron Memory found at index #" + (object)micron_index + ", now applying S Micron timings to 1500+ strap(s)"); - this.apply_timings(micron_index, 5); - } - } - - if (hynix_1_index != -1) - { - MessageBox.Show("Hynix (1) Memory found at index #" + hynix_1_index + ", now applying GOOD HYNIX MINING timings to 1500+ strap(s)"); - apply_timings(hynix_1_index, 6); - } - - if (elpida_index != -1) - { - MessageBox.Show("Elpida Memory found at index #" + elpida_index + ", now applying GOOD ELPIDA MINING timings to 1500+ strap(s)"); - apply_timings(elpida_index, 7); - } - if (samsung4_index == -1 && samsung_index == -1 && hynix_2_index == -1 && hynix_3_index == -1 && hynix_1_index == -1 && elpida_index == -1 && micron_index == -1) - { - MessageBox.Show("Sorry, no supported memory found. If you think this is an error, please file a bugreport @ github.com/vvaske/PolarisBiosEditor"); - } - - this.tablePOWERPLAY.Items[1].SubItems[1].Text = "2300"; - - } - - private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) - { - System.Diagnostics.Process.Start("https://www.miningbios.com/product/polaris-bios-editor-3-4-1-srbpolaris-style/"); - } - } -} \ No newline at end of file +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Diagnostics; +using System.Drawing; +using System.IO; +using System.Linq; +using System.Runtime.InteropServices; +using System.Text; +using System.Windows.Forms; +using System.Xml.Linq; +using System.Xml.Serialization; + +using Attrs = System.Collections.Generic.Dictionary; +namespace PolarisBiosEditor +{ + public enum KIND_CONNECTOR + { + CONNECTOR_OBJECT_ID_NONE = 0x00, + CONNECTOR_OBJECT_ID_SINGLE_LINK_DVI_I = 0x01, + CONNECTOR_OBJECT_ID_DUAL_LINK_DVI_I = 0x02, + CONNECTOR_OBJECT_ID_SINGLE_LINK_DVI_D = 0x03, + CONNECTOR_OBJECT_ID_DUAL_LINK_DVI_D = 0x04, + CONNECTOR_OBJECT_ID_VGA = 0x05, + CONNECTOR_OBJECT_ID_COMPOSITE = 0x06, + CONNECTOR_OBJECT_ID_SVIDEO = 0x07, + CONNECTOR_OBJECT_ID_YPbPr = 0x08, + CONNECTOR_OBJECT_ID_D_CONNECTOR = 0x09, + CONNECTOR_OBJECT_ID_9PIN_DIN = 0x0A, /* Supports both CV & TV */ + CONNECTOR_OBJECT_ID_SCART = 0x0B, + CONNECTOR_OBJECT_ID_HDMI_TYPE_A = 0x0C, + CONNECTOR_OBJECT_ID_HDMI_TYPE_B = 0x0D, + CONNECTOR_OBJECT_ID_LVDS = 0x0E, + CONNECTOR_OBJECT_ID_7PIN_DIN = 0x0F, + CONNECTOR_OBJECT_ID_PCIE_CONNECTOR = 0x10, + CONNECTOR_OBJECT_ID_CROSSFIRE = 0x11, + CONNECTOR_OBJECT_ID_HARDCODE_DVI = 0x12, + CONNECTOR_OBJECT_ID_DISPLAYPORT = 0x13, + CONNECTOR_OBJECT_ID_eDP = 0x14, + CONNECTOR_OBJECT_ID_MXM = 0x15, + CONNECTOR_OBJECT_ID_LVDS_eDP = 0x16 + } + + public enum KIND_ENCODER + { + ENCODER_OBJECT_ID_NONE = 0x00, + + /* Radeon Class Display Hardware */ + ENCODER_OBJECT_ID_INTERNAL_LVDS = 0x01, + ENCODER_OBJECT_ID_INTERNAL_TMDS1 = 0x02, + ENCODER_OBJECT_ID_INTERNAL_TMDS2 = 0x03, + ENCODER_OBJECT_ID_INTERNAL_DAC1 = 0x04, + ENCODER_OBJECT_ID_INTERNAL_DAC2 = 0x05, /* TV/CV DAC */ + ENCODER_OBJECT_ID_INTERNAL_SDVOA = 0x06, + ENCODER_OBJECT_ID_INTERNAL_SDVOB = 0x07, + + /* External Third Party Encoders */ + ENCODER_OBJECT_ID_SI170B = 0x08, + ENCODER_OBJECT_ID_CH7303 = 0x09, + ENCODER_OBJECT_ID_CH7301 = 0x0A, + ENCODER_OBJECT_ID_INTERNAL_DVO1 = 0x0B, /* This belongs to Radeon Class Display Hardware */ + ENCODER_OBJECT_ID_EXTERNAL_SDVOA = 0x0C, + ENCODER_OBJECT_ID_EXTERNAL_SDVOB = 0x0D, + ENCODER_OBJECT_ID_TITFP513 = 0x0E, + ENCODER_OBJECT_ID_INTERNAL_LVTM1 = 0x0F, /* not used for Radeon */ + ENCODER_OBJECT_ID_VT1623 = 0x10, + ENCODER_OBJECT_ID_HDMI_SI1930 = 0x11, + ENCODER_OBJECT_ID_HDMI_INTERNAL = 0x12, + ENCODER_OBJECT_ID_ALMOND = 0x22, + ENCODER_OBJECT_ID_TRAVIS = 0x23, + ENCODER_OBJECT_ID_NUTMEG = 0x22, + ENCODER_OBJECT_ID_HDMI_ANX9805 = 0x26, + + /* Kaleidoscope (KLDSCP) Class Display Hardware (internal) */ + ENCODER_OBJECT_ID_INTERNAL_KLDSCP_TMDS1 = 0x13, + ENCODER_OBJECT_ID_INTERNAL_KLDSCP_DVO1 = 0x14, + ENCODER_OBJECT_ID_INTERNAL_KLDSCP_DAC1 = 0x15, + ENCODER_OBJECT_ID_INTERNAL_KLDSCP_DAC2 = 0x16, /* Shared with CV/TV and CRT */ + ENCODER_OBJECT_ID_SI178 = 0X17, /* External TMDS (dual link, no HDCP.) */ + ENCODER_OBJECT_ID_MVPU_FPGA = 0x18, /* MVPU FPGA chip */ + ENCODER_OBJECT_ID_INTERNAL_DDI = 0x19, + ENCODER_OBJECT_ID_VT1625 = 0x1A, + ENCODER_OBJECT_ID_HDMI_SI1932 = 0x1B, + ENCODER_OBJECT_ID_DP_AN9801 = 0x1C, + ENCODER_OBJECT_ID_DP_DP501 = 0x1D, + ENCODER_OBJECT_ID_INTERNAL_UNIPHY = 0x1E, + ENCODER_OBJECT_ID_INTERNAL_KLDSCP_LVTMA = 0x1F, + ENCODER_OBJECT_ID_INTERNAL_UNIPHY1 = 0x20, + ENCODER_OBJECT_ID_INTERNAL_UNIPHY2 = 0x21, + ENCODER_OBJECT_ID_INTERNAL_VCE = 0x24, + ENCODER_OBJECT_ID_INTERNAL_UNIPHY3 = 0x25, + ENCODER_OBJECT_ID_INTERNAL_AMCLK = 0x27, + + ENCODER_OBJECT_ID_GENERAL_EXTERNAL_DVO = 0xFF, + } + + + public class DumpByteArrAsText : XmlElementAttribute + { + public const string HEX_BINARY_BACK_DECODE = "HEX_BINARY_BACK_DECODE"; + public DumpByteArrAsText() + { + DataType = "hexBinary"; + Namespace = HEX_BINARY_BACK_DECODE; + } + } + + public partial class PolarisBiosEditor : Form + { + + /* DATA */ + + string version = "1.7xml-2021.08"; + string programTitle = "PolarisBiosEditor"; + + + string[] supportedID = new string[] { "67DF", "67EF", "1002", "67FF", "699F" }; + + string[] timings = new string[] + { + + // UberMix 3.1 + "777000000000000022CC1C00AD615C41C0590E152ECCA60B006007000B031420FA8900A00300000010122F3FBA354019", // new, please test + //"777000000000000022CC1C00AD615C41C0590E152ECC8608006007000B031420FA8900A00300000010122F3FBA354019", //old + + // FIXME Try UberMix 3.2 Timing + "777000000000000022CC1C00CEE55C46C0590E1532CD66090060070014051420FA8900A00300000012123442C3353C19", + + // Good HYNIX_3 BY VASKE + "999000000000000022CC1C00ADDD5B44A0551315B74C450A00400600750414206A8900A00200312010112D34C5303F17", + + // Good HYNIX_2 + "777000000000000022AA1C00B56A6D46C0551017BE8E060C006AE6000C081420EA8900AB030000001B162C31C0313F17", + + // Good Micron + //"777000000000000022AA1C0073626C41B0551016BA0D260B006AE60004061420EA8940AA030000001914292EB22E3B16", old + "777000000000000022AA1C0073626C41B0551016BA0D260B0060060004061420EA8940AA030000001914292EB22E3B16", // new tested timings (much better xmr performance @ rx560 sapphire pulse) + "777000000000000022AA1C00B56A6D4690551014BE8E060C0060060074081420EA8900AB020000001B162C31C02E3F15",// new Micron timing it's actually from Samsung + + // Good Hynix_1 + "999000000000000022559D0010DE5B4480551312B74C450A00400600750414206A8900A00200312010112D34A42A3816", + + // Good Elpida (fixed by VASKE) + "777000000000000022AA1C00EF595B36A0550F15B68C1506004082007C041420CA8980A9020004C01712262B612B3715", + //"777000000000000022AA1C00AC615B3CA0550F142C8C1506006004007C041420CA8980A9020004C01712262B612B3715" // new, please test + + // Universal Hynix + "777000000000000022AA1C00B56A6D46C0551017BE8E060C006006000C081420EA8900AB030000001B162C31C0313F17", + + //Hynix 4 by vaske + "999000000000000022559D0031626C46905F1015BC0D060C004004007D0714204A8900A0020071241B12312CC02D3C17", //new, please test + + //Samsung K4G80325FC // let's call it samsung4 pro timing + "777000000000000022CC1C00106A5D4DD0571016B90D060C0060070014051420FA8900A0030000001011333DC0303A17", //new, please test + + //Samsung K4G80325FC // let's call it samsung4 basic timing + "777000000000000022CC1C00106A6D4DD0571016B90D060C0060070014051420FA8900A0030000001B11333DC0303A17" //new, please test + }; + + Dictionary rc = new Dictionary(); + + [StructLayout(LayoutKind.Explicit, Size = 96, CharSet = CharSet.Ansi)] + public class VRAM_TIMING_RX + { + + } + + Byte[] buffer; + Int32Converter int32 = new Int32Converter(); + UInt32Converter uint32 = new UInt32Converter(); + + const int ATOM_ROM_CHECKSUM_OFFSET = 0x21; + + #region VBIOS-fields-kept-for-later-saving + + int atom_rom_header_offset; + ATOM_ROM_HEADER atom_rom_header; + + int pcir_offset; + PCIR_2_3_DATA_STRUCTURE pcir_header; + + ATOM_DATA_TABLES atom_data_table; + + int atom_powerplay_offset; + ATOM_POWERPLAY_TABLE atom_powerplay_table; + + int atom_powertune_offset; + ATOM_Polaris_PowerTune_Table atom_powertune_table; + + int atom_fan_offset; + ATOM_FAN_TABLE atom_fan_table; + + int atom_mclk_table_offset; + ATOM_MCLK_TABLE atom_mclk_table; + ATOM_MCLK_ENTRY[] atom_mclk_entries; + + int atom_sclk_table_offset; + ATOM_SCLK_TABLE atom_sclk_table; + ATOM_SCLK_ENTRY[] atom_sclk_entries; + + int atom_vddc_table_offset; + ATOM_VOLTAGE_TABLE atom_vddc_table; + ATOM_VOLTAGE_ENTRY[] atom_vddc_entries; + + int atom_vram_info_offset; + ATOM_VRAM_INFO atom_vram_info; + ATOM_VRAM_ENTRY[] atom_vram_entries; + ATOM_VRAM_TIMING_ENTRY[] atom_vram_timing_entries; + #endregion VBIOS-fields-kept-for-later-saving + + int atom_vram_index = 0; // index selected in supported memory list + const int MAX_VRAM_ENTRIES = 48; // e.g. MSI-Armor-RX-580-4GB has 36 entries + int atom_vram_timing_offset; + + [StructLayout(LayoutKind.Sequential, Pack = 1)] + public struct EFI_LEGACY_EXPANSION_AMD_ROM_HEADER + { + public Byte Signature55; + public Byte SignatureAA; + public Byte Bit8Length_in_512bytes; + public Byte JmpRel16_OpCode_E9; + public UInt16 Jmp_Target_Rel_To_0x6; + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 18)] + [DumpByteArrAsText] + public Byte[] reserved_legacy; + public UInt16 PCIRHeaderOffset; + public UInt16 PnPHeaderOffset; + public UInt16 TextsAfterHeaderNullPadding; + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)] + [DumpByteArrAsText] + public Byte[] TextIBM; + public Byte SimpleChecksum8ToZeroOverRegion_BeforeNextHeader; + public UInt16 Unknown2_1; + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 11)] + [DumpByteArrAsText] + public Byte[] Zeroes11; + public Byte Unknown1; + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 10)] + [DumpByteArrAsText] + public Byte[] ATIAMDSignature_SP761295520; + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 6)] + [DumpByteArrAsText] + public Byte[] Zeroes6_1; + public UInt16 Unknown2_2; + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 6)] + [DumpByteArrAsText] + public Byte[] Zeroes6_2; + public UInt16 AtomRomHeaderOffset; + public string ComputedOffsetToNextHeader + { + get { return string.Format("0x{0:X}",Bit8Length_in_512bytes * 512); } + set { throw new NotImplementedException(); } + } + public string ComputedJmpTarget + { + get { return string.Format("0x{0:X}",Jmp_Target_Rel_To_0x6 + 6); } + set { throw new NotImplementedException(); } + } + } + + [StructLayout(LayoutKind.Sequential, Pack = 1)] + public struct EFI_PCI_EXPANSION_ROM_HEADER + { + public Byte Signature55; + public Byte SignatureAA; + public UInt16 Bit16Length_in_512bytes; + public string ComputedOffsetToNextHeader + { + get { return string.Format("0x{0:X}",Bit16Length_in_512bytes * 512); } + set { throw new NotImplementedException(); } + } + public UInt32 EfiSignature_0x00000EF1; + public UInt16 EfiSubsystem_0x000B_IMAGE_SUBSYSTEM_EFI_BOOT_SERVICE_DRIVER; + public UInt16 EfiMachineType_0x8664_IMAGE_FILE_MACHINE_X64; + public UInt16 EfiCompressionType_1_for_EFI_compression; + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 8)] + [DumpByteArrAsText] + public Byte[] reserved_efi; + public UInt16 CompressableEfiImageHeaderOffset; + public UInt16 PCIRHeaderOffset; + public UInt16 PnPHeaderOffset; + } + + [StructLayout(LayoutKind.Sequential, Pack = 1)] + public struct EFI_COMPRESSED_FORMAT_HEADER + { + public UInt32 CompressedLengthAfterHeader; + public UInt32 DeCompressedLength; + } + + [StructLayout(LayoutKind.Sequential, Pack = 1)] + public struct ATOM_COMMON_TABLE_HEADER + { + public Int16 usStructureSize; + public Byte ucTableFormatRevision; + public Byte ucTableContentRevision; + } + + [StructLayout(LayoutKind.Sequential, Pack = 1)] + public struct ATOM_ROM_HEADER + { + public ATOM_COMMON_TABLE_HEADER sHeader; + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 0x4)] + [DumpByteArrAsText] + public Byte[] uaFirmWareSignature; + public UInt16 usBiosRuntimeSegmentAddress; + public UInt16 usProtectedModeInfoOffset; + public UInt16 usConfigFilenameOffset; + public UInt16 usCRC_BlockOffset; + public UInt16 usBIOS_BootupMessageOffset; + public UInt16 usInt10Offset; + public UInt16 usPciBusDevInitCode; + public UInt16 usIoBaseAddress; + public UInt16 usSubsystemVendorID; + public UInt16 usSubsystemID; + public UInt16 usPCI_InfoOffset; + public UInt16 usMasterCommandTableOffset; + public UInt16 usMasterDataTableOffset; + public Byte ucExtendedFunctionCode; + public Byte ucReserved; + } + + [StructLayout(LayoutKind.Sequential, Pack = 1)] + public struct PCIR_2_3_DATA_STRUCTURE + { + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 0x4)] + [DumpByteArrAsText] + public Byte[] Signature_PCIR; + public UInt16 usVendorID; + public UInt16 usDeviceID; + public UInt16 DeviceListOffset; + public UInt16 HeaderLength; + public Byte Revision; + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 0x3)] + [DumpByteArrAsText] + public Byte[] ClassCode_VGA_Controller_is_003; + public UInt16 ImageLength_in_512bytes; + public UInt16 CodeRevision; + public Byte CodeType_PC_Compatible_is_0__UEFI_is_3; + public Byte Indicator_last_is_0x80; + public UInt16 MaxRuntimeImageLength; + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 12)] + [DumpByteArrAsText] + public Byte[] SomeTextWithAMD; + } + + + String BIOS_BootupMessage; + + [StructLayout(LayoutKind.Sequential, Pack = 1)] + public struct ATOM_CMD_TABLES_LIST + { + public UInt16 ASIC_Init; + public UInt16 GetDisplaySurfaceSize; + public UInt16 ASIC_RegistersInit_For_ASIC_Init; + public UInt16 VRAM_BlockVenderDetection; + public UInt16 DIGxEncoderControl; + public UInt16 MemoryControllerInit_For_ASIC_Init; + public UInt16 EnableCRTCMemReq; + public UInt16 MemoryParamAdjust; + public UInt16 DVOEncoderControl; + public UInt16 GPIOPinControl; + public UInt16 SetEngineClock; + public UInt16 SetMemoryClock; + public UInt16 SetPixelClock; + public UInt16 EnableDispPowerGating_For_ASIC_Init; + public UInt16 ResetMemoryDLL; + public UInt16 ResetMemoryDevice; + public UInt16 MemoryPLLInit; + public UInt16 AdjustDisplayPll; + public UInt16 AdjustMemoryController; + public UInt16 EnableASIC_StaticPwrMgt; + public UInt16 SetUniphyInstance; + public UInt16 DAC_LoadDetection; + public UInt16 LVTMAEncoderControl; + public UInt16 HW_Misc_Operation; + public UInt16 DAC1EncoderControl; + public UInt16 DAC2EncoderControl; + public UInt16 DVOOutputControl; + public UInt16 CV1OutputControl; + public UInt16 GetConditionalGoldenSetting; + public UInt16 SMC_Init; + public UInt16 PatchMCSetting; + public UInt16 MC_SEQ_Control; + public UInt16 Gfx_Harvesting; + public UInt16 EnableScaler; + public UInt16 BlankCRTC; + public UInt16 EnableCRTC; + public UInt16 GetPixelClock; + public UInt16 EnableVGA_Render; + public UInt16 GetSCLKOverMCLKRatio; + public UInt16 SetCRTC_Timing; + public UInt16 SetCRTC_OverScan; + public UInt16 GetSMUClockInfo; + public UInt16 SelectCRTC_Source; + public UInt16 EnableGraphSurfaces; + public UInt16 UpdateCRTC_DoubleBufferRegisters; + public UInt16 LUT_AutoFill; + public UInt16 SetDCEClock; + public UInt16 GetMemoryClock; + public UInt16 GetEngineClock; + public UInt16 SetCRTC_UsingDTDTiming; + public UInt16 ExternalEncoderControl; + public UInt16 LVTMAOutputControl; + public UInt16 VRAM_BlockDetectionByStrap; + public UInt16 MemoryCleanUp; + public UInt16 ProcessI2cChannelTransaction; + public UInt16 WriteOneByteToHWAssistedI2C; + public UInt16 ReadHWAssistedI2CStatus; + public UInt16 SpeedFanControl_For_ASIC_Init; + public UInt16 PowerConnectorDetection; + public UInt16 MC_Synchronization; + public UInt16 ComputeMemoryOREnginePLLORClockParam; + public UInt16 Gfx_Init; + public UInt16 VRAM_GetCurrentInfoBlock; + public UInt16 DynamicMemorySettings; + public UInt16 MemoryTraining; + public UInt16 EnableSpreadSpectrumOnPPLL; + public UInt16 TMDSAOutputControl; + public UInt16 SetVoltage; + public UInt16 DAC1OutputControl; + public UInt16 ReadEfuseValue; + public UInt16 ComputeMemoryClockParam; + public UInt16 ClockSource_For_ASIC_Init; + public UInt16 MemoryDeviceInit; + public UInt16 GetDispObjectInfo; + public UInt16 DIG1EncoderControl; + public UInt16 DIG2EncoderControl; + public UInt16 DIG1TransmitterControl; + public UInt16 DIG2TransmitterControl; + public UInt16 ProcessAuxChannelTransaction; + public UInt16 DPEncoderService; + public UInt16 GetVoltageInfo; + } + + [StructLayout(LayoutKind.Sequential, Pack = 1)] + public struct ATOM_CMD_TABLES + { + public ATOM_COMMON_TABLE_HEADER sHeader; + [XmlIgnore]public ATOM_CMD_TABLES_LIST cmds; + }; + + [StructLayout(LayoutKind.Sequential, Pack = 1)] + public struct ATOM_CMD_HEADER + { + public Int16 usStructureSize; + public Byte ucTableFormatRevision; + public Byte ucTableContentRevision; + public Byte work_data_stack_in_4bytes; + public Byte params_stack_in_1bytes; + }; + + + [StructLayout(LayoutKind.Sequential, Pack = 1)] + public struct ATOM_DATA_TABLES + { + public ATOM_COMMON_TABLE_HEADER sHeader; + public UInt16 UtilityPipeLine; + public UInt16 MultimediaCapabilityInfo; + public UInt16 MultimediaConfigInfo; + public UInt16 StandardVESA_Timing; + public UInt16 FirmwareInfo; + public UInt16 PaletteData; + public UInt16 LCD_Info; + public UInt16 DIGTransmitterInfo; + public UInt16 SMU_Info; + public UInt16 SupportedDevicesInfo; + public UInt16 GPIO_I2C_Info; + public UInt16 VRAM_UsageByFirmware; + public UInt16 GPIO_Pin_LUT; + public UInt16 VESA_ToInternalModeLUT; + public UInt16 GFX_Info; + public UInt16 PowerPlayInfo; + public UInt16 GPUVirtualizationInfo; + public UInt16 SaveRestoreInfo; + public UInt16 PPLL_SS_Info; + public UInt16 OemInfo; + public UInt16 XTMDS_Info; + public UInt16 MclkSS_Info; + public UInt16 Object_Header; + public UInt16 IndirectIOAccess; + public UInt16 MC_InitParameter; + public UInt16 ASIC_VDDC_Info; + public UInt16 ASIC_InternalSS_Info; + public UInt16 TV_VideoMode; + public UInt16 VRAM_Info; + public UInt16 MemoryTrainingInfo; + public UInt16 IntegratedSystemInfo; + public UInt16 ASIC_ProfilingInfo; + public UInt16 VoltageObjectInfo; + public UInt16 PowerSourceInfo; + public UInt16 ServiceInfo; + }; + + [StructLayout(LayoutKind.Sequential, Pack = 1)] + public struct ATOM_FIRMWARE_INFO + { + public ATOM_COMMON_TABLE_HEADER sHeader; + public UInt32 ulFirmwareRevision; + public UInt32 ulDefaultEngineClock_in10khz_asic_init_arg0; + public UInt32 ulDefaultMemoryClock_in10khz_asic_init_arg1; + public UInt32 ulSPLL_OutputFreq_in10khz; + public UInt32 ulGPUPLL_OutputFreq_in10khz; + public UInt32 ulReserved1; + public UInt32 ulReserved2; + public UInt32 ulMaxPixelClockPLL_Output_in10khz; + public UInt32 ulBinaryAlteredInfo; + public UInt32 ulDefaultDispEngineClkFreq_in10khz; + public Byte ucReserved3; + public Byte ucMinAllowedBL_Level; + public UInt16 usBootUpVDDCVoltage_in_mV; + public UInt16 usLcdMinPixelClockPLL_Output_inMHz; + public UInt16 usLcdMaxPixelClockPLL_Output_inMHz; + public UInt32 ulReserved4; + public UInt32 ulMinPixelClockPLL_Output_in10khz; + public Byte ucRemoteDisplayConfig; + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 5)] + [DumpByteArrAsText] + public Byte[] ucReserved5; + public UInt32 ulReserved6; + public UInt32 ulReserved7; + public UInt16 usReserved11_usMaxPixelClockDAC_in10khz; + public UInt16 usMinPixelClockPLL_Input_in10khz; + public UInt16 usMaxPixelClockPLL_Input_in10khz; + public UInt16 usBootUpVDDCIVoltage_in_mV; + public UInt16 usFirmwareCapability; + public UInt16 usCoreReferenceClock_in10khz; + public UInt16 usMemoryReferenceClock_in10khz; + public UInt16 usUniphyDPModeExtClkFreq_in10khz; + public Byte ucMemoryModule_ID; + public Byte ucCoolingSolution1IsLiquid; + public Byte ucProductBranding; + public Byte ucReserved9; + public UInt16 usBootUpMVDDCVoltage_in_mV; + public UInt16 usBootUpVDDGFXVoltage_in_mV; + }; + + [StructLayout(LayoutKind.Sequential, Pack = 1)] + public struct ATOM_POWERPLAY_TABLE + { + public ATOM_COMMON_TABLE_HEADER sHeader; + public Byte ucTableRevision; + public UInt16 usTableSize; + public UInt32 ulGoldenPPID; + public UInt32 ulGoldenRevision; + public UInt16 usFormatID; + public UInt16 usVoltageTime; + public UInt32 ulPlatformCaps; + public UInt32 ulMaxODEngineClock; + public UInt32 ulMaxODMemoryClock; + public UInt16 usPowerControlLimit; + public UInt16 usUlvVoltageOffset; + public UInt16 usStateArrayOffset; + public UInt16 usFanTableOffset; + public UInt16 usThermalControllerOffset; + public UInt16 usReserv; + public UInt16 usMclkDependencyTableOffset; + public UInt16 usSclkDependencyTableOffset; + public UInt16 usVddcLookupTableOffset; + public UInt16 usVddgfxLookupTableOffset; + public UInt16 usMMDependencyTableOffset; + public UInt16 usVCEStateTableOffset; + public UInt16 usPPMTableOffset; + public UInt16 usPowerTuneTableOffset; + public UInt16 usHardLimitTableOffset; + public UInt16 usPCIETableOffset; + public UInt16 usGPIOTableOffset; + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 12)] + [DumpByteArrAsText] + public Byte[] usReserved; + }; + + [StructLayout(LayoutKind.Sequential, Pack = 1)] + public struct ATOM_MCLK_ENTRY + { + public Byte ucVddcInd; + public UInt16 usVddci; + public UInt16 usVddgfxOffset; + public UInt16 usMvdd; + public UInt32 ulMclk; + public UInt16 usReserved; + }; + + [StructLayout(LayoutKind.Sequential, Pack = 1)] + public struct ATOM_MCLK_TABLE + { + public Byte ucRevId; + public Byte ucNumEntries; + // public unsafe fixed byte ATOM_MCLK_ENTRY entries[ucNumEntries]; [3] + }; + + [StructLayout(LayoutKind.Sequential, Pack = 1)] + public struct ATOM_SCLK_ENTRY + { + public Byte ucVddInd; + public UInt16 usVddcOffset; + public UInt32 ulSclk; + public UInt16 usEdcCurrent; + public Byte ucReliabilityTemperature; + public Byte ucCKSVOffsetandDisable; + public UInt32 ulSclkOffset; + // Polaris Only, remove for compatibility with Fiji + }; + + [StructLayout(LayoutKind.Sequential, Pack = 1)] + public struct ATOM_SCLK_TABLE + { + public Byte ucRevId; + public Byte ucNumEntries; + // public unsafe fixed byte ATOM_SCLK_ENTRY entries[ucNumEntries]; [8] + }; + + [StructLayout(LayoutKind.Sequential, Pack = 1)] + public struct ATOM_VOLTAGE_ENTRY + { + public UInt16 usVdd; + public UInt16 usCACLow; + public UInt16 usCACMid; + public UInt16 usCACHigh; + }; + + [StructLayout(LayoutKind.Sequential, Pack = 1)] + public struct ATOM_VOLTAGE_TABLE + { + public Byte ucRevId; + public Byte ucNumEntries; + // public unsafe fixed byte ATOM_VOLTAGE_ENTRY entries[ucNumEntries]; [8] + }; + + [StructLayout(LayoutKind.Sequential, Pack = 1)] + public struct ATOM_MM_DEPENDENCY_RECORD + { + public Byte ucVddcInd; /* VDDC voltage */ + public UInt16 usVddgfxOffset; /* Offset relative to VDDC voltage */ + public UInt32 ulDClk; /* UVD D-clock */ + public UInt32 ulVClk; /* UVD V-clock */ + public UInt32 ulEClk; /* VCE clock */ + public UInt32 ulAClk; /* ACP clock */ + public UInt32 ulSAMUClk; /* SAMU clock */ + }; + + [StructLayout(LayoutKind.Sequential, Pack = 1)] + public struct ATOM_MM_DEPENDENCY_TABLE + { + public Byte ucRevId; + public Byte ucNumEntries; + // public unsafe fixed byte ATOM_VOLTAGE_ENTRY entries[ucNumEntries]; [8] + }; + + [StructLayout(LayoutKind.Sequential, Pack = 1)] + public struct ATOM_FAN_TABLE + { + public Byte ucRevId; + public Byte ucTHyst; + public UInt16 usTMin; + public UInt16 usTMed; + public UInt16 usTHigh; + public UInt16 usPWMMin; + public UInt16 usPWMMed; + public UInt16 usPWMHigh; + public UInt16 usTMax; + public Byte ucFanControlMode; + public UInt16 usFanPWMMax; + public UInt16 usFanOutputSensitivity; + public UInt16 usFanRPMMax; + public UInt32 ulMinFanSCLKAcousticLimit; + public Byte ucTargetTemperature; + public Byte ucMinimumPWMLimit; + public UInt16 usFanGainEdge; + public UInt16 usFanGainHotspot; + public UInt16 usFanGainLiquid; + public UInt16 usFanGainVrVddc; + public UInt16 usFanGainVrMvdd; + public UInt16 usFanGainPlx; + public UInt16 usFanGainHbm; + public UInt16 usReserved; + }; + + [StructLayout(LayoutKind.Sequential, Pack = 1)] + public struct ATOM_Polaris_PowerTune_Table + { + public Byte ucRevId; + public UInt16 usTDP; + public UInt16 usConfigurableTDP; + public UInt16 usTDC; + public UInt16 usBatteryPowerLimit; + public UInt16 usSmallPowerLimit; + public UInt16 usLowCACLeakage; + public UInt16 usHighCACLeakage; + public UInt16 usMaximumPowerDeliveryLimit; + public UInt16 usTjMax; + public UInt16 usPowerTuneDataSetID; + public UInt16 usEDCLimit; + public UInt16 usSoftwareShutdownTemp; + public UInt16 usClockStretchAmount; + public UInt16 usTemperatureLimitHotspot; + public UInt16 usTemperatureLimitLiquid1; + public UInt16 usTemperatureLimitLiquid2; + public UInt16 usTemperatureLimitVrVddc; + public UInt16 usTemperatureLimitVrMvdd; + public UInt16 usTemperatureLimitPlx; + public Byte ucLiquid1_I2C_address; + public Byte ucLiquid2_I2C_address; + public Byte ucLiquid_I2C_Line; + public Byte ucVr_I2C_address; + public Byte ucVr_I2C_Line; + public Byte ucPlx_I2C_address; + public Byte ucPlx_I2C_Line; + public UInt16 usBoostPowerLimit; + public Byte ucCKS_LDO_REFSEL; + public Byte ucHotSpotOnly; + public Byte ucReserve; + public UInt16 usReserve; + }; + + [StructLayout(LayoutKind.Sequential, Pack = 1)] + public struct ATOM_OBJECT_HEADER_V3 + { + public ATOM_COMMON_TABLE_HEADER sHeader; + public UInt16 usDeviceSupport; + public UInt16 usConnectorObjectTableOffset; + public UInt16 usRouterObjectTableOffset; + public UInt16 usEncoderObjectTableOffset; + public UInt16 usProtectionObjectTableOffset; //only available when Protection block is independent. + public UInt16 usDisplayPathTableOffset; + public UInt16 usMiscObjectTableOffset; + } + + + public enum GRAPH_OBJECT_TYPE + { + GRAPH_OBJECT_TYPE_NONE = 0x0, + GRAPH_OBJECT_TYPE_GPU = 0x1, + GRAPH_OBJECT_TYPE_ENCODER = 0x2, + GRAPH_OBJECT_TYPE_CONNECTOR = 0x3, + GRAPH_OBJECT_TYPE_ROUTER = 0x4, + /* deleted */ + GRAPH_OBJECT_TYPE_DISPLAY_PATH = 0x6, + GRAPH_OBJECT_TYPE_GENERIC = 0x7, + } + + [StructLayout(LayoutKind.Sequential, Pack = 1)] + public struct ATOM_OBJECT_ID + { + [XmlIgnore] public Byte KindInNamespaceRaw; + [XmlIgnore] public Byte NamespaceAndIndex; + public string KindInNamespace + { + get + { + var type_name = Namespace.Split(new[] { '_' }).Last(); + var type = Type.GetType("PolarisBiosEditor.KIND_" + type_name); + if (type != null) + { + return Enum.ToObject(type, KindInNamespaceRaw).ToString() + " = 0x" + KindInNamespaceRaw.ToString("X"); + } + return KindInNamespaceRaw.ToString(); + } + set { throw new NotImplementedException(); } + } + public string Namespace + { + get { return EnumOrValue(NamespaceAndIndex >> 4); } + set { throw new NotImplementedException(); } + } + public int Index + { + get { return NamespaceAndIndex & 7; } + set { throw new NotImplementedException(); } + } + } + + [StructLayout(LayoutKind.Sequential, Pack = 1)] + public struct ATOM_DISPLAY_OBJECT_PATH + { + public UInt16 usDeviceTag; //supported device + public UInt16 usSize; //the size of ATOM_DISPLAY_OBJECT_PATH + public ATOM_OBJECT_ID usConnObjectId; //Connector Object ID + public ATOM_OBJECT_ID usGPUObjectId; //GPU ID + public ATOM_OBJECT_ID usGraphicObjIdsFirst; //1st Encoder Obj source from GPU to last Graphic Obj destinate to connector. + //usGraphicObjIdsOthers + } + + [StructLayout(LayoutKind.Sequential, Pack = 1)] + public struct ATOM_DISPLAY_OBJECT_PATH_TABLE + { + public Byte ucNumOfDispPath; + public Byte ucVersion; + public UInt16 ucPadding2; + //ATOM_DISPLAY_OBJECT_PATH asDispPath[1]; + } + + [StructLayout(LayoutKind.Sequential, Pack = 1)] + public struct ATOM_OBJECT //each object has this structure + { + public ATOM_OBJECT_ID usObjectID; + public UInt16 usSrcDstTableOffset; + public UInt16 usRecordOffset; //this pointing to a bunch of records defined below + public UInt16 usReserved; + } + + [StructLayout(LayoutKind.Sequential, Pack = 1)] + public struct ATOM_OBJECT_TABLE + { + public Byte ucNumberOfObjects; + public Byte ucPadding0; + public Byte ucPadding1; + public Byte ucPadding2; + //ATOM_OBJECT asObjects[1]; + } + + [StructLayout(LayoutKind.Sequential, Pack = 1)] + public struct ATOM_COMMON_RECORD_HEADER + { + [XmlIgnore] public Byte ucRecordType; //An emun to indicate the record type + public string RecordType + { + get { return ((AtomRecordType)ucRecordType).ToString() + " = 0x" + ucRecordType.ToString("X"); } + set { throw new NotImplementedException(); } + } + public Byte ucRecordSize; //The size of the whole record in byte + } + + + public enum AtomRecordType + { + ATOM_I2C_RECORD_TYPE = 1, + ATOM_HPD_INT_RECORD_TYPE = 2, + ATOM_OUTPUT_PROTECTION_RECORD_TYPE = 3, + ATOM_CONNECTOR_DEVICE_TAG_RECORD_TYPE = 4, + ATOM_CONNECTOR_DVI_EXT_INPUT_RECORD_TYPE = 5, //Obsolete, switch to use GPIO_CNTL_RECORD_TYPE + ATOM_ENCODER_FPGA_CONTROL_RECORD_TYPE = 6, //Obsolete, switch to use GPIO_CNTL_RECORD_TYPE + ATOM_CONNECTOR_CVTV_SHARE_DIN_RECORD_TYPE = 7, + ATOM_JTAG_RECORD_TYPE = 8, //Obsolete, switch to use GPIO_CNTL_RECORD_TYPE + ATOM_OBJECT_GPIO_CNTL_RECORD_TYPE = 9, + ATOM_ENCODER_DVO_CF_RECORD_TYPE = 10, + ATOM_CONNECTOR_CF_RECORD_TYPE = 11, + ATOM_CONNECTOR_HARDCODE_DTD_RECORD_TYPE = 12, + ATOM_CONNECTOR_PCIE_SUBCONNECTOR_RECORD_TYPE = 13, + ATOM_ROUTER_DDC_PATH_SELECT_RECORD_TYPE = 14, + ATOM_ROUTER_DATA_CLOCK_PATH_SELECT_RECORD_TYPE = 15, + ATOM_CONNECTOR_HPDPIN_LUT_RECORD_TYPE = 16, //This is for the case when connectors are not known to object table + ATOM_CONNECTOR_AUXDDC_LUT_RECORD_TYPE = 17, //This is for the case when connectors are not known to object table + ATOM_OBJECT_LINK_RECORD_TYPE = 18, //Once this record is present under one object, it indicats the oobject is linked to another obj described by the record + ATOM_CONNECTOR_REMOTE_CAP_RECORD_TYPE = 19, + ATOM_ENCODER_CAP_RECORD_TYPE = 20, + ATOM_BRACKET_LAYOUT_RECORD_TYPE = 21, + ATOM_CONNECTOR_FORCED_TMDS_CAP_RECORD_TYPE = 22, + } + + public enum atom_voltage_type : Byte + { + VOLTAGE_TYPE_VDDC_0x1 = 1, + VOLTAGE_TYPE_MVDDC_0x2 = 2, + VOLTAGE_TYPE_MVDDQ_0x3 = 3, + VOLTAGE_TYPE_VDDCI_0x4 = 4, + VOLTAGE_TYPE_VDDGFX_0x5 = 5, + VOLTAGE_TYPE_PCC_0x6 = 6, + VOLTAGE_TYPE_MVPP_0x7 = 7, + VOLTAGE_TYPE_LEDDPM_0x8 = 8, + VOLTAGE_TYPE_PCC_MVDD_0x9 = 9, + VOLTAGE_TYPE_PCIE_VDDC_0xA = 10, + VOLTAGE_TYPE_PCIE_VDDR_0xB = 11, + VOLTAGE_TYPE_GENERIC_I2C_1_0x11 = 0x11, + VOLTAGE_TYPE_GENERIC_I2C_2_0x12 = 0x12, + VOLTAGE_TYPE_GENERIC_I2C_3_0x13 = 0x13, + VOLTAGE_TYPE_GENERIC_I2C_4_0x14 = 0x14, + VOLTAGE_TYPE_GENERIC_I2C_5_0x15 = 0x15, + VOLTAGE_TYPE_GENERIC_I2C_6_0x16 = 0x16, + VOLTAGE_TYPE_GENERIC_I2C_7_0x17 = 0x17, + VOLTAGE_TYPE_GENERIC_I2C_8_0x18 = 0x18, + VOLTAGE_TYPE_GENERIC_I2C_9_0x19 = 0x19, + VOLTAGE_TYPE_GENERIC_I2C_10_0x1A = 0x1A, + }; + + public enum atom_voltage_object_mode : Byte + { + VOLTAGE_OBJ_GPIO_LUT_0x0 = 0, //VOLTAGE and GPIO Lookup table ->ATOM_GPIO_VOLTAGE_OBJECT_V3 + VOLTAGE_OBJ_VR_I2C_INIT_SEQ_0x3 = 3, //VOLTAGE REGULATOR INIT sequece through I2C -> ATOM_I2C_VOLTAGE_OBJECT_V3 + VOLTAGE_OBJ_PHASE_LUT_0x4 = 4, //Set Vregulator Phase lookup table ->ATOM_GPIO_VOLTAGE_OBJECT_V3 + VOLTAGE_OBJ_SVID2_0x7 = 7, //Indicate voltage control by SVID2 ->ATOM_SVID2_VOLTAGE_OBJECT_V3 + VOLTAGE_OBJ_EVV_0x8 = 8, + VOLTAGE_OBJ_MERGED_POWER_0x9 = 9, + VOLTAGE_OBJ_PWRBOOST_LEAKAGE_LUT_0x10 = 0x10, //Powerboost Voltage and LeakageId lookup table->ATOM_LEAKAGE_VOLTAGE_OBJECT_V3 + VOLTAGE_OBJ_HIGH_STATE_LEAKAGE_LUT_0x11 = 0x11, //High voltage state Voltage and LeakageId lookup table->ATOM_LEAKAGE_VOLTAGE_OBJECT_V3 + VOLTAGE_OBJ_HIGH1_STATE_LEAKAGE_LUT_0x12 = 0x12, //High1 voltage state Voltage and LeakageId lookup table->ATOM_LEAKAGE_VOLTAGE_OBJECT_V3 + } + + enum atom_gpio_pin_assignment_gpio_id + { + I2C_HW_LANE_MUX_0x0F = 0x0f, /* only valid when bit7=1 */ + I2C_HW_ENGINE_ID_MASK_0x70 = 0x70, /* only valid when bit7=1 */ + I2C_HW_CAP_0x80 = 0x80, /*only when the I2C_HW_CAP is set, the pin ID is assigned to an I2C pin pair, otherwise, it's an generic GPIO pin */ + + /* gpio_id pre-define id for multiple usage */ + /* GPIO use to control PCIE_VDDC in certain SLT board */ + PCIE_VDDC_CONTROL_GPIO_PINID_0x38 = 56, + /* if PP_AC_DC_SWITCH_GPIO_PINID in Gpio_Pin_LutTable, AC/DC swithing feature is enable */ + PP_AC_DC_SWITCH_GPIO_PINID_0x3C = 60, + /* VDDC_REGULATOR_VRHOT_GPIO_PINID in Gpio_Pin_LutTable, VRHot feature is enable */ + VDDC_VRHOT_GPIO_PINID_0x3D = 61, + /*if VDDC_PCC_GPIO_PINID in GPIO_LUTable, Peak Current Control feature is enabled */ + VDDC_PCC_GPIO_PINID_0x3E = 62, + /* Only used on certain SLT/PA board to allow utility to cut Efuse. */ + EFUSE_CUT_ENABLE_GPIO_PINID_0x3F = 63, + /* ucGPIO=DRAM_SELF_REFRESH_GPIO_PIND uses for memory self refresh (ucGPIO=0, DRAM self-refresh; ucGPIO= */ + DRAM_SELF_REFRESH_GPIO_PINID_0x40 = 64, + /* Thermal interrupt output->system thermal chip GPIO pin */ + THERMAL_INT_OUTPUT_GPIO_PINID_0x41 = 65, + is_mm_i2c = 0xA0, + }; + + [StructLayout(LayoutKind.Sequential, Pack = 1)] + public struct ATOM_GPIO_ROLE_I2C_ID + { + public Byte gpio_id; + + public bool bfHW_Capable + { + get { return (gpio_id & (Byte)atom_gpio_pin_assignment_gpio_id.I2C_HW_CAP_0x80) != 0; } + set { throw new NotImplementedException(); } + } + public int bfHW_EngineID + { + get { return (gpio_id & (Byte)atom_gpio_pin_assignment_gpio_id.I2C_HW_ENGINE_ID_MASK_0x70) >> 4; } + set { throw new NotImplementedException(); } + } + public int bfI2C_LineMux + { + get { return gpio_id & (Byte)atom_gpio_pin_assignment_gpio_id.I2C_HW_LANE_MUX_0x0F; } + set { throw new NotImplementedException(); } + } + public string Description + { + get { return ((atom_gpio_pin_assignment_gpio_id)gpio_id).ToString(); } + set { throw new NotImplementedException(); } + } + } + + [StructLayout(LayoutKind.Sequential, Pack = 1)] + public struct ATOM_I2C_SHIFTED_SLAVE_ADDRESS + { + public Byte shifted_i2c_slave_addr; + /* //Not sure if it actually shifted... + public int EffectiveSlaveAddr + { + get { return shifted_i2c_slave_addr >> 1; } + set { throw new NotImplementedException(); } + } + */ + } + + [StructLayout(LayoutKind.Sequential, Pack = 1)] + public struct atom_i2c_voltage_object_v4_fields + { + public Byte regulator_id; //Indicate Voltage Regulator Id + public ATOM_GPIO_ROLE_I2C_ID i2c_id; + public ATOM_I2C_SHIFTED_SLAVE_ADDRESS i2c_slave_addr; + public Byte i2c_control_offset; + public Byte i2c_flag; // Bit0: 0 - One byte data; 1 - Two byte data + public Byte i2c_speed; // =0, use default i2c speed, otherwise use it in unit of kHz. + public Byte reserved_0xA; + public Byte reserved_0xB; + } + + [StructLayout(LayoutKind.Sequential, Pack = 1)] + public struct FINAL_atom_i2c_data_entry + { + public UInt16 final_entry_index; + public static UInt16 ENDING_INDEX_VALUE => 0xff; + }; + + [StructLayout(LayoutKind.Sequential, Pack = 1)] + public struct atom_i2c_data_entry + { + public UInt16 i2c_reg_index; // i2c register address, can be up to 16bit + public UInt16 i2c_reg_data; // i2c register data, can be up to 16bit + }; + + [StructLayout(LayoutKind.Sequential, Pack = 1)] + public struct atom_voltage_gpio_map_lut + { + public UInt32 voltage_gpio_reg_val; // The Voltage ID which is used to program GPIO register + public UInt16 voltage_level_mv; // The corresponding Voltage Value, in mV + } + + [StructLayout(LayoutKind.Sequential, Pack = 1)] + public struct atom_gpio_voltage_object_v4_fields + { + public Byte gpio_control_id; // default is 0 which indicate control through CG VID mode + public Byte gpio_entry_num; // indiate the entry numbers of Votlage/Gpio value Look up table + public Byte phase_delay_us; // phase delay in unit of micro second + public Byte reserved; + public UInt32 gpio_mask_val; // GPIO Mask value + } + + [StructLayout(LayoutKind.Sequential, Pack = 1)] + public struct atom_voltage_object_header_v4 + { + public atom_voltage_type ucVoltageType; //Indicate Voltage Source: VDDC, MVDDC, MVDDQ or MVDDCI + public atom_voltage_object_mode ucVoltageMode; //Indicate voltage control mode: Init/Set/Leakage/Set phase + public UInt16 usSize; //Size of Object + //actual fields depens on ucVoltageMode + } + + [StructLayout(LayoutKind.Sequential, Pack = 1)] + public struct ATOM_VOLTAGE_OBJECT_INFO_V3_1 + { + public ATOM_COMMON_TABLE_HEADER sHeader; + //ATOM_VOLTAGE_OBJECT_V3 asVoltageObj[3]; //Info for Voltage control + } + [StructLayout(LayoutKind.Sequential, Pack = 1)] + public struct ATOM_GPIO_I2C_ASSIGMENT + { + public UInt16 usClkMaskRegisterIndex; + public UInt16 usClkEnRegisterIndex; + public UInt16 usClkY_RegisterIndex; + public UInt16 usClkA_RegisterIndex; + public UInt16 usDataMaskRegisterIndex; + public UInt16 usDataEnRegisterIndex; + public UInt16 usDataY_RegisterIndex; + public UInt16 usDataA_RegisterIndex; + public ATOM_GPIO_ROLE_I2C_ID sucI2cId; + public Byte ucClkMaskShift; + public Byte ucClkEnShift; + public Byte ucClkY_Shift; + public Byte ucClkA_Shift; + public Byte ucDataMaskShift; + public Byte ucDataEnShift; + public Byte ucDataY_Shift; + public Byte ucDataA_Shift; + public Byte ucReserved1; + public Byte ucReserved2; + }; + + [StructLayout(LayoutKind.Sequential, Pack = 1)] + public struct ATOM_GPIO_I2C_INFO + { + public ATOM_COMMON_TABLE_HEADER sHeader; + //ATOM_GPIO_I2C_ASSIGMENT asGPIO_Info[16]; + }; + + + [StructLayout(LayoutKind.Sequential, Pack = 1)] + public struct ATOM_VRAM_TIMING_ENTRY + { + public UInt32 ulClkRange; + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 0x30)] + [XmlIgnore] public Byte[] ucLatency; + public string LatencyString + { + get + { + return ByteArrayToString(ucLatency); + } + set + { + throw new NotImplementedException(); + } + } + + }; + + [StructLayout(LayoutKind.Sequential, Pack = 1)] + public struct ATOM_VRAM_ENTRY + { + public UInt32 ulChannelMapCfg; + public UInt16 usModuleSize; + public UInt16 usMcRamCfg; + public UInt16 usEnableChannels; + public Byte ucExtMemoryID; + public Byte ucMemoryType; + public Byte ucChannelNum; + public Byte ucChannelWidth; + public Byte ucDensity; + public Byte ucBankCol; + public Byte ucMisc; + public Byte ucVREFI; + public UInt16 usReserved; + public UInt16 usMemorySize; + public Byte ucMcTunningSetId; + public Byte ucRowNum; + public UInt16 usEMRS2Value; + public UInt16 usEMRS3Value; + public Byte ucMemoryVenderID; + public Byte ucRefreshRateFactor; + public Byte ucFIFODepth; + public Byte ucCDR_Bandwidth; + public UInt32 ulChannelMapCfg1; + public UInt32 ulBankMapCfg; + public UInt32 ulReserved; + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 20)] + [DumpByteArrAsText] + public Byte[] strMemPNString; + [XmlIgnore] + public string FullName + { + get + { + return Encoding.UTF8.GetString(strMemPNString.TakeWhile(c => c != 0).ToArray()); + } + set + { + throw new NotImplementedException(); + } + } + }; + + [StructLayout(LayoutKind.Sequential, Pack = 1)] + public struct ATOM_VRAM_INFO + { + public ATOM_COMMON_TABLE_HEADER sHeader; + public UInt16 usMemAdjustTblOffset; + public UInt16 usMemClkPatchTblOffset; + public UInt16 usMcAdjustPerTileTblOffset; + public UInt16 usMcPhyInitTableOffset; + public UInt16 usDramDataRemapTblOffset; + public UInt16 usReserved1; + public Byte ucNumOfVRAMModule; + public Byte ucMemoryClkPatchTblVer; + public Byte ucVramModuleVer; + public Byte ucMcPhyTileNum; + // public ATOM_VRAM_ENTRY aVramInfo[ucNumOfVRAMModule]; + } + + class ConsecutiveReader + { + public static ConsecutiveReader From(ConsecutiveReader other) + { + return new ConsecutiveReader(other.buffer.Array, other.buffer.Offset, other.editor); + } + + public ConsecutiveReader(Byte[] entire_buffer, int offset, PolarisBiosEditor a_editor) + { + buffer = new ArraySegment(entire_buffer); + editor = a_editor; + Jump(offset); + } + public T Read() + { + T obj = default(T); + int size = Marshal.SizeOf(); + IntPtr ptr = Marshal.AllocHGlobal(size); + + Marshal.Copy(buffer.Array, buffer.Offset, ptr, size); + obj = (T)Marshal.PtrToStructure(ptr, obj.GetType()); + Marshal.FreeHGlobal(ptr); + + return obj; + } + public T ReadPrint(string name = "") + { + int size = Marshal.SizeOf(); + if (buffer.Offset + size > buffer.Array.Length) + { + editor.Print("IGNORED_OUT_OF_RANGE_INSTANCE_OF_"+typeof(T).Name, "addr", string.Format("0x{0:X}-0x{1:X} len={2}=0x{2:X}{3}", buffer.Offset, buffer.Offset + size, size, name)); + return default(T); + } + T result = Read(); + if (!string.IsNullOrWhiteSpace(name)) + { + name = " Name=" + name; + } + editor.Print(result, "addr", string.Format("0x{0:X}-0x{1:X} len={2}=0x{2:X}{3}", buffer.Offset, buffer.Offset + size, size, name)); + return result; + } + public void Jump1Structure() + { + Jump(Marshal.SizeOf()); + } + + public void Jump(int relative_offset) + { + int offset = buffer.Offset + relative_offset; + if (offset < 0 || offset >= buffer.Array.Length) + { + buffer = new ArraySegment(buffer.Array, 0, 0); + } + else + { + buffer = new ArraySegment(buffer.Array, offset, buffer.Array.Length - offset); + } + } + public void JumpPrintExtra(int relative_offset) + { + int done_size = Marshal.SizeOf(); + if (done_size < relative_offset) + { + editor.Print("extra", "", editor.HexRange(buffer.Offset + done_size, relative_offset - done_size)); + } + Jump(relative_offset); + } + public ArraySegment buffer; + public PolarisBiosEditor editor; + } + + class DisposeCallback: IDisposable + { + public DisposeCallback(Action arg) + { + a = arg; + } + void IDisposable.Dispose() + { + a(); + } + private Action a; + } + + [STAThread] + static void Main(string[] args) + { + PolarisBiosEditor pbe = new PolarisBiosEditor(); + if (args.Length == 1) + { + try + { + pbe.OpenFileFromCommandLine(args[0]); + } + catch(Exception e) + { + Console.Error.WriteLine("Exception during opening file passed from cmdline: " + e); + } + } + else + { + Console.Error.WriteLine("Open a AMD Polaris VBIOS file to see it's as XML in this console"); + Console.Error.WriteLine("Or close application and open it with a singe file as argument, for example by drag&drop vbios on .exe file"); + } + Application.Run(pbe); + } + + static byte[] getBytes(object obj) + { + int size = Marshal.SizeOf(obj); + byte[] arr = new byte[size]; + IntPtr ptr = Marshal.AllocHGlobal(size); + + Marshal.StructureToPtr(obj, ptr, true); + Marshal.Copy(ptr, arr, 0, size); + Marshal.FreeHGlobal(ptr); + + return arr; + } + + T fromBytes(byte[] arr) + { + return new ConsecutiveReader(arr, 0, this).Read(); + } + + public void setBytesAtPosition(byte[] dest, int ptr, byte[] src) + { + for (var i = 0; i < src.Length; i++) + { + dest[ptr + i] = src[i]; + } + } + + public static string EnumOrValue(int value) + { + return ((TEnum)Enum.ToObject(typeof(TEnum),value)).ToString(); + } + public string HexRange(int start, int len) + { + string values = ""; + for (int i =0; i= buffer.Length) + { + values += "!END_OF_INPUT_DATA!"; + break; + } + if (i <14 || i > len-15) + { + values += string.Format("{0:X2}", buffer[start + i]); + } + else if (i == 14) + { + values += ".."; + } + + } + return string.Format("{0,4}bytes [0x{1:X}-{2:X}) values {3,60}", len, start, start+ len, values); + } + + private struct NamedCmd + { + public int Addr; + public int Index; + public string Name; + public ATOM_CMD_HEADER Header; + }; + + public void PrintCmds(ATOM_CMD_TABLES_LIST cmds, int final_offset) + { + var addr_to_info = new List(); + const int CODE_OFFSET = 6; + using(AutoClosingXml("CMDS-NOT-IMPLEMENTED")) + { + var fields = cmds.GetType().GetFields(); + for (int index = 0; index < fields.Length; ++index) + { + var fi = fields[index]; + int total_addr = (UInt16)fi.GetValue(cmds); + if (total_addr == 0) + { + PrintXml(fi.Name, "", new Attrs{{"tbindex", index}}); + } + else + { + var header = Reader(total_addr).Read(); + addr_to_info.Add(new NamedCmd{ + Addr = total_addr, + Index = index, + Name = fi.Name, + Header = header}); + } + } + } + var ordered = addr_to_info.OrderBy(nc => nc.Addr).ToList(); + int prev = ordered[0].Addr; + foreach(var s in ordered) + { + int skept = s.Addr - prev; + if (skept != 0 && skept != 1) //Ignore i-bte skips since they are for alignment + { + PrintXml("SKEPT", "", new Attrs{{"len", skept}}); + } + var name = string.Format("{0,-36}", s.Name); + var tbindex = string.Format("{0,2}", s.Index); + var header = string.Format("0x{0:X}", s.Addr); + var code = HexRange(s.Addr + CODE_OFFSET, s.Header.usStructureSize - CODE_OFFSET); + var format_content_rev = s.Header.ucTableFormatRevision + "." + s.Header.ucTableContentRevision; + var work_stack_in_4bytes = s.Header.work_data_stack_in_4bytes; + var params_stack_in_1bytes = s.Header.params_stack_in_1bytes; + + PrintXml(name, "", new Attrs{ + {"tbindex", tbindex}, + {"header", header}, + {"code", code}, + {"format_content_rev", format_content_rev}, + {"work_stack_in_4bytes", work_stack_in_4bytes}, + {"params_stack_in_1bytes", params_stack_in_1bytes} + }); + prev = s.Addr + s.Header.usStructureSize; + } + int last_cmd = ordered.Last().Addr + ordered.Last().Header.usStructureSize; + PrintCheckFF(last_cmd, final_offset); + } + + public void PrintCheckFF(int start, int after_end) + { + if (start < 0) + { + PrintXml("INVALID_NEGATIVE_START_PBinaryAreaFastCheck"); + return; + } + int FF_count = 0; + int Zero_count = 0; + int Other_count = 0; + for (int i = start; i < Math.Min(after_end, buffer.Length); ++i) + { + if (buffer[i] == 0xFF) ++FF_count; + else if (buffer[i] == 0) ++Zero_count; + else ++Other_count; + } + PrintXml("BinaryAreaFastCheck", "", new Attrs{ + {"info", HexRange(start, after_end - start)}, + {"FF_count", FF_count}, + {"Zero_count", Zero_count}, + {"Other_count", Other_count}, + }); + } + + public void PrintCheckText(int start, int after_end) + { + var as_text_segment = new ArraySegment(buffer, 0, 0); + if (start < buffer.Length) + { + as_text_segment = new ArraySegment(buffer, start, Math.Min(after_end, buffer.Length) - start); + } + PrintXml("MostlyText", "", new Attrs{ + {"info", HexRange(start, after_end - start)}, + {"as_text", SafeDecodeAscii(as_text_segment)}, + }); + } + + public static string SafeDecodeAscii(IEnumerable bytes) + { + var filtered_result = ""; + foreach(var ch in bytes) + { + if (ch < 0x20 || ch > 127) + { + if (ch == 0) + { + filtered_result += "\\0"; + } + else + { + filtered_result += string.Format("\\x{0:X2}", ch); + } + } + else + { + filtered_result += (char)ch; + } + } + return filtered_result; + } + public string GetXml(string tag, string name, Attrs attrs) + { + var spaces = tag.Count(c => c == ' '); + var spaceless_tag = tag.Replace(" ", ""); + var e = new XElement(spaceless_tag); + if (!string.IsNullOrWhiteSpace(name)) + { + e.Add(new XAttribute("name", name)); + } + if (attrs != null) + { + foreach(var kv in attrs) + { + e.Add(new XAttribute(kv.Key, kv.Value.ToString())); + } + } + var result = e.ToString(); + result = result.Insert(spaceless_tag.Length + 2, new String(' ', spaces)); + result = result.Replace(" />", "/>"); + return result; + } + public void PrintXml(string tag, string name="", Attrs attrs = null) + { + var s = GetXml(tag, name, attrs); + Console.WriteLine(GetPadding() + s); + } + int extra_padding = 0; + public string GetPadding() + { + return new String(' ', extra_padding); + } + public IDisposable AutoClosingXml(string tag, string name="", Attrs attrs = null) + { + var s = GetXml(tag, name, attrs); + Console.WriteLine(GetPadding() + s.Replace("/>", ">")); + extra_padding += 2; + return new DisposeCallback(()=> + { + extra_padding -= 2; + Console.WriteLine(GetPadding() + ""); + }); + } + public void Print(object output, string desc_name = "", string desc = "") + { + try + { + if (output.GetType().IsPrimitive || output.GetType() == typeof(string)) + { + var s = output.ToString(); + var attrs = new Attrs(); + if (!string.IsNullOrWhiteSpace(desc)) + { + attrs.Add("desc", desc); + } + PrintXml(s, desc_name, attrs); + } + else + { + //Create our own namespaces for the output + var ns = new XmlSerializerNamespaces(); + var xs = new XmlSerializer(output.GetType()); + + //Add an empty namespace and empty value + ns.Add("", ""); + + var doc = new XDocument(); + using (var writer = doc.CreateWriter()) + { + xs.Serialize(writer, output, ns); + } + foreach (var e in doc.Descendants().Where(e => (string)e.Attribute("xmlns") == DumpByteArrAsText.HEX_BINARY_BACK_DECODE).ToList()) + { + var bytes = StringToByteArray(e.Value); + e.ReplaceWith(new XElement(e.Name.LocalName, string.Format("{0}-bytes text:{1}", bytes.Length, SafeDecodeAscii(bytes)))); + } + foreach (var e in doc.Descendants()) + { + if (e.Elements().Any()) continue; + if (Int64.TryParse(e.Value, out Int64 parsed) && parsed != 0 && parsed != 1) + { + e.Value = string.Format("{0} = 0x{0:X} = 0b{1}", parsed, Convert.ToString(parsed, 2)); + } + } + if (!string.IsNullOrWhiteSpace(desc)) + { + doc.Root.Add(new XAttribute(desc_name, desc)); + } + var doc_as_string = doc.ToString(); + doc_as_string = GetPadding() + doc_as_string.Replace("\n", "\n" + GetPadding()); + Console.WriteLine(doc_as_string); + } + } + catch (Exception ex) + { + PrintXml("InternalPrintError", ex.GetType().Name, new Attrs{{"output", output}, {"details", ex}}); + } + } + + private int PrintAndReturnLen(ATOM_OBJECT o) + { + if (o.usRecordOffset != 0) + { + var reader = Reader(atom_data_table.Object_Header + o.usRecordOffset); + while (reader.buffer.Count > 0) + { + var first = reader.buffer.First(); + if (first == 0 || first == 255) + { + break; + } + if (reader.buffer.Skip(1).First() < 2) + { + break; + } + var rec = reader.ReadPrint(); + reader.JumpPrintExtra(rec.ucRecordSize); + } + } + return Marshal.SizeOf(o); + } + private void ReadPrintTableDetailed(int offset, Func continue_parse, Action> next_jumper) + { + using(AutoClosingXml(typeof(TTable).Name)) + { + var table_reader = Reader(offset); + var table = table_reader.ReadPrint(); + table_reader.Jump1Structure(); + var object_reader = ConsecutiveReader.From(table_reader); + for (var i = 0; continue_parse(table, i); i++) + { + var atom_object = object_reader.ReadPrint(); + next_jumper(atom_object, object_reader); + } + } + } + + private void ReadPrintTable(int offset, Func continue_parse, Func entry_size) + { + ReadPrintTableDetailed(offset, continue_parse, (atom_object, object_reader) => object_reader.Jump(entry_size(atom_object))); + } + + private void ReadPrintObjectTable(UInt16 offset, Func entry_count, Func entry_size) + { + if (offset == 0) + { + Print("Table-not-present", typeof(TTable).Name); + return; + } + ReadPrintTable(atom_data_table.Object_Header + offset, (table, i) => (i < entry_count(table)), entry_size); + } + + ConsecutiveReader Reader(int offset) + { + return new ConsecutiveReader(buffer, offset, this); + } + + private ListViewItem handler; + + private void listView_ChangeSelection(object sender, EventArgs e) + { + ListView lb = sender as ListView; + String sel_name = lb.SelectedItems[0].Text; + + for (var i = 0; i < lb.Items.Count; i++) + { + + ListViewItem container = lb.Items[i]; + var name = container.Text; + var value = container.SubItems[1].Text; + + if (name == sel_name) + { + editSubItem1.Text = name; + editSubItem2.Text = value; + handler = container; + } + + } + } + + private void apply_Click(object sender, EventArgs e) + { + if (handler != null) + { + handler.Text = editSubItem1.Text; + handler.SubItems[1].Text = editSubItem2.Text; + } + } + + public PolarisBiosEditor() + { + InitializeComponent(); + this.Text = this.programTitle + " " + this.version; + +#if !DEBUG + try + { + + WebClient myWebClient = new WebClient(); + Stream myStream = myWebClient.OpenRead("https://raw.githubusercontent.com/vvaske/PolarisBiosEditor/master/version"); + StreamReader sr = new StreamReader(myStream); + string newVersion = sr.ReadToEnd().Trim(); + if (!newVersion.Equals(version)) { + MessageBox.Show("There is a new version available! " + version + " -> " + newVersion); + } + myStream.Close(); + + myStream = myWebClient.OpenRead("https://raw.githubusercontent.com/vvaske/PolarisBiosEditor/master/notice"); + sr = new StreamReader(myStream); + string notice = sr.ReadToEnd().Trim(); + + MessageBoxButtons buttons = MessageBoxButtons.YesNo; + DialogResult result; + + result = MessageBox.Show(notice + "\n\nClick Yes button to copy to clipboard", "A message from the developer", buttons); + + if (result == System.Windows.Forms.DialogResult.OK) + { + + Clipboard.SetText(notice); + + } + + myStream.Close(); + + + } catch (System.Net.WebException) { + this.Text += " (offline mode)"; + } +#else + Console.Error.WriteLine("This is a debug build, skipping update check."); +#endif + + rc.Add("MT51J256M3", "MICRON-8G"); + rc.Add("EDW4032BAB", "ELPIDA-4G"); + rc.Add("H5GC4H24AJ", "HYNIX_1-4G"); + rc.Add("H5GQ4H24AJ", "HYNIX_2-4G"); + rc.Add("H5GQ8H24MJ", "HYNIX_2-8G"); + rc.Add("H5GC8H24MJ", "HYNIX_3-8G"); + rc.Add("H5GC8H24AJ", "HYNIX_4-8G"); + rc.Add("K4G80325FB", "SAMSUNG-B-8G"); + rc.Add("K4G41325FE", "SAMSUNG-E-4G"); + rc.Add("K4G41325FC", "SAMSUNG-C-4G"); + rc.Add("K4G41325FS", "SAMSUNG-S-4G"); + rc.Add("K4G80325FC", "SAMSUNG4-C-8G"); + + save.Enabled = false; + boxROM.Enabled = false; + boxPOWERPLAY.Enabled = false; + boxPOWERTUNE.Enabled = false; + boxFAN.Enabled = false; + boxGPU.Enabled = false; + boxMEM.Enabled = false; + boxVRAM.Enabled = false; + + tableVRAM.MouseClick += new MouseEventHandler(listView_ChangeSelection); + tableVRAM_TIMING.MouseClick += new MouseEventHandler(listView_ChangeSelection); + tableMEMORY.MouseClick += new MouseEventHandler(listView_ChangeSelection); + tableGPU.MouseClick += new MouseEventHandler(listView_ChangeSelection); + tableFAN.MouseClick += new MouseEventHandler(listView_ChangeSelection); + tablePOWERTUNE.MouseClick += new MouseEventHandler(listView_ChangeSelection); + tablePOWERPLAY.MouseClick += new MouseEventHandler(listView_ChangeSelection); + tableROM.MouseClick += new MouseEventHandler(listView_ChangeSelection); + + } + + private void PolarisBiosEditor_Load(object sender, EventArgs e) + { + + } + + private void editSubItem2_Click(object sender, EventArgs e) + { + MouseEventArgs me = (MouseEventArgs)e; + if (me.Button == MouseButtons.Right) + { + if (editSubItem2.Text.Length == 96) + { + byte[] decode = StringToByteArray(editSubItem2.Text); + MessageBox.Show("Decode Memory Timings " + decode + " / not implemented yet!"); + } + } + } + + public void OpenFileFromCommandLine(string path) + { + Stream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read); + ParseVbiosAndClose(fileStream, path); + UpdateGui(path); + } + + private void OpenFileDialog_Click(object sender, EventArgs e) + { + OpenFileDialog openFileDialog = new OpenFileDialog(); + openFileDialog.Filter = "BIOS (.rom)|*.rom|All Files (*.*)|*.*"; + openFileDialog.FilterIndex = 1; + openFileDialog.Multiselect = false; + + if (openFileDialog.ShowDialog() == DialogResult.OK) + { + Stream fileStream = openFileDialog.OpenFile(); + ParseVbiosAndClose(fileStream, openFileDialog.SafeFileName); + UpdateGui(openFileDialog.SafeFileName); + } + } + + private void ParseVbiosAndClose(Stream fileStream, string filename) + { + if ((fileStream.Length != 524288) && (fileStream.Length != 524288 / 2)) + { + MessageBox.Show("This BIOS is non standard size.\nFlashing this BIOS may corrupt your graphics card.", "WARNING", MessageBoxButtons.OK, MessageBoxIcon.Warning); + } + using (BinaryReader br = new BinaryReader(fileStream)) + using (AutoClosingXml("root-of-option-rom-dump", filename, new Attrs{{"dump-software-version", programTitle+"-"+version}})) + { + buffer = br.ReadBytes((int)fileStream.Length); + + ATOM_CMD_TABLES atom_code; + EFI_LEGACY_EXPANSION_AMD_ROM_HEADER option_rom; + using(AutoClosingXml("OptionRomAndAtomHeaders")) + { + option_rom = Reader(0).ReadPrint(); + atom_rom_header_offset = option_rom.AtomRomHeaderOffset; + PrintCheckText(Marshal.SizeOf(option_rom), atom_rom_header_offset); + atom_rom_header = Reader(atom_rom_header_offset).ReadPrint(); + + pcir_offset = option_rom.PCIRHeaderOffset; + pcir_header = Reader(pcir_offset).ReadPrint(); + + fixChecksum(false); + + if (SafeDecodeAscii(atom_rom_header.uaFirmWareSignature) != "ATOM") + { + MessageBox.Show("WARNING! BIOS doesn't look like valid AMD GPU Bios. Results may be garbage.", "WARNING", MessageBoxButtons.OK, MessageBoxIcon.Warning); + } + + string deviceId = pcir_header.usDeviceID.ToString("X"); + if (!supportedID.Contains(deviceId)) + { + MessageBox.Show("Unsupported DeviceID 0x" + deviceId + ".\n You can view fileds and XML output, but trying to save will crash or produce corrupted file", "WARNING", MessageBoxButtons.OK, MessageBoxIcon.Warning); + } + + atom_code = Reader(atom_rom_header.usMasterCommandTableOffset).ReadPrint(); + } + using(AutoClosingXml("AtomMasterDataTables")) + { + //cmds are placed after tables in VBIOS, so they are print last- see atom_code usages + atom_data_table = Reader(atom_rom_header.usMasterDataTableOffset).ReadPrint(); + + Reader(atom_data_table.FirmwareInfo).ReadPrint(); + + ReadPrintTable(atom_data_table.GPIO_I2C_Info, + (i2c_info_table, i) => i < (i2c_info_table.sHeader.usStructureSize - Marshal.SizeOf(i2c_info_table.sHeader)) / Marshal.SizeOf(), + i2c_assigment => Marshal.SizeOf(i2c_assigment) + ); + + atom_powerplay_offset = atom_data_table.PowerPlayInfo; + atom_powerplay_table = Reader(atom_powerplay_offset).ReadPrint(); + + using(AutoClosingXml("AtomVoltageTables")) + { + atom_vddc_table_offset = atom_data_table.PowerPlayInfo + atom_powerplay_table.usVddcLookupTableOffset; + atom_vddc_table = Reader(atom_vddc_table_offset).ReadPrint("VddcLookupTable"); + atom_vddc_entries = new ATOM_VOLTAGE_ENTRY[atom_vddc_table.ucNumEntries]; + for (var i = 0; i < atom_vddc_table.ucNumEntries; i++) + { + atom_vddc_entries[i] = Reader(atom_vddc_table_offset + Marshal.SizeOf() + Marshal.SizeOf() * i).ReadPrint(); + } + + var atom_vddgfx_table_offset = atom_data_table.PowerPlayInfo + atom_powerplay_table.usVddgfxLookupTableOffset; + var atom_vddgfx_table = Reader(atom_vddgfx_table_offset).ReadPrint("VddgfxLookupTable"); + for (var i = 0; i < atom_vddgfx_table.ucNumEntries; i++) + { + Reader(atom_vddgfx_table_offset + Marshal.SizeOf() + Marshal.SizeOf() * i).ReadPrint(); + } + } + + using(AutoClosingXml("AtomClockTables")) + { + atom_sclk_table_offset = atom_data_table.PowerPlayInfo + atom_powerplay_table.usSclkDependencyTableOffset; + atom_sclk_table = Reader(atom_sclk_table_offset).ReadPrint("SclkDependencyTable"); + atom_sclk_entries = new ATOM_SCLK_ENTRY[atom_sclk_table.ucNumEntries]; + for (var i = 0; i < atom_sclk_entries.Length; i++) + { + atom_sclk_entries[i] = Reader(atom_sclk_table_offset + Marshal.SizeOf() + Marshal.SizeOf() * i).ReadPrint(); + } + + atom_mclk_table_offset = atom_data_table.PowerPlayInfo + atom_powerplay_table.usMclkDependencyTableOffset; + atom_mclk_table = Reader(atom_mclk_table_offset).ReadPrint("MclkDependencyTable"); + atom_mclk_entries = new ATOM_MCLK_ENTRY[atom_mclk_table.ucNumEntries]; + for (var i = 0; i < atom_mclk_entries.Length; i++) + { + atom_mclk_entries[i] = Reader(atom_mclk_table_offset + Marshal.SizeOf() + Marshal.SizeOf() * i).ReadPrint(); + } + } + + using(AutoClosingXml("AtomMMDependencyTable")) + { + var atom_mm_dependency_table_offset = atom_data_table.PowerPlayInfo + atom_powerplay_table.usMMDependencyTableOffset; + var atom_mm_dependency_table = Reader(atom_mm_dependency_table_offset).ReadPrint(); + for (var i = 0; i < atom_mm_dependency_table.ucNumEntries; i++) + { + Reader(atom_mm_dependency_table_offset + Marshal.SizeOf() + Marshal.SizeOf() * i).ReadPrint(); + } + } + + atom_fan_offset = atom_data_table.PowerPlayInfo + atom_powerplay_table.usFanTableOffset; + atom_fan_table = Reader(atom_fan_offset).ReadPrint(); + + atom_powertune_offset = atom_data_table.PowerPlayInfo + atom_powerplay_table.usPowerTuneTableOffset; + atom_powertune_table = Reader(atom_powertune_offset).ReadPrint(); + //actually only atom_powertune_table.ucRevId == 4 is supported + + using(AutoClosingXml("AtomVideoOutTables")) + { + var atom_object_header = Reader(atom_data_table.Object_Header).ReadPrint(); + + ReadPrintObjectTable(atom_object_header.usDisplayPathTableOffset, tb => tb.ucNumOfDispPath, o => o.usSize); + using(AutoClosingXml("Connectors")) + { + ReadPrintObjectTable(atom_object_header.usConnectorObjectTableOffset, tb => tb.ucNumberOfObjects, PrintAndReturnLen); + } + using(AutoClosingXml("Encoders")) + { + ReadPrintObjectTable(atom_object_header.usEncoderObjectTableOffset, tb => tb.ucNumberOfObjects, PrintAndReturnLen); + } + using(AutoClosingXml("Routers")) + { + ReadPrintObjectTable(atom_object_header.usRouterObjectTableOffset, tb => tb.ucNumberOfObjects, PrintAndReturnLen); + } + } + + using(AutoClosingXml("AtomVRamTables")) + { + atom_vram_info_offset = atom_data_table.VRAM_Info; + atom_vram_info = Reader(atom_vram_info_offset).ReadPrint(); + atom_vram_entries = new ATOM_VRAM_ENTRY[atom_vram_info.ucNumOfVRAMModule]; + var atom_vram_entry_reader = Reader(atom_vram_info_offset + Marshal.SizeOf()); + for (var i = 0; i < atom_vram_info.ucNumOfVRAMModule; i++) + { + atom_vram_entries[i] = atom_vram_entry_reader.ReadPrint(); + atom_vram_entry_reader.Jump(atom_vram_entries[i].usModuleSize); + } + + atom_vram_timing_offset = atom_vram_info_offset + atom_vram_info.usMemClkPatchTblOffset + 0x2E; + atom_vram_timing_entries = new ATOM_VRAM_TIMING_ENTRY[MAX_VRAM_ENTRIES]; + for (var i = 0; i < MAX_VRAM_ENTRIES; i++) + { + atom_vram_timing_entries[i] = Reader(atom_vram_timing_offset + Marshal.SizeOf() * i).ReadPrint(); + + // atom_vram_timing_entries have an undetermined length + // attempt to determine the last entry in the array + if (atom_vram_timing_entries[i].ulClkRange == 0) + { + Array.Resize(ref atom_vram_timing_entries, i); + break; + } + } + } + + var used_volt_obffset = 0; + + ReadPrintTableDetailed(atom_data_table.VoltageObjectInfo, + (volt_table, i) => used_volt_obffset < (volt_table.sHeader.usStructureSize - Marshal.SizeOf(volt_table.sHeader)), + (volt_object_header, reader) => + { + used_volt_obffset += volt_object_header.usSize; + if (volt_object_header.ucVoltageMode == atom_voltage_object_mode.VOLTAGE_OBJ_VR_I2C_INIT_SEQ_0x3) + { + var specialized_reader = ConsecutiveReader.From(reader); + specialized_reader.Jump(Marshal.SizeOf(volt_object_header)); + specialized_reader.ReadPrint(); + specialized_reader.Jump1Structure(); + var detailed_reader = ConsecutiveReader.From(specialized_reader); + while (detailed_reader.Read().i2c_reg_index != FINAL_atom_i2c_data_entry.ENDING_INDEX_VALUE) + { + detailed_reader.ReadPrint(); + detailed_reader.Jump1Structure(); + } + ConsecutiveReader.From(detailed_reader).ReadPrint(); + } + else if (volt_object_header.ucVoltageMode == atom_voltage_object_mode.VOLTAGE_OBJ_GPIO_LUT_0x0) + { + var specialized_reader = ConsecutiveReader.From(reader); + specialized_reader.Jump(Marshal.SizeOf(volt_object_header)); + var gpio_voltage_fields = specialized_reader.ReadPrint(); + specialized_reader.Jump1Structure(); + var detailed_reader = ConsecutiveReader.From(specialized_reader); + for (var i = 0; i < gpio_voltage_fields.gpio_entry_num; i++) + { + detailed_reader.ReadPrint(); + detailed_reader.Jump1Structure(); + } + } + reader.Jump(volt_object_header.usSize); + } + ); + } + int section_end = option_rom.Bit8Length_in_512bytes * 512; + using(AutoClosingXml("AtomMasterCommands")) + { + PrintCmds(atom_code.cmds, section_end); //cmds are placed after tables in VBIOS, so they are print last + } + if (pcir_header.Indicator_last_is_0x80 != 0x80) + { + using(AutoClosingXml("EfiGopPart")) + { + var efi_option_rom = Reader(section_end).ReadPrint(); + var efi_pcir = Reader(section_end + efi_option_rom.PCIRHeaderOffset).ReadPrint(); + var conmprresed_start = section_end + efi_option_rom.CompressableEfiImageHeaderOffset; + PrintCheckText(section_end + efi_option_rom.PCIRHeaderOffset + Marshal.SizeOf(efi_pcir), conmprresed_start); + var compressed_efi = Reader(conmprresed_start).ReadPrint(); + PrintCheckFF((int)(section_end + efi_option_rom.CompressableEfiImageHeaderOffset + Marshal.SizeOf(compressed_efi) + compressed_efi.CompressedLengthAfterHeader), + section_end + efi_option_rom.Bit16Length_in_512bytes * 512); + } + } + } + fileStream.Close(); + } + + private void UpdateGui(string file_title) + { + save.Enabled = false; + + tableROM.Items.Clear(); + tablePOWERPLAY.Items.Clear(); + tablePOWERTUNE.Items.Clear(); + tableFAN.Items.Clear(); + tableGPU.Items.Clear(); + tableMEMORY.Items.Clear(); + tableVRAM.Items.Clear(); + tableVRAM_TIMING.Items.Clear(); + + this.Text = this.programTitle + " " + this.version + " - " + "[" + file_title + "]"; + + StringBuilder bios_bootup_builder = new StringBuilder(); + + Int32 ptr = atom_rom_header.usBIOS_BootupMessageOffset + 2; + while (ptr >= 0 && ptr < buffer.Length) + { + Char c = (Char)buffer[ptr]; + if (c == '\0') + { + ptr = -1; + } + else if (c == '\n' || c == '\r') + { + ptr++; + } + else + { + bios_bootup_builder.Append(c); + ptr++; + } + } + + BIOS_BootupMessage = bios_bootup_builder.ToString(); + + txtBIOSBootupMessage.Text = BIOS_BootupMessage; + txtBIOSBootupMessage.MaxLength = BIOS_BootupMessage.Length; + + tableROM.Items.Add(new ListViewItem(new string[] { + "BootupMessageOffset", + "0x" + atom_rom_header.usBIOS_BootupMessageOffset.ToString ("X") + } + )); + tableROM.Items.Add(new ListViewItem(new string[] { + "VendorID", + "0x" + pcir_header.usVendorID.ToString ("X") + } + )); + tableROM.Items.Add(new ListViewItem(new string[] { + "DeviceID", + "0x" + pcir_header.usDeviceID.ToString ("X") + } + )); + tableROM.Items.Add(new ListViewItem(new string[] { + "Sub ID", + "0x" + atom_rom_header.usSubsystemID.ToString ("X") + } + )); + tableROM.Items.Add(new ListViewItem(new string[] { + "Sub VendorID", + "0x" + atom_rom_header.usSubsystemVendorID.ToString ("X") + } + )); + tableROM.Items.Add(new ListViewItem(new string[] { + "Firmware Signature", + //"0x" + atom_rom_header.uaFirmWareSignature.ToString ("X") + SafeDecodeAscii(atom_rom_header.uaFirmWareSignature) + } + )); + + tablePOWERPLAY.Items.Clear(); + tablePOWERPLAY.Items.Add(new ListViewItem(new string[] { + "Max GPU Freq. (MHz)", + Convert.ToString (atom_powerplay_table.ulMaxODEngineClock / 100) + } + )); + tablePOWERPLAY.Items.Add(new ListViewItem(new string[] { + "Max Memory Freq. (MHz)", + Convert.ToString (atom_powerplay_table.ulMaxODMemoryClock / 100) + } + )); + tablePOWERPLAY.Items.Add(new ListViewItem(new string[] { + "Power Control Limit (%)", + Convert.ToString (atom_powerplay_table.usPowerControlLimit) + } + )); + + tablePOWERTUNE.Items.Clear(); + tablePOWERTUNE.Items.Add(new ListViewItem(new string[] { + "TDP (W)", + Convert.ToString (atom_powertune_table.usTDP) + } + )); + tablePOWERTUNE.Items.Add(new ListViewItem(new string[] { + "TDC (A)", + Convert.ToString (atom_powertune_table.usTDC) + } + )); + tablePOWERTUNE.Items.Add(new ListViewItem(new string[] { + "Max Power Limit (W)", + Convert.ToString (atom_powertune_table.usMaximumPowerDeliveryLimit) + } + )); + tablePOWERTUNE.Items.Add(new ListViewItem(new string[] { + "Max Temp. (C)", + Convert.ToString (atom_powertune_table.usTjMax) + } + )); + tablePOWERTUNE.Items.Add(new ListViewItem(new string[] { + "Shutdown Temp. (C)", + Convert.ToString (atom_powertune_table.usSoftwareShutdownTemp) + } + )); + tablePOWERTUNE.Items.Add(new ListViewItem(new string[] { + "Hotspot Temp. (C)", + Convert.ToString (atom_powertune_table.usTemperatureLimitHotspot) + } + )); + tablePOWERTUNE.Items.Add(new ListViewItem(new string[] { + "Clock Stretch Amount", + Convert.ToString (atom_powertune_table.usClockStretchAmount) + } + )); + + tableFAN.Items.Clear(); + tableFAN.Items.Add(new ListViewItem(new string[] { + "Temp. Hysteresis", + Convert.ToString (atom_fan_table.ucTHyst) + } + )); + tableFAN.Items.Add(new ListViewItem(new string[] { + "Min Temp. (C)", + Convert.ToString (atom_fan_table.usTMin / 100) + } + )); + tableFAN.Items.Add(new ListViewItem(new string[] { + "Med Temp. (C)", + Convert.ToString (atom_fan_table.usTMed / 100) + } + )); + tableFAN.Items.Add(new ListViewItem(new string[] { + "High Temp. (C)", + Convert.ToString (atom_fan_table.usTHigh / 100) + } + )); + tableFAN.Items.Add(new ListViewItem(new string[] { + "Max Temp. (C)", + Convert.ToString (atom_fan_table.usTMax / 100) + } + )); + tableFAN.Items.Add(new ListViewItem(new string[] { + "Target Temp. (C)", + Convert.ToString (atom_fan_table.ucTargetTemperature) + } + )); + tableFAN.Items.Add(new ListViewItem(new string[] { + "Legacy or Fuzzy Fan Mode", + Convert.ToString (atom_fan_table.ucFanControlMode) + } + )); + tableFAN.Items.Add(new ListViewItem(new string[] { + "Min PWM (%)", + Convert.ToString (atom_fan_table.usPWMMin / 100) + } + )); + tableFAN.Items.Add(new ListViewItem(new string[] { + "Med PWM (%)", + Convert.ToString (atom_fan_table.usPWMMed / 100) + } + )); + tableFAN.Items.Add(new ListViewItem(new string[] { + "High PWM (%)", + Convert.ToString (atom_fan_table.usPWMHigh / 100) + } + )); + tableFAN.Items.Add(new ListViewItem(new string[] { + "Max PWM (%)", + Convert.ToString (atom_fan_table.usFanPWMMax) + } + )); + tableFAN.Items.Add(new ListViewItem(new string[] { + "Max RPM", + Convert.ToString (atom_fan_table.usFanRPMMax) + } + )); + tableFAN.Items.Add(new ListViewItem(new string[] { + "Sensitivity", + Convert.ToString (atom_fan_table.usFanOutputSensitivity) + } + )); + tableFAN.Items.Add(new ListViewItem(new string[] { + "Acoustic Limit (MHz)", + Convert.ToString (atom_fan_table.ulMinFanSCLKAcousticLimit / 100) + } + )); + + tableGPU.Items.Clear(); + for (var i = 0; i < atom_sclk_table.ucNumEntries; i++) + { + UInt16 usVdd = 0; + var usVddInd = atom_sclk_entries [i].ucVddInd; + if (atom_vddc_entries.Length > usVddInd) + { + usVdd = atom_vddc_entries[usVddInd].usVdd; + } + tableGPU.Items.Add(new ListViewItem(new string[] { + Convert.ToString (atom_sclk_entries [i].ulSclk / 100), + Convert.ToString (usVdd) + } + )); + } + + tableMEMORY.Items.Clear(); + for (var i = 0; i < atom_mclk_table.ucNumEntries; i++) + { + tableMEMORY.Items.Add(new ListViewItem(new string[] { + Convert.ToString (atom_mclk_entries [i].ulMclk / 100), + "", + Convert.ToString (atom_mclk_entries [i].usVddci), + Convert.ToString (atom_mclk_entries [i].ucVddcInd) + } + )); + } + + listVRAM.Items.Clear(); + for (var i = 0; i < atom_vram_info.ucNumOfVRAMModule; i++) + { + if (atom_vram_entries[i].strMemPNString[0] != 0) + { + var mem_id_full = atom_vram_entries[i].FullName; + var mem_id = mem_id_full.Substring(0, Math.Min(10, mem_id_full.Length)); + string mem_vendor; + if (rc.ContainsKey(mem_id)) + { + mem_vendor = rc[mem_id]; + } + else + { + mem_vendor = "UNKNOWN"; + } + + listVRAM.Items.Add(mem_id_full + "-" + mem_vendor); + } + } + if (listVRAM.Items.Count > 0) + { + listVRAM.SelectedIndex = 0; + } + atom_vram_index = 0; + + tableVRAM_TIMING.Items.Clear(); + for (var i = 0; i < atom_vram_timing_entries.Length; i++) + { + uint tbl = atom_vram_timing_entries[i].ulClkRange >> 24; + tableVRAM_TIMING.Items.Add(new ListViewItem(new string[] { + tbl.ToString () + ":" + (atom_vram_timing_entries [i].ulClkRange & 0x00FFFFFF) / 100, + atom_vram_timing_entries [i].LatencyString + } + )); + } + + save.Enabled = true; + boxROM.Enabled = true; + boxPOWERPLAY.Enabled = true; + boxPOWERTUNE.Enabled = true; + boxFAN.Enabled = true; + boxGPU.Enabled = true; + boxMEM.Enabled = true; + boxVRAM.Enabled = true; + tableROM.AutoResizeColumns(ColumnHeaderAutoResizeStyle.ColumnContent); + tableROM.AutoResizeColumns(ColumnHeaderAutoResizeStyle.HeaderSize); + + tableFAN.AutoResizeColumns(ColumnHeaderAutoResizeStyle.ColumnContent); + tableFAN.AutoResizeColumns(ColumnHeaderAutoResizeStyle.HeaderSize); + + tablePOWERPLAY.AutoResizeColumns(ColumnHeaderAutoResizeStyle.ColumnContent); + tablePOWERPLAY.AutoResizeColumns(ColumnHeaderAutoResizeStyle.HeaderSize); + + tableGPU.AutoResizeColumns(ColumnHeaderAutoResizeStyle.ColumnContent); + tableGPU.AutoResizeColumns(ColumnHeaderAutoResizeStyle.HeaderSize); + + tablePOWERTUNE.AutoResizeColumns(ColumnHeaderAutoResizeStyle.ColumnContent); + tablePOWERTUNE.AutoResizeColumns(ColumnHeaderAutoResizeStyle.HeaderSize); + + tableMEMORY.AutoResizeColumns(ColumnHeaderAutoResizeStyle.ColumnContent); + tableMEMORY.AutoResizeColumns(ColumnHeaderAutoResizeStyle.HeaderSize); + + tableVRAM.AutoResizeColumns(ColumnHeaderAutoResizeStyle.ColumnContent); + tableVRAM.AutoResizeColumns(ColumnHeaderAutoResizeStyle.HeaderSize); + + tableVRAM_TIMING.AutoResizeColumns(ColumnHeaderAutoResizeStyle.ColumnContent); + tableVRAM_TIMING.AutoResizeColumns(ColumnHeaderAutoResizeStyle.HeaderSize); + + } + + public Int32 getValueAtPosition(int bits, int position, bool isFrequency = false) + { + int value = 0; + if (position <= buffer.Length - 4) + { + switch (bits) + { + case 8: + default: + value = buffer[position]; + break; + case 16: + value = (buffer[position + 1] << 8) | buffer[position]; + break; + case 24: + value = (buffer[position + 2] << 16) | (buffer[position + 1] << 8) | buffer[position]; + break; + case 32: + value = (buffer[position + 3] << 24) | (buffer[position + 2] << 16) | (buffer[position + 1] << 8) | buffer[position]; + break; + } + if (isFrequency) + return value / 100; + return value; + } + return -1; + } + + public bool setValueAtPosition(int value, int bits, int position, bool isFrequency = false) + { + if (isFrequency) + value *= 100; + if (position <= buffer.Length - 4) + { + switch (bits) + { + case 8: + default: + buffer[position] = (byte)value; + break; + case 16: + buffer[position] = (byte)value; + buffer[position + 1] = (byte)(value >> 8); + break; + case 24: + buffer[position] = (byte)value; + buffer[position + 1] = (byte)(value >> 8); + buffer[position + 2] = (byte)(value >> 16); + break; + case 32: + buffer[position] = (byte)value; + buffer[position + 1] = (byte)(value >> 8); + buffer[position + 2] = (byte)(value >> 16); + buffer[position + 3] = (byte)(value >> 32); + break; + } + return true; + } + return false; + } + + private bool setValueAtPosition(String text, int bits, int position, bool isFrequency = false) + { + int value = 0; + if (!int.TryParse(text, out value)) + { + return false; + } + return setValueAtPosition(value, bits, position, isFrequency); + } + + private void SaveFileDialog_Click(object sender, EventArgs e) + { + SaveFileDialog SaveFileDialog = new SaveFileDialog(); + SaveFileDialog.Title = "Save As"; + SaveFileDialog.Filter = "BIOS (*.rom)|*.rom"; + + if (SaveFileDialog.ShowDialog() == DialogResult.OK) + { + FileStream fs = new FileStream(SaveFileDialog.FileName, FileMode.Create); + BinaryWriter bw = new BinaryWriter(fs); + + for (var i = 0; i < tableROM.Items.Count; i++) + { + ListViewItem container = tableROM.Items[i]; + var name = container.Text; + var value = container.SubItems[1].Text; + + if (name == "VendorID") + { + var num = (int)int32.ConvertFromString(value); + pcir_header.usVendorID = (UInt16)num; + } + else if (name == "DeviceID") + { + var num = (int)int32.ConvertFromString(value); + pcir_header.usDeviceID = (UInt16)num; + } + else if (name == "Sub ID") + { + var num = (int)int32.ConvertFromString(value); + atom_rom_header.usSubsystemID = (UInt16)num; + } + else if (name == "Sub VendorID") + { + var num = (int)int32.ConvertFromString(value); + atom_rom_header.usSubsystemVendorID = (UInt16)num; + } + } + + for (var i = 0; i < tablePOWERPLAY.Items.Count; i++) + { + ListViewItem container = tablePOWERPLAY.Items[i]; + var name = container.Text; + var value = container.SubItems[1].Text; + var num = (int)int32.ConvertFromString(value); + + if (name == "Max GPU Freq. (MHz)") + { + atom_powerplay_table.ulMaxODEngineClock = (UInt32)(num * 100); + } + else if (name == "Max Memory Freq. (MHz)") + { + atom_powerplay_table.ulMaxODMemoryClock = (UInt32)(num * 100); + } + else if (name == "Power Control Limit (%)") + { + atom_powerplay_table.usPowerControlLimit = (UInt16)num; + } + } + + for (var i = 0; i < tablePOWERTUNE.Items.Count; i++) + { + ListViewItem container = tablePOWERTUNE.Items[i]; + var name = container.Text; + var value = container.SubItems[1].Text; + var num = (int)int32.ConvertFromString(value); + + if (name == "TDP (W)") + { + atom_powertune_table.usTDP = (UInt16)num; + } + else if (name == "TDC (A)") + { + atom_powertune_table.usTDC = (UInt16)num; + } + else if (name == "Max Power Limit (W)") + { + atom_powertune_table.usMaximumPowerDeliveryLimit = (UInt16)num; + } + else if (name == "Max Temp. (C)") + { + atom_powertune_table.usTjMax = (UInt16)num; + } + else if (name == "Shutdown Temp. (C)") + { + atom_powertune_table.usSoftwareShutdownTemp = (UInt16)num; + } + else if (name == "Hotspot Temp. (C)") + { + atom_powertune_table.usTemperatureLimitHotspot = (UInt16)num; + } + else if (name == "Clock Stretch Amount") + { + atom_powertune_table.usClockStretchAmount = (UInt16)num; + } + } + + for (var i = 0; i < tableFAN.Items.Count; i++) + { + ListViewItem container = tableFAN.Items[i]; + var name = container.Text; + var value = container.SubItems[1].Text; + var num = (int)int32.ConvertFromString(value); + + if (name == "Temp. Hysteresis") + { + atom_fan_table.ucTHyst = (Byte)num; + } + else if (name == "Min Temp. (C)") + { + atom_fan_table.usTMin = (UInt16)(num * 100); + } + else if (name == "Med Temp. (C)") + { + atom_fan_table.usTMed = (UInt16)(num * 100); + } + else if (name == "High Temp. (C)") + { + atom_fan_table.usTHigh = (UInt16)(num * 100); + } + else if (name == "Max Temp. (C)") + { + atom_fan_table.usTMax = (UInt16)(num * 100); + } + else if (name == "Target Temp. (C)") + { + atom_fan_table.ucTargetTemperature = (Byte)num; + } + else if (name == "Legacy or Fuzzy Fan Mode") + { + atom_fan_table.ucFanControlMode = (Byte)(num); + } + else if (name == "Min PWM (%)") + { + atom_fan_table.usPWMMin = (UInt16)(num * 100); + } + else if (name == "Med PWM (%)") + { + atom_fan_table.usPWMMed = (UInt16)(num * 100); + } + else if (name == "High PWM (%)") + { + atom_fan_table.usPWMHigh = (UInt16)(num * 100); + } + else if (name == "Max PWM (%)") + { + atom_fan_table.usFanPWMMax = (UInt16)num; + } + else if (name == "Max RPM") + { + atom_fan_table.usFanRPMMax = (UInt16)num; + } + else if (name == "Sensitivity") + { + atom_fan_table.usFanOutputSensitivity = (UInt16)num; + } + else if (name == "Acoustic Limit (MHz)") + { + atom_fan_table.ulMinFanSCLKAcousticLimit = (UInt32)(num * 100); + } + } + + for (var i = 0; i < tableGPU.Items.Count; i++) + { + ListViewItem container = tableGPU.Items[i]; + var name = container.Text; + var value = container.SubItems[1].Text; + var mhz = (int)int32.ConvertFromString(name) * 100; + var mv = (int)int32.ConvertFromString(value); + + atom_sclk_entries[i].ulSclk = (UInt32)mhz; + atom_vddc_entries[atom_sclk_entries[i].ucVddInd].usVdd = (UInt16)mv; + if (mv < 0xFF00) + { + atom_sclk_entries[i].usVddcOffset = 0; + } + } + + for (var i = 0; i < tableMEMORY.Items.Count; i++) + { + ListViewItem container = tableMEMORY.Items[i]; + var name = container.Text; + var mhz = (int)int32.ConvertFromString(name) * 100; + + atom_mclk_entries[i].ulMclk = (UInt32)mhz; + } + + updateVRAM_entries(); + for (var i = 0; i < tableVRAM_TIMING.Items.Count; i++) + { + ListViewItem container = tableVRAM_TIMING.Items[i]; + var name = container.Text; + var value = container.SubItems[1].Text; + var arr = StringToByteArray(value); + UInt32 mhz; + if (name.IndexOf(':') > 0) + { + mhz = (UInt32)uint32.ConvertFromString(name.Substring(name.IndexOf(':') + 1)) * 100; + mhz += (UInt32)uint32.ConvertFromString(name.Substring(0, name.IndexOf(':'))) << 24; // table id + } + else + { + mhz = (UInt32)uint32.ConvertFromString(name) * 100; + } + atom_vram_timing_entries[i].ulClkRange = mhz; + atom_vram_timing_entries[i].ucLatency = arr; + } + + setBytesAtPosition(buffer, atom_rom_header_offset, getBytes(atom_rom_header)); + setBytesAtPosition(buffer, pcir_offset, getBytes(pcir_header)); + setBytesAtPosition(buffer, atom_powerplay_offset, getBytes(atom_powerplay_table)); + setBytesAtPosition(buffer, atom_powertune_offset, getBytes(atom_powertune_table)); + setBytesAtPosition(buffer, atom_fan_offset, getBytes(atom_fan_table)); + + for (var i = 0; i < atom_mclk_table.ucNumEntries; i++) + { + setBytesAtPosition(buffer, atom_mclk_table_offset + Marshal.SizeOf() + Marshal.SizeOf() * i, getBytes(atom_mclk_entries[i])); + } + + for (var i = 0; i < atom_sclk_table.ucNumEntries; i++) + { + setBytesAtPosition(buffer, atom_sclk_table_offset + Marshal.SizeOf() + Marshal.SizeOf() * i, getBytes(atom_sclk_entries[i])); + } + + for (var i = 0; i < atom_vddc_table.ucNumEntries; i++) + { + setBytesAtPosition(buffer, atom_vddc_table_offset + Marshal.SizeOf() + Marshal.SizeOf() * i, getBytes(atom_vddc_entries[i])); + } + + var atom_vram_entry_offset = atom_vram_info_offset + Marshal.SizeOf(); + for (var i = 0; i < atom_vram_info.ucNumOfVRAMModule; i++) + { + setBytesAtPosition(buffer, atom_vram_entry_offset, getBytes(atom_vram_entries[i])); + atom_vram_entry_offset += atom_vram_entries[i].usModuleSize; + } + + atom_vram_timing_offset = atom_vram_info_offset + atom_vram_info.usMemClkPatchTblOffset + 0x2E; + for (var i = 0; i < atom_vram_timing_entries.Length; i++) + { + setBytesAtPosition(buffer, atom_vram_timing_offset + Marshal.SizeOf() * i, getBytes(atom_vram_timing_entries[i])); + } + + BIOS_BootupMessage = txtBIOSBootupMessage.Text.Substring(0, BIOS_BootupMessage.Length); + + setBytesAtPosition(buffer, atom_rom_header.usBIOS_BootupMessageOffset + 2, Encoding.ASCII.GetBytes(BIOS_BootupMessage)); + fixChecksum(true); + bw.Write(buffer); + + fs.Close(); + bw.Close(); + } + } + + private void fixChecksum(bool save) + { + Byte checksum = buffer[ATOM_ROM_CHECKSUM_OFFSET]; + int size = buffer[0x02] * 512; + Byte offset = 0; + + for (int i = 0; i < size; i++) + { + offset += buffer[i]; + } + if (checksum == (buffer[ATOM_ROM_CHECKSUM_OFFSET] - offset)) + { + txtChecksum.ForeColor = Color.Green; + } + else if (!save) + { + txtChecksum.ForeColor = Color.Red; + MessageBox.Show("Invalid checksum - Save to fix!", "WARNING", MessageBoxButtons.OK, MessageBoxIcon.Warning); + } + if (save) + { + buffer[ATOM_ROM_CHECKSUM_OFFSET] -= offset; + txtChecksum.ForeColor = Color.Green; + } + txtChecksum.Text = "0x" + buffer[ATOM_ROM_CHECKSUM_OFFSET].ToString("X"); + } + + public static string ByteArrayToString(byte[] ba) + { + string hex = BitConverter.ToString(ba); + return hex.Replace("-", ""); + } + + public static byte[] StringToByteArray(String hex) + { + if (hex.Length % 2 != 0) + { + MessageBox.Show("Invalid hex string:" + hex, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); + throw new InvalidDataException(); + } + byte[] bytes = new byte[hex.Length / 2]; + for (int i = 0; i < hex.Length; i += 2) + { + bytes[i / 2] = Convert.ToByte(hex.Substring(i, 2), 16); + } + return bytes; + } + + public void updateVRAM_entries() + { + for (var i = 0; i < tableVRAM.Items.Count; i++) + { + ListViewItem container = tableVRAM.Items[i]; + var name = container.Text; + var value = container.SubItems[1].Text; + var num = (int)int32.ConvertFromString(value); + + if (name == "VendorID") + { + atom_vram_entries[atom_vram_index].ucMemoryVenderID = (Byte)num; + } + else if (name == "Size (MB)") + { + atom_vram_entries[atom_vram_index].usMemorySize = (UInt16)num; + } + else if (name == "Density") + { + atom_vram_entries[atom_vram_index].ucDensity = (Byte)num; + } + else if (name == "Type") + { + atom_vram_entries[atom_vram_index].ucMemoryType = (Byte)num; + } + } + } + + private void listVRAM_SelectionChanged(object sender, EventArgs e) + { + updateVRAM_entries(); + tableVRAM.Items.Clear(); + if (listVRAM.SelectedIndex >= 0 && listVRAM.SelectedIndex < listVRAM.Items.Count) + { + atom_vram_index = listVRAM.SelectedIndex; + tableVRAM.Items.Add(new ListViewItem(new string[] { + "VendorID", + "0x" + atom_vram_entries [atom_vram_index].ucMemoryVenderID.ToString ("X") + } + )); + tableVRAM.Items.Add(new ListViewItem(new string[] { + "Size (MB)", + Convert.ToString (atom_vram_entries [atom_vram_index].usMemorySize) + } + )); + tableVRAM.Items.Add(new ListViewItem(new string[] { + "Density", + "0x" + atom_vram_entries [atom_vram_index].ucDensity.ToString ("X") + } + )); + tableVRAM.Items.Add(new ListViewItem(new string[] { + "Type", + "0x" + atom_vram_entries [atom_vram_index].ucMemoryType.ToString ("X") + } + )); + tableVRAM.Items.Add(new ListViewItem(new string[] { + "Num Of VRAM Module", + atom_vram_info.ucNumOfVRAMModule.ToString ("X") + } + )); + } + } + + private void listVRAM_SelectedIndexChanged(object sender, EventArgs e) + { + + } + + private void apply_timings(int vendor_index, int timing_index) + { + for (var i = 0; i < tableVRAM_TIMING.Items.Count; i++) + { + ListViewItem container = tableVRAM_TIMING.Items[i]; + var name = container.Text; + UInt32 real_mhz = 0; + int mem_index = -1; + + if (name.IndexOf(':') > 0) + { + // get mem index + mem_index = (Int32)int32.ConvertFromString(name.Substring(0, 1)); + } + else + { + mem_index = 32768; + } + + real_mhz = (UInt32)uint32.ConvertFromString(name.Substring(name.IndexOf(':') + 1)); + + if (real_mhz >= 1500 && (mem_index == vendor_index || mem_index == 32768)) + { + // set the timings + container.SubItems[1].Text = timings[timing_index]; + } + } + } + + private void apply_timings1(int vendor_index, int timing_index) + { + for (var i = 0; i < tableVRAM_TIMING.Items.Count; i++) + { + ListViewItem container = tableVRAM_TIMING.Items[i]; + var name = container.Text; + UInt32 real_mhz = 0; + int mem_index = -1; + + if (name.IndexOf(':') > 0) + { + // get mem index + mem_index = (Int32)int32.ConvertFromString(name.Substring(0, 1)); + } + else + { + mem_index = 32768; + } + + real_mhz = (UInt32)uint32.ConvertFromString(name.Substring(name.IndexOf(':') + 1)); + + if (real_mhz >= 1750 && (mem_index == vendor_index || mem_index == 32768)) + { + // set the timings + container.SubItems[1].Text = timings[timing_index]; + } + } + } + + private void button1_Click(object sender, EventArgs e) + { + /* + int samsung_index = -1; + int micron_index = -1; + int elpida_index = -1; + int hynix_1_index = -1; + int hynix_2_index = -1; + int hynix_3_index = -1; + for (var i = 0; i < atom_vram_info.ucNumOfVRAMModule; i++) + { + string mem_vendor; + if (atom_vram_entries[i].strMemPNString[0] != 0) + { + var mem_id = Encoding.UTF8.GetString(atom_vram_entries[i].strMemPNString).Substring(0, 10); + + if (rc.ContainsKey(mem_id)) + { + mem_vendor = rc[mem_id]; + } + else + { + mem_vendor = "UNKNOWN"; + } + + switch (mem_vendor) + { + case "SAMSUNG": + samsung_index = i; + break; + case "MICRON": + micron_index = i; + break; + case "ELPIDA": + elpida_index = i; + break; + case "HYNIX_1": + hynix_1_index = i; + break; + case "HYNIX_2": + hynix_2_index = i; + break; + case "HYNIX_3": + hynix_3_index = i; + break; + } + } + } + */ + int samsung_index = -1; + int samsung4_index = -1; + int micron_index = -1; + int elpida_index = -1; + int hynix_1_index = -1; + int hynix_2_index = -1; + int hynix_3_index = -1; + int hynix_4_index = -1; + for (int index = 0; index < (int)this.atom_vram_info.ucNumOfVRAMModule; ++index) + { + if ((int)this.atom_vram_entries[index].strMemPNString[0] != 0) + { + string key = Encoding.UTF8.GetString(this.atom_vram_entries[index].strMemPNString).Substring(0, 10); + string str = !this.rc.ContainsKey(key) ? "[ UNKNOWN ]" : this.rc[key]; + if (!(str == "SAMSUNG")) + { + if (!(str == "MICRON")) + { + if (!(str == "ELPIDA")) + { + if (!(str == "HYNIX_1")) + { + if (!(str == "HYNIX_2")) + { + if (!(str == "HYNIX_3")) + { + if (!(str == "HYNIX_4")) + { + if (str == "SAMSUNG4") + samsung4_index = index; + } + else + hynix_4_index = index; + } + else + hynix_3_index = index; + } + else + hynix_2_index = index; + } + else + hynix_1_index = index; + } + else + elpida_index = index; + } + else + micron_index = index; + } + else + samsung_index = index; + } + } + + if (samsung_index != -1) + { + if (MessageBox.Show("Do you want faster Uber-mix 3.1?", "Important Question", MessageBoxButtons.YesNo) == DialogResult.Yes) + { + MessageBox.Show("Samsung Memory found at index #" + (object)samsung_index + ", now applying UBERMIX 3.1 timings to 1750+ strap(s)"); + this.apply_timings1(samsung_index, 0); + } + else + { + MessageBox.Show("Samsung Memory found at index #" + (object)samsung_index + ", now applying UBERMIX 3.2 timings to 1750+ strap(s)"); + this.apply_timings1(samsung_index, 1); + } + } + + if (samsung4_index != -1) + { + if (MessageBox.Show("Do you want pro Samsung timing?", "Important Question", MessageBoxButtons.YesNo) == DialogResult.Yes) + { + MessageBox.Show("Samsung4 Memory found at index #" + (object)samsung4_index + ", now applying pro Samsung 30Mh/s timings to 1750+ strap(s)"); + this.apply_timings1(samsung4_index, 10); + MessageBox.Show("Little help for testing timing, set Core clock to 1150mhz and Memory clock to 2100mhz", "Hint!"); + } + else + { + MessageBox.Show("Samsung4 Memory found at index #" + (object)samsung4_index + ", now applying Samsung4 basic 29Mh/s timings to 1750+ strap(s)"); + this.apply_timings1(samsung4_index, 11); + } + } + + if (hynix_3_index != -1) + { + if (MessageBox.Show("Do you want Universal Hynix Timing?", "Important Question", MessageBoxButtons.YesNo) == DialogResult.Yes) + { + MessageBox.Show("Hynix (3) Memory found at index #" + hynix_3_index + ", now applying Universal HYNIX MINING timings to 1500+ strap(s)"); + apply_timings(hynix_3_index, 8); + } + else + { + MessageBox.Show("Hynix (3) Memory found at index #" + hynix_3_index + ", now applying GOOD HYNIX MINING timings to 1500+ strap(s)"); + apply_timings(hynix_3_index, 2); + } + } + + if (hynix_2_index != -1) + { + if (MessageBox.Show("Do you want Universal Hynix Timing?", "Important Question", MessageBoxButtons.YesNo) == DialogResult.Yes) + { + MessageBox.Show("Hynix (2) Memory found at index #" + hynix_2_index + ", now applying Universal HYNIX MINING timings to 1500+ strap(s)"); + apply_timings(hynix_2_index, 8); + } + else + { + MessageBox.Show("Hynix (2) Memory found at index #" + (object)hynix_2_index + ", now applying GOOD Hynix timings to 1500+ strap(s)"); + this.apply_timings(hynix_2_index, 3); + } + } + + if (hynix_4_index != -1) + { + if (MessageBox.Show("Do you want Universal Hynix Timing?", "Important Question", MessageBoxButtons.YesNo) == DialogResult.Yes) + { + MessageBox.Show("Hynix (2) Memory found at index #" + hynix_4_index + ", now applying Universal HYNIX MINING timings to 1500+ strap(s)"); + apply_timings(hynix_4_index, 8); + } + else + { + MessageBox.Show("Hynix (4) Memory found at index #" + (object)hynix_4_index + ", now applying Hynix timings to 1500+ strap(s)"); + this.apply_timings(hynix_4_index, 9); + } + } + + if (micron_index != -1) + { + if (MessageBox.Show("Do you want Good Micron Timing?", "Important Question", MessageBoxButtons.YesNo) == DialogResult.Yes) + { + MessageBox.Show("Micron Memory found at index #" + (object)micron_index + ", now applying Good Micron timings to 1500+ strap(s)"); + this.apply_timings(micron_index, 4); + } + else + { + MessageBox.Show("Micron Memory found at index #" + (object)micron_index + ", now applying S Micron timings to 1500+ strap(s)"); + this.apply_timings(micron_index, 5); + } + } + + if (hynix_1_index != -1) + { + MessageBox.Show("Hynix (1) Memory found at index #" + hynix_1_index + ", now applying GOOD HYNIX MINING timings to 1500+ strap(s)"); + apply_timings(hynix_1_index, 6); + } + + if (elpida_index != -1) + { + MessageBox.Show("Elpida Memory found at index #" + elpida_index + ", now applying GOOD ELPIDA MINING timings to 1500+ strap(s)"); + apply_timings(elpida_index, 7); + } + if (samsung4_index == -1 && samsung_index == -1 && hynix_2_index == -1 && hynix_3_index == -1 && hynix_1_index == -1 && elpida_index == -1 && micron_index == -1) + { + MessageBox.Show("Sorry, no supported memory found"); + } + + this.tablePOWERPLAY.Items[1].SubItems[1].Text = "2300"; + + } + + private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) + { + var url = "https://shop.st0rm.pro/product/polarisbioseditor-pro-performance-legacy-style/"; + try + { + if (MessageBox.Show(url, "Open url in external browser?", MessageBoxButtons.YesNo) == DialogResult.Yes) + { + System.Diagnostics.Process.Start(url); + } + } + catch(Exception) + { + Console.Error.WriteLine("Failed opening url: " + url); + } + } + } +} diff --git a/PolarisBiosEditor.csproj b/PolarisBiosEditor.csproj index fc7a2b8..4910978 100644 --- a/PolarisBiosEditor.csproj +++ b/PolarisBiosEditor.csproj @@ -5,12 +5,13 @@ Debug AnyCPU {7D2BA443-2896-4CCE-89B6-5B39C49F2289} - WinExe + Exe PolarisBiosEditor PolarisBiosEditor - v4.6.2 + v4.6.1 512 true + AnyCPU @@ -34,7 +35,11 @@ 4 - favicon.ico + + + + + @@ -56,34 +61,12 @@ PolarisBiosEditor.cs - - - PolarisBiosEditor.cs - - - ResXFileCodeGenerator - Resources.Designer.cs - Designer - - - True - Resources.resx - - - SettingsSingleFileGenerator - Settings.Designer.cs - - - True - Settings.settings - True - - + - + \ No newline at end of file diff --git a/PolarisBiosEditor.resx b/PolarisBiosEditor.resx deleted file mode 100644 index fecce2a..0000000 --- a/PolarisBiosEditor.resx +++ /dev/null @@ -1,377 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - - - AAABAAMAEBAAAAEAIABoBAAANgAAACAgAAABACAAqBAAAJ4EAAAwMAAAAQAgAKglAABGFQAAKAAAABAA - AAAgAAAAAQAgAAAAAAAABAAAww4AAMMOAAAAAAAAAAAAAAAAAAD/AAAA/wAACP8AADb/AAA3/wAARv4A - ACf+AAAU/gAAAv4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA/wAACf8AAHL/AAB2/wAAhf8A - AFX/AABz/wAAOv4AABz+AAACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP8AAFT/AACj/wAAkv8A - AIf/AACy/wAARv8AAHv/AAAq/gAAAP4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP4AAAD/AACM/wAAkv8A - ALD/AACl/wAAvP8AADT/AADO/wAAMv8AAAD/AAAA/gAAAAAAAAAAAAAAAAAAAAAAAAD/AAAA/wAAdv8A - AMb/AAC5/wAAy/8AAMz/AABU/wAA2v8AAHP/AAA3/wAAPfsAAAD+AAAA/gAAAAAAAAAAAAAA/wAAHP8A - AIP/AADV/wAA6P8AAN//AADI/wAAm/8AALL/AADL/wAAdv8AANT/AAAn/gAAC/8AAAD+AAAAAAAAAP8A - AAf/AAAQ/wAAJv8AAKr/AADj/wAAqP8AANX/AACE/wAA7v8AAJv/AAD8/wAAZv8AAHf/AAA8/wAAAP8A - AAB2jo4EfYeHGY12dhrlGxsh/wAAYP8AAIv/AADs/wAAbP8AAN3/AACo/wAA//8AAGz/AACo/wAAwv8A - ADj/AAA2e4iILYCBgaeBgYGqe4iIIoCFhSm5SEhS/wAAgv8AAFD/AAC0/wAArP8AAPb/AABj+AcH0/4B - Afz/A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AAD//wAA//8AAPX+AABA/wAATv8AAPr/AAD//wAA//8AAOz+AAAx/gAAE/8A - AND/AAD//wAA//8AAP//AACd/gAAM/8AAOz/AAD//wAA//8AAP//AAD6/wAAUAAAAAD+AAAb/wAA2P8A - AP//AADm/wAASP8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AAAAAAAA/gAAAf4AAAb+AAAE/gAACv8AAC7/AACS/wAA9P8AAO7/AAAw/gAARv8AAPn/AAD//wAA//8A - APr/AABP/QAAAv8AAKj/AAD//wAA//8AAP//AACO/gAAP/8AAPT/AAD//wAA//8AAP//AAD7/wAAVAAA - AAD+AAAY/wAA1P8AAP//AAD//wAAzP8AAB7+AAAAAAAAAP4AAAD+AAAA/gAAAP4AAAAAAAAAAAAAAIGB - gQCEhIQAhISEAIaGhgCBgYEAhH9/AJBzcwCwUlIA/gAAAP8AAAD+AAAG/wAAd/8AAMz+AAAV/wAAXf8A - APz/AAD//wAA//8AAP//AABj/QAAAP8AAIH/AAD//wAA//8AAP//AABy/wAAU/8AAPv/AAD//wAA//8A - AP//AAD5/wAASwAAAAD+AAAf/wAA3f8AAP//AAD//wAA/v8AAH7xAAAA/wAAAP8AAADCAAAA/wAAAP8A - AAAAAAAAAAAAAIODgwCEhIQdg4ODI4aGhieAgIAFg4ODE4KCghyDg4MEg4ODAAAAAAD9AgIA/wAAC/8A - AEX+AAAI/wAAk/8AAP//AAD//wAA//8AAP//AABkAAAAAP8AAGX/AAD+/wAA//8AAPj+AABH/wAAbv8A - AP//AAD//wAA//8AAP//AADu/gAANP0AAAD+AAA5/wAA8P8AAP//AAD//wAA//8AAND+AAAp/wAASP8A - AH//AACZ/wAAiP8AAEUAAAAAgYGBAIKCgiaCgoLAgYGBy4KCgs6CgoJ1gYGByoGBgdqCgoJrg4ODAQAA - AAB/f38AfIeHDVyrqwUA//8A/wAAKf8AAJn/AADy/wAA//8AAPv+AABRAAAAAP8AAFH/AAD7/wAA//8A - ANr+AAAf/wAAlP8AAP//AAD//wAA//8AAP//AADW/gAAGv8AAAD/AABv/wAA/f8AAP//AAD//wAA//8A - APj/AADX/wAA9f8AAP//AAD//wAA3f8AAHYAAAAAgYGBA4KCgpKAgID/f39//4CAgP+CgoLRgYGBxICA - gPyCgoJ2g4ODAQAAAAB/f38Ag4ODLYSEhIeEhIQp0y4uAP8AAAb/AABU/wAA0P8AAO7/AAA1AAAAAP8A - AEj/AAD4/wAA//8AAJ7+AAAP/wAAvv8AAP//AAD//wAA//8AAP//AACo/gAABf4AAA7/AAC99wgI//oF - Bf//AAD//wAA//8AAP//AAD//wAA//8AAO//AACR/gAAKPsAAAEAAAAAgYGBB4ODg3SAgICWgYGBkoOD - g5KDg4NzgYGBx4KCgtWBgYEZgYGBAIGBgQCAgIAAgICACYKCgr6CgoLSg4ODOdExMQD/AAAA/wAAJf8A - AHr+AAATAAAAAP4AAEr/AAD5/wAA9v4AAEv+AAAj/wAA4/8AAP//AAD//wAA//8AAP3/AABn/wAAAP8A - AGD/AAD34xwc//EODv//AAD//wAA//8AAP//AAD//wAA4P4AAFX9AAAE/gAAAP4AAAAAAAAAYKSkAYKD - gzWBgYFrgYGBioGBgbWAgIDof39//4GBgeKCgoIyhoaGAH5+fgOCgoIIgoKCN4GBgdh/f3//gYGBxIKC - ghj+AAAA/gEBAP8AAAL+AAABAAAAAP4AAFj/AAD+/wAAvv4AAAz/AABZ/wAA+v8AAP//AAD//wAA//8A - AOD+AAAj/wAAL/8AANn+AQH/yTY2/+8QEP//AAD//wAA//8AAP//AAD0/wAAW/8AAAD+AAAAAAAAAAAA - AAD+AAAAhnd3CoOBgbGAgYH/f39//39/f/9/f3//f39//39/f/+BgYHGgoKCXYKCgoaBgYG0gICA5H9/ - f/9/f3//gICA+YKCglCBgYEAhIODAI9ycgCtTk4A/wAAAP8AAHH/AAD5/wAAW/4AAAL/AACg/wAA//8A - AP//AAD//wAA//8AAJP+AAAy/wAAxv8AAP/uERH/sU1N//gHB///AAD//wAA//8AAP//AACn/gAACf4A - AAAAAAAAAAAAAAAAAAD/AAAY/wAAh+IeHsKScHCxf4CA+H9/f/9/f3//f39//39/f/9/f3//gICA9YGB - get/f3/7f39//39/f/9/f3//gICA/IKCglZ/f38ChISEVIKCgmB2gYED/wAAAf8AAJj/AAC7/gAADv4A - ACr/AADj/wAA/v8AAP3/AAD//wAA7v8AAIv/AADS/wAA//8AAP/APj7/t0dH//4BAf//AAD//wAA//8A - AOr/AAA7/gAAAAAAAAAAAAAAAAAAAAAAAADkHByG3yEhvuEgIMjULCx5gIGByn9/f/9/f3//f39//39/ - f/9/f3//gICA94CAgO6AgID5f39//39/f/9/f3//gYGBy4KCgh2CgoIpgoKC5oKCgqBxiYkB/wAAD/8A - ALD/AABI/AAAAf8AAIP/AAD//wAAxv8AAOb/AAD//wAA+P8AAPX/AAD//wAA/+YZGf+Ua2v/3SIi//8A - AP//AAD//wAA/v8AAI/+AAAEAAAAAAAAAAAAAAAAAAAAAAAAAACIfn67gIGB7YCAgO6FfX3RgICA4H9/ - f/9/f3//f39//39/f/2BgYHVgoKCnIKCgneCgoJrgYGBnoGBgcKCgoKfg4ODMoSEhACBgYFcgYGB/oGB - gXe4RUUA/gAANv4AAHf+AAAE/wAANf8AAOT/AAC4/wAAZP8AAO//AAD//wAA//8AAP//AAD/9QkJ/6Jc - XP+qVFT/+wQE//8AAP//AAD//wAA1f4AACT+AAAA/gAAAAAAAAAAAAAAAAAAAAAAAACCg4NOgYGB3n9/ - f/9/f3//f39//39/f/9/f3//f39//4CAgPCBgYHggICA8oCAgPGBgYHDgoKCWoODgxmFhYUCg4ODAIOD - gxOBgYGtgYGB/YGCglf/AAAB/gAASf4AABz+AAAa/wAApf8AAJD+AAAb/wAAjv8AAP//AAD//wAA//8A - AP/7BAT/tUlJ/5JsbP/oFhb//wAA//8AAP//AAD3/wAAZP8AAAD+AAAA/wAAAAAAAAAAAAAAAAAAAAAA - AAB4eHgAg4ODP4GBgcp/f3//f39//39/f/9/f3//f39//4CAgPN/f3//f39//39/f/9/f3//gICA9IGB - gbyCgoKOgoKCh4GBgb2AgID7gICA8oGDgzz/AAAF/gAAGP4AAA3+AABV/gAAQv0AAAT/AABJ/wAA6/8A - AP//AAD//wAA//wDA/++QED/kW1t/9sjI///AAD//wAA//8AAP//AACd/gAACvsAAAH+AAAu/gAAEAAA - AAAAAAAAAAAAAAAAAACBgYEAhISEAIODgyKBgYGbgICA9H9/f/+AgID3goKCmYKCgoqAgID5f39//39/ - f/9/f3//f39//39/f/9/f3//f39//39/f/9/f3//gYGB5YCAgCX/AAAA/wAAAP8AAAj+AAAJ/wAAAP8A - AD7/AADX/wAA//8AAP//AAD/+wQE/8E+Pv+cYmL/3yAg//8AAP//AAD//wAA//8AALT+AAAY/gAADP8A - AHH/AACe/gAADAAAAAAAAAAAAAAAAAAAAAAAAAAAf39/AIODgwCDg4MIg4ODVoKCgsSCgoKQg4ODhYKC - gpSCgoKggICA5H9/f/2BgYHJgICAmIGBgZeBgYHAgICA8H9/f/+AgIDWg4ODZYODgwmcXl4A/gAAAP4A - AAD+AAAJ/wAAXP8AAN3/AAD//wAA//8AAP/2CQn/xzg4/7xDQ//vEBD//wAA//8AAP//AAD9/wAAqP4A - AB7/AAA0/wAAqv8AAPT/AABi/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACCgoIAhYWFAIaG - hhODg4M5goKCuIGBgfOAgIDjgICA7n9/f/6AgIDkgYGBvoODg4mEhIQjg4ODQYKCgpmDg4NChYWFFoOD - gw2EhIQAgICAAP4AAA7/AACQ/wAA9/8AAP//AAD4/wAA9f0CAv/nFxf/5xgY//0CAv//AAD//wAA//8A - AOv/AACB/wAAMf8AAH7/AADj/wAA//8AAK3+AAAP/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AAAAAAAAe3t7AIWFhQB3d3cBg4ODMoODg5OAgIDuf39//39/f/9/f3//gICA/4KCgrCDg4MSg4ODAIO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AH/wAA/4AAAB// - AAD/QAAAf/8AAP/8AB///wAA//wAH///AAA= - - - \ No newline at end of file diff --git a/PolarisBiosEditor.sln b/PolarisBiosEditor.sln index 33c6503..68c9ad8 100644 --- a/PolarisBiosEditor.sln +++ b/PolarisBiosEditor.sln @@ -1,9 +1,14 @@ Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 15 -VisualStudioVersion = 15.0.27703.2026 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.31025.194 MinimumVisualStudioVersion = 10.0.40219.1 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PolarisBiosEditor", "PolarisBiosEditor.csproj", "{7D2BA443-2896-4CCE-89B6-5B39C49F2289}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{7AA3656A-A6CE-47D0-9F89-358922B30FC1}" + ProjectSection(SolutionItems) = preProject + .editorconfig = .editorconfig + EndProjectSection +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|x86 = Debug|x86 diff --git a/PolarisBiosEditor.userprefs b/PolarisBiosEditor.userprefs deleted file mode 100644 index 4acbf64..0000000 --- a/PolarisBiosEditor.userprefs +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Properties/AssemblyInfo.cs b/Properties/AssemblyInfo.cs deleted file mode 100644 index 2be103c..0000000 --- a/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("PolarisBiosEditor")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("miningbios.com")] -[assembly: AssemblyProduct("PolarisBiosEditor")] -[assembly: AssemblyCopyright("Copyright © VASKE 2018")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("7d2ba443-2896-4cce-89b6-5b39c49f2289")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.6.9.0")] -[assembly: AssemblyFileVersion("1.6.9.0")] diff --git a/Properties/Resources.Designer.cs b/Properties/Resources.Designer.cs deleted file mode 100644 index c87c7f8..0000000 --- a/Properties/Resources.Designer.cs +++ /dev/null @@ -1,71 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:4.0.30319.42000 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace PolarisBiosEditor.Properties -{ - - - /// - /// A strongly-typed resource class, for looking up localized strings, etc. - /// - // This class was auto-generated by the StronglyTypedResourceBuilder - // class via a tool like ResGen or Visual Studio. - // To add or remove a member, edit your .ResX file then rerun ResGen - // with the /str option, or rebuild your VS project. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - internal class Resources - { - - private static global::System.Resources.ResourceManager resourceMan; - - private static global::System.Globalization.CultureInfo resourceCulture; - - [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] - internal Resources() - { - } - - /// - /// Returns the cached ResourceManager instance used by this class. - /// - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Resources.ResourceManager ResourceManager - { - get - { - if ((resourceMan == null)) - { - global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("PolarisBiosEditor.Properties.Resources", typeof(Resources).Assembly); - resourceMan = temp; - } - return resourceMan; - } - } - - /// - /// Overrides the current thread's CurrentUICulture property for all - /// resource lookups using this strongly typed resource class. - /// - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Globalization.CultureInfo Culture - { - get - { - return resourceCulture; - } - set - { - resourceCulture = value; - } - } - } -} diff --git a/Properties/Resources.resx b/Properties/Resources.resx deleted file mode 100644 index ffecec8..0000000 --- a/Properties/Resources.resx +++ /dev/null @@ -1,117 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - \ No newline at end of file diff --git a/Properties/Settings.Designer.cs b/Properties/Settings.Designer.cs deleted file mode 100644 index 803d2fd..0000000 --- a/Properties/Settings.Designer.cs +++ /dev/null @@ -1,30 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:4.0.30319.42000 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace PolarisBiosEditor.Properties -{ - - - [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")] - internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase - { - - private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); - - public static Settings Default - { - get - { - return defaultInstance; - } - } - } -} diff --git a/Properties/Settings.settings b/Properties/Settings.settings deleted file mode 100644 index abf36c5..0000000 --- a/Properties/Settings.settings +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/README.md b/README.md index 7d5f1c2..1a7f5aa 100644 --- a/README.md +++ b/README.md @@ -1,40 +1,49 @@ -# PolarisBiosEditor v1.7.3 - -BTC donation address: 181dtEjhFWWxvHDmx2R3N41rnRPedSEUf5 - -works on linux with mono, executable is build against .net 3.5 - -one click timing feature should be used with care, it maybe not stable for you - -please build the executable yourself or decompile the existing one if you don't trust - -If you want to use PolarisBiosEditor on Ubuntu need to install module: sudo apt install libcanberra-gtk-module libcanberra-gtk3-module - -Contribution from Sebohe: - -### Build Dependencies - -Ubuntu 16.04.2: - -``` -sudo apt-get install mono-complete -``` - -Arch Linux: - -``` -yaourt -Sy mono48 -``` -### Building - -``` -sh build.sh -``` - -### Executing - -Just change your working directory to the PolarisBiosEditor and execute: - -``` -./run.sh -``` +## 🧾PolarisBiosEditor 1.7xml🧾 +VBIOS editor fork with detailed dumping data as XML in console.
+The intended usage is **viewing** and/or help with **editing by external HEX editor**.
+Editing functionality is 99% identical to the upstream, no major new GUI features. + +To view XML just open vbios file via file dialog and look in console/stdout. +To save XML to file: +* open cmd in folder containing PolarisBiosEditor.exe +* start program with stdout redirection, like
+`PolarisBiosEditor.exe path\to\input-file.rom > outfile.xml` +* close gui window to finish application and finalize/flush file writing + +[Example XML output (large, ~1k lines)](./output-example.xml) + +### 📉Changelog📉 +v1.7xml-2021-08 + * Try partially parsing without crashing even unsupported VBIOSes + +v1.7xml-2021-07 + * Fix exceptions while runing linux-built binary on windows + * Dump all parsed data as valid xml + * add dumping for generic option rom & EFI headers + * add dumping of VDCCI-related tables, sligtly extend VDCCI viewing GUI + +v1.7xml-2021-01 + * Introduce xml dump + * Add parsing i2c and video-output realted tables + +### 📎Download and run with [prebuilt cross-platform .Net exe file](./bin/Debug/PolarisBiosEditor.exe)📎 +Please see ⛏️Build⛏️ section below and compile yourself if you don't trust prebuilt binary. +| Run on Windows | Run on Linux | +|:--------|:------| +|Requires only .Net 4, so just run exe file. |Contribution from Sebohe:

**Install mono** (and maybe libcanberra-gtk3-module, not sure):
  • _Ubuntu/Debian_ `sudo apt-get install mono-complete`
  • _Arch Linux_ `yaourt -Sy mono48`
With mono installed just change directory to the PolarisBiosEditor and
**execute `./run.sh`**
see inside run.sh file for a bit more detailed dependencies info.
If mono is registered as .Net exe handler, just directly execute:`bin/Debug/PolarisBiosEditor.exe`
| + +### ⛏️Build⛏️ +| Build on Windows | Build on Linux | +|:--------|:------| +| Install Visual Studio, open .sln file, build Debug configuration. | Install mono and mono-mcs (to get `mcs` executable) and run
`sh build.sh` | + + +### ⏫Upstream (GUI-only version without XML dumping support)⏫ +>
+> Upstream info +> https://github.com/vvaske/PolarisBiosEditor +> +> BTC donation address: 181dtEjhFWWxvHDmx2R3N41rnRPedSEUf5 +> +> one click timing feature should be used with care, it maybe not stable for you +>
diff --git a/bin/Debug/PolarisBiosEditor.exe b/bin/Debug/PolarisBiosEditor.exe old mode 100644 new mode 100755 index 991fe40..6955f64 Binary files a/bin/Debug/PolarisBiosEditor.exe and b/bin/Debug/PolarisBiosEditor.exe differ diff --git a/bin/Debug/PolarisBiosEditor.exe.config b/bin/Debug/PolarisBiosEditor.exe.config deleted file mode 100644 index 3a4868f..0000000 --- a/bin/Debug/PolarisBiosEditor.exe.config +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/bin/Debug/PolarisBiosEditor.pdb b/bin/Debug/PolarisBiosEditor.pdb deleted file mode 100644 index 1377bb9..0000000 Binary files a/bin/Debug/PolarisBiosEditor.pdb and /dev/null differ diff --git a/build.sh b/build.sh old mode 100644 new mode 100755 index 8334254..1631c24 --- a/build.sh +++ b/build.sh @@ -1,2 +1,4 @@ #!/bin/bash -mcs -unsafe -lib:/usr/lib/mono/4.0 -r:System.Drawing.dll -r:System.Windows.Forms.dll PolarisBiosEditor.cs PolarisBiosEditor.Designer.cs +mkdir -p bin/Debug +#mono-mcs is required for building +mcs -sdk:4.6 --mcs-debug 1 -debug -define:DEBUG -r:System.Drawing.dll -r:System.Windows.Forms.dll -r:System.Xml.Linq.dll PolarisBiosEditor.cs PolarisBiosEditor.Designer.cs -out:bin/Debug/PolarisBiosEditor.exe diff --git a/favicon.ico b/favicon.ico deleted file mode 100644 index f1b14d0..0000000 Binary files a/favicon.ico and /dev/null differ diff --git a/notice b/notice index a330db0..81b65e2 100644 --- a/notice +++ b/notice @@ -2,7 +2,3 @@ IMPORTANT: You need to disable SecureBoot / Activate CSM in your Motherboard UEFI because the modification will make the cryptographic signature invalid. - -If you find an error or missing a feature, feel free -to create an issue at: -https://github.com/vvaske/PolarisBiosEditor/issues diff --git a/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache deleted file mode 100644 index 3eaddf3..0000000 Binary files a/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache and /dev/null differ diff --git a/obj/Debug/PolarisBiosEditor.PolarisBiosEditor.resources b/obj/Debug/PolarisBiosEditor.PolarisBiosEditor.resources deleted file mode 100644 index 7d5664f..0000000 Binary files a/obj/Debug/PolarisBiosEditor.PolarisBiosEditor.resources and /dev/null differ diff --git a/obj/Debug/PolarisBiosEditor.Properties.Resources.resources b/obj/Debug/PolarisBiosEditor.Properties.Resources.resources deleted file mode 100644 index 6c05a97..0000000 Binary files a/obj/Debug/PolarisBiosEditor.Properties.Resources.resources and /dev/null differ diff --git a/obj/Debug/PolarisBiosEditor.csproj.CoreCompileInputs.cache b/obj/Debug/PolarisBiosEditor.csproj.CoreCompileInputs.cache deleted file mode 100644 index d02d9ba..0000000 --- a/obj/Debug/PolarisBiosEditor.csproj.CoreCompileInputs.cache +++ /dev/null @@ -1 +0,0 @@ -5de2e88d6e57cf3dbb2f0c4f84a0fc6b967b8697 diff --git a/obj/Debug/PolarisBiosEditor.csproj.FileListAbsolute.txt b/obj/Debug/PolarisBiosEditor.csproj.FileListAbsolute.txt deleted file mode 100644 index 6146e1e..0000000 --- a/obj/Debug/PolarisBiosEditor.csproj.FileListAbsolute.txt +++ /dev/null @@ -1,10 +0,0 @@ -C:\Users\VASKE\Desktop\PolarisBiosEditor-master\obj\Debug\PolarisBiosEditor.csprojAssemblyReference.cache -C:\Users\VASKE\Desktop\PolarisBiosEditor-master\obj\Debug\PolarisBiosEditor.Properties.Resources.resources -C:\Users\VASKE\Desktop\PolarisBiosEditor-master\obj\Debug\PolarisBiosEditor.csproj.GenerateResource.cache -C:\Users\VASKE\Desktop\PolarisBiosEditor-master\bin\Debug\PolarisBiosEditor.exe.config -C:\Users\VASKE\Desktop\PolarisBiosEditor-master\bin\Debug\PolarisBiosEditor.exe -C:\Users\VASKE\Desktop\PolarisBiosEditor-master\bin\Debug\PolarisBiosEditor.pdb -C:\Users\VASKE\Desktop\PolarisBiosEditor-master\obj\Debug\PolarisBiosEditor.PolarisBiosEditor.resources -C:\Users\VASKE\Desktop\PolarisBiosEditor-master\obj\Debug\PolarisBiosEditor.csproj.CoreCompileInputs.cache -C:\Users\VASKE\Desktop\PolarisBiosEditor-master\obj\Debug\PolarisBiosEditor.exe -C:\Users\VASKE\Desktop\PolarisBiosEditor-master\obj\Debug\PolarisBiosEditor.pdb diff --git a/obj/Debug/PolarisBiosEditor.csproj.GenerateResource.cache b/obj/Debug/PolarisBiosEditor.csproj.GenerateResource.cache deleted file mode 100644 index 7dcee33..0000000 Binary files a/obj/Debug/PolarisBiosEditor.csproj.GenerateResource.cache and /dev/null differ diff --git a/obj/Debug/PolarisBiosEditor.csprojAssemblyReference.cache b/obj/Debug/PolarisBiosEditor.csprojAssemblyReference.cache deleted file mode 100644 index eaf30a3..0000000 Binary files a/obj/Debug/PolarisBiosEditor.csprojAssemblyReference.cache and /dev/null differ diff --git a/obj/Debug/PolarisBiosEditor.exe b/obj/Debug/PolarisBiosEditor.exe deleted file mode 100644 index 991fe40..0000000 Binary files a/obj/Debug/PolarisBiosEditor.exe and /dev/null differ diff --git a/obj/Debug/PolarisBiosEditor.pdb b/obj/Debug/PolarisBiosEditor.pdb deleted file mode 100644 index 1377bb9..0000000 Binary files a/obj/Debug/PolarisBiosEditor.pdb and /dev/null differ diff --git a/obj/x86/Debug/PolarisBiosEditor.csproj.CoreCompileInputs.cache b/obj/x86/Debug/PolarisBiosEditor.csproj.CoreCompileInputs.cache deleted file mode 100644 index d02d9ba..0000000 --- a/obj/x86/Debug/PolarisBiosEditor.csproj.CoreCompileInputs.cache +++ /dev/null @@ -1 +0,0 @@ -5de2e88d6e57cf3dbb2f0c4f84a0fc6b967b8697 diff --git a/obj/x86/Debug/PolarisBiosEditor.csprojAssemblyReference.cache b/obj/x86/Debug/PolarisBiosEditor.csprojAssemblyReference.cache deleted file mode 100644 index eaf30a3..0000000 Binary files a/obj/x86/Debug/PolarisBiosEditor.csprojAssemblyReference.cache and /dev/null differ diff --git a/output-example.xml b/output-example.xml new file mode 100644 index 0000000..1026550 --- /dev/null +++ b/output-example.xml @@ -0,0 +1,1451 @@ + + + + 85 = 0x55 = 0b1010101 + 170 = 0xAA = 0b10101010 + 116 = 0x74 = 0b1110100 + 233 = 0xE9 = 0b11101001 + 685 = 0x2AD = 0b1010101101 + 18-bytes text:\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0 + 592 = 0x250 = 0b1001010000 + 0 + 0 + 3-bytes text:IBM + 134 = 0x86 = 0b10000110 + 37508 = 0x9284 = 0b1001001010000100 + 11-bytes text:\0\0\0\0\0\0\0\0\0\0\0 + 4 = 0x4 = 0b100 + 10-bytes text: 761295520 + 6-bytes text:\0\0\0\0\0\0 + 677 = 0x2A5 = 0b1010100101 + 6-bytes text:\0\0\0\0\0\0 + 556 = 0x22C = 0b1000101100 + 0xE800 + 0x2B3 + + + + + 36 = 0x24 = 0b100100 + 1 + 1 + + 4-bytes text:ATOM + 49152 = 0xC000 = 0b1100000000000000 + 977 = 0x3D1 = 0b1111010001 + 460 = 0x1CC = 0b111001100 + 629 = 0x275 = 0b1001110101 + 288 = 0x120 = 0b100100000 + 1014 = 0x3F6 = 0b1111110110 + 0 + 0 + 4163 = 0x1043 = 0b1000001000011 + 1313 = 0x521 = 0b10100100001 + 592 = 0x250 = 0b1001010000 + 38748 = 0x975C = 0b1001011101011100 + 38914 = 0x9802 = 0b1001100000000010 + 160 = 0xA0 = 0b10100000 + 0 + + + 4-bytes text:PCIR + 4098 = 0x1002 = 0b1000000000010 + 26591 = 0x67DF = 0b110011111011111 + 0 + 24 = 0x18 = 0b11000 + 0 + 3-bytes text:\0\0\x03 + 116 = 0x74 = 0b1110100 + 3890 = 0xF32 = 0b111100110010 + 0 + 0 + 0 + 12-bytes text:AMD ATOMBIOS + + + + 166 = 0xA6 = 0b10100110 + 1 + 1 + + + + + + + 74 = 0x4A = 0b1001010 + 1 + 1 + + 0 + 0 + 0 + 38988 = 0x984C = 0b1001100001001100 + 39216 = 0x9930 = 0b1001100100110000 + 39324 = 0x999C = 0b1001100110011100 + 39376 = 0x99D0 = 0b1001100111010000 + 0 + 43522 = 0xAA02 = 0b1010101000000010 + 0 + 39454 = 0x9A1E = 0b1001101000011110 + 39674 = 0x9AFA = 0b1001101011111010 + 39686 = 0x9B06 = 0b1001101100000110 + 39718 = 0x9B26 = 0b1001101100100110 + 39834 = 0x9B9A = 0b1001101110011010 + 39858 = 0x9BB2 = 0b1001101110110010 + 0 + 43498 = 0xA9EA = 0b1010100111101010 + 0 + 40692 = 0x9EF4 = 0b1001111011110100 + 0 + 0 + 40698 = 0x9EFA = 0b1001111011111010 + 41772 = 0xA32C = 0b1010001100101100 + 41048 = 0xA058 = 0b1010000001011000 + 0 + 43358 = 0xA95E = 0b1010100101011110 + 43398 = 0xA986 = 0b1010100110000110 + 41898 = 0xA3AA = 0b1010001110101010 + 0 + 0 + 43020 = 0xA80C = 0b1010100000001100 + 43288 = 0xA918 = 0b1010100100011000 + 0 + 43578 = 0xAA3A = 0b1010101000111010 + + + + 108 = 0x6C = 0b1101100 + 2 = 0x2 = 0b10 + 2 = 0x2 = 0b10 + + 254935553 = 0xF320201 = 0b1111001100100000001000000001 + 30000 = 0x7530 = 0b111010100110000 + 30000 = 0x7530 = 0b111010100110000 + 0 + 360000 = 0x57E40 = 0b1010111111001000000 + 0 + 0 + 600000 = 0x927C0 = 0b10010010011111000000 + 0 + 62610 = 0xF492 = 0b1111010010010010 + 0 + 0 + 900 = 0x384 = 0b1110000100 + 2970 = 0xB9A = 0b101110011010 + 6000 = 0x1770 = 0b1011101110000 + 0 + 297000 = 0x48828 = 0b1001000100000101000 + 0 + 5-bytes text:\0\0\0\0\0 + 0 + 2621440000 = 0x9C400000 = 0b10011100010000000000000000000000 + 2500 = 0x9C4 = 0b100111000100 + 10000 = 0x2710 = 0b10011100010000 + 850 = 0x352 = 0b1101010010 + 16414 = 0x401E = 0b100000000011110 + 10000 = 0x2710 = 0b10011100010000 + 10000 = 0x2710 = 0b10011100010000 + 10000 = 0x2710 = 0b10011100010000 + 0 + 0 + 0 + 14 = 0xE = 0b1110 + 6 = 0x6 = 0b110 + 0 + 0 + + + + + 220 = 0xDC = 0b11011100 + 1 + 1 + + + + 18536 = 0x4868 = 0b100100001101000 + 18538 = 0x486A = 0b100100001101010 + 18539 = 0x486B = 0b100100001101011 + 18537 = 0x4869 = 0b100100001101001 + 18536 = 0x4868 = 0b100100001101000 + 18538 = 0x486A = 0b100100001101010 + 18539 = 0x486B = 0b100100001101011 + 18537 = 0x4869 = 0b100100001101001 + + 144 = 0x90 = 0b10010000 + true + 1 + 0 + 144 = 0x90 = 0b10010000 + + 0 + 0 + 0 + 0 + 8 = 0x8 = 0b1000 + 8 = 0x8 = 0b1000 + 8 = 0x8 = 0b1000 + 8 = 0x8 = 0b1000 + 0 + 0 + + + 18540 = 0x486C = 0b100100001101100 + 18542 = 0x486E = 0b100100001101110 + 18543 = 0x486F = 0b100100001101111 + 18541 = 0x486D = 0b100100001101101 + 18540 = 0x486C = 0b100100001101100 + 18542 = 0x486E = 0b100100001101110 + 18543 = 0x486F = 0b100100001101111 + 18541 = 0x486D = 0b100100001101101 + + 145 = 0x91 = 0b10010001 + true + 1 + 1 + 145 = 0x91 = 0b10010001 + + 0 + 0 + 0 + 0 + 8 = 0x8 = 0b1000 + 8 = 0x8 = 0b1000 + 8 = 0x8 = 0b1000 + 8 = 0x8 = 0b1000 + 0 + 0 + + + 18544 = 0x4870 = 0b100100001110000 + 18546 = 0x4872 = 0b100100001110010 + 18547 = 0x4873 = 0b100100001110011 + 18545 = 0x4871 = 0b100100001110001 + 18544 = 0x4870 = 0b100100001110000 + 18546 = 0x4872 = 0b100100001110010 + 18547 = 0x4873 = 0b100100001110011 + 18545 = 0x4871 = 0b100100001110001 + + 146 = 0x92 = 0b10010010 + true + 1 + 2 = 0x2 = 0b10 + 146 = 0x92 = 0b10010010 + + 0 + 0 + 0 + 0 + 8 = 0x8 = 0b1000 + 8 = 0x8 = 0b1000 + 8 = 0x8 = 0b1000 + 8 = 0x8 = 0b1000 + 0 + 0 + + + 18548 = 0x4874 = 0b100100001110100 + 18550 = 0x4876 = 0b100100001110110 + 18551 = 0x4877 = 0b100100001110111 + 18549 = 0x4875 = 0b100100001110101 + 18548 = 0x4874 = 0b100100001110100 + 18550 = 0x4876 = 0b100100001110110 + 18551 = 0x4877 = 0b100100001110111 + 18549 = 0x4875 = 0b100100001110101 + + 147 = 0x93 = 0b10010011 + true + 1 + 3 = 0x3 = 0b11 + 147 = 0x93 = 0b10010011 + + 0 + 0 + 0 + 0 + 8 = 0x8 = 0b1000 + 8 = 0x8 = 0b1000 + 8 = 0x8 = 0b1000 + 8 = 0x8 = 0b1000 + 0 + 0 + + + 18552 = 0x4878 = 0b100100001111000 + 18554 = 0x487A = 0b100100001111010 + 18555 = 0x487B = 0b100100001111011 + 18553 = 0x4879 = 0b100100001111001 + 18552 = 0x4878 = 0b100100001111000 + 18554 = 0x487A = 0b100100001111010 + 18555 = 0x487B = 0b100100001111011 + 18553 = 0x4879 = 0b100100001111001 + + 148 = 0x94 = 0b10010100 + true + 1 + 4 = 0x4 = 0b100 + 148 = 0x94 = 0b10010100 + + 0 + 0 + 0 + 0 + 8 = 0x8 = 0b1000 + 8 = 0x8 = 0b1000 + 8 = 0x8 = 0b1000 + 8 = 0x8 = 0b1000 + 0 + 0 + + + 18556 = 0x487C = 0b100100001111100 + 18558 = 0x487E = 0b100100001111110 + 18559 = 0x487F = 0b100100001111111 + 18557 = 0x487D = 0b100100001111101 + 18556 = 0x487C = 0b100100001111100 + 18558 = 0x487E = 0b100100001111110 + 18559 = 0x487F = 0b100100001111111 + 18557 = 0x487D = 0b100100001111101 + + 149 = 0x95 = 0b10010101 + true + 1 + 5 = 0x5 = 0b101 + 149 = 0x95 = 0b10010101 + + 0 + 0 + 0 + 0 + 8 = 0x8 = 0b1000 + 8 = 0x8 = 0b1000 + 8 = 0x8 = 0b1000 + 8 = 0x8 = 0b1000 + 0 + 0 + + + 18584 = 0x4898 = 0b100100010011000 + 18586 = 0x489A = 0b100100010011010 + 18587 = 0x489B = 0b100100010011011 + 18585 = 0x4899 = 0b100100010011001 + 18584 = 0x4898 = 0b100100010011000 + 18586 = 0x489A = 0b100100010011010 + 18587 = 0x489B = 0b100100010011011 + 18585 = 0x4899 = 0b100100010011001 + + 150 = 0x96 = 0b10010110 + true + 1 + 6 = 0x6 = 0b110 + 150 = 0x96 = 0b10010110 + + 0 + 0 + 0 + 0 + 1 + 1 + 1 + 1 + 0 + 0 + + + 18560 = 0x4880 = 0b100100010000000 + 18562 = 0x4882 = 0b100100010000010 + 18563 = 0x4883 = 0b100100010000011 + 18561 = 0x4881 = 0b100100010000001 + 18560 = 0x4880 = 0b100100010000000 + 18562 = 0x4882 = 0b100100010000010 + 18563 = 0x4883 = 0b100100010000011 + 18561 = 0x4881 = 0b100100010000001 + + 151 = 0x97 = 0b10010111 + true + 1 + 7 = 0x7 = 0b111 + 151 = 0x97 = 0b10010111 + + 0 + 0 + 0 + 0 + 8 = 0x8 = 0b1000 + 8 = 0x8 = 0b1000 + 8 = 0x8 = 0b1000 + 8 = 0x8 = 0b1000 + 0 + 0 + + + + + 833 = 0x341 = 0b1101000001 + 7 = 0x7 = 0b111 + 1 + + 0 + 77 = 0x4D = 0b1001101 + 1665 = 0x681 = 0b11010000001 + 10394 = 0x289A = 0b10100010011010 + 25 = 0x19 = 0b11001 + 0 + 17203200 = 0x1068000 = 0b1000001101000000000000000 + 200000 = 0x30D40 = 0b110000110101000000 + 225000 = 0x36EE8 = 0b110110111011101000 + 50 = 0x32 = 0b110010 + 25 = 0x19 = 0b11001 + 77 = 0x4D = 0b1001101 + 673 = 0x2A1 = 0b1010100001 + 664 = 0x298 = 0b1010011000 + 0 + 437 = 0x1B5 = 0b110110101 + 315 = 0x13B = 0b100111011 + 119 = 0x77 = 0b1110111 + 249 = 0xF9 = 0b11111001 + 478 = 0x1DE = 0b111011110 + 774 = 0x306 = 0b1100000110 + 0 + 721 = 0x2D1 = 0b1011010001 + 0 + 800 = 0x320 = 0b1100100000 + 826 = 0x33A = 0b1100111010 + 12-bytes text:L\x11\x02\0S\x07\0\0\0\0\0\0 + + + + 0 + 16 = 0x10 = 0b10000 + + + 750 = 0x2EE = 0b1011101110 + 0 + 0 + 0 + + + 65282 = 0xFF02 = 0b1111111100000010 + 0 + 0 + 0 + + + 65283 = 0xFF03 = 0b1111111100000011 + 0 + 0 + 0 + + + 65284 = 0xFF04 = 0b1111111100000100 + 0 + 0 + 0 + + + 65285 = 0xFF05 = 0b1111111100000101 + 0 + 0 + 0 + + + 65286 = 0xFF06 = 0b1111111100000110 + 0 + 0 + 0 + + + 65287 = 0xFF07 = 0b1111111100000111 + 0 + 0 + 0 + + + 65288 = 0xFF08 = 0b1111111100001000 + 0 + 0 + 0 + + + 800 = 0x320 = 0b1100100000 + 0 + 0 + 0 + + + 850 = 0x352 = 0b1101010010 + 0 + 0 + 0 + + + 900 = 0x384 = 0b1110000100 + 0 + 0 + 0 + + + 950 = 0x3B6 = 0b1110110110 + 0 + 0 + 0 + + + 1000 = 0x3E8 = 0b1111101000 + 0 + 0 + 0 + + + 1050 = 0x41A = 0b10000011010 + 0 + 0 + 0 + + + 1100 = 0x44C = 0b10001001100 + 0 + 0 + 0 + + + 1150 = 0x47E = 0b10001111110 + 0 + 0 + 0 + + + 0 + 8 = 0x8 = 0b1000 + + + 900 = 0x384 = 0b1110000100 + 0 + 0 + 0 + + + 65282 = 0xFF02 = 0b1111111100000010 + 0 + 0 + 0 + + + 65283 = 0xFF03 = 0b1111111100000011 + 0 + 0 + 0 + + + 65284 = 0xFF04 = 0b1111111100000100 + 0 + 0 + 0 + + + 65285 = 0xFF05 = 0b1111111100000101 + 0 + 0 + 0 + + + 65286 = 0xFF06 = 0b1111111100000110 + 0 + 0 + 0 + + + 65287 = 0xFF07 = 0b1111111100000111 + 0 + 0 + 0 + + + 65288 = 0xFF08 = 0b1111111100001000 + 0 + 0 + 0 + + + + + 1 + 8 = 0x8 = 0b1000 + + + 0 + 0 + 30000 = 0x7530 = 0b111010100110000 + 0 + 0 + 128 = 0x80 = 0b10000000 + 0 + + + 1 + 65510 = 0xFFE6 = 0b1111111111100110 + 60000 = 0xEA60 = 0b1110101001100000 + 0 + 0 + 0 + 0 + + + 2 = 0x2 = 0b10 + 65510 = 0xFFE6 = 0b1111111111100110 + 90000 = 0x15F90 = 0b10101111110010000 + 0 + 0 + 0 + 0 + + + 3 = 0x3 = 0b11 + 65510 = 0xFFE6 = 0b1111111111100110 + 116200 = 0x1C5E8 = 0b11100010111101000 + 0 + 0 + 0 + 0 + + + 4 = 0x4 = 0b100 + 65510 = 0xFFE6 = 0b1111111111100110 + 123300 = 0x1E1A4 = 0b11110000110100100 + 0 + 0 + 0 + 0 + + + 5 = 0x5 = 0b101 + 65510 = 0xFFE6 = 0b1111111111100110 + 127500 = 0x1F20C = 0b11111001000001100 + 0 + 0 + 0 + 0 + + + 6 = 0x6 = 0b110 + 65510 = 0xFFE6 = 0b1111111111100110 + 131900 = 0x2033C = 0b100000001100111100 + 0 + 0 + 0 + 0 + + + 7 = 0x7 = 0b111 + 0 + 136000 = 0x21340 = 0b100001001101000000 + 0 + 0 + 0 + 0 + + + 0 + 3 = 0x3 = 0b11 + + + 0 + 800 = 0x320 = 0b1100100000 + 0 + 1000 = 0x3E8 = 0b1111101000 + 30000 = 0x7530 = 0b111010100110000 + 0 + + + 8 = 0x8 = 0b1000 + 850 = 0x352 = 0b1101010010 + 0 + 1000 = 0x3E8 = 0b1111101000 + 100000 = 0x186A0 = 0b11000011010100000 + 0 + + + 11 = 0xB = 0b1011 + 950 = 0x3B6 = 0b1110110110 + 0 + 1000 = 0x3E8 = 0b1111101000 + 200000 = 0x30D40 = 0b110000110101000000 + 0 + + + + + 0 + 8 = 0x8 = 0b1000 + + + 8 = 0x8 = 0b1000 + 0 + 58000 = 0xE290 = 0b1110001010010000 + 75000 = 0x124F8 = 0b10010010011111000 + 63000 = 0xF618 = 0b1111011000011000 + 0 + 57000 = 0xDEA8 = 0b1101111010101000 + + + 9 = 0x9 = 0b1001 + 65460 = 0xFFB4 = 0b1111111110110100 + 63000 = 0xF618 = 0b1111011000011000 + 80000 = 0x13880 = 0b10011100010000000 + 69000 = 0x10D88 = 0b10000110110001000 + 0 + 64000 = 0xFA00 = 0b1111101000000000 + + + 10 = 0xA = 0b1010 + 65435 = 0xFF9B = 0b1111111110011011 + 68000 = 0x109A0 = 0b10000100110100000 + 85000 = 0x14C08 = 0b10100110000001000 + 75000 = 0x124F8 = 0b10010010011111000 + 0 + 70000 = 0x11170 = 0b10001000101110000 + + + 11 = 0xB = 0b1011 + 65410 = 0xFF82 = 0b1111111110000010 + 73000 = 0x11D28 = 0b10001110100101000 + 89000 = 0x15BA8 = 0b10101101110101000 + 81000 = 0x13C68 = 0b10011110001101000 + 0 + 76000 = 0x128E0 = 0b10010100011100000 + + + 12 = 0xC = 0b1100 + 65385 = 0xFF69 = 0b1111111101101001 + 77000 = 0x12CC8 = 0b10010110011001000 + 92000 = 0x16760 = 0b10110011101100000 + 86000 = 0x14FF0 = 0b10100111111110000 + 0 + 81000 = 0x13C68 = 0b10011110001101000 + + + 13 = 0xD = 0b1101 + 65335 = 0xFF37 = 0b1111111100110111 + 80000 = 0x13880 = 0b10011100010000000 + 95000 = 0x17318 = 0b10111001100011000 + 91000 = 0x16378 = 0b10110001101111000 + 0 + 85000 = 0x14C08 = 0b10100110000001000 + + + 14 = 0xE = 0b1110 + 65285 = 0xFF05 = 0b1111111100000101 + 83000 = 0x14438 = 0b10100010000111000 + 98000 = 0x17ED0 = 0b10111111011010000 + 96000 = 0x17700 = 0b10111011100000000 + 0 + 88000 = 0x157C0 = 0b10101011111000000 + + + 15 = 0xF = 0b1111 + 0 + 86000 = 0x14FF0 = 0b10100111111110000 + 100000 = 0x186A0 = 0b11000011010100000 + 100000 = 0x186A0 = 0b11000011010100000 + 0 + 91000 = 0x16378 = 0b10110001101111000 + + + + 9 = 0x9 = 0b1001 + 3 = 0x3 = 0b11 + 4000 = 0xFA0 = 0b111110100000 + 6500 = 0x1964 = 0b1100101100100 + 8500 = 0x2134 = 0b10000100110100 + 2000 = 0x7D0 = 0b11111010000 + 4000 = 0xFA0 = 0b111110100000 + 6000 = 0x1770 = 0b1011101110000 + 10900 = 0x2A94 = 0b10101010010100 + 1 + 100 = 0x64 = 0b1100100 + 4836 = 0x12E4 = 0b1001011100100 + 2150 = 0x866 = 0b100001100110 + 90000 = 0x15F90 = 0b10101111110010000 + 70 = 0x46 = 0b1000110 + 44 = 0x2C = 0b101100 + 150 = 0x96 = 0b10010110 + 150 = 0x96 = 0b10010110 + 100 = 0x64 = 0b1100100 + 150 = 0x96 = 0b10010110 + 150 = 0x96 = 0b10010110 + 150 = 0x96 = 0b10010110 + 100 = 0x64 = 0b1100100 + 12801 = 0x3201 = 0b11001000000001 + + + 4 = 0x4 = 0b100 + 145 = 0x91 = 0b10010001 + 0 + 132 = 0x84 = 0b10000100 + 145 = 0x91 = 0b10010001 + 145 = 0x91 = 0b10010001 + 0 + 0 + 145 = 0x91 = 0b10010001 + 90 = 0x5A = 0b1011010 + 0 + 0 + 94 = 0x5E = 0b1011110 + 2 = 0x2 = 0b10 + 105 = 0x69 = 0b1101001 + 80 = 0x50 = 0b1010000 + 80 = 0x50 = 0b1010000 + 115 = 0x73 = 0b1110011 + 115 = 0x73 = 0b1110011 + 95 = 0x5F = 0b1011111 + 0 + 0 + 144 = 0x90 = 0b10010000 + 96 = 0x60 = 0b1100000 + 150 = 0x96 = 0b10010110 + 0 + 144 = 0x90 = 0b10010000 + 0 + 6 = 0x6 = 0b110 + 0 + 0 + 0 + + + + + 350 = 0x15E = 0b101011110 + 1 + 3 = 0x3 = 0b11 + + 3720 = 0xE88 = 0b111010001000 + 72 = 0x48 = 0b1001000 + 0 + 251 = 0xFB = 0b11111011 + 0 + 18 = 0x12 = 0b10010 + 0 + + + + 5 = 0x5 = 0b101 + 1 + 0 + + + 8 = 0x8 = 0b1000 + 10 = 0xA = 0b1010 + + CONNECTOR_OBJECT_ID_DISPLAYPORT = 0x13 + GRAPH_OBJECT_TYPE_CONNECTOR + 1 + + + 0 + GRAPH_OBJECT_TYPE_GPU + 1 + + + ENCODER_OBJECT_ID_INTERNAL_UNIPHY1 = 0x20 + GRAPH_OBJECT_TYPE_ENCODER + 1 + + + + 128 = 0x80 = 0b10000000 + 10 = 0xA = 0b1010 + + CONNECTOR_OBJECT_ID_DISPLAYPORT = 0x13 + GRAPH_OBJECT_TYPE_CONNECTOR + 2 = 0x2 = 0b10 + + + 0 + GRAPH_OBJECT_TYPE_GPU + 1 + + + ENCODER_OBJECT_ID_INTERNAL_UNIPHY1 = 0x20 + GRAPH_OBJECT_TYPE_ENCODER + 2 = 0x2 = 0b10 + + + + 512 = 0x200 = 0b1000000000 + 10 = 0xA = 0b1010 + + CONNECTOR_OBJECT_ID_HDMI_TYPE_A = 0xC + GRAPH_OBJECT_TYPE_CONNECTOR + 1 + + + 0 + GRAPH_OBJECT_TYPE_GPU + 1 + + + ENCODER_OBJECT_ID_INTERNAL_UNIPHY2 = 0x21 + GRAPH_OBJECT_TYPE_ENCODER + 1 + + + + 1024 = 0x400 = 0b10000000000 + 10 = 0xA = 0b1010 + + CONNECTOR_OBJECT_ID_HDMI_TYPE_A = 0xC + GRAPH_OBJECT_TYPE_CONNECTOR + 2 = 0x2 = 0b10 + + + 0 + GRAPH_OBJECT_TYPE_GPU + 1 + + + ENCODER_OBJECT_ID_INTERNAL_UNIPHY2 = 0x21 + GRAPH_OBJECT_TYPE_ENCODER + 2 = 0x2 = 0b10 + + + + 2048 = 0x800 = 0b100000000000 + 10 = 0xA = 0b1010 + + CONNECTOR_OBJECT_ID_DUAL_LINK_DVI_D = 0x4 + GRAPH_OBJECT_TYPE_CONNECTOR + 1 + + + 0 + GRAPH_OBJECT_TYPE_GPU + 1 + + + ENCODER_OBJECT_ID_INTERNAL_UNIPHY = 0x1E + GRAPH_OBJECT_TYPE_ENCODER + 1 + + + + + + + 5 = 0x5 = 0b101 + 0 + 0 + 0 + + + + CONNECTOR_OBJECT_ID_DISPLAYPORT = 0x13 + GRAPH_OBJECT_TYPE_CONNECTOR + 1 + + 116 = 0x74 = 0b1110100 + 122 = 0x7A = 0b1111010 + 0 + + + 12 = 0xC = 0b1100 + ATOM_CONNECTOR_DEVICE_TAG_RECORD_TYPE = 0x4 + + + + 4 = 0x4 = 0b100 + ATOM_I2C_RECORD_TYPE = 0x1 + + + + 4 = 0x4 = 0b100 + ATOM_HPD_INT_RECORD_TYPE = 0x2 + + + + + CONNECTOR_OBJECT_ID_DISPLAYPORT = 0x13 + GRAPH_OBJECT_TYPE_CONNECTOR + 2 = 0x2 = 0b10 + + 143 = 0x8F = 0b10001111 + 149 = 0x95 = 0b10010101 + 0 + + + 12 = 0xC = 0b1100 + ATOM_CONNECTOR_DEVICE_TAG_RECORD_TYPE = 0x4 + + + + 4 = 0x4 = 0b100 + ATOM_I2C_RECORD_TYPE = 0x1 + + + + 4 = 0x4 = 0b100 + ATOM_HPD_INT_RECORD_TYPE = 0x2 + + + + + CONNECTOR_OBJECT_ID_HDMI_TYPE_A = 0xC + GRAPH_OBJECT_TYPE_CONNECTOR + 1 + + 170 = 0xAA = 0b10101010 + 176 = 0xB0 = 0b10110000 + 0 + + + 12 = 0xC = 0b1100 + ATOM_CONNECTOR_DEVICE_TAG_RECORD_TYPE = 0x4 + + + + 4 = 0x4 = 0b100 + ATOM_I2C_RECORD_TYPE = 0x1 + + + + 4 = 0x4 = 0b100 + ATOM_HPD_INT_RECORD_TYPE = 0x2 + + + + + CONNECTOR_OBJECT_ID_HDMI_TYPE_A = 0xC + GRAPH_OBJECT_TYPE_CONNECTOR + 2 = 0x2 = 0b10 + + 197 = 0xC5 = 0b11000101 + 203 = 0xCB = 0b11001011 + 0 + + + 12 = 0xC = 0b1100 + ATOM_CONNECTOR_DEVICE_TAG_RECORD_TYPE = 0x4 + + + + 4 = 0x4 = 0b100 + ATOM_I2C_RECORD_TYPE = 0x1 + + + + 4 = 0x4 = 0b100 + ATOM_HPD_INT_RECORD_TYPE = 0x2 + + + + + CONNECTOR_OBJECT_ID_DUAL_LINK_DVI_D = 0x4 + GRAPH_OBJECT_TYPE_CONNECTOR + 1 + + 224 = 0xE0 = 0b11100000 + 230 = 0xE6 = 0b11100110 + 0 + + + 12 = 0xC = 0b1100 + ATOM_CONNECTOR_DEVICE_TAG_RECORD_TYPE = 0x4 + + + + 4 = 0x4 = 0b100 + ATOM_I2C_RECORD_TYPE = 0x1 + + + + 4 = 0x4 = 0b100 + ATOM_HPD_INT_RECORD_TYPE = 0x2 + + + + + + + + 5 = 0x5 = 0b101 + 0 + 0 + 0 + + + + ENCODER_OBJECT_ID_INTERNAL_UNIPHY1 = 0x20 + GRAPH_OBJECT_TYPE_ENCODER + 1 + + 295 = 0x127 = 0b100100111 + 301 = 0x12D = 0b100101101 + 0 + + + 4 = 0x4 = 0b100 + ATOM_ENCODER_CAP_RECORD_TYPE = 0x14 + + + + + ENCODER_OBJECT_ID_INTERNAL_UNIPHY1 = 0x20 + GRAPH_OBJECT_TYPE_ENCODER + 2 = 0x2 = 0b10 + + 306 = 0x132 = 0b100110010 + 312 = 0x138 = 0b100111000 + 0 + + + 4 = 0x4 = 0b100 + ATOM_ENCODER_CAP_RECORD_TYPE = 0x14 + + + + + ENCODER_OBJECT_ID_INTERNAL_UNIPHY2 = 0x21 + GRAPH_OBJECT_TYPE_ENCODER + 1 + + 317 = 0x13D = 0b100111101 + 323 = 0x143 = 0b101000011 + 0 + + + 4 = 0x4 = 0b100 + ATOM_ENCODER_CAP_RECORD_TYPE = 0x14 + + + + + ENCODER_OBJECT_ID_INTERNAL_UNIPHY2 = 0x21 + GRAPH_OBJECT_TYPE_ENCODER + 2 = 0x2 = 0b10 + + 328 = 0x148 = 0b101001000 + 334 = 0x14E = 0b101001110 + 0 + + + 4 = 0x4 = 0b100 + ATOM_ENCODER_CAP_RECORD_TYPE = 0x14 + + + + + ENCODER_OBJECT_ID_INTERNAL_UNIPHY = 0x1E + GRAPH_OBJECT_TYPE_ENCODER + 1 + + 339 = 0x153 = 0b101010011 + 345 = 0x159 = 0b101011001 + 0 + + + 4 = 0x4 = 0b100 + ATOM_ENCODER_CAP_RECORD_TYPE = 0x14 + + + + + + + + + + + + 1122 = 0x462 = 0b10001100010 + 2 = 0x2 = 0b10 + 2 = 0x2 = 0b10 + + 76 = 0x4C = 0b1001100 + 91 = 0x5B = 0b1011011 + 765 = 0x2FD = 0b1011111101 + 947 = 0x3B3 = 0b1110110011 + 811 = 0x32B = 0b1100101011 + 0 + 1 + 1 + 8 = 0x8 = 0b1000 + 4 = 0x4 = 0b100 + + + 1985220658 = 0x76541032 = 0b1110110010101000001000000110010 + 56 = 0x38 = 0b111000 + 24738 = 0x60A2 = 0b110000010100010 + 255 = 0xFF = 0b11111111 + 0 + 80 = 0x50 = 0b1010000 + 3 = 0x3 = 0b11 + 5 = 0x5 = 0b101 + 99 = 0x63 = 0b1100011 + 10 = 0xA = 0b1010 + 4 = 0x4 = 0b100 + 0 + 0 + 8192 = 0x2000 = 0b10000000000000 + 0 + 11 = 0xB = 0b1011 + 16384 = 0x4000 = 0b100000000000000 + 24832 = 0x6100 = 0b110000100000000 + 118 = 0x76 = 0b1110110 + 2 = 0x2 = 0b10 + 2 = 0x2 = 0b10 + 0 + 0 + 484675 = 0x76543 = 0b1110110010101000011 + 0 + 20-bytes text:H5GQ8H24MJR\0\x03\0\x04\0\xFF\xFF\0\xFF + + + 40000 = 0x9C40 = 0b1001110001000000 + 555000000000000022DD1C008494121120550B0A1444B10200204100330414209A8800A00000712406050C0D2B11150F + + + 80000 = 0x13880 = 0b10011100010000000 + 777000000000000022DD1C00E7AC352240550D0D20C77205002481004C0914209A8800A0000071240C08171B571A2111 + + + 90000 = 0x15F90 = 0b10101111110010000 + 777000000000000022DD1C002931462650550E0EA20723060026A200540A1420AA8800A0000071240D0A1A1D621C2312 + + + 100000 = 0x186A0 = 0b11000011010100000 + 777000000000000022DD1C0029B5462960550E0F2448D3060026A2005C0B1420AA8800A0000071240E0A1C206D1E2513 + + + 112500 = 0x1B774 = 0b11011011101110100 + 999000000000000022339D006BBD572F5055100F29C9B3070048C4005D0D14204A8900A000007124100C20247B202A13 + + + 125000 = 0x1E848 = 0b11110100001001000 + 999000000000000022339D008CC558345055110F2D4A94080048C4005D0F14204A8900A000007124120D232889222E14 + + + 137500 = 0x2191C = 0b100001100100011100 + 999000000000000022339D00ADCD693A7055111131CB7409004AE4006D0114204A8900A002007124140E272D97263215 + + + 150000 = 0x249F0 = 0b100100100111110000 + 999000000000000022339D00CE516A3E80551212B40B450A004AE400750314204A8900A002007124150F2A30A4283516 + + + 162500 = 0x27AC4 = 0b100111101011000100 + 999000000000000022449D00105A7B4480551312B88C250B004C0401750514204A8900A00200712417112E34B22A3916 + + + 175000 = 0x2AB98 = 0b101010101110011000 + 999000000000000022559D0031627C4990551313BC0D060C004C04017D0714204A8900A00200712419123138C02D3D17 + + + 200000 = 0x30D40 = 0b110000110101000000 + BBB000000000000022889D0073EE8D53A055151743CFB60D004E24010E0A14204A8900A0030071241C143840DB324418 + + + 225000 = 0x36EE8 = 0b110110111011101000 + BBB000000000000033BB9D00D6FEAF5EC05517174BD1770F005264011E0E14204A8900A00300712420173F48F7384C1A + + + 0 + 060008000E0044FFFF00FFFFFF001F000000FFFFFF011F000000FFFFFF021F000000FFFFFF031F00000000000000E1B4 + + + + + + 70 = 0x46 = 0b1000110 + 3 = 0x3 = 0b11 + 1 + + + + VOLTAGE_TYPE_VDDC_0x1 + VOLTAGE_OBJ_VR_I2C_INIT_SEQ_0x3 + 18 = 0x12 = 0b10010 + + + 8 = 0x8 = 0b1000 + + 150 = 0x96 = 0b10010110 + true + 1 + 6 = 0x6 = 0b110 + 150 = 0x96 = 0b10010110 + + + 96 = 0x60 = 0b1100000 + + 0 + 0 + 0 + 0 + 0 + + + 50 = 0x32 = 0b110010 + 204 = 0xCC = 0b11001100 + + + 255 = 0xFF = 0b11111111 + + + VOLTAGE_TYPE_VDDC_0x1 + VOLTAGE_OBJ_SVID2_0x7 + 12 = 0xC = 0b1100 + + + VOLTAGE_TYPE_VDDCI_0x4 + VOLTAGE_OBJ_GPIO_LUT_0x0 + 36 = 0x24 = 0b100100 + + + 0 + 4 = 0x4 = 0b100 + 0 + 0 + 1081346 = 0x108002 = 0b100001000000000000010 + + + 0 + 800 = 0x320 = 0b1100100000 + + + 1048576 = 0x100000 = 0b100000000000000000000 + 850 = 0x352 = 0b1101010010 + + + 2 = 0x2 = 0b10 + 900 = 0x384 = 0b1110000100 + + + 32768 = 0x8000 = 0b1000000000000000 + 950 = 0x3B6 = 0b1110110110 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 85 = 0x55 = 0b1010101 + 170 = 0xAA = 0b10101010 + 114 = 0x72 = 0b1110010 + 3825 = 0xEF1 = 0b111011110001 + 11 = 0xB = 0b1011 + 34404 = 0x8664 = 0b1000011001100100 + 1 + 8-bytes text:\0\0\0\0\0\0\0\0 + 88 = 0x58 = 0b1011000 + 28 = 0x1C = 0b11100 + 0 + 0xE400 + + + 4-bytes text:PCIR + 4098 = 0x1002 = 0b1000000000010 + 26591 = 0x67DF = 0b110011111011111 + 0 + 24 = 0x18 = 0b11000 + 0 + 3-bytes text:\0\0\x03 + 114 = 0x72 = 0b1110010 + 0 + 3 = 0x3 = 0b11 + 128 = 0x80 = 0b10000000 + 0 + 12-bytes text:GOP AMD REV: + + + + 57898 = 0xE22A = 0b1110001000101010 + 105272 = 0x19B38 = 0b11001101100111000 + + + + diff --git a/prov b/prov deleted file mode 100644 index 91f7cd3..0000000 --- a/prov +++ /dev/null @@ -1 +0,0 @@ - 3.8.1 PRO Performance diff --git a/run.sh b/run.sh old mode 100644 new mode 100755 index 3aa1212..22800d3 --- a/run.sh +++ b/run.sh @@ -1,2 +1,9 @@ #!/bin/bash -mono PolarisBiosEditor.exe +SELF="`realpath "$0"`" +SELF_DIR="`dirname "$SELF"`" + +# Required mono libs (at least): +# libmono-system-windows-forms4.0-cil +# libmono-system-xml-linq4.0-cil + +mono --debug "$SELF_DIR/bin/Debug/PolarisBiosEditor.exe" "$@" diff --git a/version b/version deleted file mode 100644 index 661e7ae..0000000 --- a/version +++ /dev/null @@ -1 +0,0 @@ -1.7.3