diff --git a/README.md b/README.md index be8ef76f..024d0af1 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,11 @@ ![Website](https://img.shields.io/website?down_color=lightgray&down_message=offline&style=flat-square&up_color=green&up_message=online&url=https%3A%2F%2Fzenithos.org) -# ZenithOS +# ZealOS -The Zenith Operating System is a modernized, professional fork of the 64-bit Temple Operating System. Guiding principles of development include transparency, full user control, and adherence to public-domain/open-source implementations. +The Zeal Operating System is a modernized, professional fork of the 64-bit Temple Operating System. Guiding principles of development include transparency, full user control, and adherence to public-domain/open-source implementations. ![](/screenshots/screenshot2.png) -ZenithOS strives to be simple, documented, and require as little of a knowledge gap as possible. One person should be able to comprehend the entire system in at least a semi-detailed way within a few days of study. +ZealOS strives to be simple, documented, and require as little of a knowledge gap as possible. One person should be able to comprehend the entire system in at least a semi-detailed way within a few days of study. Simplify, don't complicate; make accessible, don't obfuscate. > The CIA encourages code obfuscation. They make it more complicated than necessary.\ @@ -13,11 +13,7 @@ Simplify, don't complicate; make accessible, don't obfuscate. Features in development include: - Fully-functional AHCI support - - ~~VBE support~~ 32-bit color VBE graphics - - A new GUI framework in 32-bit color - - CosmicGL renderer - - Compiler optimizations for speed improvements - - SSE2+ instruction support in compiler and assembler + - 32-bit color VBE graphics - Network card drivers and a networking stack @@ -38,19 +34,21 @@ Changes include: - For running in a VM: Intel VT-x/AMD-V acceleration enabled in your BIOS settings. (Required to virtualize any 64-bit operating system properly.) - Working knowledge of the C programming language. -Every commit contains a "Zenith-latest-YYYY-MM-DD-HH_MM_SS.iso" in the root of master, which is a timestamped ISO build of that commit. +Every commit contains a "ZealOS-YYYY-MM-DD-HH_MM_SS.iso" in the root of master, which is a timestamped ISO build of that commit. This is basically a read-only repository. Everything happens inside the OS, as intended by Terry. After you've installed the latest release in a VM, you can make changes to the source. Once you've made your changes, you can make copies of the relevant files and put them into a folder, along with some kind of notes as to what you've done either as a DolDoc document or in the pull request later. You can then make a RedSea ISO file out of that folder by running `RedSeaISO("MyChanges.ISO", "/Home/Folder");`. Export the contents of the VM hard drive in whatever OS-specific way you have to (there are scripts in the root of the repo), grab the ISO, and send it; a pull request attachment with the zipped ISO would work fine. ## Background -In around November of 2019, [VoidNV](https://github.com/VoidNV) decided to continue Terry's work in a direction that would make it a viable operating system while still keeping the innovative and divine-intellect ideas and design strategies intact. +In around November of 2019, [Z3N1THM4N](https://github.com/Z3N1THM4N) decided to create [ZenithOS](https://github.com/ZenithOS/ZenithOS) to continue Terry's work in a direction that would make it a viable operating system while still keeping the innovative and divine-intellect ideas and design strategies intact. -At first, development occurred exclusively inside a VM and ISOs were occasionally generated as official releases. This was not a good approach, as things broke and there was no way of telling which changes caused what, so it was scrapped and restarted from scratch.\ -Releases of the "old" Zenith are currently archived on the `mega.nz` website: +At first, development occurred exclusively inside a VM and ISOs were occasionally generated as official releases. It was scrapped and restarted from scratch.\ +Releases of the "old" ZenithOS are currently archived on the `mega.nz` website: - [Previous Releases](https://mega.nz/#F!ZIEGmSRQ!qvL6Wk6THzE-dazkfT6N3Q) -The repository was removed in August of 2020, and is reuploaded here for preservation and future work. The latest archived [front page](https://web.archive.org/web/20200811190005/https://github.com/VoidNV/ZenithOS/), [master.zip](https://web.archive.org/web/20200811190054/https://codeload.github.com/VoidNV/ZenithOS/zip/master), and [related links](https://web.archive.org/web/*/https://github.com/VoidNV/ZenithOS/*) can be found on archive.org. +The repository was removed in August of 2020, and reuploaded to [ZenithOS](https://github.com/ZenithOS/ZenithOS). The latest archived [front page](https://web.archive.org/web/20200811190005/https://github.com/VoidNV/ZenithOS/), [master.zip](https://web.archive.org/web/20200811190054/https://codeload.github.com/VoidNV/ZenithOS/zip/master), and [related links](https://web.archive.org/web/*/https://github.com/VoidNV/ZenithOS/*) can be found on archive.org. + +In July of 2021, ZealOS was forked from ZenithOS. ## Screenshots diff --git a/Zenith-latest-2021-07-01-06_22_17.iso b/ZealOS-2021-07-01-19_45_21.iso old mode 100644 new mode 100755 similarity index 98% rename from Zenith-latest-2021-07-01-06_22_17.iso rename to ZealOS-2021-07-01-19_45_21.iso index 6ab93034..f7e00c67 Binary files a/Zenith-latest-2021-07-01-06_22_17.iso and b/ZealOS-2021-07-01-19_45_21.iso differ diff --git a/just_mnt.sh b/just_mnt.sh new file mode 100755 index 00000000..f9bf777d --- /dev/null +++ b/just_mnt.sh @@ -0,0 +1,8 @@ +#!/bin/bash +echo "mounting..." +sudo modprobe nbd +sudo qemu-nbd -c dev/nbd0 ~/VirtualBox\ VMs/ZealOS/ZealOS.vdi" #Replace with path to disk +sudo partprobe /dev/nbd0 +sudo mount /dev/nbd0p1 /mnt +echo "mounted .vdi" + diff --git a/just_umnt.sh b/just_umnt.sh new file mode 100755 index 00000000..3edb80c8 --- /dev/null +++ b/just_umnt.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +echo "unmounting..." +sudo umount /mnt +sudo qemu-nbd -d /dev/nbd0 +echo "unmounted .vdi" +echo "not copying/updating ISO." +#echo "set perms, update ISO." +#sudo chown -R $USER:$USER src/* +#rm ZealOS-* +#mv src/Tmp/MyDistro.ISO.C ./ZealOS-$(date +%Y-%m-%d-%H_%M_%S).iso +echo "finished." diff --git a/mnt.sh b/mnt.sh index a7644626..fa0ea285 100755 --- a/mnt.sh +++ b/mnt.sh @@ -1,13 +1,24 @@ #!/bin/bash +echo "mounting..." sudo modprobe nbd -sudo qemu-nbd -c dev/nbd0 "~/VirtualBox\ VMs/ZenithOS/ZenithOS.vmdk" #Replace with path to disk +sudo qemu-nbd -c dev/nbd0 ~/VirtualBox\ VMs/ZealOS/ZealOS.vdi #Replace with path to disk +sudo partprobe /dev/nbd0 sudo mount /dev/nbd0p1 /mnt +echo "mounted .vdi" +echo "removing src/ files" rm -rf src/* +echo "copying src/ files from root of mounted .vdi" sudo cp -r /mnt/* src/ +echo "files copied" +echo "unmounting..." sudo umount /mnt sudo qemu-nbd -d /dev/nbd0 +echo "unmounted .vdi" +echo "set perms, update ISO." sudo chown -R $USER:$USER src/* -rm Zenith-latest* -mv src/Tmp/MyDistro.ISO.C ./Zenith-latest-$(date +%Y-%m-%d-%H_%M_%S).iso +rm ZealOS-* +mv src/Tmp/MyDistro.ISO.C ./ZealOS-$(date +%Y-%m-%d-%H_%M_%S).iso +echo "finished." +git status diff --git a/src/Apps/GrModels/BallGen.CC b/src/Apps/GrModels/BallGen.CC index 7947d106..00bd53d6 100755 --- a/src/Apps/GrModels/BallGen.CC +++ b/src/Apps/GrModels/BallGen.CC @@ -62,7 +62,7 @@ I64 AddTri(BallDefineStruct *, I64 c, I64 n0, I64 n1, I64 n2) U8 *Ball2CSprite() { -//See $LK,"::/Zenith/Gr/GrSpritePlot.CC",A="FL:::/Zenith/Gr/GrSpritePlot.CC,1"$ for how CSprite are stored. +//See $LK,"::/System/Gr/GrSpritePlot.CC",A="FL:::/System/Gr/GrSpritePlot.CC,1"$ for how CSprite are stored. U8 *res = MAlloc(sizeof(CSpriteMeshU8s) + b->vertex_count * sizeof(CD3I32) + b->tri_count * sizeof(CMeshTri) + sprite_elem_base_sizes[SPT_END]), diff --git a/src/Apps/GrModels/ManGen.CC b/src/Apps/GrModels/ManGen.CC index e0684853..7103a638 100755 --- a/src/Apps/GrModels/ManGen.CC +++ b/src/Apps/GrModels/ManGen.CC @@ -187,7 +187,7 @@ U0 AddBox(ManDefineStruct *md, I64 c, U8 *Man2CSprite() { -//See $LK,"::/Zenith/Gr/GrSpritePlot.CC",A="FL:::/Zenith/Gr/GrSpritePlot.CC,1"$ for how CSprite are stored. +//See $LK,"::/System/Gr/GrSpritePlot.CC",A="FL:::/System/Gr/GrSpritePlot.CC,1"$ for how CSprite are stored. U8 *res = MAlloc(sizeof(CSpriteMeshU8s) + m->vertex_count * sizeof(CD3I32) + m->tri_count * sizeof(CMeshTri) + sprite_elem_base_sizes[SPT_END]), *dst = res; diff --git a/src/Apps/KeepAway/KeepAway.CC b/src/Apps/KeepAway/KeepAway.CC index 7685515e..ba5fce31 100755 --- a/src/Apps/KeepAway/KeepAway.CC +++ b/src/Apps/KeepAway/KeepAway.CC @@ -217,8 +217,8 @@ Frame imgs[LAST_STOPPED_DRIBBLING+1] = { {{$IB,"<22>",BI=22$, $IB,"<23>",BI=23$}, DRIBBLE_T / STOPPED_DRIBBLING_IMGS_NUM}, }; -RegDefault("ZenithOS/KeepAway", "I64 best_score0=0,best_score1=9999;\n"); -RegExe("ZenithOS/KeepAway"); +RegDefault("ZealOS/KeepAway", "I64 best_score0=0,best_score1=9999;\n"); +RegExe("ZealOS/KeepAway"); F64 game_t_end, foul_t_end; I64 score0, score1; @@ -436,7 +436,7 @@ U0 Shoot(Obj *o) U0 MyNoise(I64 mS, F64 min_ona, F64 max_ona) {//Make white noise for given number of mS. -// See $LK+PU,"Noise",A="FF:::/Zenith/ZSound.CC,*Noise("$. On bare-metal, Spawn() hogs CPU. +// See $LK+PU,"Noise",A="FF:::/System/ZSound.CC,*Noise("$. On bare-metal, Spawn() hogs CPU. CSoundEffectFrame *ns; if (mS > 0) @@ -798,7 +798,7 @@ ka_done: //Don't goto out of try PutExcept; SettingsPop; MenuPop; - RegWrite("ZenithOS/KeepAway", "I64 best_score0=%d,best_score1=%d;\n", best_score0, best_score1); + RegWrite("ZealOS/KeepAway", "I64 best_score0=%d,best_score1=%d;\n", best_score0, best_score1); } Êp¨­ÿÿÿûÿÿÿûÿÿÿ­ÿÿÿûÿÿÿ·ÿÿÿûÿÿÿûÿÿÿ·ÿÿÿûÿÿÿ­ÿÿÿûÿÿÿ­ÿÿÿ·ÿÿÿûÿÿÿ·ÿÿÿ ·ÿÿÿûÿÿÿöÿÿÿ·ÿÿÿûÿÿÿ diff --git a/src/Apps/Strut/Strut.CC b/src/Apps/Strut/Strut.CC index f99e3c3e..97095836 100755 --- a/src/Apps/Strut/Strut.CC +++ b/src/Apps/Strut/Strut.CC @@ -371,7 +371,7 @@ U0 CleanUp() U0 MyNoise(I64 mS, F64 min_ona, F64 max_ona) {//Make white noise for given number of mS. -// See $LK+PU,"Noise",A="FF:::/Zenith/ZSound.CC,*Noise("$. On bare-metal, Spawn() hogs CPU. +// See $LK+PU,"Noise",A="FF:::/System/ZSound.CC,*Noise("$. On bare-metal, Spawn() hogs CPU. CSoundEffectFrame *ns; if (mS > 0) diff --git a/src/Apps/Titanium/Titanium.CC b/src/Apps/Titanium/Titanium.CC index 7a5e9fc8..715a52d4 100755 --- a/src/Apps/Titanium/Titanium.CC +++ b/src/Apps/Titanium/Titanium.CC @@ -1,5 +1,5 @@ -RegDefault("ZenithOS/Titanium","I64 best_score=0;\n"); -RegExe("ZenithOS/Titanium"); +RegDefault("ZealOS/Titanium","I64 best_score=0;\n"); +RegExe("ZealOS/Titanium"); #define MAP_HEIGHT 4096 @@ -1069,7 +1069,7 @@ to_done: PutExcept; SettingsPop; MenuPop; - RegWrite("ZenithOS/Titanium", "I64 best_score=%d;\n", best_score); + RegWrite("ZealOS/Titanium", "I64 best_score=%d;\n", best_score); } RóÿÿÿÏÿÿÿ2ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ diff --git a/src/Apps/ToTheFront/TTFVis.CC b/src/Apps/ToTheFront/TTFVis.CC index f7681d22..19d36909 100755 --- a/src/Apps/ToTheFront/TTFVis.CC +++ b/src/Apps/ToTheFront/TTFVis.CC @@ -156,7 +156,7 @@ The compiler doesn't go out of it's way to know if something is const.;-) This just compiles with the val at compile time, an advantage of just-in-time over -AOT binaries. ZenithOS has a limited +AOT binaries. ZealOS has a limited stack size, so don't get in the habit. $LK,"MAlloc",A="MN:MAlloc"$() would probably be the better choice. */ diff --git a/src/Apps/X-Caliber/X-Caliber.CC b/src/Apps/X-Caliber/X-Caliber.CC index f2d180e6..cf4a9a52 100755 --- a/src/Apps/X-Caliber/X-Caliber.CC +++ b/src/Apps/X-Caliber/X-Caliber.CC @@ -1,10 +1,10 @@ #define XMESSAGEF_ANTISPIN 0 #define XMESSAGEF_SOLAR_STORM 1 -RegDefault("ZenithOS/XCaliber", +RegDefault("ZealOS/XCaliber", "I64 best_score=0;\n" "I64 message_flags=0;\n"); -RegExe("ZenithOS/XCaliber"); +RegExe("ZealOS/XCaliber"); #define MT_HUMAN_SHIP 0 #define MT_ENEMY_SHIP 1 @@ -1029,7 +1029,7 @@ U0 MyDerivative(CMathODE *ode, F64, COrder2D3 *, COrder2D3 *) U0 MyNoise(I64 mS, F64 min_ona, F64 max_ona) {//Make white noise for given number of mS. -// See $LK+PU,"Noise",A="FF:::/Zenith/ZSound.CC,*Noise("$. On bare-metal, Spawn() hogs CPU. +// See $LK+PU,"Noise",A="FF:::/System/ZSound.CC,*Noise("$. On bare-metal, Spawn() hogs CPU. CSoundEffectFrame *ns; if (mS > 0) @@ -1738,7 +1738,7 @@ U0 XCaliber() SettingsPop; CtrlPanelDel(cp); MenuPop; - RegWrite("ZenithOS/XCaliber", + RegWrite("ZealOS/XCaliber", "I64 best_score=%d;\n" "I64 message_flags=%d;\n", best_score, message_flags); } diff --git a/src/Compiler/AsmInit.CC b/src/Compiler/AsmInit.CC index 647307df..e480a12f 100755 --- a/src/Compiler/AsmInit.CC +++ b/src/Compiler/AsmInit.CC @@ -225,5 +225,5 @@ U0 AsmHashLoad() HashAdd(tmpc, cmp.asm_hash); cmp.internal_types[tmpc->raw_type] = tmpc; } - zenith_task->hash_table->next = cmp.asm_hash; + sys_task->hash_table->next = cmp.asm_hash; } diff --git a/src/Compiler/CExcept.CC b/src/Compiler/CExcept.CC index 99fd18a1..df823d47 100755 --- a/src/Compiler/CExcept.CC +++ b/src/Compiler/CExcept.CC @@ -66,7 +66,7 @@ U0 LexPutPos(CCompCtrl *cc) else { PutFileLink(cc->lex_include_stack->full_name,, cc->lex_include_stack->line_num); - ZenithErr("%s,%d\n", cc->lex_include_stack->full_name, cc->lex_include_stack->line_num); + SysErr("%s,%d\n", cc->lex_include_stack->full_name, cc->lex_include_stack->line_num); '' CH_SPACE; } LexPutLine(cc, cc->lex_include_stack->line_start); @@ -84,7 +84,7 @@ U0 LexWarn(CCompCtrl *cc, U8 *str=NULL) else { "$$LK,\"%s\"$$\n", cc->htc.fun->src_link; - ZenithErr("%s\n", cc->htc.fun->src_link); + SysErr("%s\n", cc->htc.fun->src_link); } } else @@ -94,7 +94,7 @@ U0 LexWarn(CCompCtrl *cc, U8 *str=NULL) U0 LexExcept(CCompCtrl *cc, U8 *str=NULL) {//Print error message, $LK,"LexPutPos",A="MN:LexPutPos"$() and throw exception. - if (!Bt(&sys_run_level, RLf_ZENITH_SERVER)) + if (!Bt(&sys_run_level, RLf_ZEAL_SERVER)) { Raw(ON); "Note: Still in boot phase.\n"; @@ -102,11 +102,11 @@ U0 LexExcept(CCompCtrl *cc, U8 *str=NULL) if (str) PrintErr(str); if (!IsRaw) - ZenithErr("Task:%08X %s\n", Fs,str); + SysErr("Task:%08X %s\n", Fs,str); LexPutPos(cc); cc->error_count++; FlushMessages; - if (!Bt(&sys_run_level, RLf_ZENITH_SERVER)) + if (!Bt(&sys_run_level, RLf_ZEAL_SERVER)) Debug("Type \"Fix;\""); throw('Compiler'); } diff --git a/src/Compiler/OpCodes.DD b/src/Compiler/OpCodes.DD index 1bdda5b3..89a91dfa 100755 --- a/src/Compiler/OpCodes.DD +++ b/src/Compiler/OpCodes.DD @@ -9,7 +9,7 @@ '*'= IEF_STI_LIKE Floating STI-like for UAsm. '$$'= IEF_ENDING_ZERO Ending zero for ENTER. -$FG,4$Note:$FG$ ZenithOS uses nonstandard opcodes. +$FG,4$Note:$FG$ ZealOS uses nonstandard opcodes. Asm is kind-of a bonus and I made changes to make the assembler simpler. For opcodes which can have different numbers of diff --git a/src/Compiler/ParseExp.CC b/src/Compiler/ParseExp.CC index c190b250..b9dd8e1f 100755 --- a/src/Compiler/ParseExp.CC +++ b/src/Compiler/ParseExp.CC @@ -843,7 +843,7 @@ I64 ParseUnaryTerm(CCompCtrl *cc, CParseStack *ps, CMemberList **_local_var, CAr case '(': if (Lex(cc) == TK_IDENT && cc->hash_entry && cc->hash_entry->type & (HTT_CLASS | HTT_INTERNAL_TYPE)) - LexExcept(cc, "Use ZenithOS postfix typecasting at "); + LexExcept(cc, "Use ZealOS postfix typecasting at "); else { if (PREC_TERM > *max_prec) diff --git a/src/Demo/AcctExample/HomeSys.CC b/src/Demo/AcctExample/HomeSys.CC index 338c6a86..363b1a03 100755 --- a/src/Demo/AcctExample/HomeSys.CC +++ b/src/Demo/AcctExample/HomeSys.CC @@ -45,4 +45,4 @@ if (DriveIsWritable(':')) StartUpTasks; -"\nZenithOS V%5.3f\t%D %T\n\n", sys_os_version, sys_compile_time, sys_compile_time; +"\nZealOS V%5.3f\t%D %T\n\n", sys_os_version, sys_compile_time, sys_compile_time; diff --git a/src/Demo/AcctExample/MakeHome.CC b/src/Demo/AcctExample/MakeHome.CC index f4d9095d..2f44b766 100755 --- a/src/Demo/AcctExample/MakeHome.CC +++ b/src/Demo/AcctExample/MakeHome.CC @@ -3,8 +3,8 @@ Cd(__DIR__);; //If these are not present in /Home, it uses the version in the root dir. You //can make your own, modified, version of these files in your /Home directory. #include "~/HomeLocalize" -#include "/Zenith/Boot/MakeBoot" -#include "/Zenith/Utils/MakeUtils" +#include "/System/Boot/MakeBoot" +#include "/System/Utils/MakeUtils" #include "~/HomeWrappers" MapFileLoad("::/Kernel/Kernel"); MapFileLoad("::/Compiler/Compiler"); diff --git a/src/Demo/AcctExample/PersonalMenu.DD b/src/Demo/AcctExample/PersonalMenu.DD index d08c22f5..62926372 100755 Binary files a/src/Demo/AcctExample/PersonalMenu.DD and b/src/Demo/AcctExample/PersonalMenu.DD differ diff --git a/src/Demo/AcctExample/PersonalNotes.DD b/src/Demo/AcctExample/PersonalNotes.DD index fdaf4e8f..e1ba9b04 100755 --- a/src/Demo/AcctExample/PersonalNotes.DD +++ b/src/Demo/AcctExample/PersonalNotes.DD @@ -37,18 +37,18 @@ $WW,1$$FG,5$$TX+CX,"TODO"$$FG$ * $MA-X+PU,"64-Bit Device Memory",LM="F(\"mem64_ptr\");View;"$ is not implemented. -* Investigate why packet loss $LK,"Training Sleep(1)",A="FF:::/Zenith/Training.CC,Sleep(1)"$. +* Investigate why packet loss $LK,"Training Sleep(1)",A="FF:::/System/Training.CC,Sleep(1)"$. * Add AVL or red/black binary tree library support. We have fixed-size stack. Auto-balancing binary tree is very needed. I've done everything myself. I don't want to ruin a perfect record. I'm in no hurry. -* $LK,"SpriteEd",A="FI:::/Zenith/Gr/SpriteEd.CC"$ shift pts, Ctrl pt for ellipse/polygon w,h is off when rotated. +* $LK,"SpriteEd",A="FI:::/System/Gr/SpriteEd.CC"$ shift pts, Ctrl pt for ellipse/polygon w,h is off when rotated. -* God said this is bad. $LK,"FL:::/Zenith/DolDoc/DocFind.CC,41"$ +* God said this is bad. $LK,"FL:::/System/DolDoc/DocFind.CC,41"$ * Backward is broken? * $LK,"Find",A="MN:Find"$() search sprite text? -* Cannot include ':' in $LK,"Document Links",A="FF:::/Zenith/DolDoc/DocLink.CC,AD"$ search string. +* Cannot include ':' in $LK,"Document Links",A="FF:::/System/DolDoc/DocLink.CC,AD"$ search string. * $$DA fixed width string: or permanently shortens. * 11/19/16 editor took long time after copying old testament onto clip and exiting. @@ -61,9 +61,9 @@ $WW,1$$FG,5$$TX+CX,"TODO"$$FG$ * $LK,"DOCT_HEX_ED",A="MN:DOCT_HEX_ED"$ with odd size, ASCII cannot be edited. -* $LK,"FL:::/Zenith/Gr/SpriteEd.CC,789"$ Resize bitmap? +* $LK,"FL:::/System/Gr/SpriteEd.CC,789"$ Resize bitmap? -* $LK,"DOCEF_REMALLOC_DATA",A="FF:::/Zenith/DolDoc/DocChar.CC,DOCEF_REMALLOC_DATA"$ HexEdit Remalloc. +* $LK,"DOCEF_REMALLOC_DATA",A="FF:::/System/DolDoc/DocChar.CC,DOCEF_REMALLOC_DATA"$ HexEdit Remalloc. * $LK,"DOCF_DBL_DOLLARS",A="MN:DOCF_DBL_DOLLARS"$ in $LK,"Reindention",A="MN:EdCodeTools2"$. @@ -122,13 +122,13 @@ $FG,5$$TX+CX,"TODO? Meh"$$FG$ * $LK,"Mem32DevAlloc",A="MN:Mem32DevAlloc"$() is broken. Devices should be in free spot of E820 report. -* $LK,"SpriteEd",A="FI:::/Zenith/Gr/SpriteEd.CC"$: Strip $LK,"SPT_SHIFT",A="MN:SPT_SHIFT"$ origin cmds? +* $LK,"SpriteEd",A="FI:::/System/Gr/SpriteEd.CC"$: Strip $LK,"SPT_SHIFT",A="MN:SPT_SHIFT"$ origin cmds? * Clean-up ASCII #127 delete char? (No. Maybe, we want a new usage for 127 in future centuries.) * Compiler: Exceptions don't free $LK,"CCompCtrl",A="MN:CCompCtrl"$ stuff. -* $LK,"::/Zenith/DolDoc/DocHighlight.CC"$ for code comments at top of documents. +* $LK,"::/System/DolDoc/DocHighlight.CC"$ for code comments at top of documents. * Unhandled exception messages from MP's get overwritten by WinMgr. @@ -145,7 +145,7 @@ $FG,5$$TX+CX,"TODO? Meh"$$FG$ $FG,5$$TX+CX,"TODO: Too Hard, or Not Worth Doing."$$FG$ * AutoComplete/$LK,"Man",A="MN:Man"$() Jmp for user code. -* $LK,"Bible sized nodes",A="FF:::/Zenith/DolDoc/DocRecalc.CC,->tag+i"$ +* $LK,"Bible sized nodes",A="FF:::/System/DolDoc/DocRecalc.CC,->tag+i"$ * $LK,"FileMgr",A="MN:FileMgr"$() is bad with lots of files. @@ -171,7 +171,7 @@ $ID,5$$HL,1$U0 Main() $ID,-5$$HL,0$ * Compiler: Get rid of $LK,"0x20000",A="FF:::/Compiler/CMain.CC,0x20000"$ limit. -* $LK,"GrFloodFillRay",A="MN:GrFloodFillRay"$: Get rid of $LK,"0x80000",A="FF:::/Zenith/Gr/GrPrimatives.CC,0x80000"$ limit. +* $LK,"GrFloodFillRay",A="MN:GrFloodFillRay"$: Get rid of $LK,"0x80000",A="FF:::/System/Gr/GrPrimatives.CC,0x80000"$ limit. $FG,5$$TX+CX,"Bugs"$$FG$ @@ -179,7 +179,7 @@ $FG,5$$TX+CX,"Bugs"$$FG$ * 1/12/16 make RAM drive 2288 blks, $FG,2$CopyTree("C:/Home","B:/Home"); $FG$ Disk runs-out of space and hangs instead of reporting errors. -* Bug introduced around 11/1/15. Changed $LK,"::/Kernel/Sched.CC"$ and now $LK,"WinToTop",A="MN:WinToTop"$ is called on Zenith task at start-up, sometimes. Might be user's fault because of bad keys pressed during VMware power-on init. Might be fixed by $LK,"ACf_INIT_IN_PROGRESS",A="MN:ACf_INIT_IN_PROGRESS"$. +* Bug introduced around 11/1/15. Changed $LK,"::/Kernel/Sched.CC"$ and now $LK,"WinToTop",A="MN:WinToTop"$ is called on System task at start-up, sometimes. Might be user's fault because of bad keys pressed during VMware power-on init. Might be fixed by $LK,"ACf_INIT_IN_PROGRESS",A="MN:ACf_INIT_IN_PROGRESS"$. * 1/12/16 $LK,"ATARepEntry",A="MN:ATARepEntry"$ shows corrupted bttns. Weird. Perhaps, my imagination. @@ -232,7 +232,7 @@ $ID,-5$ * Race condition in $LK,"::/Demo/Games/FlatTops.CC"$ torpedo. -* Links to self document if empty file name? $LK,"Document Links",A="FF:::/Zenith/DolDoc/DocLink.CC,AD"$ +* Links to self document if empty file name? $LK,"Document Links",A="FF:::/System/DolDoc/DocLink.CC,AD"$ * $LK,"FUF_RECURSE",A="MN:FUF_RECURSE"$ would be nice if capital "+R". @@ -259,7 +259,7 @@ $FG,5$$TX+CX,"Committee Needed"$$FG$ * Make so just CdRom; command to copy entire disk to ::/CdRom directory? -* $LK,"MP DepthBuf",A="FF:::/Zenith/Gr/SpriteMesh.CC,dc->depth_buf=e->"$ is a kludge because of dc->depth_buf=NULL in various graphics routines. +* $LK,"MP DepthBuf",A="FF:::/System/Gr/SpriteMesh.CC,dc->depth_buf=e->"$ is a kludge because of dc->depth_buf=NULL in various graphics routines. * Improve editor undo, add redo. @@ -276,8 +276,8 @@ $FG,5$$TX+CX,"Committee Needed"$$FG$ * $LK,"GrPutChar3",A="MN:GrPutChar3"$() with depth buf? -* Eliminate? $LK,"::/Zenith/Ctrls/CtrlsA.CC"$? -* Eliminate? $LK,"::/Zenith/ZMathODE.CC"$? +* Eliminate? $LK,"::/System/Ctrls/CtrlsA.CC"$? +* Eliminate? $LK,"::/System/ZMathODE.CC"$? * Eliminate? $LK,"Complex",A="MN:Complex"$? * Eliminate? $LK,"CDC",A="MN:CDC"$.brush? * Eliminate? $LK,"Mat4x4MulXYZ",A="MN:Mat4x4MulXYZ"$() change to 3x3? @@ -307,7 +307,7 @@ $FG,5$$TX+CX,"Committee Needed"$$FG$ * I use fixed-point in $LK,"Circle",A="MN:Circle"$(), $LK,"Ellipse",A="MN:Ellipse"$(), $LK,"Mat4x4MulXYZ",A="MN:Mat4x4MulXYZ"$(), $LK,"Mat4x4MulMat4x4New",A="MN:Mat4x4MulMat4x4New"$() and others. God says I might want to change to float. $LK,"::/Demo/Lectures/FixedPoint.CC"$ $LK,"::/Demo/Lectures/FixedPointAdvanced.CC"$. -* Note: We will never put multiple $LK,"Keyboard Tables",A="FI:::/Kernel/SerialDev/Keyboard.CC"$. Each country must make their own version of ZenithOS. The $LK,"Intel Factory ROM",A="FF:::/Doc/Demands.DD,English"$ will have just English. Our $LK,"Charter",A="FI:::/Doc/Charter.DD"$ bans multiple country or architectures in the same version. +* Note: We will never put multiple $LK,"Keyboard Tables",A="FI:::/Kernel/SerialDev/Keyboard.CC"$. Each country must make their own version of ZealOS. The $LK,"Intel Factory ROM",A="FF:::/Doc/Demands.DD,English"$ will have just English. Our $LK,"Charter",A="FI:::/Doc/Charter.DD"$ bans multiple country or architectures in the same version. * 12 border chars in screen font codes 0x02-0x0D. $LK,"TextBorder",A="MN:TextBorder"$() $LK,"RawDr",A="MN:RawDr"$() $LK,"::/Demo/Games/CharDemo.CC"$. LineFeed shows-up in $FG,2$$FG$ PersonalMenu. @@ -365,14 +365,14 @@ $ID,5$$$=-CTASK_NEG_OFFSET offset(CTask.addr)==0 Spawn(): CAlloc() TaskDel(): Free() -CSysFixedArea.Zenith +CSysFixedArea.Zeal Looks like task_flags,locked_flags cause problems with neg offset. $ID,-5$ * Make a game, S.E.T.I., with radio telescope array. Put God on air. $FG,5$$TX+CX,"Test"$$FG$ -* $LK,"SpriteBitMap",A="FI:::/Zenith/Gr/SpriteBitMap.CC"$: Grabscroll? +* $LK,"SpriteBitMap",A="FI:::/System/Gr/SpriteBitMap.CC"$: Grabscroll? * Return ress for $LK,"GrBlot",A="MN:GrBlot"$, $LK,"GrRect",A="MN:GrRect"$, $LK,"GrPutChar",A="MN:GrPutChar"$? * Collision counts for $LK,"GrBlot",A="MN:GrBlot"$, $LK,"GrRect",A="MN:GrRect"$, $LK,"GrPutChar",A="MN:GrPutChar"$? diff --git a/src/Demo/AcctExample/Registry.CC b/src/Demo/AcctExample/Registry.CC index f1aeda39..669947bc 100755 --- a/src/Demo/AcctExample/Registry.CC +++ b/src/Demo/AcctExample/Registry.CC @@ -1,4 +1,4 @@ -$TR-UL,"Zenith"$ +$TR-UL,"Zeal"$ $ID,2$$TR,"SysMessageFlags"$ $ID,2$sys_message_flags[0]=0xFF; $ID,-2$$TR,"SysRegVer"$ @@ -21,7 +21,7 @@ HashPublic("INS_REG_MACHINE_NUM",HTT_DEFINE_STR); "InsReg:%s:%d\n",INS_REG_PERSONAL_INITIALS,INS_REG_MACHINE_NUM; #help_index "" -$ID,-2$$ID,-2$$TR-UL,"ZenithOS"$ +$ID,-2$$ID,-2$$TR-UL,"ZealOS"$ $ID,2$$TR,"EagleDive"$ $ID,2$F64 best_score=147.6932; $ID,-2$$TR,"DiningStars"$ @@ -64,7 +64,7 @@ progress3_tf=0.000;progress4_tf=113.560; $ID,-2$$TR,"TempleTetris"$ $ID,2$I64 hiscore=0; $ID,-2$$ID,-2$$TR,"Once"$ -$ID,2$$TR,"Zenith"$ +$ID,2$$TR,"Zeal"$ $ID,2$$ID,-2$$TR,"User"$ $ID,2$$ID,-2$$ID,-2$$TR,"DemoCompany"$ $ID,2$$TR,"Game1"$ diff --git a/src/Demo/AcctExample/TOS/TOSDistro.CC b/src/Demo/AcctExample/TOS/TOSDistro.CC index a031832e..b6a54ff0 100755 --- a/src/Demo/AcctExample/TOS/TOSDistro.CC +++ b/src/Demo/AcctExample/TOS/TOSDistro.CC @@ -114,14 +114,14 @@ U0 DebugDistroFilePrep() Copy("C:/Home/Sup1/Sup1Distro/DebugStartOS.CC", "A:/StartOS.CC"); - DirMake("A:/Zenith"); - Copy("C:/Home/Sup1/Sup1Distro/DebugMakeZenith.CC", "A:/Zenith/MakeZenith.CC"); - Copy("C:/Home/Sup1/Sup1Distro/DebugMount.CC", "A:/Zenith"); - Copy("C:/Zenith/AExts.CC", "A:/Zenith"); - Copy("C:/Zenith/AMath.CC", "A:/Zenith"); - Copy("C:/Zenith/Training.CC", "A:/Zenith"); - Copy("C:/Zenith/AMem.CC", "A:/Zenith"); - Copy("C:/Zenith/TaskRep.CC", "A:/Zenith"); + DirMake("A:/System"); + Copy("C:/Home/Sup1/Sup1Distro/DebugMakeSystem.CC", "A:/System/MakeSystem.CC"); + Copy("C:/Home/Sup1/Sup1Distro/DebugMount.CC", "A:/System"); + Copy("C:/System/AExts.CC", "A:/System"); + Copy("C:/System/AMath.CC", "A:/System"); + Copy("C:/System/Training.CC", "A:/System"); + Copy("C:/System/AMem.CC", "A:/System"); + Copy("C:/System/TaskRep.CC", "A:/System"); FileWrite("C:" CONFIG_DEBUG_DISTRO_FILE, bd->RAM_disk, (bd->max_blk + 1) << BLK_SIZE_BITS); } @@ -146,7 +146,7 @@ U0 MakeStdDistro() { StdDistroPrep; RedSeaISO(TOS_ISO_NAME, TOS_DISTRO_DIR, TOS_DISTRO_DIR BOOT_DIR_KERNEL_BIN_C); - DefinePrint("DD_TEMPLEOSCD_SIZE", "Download $TX,"ZenithOS V1.13",D="DD_OS_NAME_VERSION"$ - Standard Distro (%0.1fMB)", + DefinePrint("DD_TEMPLEOSCD_SIZE", "Download $TX,"ZealOS V1.13",D="DD_OS_NAME_VERSION"$ - Standard Distro (%0.1fMB)", 0.1 * (10 * Size(TOS_ISO_NAME, "+s") / 1024 / 1024)); Drive('C'); } @@ -168,15 +168,15 @@ U0 LiteDistroPrep() Del(TOS_DISTRO_DIR "/" KERNEL_BIN_C); Del(TOS_DISTRO_DIR BOOT_DIR "/OldMBR.BIN.C"); Del(TOS_DISTRO_DIR BOOT_DIR "/BootMHD2.BIN.C"); - Del(TOS_DISTRO_DIR "/Zenith/AutoComplete/ACDefs.DATA"); - Del(TOS_DISTRO_DIR "/Zenith/AutoComplete/ACWords.DATA"); + Del(TOS_DISTRO_DIR "/System/AutoComplete/ACDefs.DATA"); + Del(TOS_DISTRO_DIR "/System/AutoComplete/ACWords.DATA"); Del(TOS_DISTRO_DIR "/Misc/Bible.TXT"); } U0 MakeLiteDistro() { LiteDistroPrep; RedSeaISO(TOS_ISO_NAME, TOS_DISTRO_DIR, TOS_DISTRO_DIR BOOT_DIR_KERNEL_BIN_C); - DefinePrint("DD_TEMPLEOSCD_SIZE", "Download $TX,"ZenithOS V1.13",D="DD_OS_NAME_VERSION"$ - Standard Distro (%0.1fMB)", + DefinePrint("DD_TEMPLEOSCD_SIZE", "Download $TX,"ZealOS V1.13",D="DD_OS_NAME_VERSION"$ - Standard Distro (%0.1fMB)", 0.1 * (10 * Size(TOS_ISO_NAME, "+s") / 1024 / 1024)); Drive('C'); } @@ -201,7 +201,7 @@ U0 MakeDebugDistro() { DebugDistroPrep; RedSeaISO(TOS_ISO_NAME, TOS_DISTRO_DIR, TOS_DISTRO_DIR BOOT_DIR_KERNEL_BIN_C); - DefinePrint("DD_TEMPLEOS_DEBUG_SIZE", "Download $TX,"ZenithOS V1.13",D="DD_OS_NAME_VERSION"$ - Debug Distro (%0.1fMB)", + DefinePrint("DD_TEMPLEOS_DEBUG_SIZE", "Download $TX,"ZealOS V1.13",D="DD_OS_NAME_VERSION"$ - Debug Distro (%0.1fMB)", 0.1 * (10 * Size(TOS_ISO_NAME, "+s") / 1024 / 1024)); Drive('C'); } @@ -224,7 +224,7 @@ U0 MakeStaffDistro() { StaffDistroPrep; RedSeaISO(TOS_ISO_NAME, TOS_DISTRO_DIR, TOS_DISTRO_DIR BOOT_DIR_KERNEL_BIN_C); - DefinePrint("DD_TEMPLEOS_STAFF_SIZE", "Download $TX,"ZenithOS V1.13",D="DD_OS_NAME_VERSION"$ - T.S. Company Internal Distro (%0.1fMB)", + DefinePrint("DD_TEMPLEOS_STAFF_SIZE", "Download $TX,"ZealOS V1.13",D="DD_OS_NAME_VERSION"$ - T.S. Company Internal Distro (%0.1fMB)", 0.1 * (10 * Size(TOS_ISO_NAME, "+s") / 1024 / 1024)); Drive('C'); } @@ -244,11 +244,11 @@ I64 UpdateLineCounts() DocMax; DocClear; - res = LineRep("C:/*", "-r") + LineRep("C:/Zenith/*") + LineRep("C:/Compiler/*", "-S+$$") + LineRep("C:/Kernel/*"); + res = LineRep("C:/*", "-r") + LineRep("C:/System/*") + LineRep("C:/Compiler/*", "-S+$$") + LineRep("C:/Kernel/*"); CopyTree("B:/TOS/TOS", "C:/Home"); DelTree("B:/TOS/TOS"); - DocTreeFWrite("C:/Zenith/ZDefine.CC", "LineRep", "DefinePrint(\"DD_TEMPLEOS_LOC\",\"%,d\");\n", res); + DocTreeFWrite("C:/System/ZDefine.CC", "LineRep", "DefinePrint(\"DD_TEMPLEOS_LOC\",\"%,d\");\n", res); DefinePrint("DD_TEMPLEOS_LOC", "%,d", res); "Total LOC:%12,d\n\n", res; @@ -260,7 +260,7 @@ U0 UpdateISODocDefines() { try { - DefinePrint("DD_TEMPLEOSCD_SIZE", "Download $TX,"ZenithOS V1.13",D="DD_OS_NAME_VERSION"$ - Standard Distro (%0.1fMB)", + DefinePrint("DD_TEMPLEOSCD_SIZE", "Download $TX,"ZealOS V1.13",D="DD_OS_NAME_VERSION"$ - Standard Distro (%0.1fMB)", 0.1 * (10 * Size("D:/Downloads/TOS_Distro.ISO", "+s") / 1024 / 1024)); DefinePrint("DD_TEMPLEOSCD_K_SIZE", "%dKB", Size("D:/Downloads/TOS_Distro.ISO", "+s") / 1024); } @@ -295,7 +295,7 @@ U0 TOSRegen2() SettingsPush; //See $LK,"SettingsPush",A="MN:SettingsPush"$ tos_progress = -1; tos_progress_t0 = tS; - RegExe("ZenithOS/TOSRegen"); + RegExe("ZealOS/TOSRegen"); TOSProgress("DiskCheck All"); AutoComplete; @@ -366,7 +366,7 @@ U0 TOSRegen2() SettingsPop; "F2(\"/Home\") Count\t:%d\n", slash_home; "Elapsed Time\t:%5.3fs\n", tS - progress4_t0; - ProgressBarsReset("ZenithOS/TOSRegen"); + ProgressBarsReset("ZealOS/TOSRegen"); } public U0 TOSPreRegen() diff --git a/src/Demo/Asm/AsmAndC1.CC b/src/Demo/Asm/AsmAndC1.CC index ceeeb9d0..5034e4b1 100755 --- a/src/Demo/Asm/AsmAndC1.CC +++ b/src/Demo/Asm/AsmAndC1.CC @@ -55,7 +55,7 @@ I64 AsmAndC1() //U0 $LK,"Sound",A="MN:Sound"$(I8 ona); MOV RAX, RCX //ona=loop*10+50 - IMUL2 RAX, 10 //ZenithOS uses nonstandard opcodes + IMUL2 RAX, 10 //ZealOS uses nonstandard opcodes //to avoid multiple form of the same one. //See $LK,"::/Compiler/OpCodes.DD"$. ADD RAX, 40 diff --git a/src/Demo/Define.CC b/src/Demo/Define.CC index 0702b232..2d18aa57 100755 --- a/src/Demo/Define.CC +++ b/src/Demo/Define.CC @@ -1,6 +1,6 @@ //See $LK,"Define",A="HI:Define"$. -//These might be in the Zenith task. +//These might be in the System task. DefineLoad("ST_YES_NO", "(Yes or No)"); DefineLoad("ST_EXIT", "Exit"); DefineListLoad("ST_NO_YES_LIST", "No\0Yes\0"); diff --git a/src/Demo/DolDoc/CallBack.CC b/src/Demo/DolDoc/CallBack.CC index 89fac061..f79d3fb3 100755 --- a/src/Demo/DolDoc/CallBack.CC +++ b/src/Demo/DolDoc/CallBack.CC @@ -35,7 +35,7 @@ U0 DoIt() //Flags are explained here: //$LK,"::/Doc/DolDocOverview.DD"$ $LK,"::/Doc/Widget.DD"$ - //$LK,"Dollar Flags",A="MN:DOCEf_TAG"$ $LK,"ST_DOC_FLAGS",A="FF:::/Zenith/DolDoc/DocInit.CC,ST_DOC_FLAGS"$ + //$LK,"Dollar Flags",A="MN:DOCEf_TAG"$ $LK,"ST_DOC_FLAGS",A="FF:::/System/DolDoc/DocInit.CC,ST_DOC_FLAGS"$ doc_e->tag_cb = &tSCB; DocPrint(bdoc, "$$FG$$"); DocUnlock(bdoc); diff --git a/src/Demo/DolDoc/ClickCallBack.CC b/src/Demo/DolDoc/ClickCallBack.CC index b4048e21..3f5836c5 100755 --- a/src/Demo/DolDoc/ClickCallBack.CC +++ b/src/Demo/DolDoc/ClickCallBack.CC @@ -23,7 +23,7 @@ U0 ClickCallBack() //Flags are explained here: //$LK,"::/Doc/DolDocOverview.DD"$ $LK,"::/Doc/Widget.DD"$ - //$LK,"Dollar Flags",A="MN:DOCEf_TAG"$ $LK,"ST_DOC_FLAGS",A="FF:::/Zenith/DolDoc/DocInit.CC,ST_DOC_FLAGS"$ + //$LK,"Dollar Flags",A="MN:DOCEf_TAG"$ $LK,"ST_DOC_FLAGS",A="FF:::/System/DolDoc/DocInit.CC,ST_DOC_FLAGS"$ "(Not preserved if you press .)\n\n"; doc_e->left_cb = &MyLeftCB1; DocUnlock(DocPut); diff --git a/src/Demo/DolDoc/Data.CC b/src/Demo/DolDoc/Data.CC index 9f48c6a0..0beb03b7 100755 --- a/src/Demo/DolDoc/Data.CC +++ b/src/Demo/DolDoc/Data.CC @@ -8,7 +8,7 @@ -P Means it is a string var, basically. ,32 sets the tag string width. - See $LK,"Data Tag Width",A="FA:::/Zenith/DolDoc/DocPlain.CC,DataTagWidth"$. + See $LK,"Data Tag Width",A="FA:::/System/DolDoc/DocPlain.CC,DataTagWidth"$. ,RT=I16 means the val is 2 bytes. See $LK,"DocDataFormat",A="MN:DocDataFormat"$() and $LK,"DocDataScan",A="MN:DocDataScan"$(). diff --git a/src/Demo/DolDoc/FileRead.CC b/src/Demo/DolDoc/FileRead.CC index 90639a71..bc13f9d1 100755 --- a/src/Demo/DolDoc/FileRead.CC +++ b/src/Demo/DolDoc/FileRead.CC @@ -34,7 +34,7 @@ public U0 DocProfile(U8 *filename,I64 flags) "See $$LK,\"CDocEntry\",A=\"MN:CDocEntry\"$$, " "$$LK,\"Doc Type Defines\",A=\"MN:DOCT_TEXT\"$$ and " "$$LK,\"Doc Type Codes\"," - "A=\"FF:::/Zenith/DolDoc/DocInit.CC,ST_DOC_CMDS\"$$.\n" + "A=\"FF:::/System/DolDoc/DocInit.CC,ST_DOC_CMDS\"$$.\n" "$$FG$$"; for (i = 0; i < DOCT_TYPES_NUM; i++) if (cmd_stats[i]) @@ -54,7 +54,7 @@ public U0 DocProfile(U8 *filename,I64 flags) "$$GREEN$$\n'$$PURPLE$$doc_e->de_flags$$GREEN$$' is 64-bit. " "See $$LK,\"Doc Flag Defines\",A=\"MN:DOCEf_TAG\"$$ and " "$$LK,\"Doc Flag Codes\"," - "A=\"FF:::/Zenith/DolDoc/DocInit.CC,ST_DOC_FLAGS\"$$.\n" + "A=\"FF:::/System/DolDoc/DocInit.CC,ST_DOC_FLAGS\"$$.\n" "$$FG$$"; for (i = 0; i < 64; i++) if (flags_stats[i]) diff --git a/src/Demo/Games/BlackDiamond.CC b/src/Demo/Games/BlackDiamond.CC index c370bcd0..053f928e 100755 Binary files a/src/Demo/Games/BlackDiamond.CC and b/src/Demo/Games/BlackDiamond.CC differ diff --git a/src/Demo/Games/BomberGolf.CC b/src/Demo/Games/BomberGolf.CC index 0760389f..af576829 100755 Binary files a/src/Demo/Games/BomberGolf.CC and b/src/Demo/Games/BomberGolf.CC differ diff --git a/src/Demo/Games/CastleFrankenstein.CC b/src/Demo/Games/CastleFrankenstein.CC index 4db302d1..fcd24947 100755 --- a/src/Demo/Games/CastleFrankenstein.CC +++ b/src/Demo/Games/CastleFrankenstein.CC @@ -1,7 +1,7 @@ //Uses $LK,"fixed-point",A="FI:::/Demo/Lectures/FixedPoint.CC"$. -RegDefault("ZenithOS/CastleFrankenstein", "F64 best_score=9999;\n"); -RegExe("ZenithOS/CastleFrankenstein"); +RegDefault("ZealOS/CastleFrankenstein", "F64 best_score=9999;\n"); +RegExe("ZealOS/CastleFrankenstein"); //Set snap to 4 and width to 4 //if you edit this map. @@ -660,7 +660,7 @@ fs_done: SettingsPop; CleanUp; MenuPop; - RegWrite("ZenithOS/CastleFrankenstein", "F64 best_score=%5.4f;\n", best_score); + RegWrite("ZealOS/CastleFrankenstein", "F64 best_score=%5.4f;\n", best_score); } CastleFrankenstein; diff --git a/src/Demo/Games/CircleTrace.CC b/src/Demo/Games/CircleTrace.CC index 954a73e5..3041bf14 100755 --- a/src/Demo/Games/CircleTrace.CC +++ b/src/Demo/Games/CircleTrace.CC @@ -2,8 +2,8 @@ //Giotto, a famous artist, drew a freehand circle to get a job. -RegDefault("ZenithOS/CircleTrace", "F64 best_score=999;\n"); -RegExe("ZenithOS/CircleTrace"); +RegDefault("ZealOS/CircleTrace", "F64 best_score=999;\n"); +RegExe("ZealOS/CircleTrace"); I64 cx, cy; F64 avg_error = 0, elapsed_time = 0, total_error = 0, score = 999; @@ -152,7 +152,7 @@ U0 CircleTrace() SettingsPop; DCFill; DCDel(dc); - RegWrite("ZenithOS/CircleTrace", "F64 best_score=%5.4f;\n", best_score); + RegWrite("ZealOS/CircleTrace", "F64 best_score=%5.4f;\n", best_score); } CircleTrace; //Execute when #included diff --git a/src/Demo/Games/Digits.CC b/src/Demo/Games/Digits.CC index f7c8010f..07c5c2bf 100755 --- a/src/Demo/Games/Digits.CC +++ b/src/Demo/Games/Digits.CC @@ -3,7 +3,7 @@ //gives a name to it. Strings like //this are known as Define entries. -//See $LK,"ST_RAINBOW_10",A="FF:::/Zenith/Gr/GrPalette.CC,ST_RAINBOW_10"$ +//See $LK,"ST_RAINBOW_10",A="FF:::/System/Gr/GrPalette.CC,ST_RAINBOW_10"$ U0 PrintDigit(U8 ch) { diff --git a/src/Demo/Games/DunGen.CC b/src/Demo/Games/DunGen.CC index 6c836854..ef64bb7e 100755 --- a/src/Demo/Games/DunGen.CC +++ b/src/Demo/Games/DunGen.CC @@ -1,5 +1,5 @@ -RegDefault("ZenithOS/DunGen", "F64 best_score=9999;\n"); -RegExe("ZenithOS/DunGen"); +RegDefault("ZealOS/DunGen", "F64 best_score=9999;\n"); +RegExe("ZealOS/DunGen"); //Set snap to 4 and width to 4 //if you edit this map. @@ -490,7 +490,7 @@ dg_done: SettingsPop; CleanUp; MenuPop; - RegWrite("ZenithOS/DunGen", "F64 best_score=%5.4f;\n", best_score); + RegWrite("ZealOS/DunGen", "F64 best_score=%5.4f;\n", best_score); } DunGen; diff --git a/src/Demo/Games/FlapBat.CC b/src/Demo/Games/FlapBat.CC index 6e8eb008..aeba253f 100755 Binary files a/src/Demo/Games/FlapBat.CC and b/src/Demo/Games/FlapBat.CC differ diff --git a/src/Demo/Games/FlatTops.CC b/src/Demo/Games/FlatTops.CC index b7fefe8d..020c6ba5 100755 --- a/src/Demo/Games/FlatTops.CC +++ b/src/Demo/Games/FlatTops.CC @@ -704,7 +704,7 @@ U0 ShipFix(Obj *tmpo, F64 d) U0 MyNoise(I64 mS, F64 min_ona, F64 max_ona) {//Make white noise for given number of mS. -// See $LK+PU,"Noise",A="FF:::/Zenith/ZSound.CC,*Noise("$. On bare-metal, Spawn() hogs CPU. +// See $LK+PU,"Noise",A="FF:::/System/ZSound.CC,*Noise("$. On bare-metal, Spawn() hogs CPU. CSoundEffectFrame *ns; if (mS > 0) diff --git a/src/Demo/Games/Maze.CC b/src/Demo/Games/Maze.CC index f6a62de3..7b32c0d6 100755 --- a/src/Demo/Games/Maze.CC +++ b/src/Demo/Games/Maze.CC @@ -22,7 +22,7 @@ U0 DrawIt(CTask *task, CDC *) //We would put these as local vars //in SolveMaze() but the system stack size //is limited, so it's a bad habit. The heap -//is the normal ZenithOS technique, but +//is the normal ZealOS technique, but //it's a pain in this case. I64 stack_ptr, stack_x [STACK_SIZE], stack_y [STACK_SIZE], diff --git a/src/Demo/Games/RawHide.CC b/src/Demo/Games/RawHide.CC index 3dcbc975..222a54b5 100755 --- a/src/Demo/Games/RawHide.CC +++ b/src/Demo/Games/RawHide.CC @@ -1,7 +1,7 @@ //Uses $LK,"fixed-point",A="FI:::/Demo/Lectures/FixedPoint.CC"$. -RegDefault("ZenithOS/RawHide", "F64 best_score=9999;\n"); -RegExe("ZenithOS/RawHide"); +RegDefault("ZealOS/RawHide", "F64 best_score=9999;\n"); +RegExe("ZealOS/RawHide"); F64 t0, tf; I64 outside_count; @@ -639,7 +639,7 @@ rh_done: SettingsPop; CleanUp; MenuPop; - RegWrite("ZenithOS/RawHide", "F64 best_score=%5.4f;\n", best_score); + RegWrite("ZealOS/RawHide", "F64 best_score=%5.4f;\n", best_score); } RawHide; diff --git a/src/Demo/Games/Talons.CC b/src/Demo/Games/Talons.CC index c5e45bea..10022d66 100755 --- a/src/Demo/Games/Talons.CC +++ b/src/Demo/Games/Talons.CC @@ -1,7 +1,7 @@ //Uses $LK,"fixed-point",A="FI:::/Demo/Lectures/FixedPoint.CC"$. -RegDefault("ZenithOS/Talons", "F64 best_score=9999;\n"); -RegExe("ZenithOS/Talons"); +RegDefault("ZealOS/Talons", "F64 best_score=9999;\n"); +RegExe("ZealOS/Talons"); //Keep these power of two so shift is used instead of multiply //to index arrays. @@ -1369,7 +1369,7 @@ U0 Talons() CleanUp; PostCleanUp; MenuPop; - RegWrite("ZenithOS/Talons", "F64 best_score=%5.4f;\n", best_score); + RegWrite("ZealOS/Talons", "F64 best_score=%5.4f;\n", best_score); } Talons; diff --git a/src/Demo/Games/Varoom.CC b/src/Demo/Games/Varoom.CC index a2cb792c..f9e52d50 100755 --- a/src/Demo/Games/Varoom.CC +++ b/src/Demo/Games/Varoom.CC @@ -87,8 +87,8 @@ -RegDefault("ZenithOS/Varoom", "F64 best_score=9999;\n"); -RegExe("ZenithOS/Varoom"); +RegDefault("ZealOS/Varoom", "F64 best_score=9999;\n"); +RegExe("ZealOS/Varoom"); F64 distance, t0, tf; Bool game_over; @@ -840,7 +840,7 @@ vr_done: //Don't goto out of try mp_not_done_flags = 0; // fix for CleanUp hanging on a Yield while loop ... CleanUp; MenuPop; - RegWrite("ZenithOS/Varoom", "F64 best_score=%5.4f;\n", best_score); + RegWrite("ZealOS/Varoom", "F64 best_score=%5.4f;\n", best_score); } Varoom; diff --git a/src/Demo/Games/Wenceslas.CC b/src/Demo/Games/Wenceslas.CC index d99d5112..913c05b9 100755 --- a/src/Demo/Games/Wenceslas.CC +++ b/src/Demo/Games/Wenceslas.CC @@ -1,5 +1,5 @@ -RegDefault("ZenithOS/Wenceslas", "F64 best_score=9999;\n"); -RegExe("ZenithOS/Wenceslas"); +RegDefault("ZealOS/Wenceslas", "F64 best_score=9999;\n"); +RegExe("ZealOS/Wenceslas"); #define BORDER 5 #define KING_STEP 6 @@ -647,7 +647,7 @@ ws_done: SettingsPop; CleanUp; MenuPop; - RegWrite("ZenithOS/Wenceslas", "F64 best_score=%5.4f;\n", best_score); + RegWrite("ZealOS/Wenceslas", "F64 best_score=%5.4f;\n", best_score); } Wenceslas; diff --git a/src/Demo/Games/ZoneOut.CC b/src/Demo/Games/ZoneOut.CC index c9eae4cc..cf24fa94 100755 Binary files a/src/Demo/Games/ZoneOut.CC and b/src/Demo/Games/ZoneOut.CC differ diff --git a/src/Demo/Graphics/CommonAncestor.CC b/src/Demo/Graphics/CommonAncestor.CC index c36b92e5..3ff839cd 100755 --- a/src/Demo/Graphics/CommonAncestor.CC +++ b/src/Demo/Graphics/CommonAncestor.CC @@ -125,7 +125,7 @@ U0 TreeCommonAncestor() TreeCommonAncestor; /* -Be careful with recursive routines in ZenithOS +Be careful with recursive routines in ZealOS because the stack does not grow and will overflow. See $LK,"::/Demo/StackGrow.CC"$. diff --git a/src/Demo/Graphics/GrDir.CC b/src/Demo/Graphics/GrDir.CC index 981d14d3..f40450c6 100755 Binary files a/src/Demo/Graphics/GrDir.CC and b/src/Demo/Graphics/GrDir.CC differ diff --git a/src/Demo/Graphics/Shading.CC b/src/Demo/Graphics/Shading.CC index 8eb83b53..4c58d9b3 100755 --- a/src/Demo/Graphics/Shading.CC +++ b/src/Demo/Graphics/Shading.CC @@ -36,7 +36,7 @@ U0 Lighting(CDC *dc, CD3I32 *ls, CD3I32 *poly, I64 color) //vect and the surface normal //gives an illumination number. - //ZenithOS will generate a random U16 + //ZealOS will generate a random U16 //and compare to dither_probability_u16 and //will pick from two colors. //Probability dithering does not work with thick>1 at this time. diff --git a/src/Demo/Graphics/WallPaperCtrl.CC b/src/Demo/Graphics/WallPaperCtrl.CC index d56a7e5a..b60d5368 100755 --- a/src/Demo/Graphics/WallPaperCtrl.CC +++ b/src/Demo/Graphics/WallPaperCtrl.CC @@ -9,7 +9,7 @@ See $LK,"::/Demo/Graphics/Slider.CC"$ and $LK,"::/Demo/Graphics/WallPaperFish.CC"$ before messing with this program. -It must be "Zenith Included". +It must be "System Included". */ #define SLIDER_RANGE 30 @@ -86,9 +86,9 @@ CCtrl *SliderNew() { CCtrl *c; - if (Fs != zenith_task) + if (Fs != sys_task) { - "Must be Zenith Included with SHIFT-F5.\n" + "Must be System Included with SHIFT-F5.\n" "(Would crash when code mem was freed.)\n"; return NULL; } diff --git a/src/Demo/Graphics/WallPaperFish.CC b/src/Demo/Graphics/WallPaperFish.CC index f6dd8e87..f66d9e82 100755 Binary files a/src/Demo/Graphics/WallPaperFish.CC and b/src/Demo/Graphics/WallPaperFish.CC differ diff --git a/src/Demo/Graphics/WallPaperStars.CC b/src/Demo/Graphics/WallPaperStars.CC index 79f02321..c21627b9 100755 --- a/src/Demo/Graphics/WallPaperStars.CC +++ b/src/Demo/Graphics/WallPaperStars.CC @@ -1,5 +1,5 @@ /* - You "Zenith include" this because you want the wallpaper + You "System Include" this because you want the wallpaper routine to stay in mem even if this task is killed. */ @@ -48,9 +48,9 @@ U0 WallInit() { I64 i; - if (Fs != zenith_task) + if (Fs != sys_task) { - "\nMust be Zenith Included. (SHIFT-F5 / RightClick->Zenith Include) \n"; + "\nMust be System Included. (SHIFT-F5 / RightClick->System Include) \n"; return; } old_wall_paper = gr.fp_wall_paper; diff --git a/src/Demo/Lectures/64BitAsmQuiz.DD b/src/Demo/Lectures/64BitAsmQuiz.DD index c44e5d85..c2d5686d 100755 --- a/src/Demo/Lectures/64BitAsmQuiz.DD +++ b/src/Demo/Lectures/64BitAsmQuiz.DD @@ -54,7 +54,7 @@ $WW,1$$FG,5$$TX+CX,"64-Bit Assembly Quiz"$$FG$ ---- -ZenithOS identity-maps everything, all the time, so the usual convention of upper memory being for kernel does not apply. It uses physical addresses, basically. It puts all code in the lowest 2-Gig memory range so that it can use the CALL REL32 instruction, the fastest. It never changes privilege levels or messes with page tables, once it is up-and-running. +ZealOS identity-maps everything, all the time, so the usual convention of upper memory being for kernel does not apply. It uses physical addresses, basically. It puts all code in the lowest 2-Gig memory range so that it can use the CALL REL32 instruction, the fastest. It never changes privilege levels or messes with page tables, once it is up-and-running. ---- diff --git a/src/Demo/Lectures/MiniCompiler.CC b/src/Demo/Lectures/MiniCompiler.CC index 4bdea090..75bf0504 100755 --- a/src/Demo/Lectures/MiniCompiler.CC +++ b/src/Demo/Lectures/MiniCompiler.CC @@ -15,7 +15,7 @@ $ID,2$For this mini compiler, some things you should know about 64-bit asm: * "PUSH EAX", "POP EAX" and "XOR EAX,EAX" will behave as 64-bit even without REX because the stack is always 64 bit and because the XOR clears the upper 32-bits. -It is okay in ZenithOS to change RAX, RBX, RCX, RDX, R8 and R9 without restoring them to their original values. +It is okay in ZealOS to change RAX, RBX, RCX, RDX, R8 and R9 without restoring them to their original values. $ID,-2$$WW,0$*/ #define TK_EOF 0 diff --git a/src/Demo/Lectures/MiniGrLib.CC b/src/Demo/Lectures/MiniGrLib.CC index fc2e23c1..af3c992f 100755 --- a/src/Demo/Lectures/MiniGrLib.CC +++ b/src/Demo/Lectures/MiniGrLib.CC @@ -136,10 +136,10 @@ U0 MiniGrLibDemo() MGUpdate; Busy(1500000); /* -We are returning graphics to normal operations under ZenithOS. -It is not normal to by-pass the ZenithOS graphcis routines. -The ZenithOS graphics don't know VGA has changed. -This bit tells ZenithOS to update whole screen. +We are returning graphics to normal operations under ZealOS. +It is not normal to by-pass the ZealOS graphcis routines. +The ZealOS graphics don't know VGA has changed. +This bit tells ZealOS to update whole screen. */ // will flush screen VGA cache. LFBFlush; diff --git a/src/Demo/Lectures/Ring3.CC b/src/Demo/Lectures/Ring3.CC index a397c93d..b5d3d213 100755 --- a/src/Demo/Lectures/Ring3.CC +++ b/src/Demo/Lectures/Ring3.CC @@ -1,7 +1,7 @@ -/*ZenithOS runs exclusively in ring 0. +/*ZealOS runs exclusively in ring 0. Ring 0 is part of the $LK,"Charter",A="FI:::/Doc/Charter.DD"$. This demo is for you to play around -with ring 3. ZenithOS is for +with ring 3. ZealOS is for recreational programming, after all. This redirects the general protection diff --git a/src/Demo/MultiCore/LoadTest.CC b/src/Demo/MultiCore/LoadTest.CC index 475ae5a4..0110cc04 100755 --- a/src/Demo/MultiCore/LoadTest.CC +++ b/src/Demo/MultiCore/LoadTest.CC @@ -16,7 +16,7 @@ U0 Job2(I64) {//Log a file while (!app_done) { - ZenithLog("%F", "::/Demo/MultiCore/LoadTest.CC"); + SysLog("%F", "::/Demo/MultiCore/LoadTest.CC"); Yield; } lock {app_done_ack--;} @@ -27,7 +27,7 @@ U0 Job3(I64) while (!app_done) { Cd("::/Compiler"); - ZenithLog("%F", "Compiler.PRJ"); + SysLog("%F", "Compiler.PRJ"); Yield; } lock {app_done_ack--;} diff --git a/src/Demo/OnceDemo.CC b/src/Demo/OnceDemo.CC index 2a31e93a..d6a5a48f 100755 --- a/src/Demo/OnceDemo.CC +++ b/src/Demo/OnceDemo.CC @@ -9,4 +9,4 @@ U0 OnceDemo() OnceDemo; -//There are variants for zenith $LK,"ZOnce",A="MN:ZOnce"$(). +//There are variants for zeal $LK,"ZOnce",A="MN:ZOnce"$(). diff --git a/src/Demo/PhoneNumWords.CC b/src/Demo/PhoneNumWords.CC index aafa3d5c..79c4c64a 100755 --- a/src/Demo/PhoneNumWords.CC +++ b/src/Demo/PhoneNumWords.CC @@ -4,7 +4,7 @@ U8 char_map[26]="22233344455566677778889999"; Format of word list entry: U8 ACD_WORD_CHAR U8 word[] with terminating zero - I16 block; //definition offset in ::/Zenith/AutoComplete/ACDefs.DATA + I16 block; //definition offset in ::/System/AutoComplete/ACDefs.DATA */ U0 PhoneNumWords(U8 *num) { diff --git a/src/Demo/Print.CC b/src/Demo/Print.CC index 7628c1de..0134b803 100755 --- a/src/Demo/Print.CC +++ b/src/Demo/Print.CC @@ -1,4 +1,4 @@ -//ZenithOS supports standard $LK,"Print",A="MN:Print"$() +//ZealOS supports standard $LK,"Print",A="MN:Print"$() //codes and extended ones. //See $LK,"Print(\"\") Format Strings",A="FI:::/Doc/Print.DD"$. diff --git a/src/Demo/RegistryDemo.CC b/src/Demo/RegistryDemo.CC index 73ae35d2..c6e332c2 100755 --- a/src/Demo/RegistryDemo.CC +++ b/src/Demo/RegistryDemo.CC @@ -1,6 +1,6 @@ /*The ~/Registry.CC file is CosmiC code. -You can execute a tree branch of it. The Zenith -branch is executed in the Zenith task boot phase. +You can execute a tree branch of it. The Zeal +branch is executed in the System task boot phase. Normally, you will place var declarations in the branch you make, but since an arthmetic expression is valid in CosmiC you can place simple expressions diff --git a/src/Demo/SubIntAccess.CC b/src/Demo/SubIntAccess.CC index c008905a..4ed20094 100755 --- a/src/Demo/SubIntAccess.CC +++ b/src/Demo/SubIntAccess.CC @@ -1,4 +1,4 @@ -/*ZenithOS has a feature that allows access to bytes and words of larger ints. +/*ZealOS has a feature that allows access to bytes and words of larger ints. See $LK,"U64i union",A="FF:::/Kernel/KernelA.HH,U64i union"$. diff --git a/src/Demo/SuggestSpelling.CC b/src/Demo/SuggestSpelling.CC index 3c80d432..a9e24f57 100755 --- a/src/Demo/SuggestSpelling.CC +++ b/src/Demo/SuggestSpelling.CC @@ -30,7 +30,7 @@ U8 *SuggestMatchForm(U8 *src) /*Format of word list entry: U8 ACD_WORD_CHAR U8 word[] with terminating zero - I16 block; //definition offset in ::/Zenith/AutoComplete/ACDefs.DATA + I16 block; //definition offset in ::/System/AutoComplete/ACDefs.DATA */ Bool SuggestSpelling(U8 *word) @@ -80,7 +80,7 @@ U0 SuggestSpellingDemo() } } -//If you "Zenith Include" this file, it will +//If you "System Include" this file, it will //install this command as a hot-key. U0 CtrlAltL(I64) @@ -95,12 +95,12 @@ U0 CtrlAltL(I64) PopUp("if (SuggestSpelling(ac.cur_word)) View;"); } -if (Fs != zenith_task) +if (Fs != sys_task) SuggestSpellingDemo; else { CtrlAltCBSet('L', &CtrlAltL, "Cmd /Suggest Spelling"); -//Appears in the Zenith Task Window +//Appears in the System Task Window " installed\n"; } diff --git a/src/Demo/ToHtmlToTXTDemo/DemoInPage.DD b/src/Demo/ToHtmlToTXTDemo/DemoInPage.DD index b9de35f4..37a7ff66 100755 --- a/src/Demo/ToHtmlToTXTDemo/DemoInPage.DD +++ b/src/Demo/ToHtmlToTXTDemo/DemoInPage.DD @@ -1,11 +1,11 @@ $WW,1$$FG,5$$TX+CX,"The Temple Operating System",HTML="http://www.templeos.org"$$FG,0$ -$FG,4$$TX,"ZenithOS File Downloads (100% Public Domain)",HTML="http://www.templeos.org/Downloads"$$FG$ +$FG,4$$TX,"ZealOS File Downloads (100% Public Domain)",HTML="http://www.templeos.org/Downloads"$$FG$ -ZenithOS is a free, public domain, open source, x86_64, non-preemptive multi-tasking, multi-cored, ring-0-only, single-address-map (identity-mapped), non-networked, PC operating system. Paging is, basically, not used. +ZealOS is a free, public domain, open source, x86_64, non-preemptive multi-tasking, multi-cored, ring-0-only, single-address-map (identity-mapped), non-networked, PC operating system. Paging is, basically, not used. -The CIA obsfucates to foil India, China, Russia and Korea. They make things more complicated than necessary. ZenithOS is more simple than necessary. It is obnoxiously simple. If you look at this $TX,"\"Hello World\" joke",HTML="http://www.ariel.com.au/jokes/The_Evolution_of_a_Programmer.html"$, you can see why I capped the line count of TempleOS at 100,000. +The CIA obsfucates to foil India, China, Russia and Korea. They make things more complicated than necessary. ZealOS is more simple than necessary. It is obnoxiously simple. If you look at this $TX,"\"Hello World\" joke",HTML="http://www.ariel.com.au/jokes/The_Evolution_of_a_Programmer.html"$, you can see why I capped the line count of TempleOS at 100,000. God said TempleOS must be perfect, so backward compatibility is not promised. -I, Terry Davis, wrote all $TX,"80,849",D="DD_TEMPLEOS_LOC"$ lines of TempleOS over the last $TX,"16.5",D="DD_TEMPLEOS_AGE"$ years, including the 64-bit compiler. I have been a professional operating system developer since 1990 when I worked on Ticketmaster's VAX OS. +Terry Davis wrote all $TX,"80,849",D="DD_TEMPLEOS_LOC"$ lines of TempleOS over the last $TX,"17.9",D="DD_TEMPLEOS_AGE"$ years, including the 64-bit compiler. He was a professional operating system developer since 1990 when he worked on Ticketmaster's VAX OS. diff --git a/src/Demo/ToHtmlToTXTDemo/HtmlGen.CC b/src/Demo/ToHtmlToTXTDemo/HtmlGen.CC index 028a6b59..c0469c5e 100755 --- a/src/Demo/ToHtmlToTXTDemo/HtmlGen.CC +++ b/src/Demo/ToHtmlToTXTDemo/HtmlGen.CC @@ -5,11 +5,11 @@ Notice that an entry like $$TX,"GOOGLE",HTML="http://www.google.com"$$ will be converted to text in the html with an html link. I cheated by hardcoding $LK,"www.templeos.org",A="FF:::/Demo/ToHtmlToTXTDemo/ToHtml.CC,www.templeos.org"$ as the website -for $LK,"ZenithOS Links",A="MN:LK_FILE"$. Why don't you copy +for $LK,"ZealOS Links",A="MN:LK_FILE"$. Why don't you copy $LK,"::/Demo/ToHtmlToTXTDemo/ToHtml.CC"$ to your /Home directory and modify it? You are welcome to link to http://www.templeos.org if you want file that come on the -ZenithOS distribution. +ZealOS distribution. You can pass html meta data as args to $LK,"ToHtml",A="FF:::/Demo/ToHtmlToTXTDemo/ToHtml.CC,ToHtml"$(). */ diff --git a/src/Demo/ToHtmlToTXTDemo/ToHtml.CC b/src/Demo/ToHtmlToTXTDemo/ToHtml.CC index a3579732..fab1e253 100755 --- a/src/Demo/ToHtmlToTXTDemo/ToHtml.CC +++ b/src/Demo/ToHtmlToTXTDemo/ToHtml.CC @@ -151,7 +151,7 @@ U8 *TOSLinkConvert1(U8 *link_st) while (LBts(&locks, 0)) Yield; if (!bible) - bible = Zenith("DocRead(\"%s\");", filename); + bible = Sys("DocRead(\"%s\");", filename); if (DocFind(bible, num, needle)) res = URLBibleGateway(link_st); LBtr(&locks, 0); @@ -202,7 +202,7 @@ public CDoc *Doc2Html(CDoc *doc_in, U8 *html_header=NULL, U8 *body_header=NULL, "\n" "\n" - "\n"; + "\n"; if (!body_header) body_header = "\n" diff --git a/src/Demo/WordSearch.CC b/src/Demo/WordSearch.CC index fb69f4ae..6d5c65fd 100755 --- a/src/Demo/WordSearch.CC +++ b/src/Demo/WordSearch.CC @@ -102,7 +102,7 @@ I64 WordsCompare(U8 *e1, U8 *e2) /*Format of word list entry: U8 ACD_WORD_CHAR U8 word[] with terminating zero - I16 block; //definition offset in ::/Zenith/AutoComplete/ACDefs.DATA + I16 block; //definition offset in ::/System/AutoComplete/ACDefs.DATA */ U0 DisplayWords(I64 n) diff --git a/src/Doc/AboutZenithOS.DD b/src/Doc/AboutZealOS.DD similarity index 97% rename from src/Doc/AboutZenithOS.DD rename to src/Doc/AboutZealOS.DD index 76581ce4..d1b36665 100755 --- a/src/Doc/AboutZenithOS.DD +++ b/src/Doc/AboutZealOS.DD @@ -1,4 +1,4 @@ -$WW,1$$FG,5$$TX+CX,"ZenithOS"$$FG$ +$WW,1$$FG,5$$TX+CX,"ZealOS"$$FG$ $FG,5$Websites:$FG$ diff --git a/src/Doc/AutoComplete.DD b/src/Doc/AutoComplete.DD index 79d22092..486032ee 100755 --- a/src/Doc/AutoComplete.DD +++ b/src/Doc/AutoComplete.DD @@ -16,4 +16,4 @@ $FG,2$$FG$ Autocompletes the 1st dictionary word in the window. $FG,2$$FG$ Autocompletes the 2nd dictionary word in the window. $FG,2$$FG$ Autocompletes the n-th dictionary word in the window. -If you have the raw Project Gutenberg dictionary file, you can generate the ZenithOS processed dictionary files with the stand-alone program $LK,"::/Zenith/AutoComplete/ACDictGen.CC"$. +If you have the raw Project Gutenberg dictionary file, you can generate the ZealOS processed dictionary files with the stand-alone program $LK,"::/System/AutoComplete/ACDictGen.CC"$. diff --git a/src/Doc/BlkChain.DD b/src/Doc/BlkChain.DD index c8c867bc..717ce839 100755 --- a/src/Doc/BlkChain.DD +++ b/src/Doc/BlkChain.DD @@ -4,17 +4,17 @@ There was a technique on the Commodore 64 where disk blocks were chained togethe The $LK,"RedSea",A="FI:::/Doc/RedSea.DD"$ file system does not allow files to grow because it only has an allocation bitmap and not a FAT table. This "flaw" is by design. I am intentionally crippling this operating system, making it a toy with the wisdom that this will prevent commercialization and corruption. The toy spirit of the operating system will be preserved going into the future. The vision for this operating system was a modern Commodore 64, which was a fun toy. -Doing whole file operations is the ZenithOS way of doing thinks. It is the simplest and, ironically, the fastest. It is obnoxious in the characteristic way that ZenithOS is obnoxious, flaunting massive modern resources in a way that makes old programmers protest. +Doing whole file operations is the ZealOS way of doing thinks. It is the simplest and, ironically, the fastest. It is obnoxious in the characteristic way that ZealOS is obnoxious, flaunting massive modern resources in a way that makes old programmers protest. When doing large, whole-file operations, immediately memory fragmentation is a serious problem, but not so for allocations in the range under a Meg (with occasional larger ones). -The file compression scheme in ZenithOS only works on whole file operations and the $LK,"DolDoc",A="FI:::/Doc/DolDoc.DD"$ format cannot have text tacked onto the end, since binary data is at the end. +The file compression scheme in ZealOS only works on whole file operations and the $LK,"DolDoc",A="FI:::/Doc/DolDoc.DD"$ format cannot have text tacked onto the end, since binary data is at the end. I don't want to spoil fun, so of course I offer a way to get awesome performance that is, ironically, superior. $LK,"FBlkRead",A="MN:FBlkRead"$() and $LK,"FBlkWrite",A="MN:FBlkWrite"$() allow you to read a block offset from the start of a file. Since files are all contiguous, this is incredibly efficient. You just have to declare the desired file size when you create it with $LK,"FOpen",A="MN:FOpen"$() and cannot change it. See $LK,"::/Demo/Disk/DataBase.CC"$. If you like, you are encouraged to to do raw $LK,"BlkRead",A="MN:BlkRead"$() and $LK,"BlkWrite",A="MN:BlkWrite"$() directly on a drive. Just get a pointer to a $LK,"CDrive",A="MN:CDrive"$ with $LK,"Letter2Drive",A="MN:Letter2Drive"$() and you are on your way! Your computer is supposed to be a fun toy! You can make an entire partition used for a database, or invent a file system. -On the whole, the $LK,"RedSea",A="FI:::/Doc/RedSea.DD"$ file system with its whole-file-only limitation bring beautiful harmony. It beautifully captures the spirit of ZenithOS with simplicity and, ironic speed, since contiguous is fastest. +On the whole, the $LK,"RedSea",A="FI:::/Doc/RedSea.DD"$ file system with its whole-file-only limitation bring beautiful harmony. It beautifully captures the spirit of ZealOS with simplicity and, ironic speed, since contiguous is fastest. $FG,8$ * "Commodore 64" is a trademark owned by Polabe Holding NV. diff --git a/src/Doc/Boot.DD b/src/Doc/Boot.DD index fa92ad02..1652ff55 100755 Binary files a/src/Doc/Boot.DD and b/src/Doc/Boot.DD differ diff --git a/src/Doc/ChangeLog.DD b/src/Doc/ChangeLog.DD index 5344254a..8dd81b7b 100755 --- a/src/Doc/ChangeLog.DD +++ b/src/Doc/ChangeLog.DD @@ -1,15 +1,31 @@ $WW,1$$FG,5$$TX+CX,"ChangeLog"$$FG$ +$IV,1$----07/01/21 19:04:09----$IV,0$ +$BK,1$* Forked ZealOS from ZenithOS. Version number 2.01 --> 0.01.$BK,0$ +* Update Roadmap. +* Restructured Net/ directories. +* Removed unnecessary files in Home/ directory. +* Renames: + - ZenithOS --> ZealOS + - Zenith Task --> System Task + + - $FG,5$Zenith$FG$ --> $FG,5$Sys$FG$ + - $FG,5$ZenithErr$FG$ --> $FG,5$SysErr$FG$ + - $FG,5$ZenithWarn$FG$ --> $FG,5$SysWarn$FG$ + - $FG,5$ZenithLog$FG$ --> $FG,5$SysLog$FG$ + + - Zenith/ --> System/ + $IV,1$----06/28/21 06:20:21----$IV,0$ -* Restored /Zenith/God directory, the $LK,"Bible",A="FI:::/Misc/Bible.TXT"$, $LK,"Bible Links",A="BF:Exodus,20:1"$, and $MA-X+PU,"GodBiblePassage",LM="GodBiblePassage;View;\n"$ with SHIFT-F7. +* Restored /System/God directory, the $LK,"Bible",A="FI:::/Misc/Bible.TXT"$, $LK,"Bible Links",A="BF:Exodus,20:1"$, and $MA-X+PU,"GodBiblePassage",LM="GodBiblePassage;View;\n"$ with SHIFT-F7. $IV,1$----06/24/21 01:01:06----$IV,0$ +* Raised version number to ZenithOS 2.1. * Implemented PCI fall-back functions for when PCIBIOS is unsupported, to improve bare-metal support. * Abstracted $LK+PU,"PCI functions",A="FI:::/Kernel/PCI.CC"$ out from $LK+PU,"PCIBIOS",A="FI:::/Kernel/PCIBIOS.CC"$ file. -* Raised version number to ZenithOS 2.1. $IV,1$----06/01/21 16:02:38----$IV,0$ -* Overhauled entire OS to use AHCI routines instead of IDE. $BK,1$* Raised version number to ZenithOS 2.0.$BK,0$ +* Overhauled entire OS to use AHCI routines instead of IDE. $IV,1$----05/24/21 05:08:09----$IV,0$ * Fixed $LK+PU,"Chess",A="FF:::/Demo/Games/Chess.CC,JobQueue"$ crashing when only one CPU core available. @@ -41,10 +57,10 @@ $IV,1$----06/04/20 18:01:46----$IV,0$ * Added $LK,"BIOSRep",A="MN:BIOSRep"$() as convenience function to view BIOS info from $LK,"SysRep",A="MN:SysRep"$(). $IV,1$----04/27/20 15:34:42----$IV,0$ -* Changed $LK+PU,"GrBitMap",A="FI:::/Zenith/Gr/GrBitMap.CC"$ to use non-timer rand for drawing speed improvement on multicore. +* Changed $LK+PU,"GrBitMap",A="FI:::/System/Gr/GrBitMap.CC"$ to use non-timer rand for drawing speed improvement on multicore. $IV,1$----04/21/20 18:54:47----$IV,0$ -* Altered $LK+PU,"Tom Palettes",A="FF:::/Zenith/Gr/GrPalette.CC,PaletteSetTom"$ for better visibility. +* Altered $LK+PU,"Tom Palettes",A="FF:::/System/Gr/GrPalette.CC,PaletteSetTom"$ for better visibility. $IV,1$----04/21/20 16:13:01----$IV,0$ * Added start-up intro $LK+PU,"Splash",A="FI:::/ZSplash.CC"$ as a PopUp in $LK+PU,"Once",A="FF:::/Once.CC,PopUpRunFile"$, after performing a full boot (excludes soft reboots). @@ -78,7 +94,7 @@ $IV,1$----04/04/20 19:15:21----$IV,0$ * Added $LK,"SysRep",A="MN:SysRep"$(). Various $LK,"CSM*Info",A="MN:CSMBIOSBIOSInfo"$ classes added. Pass in a $LK,"SMBIOSt_*",A="MN:SMBIOSt_BIOS"$ to get info for that specific structure type. It parses SMBIOS structures located in low memory. Question-colon operator would have saved many lines of code. $IV,1$----04/02/20 03:27:03----$IV,0$ -* Added camera rotation via mouse in 3D $LK,"SpriteMesh",A="FF:::/Zenith/Gr/SpriteMesh.CC,SpriteMeshEd"$ editor. 360 used as magic number, trying $LK,"VIEWANGLES_RANGE",A="FF:::/Zenith/Ctrls/CtrlsA.CC,VIEWANGLES_RANGE"$ crashed it. +* Added camera rotation via mouse in 3D $LK,"SpriteMesh",A="FF:::/System/Gr/SpriteMesh.CC,SpriteMeshEd"$ editor. 360 used as magic number, trying $LK,"VIEWANGLES_RANGE",A="FF:::/System/Ctrls/CtrlsA.CC,VIEWANGLES_RANGE"$ crashed it. $IV,1$----04/02/20 01:50:52----$IV,0$ * 'Fixed' $LK,"Varoom",A="FF:::/Demo/Games/Varoom.CC,kbd.down_bitmap"$ window lock up on exit. Brute-forcing zero, but somewhere $LK,"mp_not_done_flags",A="FF:::/Demo/Games/Varoom.CC,mp_not_done_flags"$ isn't getting cleared when shift-esc is entered with the new key implementation. @@ -161,7 +177,7 @@ $IV,1$----02/23/20 02:36:28----$IV,0$ $IV,1$----02/22/20 20:04:00----$IV,0$ * Reduced $LK,"MEM_MIN_MEG",A="MN:MEM_MIN_MEG"$ to 256 MiB (VMWare users have to do less work). * Added $FG,2$$FG$ to AC $LK,"standby",A="FI:::/Doc/StandBy.DD"$ doc. -* Removed the /Zenith/God directory. Bible.TXT has been removed. The functionality of HolySpirit.CC has been moved into $LK,"::/Zenith/Divination.CC",A="FI:::/Zenith/Divination.CC"$. Functions renamed from God*() to $LK,"Divine*",A="MN:GodWord"$(). Psalmody GodSong feature $LK,"disabled",A="FF:::/Apps/Psalmody/PsalmodyMain.CC,GodSongStr"$. DolDoc "BF:" links removed. CtrlAltB() is free to be used for other things. +* Removed the /System/God directory. Bible.TXT has been removed. The functionality of HolySpirit.CC has been moved into $LK,"::/System/Divination.CC",A="FI:::/System/Divination.CC"$. Functions renamed from God*() to $LK,"Divine*",A="MN:GodWord"$(). Psalmody GodSong feature $LK,"disabled",A="FF:::/Apps/Psalmody/PsalmodyMain.CC,GodSongStr"$. DolDoc "BF:" links removed. CtrlAltB() is free to be used for other things. * Updated the $LK,"Charter",A="FI:::/Doc/Charter.DD"$. $IV,1$----02/21/20 17:30:17----$IV,0$ @@ -183,7 +199,7 @@ $BK,1$* Zenith 1.0 released.$BK,0$ * Updated $LK,"Palette Demo",A="FI:::/Demo/Graphics/Palette.CC"$ to use current palette environment. * Shortened $LK,"CheckPtr",A="MN:"$() and $LK,"CheckCodePtr",A="MN:CheckCodePtr"$(). Even though boolean expressions outside of $HL$if$HL,0$ statements are compiled inefficiently, clarity and low line count is more important. * $LK,"RawDr",A="MN:RawDr"$() is 40 columns off the right of the screen, instead of fixed at column 40. -* Windows start at $LK,"4/5th the screen height",A="FF:::/Kernel/KTask.CC,text.rows"$ instead of row 13. Zenith task window is $LK,"1/5th the screen height",A="FF:::/StartOS.CC,text.rows"$. +* Windows start at $LK,"4/5th the screen height",A="FF:::/Kernel/KTask.CC,text.rows"$ instead of row 13. System task window is $LK,"1/5th the screen height",A="FF:::/StartOS.CC,text.rows"$. * $LK,"R",A="MN:R"$("RLf_VGA", "$LK,"RLf_VESA",A="MN:RLf_VESA"$"); * Removed VGA text mode support, and all definitions relating to it, including from the $LK,"kernel config",A="FI:::/Kernel/KConfig.CC"$. * Added $MA-X+PU,"screen resolution selection",LM="F(\"->screen_w\");View;"$ to kernel configuration procedure. @@ -195,16 +211,16 @@ $BK,1$* Zenith 1.0 released.$BK,0$ - Added $FG,2$screen_size$FG$, $FG,2$buffer_size$FG$, $FG,2$fb_alias$FG$ members to $LK,"CTextGlobals",A="MN:CTextGlobals"$. - $LK,"SysGrInit",A="FF:::/Kernel/KMain.CC,text.screen_size"$() -- using $LK,"Seg2Linear",A="FF:::/Kernel/KMain.CC,Seg2Linear"$() to convert pointers. - $LK,"raw text drawing routine",A="FF:::/Kernel/Display.CC,text.fb_alias"$ updated. $LK,"BLACK32, WHITE32",A="MN:BLACK32"$. - - Dynamic definition of $LK,"GR_WIDTH and GR_HEIGHT",A="FF:::/Zenith/Gr/GrGlobals.CC,GR_WIDTH:2"$. + - Dynamic definition of $LK,"GR_WIDTH and GR_HEIGHT",A="FF:::/System/Gr/GrGlobals.CC,GR_WIDTH:2"$. - $LK,"GrUpdateScreen32",A="MN:GrUpdateScreen32"$() -- $LK,"GrCalcScreenUpdates",A="MN:GrCalcScreenUpdates"$() is used to reduce CPU usage. Added $FG,2$screen_cache$FG$ member to $LK,"CGrGlobals",A="MN:CGrGlobals"$. - - $LK,"gr_palette",A="MN:gr_palette"$ global variable. We use $LK,"CBGR24",A="MN:CBGR24"$ in $LK,"GrPalette.CC",A="FI:::/Zenith/Gr/GrPalette.CC"$. + - $LK,"gr_palette",A="MN:gr_palette"$ global variable. We use $LK,"CBGR24",A="MN:CBGR24"$ in $LK,"GrPalette.CC",A="FI:::/System/Gr/GrPalette.CC"$. * Added $LK,"BinRep",A="MN:BinRep"$() from Sup1 ISO. * $LK,"R",A="MN:R"$("sys_pci_busses", "$LK,"sys_pci_buses",A="MN:sys_pci_buses"$"); * Renamed RWF flags -> $LK,"RAWF",A="MN:RAWF_IN_DOLLAR"$. * Renamed mon_start_days1 and mon_start_days2 -> $LK,"month_start_days",A="MN:month_start_days"$ and $LK,"month_start_days_leap",A="MN:month_start_days_leap"$, respectively. * Moved random number generation algorithm into $LK,"seperate function",A="MN:RandInt"$ to reduce line count. Added $LK,"RandU8",A="MN:RandU8"$(). -* Added syntax highlighting for numbers. $LK,"DocHighlight",A="FF:::/Zenith/DolDoc/DocHighlight.CC,DOC_COLOR_NUMBER"$(), $LK,"DOC_COLOR_NUMBER",A="MN:DOC_COLOR_NUMBER"$. +* Added syntax highlighting for numbers. $LK,"DocHighlight",A="FF:::/System/DolDoc/DocHighlight.CC,DOC_COLOR_NUMBER"$(), $LK,"DOC_COLOR_NUMBER",A="MN:DOC_COLOR_NUMBER"$. * Removed unnecessary checks for the presence of the $LK,"APIC",A="MN:LAPIC_BASE"$ in $LK,"MultiProc.CC",A="FI:::/Kernel/MultiProc.CC"$, as it is present on all x86 CPUs after the P5 microarchitecture. * Added untested $LK,"ReAlloc",A="MN:ReAlloc"$(), as it could be useful for certain programs. * Added definitions for the $LK,"PCI registers",A="MN:PCIR_VENDOR_ID"$. Expanded the $LK,"CPCIDev",A="MN:CPCIDev"$ class to contain the values of the read-only registers. Added $LK,"PCIDevFind",A="MN:"$() as a simpler/abstracted alternative to $LK,"PCIClassFind",A="MN:PCIClassFind"$(). @@ -232,8 +248,8 @@ $BK,1$* Zenith 1.0 released.$BK,0$ * Added several palettes. See the $LK,"palette setting functions",A="MN:PaletteSetDark"$. * Added option to format RAMdisks on $LK,"Reboot",A="MN:Reboot"$(). * Removed MemSetU8() as it was just an alias for $LK,"MemSet",A="MN:MemSet"$(). -* Moved TaskRep.CC and MemRep.CC from /Zenith to /Zenith/Utils -* Removed /Zenith/Opt directory, moved subdirectories up. +* Moved TaskRep.CC and MemRep.CC from /Zenith to /System/Utils +* Removed /System/Opt directory, moved subdirectories up. * Disabled blinking MENU. * Disabled scrolling title in editor. * One User terminal on startup. diff --git a/src/Doc/CharOverview.DD b/src/Doc/CharOverview.DD index f5f89d7d..70ef7ecd 100755 --- a/src/Doc/CharOverview.DD +++ b/src/Doc/CharOverview.DD @@ -1,17 +1,17 @@ $WW,1$$FG,5$$TX+CX,"Char Overview"$$FG$ -A $FG,2$Char$FG$acter is a single byte holding an ASCII code for a letter, num or sym. The $FG,2$ZenithOS$FG$ term is a $FG,2$U8$FG$. +A $FG,2$Char$FG$acter is a single byte holding an ASCII code for a letter, num or sym. The $FG,2$ZealOS$FG$ term is a $FG,2$U8$FG$. -Standard ASCII values range from 0 to 127. Values below 32 are ctrl key's. So, an ASCII #3 is a $FG,2$$FG$. ZenithOS uses a couple nonstandard values below 32. See $LK,"Char Definitions",A="MN:CH_CTRLA"$. +Standard ASCII values range from 0 to 127. Values below 32 are ctrl key's. So, an ASCII #3 is a $FG,2$$FG$. ZealOS uses a couple nonstandard values below 32. See $LK,"Char Definitions",A="MN:CH_CTRLA"$. ASCII #5 is the cursor location in a saved file. ASCII #28 is $FG,2$$FG$. -ZenithOS ASCII is 8-bit instead of 7-bit, so it also uses the range from 128-255. Press $FG,2$$FG$ to see shapes for 128-255. Technically, $FG,2$$FG$ are $LK,"screen codes",A="HI:TextBase Layer"$. +ZealOS ASCII is 8-bit instead of 7-bit, so it also uses the range from 128-255. Press $FG,2$$FG$ to see shapes for 128-255. Technically, $FG,2$$FG$ are $LK,"screen codes",A="HI:TextBase Layer"$. -A $FG,2$Key$FG$ is typically specified with a scan code. ZenithOS scan codes contain the key value in the lowest $FG,2$U8$FG$, and flags in the upper 3 bytes. See $LK,"Scan Code Flags",A="MN:SCF_CTRL"$ and $LK,"Scan Codes",A="MN:SC_INS"$. +A $FG,2$Key$FG$ is typically specified with a scan code. ZealOS scan codes contain the key value in the lowest $FG,2$U8$FG$, and flags in the upper 3 bytes. See $LK,"Scan Code Flags",A="MN:SCF_CTRL"$ and $LK,"Scan Codes",A="MN:SC_INS"$. -ZenithOS stores scan codes in 8 bytes. +ZealOS stores scan codes in 8 bytes. $FG,2$Byte 0$FG$ is the code. NumPad keys, SHIFT, ALT, CTRL and GUI keys combined. $FG,2$Byte 1-3$FG$ are $LK,"flags",A="MN:SCf_KEY_UP"$ diff --git a/src/Doc/Charter.DD b/src/Doc/Charter.DD index ce777cb3..c38b3bb5 100755 --- a/src/Doc/Charter.DD +++ b/src/Doc/Charter.DD @@ -1,4 +1,4 @@ -$FG,5$$WW,1$$TX+CX,"ZenithOS Charter"$$FG$ +$FG,5$$WW,1$$TX+CX,"ZealOS Charter"$$FG$ * The vision is the same usage model and niche as the Commodore 64 -- a simple machine where programming was the goal, not just a means to an end. However, it is modern, 64-bit and $FG,2$multi-cored$FG$. It is special purpose, not general purpose, so some things it will not do. Also, it's a kayak, not a Titanic. The priority is $FG,2$user developers$FG$, not $FG,2$3rd party developers$FG$. @@ -8,7 +8,7 @@ $FG,5$$WW,1$$TX+CX,"ZenithOS Charter"$$FG$ * There is a limit of 100,000 lines of code for all time, not including applications and demos. Currently, there are $TX,"80,849",D="DD_TEMPLEOS_LOC"$ lines of code. $FG,4$3rd party libraries are banned$FG$ because they circumvent the intent of this limit. The vision is a Commodore 64 ROM -- a fixed core API that is the only dependency of applications. Dependency on components and libraries creates a hell that is no longer blissful. -* The metric for resolving all ZenithOS code governance issues is how fast the compiler compiles itself and the kernel with $LK,"BootHDIns",A="MN:BootHDIns"$(). The $LK,"CosmiC",A="FI:::/Doc/CosmiC.DD"$ language should be changed to optimize this metric, as I did when I changed type casting from prefix standard C to postfix $LK,"CosmiC",A="FI:::/Doc/CosmiC.DD"$, but we need a rule to prevent degenerating into a brainfuck language. +* The metric for resolving all ZealOS code governance issues is how fast the compiler compiles itself and the kernel with $LK,"BootHDIns",A="MN:BootHDIns"$(). The $LK,"CosmiC",A="FI:::/Doc/CosmiC.DD"$ language should be changed to optimize this metric, as I did when I changed type casting from prefix standard C to postfix $LK,"CosmiC",A="FI:::/Doc/CosmiC.DD"$, but we need a rule to prevent degenerating into a brainfuck language. * Minimal abstraction is a goal. Sheep are fools. They always respect a design that is more complicated than another. Any genius can make it complicated. Like in physics, it takes a supra-genius to make it simple. @@ -46,4 +46,4 @@ $FG$ $FG,5$$WW,1$$TX+CX,"Possible Amendments"$$FG$ -The compiler's parser makes RISC code which it optimizes to CISC. I discovered this does not matter because the CPU converts it back to RISC and schedules it, internally. A ZenithOS zealot with more zeal than I, might say we should save lines-of-code by removing the CISC optimizing. +The compiler's parser makes RISC code which it optimizes to CISC. I discovered this does not matter because the CPU converts it back to RISC and schedules it, internally. A ZealOS zealot with more zeal than I, might say we should save lines-of-code by removing the CISC optimizing. diff --git a/src/Doc/Comm.CC b/src/Doc/Comm.CC index 21488284..6cd279a6 100755 --- a/src/Doc/Comm.CC +++ b/src/Doc/Comm.CC @@ -1,5 +1,5 @@ /* RS232 serial ports no longer exist. -Be sure to Zenith Include this by placing +Be sure to System Include this by placing it in your start-up scripts. */ diff --git a/src/Doc/CosmiC.DD b/src/Doc/CosmiC.DD index 6ff6ac59..31065ee5 100755 --- a/src/Doc/CosmiC.DD +++ b/src/Doc/CosmiC.DD @@ -54,7 +54,7 @@ U0 DemoCosmiC(U8 drive, U8 *format, U8 *name, I64 age) $FG$$ID,-2$ * When dealing with function addresses such as for callbacks, precede the name with "$FG,2$&$FG$". -* Type casting is postfix. To typecast int or F64, use $LK,"ToI64",A="MN:ToI64"$(), $LK,"ToBool",A="MN:ToBool"$() or $LK,"ToF64",A="MN:ToF64"$(). (ZenithOS follows normal C float<-->int conversion, but sometimes you want to override. These functions are better than multiplying by "1.0" to convert to float.) +* Type casting is postfix. To typecast int or F64, use $LK,"ToI64",A="MN:ToI64"$(), $LK,"ToBool",A="MN:ToBool"$() or $LK,"ToF64",A="MN:ToF64"$(). (ZealOS follows normal C float<-->int conversion, but sometimes you want to override. These functions are better than multiplying by "1.0" to convert to float.) * There is no $FG,2$main()$FG$ function. Any code outside of functions gets executed upon start-up, in order. @@ -198,7 +198,7 @@ $FG$$ID,-2$ * There is no question-colon operator. -* ZenithOS $LK,"operator precedence",A="FF:::/Compiler/CInit.CC,cmp.binary_ops"$ +* ZealOS $LK,"operator precedence",A="FF:::/Compiler/CInit.CC,cmp.binary_ops"$ $FG,2$`$FG$, $FG,2$>>$FG$, $FG,2$<<$FG$ $FG,2$*$FG$, $FG,2$/$FG$, $FG,2$%$FG$ $FG,2$&$FG$ diff --git a/src/Doc/Credits.DD b/src/Doc/Credits.DD index e51405b9..4aab3a7c 100755 --- a/src/Doc/Credits.DD +++ b/src/Doc/Credits.DD @@ -8,7 +8,7 @@ I, $FG,2$Terry A. Davis$FG$, wrote all of TempleOS over the past 15.4 years (ful *) The LZW compression algorithm, $LK,"::/Kernel/Compress.CC"$, came from a magazine and I implemented it when I worked for Ticketmaster. -*) The adaptive-step-size-Runge-Kutta algorithm, $LK,"::/Zenith/ZMathODE.CC"$, is adapted from the book, $UL,1$Numeric Recipies in C$UL,0$. +*) The adaptive-step-size-Runge-Kutta algorithm, $LK,"::/System/ZMathODE.CC"$, is adapted from the book, $UL,1$Numeric Recipies in C$UL,0$. *) The mountain in some games is from $FG,4$$TX,"http://www.public-domain-photos.com",HTML="http://www.public-domain-photos.com"$$FG$. The wolf in BlackDiamond is also from there. I took watermarked photos and converted to 16 color. diff --git a/src/Doc/Ctrls.DD b/src/Doc/Ctrls.DD index 131c75ce..45dbb690 100755 --- a/src/Doc/Ctrls.DD +++ b/src/Doc/Ctrls.DD @@ -1 +1 @@ -$WW,1$To create a ZenithOS graphic ctrl, you define callback functions and insert a $LK,"CCtrl",A="MN:CCtrl"$ structure in the $LK,"CTask",A="MN:CTask"$ queue. See $LK,"::/Demo/Graphics/Slider.CC"$, $LK,"::/Demo/Graphics/ScrollBars.CC"$ and $LK,"TermBttnNew",A="FF:::/Zenith/WallPaper.CC,TermBttnNew"$. There is a template-code ctrl generator, if you press $FG,2$$FG$. +$WW,1$To create a ZealOS graphic ctrl, you define callback functions and insert a $LK,"CCtrl",A="MN:CCtrl"$ structure in the $LK,"CTask",A="MN:CTask"$ queue. See $LK,"::/Demo/Graphics/Slider.CC"$, $LK,"::/Demo/Graphics/ScrollBars.CC"$ and $LK,"TermBttnNew",A="FF:::/System/WallPaper.CC,TermBttnNew"$. There is a template-code ctrl generator, if you press $FG,2$$FG$. diff --git a/src/Doc/CutCorners.DD b/src/Doc/CutCorners.DD index 24b408bc..25808e1c 100755 --- a/src/Doc/CutCorners.DD +++ b/src/Doc/CutCorners.DD @@ -1,12 +1,12 @@ $WW,1$$FG,5$$TX+CX,"Cut Corners"$ $FG$ -There are a few places where I cut corners in the interest of not junking-up code. This is part of the ZenithOS mentality. I try not to let stupid legacy compatibility issues enter and junk-up ZenithOS. +There are a few places where I cut corners in the interest of not junking-up code. This is part of the ZealOS mentality. I try not to let stupid legacy compatibility issues enter and junk-up ZealOS. * I made my type-casting operator post-fix because it makes the compiler way cleaner. -* ZenithOS does not figure-out $FG,2$FAT32$FG$ short name alias numbers. $LK,"FAT32DirNew",A="MN:FAT32DirNew"$(). It can cause hard drive corruption, so I might have to do it. It would really take a lot of junky code for this hatefully, detestable, legacy issue. "Please don't make me ruin my beautiful shiny-new ZenithOS with that!" I am also not enthused about $FG,2$FAT32$FG$ because it is in patent limbo. $FG,2$FAT32$FG$ might get removed from ZenithOS. There is the $LK,"RedSea",A="FI:::/Doc/RedSea.DD"$ 64-bit file system that works perfectly well. $FG,2$FAT32$FG$ is useful, however, because it assists in transferring between dual booted operating systems. +* ZealOS does not figure-out $FG,2$FAT32$FG$ short name alias numbers. $LK,"FAT32DirNew",A="MN:FAT32DirNew"$(). It can cause hard drive corruption, so I might have to do it. It would really take a lot of junky code for this hatefully, detestable, legacy issue. "Please don't make me ruin my beautiful shiny-new ZealOS with that!" I am also not enthused about $FG,2$FAT32$FG$ because it is in patent limbo. $FG,2$FAT32$FG$ might get removed from ZealOS. There is the $LK,"RedSea",A="FI:::/Doc/RedSea.DD"$ 64-bit file system that works perfectly well. $FG,2$FAT32$FG$ is useful, however, because it assists in transferring between dual booted operating systems. -* I changed the $LK,"asm opcodes",A="FI:::/Compiler/OpCodes.DD"$ names to remove the ambiguity between insts with different numbers of arguments, making my $LK,"assembler",A="FI:::/Compiler/Asm.CC"$ simpler and I did minimal 16-bit asm support, since 64-bit is what you should be using, unless you're doing a $LK,"boot loader",A="FI:::/Zenith/Boot/BootDVD.CC"$. +* I changed the $LK,"asm opcodes",A="FI:::/Compiler/OpCodes.DD"$ names to remove the ambiguity between insts with different numbers of arguments, making my $LK,"assembler",A="FI:::/Compiler/Asm.CC"$ simpler and I did minimal 16-bit asm support, since 64-bit is what you should be using, unless you're doing a $LK,"boot loader",A="FI:::/System/Boot/BootDVD.CC"$. * There are no user-controlled file-sharing locks. However, the drive and file system have locks and concurrent operations should be fine. diff --git a/src/Doc/D3.DD b/src/Doc/D3.DD index 75b838db..d3e3ebc1 100755 --- a/src/Doc/D3.DD +++ b/src/Doc/D3.DD @@ -1,3 +1,3 @@ -$WW,1$ZenithOS has a class for 3 dimensional points consisting of F64s. CosmiC is not C++ -- it does not support passing or returning values from functions which are not 64-bits, therefore, it can't be implemented with operator overloading. Making all function args and returns 64-bit is a core prinicple of ZenithOS. +$WW,1$ZealOS has a class for 3 dimensional points consisting of F64s. CosmiC is not C++ -- it does not support passing or returning values from functions which are not 64-bits, therefore, it can't be implemented with operator overloading. Making all function args and returns 64-bit is a core prinicple of ZealOS. As a courtesy, most of the CD3 functions return the addr of the destination vect, so you can nestle calls. They do not alloc new space for the destination vect. diff --git a/src/Doc/DebugOverview.DD b/src/Doc/DebugOverview.DD index 28d15f69..027f13e0 100755 --- a/src/Doc/DebugOverview.DD +++ b/src/Doc/DebugOverview.DD @@ -8,7 +8,7 @@ $WW,1$$FG,5$$TX+CX,"Debugging Overview"$$FG$ * I use $LK,"progress1",A="MN:progress1"$-$LK,"progress4",A="MN:progress4"$ for debugging because they show on the wallpaper. They're just global int vars. -* You can use $LK,"ZenithLog",A="MN:ZenithLog"$() to send text to the $LK,"Zenith Task",A="FF:::/Doc/Glossary.DD,Zenith Task"$ window. It works like $LK,"Print",A="MN:Print"$(). I never use that. Instead, I use $LK,"RawPrint",A="MN:RawPrint"$(). +* You can use $LK,"SysLog",A="MN:SysLog"$() to send text to the $LK,"System Task",A="FF:::/Doc/Glossary.DD,System Task"$ window. It works like $LK,"Print",A="MN:Print"$(). I never use that. Instead, I use $LK,"RawPrint",A="MN:RawPrint"$(). * $LK,"D",A="MN:D"$(), $LK,"DocD",A="MN:DocD"$(), $LK,"RawD",A="MN:RawD"$() to do 16 column hex dump mem with numbering from zero. With $LK,"DocD",A="MN:DocD"$ the values are updated continually and you can alter mem by editing. diff --git a/src/Doc/Define.DD b/src/Doc/Define.DD index 0a253d55..d329cdff 100755 --- a/src/Doc/Define.DD +++ b/src/Doc/Define.DD @@ -1,9 +1,9 @@ -$WW,1$ZenithOS has a string indirection feature implemented with the same hash symbol table entry as $FG,2$#define$FG$ macros, $LK,"HTT_DEFINE_STR",A="MN:HTT_DEFINE_STR"$. Support for string lists is also provided, but it's not very efficient, though, you can make a hash table with a list using $LK,"HashDefineListAdd",A="MN:HashDefineListAdd"$(). See $LK,"::/Zenith/DolDoc/DocInit.CC",A="FF:::/Zenith/DolDoc/DocInit.CC,HashDefineListAdd"$. +$WW,1$ZealOS has a string indirection feature implemented with the same hash symbol table entry as $FG,2$#define$FG$ macros, $LK,"HTT_DEFINE_STR",A="MN:HTT_DEFINE_STR"$. Support for string lists is also provided, but it's not very efficient, though, you can make a hash table with a list using $LK,"HashDefineListAdd",A="MN:HashDefineListAdd"$(). See $LK,"::/System/DolDoc/DocInit.CC",A="FF:::/System/DolDoc/DocInit.CC,HashDefineListAdd"$. If you have an $FG,2$@$FG$ as the first char of a define list entry, it is an alias for the prev entry num. Each task can load its own Define strings. Remember, when a $LK,"Hash",A="HI:Hash"$ table is searched for a string, if it is not found, the parent task's table is searched. -The $LK,"DolDoc",A="FI:::/Doc/DolDocOverview.DD"$ framework supports text that changes based on entries in the task's symbol table. Set a text entry with a $FG,2$D=$FG$ arg, as in $FG,2$$$TX,"",D="DD_MYSTRING"$$$FG$. See $LK,"::/Demo/DolDoc/DefineStr.CC"$, $LK,"::/Zenith/ZDefine.CC"$ and $LK,"::/Doc/MemoryOverview.DD"$. +The $LK,"DolDoc",A="FI:::/Doc/DolDocOverview.DD"$ framework supports text that changes based on entries in the task's symbol table. Set a text entry with a $FG,2$D=$FG$ arg, as in $FG,2$$$TX,"",D="DD_MYSTRING"$$$FG$. See $LK,"::/Demo/DolDoc/DefineStr.CC"$, $LK,"::/System/ZDefine.CC"$ and $LK,"::/Doc/MemoryOverview.DD"$. See $LK,"::/Demo/Define.CC"$. diff --git a/src/Doc/Demands.DD b/src/Doc/Demands.DD index 2836725c..f62adf26 100755 --- a/src/Doc/Demands.DD +++ b/src/Doc/Demands.DD @@ -1,17 +1,17 @@ $WW,1$$FG,5$$TX+CX,"Demands"$$FG$ -I, Terry Davis, am high priest of God's $FG,4$$TX,"official third temple",HTML="http://www.jewishvirtuallibrary.org/jsource/Judaism/The_Temple.html"$$FG$, ZenithOS. ZenithOS is an operating system for IBM PC x86_64 desktops that will always dual boot along-side Windows or Linux. I am in charge of the core 100,000 lines of ZenithOS code and I do continual offerings to keep God entertained. I have divine authority to command any company in the computer industry to do anything that I deem necessary to make God's temple more beautiful, glorious and perfect. I have oversight authority similar to a building inspector or a person enforcing the Americans with Disability Act -- I make commands, God signs-off with a miraculous authentication from an oracle, and Intel, Microsoft or VMware obeys. +Terry Davis was high priest of God's $FG,4$$TX,"official third temple",HTML="http://www.jewishvirtuallibrary.org/jsource/Judaism/The_Temple.html"$$FG$, TempleOS. ZealOS is an operating system for IBM PC x86_64 desktops that will always dual boot along-side Windows or Linux. I am in charge of the core 100,000 lines of ZealOS code and I do continual offerings to keep God entertained. I have divine authority to command any company in the computer industry to do anything that I deem necessary to make God's temple more beautiful, glorious and perfect. I have oversight authority similar to a building inspector or a person enforcing the Americans with Disability Act -- I make commands, God signs-off with a miraculous authentication from an oracle, and Intel, Microsoft or VMware obeys. $HC,""$ * Windows, Linux and VMware (because of mounted drives) must support $LK,"RedSea",A="FI:::/Doc/RedSea.DD"$ file system when mounting partition, so I can get rid of 1,000 lines of redundant, blemished code -- FAT32. God's temple must be perfect. Redundant code for multiple file systems is bad and imperfect. For this operating system, we want low line count. More than one driver for the same type of device is also bad. -See $LK,"::/Kernel/BlkDev/FileSysRedSea.CC"$ and $LK,"::/Zenith/Boot/DiskISORedSea.CC"$. +See $LK,"::/Kernel/BlkDev/FileSysRedSea.CC"$ and $LK,"::/System/Boot/DiskISORedSea.CC"$. $LK,"::/Kernel/BlkDev/FileSysFAT.CC"$ :974 lines for FAT32 gets eliminated. $LK,"::/Kernel/BlkDev/DiskClus.CC"$ :152 All the clus operations become blk. -* Microsoft must cancel SecureBoot because it makes dual booting impossible. ZenithOS is an additional operating system that must be used along-side Windows or Linux, not as a replacement. It must dual boot because it has no networking. Real hardware as opposed to VMware is like the difference between looking in a telescope eye piece vs just looking at an off-line image. God said the C64/Apple II generation owned ancestral lands. VMware is like being taken off of our land and moved onto a reservation. In this case, however, it will not stand. In fact, God said to replace Windows with Wine, justice. We can make a 100% standard model PC with a standard software for everyone, backed-up in factory ROM. +* Microsoft must cancel SecureBoot because it makes dual booting impossible. ZealOS is an additional operating system that must be used along-side Windows or Linux, not as a replacement. It must dual boot because it has no networking. Real hardware as opposed to VMware is like the difference between looking in a telescope eye piece vs just looking at an off-line image. God said the C64/Apple II generation owned ancestral lands. VMware is like being taken off of our land and moved onto a reservation. In this case, however, it will not stand. In fact, God said to replace Windows with Wine, justice. We can make a 100% standard model PC with a standard software for everyone, backed-up in factory ROM. * VMware needs to support ATAPI CD/DVD/Blu-ray disk burning, directly to real hardware. Industry needs write-just once media to stop Farenheit 451 non-sense. @@ -19,7 +19,7 @@ $LK,"::/Kernel/BlkDev/DiskClus.CC"$ :152 All the clus operations become blk. * VMware some PC speaker's distortion is a good idea -- squarewave -- but currently there is too much for hymns. CIA monkery made fart noises. -* VMware and others must list ZenithOS as an official 64-bit operating system and automatically enforce 512 Meg min RAM requirement. +* VMware and others must list ZealOS as an official 64-bit operating system and automatically enforce 512 Meg min RAM requirement. * VMware needs to support more than 16 cores. I had a 24 core Xeon with 128 Gig of RAM. I discovered VMware allocates memory too slowly, where QEMU had no problem. @@ -29,26 +29,26 @@ $LK,"/Kernel/PCIBIOS.CC",A="FI:::/Kernel/PCIBIOS.CC"$ :290 could be elimina * Until super-simple serial ports are available, PS/2 emulated keyboard and mouse must work. The BIOS must enable these. The plan is to transition the industry off of USB. Interum solution is to make virtual RS232 Octart for USB devices in the same way PS/2 mouse is emulated. All mice will be two button, one wheel. No more HID insanity, no more multi-end point, just simple tx rx fifos with soft/hard flowcontrol that can jump the queue. People with special needs can buy PCI cards. Our kids deserve code this simple $LK,"::/Doc/Comm.CC"$. The right to do your own port banging is what the C64 being our God given ancestral land means. -* The x86 IN/OUT port instructions, normally have a delay. Perhaps, VMware & Intel can enable faster x86 IN/OUT instruction timing for ATA/ATAPI PIO, so bandwidth isn't as bad when doing port I/O. See $LK,"IDEATAGetRes",A="MN:IDEATAGetRes"$(). We don't want to do DMA. Perhaps, x86 CPU chips need a new ZenithOS mode for fast IN/OUT instructions? I think VMware already does something to speed disk I/O to faster than native speed. +* The x86 IN/OUT port instructions, normally have a delay. Perhaps, VMware & Intel can enable faster x86 IN/OUT instruction timing for ATA/ATAPI PIO, so bandwidth isn't as bad when doing port I/O. See $LK,"IDEATAGetRes",A="MN:IDEATAGetRes"$(). We don't want to do DMA. Perhaps, x86 CPU chips need a new ZealOS mode for fast IN/OUT instructions? I think VMware already does something to speed disk I/O to faster than native speed. * Perhaps, a new interrupt descriptor table entry type or a new x86 CPU mode can be made that cause fast software interrupts, doing exactly what the CALL REL32 does, but with IDT as indirection. We don't need to change privilege levels or stacks. * Since I don't use paging (for anything), Intel should have an option for no-paging long mode, and optimize it! $LK,"::/Kernel/Memory/PageTables.CC"$ :135 lines to identity-map gets eliminated. -* Desktop computers must have a reset switch and a fast reboot option, skipping diagnostics. I recommend booting ZenithOS from a ROM when the reset bttn is pressed and booting UEFI when the power bttn is pressed. Or, we could build UEFI on a ZenithOS layer. Intel must burn ZenithOS into a ROM in the factory for all desktop x86 CPUs to ensure tamper-proof trust in the oracle and because God deserves the glory. There will be just an English version. A new ROM version is released every seven years. The ROM should boot like the DVD boots, but with $LK,"BOOT_SRC_ROM",A="MN:BOOT_SRC_ROM"$. +* Desktop computers must have a reset switch and a fast reboot option, skipping diagnostics. I recommend booting ZealOS from a ROM when the reset bttn is pressed and booting UEFI when the power bttn is pressed. Or, we could build UEFI on a ZealOS layer. Intel must burn ZealOS into a ROM in the factory for all desktop x86 CPUs to ensure tamper-proof trust in the oracle and because God deserves the glory. There will be just an English version. A new ROM version is released every seven years. The ROM should boot like the DVD boots, but with $LK,"BOOT_SRC_ROM",A="MN:BOOT_SRC_ROM"$. * We do not want UTF, just 8-bit characters. $FG,2$$FG$ toggles between Cyrillic and Std Fonts. We need the twelve window $LK,"TextBorder",A="MN:TextBorder"$ characters added to the VGA font 0x02-0x0D. Japan, China and Korea must switch to alphabets. Maybe, the United States will change to metric, out of good will. I am beginning to plan fresh ASCII replacement, $LK,"::/Doc/NewASCII.DD"$. -* Microsoft Paint and Linux's Gimp must support ZenithOS $LK,"GR Files",A="FI:::/Doc/GRFiles.DD"$. They are blemish free, unlike $TX,"BMP files",HTML="http://en.wikipedia.org/wiki/BMP_file_format"$. The TOSZ Linux utility can be used to make screencasts from ZenithOS exported $LK,"GR Files",A="FI:::/Doc/GRFiles.DD"$ and AU Files. +* Microsoft Paint and Linux's Gimp must support ZealOS $LK,"GR Files",A="FI:::/Doc/GRFiles.DD"$. They are blemish free, unlike $TX,"BMP files",HTML="http://en.wikipedia.org/wiki/BMP_file_format"$. The TOSZ Linux utility can be used to make screencasts from ZealOS exported $LK,"GR Files",A="FI:::/Doc/GRFiles.DD"$ and AU Files. * We must have a nice dictionary. Someone needs to do a $LK,"Spell Checker",A="FI:::/Demo/SuggestSpelling.CC"$, too. -* Intel needs to make $LK,"DolDoc",A="FI:::/Doc/DolDocOverview.DD"$ versions of its x86 CPU data sheets documenting all hardware relevant to ZenithOS. +* Intel needs to make $LK,"DolDoc",A="FI:::/Doc/DolDocOverview.DD"$ versions of its x86 CPU data sheets documenting all hardware relevant to ZealOS. * We must have the ultimate Bible search engine. Currently, all we have is $TX,"filter search",HTML="https://www.youtube.com/watch?v=ULJU8DzvQFo"$. In the end, it should be a low line-count technique. Maybe, I allocate 500 lines out of the 20,000 reserve. -* We will make a $LK,"Standard ZenithOS PC",A="FI:::/Doc/StdZenithOSPC.DD"$. +* We will make a $LK,"Standard ZealOS PC",A="FI:::/Doc/StdZealOSPC.DD"$. $FG,8$ * "VMware" is a trademark owned by VMware, Inc. * "Linux" is a trademark owned by Linus Torvalds. diff --git a/src/Doc/DemoIndex.DD b/src/Doc/DemoIndex.DD index bdd0d916..07516b79 100755 --- a/src/Doc/DemoIndex.DD +++ b/src/Doc/DemoIndex.DD @@ -1,4 +1,4 @@ -$FG,5$$TX+CX,"ZenithOS Demo Index"$$FG$ +$FG,5$$TX+CX,"ZealOS Demo Index"$$FG$ $WW,1$These are arranged in increasing order of difficulty, more or less. This can be used as a tutorial if you start at the beginning and work your way forward. @@ -27,7 +27,7 @@ $LK,"::/Demo/RandDemo.CC"$ $LK,"::/Demo/KeyBitMap.CC"$ $LK,"::/Demo/Graphics/WinZBuf.CC"$ $LK,"::/Demo/Graphics/Elephant.CC"$ -$LK,"::/Demo/Graphics/WallPaperFish.CC"$ //Press SHIFT-F5 to Zenith Include +$LK,"::/Demo/Graphics/WallPaperFish.CC"$ //Press SHIFT-F5 to System Include $LK,"::/Demo/Games/Digits.CC"$ $LK,"::/Demo/Progress.CC"$ //has some ASM, just ignore $LK,"::/Demo/Graphics/Symmetry.CC"$ @@ -77,7 +77,7 @@ $LK,"::/Demo/MultiCore/Palindrome.CC"$ $LK,"::/Demo/MultiCore/MPAdd.CC"$ $LK,"::/Demo/MultiCore/Lock.CC"$ $LK,"::/Demo/Graphics/Slider.CC"$ -$LK,"::/Demo/Graphics/WallPaperCtrl.CC"$ //Press SHIFT-F5 to Zenith Include +$LK,"::/Demo/Graphics/WallPaperCtrl.CC"$ //Press SHIFT-F5 to System Include $LK,"::/Demo/Graphics/ScrollBars.CC"$ $LK,"::/Demo/RegistryDemo.CC"$ $LK,"::/Demo/Games/FlapBat.CC"$ @@ -147,7 +147,7 @@ $MA-X+PU,"::/Apps/TimeClock",LM="Cd(\"::/Apps/TimeClock\");Dir;View;\n"$ $MA-X+PU,"::/Apps/Logic",LM="Cd(\"::/Apps/Logic\");Dir;View;\n"$ $MA-X+PU,"::/Demo/Lectures",LM="Cd(\"::/Demo/Lectures\");Dir;View;\n"$ $MA-X+PU,"::/Apps/Budget",LM="Cd(\"::/Apps/Budget\");Dir;View;\n"$ -$ID,-2$$TR,"ZenithOS Specific"$ +$ID,-2$$TR,"ZealOS Specific"$ $ID,2$$MA-X+PU,"::/Demo/InFile",LM="Cd(\"::/Demo/InFile\");Dir;View;\n"$ $LK,"::/Demo/Print.CC"$ $LK,"::/Demo/SubIntAccess.CC"$ @@ -189,5 +189,5 @@ $LK,"::/Demo/Asm/AsmAndC2.CC"$ $LK,"::/Demo/Asm/AsmAndC3.CC"$ $LK,"::/Demo/GlobalVars.CC"$ $LK,"::/Misc/OSTestSuite.CC"$ -$MA-X+PU,"::/Zenith",LM="Cd(\"::/Zenith\");Dir;View;\n"$ +$MA-X+PU,"::/System",LM="Cd(\"::/System\");Dir;View;\n"$ $ID,-2$ diff --git a/src/Doc/DolDocOverview.DD b/src/Doc/DolDocOverview.DD index 16bd6504..ab12898d 100755 --- a/src/Doc/DolDocOverview.DD +++ b/src/Doc/DolDocOverview.DD @@ -1,21 +1,21 @@ $WW,1$$FG,5$$TX+CX,"DolDoc Overview"$$FG$ -DolDoc is a ZenithOS document type supported by $LK,"DolDoc Routines",A="HI:DolDoc"$. In a document, commands are bracketed with '$FG,2$$$$FG$'s. Use $FG,2$$FG$ to experiment inserting a command. Then, use $FG,2$$FG$ to toggle to plain text to see it. +DolDoc is a ZealOS document type supported by $LK,"DolDoc Routines",A="HI:DolDoc"$. In a document, commands are bracketed with '$FG,2$$$$FG$'s. Use $FG,2$$FG$ to experiment inserting a command. Then, use $FG,2$$FG$ to toggle to plain text to see it. Here is the grammar: - := $FG,2$$$$FG$<$LK,"TwoLetterCmd",A="FF:::/Zenith/DolDoc/DocInit.CC,ST_DOC_CMDS"$>[][$FG,2$,$FG$]$FG,2$$$$FG$ | $FG,2$$$$FG$$LK,"ColorName",A="MN:ST_COLORS"$$FG,2$$$$FG$ + := $FG,2$$$$FG$<$LK,"TwoLetterCmd",A="FF:::/System/DolDoc/DocInit.CC,ST_DOC_CMDS"$>[][$FG,2$,$FG$]$FG,2$$$$FG$ | $FG,2$$$$FG$$LK,"ColorName",A="MN:ST_COLORS"$$FG,2$$$$FG$ - := $FG,2$+$FG$|$FG,2$-$FG$ <$LK,"FlagCode",A="FF:::/Zenith/DolDoc/DocInit.CC,ST_DOC_FLAGS"$>[$FG$] + := $FG,2$+$FG$|$FG,2$-$FG$ <$LK,"FlagCode",A="FF:::/System/DolDoc/DocInit.CC,ST_DOC_FLAGS"$>[$FG$] - := <$LK,"ArgCode",A="FF:::/Zenith/DolDoc/DocInit.CC,ST_DOC_FLAGS"$>$FG,2$=$FG$[$FG,2$,$FG$] + := <$LK,"ArgCode",A="FF:::/System/DolDoc/DocInit.CC,ST_DOC_FLAGS"$>$FG,2$=$FG$[$FG,2$,$FG$] -The format of DolDoc cmds is a two character code, +/-flags, a comma and args separated by commas. Some commands have mandatory args. Optional args are indicated with <$LK,"ArgCode",A="FF:::/Zenith/DolDoc/DocInit.CC,ST_DOC_FLAGS"$>$FG,2$=$FG$. A $LK,"ColorName",A="MN:ST_COLORS"$ bracked by dollars, will change the foreground color. +The format of DolDoc cmds is a two character code, +/-flags, a comma and args separated by commas. Some commands have mandatory args. Optional args are indicated with <$LK,"ArgCode",A="FF:::/System/DolDoc/DocInit.CC,ST_DOC_FLAGS"$>$FG,2$=$FG$. A $LK,"ColorName",A="MN:ST_COLORS"$ bracked by dollars, will change the foreground color. See $LK,"::/Doc/Widget.DD"$, $LK,"::/Demo/DolDoc/DemoDoc.DD"$, and $LK,"::/Demo/ToHtmlToTXTDemo/ToHtml.CC"$. -<$LK,"TwoLetterCmd",A="FF:::/Zenith/DolDoc/DocInit.CC,ST_DOC_CMDS"$> See $LK,"Type Defines",A="MN:DOCT_TEXT"$ and $LK,"ParseDollarCmd",A="MN:ParseDollarCmd"$(). +<$LK,"TwoLetterCmd",A="FF:::/System/DolDoc/DocInit.CC,ST_DOC_CMDS"$> See $LK,"Type Defines",A="MN:DOCT_TEXT"$ and $LK,"ParseDollarCmd",A="MN:ParseDollarCmd"$(). $TR,"TX Text"$ $ID,2$Normally, text is not bracketed with '$FG,2$$$$FG$', but if you wish to specify flag attr, such as centering text, you can bracket them with '$FG,2$$$$FG$' and enter flags such as "$FG,2$+CX$FG$". You can't edit them normally if they are bracketed by '$FG,2$$$$FG$' unless you toggle to plain text mode with $FG,2$$FG$. $ID,-2$$TR,"CR Hard New Line"$ @@ -122,9 +122,9 @@ Examples: to see $ID,-2$$TR,"BT Bttn"$ $ID,2$See $LK,"::/Demo/DolDoc/MenuBttn.CC"$. $ID,-2$$TR,"DA Data"$ -$ID,2$Used for forms that prompt for data or just displaying a value. Use $FG,2$$FG$ to help you generate the DolDoc command text you need in your $LK,"CosmiC",A="FI:::/Doc/CosmiC.DD"$ $FG,2$class$FG$ member's $FG,2$format$FG$ meta-data for $LK,"DocForm",A="MN:DocForm"$(). See $LK,"::/Demo/DolDoc/Form.CC"$, $LK,"::/Demo/Disk/DataBase.CC"$, and $LK,"::/Zenith/DolDoc/DocWidgetWiz.CC"$. +$ID,2$Used for forms that prompt for data or just displaying a value. Use $FG,2$$FG$ to help you generate the DolDoc command text you need in your $LK,"CosmiC",A="FI:::/Doc/CosmiC.DD"$ $FG,2$class$FG$ member's $FG,2$format$FG$ meta-data for $LK,"DocForm",A="MN:DocForm"$(). See $LK,"::/Demo/DolDoc/Form.CC"$, $LK,"::/Demo/Disk/DataBase.CC"$, and $LK,"::/System/DolDoc/DocWidgetWiz.CC"$. -If you are not using $LK,"DocForm",A="MN:DocForm"$(), make a $FG,2$$$DA...$$$FG$ statement with $LK,"DocPrint",A="MN:DocPrint"$() and fill-in the $FG,2$->data$FG$ addr. See $LK,"task_title",A="FF:::/Zenith/DolDoc/DocEd.CC,&Fs->task_title"$. +If you are not using $LK,"DocForm",A="MN:DocForm"$(), make a $FG,2$$$DA...$$$FG$ statement with $LK,"DocPrint",A="MN:DocPrint"$() and fill-in the $FG,2$->data$FG$ addr. See $LK,"task_title",A="FF:::/System/DolDoc/DocEd.CC,&Fs->task_title"$. The default raw data type for the $FG,2$$$DA...$$$FG$ command is $FG,2$RT=I64$FG$. $LK,"DocForm",A="MN:DocForm"$() will automatically reset the raw type to the value from the $LK,"CosmiC",A="FI:::/Doc/CosmiC.DD"$ $FG,2$class$FG$ member's definition if you leave it set to the default. Or, if not using $LK,"DocForm",A="MN:DocForm"$(), specify a raw data type of $FG,2$I8$FG$, $FG,2$U8$FG$, $FG,2$I16$FG$, $FG,2$U16$FG$, $FG,2$I32$FG$, $FG,2$U32$FG$, $FG,2$I64$FG$, $FG,2$U64$FG$, or $FG,2$F64$FG$. See $LK,"DocDataFormat",A="MN:DocDataFormat"$() and $LK,"DocDataScan",A="MN:DocDataScan"$(). @@ -132,17 +132,17 @@ The $LK,"CDocEntry",A="MN:CDocEntry"$.aux_str arg $FG,2$A=""$FG$ is used for the The default field length is $FG,2$LEN=64$FG$ characters. For U8 arrays[], $LK,"DocForm",A="MN:DocForm"$() will automatically reset the field length to the string length from the $LK,"CosmiC",A="FI:::/Doc/CosmiC.DD"$ $FG,2$class$FG$ member's definition. The length measures starting after the ':' in the $FG,2$A=""$FG$ format string. -The space after the first ':' in the format string marks the first valid cursor pos. See $LK,"Data Tag Width",A="FA:::/Zenith/DolDoc/DocPlain.CC,DataTagWidth"$. +The space after the first ':' in the format string marks the first valid cursor pos. See $LK,"Data Tag Width",A="FA:::/System/DolDoc/DocPlain.CC,DataTagWidth"$. $ID,-2$$TR,"CB Check Box"$ $ID,2$Used for forms. Use $FG,2$$FG$ to help you generate the DolDoc command text you need in your $LK,"CosmiC",A="FI:::/Doc/CosmiC.DD"$ $FG,2$class$FG$ member's $FG,2$format$FG$ meta-data for $LK,"DocForm",A="MN:DocForm"$(). See $LK,"::/Demo/DolDoc/Form.CC"$$FG$ and $LK,"CEdFindText",A="MN:CEdFindText"$. -If you are not using $LK,"DocForm",A="MN:DocForm"$(), make a $FG,2$$$CB...$$$FG$ statement with $LK,"DocPrint",A="MN:DocPrint"$() and fill-in the $FG,2$->data$FG$ addr. See $LK,"task_title",A="FF:::/Zenith/DolDoc/DocEd.CC,&Fs->task_title"$. +If you are not using $LK,"DocForm",A="MN:DocForm"$(), make a $FG,2$$$CB...$$$FG$ statement with $LK,"DocPrint",A="MN:DocPrint"$() and fill-in the $FG,2$->data$FG$ addr. See $LK,"task_title",A="FF:::/System/DolDoc/DocEd.CC,&Fs->task_title"$. The default raw data type for the $FG,2$$$CB...$$$FG$ command is $FG,2$RT=I8$FG$ which is $FG,2$Bool$FG$. $LK,"DocForm",A="MN:DocForm"$() will automatically reset the raw type to the value from the $LK,"CosmiC",A="FI:::/Doc/CosmiC.DD"$ $FG,2$class$FG$ member's definition if you leave it set to the default. Or, if not using $LK,"DocForm",A="MN:DocForm"$(), specify a raw data type of $FG,2$I8$FG$, $FG,2$U8$FG$, $FG,2$I16$FG$, $FG,2$U16$FG$, $FG,2$I32$FG$, $FG,2$U32$FG$, $FG,2$I64$FG$, $FG,2$U64$FG$, or $FG,2$F64$FG$. See $LK,"DocDataFormat",A="MN:DocDataFormat"$() and $LK,"DocDataScan",A="MN:DocDataScan"$(). $ID,-2$$TR,"LS List Widget"$ $ID,2$Used for forms that prompt for data. You must specify a define list, $FG,2$D=""$FG$. Use $FG,2$$FG$ to help you generate the DolDoc command text you need in your $LK,"CosmiC",A="FI:::/Doc/CosmiC.DD"$ $FG,2$class$FG$ member's $FG,2$format$FG$ meta-data for $LK,"DocForm",A="MN:DocForm"$(). See $LK,"::/Demo/DolDoc/Form.CC"$. -If you are not using $LK,"DocForm",A="MN:DocForm"$(), make a $FG,2$$$LS...$$$FG$ statement with $LK,"DocPrint",A="MN:DocPrint"$() and fill-in the data addr. See $LK,"task_title",A="FF:::/Zenith/DolDoc/DocEd.CC,&Fs->task_title"$. +If you are not using $LK,"DocForm",A="MN:DocForm"$(), make a $FG,2$$$LS...$$$FG$ statement with $LK,"DocPrint",A="MN:DocPrint"$() and fill-in the data addr. See $LK,"task_title",A="FF:::/System/DolDoc/DocEd.CC,&Fs->task_title"$. The default raw data type for the $FG,2$$$LS...$$$FG$ command is $FG,2$RT=I64$FG$. $LK,"DocForm",A="MN:DocForm"$() will automatically reset the raw type to the value from the $LK,"CosmiC",A="FI:::/Doc/CosmiC.DD"$ $FG,2$class$FG$ member's definition if you leave it set to the default. Or, if not using $LK,"DocForm",A="MN:DocForm"$(), specify a raw data type of $FG,2$I8$FG$, $FG,2$U8$FG$, $FG,2$I16$FG$, $FG,2$U16$FG$, $FG,2$I32$FG$, $FG,2$U32$FG$, $FG,2$I64$FG$, $FG,2$U64$FG$, or $FG,2$F64$FG$. See $LK,"DocDataFormat",A="MN:DocDataFormat"$() and $LK,"DocDataScan",A="MN:DocDataScan"$(). $ID,-2$$TR,"MA Macro"$ @@ -187,7 +187,7 @@ $ID,2$See $LK,"::/Demo/ToHtmlToTXTDemo/ToHtml.CC"$ to generate a html version of $ID,-2$$TR,"ER Error"$ $ID,2$When errors are detected in DolDoc cmds, an $FG,2$ER$FG$ entry is generated. $ID,-2$ -<$LK,"FlagCode",A="FF:::/Zenith/DolDoc/DocInit.CC,ST_DOC_FLAGS"$> See $LK,"Flag Defines",A="MN:DOCEf_LEFT_CB"$ and $LK,"Simple Flags",A="FI:::/Doc/Widget.DD"$. +<$LK,"FlagCode",A="FF:::/System/DolDoc/DocInit.CC,ST_DOC_FLAGS"$> See $LK,"Flag Defines",A="MN:DOCEf_LEFT_CB"$ and $LK,"Simple Flags",A="FI:::/Doc/Widget.DD"$. $TR,"+H Hold"$ $ID,2$Causes not to delete this cmd when cleared with $FG,2$CL$FG$ or when the doc->max_entries is exceeded. Word wrap is a good to hold. There is no way to delete these entries, at this point. $ID,-2$$TR,"+L Link"$ @@ -219,19 +219,19 @@ $ID,2$See $LK,"::/Demo/DolDoc/ClickCallBack.CC"$. $ID,-2$$TR,"+RC Right CallBack"$ $ID,2$See $LK,"::/Demo/DolDoc/ClickCallBack.CC"$. $ID,-2$ -<$LK,"ArgCode",A="FF:::/Zenith/DolDoc/DocInit.CC,ST_DOC_FLAGS"$> See $LK,"Arg Defines",A="MN:DOCEf_TAG"$. +<$LK,"ArgCode",A="FF:::/System/DolDoc/DocInit.CC,ST_DOC_FLAGS"$> See $LK,"Arg Defines",A="MN:DOCEf_TAG"$. $TR,"T=\"\" Tag Str"$ -$ID,2$Some cmds have a tag by default. See $LK,"TX+T",A="FF:::/Zenith/DolDoc/DocInit.CC,TX+T"$. You can code $FG,2$T="tag_text"$FG$ as just $FG,2$"tag_text"$FG$ with no $FG,2$T=$FG$. +$ID,2$Some cmds have a tag by default. See $LK,"TX+T",A="FF:::/System/DolDoc/DocInit.CC,TX+T"$. You can code $FG,2$T="tag_text"$FG$ as just $FG,2$"tag_text"$FG$ with no $FG,2$T=$FG$. $ID,-2$$TR,"LEN=\"\" Field Length"$ $ID,2$The default field length for $FG,2$$$DA...$$$FG$ commands is $FG,2$LEN=64$FG$ characters. For U8 arrays[], $LK,"DocForm",A="MN:DocForm"$() will automatically reset the field length to the string length from the $LK,"CosmiC",A="FI:::/Doc/CosmiC.DD"$ $FG,2$class$FG$ member's definition. The length measures starting after the ':' in the $FG,2$A=""$FG$ format string. -The space after the first ':' in the format string marks the first valid cursor pos. See $LK,"Data Tag Width",A="FA:::/Zenith/DolDoc/DocPlain.CC,DataTagWidth"$. +The space after the first ':' in the format string marks the first valid cursor pos. See $LK,"Data Tag Width",A="FA:::/System/DolDoc/DocPlain.CC,DataTagWidth"$. $ID,-2$$TR,"A=\"\" Auxilliary Str"$ $ID,2$Some cmds need auxilliary strings. $FG,2$A="str"$FG$ means an $LK,"CDocEntry",A="MN:CDocEntry"$.aux_str is present. aux_str is used for song note text, link text, anchor text, and $FG,2$$$DA...$$$FG$ format string text. $ID,-2$$TR,"D=\"\" Define Str"$ $ID,2$A $FG,2$D=""$FG$ means either a $LK,"define",A="HI:Define"$ str indirection is present on a text widget, or a define list is present on a list widget. -For indirection, the tag will be regenerated by substituting the value of a system $FG,2$#define$FG$ or $LK,"DefineLoad",A="MN:DefineLoad"$() string. See $LK,"::/Demo/DolDoc/DefineStr.CC"$, $LK,"::/Zenith/ZDefine.CC"$ and $LK,"::/Doc/MemoryOverview.DD"$. +For indirection, the tag will be regenerated by substituting the value of a system $FG,2$#define$FG$ or $LK,"DefineLoad",A="MN:DefineLoad"$() string. See $LK,"::/Demo/DolDoc/DefineStr.CC"$, $LK,"::/System/ZDefine.CC"$ and $LK,"::/Doc/MemoryOverview.DD"$. For $FG,2$LS$FG$ widgets, see $LK,"::/Demo/DolDoc/Form.CC"$. $ID,-2$$TR,"HTML=\"\""$ diff --git a/src/Doc/EdPullDown.DD b/src/Doc/EdPullDown.DD index 5b88f85e..2466f03e 100755 --- a/src/Doc/EdPullDown.DD +++ b/src/Doc/EdPullDown.DD @@ -55,7 +55,7 @@ Program { CodeTools(,CH_CTRLL,0x62600000626); Include(,0,0x3F0000003F); - ZenithInclude(,0,0x23F0000023F); + ZealInclude(,0,0x23F0000023F); } View diff --git a/src/Doc/FAQ.DD b/src/Doc/FAQ.DD index 6989b3c9..9e7c10e4 100755 --- a/src/Doc/FAQ.DD +++ b/src/Doc/FAQ.DD @@ -1,27 +1,27 @@ $WW,1$$FG,5$$TX+CX,"Frequently Asked Queuestions"$$FG$ $TR,"How come it is public domain, not GPL?"$ -$ID,2$I, $FG,2$Terry A. Davis$FG$, wrote all of ZenithOS over the past $TX,"13.8",D="DD_TEMPLEOS_AGE"$ years (full-time). It can run on some bare metal 64-bit PC's from about 2005-2010 with no layering, libraries, tools, modules or anything from other sources. Otherwise, you run it in a virtual machine, like $FG,2$VMware$FG$, $FG,2$QEMU$FG$ or $FG,2$VirtualBox$FG$. It is independent and stands alone. It has no networking, so it certainly doesn't call home. 100% of the src code is including on all distro's, from the kernel to the compiler to the boot loaders! See $LK,"::/Doc/Credits.DD"$. -$ID,-2$$TR,"Shouldn't it be GNU/ZenithOS?"$ -$ID,2$ZenithOS executes no code not written by me at any time except for a few $FG,2$BIOS$FG$ calls for configuration. I even wrote boot-loaders, so I do not need Grub. See $LK,"::/Doc/Credits.DD"$. +$ID,2$I, $FG,2$Terry A. Davis$FG$, wrote all of ZealOS over the past $TX,"13.8",D="DD_TEMPLEOS_AGE"$ years (full-time). It can run on some bare metal 64-bit PC's from about 2005-2010 with no layering, libraries, tools, modules or anything from other sources. Otherwise, you run it in a virtual machine, like $FG,2$VMware$FG$, $FG,2$QEMU$FG$ or $FG,2$VirtualBox$FG$. It is independent and stands alone. It has no networking, so it certainly doesn't call home. 100% of the src code is including on all distro's, from the kernel to the compiler to the boot loaders! See $LK,"::/Doc/Credits.DD"$. +$ID,-2$$TR,"Shouldn't it be GNU/ZealOS?"$ +$ID,2$ZealOS executes no code not written by me at any time except for a few $FG,2$BIOS$FG$ calls for configuration. I even wrote boot-loaders, so I do not need Grub. See $LK,"::/Doc/Credits.DD"$. $ID,-2$$TR,"Don't you use GNU's gcc?"$ -$ID,2$ZenithOS was written from scratch, starting with $FG,2$TASM$FG$ long ago, launching from real-mode DOS. Now, there is no $FG,2$Linux$FG$ or $FG,2$GNU$FG$ or any other code in ZenithOS. Yes, I wrote the compiler from scratch. See $LK,"::/Doc/Credits.DD"$. +$ID,2$ZealOS was written from scratch, starting with $FG,2$TASM$FG$ long ago, launching from real-mode DOS. Now, there is no $FG,2$Linux$FG$ or $FG,2$GNU$FG$ or any other code in ZealOS. Yes, I wrote the compiler from scratch. See $LK,"::/Doc/Credits.DD"$. $ID,-2$$TR,"Why do you dual boot?"$ -$ID,2$ZenithOS is 100% independent -- it does not access the files of your primary operating system and ZenithOS will work as the only operating system on your computer, but it has no networking. In your off hours, you will use your other operating system. +$ID,2$ZealOS is 100% independent -- it does not access the files of your primary operating system and ZealOS will work as the only operating system on your computer, but it has no networking. In your off hours, you will use your other operating system. $ID,-2$$TR,"It has links, so is it a browser?"$ -$ID,2$ZenithOS is an operating system, not a browser. $LK,"ZenithOS links",A="MN:LK_FILE"$ are a special format and only link too local files and symbol source addresses. +$ID,2$ZealOS is an operating system, not a browser. $LK,"ZealOS links",A="MN:LK_FILE"$ are a special format and only link too local files and symbol source addresses. $ID,-2$$TR,"Where are the animated 3D icon GIFs?"$ $ID,2$3D $LK,"Sprites",A="FI:::/Doc/Sprite.DD"$ are stored as a mesh of triangles. There are no GIF files. It $LK,"rotates",A="MN:Mat4x4MulXYZ"$ 3D sprite objects on the fly. $ID,-2$$TR,"If the compiler is JIT, isn't it an interpretor?"$ -$ID,2$ZenithOS compiles, doesn't $FG,2$interpret$FG$, and uses no $FG,2$byte code$FG$ anywhere. I loosely use the word $FG,2$script$FG$ sometimes, but it's actually compiled. The compiler's $LK,"optimization",A="MN:OptPass012"$ code is actually where the compiler evaluates constants to simplify them, like every optimizing compiler. +$ID,2$ZealOS compiles, doesn't $FG,2$interpret$FG$, and uses no $FG,2$byte code$FG$ anywhere. I loosely use the word $FG,2$script$FG$ sometimes, but it's actually compiled. The compiler's $LK,"optimization",A="MN:OptPass012"$ code is actually where the compiler evaluates constants to simplify them, like every optimizing compiler. $ID,-2$$TR,"Are you a Creationist?"$ -$ID,2$I am an evolutionist. $FG,2$Zenith$FG$ is a better term for the first father of all tasks than $FG,2$root$FG$ was! +$ID,2$I am an evolutionist. $FG,2$Zeal$FG$ is a better term for the first father of all tasks than $FG,2$root$FG$ was! $ID,-2$$TR,"Is 'Bt()' in the code Bit Torrent?"$ $ID,2$$LK,"Bt",A="MN:Bt"$() is $FG,2$bit test$FG$, like the $FG,2$x86$FG$ inst, not $FG,2$bit torrent$FG$. $ID,-2$$TR,"Is 'Fs->' in the code file system?"$ $ID,2$$LK,"Fs",A="MN:Fs"$ is a segment reg, not $FG,2$file system$FG$. ($LK,"Fs",A="MN:Fs"$ is kept pointing to the current task's record.) There is no memory segmentation. It is 64-bit and flat. FS and GS are used as general purpose regs, more or less. $ID,-2$$TR,"Is it Pascal?"$ -$ID,2$ZenithOS uses a dialect of C/C++ called $LK,"CosmiC",A="FI:::/Doc/CosmiC.DD"$. It is not $FG,2$Pascal$FG$. I altered the syntax making parenthesis optional on function calls with no paramaters. +$ID,2$ZealOS uses a dialect of C/C++ called $LK,"CosmiC",A="FI:::/Doc/CosmiC.DD"$. It is not $FG,2$Pascal$FG$. I altered the syntax making parenthesis optional on function calls with no paramaters. $ID,-2$$TR,"Why doesn't Sleep() make my laptop hibernate?"$ $ID,2$$LK,"Sleep",A="MN:Sleep"$() makes a program pause. It is not hibernation for a laptop. $ID,-2$$TR,"What is Yield() for in loops?"$ @@ -29,37 +29,37 @@ $ID,2$$LK,"Yield",A="MN:Yield"$() saves the current task's regs (context) and lo $ID,-2$$TR,"What is JIT Compiled Mode?"$ $ID,2$The term $LK,"JIT Compile Mode",A="FF:::/Doc/Glossary.DD,JIT Compile Mode"$ means it compiles and executes code placed into mem, not stored on disk. $ID,-2$$TR,"Why do files end in .Z? Are they encrypted?"$ -$ID,2$Files with names ending in $FG,2$.Z$FG$ are individually compressed using $LK,"ZenithOS Compression",A="FI:::/Kernel/Compress.CC"$. They are not encrypted. $LK,"Copy",A="MN:Copy"$() or rename them with $LK,"Move",A="MN:Move"$() to a name without $FG,2$.Z$FG$ and they will be stored in an uncompressed form. See $LK,"TOSZ",A="FI:::/Doc/TOSZ.DD"$ for Linux or Windows uncompress C/C++ code. +$ID,2$Files with names ending in $FG,2$.Z$FG$ are individually compressed using $LK,"ZealOS Compression",A="FI:::/Kernel/Compress.CC"$. They are not encrypted. $LK,"Copy",A="MN:Copy"$() or rename them with $LK,"Move",A="MN:Move"$() to a name without $FG,2$.Z$FG$ and they will be stored in an uncompressed form. See $LK,"TOSZ",A="FI:::/Doc/TOSZ.DD"$ for Linux or Windows uncompress C/C++ code. $ID,-2$$TR,"Is it open source?\tHow do I build it?"$ -$ID,2$ZenithOS is 100% open src. All the src code is included in the distro. Use $LK,"BootHDIns",A="MN:BootHDIns"$() to compile the kernel and compiler. The rest is $LK,"JIT Compiled",A="FF:::/Doc/Glossary.DD,JIT Compile Mode"$ during boot. See $LK,"::/StartOS.CC"$. +$ID,2$ZealOS is 100% open src. All the src code is included in the distro. Use $LK,"BootHDIns",A="MN:BootHDIns"$() to compile the kernel and compiler. The rest is $LK,"JIT Compiled",A="FF:::/Doc/Glossary.DD,JIT Compile Mode"$ during boot. See $LK,"::/StartOS.CC"$. $ID,-2$$TR,"Where are object files? How do I link?"$ -$ID,2$ZenithOS does not use object files or a linker. $LK,"AOT Compile Mode",A="FF:::/Doc/Glossary.DD,AOT Compile Mode"$ is used to directly create flat binary files, $LK,"::/Kernel.BIN.C",A="FI:::/Kernel/Kernel.PRJ"$ and $LK,"::/Compiler/Compiler.BIN",A="FI:::/Compiler/Compiler.PRJ"$ with no object files and linking.$FG$ $LK,"JIT Compile Mode",A="FF:::/Doc/Glossary.DD,JIT Compile Mode"$ place code in memory, ready to run, with no object files or linking. Linking is done when $FG,2$BIN$FG$ modules are $LK,"Load",A="MN:Load"$()ed. +$ID,2$ZealOS does not use object files or a linker. $LK,"AOT Compile Mode",A="FF:::/Doc/Glossary.DD,AOT Compile Mode"$ is used to directly create flat binary files, $LK,"::/Kernel.BIN.C",A="FI:::/Kernel/Kernel.PRJ"$ and $LK,"::/Compiler/Compiler.BIN",A="FI:::/Compiler/Compiler.PRJ"$ with no object files and linking.$FG$ $LK,"JIT Compile Mode",A="FF:::/Doc/Glossary.DD,JIT Compile Mode"$ place code in memory, ready to run, with no object files or linking. Linking is done when $FG,2$BIN$FG$ modules are $LK,"Load",A="MN:Load"$()ed. $ID,-2$$TR,"What is the FPS refresh rate?"$ -$ID,2$The refresh rate is $TX,"(30000.0/1001)",D="WINMGR_FPS"$ frames-per-second. That is how often ZenithOS updates screen mem. It is not syncronized to the hardware. +$ID,2$The refresh rate is $TX,"(30000.0/1001)",D="WINMGR_FPS"$ frames-per-second. That is how often ZealOS updates screen mem. It is not syncronized to the hardware. $ID,-2$$TR,"How does a task own the speaker?"$ $ID,2$No task or application has a lock on the speaker so apps will interfere with each other. $ID,-2$$TR,"Why does it leak memory?"$ -$ID,2$ZenithOS allocs mem as more items are displayed in the window. Also, ZenithOS allocs mem for code as it is compiled at the cmd line. If you $FG,2$#include$FG$ a file twice, it allocs more mem for it. If you have a 50,000 line program with each line taking twenty bytes on a machine with 1 Gig, you could $FG,2$#include$FG$ it a thousand times if it had no data or graphics and no other use of mem. If it bothers you, hit $FG,2$$FG$ and $FG,2$, $FG$periodically, to kill and recreate the task$FG$. Use the pop-up flag on macros in your $LK,"PersonalMenu",A="FI:::Home/PersonalMenu.DD"$ to spawn new tasks, run applications and free the applications when they are finished. Small mem chunks stick to the task when they are freed until it is killed. The only way to get in trouble is allocating multiple Meg chunks and freeing them. These can only be reused if the same size gets alloced again. Use $LK,"HeapLog",A="MN:HeapLog"$(), $LK,"HeapLogAddrRep",A="MN:HeapLogAddrRep"$() and $LK,"HeapLogSizeRep",A="MN:HeapLogSizeRep"$() to see who alloced mem and didn't free it. See $LK,"MemoryOverview",A="FI:::/Doc/MemoryOverview.DD"$. +$ID,2$ZealOS allocs mem as more items are displayed in the window. Also, ZealOS allocs mem for code as it is compiled at the cmd line. If you $FG,2$#include$FG$ a file twice, it allocs more mem for it. If you have a 50,000 line program with each line taking twenty bytes on a machine with 1 Gig, you could $FG,2$#include$FG$ it a thousand times if it had no data or graphics and no other use of mem. If it bothers you, hit $FG,2$$FG$ and $FG,2$, $FG$periodically, to kill and recreate the task$FG$. Use the pop-up flag on macros in your $LK,"PersonalMenu",A="FI:::Home/PersonalMenu.DD"$ to spawn new tasks, run applications and free the applications when they are finished. Small mem chunks stick to the task when they are freed until it is killed. The only way to get in trouble is allocating multiple Meg chunks and freeing them. These can only be reused if the same size gets alloced again. Use $LK,"HeapLog",A="MN:HeapLog"$(), $LK,"HeapLogAddrRep",A="MN:HeapLogAddrRep"$() and $LK,"HeapLogSizeRep",A="MN:HeapLogSizeRep"$() to see who alloced mem and didn't free it. See $LK,"MemoryOverview",A="FI:::/Doc/MemoryOverview.DD"$. $ID,-2$$TR,"Why do I get a memory leak when editing big files?"$ $ID,2$The editor periodically takes a snap-shot of the document for $FG,2$UNDO$FG$ and this looks like a memory leak. $ID,-2$$TR,"Why is it in text mode?"$ -$ID,2$ZenithOS runs in $FG,2$High-res 32-bit color VBE$FG$ graphics modes, not text mode. It changes to this mode with a $LK,"BIOS call",A="FF:::/Kernel/KStart16.CC,INT:9"$ while in real-mode before it switches to 64-bit mode. The text is $LK,"drawn by hand",A="MN:GrUpdateTextFG"$. See $LK,"::/Kernel/FontStd.CC"$. +$ID,2$ZealOS runs in $FG,2$High-res 32-bit color VBE$FG$ graphics modes, not text mode. It changes to this mode with a $LK,"BIOS call",A="FF:::/Kernel/KStart16.CC,INT:9"$ while in real-mode before it switches to 64-bit mode. The text is $LK,"drawn by hand",A="MN:GrUpdateTextFG"$. See $LK,"::/Kernel/FontStd.CC"$. $ID,-2$$TR,"Where is the kernel memory?"$ -$ID,2$ZenithOS identity-maps all memory, all the time. It is like paging is not used. There is no special kernel $FG,2$high half$FG$ memory space. ZenithOS is ring-0-only, so everything is kernel, even user programs. There is a special task called $FG,2$Zenith$FG$ and he doesn't die, so his heap never gets freed. That's as close to $FG,2$kernel memory$FG$ as it gets. All code goes in the lowest 2Gig of addresses, known as the $LK,"Code Heap",A="FF:::/Doc/Glossary.DD,Code and Data Heaps"$, so that the $FG,2$REL32$FG$ addressing mode can be used. See $LK,"MemoryOverview",A="FI:::/Doc/MemoryOverview.DD"$. +$ID,2$ZealOS identity-maps all memory, all the time. It is like paging is not used. There is no special kernel $FG,2$high half$FG$ memory space. ZealOS is ring-0-only, so everything is kernel, even user programs. There is a special task called $FG,2$Zeal$FG$ and he doesn't die, so his heap never gets freed. That's as close to $FG,2$kernel memory$FG$ as it gets. All code goes in the lowest 2Gig of addresses, known as the $LK,"Code Heap",A="FF:::/Doc/Glossary.DD,Code and Data Heaps"$, so that the $FG,2$REL32$FG$ addressing mode can be used. See $LK,"MemoryOverview",A="FI:::/Doc/MemoryOverview.DD"$. $ID,-2$$TR,"Why does it run code from stack addresses?"$ -$ID,2$ZenithOS puts all code in the lowest 2Gig, known as the $LK,"Code Heap",A="FF:::/Doc/Glossary.DD,Code and Data Heaps"$, so that the $FG,2$REL32$FG$ addressing mode can be used. ZenithOS is 64-bit, but $FG,2$2Gig$FG$ is enough for code. It actually puts global variables there, too, but you can turn that off with $LK,"OPTf_GLOBALS_ON_DATA_HEAP",A="MN:OPTf_GLOBALS_ON_DATA_HEAP"$. $LK,"MAlloc",A="MN:MAlloc"$() allocs higher memory. +$ID,2$ZealOS puts all code in the lowest 2Gig, known as the $LK,"Code Heap",A="FF:::/Doc/Glossary.DD,Code and Data Heaps"$, so that the $FG,2$REL32$FG$ addressing mode can be used. ZealOS is 64-bit, but $FG,2$2Gig$FG$ is enough for code. It actually puts global variables there, too, but you can turn that off with $LK,"OPTf_GLOBALS_ON_DATA_HEAP",A="MN:OPTf_GLOBALS_ON_DATA_HEAP"$. $LK,"MAlloc",A="MN:MAlloc"$() allocs higher memory. $ID,-2$$TR,"How does it SYSCALL?"$ -$ID,2$ZenithOS doesn't use software interrupts or $FG,2$SYSCALL$FG$ insts because it never needs to change out of ring-0, even running user programs. Calls are always $FG,2$CALL REL32$FG$ insts. +$ID,2$ZealOS doesn't use software interrupts or $FG,2$SYSCALL$FG$ insts because it never needs to change out of ring-0, even running user programs. Calls are always $FG,2$CALL REL32$FG$ insts. $ID,-2$$TR,"How do you fault-in stack?"$ $ID,2$The stack does not grow, so do not do deep recursion. In theory, memory gets fragmented, too. $ID,-2$$TR,"How do I set the PATH?"$ $ID,2$There is no $FG,2$PATH$FG$. You do not enter filenames at the command-line and expect them to run. You enter C-like code. $LK,"Get Started Here",A="FI:::/Doc/CmdLineOverview.DD"$. $ID,-2$$TR,"How do I boot it with Grub?"$ -$ID,2$If you use Grub, you $FG,2$chain-load$FG$ like Windows. See $LK,"Boot",A="FI:::/Doc/Boot.DD"$. You can use the ZenithOS boot-loader. $LK,"Master-Boot-Loader-Stage1",A="FI:::/Zenith/Boot/BootMHD.CC"$, $LK,"Master-Boot-Loader-Stage2",A="FI:::/Zenith/Boot/BootMHD2.CC"$, $LK,"Partition-Boot-Loader",A="FI:::/Zenith/Boot/BootHD.CC"$, $LK,"CD-DVD-Boot-Loader",A="FI:::/Zenith/Boot/BootDVD.CC"$. +$ID,2$If you use Grub, you $FG,2$chain-load$FG$ like Windows. See $LK,"Boot",A="FI:::/Doc/Boot.DD"$. You can use the ZealOS boot-loader. $LK,"Master-Boot-Loader-Stage1",A="FI:::/System/Boot/BootMHD.CC"$, $LK,"Master-Boot-Loader-Stage2",A="FI:::/System/Boot/BootMHD2.CC"$, $LK,"Partition-Boot-Loader",A="FI:::/System/Boot/BootHD.CC"$, $LK,"CD-DVD-Boot-Loader",A="FI:::/System/Boot/BootDVD.CC"$. $ID,-2$$TR,"How do I get Kernel.BIN to boot?"$ $ID,2$The boot-loaders must be patched by you running $LK,"BootHDIns",A="MN:BootHDIns"$() or $LK,"BootMHDIns",A="MN:BootMHDIns"$(). Those will write the block address into the boot-loader because the boot-loaders do not navigate file systems to find the $LK,"Stage2",A="FI:::/Kernel/KStart16.CC"$ if you relocate it. $ID,-2$$TR,"Why is there some 16-Bit code?"$ -$ID,2$ZenithOS is 64-bit. Like all PC operating systems, the boot-loader starts in 16-bit real-mode. ZenithOS calls a few $FG,2$BIOS$FG$ info routines, switches to VGA-640x480x4bit, switches to 32-bit, then, 64-bit mode. There is an odd thing called a $FG,2$$TX,"PCI BIOS",HTML="http://www.o3one.org/hwdocs/bios_doc/pci_bios_21.pdf"$$FG$ which is 32-bit used for $FG,2$PCI$FG$ config space access. ZenithOS calls $LK,"that",A="FI:::/Kernel/PCIBIOS.CC"$ a couple times. It must temporarily drop-out-of 64-bit mode for that and stop multi-tasking. +$ID,2$ZealOS is 64-bit. Like all PC operating systems, the boot-loader starts in 16-bit real-mode. ZealOS calls a few $FG,2$BIOS$FG$ info routines, switches to VGA-640x480x4bit, switches to 32-bit, then, 64-bit mode. There is an odd thing called a $FG,2$$TX,"PCI BIOS",HTML="http://www.o3one.org/hwdocs/bios_doc/pci_bios_21.pdf"$$FG$ which is 32-bit used for $FG,2$PCI$FG$ config space access. ZealOS calls $LK,"that",A="FI:::/Kernel/PCIBIOS.CC"$ a couple times. It must temporarily drop-out-of 64-bit mode for that and stop multi-tasking. $ID,-2$$TR,"Why are you pushing 32-bit values on the stack?"$ $ID,2$$FG,2$PUSH EAX$FG$ : All stack operations in 64-bit mode are 64-bits. $ID,-2$$TR,"Why are you using 32-bit insts and not setting high 32-bits?"$ @@ -82,8 +82,8 @@ $ID,-2$$TR,"Why is there garbage at the end of my text files?"$ $ID,2$Binary sprite data is stored beyond the terminating $FG,2$NULL$FG$ in text files. Map files store debug src line addresses. $ID,-2$$TR,"Why are sprites so small?"$ $ID,2$Sprites can be stored as vector graphics so they might take shockingly little room. They can be converted to bitmaps. -$ID,-2$$TR,"Why don't I need to recompile /Zenith and /Home files?"$ -$ID,2$If you change code in the $FG,2$/Zenith$FG$ or your $FG,2$/Home$FG$ directory, you don't need to recompile, you just need to reboot because those directories get recompiled when you boot. It uses $LK,"JIT Compile Mode",A="FF:::/Doc/Glossary.DD,JIT Compile Mode"$. There is no $FG,2$.BIN$FG$ file for $FG,2$JIT$FG$ compilation. See $LK,"::/StartOS.CC"$. +$ID,-2$$TR,"Why don't I need to recompile /System and /Home files?"$ +$ID,2$If you change code in the $FG,2$/System$FG$ or your $FG,2$/Home$FG$ directory, you don't need to recompile, you just need to reboot because those directories get recompiled when you boot. It uses $LK,"JIT Compile Mode",A="FF:::/Doc/Glossary.DD,JIT Compile Mode"$. There is no $FG,2$.BIN$FG$ file for $FG,2$JIT$FG$ compilation. See $LK,"::/StartOS.CC"$. $ID,-2$$TR,"Why does it finds files that aren't there?"$ $ID,2$If not found, $FG,2$.Z$FG$ is added or removed from filename and a search is done again. If a file is still not found, the parent directories are searched for a file of the same name. $ID,-2$ diff --git a/src/Doc/Features.DD b/src/Doc/Features.DD index 0665f114..8f408930 100755 --- a/src/Doc/Features.DD +++ b/src/Doc/Features.DD @@ -1,4 +1,4 @@ - $WW,1$$FG,5$$TX+CX,"ZenithOS' Features"$$FG$ + $WW,1$$FG,5$$TX+CX,"ZealOS' Features"$$FG$ * Oracle with $FG,2$$FG$ for words or $FG,2$$FG$ for passages. @@ -50,4 +50,4 @@ * Many games, $LK,"demos",A="FI:::/Doc/DemoIndex.DD"$ and $LK,"documentation",A="FI:::/Doc/HelpIndex.DD"$. -* $FG,2$All source code$FG$ included. Only compiles with the included ZenithOS compiler and assembler. +* $FG,2$All source code$FG$ included. Only compiles with the included ZealOS compiler and assembler. diff --git a/src/Doc/FileMgr.DD b/src/Doc/FileMgr.DD index 77965743..59c4b0d9 100755 --- a/src/Doc/FileMgr.DD +++ b/src/Doc/FileMgr.DD @@ -28,7 +28,7 @@ $FG,2$$FG$ $ID,2$#include file. $ID,-2$ $FG,2$$FG$ -$ID,2$Zenith #include file. +$ID,2$System #include file. $ID,-2$ $FG,2$'r'$FG$ $ID,2$Rename file. @@ -56,7 +56,7 @@ $ID,2$Burn CD/DVD ISO file. This burns a CD/DVD using the image file, $FG,2$$TX $ID,-2$ $FG,5$Instructions on Using CD/DVD's$FG$ -$ID,2$If you have not recompiled Kernel and defined your CD/DVD drive, exit the FileMgr and use $LK,"Mount",A="MN:Mount"$ to define your CD/DVD drive. Place a CD/DVD in the drive and press $FG,2$'c'$FG$ when on top of the CD/DVD drive letter to mount the drive. It will call $LK,"DiskChange",A="MN:DiskChange"$(), the ZenithOS cmd to mount removable media. +$ID,2$If you have not recompiled Kernel and defined your CD/DVD drive, exit the FileMgr and use $LK,"Mount",A="MN:Mount"$ to define your CD/DVD drive. Place a CD/DVD in the drive and press $FG,2$'c'$FG$ when on top of the CD/DVD drive letter to mount the drive. It will call $LK,"DiskChange",A="MN:DiskChange"$(), the ZealOS cmd to mount removable media. $ID,-2$ $FG,5$Instructions on Burning CD/DVD's$FG$ diff --git a/src/Doc/FileMgrPullDown.DD b/src/Doc/FileMgrPullDown.DD index 3d2c7867..aeb29ab9 100755 --- a/src/Doc/FileMgrPullDown.DD +++ b/src/Doc/FileMgrPullDown.DD @@ -27,5 +27,5 @@ CDDVD Program { Include(,0,0x3F0000003F); - ZenithInclude(,0,0x23F0000023F); + ZealInclude(,0,0x23F0000023F); } diff --git a/src/Doc/GRFiles.DD b/src/Doc/GRFiles.DD index 66a8d9f1..0458a3dd 100755 --- a/src/Doc/GRFiles.DD +++ b/src/Doc/GRFiles.DD @@ -1,4 +1,4 @@ -$WW,1$GR graphics files are 8-bits-per-pixels but only 4-bits of color, with transparency and no palette. Compression is the standard ZenithOS$FG$ LZW compression. +$WW,1$GR graphics files are 8-bits-per-pixels but only 4-bits of color, with transparency and no palette. Compression is the standard ZealOS$FG$ LZW compression. $HL,1$ #define DCF_COMPRESSED 1 //This is the only saved flag. #define DCF_PALETTE 2 diff --git a/src/Doc/Glossary.DD b/src/Doc/Glossary.DD index c8c6fe35..78bc37c0 100755 --- a/src/Doc/Glossary.DD +++ b/src/Doc/Glossary.DD @@ -145,15 +145,15 @@ $FG,2$Wiz$FG$ Wizard $ID,-2$$TR,"Task/Process/Thread"$ $ID,2$There is no distinction between $FG,2$task$FG$, $FG,2$process$FG$ or $FG,2$thread$FG$. The $FG,2$Fs$FG$ segment reg is kept pointing to the current task's $LK,"CTask",A="MN:CTask"$. There is only one window per task, and only $FG,2$Core0$FG$ tasks can have windows. Each task has a code and data heap so memory is returned when it dies. Each task has a $LK,"hash",A="HI:Hash"$ symbol table. -Since there is not friendly disk sharing and all tasks have the same address map, it might be accurate to call ZenithOS, "multi-thread/single-process". You run a single application process on $FG,2$Core0$FG$ and it can create threads on the same core or others. If you run multiple processes, it should be safe, but one process will wait until another completely finishes a long disk access. -$ID,-2$$TR,"Zenith Task"$ -$ID,2$This is Zenith, as in the $MA-X+PU,"most important task",LM="ACDDefsPut(DocPut, \"Zenith\");View;"$. Zenith is immortal. The zenith task is created at start-up and appears in the small window at the top beneath the user terminal windows. Since the Zenith task is immortal, on Zenith's heap go all memory objects which you don't want destroyed by any single task's death. When created, Zenith runs the file $LK,"::/StartOS.CC"$. When start-up is finished, the zenith task enters a server mode where it accepts requests from other tasks. The $LK,"Zenith",A="MN:Zenith"$("") routine will make Zenith compile and run text src code. $FG,2$#include$FG$ statements can be sent to $LK,"Zenith",A="MN:Zenith"$(""), creating system-wide code and data which are immortal. +Since there is not friendly disk sharing and all tasks have the same address map, it might be accurate to call ZealOS, "multi-thread/single-process". You run a single application process on $FG,2$Core0$FG$ and it can create threads on the same core or others. If you run multiple processes, it should be safe, but one process will wait until another completely finishes a long disk access. +$ID,-2$$TR,"System Task"$ +$ID,2$The System task is immortal. The system task is created at start-up and appears in the small window at the top beneath the user terminal windows. Since the System task is immortal, on its heap go all memory objects which you don't want destroyed by any single task's death. When created, the System task runs the file $LK,"::/StartOS.CC"$. When start-up is finished, the system task enters a server mode where it accepts requests from other tasks. The $LK,"Sys",A="MN:Sys"$("") routine will make the System task compile and run text src code. $FG,2$#include$FG$ statements can be sent to $LK,"Sys",A="MN:Sys"$(""), creating system-wide code and data which are immortal. $ID,-2$$TR,"Seth Tasks"$ -$ID,2$Each CPU core has an executive task called $FG,2$Seth$FG$ that is immortal. The Zenith task on $FG,2$Core0$FG$ is also its $FG,2$Seth$FG$ task. +$ID,2$Each CPU core has an executive task called $FG,2$Seth$FG$ that is immortal. The System task on $FG,2$Core0$FG$ is also its $FG,2$Seth$FG$ task. $ID,-2$$TR,"Code and Data Heaps"$ -$ID,2$ZenithOS uses the asm $FG,2$CALL$FG$ inst, exclusively, and that inst is limited to calling routines $FG,2$+/-2Gig$FG$ from the current code location. To prevent out-of-range issues, I decided to separate code and data, placing all code within the lowest $FG,2$2Gig$FG$ of memory, addresses $FG,2$00000000$FG$-$FG,2$7FFFFFFF$FG$. The compiler and $LK,"Load",A="MN:Load"$()er alloc memory from the code heap to store code and global vars, unless the compiler option $LK,"OPTf_GLOBALS_ON_DATA_HEAP",A="MN:OPTf_GLOBALS_ON_DATA_HEAP"$ is used. When programs call $LK,"MAlloc",A="MN:MAlloc"$() is from the data heap, which in not limited in size, except by physical RAM memory. You can alloc from any heap in any task at any time on any core, even making $LK,"independent",A="MN:MemPagAlloc"$ heaps. +$ID,2$ZealOS uses the asm $FG,2$CALL$FG$ inst, exclusively, and that inst is limited to calling routines $FG,2$+/-2Gig$FG$ from the current code location. To prevent out-of-range issues, I decided to separate code and data, placing all code within the lowest $FG,2$2Gig$FG$ of memory, addresses $FG,2$00000000$FG$-$FG,2$7FFFFFFF$FG$. The compiler and $LK,"Load",A="MN:Load"$()er alloc memory from the code heap to store code and global vars, unless the compiler option $LK,"OPTf_GLOBALS_ON_DATA_HEAP",A="MN:OPTf_GLOBALS_ON_DATA_HEAP"$ is used. When programs call $LK,"MAlloc",A="MN:MAlloc"$() is from the data heap, which in not limited in size, except by physical RAM memory. You can alloc from any heap in any task at any time on any core, even making $LK,"independent",A="MN:MemPagAlloc"$ heaps. $ID,-2$$TR,"Parent, Child and PopUp Tasks"$ -$ID,2$Often a task will $LK,"Spawn",A="MN:Spawn"$() or $LK,"PopUp",A="MN:PopUp"$() a task as a helper. The helper is known as a child Task, though you can $LK,"Spawn",A="MN:Spawn"$ a task and assign it a different parent... like $FG,2$Zenith$FG$. Links are kept as to who's whose child, so when one task is $LK,"Kill",A="MN:Kill"$()ed the child helper tasks die, too. You can get a report of current system tasks with $LK,"TaskRep",A="MN:TaskRep"$(). There is just one window per task, so child tasks are needed for pop-ups. +$ID,2$Often a task will $LK,"Spawn",A="MN:Spawn"$() or $LK,"PopUp",A="MN:PopUp"$() a task as a helper. The helper is known as a child Task, though you can $LK,"Spawn",A="MN:Spawn"$ a task and assign it a different parent... like $FG,2$System$FG$. Links are kept as to who's whose child, so when one task is $LK,"Kill",A="MN:Kill"$()ed the child helper tasks die, too. You can get a report of current system tasks with $LK,"TaskRep",A="MN:TaskRep"$(). There is just one window per task, so child tasks are needed for pop-ups. $ID,-2$$TR,"CosmiC"$ $ID,2$$LK,"CosmiC",A="FI:::/Doc/CosmiC.DD"$ is more than $FG,2$C$FG$ and less than $FG,2$C++$FG$. It has the default args of $FG,2$C++$FG$ and uses $FG,2$class$FG$ in place of $FG,2$struct$FG$. It uses $FG,2$U0,U8,U16,U32,I64$FG$ and $FG,2$I0,I8,I16,I32,I64$FG$ for signed and unsigned ints. It has different $LK,"operator precedence",A="FF:::/Doc/CosmiC.DD,operator precedence"$. It has $FG,2$PASCAL$FG$-like function calls with no parens, but requires an $FG,2$&$FG,2$$FG$ when referring to function addresses. $ID,-2$$TR,"AOT Compile Mode"$ @@ -267,5 +267,5 @@ $ID,2$When two parts of a program have a common low-level routine, that routine $ID,-2$$TR,"user_data"$ $ID,2$Many operating system structures have space set aside for you to store values. You are on your own managing these with multiple applications and libraries. $ID,-2$$TR,"Multicore Core0/CoreAP"$ -$ID,2$Core0, has the $LK,"Zenith Task",A="FF:::/Doc/Glossary.DD,Zenith Task"$$FG$, and it is the master. The $FG,2$application processors$FG$ have an executive $LK,"Seth Task",A="FF:::/Doc/Glossary.DD,Seth Tasks"$ and are the slave processors. Only $FG,2$Core0$FG$ tasks can have windows and can launch applications. Slave cores are used if the application explicitly $LK,"Spawn",A="MN:Spawn"$s() a task or $LK,"JobQueue",A="MN:JobQueue"$() a job on them. +$ID,2$Core0, has the $LK,"System Task",A="FF:::/Doc/Glossary.DD,System Task"$$FG$, and it is the master. The $FG,2$application processors$FG$ have an executive $LK,"Seth Task",A="FF:::/Doc/Glossary.DD,Seth Tasks"$ and are the slave processors. Only $FG,2$Core0$FG$ tasks can have windows and can launch applications. Slave cores are used if the application explicitly $LK,"Spawn",A="MN:Spawn"$s() a task or $LK,"JobQueue",A="MN:JobQueue"$() a job on them. $ID,-2$ diff --git a/src/Doc/GraphicsOverview.DD b/src/Doc/GraphicsOverview.DD index a5b69584..044e6c5b 100755 Binary files a/src/Doc/GraphicsOverview.DD and b/src/Doc/GraphicsOverview.DD differ diff --git a/src/Doc/GuideLines.DD b/src/Doc/GuideLines.DD index 1f13c350..1c9e9a1e 100755 --- a/src/Doc/GuideLines.DD +++ b/src/Doc/GuideLines.DD @@ -12,9 +12,9 @@ $FG,2$/Kernel$FG$ The core of the operating system is found here. Since privile $FG,2$/Compiler$FG$ The compiler module src code is found here. The compiler is $FG,2$AOT$FG$ compiled to produce a binary file which is loaded at boot. It, too, is $FG,2$AOT$FG$ compiled by $LK,"BootHDIns",A="MN:BootHDIns"$(). -$FG,2$/Zenith$FG$ The non-kernel part of the operating system is found here. It is $FG,2$JIT$FG$ compiled during boot. The $LK,"Zenith Task",A="FF:::/Doc/Glossary.DD,Zenith Task"$ is the most important task. It never dies. See the $MA-X+PU,"definition of zenith",LM="ACDDefsPut(DocPut, \"Zenith\");View;"$. +$FG,2$/System$FG$ The non-kernel part of the operating system is found here. It is $FG,2$JIT$FG$ compiled during boot. The $LK,"System Task",A="FF:::/Doc/Glossary.DD,System Task"$ is the most important task. It never dies. -$FG,2$/0000Boot$FG$ Boot files go here. Stage 2 of the ZenithOS hard drive master boot loader, the old hard drive master boot record which is just blk#0, and the CD/DVD $LK,"0000Kernel.BIN.C",A="FI:::/Kernel/Kernel.PRJ"$ file go here. ASCII $FG,2$0000$FG$ is near the top, alphabetically, in case you use $TX,"MagicISO",HTML="http://www.magiciso.com"$. +$FG,2$/0000Boot$FG$ Boot files go here. Stage 2 of the ZealOS hard drive master boot loader, the old hard drive master boot record which is just blk#0, and the CD/DVD $LK,"0000Kernel.BIN.C",A="FI:::/Kernel/Kernel.PRJ"$ file go here. ASCII $FG,2$0000$FG$ is near the top, alphabetically, in case you use $TX,"MagicISO",HTML="http://www.magiciso.com"$. @@ -26,9 +26,9 @@ $LK,"~/PersonalMenu.DD"$ a menu viewed with the $FG,2$$FG$ key or by cli $LK,"~/PersonalNotes.DD"$ a personal note file viewed with the $FG,2$$FG$ key. -$LK,"~/MakeHome.CC"$ a file compiled by the $LK,"Zenith Task",A="FF:::/Doc/Glossary.DD,Zenith Task"$ during $LK,"StartOS",A="FF:::/StartOS.CC,MakeHome"$. +$LK,"~/MakeHome.CC"$ a file compiled by the $LK,"System Task",A="FF:::/Doc/Glossary.DD,System Task"$ during $LK,"StartOS",A="FF:::/StartOS.CC,MakeHome"$. -$FG,4$~/Home*$FG$ Copy $FG,2$Home*$FG$ files from the root into $FG,2$~$FG$ and customize them. These files are invoked when the $LK,"Zenith Task",A="FF:::/Doc/Glossary.DD,Zenith Task"$ starts-up. +$FG,4$~/Home*$FG$ Copy $FG,2$Home*$FG$ files from the root into $FG,2$~$FG$ and customize them. These files are invoked when the $LK,"System Task",A="FF:::/Doc/Glossary.DD,System Task"$ starts-up. $LK,"~/Once.CC"$ a file invoked at the start-up of the first user. Customize this! @@ -92,9 +92,9 @@ $ID,-5$ $FG,5$$TX+CX,"Hash Sym Tables"$$FG$ -* See $LK,"::/Zenith/ZHash.CC"$ for examples of how the hash tables are set-up. Basically, syms are placed into hash tables and child process hash tables are chained to parents. This provides scopes for vars and functions. +* See $LK,"::/System/ZHash.CC"$ for examples of how the hash tables are set-up. Basically, syms are placed into hash tables and child process hash tables are chained to parents. This provides scopes for vars and functions. -* $FG,2$zenith_task->hash_table$FG$ holds the $LK,"CosmiC",A="FI:::/Doc/CosmiC.DD"$ syms loaded in on start-up. +* $FG,2$sys_task->hash_table$FG$ holds the $LK,"CosmiC",A="FI:::/Doc/CosmiC.DD"$ syms loaded in on start-up. * $FG,2$Fs->hash_table$FG$ holds user CosmiC syms and if a sym is not found, it checks parents. When a duplicate sym is added to the table, it overshadows the prev sym. When developing software, typically you include the file at the cmd prompt, make changes and reinclude it. Old syms are overshadowed but they are still there. Periodically, kill the TASK and start fresh when mem is low. If you wish your applications to free themselves instead of staying in mem, spawn or $LK,"PopUp",A="MN:PopUp"$() a task to run the application and kill it when it's done. diff --git a/src/Doc/Hash.DD b/src/Doc/Hash.DD index 0a32b6c6..3f619688 100755 Binary files a/src/Doc/Hash.DD and b/src/Doc/Hash.DD differ diff --git a/src/Doc/HelpIndex.DD b/src/Doc/HelpIndex.DD index e3ed924e..46b76500 100755 Binary files a/src/Doc/HelpIndex.DD and b/src/Doc/HelpIndex.DD differ diff --git a/src/Doc/InFile.DD b/src/Doc/InFile.DD index 760a9356..f59923ff 100755 --- a/src/Doc/InFile.DD +++ b/src/Doc/InFile.DD @@ -1,4 +1,4 @@ -$WW,1$$FG,2$InFiles$FG$ are used to generate user input to automate operations. The ZenithOS tour is done with an $FG,2$InFile$FG$. It reminds me of a Unix pipe because $FG,2$StdOut$FG$ of one gets chained into $FG,2$StdIn$FG$ of another. +$WW,1$$FG,2$InFiles$FG$ are used to generate user input to automate operations. The ZealOS tour is done with an $FG,2$InFile$FG$. It reminds me of a Unix pipe because $FG,2$StdOut$FG$ of one gets chained into $FG,2$StdIn$FG$ of another. When an $FG,2$InFile$FG$ runs, a child task is $LK,"Spawn",A="MN:Spawn"$()ed which intercepts real user input and generates fake input. InFiles are $LK,"CosmiC",A="FI:::/Doc/CosmiC.DD"$ programs run by the child whose stdout goes to the parent's input buffer. $LK,"Message",A="MN:Message"$() can be included in an $FG,2$InFile$FG$ to send special keys or mouse cmds to the parent. While an $FG,2$InFile$FG$ is running, the normal input gets diverted to the InFile task and can be filtered and sent back to the parent task. Unless you are driving functions which prompt for data, you can probably use an $FG,2$#include$FG$ file in place of an $FG,2$InFile$FG$. diff --git a/src/Doc/Install.DD b/src/Doc/Install.DD index 8d72216c..96faface 100755 --- a/src/Doc/Install.DD +++ b/src/Doc/Install.DD @@ -1,18 +1,18 @@ -$WW,1$$FG,5$$TX+CX,"Installing ZenithOS"$$FG$ +$WW,1$$FG,5$$TX+CX,"Installing ZealOS"$$FG$ Burn a CD with software that supports ISO files. Then, boot it. It's a live CD, so you can look around with or without installing. -Dual booting with another operating system is the best way to use ZenithOS. I only use it in a virtual machine because it won't boot natively on my machine, though. For native dual booting, you need a partition for ZenithOS. Windows often comes with a restore disk that does not allow repartitioning. I recommend connecting a spare additional hard drive and using the $FG,2$BIOS$FG$ to select which drive to boot. +Dual booting with another operating system is the best way to use ZealOS. I only use it in a virtual machine because it won't boot natively on my machine, though. For native dual booting, you need a partition for ZealOS. Windows often comes with a restore disk that does not allow repartitioning. I recommend connecting a spare additional hard drive and using the $FG,2$BIOS$FG$ to select which drive to boot. The $LK,"::/Misc/OSInstall.CC"$ script will automate much of this. It runs if you boot the CD/DVD-ROM. See $LK,"Boot.DD",A="FI:::/Doc/Boot.DD"$ for an overview of booting. See $LK,"Requirements",A="FI:::/Doc/Requirements.DD"$ for supported hardware. -Two ZenithOS partitions are highly recommended, so you can boot to a back-up and fix the primary when you work on it. Odds are, you only need a couple gigabytes for your ZenithOS partitions. +Two ZealOS partitions are highly recommended, so you can boot to a back-up and fix the primary when you work on it. Odds are, you only need a couple gigabytes for your ZealOS partitions. 1) $ID,2$$LK,"Mount",A="MN:Mount"$() use if the drive is partitioned. -$ID,2$This command mounts a drive making it accessible. For simplicity, sel $FG,2$'C'$FG$ as the first drive letter for your hard drive. The first partition will be $FG,2$'C'$FG$, second, $FG,2$'D'$FG$, etc. ZenithOS needs 3 numbers to utilize a hard drive -- base0, base1, and unit. When you enter a hexadecimal number, do it like in $FG,2$C$FG$ with a $FG,2$0x$FG$ prefix. If the probe was successful, you can just enter the number in the probe box instead of base0. +$ID,2$This command mounts a drive making it accessible. For simplicity, sel $FG,2$'C'$FG$ as the first drive letter for your hard drive. The first partition will be $FG,2$'C'$FG$, second, $FG,2$'D'$FG$, etc. ZealOS needs 3 numbers to utilize a hard drive -- base0, base1, and unit. When you enter a hexadecimal number, do it like in $FG,2$C$FG$ with a $FG,2$0x$FG$ prefix. If the probe was successful, you can just enter the number in the probe box instead of base0. $ID,-2$ $LK,"DiskPart",A="MN:DiskPart"$($FG,2$'C'$FG$) use if drive is not partitioned @@ -34,11 +34,11 @@ $ID,2$This command is used to copy files onto a hard drive partition from the CD $ID,-2$4) $LK,"BootHDIns",A="MN:BootHDIns"$($FG,2$'D'$FG$) $ID,2$This command recompiles the source code on a drive and writes to the $UL,1$drive's$UL,0$ boot record. You'll need to reenter the $LK,"Mount",A="MN:Mount"$ information so it can be stored in the kernel. -$ID,-2$5) Use Linux's Grub or ZenithOS' $LK,"BootMHDIns",A="MN:BootMHDIns"$($FG,2$'D'$FG$) +$ID,-2$5) Use Linux's Grub or ZealOS' $LK,"BootMHDIns",A="MN:BootMHDIns"$($FG,2$'D'$FG$) $ID,2$ The $LK,"BootMHDIns",A="MN:BootMHDIns"$() command places a boot loader on a drive. It saves the old master boot record to $FG,2$/0000Boot/OldMBR.BIN.C$FG$ and replaces it. When you boot, you will have the option of booting the old master boot record. This command can be skipped if you already have a boot loader. Be sure not to lose the copy of the old boot record, like if you reformat the drive. -Delete $FG,2$/0000Boot/OldMBR.BIN.C$FG$ if you want to get a fresh copy of a mbr, like if installing from your own custom CD containing it's own $FG,2$/0000Boot/OldMBR.BIN.C$FG$ onto a system with a non-ZenithOS boot loader. +Delete $FG,2$/0000Boot/OldMBR.BIN.C$FG$ if you want to get a fresh copy of a mbr, like if installing from your own custom CD containing it's own $FG,2$/0000Boot/OldMBR.BIN.C$FG$ onto a system with a non-ZealOS boot loader. If you have anti-virus software, it might object to having a different master boot record. $ID,-2$ diff --git a/src/Doc/Job.DD b/src/Doc/Job.DD index d94e8733..103f1531 100755 Binary files a/src/Doc/Job.DD and b/src/Doc/Job.DD differ diff --git a/src/Doc/KeyDev.DD b/src/Doc/KeyDev.DD index 41721ca6..d80b91fc 100755 --- a/src/Doc/KeyDev.DD +++ b/src/Doc/KeyDev.DD @@ -1,4 +1,4 @@ -$WW,1$The editor mostly stays in a $LK,"KeyGet",A="MN:KeyGet"$()/$LK,"PutKey",A="MN:PutKey"$() loop. The putkey portion is where keys are acted-upon. ZenithOS has a chain of putkey handlers in a $LK,"Circular Queue",A="HI:Circular Queue"$ with priorities. The highest priority handlers can choose to terminate handling, otherwise, the keys get sent on down the chain. +$WW,1$The editor mostly stays in a $LK,"KeyGet",A="MN:KeyGet"$()/$LK,"PutKey",A="MN:PutKey"$() loop. The putkey portion is where keys are acted-upon. ZealOS has a chain of putkey handlers in a $LK,"Circular Queue",A="HI:Circular Queue"$ with priorities. The highest priority handlers can choose to terminate handling, otherwise, the keys get sent on down the chain. $LK,"KeyDevAdd",A="MN:KeyDevAdd"$() defines a putkey device with a priority. "Device" might be a misnomer. Currently, the following are defined: @@ -9,6 +9,6 @@ $FG,2$0x40000000$FG$ $LK,"KDInputFilterPutKey",A="MN:KDInputFilterPutKey"$() for $FG,2$0x60000000$FG$ $LK,"KDRawPutKey",A="MN:KDRawPutKey"$() nonwindowed direct to video mem debug output. $FG,2$0x80000000$FG$ $LK,"KDDocPutKey",A="MN:KDDocPutKey"$() standard document cmds -Since handling individual keys is slow, ZenithOS supports PutS() as well. If no puts handler is defined, individual keys are sent. +Since handling individual keys is slow, ZealOS supports PutS() as well. If no puts handler is defined, individual keys are sent. $LK,"CDoc",A="MN:CDoc"$$FG,2$.user_put_key$FG$ and $LK,"CDoc",A="MN:CDoc"$$FG,2$.user_put_s$FG$ are call back routines which offer some neat tricks. See $LK,"::/Apps/Psalmody/JukeBox.CC"$. There is a var $LK,"CDoc",A="MN:CDoc"$$FG,2$.user_put_data$FG$ which gets passed to them. diff --git a/src/Doc/Lex.DD b/src/Doc/Lex.DD index aa3549e6..e9043a3a 100755 --- a/src/Doc/Lex.DD +++ b/src/Doc/Lex.DD @@ -1,3 +1,3 @@ -$WW,1$The compiler's lexical analyzer can be used in your programs to simplify parsing. See $LK,"Doc Parsing",A="FF:::/Zenith/DolDoc/DocPlain.CC,CompCtrlNew"$ or $LK,"Parse Opcode File",A="FF:::/Compiler/AsmInit.CC,Opcodes.DD"$. +$WW,1$The compiler's lexical analyzer can be used in your programs to simplify parsing. See $LK,"Doc Parsing",A="FF:::/System/DolDoc/DocPlain.CC,CompCtrlNew"$ or $LK,"Parse Opcode File",A="FF:::/Compiler/AsmInit.CC,Opcodes.DD"$. See $LK,"Tokens",A="MN:TK_IDENT"$. diff --git a/src/Doc/MemoryOverview.DD b/src/Doc/MemoryOverview.DD index d0aefdf4..23eab106 100755 --- a/src/Doc/MemoryOverview.DD +++ b/src/Doc/MemoryOverview.DD @@ -2,15 +2,15 @@ $WW,1$$FG,5$$TX+CX,"Memory Overview"$$FG$ Paging is practically not used. 64-bit mode requires paging, however, so it is identity-mapped -- virtual identical to physical. All tasks on all cores use the same page table map, just as though all addresses are physical addresses. 2Meg or 1Gig page table entries are used. Nothing swaps to disk. -In ZenithOS, the lowest 2Gig of memory is called the $FG,2$code heap$FG$. ZenithOS's compiler always uses 32-bit signed relative JMP & CALL insts because 64-bit CALLs take two insts. With signed +/- 32-bit values, code can only call a function within 2Gig distance. Therefore, ZenithOS keeps all code in the lowest 2Gig memory addresses including what would normally be called "the kernel". Two Gig is plenty for code, don't worry. +In ZealOS, the lowest 2Gig of memory is called the $FG,2$code heap$FG$. ZealOS's compiler always uses 32-bit signed relative JMP & CALL insts because 64-bit CALLs take two insts. With signed +/- 32-bit values, code can only call a function within 2Gig distance. Therefore, ZealOS keeps all code in the lowest 2Gig memory addresses including what would normally be called "the kernel". Two Gig is plenty for code, don't worry. You can create new, independent heaps using $LK,"HeapCtrlInit",A="MN:HeapCtrlInit"$(). Then, use the $LK,"CHeapCtrl",A="MN:CHeapCtrl"$ as the 2nd arg to $LK,"MAlloc",A="MN:MAlloc"$(). See $LK,"HeapLog",A="MN:HeapLog"$() for an example. -Memory alloced by a task will be freed when the task is killed. The $LK,"Zenith Task",A="FF:::/Doc/Glossary.DD,Zenith Task"$ is a task that never dies. His memory is like kernel memory in other operating systems. See $LK,"ZCAlloc",A="MN:ZCAlloc"$(), $LK,"ZMAlloc",A="MN:ZMAlloc"$(), $LK,"ZMAllocIdent",A="MN:ZMAllocIdent"$() and $LK,"ZStrNew",A="MN:ZStrNew"$(). +Memory alloced by a task will be freed when the task is killed. The $LK,"System Task",A="FF:::/Doc/Glossary.DD,System Task"$ is a task that never dies. His memory is like kernel memory in other operating systems. See $LK,"ZCAlloc",A="MN:ZCAlloc"$(), $LK,"ZMAlloc",A="MN:ZMAlloc"$(), $LK,"ZMAllocIdent",A="MN:ZMAllocIdent"$() and $LK,"ZStrNew",A="MN:ZStrNew"$(). All of the regular page tables are marked, "cached". When accessing hardware, however, you need uncached page table. The lowest 4Gig addresses have an alias to access hardware located toward the top of mapped space, $FG,2$0x$TX,"01A0000000",D="DD_UNCACHED_ALIAS"$$FG$. See $LK,"dev.uncached_alias",A="FF:::/Kernel/MultiProc.CC,dev.uncached_alias"$. -During an extended powered-on session of ZenithOS, in theory, memory will become fragmented, requiring a reboot. It has never happens to me. +During an extended powered-on session of ZealOS, in theory, memory will become fragmented, requiring a reboot. It has never happens to me. See $LK,"MemRep",A="MN:MemRep"$() and $LK,"::/Demo/MemDemo.CC"$. @@ -21,7 +21,7 @@ $FG,2$ 0x00$TX,"00007C00",D="DD_KERNEL"$- 0x00$TX,"000368EF",D="DD_KERNEL_END"$$ $ID,2$Kernel module, placed here by the boot-loader, $LK,"BOOT_RAM_BASE",A="MN:BOOT_RAM_BASE"$. $ID,-2$ $FG,2$ 0x00$TX,"00096600",D="DD_BOOT_HIGH_LOC_DVD"$- 0x00$TX,"00096FFF",D="DD_BOOT_HIGH_LOC_DVD_END"$$FG$ -$ID,2$$FG$Boot block relocated here before loading the Kernel module, $LK,"BootDVD",A="FI:::/Zenith/Boot/BootDVD.CC"$ & $LK,"BootHD",A="FI:::/Zenith/Boot/BootHD.CC"$. +$ID,2$$FG$Boot block relocated here before loading the Kernel module, $LK,"BootDVD",A="FI:::/System/Boot/BootDVD.CC"$ & $LK,"BootHD",A="FI:::/System/Boot/BootHD.CC"$. $ID,-2$ $FG,2$ 0x00$TX,"00097000",D="DD_MP_VECT"$- 0x00$TX,"00097030",D="DD_MP_VECT_END"$$FG$ Multicore start-up vect code, $LK,"MPN_VECT",A="MN:MPN_VECT"$. $FG,2$~0x000009F000- 0x000009FFFF$FG$ Extended BIOS data area. diff --git a/src/Doc/MultiCore.DD b/src/Doc/MultiCore.DD index 18c1204f..87a05bbc 100755 --- a/src/Doc/MultiCore.DD +++ b/src/Doc/MultiCore.DD @@ -1,10 +1,10 @@ -$WW,1$ZenithOS does master-slave multicore instead of SMP. $FG,2$Core0$FG$ is the master. The master core's applications explicitly assign computational jobs to other cores and the ZenithOS scheduler does not move tasks between cores. +$WW,1$ZealOS does master-slave multicore instead of SMP. $FG,2$Core0$FG$ is the master. The master core's applications explicitly assign computational jobs to other cores and the ZealOS scheduler does not move tasks between cores. -There are multicore safe locks for file access and heap allocations, however, so ZenithOS is symmetrical in some sense. See $LK,"::/Demo/MultiCore/LoadTest.CC"$. +There are multicore safe locks for file access and heap allocations, however, so ZealOS is symmetrical in some sense. See $LK,"::/Demo/MultiCore/LoadTest.CC"$. Only tasks on $FG,2$Core0$FG$ can have windows, but other cores can help render them. -Each core has an executive $LK,"Seth Task",A="FF:::/Doc/Glossary.DD,Seth Tasks"$ which is the father of all tasks on that core. $LK,"Zenith",A="FF:::/Doc/Glossary.DD,Zenith Task"$ is the $LK,"Seth Task",A="FF:::/Doc/Glossary.DD,Seth Tasks"$ on $FG,2$Core0$FG$. +Each core has an executive $LK,"Seth Task",A="FF:::/Doc/Glossary.DD,Seth Tasks"$ which is the father of all tasks on that core. $LK,"System",A="FF:::/Doc/Glossary.DD,System Task"$ is the $LK,"Seth Task",A="FF:::/Doc/Glossary.DD,Seth Tasks"$ on $FG,2$Core0$FG$. You give a job to a $LK,"Seth Task",A="FF:::/Doc/Glossary.DD,Seth Tasks"$ with $LK,"JobQueue",A="MN:JobQueue"$() and get the result with $LK,"JobResGet",A="MN:JobResGet"$(). You spawn a task on any core with $LK,"Spawn",A="MN:Spawn"$(). diff --git a/src/Doc/NewASCII.DD b/src/Doc/NewASCII.DD index d4e5bb09..2a819898 100755 --- a/src/Doc/NewASCII.DD +++ b/src/Doc/NewASCII.DD @@ -9,7 +9,7 @@ We want to use one set for ASCII, ScanCodes and ScreenCodes. 128-191 : CTRL 192-256 : CTRL+SHIFT -No more ALT key in ZenithOS. +No more ALT key in ZealOS. CTRL-LEFT/RIGHT is already begin/end line. CTRL-UP/DOWN is already top/bottom of document. diff --git a/src/Doc/ODE.DD b/src/Doc/ODE.DD index 26bfd119..aa9a24cc 100755 --- a/src/Doc/ODE.DD +++ b/src/Doc/ODE.DD @@ -1,4 +1,4 @@ -$WW,1$ZenithOS has an advanced algorithm for integrating ordinary differential equations suitable for use in video games. (Not scientific work.) It also has some support for systems of masses and springs, to save you some work. +$WW,1$ZealOS has an advanced algorithm for integrating ordinary differential equations suitable for use in video games. (Not scientific work.) It also has some support for systems of masses and springs, to save you some work. See $LK,"CMathODE",A="MN:CMathODE"$ and $LK,"ODEsUpdate",A="MN:ODEsUpdate"$ for an overview. See $LK,"ODECallDerivative",A="MN:ODECallDerivative"$ to see what support there is for masses and springs. diff --git a/src/Doc/Once.DD b/src/Doc/Once.DD index 3a374d2e..d27008ea 100755 --- a/src/Doc/Once.DD +++ b/src/Doc/Once.DD @@ -6,9 +6,9 @@ $WW,1$$LK,"KMain",A="MN:KMain"$() includes $LK,"~/Once.CC"$ calls $LK,"OnceExe",A="MN:OnceExe"$(). -$LK,"ZOnce",A="MN:ZOnce"$() appends src code to $LK,"~/Registry.CC"$ $FG,2$Once/Zenith$FG$ tree, executed at next boot by $FG,2$Zenith$FG$. +$LK,"ZOnce",A="MN:ZOnce"$() appends src code to $LK,"~/Registry.CC"$ $FG,2$Once/Zeal$FG$ tree, executed at next boot by $FG,2$System$FG$. $LK,"Once",A="MN:Once"$() appends src code to $LK,"~/Registry.CC"$ $FG,2$Once/User$FG$ tree, executed at next boot by first $FG,2$User$FG$ term. -At boot, $LK,"OnceExe",A="MN:OnceExe"$(), executes $FG,2$Once/Zenith$FG$ tree, $LK,"ZOnceFlush",A="MN:ZOnceFlush"$()s it, +At boot, $LK,"OnceExe",A="MN:OnceExe"$(), executes $FG,2$Once/Zeal$FG$ tree, $LK,"ZOnceFlush",A="MN:ZOnceFlush"$()s it, executes $FG,2$Once/User$FG$ tree and $LK,"OnceFlush",A="MN:OnceFlush"$()s. diff --git a/src/Doc/Pags.DD b/src/Doc/Pags.DD index cfb21342..f3ab0eb5 100755 --- a/src/Doc/Pags.DD +++ b/src/Doc/Pags.DD @@ -1 +1 @@ -$WW,1$The word $FG,2$Pag$FG$ refers to an arbitrilly created $LK,"MEM_PAG_SIZE",A="MN:MEM_PAG_SIZE"$ unit of heap allocation. ZenithOS does not alter the CPU page tables after setting them up at boot in $LK,"SYS_INIT_PAGE_TABLES",A="MN:SYS_INIT_PAGE_TABLES"$, so the CPU hardware page size is rarely important. +$WW,1$The word $FG,2$Pag$FG$ refers to an arbitrilly created $LK,"MEM_PAG_SIZE",A="MN:MEM_PAG_SIZE"$ unit of heap allocation. ZealOS does not alter the CPU page tables after setting them up at boot in $LK,"SYS_INIT_PAGE_TABLES",A="MN:SYS_INIT_PAGE_TABLES"$, so the CPU hardware page size is rarely important. diff --git a/src/Doc/Print.DD b/src/Doc/Print.DD index 6e522717..fcafeb9c 100755 --- a/src/Doc/Print.DD +++ b/src/Doc/Print.DD @@ -68,8 +68,8 @@ $LK,"XTalkStr",A="MN:XTalkStr"$(CTask *task, U8 *format, ...) sends text of an $ $LK,"DocPrint",A="MN:DocPrint"$(CDoc *doc, U8 *format, ...) sends text to a document. You can buffer to a Doc and save it, providing the functionality of $FG,2$fprintf$FG$. See $LK,"::/Demo/Disk/FPrintF.CC"$. -$LK,"Zenith",A="MN:Zenith"$(U8 *format, ...) sends text to the $LK,"Zenith Task",A="FF:::/Doc/Glossary.DD,Zenith Task"$ to be compiled and run. -$LK,"ZenithLog",A="MN:ZenithLog"$(U8 *format, ...) and $LK,"ZenithErr",A="MN:ZenithErr"$(U8 *format,...) send text to the $LK,"Zenith Task",A="FF:::/Doc/Glossary.DD,Zenith Task"$ to be displayed. +$LK,"Sys",A="MN:Sys"$(U8 *format, ...) sends text to the $LK,"System Task",A="FF:::/Doc/Glossary.DD,System Task"$ to be compiled and run. +$LK,"SysLog",A="MN:SysLog"$(U8 *format, ...) and $LK,"SysErr",A="MN:SysErr"$(U8 *format,...) send text to the $LK,"System Task",A="FF:::/Doc/Glossary.DD,System Task"$ to be displayed. $LK,"StreamPrint",A="MN:StreamPrint"$(U8 *format, ...) sends text to the stream of code being compiled and must reside in a $FG,2$#exe{}$FG$ blk. @@ -81,7 +81,7 @@ $LK,"ExePrint",A="MN:ExePrint"$(U8 *format, ...) compiles and execute a string. $LK,"Once",A="MN:Once"$(U8 *format, ...) Writes User code to $LK,"Registry",A="FI:~/Registry.CC"$ to be executed next boot. -$LK,"ZOnce",A="MN:ZOnce"$(U8 *format, ...) Writes Zenith code to $LK,"Registry",A="FI:~/Registry.CC"$ to be executed next boot. +$LK,"ZOnce",A="MN:ZOnce"$(U8 *format, ...) Writes Zeal code to $LK,"Registry",A="FI:~/Registry.CC"$ to be executed next boot. $LK,"InPrint",A="MN:InPrint"$(I64 mS, U8 *format, ...) $LK,"PutChars",A="MN:PutChars"$()s one at a time with a delay. diff --git a/src/Doc/Quirks.DD b/src/Doc/Quirks.DD index 6ceb5d07..4ab71ab9 100755 --- a/src/Doc/Quirks.DD +++ b/src/Doc/Quirks.DD @@ -2,7 +2,7 @@ $FG,5$$TX+CX,"Quirks"$$FG$ $WW,1$* You run a risk of problems if you do file operations on the same files simultaneously because there is $BK,1$no file sharing/locking mechanism$BK,0$. Generally, the last write wins. -* When using $FG,2$FAT32$FG$, ZenithOS does not generate unique short-entry names, the ones with the $FG,2$~$FG$s. Not all $FG,2$FAT32$FG$ filenames are valid ZenithOS names and it will complain. Do not access $FG,2$FAT32$FG$ drives not dedicated to ZenithOS. Disable them with $LK,"DriveEnable",A="MN:DriveEnable"$(OFF), or they will generate error messages. $FG,2$FAT32$FG$ involves a long and short name for each file. +* When using $FG,2$FAT32$FG$, ZealOS does not generate unique short-entry names, the ones with the $FG,2$~$FG$s. Not all $FG,2$FAT32$FG$ filenames are valid ZealOS names and it will complain. Do not access $FG,2$FAT32$FG$ drives not dedicated to ZealOS. Disable them with $LK,"DriveEnable",A="MN:DriveEnable"$(OFF), or they will generate error messages. $FG,2$FAT32$FG$ involves a long and short name for each file. * The stack does not grow because virtual mem is not used. I recommend allocating large local vars from the heap. You can change $LK,"MEM_DEFAULT_STACK",A="MN:MEM_DEFAULT_STACK"$ and recompile $FG,2$Kernel$FG$ or request more when doing a $LK,"Spawn",A="MN:Spawn"$(). diff --git a/src/Doc/RedSea.DD b/src/Doc/RedSea.DD index ee2b05a5..e3f8c763 100755 --- a/src/Doc/RedSea.DD +++ b/src/Doc/RedSea.DD @@ -30,7 +30,7 @@ public class CRedSeaBoot //RedSea is type FAT32 in partition table to fool BIOS. U16 signature2; //0xAA55 }; $HL,0$ -See $LK,"::/Kernel/BlkDev/FileSysRedSea.CC"$ and $LK,"::/Zenith/Boot/DiskISORedSea.CC"$. +See $LK,"::/Kernel/BlkDev/FileSysRedSea.CC"$ and $LK,"::/System/Boot/DiskISORedSea.CC"$. Files with names ending in are compressed. See $LK,"::/Kernel/Compress.CC"$. diff --git a/src/Doc/Reliability.DD b/src/Doc/Reliability.DD index f5b81fa6..b7d51794 100755 --- a/src/Doc/Reliability.DD +++ b/src/Doc/Reliability.DD @@ -1,6 +1,6 @@ $WW,1$$FG,5$$TX+CX,"RedSea Reliability"$$FG$ -ZenithOS is like the 1040EZ tax form compared to the full 1040 form. Obviously, it is simpler. If you allow mission creep, pretty soon the 1040EZ looks just like the 1040 and the messed-up 1040EZ has no purpose. +ZealOS is like the 1040EZ tax form compared to the full 1040 form. Obviously, it is simpler. If you allow mission creep, pretty soon the 1040EZ looks just like the 1040 and the messed-up 1040EZ has no purpose. The Commodore 64 had a file system that was simple enough for peers in my generation to enjoy the thrill of knowing exactly what is going on at the hardware level and writing fun projects to access it. @@ -10,7 +10,7 @@ Obviously, we don't do bad block tables, or redundant FATs. We use the simplest possible technique, a contiguous-file-only allocation bitmap, not $LK,"Block Chains",A="FI:::/Doc/BlkChain.DD"$ or FAT tables. -You can be a good toy or you can be a good professional tool, but not both. ZenithOS's file manager will start too slowly once a few thousand files exist because the file manager makes a list of all files on start-up. +You can be a good toy or you can be a good professional tool, but not both. ZealOS's file manager will start too slowly once a few thousand files exist because the file manager makes a list of all files on start-up. Do not have more than a few thousand files or the file manager will not function. diff --git a/src/Doc/Requirements.DD b/src/Doc/Requirements.DD index cd39e1d1..9e5b7b60 100755 --- a/src/Doc/Requirements.DD +++ b/src/Doc/Requirements.DD @@ -1,4 +1,4 @@ -$WW,1$$FG,5$$TX+CX,"Requirements for ZenithOS"$$FG$ +$WW,1$$FG,5$$TX+CX,"Requirements for ZealOS"$$FG$ $FG,5$User Skills Required$FG$ * Knowledge of the $FG,2$C$FG$ programming language. diff --git a/src/Doc/ScopingLinkage.DD b/src/Doc/ScopingLinkage.DD index ac8857a6..86fcd2bd 100755 --- a/src/Doc/ScopingLinkage.DD +++ b/src/Doc/ScopingLinkage.DD @@ -2,7 +2,7 @@ $FG,5$$TX+CX,"Scoping and Linkage"$$FG$ $WW,1$ $LK,"JIT Compile Mode",A="FF:::/Doc/Glossary.DD,JIT Compile Mode"$ makes use of the current task's hash sym table and its parent tasks' tables. It fetches syms from parent tasks' tables if not found locally in the current task's table and it places new syms in the current task's table. Conceptually, syms are at the scope of environment vars in other operating systems. -When a sym is placed into a table, older syms with ident names will be overshadowed if they exist. Duplicates are not allowed in many cases, especially in asm blks. Dupicates are allowed, by design in other cases, so that you can repeatedly $FG,2$#include$FG$ the same file from the cmd line while developing it. Or, so you can repeatedly declare a function with a standard name, like $FG,2$DrawIt()$FG$. This case might occur when the $LK,"Zenith Task",A="FF:::/Doc/Glossary.DD,Zenith Task"$$FG$ is starting-up loading-in many little utilities. +When a sym is placed into a table, older syms with ident names will be overshadowed if they exist. Duplicates are not allowed in many cases, especially in asm blks. Dupicates are allowed, by design in other cases, so that you can repeatedly $FG,2$#include$FG$ the same file from the cmd line while developing it. Or, so you can repeatedly declare a function with a standard name, like $FG,2$DrawIt()$FG$. This case might occur when the $LK,"System Task",A="FF:::/Doc/Glossary.DD,System Task"$$FG$ is starting-up loading-in many little utilities. $FG,2$extern$FG$ binds a new $LK,"HTT_FUN",A="MN:HTT_FUN"$ or $LK,"HTT_GLOBAL_VAR",A="MN:HTT_GLOBAL_VAR"$ sym to an existing sym of the same name if it exists in the sym table (just in just-in-time code). It also can be used to generate a forward reference. diff --git a/src/Doc/Sprite.DD b/src/Doc/Sprite.DD index 0f761b44..a472dc7d 100755 --- a/src/Doc/Sprite.DD +++ b/src/Doc/Sprite.DD @@ -4,4 +4,4 @@ See $LK,"::/Demo/Graphics/SpritePlot.CC"$, $LK,"::/Demo/Graphics/SpritePlot3D.CC Be aware that copying $FG,2$SP$FG$, $FG,2$IB$FG$, or $FG,2$IS$FG$ entries with the clip results in duplicate entries with different nums. You can manually remove dups by editing with $FG,2$$FG$ and setting to the original num. -See $LK,"::/Zenith/Gr/GrSpritePlot.CC",A="FL:::/Zenith/Gr/GrSpritePlot.CC,1"$ for how CSprite are stored.$FG$ +See $LK,"::/System/Gr/GrSpritePlot.CC",A="FL:::/System/Gr/GrSpritePlot.CC,1"$ for how CSprite are stored.$FG$ diff --git a/src/Doc/Start.DD b/src/Doc/Start.DD index b1809f69..701db648 100755 --- a/src/Doc/Start.DD +++ b/src/Doc/Start.DD @@ -1,5 +1,5 @@ -$WW+H,1$$FG,5$$TX+CX,"ZenithOS V1.13",D="DD_OS_NAME_VERSION"$$FG$ +$WW+H,1$$FG,5$$TX+CX,"ZealOS V1.13",D="DD_OS_NAME_VERSION"$$FG$ $TX+CX,"Public Domain Operating System"$ diff --git a/src/Doc/StdZenithOSPC.DD b/src/Doc/StdZealOSPC.DD similarity index 73% rename from src/Doc/StdZenithOSPC.DD rename to src/Doc/StdZealOSPC.DD index 6b359f6d..8fc5b69b 100755 --- a/src/Doc/StdZenithOSPC.DD +++ b/src/Doc/StdZealOSPC.DD @@ -1,4 +1,4 @@ -$WW,1$$FG,5$$TX+CX,"The Standard ZenithOS PC"$$FG$ +$WW,1$$FG,5$$TX+CX,"The Standard ZealOS PC"$$FG$ All desktop PCs will have 8-channel OCTART super-simple high speed serial ports to replace USB. They are simpler because the driver is as simple as old school $LK,"RS232 Serial",A="FI:::/Doc/Comm.CC"$, they have no USB end-points and they have no USB human interface device reports. Computer mice will all have exactly two bttns and one wheel. Game controllers will all be the standard deluxe $TX,"game console controllers",HTML="http://www.gamestop.com/pc/accessories/steam-controller/121865"$ that are popular today. It will have 8 big TX and 8 big RX fifos that allow flow control characters to jump the queue. It should be locked-down to as few options as possible, like 8-1-N only, although hardware may use a USB frame, not an RS232, so stop bits might not be relevant. Perhaps, just two baud rates -- high and low speed are needed. Low speed is good for slow microcontrollers and allows longer cable length. Keyboard, mouse and game controller can be low speed. @@ -35,13 +35,13 @@ while (TRUE) temperature--; }$HL,0$ $ID,-5$ -Super-simple block devices will replace ATA/ATAPI hard drives and CD/DVD/BlueRays. Today, the industry is in flux with nonvolitile memory just invented. We want a super-simple block device interface for non-volitile memory and for what is currently USB memory sticks, but only if they can be made without bad blocks. I don't think we want to deal with bad block memory, so maybe we will not do NV-memory. The standard ZenithOS desktop will require a hard disk. +Super-simple block devices will replace ATA/ATAPI hard drives and CD/DVD/BlueRays. Today, the industry is in flux with nonvolitile memory just invented. We want a super-simple block device interface for non-volitile memory and for what is currently USB memory sticks, but only if they can be made without bad blocks. I don't think we want to deal with bad block memory, so maybe we will not do NV-memory. The standard ZealOS desktop will require a hard disk. There will be minimal commands: READ_BLOCK, WRITE_BLOCK, GET_CAPACITY, GET_MODEL, GET_SERIAL_NUM, and EJECT. We want a CPU mode with virtual IO port addresses similar to how paging creates virtual memory addresses. We want a 65536 word look-up table that converts virtual IO port numbers to physical IO port numbers. There will be a standard IO port configuration, so port numbers can be fixed in the code. We want the primary hard drive on one set of ports and the primary CD/DVD/Blu-ray on another set of ports. Choose a contiguous set of IO ports. -Meanwhile, a complicated PCI interface can be designed along-side the ZenithOS interface for Windows and Linux. It would almost be possible to carry-on separate lives, however, the super-simple serial requires getting rid of USB since super-simple serial is a new hardware standard. People can add USB ports with a PCI device card. +Meanwhile, a complicated PCI interface can be designed along-side the ZealOS interface for Windows and Linux. It would almost be possible to carry-on separate lives, however, the super-simple serial requires getting rid of USB since super-simple serial is a new hardware standard. People can add USB ports with a PCI device card. God said He wants single-voice 8-bit signed MIDI-like sample for the sound. God does not want death screams, perhaps, because God has PTSD or soldiers have PTSD. (Imagine wounded on battlefields.) @@ -51,16 +51,16 @@ I am tmpted to help amateur hardware device designers by making the hardware int The original PC had general purpose digital IO through the parallel port. That was fun. I have enough battles to fight, so I'll leave being a savior to hobbiest hardware engineers to somebody else. -Digital cameras will be super-simple high speed serial, but ZenithOS is forever limited to 16 colors and multimedia is banned because large files being loaded into memory fragments memory, so cameras are somewhat unwelcome. I have enough problems without making the Brits anxious about autonomous gun turrets and killer robots. The reason I say cameras will be super-simple serial is because we are replacing USB ports with super-simple serial. PC's will have only super-simple serial ports unless people buy a USB PCI expansion card. So, the digital cameras will be super-simple serial. +Digital cameras will be super-simple high speed serial, but ZealOS is forever limited to 16 colors and multimedia is banned because large files being loaded into memory fragments memory, so cameras are somewhat unwelcome. I have enough problems without making the Brits anxious about autonomous gun turrets and killer robots. The reason I say cameras will be super-simple serial is because we are replacing USB ports with super-simple serial. PC's will have only super-simple serial ports unless people buy a USB PCI expansion card. So, the digital cameras will be super-simple serial. $FG,5$$TX+CX,"Version 1.0"$$FG$ -We will make a spec for a $$8,000, perfectly standardized, cryogenically-cooled, monster desktop PC. It will have 16 cores, integrated 4K graphics, and, hopefully, 6 Ghz continuous operation. Perhaps, 64 Gig of RAM will be standard? God said to help to poor buy them. It is pointless to have a high powered machine if other people have wimpy machines and cannot run programs you write. Therefore, everybody in the developed world will buy a Standard ZenithOS IBM PC over the next ten years, so that will be a quantity of 400 million, perhaps. God said to pay the US national debt with the revenue. We will standardize everything, not just the ZenithOS related items. The display will be 4K (and of course 640x480 16 color) and no others. Everybody gets just one monitor, unless you buy special PCI cards. Everybody gets two speakers, a headphone, a mic, a webcam and touch screen. We make the audio one sample rate and one sample size, but ZenithOS still gets just a square wave. (HD Audio is really screwed-up and requires complicated artificial intelligence, just to route output to speakers.) +We will make a spec for a $$8,000, perfectly standardized, cryogenically-cooled, monster desktop PC. It will have 16 cores, integrated 4K graphics, and, hopefully, 6 Ghz continuous operation. Perhaps, 64 Gig of RAM will be standard? God said to help to poor buy them. It is pointless to have a high powered machine if other people have wimpy machines and cannot run programs you write. Therefore, everybody in the developed world will buy a Standard ZealOS IBM PC over the next ten years, so that will be a quantity of 400 million, perhaps. God said to pay the US national debt with the revenue. We will standardize everything, not just the ZealOS related items. The display will be 4K (and of course 640x480 16 color) and no others. Everybody gets just one monitor, unless you buy special PCI cards. Everybody gets two speakers, a headphone, a mic, a webcam and touch screen. We make the audio one sample rate and one sample size, but ZealOS still gets just a square wave. (HD Audio is really screwed-up and requires complicated artificial intelligence, just to route output to speakers.) -The Standard Temple IBM PC will be a full-sized tower. Perhaps, stain-glass will decorate the case because God is sentimentally attached to stained-glass. We should set the size at exactly 2.5 feet by 1.5 feet by 1.5 feet as in $LK,"Exodus 25:10",A="BF:Exodus,25:10"$ for all time. If there is extra room, make a storage shelf for DVDs. We do not want a race-to-the-bottom, shrinking the size. Instead of making it smaller, make it more powerful. We want to remove all cost pressure from making things small. It must have a CD/DVD/Blu-ray drive. The vision is CD/DVDs used for a library of games, not installed on the hard-drive. We need a network connection, possibly implemented as a super-simple high speed serial device. What about standard monitor and speakers? The C64's success was partially due to wide spread, completely standard, hardware. I think ZenithOS will not do bad block devices, so we need a hard drive, not just NV-memory or SSD. +The Standard Temple IBM PC will be a full-sized tower. Perhaps, stain-glass will decorate the case because God is sentimentally attached to stained-glass. We should set the size at exactly 2.5 feet by 1.5 feet by 1.5 feet as in $LK,"Exodus 25:10",A="BF:Exodus,25:10"$ for all time. If there is extra room, make a storage shelf for DVDs. We do not want a race-to-the-bottom, shrinking the size. Instead of making it smaller, make it more powerful. We want to remove all cost pressure from making things small. It must have a CD/DVD/Blu-ray drive. The vision is CD/DVDs used for a library of games, not installed on the hard-drive. We need a network connection, possibly implemented as a super-simple high speed serial device. What about standard monitor and speakers? The C64's success was partially due to wide spread, completely standard, hardware. I think ZealOS will not do bad block devices, so we need a hard drive, not just NV-memory or SSD. -ZenithOS will have the priority over Windows or Linux on hardware decisions. We could make it heterogenious multicore. I think we want 16 non-hyperthreaded cores. Core#0 is the only full-featured core needed. The other cores will have long mode, but not some of these: real mode, protected mode, ring-3, paging, interrupts, in/out port instructions, SSE instructions, MMX instructions. +ZealOS will have the priority over Windows or Linux on hardware decisions. We could make it heterogenious multicore. I think we want 16 non-hyperthreaded cores. Core#0 is the only full-featured core needed. The other cores will have long mode, but not some of these: real mode, protected mode, ring-3, paging, interrupts, in/out port instructions, SSE instructions, MMX instructions. God said Intel should do a simulation of heat produced by gates and try spreading-out the heat producing gate circuits on the chip. @@ -69,13 +69,13 @@ God said Linux's Wine should replace Windows. We will install a standard softwa $FG,5$$TX+CX,"Usage"$$FG$ -ZenithOS is primarily for user developers, like the Commodore 64 was. I created a total of 50 Meg of content over ten years, so you shouldn't need much room, either. The installed hard drive space should stay small because the resolution is low, multimedia is banned, 3rd party libraries are banned, and applications can be distributed with ISO files or DVDs. +ZealOS is primarily for user developers, like the Commodore 64 was. I created a total of 50 Meg of content over ten years, so you shouldn't need much room, either. The installed hard drive space should stay small because the resolution is low, multimedia is banned, 3rd party libraries are banned, and applications can be distributed with ISO files or DVDs. -The ROM will have a command that copies the ROM onto the hard drive, creating identical C and D partitions, so you can have fun modifying ZenithOS. You will have confidence you can fix it easily if you break it. It should be able to run everything from just the ROM, too. You will need to specify a /Home directory that is not in the ROM, but on the hard drive. +The ROM will have a command that copies the ROM onto the hard drive, creating identical C and D partitions, so you can have fun modifying ZealOS. You will have confidence you can fix it easily if you break it. It should be able to run everything from just the ROM, too. You will need to specify a /Home directory that is not in the ROM, but on the hard drive. -The standard set-up will be a C primary drive and a D back-up drive. Keep the size on each hard drive under 512 Meg and periodically copy all of C to D, so they stay mirrored. The file manager and other programs read the entire directory structures, so too many files causes problems (unbearably slow). Third party software should be distributed as ISO files or DVDs, like $FG,4$$TX,"TextAdventure.ISO",HTML="https://github.com/jwhitham/frotz"$$FG$. No 3rd party libraries are permitted because they circumvent the intent of the 100,000 line of code limit which is keeping it cognatively small enough to see the light at the end of the tunnel and easily master everything. Therefore, 3rd party ISO files must bring all required software components with them, except what is found in the ZenithOS ROM. +The standard set-up will be a C primary drive and a D back-up drive. Keep the size on each hard drive under 512 Meg and periodically copy all of C to D, so they stay mirrored. The file manager and other programs read the entire directory structures, so too many files causes problems (unbearably slow). Third party software should be distributed as ISO files or DVDs, like $FG,4$$TX,"TextAdventure.ISO",HTML="https://github.com/jwhitham/frotz"$$FG$. No 3rd party libraries are permitted because they circumvent the intent of the 100,000 line of code limit which is keeping it cognatively small enough to see the light at the end of the tunnel and easily master everything. Therefore, 3rd party ISO files must bring all required software components with them, except what is found in the ZealOS ROM. -Having all your 3rd party software on separate DVDs or ISO files and ZenithOS running from a ROM, keeps it delightfully simple so you have complete understanding of what is going on. You will have complete confidence and it will be a joy to use. 3rd party applications can store saved data files into your /Home hard drive directory. +Having all your 3rd party software on separate DVDs or ISO files and ZealOS running from a ROM, keeps it delightfully simple so you have complete understanding of what is going on. You will have complete confidence and it will be a joy to use. 3rd party applications can store saved data files into your /Home hard drive directory. The Temple PC will stay unchanged for seven years at a time. The Bible speaks of a seven year release in $LK,"Deuteronomy 15:1",A="BF:Deuteronomy,15:1"$. The Commodore stayed unchanged for many years and people became intimately familiar with every aspect. diff --git a/src/Doc/Strategy.DD b/src/Doc/Strategy.DD index 2a81b928..12ad8d8f 100755 --- a/src/Doc/Strategy.DD +++ b/src/Doc/Strategy.DD @@ -1,4 +1,4 @@ -$WW,1$$FG,5$$TX+CX,"Decisions Making ZenithOS Simple"$ +$WW,1$$FG,5$$TX+CX,"Decisions Making ZealOS Simple"$ $FG$ Everybody is obsessed, Jedi mind-tricked, by the notion that when you scale-up, it doesn't get bad, it gets worse. They automatically think things are going to get bigger. Guess what happens when you scale down? It doesn't get good, it gets better! @@ -12,11 +12,11 @@ Linux is a semi-tractor -- you need professional drivers for 20 gears. Linux has Windows is a car. -ZenithOS is a motorcycle -- if you lean-over too far, a motorcycle will crash. Don't do that! There are no side air bags on a motorcycle. DOS and C64 had no memory protections and ran in ring-0, with no security. This saves an order of magnitude complexity. +ZealOS is a motorcycle -- if you lean-over too far, a motorcycle will crash. Don't do that! There are no side air bags on a motorcycle. DOS and C64 had no memory protections and ran in ring-0, with no security. This saves an order of magnitude complexity. -Linux and Windows are general purpose operating systems. They attempt to do any task you want. ZenithOS cherry-picks tasks and is designed to do the same things a C64 did. This saves and order of magnitude complexity. For example, the $LK,"RedSea",A="FI:::/Doc/RedSea.DD"$ file system allocates just contiguous files -- you load and save whole files at once. A benefit is this allows compression. Also, ZenithOS does not do networking or multimedia. In theory, memory will fragment with lots of big files. The system would fall to pieces with multimedia, but God said 640x480 16 color is a permanent covenant like circumcision. +Linux and Windows are general purpose operating systems. They attempt to do any task you want. ZealOS cherry-picks tasks and is designed to do the same things a C64 did. This saves and order of magnitude complexity. For example, the $LK,"RedSea",A="FI:::/Doc/RedSea.DD"$ file system allocates just contiguous files -- you load and save whole files at once. A benefit is this allows compression. Also, ZealOS does not do networking or multimedia. In theory, memory will fragment with lots of big files. The system would fall to pieces with multimedia, but God said 640x480 16 color is a permanent covenant like circumcision. -A three bttn mouse is like a leg you cannot put weight on. ZenithOS just does hardware everybody has, with no divergent code bases for each machine's custom hardware. There is one graphics driver instead of 50 for different GPUs. This saves an order of magnitude complexity and makes for a delightful API, so developer's code is not like a frayed rope end. +A three bttn mouse is like a leg you cannot put weight on. ZealOS just does hardware everybody has, with no divergent code bases for each machine's custom hardware. There is one graphics driver instead of 50 for different GPUs. This saves an order of magnitude complexity and makes for a delightful API, so developer's code is not like a frayed rope end. @@ -58,6 +58,6 @@ A three bttn mouse is like a leg you cannot put weight on. ZenithOS just does ha * All tasks have a heap and a sym table. Scope is that of environment vars in other operating systems. As text is typed at the command line or you run programs by $FG,2$#include$FG$ing them, the syms go in the table. If a sym is not found, the parent task's table is checked. The father of all tasks has the API syms you'll need waiting in it's table. No need to $FG,2$#include$FG$ headers. -* No need for namespaces -- scoping occurs automatically based on task symbol table hierarchy with the $LK,"Zenith Task",A="FF:::/Doc/Glossary.DD,Zenith Task"$$FG$'s symbol system-wide global. +* No need for namespaces -- scoping occurs automatically based on task symbol table hierarchy with the $LK,"System Task",A="FF:::/Doc/Glossary.DD,System Task"$$FG$'s symbol system-wide global. * Sometimes, I $LK,"cut corners",A="FI:::/Doc/CutCorners.DD"$ in the interest of keeping the code beautiful. diff --git a/src/Doc/TOSZ.DD b/src/Doc/TOSZ.DD index 88166045..3157490d 100755 --- a/src/Doc/TOSZ.DD +++ b/src/Doc/TOSZ.DD @@ -3,7 +3,7 @@ $WW,1$$FG,5$$TX+CX,"Linux TOSZ Utility"$$FG$ $FG,2$TOSZ [-ascii] filename$FG$ -Will uncompress a single file from within Linux. The $FG,2$-ascii$FG$ flag will convert the irregular ZenithOS ASCII 5 and ASCII 31 characters to spaces. (ASCII 5 is used to mark the cursor pos and ASCII 31 is used for shifted space characters and will cause problems unless you convert them.) +Will uncompress a single file from within Linux. The $FG,2$-ascii$FG$ flag will convert the irregular ZealOS ASCII 5 and ASCII 31 characters to spaces. (ASCII 5 is used to mark the cursor pos and ASCII 31 is used for shifted space characters and will cause problems unless you convert them.) $FG,8$ * "Linux" is a trademark owned by Linus Torvalds. diff --git a/src/Doc/TimeCycles.DD b/src/Doc/TimeCycles.DD index de5aca2a..78b776af 100755 --- a/src/Doc/TimeCycles.DD +++ b/src/Doc/TimeCycles.DD @@ -1 +1 @@ -$WW,1$Intel/AMD have an inst that returns the num of CPU cycles since boot. This is not a steady, calibrated real time value. ZenithOS measures it and you can convert with $LK,"counts.time_stamp_freq",A="MN:CCountsGlobals"$, a value continuously calibrated from other counts. \ No newline at end of file +$WW,1$Intel/AMD have an inst that returns the num of CPU cycles since boot. This is not a steady, calibrated real time value. ZealOS measures it and you can convert with $LK,"counts.time_stamp_freq",A="MN:CCountsGlobals"$, a value continuously calibrated from other counts. \ No newline at end of file diff --git a/src/Doc/TimeDate.DD b/src/Doc/TimeDate.DD index 3479d45d..1cf966b2 100755 --- a/src/Doc/TimeDate.DD +++ b/src/Doc/TimeDate.DD @@ -1,3 +1,3 @@ -$WW,1$ZenithOS uses a 64-bit value, $LK,"CDate",A="MN:CDate"$, for date/time. The upper 32-bits are the days since Christ. The lower 32-bits store time of day divided by 4 billion which works out to 49710ths of a second. You can subtract two $LK,"CDate",A="MN:CDate"$'s to get a time span. +$WW,1$ZealOS uses a 64-bit value, $LK,"CDate",A="MN:CDate"$, for date/time. The upper 32-bits are the days since Christ. The lower 32-bits store time of day divided by 4 billion which works out to 49710ths of a second. You can subtract two $LK,"CDate",A="MN:CDate"$'s to get a time span. Use $LK,"CDATE_FREQ",A="MN:CDATE_FREQ"$ to convert. diff --git a/src/Doc/Tips.DD b/src/Doc/Tips.DD index 60c58804..9a5afc9d 100755 --- a/src/Doc/Tips.DD +++ b/src/Doc/Tips.DD @@ -10,7 +10,7 @@ $WW,1$$FG,5$$TX+CX,"Tips"$$FG$ * $FG,2$$FG$ maximizes a window. $FG,2$$FG$ closes AutoComplete. $FG,2$$FG$ brings back AutoComplete. $FG,2$$FG$ vertically tiles windows. $FG,2$$FG$ horizontally tiles windows. The $FG,2$ALT$FG$ keys are defined in $LK,"~/HomeKeyPlugIns.CC"$. You can customize them. -* If you make changes to ZenithOS files in your $FG,2$/Home$FG$ directory, generally you reboot to make them take effect. (You don't compile anything.) You should have two ZenithOS partitions on your hard drive because a syntax error in a start-up file will make the partition unbootable. Boot to the second partition or boot to a standard ZenithOS CD/DVD and use $LK,"Mount",A="MN:Mount"$() to mount your hard drive. +* If you make changes to ZealOS files in your $FG,2$/Home$FG$ directory, generally you reboot to make them take effect. (You don't compile anything.) You should have two ZealOS partitions on your hard drive because a syntax error in a start-up file will make the partition unbootable. Boot to the second partition or boot to a standard ZealOS CD/DVD and use $LK,"Mount",A="MN:Mount"$() to mount your hard drive. * I copy my files to a mirrored ident partition, periodically with $LK,"CopyTree",A="MN:CopyTree"$() commands in scripts. I do merge commands with a menu entry like this: $FG,2$Merge(\"C:/*\",\"D:/*\",\"+r+d\");$FG$ to check my changes. @@ -41,7 +41,7 @@ $FG,2$Merge(\"C:/*\",\"D:/*\",\"+r+d\");$FG$ to check my changes. * Use $LK,"DocMax",A="MN:DocMax"$() to adjust the size of the cmd line buf. It counts $LK,"CDoc",A="MN:CDoc"$ entries, not lines. -* Many data structures have a $FG,2$user_data$FG$ member. Those are available for you to store a data item, for convenience. $LK,"CTask",A="MN:CTask"$, $LK,"CDocEntry",A="MN:CDocEntry"$ and $LK,"CDirEntry",A="MN:CDirEntry"$ have them. You shouldn't encounter conflicts with ZenithOS using them. +* Many data structures have a $FG,2$user_data$FG$ member. Those are available for you to store a data item, for convenience. $LK,"CTask",A="MN:CTask"$, $LK,"CDocEntry",A="MN:CDocEntry"$ and $LK,"CDirEntry",A="MN:CDirEntry"$ have them. You shouldn't encounter conflicts with ZealOS using them. * If, for some strange reason, you wanted to reduce mem usage, make a smaller disk cache when you recompile the kernel; disabling $FG,2$AutoComplete$FG$; Specify smaller stack sizes when doing $LK,"Spawn",A="MN:Spawn"$(), change $LK,"MEM_DEFAULT_STACK",A="MN:MEM_DEFAULT_STACK"$, and using $LK,"DocMax",A="MN:DocMax"$() to reduce the cmd line buffer size. @@ -117,7 +117,7 @@ $FG,2$Merge(\"C:/*\",\"D:/*\",\"+r+d\");$FG$ to check my changes. * You can delete the $FG,4$~/Registry.CC$FG$ file. The policy is that deleting it will restore defaults. It is a text doc, if you want to edit it. Be careful of tree indentations. -* Study $LK,"::/Zenith/Utils/MemRep.CC"$ and $LK,"WallPaper",A="MN:WallPaper"$() to learn how the system resources are put together. +* Study $LK,"::/System/Utils/MemRep.CC"$ and $LK,"WallPaper",A="MN:WallPaper"$() to learn how the system resources are put together. * The editor's sel-text mechanism allows for disjoint portions of sel text. This is a feature, not a bug -- you can cut-and-paste disjoint text. diff --git a/src/Doc/Welcome.DD b/src/Doc/Welcome.DD index 4332c100..a3748004 100755 --- a/src/Doc/Welcome.DD +++ b/src/Doc/Welcome.DD @@ -1,6 +1,6 @@ -$WW,1$$FG,5$$TX+CX,"Welcome to ZenithOS"$$FG$ +$WW,1$$FG,5$$TX+CX,"Welcome to ZealOS"$$FG$ -ZenithOS is a x86_64, multi-cored, non-preemptive multi-tasking, ring-0-only, single-address_mapped (identity-mapped), operating system for recreational programming. Paging is almost not used. +ZealOS is a x86_64, multi-cored, non-preemptive multi-tasking, ring-0-only, single-address_mapped (identity-mapped), operating system for recreational programming. Paging is almost not used. The people whom can most benefit are: $ID,2$* Professionals doing hobby projects @@ -9,9 +9,9 @@ $ID,2$* Professionals doing hobby projects $ID,-2$ Simplicity is a goal to $LK,"keep the line count down",A="FI:::/Doc/Strategy.DD"$, so it's easy to tinker with. As it turns-out, simplicity makes it faster in some ways, too. It never switches privilege levels, never changes address maps, tends to load whole contiguous files and other, similar things which boost speed. It's only $TX,"80,849",D="DD_TEMPLEOS_LOC"$ lines of code including the kernel, the 64-bit compiler, the graphics library and all the tools. More importantly, it's designed to keep the user's line count down -- you can do a $LK,"Hello World",A="FI:::/Doc/HelloWorld.DD"$ application in one line of code and can put graphics on the screen with a three line program! -It's a kayak, not a Titanic -- it will crash if you do something wrong. You quickly reboot, however. DOS and the 8-bit home computers of the 80's worked fine without memory protection and most computers in the world -- the embedded ones -- operate without protection. The resulting simplicity of no protections is why ZenithOS has value. In facts, that's the point of ZenithOS. See the $LK,"ZenithOS Charter",A="FI:::/Doc/Charter.DD"$. +It's a kayak, not a Titanic -- it will crash if you do something wrong. You quickly reboot, however. DOS and the 8-bit home computers of the 80's worked fine without memory protection and most computers in the world -- the embedded ones -- operate without protection. The resulting simplicity of no protections is why ZealOS has value. In facts, that's the point of ZealOS. See the $LK,"ZealOS Charter",A="FI:::/Doc/Charter.DD"$. -Conventional thinking is "failure is not an option" for general purpose operating systems. Since this OS is used in addition to Windows or Linux, however, failure is an option -- just use Windows or Linux if you can't do something. I cherry-pick what it will and won't do, to make it maximally beautiful. The following applications more or less form a basis that spans the range of use that ZenithOS is intended for: +Conventional thinking is "failure is not an option" for general purpose operating systems. Since this OS is used in addition to Windows or Linux, however, failure is an option -- just use Windows or Linux if you can't do something. I cherry-pick what it will and won't do, to make it maximally beautiful. The following applications more or less form a basis that spans the range of use that ZealOS is intended for: $LK,"/Demo/Games/BattleLines.CC",A="FI:::/Demo/Games/BattleLines.CC"$ $LK,"/Demo/Games/BigGuns.CC",A="FI:::/Demo/Games/BigGuns.CC"$ @@ -47,9 +47,9 @@ $LK,"/Apps/Psalmody/Examples/childish.CC",A="FI:::/Apps/Psalmody/Examples/childi $LK,"/Apps/Psalmody/Examples/night.CC",A="FI:::/Apps/Psalmody/Examples/night.CC"$ $LK,"/Apps/Psalmody/Examples/prosper.CC",A="FI:::/Apps/Psalmody/Examples/prosper.CC"$ -Two things to know about ZenithOS are that $UL,1$tasks$UL,0$ have $LK,"MAlloc",A="MN:MAlloc"$/$LK,"Free",A="MN:Free"$ heap memory, not applications, and tasks have compiler symbol tables that persist at a scope like environment variables in other operating systems, and the symbols can include functions. +Two things to know about ZealOS are that $UL,1$tasks$UL,0$ have $LK,"MAlloc",A="MN:MAlloc"$/$LK,"Free",A="MN:Free"$ heap memory, not applications, and tasks have compiler symbol tables that persist at a scope like environment variables in other operating systems, and the symbols can include functions. -For other operating systems, I hated learning one language for command line scripts and another for programming. With $FG,2$ZenithOS$FG$, the command line feeds right into the $LK,"CosmiC",A="FI:::/Doc/CosmiC.DD"$ compiler, line by line, and it places code into memory it $LK,"MAlloc",A="MN:MAlloc"$()s. The compiler is paused at the command line, waiting for input. Naturally, you $FG,2$#include$FG$ a program to load it into memory and, usually, start it. +For other operating systems, I hated learning one language for command line scripts and another for programming. With $FG,2$ZealOS$FG$, the command line feeds right into the $LK,"CosmiC",A="FI:::/Doc/CosmiC.DD"$ compiler, line by line, and it places code into memory it $LK,"MAlloc",A="MN:MAlloc"$()s. The compiler is paused at the command line, waiting for input. Naturally, you $FG,2$#include$FG$ a program to load it into memory and, usually, start it. During the boot process, many files get $LK,"compiled",A="FI:::/StartOS.CC"$ before you have access to the command line. (Don't worry, booting takes only two seconds.) All the header declarations for the operating system are compiled and are available for use in your programs without needing to $FG,2$#include $FG$them. Everything is truly compiled to native $FG,2$$TX,"x86_64",HTML="http://en.wikipedia.org/wiki/Amd64#AMD64"$$FG$ machine code, nothing is $FG,2$interpreted$FG$ and there is no $FG,2$byte code$FG$. @@ -71,23 +71,23 @@ The syntax change created an ambiguity when specifying function addresses, like Once I was no longer using standard C/C++ syntax, I decided to change everything I didn't like and call it $LK,"CosmiC",A="FI:::/Doc/CosmiC.DD"$. Here are the new $LK,"operator precedence",A="FF:::/Doc/CosmiC.DD,operator precedence"$ rules. It's Biblical! See $LK,"Luke 5:37",A="BF:Luke,5:37"$. -There are no object files in ZenithOS and, normally, you don't make executable files either, but you can. That's known as $LK,"Ahead-of-Time",A="FF:::/Doc/Glossary.DD,AOT Compile Mode"$ compilation. Instead, you $LK,"Just in Time",A="FF:::/Doc/Glossary.DD,JIT Compile Mode"$ compile. +There are no object files in ZealOS and, normally, you don't make executable files either, but you can. That's known as $LK,"Ahead-of-Time",A="FF:::/Doc/Glossary.DD,AOT Compile Mode"$ compilation. Instead, you $LK,"Just in Time",A="FF:::/Doc/Glossary.DD,JIT Compile Mode"$ compile. Tasks have no priority and are never removed from the queue. Instead, they often poll whatever they are waiting on and swap-out. (Swapping tasks takes half a microsecond and does not involve disk activity or memory maps.) See $LK,"Scheduler",A="FL:::/Kernel/Sched.CC,1"$. Polling keeps it simple. It might be a problem if you had lots of tasks busy, which rarely happens on a home computer. The order of the tasks in the queue determines front-to-back window order. -The $FG,2$FAT32$FG$ filesystem is supported to makes exchanging files with a dual booted other operating system easy and there is the simple, 64-bit ZenithOS $LK,"RedSea",A="FI:::/Doc/RedSea.DD"$ filesystem. The $LK,"RedSea",A="FI:::/Doc/RedSea.DD"$ has allocation bitmap for clus and all files are stored contiguously. You can't grow files. +The $FG,2$FAT32$FG$ filesystem is supported to makes exchanging files with a dual booted other operating system easy and there is the simple, 64-bit ZealOS $LK,"RedSea",A="FI:::/Doc/RedSea.DD"$ filesystem. The $LK,"RedSea",A="FI:::/Doc/RedSea.DD"$ has allocation bitmap for clus and all files are stored contiguously. You can't grow files. -ZenithOS is geared toward reading and writing whole files. There is support for direct block random access into files, however -- $LK,"FBlkRead",A="MN:FBlkRead"$() and $LK,"FBlkWrite",A="MN:FBlkWrite"$(). +ZealOS is geared toward reading and writing whole files. There is support for direct block random access into files, however -- $LK,"FBlkRead",A="MN:FBlkRead"$() and $LK,"FBlkWrite",A="MN:FBlkWrite"$(). There is no $FG,2$PATH$FG$, but parent directories are searched when a file is not found. This feature is especially useful for default account files. The graphic resolution is poor, $FG,2$640x480 16 color$FG$, but God said it was a covenant like circumcision. Also, that's all I feel comfortable with without GPU acceleration supported. A $FG,2$1600x1200x24$FG$ bit screen takes 37 times more memory, implying 37 times the CPU power. Also, a fixed size keeps it simple with everybody machine having the same appearance. Look on the bright-side -- you won't spend as much time twiddling pixels for your game art and you'll have tons of CPU power available, especially with multicore systems. -ZenithOS is for hobbyist programmers on single user (at a time) home computers, not mainframes or servers. The focus task is all-important so symmetrical multiprocessing is almost pointless. Why does it matter running two apps at the same time twice as fast when you really want to run one faster? You could say ZenithOS does master/slave multiprocessing. The anticipated use for multicore is primarily putting graphics on the screen. Hardware graphics acceleration is not used, so this is possible. See $LK,"ZenithOS MultiCore",A="FI:::/Doc/MultiCore.DD"$. +ZealOS is for hobbyist programmers on single user (at a time) home computers, not mainframes or servers. The focus task is all-important so symmetrical multiprocessing is almost pointless. Why does it matter running two apps at the same time twice as fast when you really want to run one faster? You could say ZealOS does master/slave multiprocessing. The anticipated use for multicore is primarily putting graphics on the screen. Hardware graphics acceleration is not used, so this is possible. See $LK,"ZealOS MultiCore",A="FI:::/Doc/MultiCore.DD"$. -There is no distinction between the terms $FG,2$task$FG$, $FG,2$process$FG$ or $FG,2$thread$FG$. All have a task record, $LK,"CTask",A="MN:CTask"$, pointed to by the $FG,2$FS$FG$ segment reg and are accessed with $FG,4$Fs->$FG$ while $FG,4$Gs->$FG$ points to a $LK,"CCPU",A="MN:CCPU"$ for the current CPU core. Each task can have just one window, but a task can have children with windows. (The segment regs are just used as extra regs -- there is nothing segmented about ZenithOS' memory.) It is approximately the case that $FG,2$ZenithOS$FG$ is multi-threading, single-processing. +There is no distinction between the terms $FG,2$task$FG$, $FG,2$process$FG$ or $FG,2$thread$FG$. All have a task record, $LK,"CTask",A="MN:CTask"$, pointed to by the $FG,2$FS$FG$ segment reg and are accessed with $FG,4$Fs->$FG$ while $FG,4$Gs->$FG$ points to a $LK,"CCPU",A="MN:CCPU"$ for the current CPU core. Each task can have just one window, but a task can have children with windows. (The segment regs are just used as extra regs -- there is nothing segmented about ZealOS' memory.) It is approximately the case that $FG,2$ZealOS$FG$ is multi-threading, single-processing. -In $FG,2$ZenithOS$FG$, $LK,"Zenith Task",A="FF:::/Doc/Glossary.DD,Zenith Task"$$FG$ refers to the father of all tasks. He's never supposed to die. Since tasks inherit the symbols of parents, system-wide stuff is associated with $FG,2$Zenith$FG$. His heap is like kernel memory in other operating systems. Since $FG,2$Zenith$FG$ is immortal, it's safe to alloc objects, not tied to any mortal task, from $FG,2$Zenith$FG$'s heap. He stays in a server mode, taking requests, so you can ask him to $FG,2$#include$FG$ something, placing that code system-wide. A funny story is that originally I called it the $FG,2$root$FG$ task and even had a $FG,2$/Root$FG$ directory :-) $FG,2$Zenith$FG$ executes $LK,"::/StartOS.CC"$ at boot time. +In $FG,2$ZealOS$FG$, $LK,"System Task",A="FF:::/Doc/Glossary.DD,System Task"$$FG$ refers to the father of all tasks. He's never supposed to die. Since tasks inherit the symbols of parents, system-wide stuff is associated with $FG,2$System$FG$. His heap is like kernel memory in other operating systems. Since $FG,2$System$FG$ is immortal, it's safe to alloc objects, not tied to any mortal task, from $FG,2$System$FG$'s heap. He stays in a server mode, taking requests, so you can ask him to $FG,2$#include$FG$ something, placing that code system-wide. A funny story is that originally I called it the $FG,2$root$FG$ task and even had a $FG,2$/Root$FG$ directory :-) $FG,2$System$FG$ executes $LK,"::/StartOS.CC"$ at boot time. For easy back-ups, place everything you author in your $FG,2$/Home$FG$ directory and subdirectories. Then, use $LK,"CopyTree",A="MN:CopyTree"$(). That should make upgrading easy, too. Customizable start-up scripts go in your $FG,2$/Home$FG$ directory. The default start-up scripts are in the root directory. Copy the start-up files you wish to customize into $FG,2$/Home$FG$ and modify them. See $LK,"Home Files",A="FF:::/Doc/GuideLines.DD,/Home Files"$. You can make your own distro that includes everything and is a bootable live CD with $LK,"::/Misc/DoDistro.CC"$. @@ -116,13 +116,13 @@ As you browse code, use the $FG,2$AutoComplete$FG$ window to look-up functions, Use the $LK,"Help & Index",A="FI:::/Doc/HelpIndex.DD"$ or $LK,"Demo Index",A="FI:::/Doc/DemoIndex.DD"$ to find-out what exists. Press $FG,2$$FG$ for help or use the links on your menu ($FG,2$$FG$). Also, look in the $FG,2$/Demo$FG$ or $FG,2$/Apps$FG$ directories for inspiration. -Software is distributed as $LK,"RedSea",A="FI:::/Doc/RedSea.DD"$ ISO files. Burn a CD/DVD, or set your CD/DVD in $FG,2$QEMU$FG$, $FG,2$VMware$FG$ or $FG,2$VirtualBox$FG$ to the ISO file. Then, access the $FG,2$'T'$FG$ drive. Or, $LK,"Mount",A="MN:Mount"$() the ISO.C file and access the $FG,2$'M'$FG$ drive in ZenithOS. It must be a contiguous ISO.C file, so rename it under ZenithOS to ISO.C. +Software is distributed as $LK,"RedSea",A="FI:::/Doc/RedSea.DD"$ ISO files. Burn a CD/DVD, or set your CD/DVD in $FG,2$QEMU$FG$, $FG,2$VMware$FG$ or $FG,2$VirtualBox$FG$ to the ISO file. Then, access the $FG,2$'T'$FG$ drive. Or, $LK,"Mount",A="MN:Mount"$() the ISO.C file and access the $FG,2$'M'$FG$ drive in ZealOS. It must be a contiguous ISO.C file, so rename it under ZealOS to ISO.C. Ideally, do not install applications such as games onto your hard drive because we wish to keep hard drive usage low, so the whole $FG,2$'C'$FG$ drive can be copied quickly to $FG,2$'D'$FG$. Also, the $LK,"FileMgr",A="MN:FileMgr"$() $FG,2$$FG$ starts too slowly when there are lots of hard drive files, but that is how we want it. -3rd party libraries are banned, since they circumvent the 100,000 line of code limit in the $LK,"ZenithOS Charter",A="FI:::/Doc/Charter.DD"$. All applications must only depend on the core ZenithOS files and whatever they bring along in the ISO. This is similar to how Commodore 64 applications only depended on the ROM. +3rd party libraries are banned, since they circumvent the 100,000 line of code limit in the $LK,"ZealOS Charter",A="FI:::/Doc/Charter.DD"$. All applications must only depend on the core ZealOS files and whatever they bring along in the ISO. This is similar to how Commodore 64 applications only depended on the ROM. -Create a $LK,"RedSea",A="FI:::/Doc/RedSea.DD"$ ISO file with $LK,"RedSeaISO",A="MN:RedSeaISO"$(). Send an email to $TX,"tdavis@templeos.org",HTML="mailto:tdavis@templeos.org"$ if you want me to post a link to your ZenithOS code in the App Store. +Create a $LK,"RedSea",A="FI:::/Doc/RedSea.DD"$ ISO file with $LK,"RedSeaISO",A="MN:RedSeaISO"$(). Send an email to $TX,"tdavis@templeos.org",HTML="mailto:tdavis@templeos.org"$ if you want me to post a link to your ZealOS code in the App Store. $MA-X+PU,"Take Tour",LM="User(\"Cd(\\\"::/Misc/Tour\\\");;InFile(\\\"Tour\\\");\n\");"$ diff --git a/src/Doc/WhyNotMore.DD b/src/Doc/WhyNotMore.DD index 53660a52..f91490f5 100755 --- a/src/Doc/WhyNotMore.DD +++ b/src/Doc/WhyNotMore.DD @@ -1,10 +1,10 @@ $WW,1$$FG,5$$TX+CX,"Why Not More?"$$FG$ -If a feature cannot be made to work correctly and consistently, professional companies usually remove the feature. Because PC hardware is so diverse, getting things to work on all people's computers is really difficult. For one thing, you practically have to own all the different hardware to write drivers for it. If a company wanted to sell a PC operating system, they would offer a warranty and, therefore, could not get away with amateur behavior. ZenithOS absolutely requires 64-bit computers, so we leave behind much trouble, but plenty remains. +If a feature cannot be made to work correctly and consistently, professional companies usually remove the feature. Because PC hardware is so diverse, getting things to work on all people's computers is really difficult. For one thing, you practically have to own all the different hardware to write drivers for it. If a company wanted to sell a PC operating system, they would offer a warranty and, therefore, could not get away with amateur behavior. ZealOS absolutely requires 64-bit computers, so we leave behind much trouble, but plenty remains. The PCI bus interface is what modern hardware uses. Before PCI, life was simple and devices used I/O ports. After studying $LK,"PCI Interrupts",A="FI:::/Demo/Lectures/PCIInterrupts.CC"$ and attempting to do a HDAudio driver, I came to realize that modern PCI devices require ten times more code and I cannot even come close to making them work on everyone's machine because with PCI devices there are several models to worry about, unlike with the older ISA bus devices which can be done with one driver. -Currently, I have no PCI drivers. My drivers use I/O ports and operate in ISA bus mode. At this point, I only have one driver for each type of device and it is delightfully simple that way. I have one $LK,"keyboard",A="FI:::/Kernel/SerialDev/Keyboard.CC"$ driver, one $LK,"mouse",A="FI:::/Kernel/SerialDev/Mouse.CC"$ driver, one $LK,"ATA hard drive",A="FI:::/Kernel/BlkDev/DiskATA.CC"$ driver, one $LK,"ATAPI CD/DVD",A="FI:::/Kernel/BlkDev/DiskATA.CC"$ driver, one $LK,"VGA 640x480 16 color",A="FI:::/Zenith/Gr/GrScreen.CC"$ video driver and one $LK,"PC Speaker",A="MN:Sound"$ driver. I use the $LK,"PIT timer",A="MN:TimerInit"$ and $LK,"PIC Interrupt Controller",A="MN:IntPICInit"$. I use IRQ0 for timer, IRQ1 for keyboard, and IRQ12 for mouse. If IRQ12 is not firing, I am able to poll the mouse. +Currently, I have no PCI drivers. My drivers use I/O ports and operate in ISA bus mode. At this point, I only have one driver for each type of device and it is delightfully simple that way. I have one $LK,"keyboard",A="FI:::/Kernel/SerialDev/Keyboard.CC"$ driver, one $LK,"mouse",A="FI:::/Kernel/SerialDev/Mouse.CC"$ driver, one $LK,"ATA hard drive",A="FI:::/Kernel/BlkDev/DiskATA.CC"$ driver, one $LK,"ATAPI CD/DVD",A="FI:::/Kernel/BlkDev/DiskATA.CC"$ driver, one $LK,"VGA 640x480 16 color",A="FI:::/System/Gr/GrScreen.CC"$ video driver and one $LK,"PC Speaker",A="MN:Sound"$ driver. I use the $LK,"PIT timer",A="MN:TimerInit"$ and $LK,"PIC Interrupt Controller",A="MN:IntPICInit"$. I use IRQ0 for timer, IRQ1 for keyboard, and IRQ12 for mouse. If IRQ12 is not firing, I am able to poll the mouse. In the CPU department, I have state of the art 64-bit $LK,"long mode",A="FI:::/Kernel/KStart64.CC"$ with $LK,"multicore",A="FI:::/Kernel/MultiProc.CC"$ support. I use the $LK,"APIC",A="MN:MPAPICInit"$ and start-up $LK,"multicore",A="MN:Core0StartMP"$ operation. @@ -12,7 +12,7 @@ I have made an incredible accomplishment by getting it to work on practically ev Adding a USB driver would be really ugly with UHCI, EHCI, OHCI, USB1, USB2, USB3, ICH6, ICH7, ICH8, ICH9, ICH10, ICH11, ICH12, boot mode and regular mode for keyboard/mouse and a diversity of HID reports. It's hopeless. I could never offer anything but crappy, limited support and it would just add a ton of crappy code that mostly didn't work. What would I gain? Nothing. A keyboard or mouse would not be improved. Solid State USB drives would be really nice, but it's not going to happen. -The same story is basically true for GPUs, audio, networking and AHCI hard drive drivers. God said 640x480 16 color was a covenant like circumcision, so the video will never change, even if a $LK,"Standard PC",A="FI:::/Doc/StdZenithOSPC.DD"$ was made. If you attempt multimedia, everything will break because memory will get fragmented with huge multimedia files. Some day, if super-simple high speed serial allows networking, there will be no browser within the 100,000 line limit and, with only 16 colors, the world wide web is not tolerable. FTP and telnet might be possible, in the far distant future, if they could fit within the 100,000 line limit. Currently, there are $TX,"80,849",D="DD_TEMPLEOS_LOC"$ lines of code. +The same story is basically true for GPUs, audio, networking and AHCI hard drive drivers. God said 640x480 16 color was a covenant like circumcision, so the video will never change, even if a $LK,"Standard PC",A="FI:::/Doc/StdZealOSPC.DD"$ was made. If you attempt multimedia, everything will break because memory will get fragmented with huge multimedia files. Some day, if super-simple high speed serial allows networking, there will be no browser within the 100,000 line limit and, with only 16 colors, the world wide web is not tolerable. FTP and telnet might be possible, in the far distant future, if they could fit within the 100,000 line limit. Currently, there are $TX,"80,849",D="DD_TEMPLEOS_LOC"$ lines of code. I don't stand a chance working on native hardware, anymore. I could install and run natively on hardware from about 2005-2010. It requires BIOS's being nice enough to write USB mode PS/2 legacy keyboard/mouse support. As it turns-out, sometimes the BIOS has PS/2 drivers but purposely disables them, just to be mean. The CIA and whole industry is trying to mess everything up, on purpose. Perhaps, at a point of sale in a store, a thief could hack a credit card machine. Therefore, the BIOS companies actually want it difficult to make drivers and purposely make it broken. @@ -24,7 +24,7 @@ God talks. It seems reasonable that I will get to make the rules for the whole i I made $LK,"::/Doc/Demands.DD"$. -When the PC was created, they wanted flexibility because they did not know the future. Now, the industry is mature and it is time to make a 100% standard PC that everybody uses. $LK,"::/Doc/StdZenithOSPC.DD"$ +When the PC was created, they wanted flexibility because they did not know the future. Now, the industry is mature and it is time to make a 100% standard PC that everybody uses. $LK,"::/Doc/StdZealOSPC.DD"$ $FG,8$ * "QEMU" is a trademark owned by Fabrice Bellard. diff --git a/src/Doc/Widget.DD b/src/Doc/Widget.DD index ab9dc422..48dee642 100755 --- a/src/Doc/Widget.DD +++ b/src/Doc/Widget.DD @@ -1,6 +1,6 @@ $WW,1$$FG,5$$TX+CX,"DolDoc Widget Help"$$FG$ -$LK,"DolDoc",A="::/Doc/DolDocOverview.DD"$ is a ZenithOS document type. +$LK,"DolDoc",A="::/Doc/DolDocOverview.DD"$ is a ZealOS document type. $FG,2$"Expression"$FG$ a num or CosmiC algebraic term with operators and CosmiC syms can be entered. $FG,2$"Macro"$FG$ Most entries can behave like macro entries if you assign them macro strs. diff --git a/src/Downloads/ReadMe.TXT b/src/Downloads/ReadMe.TXT index 956b936d..ea0b1da0 100755 --- a/src/Downloads/ReadMe.TXT +++ b/src/Downloads/ReadMe.TXT @@ -1,23 +1,23 @@ - ZenithOS + ZealOS -You can't do anything until you burn a ZenithOS CD/DVD from the ISO file +You can't do anything until you burn a ZealOS CD/DVD from the ISO file and boot it, or you aim your virtual machine's CD/DVD at the ISO file and boot. -ZenithOS is 64-bit and will not run on 32-bit hardware. +ZealOS is 64-bit and will not run on 32-bit hardware. -ZenithOS requires 512 Meg of RAM minimum and can have 256 Gig of RAM or more! +ZealOS requires 512 Meg of RAM minimum and can have 256 Gig of RAM or more! -ZenithOS files are compressed with a nonstandard LZW format and the source -code can only be compiled by the ZenithOS compiler because it is CosmiC, a -nonstandard C/C++ dialect. You must boot ZenithOS. Then, you can compile it +ZealOS files are compressed with a nonstandard LZW format and the source +code can only be compiled by the ZealOS compiler because it is CosmiC, a +nonstandard C/C++ dialect. You must boot ZealOS. Then, you can compile it because it is 100% open source and all source present on the distro. -If attempting to run on native hardware, ZenithOS may require you to enter I/O +If attempting to run on native hardware, ZealOS may require you to enter I/O port addresses for the CD/DVD drive and the hard drive. In Windows, you can find I/O port info in the Accessories/System Tools/System Info/Hardware Resources/I/O ports. Look for and write down "IDE", "ATA" or "SATA" port numbers. -In Linux, use "lspci -v". Then, boot the ZenithOS CD and try all combinations. -(Sorry, it's too difficult for ZenithOS to figure-out port numbers, automatically.) +In Linux, use "lspci -v". Then, boot the ZealOS CD and try all combinations. +(Sorry, it's too difficult for ZealOS to figure-out port numbers, automatically.) diff --git a/src/Home/AHCI/ahci.CC b/src/Home/AHCI/ahci.CC deleted file mode 100755 index 59f66738..00000000 --- a/src/Home/AHCI/ahci.CC +++ /dev/null @@ -1,625 +0,0 @@ -//AHCI driver, by V0x3L. (AHCI spec 1.3.1) - -I64 AHCILBA48CapacityGet(U16 *id_record) -{//Get capacity of drive, in LBA blocks. - return (id_record)(U64 *)[ATA_IDENT_LBA48_CAPACITY / 4] - 1; -} - -I64 AHCIPortCmdSlotGet(I64 port_num) -{//Get next free command slot in port; if none, return -1. - I64 i; - CAHCIPort *port = &blkdev.ahci_hba->ports[port_num]; - U32 slots = port->sata_active | port->cmd_issue; - - for (i = 0; i < blkdev.cmd_slot_count; i++) - { - if (!(slots & 1)) - return i; - slots >>= 1; - } - return -1; -} - -Bool AHCIPortIsIdle(I64 port_num) -{//Check if the command engine is running on port. - return !(blkdev.ahci_hba->ports[port_num].command & (AHCI_PxCMDF_ST | AHCI_PxCMDF_CR | AHCI_PxCMDF_FR | AHCI_PxCMDF_FRE)); -} - -U0 AHCIPortCmdStop(I64 port_num) -{//Stop command engine on port. - CAHCIPort *port = &blkdev.ahci_hba->ports[port_num]; - Btr(&port->command, AHCI_PxCMDf_ST); - Btr(&port->command, AHCI_PxCMDf_FRE); -// while (port->command & (AHCI_PxCMDF_CR | AHCI_PxCMDF_FR)); - while (Bt(&port->command, AHCI_PxCMDf_CR) || Bt(&port->command, AHCI_PxCMDf_FR)); -} - -U0 AHCIPortCmdStart(I64 port_num) -{//Start command engine on port. - CAHCIPort *port = &blkdev.ahci_hba->ports[port_num]; - while (Bt(&port->command, AHCI_PxCMDf_CR)); - Bts(&port->command, AHCI_PxCMDf_FRE); - Bts(&port->command, AHCI_PxCMDf_ST); -} - -Bool AHCIPortWait(I64 port_num, F64 timeout) -{//Wait until DRQ & BSY are clear in port task file. - CAHCIPort *port = &blkdev.ahci_hba->ports[port_num]; - do - { - if (!(port->task_file_data & (ATAS_DRQ | ATAS_BSY))) - return TRUE; - } - while (timeout > tS); - return FALSE; -} - -U0 AHCIPortReset(I64 port_num) -{//Software reset of port. Port command engine must be started after this. - //If port is not responsive we do a full reset. - CAHCIPort *port = &blkdev.ahci_hba->ports[port_num]; - AHCIPortCmdStop(port_num); - port->interrupt_status = port->interrupt_status; //Acknowledge all interrupt statuses. - - if (!AHCIPortWait(port_num, tS + 1)) - {//Perform 'more intrusive' HBA<->Port comm reset (sec. 10.4.2 of spec). - port->sata_ctrl = AHCI_PxSCTLF_DET_INIT; - Sleep(2); //Spec says 1 millisecond - port->sata_ctrl = 0; - } - while (port->sata_status & 0xF != AHCI_PxSSTSF_DET_PRESENT); - port->sata_error = ~0; //Write all 1s to sata error register. -} - -U0 AHCIPortIdentify(CBlkDev *bd) -{//Perform ATA_IDENTIFY command on ATA/ATAPI drive and store capacity and id record. - CPortCmdHeader *cmd_header; - CPortCmdTable *cmd_table; - CFisH2D *cmd_fis; - U16 *dev_id_record; - CAHCIPort *port = bd->ahci_port; - I64 *cmd_slot = AHCIPortCmdSlotGet(bd->port_num); - - if (cmd_slot < 0) - { - ZenithErr("AHCI: No empty command slots on port %d!\n", bd->port_num); - throw('AHCI'); - } - //Using the code heap for this alloc to avoid dealing with a missing ahci64 capability. - dev_id_record = CAlloc(512, Fs->code_heap); - - port->interrupt_status = port->interrupt_status; //TODO: Why? - - cmd_header = *&port->cmd_list_base(I64 *); - cmd_header += cmd_slot; //Move up pointer to the slot we have in the command list. - - //Write Command FIS Length (CFL, a fixed size) in bits 4:0 of the desc. Takes size in U32s. - cmd_header->desc = (cmd_header->desc & ~0x1F) + sizeof(CFisH2D) / sizeof(U32); - Btr(&cmd_header->desc, AHCI_CH_DESCf_W); //Disable 'Write' bit. - - cmd_table = *&cmd_header->cmd_table_base(I64 *); //Read cmd_table_base and cmd_table_base_upper as one full I64 value. - MemSet(cmd_table, 0, sizeof(CPortCmdTable)); - //Set up PRD - cmd_table->prdt[0].data_base = dev_id_record; - cmd_table->prdt[0].data_base_upper = 0; - cmd_table->prdt[0].data_byte_count = 512 - 1; //Zero-based value - cmd_header->prdt_len = 1; //1 PRD, as described above, which contains the address to put the ID record. - - cmd_fis = &cmd_table->cmd_fis; - MemSet(cmd_fis, 0, sizeof(CFisH2D)); - cmd_fis->type = FISt_H2D; - Bts(&cmd_fis->desc, AHCI_CF_DESCf_C); //Set Command bit in H2D FIS. - - if (port->signature == AHCI_PxSIG_ATAPI) - cmd_fis->command = ATA_IDENTIFY_PACKET; - else - cmd_fis->command = ATA_IDENTIFY; - - cmd_fis->device = 0; //No bits need to be set in the device register. - - if (!AHCIPortWait(bd->port_num, tS + 2)) - { - ZenithErr("AHCI: Port %d hung while attempting IDENTIFY!\n", bd->port_num); - throw('AHCI'); - } - - Bts(&port->cmd_issue, cmd_slot); //Issue the command - - while (TRUE) - { - if (!Bt(&port->cmd_issue, cmd_slot)) //When command has been processed - break; - - if (Bt(&port->interrupt_status, AHCI_PxIf_TFE)) //Task File Error ($LK,"ATAS_ERR",A="MN:ATAS_ERR"$) - { -id_error: - ZenithErr("AHCI: Port %d: Identify command failed!\n", bd->port_num); - throw('AHCI'); - } - } - if (Bt(&port->interrupt_status, AHCI_PxIf_TFE)) //Second safety check - goto id_error; - - bd->max_blk = AHCILBA48CapacityGet(dev_id_record); - "%X\n", bd->max_blk; - Free(bd->dev_id_record); - bd->dev_id_record = dev_id_record; -/* U16 *st; - U8 *res; - I64 i; - - st = CAlloc(20 + 1); - for (i = 0; i < 10; i++) - st[i] = EndianU16(bd->dev_id_record[10 + i]); - res = MStrUtil(st, SUF_REM_LEADING | SUF_REM_TRAILING); - Free(st); - "%s\n", res; - Free(res); -*/ -} - -U8 *AHCIBufferAlign(CBlkDev *bd, U8 *user_buf, I64 buf_size, Bool write) -{//Make sure buffer is accessible by AHCI HBA controller. -//Controller requires a U16-aligned buffer, and, if not 64-bit capable (ahci64), -//it requires the buffer to be in the 32-bit address space. -//MAlloc provides U64-aligned addresses, and can allocate in the code heap ( <4GB ). -//In the case of an inadequate buffer address being passed in, we will use a MAlloced internal buffer. - if (!blkdev.ahci64 && (user_buf + buf_size > U32_MAX || user_buf & 1)) - {//if the buffer is not within the 32-bit range or not U16-aligned - "fixing buffer to be aligned and under 32-bit range\n"; - Free(bd->prd_buf); - bd->prd_buf = MAlloc(buf_size, Fs->code_heap); - goto fixed; - } - if (user_buf & 1) - {//if buffer is not U16 aligned (ahci64 means buf can be anywhere in normal high memory) - "64-bit capable buffer not aligned, fixing...\n"; - Free(bd->prd_buf); - bd->prd_buf = MAlloc(buf_size); - goto fixed; - } - Btr(&bd->flags, BDf_INTERNAL_BUF); - return user_buf; - -fixed: - "Using internal buffer: 0x%X\n", bd->prd_buf; - Bts(&bd->flags, BDf_INTERNAL_BUF); - if (write) - MemCopy(bd->prd_buf, user_buf, buf_size); - return bd->prd_buf; -} - -I64 AHCIAtaBlksRW(CBlkDev *bd, U8 *buf, I64 blk, I64 count, Bool write) -{//ATA Disk RW Blocks. Returns number of bytes transferred between system and device (should match 'count * BLK_SIZE'). - CPortCmdHeader *cmd_header; - CPortCmdTable *cmd_table; - CFisH2D *cmd_fis; - CAHCIPort *port = bd->ahci_port; - I64 buf_size, buf_size2, byte_count, prdt_len, i, cmd_slot = AHCIPortCmdSlotGet(bd->port_num); - U8 *internal_buf; - - if (count < 1) return 0; - - if (cmd_slot < 0) - { - ZenithErr("AHCI: No empty command slots on port %d!\n", bd->port_num); - throw('AHCI'); - } - if (count > AHCI_PRDT_MAX_BLOCKS) - {//There will be wrappers for reading and writing which will handle block sizes greater than MAX_BLOCKS. - ZenithErr("AHCI: Blk count %d exceeds max allowed in one command (%d)", count, AHCI_PRDT_MAX_BLOCKS); - throw('AHCI'); - } - //Obtain command header and zero it. - cmd_header = *&port->cmd_list_base(I64 *); //Read cmd_list_base and adjacent cmd_list_base_upper as one full I64 value. - cmd_header += cmd_slot; //Move up pointer to the slot we have in the command list. - - //Write Command FIS Length (CFL, a fixed size) in bits 4:0 of the desc. Takes size in U32s. - cmd_header->desc = (cmd_header->desc & ~0x1F) + sizeof(CFisH2D) / sizeof(U32); - //Set 'Write' depending on 'write' parameter. - BEqual(cmd_header->desc, AHCI_CH_DESCf_W, write); - - //Obtain command table and zero it. - cmd_table = *&cmd_header->cmd_table_base(I64 *); //Read cmd_table_base and adjacent cmd_table_base_upper as one full I64 value. - MemSet(cmd_table, 0, sizeof(CPortCmdTable)); - - //Determine buffer size and PRDT length. - buf_size = buf_size2 = count * BLK_SIZE; - prdt_len = (buf_size - 1) / AHCI_PRD_MAX_BYTES + 1; - - "PRDT Length:\t%d\n", prdt_len; - "Count:\t\t\t%d\n", count; - "Buffer size:\t%X\n", buf_size; - - cmd_header->prdt_len = prdt_len; //Set PRDTL in cmd header. - - internal_buf = AHCIBufferAlign(bd, buf, buf_size, write); - "Buffer:\t\t\t0x%X\n", internal_buf; - - if (!buf) throw('AHCI'); //Will probably never happen. - - //Create 'prdt_len' amount of PRD entries - for (i = 0; i < prdt_len; i++) - {//Use max PRD size until the remaining buffer is smaller than max size. - if (buf_size2 > AHCI_PRD_MAX_BYTES) - byte_count = AHCI_PRD_MAX_BYTES; - else - byte_count = buf_size2; - - "prdt[%d].data_base_addr = 0x%X\n" , i, internal_buf; - "prdt[%d].data_byte_count = 0x%X\n\n", i, byte_count; - - cmd_table->prdt[i].data_base = internal_buf(I64).u32[0]; - cmd_table->prdt[i].data_base_upper = internal_buf(I64).u32[1]; - cmd_table->prdt[i].data_byte_count = byte_count - 1; //Zero-based value - buf_size2 -= byte_count; - internal_buf += byte_count; - } - //Obtain address of command FIS (CFIS) and zero it. - cmd_fis = &cmd_table->cmd_fis; - MemSet(cmd_fis, 0, sizeof(CFisH2D)); - - cmd_fis->type = FISt_H2D; - Bts(&cmd_fis->desc, AHCI_CF_DESCf_C); //Set Command bit in H2D FIS - - if (write) //Assume support for LBA48. This is 2020. - cmd_fis->command = ATA_WRITE_DMA_EXT; - else - cmd_fis->command = ATA_READ_DMA_EXT; - - cmd_fis->lba0 = blk.u8[0]; - cmd_fis->lba1 = blk.u8[1]; - cmd_fis->lba2 = blk.u8[2]; - cmd_fis->device = 1 << 6; //Required as per ATA8-ACS section 7.25.3 - cmd_fis->lba3 = blk.u8[3]; - cmd_fis->lba4 = blk.u8[4]; - cmd_fis->lba5 = blk.u8[5]; - cmd_fis->count = count; - - if (!AHCIPortWait(bd->port_num, tS + 2)) - {//2 second timeout for last command to complete. - ZenithErr("AHCI: Port %d hung during %z!\n", bd->port_num, write, "read\0write"); - throw('AHCI'); - } - - Bts(&port->cmd_issue, cmd_slot); //Issue the command - - while (TRUE) - { - if (!Bt(&port->cmd_issue, cmd_slot)) //when command has been processed - break; - - if (Bt(&port->interrupt_status, AHCI_PxIf_TFE)) //Task File Error ($LK,"ATAS_ERR",A="MN:ATAS_ERR"$) - { -rw_error: ZenithErr("AHCI: Disk %z error on port %d!\n", write, "read\0write", bd->port_num); - throw('AHCI'); - } - } - //Second check for safety - if (Bt(&port->interrupt_status, AHCI_PxIf_TFE)) - goto rw_error; - - if (!write) //writeback internal_buf to parameter buf if one was created - if (bd->flags & BDF_INTERNAL_BUF) - { - "Writeback internal buffer\n"; - //internal_buf was consumed while creating PRD entries so we push it back - MemCopy(buf, internal_buf - buf_size, buf_size); - } - return cmd_header->prd_byte_count; -} - -I64 AHCIAtapiBlksRead(CBlkDev *bd, U8 *buf, I64 blk, I64 count) -{ - CPortCmdHeader *cmd_header; - CPortCmdTable *cmd_table; - CFisH2D *cmd_fis; - CAHCIPort *port = bd->ahci_port; - I64 byte_count, buf_size, buf_size2, prdt_len, i, cmd_slot = AHCIPortCmdSlotGet(bd->port_num); - U8 *internal_buf; - - if (count < 1) - return 0; - - if (cmd_slot < 0) - { - ZenithErr("AHCI: No empty command slots on port %d!\n", bd->port_num); - throw('AHCI'); - } - //$BG,10$no check for max read yet$BG$ - cmd_header = *&port->cmd_list_base(I64 *); - cmd_header += cmd_slot; - cmd_header->desc = sizeof(CFisH2D) / sizeof(U32); - Bts(&cmd_header->desc, AHCI_CH_DESCf_A); - - cmd_table = *&cmd_header->cmd_table_base(I64 *); - MemSet(cmd_table, 0, sizeof(CPortCmdTable)); - - buf_size = buf_size2 = count * DVD_BLK_SIZE; - prdt_len = (buf_size - 1) / AHCI_PRD_MAX_BYTES + 1; - - "PRDT Length:\t%d\n", prdt_len; - "Count:\t\t\t%d\n", count; - "Buffer size:\t%X\n", buf_size; - - cmd_header->prdt_len = prdt_len; - - internal_buf = AHCIBufferAlign(bd, buf, buf_size, FALSE); - "Buffer:\t\t\t0x%X\n", internal_buf; - - if (!buf) throw('AHCI'); - - for (i = 0; i < prdt_len; i++) - { - if (buf_size2 > AHCI_PRD_MAX_BYTES) - byte_count = AHCI_PRD_MAX_BYTES; - else - byte_count = buf_size2; - - "prdt[%d].data_base_addr = 0x%X\n" , i, internal_buf; - "prdt[%d].data_byte_count = 0x%X\n\n", i, byte_count; - cmd_table->prdt[i].data_base = internal_buf(I64).u32[0]; - cmd_table->prdt[i].data_base_upper = internal_buf(I64).u32[1]; - cmd_table->prdt[i].data_byte_count = byte_count - 1; //Zero-based value - buf_size2 -= byte_count; - internal_buf += byte_count; - } - - cmd_fis = &cmd_table->cmd_fis; - MemSet(cmd_fis, 0, sizeof(CFisH2D)); - - cmd_fis->type = FISt_H2D; - Bts(&cmd_fis->desc, AHCI_CF_DESCf_C); //Set Command bit in H2D FIS - - cmd_fis->feature_low = 1; - cmd_fis->command = ATA_PACKET; - - CAtapiReadCmd read_cmd; - MemSet(&read_cmd, 0, sizeof(CAtapiReadCmd)); - read_cmd.command = ATAPI_READ >> 8; //$BK,1$FIX$BK,0$ - read_cmd.lba = EndianU32(blk); - read_cmd.count = EndianU32(count); - MemCopy(&cmd_table->acmd, &read_cmd, 16); - - cmd_fis->count = count; - - if (!AHCIPortWait(bd->port_num, tS + 2)) - {//2 second timeout for last command to complete. - ZenithErr("AHCI: Port %d hung during read!\n", bd->port_num); - throw('AHCI'); - } - Bts(&port->cmd_issue, cmd_slot); //Issue the command - - while (TRUE) - { - if (!Bt(&port->cmd_issue, cmd_slot)) //when command has been processed - break; - - if (Bt(&port->interrupt_status, AHCI_PxIf_TFE)) //Task File Error ($LK,"ATAS_ERR",A="MN:ATAS_ERR"$) - { -rw_error: ZenithErr("AHCI: Drive read error on port %d!\n", bd->port_num); - throw('AHCI'); - } - } - //Second check for safety - if (Bt(&port->interrupt_status, AHCI_PxIf_TFE)) - goto rw_error; - - if (bd->flags & BDF_INTERNAL_BUF) - { - "Writeback the internal buffer\n"; - //internal_buf was consumed while creating PRD entries so we push it back - MemCopy(buf, internal_buf - buf_size, buf_size); - } - - "internal_buf: %X\n", internal_buf; - "buf_size: %X\n", buf_size; - internal_buf -= buf_size; - "corrected buffer: %X\n", internal_buf; - return cmd_header->prd_byte_count; -} - -I64 AHCIBlksRead(CBlkDev *bd, U8 *buf, I64 blk, I64 count) -{//Read 'blk' amount of blocks from AHCI disk device. Returns num of bytes transferred between disk and memory. - I64 byte_count = 0; - if (!count) - return 0; - if (count <= AHCI_PRDT_MAX_BLOCKS) - { - "$$GREEN$$READ less than MAX_BLOCKS$$FG$$\n"; - return AHCIAtaBlksRW(bd, buf, blk, count, FALSE); - } - else - { - "$$GREEN$$READ greater than MAX_BLOCKS\n"; - "read count: %d\n$$FG$$", count; - while (count > AHCI_PRDT_MAX_BLOCKS) - { - byte_count += AHCIAtaBlksRW(bd, buf, blk, AHCI_PRDT_MAX_BLOCKS, FALSE); - count -= AHCI_PRDT_MAX_BLOCKS; - blk += AHCI_PRDT_MAX_BLOCKS; - buf += AHCI_PRDT_MAX_BLOCKS * BLK_SIZE; - "$$GREEN$$read count: %d\n$$FG$$", count; - }$ER$ - byte_count += AHCIAtaBlksRW(bd, buf, blk, count, FALSE); - } - return byte_count; -} - -I64 AHCIBlksWrite(CBlkDev *bd, U8 *buf, I64 blk, I64 count) -{//Write 'blk' amount of blocks to AHCI disk device. Returns num of bytes transferred between memory and disk. - I64 byte_count = 0; - if (!count) - return 0; - if (count <= AHCI_PRDT_MAX_BLOCKS) - { - "$$GREEN$$WRITE less than MAX_BLOCKS$$FG$$\n"; - return AHCIAtaBlksRW(bd, buf, blk, count, TRUE); - } - else - { - "$$GREEN$$WRITE greater than MAX_BLOCKS\n"; - "write count: %d$$FG$$\n", count; - while (count > AHCI_PRDT_MAX_BLOCKS) - { - byte_count += AHCIAtaBlksRW(bd, buf, blk, AHCI_PRDT_MAX_BLOCKS, TRUE); - count -= AHCI_PRDT_MAX_BLOCKS; - blk += AHCI_PRDT_MAX_BLOCKS; - buf += AHCI_PRDT_MAX_BLOCKS * BLK_SIZE; - "$$GREEN$$write count: %d\n$$FG$$\n", count; - } - byte_count += AHCIAtaBlksRW(bd, buf, blk, count, TRUE); - } - return byte_count; -} - -U0 AHCIPortInit(CBlkDev *bd, CAHCIPort *port, I64 port_num) -{ - CPortCmdHeader *cmd_header; - I64 i, addr = 0; - - bd->ahci_port = port; - bd->port_num = port_num; - - AHCIPortReset(port_num); - AHCIPortCmdStart(port_num); - - //Spin up, power on device. If the capability isn't suppport the bits will be read-only and this won't do anything. - port->command |= AHCI_PxCMDF_POD | AHCI_PxCMDF_SUD; - Sleep(100); //Why? - AHCIPortCmdStop(port_num); - - if (blkdev.ahci64) - { - //'1K-byte' align as per SATA spec. - addr = CAllocAligned(sizeof(CPortCmdHeader) * blkdev.cmd_slot_count, 1024); - port->cmd_list_base = addr.u32[0]; - port->cmd_list_base_upper = addr.u32[1]; - - //Alloc where received FISes will be copied to. '256-byte' align as per spec. - addr = CAllocAligned(sizeof(CFisReceived), 256); - port->fis_base = addr.u32[0]; - port->fis_base_upper = addr.u32[1]; - } - else - {//Code Heap is always under 4 GB in address space, so we can use that instead. - port->cmd_list_base = CAllocAligned(sizeof(CPortCmdHeader) * blkdev.cmd_slot_count, 1024, Fs->code_heap); - port->cmd_list_base_upper = 0; - - port->fis_base = CAllocAligned(sizeof(CFisReceived), 256, Fs->code_heap); - port->fis_base_upper = 0; - } - - for (i = 0; i < blkdev.cmd_slot_count; i++) - { - cmd_header = &port->cmd_list_base(CPortCmdHeader *)[i]; - //Write Command FIS Length (CFL, a fixed size) in bits 4:0 of the desc. Takes size in U32s. - cmd_header->desc = sizeof(CFisH2D) / sizeof(U32); - - if (blkdev.ahci64) - { - //'128-byte' align as per SATA spec, minus 1 since length is 1-based. - addr = CAllocAligned(sizeof(CPortCmdTable) + sizeof(CPrdtEntry) * (AHCI_PRDT_MAX_LEN - 1), 128); - cmd_header->cmd_table_base = addr.u32[0]; - cmd_header->cmd_table_base_upper = addr.u32[1]; - } - else - { - cmd_header->cmd_table_base = CAllocAligned(sizeof(CPortCmdTable) + sizeof(CPrdtEntry) * - (AHCI_PRDT_MAX_LEN - 1), 128, Fs->code_heap); - cmd_header->cmd_table_base_upper = 0; - - } - } - AHCIPortCmdStart(port_num); - AHCIPortIdentify(bd); -} - -U0 AHCIInit() -{ - CAHCIHba *hba; - CAHCIPort *port; - I64 i, bdf = PCIClassFind(PCIC_STORAGE << 16 | PCISC_AHCI << 8 + 1, 0); //0x010601, last byte prog_if, AHCI version 1.0 - - if (bdf == -1) - { - "No AHCI controller found.\n"; - return; - } - - hba = dev.uncached_alias + PCIReadU32(bdf.u8[2], bdf.u8[1], bdf.u8[0], PCIR_BASE5) & ~0x1F; //Last 4 bits not part of address. - - Bts(&hba->ghc, AHCI_GHCf_HBA_RESET); - while (Bt(&hba->ghc, AHCI_GHCf_HBA_RESET)); - - Bts(&hba->ghc, AHCI_GHCf_AHCI_ENABLE); - - //Transferring ownership from BIOS if supported. - if (Bt(&hba->caps_ext, AHCI_CAPSEXTf_BOH)) - { - Bt(&hba->bohc, AHCI_BOHCf_OOS); - while (Bt(&hba->bohc, AHCI_BOHCf_BOS)); - Sleep(25); - if (Bt(&hba->bohc, AHCI_BOHCf_BB)) //if Bios Busy is still set after 25 mS, wait 2 seconds. - Sleep(2000); - } - - blkdev.ahci64 = Bt(&hba->caps, AHCI_CAPSf_S64A); - blkdev.cmd_slot_count = (hba->caps & 0x1F00) >> 8; - blkdev.ahci_hba = hba; - //blkdev.ahci64 = 0; - - "ahci64: %Z\n", blkdev.ahci64, "ST_FALSE_TRUE"; - -/* for (i = 0; i < AHCI_MAX_PORTS; i++) - { - if (Bt(&hba->ports_implemented, i)) - { - port = &hba->ports[i]; - if (port->signature == AHCI_PxSIG_ATA || port->signature == AHCI_PxSIG_ATAPI) - { - "Port on %d\n", i; - if (port->signature == AHCI_PxSIG_ATAPI) - Bts(&port->command, AHCI_PxCMDf_ATAPI); - - if (!AHCIPortIsIdle(i)) - { - "Port not idle\n"; - AHCIPortCmdStop(i); - } - AHCIPortInit(BlkDevNextFreeSlot('G', BDT_ATA), port, i); //gay - } - } - } -*/ -} - -AHCIInit; -#define BLKS 1 - -U0 Test() -{ - U8 *buf = MAlloc(BLKS * BLK_SIZE); - U8 *buf2 = MAlloc(BLKS * DVD_BLK_SIZE); - - MemSet(buf, 0xF3, BLKS * BLK_SIZE); - - CBlkDev *bd = CAlloc(sizeof(CBlkDev)); - AHCIPortInit(bd, &blkdev.ahci_hba->ports[1], 1); - - -// "$$PURPLE$$Byte count: %X$$FG$$\n", AHCIBlksWrite(bd, buf, 0, BLKS); //write -// "$$PURPLE$$Byte count: %X$$FG$$\n", AHCIBlksRead(bd, buf2, 0, BLKS);//read - - - "$$PURPLE$$Byte count: %X$$FG$$\n", AHCIAtapiBlksRead(bd, buf2, 240, BLKS); //read -// "Capacity %d\n", AHCIAtapiCapacityRead(bd); - - D(bd->dev_id_record, 512); -// D(buf2 + (BLKS - 5) * DVD_BLK_SIZE, 5 * DVD_BLK_SIZE); //Dump last 5 blocks - D(buf2, DVD_BLK_SIZE); - Free(buf); - Free(buf2); -} -DocMax; -Test; \ No newline at end of file diff --git a/src/Home/AHCI/ahcifunctions.CC b/src/Home/AHCI/ahcifunctions.CC deleted file mode 100755 index f4d8f76e..00000000 --- a/src/Home/AHCI/ahcifunctions.CC +++ /dev/null @@ -1,15 +0,0 @@ -#define BLKS 40 - -U0 Test() -{ -// CBlkDev *ata_bd = CAlloc(sizeof(CBlkDev)); - CBlkDev *atapi_bd = CAlloc(sizeof(CBlkDev)); -// AHCIPortInit(ata_bd, &blkdev.ahci_hba->ports[0], 0); -// AHCIPortInit(atapi_bd, &blkdev.ahci_hba->ports[1], 1); - AHCIPortInit(atapi_bd, &blkdev.ahci_hba->ports[0], 0); - - - -} - -Test; \ No newline at end of file diff --git a/src/Home/AHCI/notes.DD b/src/Home/AHCI/notes.DD deleted file mode 100755 index 176b96aa..00000000 --- a/src/Home/AHCI/notes.DD +++ /dev/null @@ -1,68 +0,0 @@ -$WW$ -- Perhaps make more references to spec in comments - -- ATAPI RW - -- Remove Buffer alignment check and just do it on every call - -- AHCIATAPISetMaxSpeed? - -$FG,7$ZenithOS IDE DVD Boot function order list and summary$FG$ - -$HL,1$ -KMain // $LK+PU,"Kernel/KMain.CC",A="FF:::/Kernel/KMain.CC,KMain"$ - ... - - BlkDevsInitAll // $LK+PU,"Kernel/BlkDev/DiskAddDev.CC",A="FF:::/Kernel/BlkDev/DiskAddDev.CC,BlkDevsInitAll"$ - [KConfigAddDev] // $LK+PU,"Kernel/KConfig.CC",A="FF:::/Kernel/KConfig.CC,KConfigAddDev"$ - Mount2 // $LK+PU,"Zenith/ZBlkDev/Mount.CC",A="FF:::/Zenith/ZBlkDev/Mount.CC,Mount2"$ - BlkDevNextFreeSlot // $LK+PU,"Kernel/BlkDev/DiskBlkDev.CC",A="FF:::/Kernel/BlkDev/DiskBlkDev.CC,BlkDevNextFreeSlot"$ - ... - GetBaseUnit // $LK+PU,"Kernel/BlkDev/DiskAddDev.CC",A="FF:::/Kernel/BlkDev/DiskAddDev.CC,GetBaseUnit"$ - IDEBootDVDProbeAll // $LK+PU,"Kernel/BlkDev/DiskATAId.CC",A="FF:::/Kernel/BlkDev/DiskATAId.CC,IDEBootDVDProbeAll"$ - j = PCIClassFind(0x010100 + k, ++i); - ... - IDEBootDVDProbe // $LK+PU,"Kernel/BlkDev/DiskATAId.CC",A="FF:::/Kernel/BlkDev/DiskATAId.CC,IDEBootDVDProbe"$ - IDEATAProbe // $LK+PU,"Kernel/BlkDev/DiskATA.CC",A="FF:::/Kernel/BlkDev/DiskATA.CC,IDEATAProbe"$ - IDEATAGetDevId // $LK+PU,"Kernel/BlkDev/DiskATA.CC",A="FF:::/Kernel/BlkDev/DiskATA.CC,IDEATAGetDevId"$ - - IDEATAPIStartStop // $LK+PU,"Kernel/BlkDev/DiskATA.CC",A="FF:::/Kernel/BlkDev/DiskATA.CC,IDEATAPIStartStop"$ - IDEATAPIWritePacketWord // $LK+PU,"Kernel/BlkDev/DiskATA.CC",A="FF:::/Kernel/BlkDev/DiskATA.CC,IDEATAPIWritePacketWord"$ - - IDEATAPIReadBlks2 // $LK+PU,"Kernel/BlkDev/DiskATA.CC",A="FF:::/Kernel/BlkDev/DiskATA.CC,IDEATAPIReadBlks2"$ - IDEATAInit // $LK+PU,"Kernel/BlkDev/DiskATA.CC",A="FF:::/Kernel/BlkDev/DiskATA.CC,IDEATAInit"$ - IDEATAReadNativeMax // $LK+PU,"Kernel/BlkDev/DiskATA.CC",A="FF:::/Kernel/BlkDev/DiskATA.CC,IDEATAReadNativeMax"$ - IDEATAGetDevId // $LK+PU,"Kernel/BlkDev/DiskATA.CC",A="FF:::/Kernel/BlkDev/DiskATA.CC,IDEATAGetDevId"$ - IDEATABlkSel // $LK+PU,"Kernel/BlkDev/DiskATA.CC",A="FF:::/Kernel/BlkDev/DiskATA.CC,IDEATABlkSel"$ - IDEATAPIStartStop // $LK+PU,"Kernel/BlkDev/DiskATA.CC",A="FF:::/Kernel/BlkDev/DiskATA.CC,IDEATAPIStartStop"$ - IDEATAPIWritePacketWord// $LK+PU,"Kernel/BlkDev/DiskATA.CC",A="FF:::/Kernel/BlkDev/DiskATA.CC,IDEATAPIWritePacketWord"$ - - BlkDevAdd // $LK+PU,"Kernel/BlkDev/DiskAddDev.CC",A="FF:::/Kernel/BlkDev/DiskAddDev.CC,BlkDevAdd"$ - DriveMakeFreeSlot // $LK+PU,"Kernel/BlkDev/DiskDrive.CC",A="FF:::/Kernel/BlkDev/DiskDrive.CC,DriveMakeFreeSlot"$ - - DiskChange // $LK+PU,"Kernel/BlkDev/DiskDrive.CC",A="FF:::/Kernel/BlkDev/DiskDrive.CC,U0 DiskChange"$ - BlkDevInit // $LK+PU,"Kernel/BlkDev/DiskBlkDev.CC",A="FF:::/Kernel/BlkDev/DiskBlkDev.CC,BlkDevInit"$ - IDEATAInit // $LK+PU,"Kernel/BlkDev/DiskATA.CC",A="FF:::/Kernel/BlkDev/DiskATA.CC,IDEATAInit"$ - IDEATAReadNativeMax // $LK+PU,"Kernel/BlkDev/DiskATA.CC",A="FF:::/Kernel/BlkDev/DiskATA.CC,IDEATAReadNativeMax"$ - IDEATAGetDevId // $LK+PU,"Kernel/BlkDev/DiskATA.CC",A="FF:::/Kernel/BlkDev/DiskATA.CC,IDEATAGetDevId"$ - IDEATABlkSel // $LK+PU,"Kernel/BlkDev/DiskATA.CC",A="FF:::/Kernel/BlkDev/DiskATA.CC,IDEATABlkSel"$ - IDEATAPIStartStop // $LK+PU,"Kernel/BlkDev/DiskATA.CC",A="FF:::/Kernel/BlkDev/DiskATA.CC,IDEATAPIStartStop"$ - IDEATAPIWritePacketWord // $LK+PU,"Kernel/BlkDev/DiskATA.CC",A="FF:::/Kernel/BlkDev/DiskATA.CC,IDEATAPIWritePacketWord"$ - - DiskCacheInvalidate // $LK+PU,"Kernel/BlkDev/DiskDrive.CC",A="FF:::/Kernel/BlkDev/DiskDrive.CC,U0 DiskCacheInvalidate"$ - DiskCheck // $LK+PU,"Zenith/ZBlkDev/DiskCheck.CC",A="FF:::/Zenith/ZBlkDev/DiskCheck.CC,DiskCheck"$ - BlkDevInit // $LK+PU,"Kernel/BlkDev/DiskBlkDev.CC",A="FF:::/Kernel/BlkDev/DiskBlkDev.CC,BlkDevInit"$ - ... - ISOInit // $LK+PU,"Kernel/BlkDev/DiskCDDVD.CC",A="FF:::/Kernel/BlkDev/DiskCDDVD.CC,ISOInit"$ - BlkRead // $LK+PU,"Kernel/BlkDev/DiskBlk.CC",A="FF:::/Kernel/BlkDev/DiskBlk.CC,BlkRead"$ - IDEATARBlks // $LK+PU,"Kernel/BlkDev/DiskATA.CC",A="FF:::/Kernel/BlkDev/DiskATA.CC,IDEATARBlks"$ - IDEATAPIReadBlks // $LK+PU,"Kernel/BlkDev/DiskATA.CC",A="FF:::/Kernel/BlkDev/DiskATA.CC,IDEATAPIReadBlks:2"$ - IDEATAPIReadBlks2 // $LK+PU,"Kernel/BlkDev/DiskATA.CC",A="FF:::/Kernel/BlkDev/DiskATA.CC,IDEATAPIReadBlks2"$ - ... - - Drive // $LK+PU,"Kernel/BlkDev/DiskDrive.CC",A="FF:::/Kernel/BlkDev/DiskDrive.CC,Bool Drive("$ - BlkDevCheck // $LK+PU,"Kernel/BlkDev/DiskBlkDev.CC",A="FF:::/Kernel/BlkDev/DiskBlkDev.CC,CBlkDev *BlkDevCheck("$ - - - ...$HL,0$ - diff --git a/src/Home/CosmicGLDemos/DrawPrimitives/DrawPrimitives.CC b/src/Home/CosmicGLDemos/DrawPrimitives/DrawPrimitives.CC deleted file mode 100755 index 9819e519..00000000 --- a/src/Home/CosmicGLDemos/DrawPrimitives/DrawPrimitives.CC +++ /dev/null @@ -1,53 +0,0 @@ -/* This demo shows how to draw primitives to textures. */ - -Cd(__DIR__);; - -I64 wWC = 64; // Window width in columns (512px) -I64 wHC = 48; // Window height in rows (384px) -I64 wW = wWC * 8; -I64 wH = wHC * 8; -I64 wXC = 1; // Window x in columns -I64 wYC = 2; // Window y in rows -I64 wX = wXC * 8; -I64 wY = wYC * 8; - -SettingsPush; -WinHorz(wXC, wXC + wWC - 1); -WinVert(wYC, wYC + wHC - 1); -DocClear; - -// Prepare framebuffer -CGLTex2D frameBuf; -GLTex2DInit(&frameBuf, TEX2D_RAW, wW, wH); -GLTex2DColorFill(&frameBuf, gr_palette[WHITE]); - -// Draw Rectangles -GLDrawRectFill(&frameBuf, 32, 32, 128, 96, gr_palette[CYAN]); - -GLDrawRectVertGradient(&frameBuf, 64, 128, 96, 256, gr_palette[CYAN], - gr_palette[BLUE]); - -// Gradient's starting transition points can also be modified: -GLDrawRectVertGradient(&frameBuf, 160, 32, 224, 96, gr_palette[BLACK], - gr_palette[WHITE], 0.65, 0.7); - -GLDrawRectOutline(&frameBuf, 55, 300, 75, 310, gr_palette[LTGRAY]); - -// You can also define a second color for adding button-like shading -GLDrawRectSoftOutline(&frameBuf, 100, 200, 130, 210, gr_palette[LTGRAY], - gr_palette[DKGRAY]); - -// Drawing text -GLDrawChar(&frameBuf, 48, 48, '!', gr_palette[WHITE]); -GLDrawString(&frameBuf, 16, 104, "When I wrote this, God said: -calls singing moist days excellence.", gr_palette[GREEN]); - -while (CharScan() == 0) -{ - GLTex2DDebugDisp(&frameBuf, wX, wY); - Sleep(1); -} - -GLTex2DFree(&frameBuf); -SettingsPop; -Exit; diff --git a/src/Home/CosmicGLDemos/TextureLoading/RenderTextures.CC b/src/Home/CosmicGLDemos/TextureLoading/RenderTextures.CC deleted file mode 100755 index ece76592..00000000 --- a/src/Home/CosmicGLDemos/TextureLoading/RenderTextures.CC +++ /dev/null @@ -1,30 +0,0 @@ -/* This demo shows how to initialize, import, and render textures. */ - -Cd(__DIR__);; - -I64 wWC = 32; // Window width in columns (256px) -I64 wHC = 32; // Window height in rows (256px) -I64 wW = wWC * 8; -I64 wH = wHC * 8; -I64 wXC = 1; // Window x in columns -I64 wYC = 2; // Window y in rows -I64 wX = wXC * 8; -I64 wY = wYC * 8; - -SettingsPush; -WinHorz(wXC, wXC + wWC - 1); -WinVert(wYC, wYC + wHC - 1); -DocClear; - -CGLTex2D texture; -GLTex2DLoadBMP(&texture, "SaintTerry.bmp"); - -while (CharScan() == 0) -{ - GLTex2DDebugDisp(&texture, wX, wY); - Sleep(1); -} - -GLTex2DFree(&texture); -SettingsPop; -Exit; diff --git a/src/Home/CosmicGLDemos/TextureLoading/SaintTerry.bmp b/src/Home/CosmicGLDemos/TextureLoading/SaintTerry.bmp deleted file mode 100755 index 13662ee6..00000000 Binary files a/src/Home/CosmicGLDemos/TextureLoading/SaintTerry.bmp and /dev/null differ diff --git a/src/Home/DoDistro.CC b/src/Home/DoDistro.CC index 22f4ef62..d62e1bba 100755 --- a/src/Home/DoDistro.CC +++ b/src/Home/DoDistro.CC @@ -27,7 +27,7 @@ U0 MakeMyISO(U8 *_out_iso_filename) CopyTree(BOOT_DIR, "/Distro" BOOT_DIR); CopyTree("/Home", "/Distro/Home"); Del("/Distro/Home/Registry.CC"); - CopyTree("/Zenith", "/Distro/Zenith"); + CopyTree("/System", "/Distro/System"); CopyTree("/Apps", "/Distro/Apps"); CopyTree("/Compiler", "/Distro/Compiler"); CopyTree("/Demo", "/Distro/Demo"); @@ -36,7 +36,7 @@ U0 MakeMyISO(U8 *_out_iso_filename) CopyTree("/Misc", "/Distro/Misc"); //To save space, optionally delete dictionary. - //Del("/Distro/Zenith/AutoComplete/ACDefs.DATA"); + //Del("/Distro/System/AutoComplete/ACDefs.DATA"); CopyTree("/Downloads", "/Distro/Downloads"); //You can leave this out. DirMake("/Distro/Tmp"); DirMake("/Distro/Tmp/ScreenShots"); diff --git a/src/Home/FilesReformatted.DD b/src/Home/FilesReformatted.DD deleted file mode 100755 index a0223591..00000000 --- a/src/Home/FilesReformatted.DD +++ /dev/null @@ -1,630 +0,0 @@ -$FG,7$Files reformatted starting from ::/ 'root' directory.$FG,0$ - -HomeKeyPlugins.CC -HomeLocalize.CC -HomeSys.CC -HomeWrappers.CC -Once.CC -StartOS.CC - -/Apps/ - - Budget/ - BgtAccts.CC - BgtEntry.CC - BgtFile.CC - BgtMain.CC - BgtStrs.CC - BgtTemplate.CC - Budget.CC - Install.CC - Load.CC - Run.CC - - GrModels/ - BallGen.CC - Load.CC - ManGen.CC - Models.CC - Run.CC - - KeepAway/ - KeepAway.CC - Load.CC - Run.CC - - Logic/ - Load.CC - Logic.CC - Run.CC - - Psalmody/ - Install.CC - JukeBox.CC - JukePuppet.CC - Load.CC - Psalmody.CC - PsalmodyCtrls.CC - PsalmodyDraw.CC - PsalmodyFile.CC - PsalmodyMain.CC - Run.CC - - Examples/ - childish.CC - night.CC - prosper.CC - - Span/ - Install.CC - Load.CC - Run.CC - SpanBridge.CC - SpanDerive.CC - SpanMain.CC - SpanNew.CC - Span.HH - - Strut/ - Load.CC - Run.CC - Strut.CC - - TimeClock/ - Install.CC - Load.CC - TimeClk.CC - - Titanium/ - Load.CC - Run.CC - Titanium.CC - - - ToTheFront/ - Install.CC - Load.CC - Run.CC - TTFDraw.CC - TTFFire.CC - TTFGlobals.CC - TTFInit.CC - TTFLib.CC - TTFMove.CC - TTFVis.CC - ToTheFront.CC - - AIs/ - Human.CC - SimpleAI.CC - - Vocabulary/ - Load.CC - Run.CC - VocabQuiz.CC - - X-Caliber/ - Load.CC - Run.CC - X-Caliber.CC - XCCtrls.CC - - -/Compiler/ - Asm.CC - AsmInit.CC - AsmLib.CC - AsmResolve.CC - BackA.CC - BackB.CC - BackC.CC - BackFA.CC - BackFB.CC - BackLib.CC - CExcept.CC - CExterns.CC - CHash.CC - CInit.CC - CMain.CC - CMisc.CC - Lex.CC - LexLib.CC - OptLib.CC - OptPass012.CC - OptPass3.CC - OptPass4.CC - OptPass5.CC - OptPass6.CC - OptPass789A.CC - ParseExp.CC - ParseLib.CC - ParseStatement.CC - ParseVar.CC - Templates.CC - UAsm.CC - OpCodes.DD - CompilerA.HH - CompilerB.HH - Compiler.PRJ - -/Demo/ - Carry.CC - ClassMeta.CC - CompileDemo.CC - DateTime.CC - DebugDemo.CC - Define.CC - Directives.CC - Exceptions.CC - ExtChars.CC - GlobalVars.CC ... non-functional? - KeyBitMap.CC - LastClass.CC - MagicPairs.CC - MemDemo.CC - MessageLoop.CC - NullCase.CC - OnceDemo.CC - ParenWarn.CC - PhoneNumWords.CC - Print.CC - Progress.CC - Prompt.CC - PullDownMenu.CC - RadixSort.CC - RandDemo.CC - RegistryDemo.CC - ScreenCodes.CC - Spy.CC - StackGrow.CC - SubIntAccess.CC - SubSwitch.CC - SuggestSpelling.CC - TimeIns.CC - WordSearch.CC - - AcctExample/ - HomeKeyPlugins.CC - HomeLocalize.CC - HomeSys.CC - HomeWrappers.CC - MakeHome.CC - Once.CC - Registry.CC - - TOS/ - MakeTOS.CC - TOSConfig.CC - TOSDistro.CC - TOSExtern.CC - TOSMisc.CC - TOSTheme.CC - - Asm/ - AsmAndC1.CC - AsmAndC2.CC - AsmAndC3.CC - AsmHelloWorld.CC - BuzzFizz.CC - DivByHand.CC - MulByHand.CC - PutDec.CC - - Disk/ - BlkDevRep.CC - DataBase.CC - DiskRaw.CC - FPrintF.CC - SerializeTree.CC - UnusedSpaceRep.CC - - DolDoc/ - CallBack.CC - ClickCallBack.CC - CursorMove.CC - Data.CC - DefineStr.CC - FileRead.CC - Form.CC - MenuBttn.CC - MenuSprite.CC - NumBible.CC - TextDemo.CC - TreeDemo.CC - UnusedDefine.CC - - Games/ - BattleLines.CC - BigGuns.CC - BlackDiamond.CC - BomberGolf.CC - CastleFrankenstein.CC - CharDemo.CC - Chess.CC - CircleTrace.CC - Collision.CC - Digits.CC - DunGen.CC - ElephantWalk.CC - FlapBat.CC - FlatTops.CC - HaloGen.CC - MassSpring.CC - Maze.CC - RainDrops.CC - RawHide.CC - Rocket.CC - RocketScience.CC - Squirt.CC - Talons.CC - TheDead.CC - TicTacToe.CC - TreeCheckers.CC - Varoom.CC - Wenceslas.CC - Whap.CC - Zing.CC - ZoneOut.CC - - Stadium/ - Stadium.CC - StadiumGen.CC - - Graphics/ - 32BitColor.CC - 3DPoly.CC - BSpline.CC - Blot.CC - Bounce.CC - Box.CC - Cartesian.CC - CharAnimation.CC - Collision.CC - CommonAncestor.CC - Doodle.CC - EdSprite.CC - Elephant.CC - Extents.CC - FontEd.CC - Grid.CC - Hanoi.CC - Lattice.CC - Life.CC - LightTable.CC - Lines.CC - LowPassFilter.CC - MathAudioDemo.CC - MouseDemo.CC - NetOfDots.CC - Palette.CC - PanText.CC - Pick.CC - Pick3D.CC - PoleZeros.CC - PredatorPrey.CC - RotateTank.CC - ScreenCapture.CC - ScrollBars.CC - Shading.CC - Shadow.CC - Slider.CC - SpeedLine.CC - SpritePlot.CC - SpritePlot3D.CC - SpritePut.CC - SpritePutExt.CC - SpriteRaw.CC - SpriteText.CC - SunMoon.CC - Symmetry.CC - Transform.CC - WallPaperCtrl.CC - WallPaperFish.CC - WallPaperStars.CC - WinZBuf.CC - - InFile/ - InPopUp.CC - InSetIP.CC - InDir.IN - InEd.IN - InPopUpWait.IN - InProfile.IN - - Lectures/ - AndNotMod.CC - FixedPoint.CC - FixedPointAdvanced.CC - InterruptDemo.CC - MiniCompiler.CC - MiniGrLib.CC ... non-functional - NegDisp.CC - Optimization.CC - PCIInterrupts.CC - Ring3.CC - - MultiCore/ - Interrupts.CC - LoadTest.CC - Lock.CC - MPAdd.CC - MPPrint.CC - MPRadix.CC - Palindrome.CC - Primes.CC - - RevFileDemo/ - Rev.CC - - SortFileDemo/ - F64FileGen.CC - F64FileSort.CC - - Sound/ - ASCIIOrgan.CC - MorseCode.CC - OhGreat.CC - WaterFowl.CC - - Templates/ - Game1.CC - Lex1.CC - MultiCore1.CC - ODE1.CC - Registry1.CC - Util1.CC - Util2.CC - InEdUtil.IN - - ToHtmlToTXTDemo/ - HtmlGen.CC - TXTGen.CC - ToHtml.CC - - WebLogDemo/ - WebLogRep.CC - WebLogScramble.CC - - -/Doc/ - FileUtils.DD - -$FG,4$/Downloads/ (skipped)$FG,0$ - -/Home/ - DoDistro.CC - K.CC - -/Kernel/ - Display.CC - EdLite.CC - FunSeg.CC - Job.CC - KConfig.CC - KDataTypes.CC - KDate.CC - KDebug.CC - KDefine.CC - KExcept.CC - KExterns.CC - KGlobals.CC - KHashA.CC - KHashB.CC - KInterrupts.CC - KLoad.CC - KMain.CC - KMathA.CC - KMathB.CC - KMisc.CC - KStart16.CC - KStart32.CC - KStart64.CC - KTask.CC - KUtils.CC - KeyDev.CC - MultiProc.CC - PCIBIOS.CC - QuickSort.CC - Sched.CC - StrA.CC - StrB.CC - StrPrint.CC - StrScan.CC - KernelA.HH - KernelB.HH - KernelC.HH - Kernel.PRJ - - BlkDev/ - DiskATA.CC - DiskATAId.CC - DiskAddDev.CC - DiskBlk.CC - DiskBlkDev.CC - DiskCDDVD.CC - DiskCFile.CC - DiskCache.CC - DiskClus.CC - DiskCopy.CC - DiskDirA.CC - DiskDirB.CC - DiskDirContext.CC - DiskDrive.CC - DiskFile.CC - DiskFind.CC - DiskFormat.CC - DiskStrA.CC - DiskStrB.CC - FileSysFAT.CC - FileSysRedSea.CC - MakeBlkDev.CC - - Memory/ - BlkPool.CC - HeapCtrl.CC - MAllocFree.CC - MakeMemory.CC - MemPag.CC - MemPhysical.CC - PageTables.CC - - SerialDev/ - Keyboard.CC - MakeSerialDev.CC - Message.CC - Mouse.CC - -/Misc/ - DoDistro.CC - OSInstall.CC - OSTestSuite.CC - - Tour/ - Tour.IN - Tour1.IN - Tour2.IN - Tour3.IN - Tour4.IN - Tour5.IN - Tour6.IN - Tour7.IN - Tour8.IN - Tour9.IN - TourA.IN - TourB.IN - TourC.IN - -/Zenith/ - DevInfo.CC - InFile.CC - MakeZenith.CC - Menu.CC - TaskSettings.CC - Training.CC - WallPaper.CC - Win.CC - WinMgr.CC - ZDebug.CC - ZDefine.CC - ZExterns.CC ... ? - ZHash.CC - ZMath.CC - ZMathODE.CC - ZMemory.CC - ZRegistry.CC - ZSound.CC - ZMouse.CC - - AutoComplete/ - ACDictGen.CC - ACFill.CC - ACInit.CC - ACTask.CC - MakeAC.CC - - Boot/ - BootDVD.CC - BootDVDIns.CC - BootHD.CC - BootHDIns.CC - BootMHD.CC - BootMHD2.CC - BootMHDIns.CC - BootRAM.CC - DiskISORedSea.CC - MakeBoot.CC - - Ctrls/ - CtrlsA.CC - CtrlsBttn.CC - CtrlsSlider.CC - MakeCtrls.CC - - DolDoc/ - DocBin.CC - DocChar.CC - DocClipBoard.CC - DocCodeTools.CC - DocDblBuf.CC - DocEd.CC - DocExterns.CC - DocFile.CC - DocFind.CC - DocForm.CC - DocGet.CC - DocGr.CC - DocHighlight.CC - DocInit.CC - DocLink.CC - DocMacro.CC - DocNew.CC - DocPlain.CC - DocPopUp.CC - DocPutKey.CC - DocPutS.CC - DocRecalc.CC - DocRecalcLib.CC - DocRun.CC - DocTerm.CC - DocTree.CC - DocWidgetWiz.CC - MakeDoc.CC - - Gr/ - GrAsm.CC - GrBitMap.CC - GrComposites.CC - GrDC.CC - GrEnd.CC - GrExterns.CC - GrGlobals.CC - GrInitA.CC - GrInitB.CC - GrMath.CC - GrPalette.CC - GrPrimatives.CC - GrScreen.CC - GrSpritePlot.CC - GrTextBase.CC - MakeGr.CC - ScreenCast.CC - SpriteBitmap.CC - SpriteCode.CC - SpriteEd.CC - SpriteMain.CC - SpriteMesh.CC - SpriteNew.CC - SpriteSideBar.CC - Gr.HH - - Utils/ - BinRep.CC - CPURep.CC - Diff.CC - DocUtils.CC - Find.CC - HeapLog.CC - LineRep.CC - LinkCheck.CC - MakeUtils.CC - MemRep.CC - Merge.CC - Profiler.CC - StrUtils.CC - SysRep.CC ... ? - TaskRep.CC - ToDolDoc.CC - ToTXT.CC - VideoRep.CC - - - ZBlkDev/ - DiskCheck.CC - DiskPart.CC - FileMgr.CC - MakeZBlkDev.CC - Mount.CC - ZDiskA.CC - ZDiskB.CC - -$FG,7$-Tom$FG,0$ diff --git a/src/Home/K.CC b/src/Home/K.CC index a821eb68..f0b45517 100755 --- a/src/Home/K.CC +++ b/src/Home/K.CC @@ -31,6 +31,7 @@ if (YorN) "if (DriveIsWritable)" "{" "Del(\\\"~/Registry.CC\\\");" + "Del(\\\"~/MakeHome.CC\\\");" "OutU16(0x4004, 0x3400);" "}\");"); diff --git a/src/Home/MakeHome.CC b/src/Home/MakeHome.CC deleted file mode 100644 index 742a91fa..00000000 --- a/src/Home/MakeHome.CC +++ /dev/null @@ -1,13 +0,0 @@ -Cd(__DIR__);; - -//If these are not present in /Home, it uses the version in the root dir. You -//can make your own, modified, version of these files in your /Home directory. -#include "~/HomeLocalize" -#include "/Zenith/Boot/MakeBoot" -#include "/Zenith/Utils/MakeUtils" -#include "~/HomeWrappers" -MapFileLoad("::/Kernel/Kernel"); -MapFileLoad("::/Compiler/Compiler"); -#include "~/HomeKeyPlugIns" -#include "~/HomeSys" -Cd("..");; diff --git a/src/Home/Net/Docs/NetworkingNotes.DD b/src/Home/Net/Docs/NetworkingNotes.DD index 0e43ff87..db403d43 100755 --- a/src/Home/Net/Docs/NetworkingNotes.DD +++ b/src/Home/Net/Docs/NetworkingNotes.DD @@ -1,4 +1,4 @@ -$BG,0$$FG,15$Zenith Networking Stack Notes$FG,0$$BG,15$ +$BG,0$$FG,15$Zeal Networking Stack Notes$FG,0$$BG,15$ Departures from Shrine: diff --git a/src/Home/Net/Docs/ZenithStackNotes.DD b/src/Home/Net/Docs/ZealStackNotes.DD similarity index 98% rename from src/Home/Net/Docs/ZenithStackNotes.DD rename to src/Home/Net/Docs/ZealStackNotes.DD index 527decf4..77a2832a 100755 Binary files a/src/Home/Net/Docs/ZenithStackNotes.DD and b/src/Home/Net/Docs/ZealStackNotes.DD differ diff --git a/src/Home/Net/Load.CC b/src/Home/Net/Load.CC new file mode 100755 index 00000000..b53696ac --- /dev/null +++ b/src/Home/Net/Load.CC @@ -0,0 +1,32 @@ +Cd(__DIR__); +#include "Utilities/Net.HH" + +#include "Utilities/NetLog" + +#include "Utilities/NetQueue" +#include "Drivers/PCNet" +#include "Protocols/Ethernet" + +#include "Protocols/ARP" +#include "Protocols/IPV4" +#include "Protocols/ICMP" + +#include "Protocols/Sockets" + +#include "Utilities/BST" + +// todo create MakeUDP and MakeTCP to clean this up +#include "Protocols/UDP/UDP.HH" +#include "Protocols/UDP/UDPTree" +#include "Protocols/UDP/UDP.CC" + +#include "Protocols/TCP/TCP.HH" +#include "Protocols/TCP/TCPTree" +#include "Protocols/TCP/TCP.CC" +#include "Protocols/TCP/TCPHandler" + + +#include "Protocols/DNS" +#include "Protocols/DHCP" + +#include "Utilities/NetHandler" // needs IPV4, UDP, ICMP \ No newline at end of file diff --git a/src/Home/Net/NetStart.CC b/src/Home/Net/NetStart.CC deleted file mode 100755 index 6b8b5e42..00000000 --- a/src/Home/Net/NetStart.CC +++ /dev/null @@ -1,49 +0,0 @@ -#include "C:/Home/Net/Net.HH" - -#include "C:/Home/Net/NetLog" - -#include "C:/Home/Net/NetQueue" -#include "C:/Home/Net/Drivers/PCNet" -#include "C:/Home/Net/Ethernet" - -#include "C:/Home/Net/ARP" -#include "C:/Home/Net/IPV4" -#include "C:/Home/Net/ICMP" - -#include "C:/Home/Net/Sockets" - -#include "C:/Home/Net/Utilities/BST" - -#include "C:/Home/Net/UDP/UDP.HH" -#include "C:/Home/Net/UDP/UDPTree" -#include "C:/Home/Net/UDP/UDP.CC" - -#include "C:/Home/Net/TCP/TCP.HH" -#include "C:/Home/Net/TCP/TCPTree" -#include "C:/Home/Net/TCP/TCP.CC" -#include "C:/Home/Net/TCP/TCPHandler" - - -#include "C:/Home/Net/DNS" -#include "C:/Home/Net/DHCP" - -#include "C:/Home/Net/NetHandler" // needs IPV4, UDP, ICMP - -NetConfigure; - -if (Fs != zenith_task) -{ - if (ipv4_globals.local_ip != 0) // is set if NetConfigure is successful - { - NetRep; - - "\nNow run one of the $MA,"Tests",LM="Cd(\"C:/Home/Net/Tests\");Dir;\n"$ or $MA,"Programs",LM="Cd(\"C:/Home/Net/Programs\");Dir;\n"$.\n"; - - "\nIf a test crashes to Debug, try typing $FG,0$G2;$FG$\n\n"; - } - else - { - "\nNetConfigure unsuccessful. See Network Log for details.\n\n"; - } - -} diff --git a/src/Home/Net/ARP.CC b/src/Home/Net/Protocols/ARP.CC similarity index 100% rename from src/Home/Net/ARP.CC rename to src/Home/Net/Protocols/ARP.CC diff --git a/src/Home/Net/DHCP.CC b/src/Home/Net/Protocols/DHCP.CC similarity index 100% rename from src/Home/Net/DHCP.CC rename to src/Home/Net/Protocols/DHCP.CC diff --git a/src/Home/Net/DNS.CC b/src/Home/Net/Protocols/DNS.CC similarity index 100% rename from src/Home/Net/DNS.CC rename to src/Home/Net/Protocols/DNS.CC diff --git a/src/Home/Net/Ethernet.CC b/src/Home/Net/Protocols/Ethernet.CC similarity index 100% rename from src/Home/Net/Ethernet.CC rename to src/Home/Net/Protocols/Ethernet.CC diff --git a/src/Home/Net/ICMP.CC b/src/Home/Net/Protocols/ICMP.CC similarity index 100% rename from src/Home/Net/ICMP.CC rename to src/Home/Net/Protocols/ICMP.CC diff --git a/src/Home/Net/IPV4.CC b/src/Home/Net/Protocols/IPV4.CC similarity index 100% rename from src/Home/Net/IPV4.CC rename to src/Home/Net/Protocols/IPV4.CC diff --git a/src/Home/Net/Sockets.CC b/src/Home/Net/Protocols/Sockets.CC similarity index 100% rename from src/Home/Net/Sockets.CC rename to src/Home/Net/Protocols/Sockets.CC diff --git a/src/Home/Net/TCP/TCP.CC b/src/Home/Net/Protocols/TCP/TCP.CC similarity index 100% rename from src/Home/Net/TCP/TCP.CC rename to src/Home/Net/Protocols/TCP/TCP.CC diff --git a/src/Home/Net/TCP/TCP.HH b/src/Home/Net/Protocols/TCP/TCP.HH similarity index 100% rename from src/Home/Net/TCP/TCP.HH rename to src/Home/Net/Protocols/TCP/TCP.HH diff --git a/src/Home/Net/TCP/TCPHandler.CC b/src/Home/Net/Protocols/TCP/TCPHandler.CC similarity index 100% rename from src/Home/Net/TCP/TCPHandler.CC rename to src/Home/Net/Protocols/TCP/TCPHandler.CC diff --git a/src/Home/Net/TCP/TCPTree.CC b/src/Home/Net/Protocols/TCP/TCPTree.CC similarity index 100% rename from src/Home/Net/TCP/TCPTree.CC rename to src/Home/Net/Protocols/TCP/TCPTree.CC diff --git a/src/Home/Net/UDP/UDP.CC b/src/Home/Net/Protocols/UDP/UDP.CC similarity index 100% rename from src/Home/Net/UDP/UDP.CC rename to src/Home/Net/Protocols/UDP/UDP.CC diff --git a/src/Home/Net/UDP/UDP.HH b/src/Home/Net/Protocols/UDP/UDP.HH similarity index 100% rename from src/Home/Net/UDP/UDP.HH rename to src/Home/Net/Protocols/UDP/UDP.HH diff --git a/src/Home/Net/UDP/UDPTree.CC b/src/Home/Net/Protocols/UDP/UDPTree.CC similarity index 100% rename from src/Home/Net/UDP/UDPTree.CC rename to src/Home/Net/Protocols/UDP/UDPTree.CC diff --git a/src/Home/Net/Run.CC b/src/Home/Net/Run.CC new file mode 100755 index 00000000..b2387e4a --- /dev/null +++ b/src/Home/Net/Run.CC @@ -0,0 +1,20 @@ +Cd(__DIR__);; +#include "Load" +NetConfigure; + +if (Fs != sys_task) +{ + if (ipv4_globals.local_ip != 0) // is set if NetConfigure is successful + { + NetRep; + + "\nNow run one of the $MA,"Tests",LM="Cd(\"C:/Home/Net/Tests\");Dir;\n"$ or $MA,"Programs",LM="Cd(\"C:/Home/Net/Programs\");Dir;\n"$.\n"; + + "\nIf a test crashes to Debug, try typing $FG,0$G2;$FG$\n\n"; + } + else + { + "\nNetConfigure unsuccessful. See Network Log for details.\n\n"; + } + +} diff --git a/src/Home/Net/JSON/JSON.CC b/src/Home/Net/Utilities/JSON/JSON.CC similarity index 100% rename from src/Home/Net/JSON/JSON.CC rename to src/Home/Net/Utilities/JSON/JSON.CC diff --git a/src/Home/Net/JSON/JSON0.TXT b/src/Home/Net/Utilities/JSON/JSON0.TXT similarity index 100% rename from src/Home/Net/JSON/JSON0.TXT rename to src/Home/Net/Utilities/JSON/JSON0.TXT diff --git a/src/Home/Net/JSON/JSON1.TXT b/src/Home/Net/Utilities/JSON/JSON1.TXT similarity index 100% rename from src/Home/Net/JSON/JSON1.TXT rename to src/Home/Net/Utilities/JSON/JSON1.TXT diff --git a/src/Home/Net/JSON/JSON2.TXT b/src/Home/Net/Utilities/JSON/JSON2.TXT similarity index 100% rename from src/Home/Net/JSON/JSON2.TXT rename to src/Home/Net/Utilities/JSON/JSON2.TXT diff --git a/src/Home/Net/JSON/JSON3.TXT b/src/Home/Net/Utilities/JSON/JSON3.TXT similarity index 100% rename from src/Home/Net/JSON/JSON3.TXT rename to src/Home/Net/Utilities/JSON/JSON3.TXT diff --git a/src/Home/Net/JSON/JSON4.TXT b/src/Home/Net/Utilities/JSON/JSON4.TXT similarity index 100% rename from src/Home/Net/JSON/JSON4.TXT rename to src/Home/Net/Utilities/JSON/JSON4.TXT diff --git a/src/Home/Net/Net.HH b/src/Home/Net/Utilities/Net.HH similarity index 100% rename from src/Home/Net/Net.HH rename to src/Home/Net/Utilities/Net.HH diff --git a/src/Home/Net/NetHandler.CC b/src/Home/Net/Utilities/NetHandler.CC similarity index 100% rename from src/Home/Net/NetHandler.CC rename to src/Home/Net/Utilities/NetHandler.CC diff --git a/src/Home/Net/NetLog.CC b/src/Home/Net/Utilities/NetLog.CC similarity index 94% rename from src/Home/Net/NetLog.CC rename to src/Home/Net/Utilities/NetLog.CC index 51b49335..b1f9e846 100755 --- a/src/Home/Net/NetLog.CC +++ b/src/Home/Net/Utilities/NetLog.CC @@ -18,8 +18,8 @@ U0 NetLogInit() net_log_task->border_attr = DKGRAY << 4 + LTGRAY; net_log_task->text_attr = WHITE << 4 + LTGRAY; - if (Fs == zenith_task) - WinFocus(zenith_task->next_task); + if (Fs == sys_task) + WinFocus(sys_task->next_task); else WinFocus; diff --git a/src/Home/Net/NetQueue.CC b/src/Home/Net/Utilities/NetQueue.CC similarity index 97% rename from src/Home/Net/NetQueue.CC rename to src/Home/Net/Utilities/NetQueue.CC index 56e7c6b0..585f660e 100755 --- a/src/Home/Net/NetQueue.CC +++ b/src/Home/Net/Utilities/NetQueue.CC @@ -1,7 +1,7 @@ /* Shrine mentions possibly using two FIFOs (in our case, Queues) for pending and empty frames. If logical to implement, - perhaps Zenith NetQueue code should + perhaps Zeal NetQueue code should do something similar to that idea. Each Ethernet Frame will be represented diff --git a/src/Home/Roadmap.DD b/src/Home/Roadmap.DD index db6ab58b..00c610fe 100755 --- a/src/Home/Roadmap.DD +++ b/src/Home/Roadmap.DD @@ -1,39 +1,25 @@ $WW$$FG,5$$TX+CX,"Project Roadmap"$$FG$ -The goal is to be a fully-functional, self-reproducing x86_64 PC operating system running in $FG,2$ring-0 only$FG$, designed for modern machines with $FG,2$AHCI$FG$ and $FG,2$NVMe$FG$ drives. +The goal is to be a fully-functional, self-reproducing x86_64 PC operating system running in $FG,2$ring-0 only$FG$, designed for modern machines with $FG,2$AHCI$FG$. Roadmap: -- AHCI driver that is capable of reading and burning CD/DVD discs, and can also work with RW discs. - -- Speed up the OS by doing compiler optimizations like register arguments. - -- Drop floating point support completely. - -- Add either SSE or AVX support (not both) to the assembler/compiler, for working with large integers. - -- Write a new 32-bit color graphics library that uses the added SIMD instructions. Refresh DolDoc for the following: - -- Build a simplistic GUI framework that integrates with DolDoc and the terminal using the new graphics library. - -- Add Intel HD Audio support. +- AHCI driver that is capable of reading and burning CD/DVD discs (ñR/W). - Write drivers for the 5 most common ethernet cards. + - PCNet-II (Virtualbox) + - 82545EM (VMWare; QEMU?) + - ... + - ... + - ... -- Create a clean and robust networking stack that supports raw sockets, TCP, UDP, IP, ICMP, DHCP, and an HTTP library. Perhaps we can avoid Berkeley Sockets and create our own system? +- Create a clean and robust networking stack that supports sockets, TCP, UDP, IP, ICMP, DHCP, and an HTTP library. + - Write applications using this networking stack. + - Write a JSON library, so REST APIs can be used. + - Whole system VCS, with root being top-level directory. Stored repo inside the OS, you can checkout any commit onto another partition and boot it to see what the OS was like in that commit. + - Pull updates directly onto root filesystem from network. (it's a repo source tree after all). -- Write applications using this networking stack. +- Code clean up and refactoring. -- Write a JSON library, so REST APIs can be used. +- Perhaps support for USB keyboard and mice. -- Drop FAT32 and maybe RedSea, replace with exFAT and proper ISO9660 support. - -- Whole system VCS, with root being top-level directory. Stored repo inside the OS, you can checkout any commit onto another partition and boot it to see what the OS was like in that commit. - -- Pull updates directly onto root filesystem from network. (it's a repo source tree after all). - -- At this point, bigger fish in the pond can be eyed. Perhaps support for USB keyboard and mice, and native USB mass storage support, significant code clean up and refactoring. - -- Port to other architectures?? - -Perhaps, in order to reduce LOC in the compiler we can skip on most optimizations. diff --git a/src/HomeSys.CC b/src/HomeSys.CC index 7537d675..9aefd33c 100755 --- a/src/HomeSys.CC +++ b/src/HomeSys.CC @@ -22,6 +22,10 @@ U0 ServerStartUp() U0 StartUpTasks() { CTask *user = User; + + if (sys_boot_src.u16[0] != BOOT_SRC_DVD) + User; + WinToTop(user); WinTileVert; "Boot Time:%7.3fs\n", tS; @@ -31,9 +35,9 @@ U0 StartUpTasks() Silent(OFF); //no output to screen if (sys_boot_src.u16[0] != BOOT_SRC_RAM) - PopUp("ExeFile2(\"::/Zenith/ZSplash.CC\");"); + PopUp("ExeFile2(\"::/System/ZSplash.CC\");"); } StartUpTasks; -"\nZenithOS V%0.2f\t%D %T\n\n", sys_os_version, sys_compile_time, sys_compile_time; +"\nZealOS V%0.2f\t%D %T\n\n", sys_os_version, sys_compile_time, sys_compile_time; diff --git a/src/HomeWrappers.CC b/src/HomeWrappers.CC index 56c9e6f2..bef8bcf7 100755 --- a/src/HomeWrappers.CC +++ b/src/HomeWrappers.CC @@ -31,6 +31,6 @@ public U0 Cls() } public U0 ZCls() -{//Clear zenith terminal. - Zenith("DocClear;\n"); +{//Clear zeal terminal. + Sys("DocClear;\n"); } \ No newline at end of file diff --git a/src/Kernel/BlkDev/DiskAHCI.CC b/src/Kernel/BlkDev/DiskAHCI.CC index 9511b9b1..26b16b29 100755 --- a/src/Kernel/BlkDev/DiskAHCI.CC +++ b/src/Kernel/BlkDev/DiskAHCI.CC @@ -1,3 +1,13 @@ +/* +- Perhaps make more references to spec in comments + +- ATAPI RW + +- Remove Buffer alignment check and just do it on every call + +- AHCIATAPISetMaxSpeed? +*/ + I64 AHCILBA48CapacityGet(U16 *id_record) {//Get capacity of drive, in LBA blocks. //Capacity is stored in a U64, so we take the shortcut @@ -19,7 +29,7 @@ I64 AHCIPortCmdSlotGet(I64 port_num) slots >>= 1; } - ZenithErr("AHCI: No empty command slots on port %d!\n", port_num); + SysErr("AHCI: No empty command slots on port %d!\n", port_num); throw('AHCI'); } @@ -61,7 +71,7 @@ Bool AHCIPortWait(I64 port_num, F64 timeout, Bool throwing=TRUE) while (timeout > tS); if (throwing) - { ZenithErr("AHCI: Port %d hung.\n", port_num); + { SysErr("AHCI: Port %d hung.\n", port_num); throw('AHCI'); } @@ -109,7 +119,7 @@ U0 AHCIPortCmdWait(I64 port_num, I64 cmd_slot) if (Bt(&port->interrupt_status, AHCI_PxIf_TFE)) //Task File Error ($LK,"ATAS_ERR",A="MN:ATAS_ERR"$) { error: - ZenithErr("AHCI: Port %d: Command failed!\n", port_num); + SysErr("AHCI: Port %d: Command failed!\n", port_num); throw('AHCI'); } @@ -131,11 +141,11 @@ I64 AHCIAtapiCapacityGet(CBlkDev *bd) if (port->signature != AHCI_PxSIG_ATAPI) { - ZenithErr("AHCI: Drive is not an ATAPI drive!\n"); + SysErr("AHCI: Drive is not an ATAPI drive!\n"); throw('AHCI'); } - buf = CAlloc(8, zenith_task->code_heap); + buf = CAlloc(8, sys_task->code_heap); Bts(&cmd_header->desc, AHCI_CH_DESCf_A); @@ -178,7 +188,7 @@ Bool AHCIAtapiSeek(CBlkDev *bd, I64 blk) if (port->signature != AHCI_PxSIG_ATAPI) { - ZenithErr("AHCI: Drive is not an ATAPI drive!\n"); + SysErr("AHCI: Drive is not an ATAPI drive!\n"); throw('AHCI'); } @@ -222,7 +232,7 @@ Bool AHCIAtapiStartStop(CBlkDev *bd, Bool start) if (port->signature != AHCI_PxSIG_ATAPI) { - ZenithErr("AHCI: Drive is not an ATAPI drive!\n"); + SysErr("AHCI: Drive is not an ATAPI drive!\n"); throw('AHCI'); } @@ -287,7 +297,7 @@ U0 AHCIPortIdentify(CBlkDev *bd) port->interrupt_status = port->interrupt_status; //TODO: Why? //Using the code heap for this alloc to stay under 32-bit address space. - dev_id_record = CAlloc(512, zenith_task->code_heap); + dev_id_record = CAlloc(512, sys_task->code_heap); cmd_table = cmd_header->cmd_table_base; MemSet(cmd_table, 0, sizeof(CPortCmdTable)); @@ -342,7 +352,7 @@ U8 *AHCIBufferAlign(CBlkDev *bd, U8 *user_buf, I64 buf_size, Bool write) // "Aligning buffer under 32-bit range\n"; Free(bd->prd_buf); - bd->prd_buf = MAlloc(buf_size, zenith_task->code_heap); + bd->prd_buf = MAlloc(buf_size, sys_task->code_heap); Bts(&bd->flags, BDf_INTERNAL_BUF); @@ -369,14 +379,14 @@ I64 AHCIAtaBlksRW(CBlkDev *bd, U8 *buf, I64 blk, I64 count, Bool write) if (port->signature != AHCI_PxSIG_ATA) { - ZenithErr("AHCI: Drive is not an ATA drive!\n"); + SysErr("AHCI: Drive is not an ATA drive!\n"); throw('AHCI'); } if (count < 1) return 0; if (count > AHCI_PRDT_MAX_BLOCKS) { - ZenithErr("AHCI: Block count %d max allowed in one command (%d)", count, AHCI_PRDT_MAX_BLOCKS); + SysErr("AHCI: Block count %d max allowed in one command (%d)", count, AHCI_PRDT_MAX_BLOCKS); throw('AHCI'); } @@ -532,7 +542,7 @@ I64 AHCIAtapiBlksRead(CBlkDev *bd, U8 *buf, I64 blk, I64 count, Bool lock=TRUE) if (port->signature != AHCI_PxSIG_ATAPI) { - ZenithErr("AHCI: Drive is not an ATAPI drive!\n"); + SysErr("AHCI: Drive is not an ATAPI drive!\n"); throw('AHCI'); } if (count < 1) @@ -628,11 +638,11 @@ U0 AHCIPortInit(CBlkDev *bd, CAHCIPort *port, I64 port_num) AHCIPortCmdStop(port_num); //'1K-byte' align as per SATA spec. - port->cmd_list_base = CAllocAligned(sizeof(CPortCmdHeader) * blkdev.cmd_slot_count, 1024, zenith_task->code_heap); + port->cmd_list_base = CAllocAligned(sizeof(CPortCmdHeader) * blkdev.cmd_slot_count, 1024, sys_task->code_heap); port->cmd_list_base_upper = 0; //Alloc where received FISes will be copied to. '256-byte' align as per spec. - port->fis_base = CAllocAligned(sizeof(CFisReceived), 256, zenith_task->code_heap); + port->fis_base = CAllocAligned(sizeof(CFisReceived), 256, sys_task->code_heap); port->fis_base_upper = 0; for (i = 0; i < blkdev.cmd_slot_count; i++) @@ -642,7 +652,7 @@ U0 AHCIPortInit(CBlkDev *bd, CAHCIPort *port, I64 port_num) cmd_header->desc = sizeof(CFisH2D) / sizeof(U32); //'128-byte' align as per SATA spec, minus 1 since length is 1-based. - cmd_header->cmd_table_base = CAllocAligned(sizeof(CPortCmdTable) + sizeof(CPrdtEntry) * (AHCI_PRDT_MAX_LEN - 1), 128, zenith_task->code_heap); + cmd_header->cmd_table_base = CAllocAligned(sizeof(CPortCmdTable) + sizeof(CPrdtEntry) * (AHCI_PRDT_MAX_LEN - 1), 128, sys_task->code_heap); cmd_header->cmd_table_base_upper = 0; } AHCIPortCmdStart(port_num); @@ -707,11 +717,11 @@ U0 AHCIInit() if (bdf == -1) { - "No AHCI controller found.\n"; + "AHCI: No AHCI controller found.\n"; return; } - "AHCI: controller found\n"; + "AHCI: Controller found\n"; hba = dev.uncached_alias + PCIReadU32(bdf.u8[2], bdf.u8[1], bdf.u8[0], PCIR_BASE5) & ~0x1F; //Last 4 bits not part of address. blkdev.ahci_hba = hba; @@ -720,7 +730,7 @@ U0 AHCIInit() "AHCI: GHC.AE\n"; // AHCIHbaReset; -// "AHCI: HBA reset\n"; +// "AHCI: HBA Reset\n"; //Transferring ownership from BIOS if supported. @@ -737,14 +747,14 @@ U0 AHCIInit() } blkdev.cmd_slot_count = (hba->caps & 0x1F00) >> 8; - "AHCI: cmd slot count: %d\n", blkdev.cmd_slot_count; + "AHCI: Command slot count: %d\n", blkdev.cmd_slot_count; for (i = 0; i < AHCI_MAX_PORTS; i++) { if (Bt(&hba->ports_implemented, i)) {//$BK,1$Make ports idle?$BK,0$ port = &hba->ports[i]; - "AHCI: port on %d, signature 0x%0X\n", i, port->signature; + "AHCI: Port on %d, signature 0x%0X\n", i, port->signature; if (port->signature == AHCI_PxSIG_ATA || port->signature == AHCI_PxSIG_ATAPI) { if (port->signature == AHCI_PxSIG_ATAPI) @@ -791,11 +801,11 @@ Bool AHCIBootDVDProbeAll(CBlkDev *bd) if (kernel->compile_time == sys_compile_time) { - "Found sys_compile_time at BLK %d on Port %d\n", sys_boot_blk, i; + "AHCI: Found sys_compile_time at BLK %d on Port %d\n", sys_boot_blk, i; return TRUE; } else - "Did not find matching sys_compile_time on Port %d\n", i; + "AHCI: Did not find matching sys_compile_time on Port %d\n", i; } } } diff --git a/src/Kernel/BlkDev/DiskAddDev.CC b/src/Kernel/BlkDev/DiskAddDev.CC index b93d4acd..51a0ce35 100755 --- a/src/Kernel/BlkDev/DiskAddDev.CC +++ b/src/Kernel/BlkDev/DiskAddDev.CC @@ -229,7 +229,7 @@ Bool GetBaseUnit(CBlkDev *bd) if (!probe || !IDEBootDVDProbeAll(bd)) { "\nDon't worry. This is not a product\n" - "registration. ZenithOS just needs the\n" + "registration. ZealOS just needs the\n" "I/O port numbers for the CD/DVD.\n" "\nRetry the ports above or check Windows\n" "system information under I/O ports for\n" @@ -274,7 +274,7 @@ U0 BlkDevsInitAll() if (!blkdev.ahci_hba) { - "\nZenithOS requires AHCI.\n\n" + "\nZealOS requires AHCI.\n\n" "If in IDE compatibility mode, switch to SATA mode.\n" "If running in a VM, ensure disks are organized under a SATA controller.\n\n" "Rebooting in 10 seconds...\n"; diff --git a/src/Kernel/BlkDev/DiskCDDVD.CC b/src/Kernel/BlkDev/DiskCDDVD.CC index d5431278..dcde02e5 100755 --- a/src/Kernel/BlkDev/DiskCDDVD.CC +++ b/src/Kernel/BlkDev/DiskCDDVD.CC @@ -34,7 +34,7 @@ Bool ISOInit(CDrive *drive, I64 blk) case ISOT_SUPPLEMENTARY_DESC: de = &iso->root_dir_record; drive->size = iso->vol_space_size.little * bd->blk_size >> BLK_SIZE_BITS; - if (!StrCompare(iso->publisher_id, "ZenithOS RedSea")) + if (!StrCompare(iso->publisher_id, "ZealOS RedSea")) { drive->fs_type = FSt_REDSEA; bd->drv_offset = drive->drv_offset = 19 << 2 + drv_offset; diff --git a/src/Kernel/BlkDev/DiskFile.CC b/src/Kernel/BlkDev/DiskFile.CC index 384a16b0..4b486f12 100755 --- a/src/Kernel/BlkDev/DiskFile.CC +++ b/src/Kernel/BlkDev/DiskFile.CC @@ -6,7 +6,7 @@ U8 *FileRead(U8 *filename, I64 *_size=NULL, I64 *_attr=NULL) CDirContext *dirc; absname = FileNameAbs(filename); - if (tmph = HashFind(absname, zenith_task->hash_table, HTT_FILE)) + if (tmph = HashFind(absname, sys_task->hash_table, HTT_FILE)) { size = tmph->user_data1; res = MAlloc(size + 1); @@ -62,7 +62,7 @@ U8 *FileRead(U8 *filename, I64 *_size=NULL, I64 *_attr=NULL) if (!res) PrintErr("File not found: \"%s\".\n", filename); if (res && attr & RS_ATTR_RESIDENT) - HashGenericAdd(absname, HTT_FILE, ZMAllocIdent(res), size, 0, zenith_task); + HashGenericAdd(absname, HTT_FILE, ZMAllocIdent(res), size, 0, sys_task); if (_attr) *_attr = attr; @@ -98,7 +98,7 @@ I64 FileWrite(U8 *filename, U8 *fbuf, I64 size, CDate cdt=0, I64 attr=0) default: PrintErr("File System Not Supported\n"); } - if (tmph = HashFind(absname, zenith_task->hash_table, HTT_FILE)) + if (tmph = HashFind(absname, sys_task->hash_table, HTT_FILE)) { if (attr & RS_ATTR_RESIDENT) { @@ -107,10 +107,10 @@ I64 FileWrite(U8 *filename, U8 *fbuf, I64 size, CDate cdt=0, I64 attr=0) tmph->user_data1 = size; } else - HashRemDel(tmph, zenith_task->hash_table); + HashRemDel(tmph, sys_task->hash_table); } else if (attr & RS_ATTR_RESIDENT) - HashGenericAdd(absname, HTT_FILE, ZMAllocIdent(fbuf), size, 0, zenith_task); + HashGenericAdd(absname, HTT_FILE, ZMAllocIdent(fbuf), size, 0, sys_task); DirContextDel(dirc); } Free(absname); diff --git a/src/Kernel/Job.CC b/src/Kernel/Job.CC index 2fcc15db..15d1b7df 100755 --- a/src/Kernel/Job.CC +++ b/src/Kernel/Job.CC @@ -482,21 +482,21 @@ I64 PopUpPrint(U8 *format, ...) return res; } -I64 Zenith(U8 *format, ...) -{//Make zenith_task execute code. +I64 Sys(U8 *format, ...) +{//Make sys_task execute code. I64 res; U8 *buf = StrPrintJoin(NULL, format, argc, argv); CJob *tmpc; - if (Fs == zenith_task) + if (Fs == sys_task) { - tmpc = TaskExe(zenith_task, Fs, buf, 0); + tmpc = TaskExe(sys_task, Fs, buf, 0); JobsHandler(RFlagsGet); } else { - TaskWait(zenith_task); - tmpc = TaskExe(zenith_task, Fs, buf, 1 << JOBf_WAKE_MASTER); + TaskWait(sys_task); + tmpc = TaskExe(sys_task, Fs, buf, 1 << JOBf_WAKE_MASTER); } JobResScan(tmpc, &res); Free(buf); @@ -504,37 +504,37 @@ I64 Zenith(U8 *format, ...) return res; } -U0 ZenithLog(U8 *format, ...) -{//Display text in zenith_task. +U0 SysLog(U8 *format, ...) +{//Display text in sys_task. U8 *buf = StrPrintJoin(NULL, format, argc, argv); - if (Fs == zenith_task) + if (Fs == sys_task) "%s", buf; else if (!IsSingleUser) - Zenith("\"%%s\",%d;", buf); + Sys("\"%%s\",%d;", buf); Free(buf); } -U0 ZenithWarn(U8 *format, ...) -{//Display pink blinking Warn text in zenith_task. +U0 SysWarn(U8 *format, ...) +{//Display pink blinking Warn text in sys_task. U8 *buf = StrPrintJoin(NULL, format, argc, argv), *st = MStrPrint(ST_WARN_ST "%s", buf); - if (Fs == zenith_task) + if (Fs == sys_task) "%s", st; else if (!IsSingleUser) - Zenith("\"%%s\",%d;", st); + Sys("\"%%s\",%d;", st); Free(st); Free(buf); } -U0 ZenithErr(U8 *format, ...) -{//Display red blinking Err text in zenith_task. +U0 SysErr(U8 *format, ...) +{//Display red blinking Err text in sys_task. U8 *buf = StrPrintJoin(NULL, format, argc, argv), *st = MStrPrint(ST_ERR_ST "%s", buf); - if (Fs == zenith_task) + if (Fs == sys_task) "%s", st; else if (!IsSingleUser) - Zenith("\"%%s\",%d;", st); + Sys("\"%%s\",%d;", st); Free(st); Free(buf); } diff --git a/src/Kernel/KDebug.CC b/src/Kernel/KDebug.CC index b170eb12..fb499565 100755 --- a/src/Kernel/KDebug.CC +++ b/src/Kernel/KDebug.CC @@ -652,7 +652,7 @@ U0 Fault3(I64 fault_num, I64 fault_err_code) SysHlt; } - "\n\tZenithOS Debugger\n\n" + "\n\tZealOS Debugger\n\n" ">Help;\t//For help.\n\n"; Beep(62, TRUE); diff --git a/src/Kernel/KExcept.CC b/src/Kernel/KExcept.CC index 64e99715..6eb23296 100755 --- a/src/Kernel/KExcept.CC +++ b/src/Kernel/KExcept.CC @@ -96,7 +96,7 @@ U0 throw(I64 ch=0, Bool no_log=FALSE) Fs->except_rbp = RBPGet; Fs->catch_except = FALSE; if (!no_log) - ZenithLog("Except:%c:%p:%p:%p:%p:%p:%p\n", ch, + SysLog("Except:%c:%p:%p:%p:%p:%p:%p\n", ch, Fs->except_callers[0], Fs->except_callers[1], Fs->except_callers[2], Fs->except_callers[3], Fs->except_callers[4], Fs->except_callers[5], Fs->except_callers[6], Fs->except_callers[7]); diff --git a/src/Kernel/KExterns.CC b/src/Kernel/KExterns.CC index acd358f5..d9a4bc8b 100755 --- a/src/Kernel/KExterns.CC +++ b/src/Kernel/KExterns.CC @@ -8,8 +8,8 @@ import U8 *DocSave(CDoc *doc, I64 *_size=NULL); import Bool DocUnlock(CDoc *doc); import Bool Ed(U8 *link_st, I64 edf_dof_flags=0); -extern U0 ZenithErr(U8 *format, ...); -extern U0 ZenithLog(U8 *format, ...); +extern U0 SysErr(U8 *format, ...); +extern U0 SysLog(U8 *format, ...); extern I64 MemBIOSTotal(); @@ -123,7 +123,7 @@ extern U0 RedSeaInit(CDrive *drive); extern Bool RedSeaValidate(U8 drv_let); extern CTask *SpawnQueue(U0 (*fp_addr)(U8 *data), U8 *data=NULL, - U8 *task_name=NULL, I64 target_cpu, CTask *parent=NULL, //NULL means zenith + U8 *task_name=NULL, I64 target_cpu, CTask *parent=NULL, //NULL means system_task I64 stack_size=0, I64 flags=1<type & HTT_DICT_WORD)) @@ -241,7 +241,7 @@ I64 HashListAdd(U8 *list, I64 type, CHashTable *table) } I64 HashDefineListAdd(U8 *dname, I64 type, CHashTable *table) -{//Add define list to a hash table. See $LK,"::/Zenith/DolDoc/DocInit.CC",A="FF:::/Zenith/DolDoc/DocInit.CC,HashDefineListAdd"$. +{//Add define list to a hash table. See $LK,"::/System/DolDoc/DocInit.CC",A="FF:::/System/DolDoc/DocInit.CC,HashDefineListAdd"$. CHashDefineStr *tmph; if (tmph = HashFind(dname, Fs->hash_table, HTT_DEFINE_STR)) diff --git a/src/Kernel/KMain.CC b/src/Kernel/KMain.CC index c5df042c..22816372 100755 --- a/src/Kernel/KMain.CC +++ b/src/Kernel/KMain.CC @@ -142,14 +142,14 @@ U0 KMain() CBlkDev *bd; OutU8(PCSPKR, InU8(PCSPKR) & ~3); //Sound; - zenith_task = Fs; + sys_task = Fs; BlkPoolsInit; SysGlobalsInit; Mem32DevInit; UncachedAliasAlloc; LoadKernel; SysGrInit; - StrCopy(Fs->task_name, "Zenith Task CPU00"); + StrCopy(Fs->task_name, "System Task CPU00"); StrCopy(Fs->task_title, Fs->task_name); Fs->title_src = TTS_TASK_NAME; Fs->win_right = text.cols - 2; @@ -163,7 +163,7 @@ U0 KMain() //Before this point use $LK,"Sound",A="MN:Sound"$() and $LK,"Busy",A="MN:Busy"$() //to debug. After this point, use $LK,"RawPrint",A="MN:RawPrint"$() LBts(&sys_run_level, RLf_RAW); - "ZenithOS V%0.2f\t%D %T\n\n", sys_os_version, sys_compile_time, sys_compile_time; + "ZealOS V%0.2f\t%D %T\n\n", sys_os_version, sys_compile_time, sys_compile_time; TimerInit; if (MemBIOSTotal < ToI64 (0.95 * MEM_MIN_MEG * 0x100000) ) @@ -237,7 +237,7 @@ U0 KMain() Debug; } - LBts(&sys_run_level, RLf_ZENITH_SERVER); + LBts(&sys_run_level, RLf_ZEAL_SERVER); ServerTaskCont; //Never to return } diff --git a/src/Kernel/KMisc.CC b/src/Kernel/KMisc.CC index c7094d62..ab5417a8 100755 --- a/src/Kernel/KMisc.CC +++ b/src/Kernel/KMisc.CC @@ -54,7 +54,7 @@ I64 TimeCal() counts.time_stamp_freq = SYS_TIMER_FREQ * (TSCGet - time_stamp_start); i = SysTimerRead - timer_start; if (!i) - ZenithErr("Timer Cal Error"); + SysErr("Timer Cal Error"); else { counts.time_stamp_freq /= i; diff --git a/src/Kernel/KStart16.CC b/src/Kernel/KStart16.CC index cb6bf061..e3e6bca1 100755 --- a/src/Kernel/KStart16.CC +++ b/src/Kernel/KStart16.CC @@ -1,5 +1,5 @@ asm {/* See $LK,"::/Doc/Boot.DD"$. -ZenithOS starts in real, calls some BIOS routines, switches to 32 bit, and 64 bit mode and continues in $LK,"CosmiC",A="FI:::/Doc/CosmiC.DD"$ at $LK,"KMain",A="MN:KMain"$(). +ZealOS starts in real, calls some BIOS routines, switches to 32 bit, and 64 bit mode and continues in $LK,"CosmiC",A="FI:::/Doc/CosmiC.DD"$ at $LK,"KMain",A="MN:KMain"$(). The boot loader jumps here in real-mode (16-bit). It actually jumps to the $LK,"CBinFile",A="MN:CBinFile"$ header which is placed just before this by $LK,"the compiler",A="FF:::/Compiler/CMain.CC,16 ALIGN"$. @@ -70,12 +70,12 @@ MAX_SCREEN_HEIGHT: DU16 0; //************************************ CORE0_16BIT_INIT:: -//EAX is $LK,"SYS_BOOT_SRC",A="FF:::/Kernel/KStart16.CC,[SYS_BOOT_SRC]"$. (Val passed from boot blk, $LK,"BootHD",A="FF:::/Zenith/Boot/BootHD.CC,BOOT_SRC_HARDDRIVE"$, $LK,"BootDVD",A="FF:::/Zenith/Boot/BootDVD.CC,BOOT_SRC_DVD"$, & $LK,"BootRAM",A="FF:::/Zenith/Boot/BootRAM.CC,BOOT_SRC_RAM"$.) +//EAX is $LK,"SYS_BOOT_SRC",A="FF:::/Kernel/KStart16.CC,[SYS_BOOT_SRC]"$. (Val passed from boot blk, $LK,"BootHD",A="FF:::/System/Boot/BootHD.CC,BOOT_SRC_HARDDRIVE"$, $LK,"BootDVD",A="FF:::/System/Boot/BootDVD.CC,BOOT_SRC_DVD"$, & $LK,"BootRAM",A="FF:::/System/Boot/BootRAM.CC,BOOT_SRC_RAM"$.) MOV ECX, EAX MOV AX, (BOOT_RAM_LIMIT - BOOT_STACK_SIZE) / 16 MOV SS, AX MOV SP, BOOT_STACK_SIZE - PUSH ECX //Will be $LK,"SYS_BOOT_SRC",A="FF:::/Kernel/KStart16.CC,[SYS_BOOT_SRC]"$. See $LK,"BootHD",A="FF:::/Zenith/Boot/BootHD.CC,BOOT_SRC_HARDDRIVE"$, $LK,"BootDVD",A="FF:::/Zenith/Boot/BootDVD.CC,BOOT_SRC_DVD"$ & $LK,"BootRAM",A="FF:::/Zenith/Boot/BootRAM.CC,BOOT_SRC_RAM"$. + PUSH ECX //Will be $LK,"SYS_BOOT_SRC",A="FF:::/Kernel/KStart16.CC,[SYS_BOOT_SRC]"$. See $LK,"BootHD",A="FF:::/System/Boot/BootHD.CC,BOOT_SRC_HARDDRIVE"$, $LK,"BootDVD",A="FF:::/System/Boot/BootDVD.CC,BOOT_SRC_DVD"$ & $LK,"BootRAM",A="FF:::/System/Boot/BootRAM.CC,BOOT_SRC_RAM"$. PUSH EBX CALL U16 GET_IP GET_IP: POP BX @@ -308,7 +308,7 @@ GET_IP: POP BX OUT 0x92, AL POP U32 [SYS_BOOT_BLK] - POP U32 [SYS_BOOT_SRC] //See $LK,"BootHD",A="FF:::/Zenith/Boot/BootHD.CC,BOOT_SRC_HARDDRIVE"$, $LK,"BootDVD",A="FF:::/Zenith/Boot/BootDVD.CC,BOOT_SRC_DVD"$, & $LK,"BootRAM",A="FF:::/Zenith/Boot/BootRAM.CC,BOOT_SRC_RAM"$. + POP U32 [SYS_BOOT_SRC] //See $LK,"BootHD",A="FF:::/System/Boot/BootHD.CC,BOOT_SRC_HARDDRIVE"$, $LK,"BootDVD",A="FF:::/System/Boot/BootDVD.CC,BOOT_SRC_DVD"$, & $LK,"BootRAM",A="FF:::/System/Boot/BootRAM.CC,BOOT_SRC_RAM"$. CLD XOR EAX, EAX diff --git a/src/Kernel/KStart64.CC b/src/Kernel/KStart64.CC index 988ac021..d616c138 100755 --- a/src/Kernel/KStart64.CC +++ b/src/Kernel/KStart64.CC @@ -17,14 +17,14 @@ USE64 FXSAVE U64 [RAX] //Init CPU0 Struct - PUSH SYS_FIXED_AREA + CSysFixedArea.zenith + PUSH SYS_FIXED_AREA + CSysFixedArea.zeal PUSH SYS_FIXED_AREA + CSysFixedArea.boot_cpu PUSH 0 CALL &CPUStructInit CALL SET_GS_BASE -//Init Zenith HeapCtrl - MOV EDI, U32 SYS_FIXED_AREA + CSysFixedArea.zenith_hc +//Init System HeapCtrl + MOV EDI, U32 SYS_FIXED_AREA + CSysFixedArea.zeal_hc MOV EAX, U32 SYS_FIXED_AREA + CSysFixedArea.sys_code_bp MOV U64 CHeapCtrl.bp[RDI],RAX MOV U32 CHeapCtrl.hc_signature[RDI], HEAP_CTRL_SIGNATURE_VAL @@ -33,16 +33,16 @@ USE64 MOV U64 CHeapCtrl.next_um[RDI], RAX MOV U64 CHeapCtrl.last_um[RDI], RAX - MOV EAX, U32 SYS_FIXED_AREA + CSysFixedArea.zenith + MOV EAX, U32 SYS_FIXED_AREA + CSysFixedArea.zeal MOV U64 CHeapCtrl.mem_task[RDI], RAX MOV U64 CTask.code_heap[RAX], RDI MOV U64 CTask.data_heap[RAX], RDI MOV U32 CTask.task_signature[RAX], TASK_SIGNATURE_VAL - BTS U32 [SYS_RUN_LEVEL], RLf_16MEG_ZENITH_HEAP_CTRL + BTS U32 [SYS_RUN_LEVEL], RLf_16MEG_ZEAL_HEAP_CTRL - PUSH MEM_ZENITH_STACK - PUSH U32 SYS_FIXED_AREA + CSysFixedArea.zenith + PUSH MEM_ZEAL_STACK + PUSH U32 SYS_FIXED_AREA + CSysFixedArea.zeal CALL &TaskInit CALL SET_FS_BASE MOV RSP, U64 CTask.rsp[RAX] @@ -81,7 +81,7 @@ USE64 RET //************************************ -SYS_RAM_REBOOT:: //This gets copied high. $LK,"SYS_RAM_REBOOT",A="FF:::/Zenith/Boot/BootRAM.CC,SYS_RAM_REBOOT:2"$ +SYS_RAM_REBOOT:: //This gets copied high. $LK,"SYS_RAM_REBOOT",A="FF:::/System/Boot/BootRAM.CC,SYS_RAM_REBOOT:2"$ PUSH U32 CGDT.ds //stack seg PUSH U32 BOOT_RAM_LIMIT //stack PUSH U32 0 //flags diff --git a/src/Kernel/KTask.CC b/src/Kernel/KTask.CC index 895be2f0..e4fe91bf 100755 --- a/src/Kernel/KTask.CC +++ b/src/Kernel/KTask.CC @@ -249,7 +249,7 @@ I64 TaskInit(CTask *task, I64 stack_size) task->win_bottom = text.rows - 2; if (blkdev.home_dir) - {//Beware Zenith $LK,"TaskInit",A="FF:::/Kernel/KStart64.CC,TaskInit"$. I guess ok until $LK,"DiskChange",A="FF:::/Kernel/KMain.CC,DiskChange"$(). + {//Beware System $LK,"TaskInit",A="FF:::/Kernel/KStart64.CC,TaskInit"$. I guess ok until $LK,"DiskChange",A="FF:::/Kernel/KMain.CC,DiskChange"$(). task->cur_dv = blkdev.let_to_drive[*blkdev.home_dir - 'A']; task->cur_dir = StrNew(blkdev.home_dir + 2, task); } @@ -263,7 +263,7 @@ I64 TaskInit(CTask *task, I64 stack_size) CTask *Spawn(U0 (*fp_start_addr)(U8 *data), U8 *data=NULL, U8 *task_name=NULL, I64 target_cpu=-1, // -1 for current CPU. See $LK,"multi-core",A="FI:::/Demo/MultiCore/LoadTest.CC"$. - CTask *parent=NULL, // NULL means zenith + CTask *parent=NULL, // NULL means system_task I64 stack_size=0, // 0=default I64 flags=1 << JOBf_ADD_TO_QUE) {//Create task on core running at address. @@ -274,7 +274,7 @@ CTask *Spawn(U0 (*fp_start_addr)(U8 *data), U8 *data=NULL, U8 *task_name=NULL, if (target_cpu >= 0) return SpawnQueue(fp_start_addr, data, task_name, target_cpu, parent, stack_size, flags); - task = CAlloc(sizeof(CTask), zenith_task->code_heap); + task = CAlloc(sizeof(CTask), sys_task->code_heap); task->task_signature = TASK_SIGNATURE_VAL; if (!task_name) task_name = "Unnamed Task"; diff --git a/src/Kernel/Kernel.PRJ b/src/Kernel/Kernel.PRJ index e055ef70..ca0ee07b 100755 --- a/src/Kernel/Kernel.PRJ +++ b/src/Kernel/Kernel.PRJ @@ -1,5 +1,5 @@ //Compile this by calling $LK,"BootHDIns",A="MN:BootHDIns"$(). -//Don't do it directly. See $LK,"Comp(\"/Kernel/Kernel\")",A="FF:::/Zenith/Boot/BootHDIns.CC,Comp(\"/Kernel/Kernel\""$. +//Don't do it directly. See $LK,"Comp(\"/Kernel/Kernel\")",A="FF:::/System/Boot/BootHDIns.CC,Comp(\"/Kernel/Kernel\""$. #exe { Cd(__DIR__);; diff --git a/src/Kernel/KernelA.HH b/src/Kernel/KernelA.HH index 98ca2fb3..faeb0b88 100755 --- a/src/Kernel/KernelA.HH +++ b/src/Kernel/KernelA.HH @@ -1,4 +1,4 @@ -// Main ZenithOS header +// Main ZealOS header #help_index "" extern class CAOT; @@ -293,7 +293,7 @@ public class CMathODE h, h_min, h_max; //This is not precise, just a ballpark. - //ZenithOS CMathODE's are for video games + //ZealOS CMathODE's are for video games //not science. It bails if it takes //too long. F64 min_tolerance, max_tolerance; @@ -447,7 +447,7 @@ class CMemE820 #define LDF_JUST_LOAD 2 #define LDF_SILENT 4 -#define BIN_SIGNATURE_VAL 'ZCCB' //Zenith CosmiC Binary +#define BIN_SIGNATURE_VAL 'ZCCB' //Zeal CosmiC Binary class CBinFile {//$LK,"Bin File Header Generation",A="FF:::/Compiler/CMain.CC,16 ALIGN"$ by compiler. U16 jmp; @@ -577,7 +577,7 @@ class CKernel #define RLf_PATCHED 3 #define RLf_16MEG_SYS_CODE_BP 4 #define RLf_64BIT 5 -#define RLf_16MEG_ZENITH_HEAP_CTRL 6 +#define RLf_16MEG_ZEAL_HEAP_CTRL 6 #define RLf_FULL_HEAPS 7 #define RLf_RAW 8 #define RLf_INTERRUPTS 9 @@ -589,8 +589,8 @@ class CKernel #define RLf_REGISTRY 15 #define RLf_HOME 16 #define RLf_AUTOCOMPLETE 17 -#define RLf_ZENITH_SERVER 18 -#define RLf_ONCE_ZENITH 19 +#define RLf_ZEAL_SERVER 18 +#define RLf_ONCE_ZEAL 19 #define RLf_ONCE_USER 20 #define RLF_16BIT (1 << RLf_16BIT) @@ -599,7 +599,7 @@ class CKernel #define RLF_PATCHED (1 << RLf_PATCHED) #define RLF_16MEG_SYS_CODE_BP (1 << RLf_16MEG_SYS_CODE_BP) #define RLF_64BIT (1 << RLf_64BIT) -#define RLF_16MEG_ZENITH_HEAP_CTRL (1 << RLf_16MEG_ZENITH_HEAP_CTRL) +#define RLF_16MEG_ZEAL_HEAP_CTRL (1 << RLf_16MEG_ZEAL_HEAP_CTRL) #define RLF_FULL_HEAPS (1 << RLf_FULL_HEAPS) #define RLF_RAW (1 << RLf_RAW) #define RLF_INTERRUPTS (1 << RLf_INTERRUPTS) @@ -611,8 +611,8 @@ class CKernel #define RLF_REGISTRY (1 << RLf_REGISTRY) #define RLF_HOME (1 << RLf_HOME) #define RLF_AUTOCOMPLETE (1 << RLf_AUTOCOMPLETE) -#define RLF_ZENITH_SERVER (1 << RLf_ZENITH_SERVER) -#define RLF_ONCE_ZENITH (1 << RLf_ONCE_ZENITH) +#define RLF_ZEAL_SERVER (1 << RLf_ZEAL_SERVER) +#define RLF_ONCE_ZEAL (1 << RLf_ONCE_ZEAL) #define RLF_ONCE_USER (1 << RLf_ONCE_USER) #help_index "Processor" @@ -1636,8 +1636,8 @@ public class CAutoCompleteGlobals }; #help_index "AutoComplete/Dictionary" -#define ACD_WORD_FILENAME "/Zenith/AutoComplete/ACWords.DATA" -#define ACD_DEF_FILENAME "/Zenith/AutoComplete/ACDefs.DATA" +#define ACD_WORD_FILENAME "/System/AutoComplete/ACWords.DATA" +#define ACD_DEF_FILENAME "/System/AutoComplete/ACDefs.DATA" #define ACD_H1 0 #define ACD_H1_END 1 @@ -3501,7 +3501,7 @@ class CMemRange //We add 2 pags, so a request is not rounded-up to next power of two. #define MEM_EXTRA_HASH2_PAGS 2 -#define MEM_ZENITH_STACK (MEM_PAG_SIZE*512) //Like 16384*MEM_PAG_SIZE +#define MEM_ZEAL_STACK (MEM_PAG_SIZE*512) //Like 16384*MEM_PAG_SIZE #define MEM_SETH_STACK (MEM_PAG_SIZE*512) #define MEM_INTERRUPT_STACK (MEM_PAG_SIZE*512) #define MEM_DEFAULT_STACK (MEM_PAG_SIZE*512) @@ -4083,9 +4083,9 @@ public class CSysFixedArea { CFPU init_fpu_mmx; CCPU boot_cpu; - CTask zenith; + CTask zeal; CBlkPool sys_code_bp; - CHeapCtrl zenith_hc; + CHeapCtrl zeal_hc; $$ = ($$ + 0x1000 - 1) & -0x1000; }; @@ -4157,7 +4157,7 @@ public class CSysFixedArea #define SCF_NO_SHIFT (1 << SCf_NO_SHIFT) #define SCF_KEY_DESC (1 << SCf_KEY_DESC) -//ZenithOS places a 1 in bit 7 for +//ZealOS places a 1 in bit 7 for //keys with an E0 prefix. //See $LK,"::/Doc/CharOverview.DD"$ and $LK,"KbdHandler",A="MN:KbdHandler"$(). #define SC_ESC 0x01 diff --git a/src/Kernel/KernelC.HH b/src/Kernel/KernelC.HH index d8d3feb5..f8d80ca5 100755 --- a/src/Kernel/KernelC.HH +++ b/src/Kernel/KernelC.HH @@ -86,7 +86,7 @@ public extern Bool WildMatch(U8 *test_str, U8 *wild_str); #help_index "Char/Operations;Memory" public extern U8 *CatPrint(U8 *dst, U8 *format, ...); -#help_index "Char/Operations;Memory/Zenith Heap" +#help_index "Char/Operations;Memory/System Heap" public extern U8 *ZStrNew(U8 *buf); #help_index "Char/Operations;Memory/Heap" @@ -436,9 +436,9 @@ public extern U0 Format(U8 drv_let, Bool quick=TRUE, Bool confirm=TRUE, I64 type public extern I64 Scale2Mem(I64 min, I64 max, I64 limit=2*1024*1024*1024); #help_index "Job/Exe;Task/Job/Exe" -public extern U0 ZenithErr( U8 *format, ...); -public extern U0 ZenithWarn(U8 *format, ...); -public extern U0 ZenithLog( U8 *format, ...); +public extern U0 SysErr( U8 *format, ...); +public extern U0 SysWarn(U8 *format, ...); +public extern U0 SysLog( U8 *format, ...); public extern I64 ExeCmdLine(CCompCtrl *cc); public extern U0 JobDel(CJob *tmpc); public extern I64 JobsHandler(I64 run_flags, CTask *task=NULL); @@ -449,7 +449,7 @@ public extern U0 TaskResetAwaitingMessage(CTask *task=NULL); public extern U0 UserTaskCont(); #help_index "Job/Exe;Task/Job/Exe;Compiler" -public extern I64 Zenith(U8 *format, ...); +public extern I64 Sys(U8 *format, ...); public extern I64 PopUp(U8 *buf, CTask *parent=NULL, CTask **_pu_task=NULL); public extern I64 PopUpPrint(U8 *format, ...); @@ -534,7 +534,7 @@ public extern I64 Seed(I64 seed=0, CTask *task=NULL); #help_index "Memory/Info" public extern I64 MemBIOSTotal(); -#help_index "Memory/Zenith Heap" +#help_index "Memory/System Heap" public extern U8 *ZCAlloc(I64 size); public extern U8 *ZMAlloc(I64 size); public extern U8 *ZMAllocIdent(U8 *src); @@ -604,7 +604,7 @@ public extern U0 MPInt(U8 num, I64 cpu_num=1); public extern U0 MPIntAll(U8 num); public extern U0 MPNMInt(); extern CTask *SpawnQueue(U0 (*fp_addr)(U8 *data), U8 *data=NULL, U8 *task_name=NULL, I64 target_cpu, - CTask *parent=NULL, //NULL means zenith + CTask *parent=NULL, //NULL means zeal I64 stack_size=0, I64 flags=1<hc_signature = HEAP_CTRL_SIGNATURE_VAL; diff --git a/src/Kernel/Memory/MAllocFree.CC b/src/Kernel/Memory/MAllocFree.CC index 5e4f1d6c..87e9466a 100755 --- a/src/Kernel/Memory/MAllocFree.CC +++ b/src/Kernel/Memory/MAllocFree.CC @@ -392,8 +392,8 @@ _extern _MALLOC U8 *MAlloc(I64 size, CTask *mem_task=NULL); //Alloc memory ch //Accepts a $LK,"CTask",A="MN:CTask"$ or $LK,"CHeapCtrl",A="MN:CHeapCtrl"$. NULL allocs off current task's heap. U8 *ZMAlloc(I64 size) -{//Alloc memory in Zenith's heap. - return MAlloc(size, zenith_task); +{//Alloc memory in System task's heap. + return MAlloc(size, sys_task); } U8 *CAlloc(I64 size, CTask *mem_task=NULL) @@ -406,8 +406,8 @@ U8 *CAlloc(I64 size, CTask *mem_task=NULL) } U8 *ZCAlloc(I64 size) -{//Alloc and set to zero memory in Zenith's heap. - return CAlloc(size, zenith_task); +{//Alloc and set to zero memory in System task's heap. + return CAlloc(size, sys_task); } U8 *MAllocIdent(U8 *src, CTask *mem_task=NULL) @@ -425,8 +425,8 @@ U8 *MAllocIdent(U8 *src, CTask *mem_task=NULL) } U8 *ZMAllocIdent(U8 *src) -{//Alloc in Zenith's heap, ident copy of heap node. - return MAllocIdent(src, zenith_task); +{//Alloc in System task's heap, ident copy of heap node. + return MAllocIdent(src, sys_task); } U8 *MAllocAligned(I64 size, I64 alignment, CTask *mem_task=NULL, I64 misalignment=0) @@ -477,8 +477,8 @@ U8 *ReAlloc(U8 *ptr, U64 new_size, CTask *mem_task=NULL) } U8 *ZReAlloc(U8 *ptr, I64 new_size) -{//Realloc in Zenith's heap. - return ReAlloc(ptr, new_size, zenith_task); +{//Realloc in System task's heap. + return ReAlloc(ptr, new_size, sys_task); } U8 *StrNew(U8 *buf, CTask *mem_task=NULL) @@ -501,6 +501,6 @@ U8 *StrNew(U8 *buf, CTask *mem_task=NULL) } U8 *ZStrNew(U8 *buf) -{//Alloc copy of string in Zenith's heap. - return StrNew(buf, zenith_task); +{//Alloc copy of string in System task's heap. + return StrNew(buf, sys_task); } diff --git a/src/Kernel/MultiProc.CC b/src/Kernel/MultiProc.CC index cfbffb8f..365aacbb 100755 --- a/src/Kernel/MultiProc.CC +++ b/src/Kernel/MultiProc.CC @@ -1,7 +1,7 @@ asm { ALIGN 16, OC_NOP USE16 -//See $LK,"ZenithOS MultiCore",A="FI:::/Doc/MultiCore.DD"$. +//See $LK,"ZealOS MultiCore",A="FI:::/Doc/MultiCore.DD"$. //This code gets copied to $LK,"MP_VECT_ADDR",A="MN:MP_VECT_ADDR"$. //See $LK,"MemCopy(MP_VECT_ADDR",A="FF:::/Kernel/MultiProc.CC,MemCopy(mp:2"$. @@ -115,13 +115,13 @@ CTSS *TSSNew(I64 cpu_num) } CCPU *CPUStructInit(I64 num, CCPU *c, CTask *seth_task) -{//Seth is null when called by zenith on CSysFixedArea.boot_cpu0 +{//Seth is null when called by system_task on CSysFixedArea.boot_cpu0 MemSet(c, 0, sizeof(CCPU)); c->addr = c; c->num = num; c->idle_factor = 0.01; QueueInit(&c->next_dying); - if (Bt(&sys_run_level, RLf_16MEG_ZENITH_HEAP_CTRL)) + if (Bt(&sys_run_level, RLf_16MEG_ZEAL_HEAP_CTRL)) { c->idle_task = Spawn(0, NULL, "Idle Task",, Fs,, 0); LBts(&c->idle_task->task_flags, TASKf_IDLE); @@ -174,7 +174,7 @@ U0 MPHalt() } U0 MPAPICInit() -{//Called by zenith during start-up +{//Called by system_task during start-up //and other cores during initialization //after $LK,"Core0StartMP",A="MN:Core0StartMP"$(). *(dev.uncached_alias + LAPIC_SVR)(U32 *) |= LAPICF_APIC_ENABLED; @@ -258,7 +258,7 @@ CJob *JobQueue(I64 (*fp_addr)(U8 *data), U8 *data=NULL, I64 target_cpu=1, I64 fl } CTask *SpawnQueue(U0 (*fp_addr)(U8 *data), U8 *data=NULL, U8 *task_name=NULL, - I64 target_cpu, CTask *parent=NULL, //NULL means zenith + I64 target_cpu, CTask *parent=NULL, //NULL means system_task I64 stack_size=0, I64 flags=1 << JOBf_ADD_TO_QUE) { CTask *res; @@ -296,7 +296,7 @@ U0 CoreAPSethInit() } U0 Core0StartMP() -{//Called by zenith during $LK,"start-up",A="FF:::/Kernel/KMain.CC,Core0StartMP"$. +{//Called by system_task during $LK,"start-up",A="FF:::/Kernel/KMain.CC,Core0StartMP"$. CTask *task; U8 buf[STR_LEN]; CAP16BitInit *mp = MP_VECT_ADDR; @@ -349,7 +349,7 @@ U0 Core0StartMP() StrPrint(buf, "Seth Task CPU%02X", i); task = Spawn(&CoreAPSethInit, NULL, buf,,, MEM_SETH_STACK, 0); task->rflags = RFLAGG_START; -//$LK,"CTask",A="MN:CTask"$ alloced off this core's seth_task's heap (Which is Zenith) +//$LK,"CTask",A="MN:CTask"$ alloced off this core's seth_task's heap (Which is System task) CPUStructInit(i, &cpu_structs[i], task); WBINVD //Not sure why this is needed. Might just need delay. } @@ -364,15 +364,15 @@ U0 Core0StartMP() } U0 Core0Init() -{//Called by zenith during start-up +{//Called by system_task during start-up mp_count_initial = mp_count = 1; mp_count_lock = 0; debug.mp_crash = ZCAlloc(sizeof(CMPCrash)); //Must be in code heap because init code uses 32 bit addr of cpu_struct - zenith_task->gs = cpu_structs = CAlloc(sizeof(CCPU) * MP_PROCESSORS_NUM, Fs->code_heap); - CPUStructInit(0, cpu_structs, zenith_task); + sys_task->gs = cpu_structs = CAlloc(sizeof(CCPU) * MP_PROCESSORS_NUM, Fs->code_heap); + CPUStructInit(0, cpu_structs, sys_task); //RAX has GS IMPORT SET_GS_BASE; CALL SET_GS_BASE diff --git a/src/Kernel/Sched.CC b/src/Kernel/Sched.CC index 24e16e1b..2f4bbb94 100755 --- a/src/Kernel/Sched.CC +++ b/src/Kernel/Sched.CC @@ -41,7 +41,7 @@ U0 TaskFocusNext() sys_focus_task = NULL; if (!_task) - _task = zenith_task; + _task = sys_task; task = _task->next_task; do { diff --git a/src/Kernel/StrB.CC b/src/Kernel/StrB.CC index ed0d0e14..3817c4d2 100755 --- a/src/Kernel/StrB.CC +++ b/src/Kernel/StrB.CC @@ -148,7 +148,7 @@ U0 FlagsScan(U8 *_dst_flags, U8 *list, U8 *src) {/*More than 64 flags. Flags passed by ref. Examples: -$LK,"FlagsScan",A="FF:::/Zenith/Utils/Find.CC,FlagsScan:2"$(&fuf_flags,Define("ST_FILE_UTIL_FLAGS"),fu_flags); +$LK,"FlagsScan",A="FF:::/System/Utils/Find.CC,FlagsScan:2"$(&fuf_flags,Define("ST_FILE_UTIL_FLAGS"),fu_flags); I64 flags=0; FlagsScan(&flags,"R\0L\0Dump\0Scan\0","+Dump-R"); //Sets Bit#2, Clears Bit#0. diff --git a/src/MakeHome.CC b/src/MakeHome.CC index 742a91fa..39f77698 100755 --- a/src/MakeHome.CC +++ b/src/MakeHome.CC @@ -3,8 +3,8 @@ Cd(__DIR__);; //If these are not present in /Home, it uses the version in the root dir. You //can make your own, modified, version of these files in your /Home directory. #include "~/HomeLocalize" -#include "/Zenith/Boot/MakeBoot" -#include "/Zenith/Utils/MakeUtils" +#include "/System/Boot/MakeBoot" +#include "/System/Utils/MakeUtils" #include "~/HomeWrappers" MapFileLoad("::/Kernel/Kernel"); MapFileLoad("::/Compiler/Compiler"); diff --git a/src/Misc/AHCIOSInstall.CC b/src/Misc/AHCIOSInstall.CC index c8b711bf..c29e46bd 100755 --- a/src/Misc/AHCIOSInstall.CC +++ b/src/Misc/AHCIOSInstall.CC @@ -204,7 +204,7 @@ U0 DoInstructions() Bool DoInstall(Bool prompt_reboot) { - I64 res = FALSE, vm_install = TRUE; + I64 res = FALSE, vm_install = TRUE, ch; CSMBIOSSystemInfo *sys_info = SMBIOSStructGet(SMBIOSt_SYSTEM); U8 *company = SMBIOSStr(sys_info, sys_info->manufacturer); @@ -226,8 +226,22 @@ Bool DoInstall(Bool prompt_reboot) "Continue Install Wizard "; if (YorN) { - RegularInstallWiz(); - res = TRUE; + "\n\nUpgrade an existing install, or create new Installation? (U/I): "; + do + ch = ToUpper(CharGet(, FALSE)); + while (ch != 'U' && ch != 'I'); + + if (ch == 'I') + { + RegularInstallWiz(); + res = TRUE; + } + else if (ch == 'U') + { + "\n\n!!! TODO !!! #include \"::/Misc/OSMerge\" and do it manually...\n\n"; + prompt_reboot = FALSE; + res = TRUE; + } } else prompt_reboot = FALSE; diff --git a/src/Misc/DoDistro.CC b/src/Misc/DoDistro.CC index 59160765..7bf22211 100755 --- a/src/Misc/DoDistro.CC +++ b/src/Misc/DoDistro.CC @@ -23,7 +23,7 @@ U0 MakeMyISO(U8 *_out_iso_filename) CopyTree(BOOT_DIR, "/Distro" BOOT_DIR); CopyTree("/Home", "/Distro/Home"); - CopyTree("/Zenith", "/Distro/Zenith"); + CopyTree("/System", "/Distro/System"); CopyTree("/Apps", "/Distro/Apps"); CopyTree("/Compiler", "/Distro/Compiler"); CopyTree("/Demo", "/Distro/Demo"); @@ -32,7 +32,7 @@ U0 MakeMyISO(U8 *_out_iso_filename) CopyTree("/Misc", "/Distro/Misc"); //To save space, optionally delete dictionary. - //Del("/Distro/Zenith/AutoComplete/ACDefs.DATA"); + //Del("/Distro/System/AutoComplete/ACDefs.DATA"); CopyTree("/Downloads", "/Distro/Downloads"); //You can leave this out. DirMake("/Distro/Tmp"); DirMake("/Distro/Tmp/ScreenShots"); diff --git a/src/Misc/OSMerge.CC b/src/Misc/OSMerge.CC index 36428bab..c9f62c35 100755 --- a/src/Misc/OSMerge.CC +++ b/src/Misc/OSMerge.CC @@ -48,7 +48,7 @@ U0 OSFilesMergeInner(CDirEntry *tmpde1, CDirEntry *tmpde2, I64 *_fuf_flags, I64 } U0 OSFilesMerge(U8 *dst_files_find_mask="/*", U8 *src_files_find_mask="/*", U8 *fu_flags=NULL) -{ // See $LK+PU,"Merge",A="FF:::/Zenith/Utils/Merge.CC,public U0 Merge"$. +{ // See $LK+PU,"Merge",A="FF:::/System/Utils/Merge.CC,public U0 Merge"$. I64 df_flags = 0, fuf_flags = 0; CDirEntry *tmpde1 = NULL, *tmpde2 = NULL; diff --git a/src/Misc/OSTestSuite.CC b/src/Misc/OSTestSuite.CC index cc6175e5..bea13e81 100755 --- a/src/Misc/OSTestSuite.CC +++ b/src/Misc/OSTestSuite.CC @@ -16,7 +16,7 @@ U0 TS(U8 *desc) progress4_max = 171; progress4_t0 = ts_t0; *progress4_desc = 0; - RegExe("ZenithOS/OSTestSuite"); + RegExe("ZealOS/OSTestSuite"); } U0 TSFile(U8 *name, I64 mS=750) @@ -1814,7 +1814,7 @@ U0 OSTestSuite() MessagePostWait(task, MESSAGE_KEY_DOWN_UP, CH_SPACE, 0); } TS("ATARep"); XTalkWait(task, "ATARep;\npSleep(750);\n"); - TS("HashDepthRep"); XTalkWait(task, "HashDepthRep(zenith_task->hash_table);Sleep(750);\n"); + TS("HashDepthRep"); XTalkWait(task, "HashDepthRep(sys_task->hash_table);Sleep(750);\n"); TS("Who"); XTalkWait(task, "Who;Sleep(750);\n"); TS("DriveRep"); XTalkWait(task, "DriveRep;Sleep(750);\n"); TS("TaskRep"); XTalkWait(task, "TaskRep;Sleep(750);\n"); @@ -1822,7 +1822,7 @@ U0 OSTestSuite() TS("SysRep"); XTalkWait(task, "SysRep;Sleep(750);\n"); DeathWait(&task, TRUE); - ProgressBarsReset("ZenithOS/OSTestSuite"); + ProgressBarsReset("ZealOS/OSTestSuite"); "Elapsed Time:%5.3f\n", tS - ts_t0; } diff --git a/src/Misc/PCIDevices.DD b/src/Misc/PCIDevices.DD index 445b4c1a..9a37fc30 100755 --- a/src/Misc/PCIDevices.DD +++ b/src/Misc/PCIDevices.DD @@ -4472,7 +4472,7 @@ 1603 USB\Vid_04d9&Pid_160&Rev_0310 atm 1129 Firmworks 112A Hermes Electronics Co. Ltd. -112C Zenith Data Systems +112C Zeal Data Systems 112D Ravicad 8086 2200 pci simple controller 112E Infomedia @@ -7373,7 +7373,7 @@ 15F6 Extreme Packet Device Inc 15F7 Banctec 15F8 Koga Electronics Co -15F9 Zenith Electronics Co +15F9 Zeal Electronics Co 15FA Axzam Corporation 15FB Zilog Inc. 15FC Techsan Electronics Co Ltd diff --git a/src/Misc/Tour/Tour.IN b/src/Misc/Tour/Tour.IN index e699879a..12050b7e 100755 --- a/src/Misc/Tour/Tour.IN +++ b/src/Misc/Tour/Tour.IN @@ -83,7 +83,7 @@ public I64 PopUpTourPart() I64 i; CDoc *doc = DocNew; - DocPrint(doc, "$$PURPLE$$ZenithOS Tours$$FG$$\n\n" + DocPrint(doc, "$$PURPLE$$ZealOS Tours$$FG$$\n\n" "$$CM+LX,4,4$$$$BT,\"Part 1: The help system\",LE=1$$" "$$CM+LX,4,4$$$$BT,\"Part 2: The basics\",LE=2$$" "$$CM+LX,4,4$$$$BT,\"Part 3: Editing and running programs\",LE=3$$" @@ -91,7 +91,7 @@ public I64 PopUpTourPart() "$$CM+LX,4,4$$$$BT,\"Part 5: Choose filename, choose dir\",LE=5$$" "$$CM+LX,4,4$$$$BT,\"Part 6: AutoComplete\",LE=6$$" "$$CM+LX,4,4$$$$BT,\"Part 7: Search (Find)\",LE=7$$" - "$$CM+LX,4,4$$$$BT,\"Part 8: ZenithOS file masks\",LE=8$$" + "$$CM+LX,4,4$$$$BT,\"Part 8: ZealOS file masks\",LE=8$$" "$$CM+LX,4,4$$$$BT,\"Part 9: Editor filter\",LE=9$$" "$$CM+LX,4,4$$$$BT,\"Part 10: Debugging\",LE=10$$" "$$CM+LX,4,4$$$$BT,\"Part 11: Wow!!\",LE=11$$" diff --git a/src/Misc/Tour/Tour3.IN b/src/Misc/Tour/Tour3.IN index 5ba5d096..55a7806e 100755 --- a/src/Misc/Tour/Tour3.IN +++ b/src/Misc/Tour/Tour3.IN @@ -28,7 +28,7 @@ Message(MESSAGE_KEY_DOWN_UP, 0, SC_CURSOR_UP | SCF_CTRL); Sleep(1000); Message(MESSAGE_KEY_DOWN_UP, 0, SC_CURSOR_DOWN | SCF_CTRL); TourPut( "This is a first-person-shooter.\n\n" - "There is no \"$$GREEN$$main()$$FG$$\" function in ZenithOS " + "There is no \"$$GREEN$$main()$$FG$$\" function in ZealOS " "programs. Any program statements outside " "functions get executed when you $$GREEN$$#include$$FG$$ " "them at the command line.\n\n" diff --git a/src/Misc/Tour/Tour8.IN b/src/Misc/Tour/Tour8.IN index ae267f5a..453775c4 100755 --- a/src/Misc/Tour/Tour8.IN +++ b/src/Misc/Tour/Tour8.IN @@ -1,6 +1,6 @@ "FF(\"/Kernel/*\");"; TourPut( "Let's list files in the $$GREEN$$/Kernel$$FG$$ and sub directories.\n\n" - "ZenithOS masks have one base directory and multiple filename masks.\n\n" + "ZealOS masks have one base directory and multiple filename masks.\n\n" "Press $$GREEN$$$$FG$$.\n"); InGetStr("\n"); diff --git a/src/Misc/Tour/TourC.IN b/src/Misc/Tour/TourC.IN index 075c0a68..4a133a2c 100755 --- a/src/Misc/Tour/TourC.IN +++ b/src/Misc/Tour/TourC.IN @@ -1,4 +1,4 @@ -TourPut( "We will now run a test-suite that automatically executes most ZenithOS " +TourPut( "We will now run a test-suite that automatically executes most ZealOS " "demos. It takes a few minutes, so kick-back.\n\n" "Press $$GREEN$$$$FG$$.\n"); diff --git a/src/PersonalMenu.DD b/src/PersonalMenu.DD index bd757d76..82f34c7a 100755 Binary files a/src/PersonalMenu.DD and b/src/PersonalMenu.DD differ diff --git a/src/StartOS.CC b/src/StartOS.CC index 5b87749d..e0a24b9d 100755 --- a/src/StartOS.CC +++ b/src/StartOS.CC @@ -1,5 +1,5 @@ -//This is executed by the Zenith task at boot. -//See $LK,"Zenith Start-up",A="FF:::/Kernel/KMain.CC,\"StartOS"$. +//This is executed by the System task at boot. +//See $LK,"System Start-up",A="FF:::/Kernel/KMain.CC,\"StartOS"$. #help_index "Compiler/Directive" public extern I8i Option(I64i num, I8i val); @@ -13,9 +13,9 @@ Option(0,0); //(0,0)=EchoOff (0,1)=EchoOn Option(OPTf_WARN_PAREN, ON); Option(OPTf_WARN_DUP_TYPES, ON); -HashTablePurge(zenith_task->hash_table); +HashTablePurge(sys_task->hash_table); -#include "/Zenith/MakeZenith" +#include "/System/MakeSystem" //Debug("Type 'G;'"); DocTermNew; @@ -40,4 +40,4 @@ LBts(&sys_run_level, RLf_HOME); #help_index "" #include "~/MakeHome" -//After this file, the Zenith task enters $LK,"server mode",A="HI:Job"$. +//After this file, the System task enters $LK,"server mode",A="HI:Job"$. diff --git a/src/Zenith/AutoComplete/ACDefs.DATA b/src/System/AutoComplete/ACDefs.DATA similarity index 100% rename from src/Zenith/AutoComplete/ACDefs.DATA rename to src/System/AutoComplete/ACDefs.DATA diff --git a/src/Zenith/AutoComplete/ACDictGen.CC b/src/System/AutoComplete/ACDictGen.CC similarity index 100% rename from src/Zenith/AutoComplete/ACDictGen.CC rename to src/System/AutoComplete/ACDictGen.CC diff --git a/src/Zenith/AutoComplete/ACFill.CC b/src/System/AutoComplete/ACFill.CC similarity index 100% rename from src/Zenith/AutoComplete/ACFill.CC rename to src/System/AutoComplete/ACFill.CC diff --git a/src/Zenith/AutoComplete/ACInit.CC b/src/System/AutoComplete/ACInit.CC similarity index 98% rename from src/Zenith/AutoComplete/ACInit.CC rename to src/System/AutoComplete/ACInit.CC index 44d4b6f5..4a2d7a59 100755 --- a/src/Zenith/AutoComplete/ACInit.CC +++ b/src/System/AutoComplete/ACInit.CC @@ -140,7 +140,7 @@ public U0 ACInit(U8 *mask=NULL) Yield; HashTableDel(ac.hash_table); - ac.hash_table = HashTableNew(2048, zenith_task); + ac.hash_table = HashTableNew(2048, sys_task); ac.num_words = 0; Free(ac.cur_word); diff --git a/src/Zenith/AutoComplete/ACTask.CC b/src/System/AutoComplete/ACTask.CC similarity index 100% rename from src/Zenith/AutoComplete/ACTask.CC rename to src/System/AutoComplete/ACTask.CC diff --git a/src/Zenith/AutoComplete/ACWords.DATA b/src/System/AutoComplete/ACWords.DATA similarity index 100% rename from src/Zenith/AutoComplete/ACWords.DATA rename to src/System/AutoComplete/ACWords.DATA diff --git a/src/Zenith/AutoComplete/MakeAC.CC b/src/System/AutoComplete/MakeAC.CC similarity index 100% rename from src/Zenith/AutoComplete/MakeAC.CC rename to src/System/AutoComplete/MakeAC.CC diff --git a/src/Zenith/Boot/BootDVD.CC b/src/System/Boot/BootDVD.CC similarity index 97% rename from src/Zenith/Boot/BootDVD.CC rename to src/System/Boot/BootDVD.CC index 8882a9ea..47fb3af6 100755 --- a/src/Zenith/Boot/BootDVD.CC +++ b/src/System/Boot/BootDVD.CC @@ -44,9 +44,9 @@ BDVD_DAP: DU8 16, 0, 1, 0; //One blk at a time BDVD_DAP_BUF: DU16 0, 0; BDVD_DAP_BLK: DU64 0; -BDVD_TEMPLEOS_MESSAGE: DU8 "Loading ZenithOS", 0; +BDVD_TEMPLEOS_MESSAGE: DU8 "Loading ZealOS", 0; -BDVD_NOT64_MESSAGE: DU8 "ZenithOS requires a 64-bit capable processor.\n\r", 0; +BDVD_NOT64_MESSAGE: DU8 "ZealOS requires a 64-bit capable processor.\n\r", 0; //These get patched. BDVD_BLK_LO:: DU16 0; diff --git a/src/Zenith/Boot/BootDVDIns.CC b/src/System/Boot/BootDVDIns.CC similarity index 100% rename from src/Zenith/Boot/BootDVDIns.CC rename to src/System/Boot/BootDVDIns.CC diff --git a/src/Zenith/Boot/BootHD.CC b/src/System/Boot/BootHD.CC similarity index 100% rename from src/Zenith/Boot/BootHD.CC rename to src/System/Boot/BootHD.CC diff --git a/src/Zenith/Boot/BootHDIns.CC b/src/System/Boot/BootHDIns.CC similarity index 100% rename from src/Zenith/Boot/BootHDIns.CC rename to src/System/Boot/BootHDIns.CC diff --git a/src/Zenith/Boot/BootMHD.CC b/src/System/Boot/BootMHD.CC similarity index 97% rename from src/Zenith/Boot/BootMHD.CC rename to src/System/Boot/BootMHD.CC index e5247a9f..57ee6e3b 100755 --- a/src/Zenith/Boot/BootMHD.CC +++ b/src/System/Boot/BootMHD.CC @@ -99,7 +99,7 @@ BMHD_HISTART: //My assembler doesn't support 16-bit very well. DU8 0xEA; //JMP BOOT_RAM_BASE:0000 DU16 0, BOOT_RAM_BASE / 16; -//Continues here $LK,"BMHD2_START",A="FF:::/Zenith/Boot/BootMHD2.CC,BMHD2_START"$ +//Continues here $LK,"BMHD2_START",A="FF:::/System/Boot/BootMHD2.CC,BMHD2_START"$ BMHD_END:: #assert BMHD_END-BMHD_START <= 440 } diff --git a/src/Zenith/Boot/BootMHD2.CC b/src/System/Boot/BootMHD2.CC similarity index 97% rename from src/Zenith/Boot/BootMHD2.CC rename to src/System/Boot/BootMHD2.CC index dfc95a0a..70aa6f12 100755 --- a/src/Zenith/Boot/BootMHD2.CC +++ b/src/System/Boot/BootMHD2.CC @@ -116,6 +116,6 @@ BMHD2_HISTART: BMHD2_OLD_CS_RIP: DU16 0, 0; BMHD2_END:: -//Continues here $LK,"::/Zenith/Boot/BootHD.CC",A="FF:::/Zenith/Boot/BootHD.CC,START"$ +//Continues here $LK,"::/System/Boot/BootHD.CC",A="FF:::/System/Boot/BootHD.CC,START"$ #assert BMHD2_END - BMHD2_START < MODULE_SIZE } diff --git a/src/Zenith/Boot/BootMHDIns.CC b/src/System/Boot/BootMHDIns.CC similarity index 96% rename from src/Zenith/Boot/BootMHDIns.CC rename to src/System/Boot/BootMHDIns.CC index b352334b..3528056f 100755 --- a/src/Zenith/Boot/BootMHDIns.CC +++ b/src/System/Boot/BootMHDIns.CC @@ -61,9 +61,9 @@ public U0 BootMHDZero(U8 dst_drive) {//Set MBR of disk with dst partition to zero. //This is dangerous!! - //The ZenithOS partitioner doesn't play well + //The ZealOS partitioner doesn't play well //with other operating systems at this time and you need - //to do this on a drive partitioned by ZenithOS + //to do this on a drive partitioned by ZealOS //if you wish to partition with another operating system. CBlkDev *bd = Letter2BlkDev(dst_drive); CMasterBoot mbr; @@ -117,7 +117,7 @@ public Bool BootMHDIns(U8 drv_let, U8 *drv_list=NULL) _q = BMHD2_BLK_ARRAY; MemSet(_q, 0, sizeof(I64) * 8); menu_ptr = BMHD2_BOOT_MESSAGE; - StrPrint(menu_ptr, "\n\r\n\rZenithOS Boot Loader\n\r\n\r"); + StrPrint(menu_ptr, "\n\r\n\rZealOS Boot Loader\n\r\n\r"); j = 0; if (FileFind(BOOT_DIR_OLDMBR_BIN_C, &de, FUF_JUST_FILES)) diff --git a/src/Zenith/Boot/BootRAM.CC b/src/System/Boot/BootRAM.CC similarity index 100% rename from src/Zenith/Boot/BootRAM.CC rename to src/System/Boot/BootRAM.CC diff --git a/src/Zenith/Boot/DiskISORedSea.CC b/src/System/Boot/DiskISORedSea.CC similarity index 98% rename from src/Zenith/Boot/DiskISORedSea.CC rename to src/System/Boot/DiskISORedSea.CC index e657a2dd..150baf9b 100755 --- a/src/Zenith/Boot/DiskISORedSea.CC +++ b/src/System/Boot/DiskISORedSea.CC @@ -76,7 +76,7 @@ U0 RedSeaISO9660(U8 *iso_filename, U8 drv_let) FillU32Palindrome(&iso_pri->vol_space_size, iso_size); FillU32Palindrome(&iso_pri->root_dir_record, drive->root_clus); iso_pri->file_structure_version = 1; - StrCopy(iso_pri->publisher_id, "ZenithOS RedSea"); + StrCopy(iso_pri->publisher_id, "ZealOS RedSea"); MemCopy(iso_sup, iso_pri, DVD_BLK_SIZE); iso_sup->type = ISOT_SUPPLEMENTARY_DESC; @@ -99,7 +99,7 @@ U0 RedSeaISO9660(U8 *iso_filename, U8 drv_let) FBlkWrite(out_file, iso_term, 19 << 2, 4); et->w[0] = 1; - StrCopy(&et->w[2], "ZenithOS"); + StrCopy(&et->w[2], "ZealOS"); et->w[15] = 0xAA55; j = 0; diff --git a/src/Zenith/Boot/MakeBoot.CC b/src/System/Boot/MakeBoot.CC similarity index 100% rename from src/Zenith/Boot/MakeBoot.CC rename to src/System/Boot/MakeBoot.CC diff --git a/src/Zenith/Ctrls/CtrlsA.CC b/src/System/Ctrls/CtrlsA.CC similarity index 100% rename from src/Zenith/Ctrls/CtrlsA.CC rename to src/System/Ctrls/CtrlsA.CC diff --git a/src/Zenith/Ctrls/CtrlsBttn.CC b/src/System/Ctrls/CtrlsBttn.CC similarity index 100% rename from src/Zenith/Ctrls/CtrlsBttn.CC rename to src/System/Ctrls/CtrlsBttn.CC diff --git a/src/Zenith/Ctrls/CtrlsSlider.CC b/src/System/Ctrls/CtrlsSlider.CC similarity index 100% rename from src/Zenith/Ctrls/CtrlsSlider.CC rename to src/System/Ctrls/CtrlsSlider.CC diff --git a/src/Zenith/Ctrls/MakeCtrls.CC b/src/System/Ctrls/MakeCtrls.CC similarity index 100% rename from src/Zenith/Ctrls/MakeCtrls.CC rename to src/System/Ctrls/MakeCtrls.CC diff --git a/src/Zenith/DevInfo.CC b/src/System/DevInfo.CC similarity index 100% rename from src/Zenith/DevInfo.CC rename to src/System/DevInfo.CC diff --git a/src/Zenith/DolDoc/DocBin.CC b/src/System/DolDoc/DocBin.CC similarity index 100% rename from src/Zenith/DolDoc/DocBin.CC rename to src/System/DolDoc/DocBin.CC diff --git a/src/Zenith/DolDoc/DocChar.CC b/src/System/DolDoc/DocChar.CC similarity index 99% rename from src/Zenith/DolDoc/DocChar.CC rename to src/System/DolDoc/DocChar.CC index f78ac16c..309b5bb4 100755 --- a/src/Zenith/DolDoc/DocChar.CC +++ b/src/System/DolDoc/DocChar.CC @@ -712,7 +712,7 @@ ic_form_tab: MemCopy(st, doc_ce->tag, doc_ce->max_col + 1); Free(doc_ce->tag); doc_ce->tag = st; - doc_ce->len = MSize(st) - doc_ce->min_col - 2; //See $LK,"DataTagWidth",A="FA:::/Zenith/DolDoc/DocPlain.CC,DataTagWidth"$ + doc_ce->len = MSize(st) - doc_ce->min_col - 2; //See $LK,"DataTagWidth",A="FA:::/System/DolDoc/DocPlain.CC,DataTagWidth"$ Free(doc_ce->data); doc_ce->data = MAlloc(doc_ce->len + 2, doc->mem_task); } diff --git a/src/Zenith/DolDoc/DocClipBoard.CC b/src/System/DolDoc/DocClipBoard.CC similarity index 100% rename from src/Zenith/DolDoc/DocClipBoard.CC rename to src/System/DolDoc/DocClipBoard.CC diff --git a/src/Zenith/DolDoc/DocCodeTools.CC b/src/System/DolDoc/DocCodeTools.CC similarity index 100% rename from src/Zenith/DolDoc/DocCodeTools.CC rename to src/System/DolDoc/DocCodeTools.CC diff --git a/src/Zenith/DolDoc/DocDblBuf.CC b/src/System/DolDoc/DocDblBuf.CC similarity index 100% rename from src/Zenith/DolDoc/DocDblBuf.CC rename to src/System/DolDoc/DocDblBuf.CC diff --git a/src/Zenith/DolDoc/DocEd.CC b/src/System/DolDoc/DocEd.CC similarity index 100% rename from src/Zenith/DolDoc/DocEd.CC rename to src/System/DolDoc/DocEd.CC diff --git a/src/Zenith/DolDoc/DocExterns.CC b/src/System/DolDoc/DocExterns.CC similarity index 100% rename from src/Zenith/DolDoc/DocExterns.CC rename to src/System/DolDoc/DocExterns.CC diff --git a/src/Zenith/DolDoc/DocFile.CC b/src/System/DolDoc/DocFile.CC similarity index 100% rename from src/Zenith/DolDoc/DocFile.CC rename to src/System/DolDoc/DocFile.CC diff --git a/src/Zenith/DolDoc/DocFind.CC b/src/System/DolDoc/DocFind.CC similarity index 100% rename from src/Zenith/DolDoc/DocFind.CC rename to src/System/DolDoc/DocFind.CC diff --git a/src/Zenith/DolDoc/DocForm.CC b/src/System/DolDoc/DocForm.CC similarity index 98% rename from src/Zenith/DolDoc/DocForm.CC rename to src/System/DolDoc/DocForm.CC index 7be33403..103e4ead 100755 --- a/src/Zenith/DolDoc/DocForm.CC +++ b/src/System/DolDoc/DocForm.CC @@ -116,7 +116,7 @@ U0 DocDataFormat(CDoc *doc, CDocEntry *doc_e, I64 d=DOCM_CANCEL) else { ptr2 = MAlloc(i + 8, doc->mem_task); - doc_e->len = MSize(ptr2) - doc_e->min_col - 2; //See $LK,"DataTagWidth",A="FA:::/Zenith/DolDoc/DocPlain.CC,DataTagWidth"$ + doc_e->len = MSize(ptr2) - doc_e->min_col - 2; //See $LK,"DataTagWidth",A="FA:::/System/DolDoc/DocPlain.CC,DataTagWidth"$ MemCopy(ptr2, ptr, i + 1); Free(doc_e->tag); doc_e->tag = ptr2; @@ -300,7 +300,7 @@ public Bool DocForm(U8 *_d, U8 *class_name=lastclass, I64 dof_flags=0, U8 *heade doc_e->len = ml->dim.total_count; if (doc_e->de_flags & DOCEF_HAS_TERMINATOR) doc_e->len--; - Free(doc_e->tag); //See $LK,"DataTagWidth",A="FA:::/Zenith/DolDoc/DocPlain.CC,DataTagWidth"$ + Free(doc_e->tag); //See $LK,"DataTagWidth",A="FA:::/System/DolDoc/DocPlain.CC,DataTagWidth"$ doc_e->tag = MAlloc(doc_e->len + doc_e->min_col + 2, doc->mem_task); //+2 because "_\0" } } diff --git a/src/Zenith/DolDoc/DocGet.CC b/src/System/DolDoc/DocGet.CC similarity index 100% rename from src/Zenith/DolDoc/DocGet.CC rename to src/System/DolDoc/DocGet.CC diff --git a/src/Zenith/DolDoc/DocGr.CC b/src/System/DolDoc/DocGr.CC similarity index 98% rename from src/Zenith/DolDoc/DocGr.CC rename to src/System/DolDoc/DocGr.CC index 3e531d37..07b1f729 100755 --- a/src/Zenith/DolDoc/DocGr.CC +++ b/src/System/DolDoc/DocGr.CC @@ -20,7 +20,7 @@ public I64 PopUpColor(U8 *header=NULL, Bool allow_transparent=TRUE, Bool allow_d } public I64 PopUpColorLighting(U8 *header=NULL) -{//Chooser for std ZenithOS $LK,"DCLighting",A="MN:DCLighting"$() color. +{//Chooser for std ZealOS $LK,"DCLighting",A="MN:DCLighting"$() color. I64 i; CDoc *doc = DocNew; diff --git a/src/Zenith/DolDoc/DocHighlight.CC b/src/System/DolDoc/DocHighlight.CC similarity index 99% rename from src/Zenith/DolDoc/DocHighlight.CC rename to src/System/DolDoc/DocHighlight.CC index ba7d2e4a..77bc6a7e 100755 --- a/src/Zenith/DolDoc/DocHighlight.CC +++ b/src/System/DolDoc/DocHighlight.CC @@ -133,7 +133,7 @@ hl_normal: } ch = *src; *src = 0; - if (tmph=HashFind(ptr, zenith_task->hash_table, + if (tmph=HashFind(ptr, sys_task->hash_table, HTT_EXPORT_SYS_SYM | HTT_DEFINE_STR | HTT_GLOBAL_VAR|HTT_CLASS | HTT_INTERNAL_TYPE | HTT_FUN | HTT_KEYWORD | HTT_ASM_KEYWORD | HTT_OPCODE | HTT_REG)) diff --git a/src/Zenith/DolDoc/DocInit.CC b/src/System/DolDoc/DocInit.CC similarity index 100% rename from src/Zenith/DolDoc/DocInit.CC rename to src/System/DolDoc/DocInit.CC diff --git a/src/Zenith/DolDoc/DocLink.CC b/src/System/DolDoc/DocLink.CC similarity index 99% rename from src/Zenith/DolDoc/DocLink.CC rename to src/System/DolDoc/DocLink.CC index d2e901c9..0a8c2402 100755 --- a/src/Zenith/DolDoc/DocLink.CC +++ b/src/System/DolDoc/DocLink.CC @@ -1,6 +1,6 @@ #help_index "DolDoc/Link" -/* See $LK,"ZenithOS Link Types",A="MN:ST_LINK_TYPES"$. +/* See $LK,"ZealOS Link Types",A="MN:ST_LINK_TYPES"$. "filename" "FI:filename" "FA:haystack_filename,needle_anchor_str" diff --git a/src/Zenith/DolDoc/DocMacro.CC b/src/System/DolDoc/DocMacro.CC similarity index 100% rename from src/Zenith/DolDoc/DocMacro.CC rename to src/System/DolDoc/DocMacro.CC diff --git a/src/Zenith/DolDoc/DocNew.CC b/src/System/DolDoc/DocNew.CC similarity index 99% rename from src/Zenith/DolDoc/DocNew.CC rename to src/System/DolDoc/DocNew.CC index 929d8a45..3623fdd6 100755 --- a/src/Zenith/DolDoc/DocNew.CC +++ b/src/System/DolDoc/DocNew.CC @@ -41,7 +41,7 @@ Bool IsEditableText(CDocEntry *doc_e) } CDocEntry *DocEntryNewBase(CDoc *doc, I64 type, I64 de_flags=0, I64 x=0, I64 y=0, I64 page_line_num=0) -{//See also $LK,"MAllocIdent",A="FF:::/Zenith/DolDoc/DocRecalc.CC,MAllocIdent"$ and $MA-X+PU,"CDocEntry",LM="F(\"sizeof(CDocEntry)\");View;"$. +{//See also $LK,"MAllocIdent",A="FF:::/System/DolDoc/DocRecalc.CC,MAllocIdent"$ and $MA-X+PU,"CDocEntry",LM="F(\"sizeof(CDocEntry)\");View;"$. CDocEntry *res = CAlloc(sizeof(CDocEntryBase), doc->mem_task); res->type = type; diff --git a/src/Zenith/DolDoc/DocPlain.CC b/src/System/DolDoc/DocPlain.CC similarity index 100% rename from src/Zenith/DolDoc/DocPlain.CC rename to src/System/DolDoc/DocPlain.CC diff --git a/src/Zenith/DolDoc/DocPopUp.CC b/src/System/DolDoc/DocPopUp.CC similarity index 98% rename from src/Zenith/DolDoc/DocPopUp.CC rename to src/System/DolDoc/DocPopUp.CC index b49a6cfe..c5a249ec 100755 --- a/src/Zenith/DolDoc/DocPopUp.CC +++ b/src/System/DolDoc/DocPopUp.CC @@ -302,8 +302,8 @@ public F64 PopUpRangeF64Log(F64 lo, F64 hi, I64 steps, U8 *format="%9.4f", U8 *h } #help_index "Job/Exe;Task/Job/Exe;Compiler" -public I64 ZenithFile(U8 *filename, Bool warn_ext=TRUE) -{//Make zenith_task execute file. +public I64 SysFile(U8 *filename, Bool warn_ext=TRUE) +{//Make sys_task execute file. Bool okay = TRUE; U8 *name = FileNameAbs(filename), *name2 = ExtDefault(name, "CC"); I64 res = 0; @@ -311,7 +311,7 @@ public I64 ZenithFile(U8 *filename, Bool warn_ext=TRUE) if (warn_ext && !FilesFindMatch(name2, FILEMASK_JIT) && !PopUpCancelOk(ST_WARN_ST "Not .CC File\n\n")) okay = FALSE; if (okay) - res = Zenith("#include \"%s\";", name2); + res = Sys("#include \"%s\";", name2); Free(name2); Free(name); diff --git a/src/Zenith/DolDoc/DocPutKey.CC b/src/System/DolDoc/DocPutKey.CC similarity index 99% rename from src/Zenith/DolDoc/DocPutKey.CC rename to src/System/DolDoc/DocPutKey.CC index fa49e5d1..09c0c8f9 100755 --- a/src/Zenith/DolDoc/DocPutKey.CC +++ b/src/System/DolDoc/DocPutKey.CC @@ -327,7 +327,7 @@ public U0 DocPutKey(CDoc *doc, I64 ch=0, I64 sc=0) else { if (sc & SCF_SHIFT) - Ed("::/Doc/AboutZenithOS.DD"); + Ed("::/Doc/AboutZealOS.DD"); else Ed("::/Doc/HelpIndex.DD"); } @@ -400,7 +400,7 @@ public U0 DocPutKey(CDoc *doc, I64 ch=0, I64 sc=0) if (sc & SCF_KEY_DESC) { if (sc & SCF_SHIFT) - KeyDescSet("Cmd /Zenith Include"); + KeyDescSet("Cmd /System Include"); else KeyDescSet("Cmd /Run (Execute)"); } @@ -429,7 +429,7 @@ public U0 DocPutKey(CDoc *doc, I64 ch=0, I64 sc=0) if (st) { if (sc & SCF_SHIFT) - ZenithFile(st); + SysFile(st); else PopUpFile(st); Free(st); diff --git a/src/Zenith/DolDoc/DocPutS.CC b/src/System/DolDoc/DocPutS.CC similarity index 100% rename from src/Zenith/DolDoc/DocPutS.CC rename to src/System/DolDoc/DocPutS.CC diff --git a/src/Zenith/DolDoc/DocRecalc.CC b/src/System/DolDoc/DocRecalc.CC similarity index 100% rename from src/Zenith/DolDoc/DocRecalc.CC rename to src/System/DolDoc/DocRecalc.CC diff --git a/src/Zenith/DolDoc/DocRecalcLib.CC b/src/System/DolDoc/DocRecalcLib.CC similarity index 98% rename from src/Zenith/DolDoc/DocRecalcLib.CC rename to src/System/DolDoc/DocRecalcLib.CC index 03ca486b..be17d2ef 100755 --- a/src/Zenith/DolDoc/DocRecalcLib.CC +++ b/src/System/DolDoc/DocRecalcLib.CC @@ -195,7 +195,7 @@ public I64 DocMax(I64 i=I64_MAX) //Adjusts the size of the cmd line buf. //Normally, the cmd line deletes entries //when more are added and the old scroll up. - //See $LK,"max_entries",A="FF:::/Zenith/DolDoc/DocTerm.CC,max_entries"$. + //See $LK,"max_entries",A="FF:::/System/DolDoc/DocTerm.CC,max_entries"$. I64 res; CDoc *doc; diff --git a/src/Zenith/DolDoc/DocRun.CC b/src/System/DolDoc/DocRun.CC similarity index 100% rename from src/Zenith/DolDoc/DocRun.CC rename to src/System/DolDoc/DocRun.CC diff --git a/src/Zenith/DolDoc/DocTerm.CC b/src/System/DolDoc/DocTerm.CC similarity index 97% rename from src/Zenith/DolDoc/DocTerm.CC rename to src/System/DolDoc/DocTerm.CC index c2a09897..247c731c 100755 --- a/src/Zenith/DolDoc/DocTerm.CC +++ b/src/System/DolDoc/DocTerm.CC @@ -76,7 +76,7 @@ I64 PopUpTermRight(U8 *header) DocPrint(doc, "\n\n" "TXT=%s\nDD =%s\nJIT=%s\nGR =%s" "$$CM+LX,1,3 $$$$BT,\"Include JIT\",LE=RIGHT_INCLUDE$$" - "$$CM+LX,25,0$$$$BT,\"Zenith Include JIT\",LE=RIGHT_AINCLUDE$$" + "$$CM+LX,25,0$$$$BT,\"System Include JIT\",LE=RIGHT_AINCLUDE$$" "$$CM+LX,1,3 $$$$BT,\"Copy \",LE=RIGHT_COPY$$" "$$CM+LX,25,0$$$$BT,\"Move or Rename \",LE=RIGHT_MOVE$$" "$$CM+LX,1,3 $$$$BT,\"Delete \",LE=RIGHT_DELETE$$" @@ -152,9 +152,9 @@ I64 TermRightClickLink(CDoc *doc, CDocEntry *doc_e) break; } } - "Zenith(\"#include \\\"%s\\\"\" );\n$$PT$$$$FG$$$$BG$$", st; + "Sys(\"#include \\\"%s\\\"\" );\n$$PT$$$$FG$$$$BG$$", st; WinZBufUpdate; - ZenithFile(st, FALSE); + SysFile(st, FALSE); res = TRUE; break; diff --git a/src/Zenith/DolDoc/DocTree.CC b/src/System/DolDoc/DocTree.CC similarity index 100% rename from src/Zenith/DolDoc/DocTree.CC rename to src/System/DolDoc/DocTree.CC diff --git a/src/Zenith/DolDoc/DocWidgetWiz.CC b/src/System/DolDoc/DocWidgetWiz.CC similarity index 100% rename from src/Zenith/DolDoc/DocWidgetWiz.CC rename to src/System/DolDoc/DocWidgetWiz.CC diff --git a/src/Zenith/DolDoc/MakeDoc.CC b/src/System/DolDoc/MakeDoc.CC similarity index 95% rename from src/Zenith/DolDoc/MakeDoc.CC rename to src/System/DolDoc/MakeDoc.CC index bec80b64..ad270282 100755 --- a/src/Zenith/DolDoc/MakeDoc.CC +++ b/src/System/DolDoc/MakeDoc.CC @@ -4,7 +4,7 @@ Cd(__DIR__);; #help_file "::/Doc/DolDoc" /* -ZenithOS DolDoc's can have "cursor movement" cmds which can move the cursor up +ZealOS DolDoc's can have "cursor movement" cmds which can move the cursor up the screen and layer on existing text. It can also have callback funs which supply live, changing text. For these reasons, you can't assume you know where the vis portion of the document is and must process much diff --git a/src/Zenith/God/GodBible.CC b/src/System/God/GodBible.CC similarity index 100% rename from src/Zenith/God/GodBible.CC rename to src/System/God/GodBible.CC diff --git a/src/Zenith/God/GodExterns.CC b/src/System/God/GodExterns.CC similarity index 100% rename from src/Zenith/God/GodExterns.CC rename to src/System/God/GodExterns.CC diff --git a/src/Zenith/God/HolySpirit.CC b/src/System/God/HolySpirit.CC similarity index 98% rename from src/Zenith/God/HolySpirit.CC rename to src/System/God/HolySpirit.CC index c6432587..8f7891b6 100755 --- a/src/Zenith/God/HolySpirit.CC +++ b/src/System/God/HolySpirit.CC @@ -88,7 +88,7 @@ public I64 GodBitsRemove(I64 num_bits, U8 *message=NULL) return res; } -I64 GodInit(U8 *files_find_mask="/Zenith/God/Vocab.DD", U8 *fu_flags=NONE) +I64 GodInit(U8 *files_find_mask="/System/God/Vocab.DD", U8 *fu_flags=NONE) {//Read God's vocab file for picking words. I64 i, ch, fuf_flags = 0;; U8 *buf, *ptr, *ptr2; diff --git a/src/Zenith/God/MakeGod.CC b/src/System/God/MakeGod.CC similarity index 100% rename from src/Zenith/God/MakeGod.CC rename to src/System/God/MakeGod.CC diff --git a/src/Zenith/God/Vocab.DD b/src/System/God/Vocab.DD similarity index 100% rename from src/Zenith/God/Vocab.DD rename to src/System/God/Vocab.DD diff --git a/src/Zenith/Gr/Gr.HH b/src/System/Gr/Gr.HH similarity index 97% rename from src/Zenith/Gr/Gr.HH rename to src/System/Gr/Gr.HH index c0ab0845..2d4ef45c 100755 --- a/src/Zenith/Gr/Gr.HH +++ b/src/System/Gr/Gr.HH @@ -152,7 +152,7 @@ public class CSpritePtMeshU8s : CSpriteBase #help_index "Graphics/Sprite;Sprites;Sprites/Binary" -// See $LK,"Sprites",A="HI:Sprites"$. See $LK,"::/Zenith/Gr/GrSpritePlot.CC",A="FL:::/Zenith/Gr/GrSpritePlot.CC,1"$ and +// See $LK,"Sprites",A="HI:Sprites"$. See $LK,"::/System/Gr/GrSpritePlot.CC",A="FL:::/System/Gr/GrSpritePlot.CC,1"$ and // $LK,"::/Demo/Graphics/SpriteRaw.CC"$ for how CSprite are stored. public class CSprite { diff --git a/src/Zenith/Gr/GrAsm.CC b/src/System/Gr/GrAsm.CC similarity index 100% rename from src/Zenith/Gr/GrAsm.CC rename to src/System/Gr/GrAsm.CC diff --git a/src/Zenith/Gr/GrBitMap.CC b/src/System/Gr/GrBitMap.CC similarity index 100% rename from src/Zenith/Gr/GrBitMap.CC rename to src/System/Gr/GrBitMap.CC diff --git a/src/Zenith/Gr/GrComposites.CC b/src/System/Gr/GrComposites.CC similarity index 99% rename from src/Zenith/Gr/GrComposites.CC rename to src/System/Gr/GrComposites.CC index c0dd6939..a67f5285 100755 --- a/src/Zenith/Gr/GrComposites.CC +++ b/src/System/Gr/GrComposites.CC @@ -394,7 +394,7 @@ public U0 DrawWaitMouse(CDC *dc, I64 x, I64 y) #help_index "Graphics/GR Files;Graphics/Screen" public Bool GRScreenCaptureRead(U8 *filename, CDC *dc=gr.dc, I64 x=0, I64 y=0) -{//GrBlot ZenithOS GR File to dc, x, y. +{//GrBlot ZealOS GR File to dc, x, y. CDC *dc2; if (dc2 = GRRead(filename)) @@ -410,7 +410,7 @@ public Bool GRScreenCaptureRead(U8 *filename, CDC *dc=gr.dc, I64 x=0, I64 y=0) } public I64 GRScreenCaptureWrite(U8 *filename, Bool include_zoom=TRUE) -{//Capture screen to a ZenithOS GR File. +{//Capture screen to a ZealOS GR File. I64 size; CDC *dc = DCScreenCapture(include_zoom); diff --git a/src/Zenith/Gr/GrDC.CC b/src/System/Gr/GrDC.CC similarity index 99% rename from src/Zenith/Gr/GrDC.CC rename to src/System/Gr/GrDC.CC index 4189eb7e..f4ff1f58 100755 --- a/src/Zenith/Gr/GrDC.CC +++ b/src/System/Gr/GrDC.CC @@ -96,7 +96,7 @@ public U0 DCLighting(CDC *dc, CD3I32 *p1, CD3I32 *p2, CD3I32 *p3, CColorROPU32 c //gives an illumination number. //65536*65536>>16=65536 - //ZenithOS will generate a random U16 + //ZealOS will generate a random U16 //and compare to dither_probability_u16 and //will pick from two colors. //Probability dithering does not work with thick>1 at this time. @@ -402,7 +402,7 @@ public CDC *DCLoad(U8 *src, I64 *_size=NULL, CTask *task=NULL) #define GR_FILE_MAX (offset(CDC.end) - offset(CDC.start) + COLORS_NUM * sizeof(CBGR48) + GR_WIDTH * GR_HEIGHT) public I64 GRWrite(U8 *filename, CDC *dc, I64 dcsf_flags=NONE) -{//ZenithOS GR File. +{//ZealOS GR File. I64 size; U8 *st = ExtDefault(filename, "GR"), *src = DCSave(dc, &size, dcsf_flags); FileWrite(st, src, size); @@ -413,7 +413,7 @@ public I64 GRWrite(U8 *filename, CDC *dc, I64 dcsf_flags=NONE) } public CDC *GRRead(U8 *filename, CTask *task=NULL) -{//ZenithOS GR File. +{//ZealOS GR File. CDC *dc = NULL; U8 *st = ExtDefault(filename, "GR"), *src = FileRead(st); if (src) diff --git a/src/Zenith/Gr/GrEnd.CC b/src/System/Gr/GrEnd.CC similarity index 100% rename from src/Zenith/Gr/GrEnd.CC rename to src/System/Gr/GrEnd.CC diff --git a/src/Zenith/Gr/GrExterns.CC b/src/System/Gr/GrExterns.CC similarity index 100% rename from src/Zenith/Gr/GrExterns.CC rename to src/System/Gr/GrExterns.CC diff --git a/src/Zenith/Gr/GrGlobals.CC b/src/System/Gr/GrGlobals.CC similarity index 98% rename from src/Zenith/Gr/GrGlobals.CC rename to src/System/Gr/GrGlobals.CC index a3a7641b..279fc09a 100755 --- a/src/Zenith/Gr/GrGlobals.CC +++ b/src/System/Gr/GrGlobals.CC @@ -22,7 +22,7 @@ public class CGrGlobals U0 (*fp_wall_paper)(CTask *task); U0 (*fp_draw_mouse)(CDC *dc, I64 x, I64 y); U0 (*fp_draw_grab_mouse)(CDC *dc, I64 x, I64 y, Bool closed); - U8 *empty_sprite; //Gets assigned $LK,"gr.empty_sprite",A="FF:::/Zenith/ZMouse.CC,empty_sprite"$ + U8 *empty_sprite; //Gets assigned $LK,"gr.empty_sprite",A="FF:::/System/ZMouse.CC,empty_sprite"$ #define GR_PEN_BRUSHES_NUM 64 CDC *pen_brushes [GR_PEN_BRUSHES_NUM], diff --git a/src/Zenith/Gr/GrInitA.CC b/src/System/Gr/GrInitA.CC similarity index 100% rename from src/Zenith/Gr/GrInitA.CC rename to src/System/Gr/GrInitA.CC diff --git a/src/Zenith/Gr/GrInitB.CC b/src/System/Gr/GrInitB.CC similarity index 100% rename from src/Zenith/Gr/GrInitB.CC rename to src/System/Gr/GrInitB.CC diff --git a/src/Zenith/Gr/GrMath.CC b/src/System/Gr/GrMath.CC similarity index 100% rename from src/Zenith/Gr/GrMath.CC rename to src/System/Gr/GrMath.CC diff --git a/src/Zenith/Gr/GrPalette.CC b/src/System/Gr/GrPalette.CC similarity index 92% rename from src/Zenith/Gr/GrPalette.CC rename to src/System/Gr/GrPalette.CC index 1c98f0c5..27bc5f54 100755 --- a/src/Zenith/Gr/GrPalette.CC +++ b/src/System/Gr/GrPalette.CC @@ -104,20 +104,6 @@ public U0 PaletteSetMonokai(Bool persistent=TRUE) fp_set_std_palette = &PaletteSetMonokai; } -//******************************************************************************** -public CBGR24 gr_palette_dark[COLORS_NUM] = { - 0xFFFFFF, 0x6095C5, 0x6D9E3F, 0x3BA275, 0xD370A3, 0xAC7BDE, 0xB58858, 0x686868, - 0x404040, 0x98CBFE, 0xA3D572, 0x75DAA5, 0xFFA7DA, 0xE5B0FF, 0xEFBD8B, 0x232323 -}; - -public U0 PaletteSetDark(Bool persistent=TRUE) -{//Activate dark palette. - GrPaletteSet(gr_palette_dark); - LFBFlush; - if (persistent) - fp_set_std_palette = &PaletteSetDark; -} - //******************************************************************************** public CBGR24 gr_palette_smooth[COLORS_NUM] = { 0xDDDDDD, 0x4E9FB1, 0xA0CF5D, 0x42717B, 0xD23D3D, 0x8542FF, 0xF39D21, 0x404040, @@ -160,17 +146,17 @@ public U0 PaletteSetNight(Bool persistent=TRUE) fp_set_std_palette = &PaletteSetNight; } //******************************************************************************** -public CBGR24 gr_palette_tom[COLORS_NUM] = { +public CBGR24 gr_palette_dark[COLORS_NUM] = { 0xFFFFFF, 0x3465A4, 0x4E9A06, 0x06989A, 0xA24444, 0x75507B, 0xCE982F, 0xBCC0B9, 0x555753, 0x729FCF, 0x82BC49, 0x34E2E2, 0xAC3535, 0xAD7FA8, 0xFCE94F, 0x000000 }; -public U0 PaletteSetTom(Bool persistent=TRUE) -{//Activate tom's palette. - GrPaletteSet(gr_palette_tom); +public U0 PaletteSetDark(Bool persistent=TRUE) +{//Activate Dark palette. + GrPaletteSet(gr_palette_dark); LFBFlush; if (persistent) - fp_set_std_palette = &PaletteSetTom; + fp_set_std_palette = &PaletteSetDark; //*(drv_text_attr(U8 *) + 1) = BROWN; } //******************************************************************************** diff --git a/src/Zenith/Gr/GrPrimatives.CC b/src/System/Gr/GrPrimatives.CC similarity index 100% rename from src/Zenith/Gr/GrPrimatives.CC rename to src/System/Gr/GrPrimatives.CC diff --git a/src/Zenith/Gr/GrScreen.CC b/src/System/Gr/GrScreen.CC similarity index 99% rename from src/Zenith/Gr/GrScreen.CC rename to src/System/Gr/GrScreen.CC index 5e8cce0a..a2fc0c75 100755 --- a/src/Zenith/Gr/GrScreen.CC +++ b/src/System/Gr/GrScreen.CC @@ -413,7 +413,7 @@ U0 GrUpdateScreen32() } U0 GrUpdateScreen() -{//Called by the Window Manager $LK,"HERE",A="FF:::/Zenith/WinMgr.CC,GrUpdateScreen"$, 30 times a second. +{//Called by the Window Manager $LK,"HERE",A="FF:::/System/WinMgr.CC,GrUpdateScreen"$, 30 times a second. CDC *dc; if (text.is_fb_busy) diff --git a/src/Zenith/Gr/GrSpritePlot.CC b/src/System/Gr/GrSpritePlot.CC similarity index 100% rename from src/Zenith/Gr/GrSpritePlot.CC rename to src/System/Gr/GrSpritePlot.CC diff --git a/src/Zenith/Gr/GrTextBase.CC b/src/System/Gr/GrTextBase.CC similarity index 100% rename from src/Zenith/Gr/GrTextBase.CC rename to src/System/Gr/GrTextBase.CC diff --git a/src/Zenith/Gr/MakeGr.CC b/src/System/Gr/MakeGr.CC similarity index 100% rename from src/Zenith/Gr/MakeGr.CC rename to src/System/Gr/MakeGr.CC diff --git a/src/Zenith/Gr/ScreenCast.CC b/src/System/Gr/ScreenCast.CC similarity index 100% rename from src/Zenith/Gr/ScreenCast.CC rename to src/System/Gr/ScreenCast.CC diff --git a/src/Zenith/Gr/SpriteBitMap.CC b/src/System/Gr/SpriteBitMap.CC similarity index 100% rename from src/Zenith/Gr/SpriteBitMap.CC rename to src/System/Gr/SpriteBitMap.CC diff --git a/src/Zenith/Gr/SpriteCode.CC b/src/System/Gr/SpriteCode.CC similarity index 100% rename from src/Zenith/Gr/SpriteCode.CC rename to src/System/Gr/SpriteCode.CC diff --git a/src/Zenith/Gr/SpriteEd.CC b/src/System/Gr/SpriteEd.CC similarity index 100% rename from src/Zenith/Gr/SpriteEd.CC rename to src/System/Gr/SpriteEd.CC diff --git a/src/Zenith/Gr/SpriteMain.CC b/src/System/Gr/SpriteMain.CC similarity index 100% rename from src/Zenith/Gr/SpriteMain.CC rename to src/System/Gr/SpriteMain.CC diff --git a/src/Zenith/Gr/SpriteMesh.CC b/src/System/Gr/SpriteMesh.CC similarity index 100% rename from src/Zenith/Gr/SpriteMesh.CC rename to src/System/Gr/SpriteMesh.CC diff --git a/src/Zenith/Gr/SpriteNew.CC b/src/System/Gr/SpriteNew.CC similarity index 100% rename from src/Zenith/Gr/SpriteNew.CC rename to src/System/Gr/SpriteNew.CC diff --git a/src/Zenith/Gr/SpriteSideBar.CC b/src/System/Gr/SpriteSideBar.CC similarity index 100% rename from src/Zenith/Gr/SpriteSideBar.CC rename to src/System/Gr/SpriteSideBar.CC diff --git a/src/Zenith/InFile.CC b/src/System/InFile.CC similarity index 100% rename from src/Zenith/InFile.CC rename to src/System/InFile.CC diff --git a/src/Zenith/MakeZenith.CC b/src/System/MakeSystem.CC similarity index 88% rename from src/Zenith/MakeZenith.CC rename to src/System/MakeSystem.CC index 097c5c39..ac8d739f 100755 --- a/src/Zenith/MakeZenith.CC +++ b/src/System/MakeSystem.CC @@ -11,7 +11,7 @@ Cd(__DIR__);; #include "Win" #include "WinMgr" #include "ZDebug" -#include "::/Zenith/God/GodExterns" +#include "::/System/God/GodExterns" #include "DolDoc/MakeDoc" LBts(&sys_run_level, RLf_DOC); #include "Ctrls/MakeCtrls" @@ -25,5 +25,4 @@ LBts(&sys_run_level, RLf_DOC); #include "ZDefine" #include "WallPaper" #include "ZMouse" -#include "CosmicGL/MakeCosmicGL" Cd("..");; diff --git a/src/Zenith/Menu.CC b/src/System/Menu.CC similarity index 100% rename from src/Zenith/Menu.CC rename to src/System/Menu.CC diff --git a/src/Zenith/TaskSettings.CC b/src/System/TaskSettings.CC similarity index 100% rename from src/Zenith/TaskSettings.CC rename to src/System/TaskSettings.CC diff --git a/src/Zenith/Training.CC b/src/System/Training.CC similarity index 100% rename from src/Zenith/Training.CC rename to src/System/Training.CC diff --git a/src/Zenith/Utils/BinRep.CC b/src/System/Utils/BinRep.CC similarity index 100% rename from src/Zenith/Utils/BinRep.CC rename to src/System/Utils/BinRep.CC diff --git a/src/Zenith/Utils/CPURep.CC b/src/System/Utils/CPURep.CC similarity index 100% rename from src/Zenith/Utils/CPURep.CC rename to src/System/Utils/CPURep.CC diff --git a/src/Zenith/Utils/ConversionScript.CC b/src/System/Utils/ConversionScript.CC similarity index 98% rename from src/Zenith/Utils/ConversionScript.CC rename to src/System/Utils/ConversionScript.CC index 2eb47abe..d9bb0d3d 100755 --- a/src/Zenith/Utils/ConversionScript.CC +++ b/src/System/Utils/ConversionScript.CC @@ -47,7 +47,7 @@ U0 Cvt(U8 *ff_mask="*", U8 *fu_flags="+r+l-i+S") Find("StrFirstRem", ff_mask, fu_flags, "StrFirstRemove"); Find("StrLastRem", ff_mask, fu_flags, "StrLastRemove"); Find("TempleOS/Apps", ff_mask, fu_flags, "/Apps"); - Find("adam_task", ff_mask, fu_flags, "zenith_task"); + Find("adam_task", ff_mask, fu_flags, "sys_task"); Find("JobQue", ff_mask, fu_flags, "JobQueue"); Find("MSG_", ff_mask, CatPrint(fu_flags, "-l"), "MESSAGE_"); Find(".HC", ff_mask, fu_flags, ".CC"); diff --git a/src/Zenith/Utils/Diff.CC b/src/System/Utils/Diff.CC similarity index 100% rename from src/Zenith/Utils/Diff.CC rename to src/System/Utils/Diff.CC diff --git a/src/Zenith/Utils/DocUtils.CC b/src/System/Utils/DocUtils.CC similarity index 100% rename from src/Zenith/Utils/DocUtils.CC rename to src/System/Utils/DocUtils.CC diff --git a/src/Zenith/Utils/Find.CC b/src/System/Utils/Find.CC similarity index 99% rename from src/Zenith/Utils/Find.CC rename to src/System/Utils/Find.CC index 0fed20be..e355ac23 100755 --- a/src/Zenith/Utils/Find.CC +++ b/src/System/Utils/Find.CC @@ -286,7 +286,7 @@ I64 FindWiz() public I64 FR(U8 *text_to_replace, U8 *new_text, U8 *files_find_mask="/*", U8 *fu_flags=NONE, I64 sff_flags=NONE) {//Files rename, Rename files matching mask. //Example: FR("Disk", "Disk"); - //FR("Gr", "Graphics", "/Zenith/Gr/*"); + //FR("Gr", "Graphics", "/System/Gr/*"); CDirEntry *files, *files_head; I64 i, count = 0, fuf_flags = 0; U8 *tmp_name, *new_path; diff --git a/src/Zenith/Utils/HeapLog.CC b/src/System/Utils/HeapLog.CC similarity index 100% rename from src/Zenith/Utils/HeapLog.CC rename to src/System/Utils/HeapLog.CC diff --git a/src/Zenith/Utils/LineRep.CC b/src/System/Utils/LineRep.CC similarity index 100% rename from src/Zenith/Utils/LineRep.CC rename to src/System/Utils/LineRep.CC diff --git a/src/Zenith/Utils/LinkCheck.CC b/src/System/Utils/LinkCheck.CC similarity index 100% rename from src/Zenith/Utils/LinkCheck.CC rename to src/System/Utils/LinkCheck.CC diff --git a/src/Zenith/Utils/MakeUtils.CC b/src/System/Utils/MakeUtils.CC similarity index 100% rename from src/Zenith/Utils/MakeUtils.CC rename to src/System/Utils/MakeUtils.CC diff --git a/src/Zenith/Utils/MemRep.CC b/src/System/Utils/MemRep.CC similarity index 98% rename from src/Zenith/Utils/MemRep.CC rename to src/System/Utils/MemRep.CC index 731a0caf..5c319700 100755 --- a/src/Zenith/Utils/MemRep.CC +++ b/src/System/Utils/MemRep.CC @@ -156,7 +156,7 @@ Bool MemRepTask(CTask *task,Bool override_validate=FALSE) "screencast.dc\t:%010X\n", DCSize(screencast.dc); "screencast.dc2_alias\t:%010X\n", DCSize(screencast.dc2_alias); } - else if (task == zenith_task) + else if (task == sys_task) { j = 0; k = 0; @@ -169,7 +169,7 @@ Bool MemRepTask(CTask *task,Bool override_validate=FALSE) task1 = c->seth_task; do { - if (task1 != zenith_task) {//zenith task located in Kernel mem + if (task1 != sys_task) {//system task located in Kernel mem j += MSize2(task1); m += MSize2(task1->code_heap); if (task1->data_heap != task1->code_heap) diff --git a/src/Zenith/Utils/Merge.CC b/src/System/Utils/Merge.CC similarity index 100% rename from src/Zenith/Utils/Merge.CC rename to src/System/Utils/Merge.CC diff --git a/src/Zenith/Utils/Profiler.CC b/src/System/Utils/Profiler.CC similarity index 100% rename from src/Zenith/Utils/Profiler.CC rename to src/System/Utils/Profiler.CC diff --git a/src/Zenith/Utils/StrUtils.CC b/src/System/Utils/StrUtils.CC similarity index 100% rename from src/Zenith/Utils/StrUtils.CC rename to src/System/Utils/StrUtils.CC diff --git a/src/Zenith/Utils/SysRep.CC b/src/System/Utils/SysRep.CC similarity index 100% rename from src/Zenith/Utils/SysRep.CC rename to src/System/Utils/SysRep.CC diff --git a/src/Zenith/Utils/TaskRep.CC b/src/System/Utils/TaskRep.CC similarity index 100% rename from src/Zenith/Utils/TaskRep.CC rename to src/System/Utils/TaskRep.CC diff --git a/src/Zenith/Utils/ToDolDoc.CC b/src/System/Utils/ToDolDoc.CC similarity index 100% rename from src/Zenith/Utils/ToDolDoc.CC rename to src/System/Utils/ToDolDoc.CC diff --git a/src/Zenith/Utils/ToTXT.CC b/src/System/Utils/ToTXT.CC similarity index 100% rename from src/Zenith/Utils/ToTXT.CC rename to src/System/Utils/ToTXT.CC diff --git a/src/Zenith/Utils/VideoRep.CC b/src/System/Utils/VideoRep.CC similarity index 100% rename from src/Zenith/Utils/VideoRep.CC rename to src/System/Utils/VideoRep.CC diff --git a/src/Zenith/WallPaper.CC b/src/System/WallPaper.CC similarity index 100% rename from src/Zenith/WallPaper.CC rename to src/System/WallPaper.CC diff --git a/src/Zenith/Win.CC b/src/System/Win.CC similarity index 100% rename from src/Zenith/Win.CC rename to src/System/Win.CC diff --git a/src/Zenith/WinMgr.CC b/src/System/WinMgr.CC similarity index 99% rename from src/Zenith/WinMgr.CC rename to src/System/WinMgr.CC index f431fc19..b82b6c77 100755 --- a/src/Zenith/WinMgr.CC +++ b/src/System/WinMgr.CC @@ -510,7 +510,7 @@ U0 WinMgrTask(I64) try { wmt_start: - if (Bt(&sys_run_level, RLf_ZENITH_SERVER)) + if (Bt(&sys_run_level, RLf_ZEAL_SERVER)) TaskKillDying; WinMgrSleep; diff --git a/src/Zenith/ZBlkDev/DiskCheck.CC b/src/System/ZBlkDev/DiskCheck.CC similarity index 100% rename from src/Zenith/ZBlkDev/DiskCheck.CC rename to src/System/ZBlkDev/DiskCheck.CC diff --git a/src/Zenith/ZBlkDev/DiskPart.CC b/src/System/ZBlkDev/DiskPart.CC similarity index 100% rename from src/Zenith/ZBlkDev/DiskPart.CC rename to src/System/ZBlkDev/DiskPart.CC diff --git a/src/Zenith/ZBlkDev/FileMgr.CC b/src/System/ZBlkDev/FileMgr.CC similarity index 99% rename from src/Zenith/ZBlkDev/FileMgr.CC rename to src/System/ZBlkDev/FileMgr.CC index d56569e3..8a581c00 100755 --- a/src/Zenith/ZBlkDev/FileMgr.CC +++ b/src/System/ZBlkDev/FileMgr.CC @@ -560,7 +560,7 @@ U0 FMCopy(CDoc *doc) } #define FMR_INCLUDE 0 -#define FMR_ZENITH_INCLUDE 1 +#define FMR_ZEAL_INCLUDE 1 #define FMR_DELETE 2 #define FMR_RENAME 3 #define FMR_MKDIR 4 @@ -582,7 +582,7 @@ I64 PopUpFMRight(U8 *header=NULL, U8 *footer=NULL) DocPrint(doc, "%s",header); DocPrint(doc, "$$CM+LX,1,1$$$$BT,\"INCLUDE \",LE=FMR_INCLUDE$$" - "$$CM+LX,29,0$$$$BT,\"ZENITH INCLUDE \",LE=FMR_ZENITH_INCLUDE$$" + "$$CM+LX,29,0$$$$BT,\"SYSTEM INCLUDE \",LE=FMR_ZEAL_INCLUDE$$" "$$CM+LX,1,3 $$$$BT,\"DELETE \",LE=FMR_DELETE$$" "$$CM+LX,29,0$$$$BT,\"RENAME \",LE=FMR_RENAME$$" "$$CM+LX,1,3 $$$$BT,\"MAKE DIRECTORY \",LE=FMR_MKDIR$$" @@ -612,7 +612,7 @@ U0 FMRightClick() Message(MESSAGE_KEY_DOWN, 0, 0x3F0000003F); break; - case FMR_ZENITH_INCLUDE: + case FMR_ZEAL_INCLUDE: Message(MESSAGE_KEY_DOWN, 0, 0x23F0000023F); break; @@ -896,7 +896,7 @@ public U8 *FileMgr(I64 mode=FM_NORMAL, CTask *mem_task=NULL) tmpde = doc->cur_entry->user_data; DocUnlock(doc); if (sc & SCF_SHIFT) - ZenithFile(tmpde->full_name); + SysFile(tmpde->full_name); else PopUpFile(tmpde->full_name); DocLock(doc); diff --git a/src/Zenith/ZBlkDev/MakeZBlkDev.CC b/src/System/ZBlkDev/MakeZBlkDev.CC similarity index 100% rename from src/Zenith/ZBlkDev/MakeZBlkDev.CC rename to src/System/ZBlkDev/MakeZBlkDev.CC diff --git a/src/Zenith/ZBlkDev/Mount.CC b/src/System/ZBlkDev/Mount.CC similarity index 98% rename from src/Zenith/ZBlkDev/Mount.CC rename to src/System/ZBlkDev/Mount.CC index 09b8ee24..52e9a4cb 100755 --- a/src/Zenith/ZBlkDev/Mount.CC +++ b/src/System/ZBlkDev/Mount.CC @@ -271,7 +271,7 @@ U8 Mount2(U8 boot_drive_let, CDoc *_doc, Bool _caller_is_prtdisk) } public U8 Mount(Bool caller_is_prtdisk=FALSE) -{//Mount drives. Called from $LK,"DiskPart(Mount)",A="FF:::/Zenith/ZBlkDev/DiskPart.CC,Mount("$. +{//Mount drives. Called from $LK,"DiskPart(Mount)",A="FF:::/System/ZBlkDev/DiskPart.CC,Mount("$. return Mount2(0, NULL, caller_is_prtdisk); } diff --git a/src/Zenith/ZBlkDev/ZDiskA.CC b/src/System/ZBlkDev/ZDiskA.CC similarity index 100% rename from src/Zenith/ZBlkDev/ZDiskA.CC rename to src/System/ZBlkDev/ZDiskA.CC diff --git a/src/Zenith/ZBlkDev/ZDiskB.CC b/src/System/ZBlkDev/ZDiskB.CC similarity index 100% rename from src/Zenith/ZBlkDev/ZDiskB.CC rename to src/System/ZBlkDev/ZDiskB.CC diff --git a/src/Zenith/ZDebug.CC b/src/System/ZDebug.CC similarity index 100% rename from src/Zenith/ZDebug.CC rename to src/System/ZDebug.CC diff --git a/src/Zenith/ZDefine.CC b/src/System/ZDefine.CC similarity index 89% rename from src/Zenith/ZDefine.CC rename to src/System/ZDefine.CC index a4b1eaa4..9b26812d 100755 --- a/src/Zenith/ZDefine.CC +++ b/src/System/ZDefine.CC @@ -4,14 +4,14 @@ U0 LoadDocDefines() { CBinFile *bfh = mem_boot_base - sizeof(CBinFile); - DefinePrint("DD_OS_NAME_VERSION", "ZenithOS V%0.2f", sys_os_version); + DefinePrint("DD_OS_NAME_VERSION", "ZealOS V%0.2f", sys_os_version); DefinePrint("DD_TEMPLEOS_AGE", "%0.1f", (Now - Str2Date("8/1/2003")) / ToF64(1 << 32) / CDATE_YEAR_DAYS); DefinePrint("DD_KERNEL", "%08X", bfh); bfh(I64) += bfh->file_size - 1; DefinePrint("DD_KERNEL_END", "%08X", bfh); - //$LK,"DD_BOOT_HIGH_LOC_DVD",A="FF:::/Zenith/Boot/BootDVD.CC,DD_BOOT_HIGH_LOC_DVD"$ + //$LK,"DD_BOOT_HIGH_LOC_DVD",A="FF:::/System/Boot/BootDVD.CC,DD_BOOT_HIGH_LOC_DVD"$ $TR,"LineRep"$ $ID,2$DefinePrint("DD_TEMPLEOS_LOC", "80,849"); diff --git a/src/Zenith/ZExterns.CC b/src/System/ZExterns.CC similarity index 98% rename from src/Zenith/ZExterns.CC rename to src/System/ZExterns.CC index fdcfb535..d9c71b69 100755 --- a/src/Zenith/ZExterns.CC +++ b/src/System/ZExterns.CC @@ -3,7 +3,7 @@ extern U0 ACDDefsPut(CDoc *doc=NULL, U8 *st, I64 num=-1); extern U0 ACDFillin(I64 n); extern U0 ACFillIn(I64 n); extern U0 ACMan(I64 n, CTask *parent_task=NULL); -extern I64 ZenithFile(U8 *filename, Bool warn_ext=TRUE); +extern I64 SysFile(U8 *filename, Bool warn_ext=TRUE); extern Bool AutoComplete(Bool val=OFF); extern U0 ClipDel(); extern CCtrl *CtrlFindUnique(CTask *haystack_task, I64 needle_type); diff --git a/src/Zenith/ZHash.CC b/src/System/ZHash.CC similarity index 100% rename from src/Zenith/ZHash.CC rename to src/System/ZHash.CC diff --git a/src/Zenith/ZMath.CC b/src/System/ZMath.CC similarity index 100% rename from src/Zenith/ZMath.CC rename to src/System/ZMath.CC diff --git a/src/Zenith/ZMathODE.CC b/src/System/ZMathODE.CC similarity index 99% rename from src/Zenith/ZMathODE.CC rename to src/System/ZMathODE.CC index c7091015..289d228e 100755 --- a/src/Zenith/ZMathODE.CC +++ b/src/System/ZMathODE.CC @@ -626,7 +626,7 @@ U0 ODERK5OneStep(CMathODE *ode) F64 ode_alloced_factor = 0.75; U0 ODEsUpdate(CTask *task) -{/* This routine is called by the $LK,"window mgr",A="FF:::/Zenith/Gr/GrScreen.CC,ODEsUpdate"$on a continuous +{/* This routine is called by the $LK,"window mgr",A="FF:::/System/Gr/GrScreen.CC,ODEsUpdate"$on a continuous basis to allow real-time simulation. It is intended to provide ress good enough for games. It uses a runge-kutta integrator which is a better algorithm than doing it with Euler. diff --git a/src/Zenith/ZMemory.CC b/src/System/ZMemory.CC similarity index 100% rename from src/Zenith/ZMemory.CC rename to src/System/ZMemory.CC diff --git a/src/Zenith/ZMouse.CC b/src/System/ZMouse.CC similarity index 100% rename from src/Zenith/ZMouse.CC rename to src/System/ZMouse.CC diff --git a/src/Zenith/ZRegistry.CC b/src/System/ZRegistry.CC similarity index 82% rename from src/Zenith/ZRegistry.CC rename to src/System/ZRegistry.CC index 72dadf40..ddcd61b0 100755 --- a/src/Zenith/ZRegistry.CC +++ b/src/System/ZRegistry.CC @@ -20,7 +20,7 @@ Bool RegCache() return TRUE; } -public Bool RegDefault(U8 *path, U8 *val, Bool is_zenith_entry=FALSE) +public Bool RegDefault(U8 *path, U8 *val, Bool is_zeal_entry=FALSE) {//Add code doc tree branch to registry. Bool res, unlock_doc; @@ -30,12 +30,12 @@ public Bool RegDefault(U8 *path, U8 *val, Bool is_zenith_entry=FALSE) { DocTreeMake(sys_registry_doc, path); DocPrint(sys_registry_doc, "%s", val); - if (is_zenith_entry) + if (is_zeal_entry) { - if (Fs == zenith_task) + if (Fs == sys_task) ExePrint("%s", val); else - Zenith("%s", val); + Sys("%s", val); } if (DriveIsWritable(*sys_registry_doc->filename.name)) DocWrite(sys_registry_doc); @@ -123,7 +123,7 @@ public Bool OneTimePopUp(U8 *_flags, I64 flag_num, U8 *message) U0 RegOneTimePopUp(I64 flag_num, U8 *message) {//You're not supposed to make system pop-up flags, only me. if (OneTimePopUp(sys_message_flags, flag_num,message)) - RegWrite("Zenith/SysMessageFlags", "sys_message_flags[0]=0x%X;\n", sys_message_flags[0]); + RegWrite("System/SysMessageFlags", "sys_message_flags[0]=0x%X;\n", sys_message_flags[0]); } U0 RegInit() @@ -131,14 +131,14 @@ U0 RegInit() U8 buf[STR_LEN]; Bool version_present; - RegDefault("Zenith/SysMessageFlags", "sys_message_flags[0]=0;\n", TRUE); + RegDefault("System/SysMessageFlags", "sys_message_flags[0]=0;\n", TRUE); StrPrint(buf, "registry_version=%4.3f;\n", sys_os_version); - version_present = RegDefault("Zenith/SysRegVer", buf, TRUE); - RegExe("Zenith"); + version_present = RegDefault("System/SysRegVer", buf, TRUE); + RegExe("Zeal"); if (registry_version != sys_os_version) { - RegWrite("Zenith/SysRegVer", buf); - RegExe("Zenith"); + RegWrite("System/SysRegVer", buf); + RegExe("Zeal"); } } @@ -147,7 +147,7 @@ U0 RegInit() public U0 ZOnceFlush() {//Flush ZOnce() buf. - RegWrite("Once/Zenith", ""); + RegWrite("Once/Zeal", ""); } public U0 OnceFlush() @@ -156,12 +156,12 @@ public U0 OnceFlush() } public U0 ZOnce(U8 *format, ...) -{//Add Zenith code to $LK,"~/Registry.CC"$, executed next boot. +{//Add Zeal code to $LK,"~/Registry.CC"$, executed next boot. U8 *buf = StrPrintJoin(NULL, format, argc, argv); - if (!Bt(&sys_run_level, RLf_ONCE_ZENITH)) + if (!Bt(&sys_run_level, RLf_ONCE_ZEAL)) ZOnceFlush; - RegAppend("Once/Zenith", "%s\n", buf); + RegAppend("Once/Zeal", "%s\n", buf); Free(buf); } @@ -176,15 +176,15 @@ public U0 Once(U8 *format, ...) } public U0 ZOnceDrive(U8 drv_let=0, U8 *format, ...) -{//Add Zenith code to drv $LK,"~/Registry.CC"$, executed next boot. +{//Add Zeal code to drv $LK,"~/Registry.CC"$, executed next boot. U8 *buf = StrPrintJoin(NULL, format, argc, argv); I64 old_drive_let = *sys_registry_doc->filename.name; if (drv_let) *sys_registry_doc->filename.name = drv_let; - if (!Bt(&sys_run_level, RLf_ONCE_ZENITH)) + if (!Bt(&sys_run_level, RLf_ONCE_ZEAL)) ZOnceFlush; - RegAppend("Once/Zenith", "%s\n", buf); + RegAppend("Once/Zeal", "%s\n", buf); Free(buf); *sys_registry_doc->filename.name = old_drive_let; } @@ -208,13 +208,13 @@ public U0 OnceExe() try { - RegDefault("Once/Zenith", ""); - if (RegCount("Once/Zenith") > 2) + RegDefault("Once/Zeal", ""); + if (RegCount("Once/Zeal") > 2) { - Zenith("RegExe(\"Once/Zenith\");"); + Sys("RegExe(\"Once/Zeal\");"); ZOnceFlush; } - LBts(&sys_run_level, RLf_ONCE_ZENITH); + LBts(&sys_run_level, RLf_ONCE_ZEAL); RegDefault("Once/User", ""); if (RegCount("Once/User") > 2) @@ -228,7 +228,7 @@ public U0 OnceExe() catch { ZOnceFlush; - LBts(&sys_run_level, RLf_ONCE_ZENITH); + LBts(&sys_run_level, RLf_ONCE_ZEAL); OnceFlush; LBts(&sys_run_level, RLf_ONCE_USER); } diff --git a/src/Zenith/ZSound.CC b/src/System/ZSound.CC similarity index 100% rename from src/Zenith/ZSound.CC rename to src/System/ZSound.CC diff --git a/src/Zenith/ZSplash.CC b/src/System/ZSplash.CC similarity index 92% rename from src/Zenith/ZSplash.CC rename to src/System/ZSplash.CC index 6d2cfdec..ceb89265 100755 Binary files a/src/Zenith/ZSplash.CC and b/src/System/ZSplash.CC differ diff --git a/src/Zenith/CosmicGL/Docs/CosmicGLOverview.DD b/src/Zenith/CosmicGL/Docs/CosmicGLOverview.DD deleted file mode 100755 index b25352ce..00000000 --- a/src/Zenith/CosmicGL/Docs/CosmicGLOverview.DD +++ /dev/null @@ -1,254 +0,0 @@ - -$FG,5$Using this Library$FG$ -$HL,1$#include "MakeCosmicGL"$HL,0$ -$FG,2$To rebuild, simply include MakeCosmicGL.CC located at the root of this -repository. By default, this entire library is compiled on boot, so this should -not be necessary unless you modify the library itself. The #include's beneath -each title in the documentation are to help you find where these -functions/classes are implemented. - -Every function has extensive JavaDoc/Doxygen style documentation, so be sure -to read those. Not every function is included in this document yet, however -they are self-explanatory (such as Draw functions). - -$FG,5$Creating/Freeing Textures and Framebuffers$FG$ -$HL,1$#include "Texture/Texture" -$HL,0$ -$FG,2$CTex2D is used for both textures and framebuffers:$FG$ - -$HL,1$U0 Tex2DInit(CTex2D *tex, I64 type, I64 w, I64 h); -U0 Tex2DFree(CTex2D *tex);$HL,0$ - -$FG,2$Where $FG$$FG,9$type$FG$ $FG,2$can be:$FG$ -$FG,3$ -TEX2D_RAW$FG$ $FG,2$CBGR24 format$FG$ -$FG,3$TEX2D_DEPTH$FG$ $FG,2$F64 format$FG$ -$FG,3$TEX2D_WAD$FG$ $FG,2$WAD/BMP 8-bit 256-CBGR24 palette compression$FG$ - -$FG,2$Textures must be made for the frame and depth buffer, which can later be drawn -to a window after the image is rendered onto them. Textures that you intend to -use as render targets such as framebuffers can not be compressed:$FG$ - -$HL,1$CTex2D frameBuf, depthBuf; -Tex2DInit(&frameBuf, TEX2D_RAW, 640, 480); -Tex2DInit(&depthBuf, TEX2D_DEPTH, 640, 480);$HL,0$ - -$FG,5$Loading/Clearing Textures$FG$ -$FG,2$Tex2DInit merely allocates space, you can then clear the textures with the -following:$FG$ - -$HL,1$U0 Tex2DColorFill(CTex2D *tex, CBGR24 color); -U0 Tex2DDepthReset(CTex2D *tex); -U0 Tex2DLoadWAD(CTex2D *tex, CWAD *wad, U8 *texName); -$HL,0$ -$FG,5$Sampling Textures$FG$ -$FG,2$To sample a texture location (such as when texture mapping in a fragment -shader), the following are available:$FG$ - -$HL,1$U0 Tex2DSampleNorm(CBGR24 *col, CTex2D *tex, F64 u, F64 v);$HL,0$ $FG,2$Samples with normalized 0.0-1.0 uv coordinates.$FG$ -$HL,1$U0 Tex2DSampleCoord(CBGR24 *col, CTex2D *tex, I64 u, I64 v);$HL,0$ $FG,2$Samples with raw pixel uv coordinates.$FG$ - -$FG,5$Displaying Textures$FG$ -$FG,2$All texture types can be rendered to the OS framebuffer. Textures and -non-color data (depth) are rendered in grayscale.$FG$ - -$HL,1$U0 Tex2DDebugDisp(CTex2D *tex, I64 x, I64 y);$HL,0$ $FG,2$Copies directly to OS display buffer rather than window, will be replaced.$FG$ - -$FG,5$Loading Textures From Common Formats$FG$ -$HL,1$#include "Texture/TextureImport" -$HL,0$ -$FG,5$WAD Textures$FG$ -$FG,2$WAD files were a common method of storing textures in early game engines, -popularized by the DOOM/Quake/GldSrc engines. Textures are compressed with -8-bit color pointing to a 256 24-bit color palette. See the WAD section to -learn how to load the CWAD object to pass to this function. - -$FG,2$Example WAD loading:$FG$ -$HL,1$ -CWAD wad; -CTex2D tex; -WADLoad(&wad, "Assets/Textures/HALFLIFE.WAD"); -Tex2DLoadWAD(&tex, &wad, "!waterblue");$HL,1$$HL,0$ $FG,2$The loader will initialize the texture.$FG$ -WADFree(&wad); -$HL,0$ -$FG,5$BMP Images$FG$ -$FG,2$BMP images are an extremely simple format to read. You can load 24-bit uncompressed -BMPs like so:$FG$ - -$HL,1$CTex2D tex; -Tex2DLoadBMP(&tex, "SaintTerry.bmp");$HL,0$ $FG,2$The loader will initialize the texture.$FG$ - -$FG,5$Loading and Reading WAD Files$FG$ -$HL,1$#include "WAD/WADTypes" -#include "WAD/WAD"$HL,0$ -$FG,2$WAD files are a general purpose format for storing a flat hierarchy of -directories called "lumps." They were first used by the DOOM engine to hold -game assets, however they have been used by subsequent engines such as Quake -and GldSrc to hold textures. The general purpose WAD manipulation functions -below can be used to access all WAD formats, although some functionality from -other functions may be limited to specific WAD types.$FG$ -$HL,1$ -U0 WADLoad(CWAD *wad, U8 *fname); -U0 WADFree(CWAD *wad); -$HL,0$ -$FG,2$WAD types:$FG$$FG,3$ -WAD_TYPE_HL -WAD_TYPE_DOOM -$FG$ -$FG,5$Lumps$FG$ -$FG,2$These are named directories with no hierarchy. The format for lumps is slightly -different for DOOM and Quake/Half-Life WADs, so a CWADFileLump union is available -to pass general purpose lump pointers. - -Lump classes:$FG$ -$HL,1$class CWADFileLumpDoom; -class CWADFileLumpHL; -class CWADFileLump;$HL,0$ - -$FG,2$CWADFileLump can be "interpreted" as either with:$FG$ -CWADFileLump.doom -CWADFileLump.hl - -$FG,2$CWAD has an internal hash file for fast lump reading. To find a lump by name, use:$FG$ - -$HL,1$I64 WADFindLump(CWAD *wad, U8 *name, CWADFileLump **lump=NULL);$HL,0$ - -$FG,2$It returns the lump index, or -1 if not found. **lump can be optionally used to get -the handle to the target lump.$FG$ - -$FG,5$Shaders$FG$ -$HL,1$#include "Render/Shader" -$HL,0$ -$FG,2$Shaders are functions that calculate the vertex positions of each triangle in -NDC (normalized device coordinates), and then calculate the color of each -individual fragment (pixel) within the triangles. You can use any model format -you like, as you get to decide what vertex coordinates are returned for each -triangle. $FG$ - -$FG,5$Uniforms$FG$ -$FG,2$Uniforms are unchanging values that will be used by the shader for every -triangle in the model. These are often values like transformation matrices, -texture pointers, or any other material parameters you need. You can provide a -pointer to your uniforms to use in the shader.$FG$ - -$FG,5$Vertex to Fragment Vertex Attributes$FG$ -$FG,2$The vertex shader returns not only the coordinates of the vertices for each -triangle, but also other attributes such as UV coordinates, normals, colors, -etc. Every time the fragment shader is called, the interpolated attributes -for that frag (pixel) are given to the shader.) - -$FG,2$You can choose the structure of the F64 array of attributes to be interpolated -by setting the nVertValues and *vertValues from CShader:$FG$ -$HL,1$ -CShader shd; -shd.nVertValues = 2; $FG,2$In this example, the vertex shader will pass two attributes.$FG$ -shd.vertValues = MAlloc(2 * sizeof(I64)); -shd.vertValues[0] = SHD_CVEC2; $FG,2$For passing UV coordinate to fragment shader.$FG$ -shd.vertValues[1] = SHD_CVEC3;$HL,0$ $FG,2$For passing normal to fragment shader.$FG$ - -$FG,2$Where the vertValues can be of type:$FG$ -$FG,3$ -SHD_F64 -SHD_CVEC2 -SHD_CVEC3 -SHD_CVEC4 -SHD_CMat4 -$FG$ -$FG,5$Vertex Shader$FG$ -$FG,2$The purpose of the vertex shader is to calculate each triangle's vertex -coordinates in NDC (noramalized device coordinates). The renderer will "plot" -or rasterize these coordinates to the specified render target texture. -Fragments outside of the -1:1 range will not be rendered (as they are -off-texture). $FG$ - -$SP,"NDC Coordinates:",BI=1$ - - - - - - - - - - - - - -$HL,1$U0 (*VertShd)(CTri *tri, F64 *vertOutBuf,, U8 *mdlPtr, U8 *uniforms, I64 iTri, i64 nTris);$HL,0$ - -$FG,3$*tri$FG$ $FG,2$OUTPUT: Final triangle coordinates in NDC$FG$ -$FG,3$*mdlPtr$FG$ $FG,2$INPUT: Pointer to model data.$FG$ -$FG,3$*vertOutBuf$FG$ $FG,2$OUTPUT: Array of attributes to be interpolated for the frag shader. - In order of: [V0 Attr, V1 Attr, V2 Attr] $FG$ -$FG,3$*uniforms$FG$ $FG,2$INPUT: Pointer to uniforms.$FG$ -$FG,3$iTri$FG$ $FG,2$INPUT: Current triangle.$FG$ -$FG,3$nTris$FG$ $FG,2$INPUT: Total number of triangles in model.$FG$ - -$FG,2$Example of creating and attaching a vertex shader to a CShader:$FG$ - -$HL,1$CShader shd; -U0 vShader(CTri *tri, F64 *vertOutBuf, U8 *mdlPtr, U8 *uniforms, I64 iTri, I64 nTris) -{ - // Set *tri with the iTri from mdlPtr. -} -shd.VertShd = &vShader;$HL,0$ - -$FG,5$Fragment Shader$FG$ -$FG,2$The fragment shader returns the CBGR24 color for a particular fragment (pixel). -It takes uniforms as well as interpolated values from the vertex shader to -calculate each frag's color. - -For example, each vertex of a triangle may have a UV coordinate pointing to the -part of the texture it maps to. The three UV coordinate attributes from the -vertex shader will be interpolated into one UV coordinate sent to the fragment -shader. The fragment shader can then sample that pixel color from the texture -included in the uniforms and return that color. Fragment shaders can be used -for all sorts of purposes, including rendering lighting, shadows, warping, -color filtering, etc.$FG$ - -$HL,1$U0 (*FragShd)(CBGR24 *color, F64 *fragInBuf, U8 *uniforms);$HL,0$ - -$FG,2$Fragment shaders can be created and attached in the same way as vertex shaders:$FG$ - -$HL,1$CShader shd; -U0 fShader(CBGR24 *color, F64 *fragInBuf, U8 *uniforms) -{ - // Set *color using interpolated F64's from fragInBuf and uniforms -} -shd.FragShd = &fShader;$HL,0$ - - - -$FG,5$Rendering$FG$ -$HL,1$#include "Math/Math" -#include "Render/Rasterize" -$HL,0$ -$FG,2$After models, textures, and shaders are initialized, you can render with these -functions. Currently only triangles can be rendered, however support for all -sprite primitives will be added for performance and ease of use (saves the -steps of rendering textured triangles to draw 2D primitives like in GPU -libraries).$FG$ -$HL,1$ -U0 RenderTris(CShader *shd, CTex2D *frameBuf, CTex2D *depthBuf, U8 *mdl, U8 *uniforms, I64 nTris); -$HL,0$ - -õ -¢ÿÿÿ4·ÿÿÿ#ÿ -”ÿÿÿÔÿÿÿ -”ÿÿÿWÔÿÿÿW -”ÿÿÿ”ÿÿÿW -ÔÿÿÿÔÿÿÿW´ÿÿÿ7´ÿÿÿ´ÿÿÿ7Óÿÿÿ7´ÿÿÿ7Ëÿÿÿ ¡ÿÿÿY: +1Ùÿÿÿ4X: +1ÐÿÿÿZ: +1­ÿÿÿ[-1„ÿÿÿ4-1šÿÿÿJ-1 ANDC maps to texture -coordinates when -rasterizing. -8£8 -·¸P -¸P P - P  -¸   -œÿÿÿ*§ÿÿÿB -§ÿÿÿBÁÿÿÿ> -Áÿÿÿ>œÿÿÿ* -Ä+ú= -ú=ÎC -ÎCÄ+ \ No newline at end of file diff --git a/src/Zenith/CosmicGL/Draw/Primitive.CC b/src/Zenith/CosmicGL/Draw/Primitive.CC deleted file mode 100755 index 767f1550..00000000 --- a/src/Zenith/CosmicGL/Draw/Primitive.CC +++ /dev/null @@ -1,232 +0,0 @@ -/** - @defgroup GLDraw Draw - @brief Functions for drawing to textures. -*/ - -/** - @ingroup GLDraw - @brief Draw pixel on color texture. Does not check boundaries, point - must be fully inside texture. - - @param[in,out] tex Color texture to draw to. - @param[in] x X position. - @param[in] y Y position. - @param[in] color Color of point. -*/ -U0 GLDrawPixel(CGLTex2D *tex, I64 x, I64 y, CBGR24 color) -{ - tex->rawBuf[x + y * tex->w] = color; -} - - -/** - @ingroup GLDraw - @brief Draw line on color texture. Does not check boundaries, line must - be fully inside texture. - - @param[in,out] tex Color texture to draw to. - @param[in] x0 Start x. - @param[in] y0 Start y. - @param[in] x1 End x. - @param[in] y1 End y. - @param[in] color Color of line. -*/ -U0 GLDrawLine(CGLTex2D *tex, I64 x0, I64 y0, I64 x1, I64 y1, CBGR24 color) -{ - Bool steep; - I64 temp, - delta_x, delta_y, error, - step_y, x, y; - - steep = Abs(y1 - y0) > Abs(x1 - x0); - - if (steep == TRUE) - { - temp = x0; - x0 = y0; - y0 = temp; - temp = x1; - x1 = y1; - y1 = temp; - } - - if (x0 > x1) - { - temp = x0; - x0 = x1; - x1 = temp; - temp = y0; - y0 = y1; - y1 = temp; - } - - delta_x = x1 - x0; - delta_y = Abs(y1 - y0); - error = delta_x / 2; - - step_y; - - if (y0 < y1) - { - step_y = 1; - } - else - { - step_y = -1; - } - - y = y0; - - for (x = x0; x < x1 + 1; x++) - { - if (steep == TRUE) - { - tex->rawBuf[y + x * tex->w] = color; - } - else - { - tex->rawBuf[x + y * tex->w] = color; - } - - error -= delta_y; - - if (error < 0) - { - y += step_y; - error += delta_x; - } - } -} - -/** - @ingroup GLDraw - @brief Draw single color triangle to color texture. Does not check - boundaries, triangle must be fully inside texture. - - @param[in,out] tex Color texture to draw to. - @param[in] x0 First vertex x. - @param[in] y0 First vertex y. - @param[in] x1 Second vertex x. - @param[in] y1 Second vertex y. - @param[in] x2 Third vertex x. - @param[in] y2 Third vertex y. - @param[in] color Color of triangle. -*/ -U0 GLDrawTriangle(CGLTex2D *tex, I64 x0, I64 y0, I64 x1, I64 y1, I64 x2, I64 y2, - CBGR24 color) -{ - Bool middle_line_drawn; - I64 temp; - F64 ftemp, - x_delta, y_delta, - left_delta, right_delta, - left_x, right_x, - y, lX, rX, - left_index, right_index, - width; - - if (y0 > y1) - { - temp = x0; - x0 = x1; - x1 = temp; - temp = y0; - y0 = y1; - y1 = temp; - } - - if (y0 > y2) - { - temp = x0; - x0 = x2; - x2 = temp; - temp = y0; - y0 = y2; - y2 = temp; - } - - if (y1 > y2) - { - temp = x1; - x1 = x2; - x2 = temp; - temp = y1; - y1 = y2; - y2 = temp; - } - - middle_line_drawn = FALSE; - - // Bottom Half - if (y0 != y1) - { - x_delta = x1 - x0; - y_delta = y1 - y0; - left_delta = x_delta / y_delta; - x_delta = x2 - x0; - y_delta = y2 - y0; - right_delta = x_delta / y_delta; - - if (left_delta > right_delta) - { - ftemp = left_delta; - left_delta = right_delta; - right_delta = ftemp; - } - - left_x = x0; - right_x = x0; - - middle_line_drawn = TRUE; - - for (y = y0; y < y1 + 1; y++) - { - lX = left_x + 0.5; - rX = right_x + 0.5; - left_index = y * tex->w + lX; - right_index = y * tex->w + rX; - width = right_index - left_index; - MemSetU32(tex->rawBuf + left_index, color, width); - left_x += left_delta; - right_x += right_delta; - } - } - - // Top Half - if (y1 != y2) - { - x_delta = -x1 - x2; - y_delta = y1 - y2; - left_delta = x_delta / y_delta; - x_delta = -x0 - x2; - y_delta = y0 - y2; - right_delta = x_delta / y_delta; - - if (left_delta > right_delta) - { - ftemp = left_delta; - left_delta = right_delta; - right_delta = ftemp; - } - - left_x = x2; - right_x = x2; - - if (middle_line_drawn == TRUE) - { - y1 += 1; - } - - for (y = y2; y > y1 - 1; y--) - { - lX = left_x + 0.5; - rX = right_x + 0.5; - left_index = y * tex->w + lX; - right_index = y * tex->w + rX; - width = right_index - left_index; - MemSetU32(tex->rawBuf + left_index, color, width); - left_x += left_delta; - right_x += right_delta; - } - } -} \ No newline at end of file diff --git a/src/Zenith/CosmicGL/Draw/Rectangle.CC b/src/Zenith/CosmicGL/Draw/Rectangle.CC deleted file mode 100755 index cb32f6ea..00000000 --- a/src/Zenith/CosmicGL/Draw/Rectangle.CC +++ /dev/null @@ -1,184 +0,0 @@ - -/** - @ingroup GLDraw - @brief Draw single color rectangle. - - @param[in,out] tex Texture to draw to. - @param[in] x0 Start corner x. - @param[in] y0 Start corner y. - @param[in] x1 End corner x. - @param[in] y1 End corner y. - @param[in] color Color of rectangle. -*/ -U0 GLDrawRectFill(CGLTex2D *tex, I64 x0, I64 y0, I64 x1, I64 y1, CBGR24 color) -{ - I64 xMaxIndex, yMaxIndex, - xMin, xMax, - yMin, yMax, - xLen, y; - - xMaxIndex = tex->w - 1; - yMaxIndex = tex->h - 1; - xMin = Clamp(Min(x0, x1), 0, xMaxIndex); - xMax = Clamp(Max(x0, x1), 0, xMaxIndex); - yMin = Clamp(Min(y0, y1), 0, yMaxIndex); - yMax = Clamp(Max(y0, y1), 0, yMaxIndex); - xLen = xMax - xMin; - - for (y = yMin; y < yMax; y++) - { - MemSetU32(&tex->rawBuf[xMin + y * tex->w], color, xLen); - } -} - -/** - @ingroup GLDraw - @brief Draw 1px soft rectangle outline (corners not filled). - - @param[in,out] tex Texture to draw to. - @param[in] x0 Start corner x. - @param[in] y0 Start corner y. - @param[in] x1 End corner x. - @param[in] y1 End corner y. - @param[in] color Color of rectangle. - @param[in] shadeColor (Optional) color of bottom right corner - for shading effect. -*/ -U0 GLDrawRectSoftOutline(CGLTex2D *tex, I64 x0, I64 y0, I64 x1, I64 y1, - CBGR24 color, CBGR24 shadeColor = 0x7FFFFFFF) -{ - I64 xMaxIndex, yMaxIndex, - xMin, xMax, - yMin, yMax, - xLen, y; - - if (shadeColor == 0x7FFFFFFF) - shadeColor = color; - - xMaxIndex = tex->w - 1; - yMaxIndex = tex->w - 1; - xMin = Clamp(Min(x0, x1), 0, xMaxIndex); - xMax = Clamp(Max(x0, x1), 0, xMaxIndex); - yMin = Clamp(Min(y0, y1), 0, yMaxIndex); - yMax = Clamp(Max(y0, y1), 0, yMaxIndex); - xLen = xMax - xMin - 1; - - // Top border - MemSetU32(&tex->rawBuf[xMin + 1 + yMin * tex->w], color, xLen); - - // Bottom border - MemSetU32(&tex->rawBuf[xMin + 1 + yMax * tex->w], shadeColor, xLen); - - // Left/Right border - for (y = yMin + 1; y < yMax; y++) - { - tex->rawBuf[xMin + y * tex->w] = color; - tex->rawBuf[xMax + y * tex->w] = shadeColor; - } -} - -/** - @ingroup GLDraw - @brief Draw 1px rectangle outline. - - @param[in,out] tex Texture to draw to. - @param[in] x0 Start corner x. - @param[in] y0 Start corner y. - @param[in] x1 End corner x. - @param[in] y1 End corner y. - @param[in] color Color of rectangle. - @param[in] shadeColor (Optional) color of bottom right corner - for shading effect. -*/ -U0 GLDrawRectOutline(CGLTex2D *tex, I64 x0, I64 y0, I64 x1, I64 y1, - CBGR24 color, CBGR24 shadeColor = 0x7FFFFFFF) -{ - I64 xMaxIndex, yMaxIndex, - xMin, xMax, - yMin, yMax, - xLen, y; - - if (shadeColor == 0x7FFFFFFF) - shadeColor = color; - - xMaxIndex = tex->w - 1; - yMaxIndex = tex->w - 1; - xMin = Clamp(Min(x0, x1), 0, xMaxIndex); - xMax = Clamp(Max(x0, x1), 0, xMaxIndex); - yMin = Clamp(Min(y0, y1), 0, yMaxIndex); - yMax = Clamp(Max(y0, y1), 0, yMaxIndex); - xLen = xMax - xMin + 1; - - // Top border - MemSetU32(&tex->rawBuf[xMin + yMin * tex->w], color, xLen); - - // Bottom border - MemSetU32(&tex->rawBuf[xMin + yMax * tex->w], shadeColor, xLen); - - // Left/Right border - for (y = yMin + 1; y < yMax; y++) - { - tex->rawBuf[xMin + y * tex->w] = color; - tex->rawBuf[xMax + y * tex->w] = shadeColor; - } -} - -/** - @ingroup GLDraw - @brief Draw two color vertical gradient rectangle. - - Should be optimized to avoid such heavy use of F64's. - - @param[in,out] tex Texture to draw to. - @param[in] x0 Start corner x. - @param[in] y0 Start corner y. - @param[in] x1 End corner x. - @param[in] y1 End corner y. - @param[in] colorTop Top color of gradient. - @param[in] colorBottom Bottom color of gradient. - @param[in] shadeColor (Optional) color of bottom right corner - for shading effect. - @param[in] tStart (Optional) start of gradient. - @param[in] tEnd (Optional) end of gradient. -*/ -U0 GLDrawRectVertGradient(CGLTex2D *tex, I64 x0, I64 y0, I64 x1, I64 y1, - CBGR24 colorTop, CBGR24 colorBottom, F64 tStart = 0.0, F64 tEnd = 1.0) -{ - CBGR24 color; - I64 xMaxIndex, yMaxIndex, - xMin, xMax, - yMin, yMax, - yMinReal, yMaxReal, - xLen, y; - F64 yHeight, t, - rDiff, gDiff, bDiff, - r, g, b; - - xMaxIndex = tex->w - 1; - yMaxIndex = tex->h - 1; - xMin = Clamp(Min(x0, x1), 0, xMaxIndex); - xMax = Clamp(Max(x0, x1), 0, xMaxIndex); - yMinReal = Min(y0, y1); - yMin = Clamp(yMinReal, 0, yMaxIndex); - yMaxReal = Max(y0, y1); - yMax = Clamp(yMaxReal, 0, yMaxIndex); - xLen = xMax - xMin; - - yHeight = yMaxReal - yMinReal + 1; - - rDiff = colorBottom.r - colorTop.r; - gDiff = colorBottom.g - colorTop.g; - bDiff = colorBottom.b - colorTop.b; - - for (y = yMin; y < yMax; y++) - { - t = Clamp((y - yMinReal) / yHeight, tStart, tEnd); - r = t * rDiff; - g = t * gDiff; - b = t * bDiff; - color.r = colorTop.r + r; - color.g = colorTop.g + g; - color.b = colorTop.b + b; - MemSetU32(&tex->rawBuf[xMin + y * tex->w], color, xLen); - } -} \ No newline at end of file diff --git a/src/Zenith/CosmicGL/Draw/Text.CC b/src/Zenith/CosmicGL/Draw/Text.CC deleted file mode 100755 index 0cc9c9e6..00000000 --- a/src/Zenith/CosmicGL/Draw/Text.CC +++ /dev/null @@ -1,90 +0,0 @@ -/** - @ingroup GLDraw - @brief Draw a single color character to color texture. - - Will not draw character if partially off-screen. - - @param[in,out] tex Texture to draw to. - @param[in] x X position to draw character at. - @param[in] y Y position to draw character at. -*/ -U0 GLDrawChar(CGLTex2D *tex, I64 x, I64 y, U8 char, CBGR24 color, - U64 *font = text.font) -{ - // Check if off-screen - if (x >= tex->w || x <= -FONT_WIDTH) - return; - - I64 i, j; - for (j = 0; j < FONT_HEIGHT; j++) - { - for (i = 0; i < FONT_WIDTH; i++) - { - if (font[char].u8[j] & 1 << i) - tex->rawBuf[x + i + (y + j) * tex->w] = color; - } - } -} - -/** - @ingroup GLDraw - @brief Draw a single color string to color texture. - - Escape sequences are not working correctly. - - @param[in,out] tex Texture to draw to. - @param[in] x X position to draw text at. - @param[in] y Y position to draw text at. - @param[in] color Color of text. - @param[in] font Pointer to font buffer. System font by default. -*/ -U0 GLDrawString(CGLTex2D *tex, I64 x, I64 y, U8 *str, CBGR24 color, - U64 *font = text.font) -{ - I64 cur = 0, // String cursor - xCur, yCur; // Screen cursors - - xCur = x; - yCur = y; - - while (str[cur] != NULL) - { - switch (str[cur]) - { - // Escape sequence - case '\\': - switch (str[cur + 1]) - { - case 'n': - xCur = x; - yCur += FONT_HEIGHT; - "NEWLINE\n"; - break; - - // Not a real tab, but what mong uses tabs in labels? - case 't': - xCur += FONT_WIDTH * 4; - break; - - case '\\': - GLDrawChar(tex, xCur, yCur, '\\', color, font); - xCur += FONT_WIDTH; - break; - - } - cur += 2; - break; - - case ' ': - cur++; - xCur += FONT_WIDTH; - break; - - default: - GLDrawChar(tex, xCur, yCur, str[cur], color, font); - cur++; - xCur += FONT_WIDTH; - break; - } - } -} \ No newline at end of file diff --git a/src/Zenith/CosmicGL/Draw/Texture.CC b/src/Zenith/CosmicGL/Draw/Texture.CC deleted file mode 100755 index a88fa1d2..00000000 --- a/src/Zenith/CosmicGL/Draw/Texture.CC +++ /dev/null @@ -1,48 +0,0 @@ - -/** - @ingroup GLDraw - @brief Draw non-transformed color texture with blit operation. - - Does not yet check if texture being drawn is entirely inside the texture - being drawn to. - - @param[in,out] dst Destination texture to draw to. - @param[in] src Source texture to draw. - @param[in] x X location to draw texture. - @param[in] y Y location to draw texture. - @param[in] transparent (optional) use alpha as mask. False by default. -*/ -U0 GLDrawTexture(CGLTex2D *dst, CGLTex2D *src, I64 x, I64 y, - Bool transparent = FALSE) -{ - I64 xC, yC, // Current width/height position being copied from - srcW, srcH, dstW; - - srcW = src->w; - srcH = src->h; - dstW = dst->w; - - if (transparent) - { - for (yC = 0; yC < srcH; yC++) - { - for (xC = 0; xC < srcW; xC++) - { - if (src->rawBuf[xC + yC * srcW].pad == 255) - { - // Assume target doesn't care about alpha byte being copied - dst->rawBuf[x + xC + (y + yC) * dstW] = - src->rawBuf[xC + yC * srcW]; - } - } - } - } - else - { - for (yC = 0; yC < srcH; yC++) - { - MemCopy(&dst->rawBuf[x + (y + yC) * dstW], - &src->rawBuf[yC * srcW], sizeof(CBGR24) * srcW); - } - } -} \ No newline at end of file diff --git a/src/Zenith/CosmicGL/MakeCosmicGL.CC b/src/Zenith/CosmicGL/MakeCosmicGL.CC deleted file mode 100755 index 3cbd5eea..00000000 --- a/src/Zenith/CosmicGL/MakeCosmicGL.CC +++ /dev/null @@ -1,18 +0,0 @@ -/* Include this file to rebuild the CosmicGL library. */ - -Option(OPTf_WARN_PAREN, ON); -Option(OPTf_WARN_DUP_TYPES, ON); - -Cd(__DIR__);; -#include "Math/Types" -#include "Math/Vec4" -#include "Math/Vec3" -#include "Math/Conversion" -#include "Texture/Texture" -#include "Draw/Primitive" -#include "Draw/Texture" -#include "Draw/Rectangle" -#include "Draw/Text" -#include "WAD/WADTypes" -#include "WAD/WAD" -#include "Texture/TextureImport" \ No newline at end of file diff --git a/src/Zenith/CosmicGL/Math/Conversion.CC b/src/Zenith/CosmicGL/Math/Conversion.CC deleted file mode 100644 index 275a81f2..00000000 --- a/src/Zenith/CosmicGL/Math/Conversion.CC +++ /dev/null @@ -1,19 +0,0 @@ -asm -{ -_DOUBLE_TO_SINGLE:: - PUSH RBP - MOV RBP, RSP - -// - - POP RBP - RET1 8 -} -/** - @ingroup gfxmath - @brief Convert double-precision scalar to single-precision. - - @param[in] d Double-precision scalar. - @return Single-precision scalar. -*/ -_extern _DOUBLE_TO_SINGLE I32 DoubleToSingle(F64 d); \ No newline at end of file diff --git a/src/Zenith/CosmicGL/Math/Types.CC b/src/Zenith/CosmicGL/Math/Types.CC deleted file mode 100644 index bec74b80..00000000 --- a/src/Zenith/CosmicGL/Math/Types.CC +++ /dev/null @@ -1,49 +0,0 @@ -/** - @defgroup gfxmath Graphics Math - @brief SSE accelerated graphics math. -*/ - - -/** - @ingroup gfxmath - @brief Single-precision floating point 2D vector. - - Must be kept on 16-byte alignment in memory. -*/ -class CVec2 -{ - I32 x, y, z, w; -}; - -/** - @ingroup gfxmath - @brief Single-precision floating point 3D vector. - - Must be kept on 16-byte alignment in memory. -*/ -class CVec3 -{ - I32 x, y, z, w; -}; - -/** - @ingroup gfxmath - @brief Single-precision floating point 4D vector. - - Must be kept on 16-byte alignment in memory. -*/ -class CVec4 -{ - I32 x, y, z, w; -}; - -/** - @ingroup gfxmath - @brief Single-precision floating point 4x4 matrix. - - Must be kept on 16 byte alignment in memory. -*/ -class CMat4 -{ - U32 e[16]; -}; \ No newline at end of file diff --git a/src/Zenith/CosmicGL/Math/Vec3.CC b/src/Zenith/CosmicGL/Math/Vec3.CC deleted file mode 100644 index fc3f4bc4..00000000 --- a/src/Zenith/CosmicGL/Math/Vec3.CC +++ /dev/null @@ -1,216 +0,0 @@ - -asm -{ -_VEC3:: - PUSH RBP - MOV RBP, RSP - - MOV RAX, SF_ARG4[RBP] // = *dest - -// CVTSD2SS XMM0, SF_ARG1[RBP] - DU8 0xF2, 0x0F, 0x5A, 0x45, 0x10; -// MOVSS [RAX], XMM0 - DU8 0xF3, 0x0F, 0x11, 0x00; - -// CVTSD2SS XMM0, SF_ARG1[RBP] - DU8 0xF2, 0x0F, 0x5A, 0x45, 0x18; -// MOVSS 4[RAX], XMM0 - DU8 0xF3, 0x0F, 0x11, 0x40, 0x04; - -// CVTSD2SS XMM0, SF_ARG1[RBP] - DU8 0xF2, 0x0F, 0x5A, 0x45, 0x20; -// MOVSS 8[RAX], XMM0 - DU8 0xF3, 0x0F, 0x11, 0x40, 0x08; - - POP RBP - RET1 32 -} -/** - @ingroup gfxmath - @brief Initialize members of a vector with double-precision floats. - - @param[in] x X component. - @param[in] y Y component. - @param[in] z Z component. - @param[in,out] dest Destination -*/ -_extern _VEC3 U0 Vec3(F64 x, F64 y, F64 z, CVec3 *dest); - -asm -{ -_VEC3_PRINT:: - PUSH RBP - MOV RBP, RSP - - MOV RAX, SF_ARG1[RBP] // = *v - SUB RSP, 24 - -// CVTSS2SD XMM0, 8[RAX] // (F64) v->z - DU8 0xF3, 0x0F, 0x5A, 0x40, 0x08; -// MOVSD 16[RSP], XMM0 // Push v->z - DU8 0xF2, 0x0F, 0x11, 0x44, 0x24, 0x10; - -// CVTSS2SD XMM0, 4[RAX] // (F64) v->y - DU8 0xF3, 0x0F, 0x5A, 0x40, 0x04; -// MOVSD 8[RSP], XMM0 // Push v->y - DU8 0xF2, 0x0F, 0x11, 0x44, 0x24, 0x08; - -// CVTSS2SD XMM0, [RAX] // (F64) v->x - DU8 0xF3, 0x0f, 0x5A, 0x00; -// MOVSD [RSP], XMM0 // Push v->x - DU8 0xF2, 0x0F, 0x11, 0x04, 0x24; - - PUSH 3 // # of varargs - PUSH "X: %n | Y: %n | Z: %n\n" - CALL &Print - ADD RSP, 40 - - POP RBP - RET1 8 -} -/** - @ingroup gfxmath - @brief Print members of a vector. - - @param[in] v Vector -*/ -_extern _VEC3_PRINT U0 Vec3Print(CVec3 *v); - -/** - @ingroup gfxmath - @brief Copy all members of a vector to destination. - - @param[in] src Source - @param[in,out] dest Destination -*/ -_extern _VEC4_COPY U0 Vec3Copy(CVec3 *src, CVec3 *dest); - -asm -{ -_VEC3_IS_EQUAL:: - PUSH RBP - MOV RBP, RSP - - MOV RAX, SF_ARG1[RBP] // = *a -// MOVAPS XMM0, [RAX] - DU8 0x0F, 0x28, 0x00; - MOV RAX, SF_ARG2[RBP] // = *b -// MOVAPS XMM1, [RAX] - DU8 0x0F, 0x28, 0x08; -// CMPPS XMM0, XMM1, 0 // CMPEQPS - DU8 0x0F, 0xC2, 0xC1, 0x00; - -// PMOVMSKB RAX, XMM0 - DU8 0x66, 0x0F, 0xD7, 0xC0; - AND RAX, 0xFFF - CMP RAX, 0xFFF - JNZ _is_not_equal - MOV RAX, 1 - JMP _return -_is_not_equal: - MOV RAX, 0 - -_return: - POP RBP - RET1 16 -} -/** - @ingroup gfxmath - @brief Checks if two vectors are equal. - - @param[in] a Vector 1 - @param[in] b Vector 2 -*/ -_extern _VEC3_IS_EQUAL Bool Vec3IsEqual(CVec3 *a, CVec3 *b); - -/** - @ingroup gfxmath - @brief Sum of two vectors. - - @param[in] a Vector 1 - @param[in] b Vector 2 - @param[in,out] dest Destination -*/ -_extern _VEC4_ADD U0 Vec3Add(CVec3 *a, CVec3 *b, CVec3 *dest); - -/** - @ingroup gfxmath - @brief Add a scalar to a vector. - - @param[in] v Vector - @param[in] s Scalar - @param[in,out] dest Destination -*/ -_extern _VEC4_ADDS U0 Vec3AddS(CVec3 *v, I32 *s, CVec3 *dest); - -/** - @ingroup gfxmath - @brief Difference of two vectors. - - @param[in] a Vector 1 - @param[in] b Vector 2 - @param[in,out] dest Destination -*/ -_extern _VEC4_SUB U0 Vec3Sub(CVec3 *a, CVec3 *b, CVec3 *dest); - -/** - @ingroup gfxmath - @brief Subtract a scalar from a vector. - - @param[in] v Vector - @param[in] s Scalar - @param[in,out] dest Destination -*/ -_extern _VEC4_SUBS U0 Vec3SubS(CVec3 *v, I32 *s, CVec3 *dest); - -/** - @ingroup gfxmath - @brief Product of two vectors (element multiplication). - - @param[in] a Vector 1 - @param[in] b Vector 2 - @param[in,out] dest Destination -*/ -_extern _VEC4_MUL U0 Vec3Mul(CVec3 *a, CVec3 *b, CVec3 *dest); - -/** - @ingroup gfxmath - @brief Scale a vector by a scalar. - - @param[in] v Vector - @param[in] s Scalar - @param[in,out] dest Destination -*/ -_extern _VEC4_MULS U0 Vec3MulS(CVec3 *v, I32 *s, CVec3 *dest); - -/** - @ingroup gfxmath - @brief Quotient of two vectors. - - @param[in] a Vector 1 - @param[in] b Vector 2 - @param[in,out] dest Destination -*/ -_extern _VEC4_DIV U0 Vec3Div(CVec3 *a, CVec3 *b, CVec3 *dest); - -/** - @ingroup gfxmath - @brief Divide a vector by a scalar. - - @param[in] v Vector - @param[in] s Scalar - @param[in,out] dest Destination -*/ -_extern _VEC4_DIVS U0 Vec3DivS(CVec3 *v, I32 *s, CVec3 *dest); - - - - - - - - - - - - diff --git a/src/Zenith/CosmicGL/Math/Vec4.CC b/src/Zenith/CosmicGL/Math/Vec4.CC deleted file mode 100644 index f1b624b3..00000000 --- a/src/Zenith/CosmicGL/Math/Vec4.CC +++ /dev/null @@ -1,436 +0,0 @@ - -asm -{ -_VEC4:: - PUSH RBP - MOV RBP, RSP - - MOV RAX, SF_ARG5[RBP] // = *dest - -// CVTSD2SS XMM0, SF_ARG1[RBP] - DU8 0xF2, 0x0F, 0x5A, 0x45, 0x10; -// MOVSS [RAX], XMM0 - DU8 0xF3, 0x0F, 0x11, 0x00; - -// CVTSD2SS XMM0, SF_ARG2[RBP] - DU8 0xF2, 0x0F, 0x5A, 0x45, 0x18; -// MOVSS 4[RAX], XMM0 - DU8 0xF3, 0x0F, 0x11, 0x40, 0x04; - -// CVTSD2SS XMM0, SF_ARG3[RBP] - DU8 0xF2, 0x0F, 0x5A, 0x45, 0x20; -// MOVSS 8[RAX], XMM0 - DU8 0xF3, 0x0F, 0x11, 0x40, 0x08; - -// CVTSD2SS XMM0, SF_ARG4[RBP] - DU8 0xF2, 0x0F, 0x5A, 0x45, 0x28; -// MOVSS 16[RAX], XMM0 - DU8 0xF3, 0x0F, 0x11, 0x40, 0x10; - - POP RBP - RET1 40 -} -/** - @ingroup gfxmath - @brief Initialize members of a vector with double-precision floats. - - @param[in] x X component. - @param[in] y Y component. - @param[in] z Z component. - @param[in,out] dest Destination -*/ -_extern _VEC4 U0 Vec4(F64 x, F64 y, F64 z, F64 w, CVec4 *dest); - -asm -{ -_VEC4_PRINT:: - PUSH RBP - MOV RBP, RSP - - MOV RAX, SF_ARG1[RBP] // = *v - SUB RSP, 32 - - -// CVTSS2SD XMM0, 12[RAX] // (F64) v->w - DU8 0xF3, 0x0F, 0x5A, 0x40, 0x0C; -// MOVSD 24[RSP], XMM0 // Push v->w - DU8 0xF2, 0x0F, 0x11, 0x44, 0x24, 0x18; - -// CVTSS2SD XMM0, 8[RAX] // (F64) v->z - DU8 0xF3, 0x0F, 0x5A, 0x40, 0x08; -// MOVSD 16[RSP], XMM0 // Push v->z - DU8 0xF2, 0x0F, 0x11, 0x44, 0x24, 0x10; - -// CVTSS2SD XMM0, 4[RAX] // (F64) v->y - DU8 0xF3, 0x0F, 0x5A, 0x40, 0x04; -// MOVSD 8[RSP], XMM0 // Push v->y - DU8 0xF2, 0x0F, 0x11, 0x44, 0x24, 0x08; - -// CVTSS2SD XMM0, [RAX] // (F64) v->x - DU8 0xF3, 0x0f, 0x5A, 0x00; -// MOVSD [RSP], XMM0 // Push v->x - DU8 0xF2, 0x0F, 0x11, 0x04, 0x24; - - PUSH 4 // # of varargs - PUSH "X: %n | Y: %n | Z: %n | W: %n\n" - CALL &Print - ADD RSP, 48 - - POP RBP - RET1 8 -} -/** - @ingroup gfxmath - @brief Print members of a vector. - - @param[in] v Vector -*/ -_extern _VEC4_PRINT U0 Vec4Print(CVec4 *v); - -asm -{ -_VEC4_COPY:: - PUSH RBP - MOV RBP, RSP - - MOV RAX, SF_ARG1[RBP] // = *src -// MOVAPS XMM0, [RAX] - DU8 0x0F, 0x28, 0x00; - MOV RAX, SF_ARG2[RBP] // = *dest -// MOVAPS [RAX], XMM0 - DU8 0x0F, 0x29, 0x00; - - POP RBP - RET1 16 -} -/** - @ingroup gfxmath - @brief Copy all members of a vector to destination. - - @param[in] src Source - @param[in,out] dest Destination -*/ -_extern _VEC4_COPY U0 Vec4Copy(CVec4 *src, CVec4 *dest); - -/** - @ingroup gfxmath - @brief Checks if two vectors are equal. - - @param[in] a Vector 1 - @param[in] b Vector 2 - @return TRUE if equal. -*/ -Bool Vec4IsEqual(CVec4 *a, CVec4 *b) -{ - U64 *c, *d; - - c = a; - d = b; - if (c[0] == d[0] && c[1] == d[1]) - return 1; - else - return 0; -} - -asm -{ -_VEC4_ADD:: - PUSH RBP - MOV RBP, RSP - - MOV RAX, SF_ARG1[RBP] -// MOVAPS XMM0, [RAX] - DU8 0x0F, 0x28, 0x00; - MOV RAX, SF_ARG2[RBP] -// MOVAPS XMM1, [RAX] - DU8 0x0F, 0x28, 0x08; -// ADDPS XMM0, XMM1 - DU8 0x0F, 0x58, 0xC1; - MOV RAX, SF_ARG3[RBP] -// MOVAPS [RAX], XMM0 - DU8 0x0F, 0x29, 0x00; - - POP RBP - RET1 24 -} -/** - @ingroup gfxmath - @brief Sum of two vectors. - - @param[in] a Vector 1 - @param[in] b Vector 2 - @param[in,out] dest Destination -*/ -_extern _VEC4_ADD U0 Vec4Add(CVec4 *a, CVec4 *b, CVec4 *dest); - -asm -{ -_VEC4_ADDS:: - PUSH RBP - MOV RBP, RSP - - MOV RAX, SF_ARG1[RBP] -// MOVAPS XMM0, [RAX] - DU8 0x0F, 0x28, 0x00; -// MOVSS XMM1, SF_ARG2[RBP] - DU8 0xF3, 0x0F, 0x10, 0x4D, 0x18; -// SHUFPS XMM1, XMM1, 0 - DU8 0x0F, 0xC6, 0xC9, 0x00; -// ADDPS XMM0, XMM1 - DU8 0x0F, 0x58, 0xC1; - MOV RAX, SF_ARG3[RBP] -// MOVAPS [RAX], XMM0 - DU8 0x0F, 0x29, 0x00; - - POP RBP - RET1 24 -} -/** - @ingroup gfxmath - @brief Add a scalar to a vector. - - @param[in] v Vector - @param[in] s Scalar - @param[in,out] dest Destination -*/ -_extern _VEC4_ADDS U0 Vec4AddS(CVec4 *v, I32 *s, CVec4 *dest); - -asm -{ -_VEC4_SUB:: - PUSH RBP - MOV RBP, RSP - - MOV RAX, SF_ARG1[RBP] -// MOVAPS XMM0, [RAX] - DU8 0x0F, 0x28, 0x00; - MOV RAX, SF_ARG2[RBP] -// MOVAPS XMM1, [RAX] - DU8 0x0F, 0x28, 0x08; -// SUBPS XMM0, XMM1 - DU8 0x0F, 0x5C, 0xC1; - MOV RAX, SF_ARG3[RBP] -// MOVAPS [RAX], XMM0 - DU8 0x0F, 0x29, 0x00; - - POP RBP - RET1 24 -} -/** - @ingroup gfxmath - @brief Difference of two vectors. - - @param[in] a Vector 1 - @param[in] b Vector 2 - @param[in,out] dest Destination -*/ -_extern _VEC4_SUB U0 Vec4Sub(CVec4 *a, CVec4 *b, CVec4 *dest); - -asm -{ -_VEC4_SUBS:: - PUSH RBP - MOV RBP, RSP - - MOV RAX, SF_ARG1[RBP] -// MOVAPS XMM0, [RAX] - DU8 0x0F, 0x28, 0x00; -// MOVSS XMM1, SF_ARG2[RBP] - DU8 0xF3, 0x0F, 0x10, 0x4D, 0x18; -// SHUFPS XMM1, XMM1, 0 - DU8 0x0F, 0xC6, 0xC9, 0x00; -// SUBPS XMM0, XMM1 - DU8 0x0F, 0x5C, 0xC1; - MOV RAX, SF_ARG3[RBP] -// MOVAPS [RAX], XMM0 - DU8 0x0F, 0x29, 0x00; - - POP RBP - RET1 24 -} -/** - @ingroup gfxmath - @brief Subtract a scalar from a vector. - - @param[in] v Vector - @param[in] s Scalar - @param[in,out] dest Destination -*/ -_extern _VEC4_SUBS U0 Vec4SubS(CVec4 *v, I32 *s, CVec4 *dest); - -asm -{ -_VEC4_MUL:: - PUSH RBP - MOV RBP, RSP - - MOV RAX, SF_ARG1[RBP] -// MOVAPS XMM0, [RAX] - DU8 0x0F, 0x28, 0x00; - MOV RAX, SF_ARG2[RBP] -// MOVAPS XMM1, [RAX] - DU8 0x0F, 0x28, 0x08; -// MULPS XMM0, XMM1 - DU8 0x0F, 0x59, 0xC1; - MOV RAX, SF_ARG3[RBP] -// MOVAPS [RAX], XMM0 - DU8 0x0F, 0x29, 0x00; - - POP RBP - RET1 24 -} -/** - @ingroup gfxmath - @brief Product of two vectors (element multiplication). - - @param[in] a Vector 1 - @param[in] b Vector 2 - @param[in,out] dest Destination -*/ -_extern _VEC4_MUL U0 Vec4Mul(CVec4 *a, CVec4 *b, CVec4 *dest); - -asm -{ -_VEC4_MULS:: - PUSH RBP - MOV RBP, RSP - - MOV RAX, SF_ARG1[RBP] -// MOVAPS XMM0, [RAX] - DU8 0x0F, 0x28, 0x00; -// MOVSS XMM1, SF_ARG2[RBP] - DU8 0xF3, 0x0F, 0x10, 0x4D, 0x18; -// SHUFPS XMM1, XMM1, 0 - DU8 0x0F, 0xC6, 0xC9, 0x00; -// MULPS XMM0, XMM1 - DU8 0x0F, 0x59, 0xC1; - MOV RAX, SF_ARG3[RBP] -// MOVAPS [RAX], XMM0 - DU8 0x0F, 0x29, 0x00; - - POP RBP - RET1 24 -} -/** - @ingroup gfxmath - @brief Scale a vector by a scalar. - - @param[in] v Vector - @param[in] s Scalar - @param[in,out] dest Destination -*/ -_extern _VEC4_MULS U0 Vec4MulS(CVec4 *v, I32 *s, CVec4 *dest); - - -asm -{ -_VEC4_DIV:: - PUSH RBP - MOV RBP, RSP - - MOV RAX, SF_ARG1[RBP] -// MOVAPS XMM0, [RAX] - DU8 0x0F, 0x28, 0x00; - MOV RAX, SF_ARG2[RBP] -// MOVAPS XMM1, [RAX] - DU8 0x0F, 0x28, 0x08; -// DIVPS XMM0, XMM1 - DU8 0x0F, 0x5E, 0xC1; - MOV RAX, SF_ARG3[RBP] -// MOVAPS [RAX], XMM0 - DU8 0x0F, 0x29, 0x00; - - POP RBP - RET1 24 -} -/** - @ingroup gfxmath - @brief Quotient of two vectors. - - @param[in] a Vector 1 - @param[in] b Vector 2 - @param[in,out] dest Destination -*/ -_extern _VEC4_DIV U0 Vec4Div(CVec4 *a, CVec4 *b, CVec4 *dest); - -asm -{ -_VEC4_DIVS:: - PUSH RBP - MOV RBP, RSP - - MOV RAX, SF_ARG1[RBP] -// MOVAPS XMM0, [RAX] - DU8 0x0F, 0x28, 0x00; -// MOVSS XMM1, SF_ARG2[RBP] - DU8 0xF3, 0x0F, 0x10, 0x4D, 0x18; -// SHUFPS XMM1, XMM1, 0 - DU8 0x0F, 0xC6, 0xC9, 0x00; -// DIVPS XMM0, XMM1 - DU8 0x0F, 0x5E, 0xC1; - MOV RAX, SF_ARG3[RBP] -// MOVAPS [RAX], XMM0 - DU8 0x0F, 0x29, 0x00; - - POP RBP - RET1 24 -} -/** - @ingroup gfxmath - @brief Scale a vector by a scalar. - - @param[in] v Vector - @param[in] s Scalar - @param[in,out] dest Destination -*/ -_extern _VEC4_DIVS U0 Vec4DivS(CVec4 *v, I32 *s, CVec4 *dest); - -asm -{ -_VEC4_DOT:: - PUSH RBP - MOV RBP, RSP - - MOV RAX, SF_ARG1[RBP] -// MOVAPS XMM0, [RAX] - DU8 0x0F, 0x28, 0x00; - MOV RAX, SF_ARG2[RBP] -// MOVAPS XMM1, [RAX] - DU8 0x0F, 0x29, 0x08; -// MULPS XMM0, XMM1 - DU8 0x0F, 0x59, 0xC1; - -// MOVHLPS XMM1, XMM0 - DU8 0x0F, 0x12, 0xC8; -// ADDPS XMM0, XMM1 - DU8 0x0F, 0x58, 0xC1; -// MOVSS XMM1, XMM0 - DU8 0xF3, 0x0F, 0x10, 0xC8; -// SHUFPS XMM1, XMM1, 0 - DU8 0x0F, 0xC6, 0xC9, 0x00; -// ADDSS XMM0, XMM1 - DU8 0xF3, 0x0F, 0x58, 0xC1; - -// MOVQ RAX, XMM0 - DU8 0x66, 0x48, 0x0F, 0x7E, 0xC0; - - POP RBP - RET1 16 -} -/** - @ingroup gfxmath - @brief Dot product of two vectors. - - @param[in] a Vector 1 - @param[in] b Vector 2 - @return Dot product. -*/ -_extern _VEC4_DOT I32 Vec4Dot(CVec4 *a, CVec4 *b); - - - - - - - - diff --git a/src/Zenith/CosmicGL/Test/TestMath.CC b/src/Zenith/CosmicGL/Test/TestMath.CC deleted file mode 100644 index 61123c0d..00000000 --- a/src/Zenith/CosmicGL/Test/TestMath.CC +++ /dev/null @@ -1,44 +0,0 @@ -Cd(__DIR__);; -#include "../Math/Types" -#include "../Math/Vec4" -#include "../Math/Vec3" - -CVec4 *a = MAllocAligned(sizeof(CVec4), 16); -CVec4 *b = MAllocAligned(sizeof(CVec4), 16); -CVec4 *dest = MAllocAligned(sizeof(CVec4), 16); -CVec4 *trueRes = MAllocAligned(sizeof(CVec4), 16); - -// Note that some smaller vector functions are identical to larger vector -// functions so they do not get tested. - -//----------------------------------------------------------------------------- -// Vec4Copy - -Vec4(1.25, 2.5, 3.75, 5.0, a); -Vec4(0.0, 0.0, 0.0, 0.0, dest); -Vec4Copy(a, dest); -if (!Vec4IsEqual(a, dest)) -{ - "[WARNING] Vec4Copy NOT WORKING CORRECTLY! RESULT VECTOR:\n"; - Vec4Print(dest); -} -//----------------------------------------------------------------------------- -// Vec4Add - -Vec4(1.25, -2.5, 3.75, -5.0, a); -Vec4(-1.0, 2.0, -3.0, 4.0, b); -Vec4(0.25, -0.5, 0.75, -1.0, trueRes); -Vec4Add(a, b, dest); -// Looks like I have to use actual float compare and not direct -// equal compare. I'll fix Vec4IsEqual to do this. -if (!Vec3IsEqual(dest, trueRes)) -{ - "[WARNING] Vec4Add NOT WORKING CORRECTLY! RESULT VECTOR:\n"; - Vec3Print(dest); -} -//----------------------------------------------------------------------------- - -Free(a); -Free(b); -Free(dest); - diff --git a/src/Zenith/CosmicGL/Texture/Texture.CC b/src/Zenith/CosmicGL/Texture/Texture.CC deleted file mode 100755 index b5f02fc5..00000000 --- a/src/Zenith/CosmicGL/Texture/Texture.CC +++ /dev/null @@ -1,199 +0,0 @@ -/** - @defgroup GLTex2D Texture - @brief The core of the library, almost all functions either read from - or write to textures. -*/ - -/** - @ingroup GLTex2D - @brief Raw format is a CBGR24 rawBuf array of size w * h in row-major - order. -*/ -#define TEX2D_RAW 1 - -/** - @ingroup GLTex2D - @brief Depth format is a F64 depthBuf array of size w * h in row-major - order. -*/ -#define TEX2D_DEPTH 2 - -/** - @ingroup GLTex2D - @brief The texture class, just about everything reads from or writes to this. -*/ -class CGLTex2D -{ - I64 type; // Type, see TEX2D_ macros above - I64 w; // Width - I64 h; // Height - I64 l; // Left offset if applicable (for use with sprite textures) - I64 t; // Top offset if applicable (for use with sprite textures) - I64 mipmaps; // Mipmaps, not currently being used - CBGR24 *rawBuf; // Raw color buffer. Size: w * h - F64 *depthBuf; // Depth buffer. Size: w * h, pixels are depth. -}; - -/** - @ingroup GLTex2D - @brief Initialize texture. - - @param[in,out] tex Uninitialized texture to initialize. - @param[in] type Type of texture. See TEX2D_ macros for options. - @param[in] w Width - @param[in] h Height - @param[in] l (Optional) left offset for use with sprite textures. - @param[in] t (Optional) top offset for use with sprite textures. -*/ -U0 GLTex2DInit(CGLTex2D *tex, I64 type, I64 w, I64 h, I64 l = 0, I64 t = 0) -{ - tex->w = w; - tex->h = h; - tex->l = l; - tex->t = t; - tex->type = type; - - switch (type) - { - case TEX2D_RAW: - tex->rawBuf = MAlloc(4 * tex->w * tex->h); - break; - - case TEX2D_DEPTH: - tex->depthBuf = MAlloc(sizeof(F64) * tex->w * tex->h); - break; - } -} - -/** - @ingroup GLTex2D - @brief Free texture. - - @param[in,out] tex Texture to free. -*/ -U0 GLTex2DFree(CGLTex2D *tex) -{ - switch (tex->type) - { - case TEX2D_RAW: - Free(tex->rawBuf); - break; - - case TEX2D_DEPTH: - Free(tex->depthBuf); - break; - } -} - -/** - @ingroup GLTex2D - @brief Fill texture with color. Only works with raw textures. - - @param[in,out] tex Texture to color fill. - @param[in] color Color to fill texture with. -*/ -U0 GLTex2DColorFill(CGLTex2D *tex, CBGR24 color) -{ - MemSetU32(tex->rawBuf, color, tex->w * tex->h); -} - -/** - @ingroup GLTex2D - @brief Reset depth texture. Set all pixels to far depth. - - @param[in,out] tex Depth texture to reset. -*/ -U0 GLTex2DDepthReset(CGLTex2D *tex) -{ - F64 depth = 2.0; - I64 *iDepth = &depth; - MemSetI64(tex->depthBuf, *iDepth, tex->w * tex->h); -} - -/** - @ingroup GLTex2D - @brief Draw texture directly to display buffer. Maps non-visible textures - like depth to a visible palette when drawing for visual debugging. - - This may cause fighting with the operating system and flashing/text or - other visual updates might show through. If using this for an application, - be sure to disable the operating system from drawing to the display buffer - in GrWinUpdate32. - - @param[in] tex Texture to draw to display buffer. - @param[in] x X position on screen to draw texture. - @param[in] y Y position on screen to draw texture. -*/ -U0 GLTex2DDebugDisp(CGLTex2D *tex, I64 x, I64 y) -{ - // i, j = sampling x, y position on texture - I64 i, j; - - // For scaling depth buffer to 8 bit color - F64 scaled; - CBGR24 color; - - for (j = 0; j < tex->h; j++) - { - for (i = 0; i < tex->w; i++) - { - switch (tex->type) - { - case TEX2D_RAW: - text.fb_alias[x + i + (y + j) * GR_WIDTH] - = tex->rawBuf[i + j * tex->w]; - break; - - case TEX2D_DEPTH: - // Scaled to display 0-1024 depth - scaled = tex->depthBuf[i + j * tex->w] / 4; - color.r = scaled; - color.g = scaled; - color.b = scaled; - text.fb_alias[x + i + (y + j) * GR_WIDTH] = color; - break; - } - } - } -} - -/** - @ingroup GLTex2D - @brief Sample color from color textures at normalized UV coordinate - (0.0-1.0). Coordinates over 1.0 loop causing a repeating texture effect. - - Does not handle filtering or mip maps (yet). - - @param[in,out] col Sets color at this address to sampled color. - @param[in] tex Texture to sample from. - @param[in] u Normalized (0.0-1.0) x coordinate to sample from. - @param[in] v Normalized (0.0-1.0) y coordinate to sample from. -*/ -U0 GLTex2DSampleNorm(CBGR24 *col, CGLTex2D *tex, F64 u, F64 v) -{ - I64 x, y; - - x = u * tex->w; - y = v * tex->h; - x %= tex->w; - y %= tex->h; - - *col = tex->rawBuf[x + y * tex->w]; -} - -/** - @ingroup GLTex2D - @brief Sample color from color textures at UV coordinate. Coordinates - over texture dimensions loop causing a repeating texture effect. - - @param[in,out] col Sets color at this address to sampled color. - @param[in] u X coordinate to sample from. - @param[in] v Y coordinate to sample from. -*/ -U0 GLTex2DSampleCoord(CBGR24 *col, CGLTex2D *tex, I64 u, I64 v) -{ - u %= tex->w; - v %= tex->h; - - *col = tex->rawBuf[u + v * tex->w]; -} diff --git a/src/Zenith/CosmicGL/Texture/TextureImport.CC b/src/Zenith/CosmicGL/Texture/TextureImport.CC deleted file mode 100755 index 6732fd8d..00000000 --- a/src/Zenith/CosmicGL/Texture/TextureImport.CC +++ /dev/null @@ -1,143 +0,0 @@ -/** - @ingroup GLTex2D - @brief Loads texture from Half-Life WAD file. - - @param[in,out] tex Unitialized texture to load into. - @param[in] wad WAD file to load from. - @param[in] texName Name of texture lump in WAD file to load. -*/ -U0 GLTex2DLoadWAD(CGLTex2D *tex, CGLWAD *wad, U8 *texName) -{ - I64 i, texIndex; - U8 *pixel, *palette; - CGLWADFileLump *lump; - CGLWADTex *wadTex; - CBGR24 color; - - // Get lump handle - texIndex = GLWADFindLump(wad, texName, &lump); - - if (texIndex < 0) - { - "[ERROR] CAN NOT FIND %s TEXTURE IN WAD %s\n", texName, wad->name; - return; - } - - // Map texture class to WAD file buffer - wadTex = wad->fileBuf + lump->filePos; - - GLTex2DInit(tex, TEX2D_RAW, wadTex->w, wadTex->h); - - // Map pixel array - pixel = wad->fileBuf + lump->filePos + wadTex->offsets[0]; - - // After the last byte of the fourth mipmap, there are two padding bytes, - // then a palette of 24-bit color (R, G, B). - palette = wad->fileBuf + lump->filePos + wadTex->offsets[3] + - wadTex->w * wadTex->h / 64 + 2; - // 1/64 here is the relative size of 4th mip map - - color.pad = 255; // Alpha - - for (i = 0; i < wadTex->w * wadTex->h; i++) - { - color.r = palette[pixel[i] * 3]; - color.g = palette[pixel[i] * 3 + 1]; - color.b = palette[pixel[i] * 3 + 2]; - - tex->rawBuf[i] = color; - - // Full blue pixels are transparent - if (color == 0xFF0000FF) - tex->rawBuf[i].pad = 0; - } -} - -/** - @internal - @ingroup GLTex2D - @brief BMP file header. -*/ -class CGLBMPHeader -{ - U8 szVersion[2]; // Should have 'BM' signature - U32 nSize; // File size in bytes - U32 pad; // Unused - U32 nOffset; // Offset from beginning of file to data; - - /* Info header is right after first header, so it is merged into this class */ - U32 nInfoSize; // Size of this info part of the header (=40) - U32 nWidth; // Image width in pixels - U32 nHeight; // Image height in pixels - U16 nPlanes; // Number of planes (=1) - U16 nPxBits; // Number of bits per pixel. This also indicates palette method: - // 1-bit: Monochrome - // 4-bit: 16-color palette - // 8-bit: 256-color palette - // 16-bit: 65565 colors - // 24-bit: 16M colors - U32 nCompression; // Type of compression: - // 0: BI_RGB no-compression - // 1: BI_RLE8 8-bit RLE encoding - // 2: BI_RLE4 4-bit RLE encoding - U32 nImageSize; // Size of image if compressed, (can =0 if not compressed) - U32 nXPxPerM; // Horizontal resolution, pixels per meter - U32 nYPxPerM; // Vertical resolution, pixels per meter - U32 nColors; // Number of actually used colors (ie. 256 for 8-bit color) - U32 nImptColors; // Number of important colors (=0 for all) -}; - -/** - @ingroup GLTex2D - @brief Loads BMP image. - - Supports standard uncompressed 24-bit color BMP images. - - @param[in,out] tex Uninitialized texture to load into. - @param[in] fname File name of BMP. -*/ -U0 GLTex2DLoadBMP(CGLTex2D *tex, U8 *fname) -{ - I64 imgPointer, - xPx, yPx; - U8 *bmp; - - bmp = FileRead(fname); - - // Map locations in buffer; - CGLBMPHeader *info = bmp; - - //if (StrMatch(bmp->szVersion, "BM") == 0) - if (info->szVersion[0] != 'B' && info->szVersion[1] != 'M') - { - "[ERROR] %s IS NOT A VALID BMP FILE!\n", fname; - return; - } - - if (info->nPxBits != 24 || info->nCompression != 0) - { - "[ERROR] %s IS NOT A 24-BIT UNCOMPRESSED BMP!\n", fname; - return; - } - - // Each pixel is 3 bytes in 24-bit BMP, however CTex2D uses CBGR24 - // which contains a final padding bit (32-bits per pixel). The rows - // also increment in the opposite direction. - imgPointer = bmp + info->nOffset; - - // Initialize with RAW format for 24-bit non-compressed color - GLTex2DInit(tex, TEX2D_RAW, info->nWidth, info->nHeight); - - for (yPx = 0; yPx < info->nHeight; yPx++) - { - for (xPx = 0; xPx < info->nWidth; xPx++) - { - MemCopy(&tex->rawBuf[xPx + info->nWidth * yPx], - imgPointer + (xPx + info->nWidth * (info->nHeight - yPx)) - * 3, 3); - } - } - - Free(bmp); -} - diff --git a/src/Zenith/CosmicGL/WAD/WAD.CC b/src/Zenith/CosmicGL/WAD/WAD.CC deleted file mode 100755 index dee82b0a..00000000 --- a/src/Zenith/CosmicGL/WAD/WAD.CC +++ /dev/null @@ -1,141 +0,0 @@ - -/** - @internal - @ingroup GLWAD - @brief Hash table type for lump hash. -*/ -#define HTT_LUMP 69 - -/** - @internal - @ingroup GLWAD - @brief Hash for quick access of lump pointer and index by name. -*/ -class CHashGLWADLump : CHash -{ - CGLWADFileLump *lump; - I64 lumpIndex; -}; - -/** - @ingroup GLWAD - @brief Class for WAD currently in memory. - - Has easy access handles and a hash table to quickly find lumps. -*/ -class CGLWAD -{ - U8 *name; - U8 *fileBuf; - CGLWADInfo *info; // WAD info header handle - CGLWADFileLump *lumps; // File lumps array handle - CHashTable *lumpTable; // Hash table for quick access of - // lumps by name. - CHashGLWADLump *hashLumps; // Hashes for lumpTable. -}; - -/** - @ingroup GLWAD - @brief Finds lump with name and returns it's index in the WAD. Also - points input lump pointer to it if found. - - @param[in] wad WAD to search. - @param[in] name Lump name to find. - @param[in,out] lump Points to lump if found. - @return Lump index in WAD. -1 if not found. -*/ -I64 GLWADFindLump(CGLWAD *wad, U8 *name, CGLWADFileLump **lump = NULL) -{ - CHashGLWADLump *lumpHash; - lumpHash = HashFind(name, wad->lumpTable, HTT_LUMP); - - if (lumpHash != NULL) - { - if (lump != NULL) - *lump = lumpHash->lump; - - return lumpHash->lumpIndex; - } - else - { - return -1; - } -} - -/** - @ingroup GLWAD - @brief Loads Half-Life WAD file. - - @param[in,out] wad Uninitialized WAD to load into. - @param[in] fname File name of WAD. -*/ -U0 GLWADLoad(CGLWAD *wad, U8 *fname) -{ - I64 i; - U32 *type; - - wad->fileBuf = FileRead(fname); - wad->name = StrNew(fname); - - // Map info handle to buffer - wad->info = wad->fileBuf; - - // Allocate hash table - wad->lumpTable = HashTableNew(wad->info->nLumps); // Table - wad->hashLumps = CAlloc(wad->info->nLumps * // Hashes - sizeof(CHashGLWADLump)); - - // Check version - type = wad->info->type; // Cast to U32 - - // 'WAD3': Half Life 'WAD2': Quake - if (*type == 0x33444157 || *type == 0x32444157) - { - // Map lumps to buffer - wad->lumps = wad->fileBuf + wad->info->lumpOffset; - - for (i = 0; i < wad->info->nLumps; i++) - { - // Copy name to hash - wad->hashLumps[i].str = CAlloc(17); - MemCopy(wad->hashLumps[i].str, wad->lumps[i].name, 16); - - // Set hash type - wad->hashLumps[i].type = HTT_LUMP; - - // Link lump to hash - wad->hashLumps[i].lump = &wad->lumps[i]; - - // Set lump index in hash to this index - wad->hashLumps[i].lumpIndex = i; - - // Add hash to table - HashAdd(&wad->hashLumps[i], wad->lumpTable); - } - return; - } - - "[ERROR] %s WAD TYPE NOT RECOGNIZED: %4ts\n", fname, type; -} - -/** - @ingroup GLWAD - @brief Free WAD. - - @param[in,out] wad WAD to free. -*/ -U0 GLWADFree(CGLWAD *wad) -{ - I64 i; - Free(wad->name); - Free(wad->lumpTable->body); - Free(wad->lumpTable); - - for (i = 0; i < wad->info->nLumps; i++) - { - Free(wad->hashLumps[i].str); - } - Free(wad->hashLumps); - - Free(wad->fileBuf); -} \ No newline at end of file diff --git a/src/Zenith/CosmicGL/WAD/WADTypes.CC b/src/Zenith/CosmicGL/WAD/WADTypes.CC deleted file mode 100755 index ebecf639..00000000 --- a/src/Zenith/CosmicGL/WAD/WADTypes.CC +++ /dev/null @@ -1,45 +0,0 @@ -/** - @defgroup GLWAD WAD File Loading - @brief Half-Life WAD file format management and parsing. -*/ - -/** - @internal - @ingroup GLWAD - @brief WAD file header. -*/ -class CGLWADInfo -{ - U8 type[4]; // Type of WAD, like IWAD/PWAD/WAD3 - I32 nLumps; // Number of lumps - I32 lumpOffset; // Offset to lump -}; - -/** - @ingroup GLWAD - @brief Half-Life WAD file lump. These point to "lumps" or directories in - the WAD. -*/ -class CGLWADFileLump -{ - I32 filePos; // Relative offset - I32 diskSize; // Size of lump (compressed) - I32 size; // Uncompressed lump size - I8 type; - I8 compression; // 0 if none - I16 pad; - U8 name[16]; -}; - -/** - @internal - @ingroup GLWAD - @brief Header to a Half-Life texture lump. -*/ -class CGLWADTex -{ - U8 name[16]; - U32 w; - U32 h; - U32 offsets[4]; // Relative offset to each mip map -}; \ No newline at end of file