disable IDE write cache (Miscellaneous)
> Thanks, i will look for the Hitachi HDF tool.
I wasn't able to locate the Hitachi HDF tool.
I booted SvarDOS on a desktop PC with a Samsung SV-1363D (ATA-4) IDE disk.
`hwinfo16` reported that the IDE disk write cache was enabled
booted BasLinux from floppy
https://distro.ibiblio.org/baslinux/
copied hdparm from Slackware
ftp://ftp.mirrorservice.org/sites/ftp.slackware.com/pub/slackware/slackware-4.0/slakware/a3/bin.tgz
ran:
`hdparm -W 0 /dev/hda` to disable the write cache
`hdparm -K 1 /dev/hda` to keep features across reboot
`hdparm -k 1 /dev/hda` to keep settings across reboot
`hdparm -W 0 /dev/hda` to disable the write cache, just to be thorough
shut down, then booted DOS again.
`hwinfo16` reported that the IDE disk write cache was still enabled
I guess either hdparm silently failed or this disk can't persist that setting.
My debug.com script didn't disable it either. The status indicated that the drive was busy.
I tried the following debug.com listing to select drive number 0 prior to disabling the write cache. The 15 IN instructions are supposed to clear the status and delay 400 ns. This didn't help either.
mov dx,1f6
mov al,50
out dx,al
mov dx,1f1
mov al,82
out dx,al
mov dx,1f7
mov al,ef
out dx,al
in al,dx
push ax
in al,dx
in al,dx
in al,dx
in al,dx
in al,dx
in al,dx
in al,dx
in al,dx
in al,dx
in al,dx
in al,dx
in al,dx
in al,dx
in al,dx
in al,dx
pop ax
mov ah,4c
int 21
Notes:
Drive/Head Bitfield: 50h -- 01010000 (
0 -- Unused 0,
1 -- Always set 1,
0 -- Use CHS not LBA,
1 -- Always set
0 -- DRV 0,
000 -- CHS
)
ATA Command: EFh -- SET FEATURES
ATA Subcommand: 82h -- DISABLE WRITE CACHE
ATA Register: (1F0h + 1): WRITE -- Features
ATA Register: (1F0h + 6): WRITE -- Drive / Head
ATA Register: (1F0h + 7): WRITE -- Command
ATA Register: (1F0h + 7): READ -- Status
Complete thread:
- disable IDE write cache - bencollver, 23.02.2026, 05:50 (Miscellaneous)
![Open in board view [Board]](img/board_d.gif)
![Open in mix view [Mix]](img/mix_d.gif)
- disable IDE write cache - Japheth, 23.02.2026, 13:40
- disable IDE write cache - bencollver, 23.02.2026, 17:09
- disable IDE write cache - RayeR, 23.02.2026, 17:58
- disable IDE write cache - bencollver, 23.02.2026, 18:44
- disable IDE write cache - bencollver, 21.06.2026, 02:10
- disable IDE write cache - rr, 21.06.2026, 10:33
- disable IDE write cache - bencollver, 21.06.2026, 20:02
- disable IDE write cache - rr, 21.06.2026, 10:33
- disable IDE write cache - bencollver, 21.06.2026, 02:10
- disable IDE write cache - bencollver, 23.02.2026, 18:44
- disable IDE write cache - Japheth, 23.02.2026, 13:40
Mix view