I have an 8MB partition setup now and I can copy files between there and the RAMdisk.
The CHS geometry of the drive is 1010 cylinders, 12 heads, 55 sectors.
With 512 directory entires it was also quite slow intially, but that was a problem with the IDE driver code. I have the ATA specifications, but have never written the driver code before so there is some trial and error going on. Reads are fairly fast now but there is some glitchiness still to be solved. For instance, DIR occasionally fails to display the entire list of files. I think some sector reads are returning garbage data.
If I use the Z280 DMA controller, moving data from IDE to memory should be somewhat faster than a CPU loop, and moving data from memory to memory (with 16-bit transfers) should be much faster than an LDIR. It's interesting to see the benchmark results from a 33MHz system. It's clear that OS overhead is a significant factor compared to raw transfer rates.
There is one thing I'd like to confirm. When BDOS calls the BIOS to select another disk, does it expect BIOS to recall the last track and sector that were set for that disk, or does it always set the track and sector again anew?
Code:
dpblock2:
; an 8MB partition on IDE (with only 256 bytes per sector)
dw 110 ; sectors per track (in 128-byte units)
db 5 ; block shift
db 31 ; block mask
db 1 ; extent mask
dw 2047 ; highest block number (DSM) (in clusters)
dw 511 ; highest directory entry number (DRM)
db $F0 ; directory allocation pattern (bits set according to how many clusters
db 0 ; are used for the directory) (32 bytes per directory entry)
dw 0 ; directory checksum (CKS) (0 for non-removable media, else DRM +1 /4)
dw 1 ; number of reserved tracks
With 512 directory entires it was also quite slow intially, but that was a problem with the IDE driver code. I have the ATA specifications, but have never written the driver code before so there is some trial and error going on. Reads are fairly fast now but there is some glitchiness still to be solved. For instance, DIR occasionally fails to display the entire list of files. I think some sector reads are returning garbage data.
If I use the Z280 DMA controller, moving data from IDE to memory should be somewhat faster than a CPU loop, and moving data from memory to memory (with 16-bit transfers) should be much faster than an LDIR. It's interesting to see the benchmark results from a 33MHz system. It's clear that OS overhead is a significant factor compared to raw transfer rates.
There is one thing I'd like to confirm. When BDOS calls the BIOS to select another disk, does it expect BIOS to recall the last track and sector that were set for that disk, or does it always set the track and sector again anew?
Thanks for the tip. I also found this thread https://forum.vcfed.org/index.php?threads/what-are-your-favorite-cp-m-tools-or-utilities.1237498/ but haven't had time to go through it yet.[/code]I was always fond of 'patch.com' by Bill Rink. It is written in Turbo Pascal and no source was ever released. Use the 'turbinst.com' installer to configure for terminal codes. Send a PM if you're unable to find a copy.