Until Dawn - native PC port (unofficial)         WORK-IN-PROGRESS TEST RELEASE 0.1.5 (build t119)
==========================================================================================================

This program runs the PlayStation 4 game Until Dawn natively on Windows. The game's own x86-64 code runs directly
on your CPU; this program supplies the PS4 system functions and a Vulkan renderer that translates the game's
graphics. It is NOT an emulator, NOT a remaster, and contains NO game files: you need your own legally obtained
copy of the game.

THIS IS STILL AN EARLY WORK-IN-PROGRESS TEST BUILD. Expect graphical bugs, crashes, slowdowns and hardware
compatibility problems. The whole game was played through from start to finish on the developer's PC with 0.1.3;
0.1.4 and 0.1.5 have so far been tested in shorter sessions. Other players have run it on NVIDIA and AMD hardware
since 0.1.2; please report what you find (see "Reporting problems"). The main cause of crashes (game memory
that is occasionally overwritten) is NOT fixed yet.

What is new in 0.1.5
  0.1.5 is about memory use, shorter shader-compilation freezes and less work for the renderer. The picture is
  meant to be the same as in 0.1.4: every shader is translated exactly as in 0.1.4, and test frames replayed
  with every test build matched the build before it (within the small run-to-run differences the GPU itself
  shows). Changes (measured on the developer's PC, RTX 3090 Ti,
  Core i9-12900KF, 64 GB, on the same test route through the prologue):
  - Much less memory. In RAM at most about 8.2 GB instead of 12.7 GB, committed memory at most about 17 GB
    instead of 22 GB, and the game's memory no longer grows by several hundred MB during play. The game's
    many small memory heaps are committed in steps as the game uses them, the translated shader programs are
    freed or kept
    compressed once the graphics driver has its own copy, and the shader translator's memory is packed.
  - Video memory: the renderer's buffer copies and memory mirror are now sized to your graphics card (a quarter
    and an eighth of its video memory) instead of a fixed 6 GB and 3 GB on every card.
  - Shorter shader-compilation freezes: compute shaders are now compiled on several CPU threads, like the other
    shaders (before: one after another, which made freezes of 30 seconds and more on some PCs). On the
    developer's PC, with no shader cache, the time spent waiting for compiles in two test scenes fell by 16% and
    24%.
  - Less renderer work per frame: settings that did not change between two draws are no longer sent to the
    graphics driver again (about 3% less renderer time), and the per-frame check for memory the game has written
    is cheaper (about 0.3-0.4 ms less per frame in play).
  - When the game moves a texture in memory, the copy already in video memory is reused instead of uploading it
    again (about 1.3 GB less uploading on the test route).
  - Textures that lie across two neighbouring blocks of game memory are no longer refused (their smallest
    detail levels could be missing).
  - The log now reports memory use every 60 seconds and at exit, which helps with crash and memory reports.
  Frame rates are similar to 0.1.4, slightly better in places; the heaviest scenes still run below 30 fps.
  These changes have only been played on the developer's PC (NVIDIA). Nothing in them is written for one GPU
  make, but they have not been tested on AMD or Intel graphics yet.

  Updating from 0.1.4: copy the new UntilDawn.exe and the text files into your 0.1.4 folder (do NOT overwrite
  Config\settings.ini, savedata\ or Game\ - they hold your settings, saves and game). Or extract 0.1.5 to a new
  folder and copy your settings.ini, savedata and game files over. Saves and settings work as they are; there
  are no new settings. compat\ is the same as in 0.1.4. The shader cache (Cache\) from 0.1.4 stays valid,
  because the translated shaders are the same. From 0.1.3: the same, and also copy compat\ud_compat.exe.
  From 0.1.2: the same, but the shader cache is rebuilt once (the first-run freezes return once).

This project is not affiliated with, endorsed or supported by Sony Interactive Entertainment or Supermassive
Games. "Until Dawn" and "PlayStation" are trademarks of their owners. Do not ask for, share or upload game files.


