PMTOK Recomp
============

An unofficial port of Paper Mario: The Origami King (Nintendo Switch, version 1.0.0) to Windows, through static
recompilation: the game's code is translated to C and compiled into a native library for your own PC the first time
you set it up. It is not an emulator. This package contains nothing of the game.

Legal notice: non-profit fan project, not affiliated with or endorsed by Nintendo or Intelligent Systems. Paper
Mario is a trademark of Nintendo; the game is (c) Nintendo / Intelligent Systems. You need your own copy of the game,
already extracted (the exefs and romfs folders of version 1.0.0, or a romfs.bin on its own); there are no instructions
here on how to obtain it. Don't share your installation: the game's files belong to the game.

What you need
-------------
* 64-bit Windows 10 or 11, a CPU with AVX2 (Intel Haswell / AMD Excavator, 2013 or newer).
* A graphics card with Vulkan 1.3 and 4 GB or more of video memory.
* Your own extracted copy of the game, version 1.0.0: a folder holding "exefs" and "romfs".
* About 8 GB free next to this folder the first time (the game's files are copied and the code built), 2 GB after.

First time
----------
1. Unzip this package anywhere you can write to (not Program Files): for example Documents\PMTOK.
2. Double-click play.cmd. The start screen opens.
3. Game files folder: choose the folder with your "exefs" and "romfs". It checks that it is version 1.0.0.
4. Set up game files: it copies them next to the program, builds the game's data and then the game's code for your
   CPU. This takes 10 to 20 minutes, once. Leave the window open until it says the game files are ready.
5. PLAY.

After that, play.cmd opens the start screen and play-with-options.cmd jumps straight into the game.

Controls
--------
  move: left stick / d-pad; keyboard W A S D or the arrow keys
  A (talk, confirm, attack): right button (Xbox B) / K
  B (cancel): bottom button (Xbox A) / J
  X (items): top button (Xbox Y) / L      Y (map): left button (Xbox X) / I
  + (menu): Start / Enter       -: Back / Backspace      L / R: Q / E      ZL / ZR: 1 / 3
  1000-Fold Arms (motion): the controller's gyroscope; without one, the right stick (up stretches)
  Esc or F1: the program's menu (controls, video, audio, quit). Its Controls tab rebinds every button.
  F11 or Alt+Enter: full screen

In the game's own Options > Video you can choose the frame rate: 30 (as on the Switch), 60, 90, 120, 144 or 240. The
game always runs at its own speed; a higher rate only makes the picture smoother. The program's menu (Esc) has the
internal resolution (900p to 4K), the aspect ratio, anti-aliasing (SMAA) and the upscaler (AMD FSR 1), the volume and
the interface language (English / Spanish).

What could go wrong
-------------------
* "No game files found in that folder": choose the folder that holds "exefs" and "romfs", not the game package.
* "Wrong version of the game": this port needs 1.0.0, without updates.
* The first build needs about 2 GB free and a few minutes per module; keep the window open.
* Some maps need the story's own setup and can crash if entered without it (W6C2_MainHall, W6C2_GrowRoom from a save
  that is still early in the game).
* Only Windows with Vulkan is tested.

Where things are
----------------
  your saves and settings    save\ and pmtok-recomp.ini, next to the program
  the program's log          pmtok-recomp.log, next to the program
  the copied game files      extracted\ (delete it from the start screen's Game Files page when you don't need it)
  licenses                   LICENSES.txt and licenses\

Bugs
----
Open an issue at https://github.com/ElKiro1311/pmtok-recompiled/issues and attach pmtok-recomp.log. Please don't
report them to LAS Recomp or EoWRecomp: this port isn't theirs.

Thanks
------
Built on LAS Recomp (https://github.com/peiikai/LASRecomp) and EoWRecomp
(https://github.com/Nycolazs/EoWRecomp), MIT; SDL3, FFmpeg, Opus, Vulkan, Dear ImGui, SMAA, FSR 1, zig and the
other libraries listed in LICENSES.txt. MIT license for this project's own code (see LICENSE).