6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Tue May 21, 2024 11:29 am

All times are UTC




Post new topic Reply to topic  [ 6 posts ] 
Author Message
PostPosted: Thu Oct 06, 2016 7:21 pm 
Offline

Joined: Mon Mar 25, 2013 9:26 pm
Posts: 183
Location: Germany
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.

_________________
How should I know what I think, until I hear what I've said.


Top
 Profile  
Reply with quote  
PostPosted: Thu Oct 06, 2016 7:36 pm 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10802
Location: England
Probably it is worth doing something, even if only checking that -m is the first option or something similarly simple.

Probably a good idea to raise an issue - especially if you can suggest a fix too!


Top
 Profile  
Reply with quote  
PostPosted: Thu Oct 06, 2016 8:06 pm 
Offline

Joined: Mon Mar 25, 2013 9:26 pm
Posts: 183
Location: Germany
@BigEd: Thanks for the quick merge, that was fast :-)
Maybe I find the time tomorrow to write a fix.

_________________
How should I know what I think, until I hear what I've said.


Top
 Profile  
Reply with quote  
PostPosted: Thu Oct 06, 2016 8:20 pm 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10802
Location: England
That would be really welcome! I keep forgetting Mike gave me merge rights on the repo.


Top
 Profile  
Reply with quote  
PostPosted: Thu Oct 06, 2016 9:43 pm 
Offline

Joined: Mon Mar 25, 2013 9:26 pm
Posts: 183
Location: Germany
It was easier then expected. Pull-Request is out. No evil "tabs" at this time and the checks are ok for all tested python versions. I just fixed another bug for the load option if no mpu was given.

_________________
How should I know what I think, until I hear what I've said.


Top
 Profile  
Reply with quote  
PostPosted: Fri Oct 07, 2016 7:42 am 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10802
Location: England
That's great - thanks again.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: