Added scanlines to 320x256 Mode-X in DOS port.

This commit is contained in:
stainless
2001-10-01 23:18:15 +00:00
parent 8a35567a5c
commit 3f052df156
5 changed files with 47 additions and 15 deletions

View File

@@ -1040,7 +1040,7 @@ db ' ',0
; Left side starts with Video Mode 0
NEWSYM GUI16VID, db 0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0 ; 16-bit mode
NEWSYM GUINGVID, db 1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,0 ; New Graphics Mode Available
NEWSYM GUISLVID, db 0,0,1,0,0,0,1,0,0,1,1,0,0,1,1,0 ; Scanlines
NEWSYM GUISLVID, db 0,0,1,0,0,1,1,0,0,1,1,0,0,1,1,0 ; Scanlines
NEWSYM GUIINVID, db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0 ; Interpolation
NEWSYM GUIEAVID, db 0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0 ; Eagle
NEWSYM GUIIEVID, db 0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0 ; (Interp | Eagle)

View File

@@ -39,7 +39,14 @@ NEWSYM res480, resb 1
SECTION .text
NEWSYM dosinitvideo2
cmp byte[cvidmode],2
jne .nomodeq
jmp dosinitvideo.initmodeq256
.nomodeq
cmp byte[cvidmode],5
jne .nomodex
jmp dosinitvideo.initmodex256
.nomodex
;*******************************************************
; InitVideo
@@ -157,7 +164,14 @@ NEWSYM dosinitvideo
.initmodex256
%ifdef __MSDOS__
cmp byte[scanlines],1
je near .scanlines2
SetVGAMode .Mode320x256
jmp .done2
.scanlines2
SetVGAMode .Mode320x256s
jmp .done2
.done2
call cscopymodex
%endif
call makepal

View File

@@ -123,6 +123,14 @@ SECTION .data
dw 03c4h,00604h,03ceh,04005h,03ceh,00506h,03c0h,04110h,03c0h,00013h
dd 0
.Mode320x256s
dw 03c2h,0e300h,03d4h,05f00h,03d4h,04f01h,03d4h,05002h,03d4h,08203h
dw 03d4h,05404h,03d4h,08005h,03d4h,02306h,03d4h,01d07h,03d4h,00008h
dw 03d4h,06009h,03d4h,00a10h,03d4h,0ac11h,03d4h,0ff12h,03d4h,02813h
dw 03d4h,00014h,03d4h,00715h,03d4h,01a16h,03d4h,0e317h,03c4h,00101h
dw 03c4h,00604h,03ceh,04005h,03ceh,00506h,03c0h,04110h,03c0h,00013h
dd 0
SECTION .text
%endif

View File

@@ -1004,7 +1004,12 @@ GUIVideoKeys:
GUIkeystoggleoptn byte[scanlines],1
%ifdef __MSDOS__
cmp byte[cvidmode],2
jne .nomodeq
jmp .refresh
.nomodeq
cmp byte[cvidmode],5
jne .nofullscanlines
.refresh
mov byte[cbitmode],1
call initvideo2
mov byte[cbitmode],0
@@ -1022,12 +1027,12 @@ GUIVideoKeys:
call ClearScreen
GUIkeystoggleoptn byte[scanlines],3
%ifdef __MSDOS__
cmp byte[cvidmode],2
jne .nohalfscanlines
mov byte[cbitmode],1
call initvideo2
mov byte[cbitmode],0
call GUISetPal
;cmp byte[cvidmode],2
;jne .nohalfscanlines
;mov byte[cbitmode],1
;call initvideo2
;mov byte[cbitmode],0
;call GUISetPal
%endif
.nohalfscanlines
cmp dh,'2'
@@ -1037,12 +1042,12 @@ GUIVideoKeys:
call ClearScreen
GUIkeystoggleoptn byte[scanlines],2
%ifdef __MSDOS__
cmp byte[cvidmode],2
jne .noquarterscanlines
mov byte[cbitmode],1
call initvideo2
mov byte[cbitmode],0
call GUISetPal
;cmp byte[cvidmode],2
;jne .noquarterscanlines
;mov byte[cbitmode],1
;call initvideo2
;mov byte[cbitmode],0
;call GUISetPal
%endif
.noquarterscanlines
cmp dh,'X'

View File

@@ -1237,12 +1237,17 @@ GUIWinClicked:
%ifdef __MSDOS__
cmp byte[cvidmode],2
jne %%nomodeq
jmp %%refresh
%%nomodeq
cmp byte[cvidmode],5
jne %%nomodex
%%refresh
mov byte[cbitmode],1
call initvideo2
mov byte[cbitmode],0
call GUISetPal
%endif
%%nomodeq
%%nomodex
ret
%%noclick
%endmacro