diff --git a/README.md b/README.md index 1dc0107..82b84af 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,7 @@ For relocatable overlays, the tool will modify supported instructions possessing Support for relocations for TLB mapping is coming in the future, which will add the ability to provide a list of MIPS32 relocations so that the runtime can relocate them on load. Combining this with the functionality used for relocatable overlays should allow running most TLB mapped code without incurring a performance penalty on every RAM access. ## How to Use -The recompiler is configured by providing a toml file in order to configure the recompiler behavior, which is the only argument provided to the recompiler. The toml is where you specify input and output file paths, as well as optionally stub out specific functions, skip recompilation of specific functions, and patch single instructions in the target binary. There is also planned functionality to be able to emit hooks in the recompiler output by adding them to the toml (the `[[patches.func]]` and `[[patches.hook]]` sections of the linked toml below), but this is currently unimplemented. Documentation on every option that the recompiler provides is not currently available, but an example toml can be found in the Zelda 64: Recompiled project [here](https://github.com/Mr-Wiseguy/Zelda64Recomp/blob/dev/us.rev1.toml). +The recompiler is configured by providing a toml file in order to configure the recompiler behavior, which is the first argument provided to the recompiler. The toml is where you specify input and output file paths, as well as optionally stub out specific functions, skip recompilation of specific functions, and patch single instructions in the target binary. There is also planned functionality to be able to emit hooks in the recompiler output by adding them to the toml (the `[[patches.func]]` and `[[patches.hook]]` sections of the linked toml below), but this is currently unimplemented. Documentation on every option that the recompiler provides is not currently available, but an example toml can be found in the Zelda 64: Recompiled project [here](https://github.com/Mr-Wiseguy/Zelda64Recomp/blob/dev/us.rev1.toml). Currently, the only way to provide the required metadata is by passing an elf file to this tool. The easiest way to get such an elf is to set up a disassembly or decompilation of the target binary, but there will be support for providing the metadata via a custom format to bypass the need to do so in the future. diff --git a/src/main.cpp b/src/main.cpp index 1db3f4d..a2ccdc1 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -275,10 +275,11 @@ int main(int argc, char** argv) { bool dumping_context; if (argc >= 3) { - if (strncmp(argv[2], "--dump-context", 14) == 0) { + std::string arg2 = argv[2]; + if (arg2 == "--dump-context") { dumping_context = true; } else { - fmt::print("Usage: {} [config file] (should-dump)\n", argv[0]); + fmt::print("Usage: {} [--dump-context]\n", argv[0]); std::exit(EXIT_SUCCESS); } } else {