TempleOSCD_140715.ISO

This commit is contained in:
Terry A. Davis authored and minexew committed 2018-09-08 21:46:09 +02:00
1 parent 7ef616a20e
commit 64f679eeb9
1095 files changed
+24814 -221011

No files matched your search

+27 -34
View File
@@ -8,7 +8,7 @@ U0 SetBlkDevLockFwding(CBlkDev *bdev)
case BDT_ATA:
case BDT_ATAPI:
for (i=0;i<NUM_BLKDEVS;i++) {
bdev1=&sys_blkdevs[i];
bdev1=&dsk.blkdevs[i];
if (bdev1->bd_signature==BD_SIGNATURE_VAL && bdev!=bdev1 &&
(bdev1->type==BDT_ATAPI || bdev1->type==BDT_ATA) &&
bdev1->base0==bdev->base0) {
@@ -148,10 +148,8 @@ I64 BlkDevAdd(CBlkDev *bdev,Bool one_prt,Bool make_free)
return result;
}
Bool DrvEnable(U8 drv_let,Bool val)
{//This can be used to unmount a drive or remount,
//but not mount the first time.
{//Can unmount or remount, but not mount the first time.
CPrt *p;
Bool result=FALSE;
try {
@@ -173,7 +171,7 @@ CATARep *ATARepFind(CATARep *haystack_root,I64 needle_num)
}
U0 Mount(Bool repartition=FALSE)
{
{//Mount a drive.
CBlkDev *bdev;
I64 first_prt_num,type,unit,num_hints;
U8 blks_buf[128],addr_buf[128],base0_buf[128],base1_buf[128];
@@ -190,12 +188,12 @@ U0 Mount(Bool repartition=FALSE)
"they will be lettered in sequence.\n"
"\nFirst Drive Letter ($$PURPLE$$<ENTER>$$FG$$ to exit):";
first_prt_num=ToUpper(GetChar)-'A';
NewLine;
'\n';
if (0<=first_prt_num<NUM_PRTS) {
"\t$$PURPLE$$1$$FG$$=RAM\n\t$$PURPLE$$2$$FG$$=ATA(Harddisk)\n"
"\t$$PURPLE$$3$$FG$$=ATAPI(CD-ROM)\nType:";
type=GetChar-'0';
NewLine;
'\n';
unit=0;
if (type==BDT_ATA || type==BDT_ATAPI) {
@@ -207,11 +205,11 @@ U0 Mount(Bool repartition=FALSE)
else
"Include $$PURPLE$$0x$$FG$$ prefix.\nI/O Port Base0:\n";
GetS(base0_buf,128);
} while (!A2I64(base0_buf));
if (1<=A2I64(base0_buf)<=num_hints) {
tempha=ATARepFind(root,A2I64(base0_buf));
SPrint(base0_buf,"0x%X",tempha->base0);
SPrint(base1_buf,"0x%X",tempha->base1);
} while (!Str2I64(base0_buf));
if (1<=Str2I64(base0_buf)<=num_hints) {
tempha=ATARepFind(root,Str2I64(base0_buf));
StrPrint(base0_buf,"0x%X",tempha->base0);
StrPrint(base1_buf,"0x%X",tempha->base1);
unit=tempha->unit;
} else {
if (type==BDT_ATAPI)
@@ -220,12 +218,12 @@ U0 Mount(Bool repartition=FALSE)
do {
"I/O Port Base1:\n";
GetS(base1_buf,128);
} while (!A2I64(base1_buf));
} while (!Str2I64(base1_buf));
do {
"\t$$PURPLE$$0$$FG$$=Master\n\t$$PURPLE$$1$$FG$$=Slave\nUnit:";
unit=GetChar-'0';
} while (!(0<=unit<=1));
NewLine;
'\n';
}
LinkedLstDel(root);
}
@@ -241,13 +239,13 @@ U0 Mount(Bool repartition=FALSE)
bdev->unit=unit;
if (type==BDT_RAM) {
if (!*addr_buf) StrCpy(addr_buf,"0");
bdev->RAM_dsk=A2I64(addr_buf);
bdev->max_blk=A2I64(blks_buf)-1;
bdev->RAM_dsk=Str2I64(addr_buf);
bdev->max_blk=Str2I64(blks_buf)-1;
}
if (type==BDT_ATA ||
type==BDT_ATAPI) {
bdev->base0=A2I64(base0_buf);
bdev->base1=A2I64(base1_buf);
bdev->base0=Str2I64(base0_buf);
bdev->base1=Str2I64(base1_buf);
}
add=TRUE;
if (type==BDT_ATA && repartition) {
@@ -268,18 +266,14 @@ U0 Mount(Bool repartition=FALSE)
} while (0<=first_prt_num<NUM_PRTS);
}
I64 SysPmtI64()
I64 SysGetI64()
{
U8 st[136];
StrCpy(st,"0x");
GetS(st+2,134,FALSE);
if (!st[2])
return 0;
else
return A2I64(st);
GetS(st,136,FALSE);
return Str2I64(st,16);
}
Bool PmtBaseUnit(CBlkDev *bdev)
Bool GetBaseUnit(CBlkDev *bdev)
{
I64 ch;
Bool probe;
@@ -299,7 +293,7 @@ Bool PmtBaseUnit(CBlkDev *bdev)
"'IDE', 'ATA' or 'SATA'.\n"
"\n\nEnter 4-digit hex I/O Port number.\n"
"CD-ROM I/O Port Base0: 0x";
bdev->base0=SysPmtI64;
bdev->base0=SysGetI64;
bdev->base1=0;
bdev->unit =0;
if (bdev->base0) {
@@ -308,10 +302,10 @@ Bool PmtBaseUnit(CBlkDev *bdev)
while (!('0'<=ch<='1'));
'' ch;
bdev->unit=ch-'0';
cdrom_boot_is_good=BootCdProbe(bdev);
dsk.cdrom_boot_is_good=BootCdProbe(bdev);
return TRUE;
} else {
cdrom_boot_is_good=FALSE;
dsk.cdrom_boot_is_good=FALSE;
return FALSE;
}
}
@@ -322,11 +316,11 @@ U0 BlkDevsInitAll()
{
CBlkDev *bdev;
I64 i;
sys_blkdevs=CAlloc(sizeof(CBlkDev)*NUM_BLKDEVS);
sys_prts=CAlloc(sizeof(CPrt)*NUM_PRTS);
dsk.blkdevs=CAlloc(sizeof(CBlkDev)*NUM_BLKDEVS);
dsk.prts=CAlloc(sizeof(CPrt)*NUM_PRTS);
for (i=0;i<NUM_PRTS;i++)
drv_to_prt[i]=&sys_prts[i];
sys_raw_col=0;
dsk.drv_to_prt[i]=&dsk.prts[i];
text.raw_col=0;
#exe {
if (kernel_cfg->opts[CFG_AUTO_MOUNT_IDE])
StreamPrint("AutoMountIDE;");
@@ -336,4 +330,3 @@ U0 BlkDevsInitAll()
};
PrtRep;
}