Added my last two video modes to the DOS port.

This commit is contained in:
stainless
2001-09-10 07:31:07 +00:00
parent 5dbc7f8cd3
commit 48580f1915
8 changed files with 568 additions and 203 deletions

View File

@@ -1015,7 +1015,7 @@ NEWSYM ClearScreen
SECTION .data
; Total Number of Video Modes
NEWSYM NumVideoModes, dd 13
NEWSYM NumVideoModes, dd 15
; GUI Video Mode Names - Make sure that all names are of the same length
; and end with a NULL terminator
@@ -1023,36 +1023,38 @@ NEWSYM GUIVideoModeNames
db '256X224X8B MODEQ',0 ; 0
db '256X240X8B MODEQ',0 ; 1
db '256X256X8B MODEQ',0 ; 2
db '320X240X8B MODEX',0 ; 3
db '640X480X16B VESA1',0 ; 4
db '320X240X8B VESA2',0 ; 5
db '320X240X16B VESA2',0 ; 6
db '320X480X8B VESA2',0 ; 7
db '320X480X16B VESA2',0 ; 8
db '512X384X8B VESA2',0 ; 9
db '512X384X16B VESA2',0 ; 10
db '640X480X8B VESA2',0 ; 11
db '640X480X16B VESA2',0 ; 12
db '320X224X8B MODEX',0 ; 3
db '320X240X8B MODEX',0 ; 4
db '320X256X8B MODEX',0 ; 5
db '640X480X16B VESA1',0 ; 6
db '320X240X8B VESA2',0 ; 7
db '320X240X16B VESA2',0 ; 8
db '320X480X8B VESA2',0 ; 9
db '320X480X16B VESA2',0 ; 10
db '512X384X8B VESA2',0 ; 11
db '512X384X16B VESA2',0 ; 12
db '640X480X8B VESA2',0 ; 13
db '640X480X16B VESA2',0 ; 14
db ' ',0
; Video Mode Feature Availability (1 = Available, 0 = Not Available)
; Left side starts with Video Mode 0
NEWSYM GUI16VID, db 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,0,1,1,1,1,0 ; New Graphics Mode Available
NEWSYM GUISLVID, db 0,0,1,0,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,1,0 ; Interpolation
NEWSYM GUIEAVID, db 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,1,1,0 ; (Interp | Eagle)
NEWSYM GUIFSVID, db 0,0,0,0,0,1,1,0,0,0,0,1,1,0 ; Full Screen
NEWSYM GUISSVID, db 0,0,0,0,1,0,0,0,0,0,0,1,1,0 ; Small Screen
NEWSYM GUITBVID, db 0,0,0,0,0,1,1,1,1,1,1,1,1,0 ; Triple Buffering
NEWSYM GUIHSVID, db 0,0,0,0,0,0,0,0,1,0,0,0,1,0 ; Half/Quarter Scanlines
NEWSYM GUI2xVID, db 0,0,0,0,0,0,0,0,0,0,0,0,1,0 ; 2xSaI/Super Eagle Engines
NEWSYM GUIWFVID, db 0,0,0,0,0,0,0,0,0,0,0,0,0,0 ; If Windows Full Screen
NEWSYM GUII2VID, db 0,0,0,0,0,0,0,0,0,0,0,0,0,0 ; Interpolation
NEWSYM GUIM7VID, db 0,0,0,0,0,0,0,0,0,0,0,0,1,0 ; Interpolation
NEWSYM GUIBIFIL, db 0,0,0,0,0,0,0,0,0,0,0,0,0,0 ; Bilinear Filtering
NEWSYM GUITBWVID, db 0,0,0,0,0,0,0,0,0,0,0,0,0,0 ; Triple Buffering (Win)
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 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)
NEWSYM GUIFSVID, db 0,0,0,0,0,0,0,1,1,0,0,0,0,1,1,0 ; Full Screen
NEWSYM GUISSVID, db 0,0,0,0,0,0,1,0,0,0,0,0,0,1,1,0 ; Small Screen
NEWSYM GUITBVID, db 0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,0 ; Triple Buffering
NEWSYM GUIHSVID, db 0,0,0,0,0,0,0,0,0,0,1,0,0,0,1,0 ; Half/Quarter Scanlines
NEWSYM GUI2xVID, db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0 ; 2xSaI/Super Eagle Engines
NEWSYM GUIWFVID, db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 ; If Windows Full Screen
NEWSYM GUII2VID, db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 ; Interpolation
NEWSYM GUIM7VID, db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0 ; Interpolation
NEWSYM GUIBIFIL, db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 ; Bilinear Filtering
NEWSYM GUITBWVID, db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 ; Triple Buffering (Win)
SECTION .text
; ****************************

View File

