summaryrefslogtreecommitdiff
path: root/Adam/Patches
diff options
context:
space:
mode:
authorHarley Travis <harleytravis123@outlook.com>2026-06-07 21:12:13 -0500
committerHarley Travis <harleytravis123@outlook.com>2026-06-07 21:12:13 -0500
commitdc49494cc77c4a9a08f71e9e5d6ea73d2c4faae1 (patch)
treedfe62a644dda9c55c42fa3d236ed3b438e58c89a /Adam/Patches
parent8cbe5b86d39830441798fa846ccc8e771cc32389 (diff)
downloadtempleos-floppy-driver-dc49494cc77c4a9a08f71e9e5d6ea73d2c4faae1.tar.gz
Create Mount2CaseAFDC.HC
This file adds a case to Mount2's first switch statement to configure FDC BlkDevs. It is to be included after the BDT_ATAPI case.
Diffstat (limited to 'Adam/Patches')
-rw-r--r--Adam/Patches/Mount2CaseAFDC.HC74
1 files changed, 74 insertions, 0 deletions
diff --git a/Adam/Patches/Mount2CaseAFDC.HC b/Adam/Patches/Mount2CaseAFDC.HC
new file mode 100644
index 0000000..c29ba4a
--- /dev/null
+++ b/Adam/Patches/Mount2CaseAFDC.HC
@@ -0,0 +1,74 @@
+case BDT_FLOPPY:
+ do {
+ "Include $PURPLE$0x$FG$ prefix.\nI/O Port Base:\n";
+ GetS(base0_buf,STR_LEN);
+ } while (!Str2I64(base0_buf))
+ do {
+ "Drv Num:\n";
+ unit=GetChar-'0';
+ } while (0<=unit<=3)
+ "If you have a 3.5-inch high-density (1.44 Meg)\n"
+ "floppy disk, there are some default params you can use.\n"
+ "Otherwise, you will need to set the manually (Intel's datasheet\n"
+ "for the 82077AA is very useful here).\n\n"
+ "Use default params ";
+ If (YorN) {
+ defaults=TRUE;
+ } else {
+ "The following params are stored as they will be sent to the ctrlr:\n"
+ "Enter them in hex, prefixed with $PURPLE$0x$FG$.\n";
+ do {
+ "Cylinders:\n";
+ GetS(cyl_buf,STR_LEN);
+ } while (!Str2I64(cyl_buf));
+ do {
+ "Heads:\n";
+ heads=GetChar-'0';
+ } while (1<=heads<=2);
+ do {
+ "Sectors:\n";
+ GetS(spt_buf,STR_LEN);
+ } while (0<=Str2I64(spt_buf)<=255);
+ do {
+ "Sector Size (128<<X bytes):\n";
+ size=GetChar-'0'
+ } while (0<=size<=7);
+ if (size==0) {
+ do {
+ "DTL (data length):\n";
+ GetS(dtl_buf,STR_LEN);
+ } while (1<=Str2I64(dtl_buf)<=128);
+ } else {
+ dtl_buf="0xFF"; // If sect size is not 128, DTL is set to 255
+ }
+ do {
+ "Step Rate:\n";
+ GetS(srt_buf,STR_LEN);
+ } while (0<=Str2I64(srt_buf)<=15);
+ do {
+ "Head Unload Time:\n";
+ GetS(hut_buf,STR_LEN);
+ } while (0<=Str2I64(hut_buf)<=15);
+ do {
+ "Head Load Time:\n";
+ GetS(hlt_buf,STR_LEN);
+ } while (0<=Str2I64(hlt_buf)<=127);
+ do {
+ "GPL1 (normal GAP3 len):\n";
+ GetS(gpl1_buf,STR_LEN);
+ } while (1<=Str2I64(gpl1_buf)<=255);
+ do {
+ "NOTE: Setting GPL2 to 0 will disable low-level fmt!\n";
+ "GPL2 (fmt GAP3 len):\n";
+ GetS(gpl2_buf,STR_LEN);
+ } while (0<=Str2I64(gpl2_buf)<=255);
+ do {
+ "*** Data Rates ***\n"
+ "0=500 Kbit\n"
+ "1=300 Kbit\n"
+ "2=250 Kbit\n"
+ "3=1 Mbit (Not Supported)\n\n";
+ "Data Rate:\n";
+ bps=GetChar-'0'
+ } while (0<=bps<=3);
+ } \ No newline at end of file