1. What you need
----------------
  - A decrypted dump of Until Dawn for PS4, title CUSA02636, with the 01.03 update applied, made from your own
    LEGALLY OBTAINED copy of the game, in a folder on your PC. Nothing of the game is included here, and this
    program does not decrypt anything.
      * Exactly CUSA02636 with the 01.03 update: the program checks the game's executables by checksum and will
        tell you if the version or region does not match.
  - Windows 10 or 11, 64-bit.
  - CPU: Intel Core from 2013 (Haswell) or newer, or AMD Ryzen (or Excavator) or newer. The game's code needs
    AVX, F16C, BMI1, LZCNT, POPCNT and MOVBE; older Pentium/Celeron and pre-Ryzen AMD CPUs cannot run it.
  - Memory: 16 GB recommended (the program warns below 12 GB). Keep Windows' page file switched on (the
    default, "System managed"): the graphics driver reserves memory for the game beyond what is in RAM.
  - Graphics: a GPU with a current Vulkan 1.3 driver.
      * NVIDIA (GTX 900 series / Maxwell or newer) - tested in full on an RTX 3090 Ti (0.1.3; 0.1.4 and 0.1.5
        played on the same card); the compatibility test also passed on RTX 3060 Ti, 3080, 3090, 5070 and 5070
        Laptop GPUs; players have run 0.1.4 on a GTX 1660 Ti and an RTX 5050 Laptop GPU.
      * AMD Radeon (RX 400 / GCN 4, RX 5000 / RDNA or newer, 2022 or newer driver) - 0.1.3 played on an
        RX 9070 XT and renders the same as on NVIDIA there; 0.1.4 and 0.1.5 not yet tested on AMD.
      * Intel Arc, or Intel integrated graphics Gen9+ with a 2022 or newer driver - UNTESTED.
      * Laptops with two GPUs (for example NVIDIA + AMD or Intel integrated graphics): see KNOWN_ISSUES.txt,
        "Laptops with two graphics chips".
  - About 50 GB of disk space for the game files, plus up to 1 GB for the shader cache.
The program checks the CPU and the graphics card when it starts and tells you in plain words if something is
missing. compat\run_compat.bat checks your PC without starting the game (see 6.).


2. Installing
-------------
  (this folder)\
    UntilDawn.exe          <- double-click to play
    Config\settings.ini    <- settings (recreated with defaults if you delete it)
    Game\                  <- put the extracted game here (or set game_dir in settings.ini)
    compat\                <- hardware compatibility test (run_compat.bat)
    README.txt, CHANGELOG.txt, Controls.txt, KNOWN_ISSUES.txt, THIRD_PARTY_NOTICES.txt

  Created by the program when it runs (you do not need to make them):
    Logs\                  <- UntilDawn.log (this session), the logs of the last five sessions, diagnostics
    Cache\                 <- compiled shaders for your graphics card (rebuilt automatically if deleted)
    savedata\              <- your saves (back this folder up if you care about your progress)
    temp0\                 <- the game's temporary data

Step 1. Unpack this folder anywhere you can write to (not inside "Program Files"), e.g. D:\Games\UntilDawn_WIP.
        The program writes its settings, logs, shader cache and saves inside this folder.

Step 2. Give it the game files - one of these three:
  a) Copy your extracted game into the Game folder, so that Game\eboot.bin exists. Or
  b) Leave the game where it is and enter its folder in Config\settings.ini:
         game_dir = D:\PS4\CUSA02636
  c) Or link the folder instead of copying it: delete the Game folder (it only holds a note), then open a
     command prompt in this folder and type:
         mklink /J Game "D:\PS4\CUSA02636"
     (To remove the link later, type  rmdir Game  - this removes the link, not your game.)

