aboutsummaryrefslogtreecommitdiff
path: root/lib/header
Commit message (Collapse)AuthorAgeFilesLines
* readrom: print the usual PRG-RAM size if availableMiquel Sabaté Solà2026-07-131-1/+1
| | | | | | | | | | If 'has_persistent_memory' has been set on the ROM header, then we must print it even if bytes 8/10 was never set by the header. In fact, the vast majority of ROM files don't have these bytes set but they report a true value for 'has_persistent_memory'. Hence, assume the usual PRG-RAM size in these cases, which is (I hope) the correct one in all cases. Signed-off-by: Miquel Sabaté Solà <mssola@mssola.com>
* lib: add descriptions in Cargo.toml filesMiquel Sabaté Solà2026-07-081-0/+2
| | | | Signed-off-by: Miquel Sabaté Solà <mssola@mssola.com>
* Upgrade to the 2024 edition of RustMiquel Sabaté Solà2026-07-082-2/+1
| | | | | | | And also adjust the code so the clippy from the 2024 edition is fine with it. Signed-off-by: Miquel Sabaté Solà <mssola@mssola.com>
* Update the code style to the latest stable RustMiquel Sabaté Solà2026-04-241-6/+4
| | | | | | | | | | This mostly involves applying the collapsible_match rule[1] where appropiate, and using sort_by_key() as pointed out by the latest stable version of clippy. [1] https://rust-lang.github.io/rust-clippy/rust-1.95.0/index.html#collapsible_match Signed-off-by: Miquel Sabaté Solà <mssola@mssola.com>
* header: Add RAM and CPU/PPU Timing detectionMiquel Sabaté Solà2025-09-121-2/+141
| | | | Signed-off-by: Miquel Sabaté Solà <mikisabate@gmail.com>
* header: Add one/four screen nametable supportMiquel Sabaté Solà2025-09-121-13/+74
| | | | Signed-off-by: Miquel Sabaté Solà <mikisabate@gmail.com>
* header: Add fuzzy testingMiquel Sabaté Solà2024-12-184-0/+98
| | | | Signed-off-by: Miquel Sabaté Solà <mikisabate@gmail.com>
* Add the readrom binaryMiquel Sabaté Solà2024-12-182-0/+341
The readrom binary is similar to `readelf` from Linux and it will allow to display information from an NES/Famicom ROM file. For now the information being shown is just the header, but in the future we might also include disassembling parts of the code, or retrieving the "CHARS" section for a given ROM file, and similar. In order to implement the header parsing part a new library has been introduced, simply named "header" which abstracts everything away so you just need to call `Header::try_from("my bytes")` to fetch the actual information. Signed-off-by: Miquel Sabaté Solà <mikisabate@gmail.com>