Skip to content
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

Request CMOS chip behaviour #27

Open
simonowen opened this issue Aug 23, 2021 · 1 comment
Open

Request CMOS chip behaviour #27

simonowen opened this issue Aug 23, 2021 · 1 comment
Assignees

Comments

@simonowen
Copy link
Collaborator

The undocumented out (c),0 instruction is the original NMOS Z80 behaviour. On newer CMOS Z80 chips it writes 0xff instead. I have an emulator option to control the behaviour, so I can see the effects on software that uses that instruction. I've only just realised that since switching CPU core the option no longer has any effect.

In my local copy I've implemented a handler called on_is_cmos_z80, which returns true if it's CMOS, false if it's NMOS (the default). The core uses the return value to pick either 0xff or 0 for the instruction implementation and the disassembler output.

If you think that's how you'd implement it I can put up a small pull request with the changes. If you think there's a better way to do it could I please request it be supported in a future release?

@kosarev
Copy link
Owner

kosarev commented Aug 24, 2021

This a bit overlaps with #15, it probably should be implemented via introducing of CPU variants. I'm going play with the code a little to figure out a natural way to do this...

@kosarev kosarev self-assigned this Aug 24, 2021
kosarev added a commit that referenced this issue Aug 24, 2021
kosarev added a commit that referenced this issue Aug 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants