# FriiDump — Project Frankenstein Branch

FriiDump is a command-line optical-disc dumping tool for Nintendo GameCube,
Nintendo Wii, standard DVD-ROM, and selected Original Xbox/XGD workflows. This
repository preserves the Project Frankenstein development branch based on
FriiDump **0.5.3.5**.

The branch extends the original FriiDump code with:

- analyzer-derived HLDS `0xE7` drive profiles for GameCube/Wii dumping;
- native GDR-8050L and GDR-3120L Xbox/XGD paths;
- redump-style Original Xbox/XGD1 reconstruction and metadata;
- optional game-partition XISO output;
- media preflight, profile reporting, and STOP UNIT cleanup;
- validated Windows/MSVC and Linux/CMake build paths.

The original detailed user documentation remains in [`README`](README).
Xbox-specific behavior is documented in [`docs/XBOX.md`](docs/XBOX.md).

## Repository status

This is the first canonical-source candidate for the standalone `friidump`
repository. The imported baseline is intentionally conservative: source and
maintained documentation were preserved, while disc images, live logs, compiled
binaries, build directories, result archives, and unrelated reverse-engineering
work were excluded.

The baseline source came from:

```text
D:\vscode-workspace\friidump
```

No firmware binaries or disc images belong in this Git repository.

## Build

### Windows — validated MSVC 32-bit path

The maintained Windows helper invokes the Visual Studio 2019 Build Tools
32-bit environment and compiles from `msvc32_friidump.rsp`:

```powershell
.\build_msvc32.cmd
```

Clean generated output with:

```powershell
.\build_msvc32.cmd clean
```

The VS Code build tasks are in `.vscode/tasks.json`. The helper currently
expects:

```text
C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\
```

### Linux / Unix — CMake

```bash
cmake -S . -B build -DBUILD_STATIC_BINARY=ON
cmake --build build
./build/src/friidump --help
```

The repository candidate was locally compiled with GCC using this path. The
build completed successfully. One inherited warning remains in
`libfriidump/rs.c` concerning a right-shift count; it is recorded as technical
debt and was not silently changed during repository import.

## Common commands

List command-line options:

```text
friidump --help
```

GameCube/Wii dump using automatic drive/profile detection:

```text
friidump -d <drive> -8 -s -i game.iso
```

Standard readable DVD:

```text
friidump -d <drive> -D -i dvd.iso
```

Original Xbox/XGD redump-style image:

```text
friidump -d <drive> -T 4 -i xbox.iso
```

Original Xbox/XGD game-partition XISO:

```text
friidump -d <drive> -T 4 -X xbox.xiso
```

Consult [`README`](README), [`docs/options`](docs/options), and
[`docs/XBOX.md`](docs/XBOX.md) before hardware use.

## Safety and evidence rules

FriiDump issues low-level SCSI/MMC and model-specific vendor commands.

- Use only drives and media you own or are authorized to examine.
- Do not assume two firmware revisions share the same private-command layout.
- Prefer exact analyzer-derived profiles over guessed addresses or legacy
  fallbacks.
- Treat live hardware behavior as the final validation boundary.
- Keep firmware, media images, memory dumps, and generated logs outside Git.
- Preserve provenance for every firmware/profile conclusion.

## Source layout

```text
src/                 command-line program
libfriidump/         disc, drive, dumping, Xbox, and vendor-command logic
libmultihash/        checksum implementations
docs/                user, Xbox, validation, and historical documentation
.vscode/             maintained Windows build helper and tasks
build_msvc32.cmd     Windows build entry point
CMakeLists.txt       portable build entry point
```

## Project boundaries

- **PFES** — engineering specification, decisions, evidence status, and history.
- **xbox-dvd-tools** — firmware acquisition, extraction, analysis, disc tools,
  and shared validation utilities.
- **mn103s-emulator** — MN103S CPU/emulator and GDR-8050L emulation work.
- **friidump** — this dumping application and its maintained drive profiles.
- **Firmware archive** — managed server artifacts outside Git.

## License

FriiDump is distributed under the GNU General Public License, version 2 or
later. See [`COPYING`](COPYING). Existing source-file copyright notices and
authors are preserved.
