Skip to content

Commit

Permalink
fix vdd export and use ntvdm dos version number
Browse files Browse the repository at this point in the history
  • Loading branch information
cracyc committed Nov 16, 2024
1 parent b8b473c commit 1769014
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
12 changes: 6 additions & 6 deletions msdos.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12918,8 +12918,8 @@ inline void msdos_int_21h_30h()
CPU_BX = 0xff00; // OEM = Microsoft
}
CPU_CX = 0x0000;
CPU_AL = dos_major_version; // 7
CPU_AH = dos_minor_version; // 10
CPU_AL = dos_major_version; // 5
CPU_AH = dos_minor_version; // 50
}

inline void msdos_int_21h_31h()
Expand Down Expand Up @@ -12983,9 +12983,9 @@ inline void msdos_int_21h_33h()
CPU_DL = (UINT8)drive;
break;
case 0x06:
// MS-DOS version (7.10)
CPU_BL = 7;
CPU_BH = 10;
// MS-DOS version (5.50)
CPU_BL = 5;
CPU_BH = 50;
CPU_DL = 0;
#ifdef SUPPORT_HMA
CPU_DH = 0x00;
Expand Down Expand Up @@ -24626,7 +24626,7 @@ __declspec(dllexport) void WINAPI VDDDeInstallIOHook(HANDLE hvdd, WORD cPortRang
return;
}

__declspec(dllexport) BYTE *WINAPI MGetVDMPointer(DWORD addr, DWORD size, BOOL protmode)
__declspec(dllexport) BYTE *WINAPI MGetVdmPointer(DWORD addr, DWORD size, BOOL protmode)
{
return mem + (DWORD)(HIWORD(addr) << 4) + LOWORD(addr);
}
Expand Down
4 changes: 2 additions & 2 deletions msdos.h
Original file line number Diff line number Diff line change
Expand Up @@ -1118,8 +1118,8 @@ typedef struct {
HANDLE find_handle;
} dtainfo_t;

UINT8 dos_major_version = 7; // Windows 98 Second Edition
UINT8 dos_minor_version = 10;
UINT8 dos_major_version = 5; // Windows NT
UINT8 dos_minor_version = 50;
UINT8 win_major_version = 4;
UINT8 win_minor_version = 10;

Expand Down
2 changes: 1 addition & 1 deletion ntvdm.def
Original file line number Diff line number Diff line change
Expand Up @@ -83,4 +83,4 @@ EXPORTS
setOF = msdos.exe.setOF
VDDInstallIOHook = msdos.exe.VDDInstallIOHook
VDDDeInstallIOHook = msdos.exe.VDDDeInstallIOHook
MGetVDMPointer = msdos.exe.MGetVDMPointer
MGetVdmPointer = msdos.exe.MGetVdmPointer

0 comments on commit 1769014

Please sign in to comment.