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
38fc50d2
Commit
38fc50d2
authored
May 14, 2002
by
Robert Coeyman
Committed by
Alexandre Julliard
May 14, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added the rest of the register manipulation code to int 10. It only
handles the setting of the 16-color palette registers and overscan.
parent
ec67a955
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
59 additions
and
17 deletions
+59
-17
int10.c
dlls/winedos/int10.c
+21
-15
vga.c
dlls/winedos/vga.c
+35
-2
vga.h
dlls/winedos/vga.h
+3
-0
No files found.
dlls/winedos/int10.c
View file @
38fc50d2
...
...
@@ -511,36 +511,42 @@ void WINAPI DOSVM_Int10Handler( CONTEXT86 *context )
case
0x10
:
switch
AL_reg
(
context
)
{
case
0x00
:
/* SET SINGLE PALETTE REGISTER */
FIXME
(
"Set Single Palette Register - Not tested
\n
"
);
case
0x00
:
/* SET SINGLE PALETTE REGISTER - A.C. */
TRACE
(
"Set Single Palette Register - Reg 0x0%x Value 0x0%x
\n
"
,
BL_reg
(
context
),
BH_reg
(
context
));
/* BH is the value BL is the register */
VGA_SetColor16
((
int
)
BL_reg
(
context
),(
int
)
BH_reg
(
context
));
break
;
case
0x01
:
/* SET BORDER (OVERSCAN) */
/* Text terminals have no overscan */
TRACE
(
"Set Border (Overscan) - Ignored
\n
"
);
/* I'm setting it anyway. - A.C. */
TRACE
(
"Set Border (Overscan) - Ignored but set.
\n
"
);
VGA_SetColor16
(
16
,(
int
)
BH_reg
(
context
));
break
;
case
0x02
:
/* SET ALL PALETTE REGISTERS */
FIXME
(
"Set all palette registers - Not Supported
\n
"
);
/*
DX:ES
points to a 17 byte table of colors */
case
0x02
:
/* SET ALL PALETTE REGISTERS
- A.C.
*/
TRACE
(
"Set all palette registers
\n
"
);
/*
ES:DX
points to a 17 byte table of colors */
/* No return data listed */
/* I'll have to update my table and the default palette */
VGA_Set16Palette
(
CTX_SEG_OFF_TO_LIN
(
context
,
context
->
SegEs
,
context
->
Edx
));
break
;
case
0x03
:
/* TOGGLE INTENSITY/BLINKING BIT */
FIXME
(
"Toggle Intensity/Blinking Bit - Not Supported
\n
"
);
break
;
case
0x07
:
/* GET INDIVIDUAL PALETTE REGISTER */
FIXME
(
"Get Individual Palette Register - Not Supported
\n
"
);
case
0x07
:
/* GET INDIVIDUAL PALETTE REGISTER
- A.C.
*/
TRACE
(
"Get Individual Palette Register 0x0%x
\n
"
,
BL_reg
(
context
)
);
/* BL is register to read [ 0-15 ] BH is return value */
BH_reg
(
context
)
=
VGA_GetColor16
((
int
)
BL_reg
(
context
));
break
;
case
0x08
:
/* READ OVERSCAN (BORDER COLOR) REGISTER */
FIXME
(
"Read Overscan (Border Color) Register - Not Supported
\n
"
);
case
0x08
:
/* READ OVERSCAN (BORDER COLOR) REGISTER
- A.C.
*/
TRACE
(
"Read Overscan (Border Color) Register
\n
"
);
BH_reg
(
context
)
=
VGA_GetColor16
(
16
);
break
;
case
0x09
:
/* READ ALL PALETTE REGISTERS AND OVERSCAN REGISTER */
FIXME
(
"Read All Palette Registers and Overscan Register "
" - Not Supported
\n
"
);
case
0x09
:
/* READ ALL PALETTE REGISTERS AND OVERSCAN REGISTER - A.C.*/
TRACE
(
"Read All Palette Registers and Overscan Register
\n
"
);
/* ES:DX points to a 17 byte table where the results */
/* of this call should be stored. */
VGA_Get16Palette
(
CTX_SEG_OFF_TO_LIN
(
context
,
context
->
SegEs
,
context
->
Edx
));
break
;
case
0x10
:
/* SET INDIVIDUAL DAC REGISTER */
{
...
...
dlls/winedos/vga.c
View file @
38fc50d2
...
...
@@ -251,7 +251,7 @@ static void WINAPI VGA_DoSetMode(ULONG_PTR arg)
ModeSet
*
par
=
(
ModeSet
*
)
arg
;
par
->
ret
=
1
;
if
(
lpddraw
)
VGA_DoExit
(
NULL
);
if
(
lpddraw
)
VGA_DoExit
(
0
);
if
(
!
lpddraw
)
{
if
(
!
pDirectDrawCreate
)
{
...
...
@@ -357,7 +357,7 @@ void VGA_SetPalette(PALETTEENTRY*pal,int start,int len)
IDirectDrawPalette_SetEntries
(
lpddpal
,
0
,
start
,
len
,
pal
);
}
/* set a single color in 16 color mode. */
/* set a single
[char wide]
color in 16 color mode. */
void
VGA_SetColor16
(
int
reg
,
int
color
)
{
PALETTEENTRY
*
pal
;
...
...
@@ -368,6 +368,39 @@ void VGA_SetColor16(int reg,int color)
vga_16_palette
[
reg
]
=
(
char
)
color
;
}
/* Get a single [char wide] color in 16 color mode. */
char
VGA_GetColor16
(
int
reg
)
{
if
(
!
lpddraw
)
return
0
;
return
(
char
)
vga_16_palette
[
reg
];
}
/* set all 17 [char wide] colors at once in 16 color mode. */
void
VGA_Set16Palette
(
char
*
Table
)
{
PALETTEENTRY
*
pal
;
int
c
;
if
(
!
lpddraw
)
return
;
/* return if we're in text only mode */
bcopy
((
void
*
)
&
vga_16_palette
,(
void
*
)
Table
,
17
);
/* copy the entries into the table */
for
(
c
=
0
;
c
<
17
;
c
++
)
{
/* 17 entries */
pal
=
&
vga_def64_palette
[(
int
)
vga_16_palette
[
c
]];
/* get color */
IDirectDrawPalette_SetEntries
(
lpddpal
,
0
,
c
,
1
,
pal
);
/* set entry */
TRACE
(
"Palette register %d set to %d
\n
"
,
c
,(
int
)
vga_16_palette
[
c
]);
}
/* end of the counting loop */
}
/* Get all 17 [ char wide ] colors at once in 16 color mode. */
void
VGA_Get16Palette
(
char
*
Table
)
{
if
(
!
lpddraw
)
return
;
/* return if we're in text only mode */
bcopy
((
void
*
)
Table
,(
void
*
)
&
vga_16_palette
,
17
);
/* copy the entries into the table */
}
void
VGA_SetQuadPalette
(
RGBQUAD
*
color
,
int
start
,
int
len
)
{
PALETTEENTRY
pal
[
256
];
...
...
dlls/winedos/vga.h
View file @
38fc50d2
...
...
@@ -30,6 +30,9 @@ int VGA_GetMode(unsigned*Height,unsigned*Width,unsigned*Depth);
void
VGA_Exit
(
void
);
void
VGA_SetPalette
(
PALETTEENTRY
*
pal
,
int
start
,
int
len
);
void
VGA_SetColor16
(
int
reg
,
int
color
);
char
VGA_GetColor16
(
int
reg
);
void
VGA_Set16Palette
(
char
*
Table
);
void
VGA_Get16Palette
(
char
*
Table
);
void
VGA_SetQuadPalette
(
RGBQUAD
*
color
,
int
start
,
int
len
);
LPSTR
VGA_Lock
(
unsigned
*
Pitch
,
unsigned
*
Height
,
unsigned
*
Width
,
unsigned
*
Depth
);
void
VGA_Unlock
(
void
);
...
...
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