|
1 | | -# doomgeneric |
2 | | -The purpose of doomgeneric is to make porting Doom easier. |
3 | | -Of course Doom is already portable but with doomgeneric it is possible with just a few functions. |
4 | | -The limitation is there is no sound! |
| 1 | +# DoomGeneric NTNative |
| 2 | +This is a fork of ozkl's DoomGeneric which adds port to the BootExecute environment of Windows XP and later. |
5 | 3 |
|
6 | | -To try it you will need a WAD file (game data). If you don't own the game, shareware version is freely available (doom1.wad). |
| 4 | +# Requirements for building DoomGeneric NTNative |
| 5 | +1. Visual Studio 2017 Windows XP toolset. |
| 6 | +2. InbvShim (https://github.com/Cacodemon345/inbvbootdrv). |
| 7 | +3. Windows 7 DDK (for building InbvShim and ntdll.lib). |
7 | 8 |
|
8 | | -# porting |
9 | | -Create a file named doomgeneric_yourplatform.c and just implement these functions to suit your platform. |
10 | | -* DG_Init |
11 | | -* DG_DrawFrame |
12 | | -* DG_SleepMs |
13 | | -* DG_GetTicksMs |
14 | | -* DG_GetKey |
| 9 | +# Building |
| 10 | +Note: Only 32-bit Debug builds are supported, anything else is broken. |
| 11 | +Copy over the ntdll.lib file from \path\to\WinDDK\7600.16385.1\lib\wxp\i386\ to the doomgeneric directory inside the project. Open the solution, right click "doomgeneric_nt" and select "Build". |
15 | 12 |
|
16 | | -|Functions |Description| |
17 | | -|---------------------|-----------| |
18 | | -|DG_Init |Initialize your platfrom (create window, framebuffer, etc...). |
19 | | -|DG_DrawFrame |Frame is ready in DG_ScreenBuffer. Copy it to your platform's screen. |
20 | | -|DG_SleepMs |Sleep in milliseconds. |
21 | | -|DG_GetTicksMs |The ticks passed since launch in milliseconds. |
22 | | -|DG_GetKey |Provide keyboard events. |
23 | | -|DG_SetWindowTitle |Not required. This is for setting the window title as Doom sets this from WAD file. |
| 13 | +# Building InbvShim |
| 14 | +From the x86/x64 Free Build Environment, cd to the directory where you have cloned InbvShim repository, and type 'build' to build the driver. You will find the inbvbootdrv.sys file in the objfre_wxp_x86 (objfre_win7_x64 if building for x64) folder. |
24 | 15 |
|
25 | | -# platforms |
26 | | -I have ported to Windows, X11, and Soso. Just look at (doomgeneric_win.c or doomgeneric_xlib.c). |
| 16 | +# Installing InbvShim |
| 17 | +Copy it to your system32\Drivers directory of your Windows installation. And then grab the inbvbootdrvinst.reg from one of the releases and double-click it to install. |
27 | 18 |
|
28 | | -Note that X11 port is not efficient since it generates pixmap by XDrawPoint. It can be further improved by using X11 extensions. |
| 19 | +# Installing DoomGeneric NTNative |
| 20 | +Copy doomgeneric_nt.exe to C:\Windows\system32\ directory. |
| 21 | +There are two ways of launching it: |
| 22 | +1. Registry modification: |
| 23 | +**WARNING:** Backing up the registry is very important before going down this path. |
| 24 | +Open Registry Editor (regedit), go to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\. Double-click BootExecute. |
29 | 25 |
|
30 | | -## SDL |
| 26 | +Replace this: |
| 27 | +``` |
| 28 | +autocheck autochk * |
| 29 | +``` |
31 | 30 |
|
32 | | - |
| 31 | +with: |
| 32 | +``` |
| 33 | +autocheck autochk * |
| 34 | +doomgeneric_nt -iwad \??\C:\Windows\doom2.wad -cdrom |
| 35 | +``` |
33 | 36 |
|
34 | | -## Windows |
35 | | - |
| 37 | +Replace \??\C:\Windows\doom2.wad with the location where the IWAD is installed (remember to prefix it with \??\ before the full path). |
36 | 38 |
|
37 | | -## X11 - Ubuntu |
38 | | - |
| 39 | +Note that I don't recommend this way because it can make input non-functional, making it impossible to quit the program and requiring a hard reset. |
39 | 40 |
|
40 | | -## X11 - FreeBSD |
41 | | - |
| 41 | +2. Native Shell (assuming you installed it beforehand): |
| 42 | +cd to the directory where DoomGeneric NTNative is installed and type: |
| 43 | +``` |
| 44 | +doomgeneric_nt.exe -iwad \??\path\to\iwad.wad -cdrom |
| 45 | +``` |
| 46 | + |
| 47 | +Replace \path\to\ with the location where the IWAD is installed. |
| 48 | + |
| 49 | +# Extra bonuses: |
| 50 | +1. 16-color mode for Windows GDI port activated with -4bit option. |
| 51 | + |
| 52 | +# Bugs: |
| 53 | +1. Savegames are broken. |
| 54 | +2. Picking a weapon crashes the program (bug inherited from original DoomGeneric). |
| 55 | + |
| 56 | +# License: |
| 57 | +Same as original DoomGeneric, except for some files: |
| 58 | + |
| 59 | +i_main_nt.c: ReactOS project license. |
| 60 | +doomgeneric_nt.c: Uses code both from ZenWINX and Native Shell (LGPL). |
| 61 | +Bundled NDK: Used under the terms of GPLv2. |
0 commit comments