Potential BootRAM fix.

This commit is contained in:
xmm15 2020-02-19 14:57:13 -06:00
parent bc5326f73d
commit 130fb30910
9 changed files with 1748 additions and 1730 deletions

Binary file not shown.

Binary file not shown.

10
src/Home/Registry.CC Executable file
View File

@ -0,0 +1,10 @@
$TR,"Zenith"$
$ID,2$$TR,"SysMessageFlags"$
$ID,2$sys_message_flags[0]=0;
$ID,-2$$TR,"SysRegVer"$
$ID,2$registry_version=0.100;
$ID,-2$$ID,-2$$TR,"Once"$
$ID,2$$TR,"Zenith"$
$ID,2$$ID,-2$$TR,"User"$
$ID,2$$ID,-2$$ID,-2$$TR,"AutoComplete"$
$ID,2$ac.col = TEXT_COLS-30;ac.row = 15;$ID,-2$

Binary file not shown.

View File

@ -55,14 +55,16 @@ U0 SysGlobalsInit()
QueueInit(&dev.pci_head); QueueInit(&dev.pci_head);
dev.mem64_ptr=mem_mapped_space; dev.mem64_ptr=mem_mapped_space;
//framebuffer pointer is already linear if(sys_boot_src.u8[0] != BOOT_SRC_RAM)
Seg2Linear(&sys_vbe_info.video_modes); {//framebuffer pointer is already linear
Seg2Linear(&sys_vbe_info.oem); Seg2Linear(&sys_vbe_info.video_modes);
Seg2Linear(&sys_vbe_info.vendor); Seg2Linear(&sys_vbe_info.oem);
Seg2Linear(&sys_vbe_info.product_name); Seg2Linear(&sys_vbe_info.vendor);
Seg2Linear(&sys_vbe_info.product_revision); Seg2Linear(&sys_vbe_info.product_name);
Seg2Linear(SYS_FONT_PTR); Seg2Linear(&sys_vbe_info.product_revision);
sys_vbe_info.software_revision = Bcd2Binary(sys_vbe_info.software_revision); Seg2Linear(SYS_FONT_PTR);
sys_vbe_info.software_revision = Bcd2Binary(sys_vbe_info.software_revision);
}
debug.fun_seg_cache=CAlloc(FUN_SEG_CACHE_SIZE*sizeof(CFunSegCache)); debug.fun_seg_cache=CAlloc(FUN_SEG_CACHE_SIZE*sizeof(CFunSegCache));
debug.int_fault_code=IntFaultHandlersNew; debug.int_fault_code=IntFaultHandlersNew;
@ -86,7 +88,7 @@ U0 SysGrInit()
text.border_chars[2] (I64)='ÄͳºÚÉ¿»'; text.border_chars[2] (I64)='ÄͳºÚÉ¿»';
text.border_chars[10](U32)='ÀÈÙ¼'; text.border_chars[10](U32)='ÀÈÙ¼';
text.vga_alias =dev.uncached_alias+VGAM_GRAPHICS; text.vga_alias =dev.uncached_alias+VGAM_GRAPHICS;
 text.vga_text_alias =dev.uncached_alias+VGAM_TEXT; text.vga_text_alias =dev.uncached_alias+VGAM_TEXT;
