tsssgoofyandClaude Fable 5.2 8f856f8b85 README en inglés, créditos y aviso en dos idiomas
El README principal pasa a estar en inglés, con el estado real (primeras
pantallas de menú, con fallos), lo que hace falta para ejecutarlo y que
no está en el repositorio, y los créditos a los proyectos de los que
este aprende y de los que se ha portado código. El de español queda al
día en README.es.md.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
2026-12-01 13:31:07 +01:00

Lowtide VI

A from-scratch C++ layer for running an x64 console game on Windows, focused on one thing: replacing the graphics side with code written for PC Direct3D 12, instead of imitating the console underneath the game.

It is not a fork of any existing project. It is work in progress, it is full of bugs, and it may never get to a playable state. Nothing here is a promise.

Versión en español

Why

A console has one memory shared by the CPU and the GPU. A PC does not. Layers that make the game believe it is still on a console end up copying data between RAM and VRAM every frame to keep up the illusion, and that is where much of the memory use and frame time goes.

The idea here is different: the game runs natively, and the parts that talk to the graphics hardware are answered by a device written for PC. The rule is that every piece of data lives in RAM or on the GPU, never in both.

Where it stands

What works today, on an RTX 2080 SUPER (8 GB), i9-9900, 32 GB RAM:

  • Loads the game with its own loader and gives it control.
  • Answers what the game asks of the console: memory, files, disc reads (including BCPack textures), input, audio (silent), platform runtime.
  • A graphics device of its own. The game finishes creating it and submits its frames.
  • A real Direct3D 12 device underneath: the game's draw calls are executed on the GPU and the two planes it presents (scene and UI) are composited into its window.
  • The GPU reads the game's buffers in place, in the game's own memory, with no copies, when they live in page lots (OpenExistingHeapFromFileMapping).
  • Several of the engine's graphics functions replaced by ours and checked against the originals, call by call, on the first screens.

What you actually see: the first menu screens. That is all.

What is broken or missing:

  • Dynamic text is not drawn (views over memory the game places itself).
  • Samplers are placeholders.
  • The console's rectangle primitive is drawn as a single triangle.
  • Compute dispatches and mesh shaders are not executed.
  • Buffers that are not in page lots are still copied every frame.
  • It does not reach the game world.
  • No shader translator of its own: see below.

What you need to run it (and what is not here)

This repository contains no game files, no bytes of the game's executable, no decompiled code, no keys and no file listings. See NOTICE.md. You bring your own copy of the game.

It also needs data that is specific to one build of the game or that belongs to other projects, read at run time from a local/ folder that git ignores:

  • Translated shaders. Lowtide does not translate shaders. It reads a cache of already translated ones produced with the translator of the Whiplash project, and needs the fingerprint that cache was written with (shaders.tsv).
  • BCPack tables (bcpack-tables.bin), as used by the cool_fox project.
  • Per-build data for the engine replacements (port.tsv and the function names database built with the lt tool).

Without those it will load the game and stop early. This is a development tree, not a release.

Build

CMake 3.25 or later, Visual Studio with the x64 C++ compiler, and Git for Windows. The first configure downloads Zydis (the disassembler) at a pinned version.

cmake -S . -B build
cmake --build build --config Release
ctest --test-dir build -C Release --output-on-failure

Run

build\Release\lowtide.exe run <game executable> --seconds 120 --draw
Option What it does
--seconds <n> How long the game is left running before the report.
--draw Puts the real GPU under the graphics device. Without it the device only listens and counts.
--port verify / --port replace Runs our versions of the engine's graphics functions next to the originals and compares, or replaces them.
--keys "<s>:<key>,..." Scripted key presses for the keyboard gamepad.
--console s / x Which console the game is told it runs on.

Environment: LOWTIDE_D3D_DEBUG=1 turns on the Direct3D debug layer and prints its messages in the report; LOWTIDE_SHOTS=<n> saves a PNG of the window every n frames.

When the run ends it prints a report: where the game was, what it asked for, how many draws were executed, and how much game memory was read in place versus copied.

Layout

Path Contents
src/loader/ Loader: prepared copy, instruction rewriting, import rules and gateways
src/console/ What the game asks of the console
src/graphics/ The graphics device the game receives, and the GPU side under host/
src/port/ Engine functions replaced by ours; per-build data comes from local/
src/titledb/, tools/lt/ Function database and its tool
src/hook/ Code zone and hook manager
tools/guard/ Repository guard: refuses commits with what NOTICE.md forbids
docs/DISENO.md Design notes and log (Spanish)

Most comments and the design document are in Spanish.

Credits

Lowtide VI stands on what other people found out first. It is written from scratch, but not from nothing:

  • cool_fox (a Victory fork, GPL-3.0-or-later): what the game expects of each console function and graphics method was read there. The BCPack decoder (src/console/src/bcpack.cpp) is a port of its Rust implementation, and the console texture memory layout (src/graphics/src/texture_layout.*) reached this project through it.
  • Whiplash (a Victory fork): its shader translator produces the translated shaders this project runs, and the binding contract of those shaders and the cache format were read in its source.
  • Victory and Leonida, the projects those come from.
  • Xbox2Windows (R0Y00, MIT), consulted as a reference.
  • AMD addrlib, as distributed in Mesa (MIT): the texture addressing algorithm.
  • Zydis (MIT): disassembler, fetched by CMake.

If something of yours is used here and not credited properly, open an issue.

License

GPL-3.0-or-later. See LICENSE.

S
Description
From-scratch C++ layer for running an x64 console game on Windows, replacing its graphics side with PC Direct3D 12. Work in progress, no promises.
Readme GPL-3.0
625 KiB
0 Stars 1 Watchers 0 Forks
Languages
C++ 95.8%
CMake 2.5%
Shell 1.5%
Assembly 0.2%