I spent the whole day to find out that the py65mon (
https://github.com/mnaberez/py65) is not acting like it should while parsing commandline arguments.
Normal behavior should be that the order of the arguments is irrelevant. But for this tools it's not.
If you have a ROM image with 65C02 code it does matter if you call
Code:
py65mon -r myrom.img -m 65c02 (works not)
instead of
Code:
py65mon -m 65c02 -r myrom.img (works)
The reason for this behavior ist, that while parsing each argument the settings are directly done on the emulated machine.
I found this while trying to add two new arguments to set the getc and putc address via commandline but preserve the default settings of 0xF001 and 0xF004 if no settings are given.
Depending on the parsing order it worked sometimes and sometimes not. It took the whole day to find out that not my code is the cause.
So if anybody is using py65 to test code on a local machine before transferring it to the real machine, keep in mind to sort your parameters right
I've forked the repository and added some parameters to set the addresses of "getc" and "putc" during startup instead of the hard wired addresses. In the pull request on github I also mentioned the problem of the order dependency of the parameters.
Let's see what happens.
Mario.