if (!Bt(&sys_run_level,RLf_VESA)) { //if text mode if (!Bt(&sys_run_level,RLf_VESA)) { //if text mode
text.cols=80; text.cols=80;
text.rows=25; text.rows=25;

View File

@ -49,21 +49,19 @@ GDT_TR: DU8 MP_PROCESSORS_NUM*16 DUP(0);
GDT_TR_RING3: DU8 MP_PROCESSORS_NUM*16 DUP(0); GDT_TR_RING3: DU8 MP_PROCESSORS_NUM*16 DUP(0);
#assert $$-SYS_GDT==sizeof(CGDT) #assert $$-SYS_GDT==sizeof(CGDT)
#assert $$-SYS_KERNEL==sizeof(CKernel)-sizeof(CBinFile) SYS_FONT_PTR:: DU32 0;
SYS_VBE_INFO:: DU8 sizeof(CVBEInfo) DUP(0); SYS_VBE_INFO:: DU8 sizeof(CVBEInfo) DUP(0);
SYS_VBE_MODES:: DU8 sizeof(CVBEModeShort) * VBE_MODES_NUM 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_MODE:: DU8 sizeof(CVBEMode) DUP(0);
SYS_VBE_FINAL:: DU16 0; //mode number of final mode set SYS_VBE_FINAL:: DU16 0; //mode number of final mode set
#assert $$-SYS_KERNEL==sizeof(CKernel)-sizeof(CBinFile)
TEMP_VBE_MODE: DU8 sizeof(CVBEMode) DUP(0); TEMP_VBE_MODE: DU8 sizeof(CVBEMode) DUP(0);
MAX_VBE_MODE: DU8 sizeof(CVBEModeShort) DUP(0); MAX_VBE_MODE: DU8 sizeof(CVBEModeShort) DUP(0);
MAX_SCREEN_HEIGHT: DU16 0; MAX_SCREEN_HEIGHT: DU16 0;
SCREEN_WIDTH: DU16 1024; SCREEN_WIDTH: DU16 1024;
SCREEN_HEIGHT: DU16 768; SCREEN_HEIGHT: DU16 768;
SYS_FONT_PTR:: DU32 0;
//************************************ //************************************
CORE0_16BIT_INIT:: 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:::/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"$.)

File diff suppressed because it is too large Load Diff

View File

@ -445,10 +445,70 @@ class CPatchTableAbsAddr
#define IET_ZEROED_DATA_HEAP 24 //Not really used #define IET_ZEROED_DATA_HEAP 24 //Not really used
#define IET_MAIN 25 #define IET_MAIN 25
#help_index "Graphics/VBE"
#define BLACK32 0x000000
#define WHITE32 0xFFFFFF
#define VBE_MODES_NUM 32
class CVBEInfo
{
U8 signature[4];
U16 version;
U32 oem,
capabilities,
video_modes;
U16 total_memory,
software_revision;
U32 vendor,
product_name,
product_revision;
U8 reserved[222],
oem_data[256];
};
#assert sizeof(CVBEInfo)==512
class CVBEMode
{
U16 attributes,
pad[7],
pitch,
width,
height;
U8 pad[3],
bpp,
pad,
memory_model,
pad[12];
U32 framebuffer;
U16 pad[9];
U32 max_pixel_clock;
U8 reserved[190];
};
#assert sizeof(CVBEMode)==256
class CVBEModeShort
{
U16 width,
height,
mode_num;
U32 max_pixel_clock; //TODO refresh rates.
};
#help_index "Boot" #help_index "Boot"
class CKernel class CKernel
{//Must match $LK,"OSStartUp",A="FF:::/Kernel/KStart16.CC,MEM_BOOT_BASE"$ {//Must match $LK,"OSStartUp",A="FF:::/Kernel/KStart16.CC,MEM_BOOT_BASE"$
CBinFile h;  CBinFile h;
U32 jmp, U32 jmp,
boot_src, boot_src,
boot_blk, boot_blk,
@ -465,6 +525,11 @@ class CKernel
U16 sys_pci_buses; U16 sys_pci_buses;
;$$=($$+15)&-16; ;$$=($$+15)&-16;
CGDT sys_gdt; CGDT sys_gdt;
U32 sys_font_ptr;
CVBEInfo sys_vbe_info;
CVBEModeShort sys_vbe_modes[VBE_MODES_NUM];
CVBEMode sys_vbe_mode;
U16 sys_vbe_mode_num;
}; };
//Run-Levels //Run-Levels
@ -3994,62 +4059,4 @@ class CProgress
#define PRINTF_NEG_E 0x400 #define PRINTF_NEG_E 0x400
#define PRINTF_NEG_AUX_FORMAT_NUM 0x800 #define PRINTF_NEG_AUX_FORMAT_NUM 0x800
#help_index "Graphics/VBE"
#define BLACK32 0x000000
#define WHITE32 0xFFFFFF
#define VBE_MODES_NUM 32
class CVBEInfo
{
U8 signature[4];
U16 version;
U32 oem,
capabilities,
video_modes;
U16 total_memory,
software_revision;
U32 vendor,
product_name,
product_revision;
U8 reserved[222],
oem_data[256];
};
#assert sizeof(CVBEInfo)==512
class CVBEMode
{
U16 attributes,
pad[7],
pitch,
width,
height;
U8 pad[3],
bpp,
pad,
memory_model,
pad[12];
U32 framebuffer;
U16 pad[9];
U32 max_pixel_clock;
U8 reserved[190];
};
#assert sizeof(CVBEMode)==256
class CVBEModeShort
{
U16 width,
height,
mode_num;
U32 max_pixel_clock; //TODO refresh rates.
};
#help_index "" #help_index ""

Binary file not shown.