aboutsummaryrefslogtreecommitdiff
path: root/crates/xa65/src/main.rs
Commit message (Collapse)AuthorAgeFilesLines
* Add -h and -v options on the help messageMiquel Sabaté Solà2025-09-021-1/+3
| | | | | | | On all binaries there were these two options missing from the help message. Signed-off-by: Miquel Sabaté Solà <mikisabate@gmail.com>
* xa65: Introduce the -s/--strict optionMiquel Sabaté Solà2025-08-181-4/+14
| | | | | | | | This further iterates on the previous -e/--error flag and it asks 'xa65' to error out in any case: when 'nasm' errors out, but also when the diff is not empty. Signed-off-by: Miquel Sabaté Solà <mikisabate@gmail.com>
* xa65: Add the -e/--error flagMiquel Sabaté Solà2025-08-181-5/+17
| | | | | | | | This allows the user to specify that erroring out on a failing 'nasm' execution is actually desired. This is relevant mostly on internal tests. Signed-off-by: Miquel Sabaté Solà <mikisabate@gmail.com>
* xa65: Introduce the -b/--bin optionMiquel Sabaté Solà2025-08-181-7/+24
| | | | | | | This allows to configure an alternative binary for the 'nasm' program, which is convenient for testing development binaries. Signed-off-by: Miquel Sabaté Solà <mikisabate@gmail.com>
* Apply suggested style fixes from clippyMiquel Sabaté Solà2025-08-171-4/+4
| | | | Signed-off-by: Miquel Sabaté Solà <mikisabate@gmail.com>
* xa65: Fix minor style issuesMiquel Sabaté Solà2025-01-231-3/+3
| | | | Signed-off-by: Miquel Sabaté Solà <mikisabate@gmail.com>
* xa65: Create hex dumps for both binariesMiquel Sabaté Solà2025-01-231-0/+49
| | | | | | | This allows to compare both binaries more easily with tools such as vimdiff and the likes. Signed-off-by: Miquel Sabaté Solà <mikisabate@gmail.com>
* Remove the dependency on clapMiquel Sabaté Solà2025-01-221-29/+91
| | | | | | | | | | | | | | | All three binaries (i.e. readrom, nasm and xa65) used it, and to be honest rolling our own argument parsing was actually pretty easy to achieve. This frees us from a big dependency and it also frees us from inner dependencies such as 'clap_derive' which prevented us from being able to build binaries purely statically. As a side effect, we can now display help/version messages which are more like I'm used to, and certain checks can be moved in the parsing directly instead of having to be done later. As a cherry on top, there is some type masturbation that gets removed along the way. Signed-off-by: Miquel Sabaté Solà <mikisabate@gmail.com>
* Remove dependency to the rand crateMiquel Sabaté Solà2025-01-221-3/+10
| | | | | | | | This dependency was easily avoidable and it brought with it a lot of inner dependencies of its own, most notably 'zerocopy-derive', which forbid us to compile the affected programs purely statically. Signed-off-by: Miquel Sabaté Solà <mikisabate@gmail.com>
* xa65: The config flag should be uppercase on shortMiquel Sabaté Solà2025-01-101-2/+2
| | | | | | | For compatibility with cl65, it's preferrable to keep the short version of the flag as with cl65. Signed-off-by: Miquel Sabaté Solà <mikisabate@gmail.com>
* xa65: Provide the target flagMiquel Sabaté Solà2025-01-101-0/+15
| | | | | | This is meant for compatibility with ca65. Signed-off-by: Miquel Sabaté Solà <mikisabate@gmail.com>
* Remove anyhow from xa65 and readromMiquel Sabaté Solà2025-01-101-27/+54
| | | | | | | | Following in the footsteps of c20c991dded8 ("Make errors from nasm itself more cohesive"), 'anyhow' might provide an easy framework, but it lends towards a less cohesive experience. Signed-off-by: Miquel Sabaté Solà <mikisabate@gmail.com>
* Introduce xa65Miquel Sabaté Solà2025-01-101-0/+124
This is a bridge between 'nasm' and 'cl65'. That is, it runs the same command on both 'nasm' and 'cl65', compares the resulting binaries, and gives back the binary from 'cl65'. Signed-off-by: Miquel Sabaté Solà <mikisabate@gmail.com>