merge trunk

git-svn-id: svn://kolibrios.org@2268 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Sergey Semyonov (Serge) 2011-10-05 11:14:40 +00:00
parent 1463afc261
commit 822829ea70
21 changed files with 835 additions and 4204 deletions

View File

@ -5,7 +5,7 @@
;; ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
$Revision: 2140 $
$Revision: 2257 $
; =============================================================================
; ================================= Constants =================================
@ -21,10 +21,10 @@ DISK_NO_INSERT_NOTIFICATION = 1
; Media flags. Represent bits in DISKMEDIAINFO.Flags.
DISK_MEDIA_READONLY = 1
; If we see too many partitions, probably there is some error on the disk.
; If too many partitions are detected,there is probably an error on the disk.
; 256 partitions should be enough for any reasonable use.
; Also, the same number is limiting the number of MBRs to process; if we see
; too many MBRs, probably there is a loop in the MBR structure.
; Also, the same number is limiting the number of MBRs to process; if
; too many MBRs are visible,there probably is a loop in the MBR structure.
MAX_NUM_PARTITIONS = 256
; =============================================================================
@ -85,9 +85,9 @@ struct DISKFUNC
; Return value: 0 = disable cache, otherwise = used cache size in bytes.
ends
; This structure holds an information about a media.
; Objects with this structure are allocated by the kernel as a part of DISK
; structure and filled by a driver in the 'querymedia' callback.
; This structure holds information on a medium.
; Objects with this structure are allocated by the kernel as a part of the DISK
; structure and are filled by a driver in the 'querymedia' callback.
struct DISKMEDIAINFO
.Flags dd ?
; Combination of DISK_MEDIA_* bits.
@ -97,8 +97,8 @@ struct DISKMEDIAINFO
; Size of the media in sectors.
ends
; This structure represents disk cache. To follow the old implementation,
; there are two distinct caches for a disk, one for "system" data, other
; This structure represents the disk cache. To follow the old implementation,
; there are two distinct caches for a disk, one for "system" data,and the other
; for "application" data.
struct DISKCACHE
.Lock MUTEX
@ -160,9 +160,9 @@ struct DISK
; Another reference is taken during any filesystem operation for this media.
; The callback 'closemedia' is called when the reference count decrements to
; zero: this usually occurs in 'disk_media_changed', but can be delayed to the
; end of last filesystem operation, if one is active.
; end of the last filesystem operation, if one is active.
.MediaInfo DISKMEDIAINFO
; This field keeps an information about the current media.
; This field keeps information on the current media.
.NumPartitions dd ?
; Number of partitions on this media.
.Partitions dd ?
@ -227,9 +227,9 @@ endg
uglobal
; This mutex guards all operations with the global list of DISK structures.
disk_list_mutex MUTEX
; * There are two dependent objects, a disk and a media. In the simplest case
; * There are two dependent objects, a disk and a media. In the simplest case,
; disk and media are both non-removable. However, in the general case both
; can be removed at any time, simultaneously or only media, this makes things
; can be removed at any time, simultaneously or only media,and this makes things
; complicated.
; * For efficiency, both disk and media objects are located in the one
; structure named DISK. However, logically they are different.
@ -341,7 +341,7 @@ disk_add:
; 1b. Check the result. If allocation failed, return (go to 9) with eax = 0.
test eax, eax
jz .nothing
; 2. Copy disk name to the DISK structure.
; 2. Copy the disk name to the DISK structure.
; 2a. Get length of the name, including the terminating zero.
mov ebx, [esp+8+8] ; ebx = pointer to name
push eax ; save allocated pointer to DISK
@ -627,7 +627,7 @@ disk_default_adjust_cache_size:
mov eax, [esp+4]
ret 4
; This is an internal function called from 'disk_media_changed' when new media
; This is an internal function called from 'disk_media_changed' when a new media
; is detected. It creates the list of partitions for the media.
; If media is not partitioned, then the list consists of one partition which
; covers all the media.
@ -688,17 +688,17 @@ lock dec [partition_buffer_users] ; no, we must allocate
; execute step 9 and possibly step 10.
test ebp, ebp
jnz .mbr
; Partition table can be present or not present. In the first case, we just
; read the MBR. In the second case, we just read the bootsector for some
; The partition table can be present or not present. In the first case, we just
; read the MBR. In the second case, we just read the bootsector for a
; filesystem.
; We use the following algorithm to distinguish between these cases.
; The following algorithm is used to distinguish between these cases.
; A. If at least one entry of the partition table is invalid, this is
; a bootsector. See the description of 'is_partition_table_entry' for
; definition of validity.
; B. If all entries are empty (filesystem type field is zero) and the first
; byte is jmp opcode (0EBh or 0E9h), this is a bootsector which happens to
; have zeros in the place of partition table.
; C. Otherwise, this is a MBR.
; C. Otherwise, this is an MBR.
; 9. Test for MBR vs bootsector.
; 9a. Check entries. If any is invalid, go to 10 (rule A).
call is_partition_table_entry
@ -724,7 +724,7 @@ lock dec [partition_buffer_users] ; no, we must allocate
cmp byte [ebx], 0E9h
jnz .mbr
.notmbr:
; 10. This is not MBR. The media is not partitioned. Create one partition
; 10. This is not an MBR. The media is not partitioned. Create one partition
; which covers all the media and abort the loop.
stdcall disk_add_partition, 0, 0, \
dword [esi+DISK.MediaInfo.Capacity], dword [esi+DISK.MediaInfo.Capacity+4]

View File

@ -552,11 +552,11 @@ end if
adc byte [di+preboot_dma-preboot_device], 0
cmp byte [di+preboot_biosdisk-preboot_device], 1
adc byte [di+preboot_biosdisk-preboot_device], 0
; default value for VRR is OFF
cmp byte [di+preboot_vrrm-preboot_device], 0
jnz @f
mov byte [di+preboot_vrrm-preboot_device], 2
@@:
;; default value for VRR is OFF
; cmp byte [di+preboot_vrrm-preboot_device], 0
; jnz @f
; mov byte [di+preboot_vrrm-preboot_device], 2
;@@:
; notify user
_setcursor 5,2
@ -584,9 +584,9 @@ end if
mov si, usebd_msg
cmp [preboot_biosdisk], 1
call .say_on_off
mov si, vrrm_msg
cmp [preboot_vrrm], 1
call .say_on_off
; mov si, vrrm_msg
; cmp [preboot_vrrm], 1
; call .say_on_off
mov si, preboot_device_msg
call print
mov al, [preboot_device]
@ -674,9 +674,9 @@ end if
jz .change_a
cmp al, 'b'
jz .change_b
cmp al, 'c'
jz .change_c
cmp al, 'd'
; cmp al, 'c'
; jz .change_c
cmp al, 'c' ; 'd'
jnz .show_remarks
_setcursor 15,0
mov si, bdev
@ -784,15 +784,15 @@ end if
mov [preboot_biosdisk], al
_setcursor 11,0
jmp .d
.change_c:
_setcursor 15,0
mov si, vrrmprint
call print
mov bx, '12'
call getkey
mov [preboot_vrrm], al
_setcursor 12,0
jmp .d
;.change_c:
; _setcursor 15,0
; mov si, vrrmprint
; call print
; mov bx, '12'
; call getkey
; mov [preboot_vrrm], al
; _setcursor 12,0
; jmp .d
;;;;;;;;;;;;;;;;;;;;;;;;;;;;
.say_on_off:
pushf
@ -947,10 +947,10 @@ end if
mov al, [preboot_dma]
mov [es:0x901F], al
; VRR_M USE
mov al,[preboot_vrrm]
mov [es:0x9030], al
;; VRR_M USE
;
; mov al,[preboot_vrrm]
; mov [es:0x9030], al
mov [es:0x901E], byte 1
; BOOT DEVICE

View File

