Skip to content

Dosdev#3347

Merged
joncampbell123 merged 3 commits intojoncampbell123:masterfrom
leecher1337:dosdev
Mar 22, 2022
Merged

Dosdev#3347
joncampbell123 merged 3 commits intojoncampbell123:masterfrom
leecher1337:dosdev

Conversation

@leecher1337
Copy link
Copy Markdown
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.

2 participants