Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
6758f027
Commit
6758f027
authored
Jan 28, 2003
by
Jukka Heinonen
Committed by
Alexandre Julliard
Jan 28, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Handle horizontal and vertical retrace separately.
parent
1f5e6994
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
46 additions
and
14 deletions
+46
-14
vga.c
dlls/winedos/vga.c
+46
-14
No files found.
dlls/winedos/vga.c
View file @
6758f027
...
...
@@ -38,7 +38,9 @@ static IDirectDraw *lpddraw = NULL;
static
IDirectDrawSurface
*
lpddsurf
;
static
IDirectDrawPalette
*
lpddpal
;
static
DDSURFACEDESC
sdesc
;
static
LONG
vga_refresh
;
static
BOOL
vga_retrace_vertical
;
static
BOOL
vga_retrace_horizontal
;
/*
* VGA controller memory is emulated using linear framebuffer.
...
...
@@ -391,7 +393,7 @@ static void WINAPI VGA_DoSetMode(ULONG_PTR arg)
return
;
}
IDirectDrawSurface_SetPalette
(
lpddsurf
,
lpddpal
);
vga_re
fresh
=
0
;
vga_re
trace_vertical
=
vga_retrace_horizontal
=
FALSE
;
/* poll every 20ms (50fps should provide adequate responsiveness) */
VGA_InstallTimer
(
20
);
}
...
...
@@ -953,7 +955,10 @@ static void CALLBACK VGA_Poll( LPVOID arg, DWORD low, DWORD high )
VGA_Poll_Text
();
}
vga_refresh
=
1
;
/*
* Fake start of retrace.
*/
vga_retrace_vertical
=
TRUE
;
LeaveCriticalSection
(
&
vga_lock
);
}
...
...
@@ -1045,21 +1050,48 @@ BYTE VGA_ioport_in( WORD port )
FIXME
(
"Unsupported index, register 0x3d4: 0x%02x
\n
"
,
vga_index_3d4
);
return
0xff
;
case
0x3da
:
/*
* Read from this register resets register 0x3c0 address flip-flop.
*/
vga_address_3c0
=
TRUE
;
/* since we don't (yet?) serve DOS VM requests while VGA_Poll is running,
we need to fake the occurrence of the vertical refresh */
ret
=
vga_refresh
?
0x00
:
0x0b
;
/* toggle video RAM and lightpen and VGA refresh bits ! */
/*
* Read from this register resets register 0x3c0 address flip-flop.
*/
vga_address_3c0
=
TRUE
;
/*
* Read from this register returns following bits:
* xxxx1xxx = Vertical retrace in progress if set.
* xxxxx1xx = Light pen switched on.
* xxxxxx1x = Light pen trigger set.
* xxxxxxx1 = Either vertical or horizontal retrace
* in progress if set.
*/
ret
=
0
;
if
(
vga_retrace_vertical
)
ret
|=
9
;
if
(
vga_retrace_horizontal
)
ret
|=
3
;
/*
* If VGA mode has been set, vertical retrace is
* turned on once a frame and cleared after each read.
* This might cause applications that synchronize with
* vertical retrace to actually skip one frame but that
* is probably not a problem.
*
* If no VGA mode has been set, vertical retrace is faked
* by toggling the value after every read.
*/
if
(
VGA_IsTimerRunning
())
vga_re
fresh
=
0
;
vga_re
trace_vertical
=
FALSE
;
else
/* Also fake the occurence of the vertical refresh when no graphic
mode has been set */
vga_refresh
=!
vga_refresh
;
vga_retrace_vertical
=
!
vga_retrace_vertical
;
/*
* Toggle horizontal retrace.
*/
vga_retrace_horizontal
=
!
vga_retrace_horizontal
;
break
;
default:
ret
=
0xff
;
FIXME
(
"Unsupported VGA register: 0x%04x
\n
"
,
port
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment