mirror of
https://github.com/Zeal-Operating-System/ZealOS.git
synced 2025-04-05 07:45:07 +01:00
Remove VGA ROM font New font std, old font aux.
VGAFlush -> VBEFlush Fix some links, a couple graphics demos are broken
This commit is contained in:
parent
d62fa8e71c
commit
08a694e891
30 changed files with 2069 additions and 1944 deletions
src
0000Boot
Compiler
Demo
Doc
Home
Kernel.BIN.CKernel
Display.CCFontAux.CCFontStd.CCKDebug.CCKHashB.CCKMain.CCKMisc.CCKStart16.CCKTask.CCKernel.MAPKernel.PRJKernelA.HHKernelC.HHKeyDev.CC
Tmp
Zenith/Gr
Binary file not shown.
Binary file not shown.
|
@ -32,7 +32,7 @@ U0 Balloon()
|
|||
}
|
||||
|
||||
STI
|
||||
VGAFlush;
|
||||
VBEFlush;
|
||||
}
|
||||
|
||||
Balloon;
|
||||
|
|
|
@ -28,7 +28,7 @@ U0 GrDemo()
|
|||
"$$GREEN$$Load@30Hz:$$RED$$%5.1f%%$$FG$$\n",1/t,100*t*30.0;
|
||||
}
|
||||
//<CTRL-ALT-v> will flush screen VGA cache.
|
||||
VGAFlush;
|
||||
VBEFlush;
|
||||
}
|
||||
|
||||
GrDemo;
|
||||
|
|
|
@ -122,7 +122,7 @@ The ZenithOS graphics don't know VGA has changed.
|
|||
This bit tells ZenithOS to update whole screen.
|
||||
*/
|
||||
//<CTRL-ALT-v> will flush screen VGA cache.
|
||||
VGAFlush;
|
||||
VBEFlush;
|
||||
}
|
||||
|
||||
MiniGrLibDemo;
|
||||
|
|
|
@ -37,10 +37,10 @@ That means no read-modify-writes, too.
|
|||
*/
|
||||
Busy(4000000);
|
||||
|
||||
//ZenithOS has a 4 plane memory duplicate of the screen, $LK,"gr.screen_image",A="MN:CGrGlobals"$,
|
||||
//ZenithOS has a 4 plane memory duplicate of the screen, $LK,"gr.screen_image",A="MN:CGrGlobals"$,
|
||||
//and only writes actual changes.See $LK,"GrUpdateVGAGraphics",A="MN:GrUpdateVGAGraphics"$().
|
||||
//<CTRL-ALT-v> will flush screen VGA cache.
|
||||
VGAFlush;
|
||||
VBEFlush;
|
||||
}
|
||||
|
||||
Main;
|
||||
|
|
|
@ -2,8 +2,8 @@ $WW,1$$FG,5$$TX+CX,"Credits"$$FG$
|
|||
|
||||
I, $FG,2$Terry A. Davis$FG$, wrote all of TempleOS over the past 15.4 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! It is public domain, not GPL.
|
||||
|
||||
*) $LK,"::/Kernel/FontStd.CC"$, is taken from $FG,4$$TX,"FreeDOS",HTML="http://www.freedos.org"$$FG$. It's public domain.
|
||||
|
||||
*) $LK,"::/Kernel/FontAux.CC"$, is taken from $FG,4$$TX,"FreeDOS",HTML="http://www.freedos.org"$$FG$. It's public domain.
|
||||
|
||||
*) $LK,"ATA Reg and Cmd Definitions",A="MN:ATA_NOP"$ are originally from Linux. Later, I got the spec.
|
||||
|
||||
*) The heap algorithm, $LK,"::/Kernel/Memory/MAllocFree.CC"$, is adapted from one I saw at Ticketmaster when I worked on their VAX operating system.
|
||||
|
|
|
@ -30,7 +30,7 @@ $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$$TR,"Is it open source? How do I build it?"$
|
||||
$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$$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.
|
||||
|
@ -43,7 +43,7 @@ $ID,2$ZenithOS allocs mem as more items are displayed in the window. Also, Zenit
|
|||
$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-C,"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 0x10"$ 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$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$$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$$TR,"Why does it run code from stack addresses?"$
|
||||
|
|
|
@ -8,7 +8,7 @@ You can create new, independent heaps using $LK,"HeapCtrlInit",A="MN:HeapCtrlIni
|
|||
|
||||
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"$().
|
||||
|
||||
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/KMain.CC,dev.uncached_alias"$.
|
||||
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.
|
||||
|
||||
|
@ -17,7 +17,7 @@ See $LK,"MemRep",A="MN:MemRep"$() and $LK,"::/Demo/MemDemo.CC"$.
|
|||
|
||||
$FG,5$$TX+CX,"Single System-wide Memory Map"$
|
||||
|
||||
$FG,2$ 0x00$TX,"00007C00",D="DD_KERNEL"$- 0x00$TX,"0003637F",D="DD_KERNEL_END"$$FG$
|
||||
$FG,2$ 0x00$TX,"00007C00",D="DD_KERNEL"$- 0x00$TX,"000368EF",D="DD_KERNEL_END"$$FG$
|
||||
$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$
|
||||
|
@ -59,4 +59,4 @@ In 2016, I came-up with an alternate idea. I double mapped the lowest memory wit
|
|||
|
||||
Then, I switched to 1Gig page sizes. For the lowest 4Gig, I set-up an alias up at the top of address space. See $LK,"UncachedAliasAlloc",A="MN:UncachedAliasAlloc"$(). Not all computers support 1Gig page tables, however, so I also support 2Meg.
|
||||
|
||||
My original plan was to allow changing the page tables as needed, so I had code for taking control of 2Meg pages and marking them uncached or whatever. When I did a HDAudio driver, I requested some 32-bit address space as uncached. Today, all of the first 4Gig can be accessed without caching at the $LK,"dev.uncached_alias",A="FF:::/Kernel/KMain.CC,dev.uncached_alias"$.
|
||||
My original plan was to allow changing the page tables as needed, so I had code for taking control of 2Meg pages and marking them uncached or whatever. When I did a HDAudio driver, I requested some 32-bit address space as uncached. Today, all of the first 4Gig can be accessed without caching at the $LK,"dev.uncached_alias",A="FF:::/Kernel/MultiProc.CC,dev.uncached_alias"$.
|
||||
|
|
|
@ -69,7 +69,7 @@ $FG,2$Merge(\"C:/*\",\"D:/*\",\"+r+d\");$FG$ to check my changes.
|
|||
|
||||
* Use $FG,2$<CTRL-ALT-a>$FG$ to enter an extended ASCII char.
|
||||
|
||||
* Use $FG,2$<CTRL-ALT-f>$FG$ to toggle between $LK,"VGA ROM Font",A="MN:SYS_FONT_PTR"$ and $LK,"Std Font",A="FI:::/Kernel/FontStd.CC"$.
|
||||
* Use $FG,2$<CTRL-ALT-f>$FG$ to toggle between $LK,"Aux Font",A="FI:::/Kernel/FontAux.CC"$ and $LK,"Std Font",A="FI:::/Kernel/FontStd.CC"$.
|
||||
|
||||
* Use $FG,2$<CTRL-ALT-s>$FG$ will capture the screen as a sprite on the clip. You can save the cmd line doc as text with $FG,2$<CTRL-a>$FG$.
|
||||
|
||||
|
|
|
@ -6,3 +6,4 @@ if(YorN)
|
|||
Once("#include\"DoDistro\";;if(DriveIsWritable){Del(\"~/Registry.CC\");OutU16(0x4004, 0x3400);}");
|
||||
Reboot;
|
||||
}
|
||||
|
2
src/Home/PersonalNotes.DD
Executable file
2
src/Home/PersonalNotes.DD
Executable file
|
@ -0,0 +1,2 @@
|
|||
* Replace lecture on VGA Screen Memory with VBE Screen memory.
|
||||
|
BIN
src/Kernel.BIN.C
BIN
src/Kernel.BIN.C
Binary file not shown.
|
@ -81,9 +81,9 @@ See also $LK,"GrUpdateScreen",A="MN:GrUpdateScreen"$().
|
|||
}
|
||||
}
|
||||
|
||||
U0 VGAFlush()
|
||||
{//Flush winmgr vga cache, so updates whole screen.
|
||||
LBts(&sys_semas[SEMA_FLUSH_VGA_IMAGE],0);
|
||||
U0 VBEFlush()
|
||||
{//Flush winmgr screen cache, so updates whole screen.
|
||||
LBts(&sys_semas[SEMA_FLUSH_VBE_IMAGE],0);
|
||||
}
|
||||
|
||||
U0 WinDerivedValsUpdate(CTask *task)
|
||||
|
|
132
src/Kernel/FontAux.CC
Executable file
132
src/Kernel/FontAux.CC
Executable file
|
@ -0,0 +1,132 @@
|
|||
//See $LK,"::/Doc/Credits.DD"$.
|
||||
|
||||
U64 sys_font_aux[256]= {
|
||||
0x0000000000000000,0x0000000000000000,
|
||||
0x000000FF00000000,0x000000FF00FF0000,//騵
|
||||
0x1818181818181818,0x6C6C6C6C6C6C6C6C,//竟
|
||||
0x181818F800000000,0x6C6C6CEC0CFC0000,//硭
|
||||
0x1818181F00000000,0x6C6C6C6F607F0000,//蕃
|
||||
0x000000F818181818,0x000000FC0CEC6C6C,//檀
|
||||
0x0000001F18181818,0x0000007F606F6C6C,//椇
|
||||
0x0000000000000000,0x0000000000000000,
|
||||
0x0000000000000000,0x0000000000000000,
|
||||
0x0000000000000000,0x0000000000000000,
|
||||
0x0000000000000000,0x0000000000000000,
|
||||
0x0000000000000000,0x0000000000000000,
|
||||
0x0000000000000000,0x0000000000000000,
|
||||
0x0000000000000000,0x0000000000000000,
|
||||
0x0000000000000000,0x0000000000000000,
|
||||
0x0000000000000000,0x0008000000000000,//
|
||||
0x0000000000000000,0x00180018183C3C18,// !
|
||||
0x0000000000363636,0x006C6CFE6CFE6C6C,//"#
|
||||
0x00187ED07C16FC30,0x0060660C18306606,//$$%
|
||||
0x00DC66B61C36361C,0x0000000000181818,//&'
|
||||
0x0030180C0C0C1830,0x000C18303030180C,//()
|
||||
0x0000187E3C7E1800,0x000018187E181800,//*+
|
||||
0x0C18180000000000,0x000000007E000000,//,-
|
||||
0x0018180000000000,0x0000060C18306000,//./
|
||||
0x003C666E7E76663C,0x007E181818181C18,//01
|
||||
0x007E0C183060663C,0x003C66603860663C,//23
|
||||
0x0030307E363C3830,0x003C6660603E067E,//45
|
||||
0x003C66663E060C38,0x000C0C0C1830607E,//67
|
||||
0x003C66663C66663C,0x001C30607C66663C,//89
|
||||
0x0018180018180000,0x0C18180018180000,//:;
|
||||
0x0030180C060C1830,0x0000007E007E0000,//<=
|
||||
0x000C18306030180C,0x001800181830663C,//>?
|
||||
0x003C06765676663C,0x006666667E66663C,//@A
|
||||
0x003E66663E66663E,0x003C66060606663C,//BC
|
||||
0x001E36666666361E,0x007E06063E06067E,//DE
|
||||
0x000606063E06067E,0x003C66667606663C,//FG
|
||||
0x006666667E666666,0x007E18181818187E,//HI
|
||||
0x001C36303030307C,0x0066361E0E1E3666,//JK
|
||||
0x007E060606060606,0x00C6C6D6D6FEEEC6,//LM
|
||||
0x006666767E6E6666,0x003C66666666663C,//NO
|
||||
0x000606063E66663E,0x006C36566666663C,//PQ
|
||||
0x006666363E66663E,0x003C66603C06663C,//RS
|
||||
0x001818181818187E,0x003C666666666666,//TU
|
||||
0x00183C6666666666,0x00C6EEFED6D6C6C6,//VW
|
||||
0x0066663C183C6666,0x001818183C666666,//XY
|
||||
0x007E060C1830607E,0x003E06060606063E,//Z[
|
||||
0x00006030180C0600,0x007C60606060607C,//\]
|
||||
0x000000000000663C,0xFFFF000000000000,//^_
|
||||
0x000000000030180C,0x007C667C603C0000,//`a
|
||||
0x003E6666663E0606,0x003C6606663C0000,//bc
|
||||
0x007C6666667C6060,0x003C067E663C0000,//de
|
||||
0x000C0C0C3E0C0C38,0x3C607C66667C0000,//fg
|
||||
0x00666666663E0606,0x003C1818181C0018,//hi
|
||||
0x0E181818181C0018,0x0066361E36660606,//jk
|
||||
0x003C18181818181C,0x00C6D6D6FE6C0000,//lm
|
||||
0x00666666663E0000,0x003C6666663C0000,//no
|
||||
0x06063E66663E0000,0xE0607C66667C0000,//pq
|
||||
0x000606066E360000,0x003E603C067C0000,//rs
|
||||
0x00380C0C0C3E0C0C,0x007C666666660000,//tu
|
||||
0x00183C6666660000,0x006CFED6D6C60000,//vw
|
||||
0x00663C183C660000,0x3C607C6666660000,//xy
|
||||
0x007E0C18307E0000,0x003018180E181830,//z{
|
||||
0x0018181818181818,0x000C18187018180C,//|}
|
||||
0x000000000062D68C,0xFFFFFFFFFFFFFFFF,//~
|
||||
0x1E30181E3303331E,0x007E333333003300,//<2F><>
|
||||
0x001E033F331E0038,0x00FC667C603CC37E,//<2F>
|
||||
0x007E333E301E0033,0x007E333E301E0007,//<2F>
|
||||
0x007E333E301E0C0C,0x3C603E03033E0000,//<2F>
|
||||
0x003C067E663CC37E,0x001E033F331E0033,//<2F>
|
||||
0x001E033F331E0007,0x001E0C0C0C0E0033,//<2F>
|
||||
0x003C1818181C633E,0x001E0C0C0C0E0007,//<2F>
|
||||
0x00333F33331E0C33,0x00333F331E000C0C,//<2F>
|
||||
0x003F061E063F0038,0x00FE33FE30FE0000,//<2F>
|
||||
0x007333337F33367C,0x001E33331E00331E,//<2F>
|
||||
0x001E33331E003300,0x001E33331E000700,//<2F>
|
||||
0x007E33333300331E,0x007E333333000700,//<2F>
|
||||
0x1F303F3333003300,0x001C3E63633E1C63,//<2F>
|
||||
0x001E333333330033,0x18187E03037E1818,//<2F>
|
||||
0x003F67060F26361C,0x000C3F0C3F1E3333,//<2F>
|
||||
0x70337B332F1B1B0F,0x0E1B18187E18D870,//<2F>
|
||||
0x007E333E301E0038,0x001E0C0C0C0E001C,//嵗
|
||||
0x001E33331E003800,0x007E333333003800,//╯
|
||||
0x003333331F001F00,0x00333B3F3733003F,//丰
|
||||
0x00007E007C36363C,0x00007E003C66663C,//戍
|
||||
0x001E3303060C000C,0x000003033F000000,//貝
|
||||
0x000030303F000000,0xF81973C67C1B3363,//物
|
||||
0xC0F9F3E6CF1B3363,0x183C3C1818001800,//洎
|
||||
0x0000CC663366CC00,0x00003366CC663300,//悖
|
||||
0x1144114411441144,0x55AA55AA55AA55AA,//停
|
||||
0xEEBBEEBBEEBBEEBB,0x1818181818181818,//眾
|
||||
0x1818181F18181818,0x1818181F181F1818,//斯
|
||||
0x6C6C6C6F6C6C6C6C,0x6C6C6C7F00000000,//須
|
||||
0x1818181F181F0000,0x6C6C6C6F606F6C6C,//號
|
||||
0x6C6C6C6C6C6C6C6C,0x6C6C6C6F607F0000,//獄
|
||||
0x0000007F606F6C6C,0x0000007F6C6C6C6C,//播
|
||||
0x0000001F181F1818,0x1818181F00000000,//噶
|
||||
0x000000F818181818,0x000000FF18181818,//擱
|
||||
0x181818FF00000000,0x181818F818181818,//藏
|
||||
0x000000FF00000000,0x181818FF18181818,//霰
|
||||
0x181818F818F81818,0x6C6C6CEC6C6C6C6C,//匸
|
||||
0x000000FC0CEC6C6C,0x6C6C6CEC0CFC0000,//<2F>
|
||||
0x000000FF00EF6C6C,0x6C6C6CEF00FF0000,//帊
|
||||
0x6C6C6CEC0CEC6C6C,0x000000FF00FF0000,//昅
|
||||
0x6C6C6CEF00EF6C6C,0x000000FF00FF1818,//恘
|
||||
0x000000FF6C6C6C6C,0x181818FF00FF0000,//倳
|
||||
0x6C6C6CFF00000000,0x000000FC6C6C6C6C,//眑
|
||||
0x000000F818F81818,0x181818F818F80000,//婭
|
||||
0x6C6C6CFC00000000,0x6C6C6CEF6C6C6C6C,//笫
|
||||
0x181818FF00FF1818,0x0000001F18181818,//崷
|
||||
0x181818F800000000,0xFFFFFFFFFFFFFFFF,//窙
|
||||
0xFFFFFFFF00000000,0x0F0F0F0F0F0F0F0F,//嗲
|
||||
0xF0F0F0F0F0F0F0F0,0x00000000FFFFFFFF,//睧
|
||||
0x006E3B133B6E0000,0x03031F331F331E00,//颬
|
||||
0x0003030303637F00,0x0036363636367F00,//睼
|
||||
0x007F660C180C667F,0x001E3333337E0000,//麧
|
||||
0x03063E6666666600,0x00181818183B6E00,//緗
|
||||
0x3F0C1E33331E0C3F,0x001C36637F63361C,//鴇
|
||||
0x007736366363361C,0x001E33333E180C38,//膹
|
||||
0x00007EDBDB7E0000,0x03067EDBDB7E3060,//擨
|
||||
0x003C06033F03063C,0x003333333333331E,//闀
|
||||
0x00003F003F003F00,0x003F000C0C3F0C0C,//貘
|
||||
0x003F00060C180C06,0x003F00180C060C18,//覷
|
||||
0x1818181818D8D870,0x0E1B1B1818181818,//鏷
|
||||
0x000C0C003F000C0C,0x0000394E00394E00,//禴
|
||||
0x000000001C36361C,0x0000001818000000,//矙
|
||||
0x0000001800000000,0x383C3637303030F0,//𡜍
|
||||
0x000000363636361E,0x0000003E061C301E,//𦶠
|
||||
0x00003C3C3C3C0000,0xFFFFFFFFFFFFFFFF,//<2F>
|
||||
};
|
|
@ -1,5 +1,5 @@
|
|||
public U64 sys_font_std[256] = {
|
||||
0x0000000000000000,
|
||||
0x0000000000000000,
|
||||
0x0000000000000000,
|
||||
0x000000FF00000000,
|
||||
0x000000FF00FF0000,
|
||||
|
|
|
@ -459,7 +459,7 @@ U0 G2(U8 *ip=INVALID_PTR,CTask *task=NULL)
|
|||
B2(task);
|
||||
if (ext[EXT_WIN_FOCUS])
|
||||
CallExtNum(EXT_WIN_FOCUS,debug.focus_task);
|
||||
VGAFlush;
|
||||
VBEFlush;
|
||||
G(ip,task);
|
||||
}
|
||||
|
||||
|
@ -511,7 +511,7 @@ U0 DebugHelp()
|
|||
">B2;\t\t\t\t//Clear all break points.\n"
|
||||
">S;\t\t\t\t//Single step.\n"
|
||||
">G;\t\t\t\t//Resume execution.\n"
|
||||
">G2;\t\t\t\t//B2;VGAFlush;WinFocus;G;\n"
|
||||
">G2;\t\t\t\t//B2;VBEFlush;WinFocus;G;\n"
|
||||
">Exit;\t\t\t\t//Exit (kill) task.\n\n"
|
||||
"After resuming, <CTRL-ALT-n> next focus task.\n"
|
||||
"After resuming, <CTRL-ALT-v> flushes screen VGA cache.\n\n";
|
||||
|
|
|
@ -1,9 +1,8 @@
|
|||
I64 HashTypeNum(CHash *tmph)
|
||||
{//Return bit num of hash type, limited to just types.
|
||||
if (tmph)
|
||||
return Bsf(tmph->type&HTG_TYPE_MASK);
|
||||
else
|
||||
return -1;
|
||||
return Bsf(tmph->type & HTG_TYPE_MASK);
|
||||
return -1;
|
||||
}
|
||||
|
||||
I64 HashVal(CHash *tmph)
|
||||
|
|
|
@ -64,8 +64,7 @@ U0 SysGlobalsInit()
|
|||
Seg2Linear(&sys_vbe_info.vendor);
|
||||
Seg2Linear(&sys_vbe_info.product_name);
|
||||
Seg2Linear(&sys_vbe_info.product_revision);
|
||||
Seg2Linear(SYS_FONT_PTR);
|
||||
sys_vbe_info.software_revision = Bcd2Binary(sys_vbe_info.software_revision);
|
||||
sys_vbe_info.software_revision = Bcd2Binary(sys_vbe_info.software_revision);
|
||||
}
|
||||
|
||||
debug.fun_seg_cache=CAlloc(FUN_SEG_CACHE_SIZE*sizeof(CFunSegCache));
|
||||
|
@ -74,18 +73,11 @@ U0 SysGlobalsInit()
|
|||
|
||||
U0 SysGrInit()
|
||||
{
|
||||
I64 i, j;
|
||||
text.aux_font = MAlloc(sizeof(U64) * 256);
|
||||
MemCopy(text.aux_font, *SYS_FONT_PTR(U32), sizeof(U64) * 256);
|
||||
|
||||
for (i = 0; i < 256; i++)
|
||||
for (j = 0; j < 8; j++)
|
||||
text.aux_font[i].u8[j] = rev_bits_table[text.aux_font[i].u8[j]];
|
||||
|
||||
text.font = sys_font_std;
|
||||
text.aux_font = sys_font_aux;
|
||||
text.aux_font['' - 1] = text.aux_font['' - 1]; //Shift-space
|
||||
text.aux_font[10] = text.font[10];
|
||||
text.aux_font[255] = text.font[255];
|
||||
text.aux_font[255] = text.font[255];
|
||||
text.border_chars[2] (I64)='ÄͳºÚÉ¿»';
|
||||
text.border_chars[10](U32)='ÀÈÙ¼';
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@ I64 SysTimerRead()
|
|||
I64 i,res;
|
||||
PUSHFD
|
||||
CLI
|
||||
if (mp_count>1)
|
||||
if (mp_count > 1)
|
||||
while (LBts(&sys_semas[SEMA_SYS_TIMER],0))
|
||||
PAUSE
|
||||
OutU8(PIT_CMD, PIT_CMDF_CHANNEL0); //Latch Timer0
|
||||
|
@ -42,14 +42,16 @@ I64 TimeCal()
|
|||
{
|
||||
static I64 time_stamp_start=0,timer_start=0;
|
||||
I64 i;
|
||||
if (time_stamp_start) {
|
||||
if (time_stamp_start)
|
||||
{
|
||||
PUSHFD
|
||||
CLI
|
||||
counts.time_stamp_freq=SYS_TIMER_FREQ*(GetTSC-time_stamp_start);
|
||||
i=SysTimerRead-timer_start;
|
||||
counts.time_stamp_freq = SYS_TIMER_FREQ * (GetTSC - time_stamp_start);
|
||||
i = SysTimerRead - timer_start;
|
||||
if (!i)
|
||||
ZenithErr("Timer Cal Error");
|
||||
else {
|
||||
else
|
||||
{
|
||||
counts.time_stamp_freq/=i;
|
||||
counts.time_stamp_kHz_freq=counts.time_stamp_freq/1000;
|
||||
counts.time_stamp_calibrated=TRUE;
|
||||
|
@ -58,8 +60,8 @@ I64 TimeCal()
|
|||
}
|
||||
PUSHFD
|
||||
CLI
|
||||
timer_start=SysTimerRead;
|
||||
time_stamp_start=GetTSC;
|
||||
timer_start = SysTimerRead;
|
||||
time_stamp_start = GetTSC;
|
||||
POPFD
|
||||
return counts.time_stamp_freq;
|
||||
}
|
||||
|
@ -118,12 +120,15 @@ U0 Sound(I8 ona=0)
|
|||
{//Play ona, a piano key num. 0 means rest.
|
||||
I64 period;
|
||||
CSoundData *d;
|
||||
if (!Bt(&sys_semas[SEMA_MUTE],0) &&
|
||||
!LBts(&sys_semas[SEMA_SOUND],0)) { //Mutex. Just throw-out if in use
|
||||
if (!ona) {
|
||||
if (!Bt(&sys_semas[SEMA_MUTE],0) && !LBts(&sys_semas[SEMA_SOUND],0))
|
||||
{ //Mutex. Just throw-out if in use
|
||||
if (!ona)
|
||||
{
|
||||
screencast.ona=ona;
|
||||
OutU8(PCSPKR, InU8(PCSPKR) & ~3);
|
||||
} else if (ona!=screencast.ona) {
|
||||
}
|
||||
else if (ona!=screencast.ona)
|
||||
{
|
||||
screencast.ona=ona;
|
||||
period=ClampI64(SYS_TIMER_FREQ/Ona2Freq(ona),1,U16_MAX);
|
||||
//See $LK,"::/Doc/PIT.DD",A="FI:::/Doc/PIT.DD"$.
|
||||
|
@ -132,7 +137,8 @@ U0 Sound(I8 ona=0)
|
|||
OutU8(PIT2,period.u8[1]);
|
||||
OutU8(PCSPKR,3|InU8(PCSPKR)); //enable speaker
|
||||
}
|
||||
if (!IsDebugMode && screencast.record) {
|
||||
if (!IsDebugMode && screencast.record)
|
||||
{
|
||||
d=ZCAlloc(sizeof(CSoundData));
|
||||
d->ona=ona;
|
||||
d->tS=tS;
|
||||
|
@ -229,7 +235,7 @@ Bool IsSysDebug()
|
|||
Bool Raw(Bool val)
|
||||
{//Set to direct screen, BLACK & WHITE, non-windowed output mode.
|
||||
if (!val)
|
||||
VGAFlush;
|
||||
VBEFlush;
|
||||
return !LBEqual(&Fs->display_flags,DISPLAYf_NOT_RAW,!val);
|
||||
}
|
||||
|
||||
|
@ -263,3 +269,4 @@ U0 ProgressBarsReset(U8 *path=NULL)
|
|||
CallExtStr("ProgressBarsRegTf",path);
|
||||
MemSet(sys_progresses,0,sizeof(sys_progresses));
|
||||
}
|
||||
|
|
@ -49,12 +49,11 @@ GDT_TR: DU8 MP_PROCESSORS_NUM*16 DUP(0);
|
|||
GDT_TR_RING3: DU8 MP_PROCESSORS_NUM*16 DUP(0);
|
||||
#assert $$-SYS_GDT==sizeof(CGDT)
|
||||
|
||||
SYS_FONT_PTR:: DU32 0;
|
||||
SYS_VBE_INFO:: DU8 sizeof(CVBEInfo) DUP(0);
|
||||
SYS_VBE_MODES:: DU8 sizeof(CVBEModeShort) * VBE_MODES_NUM DUP(0);
|
||||
SYS_VBE_FINAL_MODE:: DU8 sizeof(CVBEMode) DUP(0);
|
||||
SYS_VBE_FINAL:: DU16 0; //mode number of final mode set
|
||||
#assert $$-SYS_KERNEL==sizeof(CKernel)-sizeof(CBinFile)
|
||||
#assert $$-SYS_KERNEL==sizeof(CKernel)-sizeof(CBinFile)
|
||||
|
||||
TEMP_VBE_MODE: DU8 sizeof(CVBEMode) DUP(0);
|
||||
MAX_VBE_MODE: DU8 sizeof(CVBEModeShort) DUP(0);
|
||||
|
@ -213,15 +212,6 @@ GET_IP: POP BX
|
|||
BTS U32 [SYS_RUN_LEVEL],RLf_VESA
|
||||
@@10:
|
||||
|
||||
//Get pointer to 8x8 VGA ROM font.
|
||||
MOV AX, 0x1130
|
||||
MOV BH, 3
|
||||
INT 0x10
|
||||
MOV AX, ES
|
||||
SHL EAX, 16
|
||||
MOV AX, BP
|
||||
MOV U32 [SYS_FONT_PTR], EAX
|
||||
|
||||
//Get mem maps.
|
||||
MOV AX,0xE801
|
||||
INT 0x15
|
||||
|
|
|
@ -484,7 +484,7 @@ I64 TaskEnd()
|
|||
JobQueueDel(&task->server_ctrl.next_done);
|
||||
|
||||
if (IsRaw)
|
||||
VGAFlush;
|
||||
VBEFlush;
|
||||
|
||||
if (sys_focus_task==task) {
|
||||
if (!Gs->num)
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -30,6 +30,7 @@
|
|||
#include "Sched"
|
||||
#include "Memory/MakeMemory"
|
||||
#include "FontStd"
|
||||
#include "FontAux"
|
||||
#include "StrB"
|
||||
#include "KHashA"
|
||||
#include "KInterrupts"
|
||||
|
|
|
@ -531,8 +531,7 @@ class CKernel
|
|||
CSysLimitBase sys_gdt_ptr;
|
||||
U16 sys_pci_buses;
|
||||
;$$=($$+15)&-16;
|
||||
CGDT sys_gdt;
|
||||
U32 sys_font_ptr;
|
||||
CGDT sys_gdt;
|
||||
CVBEInfo sys_vbe_info;
|
||||
CVBEModeShort sys_vbe_modes[VBE_MODES_NUM];
|
||||
CVBEMode sys_vbe_mode;
|
||||
|
@ -733,7 +732,7 @@ class CSema
|
|||
#define SEMA_HEAPLOG_ACTIVE 6
|
||||
#define SEMA_HEAPLOG_LOCK 7
|
||||
#define SEMA_REFRESH_IN_PROGRESS 8
|
||||
#define SEMA_FLUSH_VGA_IMAGE 9
|
||||
#define SEMA_FLUSH_VBE_IMAGE 9
|
||||
#define SEMA_SINGLE_USER 10
|
||||
#define SEMA_DISK_CACHE 11
|
||||
#define SEMA_FAR_CALL32 12
|
||||
|
@ -776,7 +775,7 @@ public class CHashTable
|
|||
#define HTt_GLBL_VAR 3
|
||||
#define HTt_CLASS 4
|
||||
#define HTt_INTERNAL_TYPE 5
|
||||
#define HTt_FUN 6
|
||||
#define HTt_FUN 6
|
||||
#define HTt_WORD 7
|
||||
#define HTt_DICT_WORD 8
|
||||
#define HTt_KEYWORD 9
|
||||
|
|
|
@ -222,7 +222,7 @@ public extern U0 RawDm(I64 mS=100,U8 *addr,I64 count=0x80);
|
|||
extern U0 RawDr(CTask *task=NULL);
|
||||
public extern U0 RawPrint(I64 mS=100,U8 *format,...);
|
||||
public extern U0 RawPutChar(I64 ch);
|
||||
public extern U0 VGAFlush();
|
||||
public extern U0 VBEFlush();
|
||||
|
||||
#help_index "Debugging;Debugging/Debugger"
|
||||
public extern U0 Debug(U8 *message=NULL,I64 message_num=0);
|
||||
|
|
|
@ -167,7 +167,7 @@ U0 CtrlAltT(I64)
|
|||
|
||||
U0 CtrlAltV(I64)
|
||||
{
|
||||
VGAFlush;
|
||||
VBEFlush;
|
||||
}
|
||||
|
||||
U0 CtrlAltX(I64)
|
||||
|
|
Binary file not shown.
|
@ -28,7 +28,7 @@ public CBGR24 gr32_palette_std[COLORS_NUM]={
|
|||
public U0 PaletteSetStd(Bool persistent=TRUE)
|
||||
{//Activate std palette.
|
||||
GrPaletteSet(gr32_palette_std);
|
||||
VGAFlush;
|
||||
VBEFlush;
|
||||
if (persistent)
|
||||
fp_set_std_palette = &PaletteSetStd;
|
||||
}
|
||||
|
@ -41,7 +41,7 @@ public CBGR24 gr_palette_gray[COLORS_NUM] = {
|
|||
public U0 PaletteSetGray(Bool persistent=TRUE)
|
||||
{//Activate gray palette.
|
||||
GrPaletteSet(gr_palette_gray);
|
||||
VGAFlush;
|
||||
VBEFlush;
|
||||
if (persistent)
|
||||
fp_set_std_palette = &PaletteSetGray;
|
||||
}
|
||||
|
@ -54,7 +54,7 @@ public CBGR24 gr_palette_gruvbox_light[COLORS_NUM] = {
|
|||
public U0 PaletteSetGruvboxLight(Bool persistent=TRUE)
|
||||
{//Activate gruvbox light palette.
|
||||
GrPaletteSet(gr_palette_gruvbox_light);
|
||||
VGAFlush;
|
||||
VBEFlush;
|
||||
if (persistent)
|
||||
fp_set_std_palette = &PaletteSetGruvboxLight;
|
||||
}
|
||||
|
@ -67,7 +67,7 @@ public CBGR24 gr_palette_pastel[COLORS_NUM]={
|
|||
public U0 PaletteSetPastel(Bool persistent=TRUE)
|
||||
{//Activate pastel palette.
|
||||
GrPaletteSet(gr_palette_pastel);
|
||||
VGAFlush;
|
||||
VBEFlush;
|
||||
if (persistent)
|
||||
fp_set_std_palette = &PaletteSetPastel;
|
||||
}
|
||||
|
@ -80,7 +80,7 @@ public CBGR24 gr_palette_monokai[COLORS_NUM]={
|
|||
public U0 PaletteSetMonokai(Bool persistent=TRUE)
|
||||
{//Activate monokai palette.
|
||||
GrPaletteSet(gr_palette_monokai);
|
||||
VGAFlush;
|
||||
VBEFlush;
|
||||
if (persistent)
|
||||
fp_set_std_palette = &PaletteSetMonokai;
|
||||
}
|
||||
|
@ -93,7 +93,7 @@ public CBGR24 gr_palette_dark[COLORS_NUM] = {
|
|||
public U0 PaletteSetDark(Bool persistent=TRUE)
|
||||
{//Activate dark palette.
|
||||
GrPaletteSet(gr_palette_dark);
|
||||
VGAFlush;
|
||||
VBEFlush;
|
||||
if (persistent)
|
||||
fp_set_std_palette = &PaletteSetDark;
|
||||
}
|
||||
|
@ -106,7 +106,7 @@ public CBGR24 gr_palette_smooth[COLORS_NUM] = {
|
|||
public U0 PaletteSetSmooth(Bool persistent=TRUE)
|
||||
{//Activate dark palette.
|
||||
GrPaletteSet(gr_palette_smooth);
|
||||
VGAFlush;
|
||||
VBEFlush;
|
||||
if (persistent)
|
||||
fp_set_std_palette = &PaletteSetSmooth;
|
||||
}
|
||||
|
@ -119,7 +119,7 @@ public CBGR24 gr_palette_dorado[COLORS_NUM]= {
|
|||
public U0 PaletteSetDorado(Bool persistent=TRUE)
|
||||
{//Activate dark palette.
|
||||
GrPaletteSet(gr_palette_dorado);
|
||||
VGAFlush;
|
||||
VBEFlush;
|
||||
if (persistent)
|
||||
fp_set_std_palette = &PaletteSetDorado;
|
||||
}
|
||||
|
@ -133,7 +133,7 @@ public CBGR24 gr_palette_euphrasia[COLORS_NUM] = {
|
|||
public U0 PaletteSetEuphrasia(Bool persistent=TRUE)
|
||||
{//Activate dark palette.
|
||||
GrPaletteSet(gr_palette_euphrasia);
|
||||
VGAFlush;
|
||||
VBEFlush;
|
||||
if (persistent)
|
||||
fp_set_std_palette = &PaletteSetEuphrasia;
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@ U0 GrUpdateTaskODEs(CTask *task)
|
|||
"Exception in WinMgr: Update Task ODEs\n";
|
||||
PutExcept;
|
||||
Sleep(3000);
|
||||
VGAFlush;
|
||||
VBEFlush;
|
||||
}
|
||||
sys_task_being_screen_updated=NULL;
|
||||
}
|
||||
|
@ -49,7 +49,7 @@ U0 GrUpdateTaskWin(CTask *task)
|
|||
"Exception in WinMgr: Update Task Win\n";
|
||||
PutExcept;
|
||||
Sleep(3000);
|
||||
VGAFlush;
|
||||
VBEFlush;
|
||||
}
|
||||
}
|
||||
sys_task_being_screen_updated=NULL;
|
||||
|
@ -356,7 +356,7 @@ U0 GrUpdateScreen32()
|
|||
|
||||
GrCalcScreenUpdates;
|
||||
|
||||
if (LBtr(&sys_semas[SEMA_FLUSH_VGA_IMAGE],0))
|
||||
if (LBtr(&sys_semas[SEMA_FLUSH_VBE_IMAGE],0))
|
||||
MemCopy(text.fb_alias, text.raw_screen, text.buffer_size);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue