diff --git a/kernel/trunk/const.inc b/kernel/trunk/const.inc index ab1f5bae87..06dda4a5af 100644 --- a/kernel/trunk/const.inc +++ b/kernel/trunk/const.inc @@ -179,6 +179,9 @@ struct TSS _io_map_1 rb 4096 ends +PARTITION_COUNT equ 64 +DRIVE_DATA_SIZE equ (16+PARTITION_COUNT*100) + OS_BASE equ 0x80000000 window_data equ (OS_BASE+0x0001000) @@ -189,25 +192,13 @@ TASK_BASE equ (OS_BASE+0x0003010) TASK_DATA equ (OS_BASE+0x0003020) TASK_EVENT equ (OS_BASE+0x0003020) -mouseunder equ (OS_BASE+0x0006900) CDDataBuf equ (OS_BASE+0x0007000) FLOPPY_BUFF equ (OS_BASE+0x0008000) -ACTIVE_PROC_STACK equ (OS_BASE+0x000A400) ;unused idts equ (OS_BASE+0x000B100) WIN_STACK equ (OS_BASE+0x000C000) WIN_POS equ (OS_BASE+0x000C400) FDD_BUFF equ (OS_BASE+0x000D000) -PUTPIXEL equ (OS_BASE+0x000E020) -GETPIXEL equ (OS_BASE+0x000E024) - -;unused ? only one reference -BANK_SWITCH equ (OS_BASE+0x000E030) - -;unused ? store mousepointer -MOUSE_PICTURE equ (OS_BASE+0x000F200) - -;MOUSE_VISIBLE equ (OS_BASE+0x000F204) WIN_TEMP_XY equ (OS_BASE+0x000F300) KEY_COUNT equ (OS_BASE+0x000F400) KEY_BUFF equ (OS_BASE+0x000F401) @@ -216,43 +207,19 @@ BTN_COUNT equ (OS_BASE+0x000F500) BTN_BUFF equ (OS_BASE+0x000F501) -MOUSE_SCROLL_H equ (OS_BASE+0x000FB08) -MOUSE_X equ (OS_BASE+0x000FB0A) -MOUSE_Y equ (OS_BASE+0x000FB0C) -MOUSE_SCROLL_V equ (OS_BASE+0x000FB0E) - -MOUSE_COLOR_MEM equ (OS_BASE+0x000FB10) -COLOR_TEMP equ (OS_BASE+0x000FB30) -BTN_DOWN equ (OS_BASE+0x000FB40) -X_UNDER equ (OS_BASE+0x000FB4A) -Y_UNDER equ (OS_BASE+0x000FB4C) - -;unused ? only one reference -MOUSE_BUFF_COUNT equ (OS_BASE+0x000FCFF) - - -LFBAddress equ (OS_BASE+0x000FE80) BTN_ADDR equ (OS_BASE+0x000FE88) MEM_AMOUNT equ (OS_BASE+0x000FE8C) SYS_SHUTDOWN equ (OS_BASE+0x000FF00) TASK_ACTIVATE equ (OS_BASE+0x000FF01) -REDRAW_BACKGROUND equ (OS_BASE+0x000FFF0) - -BANK_RW equ (OS_BASE+0x000FFF2) TMP_STACK_TOP equ 0x006CC00 sys_pgdir equ (OS_BASE+0x006F000) -DRIVE_DATA equ (OS_BASE+0x0070000) - SLOT_BASE equ (OS_BASE+0x0080000) -;unused -TMP_BUFF equ (OS_BASE+0x0090000) - VGABasePtr equ (OS_BASE+0x00A0000) RAMDISK equ (OS_BASE+0x0100000) diff --git a/kernel/trunk/data32.inc b/kernel/trunk/data32.inc index 399c976085..62544c1abd 100644 --- a/kernel/trunk/data32.inc +++ b/kernel/trunk/data32.inc @@ -323,6 +323,8 @@ tls_data_l: endofcode: gdte: +diff16 "end of .data segment",0,$ + align 16 cur_saved_data: rb 4096 @@ -364,11 +366,38 @@ _display display_t _WinMapAddress rd 1 _WinMapSize rd 1 +LFBAddress rd 1 Screen_Max_X rd 1 Screen_Max_Y rd 1 SCR_MODE rw 2 +PUTPIXEL rd 1 +GETPIXEL rd 1 + +if VESA_1_2_VIDEO +BANK_SWITCH rd 1 reserved for vesa 1.2 +BANK_RW rd 1 +end if + +REDRAW_BACKGROUND rb 4 + +mouseunder rd 16*24 + +MOUSE_PICTURE rd 1 + +MOUSE_SCROLL_H rw 1 +MOUSE_X: rw 1 +MOUSE_Y: rw 1 +MOUSE_SCROLL_V rw 1 + +X_UNDER rw 1 +Y_UNDER rw 1 +COLOR_TEMP rd 1 +MOUSE_COLOR_MEM rd 1 + +BTN_DOWN: rb 4 + def_cursor rd 1 def_cursor_clock rd 1 current_cursor rd 1 @@ -513,5 +542,7 @@ NumBiosDisks rd 1 BiosDisksData rb 200h BiosDiskCaches rb 80h*(cache_ide1-cache_ide0) BiosDiskPartitions rd 80h +align 16 +DRIVE_DATA: rb DRIVE_DATA_SIZE IncludeUGlobals diff --git a/kernel/trunk/detect/dev_fd.inc b/kernel/trunk/detect/dev_fd.inc index c8dbdd38d7..347d77b381 100644 --- a/kernel/trunk/detect/dev_fd.inc +++ b/kernel/trunk/detect/dev_fd.inc @@ -15,7 +15,7 @@ $Revision$ ;*************************************************** xor eax, eax mov edi, DRIVE_DATA - mov ecx, 16384 + mov ecx, DRIVE_DATA_SIZE/4 cld rep stosd diff --git a/kernel/trunk/fs/fs_lfn.inc b/kernel/trunk/fs/fs_lfn.inc index 5f773a7e64..61d5265005 100644 --- a/kernel/trunk/fs/fs_lfn.inc +++ b/kernel/trunk/fs/fs_lfn.inc @@ -683,61 +683,43 @@ fs_NumCdServices = ($ - fs_CdServices)/4 fs_HasRamdisk: mov al, 1 ; we always have ramdisk ret - fs_HasFloppy: cmp byte [DRIVE_DATA], 0 setnz al ret - fs_HasHd0: - mov al, [DRIVE_DATA+1] - and al, 11000000b - cmp al, 01000000b - setz al + test byte [DRIVE_DATA+1], 01000000b + setnz al ret fs_HasHd1: - mov al, [DRIVE_DATA+1] - and al, 00110000b - cmp al, 00010000b - setz al + test byte [DRIVE_DATA+1], 00010000b + setnz al ret fs_HasHd2: - mov al, [DRIVE_DATA+1] - and al, 00001100b - cmp al, 00000100b - setz al + test byte [DRIVE_DATA+1], 00000100b + setnz al ret fs_HasHd3: - mov al, [DRIVE_DATA+1] - and al, 00000011b - cmp al, 00000001b - setz al + test byte [DRIVE_DATA+1], 00000001b + setnz al ret ;******************************************************* fs_HasCd0: - mov al, [DRIVE_DATA+1] - and al, 11000000b - cmp al, 10000000b - setz al + test byte [DRIVE_DATA+1], 10000000b + setnz al ret fs_HasCd1: - mov al, [DRIVE_DATA+1] - and al, 00110000b - cmp al, 00100000b - setz al + test byte [DRIVE_DATA+1], 00100000b + setnz al ret fs_HasCd2: - mov al, [DRIVE_DATA+1] - and al, 00001100b - cmp al, 00001000b - setz al + test byte [DRIVE_DATA+1], 00001000b + setnz al ret fs_HasCd3: - mov al, [DRIVE_DATA+1] - and al, 00000011b - cmp al, 00000010b - setz al + test byte [DRIVE_DATA+1], 00000010b + setnz al ret ;******************************************************* diff --git a/kernel/trunk/kernel.asm b/kernel/trunk/kernel.asm index 4acca47804..9ce3ff586f 100644 --- a/kernel/trunk/kernel.asm +++ b/kernel/trunk/kernel.asm @@ -75,6 +75,7 @@ $Revision$ USE_COM_IRQ equ 1 ; make irq 3 and irq 4 available for PCI devices +VESA_1_2_VIDEO equ 0 ; enable vesa 1.2 bank switch functions ; Enabling the next line will enable serial output console ;debug_com_base equ 0x3f8 ; 0x3f8 is com1, 0x2f8 is com2, 0x3e8 is com3, 0x2e8 is com4, no irq's are used @@ -230,6 +231,10 @@ tmp_gdt: include "data16.inc" +if ~ lang eq sp +diff16 "end of bootcode",0,$+0x10000 +end if + use32 org $+0x10000 @@ -1241,13 +1246,10 @@ set_variables: xor eax, eax mov [BTN_ADDR], dword BUTTON_INFO ; address of button list - mov byte [MOUSE_BUFF_COUNT], al ; mouse buffer mov byte [KEY_COUNT], al ; keyboard buffer mov byte [BTN_COUNT], al ; button buffer ; mov [MOUSE_X],dword 100*65536+100 ; mouse x/y - ;!! IP 04.02.2005: -; mov byte [DONT_SWITCH], al; change task if possible pop eax ret @@ -2324,7 +2326,7 @@ sysfn_getdiskinfo: ; 18.11 = get disk info table dec ecx jnz exit_for_anyone call for_all_tables - mov ecx, 16384 + mov ecx, DRIVE_DATA_SIZE/4 cld rep movsd ret @@ -5806,6 +5808,10 @@ scan_rsdp: ret end if +if ~ lang eq sp +diff16 "end of .text segment",0,$ +end if + include "data32.inc" __REV__ = __REV