# OpenPete — Spyro the Dragon PC port (v0.2.0, windows)

OpenPete plays _Spyro the Dragon_ (PSX, 1998) natively on your PC —
widescreen, high framerate, HD texture packs — while keeping gameplay
**bit-identical to original PlayStation hardware**.

**You need your own disc.** OpenPete ships no game content: on first
run it reads your disc image, rebuilds the game's code for your machine,
and stores everything in its disc library (see "Where your files go").
This takes under a minute; after that the original file is never needed
again.

## Quick start

1. Dump your _Spyro the Dragon_ (NTSC-U) disc to a `.bin`/`.cue` pair.
2. Run openpete-spyro1.exe
3. Drag and drop your `.bin` or `.cue` into the Window.

## Where your files go

Windows keeps everything in the program's own folder, next to
`openpete-spyro1.exe`:

```
openpete.toml   your settings
cards/          memory cards (the game's own saves)
states/         savestate slots
logs/           openpete.log — attach to a bug report
library/        your ingested disc and its compiled code
mods/           drop-in mods
sdk/            mod SDK: headers, docs/, examples/ (only when packaged with it)
recomp/         the bundled compiler and recompiler
```

## Notes

- Windows may show a SmartScreen warning ("Windows protected your PC")
  because the download is new and unsigned — click "More info" → "Run
  anyway". If in doubt, verify the download against the published
  `.sha256` checksum first.
- Windows: install to a reasonably short path (e.g. `C:\Games\OpenPete`);
  very deep folders can hit Windows' path-length limit during first run.

## Mods

A mod is a folder (or a `.zip`) dropped into the `mods` directory above,
holding a `mod.toml` manifest plus any of `assets/` (replacement
textures, music, sounds, custom levels) and `src/*.c`. Source mods are
compiled on the next start against the `sdk` folder next to the program,
by the same compiler that built your disc's module; a start that has
mods to compile shows "COMPILING MODS" on the splash. If there is no
`sdk` folder next to the program, this build was packaged without the
mod SDK: source mods are disabled and mods made only of a manifest and
assets still load. `mods/enabled.txt` (one mod ID per
line) fixes which mods load and in what order; without it every mod
loads, alphabetically.

A source mod runs inside the game process with the same privileges as
the game. There is no sandbox. Install only mods you trust, as you would
any other program. A mod with no `src/` directory never loads code.

Mod authors: when this build carries the SDK, its documentation is at
`sdk/docs/index.html` (start at "Getting started") and `sdk/examples/`
holds working example mods. Copy one into the `mods` directory above to
run it; nothing under `sdk/` loads on its own. In the AppImage both sit
inside the read-only image: run `./OpenPete-*.AppImage --appimage-extract`
once and open `squashfs-root/usr/sdk/docs/index.html` and
`squashfs-root/usr/sdk/examples/`. Without the SDK, the
documentation is built from the source tree
(`cmake --build --preset linux-release --target mod_docs`).

## Reporting a problem

Every run mirrors its diagnostics to `openpete.log` in the `logs`
directory above — the startup sequence, what it decided about your disc
and your hardware, any driver errors, and the crash dump if it crashed.
Attach it. The previous run is kept alongside it as `openpete.log.1`,
which is the one you want when a relaunch made the problem go away.

Nothing in it identifies you beyond the paths OpenPete itself uses.

_OpenPete is not affiliated with Sony, Insomniac Games, or Activision.
Spyro the Dragon is a trademark of its respective owners._
