Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
194cfed1
Commit
194cfed1
authored
Nov 08, 1998
by
Ove Kaaven
Committed by
Alexandre Julliard
Nov 08, 1998
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Simulate the VGA vertical refresh.
parent
5e144868
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
1 deletion
+27
-1
vga.c
graphics/vga.c
+23
-1
vga.h
include/vga.h
+1
-0
ioports.c
msdos/ioports.c
+3
-0
No files found.
graphics/vga.c
View file @
194cfed1
...
...
@@ -21,7 +21,7 @@ static IDirectDrawPalette *lpddpal;
static
DDSURFACEDESC
sdesc
;
static
WORD
poll_timer
;
static
CRITICAL_SECTION
vga_crit
;
static
int
vga_polling
;
static
int
vga_polling
,
vga_refresh
;
int
VGA_SetMode
(
unsigned
Xres
,
unsigned
Yres
,
unsigned
Depth
)
{
...
...
@@ -47,6 +47,7 @@ int VGA_SetMode(unsigned Xres,unsigned Yres,unsigned Depth)
lpddraw
=
NULL
;
return
1
;
}
vga_refresh
=
0
;
InitializeCriticalSection
(
&
vga_crit
);
/* poll every 20ms (50fps should provide adequate responsiveness) */
poll_timer
=
CreateSystemTimer
(
20
,
(
FARPROC16
)
VGA_Poll
);
...
...
@@ -141,6 +142,7 @@ void VGA_Poll(void)
for
(
X
=
0
;
X
<
Width
;
X
++
)
if
(
dat
[
X
])
TRACE
(
ddraw
,
"data(%d) at (%d,%d)
\n
"
,
dat
[
X
],
X
,
Y
);
}
VGA_Unlock
();
vga_refresh
=
1
;
EnterCriticalSection
(
&
vga_crit
);
vga_polling
--
;
}
...
...
@@ -161,5 +163,25 @@ void VGA_ioport_out( WORD port, BYTE val )
VGA_SetPalette
(
&
paldat
,
palreg
,
1
);
palreg
++
;
}
break
;
}
}
BYTE
VGA_ioport_in
(
WORD
port
)
{
BYTE
ret
;
switch
(
port
)
{
case
0x3da
:
/* since we don't (yet?) serve DOS VM requests while VGA_Poll is running,
we need to fake the occurrence of the vertical refresh */
if
(
lpddraw
)
{
ret
=
vga_refresh
?
0x00
:
0x08
;
vga_refresh
=
0
;
}
else
ret
=
0x08
;
break
;
default:
ret
=
0xff
;
}
return
ret
;
}
include/vga.h
View file @
194cfed1
...
...
@@ -19,5 +19,6 @@ LPSTR VGA_Lock(unsigned*Pitch,unsigned*Height,unsigned*Width,unsigned*Depth);
void
VGA_Unlock
(
void
);
void
VGA_Poll
(
void
);
void
VGA_ioport_out
(
WORD
port
,
BYTE
val
);
BYTE
VGA_ioport_in
(
WORD
port
);
#endif
/* __WINE_VGA_H */
msdos/ioports.c
View file @
194cfed1
...
...
@@ -239,6 +239,9 @@ DWORD IO_inport( int port, int count )
case
0x201
:
b
=
0xff
;
/* no joystick */
break
;
case
0x3da
:
b
=
VGA_ioport_in
(
port
);
break
;
default:
WARN
(
int
,
"Direct I/O read attempted from port %x
\n
"
,
port
);
b
=
0xff
;
...
...
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