michaelcmartin / Ophis

A cross-assembler for the 6502 series of microprocessors.
http://michaelcmartin.github.io/Ophis/
Other
96 stars 26 forks source link

Add support for 4502/4510 CPU from Commodore 65 #19

Closed gardners closed 10 years ago

gardners commented 10 years ago

Hello Michael,

I have added support for the 4502/4510 CPU, as found in the Commodore 65 prototypes.

In the process, I have made the addressing mode handling a little more flexible, by replacing all direct references to addressing mode numbers with lookups based on the addressing mode name.

I have added a test for all the new 4502 opcodes, and the test suite passes on my machine at least.

Please let me know if there are any issues with the patch set, and I'll do my best to accommodate.

Paul.

michaelcmartin commented 10 years ago

This will take me a while to get to, but I just want to comment to acknowledge that I've received the patchset.

gardners commented 10 years ago

No worries. I can work from my fork in any case. But thank you for letting me know that you have received it.

Take care, Paul.

michaelcmartin commented 10 years ago

I'm happy with this patch. I like the changes to opcode indexing, and the rest of the changes are well-localized, and the new processor also plays well with the existing optimizations and operation modes.

Some of the error text was improperly copy-pasted, but that's trivial to fix, so I'll do that after I take the pull request.

gardners commented 10 years ago

Hello Michael,

Glad you like the patch. Would you believe that for all that I run several open-source projects myself, this is the first substantial patch I have contributed to another project.

How hard would it be to add an option to dump out the label to address list? Such a list for an assembled program is very helpful when debugging on real hardware, so that addresses can be easily correlated back to the original code.

Paul.

On Sun, Mar 23, 2014 at 3:33 PM, Michael C. Martin <notifications@github.com

wrote:

I'm happy with this patch. I like the changes to opcode indexing, and the rest of the changes are well-localized, and the new processor also plays well with the existing optimizations and operation modes.

Some of the error text was improperly copy-pasted, but that's trivial to fix, so I'll do that after I take the pull request.

Reply to this email directly or view it on GitHubhttps://github.com/michaelcmartin/Ophis/pull/19#issuecomment-38374327 .

catseye commented 10 years ago

I'd also be in favour of adding a way to dump a label-to-address map. (I don't know how hard it would be, but it can't possibly be too difficult, since by the last pass the assembler knows all the addresses of all the labels.) I'd propose opening a separate feature-request-type issue for it.

gardners commented 10 years ago

Sounds like a plan. I'll file an issue.

I agree that it shouldn't be too hard. I imagine that the labels and addresses are all in a python map somewhere, I just haven't had the chance to track it down yet.

Paul.

On Mon, Mar 24, 2014 at 2:08 AM, catseye notifications@github.com wrote:

I'd also be in favour of adding a way to dump a label-to-address map. (I don't know how hard it would be, but it can't possibly be too difficult, since by the last pass the assembler knows all the addresses of all the labels.) I'd propose opening a separate feature-request-type issue for it.

Reply to this email directly or view it on GitHubhttps://github.com/michaelcmartin/Ophis/pull/19#issuecomment-38386054 .

gardners commented 10 years ago

Issue #21 filed.

On Mon, Mar 24, 2014 at 7:17 AM, Paul Gardner-Stephen < paul@servalproject.org> wrote:

Sounds like a plan. I'll file an issue.

I agree that it shouldn't be too hard. I imagine that the labels and addresses are all in a python map somewhere, I just haven't had the chance to track it down yet.

Paul.

On Mon, Mar 24, 2014 at 2:08 AM, catseye notifications@github.com wrote:

I'd also be in favour of adding a way to dump a label-to-address map. (I don't know how hard it would be, but it can't possibly be too difficult, since by the last pass the assembler knows all the addresses of all the labels.) I'd propose opening a separate feature-request-type issue for it.

Reply to this email directly or view it on GitHubhttps://github.com/michaelcmartin/Ophis/pull/19#issuecomment-38386054 .