@ -23,43 +23,27 @@ d80x25_bottom:
d80x25_bottom_num = 3
msg_apm db " APM x.x ", 0
vervesa db "Version of Vesa: Vesa x.x",13,10,0
novesa db "Display: EGA/CGA",13,10,0
s_vesa db "Version of VESA: "
.ver db "?.?",13,10,0
gr_mode db "Select a videomode: ",13,10,0
;s_bpp db 13,10,186," ƒ«ã¡¨­  梥â : "
; .bpp dw "??"
; db 13,10,0
vrrmprint db "Apply VRR? (picture frequency greater than 60Hz"
db " only for transfers:",13,10
db 186," 1024*768->800*600 and 800*600->640*480) [1-yes,2-no]:",0
ask_bd db "Add disks visible by BIOS emulated in V86-mode? [1-yes, 2-no]: ",0
if defined extended_primary_loader
bdev db "Load ramdisk from [1-floppy; 2-kolibri.img]: ",0
else
bdev db "Load ramdisk from [1-floppy; 2-C:\kolibri.img (FAT32);"
db 13,10,186," "
db "3-use preloaded ram-image from kernel restart;"
db 13,10,186," "
db "4-create blank image]: ",0
else
bdev db "Load ramdisk from [1-floppy; 2-kolibri.img]: ",0
end if
probetext db 13,10,13,10,186," Use standart graphics mode? [1-yes, "
db "2-probe bios (Vesa 3.0)]: ",0
;memokz256 db 13,10,186," RAM 256 Mb",0
;memokz128 db 13,10,186," RAM 128 Mb",0
;memokz64 db 13,10,186," RAM 64 Mb",0
;memokz32 db 13,10,186," RAM 32 Mb",0
;memokz16 db 13,10,186," RAM 16 Mb",0
prnotfnd db "Fatal - Videomode not found.",0
;modena db "Fatal - VBE 0x112+ required.",0
not386 db "Fatal - CPU 386+ required.",0
btns db "Fatal - Can't determine color depth.",0
fatalsel db "Fatal - Graphics mode not supported by hardware.",0
pres_key db "Press any key to choose a new videomode.",0
badsect db 13,10,186," Fatal - Bad sector. Replace floppy.",0
@ -77,21 +61,15 @@ time_str db " 5 seconds"
current_cfg_msg db "Current settings:",13,10,0
curvideo_msg db " [a] Videomode: ",0
;modes_msg dw mode4,mode1,mode2,mode3
;modevesa20 db " with LFB",0
;modevesa12 db ", VESA 1.2 Bnk",0
mode0 db "320x200, EGA/CGA 256 colors",13,10,0
mode9 db "640x480, VGA 16 colors",13,10,0
;probeno_msg db " (standard mode)",0
;probeok_msg db " (check nonstandard modes)",0
;dma_msg db " [b] Use DMA for HDD access:",0
usebd_msg db " [b] Add disks visible by BIOS:",0
on_msg db " on",13,10,0
off_msg db " off",13,10,0
;readonly_msg db " only for reading",13,10,0
vrrm_msg db " [c] Use VRR:",0
preboot_device_msg db " [d] Floppy image: ",0
preboot_device_msg db " [c] Floppy image: ",0
if defined extended_primary_loader
preboot_device_msgs dw 0,pdm1,pdm2,0
pdm1 db "real floppy",13,10,0
@ -103,7 +81,9 @@ pdm2 db "C:\kolibri.img (FAT32)",13,10,0
pdm3 db "use already loaded image",13,10,0
pdm4 db "create blank image",13,10,0
end if
loading_msg db "Loading KolibriOS...",0
if ~ defined extended_primary_loader
save_quest db "Remember current settings? [y/n]: ",0
loader_block_error db "Bootloader data invalid, I cannot continue. Stopped.",0
@ -116,7 +96,6 @@ _rs db 186,'
_bt db 186,' ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÙ',13,10,0
remark1 db "Default values were selected to match most of configurations, but not all.",0
remark2 db "If you have CRT-monitor, enable VRR in the item [c].",0
remark3 db "If the system does not boot, try to disable the item [b].",0
remarks dw remark1, remark2, remark3
num_remarks = 3
remark2 db "If the system does not boot, try to disable the item [b].",0
remarks dw remark1, remark2
num_remarks = 2

View File

@ -15,41 +15,22 @@ $Revision$
d80x25_bottom:
db 186,' KolibriOS based on MenuetOS and comes with ABSOLUTELY '
db 'NO WARRANTY ',186
db 186,' See file COPYING for details '
db 186,' KolibriOS pohineb MenuetOS ja kaasas IGASUGUSE GARANTI'
db 'ITA ',186
db 186,' Naha faili COPYING detailid '
db ' ',186
line_full_bottom
d80x25_bottom_num = 3
novesa db "Ekraan: EGA/CGA",13,10,0
vervesa db "Vesa versioon: Vesa x.x",13,10,0
vervesa_off=20
msg_apm db " APM x.x ", 0
gr_mode db 186," Vesa 2.0+ 16 M LFB: [1] 640x480, [2] 800x600, "
db "[3] 1024x768, [4] 1280x1024",13,10
db 186," Vesa 1.2 16 M Bnk: [5] 640x480, [6] 800x600, "
db "[7] 1024x768, [8] 1280x1024",13,10
db 186," EGA/CGA 256 värvi: [9] 320x200, "
db "VGA 16 värvi: [0] 640x480",13,10
db 186," Vali reziim: ",0
bt24 db "Bitti pikseli kohta: 24",13,10,0
bt32 db "Bitti pikseli kohta: 32",13,10,0
vrrmprint db "Kinnita VRR? (ekraani sagedus suurem kui 60Hz"
db " ainult:",13,10
db 186," 1024*768->800*600 ja 800*600->640*480) [1-jah,2-ei]:",0
;askmouse db " Hiir:"
; db " [1] PS/2 (USB), [2] Com1, [3] Com2."
; db " Vali port [1-3]: ",0
;no_com1 db 13,10,186, " No COM1 mouse",0
;no_com2 db 13,10,186, " No COM2 mouse",0
;ask_dma db "Use DMA for HDD access? [1-yes, 2-only for reading, 3-no]: ",0
ask_bd db "Add disks visible by BIOS emulated in V86-mode? [1-yes, 2-no]: ",0
;gr_direct db 186," Use direct LFB writing? "
; db "[1-yes/2-no] ? ",0
;mem_model db 13,10,186," Motherboard memory [1-16 Mb / 2-32 Mb / "
; db "3-64Mb / 4-128 Mb / 5-256 Mb] ? ",0
;bootlog db 13,10,186," After bootlog display [1-continue/2-pause] ? ",0
novesa db "Ekraan: EGA/CGA",13,10,0
s_vesa db "Vesa versioon: "
.ver db "?.?",13,10,0
gr_mode db "Vali videomode: ",13,10,0
ask_bd db "Lisa kettad nahtavaks BIOS reziim V86? [1-jah, 2-no]: ",0
if defined extended_primary_loader
bdev db "Paigalda mäluketas [1-diskett; 2-kolibri.img]: ",0
else
@ -59,18 +40,12 @@ bdev db "Paigalda m
db 13,10,186," "
db "4-loo tühi pilt]: ",0
end if
probetext db 13,10,13,10,186," Kasuta standartset graafika reziimi? [1-jah, "
db "2-leia biosist (Vesa 3.0)]: ",0
;memokz256 db 13,10,186," RAM 256 Mb",0
;memokz128 db 13,10,186," RAM 128 Mb",0
;memokz64 db 13,10,186," RAM 64 Mb",0
;memokz32 db 13,10,186," RAM 32 Mb",0
;memokz16 db 13,10,186," RAM 16 Mb",0
prnotfnd db "Fataalne - Videoreziimi ei leitud.",0
;modena db "Fataalne - VBE 0x112+ on vajalik.",0
not386 db "Fataalne - CPU 386+ on vajalik.",0
btns db "Fataalne - Ei suuda värvisügavust määratleda.",0
fatalsel db "Fataalne - Graafilist reziimi riistvara ei toeta.",0
pres_key db "Vajutage suvalist klahvi, et valida uus videomode.",0
badsect db 13,10,186," Fataalne - Vigane sektor. Asenda diskett.",0
memmovefailed db 13,10,186," Fataalne - Int 0x15 liigutamine ebaõnnestus.",0
okt db " ... OK"
@ -85,24 +60,16 @@ time_str db " 5 sekundit"
db " automaatseks jätkamiseks",13,10,0
current_cfg_msg db "Praegused seaded:",13,10,0
curvideo_msg db " [a] Videoreziim: ",0
mode1 db "640x480",0
mode2 db "800x600",0
mode3 db "1024x768",0
mode4 db "1280x1024",0
modes_msg dw mode4,mode1,mode2,mode3
modevesa20 db " koos LFB",0
modevesa12 db ", VESA 1.2 Bnk",0
mode9 db "320x200, EGA/CGA 256 värvi",0
mode10 db "640x480, VGA 16 värvi",0
probeno_msg db " (standard reziim)",0
probeok_msg db " (kontrolli ebastandardseid reziime)",0
;dma_msg db " [b] Kasuta DMA'd HDD juurdepääsuks:",0
usebd_msg db " [b] Add disks visible by BIOS:",0
mode0 db "320x200, EGA/CGA 256 värvi",0
mode9 db "640x480, VGA 16 värvi",0
usebd_msg db " [b] Lisa kettad nahtavaks BIOS:",0
on_msg db " sees",13,10,0
off_msg db " väljas",13,10,0
;readonly_msg db " ainult lugemiseks",13,10,0
vrrm_msg db " [c] Kasuta VRR:",0
preboot_device_msg db " [d] Disketi kujutis: ",0
preboot_device_msg db " [c] Disketi kujutis: ",0
if defined extended_primary_loader
preboot_device_msgs dw 0,pdm1,pdm2,0
pdm1 db "reaalne diskett",13,10,0
@ -114,14 +81,21 @@ pdm2 db "C:\kolibri.img (FAT32)",13,10,0
pdm3 db "kasuta juba laaditud kujutist",13,10,0
pdm4 db "loo tühi pilt",13,10,0
end if
loading_msg db "Laadin KolibriOS...",0
if ~ defined extended_primary_loader
save_quest db "Jäta meelde praegused seaded? [y/n]: ",0
loader_block_error db "Alglaaduri andmed vigased, ei saa jätkata. Peatatud.",0
end if
remark1 db "Default values were selected to match most of configurations, but not all.",0
remark2 db "If you have CRT-monitor, enable VRR in the item [c].",0
remark3 db "If the system does not boot, try to disable the item [b].",0
remarks dw remark1, remark2, remark3
num_remarks = 3
_st db 186,' ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄ¿',13,10,0
_r1 db 186,' ³ 320x200 EGA/CGA 256 colors ³ ³',13,10,0
_r2 db 186,' ³ 640x480 VGA 16 colors ³ ³',13,10,0
_rs db 186,' ³ ????x????@?? SVGA VESA ³ ³',13,10,0
_bt db 186,' ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÙ',13,10,0
remark1 db "Vaikimisi maaratud vaartused on valitud mugavuse enamikes, kuid mitte koik.",0
remark2 db "Kui susteem ei kaivitu, proovige lulitada kirje [b].",0
remarks dw remark1, remark2
num_remarks = 2

