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

SMS Core Fails "X-Scroll Latchtime" Test #113

Open
ajgowans opened this issue Oct 18, 2021 · 3 comments
Open

SMS Core Fails "X-Scroll Latchtime" Test #113

ajgowans opened this issue Oct 18, 2021 · 3 comments

Comments

@ajgowans
Copy link

The SMS core fails the "X-Scroll Latchtime" test in the attached VDPTEST rom. You can compare to the same test run on a PAL SMS2, also attached.

I have attached the full test results for the MiSTer and PAL SMS2, and also the Mega SG which may be of interest.
MiSTer - SMS Test - 05

SMS Test - PAL MS2 - 10
VDPTEST.sms.zip
SMS Test Mega SG (15-Oct-2021).zip
SMS Test PAL MS2 (15-Oct-2021).zip
SMS Test MiSTer (29-Sep-2021).zip

@dentnz
Copy link

dentnz commented Oct 19, 2021

Found the source code for the VDP test rom here: https://www.smspower.org/Homebrew/SMSVDPTest-SMS

Zip contains source.

@dentnz
Copy link

dentnz commented Oct 19, 2021

Importantly: XScroll is latched between HClock -18 & -17 (HCount 0xF3), HClock -15 & -14 (HCount 0xF5 & 0xF6) on MD.

@birdybro
Copy link
Member

https://github.com/MiSTer-devel/SMS_MiSTer/blob/master/rtl/vdp.vhd#L404

Maybe this is the source of the issue?

https://www.intel.com/content/www/us/en/docs/programmable/683082/22-1/recommended-clock-gating-methods.html

To generate a gated clock with the recommended technique, use a register that triggers on the inactive edge of the clock. With this configuration, only one input of the gate changes at a time, preventing glitches or spikes on the output. If the clock is active on the rising edge, use an AND gate. Conversely, for a clock that is active on the falling edge, use an OR gate to gate the clock and register

I'll test and see...

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

No branches or pull requests

3 participants