D/Generation Source Port
D/Generation Source Port is a native PC port of D/Generation that adds a main menu, rebindable keys, and saved games.
- Type: PC port
- Game: D/Generation
- Runs on Windows and Linux
- By uosdwashi
- Latest release v1.0.0, 2026-11-07
- Source: https://github.com/uosdwashi/DGenerationPort
README
D/Generation — a source port
A native rebuild of D/Generation (Robert Cook, Mindscape, 1991) for Linux and Windows, written in C++23 with SDL3. The game was reverse engineered from its DOS program (the VGA version, 1.0) and reimplemented to play exactly as the original does: the same rooms, the same timing, the same sound and music on an emulated AdLib or the PC speaker, the same endings.
Around the game the port adds what a modern program should have: a main menu, settings changed in the game, keys that can be rebound, saved games in slots, the picture scaled to any window or the full screen at 4:3, smooth motion between the game's frames, and volume levels for the music, the effects and the menu. None of it changes how the game plays.
The game's files are not included. The port needs a copy of the original D/Generation (the DOS version 1.0, with its VGA graphics): its pictures, rooms, sounds and text are read from that copy as the game starts.
Playing
Download the package for your system from the releases and unpack it anywhere:
- Linux (x86-64, glibc 2.38 or later, 2023's distributions onwards):
dgen-1.0.0-linux-x86_64.tar.gz - Windows (10 and 11, 64-bit):
dgen-1.0.0-windows-x86_64.zip
Then copy the original game's files into the GameData folder beside dgen: everything in
the folder DGENVGA.EXE is in, with its DATA and VGA folders (GameData/README.txt says
more). Start dgen (dgen.exe on Windows). If something is missing or damaged, it says which
files.
Everything the game writes stays in its folder: the settings in dgen.ini, made on the first
run, and the saved games in Saves. The folder can be moved or copied as a whole.
Keys
These are the defaults; every one can be changed in Options › Controls or in dgen.ini.
| Key | Action |
|---|---|
| Arrows | Move straight |
| Keypad 7/9/1/3, Home/PgUp/End/PgDn, or two arrows | Move along the room's axes |
| Space | Fire the laser |
| T | Throw a grenade |
| U | Items (left/right pick, Return uses, Escape closes) |
| Return | Speak to the person in sight (arrows pick a question, Return asks) |
| S | Show the status |
| P, Pause | Pause |
| Escape | The main menu |
| F1 | Options |
| Alt+Return, F11 | Window or full screen |
| Ctrl+S | Sound off and on |
| Alt+S, Alt+R | Save the game as it was on reaching the floor, and restore it (as the original) |
| Ctrl+A, Ctrl+R | Restart the room with a life less; go back to the floor's start |
| Ctrl+Q | Quit |
The menu
The main menu comes up on the title card: New Game, Load Game, Options, Help and Quit. In a
game, Escape brings it up over the waiting game, with Resume and Save Game. Games are saved in
eight slots besides the quick save of Alt+S; a save holds what the original's SAVE.DAT holds,
so a game loaded starts again at the start of its floor. Left alone at the menu for a minute,
the title's pictures and demos play.
Options has the display (full screen, 4:3 or square pixels, fitting the window or whole
multiples only, the filter, smooth motion), the sound's levels and the keys. Changes take effect
at once and are written to dgen.ini, which explains every setting and keeps your comments.
The command line
dgen [<game-folder>] [--scene <n>] [--entry <slot>] [--armed] [--demo <n>] [--speaker]
[--quiet] [--scale <n>] [--save <file>] [--config <file>]
[--frames <n>] [--dump <folder>] [--wav <file>]
<game-folder> plays a copy of the game from elsewhere instead of GameData. --scene starts
in that room (--entry at one of its entry points, --armed with the laser and grenades),
--demo plays attract demo 0 or 1, --speaker plays the sound on the PC speaker instead of the
AdLib, and --quiet starts with the sound off, as the original's -q. --frames runs that
many frames as fast as they go and stops; with --dump it writes each frame as a picture and
with --wav the sound to a file, which together allow runs without a display
(SDL_VIDEO_DRIVER=offscreen).
Building
Needs CMake 3.25 or later, a C++23 compiler (GCC 14 or later, or a recent Clang) and SDL 3.4 or later.
cmake --preset release
cmake --build --preset release
build/release/src/app/dgen <game-folder>
The release packages are made with packaging/build-release.sh linux and
packaging/build-release.sh windows, on Linux: the script builds SDL from its source release,
then the game against it (cross-compiled with MinGW-w64 for Windows), and packs the folder the
player unpacks. cmake --install <build> --prefix <folder> makes the same folder without
packing it.
| Path | What it holds |
|---|---|
src/data/ | Reading the original's files: palettes, pictures, sprite banks, rooms, the map, demos |
src/render/ | Drawing into 256-colour pictures: rooms' backgrounds |
src/game/ | The game: the room and every kind of thing in it (entities/), people and talk, terminals, the story, the status bar and the game's text |
src/audio/ | The sound: the AdLib driver reimplemented, the PC speaker, the OPL chip, the mixer |
src/assets/ | Finding and checking a copy of the game, and loading it |
src/app/ | The play session, the title and the demos, and main |
src/platform/ | The port's own layer: settings, controls, the menu, saved games, where things are kept |
src/shell/ | The SDL front end: the window, the sound device, the keys and the frame loop |
packaging/ | The release folder and packages, the MinGW toolchain |
third_party/ | Nuked OPL3 and the Modern DOS 8x8 font (below) |
Licence
Copyright © 2026 Bloog.
The port is free software: you can redistribute it and change it under the terms of the GNU General Public License, version 3 or (at your option) any later version. It comes with no warranty. See LICENSE.
It is built with:
- SDL 3, zlib licence (
packaging/licenses/SDL3.txt), shipped beside the game in the packages; - Nuked OPL3 1.8 by Nuke.YKT, LGPL 2.1 or later
(
third_party/nuked-opl3/LICENSE), the YMF262 emulator the AdLib plays on, with one change, marked in its source: the chip keeps each channel's share of its output, for the mixer; - Modern DOS 8x8 by Jayvee Enaguas, CC0 1.0, from which the 8x8 font of the DOS prompt was made.
D/Generation was written by Robert Cook and published by Mindscape in 1991; the game, its files and its text belong to their rights holders. This port is an independent project, not connected with them, and contains none of the game: it reads a copy the player owns.