View File

@ -15,11 +15,6 @@ $Revision$
d80x25_bottom:
; db 186,' KolibriOS based on MenuetOS and comes with ABSOLUTELY '
; db 'NO WARRANTY ',186
; db 186,' See file COPYING for details '
; db ' ',186
db 186,' KolibriOS basiert auf MenuetOS und wird ohne jegliche '
db ' Garantie vertrieben ',186
db 186,' Details stehen in der Datei COPYING '
@ -27,34 +22,15 @@ d80x25_bottom:
line_full_bottom
d80x25_bottom_num = 3
novesa db "Anzeige: EGA/CGA ",13,10,0
vervesa db "Vesa-Version: Vesa ",13,10,0
vervesa_off=22
msg_apm db " APM x.x ", 0
gr_mode db 186," Vesa 2.0+ 16 M LFB: [1] 640x480, [2] 800x600, "
db "[3] 1024x768, [4] 1280x1024",13,10
db 186," Vesa 1.2 16 M Bnk: [5] 640x480, [6] 800x600, "
db "[7] 1024x768, [8] 1280x1024",13,10
db 186," EGA/CGA 256 Farben: [9] 320x200, "
db "VGA 16 Farben: [0] 640x480",13,10
db 186," Waehle Modus: ",0
bt24 db "Bits Per Pixel: 24",13,10,0
bt32 db "Bits Per Pixel: 32",13,10,0
vrrmprint db "VRR verwenden? (Monitorfrequenz groesser als 60Hz"
db " only for transfers:",13,10
db 186," 1024*768->800*600 und 800*600->640*480) [1-ja,2-nein]:",0
;askmouse db " Maus angeschlossen an:"
; db " [1] PS/2 (USB), [2] Com1, [3] Com2."
; db " Waehle Port [1-3]: ",0
;no_com1 db 13,10,186, " Keine COM1 Maus",0
;no_com2 db 13,10,186, " Keine COM2 Maus",0
;ask_dma db "Nutze DMA zum HDD Zugriff? [1-ja, 2-allein fur Lesen, 3-nein]: ",0
ask_bd db "Add disks visible by BIOS emulated in V86-mode? [1-yes, 2-no]: ",0
;gr_direct db 186," Benutze direct LFB? "
; db "[1-ja/2-nein] ? ",0
;mem_model db 13,10,186," Hauptspeicher [1-16 Mb / 2-32 Mb / "
; db "3-64Mb / 4-128 Mb / 5-256 Mb] ? ",0
;bootlog db 13,10,186," After bootlog display [1-continue/2-pause] ? ",0
novesa db "Anzeige: EGA/CGA ",13,10,0
s_vesa db "Vesa-Version: "
.ver db "?.?",13,10,0
gr_mode db "Wahlen Sie einen videomode: ",13,10,0
ask_bd db "Add-Festplatten sichtbar BIOS in V86-Modus emuliert? [1-ja, 2 nein]: ",0
if defined extended_primary_loader
bdev db "Lade die Ramdisk von [1-Diskette; 2-kolibri.img]: ",0
else
@ -64,18 +40,12 @@ bdev db "Lade die Ramdisk von [1-Diskette; 2-C:\kolibri.img (FAT32);"
db 13,10,186," "
db "4-create blank image]: ",0
end if
probetext db 13,10,13,10,186," Nutze Standardgrafikmodi? [1-ja, "
db "2-BIOS Test (Vesa 3.0)]: ",0
;memokz256 db 13,10,186," RAM 256 Mb",0
;memokz128 db 13,10,186," RAM 128 Mb",0
;memokz64 db 13,10,186," RAM 64 Mb",0
;memokz32 db 13,10,186," RAM 32 Mb",0
;memokz16 db 13,10,186," RAM 16 Mb",0
prnotfnd db "Fatal - Videomodus nicht gefunden.",0
;modena db "Fatal - VBE 0x112+ required.",0
not386 db "Fatal - CPU 386+ benoetigt.",0
btns db "Fatal - konnte Farbtiefe nicht erkennen.",0
fatalsel db "Fatal - Grafikmodus nicht unterstuetzt.",0
pres_key db "Drucken Sie eine beliebige Taste, um eine neue videomode wahlen.",0
badsect db 13,10,186," Fatal - Sektorfehler, Andere Diskette neutzen.",0
memmovefailed db 13,10,186," Fatal - Int 0x15 Fehler.",0
okt db " ... OK"
@ -90,24 +60,16 @@ time_str db " 5 Sekunden"
db " bis zum automatischen Start",13,10,0
current_cfg_msg db "Aktuelle Einstellungen:",13,10,0
curvideo_msg db " [a] Videomodus: ",0
mode1 db "640x480",0
mode2 db "800x600",0
mode3 db "1024x768",0
mode4 db "1280x1024",0
modes_msg dw mode4,mode1,mode2,mode3
modevesa20 db " mit LFB",0
modevesa12 db ", VESA 1.2 Bnk",0
mode9 db "320x200, EGA/CGA 256 colors",0
mode10 db "640x480, VGA 16 colors",0
probeno_msg db " (Standard Modus)",0
probeok_msg db " (teste nicht-standard Modi)",0
;dma_msg db " [b] Nutze DMA zum HDD Aufschreiben:",0
usebd_msg db " [b] Add disks visible by BIOS:",0
mode0 db "320x200, EGA/CGA 256 colors",13,10,0
mode9 db "640x480, VGA 16 colors",13,10,0
usebd_msg db " [b] Add-Festplatten sichtbar durch das BIOS:",0
on_msg db " an",13,10,0
off_msg db " aus",13,10,0
;readonly_msg db " fur Lesen",13,10,0
vrrm_msg db " [c] Nutze VRR:",0
preboot_device_msg db " [d] Diskettenimage: ",0
preboot_device_msg db " [c] Diskettenimage: ",0
if defined extended_primary_loader
preboot_device_msgs dw 0,pdm1,pdm2,0
pdm1 db "Echte Diskette",13,10,0
@ -119,14 +81,21 @@ pdm2 db "C:\kolibri.img (FAT32)",13,10,0
pdm3 db "Nutze bereits geladenes Image",13,10,0
pdm4 db "create blank image",13,10,0
end if
loading_msg db "Lade KolibriOS...",0
if ~ defined extended_primary_loader
save_quest db "Aktuelle Einstellungen speichern? [y/n]: ",0
loader_block_error db "Bootloader Daten ungueltig, Kann nicht fortfahren. Angehalten.",0
end if
remark1 db "Default values were selected to match most of configurations, but not all.",0
remark2 db "If you have CRT-monitor, enable VRR in the item [c].",0
remark3 db "If the system does not boot, try to disable the item [b].",0
remarks dw remark1, remark2, remark3
num_remarks = 3
_st db 186,' ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄ¿',13,10,0
_r1 db 186,' ³ 320x200 EGA/CGA 256 colors ³ ³',13,10,0
_r2 db 186,' ³ 640x480 VGA 16 colors ³ ³',13,10,0
_rs db 186,' ³ ????x????@?? SVGA VESA ³ ³',13,10,0
_bt db 186,' ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÙ',13,10,0
remark1 db "Die Standardwerte sind fur die meisten gewahlt, aber nicht fur jedermann.",0
remark2 db "Wenn das System nicht bootet, versuchen, das Element [b] deaktivieren.",0
remarks dw remark1, remark2
num_remarks = 2

