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

konami/konamigv, konami/konamigq, konami/twinkle: Adjust DMA timings #12375

Merged
merged 2 commits into from
May 18, 2024

Conversation

987123879113
Copy link
Contributor

The 10usec delay per bytes is too slow and causing issues with games, so this should bring load speeds back closer to what it was with the old code. Should also fix https://mametesters.org/view.php?id=8860.

Previous related commits:
a6a81a6
cb8b90c

Comment on lines 313 to 316
}

if (m_dma_requested && m_dma_size > 0)
m_dma_timer->adjust(attotime::from_usec(10));
m_dma_timer->adjust(attotime::zero);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this is in a timer callback, using a zero delay here will result in the scheduler calling the callback again before executing another timeslice. You could get more-or-less the same effect with a loop inside this function.

Do you want to leave all the timer adjust calls in and add notes about the timing being unknown, or do you want to change the callbacks to use loops (and maybe still add notes about it)?

FWIW I did try to find information about how DMA timings are generated and got nowhere.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I removed the timer adjust from scsi_dma_transfer and added a note about finding the proper DMA timings. I think the original situation I was trying to avoid that I have accidentally ran into in the past was a kind of loop situation where scsi_drq would start the DMA transfer, which would then kick off another call to scsi_drq, etc. So the timer calls were used to ensure that the functions would get called after scsi_drq returned so it wouldn't end up in recursion hell. I tested with various konamigv, konamigq, and twinkle games and just using a while loop here works fine.

@mamehaze
Copy link
Contributor

mamehaze commented May 15, 2024

slightly unrelated, but kdeadeye could do with a default / initialized NVRAM (flash) or it will hang on the high score screen as it doesn't have valid data to display.

@cuavas cuavas merged commit 698b634 into mamedev:master May 18, 2024
5 checks passed
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.

3 participants