Added wide screen to 320x480 video modes in the DOS port.

This commit is contained in:
stainless
2001-10-09 05:35:42 +00:00
parent 38e5d91e11
commit 23f6e3324e
5 changed files with 89 additions and 124 deletions

View File

@@ -1044,14 +1044,15 @@ 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 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 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 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 GUIFSVID, db 0,0,0,0,0,0,0,1,1,1,1,0,0,1,1,0 ; Full Screen
NEWSYM GUISSVID, db 0,0,0,0,0,0,1,0,0,1,1,0,0,1,1,0 ; Small Screen NEWSYM GUIWSVID, db 0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0 ; (Full Scr. | Wide Scr.)
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 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 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 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 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 GUII2VID, db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 ; Super 2xSAI Engine
NEWSYM GUIM7VID, db 0,0,0,0,0,0,0,0,0,1,0,0,0,0,1,0 ; Interpolation NEWSYM GUIM7VID, db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0 ; Hi-Resolution Mode 7
NEWSYM GUIBIFIL, db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 ; Bilinear Filtering 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) NEWSYM GUITBWVID, db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 ; Triple Buffering (Win)
SECTION .text SECTION .text

View File

@@ -135,8 +135,8 @@ EXTSYM NumVideoModes
EXTSYM cfgvolume, MusicVol, DSPMem EXTSYM cfgvolume, MusicVol, DSPMem
EXTSYM NumInputDevices,GUIInputNames EXTSYM NumInputDevices,GUIInputNames
EXTSYM GUIVideoModeNames EXTSYM GUIVideoModeNames
EXTSYM GUISLVID,GUIINVID,GUIEAVID,GUIIEVID,GUIFSVID,GUISSVID,GUITBVID EXTSYM GUISLVID,GUIINVID,GUIEAVID,GUIIEVID,GUIFSVID,GUIWSVID,
EXTSYM GUIHSVID,GUI2xVID,GUII2VID,GUIM7VID EXTSYM GUISSVID,GUITBVID,GUIHSVID,GUI2xVID,GUII2VID,GUIM7VID
EXTSYM cfgsoundon,cfgSoundQuality,cfgStereoSound EXTSYM cfgsoundon,cfgSoundQuality,cfgStereoSound
EXTSYM convertnum,converthex EXTSYM convertnum,converthex
EXTSYM per2exec EXTSYM per2exec

View File

@@ -1714,7 +1714,12 @@ DisplayGUIVideo:
xor eax,eax xor eax,eax
mov al,[cvidmode] mov al,[cvidmode]
cmp byte[GUIFSVID+eax],0 cmp byte[GUIFSVID+eax],0
je .notext5 je near .notext5
cmp byte[GUIWSVID+eax],0
je .fs
GUIOuttextwin2u 5,26,93,GUIVideoText5b,1
jmp .notext5
.fs
GUIOuttextwin2u 5,26,93,GUIVideoText5,1 GUIOuttextwin2u 5,26,93,GUIVideoText5,1
.notext5 .notext5
xor eax,eax xor eax,eax
@@ -1810,7 +1815,12 @@ DisplayGUIVideo:
xor eax,eax xor eax,eax
mov al,[cvidmode] mov al,[cvidmode]
cmp byte[GUIFSVID+eax],0 cmp byte[GUIFSVID+eax],0
je .notext5b je near .notext5b
cmp byte[GUIWSVID+eax],0
je .fs2
GUIOuttextwin2 5,25,92,GUIVideoText5b
jmp .notext5b
.fs2
GUIOuttextwin2 5,25,92,GUIVideoText5 GUIOuttextwin2 5,25,92,GUIVideoText5
.notext5b .notext5b
xor eax,eax xor eax,eax
@@ -2126,6 +2136,7 @@ GUIVideoTextbf db 'BILINEAR FILTER',0
GUIVideoText3 db 'INTERPOLATION',0 ; -y GUIVideoText3 db 'INTERPOLATION',0 ; -y
GUIVideoText4 db 'EAGLE ENGINE',0 ; -y GUIVideoText4 db 'EAGLE ENGINE',0 ; -y
GUIVideoText5 db 'FULL SCREEN',0 ; -c GUIVideoText5 db 'FULL SCREEN',0 ; -c
GUIVideoText5b db 'WIDE SCREEN',0 ; -c
GUIVideoText6 db 'SMALL SCREEN',0 ; -c GUIVideoText6 db 'SMALL SCREEN',0 ; -c
GUIVideoText7 db 'TRIPLE BUFFERING',0 ; -c GUIVideoText7 db 'TRIPLE BUFFERING',0 ; -c
GUIVideoText8b db 'HI-RESOLUTION MODE7',0 ; -c GUIVideoText8b db 'HI-RESOLUTION MODE7',0 ; -c