View File

@ -15,8 +15,8 @@ $Revision$
d80x25_bottom:
db 186,' Kolibri OS ®á­®¢ ­  ­  Menuet OS ¨ ­¥ ¯à¥¤®áâ ¢«ï¥â '
db '­¨ª ª¨å £ àa­â¨©. ',186
db 186,' KolibriOS ®á­®¢ ­  ­  MenuetOS ¨ <20><20><>…„ŽŸ… <20>ˆ'
db 'Š€Šˆ• ƒ€<C692>A<EFBFBD>ˆ‰. ',186
db 186,' <20>®¤à®¡­¥¥ ᬮâà¨â¥ ¢ ä ©«¥ COPYING.TXT '
db ' ',186
line_full_bottom
@ -28,11 +28,9 @@ s_vesa db "
.ver db "?.?",13,10,0
gr_mode db "‚ë¡¥à¨â¥ ¢¨¤¥®à¥¦¨¬: ",13,10,0
vrrmprint db "ˆá¯®«ì§®¢ âì VRR? (ç áâ®â  ª ¤à®¢ ¢ëè¥ 60 ƒæ"
db " ⮫쪮 ¤«ï ¯¥à¥å®¤®¢:",13,10
db 186," 1024*768>800*600 ¨ 800*600>640*480) [1-¤ , 2-­¥â]: ",0
;ask_dma db "ˆá¯®«ì§®¢ âì DMA ¤«ï ¤®áâ㯠 ª HDD? [1-¤ , 2-⮫쪮 ç⥭¨¥, 3-­¥â]: ",0
ask_bd db "„®¡ ¢¨âì ¤¨áª¨, ¢¨¤¨¬ë¥ ç¥à¥§ BIOS ¢ ०¨¬¥ V86? [1-¤ , 2-­¥â]: ",0
if defined extended_primary_loader
bdev db "‡ £à㧨âì ®¡à § ¨§ [1-¤¨áª¥â ; 2-kolibri.img ¨§ ¯ ¯ª¨ § £à㧪¨]: ",0
else
@ -42,7 +40,9 @@ bdev db "
db 13,10,186," "
db "4-ᮧ¤ âì ç¨áâë© ®¡à §]: ",0
end if
prnotfnd db "Žè¨¡ª  - ‚¨¤¥®à¥¦¨¬ ­¥ ­ ©¤¥­.",0
not386 db "Žè¨¡ª  - ’ॡã¥âáï ¯à®æ¥áá®à 386+.",0
fatalsel db "Žè¨¡ª  - ‚ë¡à ­­ë© ¢¨¤¥®à¥¦¨¬ ­¥ ¯®¤¤¥à¦¨¢ ¥âáï.",0
pres_key db "<EFBFBD> ¦¨¬¨â¥ «î¡ãî ª« ¢¨èã, ¤«ï ¯¥à¥å®¤  ¢ ¢ë¡®à ०¨¬®¢.",0
@ -61,16 +61,15 @@ time_str db " 5 ᥪ㭤 "
current_cfg_msg db "’¥ªã騥 ­ áâனª¨:",13,10,0
curvideo_msg db " [a] ‚¨¤¥®à¥¦¨¬: ",0
mode0 db "320x200, EGA/CGA 256 梥⮢",13,10,0
mode9 db "640x480, VGA 16 梥⮢",13,10,0
usebd_msg db " [b] „®¡ ¢¨âì ¤¨áª¨, ¢¨¤¨¬ë¥ ç¥à¥§ BIOS:",0
on_msg db " ¢ª«",13,10,0
off_msg db " ¢ëª«",13,10,0
readonly_msg db " ⮫쪮 ç⥭¨¥",13,10,0
vrrm_msg db " [c] ˆá¯®«ì§®¢ ­¨¥ VRR:",0
preboot_device_msg db " [d] Ž¡à § ¤¨áª¥âë: ",0
preboot_device_msg db " [c] Ž¡à § ¤¨áª¥âë: ",0
if defined extended_primary_loader
preboot_device_msgs dw 0,pdm1,pdm2,0
pdm1 db "­ áâ®ïé ï ¤¨áª¥â ",13,10,0
@ -82,22 +81,21 @@ pdm2 db "C:\kolibri.img (FAT32)",13,10,0
pdm3 db "¨á¯®«ì§®¢ âì 㦥 § £à㦥­­ë© ®¡à §",13,10,0
pdm4 db "ᮧ¤ âì ç¨áâë© ®¡à §",13,10,0
end if
loading_msg db "ˆ¤ñâ § £à㧪  KolibriOS...",0
if ~ defined extended_primary_loader ; saving not supported in this case
save_quest db "‡ ¯®¬­¨âì ⥪ã騥 ­ áâனª¨? [y/n]: ",0
loader_block_error db "Žè¨¡ª  ¢ ¤ ­­ëå ­ ç «ì­®£® § £àã§ç¨ª , ¯à®¤®«¦¥­¨¥ ­¥¢®§¬®¦­®.",0
end if
_st db 186,' ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄ¿ ',13,10,0
_r1 db 186,' ³ 320x200 EGA/CGA 256 梥⮢ ³ ³ ',13,10,0
_r2 db 186,' ³ 640x480 VGA 16 梥⮢ ³ ³ ',13,10,0
_rs db 186,' ³ ????x????@?? SVGA VESA ³ ³ ',13,10,0
_bt db 186,' ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÙ ',13,10,0
remark1 db "‡­ ç¥­¨ï ¯® 㬮«ç ­¨î ¢ë¡à ­ë ¤«ï 㤮¡á⢠ ¡®«ì設á⢠, ­® ­¥ ¢á¥å.",0
remark2 db "…᫨ ã ‚ á <20>-¬®­¨â®à, ¢ª«îç¨â¥ VRR ¢ ¯ã­ªâ¥ [c].",0
remark3 db "…᫨ ã ‚ á ­¥ £à㧨âáï á¨á⥬ , ¯®¯à®¡ã©â¥ ®âª«îç¨âì ¯ã­ªâ [b].",0
remarks dw remark1, remark2, remark3
num_remarks = 3
remark2 db "…᫨ ã ‚ á ­¥ £à㧨âáï á¨á⥬ , ¯®¯à®¡ã©â¥ ®âª«îç¨âì ¯ã­ªâ [b].",0
remarks dw remark1, remark2
num_remarks = 2

View File

@ -5,7 +5,7 @@
;; ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
$Revision: 1962 $
$Revision: 2261 $
; All parsers are called with ds:si -> value of the variable,
; possibly with spaces before, and dx = limit of config file.
@ -57,16 +57,16 @@ parse_vbemode:
.nothing:
ret
parse_vrr:
; vrr is a boolean setting
call parse_bool
jc .nothing
; convert 0 to 2, 1 to 1
inc ax
xor al, 3
mov [es:preboot_vrrm], al
.nothing:
ret
;parse_vrr:
;; vrr is a boolean setting
; call parse_bool
; jc .nothing
;; convert 0 to 2, 1 to 1
; inc ax
; xor al, 3
; mov [es:preboot_vrrm], al
;.nothing:
; ret
parse_biosdisks:
; using biosdisks is a boolean setting

View File

@ -23,7 +23,7 @@ y_save dw 0 ; y
number_vm dw 0 ;
;pixel_save dw 0 ; per to pixel
preboot_gprobe db 0 ; probe vesa3 videomodes (1-no, 2-yes)
preboot_vrrm db 0 ; use VRR_M (1-yes, 2- no)
;preboot_vrrm db 0 ; use VRR_M (1-yes, 2- no)
preboot_dma db 0 ; use DMA for access to HDD (1-always, 2-only for read, 3-never)
preboot_device db 0 ; boot device
; (1-floppy 2-harddisk 3-kernel restart 4-format ram disk)

View File

@ -1,7 +1,7 @@
@echo off
cls
set languages=en ru ge et
set drivers=com_mouse emu10k1x ensoniq fm801 infinity sis sound viasound vt823x
set drivers=com_mouse emu10k1x fm801 infinity sis sound viasound vt823x
set targets=all kernel drivers skins clean
call :Check_Target %1
@ -73,8 +73,6 @@ goto :eof
if not %errorlevel%==0 goto :Error_FasmFailed
)
cd ..
move bin\drivers\vmode.obj bin\drivers\vmode.mdr
kpack >nul 2>&1

View File

