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

Unusual VIF FIFO behaviour #356

Open
refractionpcsx2 opened this issue Apr 14, 2020 · 0 comments
Open

Unusual VIF FIFO behaviour #356

refractionpcsx2 opened this issue Apr 14, 2020 · 0 comments

Comments

@refractionpcsx2
Copy link
Contributor

refractionpcsx2 commented Apr 14, 2020

Sending a packet of nops to VIF1, QWC = 0x1E

Stall on first word nop of first QW results in
e000c02, VIF1QWC e VIF1MARK 0 VIF1CYCLE 404, FIFO is reduced by 2 from full

Stall on nop second word through fourth word of the first QW results in, FIFO count is reduced by 3 from full
d000c02, VIF1QWC e VIF1MARK 0 VIF1CYCLE 404

3 qwc worth seem to have been read from the FIFO once the second word is read in to the VIF

FIFO also doesn't read the next 8 qwc from the DMAC until it reads the 1st word on the 6th quadword of data.
Example
Stalling on the 1st word of QW 6 (Position 20 in the array)
VIF1STAT 9000c02, VIF1QWC e VIF1MARK 0 VIF1CYCLE 404
Stalling on the 2nd word of QW 6 (Position 21 in the array)
VIF1STAT 10000c02, VIF1QWC 6 VIF1MARK 0 VIF1CYCLE 404

What can we take away from this?

Speculation:
VIF has a 2QW buffer internally
VIF Commands are taken in 1 Word at a time from the FIFO buffer and the VIF1STAT_FQC counter only counts full QW's
DMAC will refuse to send more data to VIF unless there is space for at least 8QW's in the buffer (first transfer sends 16QW)

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

1 participant