| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
| |
When reporting the final instruction, if that was actually a brk (and
hence we stopped because of it), show the breaking mark as that could be
relevant when debugging.
Signed-off-by: Miquel Sabaté Solà <mssola@mssola.com>
|
| |
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
| |
Instead of assuming a default value, it's safer to just implement it in
Rust's native Option<_> type.
Signed-off-by: Miquel Sabaté Solà <mssola@mssola.com>
|
| |
|
|
|
|
|
| |
Provide documentation for the library, and improve the documentation for
some of the structs and interfaces.
Signed-off-by: Miquel Sabaté Solà <mssola@mssola.com>
|
| |
|
|
| |
Signed-off-by: Miquel Sabaté Solà <mssola@mssola.com>
|
| |
|
|
|
|
|
|
|
|
| |
I am not sure from where I got this bit flipping part, but I believe
things worked because of another bug (see 9c685d5b6ca1 ("vnf: also set
the carry on a zero compare")).
Fixes: ad77503d9533 ("vnf: add support for standard joypads")
Signed-off-by: Miquel Sabaté Solà <mssola@mssola.com>
|
| |
|
|
|
|
| |
Add also a test to further check corner cases on compare instructions.
Signed-off-by: Miquel Sabaté Solà <mssola@mssola.com>
|
| |
|
|
|
|
|
|
| |
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>
|
| |
|
|
| |
Signed-off-by: Miquel Sabaté Solà <mssola@mssola.com>
|
| |
|
|
|
|
|
| |
For now tests on vnf are provided via e2e tests, and via the vnf-tests
binary.
Signed-off-by: Miquel Sabaté Solà <mssola@mssola.com>
|
| |
|
|
|
|
| |
They were the last ones marked with the todo!() macro.
Signed-off-by: Miquel Sabaté Solà <mssola@mssola.com>
|
| |
|
|
|
|
|
|
|
|
|
| |
It was created a long time ago in the hopes that it would be useful
whenever I wanted to create an emulator, but when that happened in the
form of 'runrom' I've seen that it's really not needed.
Remove it as it just pollutes the source code with hundreds of useless
lines.
Signed-off-by: Miquel Sabaté Solà <mssola@mssola.com>
|
| |
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
|
|
|
|
|
| |
This also includes brk and rti, for which we are also storing and
exporting the break mark, just in case it can be useful to library users
in case they want to add error codes in break marks.
This commit also includes a fix for accounting the Z and N flags on
transfer instructions, which couldn't easily be split into a separate
commit, but it's a fairly simple change.
Signed-off-by: Miquel Sabaté Solà <mssola@mssola.com>
|
| |
|
|
| |
Signed-off-by: Miquel Sabaté Solà <mssola@mssola.com>
|
| |
|
|
|
|
|
|
| |
On situations like jsr or rts, we perform two pushes/pops, but this is
not to be reported in verbose mode as it's not that clear. Instead,
let's report the full address in a single stack line.
Signed-off-by: Miquel Sabaté Solà <mssola@mssola.com>
|
| |
|
|
|
|
| |
This was broken since the very beginning.
Signed-off-by: Miquel Sabaté Solà <mssola@mssola.com>
|
| |
|
|
| |
Signed-off-by: Miquel Sabaté Solà <mssola@mssola.com>
|
| |
|
|
| |
Signed-off-by: Miquel Sabaté Solà <mssola@mssola.com>
|
| |
|
|
| |
Signed-off-by: Miquel Sabaté Solà <mssola@mssola.com>
|
| |
|
|
|
|
|
|
|
|
|
| |
Even if the desired thing is to run until the provided address is
reached, abort execution as well if the machine stops being active as
well. This is a common scenario when running in function mode and the
target end address is something passed that.
Fixes: e6c41303c2da ("runrom: add the --until-address option")
Signed-off-by: Miquel Sabaté Solà <mssola@mssola.com>
|
| |
|
|
|
|
|
|
|
| |
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>
|
|
|
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>
|