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
9f9ac54a
Commit
9f9ac54a
authored
Apr 11, 2006
by
Petr Tesarik
Committed by
Alexandre Julliard
Apr 11, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winedos: Implement true CDROM DOS device driver.
parent
d72178a1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
57 additions
and
0 deletions
+57
-0
dosexe.h
dlls/winedos/dosexe.h
+1
-0
int2f.c
dlls/winedos/int2f.c
+55
-0
module.c
dlls/winedos/module.c
+1
-0
No files found.
dlls/winedos/dosexe.h
View file @
9f9ac54a
...
...
@@ -475,6 +475,7 @@ extern void WINAPI DOSVM_Int2aHandler(CONTEXT86*);
/* int2f.c */
extern
void
WINAPI
DOSVM_Int2fHandler
(
CONTEXT86
*
);
extern
void
MSCDEX_InstallCDROM
(
void
);
/* int31.c */
extern
void
WINAPI
DOSVM_Int31Handler
(
CONTEXT86
*
);
...
...
dlls/winedos/int2f.c
View file @
9f9ac54a
...
...
@@ -1024,3 +1024,58 @@ static void MSCDEX_Handler(CONTEXT86* context)
break
;
}
}
/* prototypes */
static
void
WINAPI
cdrom_strategy
(
CONTEXT86
*
ctx
);
static
void
WINAPI
cdrom_interrupt
(
CONTEXT86
*
ctx
);
/* device info */
static
const
WINEDEV
cdromdev
=
{
"WINE_CD_"
,
ATTR_CHAR
|
ATTR_REMOVABLE
|
ATTR_IOCTL
,
cdrom_strategy
,
cdrom_interrupt
};
static
REQUEST_HEADER
*
cdrom_driver_request
;
/* Return to caller */
static
void
do_lret
(
CONTEXT86
*
ctx
)
{
WORD
*
stack
=
CTX_SEG_OFF_TO_LIN
(
ctx
,
ctx
->
SegSs
,
ctx
->
Esp
);
ctx
->
Eip
=
*
(
stack
++
);
ctx
->
SegCs
=
*
(
stack
++
);
ctx
->
Esp
+=
2
*
sizeof
(
WORD
);
}
static
void
WINAPI
cdrom_strategy
(
CONTEXT86
*
ctx
)
{
cdrom_driver_request
=
CTX_SEG_OFF_TO_LIN
(
ctx
,
ctx
->
SegEs
,
ctx
->
Ebx
);
do_lret
(
ctx
);
}
static
void
WINAPI
cdrom_interrupt
(
CONTEXT86
*
ctx
)
{
if
(
cdrom_driver_request
->
unit
>
CDROM_GetHeap
()
->
hdr
.
units
)
cdrom_driver_request
->
status
=
STAT_ERROR
|
1
;
/* unknown unit */
else
MSCDEX_Request
((
BYTE
*
)
cdrom_driver_request
,
ISV86
(
ctx
));
do_lret
(
ctx
);
}
/**********************************************************************
* MSCDEX_InstallCDROM [internal]
*
* Install the CDROM driver into the DOS device driver chain.
*/
void
MSCDEX_InstallCDROM
(
void
)
{
CDROM_HEAP
*
cdrom_heap
=
CDROM_GetHeap
();
DOSDEV_SetupDevice
(
&
cdromdev
,
cdrom_heap
->
cdrom_segment
,
FIELD_OFFSET
(
CDROM_HEAP
,
hdr
),
FIELD_OFFSET
(
CDROM_HEAP
,
thunk
)
);
}
dlls/winedos/module.c
View file @
9f9ac54a
...
...
@@ -197,6 +197,7 @@ static BOOL MZ_InitMemory(void)
TRACE
(
"Initializing DOS memory structures
\n
"
);
DOSMEM_MapDosLayout
();
DOSDEV_InstallDOSDevices
();
MSCDEX_InstallCDROM
();
return
TRUE
;
}
...
...
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