@ -298,23 +298,22 @@ SB16_Status equ (OS_BASE+0x02B0000)
BUTTON_INFO equ (OS_BASE+0x02C0000)
RESERVED_PORTS equ (OS_BASE+0x02D0000)
IRQ_SAVE equ (OS_BASE+0x02E0000)
BOOT_VAR equ (OS_BASE+0x02f0000)
BOOT_VAR equ (OS_BASE+0x02E0000)
stack_data_start equ (OS_BASE+0x0300000)
eth_data_start equ (OS_BASE+0x0300000)
stack_data equ (OS_BASE+0x0304000)
stack_data_end equ (OS_BASE+0x031ffff)
resendQ equ (OS_BASE+0x0320000)
stack_data_start equ (OS_BASE+0x02F0000)
eth_data_start equ (OS_BASE+0x02F0000)
stack_data equ (OS_BASE+0x02F4000)
stack_data_end equ (OS_BASE+0x030ffff)
resendQ equ (OS_BASE+0x0310000)
skin_data equ (OS_BASE+0x0328000)
draw_data equ (OS_BASE+0x0330000)
skin_data equ (OS_BASE+0x0318000)
draw_data equ (OS_BASE+0x0320000)
BgrDrawMode equ (OS_BASE+0x0333FF4)
BgrDataWidth equ (OS_BASE+0x0333FF8)
BgrDataHeight equ (OS_BASE+0x0333FFC)
BgrDrawMode equ (OS_BASE+0x0323FF4)
BgrDataWidth equ (OS_BASE+0x0323FF8)
BgrDataHeight equ (OS_BASE+0x0323FFC)
sys_pgmap equ (OS_BASE+0x0334000)
sys_pgmap equ (OS_BASE+0x0324000)
UPPER_KERNEL_PAGES equ (OS_BASE+0x0400000)

View File

@ -78,7 +78,7 @@ config_file_variables:
config_variable 'timeout', parse_timeout
config_variable 'resolution', parse_resolution
config_variable 'vbemode', parse_vbemode
config_variable 'vrr', parse_vrr
; config_variable 'vrr', parse_vrr
config_variable 'biosdisks', parse_biosdisks
config_variable 'imgfrom', parse_imgfrom
dw 0

View File

@ -141,7 +141,7 @@ char2 db '/sys/FONTS/CHAR2.MT',0
bootpath db '/KOLIBRI '
bootpath2 db 0
vmode db '/sys/drivers/VMODE.MDR',0
vrr_m db 'VRR_M',0
;vrr_m db 'VRR_M',0
kernel_file db 'KERNEL MNT'
dev_data_path db '/RD/1/DRIVERS/DEVICES.DAT',0

View File

@ -635,6 +635,15 @@
Ά δ®ΰ¬ β¥ ―®¤δγ­<CEB3>樨 2 δγ­<CEB3>樨 37 Ά ¬®¬¥­β ­ η «  ­ ¦ β¨ο
­  <20>­®―<C2AE>γ, §  ¨α<C2A8>«ξη¥­¨¥¬ ¬« ¤θ¥£® ΅¨β  (α®®βΆ¥βαβΆγξι¥£® «¥Ά®©
<20>­®―<C2AE>¥ ¬λθ¨), <20>®β®ΰλ© α΅ΰ αλΆ ¥βαο.
======================================================================
= ”γ­<CEB3>ζ¨ο 18, ―®¤δγ­<CEB3>ζ¨ο 1 - ᤥ« βμ α ¬λ¬ ­¨¦­¨¬ ®<>­® ―®β®<CEB2> . =======
======================================================================
<EFBFBD> ΰ ¬¥βΰλ:
* eax = 18 - ­®¬¥ΰ δγ­<CEB3>樨
* ebx = 1 - ­®¬¥ΰ ―®¤δγ­<CEB3>樨
* ecx = ­®¬¥ΰ α«®β  ―®β®<CEB2> 
‚®§Άΰ ι ¥¬®¥ §­ η¥­¨¥:
* δγ­<CEB3>ζ¨ο ­¥ Ά®§Άΰ ι ¥β §­ η¥­¨ο
======================================================================
==== ”γ­<CEB3>ζ¨ο 18, ―®¤δγ­<CEB3>ζ¨ο 2 - § Ά¥ΰθ¨βμ ―ΰ®ζ¥αα/―®β®<CEB2> ―® α«®βγ. ====

View File

@ -626,6 +626,17 @@ Remarks:
as in subfunction 2 of function 37 at the beginning
of button press, excluding lower bit, which is cleared.
======================================================================
===================== Function 18, subfunction 1 =====================
============= Make deactive the window of the given thread. ==========
======================================================================
Parameters:
* eax = 18 - function number
* ebx = 1 - subfunction number
* ecx = number of the thread slot
Returned value:
* function does not return value
======================================================================
= Function 18, subfunction 2 - terminate process/thread by the slot. =
======================================================================

File diff suppressed because it is too large Load Diff

View File