View File

@@ -1067,21 +1067,21 @@ NEWSYM copyvesa2320x480x8b
mov dl,[resolutn] mov dl,[resolutn]
dec dl dec dl
dec dl dec dl
cmp byte[smallscreenon],1 cmp byte[ScreenScale],1
je near .smallscreen je near .widescreen
cmp byte[scanlines],1 cmp byte[scanlines],1
je near .scanlines je near .scanlines
; cmp byte[CurrentGUIOn],1 ; cmp byte[CurrentGUIOn],1
cmp byte[GUIOn],1 ; cmp byte[GUIOn],1
je .loopa1 ; je .loopa
cmp byte[f3menuen],1 ; cmp byte[f3menuen],1
je .loopa1 ; je .loopa
cmp byte[ForceNewGfxOff],1 ; cmp byte[ForceNewGfxOff],1
je .loopa1 ; je .loopa
cmp byte[newengen],1 ; cmp byte[newengen],1
je near copyvesa2320x480x8ng ; je near copyvesa2320x480x8ng
.loopa1 .loopa
cmp byte[MMXSupport],1 cmp byte[MMXSupport],1
je .loopb je .loopb
.loopa2 .loopa2
@@ -1131,45 +1131,37 @@ NEWSYM copyvesa2320x480x8b
emms emms
jmp .done jmp .done
.smallscreen .widescreen
add edi,60*320 add edi,60*320
cmp byte[MMXSupport],1 sub edi,16
je near .ssloopb .wsloopa
.ssloopa mov ecx,32
mov ecx,64 call .wsloopb
rep movsd
add esi,32 add esi,32
add edi,32*2 add edi,16*2
mov ecx,64 mov ecx,32
rep movsd call .wsloopb
sub esi,256 sub esi,256
add edi,32*2 add edi,16*2
mov ecx,64 mov ecx,32
rep movsd call .wsloopb
add esi,32 add esi,32
add edi,32*2 add edi,16*2
dec dl dec dl
dec dl dec dl
jnz .ssloopa jnz .wsloopa
jmp .done
.ssloopb
mov ecx,16
MMXStuff
add esi,32
add edi,32*2
mov ecx,16
MMXStuff
sub esi,256
add edi,32*2
mov ecx,16
MMXStuff
add esi,32
add edi,32*2
dec dl
dec dl
jnz near .ssloopb
emms
jmp .done jmp .done
.wsloopb
movsd
movsd
dec esi
mov al,[esi]
mov [es:edi],al
inc esi
inc edi
dec ecx
jnz .wsloopb
ret
.done .done
pop es pop es
@@ -1177,6 +1169,7 @@ NEWSYM copyvesa2320x480x8b
copyvesa2320x480x8ng: copyvesa2320x480x8ng:
jmp .mode7hires
mov ebx,1 mov ebx,1
.loopa .loopa
cmp dword[ignor512],0 cmp dword[ignor512],0
@@ -1198,7 +1191,6 @@ copyvesa2320x480x8ng:
cmp byte[BGMA+ebx+1],7 cmp byte[BGMA+ebx+1],7
je near .mode7hires je near .mode7hires
.nomode7hires .nomode7hires
mov ecx,64 mov ecx,64
.a .a
mov eax,[esi] mov eax,[esi]
@@ -2131,7 +2123,7 @@ NEWSYM copyvesa2512x384x8b
cmp byte[Triplebufen],1 cmp byte[Triplebufen],1
je .ignorehr je .ignorehr
cmp al,1 cmp al,1
je .yeshires je near .yeshires
.ignorehr .ignorehr
mov ecx,128 mov ecx,128
.a .a
@@ -2501,8 +2493,6 @@ NEWSYM copyvesa2320x480x16bgui
mov dl,[resolutn] mov dl,[resolutn]
dec dl dec dl
dec dl dec dl
cmp byte[smallscreenon],1
je near .smallscreen
cmp byte[scanlines],3 cmp byte[scanlines],3
je near .halfscanlines je near .halfscanlines
cmp byte[scanlines],2 cmp byte[scanlines],2
@@ -2633,36 +2623,6 @@ NEWSYM copyvesa2320x480x16bgui
jnz .loopabhq jnz .loopabhq
pop es pop es
ret ret
.smallscreen
add edi,60*320*2
.ssloopa
mov ecx,256
call .ssloopa2
add esi,32
add edi,64*2*2
mov ecx,256
call .ssloopa2
sub esi,256
add edi,64*2*2
mov ecx,256
call .ssloopa2
add esi,32
add edi,64*2*2
dec dl
dec dl
jnz .ssloopa
pop es
ret
.ssloopa2
mov al,[esi]
inc esi
mov bx,[GUICPC+eax*2]
mov [es:edi],bx
add edi,2
dec ecx
jnz .ssloopa2
ret
%endif %endif
NEWSYM ConvertToAFormat NEWSYM ConvertToAFormat
@@ -2778,8 +2738,8 @@ NEWSYM copyvesa2320x480x16b
mov dl,[resolutn] mov dl,[resolutn]
dec dl dec dl
dec dl dec dl
cmp byte[smallscreenon],1 cmp byte[ScreenScale],1
je near .smallscreen je near .widescreen
cmp byte[scanlines],1 cmp byte[scanlines],1
je near .scanlines je near .scanlines
cmp byte[scanlines],3 cmp byte[scanlines],3
@@ -3020,48 +2980,40 @@ NEWSYM copyvesa2320x480x16b
jnz .mmxr2h2 jnz .mmxr2h2
jmp .returnbh2 jmp .returnbh2
.smallscreen .widescreen
add edi,60*320*2 add edi,60*320*2
cmp byte[MMXSupport],1 sub edi,16*2
je near .ssloopb .wsloopa
.ssloopa mov ecx,32
mov ecx,64*2 call .wsloopb
rep movsd
add esi,32*2 add esi,32*2
add edi,32*2*2 add edi,16*2*2
mov ecx,64*2 mov ecx,32
rep movsd call .wsloopb
sub esi,256*2 sub esi,256*2
add edi,32*2*2 add edi,16*2*2
mov ecx,64*2 mov ecx,32
rep movsd call .wsloopb
add esi,32*2 add esi,32*2
add edi,32*2*2 add edi,16*2*2
dec dl dec dl
dec dl dec dl
jnz .ssloopa jnz .wsloopa
jmp .done
.ssloopb
mov ecx,16*2
MMXStuff
add esi,32*2
add edi,32*2*2
mov ecx,16*2
MMXStuff
sub esi,256*2
add edi,32*2*2
mov ecx,16*2
MMXStuff
add esi,32*2
add edi,32*2*2
dec dl
dec dl
jnz near .ssloopb
emms
jmp .done
.done
pop es pop es
ret ret
.wsloopb
movsd
movsd
movsd
movsd
sub esi,2
mov ax,[esi]
mov [es:edi],ax
add esi,2
add edi,2
dec ecx
jnz .wsloopb
ret
;******************************************************* ;*******************************************************
; Copy VESA2 640x480x16b Copies buffer to 640x480x16bVB2 ; Copy VESA2 640x480x16b Copies buffer to 640x480x16bVB2
@@ -5501,7 +5453,7 @@ NEWSYM copyvesa2512x384x16b
cmp byte[Triplebufen],1 cmp byte[Triplebufen],1
je .ignorehr je .ignorehr
cmp al,1 cmp al,1
je .yeshires je near .yeshires
.ignorehr .ignorehr
mov ecx,256 mov ecx,256
.a .a

