mirror of
https://github.com/Zeal-Operating-System/ZealOS.git
synced 2024-12-25 23:10:32 +00:00
upstream gfx goofing-around (stale working dir)
This commit is contained in:
parent
37a379179d
commit
01778d3ac7
10 changed files with 106 additions and 9 deletions
|
@ -13,7 +13,7 @@ CTask *sys_winmgr_task,
|
|||
U8 *rev_bits_table; //Table with U8 bits reversed
|
||||
CDate local_time_offset;
|
||||
F64 *pow10_I64,
|
||||
sys_os_version = 2.03;
|
||||
sys_os_version = 2.04;
|
||||
|
||||
CAutoCompleteDictGlobals acd;
|
||||
CAutoCompleteGlobals ac;
|
||||
|
|
|
@ -64,6 +64,8 @@ SYS_BOOT_STACK:: DU32 BOOT_RAM_LIMIT;
|
|||
|
||||
SYS_IS_UEFI_BOOTED:: DU8 0;
|
||||
|
||||
SYS_BOOTLOADER_ID:: DU8 BL_ZEAL;
|
||||
|
||||
SYS_FRAMEBUFFER_LIST:: DU8 sizeof(CVideoInfo) * VBE_MODES_NUM DUP(0);
|
||||
|
||||
#assert $$ - SYS_KERNEL == sizeof(CKernel) - sizeof(CZXE)
|
||||
|
|
|
@ -574,9 +574,14 @@ class CKernel
|
|||
U64 sys_disk_uuid[2];
|
||||
U32 sys_boot_stack;
|
||||
Bool sys_is_uefi_booted;
|
||||
U8 sys_bootloader_id;
|
||||
CVideoInfo sys_framebuffer_list[VBE_MODES_NUM];
|
||||
};
|
||||
|
||||
// Bootloader IDs
|
||||
#define BL_ZEAL 0
|
||||
#define BL_LIMINE 1
|
||||
|
||||
//Run-Levels
|
||||
#define RLf_16BIT 0
|
||||
#define RLf_VESA 1
|
||||
|
|
|
@ -258,5 +258,6 @@ public _extern SYS_SMBIOS_ENTRY U8 *sys_smbios_entry;
|
|||
#help_index ""
|
||||
public _extern SYS_DISK_UUID U64 sys_disk_uuid[2];
|
||||
public _extern SYS_IS_UEFI_BOOTED Bool sys_is_uefi_booted;
|
||||
public _extern SYS_BOOTLOADER_ID U8 sys_bootloader_id;
|
||||
|
||||
#help_index ""
|
||||
|
|
|
@ -214,7 +214,9 @@ public CDC *DCNew(I64 width, I64 height, CTask *task=NULL, Bool null_bitmap=FALS
|
|||
res->win_task = task;
|
||||
res->mem_task = task;
|
||||
res->width = width;
|
||||
res->width_internal = (width + 7) & ~7;
|
||||
// res->width_internal = (width + 7) & ~7;
|
||||
res->width_internal = width / 8 * 8;
|
||||
// res->width_internal = width;
|
||||
res->height = height;
|
||||
if (null_bitmap)
|
||||
res->flags |= DCF_DONT_DRAW;
|
||||
|
|
|
@ -34,7 +34,7 @@ U0 GrUpdateTaskWin(CTask *task)
|
|||
if (gr.fp_wall_paper)
|
||||
(*gr.fp_wall_paper)(task);
|
||||
}
|
||||
else if (!(task->win_inhibit & WIF_SELF_DOC))
|
||||
/*else*/ if (!(task->win_inhibit & WIF_SELF_DOC))
|
||||
DocUpdateTaskDocs(task);
|
||||
if (TaskValidate(task))
|
||||
{
|
||||
|
@ -360,25 +360,45 @@ U0 DCBlotColor8(CDC *dc, CDC *img)
|
|||
U0 GrCalcScreenUpdates()
|
||||
{
|
||||
U16 *screen, *last_screen = gr.screen_cache;
|
||||
U64 i, *src = text.raw_screen, *dst = text.fb_alias, diffs_size = GR_WIDTH * GR_HEIGHT / 2;
|
||||
U64 i, j, *src = text.raw_screen, *dst = text.fb_alias, diffs_size = GR_WIDTH * GR_HEIGHT / 2;
|
||||
U64 w, d;//, p;
|
||||
|
||||
w = GR_WIDTH;
|
||||
// p = (GR_WIDTH + 7) & ~7;
|
||||
d = GR_WIDTH / 8 * 8;
|
||||
|
||||
if (gr.screen_zoom == 1)
|
||||
screen = gr.dc2->body;
|
||||
else
|
||||
screen = gr.zoomed_dc->body;
|
||||
|
||||
for (i = 0; i < diffs_size; i++)
|
||||
for (i = j = 0; i < diffs_size; i++, j++)
|
||||
{
|
||||
if (j != 0 && j % (d/2) == 0 && d != w)
|
||||
{
|
||||
j += (w - d) / 2;
|
||||
}
|
||||
// if (screen[j] != last_screen[j])
|
||||
if (screen[i] != last_screen[i])
|
||||
dst[i] = src[i];
|
||||
// dst[i] = src[i];
|
||||
dst[j] = src[j];
|
||||
|
||||
}
|
||||
MemCopy(gr.screen_cache, screen, diffs_size * 2);
|
||||
}
|
||||
|
||||
U0 GrUpdateScreen32()
|
||||
{
|
||||
U64 size, *dst;
|
||||
// U64 size, *dst;
|
||||
U64 size;
|
||||
U32 *dst;
|
||||
U8 *src;
|
||||
U64 w, i, p, d;
|
||||
|
||||
w = GR_WIDTH;
|
||||
i = 0;
|
||||
p = (GR_WIDTH + 7) & ~7;
|
||||
d = GR_WIDTH / 8 * 8;
|
||||
|
||||
if (gr.screen_zoom == 1)
|
||||
{
|
||||
|
@ -392,8 +412,19 @@ U0 GrUpdateScreen32()
|
|||
size = src + gr.zoomed_dc->height * gr.zoomed_dc->width_internal;
|
||||
}
|
||||
dst = text.raw_screen;
|
||||
while (src < size) //draw 2 pixels at a time
|
||||
*dst++ = gr_palette[*src++ & 0xFF] | gr_palette[*src++ & 0xFF] << 32;
|
||||
while (src < size)
|
||||
{
|
||||
*dst++ = gr_palette[*src++ & 0xFF];
|
||||
i++;
|
||||
|
||||
if (i == d && d != w)
|
||||
{
|
||||
i = w - d;
|
||||
dst += i;
|
||||
i = 0;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
GrCalcScreenUpdates;
|
||||
|
|
|
@ -1220,3 +1220,20 @@ public U0 BIOSRep()
|
|||
{//Wrapper around $LK,"SysRep",A="MN:SysRep"$() to only show BIOS info.
|
||||
SysRep(SMBIOSt_BIOS);
|
||||
}
|
||||
|
||||
/*
|
||||
U0 SMBIOSWallPaperInit()
|
||||
{
|
||||
CSMBIOSSystemInfo *sys_info = SMBIOSStructGet(SMBIOSt_SYSTEM);
|
||||
U8 *company = SMBIOSStr(sys_info, sys_info->manufacturer);
|
||||
|
||||
if (!StrCompare(company, "VMware, Inc."))
|
||||
wall->host_ch = 'W';
|
||||
else if (!StrCompare(company, "innotek GmbH"))
|
||||
wall->host_ch = 'V';
|
||||
else if (!StrCompare(company, "QEMU"))
|
||||
wall->host_ch = 'Q';
|
||||
else
|
||||
wall->host_ch = 'M';
|
||||
} SMBIOSWallPaperInit;
|
||||
*/
|
||||
|
|
|
@ -33,6 +33,8 @@ public Bool ZXERep(U8 *filename)
|
|||
CZXE *zxe;
|
||||
CHashExport *saved_hash_ptr = NULL;
|
||||
|
||||
"%c", 20;
|
||||
|
||||
fbuf = ExtDefault(filename, "ZXE");
|
||||
|
||||
if (!(zxe = FileRead(fbuf, &size)))
|
||||
|
@ -60,6 +62,7 @@ public Bool ZXERep(U8 *filename)
|
|||
ptr = zxe(U8 *) + zxe->patch_table_offset;
|
||||
while (etype = *ptr++)
|
||||
{
|
||||
saved_hash_ptr = NULL;
|
||||
i = *ptr(U32 *)++;
|
||||
sptr = ptr;
|
||||
ptr += StrLen(sptr) + 1;
|
||||
|
@ -71,6 +74,30 @@ public Bool ZXERep(U8 *filename)
|
|||
saved_hash_ptr = HashFind(sptr, Fs->hash_table, HTG_ALL);
|
||||
if (!saved_hash_ptr)
|
||||
"Unresolved Reference:%s\n", sptr;
|
||||
else
|
||||
"%s", sptr;
|
||||
break;
|
||||
|
||||
case IET_REL32_EXPORT:
|
||||
"$$TR,\"ASM\"$$\n$$ID,2$$";
|
||||
Un(i + zxe(U8 *) + sizeof(CZXE));
|
||||
"\n$$ID,-2$$\n";
|
||||
"ZXERep REL32_EXPORT";
|
||||
break;
|
||||
case IET_IMM32_EXPORT:
|
||||
"ZXERep IMM32_EXPORT";
|
||||
break;
|
||||
case IET_REL64_EXPORT:
|
||||
"ZXERep REL64_EXPORT";
|
||||
break;
|
||||
case IET_IMM64_EXPORT:
|
||||
"ZXERep IMM64_EXPORT";
|
||||
break;
|
||||
case IET_MAIN:
|
||||
"ZXERep IET_MAIN";
|
||||
break;
|
||||
case IET_END:
|
||||
"ZXERep IET_END";
|
||||
break;
|
||||
|
||||
case IET_ABS_ADDR:
|
||||
|
@ -92,6 +119,10 @@ public Bool ZXERep(U8 *filename)
|
|||
for (j = 0; j < i; j++)
|
||||
"%X ", *ptr(U32 *)++;
|
||||
break;
|
||||
|
||||
default:
|
||||
"ZXERep missing IET:%d", etype;
|
||||
break;
|
||||
}
|
||||
'\n';
|
||||
}
|
||||
|
@ -102,5 +133,7 @@ br_done2:
|
|||
br_done1:
|
||||
Free(fbuf);
|
||||
|
||||
"%c", 20;
|
||||
|
||||
return res;
|
||||
}
|
||||
|
|
Binary file not shown.
|
@ -123,9 +123,13 @@ struct CKernel {
|
|||
uint64_t sys_disk_uuid[2];
|
||||
uint32_t sys_boot_stack;
|
||||
uint8_t sys_is_uefi_booted;
|
||||
uint8_t sys_bootloader_id;
|
||||
struct CVideoInfo sys_framebuffer_list[VBE_MODES_NUM];
|
||||
} __attribute__((packed));
|
||||
|
||||
#define BL_ZEAL 0
|
||||
#define BL_LIMINE 1
|
||||
|
||||
#define BOOT_SRC_RAM 2
|
||||
#define BOOT_SRC_HDD 3
|
||||
#define BOOT_SRC_DVD 4
|
||||
|
@ -349,6 +353,8 @@ void _start(void) {
|
|||
kernel->sys_is_uefi_booted = true;
|
||||
}
|
||||
|
||||
kernel->sys_bootloader_id = BL_LIMINE;
|
||||
|
||||
memcpy(trampoline_phys, trampoline, trampoline_size);
|
||||
memcpy((void *)final_address, kernel, module_kernel->size);
|
||||
|
||||
|
|
Loading…
Reference in a new issue