Commit ccfed3b8 authored by Connor Abbott's avatar Connor Abbott

add a raw mode for Bifrost, and an optional offset

Helps when looking at dumps of shader_*.bin from panloader.
parent 8c03c252
......@@ -481,10 +481,17 @@ int main(int argc, char** argv)
std::vector<uint8_t> file;
if (ReadFile(&file, argv[1]))
{
if (strncmp(mode, "t6xx", strlen(mode)) == 0)
DisassembleMidgard(file.data(), file.size());
else
if (strncmp(mode, "raw", 3) == 0) {
int offset = 0;
if (argc > 3)
offset = atoi(argv[3]);
if (strcmp(mode, "raw-bifrost") == 0)
DisassembleBifrost(file.data() + offset, file.size() - offset);
else if (strcmp(mode, "raw-midgard") == 0)
DisassembleMidgard(file.data() + offset, file.size() - offset);
} else {
PrintBlocks(0, file.data(), file.size());
}
}
return 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment