• Welcome to TechPowerUp Forums, Guest! Please check out our forum guidelines for info related to our community.
  • The forums have been upgraded with support for dark mode. By default it will follow the setting on your system/browser. You may override it by scrolling to the end of the page and clicking the gears icon.

RTX40x0 VBIOS viewer: Kepler-Ada NVIDIA VBIOS Visualizer - opensource pattern for ImHex

Joined
Oct 22, 2020
Messages
92 (0.06/day)
This topic present a new tool to parse & visualize NVIDIA VBIOS .rom files
Latest supported GPUs are Ada RTX40x0 series, the oldest are Kepler GTX6x0.

The tree visualization is implemented as a pattern file/script for ImHex hex editor.

Usage​

  • Get ImHex (huge thanks to author of ImHex project - this parser would never be created without it!)
    • I'm not sure in 100% forward version compatibility, so it surely should work with ImHex 1.33.2
      (github releases link, if in doubt - scroll to the bottom and get "Windows-Portable-NoGPU-x86_64" )
  • Get attached archive and extract kepler-ada-nvidia-vbios-visualizer-2024_05.hexpat from it
    • Its usage is visualizing the VBIOS with ImHex - but it is a human-readable source code file that can be edited/enhanced - so it is opensource!
  • Get the .rom VBIOS you want to visualize - save via GPU-Z, download from TechPowerUp, etc
  • Run ImHex, use File->Open File to select the .rom file
  • Then select File->Import->Pattern file -> "Browse..." and select the extracted kepler-ada-nvidia-vbios-visualizer-2024_05.hexpat
  • All done!
    • the Pattern Data pane shows the expandable tree of parsed VBIOS data with corresponding parts interactively highlighting in the Hex view
    • the Console pane shows the overall parsing result,

This is just visualizer aimed as a starting point for VBIOS researches - it will NOT help in editing Pascal+ VBIOSes since they are signed.
It is not complete in any way - but overall structure is calculated, and some (say 10-20%) of tables are parsed.
For example the "supported memory variants" table, that is also parsed by GPU-Z, see screenshot

kepler-ada-nvidia-vbios-visualizer-2024_05.png
 

Attachments

Last edited:
Updated 2024-10 (.zip in attachmement, see first topic message for usage guide)
  • Improved parsing of GM107/N16/N15 laptop VBIOS extarcted from system rom image (the VBIOS format having 'bt' at offset 0x2 and 0x55 0xAA signature at the 0x10 offset)
Useful to plan resoldering more memory with strap resistor(s) adjustment: analyzing extracted VBIOSes gives a list of supported memory sizes+vendors corresponding to a strap numeric value

1729600831468.png
 

Attachments

Good job!

Any useful outputs from your parser that I could add to outputs of the BIOS collection?
 
Good job!

Any useful outputs from your parser that I could add to outputs of the BIOS collection?
Thats a hard question which info "would be useful for most people".

In theory it would be the hidden secondary power limits, but unfortunately they are NOT parsed, not sure where/how they are stored. The parser is mostly in a state "overall structure is mostly parsed but specific tables are mostly NOT parsed". So, by now it is "mostly for researches, not ready for end users". The hexpat file is a text file, it can be extended)

I suppose that the following may be useful in the Techpowerup VBIOS database:
  • section1_tables->data_internal_use->BoardId As far as I know thats a board ID that nvflash use for compatibility checking (the "Board Id incompatible" error)
  • mem_clock_frequency_ranges->frequency_ranges->[array_index]->[FreqMinimum-FreqMaximum range] - thats memory frequncy ranges corresponding to a different states (strap values and/or performance levels). Maybe interesting for understanding memory performance tweaking
  • mem_variants_by_strap->memory_variants_indexed_by_strap_value->[array_index]->strap_info Would be very interesting for hardware modders upgrading VRAM size. It extands the already present "Memory support" on the techpowerup with a a list of specific memory sizes, clamshell vs not-clamshell and a corresponding strap value (that need to be set via configuration resistor to tell the GPU that this specific VRAM is soldered)
    • Note: actually you already have nearly this info in GPU-Z->Memory Support, with a minor but subtle difference: GPU-Z lack the strap_info_details->strap value. That often corresponds to index, but not always. And exactly this number is needed for hardware modders to find correct strap for a specific mod. Having it in GPU-Z Memory support would be awesome for hardware modders changing VRAM.
With more up-to-date imhex version you can get all parsing results as a json by running:
Code:
imhex --pl format file.ROM kepler-ada-nvidia-vbios-visualizer-2024_10.hexpat out.json
Note, imhex is quite unstable, so as a reference this json generation confirmed is working for me on some imhex nightly build Aug 23 2024.
 
thank's a lot !!!
Little change to works with new version of lmhex 1.36.2

fn checksum_difference(u32 start, u32 end) {
builtin::std::print("Verifying checksum8...");
u32 sum = 0;
for (u32 b = start, b < end, b = b + 512) {
for (u32 i = b, i < min(b + 512, end), i = i + 1) {
sum += read_unsigned_le(i, 1);
}
}
u32 checksum8 = sum % 256;
if (checksum8 == 0) {
return "[OK]";
}
return builtin::std::format("[Checksum8 mismatch: 0x{:X}]", checksum8);
};
 

Attachments

I haven't seen it yet through my vbios investigation but is it possible to also highlight the display outputs?

I'm curious specifically for laptops to see which display outputs are used such as DP_A, DP_B, DP_C, DP_D, etc. Mainly useful for MXM cards for me.
 
I haven't seen it yet through my vbios investigation but is it possible to also highlight the display outputs?

I'm curious specifically for laptops to see which display outputs are used such as DP_A, DP_B, DP_C, DP_D, etc. Mainly useful for MXM cards for me.
While being very useful, thats not implemented by now. In theory this seems to be possible since GPU-Z shows them
 
While being very useful, thats not implemented by now. In theory this seems to be possible since GPU-Z shows them
Can't use GPU-Z to check vBIOS if the card doesn't output video due to wrong DP channel in vBIOS =P
 
Back
Top