@ -1,736 +0,0 @@
;
; MenuetOS Driver (vmode.mdr)
; Target: Vertical Refresh Rate programming and videomode changing
;
; Author: Trans <<<<<13>>>>>
; Date: 20.07.2003
;
; Version: 1.0
; OS: MenuetOS
; Compiler: FASM
;
OS_BASE equ 0x80000000
use32
macro align value { rb (value-1) - ($ + value-1) mod value }
org OS_BASE+0x0328000
headerstart=$
mdid db 'MDAZ' ; 4 byte id
mdhver dd 0x00 ; header version
mdcode dd MDSTART ; start of code
mdver dd 0x00000001 ; driver version (subversion*65536+version)
mdname db 'Trans VideoDriver' ; 32 bytes of full driver name
times (32-($-mdname)) db ' ' ;
headerlen=$-headerstart
times (256-headerlen) db 0 ; reserved area for future
MDSTART: ; start of driver code ( base_adr+256 bytes)
; ebx(=ecx in program):
; 1 - Get DriverInfo and Driver Initial Set
; 2 - Get Current Video Mode With Vertical Refresh Rate
; 3 - Change Video Mode
; 4 - Return at Start System Video Mode
; 5 - Change vertical and horizontal size of visible screen area
; 6 - Change Vert/Hor position visible area on screen (not complete yet)
;
; MAXF - ...
MAXF=5
;-------Main Manager-------------
pushad
cmp ebx,1
jb mdvm_00
cmp ebx,MAXF
ja mdvm_00
shl ebx,2
add ebx,mdvm_func_table
call dword [ebx]
mov [esp+28],eax
mov [esp+24],ecx
mov [esp+20],edx
mov [esp+16],ebx
popad
retn
mdvm_00:
popad
xor eax,eax
dec eax
retn
; ------Drivers Functions----------
align 4
; EBX=1 (in applications ECX=1)- Get DriverInfo and Driver Initial Set
;
; IN: ecx (in app. edx) - pointer to 512-bytes info area in application
; OUT:
;
vm_info_init:
push ecx
cmp [mdrvm],dword 0
jnz .vmii_00
call vm_safe_reg
call vm_get_initial_videomode
mov eax,[initvm]
mov [currvm],eax
call vm_search_sys_func_table
call vm_get_cur_vert_rate
mov [initrr],eax
call vm_calc_pixelclock
call vm_calc_refrate
inc [mdrvm]
.vmii_00:
pop ecx
call vm_transfer_drv_info
mov ebx,dword [refrate]
mov eax,dword [mdid] ;dword [systlb]
retn
align 4
; EBX=2 (in applications ECX=2)- Get Current Video Mode
;
; OUT: eax = X_screen*65536+Y_screen
; ebx = current vertical rate
; ecx = current video mode (number)
vm_get_cur_mode:
cmp [mdrvm],dword 0
jz .vmgcm_00
call vm_get_cur_vert_rate
mov eax,[OS_BASE+0FE00h]
mov ebx,[OS_BASE+0FE04h]
shl eax,16
add eax,ebx
add eax,00010001h
mov ebx,[refrate]
mov ecx,[currvm]
retn
.vmgcm_00:
xor eax,eax
dec eax
retn
align 4
; EBX=3 (in applications ECX=3)- Change Video Mode
;
; IN: ecx = VertRate*65536+VideoMode
; OUT: eax = 0 if no error
;
vm_set_video_mode:
cmp [mdrvm],dword 0
jz .vmsvm_00
call vm_set_selected_mode
; xor eax,eax
retn
.vmsvm_00:
xor eax,eax
dec eax
retn
align 4
; EBX=4 (in applications ECX=4)- Return at Start System Video Mode
;
; IN:
; OUT: eax = = 0 if no error
;
vm_restore_init_video_mode:
cmp [mdrvm],dword 0
jz .vmrivm_00
call vm_restore_reg
xor eax,eax
retn
.vmrivm_00:
xor eax,eax
dec eax
retn
align 4
; EBX=5 (in applications ECX=5)- Change vertical and horizontal size
; of visible screen area
; IN: ecx (in app. edx) = 0/1 - -/+ horizontal size on 1 position
; = 2/3 - -/+ vertical size on 1 position (8 pixels)
; ^-^----- not complete yet
; OUT: eax = = 0 if no error
;
vm_change_screen_size:
cmp [mdrvm],dword 0
jz .vmcss_00
cmp cl,1
ja .vmcss_01
mov eax,ecx
call vm_inc_dec_width
xor eax,eax
retn
.vmcss_01:
and ecx,01h
mov eax,ecx
; call vm_inc_dec_high ; not complete yet
xor eax,eax
retn
.vmcss_00:
xor eax,eax
dec eax
retn
align 4
; EBX=6 (in applications ECX=6)- Change Vert/Hor position visible area on screen
;
; IN: ecx (in app. edx) = 0/1 - -/+ horizontal position on 1 point
; = 2/3 - -/+ vertical position on 1 pixel
; ^-^----- not complete yet
; OUT: eax = 0 if no error
;
vm_change_position_screen:
cmp [mdrvm],dword 0
jz .vmcps_00
; ...
xor eax,eax
retn
.vmcps_00:
xor eax,eax
dec eax
retn
;-----Drivers Subfunctions---------
;
; Searching i40 system functions pointer table in kernel area location
;
vm_search_sys_func_table:
push eax ; eax - current value
push ecx ; ecx - will be counter of equevalent value
push edx ; edx - last value
push esi ; esi - current address
xor ecx,ecx
mov esi,OS_BASE+010000h ; Start address of kernel location
lodsd
mov edx,eax
cld
.vmssft_00:
cmp esi,OS_BASE+30000h
ja .vmssft_03
inc ecx
lodsd
cmp edx,eax
mov edx,eax
je .vmssft_00
cmp ecx,128
ja .vmssft_02
.vmssft_01:
xor ecx,ecx
jmp .vmssft_00
.vmssft_02:
cmp edx,0
je .vmssft_01
sub esi,256*4-1
mov [systlb],esi
xor ecx,ecx
.vmssft_03_0:
inc ecx
lodsd
cmp edx,eax
mov edx,eax
jne .vmssft_03_0
mov esi,dword [systlb]
cmp cx,60
jae .vmssft_03
add esi,256*4-4
lodsb
mov edx,eax
jmp .vmssft_01
.vmssft_03:
mov [systlb],esi
pop esi
pop edx
pop ecx
pop eax
retn
; IN:
; OUT: eax= vertical rate in Hz
vm_get_cur_vert_rate:
push edx
push ebx
xor eax,eax
mov edx,eax
mov ebx,eax
mov dx,03DAh
.vmgcvt_00:
in al,dx
test al,8
jz .vmgcvt_00
.vmgcvt_01:
in al,dx
test al,8
jnz .vmgcvt_01
mov ebx,edx
rdtsc
mov edx,ebx
mov ebx,eax
.vmgcvt_02:
in al,dx
test al,8
jz .vmgcvt_02
.vmgcvt_03:
in al,dx
test al,8
jnz .vmgcvt_03
rdtsc
sub eax,ebx
mov ebx,eax
mov eax,[OS_BASE+0F600h]
xor edx,edx
div ebx
inc eax
mov [refrate],eax
pop ebx
pop edx
retn
vm_calc_pixelclock:
push ebx
push edx
xor eax,eax
mov al,[_00]
add ax,5
shl eax,3
xor ebx,ebx
mov bl,[_06]
mov bh,[_07]
and bh,00100001b
btr bx,13
jnc .vmcpc_00
or bh,2
.vmcpc_00:
xor edx,edx
mul ebx
xor edx,edx
mul [initrr]
mov [pclock],eax
pop edx
pop ebx
retn
;
; Safe of initial CRTC state
;
vm_safe_reg:
push edx
push ebx
push ecx
push edi
cli
mov dx,3d4h ; CRTC
mov al,11h
out dx,al
inc dx
in al,dx
and al,7fh
out dx,al ; Clear protection bit
dec dx
xor ecx,ecx
mov cl,19h
xor bl,bl
mov edi,CRTCreg
.vmsr_00:
mov al,bl
out dx,al
inc dx
in al,dx
dec dx
stosb
inc bl
loop .vmsr_00
sti
pop edi
pop ecx
pop ebx
pop edx
retn
;
; Restore of initial CRTC state
;
vm_restore_reg:
push eax
push ebx
push edx
push esi
mov eax,[oldX]
mov [OS_BASE+0FE00h],eax
mov eax,[oldY]
mov [OS_BASE+0FE04h],eax
mov dx,03dah
.vmrr_00:
in al,dx
test al,8
jnz .vmrr_00
.vmrr_01:
in al,dx
test al,8
jnz .vmrr_01
cli
mov dx,03c4h
mov ax,0101h
out dx,ax
mov dx,3d4h ; CRTC
mov al,11h
out dx,al
inc dx
in al,dx
and al,7fh ; Clear Protection bit
out dx,al
dec dx
xor ecx,ecx
mov cl,19h
mov esi,CRTCreg
xor bl,bl
.vmrr_02:
lodsb
mov ah,al
mov al,bl
out dx,ax
inc bl
loop .vmrr_02
sti
; call ref_screen
pop esi
pop edx
pop ecx
pop eax
retn
; Calculate of possible vertical refrash rate
; (light version of function)
vm_calc_refrate:
push ebx
push ecx
push edx
push edi
push esi
mov eax,[pclock]
xor edx,edx
mov edi,_m1
mov ebx,eax
mov ecx,(1696*1065)
div ecx
xor edx,edx
stosw
add edi,8
mov eax,ebx
mov ecx,(1344*804)
div ecx
xor edx,edx
stosw
add edi,8
mov eax,ebx
mov ecx,(1056*636)
div ecx
xor edx,edx
stosw
add edi,8
mov eax,ebx
mov ecx,(800*524)
div ecx
xor edx,edx
stosw
mov edi,_m1
mov esi,edi
mov ecx,5*4
.vmcrr_00:
lodsw
cmp ax,55
jb .vmcrr_01
stosw
loop .vmcrr_00
pop esi
pop edi
pop edx
pop ecx
pop ebx
retn
.vmcrr_01:
xor ax,ax
stosw
loop .vmcrr_00
pop esi
pop edi
pop edx
pop ecx
pop ebx
retn
vm_get_initial_videomode:
push eax
mov eax,dword [OS_BASE+0FE00h]
mov [oldX],eax
mov eax,dword [OS_BASE+0FE04h]
mov [oldY],eax
mov eax,dword [OS_BASE+0FE0Ch] ; initial video mode
and ax,01FFh
mov dword [initvm],eax
pop eax
retn
; IN: eax = 0/1 - -/+ 1 position of width
vm_inc_dec_width:
push ebx
push edx
mov ebx,eax
mov dx,3d4h ; CRTC
mov al,11h
out dx,al
inc dx
in al,dx
and al,7fh ; Clear Protection bit
out dx,al
dec dx
xor al,al
out dx,al
inc dx
in al,dx
dec al
cmp bl,0
jnz .vmidr_00
inc al
inc al
.vmidr_00:
out dx,al
pop edx
pop ebx
retn
;
; Copy driver info to application area
;
; IN: ecx (in app. edx) - pointer to 512-bytes info area in application
; OUT:
vm_transfer_drv_info:
push ecx
push edi
push esi
mov eax,ecx
xor ecx,ecx
mov cl,32/4
mov esi,mdname
mov edi,drvname
rep movsd
mov ecx,eax
mov eax,[mdver]
mov [drvver],eax
mov edi,[OS_BASE+3010h]
mov edi,[edi+10h]
add edi,ecx
mov esi,drvinfo
xor ecx,ecx
mov cx,512
rep movsb
pop esi
pop edi
pop ecx
retn
;
; Set selected video mode
; (light version)
;
; IN: ecx = VertRate*65536+VideoMode
;
vm_set_selected_mode:
push edx
push ecx
push esi
ror ecx,16
cmp cx,00h
je .vmssm_03
rol ecx,16
mov eax,ecx
shl eax,16
shr eax,16
mov [currvm],eax
cmp cx,112h
jne .vmssm_00
mov esi,mode0
mov ecx,639
mov edx,479
jmp .vmssm_st00
.vmssm_00:
cmp cx,115h
jne .vmssm_01
mov esi,mode1
mov ecx,799
mov edx,599
jmp .vmssm_st00
.vmssm_01:
cmp cx,118h
jne .vmssm_02
mov esi,mode2
mov ecx,1023
mov edx,767
jmp .vmssm_st00
.vmssm_02:
cmp cx,11Bh
jne .vmssm_03
mov esi,mode2
mov ecx,1279
mov edx,1023
jmp .vmssm_st00
.vmssm_03:
xor eax,eax
dec eax
pop esi
pop ecx
pop edx
retn
.vmssm_st00:
mov [OS_BASE+0FE00h],ecx
mov [OS_BASE+0FE04h],edx
cli
mov dx,03c4h
lodsw
out dx,ax
mov dx,03d4h
mov al,11h
out dx,al
inc dx
in al,dx
and al,7fh
out dx,al
dec dx
mov ecx,13
.vmssm_st01:
lodsw
out dx,ax
loop .vmssm_st01
sti
xor eax,eax
pop esi
pop ecx
pop edx
retn
;------------DATA AREA---------------
align 4
mdvm_func_table:
dd MDSTART
dd vm_info_init, vm_get_cur_mode
dd vm_set_video_mode, vm_restore_init_video_mode
dd vm_change_screen_size, vm_change_position_screen
CRTCreg:
_00 db ?
_01 db ?
_02 db ?
_03 db ?
_04 db ?
_05 db ?
_06 db ?
_07 db ?
_08 db ?
_09 db ?
_0a db ?
_0b db ?
_0c db ?
_0d db ?
_0e db ?
_0f db ?
_10 db ?
_11 db ?
_12 db ?
_13 db ?
_14 db ?
_15 db ?
_16 db ?
_17 db ?
_18 db ?
_19 db ?
align 4
oldX dd ?
oldY dd ?
initvm dd ?
currvm dd 0
refrate dd 0
initrr dd 0
systlb dd 0
pclock dd ?
mdrvm dd 0 ; 0 - not drv init yet, 1 - already drv init
drvinfo:
drvname: times 32 db ' '
drvver dd 0
times (32-($-drvver))/4 dd 0
drvmode dw 011Bh,0118h,0115h,0112h
times (64-($-drvmode))/2 dw 00h
_m1 dw 0,0,0,0,0
_m2 dw 0,0,0,0,0
_m3 dw 0,0,0,0,0
_m4 dw 0,0,0,0,0
_m5 dw 0,0,0,0,0
times (512-($-drvinfo)) db 0
drvinfoend:
;1280x1024 - 11Bh
mode3:
dw 0101h
dw 0d000h,9f01h,9f02h,9303h,0a904h,1905h,2806h,5a07h
dw 0110h,8411h,0ff12h,0ff15h,2916h
;1024x768 - 118h
mode2:
dw 0101h
dw 0a400h,7f01h,7f02h,8703h,8404h,9505h,2406h,0f507h
dw 0310h,8911h,0ff12h,0ff15h,2516h
;800x600 - 115h
mode1:
dw 0101h
dw 8000h,6301h,6302h,8303h,6a04h,1a05h,7206h,0f007h
dw 5910h,8d11h,5712h,5715h,7316h
;640x480 - 112h, 12h
mode0:
dw 0101h
dw 6000h,4f01h,4f02h,8303h,5304h,9f05h,00b06h,3e07h
dw 0ea10h,8c11h,0df12h,0df15h,0c16h
; 640x400
;mymode0:
; dw 0101h
;_0_7 dw 5f00h,4f01h,4f02h,8303h,5304h,9f05h,0BF06h,1f07h
; dw 9c10h,8e11h,8f12h,9615h,0B916h ;,4013h
; 640x800
;mymode1:
; dw 0101h
; dw 5f00h,4f01h,4f02h,8003h,5004h,9f05h,06006h,0FF07h
; dw 2d10h,8f11h,2012h,2615h,05716h ;,4013h
DRVM_END:

