aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorJavier <dev.git@javispedro.com>2026-09-29 23:40:31 +0200
committerJavier <dev.git@javispedro.com>2026-09-29 23:40:31 +0200
commit0a656a4a84f920194958d339d61ed567eba9c03c (patch)
tree0feecbddf0150e02fe7a2fa619dc232c50ced4c8 /README.md
downloadchu-0a656a4a84f920194958d339d61ed567eba9c03c.tar.gz
chu-0a656a4a84f920194958d339d61ed567eba9c03c.zip
initial import
Diffstat (limited to 'README.md')
-rw-r--r--README.md83
1 files changed, 83 insertions, 0 deletions
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..7a30ef9
--- /dev/null
+++ b/README.md
@@ -0,0 +1,83 @@
+This is a DOS disk driver for the CH375 "USB ISA adapter", mostly designed with the Pocket386/Book386 in mind.
+
+There is already a good number of drivers out there, but as far as I can see they are all derivatives of the original one,
+and I got tired of all the obscure hangs and crashes. This driver is in OpenWatcom C and written from scratch
+using the datasheets, so it has a (hopefully different) new repertoire of bugs to play with.
+
+Some features:
+
+* Can support multiple partitions. You can either show multiple drive letters (the number of drive letters is fixed at boot, though)
+and/or dynamically switch a single drive letter to a different partition from the command prompt.
+This does wonders to workaround the FAT16 2GG limit, as you can define a dozen FAT16 partitions and switch.
+
+* On DOSes which support FAT32, can optionally show FAT32 partitions to the DOS.
+
+* I mostly ignore CHS addressing and focus on LBA. This makes it way more capable of handling non-DOS formatted USB pendrives,
+and is generally less of a pain. In theory this allows disks of up to 2TB (be mindful of partition size limits though).
+If DOS asks for geometry, it gives whatever is on your current partition.
+
+* Supports just enough IOCTLs to make DOS 6.x format.com "work"
+(only to re-format existing partitions, since it will simply re-use geometry from whatever FAT is already there).
+Note this is a DOS-level driver, so FDISK won't work (which expects a BIOS-level driver).
+
+* Build is for 386+, tested on pocket386/book386, but source builds on 8086.
+
+* Extensive (not included by default) verbose log over serial port.
+
+As usual, this driver is in OpenWatcom C, do not expect it to beat
+any benchmark in speed or memory usage, but it gets around. About 400KB/s on the Book386, which is the same
+I get with other drivers anyway; and around 7KiB of memory usage (the official driver sits at 4KiB).
+Hopefully much easier to experiment with than with the official one.
+
+# Download
+
+
+
+# Installation
+
+````
+DEVICE=CHUDISK.SYS [options]
+````
+
+## CHUDISK.SYS configuration options
+
+Current options:
+
+* /P260 : IO port for CH375 (defaults to 0x260, as on the pocket386)
+
+* /N1 : number of drive letters to allocate (defaults to just 1).
+Each drive letter will by default be mapped to a different partition in order.
+
+* /R : read-only mode. Writes to disk will fail.
+
+* /3 : show FAT32 partitions to the OS. Useful for OSes with native FAT32 support like FreeDOS.
+
+
+# Usage
+
+The program CHUD.EXE can be used to switch a CHUDISK.SYS managed drive letter to a different partition.
+E.g.
+
+````
+C:\> CHUD D:
+
+ Index Type Label Size
+ [1] fat16 USBPART1 1996 MB
+ [2] fat16 USBPART2 1996 MB
+ [3] fat32 USBPARTBIG 4726 MB
+Select partition in [1..3] range:
+````
+
+Extended partitions, W95/LBA partitions are supported. Of course you can only select FAT16 partitions,
+and perhaps FAT32 ones if lucky (DOS7.1, FreeDOS, etc.) or forced with /3.
+
+Note the drive letters <-> partitions mapping is not persistent, and will in fact be reset if you reboot
+or disconnect the USB drive.
+
+# Building
+
+Tested with OpenWatcom 2, build from any OS where OpenWatcom runs.
+
+````
+ wmake all
+````