TempleOSCDV4.08.ISO

This commit is contained in:
Terry A. Davis authored and minexew committed 2018-09-08 21:47:25 +02:00
1 parent b632ab9a4f
commit 2d56cda5f3
258 files changed
+6973 -5476

No files matched your search

+35 -11
View File
@@ -1,25 +1,27 @@
//This is run in a $LK,"#exe",A="FF:::/Kernel/Kernel.PRJ,KCfg"${}.
U8 *kernel_cfg_options="MemInit\0HeapInit\0VarInit\0"
"NoMP\0TextMode\0DontProbe\0AutoMountIDE\0BootRescueDrv\0Help\0";
"HomeDir\0NoMP\0TextMode\0DontProbe\0AutoMountIDE\0BootRescueDrv\0Help\0";
#define CFG_MEM_INIT 0
#define CFG_HEAP_INIT 1
#define CFG_VAR_INIT 2
#define CFG_NO_MP 3
#define CFG_TEXT_MODE 4
#define CFG_DONT_PROBE 5
#define CFG_AUTO_MOUNT_IDE 6
#define CFG_BOOT_RESCUE_DRV 7
#define CFG_NUM_OPTIONS 8
#define CFG_HOME_DIR 3
#define CFG_NO_MP 4
#define CFG_TEXT_MODE 5
#define CFG_DONT_PROBE 6
#define CFG_AUTO_MOUNT_IDE 7
#define CFG_BOOT_RESCUE_DRV 8
#define CFG_NUM_OPTIONS 9
#define CFG_HELP 8
#define CFG_HELP 9
class CKernelCfg
{
U8 *dsk_cache_size_exp;
CDoc *add_dev;
U8 *boot_rescue_drv_file,*boot_rescue_drv_start;
U8 *home_dir;
Bool opts[CFG_NUM_OPTIONS];
U8 mem_init_val,heap_init_val,var_init_val,
boot_drv_let,auto_mount_ide_hd_let,auto_mount_ide_cd_let;
@@ -32,7 +34,7 @@ CDoc *KernelCfgAddDev(CKernelCfg *c)
"\n\nIn anticipation of the drives you will\n"
"define shortly, enter the drive letter\n"
"of the drive with the account directory.\n"
"\n($$PURPLE$$<ENTER>$$FG$$ for cur drv) Home Drv:";
"\n($$PURPLE$$<ENTER>$$FG$$ for cur drv) Boot Drv:";
ch=ToUpper(GetChar);
if ('A'<=ch<='Z')
c->boot_drv_let=ch;
@@ -47,12 +49,15 @@ CDoc *KernelCfgAddDev(CKernelCfg *c)
U0 KernelCfgOptions(CKernelCfg *c)
{
I64 i;
U8 *st=NULL;
U8 *st=NULL,*st2,*st3;
Bool state;
do {
Free(st);
for (i=0;i<CFG_NUM_OPTIONS;i++)
"$$PURPLE$$%13tz$$FG$$:%Z\n",i,kernel_cfg_options,c->opts[i],"ST_OFF_ON";
if (i==CFG_HOME_DIR)
"$$PURPLE$$%13tz$$FG$$:\"%s\"\n",i,kernel_cfg_options,c->home_dir;
else
"$$PURPLE$$%13tz$$FG$$:%Z\n",i,kernel_cfg_options,c->opts[i],"ST_OFF_ON";
"\nType '$$PURPLE$$Help$$FG$$' for help.\n";
st=GetStr("Option ($$PURPLE$$<ENTER>$$FG$$ when done):","");
i=LstMatch(st,kernel_cfg_options,LMF_IGNORE_CASE);
@@ -62,6 +67,7 @@ U0 KernelCfgOptions(CKernelCfg *c)
"to a val at boot.\n"
"$$PURPLE$$HeapInit$$FG$$ Initializes MAlloc() memory to a val.\n"
"$$PURPLE$$VarInit$$FG$$ Initializes glbl var memory to a val.\n"
"$$PURPLE$$HomeDir$$FG$$ Set home dir.\n"
"$$PURPLE$$NoMP$$FG$$ No multicore.\n"
"$$PURPLE$$TextMode$$FG$$ Text Mode (requires hard reboot).\n"
"$$PURPLE$$DontProbe$$FG$$ Just prompt CD/DVD ports, don't probe.\n"
@@ -84,6 +90,22 @@ U0 KernelCfgOptions(CKernelCfg *c)
if (state)
c->var_init_val=GetI64("Val (0-255):",255,0,255);
break;
case CFG_HOME_DIR:
st2=GetStr("Home Dir(\"%s\"):",c->home_dir);
if (!*st2)
st2=StrNew("::/Home");
else if (st2[1]!=':') {
st3=MStrPrint("::%s",st2);
Free(st2);
st2=st3;
}
Free(c->home_dir);
c->home_dir=st2;
if (StrCmp(c->home_dir,"::/Home"))
c->opts[i]=TRUE;
else
c->opts[i]=FALSE;
break;
case CFG_AUTO_MOUNT_IDE:
if (state) {
"First HD Drive Let:";
@@ -130,6 +152,7 @@ CKernelCfg *KernelCfgNew()
CKernelCfg *c=CAlloc(sizeof(CKernelCfg));
c->add_dev=KernelCfgAddDev(c);
c->home_dir=StrNew("::/Home");
c->dsk_cache_size_exp=GetStr(
"Disk Cache Size in Bytes,\n"
"gets rounded-up funny,\n"
@@ -143,6 +166,7 @@ U0 KernelCfgDel(CKernelCfg *c)
{
DocDel(c->add_dev);
Free(c->boot_rescue_drv_file);
Free(c->home_dir);
Free(c->dsk_cache_size_exp);
Free(c);
}