Show scrollbar for videomodes table; PgUp,PgDn in videomodes table

git-svn-id: svn://kolibrios.org@730 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Evgeny Grechnikov (Diamond) 2008-02-11 09:08:05 +00:00
parent 44a0814170
commit 9e7e995235
4 changed files with 108 additions and 10 deletions

View File

@ -534,12 +534,49 @@ cfgmanager:
jmp .loops jmp .loops
.down: cmp ah,0x50;x,0x50E0 ; down .down: cmp ah,0x50;x,0x50E0 ; down
jne .enter jne .pgup
cmp word[es:si+10],-1 cmp word[es:si+10],-1
je .loops je .loops
add word [cursor_pos],size_of_step add word [cursor_pos],size_of_step
jmp .loops jmp .loops
.pgup: cmp ah,0x49 ; page up
jne .pgdn
sub si, size_of_step*9
cmp si, modes_table
jae @f
mov si, modes_table
@@:
mov word [cursor_pos], si
mov si, word [home_cursor]
sub si, size_of_step*9
cmp si, modes_table
jae @f
mov si, modes_table
@@:
mov word [home_cursor], si
jmp .loops
.pgdn: cmp ah,0x51 ; page down
jne .enter
mov ax, [end_cursor]
add si, size_of_step*9
cmp si, ax
jb @f
mov si, ax
sub si, size_of_step
@@:
mov word [cursor_pos], si
mov si, word [home_cursor]
sub ax, size_of_step*9
add si, size_of_step*9
cmp si, ax
jb @f
mov si, ax
@@:
mov word [home_cursor], si
jmp .loops
.enter: cmp al,0x0D;x,0x1C0D ; enter .enter: cmp al,0x0D;x,0x1C0D ; enter
jne .loops jne .loops
push word [cursor_pos] push word [cursor_pos]

View File

@ -91,9 +91,9 @@ save_quest db "Remember current settings? [y/n]: ",0
loader_block_error db "Bootloader data invalid, I cannot continue. Stopped.",0 loader_block_error db "Bootloader data invalid, I cannot continue. Stopped.",0
_st db 186,' ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄ¿',13,10,0 _st db 186,' ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄ¿',13,10,0
_r1 db 186,' ³ 320x200 EGA/CGA 256 colors ³Û³',13,10,0 _r1 db 186,' ³ 320x200 EGA/CGA 256 colors ³ ³',13,10,0
_r2 db 186,' ³ 640x480 VGA 16 colors ³Û³',13,10,0 _r2 db 186,' ³ 640x480 VGA 16 colors ³ ³',13,10,0
_rs db 186,' ³ ????x????@?? SVGA VESA ³Û³',13,10,0 _rs db 186,' ³ ????x????@?? SVGA VESA ³ ³',13,10,0
_bt db 186,' ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÙ',13,10,0 _bt db 186,' ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÙ',13,10,0
remark1 db "Default values were selected to match most of configurations, but not all.",0 remark1 db "Default values were selected to match most of configurations, but not all.",0

View File

@ -96,9 +96,9 @@ loader_block_error db "
;s_mode1 db " 0640-0480-04 (a) 0320-0200-08 (b) ",13,10,0 ;s_mode1 db " 0640-0480-04 (a) 0320-0200-08 (b) ",13,10,0
_st db 186,' レトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトツトソ',13,10,0 _st db 186,' レトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトツトソ',13,10,0
_r1 db 186,' ³ 320x200 EGA/CGA 256 梥⮢ ³Û³',13,10,0 _r1 db 186,' ³ 320x200 EGA/CGA 256 梥⮢ ³ ³',13,10,0
_r2 db 186,' ³ 640x480 VGA 16 梥⮢ ³Û³',13,10,0 _r2 db 186,' ³ 640x480 VGA 16 梥⮢ ³ ³',13,10,0
_rs db 186,' ³ ????x????@?? SVGA VESA ³Û³',13,10,0 _rs db 186,' ³ ????x????@?? SVGA VESA ³ ³',13,10,0
_bt db 186,' タトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトチトル',13,10,0 _bt db 186,' タトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトチトル',13,10,0
;_tl db 186,' レトトトトトツトトトトトツトトトトトツトトトトトツトトトトトツトトトトトソ',13,10,\ ;_tl db 186,' レトトトトトツトトトトトツトトトトトツトトトトトツトトトトトツトトトトトソ',13,10,\

View File

@ -172,9 +172,7 @@ calc_vmodes_table:
; push 0 ; push 0
; pop es ; pop es
mov si,word[es:vi.VideoModePtr] lfs si, [es:vi.VideoModePtr]
push word[es:vi.VideoModePtr+2]
pop fs
mov bx,modes_table mov bx,modes_table
;save no vesa mode of work 320x200, EGA/CGA 256 梥⮢ and 640x480, VGA 16 梥⮢ ;save no vesa mode of work 320x200, EGA/CGA 256 梥⮢ and 640x480, VGA 16 梥⮢
@ -205,6 +203,9 @@ calc_vmodes_table:
test [es:mi.ModeAttributes],10000000b ;LFB ? test [es:mi.ModeAttributes],10000000b ;LFB ?
jz @f jz @f
; cmp [es:mi.BitsPerPixel], 24
; jb @f
cmp [es:mi.BitsPerPixel],16 cmp [es:mi.BitsPerPixel],16
jne .l0 jne .l0
cmp [es:mi.GreenMaskSize],5 cmp [es:mi.GreenMaskSize],5
@ -512,6 +513,66 @@ draw_vmodes_table:
.@@_end: .@@_end:
mov si,_bt mov si,_bt
call printplain call printplain
; show scroll
push es
push 0xB800
pop es
; arrows
mov di, (11*80+53)*2
mov al, 30
stosb
add di, 80*2-1
mov al, 32
mov cx, 7
@@:
stosb
add di, 80*2-1
loop @b
mov al, 31
stosb
; calculate scroll size
mov ax, [end_cursor]
sub ax, modes_table
mov bx, size_of_step
cwd
div bx
mov si, ax ; si = size of list
mov ax, [home_cursor]
sub ax, modes_table
cwd
div bx
mov di, ax
mov ax, 7*9
cwd
div si
test ax, ax
jnz @f
inc ax
@@:
cmp al, 7
jb @f
mov al, 7
@@:
mov cx, ax
; cx = scroll height
; calculate scroll pos
xor bx, bx ; initialize scroll pos
sub al, 7+1
neg al
sub si, 9-1
jbe .draw_scroll
mul di
div si
mov bx, ax
.draw_scroll:
mov al, 0xDB
imul di, bx, 80*2
add di, (12*80+53)*2
@@:
stosb
add di, 80*2-1
loop @b
pop es
ret ret
.show_0x13: .show_0x13:
push si push si