diff options
author | H. Peter Anvin <hpa@zytor.com> | 2014-05-08 09:41:03 -0700 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2014-05-08 09:42:43 -0700 |
commit | 209a67bda77468dea45b94cfb85bb3bae3eee337 (patch) | |
tree | e86974389f360479f6a001339392f911262fa07d | |
parent | b0419bb69cea60ed2d8d9ae5a521480c88f2148d (diff) | |
download | abc80-209a67bda77468dea45b94cfb85bb3bae3eee337.tar.gz abc80-209a67bda77468dea45b94cfb85bb3bae3eee337.tar.xz abc80-209a67bda77468dea45b94cfb85bb3bae3eee337.zip |
sddrom: Fix the setting of transfer size in CP/M mode
128 bytes, not 384; this means setting the I/O port accordingly since
bit A0 is used as the 8th bit of the counter.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
-rw-r--r-- | data/sddrom.asm | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/data/sddrom.asm b/data/sddrom.asm index c13960d..9d67698 100644 --- a/data/sddrom.asm +++ b/data/sddrom.asm @@ -362,11 +362,16 @@ transfer: out (0x04),a ld a,(iy+13) ; High byte of addressed controller buffer out (c),a - ld a,(iy+1) ; Bit 5 of K1 = CP/M mode - add a - add a - and 80h - out (0x03),a ; 256 bytes if ABC, 128 bytes if CP/M + bit 5,(iy+1) ; Bit 5 of K1 = CP/M mode + jr z,tr_abc + ld a,128 + out (0x02),a ; 128 bytes + jr tr_common +tr_abc: + xor a + out (0x03),a ; 256 bytes + jr tr_common +tr_common: ld a,01h ; A = 01h (READY) out (0x00),a tr_wait: |