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

Dosdev #3347

Merged
merged 3 commits into from
Mar 22, 2022
Merged

Dosdev #3347

merged 3 commits into from
Mar 22, 2022

Conversation

leecher1337
Copy link
Contributor

This pull request fixes the handling of DOS file I/O device drivers

What issue(s) does this PR address?

There are some device drivers that expect a pre-filled input-buffer on READ function (3Fh) and also don't like to be called for every single byte in that buffer. Therefore the current implementation doesn't work correctly for them.
Therefore to do proper buffer transfers, the device driver should be called directly with the correct buffer pointer in place which also eliminates unnecessary copying.
The current code also has a bug that it lets the buffer point to the beginning of the DCP, which is not desirable, because:

PhysPt bufptr = (dos.dcp << 4) | 32;

but:

real_writew(dos.dcp, 14, (uint16_t)(bufptr & 0x000f));

0x20 & 0xF = 0!

@joncampbell123 joncampbell123 merged commit 5c8b5e7 into joncampbell123:master Mar 22, 2022
leecher1337 added a commit to leecher1337/dosbox-x that referenced this pull request Oct 9, 2022
…g breaking changes to get joncampbell123#3347 working again (MEM_BlockWrite MUSTN'T be called on ext device, otherwise it overwrites buffer which causes malfunction)
joncampbell123 added a commit that referenced this pull request Oct 11, 2022
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.

None yet

2 participants