PORTCLUB
Cabecera de testdrive enhanced
Port nativo

testdrive enhanced

Port nativo de testdrive enhanced para PC.

testdrive enhanced

Port nativo basado en su ficha de origen.

README del repositorio

Test Drive Enhanced — SDL3

An enhanced version of the EGA Test Drive (1987) by Accolade / Distinctive Software, running natively on SDL3. The game itself is the faithful C reimplementation from test-drive-sdl3, so driving, traffic, police and the game flow work as in the original. The view through the windscreen is redrawn at a higher resolution, further draw distance and 60 fps. Parts of the Amiga release can be mixed in: its intro, menus, cockpits, music, road, sky, cliffs, signs, traffic and police (see Amiga features). It is not an emulator - the original data is not redistributed, and you need to get it yourself.

How to play (Windows)

You need the files of the original DOS Test Drive. They are not included.

  1. Open the latest release and download testdrive-enhanced-…-win64.zip.

  2. Put your original game files in a folder named Game.

  3. Open the zip. Copy everything inside its testdrive-enhanced-…-win64 folder into the folder that holds Game, so that testdrive-enhanced.exe sits next to Game:

    Test Drive\
    ├── Game\                    <- your original game files (TDEGA.EXE, CARS.TXT, SCORES, ...)
    ├── Game Amiga\              <- optional: the Amiga disk image (.adf), for the Amiga features
    ├── Test Drive Enhanced.exe  <- the launcher
    ├── testdrive-enhanced.exe   <- the game
    ├── SDL3.dll
    ├── libiconv-2.dll
    └── (the other files from the zip)
    
  4. Double-click Test Drive Enhanced.exe, choose PC or Amiga and the options, and press Play (or start testdrive-enhanced.exe directly).

Keep the folder somewhere you can save files, such as Documents or the Desktop, not Program Files. The game saves its high scores in Game. If Windows says "Windows protected your PC", click More info, then Run anyway. Press Alt+Enter for fullscreen. The keys are listed under Controls. If driving stutters on an older PC, see --res-scale under Run.

