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
dd0faf7d
Commit
dd0faf7d
authored
Dec 30, 2008
by
Christian Costa
Committed by
Alexandre Julliard
Dec 30, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winedos: Compute CMOS image checksum automatically.
parent
3ae00daf
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
10 deletions
+17
-10
ioports.c
dlls/winedos/ioports.c
+17
-10
No files found.
dlls/winedos/ioports.c
View file @
dd0faf7d
...
...
@@ -67,9 +67,8 @@ static BYTE parport_8255[4] = {0x4f, 0x20, 0xff, 0xff};
static
BYTE
cmosaddress
;
/* if you change anything here, use IO_FixCMOSCheckSum below to compute
* the checksum and put the right values in.
*/
static
int
cmos_image_initialized
=
0
;
static
BYTE
cmosimage
[
64
]
=
{
0x27
,
/* 0x00: seconds */
...
...
@@ -118,8 +117,8 @@ static BYTE cmosimage[64] =
0x00
,
/* 0x2b: options 2 */
0x00
,
/* 0x2c: options 3 */
0x3f
,
/* 0x2d: reserved */
0x
03
,
/* 0x2e: low CMOS ram checksum
*/
0x
19
,
/* 0x2f: high CMOS ram checksum
*/
0x
cc
,
/* 0x2e: low CMOS ram checksum (computed automatically)
*/
0x
cc
,
/* 0x2f: high CMOS ram checksum (computed automatically)
*/
0x00
,
/* 0x30: low extended memory byte */
0x1c
,
/* 0x31: high extended memory byte */
0x19
,
/* 0x32: century byte */
...
...
@@ -138,7 +137,6 @@ static BYTE cmosimage[64] =
0x5f
/* 0x3f: reserved */
};
#if 0
static
void
IO_FixCMOSCheckSum
(
void
)
{
WORD
sum
=
0
;
...
...
@@ -148,9 +146,8 @@ static void IO_FixCMOSCheckSum(void)
sum
+=
cmosimage
[
i
];
cmosimage
[
0x2e
]
=
sum
>>
8
;
/* yes, this IS hi byte !! */
cmosimage
[
0x2f
]
=
sum
&
0xff
;
MESSAG
E("calculated hi %02x, lo %02x\n", cmosimage[0x2e], cmosimage[0x2f]);
TRAC
E
(
"calculated hi %02x, lo %02x
\n
"
,
cmosimage
[
0x2e
],
cmosimage
[
0x2f
]);
}
#endif
#ifdef DIRECT_IO_ACCESS
...
...
@@ -459,6 +456,11 @@ DWORD WINAPI DOSVM_inport( int port, int size )
res
=
(
DWORD
)
cmosaddress
;
break
;
case
0x71
:
if
(
!
cmos_image_initialized
)
{
IO_FixCMOSCheckSum
();
cmos_image_initialized
=
1
;
}
res
=
(
DWORD
)
cmosimage
[
cmosaddress
&
0x3f
];
break
;
case
0x200
:
...
...
@@ -506,8 +508,8 @@ DWORD WINAPI DOSVM_inport( int port, int size )
case
0x3dd
:
case
0x3de
:
case
0x3df
:
if
(
size
>
1
)
FIXME
(
"Trying to read more than one byte from VGA!
\n
"
);
if
(
size
>
1
)
FIXME
(
"Trying to read more than one byte from VGA!
\n
"
);
res
=
(
DWORD
)
VGA_ioport_in
(
port
);
break
;
case
0x00
:
...
...
@@ -677,6 +679,11 @@ void WINAPI DOSVM_outport( int port, int size, DWORD value )
cmosaddress
=
(
BYTE
)
value
&
0x7f
;
break
;
case
0x71
:
if
(
!
cmos_image_initialized
)
{
IO_FixCMOSCheckSum
();
cmos_image_initialized
=
1
;
}
cmosimage
[
cmosaddress
&
0x3f
]
=
(
BYTE
)
value
;
break
;
case
0x226
:
...
...
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