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

DSKBYTR WORDEQUAL can be set before DATA visible #249

Open
mras0 opened this issue Dec 29, 2022 · 1 comment
Open

DSKBYTR WORDEQUAL can be set before DATA visible #249

mras0 opened this issue Dec 29, 2022 · 1 comment

Comments

@mras0
Copy link

mras0 commented Dec 29, 2022

Minor detail, and I doubt any software depends on it, but I don't think this is currently implemented in WinUAE.

The data visible in the DSKBYTR register seems to be delayed compared to the value used for WORDSYNC. Here's data captured on an A1000 (with real floppy drive):

image

The highlighted sequence shows that $5044 and $D089 was read from DSKBYTR (i.e. WORDEQUAL was set before the $89 byte was ready).

I know you prefer smaller test cases, so I made a simpler one that reads a track 41 times and counts how often $5044 is read from DSKBYTR. On my A1200 w/ gotek it's ~70-80 times (the count is displayed in hex), while in WinUAE it seems to never happen.

dskbytr.zip (apologies in advance for the stupid code)

@tonioni
Copy link
Owner

tonioni commented Jan 1, 2023

Yeah, there is something unexplained and my plan was always been to examine disk details before 5.0.

I thought DSKBYTR 8-bits of data are directly from internal buffer that is also used for DSKSYNC comparison but that isn't true.

Easy test: load something, then deselect drives, check all possible DSKSYNC values and exit loop if WORDSYNC bit gets set after writing to DSKSYNC. Value can be totally different than DSKBYTR 8-bit data.

EDIT: It looks like WORDSYNC bit is set 1 CCK before DSKBYTR data is loaded. Probable reason is DSKBYTR data part needing 1 CCK to load the latch but WORDSYNC bit is "live" data direct from DSKSYNC comparator.

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

No branches or pull requests

2 participants