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
c956f67f
Commit
c956f67f
authored
Feb 03, 2000
by
Ove Kaaven
Committed by
Alexandre Julliard
Feb 03, 2000
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added INT_Int16ReadChar and made int09 handle special keys.
parent
c9307edf
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
40 additions
and
2 deletions
+40
-2
miscemu.h
include/miscemu.h
+8
-0
int09.c
msdos/int09.c
+4
-2
int16.c
msdos/int16.c
+28
-0
No files found.
include/miscemu.h
View file @
c956f67f
...
...
@@ -106,6 +106,13 @@ extern BOOL INSTR_EmulateInstruction( CONTEXT86 *context );
/* msdos/devices.c */
extern
void
DOSDEV_InstallDOSDevices
(
void
);
extern
DWORD
DOSDEV_Console
(
void
);
extern
DWORD
DOSDEV_FindCharDevice
(
char
*
name
);
extern
int
DOSDEV_Peek
(
DWORD
dev
,
BYTE
*
data
);
extern
int
DOSDEV_Read
(
DWORD
dev
,
DWORD
buf
,
int
buflen
);
extern
int
DOSDEV_Write
(
DWORD
dev
,
DWORD
buf
,
int
buflen
,
int
verify
);
extern
int
DOSDEV_IoctlRead
(
DWORD
dev
,
DWORD
buf
,
int
buflen
);
extern
int
DOSDEV_IoctlWrite
(
DWORD
dev
,
DWORD
buf
,
int
buflen
);
/* msdos/interrupts.c */
extern
FARPROC16
INT_GetPMHandler
(
BYTE
intnum
);
...
...
@@ -143,6 +150,7 @@ extern void WINAPI INT_Int15Handler(CONTEXT86*);
/* msdos/int16.c */
extern
void
WINAPI
INT_Int16Handler
(
CONTEXT86
*
);
extern
int
WINAPI
INT_Int16ReadChar
(
BYTE
*
ascii
,
BYTE
*
scan
,
BOOL
peek
);
extern
int
WINAPI
INT_Int16AddChar
(
BYTE
ascii
,
BYTE
scan
);
/* msdos/int17.c */
...
...
msdos/int09.c
View file @
c956f67f
...
...
@@ -28,6 +28,7 @@ void WINAPI INT_Int09Handler( CONTEXT86 *context )
BYTE
ch
[
2
];
int
cnt
,
c2
;
TRACE
(
"scan=%02x
\n
"
,
scan
);
if
(
!
(
scan
&
0x80
))
{
/* as in TranslateMessage, windows/input.c */
cnt
=
ToAscii
(
vkey
,
scan
,
QueueKeyStateTable
,
(
LPWORD
)
ch
,
0
);
...
...
@@ -36,8 +37,9 @@ void WINAPI INT_Int09Handler( CONTEXT86 *context )
INT_Int16AddChar
(
ch
[
c2
],
scan
);
}
else
if
(
cnt
==
0
)
{
/* need to handle things like shift-F-keys etc */
FIXME
(
"DOS special key translation not implemented
\n
"
);
/* FIXME: need to handle things like shift-F-keys,
* 0xE0 extended keys, etc */
INT_Int16AddChar
(
0
,
scan
);
}
}
DOSVM_PIC_ioport_out
(
0x20
,
0x20
);
/* send EOI */
...
...
msdos/int16.c
View file @
c956f67f
...
...
@@ -123,12 +123,40 @@ void WINAPI INT_Int16Handler( CONTEXT86 *context )
}
}
int
WINAPI
INT_Int16ReadChar
(
BYTE
*
ascii
,
BYTE
*
scan
,
BOOL
peek
)
{
BIOSDATA
*
data
=
DOSMEM_BiosData
();
WORD
CurOfs
=
data
->
NextKbdCharPtr
;
/* check if there's data in buffer */
if
(
peek
)
{
if
(
CurOfs
==
data
->
FirstKbdCharPtr
)
return
0
;
}
else
{
while
(
CurOfs
==
data
->
FirstKbdCharPtr
)
{
/* no input available yet, so wait... */
DOSVM_Wait
(
-
1
,
0
);
}
}
/* read from keyboard queue */
TRACE
(
"(%p,%p,%d) -> %02x %02x
\n
"
,
ascii
,
scan
,
peek
,((
BYTE
*
)
data
)[
CurOfs
],((
BYTE
*
)
data
)[
CurOfs
+
1
]);
if
(
ascii
)
*
ascii
=
((
BYTE
*
)
data
)[
CurOfs
];
if
(
scan
)
*
scan
=
((
BYTE
*
)
data
)[
CurOfs
+
1
];
if
(
!
peek
)
{
CurOfs
+=
2
;
if
(
CurOfs
>=
data
->
KbdBufferEnd
)
CurOfs
=
data
->
KbdBufferStart
;
data
->
NextKbdCharPtr
=
CurOfs
;
}
return
1
;
}
int
WINAPI
INT_Int16AddChar
(
BYTE
ascii
,
BYTE
scan
)
{
BIOSDATA
*
data
=
DOSMEM_BiosData
();
WORD
CurOfs
=
data
->
FirstKbdCharPtr
;
WORD
NextOfs
=
CurOfs
+
2
;
TRACE
(
"(%02x,%02x)
\n
"
,
ascii
,
scan
);
if
(
NextOfs
>=
data
->
KbdBufferEnd
)
NextOfs
=
data
->
KbdBufferStart
;
/* check if buffer is full */
if
(
NextOfs
==
data
->
NextKbdCharPtr
)
return
0
;
...
...
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