The game folder must contain the base game with the 01.03 update applied on top (the update's files replace the
base game's):
         eboot.bin, all_programs.prx, sce_sys\param.sfo, localcachepink\lumps\, localcachepink\streams\,
         Movies\, audio\   (other files and folders from your copy may stay there; they are not used)
The program checks all 7,634 game files (presence and size) at every start; if something is missing or is the
wrong version, a message says which file and the game does not start.

Optional - the pre-order bonus chapter "The Road Not Taken": if you own it, copy its folder from your own copy,
UDAWNDLC00000001 (it contains only sce_sys\), into the game folder next to eboot.bin. It unlocks an extra section
in Chapter 2 and two extra Mystery Man clues. The log says "-> owned" when it is found.

Step 3. Double-click UntilDawn.exe.
  - The first start takes longer: the game data is checked and every shader is translated and compiled for your
    graphics card while you play. Expect stutters, and occasional freezes of several seconds (10-20 seconds or
    more on CPUs with few cores), in the first minutes of each new area on the first play-through - the game is
    not hung, wait for it. They become rarer as the shader cache (Cache\) fills.
  - Saves are kept in savedata\. Logs are in Logs\.


3. Settings (Config\settings.ini)
---------------------------------
  game_dir           folder with the game files; empty = the Game folder next to UntilDawn.exe
  frame_rate_limit   30, 60 (default, like the PS4), 120, 144, 165, any number, or 0 for no limit
  display_mode       windowed (default) or borderless (a window covering the whole primary monitor)
  window_width / window_height   window size in windowed mode (default 1280 x 720; the window can be resized)
  renderer_thread    1 (default): the renderer runs on its own thread, alongside the game (since 0.1.4).
                     0: the renderer runs on the game's thread, as in 0.1.3 - try this if the game freezes or
                     stutters, and please report whether it helped. It does not prevent the crashes caused by
                     overwritten game memory (see 5.). Older settings files without this line use the default.
  developer          0 (default). 1 turns on developer capture keys that write multi-gigabyte diagnostic files -
                     leave it at 0 unless asked to change it.
Delete settings.ini to restore the defaults.


4. Controls
-----------
A DualSense (PS5) controller is fully supported (USB or Bluetooth), including touch pad and motion sensors.
DualShock 4 and Xbox-style controllers also work. Keyboard and mouse work at the same time. Full list in
Controls.txt. The intro logos, the "Previously on Until Dawn" recaps, the butterfly-effect tutorial, the movie
that opens the prologue and the Chapter 1 bus ride can be skipped: press any button, then Cross (Enter / Space)
while the Skip prompt is shown.


5. Known issues
---------------
See KNOWN_ISSUES.txt. In short: occasional crashes caused by game memory being overwritten (NOT fixed yet;
saves are kept - please report them), long presents and "device lost" crashes on some laptops with two graphics
chips, some graphical bugs (dark mouths in close-ups, light squares on Emily's eyes and dark squares on a wall in
the prologue, a red flash in the Episodes menu, smeared end-credits text, the Skip prompt's text as boxes on some
movies, an invisible arm / item during item inspection on one PC, flickering menus on a two-GPU laptop),
characters that sometimes deform for a moment, shader-compilation freezes on the first play-through, and
frame-rate drops (the heaviest scenes still run below 30 fps). Intel graphics are untested.


6. Reporting problems / compatibility test
------------------------------------------
  1. Run compat\run_compat.bat once (about 1-5 minutes, no game play). It checks your CPU, memory, Windows and
     graphics card against what the port needs, runs the port's code on your hardware, and compiles every shader
     of the game with your driver. It makes compat\compat_report.zip.
  2. If the game crashed or showed a problem: note what you were doing (chapter, scene) and, for graphics
     problems, take a screenshot or a short video.
  3. Open an issue at https://github.com/SuperCatElvis/UntilDawn_PC/issues and attach compat\compat_report.zip,
     Logs\UntilDawn.log (or Logs\UntilDawn.previous.log if you started the game again since the problem), the
     screenshot and your description, and say which version you used (0.1.5).
The logs and the report contain your PC's hardware description and the folder paths you use. A path can include
your Windows user name (C:\Users\<name>\...): look through the files and remove anything you don't want to
post publicly before attaching them.
