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

[Core/CD] Fix various MCD registers, based on the hardware manual and mcd-verificator (#408) #464

Closed
wants to merge 2 commits into from

Conversation

DevsArchive
Copy link

@DevsArchive DevsArchive commented Oct 4, 2022

Fixes a number of errors reported by mcd-verificator (#408). Half is just simple bit masks to prevent unused bits from being written/read.

The other has to do with how the CDC register select and read/write actually functions. According to mcd-verificator, bit 4 in the CDC register select register is the "RS" flag, which you can read up on Sanyo LC8950/LC8951 manual. Interestingly, it seems that when the CDC register ID wraps back to 0 from 0xF, it'll actually switch the RS flag, effectively making it act as sort of a 5th bit? From the tests done in mcd-verificator, it seems to just act as an access enable flag of sorts? The LC8950 manual says that the RS flag is for dictating how registers are accessed (low ="direct addressing"/"AR", high = "indirect addressing"/"the register pointed to by AR", which I guess is for setups where you would switch between setting the register ID and register data within the same address, which isn't applicable to the MCD, since the 2 are split). The current implementation is based on what mcd-verificator has perceived it. Also, even if the register select is set to 0, it'll still increment on a register read/write if the RS flag is set. It'll only not increment if it's clear.

Minus the timing test errors, register X002 and the CDC register select/register data registers are reported as working correctly in mcd-verificator.

@DevsArchive DevsArchive closed this Oct 4, 2022
@DevsArchive
Copy link
Author

Closing this as further hardware testing has shown some complications.

@ekeeke
Copy link
Owner

ekeeke commented Oct 4, 2022

Thank you but I already studied most of the register errors reported by mcd verificator test program (and have most of these fixed in private repository, just need some time for polishing... as usual). The 5-bit CDC register address is indeed only applicable to some specific LC8951x version (the one used in CDX/MultiMega i think) and need to be configurable (best way is to detect used bios)

@ekeeke
Copy link
Owner

ekeeke commented Oct 4, 2022

If there are any additional mistakes (not reported by mcd verificator), please rather open a specific issue report (with test program to check on real hardware if possible)

@DevsArchive
Copy link
Author

Noted

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

Successfully merging this pull request may close these issues.

2 participants