File diff suppressed because it is too large Load Diff

View File

@ -1163,7 +1163,7 @@ sys_window_end_moving_handler: ;///////////////////////////////////////////////
;> esi = process slot
;------------------------------------------------------------------------------
mov edi, ebx
call window._.draw_negative_box
call window._.end_moving__box
mov edi, esi
shl edi, 5
@ -1306,18 +1306,7 @@ end if
mov ecx, 4
repz cmpsd
pop edi
jnz @f
mov edi,eax
mov eax, [edi + BOX.left - 2]
mov ax, word[edi + BOX.left]
add ax, word[edi + BOX.width]
mov ebx, [edi + BOX.top - 2]
mov bx, word[edi + BOX.top]
add bx, word[edi + BOX.height]
xor esi,esi
call draw_rectangle.forced
jmp .exit
jz .exit
@@:
add esp, -BOX.sizeof
@ -1823,6 +1812,9 @@ window._.window_activate: ;////////////////////////////////////////////////////
; if type of current active window is 3 or 4, it must be redrawn
mov ebx, [TASK_COUNT]
; DEBUGF 1, "K : TASK_COUNT (0x%x)\n", ebx
movzx ebx, word[WIN_POS + ebx * 2]
shl ebx, 5
add eax, window_data
@ -1849,6 +1841,13 @@ window._.window_activate: ;////////////////////////////////////////////////////
cmp eax, [TASK_COUNT]
jae .move_self_up
inc eax
; push ebx
; xor ebx,ebx
; mov bx,[WIN_STACK + eax * 2]
; DEBUGF 1, "K : DEC WIN_STACK (0x%x)\n",ebx
; pop ebx
cmp [WIN_STACK + eax * 2], bx
jbe .next_stack_window
dec word[WIN_STACK + eax * 2]
@ -1881,6 +1880,53 @@ window._.window_activate: ;////////////////////////////////////////////////////
pop ebx eax
ret
;------------------------------------------------------------------------------
window._.window_deactivate: ;////////////////////////////////////////////////////
;------------------------------------------------------------------------------
;? Deactivate window
;------------------------------------------------------------------------------
;> esi = pointer to WIN_POS+ window data
;------------------------------------------------------------------------------
push eax ebx
;------------------------------------------------------------------------------
.move_others_up:
; ax <- process no
movzx ebx, word[esi]
; ax <- position in window stack
movzx ebx, word[WIN_STACK + ebx * 2]
; up others
xor eax, eax
.next_stack_window:
cmp eax, [TASK_COUNT]
jae .move_self_down
inc eax
cmp [WIN_STACK + eax * 2], bx
jae .next_stack_window
inc word[WIN_STACK + eax * 2]
jmp .next_stack_window
;----------------------------------------------
.move_self_down:
movzx ebx, word[esi]
; this is the last (and the low)
mov [WIN_STACK + ebx * 2], word 1
; update on screen - window stack
xor eax, eax
.next_window_pos:
cmp eax, [TASK_COUNT]
jae .reset_vars
inc eax
movzx ebx, word[WIN_STACK + eax * 2]
mov [WIN_POS + ebx * 2], ax
jmp .next_window_pos
;-----------------------------------------------
.reset_vars:
mov byte[KEY_COUNT], 0
mov byte[BTN_COUNT], 0
mov word[MOUSE_SCROLL_H], 0
mov word[MOUSE_SCROLL_V], 0
pop ebx eax
ret
;------------------------------------------------------------------------------
align 4
;------------------------------------------------------------------------------
window._.check_window_draw: ;//////////////////////////////////////////////////
@ -2084,13 +2130,24 @@ window._.draw_negative_box: ;//////////////////////////////////////////////////
;> edi = pointer to BOX struct
;------------------------------------------------------------------------------
push eax ebx esi
mov esi, 0x01000000
.1:
mov eax, [edi + BOX.left - 2]
mov ax, word[edi + BOX.left]
add ax, word[edi + BOX.width]
mov ebx, [edi + BOX.top - 2]
mov bx, word[edi + BOX.top]
add bx, word[edi + BOX.height]
mov esi, 0x01000000
call draw_rectangle.forced
pop esi ebx eax
ret
;------------------------------------------------------------------------------
window._.end_moving__box: ;//////////////////////////////////////////////////
;------------------------------------------------------------------------------
;? Draw positive box
;------------------------------------------------------------------------------
;> edi = pointer to BOX struct
;------------------------------------------------------------------------------
push eax ebx esi
xor esi,esi
jmp window._.draw_negative_box.1

View File

