aboutsummaryrefslogtreecommitdiff
path: root/crates/runrom
Commit message (Collapse)AuthorAgeFilesLines
* vnf: add the 'Machine.halt_on_brk' fieldMiquel Sabaté Solà2026-09-071-0/+10
| | | | | | | | This allows developers to use 'brk' as asserts which can then be debugged. This is true by default but it can be turned off via the --no-halting-brk option from runrom. Signed-off-by: Miquel Sabaté Solà <mssola@mssola.com>
* vnf: add support for standard joypadsMiquel Sabaté Solà2026-09-061-1/+2
| | | | | | | | This means adding constants so developers can actually trigger which key presses are available at any given read, as well as a simple interface that allows to add button presses and clear them. Signed-off-by: Miquel Sabaté Solà <mssola@mssola.com>
* Change the first argument of Machine::from() into a &PathMiquel Sabaté Solà2026-08-271-2/+3
| | | | | | | | This makes for a saner API, and some users (e.g. vnf-tests) don't have to go over backwards to provide a parameter they already had as a PathBuf. Signed-off-by: Miquel Sabaté Solà <mssola@mssola.com>
* Implement the Default trait for MemoryInitialValueMiquel Sabaté Solà2026-08-271-12/+2
| | | | Signed-off-by: Miquel Sabaté Solà <mssola@mssola.com>
* runrom: use Path instead of PathBuf as a parameterMiquel Sabaté Solà2026-08-271-3/+3
| | | | Signed-off-by: Miquel Sabaté Solà <mssola@mssola.com>
* {read,run}rom: fix format of help messageMiquel Sabaté Solà2026-08-261-5/+5
| | | | Signed-off-by: Miquel Sabaté Solà <mssola@mssola.com>
* {run,read}rom: validate the path from --nasmMiquel Sabaté Solà2026-08-261-5/+14
| | | | Signed-off-by: Miquel Sabaté Solà <mssola@mssola.com>
* runrom: add the --until-address optionMiquel Sabaté Solà2026-08-252-32/+79
| | | | | | | | | This allows the user to run execution until a given address is reached. This can, like with the --start option, be coupled with the --nasm option in order to be able to provide an identifier instead of a regular hexadecimal value. Signed-off-by: Miquel Sabaté Solà <mssola@mssola.com>
* Allow the --start flag to accept identifiersMiquel Sabaté Solà2026-08-242-15/+82
| | | | | | | This is coupled with the new -n/--nasm option, which works in the same way as in `readrom`. Signed-off-by: Miquel Sabaté Solà <mssola@mssola.com>
* Annotate the no-return from die()Miquel Sabaté Solà2026-08-241-7/+2
| | | | | | | | | | | | In all crates we are using a die() function to print to stderr and quit with a exit status > 0. Apparently in Rust you can annotate the return type with a bang just like the noreturn from the C family. The added bonus is that some useless statements to make the compiler happy without it can be removed altogether as now the compiler is able to understand that it won't return so the returned type is not needed. Signed-off-by: Miquel Sabaté Solà <mssola@mssola.com>
* Improve the description of runromMiquel Sabaté Solà2026-08-231-11/+29
| | | | Signed-off-by: Miquel Sabaté Solà <mssola@mssola.com>
* Add the runrom crate and the vnf libraryMiquel Sabaté Solà2026-08-173-0/+267
The vnf library supports the runrom crate and they both combined enable users to "run" a ROM file. This is basically an emulator, but with two key differences: 1. It is to be run programatically. That is, you are not expected to play games with this, but to run code by steps, start at a given address, run a function, etc. 2. It is headless: there are no graphics displayed on screen, nor sound being delivered. Thus, the target for both these things are developers, not players. This way developers can validate code paths without needing a full blown emulator. You can write tests with this and be able to run some checks as part of your testing infrastructure. Signed-off-by: Miquel Sabaté Solà <mssola@mssola.com>