Didn't I send you the BIOS source?
Your answers are in there!
I see it now. I didn't first notice those if XTIDE eq 0 so i thought that you send me the Promise version since rep insw and rep stosw were used.
By the way, wouldn't this be a little bit faster:
Code:
readLoop:
in al, dx
stosb
or dx, 8
in al, dx
stosb
and dx, NOT 8
loop readLoop
It now has two byte writes but less instruction fetching. Similar thing can be done for PIO write also.
Getting the card functional seemed like a better goal than improving performance.
There wouldn't be performance improvements anyway. Polling status register and waiting interrupt will both waste just as much time. There are Int 15h/AH=90h and 91h but i don't think they will do much good on DOS anyway. Even if they did, DMA transfers would help them much more.
go for it! send me the changes to the source and I will roll them in. that will be very helpful.
I'll try something else instead. I wrote almost complete 286 BIOS two years ago. It only has what is necessary for DOS but that includes IDE BIOS functions with L-CHS (NORMAL), P-CHS (LARGE) and LBA (28-bit) addressing. It also supports (actually requires) interrupts. If i remember correctly, i also implemented block mode transfers. There are no EBIOS functions.
I will try to get it to work with XTIDE (no promises). However, currently it uses 286 instructions and reserves 1kB from top of base memory.
The whole BIOS was written for emulator so it has never been tested with real hardware. If i get it to work, i should be able to get floppy BIOS functions to work also (HD support for XT).
Is DMA worth delaying production that long?
No it is not. 8088 and 8086 would benefit from it but later CPUs are faster with PIO transfers thanks to INS and OUTS instructions. DMA would also complicate BIOS functions. For example on floppy functions it is needed to check for 64K physical page changes and switch to PIO if sector is partially in two different pages.