@ -867,17 +867,17 @@ end if
; LOAD FIRST APPLICATION
cli
cmp byte [BOOT_VAR+0x9030],1
jne no_load_vrr_m
; cmp byte [BOOT_VAR+0x9030],1
; jne no_load_vrr_m
mov ebp, vrr_m
call fs_execute_from_sysdir
; cmp eax,2 ; if vrr_m app found (PID=2)
sub eax,2
jz first_app_found
no_load_vrr_m:
; mov ebp, vrr_m
; call fs_execute_from_sysdir
;
;; cmp eax,2 ; if vrr_m app found (PID=2)
; sub eax,2
; jz first_app_found
;
;no_load_vrr_m:
mov ebp, firstapp
call fs_execute_from_sysdir
@ -1935,7 +1935,7 @@ sys_end:
iglobal
align 4
sys_system_table:
dd exit_for_anyone ; 1 = obsolete
dd sysfn_deactivate ; 1 = deactivate window
dd sysfn_terminate ; 2 = terminate thread
dd sysfn_activate ; 3 = activate window
dd sysfn_getidletime ; 4 = get idle time
@ -1960,7 +1960,7 @@ sys_system_table:
dd sysfn_min_rest_window ; 22 = minimize and restore any window
sysfn_num = ($ - sys_system_table)/4
endg
;------------------------------------------------------------------------------
sys_system:
dec ebx
cmp ebx, sysfn_num
@ -1968,8 +1968,7 @@ sys_system:
jmp dword [sys_system_table + ebx*4]
@@:
ret
;------------------------------------------------------------------------------
sysfn_shutdown: ; 18.9 = system shutdown
cmp ecx,1
jl exit_for_anyone
@ -1986,7 +1985,7 @@ sysfn_shutdown: ; 18.9 = system shutdown
uglobal
shutdown_processes: dd 0x0
endg
;------------------------------------------------------------------------------
sysfn_terminate: ; 18.2 = TERMINATE
cmp ecx,2
jb noprocessterminate
@ -2010,7 +2009,7 @@ sysfn_terminate: ; 18.2 = TERMINATE
noatsc:
noprocessterminate:
ret
;------------------------------------------------------------------------------
sysfn_terminate2:
;lock application_table_status mutex
.table_status:
@ -2037,7 +2036,34 @@ sysfn_terminate2:
mov [application_table_status],0
or dword [esp+32],-1
ret
;------------------------------------------------------------------------------
sysfn_deactivate: ; 18.1 = DEACTIVATE WINDOW
cmp ecx,2
jb .nowindowdeactivate
cmp ecx,[TASK_COUNT]
ja .nowindowdeactivate
movzx esi, word [WIN_STACK + ecx*2]
cmp esi, 1
je .nowindowdeactivate ; already deactive
mov edi, ecx
shl edi, 5
add edi, window_data
movzx esi, word [WIN_STACK + ecx * 2]
lea esi, [WIN_POS + esi * 2]
call window._.window_deactivate
xor eax, eax
mov byte[MOUSE_BACKGROUND], al
mov byte[DONT_DRAW_MOUSE], al
mov byte[MOUSE_DOWN], 0
call syscall_display_settings._.calculate_whole_screen
call syscall_display_settings._.redraw_whole_screen
.nowindowdeactivate:
ret
;------------------------------------------------------------------------------
sysfn_activate: ; 18.3 = ACTIVATE WINDOW
cmp ecx,2
jb .nowindowactivate
@ -2058,28 +2084,29 @@ sysfn_activate: ; 18.3 = ACTIVATE WINDOW
call waredraw
.nowindowactivate:
ret
;------------------------------------------------------------------------------
sysfn_getidletime: ; 18.4 = GET IDLETIME
mov eax,[idleusesec]
mov [esp+32], eax
ret
;------------------------------------------------------------------------------
sysfn_getcpuclock: ; 18.5 = GET TSC/SEC
mov eax,[CPU_FREQ]
mov [esp+32], eax
ret
;------------------------------------------------------------------------------
; SAVE ramdisk to /hd/1/menuet.img
;!!!!!!!!!!!!!!!!!!!!!!!!
include 'blkdev/rdsave.inc'
;!!!!!!!!!!!!!!!!!!!!!!!!
;------------------------------------------------------------------------------
align 4
sysfn_getactive: ; 18.7 = get active window
mov eax, [TASK_COUNT]
movzx eax, word [WIN_POS + eax*2]
mov [esp+32],eax
ret
;------------------------------------------------------------------------------
sysfn_sound_flag: ; 18.8 = get/set sound_flag
; cmp ecx,1
dec ecx
@ -2094,10 +2121,11 @@ sysfn_sound_flag: ; 18.8 = get/set sound_flag
xor byte [sound_flag], 1
nosoundflag:
ret
;------------------------------------------------------------------------------
sysfn_minimize: ; 18.10 = minimize window
mov [window_minimize],1
ret
;------------------------------------------------------------------------------
align 4
sysfn_getdiskinfo: ; 18.11 = get disk info table
; cmp ecx,1
@ -2122,18 +2150,18 @@ sysfn_getdiskinfo: ; 18.11 = get disk info table
cld
rep movsd
ret
;------------------------------------------------------------------------------
sysfn_lastkey: ; 18.12 = return 0 (backward compatibility)
and dword [esp+32], 0
ret
;------------------------------------------------------------------------------
sysfn_getversion: ; 18.13 = get kernel ID and version
mov edi,ecx
mov esi,version_inf
mov ecx,version_end-version_inf
rep movsb
ret
;------------------------------------------------------------------------------
sysfn_waitretrace: ; 18.14 = sys wait retrace
;wait retrace functions
sys_wait_retrace:
@ -2144,7 +2172,7 @@ sysfn_waitretrace: ; 18.14 = sys wait retrace
jz WaitRetrace_loop
and [esp+32],dword 0
ret
;------------------------------------------------------------------------------
align 4
sysfn_centermouse: ; 18.15 = mouse centered
; removed here by <Lrz>
@ -2163,8 +2191,8 @@ sysfn_centermouse: ; 18.15 = mouse centered
xor eax,eax
and [esp+32],eax
; pop eax
ret
;------------------------------------------------------------------------------
align 4
sysfn_mouse_acceleration: ; 18.19 = set/get mouse features
test ecx,ecx ; get mouse speed factor
@ -2211,7 +2239,7 @@ sysfn_mouse_acceleration: ; 18.19 = set/get mouse features
mov [mouse_active],1
.end:
ret
;------------------------------------------------------------------------------
sysfn_getfreemem:
mov eax, [pg_data.pages_free]
shl eax, 2

View File

@ -1,58 +0,0 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; ;;
;; Copyright (C) KolibriOS team 2004-2007. All rights reserved. ;;
;; Distributed under terms of the GNU General Public License ;;
;; ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
$Revision$
;
; Call of videomode driver's functions
;
; (Add in System function 21 (and/or 26) as a subfunction 13)
;
; Author: Trans
; Date: 19.07.2003
;
; Include in MeOS kernel and compile with FASM
;
uglobal
old_screen_width dd ?
old_screen_height dd ?
endg
; cmp eax,13 ; CALL VIDEOMODE DRIVER FUNCTIONS
dec ebx
jnz .no_vmode_drv_access
pushd [Screen_Max_X] [Screen_Max_Y]
popd [old_screen_height] [old_screen_width]
or eax,-1 ; If driver is absent then eax does not change
call (VMODE_BASE+0x100) ; Entry point of video driver
mov [esp+36-4],eax
mov [esp+24-4],ebx
mov [esp+32-4],ecx
; mov [esp+28],edx
mov eax,[old_screen_width]
mov ebx,[old_screen_height]
sub eax,[Screen_Max_X]
jnz @f
sub ebx,[Screen_Max_Y]
jz .resolution_wasnt_changed
jmp .lp1
@@: sub ebx,[Screen_Max_Y]
.lp1: sub [screen_workarea.right],eax
sub [screen_workarea.bottom],ebx
call repos_windows
xor eax,eax
xor ebx,ebx
mov ecx, [Screen_Max_X]
mov edx, [Screen_Max_Y]
call calculatescreen
.resolution_wasnt_changed:
ret
.no_vmode_drv_access:

View File

@ -1,35 +0,0 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; ;;
;; Copyright (C) KolibriOS team 2004-2007. All rights reserved. ;;
;; Distributed under terms of the GNU General Public License ;;
;; ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
$Revision$
;
; Load of videomode driver in memory
;
; (driver is located at VMODE_BASE - 32kb) // if this area not occuped anything
;
; Author: Trans
; Date: 19.07.2003
;
; Include in MeOS kernel and compile with FASM
;
; LOAD VIDEOMODE DRIVER
; If vmode.mdr file not found
or eax,-1 ; Driver ID = -1 (not present in system)
mov [VMODE_BASE],eax ;
mov [VMODE_BASE+0x100],byte 0xC3 ; Instruction RETN - driver loop
stdcall read_file, vmode, VMODE_BASE, 0, 0x8000 ;{SPraid.simba}
; mov esi, vmode
; xor ebx, ebx
; mov ecx, 0x8000 ; size of memory area for driver
; mov edx, VMODE_BASE ; Memory position of driver
; xor ebp, ebp
; call fs_RamdiskRead