@@ -41,7 +41,7 @@ SECTION .text
NEWSYM dosinitvideo2
cmp byte[cvidmode],2
jne .nomodeq
jmp dosinitvideo.initmodeq
jmp dosinitvideo.initmodeq256
.nomodeq
ret
@@ -57,26 +57,30 @@ NEWSYM dosinitvideo
cmp byte[cvidmode],1
je near .initmodeq240
cmp byte[cvidmode],2
je near .initmodeq
je near .initmodeq256
cmp byte[cvidmode],3
je near .initmodex
je near .initmodex224
cmp byte[cvidmode],4
je near .initvesa12640x480x16
je near .initmodex240
cmp byte[cvidmode],5
je near .initvesa2320x240x8
je near .initmodex256
cmp byte[cvidmode],6
je near .initvesa2320x240x16
je near .initvesa12640x480x16
cmp byte[cvidmode],7
je near .initvesa2320x480x8
je near .initvesa2320x240x8
cmp byte[cvidmode],8
je near .initvesa2320x480x16
je near .initvesa2320x240x16
cmp byte[cvidmode],9
je near .initvesa2512x384x8
je near .initvesa2320x480x8
cmp byte[cvidmode],10
je near .initvesa2512x384x16
je near .initvesa2320x480x16
cmp byte[cvidmode],11
je near .initvesa2640x480x8
je near .initvesa2512x384x8
cmp byte[cvidmode],12
je near .initvesa2512x384x16
cmp byte[cvidmode],13
je near .initvesa2640x480x8
cmp byte[cvidmode],14
je near .initvesa2640x480x16
ret
@@ -84,19 +88,7 @@ NEWSYM dosinitvideo
;*******************************************************
; InitModeX Sets up 320x240 unchained mode
;*******************************************************
.initmodex
%ifdef __MSDOS__
SetVGAMode .Mode320x240
call cscopymodex
%endif
call makepal
ret
;*******************************************************
; InitModeQ224 Sets up 256x224 chained mode
; InitModeQ 224 Sets up 256x224 chained mode
;*******************************************************
.initmodeq224
@@ -108,7 +100,7 @@ NEWSYM dosinitvideo
ret
;*******************************************************
; InitModeQ240 Sets up 256x240 chained mode
; InitModeQ 240 Sets up 256x240 chained mode
;*******************************************************
.initmodeq240
@@ -120,10 +112,10 @@ NEWSYM dosinitvideo
ret
;*******************************************************
; InitModeQ Sets up 256x256 chained mode
; InitModeQ 256 Sets up 256x256 chained mode
;*******************************************************
.initmodeq
.initmodeq256
%ifdef __MSDOS__
cmp byte[scanlines],1
jne .noscanlines
@@ -140,6 +132,44 @@ NEWSYM dosinitvideo
call makepal
ret
;*******************************************************
; InitModeX 224 Sets up 320x224 unchained mode
;*******************************************************
.initmodex224
%ifdef __MSDOS__
SetVGAMode .Mode320x224
call cscopymodex
%endif
call makepal
ret
;*******************************************************
; InitModeX 240 Sets up 320x240 unchained mode
;*******************************************************
.initmodex240
%ifdef __MSDOS__
SetVGAMode .Mode320x240
call cscopymodex
%endif
call makepal
ret
;*******************************************************
; InitModeX 256 Sets up 320x256 unchained mode
;*******************************************************
.initmodex256
%ifdef __MSDOS__
SetVGAMode .Mode320x256
call cscopymodex
%endif
call makepal
ret
;*******************************************************
; InitVESA2 320x240x8 Set up Linear 320x240x8b
;*******************************************************

View File

@@ -1,4 +1,6 @@
; by kode54, stainless
%ifdef __MSDOS__
%macro SetVGAMode 1
mov byte[cbitmode],0
@@ -97,6 +99,14 @@ SECTION .data
dw 03c4h,00e04h,03ceh,04005h,03cEh,00506h,03c0h,04110h,03c0h,00013h
dd 0
.Mode320x224
dw 03c2h,0e300h,03d4h,05f00h,03d4h,04f01h,03d4h,05002h,03d4h,08203h
dw 03d4h,05404h,03d4h,08005h,03d4h,00b06h,03d4h,03e07h,03d4h,00008h
dw 03d4h,04109h,03d4h,0da10h,03d4h,09c11h,03d4h,0c012h,03d4h,02813h
dw 03d4h,00014h,03d4h,0c715h,03d4h,00416h,03d4h,0e317h,03c4h,00101h
dw 03c4h,00604h,03ceh,04005h,03ceh,00506h,03c0h,04110h,03c0h,00013h
dd 0
.Mode320x240
dw 03c2h,0e300h,03d4h,05f00h,03d4h,04f01h,03d4h,05002h,03d4h,08203h
dw 03d4h,05404h,03d4h,08005h,03d4h,00d06h,03d4h,03e07h,03d4h,00008h
@@ -105,6 +115,14 @@ SECTION .data
dw 03c4h,00604h,03ceh,04005h,03ceh,00506h,03c0h,04110h,03c0h,00013h
dd 0
.Mode320x256
dw 03c2h,0e300h,03d4h,05f00h,03d4h,04f01h,03d4h,05002h,03d4h,08203h
dw 03d4h,05404h,03d4h,08005h,03d4h,02306h,03d4h,0b207h,03d4h,00008h
dw 03d4h,06109h,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

@@ -198,7 +198,7 @@ int pccmdline(void)
{
if(!hasroom) return 4;
cvidmode=my_atoi(argv[p+1]);
if(cvidmode > 12) return 13;
if(cvidmode > 14) return 13;
p++;
}
break;