8000 m740 Support by mrdudz · Pull Request #2707 · cc65/cc65 · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

m740 Support #2707

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 29 commits into from
Jun 20, 2025
Merged

m740 Support #2707

merged 29 commits into from
Jun 20, 2025

Conversation

mrdudz
Copy link
Contributor
@mrdudz mrdudz commented Jun 15, 2025

took #986 and made all opcodes work

Basic roundtrip (disassemble/assemble) works now. Some docs are missing. Some more cleanup is needed perhaps :)

@mrdudz
Copy link
Contributor Author
mrdudz commented Jun 16, 2025

So, it passes the regression test (that i added/updated too).

One odd thing is that "inc a" and "dec a" are right now swapped (in both the assembler and the disassembler) - ie the documentation (that pdf) has them the other way around than currently implemented. This seems to follow the general logic of 6502 clones - however, we need to confirm whether this is really correct for the m740. @roberto314 do you remember anything about that?

@mrdudz
Copy link
Contributor Author
mrdudz commented Jun 16, 2025
da65 -i IMO100_2.in
ca65 -t none --cpu m740 -o rebuild.o IMO100_2.asm
ld65 -C imo100.cfg -o rebuild.bin rebuild.o

works too, and gives an identical file... now about the inc a/dec a....

@mrdudz
Copy link
Contributor Author
mrdudz commented Jun 16, 2025

So, for me this is mostly fine... let the dogs out, please comment - perhaps something can be done more elegant, please tell :)

@sidneycadot
Copy link
Contributor 8000

I am a bit surprised that I was asked to review -- my expertise is the simulator part of the codebase, and I know very little if anything about the other tools.

Please proceed without my input :)

@mrdudz
Copy link
Contributor Author
mrdudz commented Jun 17, 2025

removed some more unrelated stuff from the patch. Already spotted a few more little things - more for tomorrow :)

@mrdudz
Copy link
Contributor Author
mrdudz commented Jun 18, 2025

@kugelfuhr perhaps you can skik over it as well? :) (Why cant i add you as reviewer? bleh)

Copy link
Contributor
@kugelfuhr kugelfuhr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I haven't found much to complain about, but I have no knowledge of this cpu, so this was to be expected.

@mrdudz
Copy link
Contributor Author
mrdudz commented Jun 18, 2025

so there is the test. it got a bit out of hand :) A few more quirks show up, but they should be fixed in another PR (and the test updated)

@mrdudz
Copy link
Contributor Author
mrdudz commented Jun 19, 2025

ok thats it for me, will merge soon if noone steps in :)

@GorillaSapiens
Copy link
Contributor

One odd thing is that "inc a" and "dec a" are right now swapped (in both the assembler and the disassembler) - ie the documentation (that pdf) has them the other way around than currently implemented. This seems to follow the general logic of 6502 clones - however, we need to confirm whether this is really correct for the m740.

not sure which PDF you're referring to. i found this, if it is helpful:
https://bitsavers.org/components/mitsubishi/melps/1989_Series_740_Software_Users_Manual.pdf

@mrdudz
Copy link
Contributor Author
mrdudz commented Jun 20, 2025

One odd thing is that "inc a" and "dec a" are right now swapped (in both the assembler and the disassembler) - ie the documentation (that pdf) has them the other way around than currently implemented. This seems to follow the general logic of 6502 clones - however, we need to confirm whether this is really correct for the m740.

< 9E88 p dir="auto">not sure which PDF you're referring to. i found this, if it is helpful: https://bitsavers.org/components/mitsubishi/melps/1989_Series_740_Software_Users_Manual.pdf

Thats the one, indeed. (@roberto314 linked to it in #986 ) It seems weird the INC A/DEC A doesn't follow the usual pattern.

@roberto314 did you find any other software we could disassemble?

@roberto314
Copy link
roberto314 commented Jun 20, 2025 via email

@mrdudz
Copy link
Contributor Author
mrdudz commented Jun 20, 2025

Sorry, no luck. The code from the programmable logic unit is inside the m50747, not in a ROM. Also the chip is in some chess computers, but there is also no external ROM.

OK, thanks anyway.... too bad :)

So i'll merge it as is - we'll see

@mrdudz mrdudz merged commit d333627 into cc65:master Jun 20, 2025
2 checks passed
@mrdudz mrdudz deleted the m740 branch June 20, 2025 17:39
@roberto314
Copy link
roberto314 commented Jun 20, 2025 via email

@mrdudz
Copy link
Contributor Author
mrdudz commented Jun 20, 2025

Which opcode or opcodes are we talking about?

in the pdf $1a is "dec a", and $3a is "inc a" - however, that does not match the usual encoding scheme, which is why the assembler (and disassembler) currently uses $3a for "dec a" and $1a for "inc a". unfortunately the software you dumped does not contain either, so no way to even guess what is correct.

can you actually run software on that thing for a test? should be easy to find out then :)

@roberto314
Copy link
roberto314 commented Jun 20, 2025 via email

@roberto314
Copy link

Did you see this?
image

@mrdudz
Copy link
Contributor Author
mrdudz commented Jun 20, 2025

yes, the pdf in itself is consistent

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants
0