170 lines
3.7 KiB
NASM
170 lines
3.7 KiB
NASM
; RetroNFS95 VxD control stub.
|
|
;
|
|
; This file intentionally does not include the Win98 DDK vmm.inc. The stock
|
|
; DDK macro layer uses old MASM concatenation forms that JWasm rejects. The
|
|
; stub below defines only the constants, DDB layout, segments, and dispatcher
|
|
; glue RetroNFS95 needs.
|
|
|
|
PAGE 58,132
|
|
TITLE RETROCTRL - RetroNFS95 VxD Control Dispatch
|
|
|
|
.386p
|
|
OPTION CASEMAP:NONE
|
|
|
|
RETROVXD_DEVICE_ID EQU 03F42h
|
|
RETROVXD_MAJOR EQU 1
|
|
RETROVXD_MINOR EQU 0
|
|
DDK_VERSION EQU 040Ah
|
|
UNDEFINED_INIT_ORDER EQU 080000000h
|
|
DDB_DYNAMIC_VXD EQU 08000h
|
|
|
|
SYS_DYNAMIC_DEVICE_INIT EQU 001Bh
|
|
SYS_DYNAMIC_DEVICE_EXIT EQU 001Ch
|
|
W32_DEVICEIOCONTROL EQU 0023h
|
|
DEVICE_LOAD_OK EQU 0
|
|
|
|
VxD_Desc_Block STRUC
|
|
DDB_Next DD ?
|
|
DDB_SDK_Version DW ?
|
|
DDB_Req_Device_Number DW ?
|
|
DDB_Dev_Major_Version DB ?
|
|
DDB_Dev_Minor_Version DB ?
|
|
DDB_Flags DW ?
|
|
DDB_Name DB 8 DUP (?)
|
|
DDB_Init_Order DD ?
|
|
DDB_Control_Proc DD ?
|
|
DDB_V86_API_Proc DD ?
|
|
DDB_PM_API_Proc DD ?
|
|
DDB_V86_API_CSIP DD ?
|
|
DDB_PM_API_CSIP DD ?
|
|
DDB_Reference_Data DD ?
|
|
DDB_Service_Table_Ptr DD ?
|
|
DDB_Service_Table_Size DD ?
|
|
DDB_Win32_Service_Table DD ?
|
|
DDB_Prev DD ?
|
|
DDB_Size DD ?
|
|
DDB_Reserved1 DD ?
|
|
DDB_Reserved2 DD ?
|
|
DDB_Reserved3 DD ?
|
|
VxD_Desc_Block ENDS
|
|
|
|
EXTRN _RETROVXD_Dynamic_Init@0:NEAR
|
|
EXTRN _RETROVXD_Dynamic_Exit@0:NEAR
|
|
EXTRN _RETROVXD_W32_DeviceIoControl@16:NEAR
|
|
|
|
_LTEXT SEGMENT DWORD PUBLIC USE32 'LCODE'
|
|
ASSUME CS:FLAT, DS:FLAT, ES:FLAT, SS:FLAT
|
|
|
|
PUBLIC RETROVXD_Control
|
|
RETROVXD_Control PROC NEAR
|
|
cmp eax, SYS_DYNAMIC_DEVICE_INIT
|
|
je short control_dynamic_init
|
|
|
|
cmp eax, SYS_DYNAMIC_DEVICE_EXIT
|
|
je short control_dynamic_exit
|
|
|
|
cmp eax, W32_DEVICEIOCONTROL
|
|
je short control_w32_deviceiocontrol
|
|
|
|
clc
|
|
ret
|
|
|
|
control_dynamic_init:
|
|
call _RETROVXD_Dynamic_Init@0
|
|
cmp eax, 1
|
|
ret
|
|
|
|
control_dynamic_exit:
|
|
call _RETROVXD_Dynamic_Exit@0
|
|
cmp eax, 1
|
|
ret
|
|
|
|
control_w32_deviceiocontrol:
|
|
push esi
|
|
push edx
|
|
push ebx
|
|
push ecx
|
|
call _RETROVXD_W32_DeviceIoControl@16
|
|
clc
|
|
ret
|
|
RETROVXD_Control ENDP
|
|
|
|
PUBLIC _RETROVXD_IFSMgr_Register@4
|
|
_RETROVXD_IFSMgr_Register@4 PROC NEAR
|
|
push ebp
|
|
mov ebp, esp
|
|
mov edx, [ebp+8]
|
|
int 20h
|
|
DD 00400001h
|
|
jc short ifsmgr_register_failed
|
|
mov eax, 1
|
|
jmp short ifsmgr_register_done
|
|
ifsmgr_register_failed:
|
|
xor eax, eax
|
|
ifsmgr_register_done:
|
|
pop ebp
|
|
ret 4
|
|
_RETROVXD_IFSMgr_Register@4 ENDP
|
|
|
|
PUBLIC _RETROVXD_IFSMgr_Deregister@4
|
|
_RETROVXD_IFSMgr_Deregister@4 PROC NEAR
|
|
push ebp
|
|
mov ebp, esp
|
|
mov edx, [ebp+8]
|
|
int 20h
|
|
DD 00400002h
|
|
jc short ifsmgr_deregister_failed
|
|
mov eax, 1
|
|
jmp short ifsmgr_deregister_done
|
|
ifsmgr_deregister_failed:
|
|
xor eax, eax
|
|
ifsmgr_deregister_done:
|
|
pop ebp
|
|
ret 4
|
|
_RETROVXD_IFSMgr_Deregister@4 ENDP
|
|
|
|
_LTEXT ENDS
|
|
|
|
_LDATA SEGMENT DWORD PUBLIC USE32 'LCODE'
|
|
PUBLIC RETROVXD_DDB
|
|
RETROVXD_DDB LABEL BYTE
|
|
DD 0
|
|
DW DDK_VERSION
|
|
DW RETROVXD_DEVICE_ID
|
|
DB RETROVXD_MAJOR
|
|
DB RETROVXD_MINOR
|
|
DW DDB_DYNAMIC_VXD
|
|
DB "RETROVXD"
|
|
DD UNDEFINED_INIT_ORDER
|
|
DD OFFSET RETROVXD_Control
|
|
DD 0
|
|
DD 0
|
|
DD 0
|
|
DD 0
|
|
DD 0
|
|
DD 0
|
|
DD 0
|
|
DD 0
|
|
DD 'Prev'
|
|
DD SIZEOF VxD_Desc_Block
|
|
DD 'Rsv1'
|
|
DD 'Rsv2'
|
|
DD 'Rsv3'
|
|
_LDATA ENDS
|
|
|
|
_RCODE SEGMENT WORD PUBLIC USE16 'RCODE'
|
|
ASSUME CS:_RCODE, DS:_RCODE, ES:_RCODE, SS:_RCODE
|
|
|
|
PUBLIC RETROVXD_Real_Init
|
|
RETROVXD_Real_Init PROC NEAR
|
|
xor bx, bx
|
|
xor si, si
|
|
xor edx, edx
|
|
mov ax, DEVICE_LOAD_OK
|
|
ret
|
|
RETROVXD_Real_Init ENDP
|
|
|
|
_RCODE ENDS
|
|
|
|
END RETROVXD_Real_Init
|