Requirements

  • Your game files in a folder. The game needs TDEGA.EXE, CARS.TXT, SCORES, TDSND.SND, the *.PES archives and the car *.BIN / *.SS files. By default it looks in Game under the working directory.
  • For the Amiga features, the Amiga release's disk too: the .adf, a folder holding it, or a folder with the files from it (default Game Amiga).
  • CMake 3.24+, a C11 compiler and SDL 3. The launcher needs a C++17 compiler and wxWidgets 3.2 (it is left out when wxWidgets isn't found, or with -DTDE_LAUNCHER=OFF).
  • A multi-core CPU for the default resolution. Rendering is split across all cores.

Build

From the repository root, in Git Bash or an MSYS2 MinGW64 shell:

export PATH="/c/msys64/mingw64/bin:$PATH"
cmake -S . -B build -G Ninja -DCMAKE_C_COMPILER=gcc -DCMAKE_BUILD_TYPE=Release
cmake --build build

A Makefile wraps the same commands if you prefer: make build, make check, make run, make clean, and make syntax to compile-check the sources without linking. make help lists every target with its options. Git Bash has no make; use MSYS2's mingw32-make.

Run

./build/testdrive-enhanced.exe --game-dir Game

Or make run GAME_DIR=Game SCALE=3.

OptionMeaning
--game-dir DIRFolder with the original game files (default Game)
--scale NInitial window size as a multiple of 320×240 (default 3)
--res-scale NOutput resolution as a multiple of 320×200 (default 4 = 1280×800, range 1–8; lower it on slower CPUs)
--frame-rate FPSDrawing rate while driving (default 60, 0 = unpaced)
--sprite-detail max|autoSprite sizes: max (default) the most detailed sprite everywhere, auto chosen by distance
--bios-keysOriginal keyboard behaviour for driving: keys act only through key repeat (see below)
--fullscreenStart in full screen
--keys NAME=CODE,...Key bindings while driving (the launcher's Game settings > Key Bindings; names in src/keybind.c)
--amiga LISTAmiga features: all, or any of intro,menu,dashboards,music,projection,sky,cliffs,traffic,cops,wide-roads,signs
--amiga-disk PATHThe Amiga disk: the .adf, a folder holding it, or a folder with its files (default Game Amiga)
--checkVerify TDEGA.EXE loads and exit, without opening a window

Alt+Enter toggles fullscreen. The window keeps the 4:3 aspect of a 200-line EGA monitor.

Launcher

Test Drive Enhanced.exe starts the game with the options chosen in its window: the version (PC, or Amiga with the Amiga features to mix in), the game folders, the window, and under Game settings the Graphics (resolution, sprite detail, frame rate) and the Key Bindings. See launcher/README.md.

Amiga features

The Amiga release of Test Drive runs on the same roads, but draws and plays them differently. With --amiga (the launcher's Amiga version) any mix of these replaces the DOS game's own; the Amiga disk is read for its pictures, shapes, songs and program. The game underneath stays the DOS one.

  • Intro: the Amiga title sequence (Accolade, the car driving off, the logo).
  • Menu: the Amiga showroom to choose the car, and its "play again / new car" menu.
  • Dashboards: each car's Amiga cockpit, its dashboard, gauges, steering wheel, gear knob, roof, window post, hood and mirror frame; the road fills the screen above it.
  • Music: the Amiga songs, played on an emulated Paula, for the intro, the showroom, the gas station, the high scores and the ending.
  • Projection: the road's shape as the Amiga draws it: rows further apart with distance, bends turning half as fast and up to 90 degrees, crests that build up with distance.
  • Sky: the Amiga's blue sky with four clouds drifting and turning with the road, instead of the mountains.
  • Cliffs: the brown rock face, with the slant of the Amiga's cliff edge.
  • Traffic: the cars drive at the speed limit, the RX-7 a quarter faster, at their own speeds before the first sign of a stage, and slower in the outer lane of a wide road.
  • Cops: a radar trap goes off at more than 15 mph over the limit; the patrol car starts further back at a steady 108 mph (4 mph more each stage), tails you, passes and stops you, but never near the end of a stage.
  • Wide roads: the passing lanes of stages 1 and 2, which the DOS version leaves out: the road widens to the right with lane marks and a solid centre line, the slow traffic keeps to the outer lane, and you can pass in the inner one.
  • Signs: the Amiga's signs and posts, with its speed limits of 30, 55 and 65 mph, and the passing-lane and merge signs.

Controls (from the original)

  • Arrow keys / numeric keypad: steer, accelerate, brake and shift through the gear gate, as in the original.
  • Esc: quit the current drive or menu.
  • Ctrl-J / Ctrl-K: joystick / keyboard control. A connected gamepad acts as the joystick (left stick or D-pad, A = fire).
  • Ctrl-Q / Ctrl-S: sound off / on.
  • The launcher's Game settings > Key Bindings moves the driving and game keys to others.

Changes from original

Road view

  • Resolution: the road is drawn at 4× the original resolution by default, with smoothed edges. The cockpit, mirror and sprites keep their original pixel art, scaled up.
  • Draw distance: 120 road rows instead of 40. The road and cliffs get lighter and hazier in the distance.
  • Smooth motion: 60 fps instead of 8. The road, the traffic and the scenery move continuously instead of stepping with the simulation, and steering drift is smoothed. The rows nearest the car keep straight edges.
  • Horizon: on the open side, a horizon below eye level with mountains above it and a valley floor below it that moves as you drive. A hillside falls away under the left road edge, so on left bends the far road sits on its own slope.
  • Cliff: the original's plain rock face, with the slant of its cliff-edge sprite, reaching the top of the window. Its outline is notched, like the hillside's on the open side. The grass mounds at its foot are always green. The original's colour depended on what was behind them.
  • Objects: signs, poles, traffic and the police car are scaled smoothly with distance and always use their largest, most detailed sprite, without sparkling in the distance. They are hidden behind hill crests and the cliff, and traffic that appears in the distance fades in.
  • Distance and time in the top right, in Test Drive II's style: miles left to the end of the stage and the stage clock, counting the same seconds the results screen shows.
  • Kept from the original: the mirror, dashboard, speeding ticket, "Pulling into…" messages, windscreen cracks and GAME OVER.

Game (from the faithful port)

  • Held-key driving: arrows / keypad and A / Z are read while held, not only through key repeat (--bios-keys restores the original).
  • Speedometer: the needle follows the car past 160 mph. The original stops it at 160, although the Countach and Testarossa reach about 172 and 175 mph and their dials go to 200.
  • Timing: the gear-shift panel close delay and the windscreen crash animation keep the original 8 fps timing. The driving model is unchanged. For example, the brake does nothing while the tyres are skidding, as in the original.
  • Removed: copy protection, the TD.EXE launcher password, and Hercules / CGA modes.
  • Missing SCORES: starts with an empty table instead of exiting.
  • Extended-ASCII keys: ignored instead of crashing.
  • Key bindings: the driving and game keys can be moved to others (--keys).

Layout

See ENGINE.md for the architecture and the rules the engine follows. In short:

  • src/enhanced/ holds the enhanced road renderer, the screen overlay and the distance and time readout.
  • src/mem.* emulates the real-mode address space the game ran in.
  • src/host.* wraps SDL3 and runs the render worker threads.
  • src/platform/ holds the EGA graphics, timer/sound, input and resource layers.
  • src/game/ holds game flow, scene rendering and simulation; flow_amiga.c and sim_amiga.c the Amiga features of the flow and the simulation.
  • src/amiga/ holds the Amiga release's engine from test-drive-sdl3 (its globals renamed by anames.h), with a host on top of this game's (ahost.c) and the parts the Amiga features use (abridge.h, aimage.c).
  • launcher/ holds the wxWidgets launcher.

Reverse-engineering tools, specs and file formats are in test-drive-sdl3.

License

MIT, see LICENSE. Test Drive and its data belong to their respective owners.

The Amiga engine draws its text with a recreation of the Amiga's topaz.font:

The FontStruction "Amiga Topaz" (https://fontstruct.com/fontstructions/show/675155) by Patrick H. Lauke is licensed under a Creative Commons Attribution license (http://creativecommons.org/licenses/by/3.0/).

It is rasterised to 8x8 cells in src/amiga/font8.c (the only change made to it); the font archive and its licence are in licenses/amiga-topaz/.

Support

https://buymeacoffee.com/krzysztofkania

Comentarios (0)

Inicia sesión para dejar un comentario.

Sé el primero en comentar sobre este juego.