Skip to content

Commit f226f0b

Browse files
committed
Add CONFIG.SYS to full floppy images
Full floppy images now include CONFIG.SYS with: - FILES=20 - BUFFERS=10 - BREAK=ON - DEVICE=A:\DOS\ANSI.SYS (if ANSI.SYS was included) This makes the included drivers actually usable and matches retail DOS floppy behavior. Settings based on DOS 4 SELECT installer "Balance" defaults. Minimal floppies remain unchanged (no CONFIG.SYS).
1 parent 2ca5651 commit f226f0b

1 file changed

Lines changed: 11 additions & 1 deletion

File tree

v4.0/mkhdimg.sh

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -332,6 +332,15 @@ if $FLOPPY; then
332332
printf '@ECHO OFF\r\n' > "$STAGING/REAL_AE.BAT"
333333
printf 'PROMPT $p$g\r\n' >> "$STAGING/REAL_AE.BAT"
334334
printf 'PATH A:\\DOS\r\n' >> "$STAGING/REAL_AE.BAT"
335+
336+
# Create CONFIG.SYS for the target floppy (loads ANSI.SYS if present)
337+
printf 'FILES=20\r\n' > "$STAGING/REAL_CF.SYS"
338+
printf 'BUFFERS=10\r\n' >> "$STAGING/REAL_CF.SYS"
339+
printf 'BREAK=ON\r\n' >> "$STAGING/REAL_CF.SYS"
340+
# Only add DEVICE= if ANSI.SYS was included
341+
if [ -f "$STAGING/DOS/ANSI.SYS" ]; then
342+
printf 'DEVICE=A:\\DOS\\ANSI.SYS\r\n' >> "$STAGING/REAL_CF.SYS"
343+
fi
335344
fi
336345
else
337346
# Hard disk image: full file layout
@@ -440,8 +449,9 @@ if $FLOPPY; then
440449
fi
441450
done
442451
fi
443-
# Copy AUTOEXEC.BAT to floppy root
452+
# Copy AUTOEXEC.BAT and CONFIG.SYS to floppy root
444453
printf 'COPY C:\\REAL_AE.BAT A:\\AUTOEXEC.BAT > NUL\r\n' >> "$STAGING/AUTOEXEC.BAT"
454+
printf 'COPY C:\\REAL_CF.SYS A:\\CONFIG.SYS > NUL\r\n' >> "$STAGING/AUTOEXEC.BAT"
445455
fi
446456

447457
printf 'ECHO Done! Floppy image is ready.\r\n' >> "$STAGING/AUTOEXEC.BAT"

0 commit comments

Comments
 (0)