View File

@@ -1251,6 +1251,7 @@ NEWSYM GUII2VID, db 0,0,0,1,0,1,1,1,0,0,1,0,1,0,1,1,0,1,0,1,1,0,1,0,1,0,1,1,0,1,
NEWSYM GUIEAVID, db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 ; Eagle NEWSYM GUIEAVID, db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 ; Eagle
NEWSYM GUIIEVID, db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 ; (Interp | Eagle) NEWSYM GUIIEVID, db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 ; (Interp | Eagle)
NEWSYM GUIFSVID, db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 ; Full Screen NEWSYM GUIFSVID, db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 ; Full Screen
NEWSYM GUIWSVID, db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 ; (Full Scr. | Wide Scr.)
NEWSYM GUISSVID, db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 ; Small Screen NEWSYM GUISSVID, db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 ; Small Screen
NEWSYM GUITBVID, db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 ; Triple Buffering NEWSYM GUITBVID, db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 ; Triple Buffering
NEWSYM GUIHSVID, db 0,0,0,1,0,1,1,1,0,0,1,0,1,0,1,1,0,1,0,1,1,0,1,0,1,0,1,1,0,1,0,1,1 ; Half/Quarter Scanlines NEWSYM GUIHSVID, db 0,0,0,1,0,1,1,1,0,0,1,0,1,0,1,1,0,1,0,1,1,0,1,0,1,0,1,1,0,1,0,1,1 ; Half/Quarter Scanlines