About
A native port of the four .hack games for the PlayStation 2 (CyberConnect2 / Bandai, 2002-2003): .hack//Infection, .hack//Mutation, .hack//Outbreak and .hack//Quarantine. It is the games' engine rewritten in Rust, and it is made on your computer from your own discs. Nothing from the games ships with it.

![]() | ![]() |
![]() | ![]() |
Download
From the Releases page, take the file for your system (all 64-bit):
- Windows 10 or 11:
piney-apples-VERSION-windows-x86_64.zip - Linux and the Steam Deck:
piney-apples-VERSION-x86_64.AppImage - Linux, as a plain program:
piney-apples-VERSION-linux-x86_64.tar.gz
macOS has no download yet; it builds from source (below).
You also need a graphics card with Vulkan or DirectX 12 (most from the last ten years, with current drivers) and about 2 GB of disk per disc.
Quick start
- Unzip it anywhere you can write, such as a folder in your home or
Documents folder (not Program Files). The AppImage needs no unzipping:
make it executable (right-click, Properties, "Is executable", or
chmod +x). - Run
piney-apples(piney-apples.exeon Windows, the.AppImagefile on Linux). - Add your discs: drop the disc images (
.iso) on the window, or press Add discs for your system's file dialog. Scan a folder adds every .hack disc in a folder you pick. - Wait for the build. Adding discs builds the game: one shared copy for all four parts, made from your discs a few minutes per disc, its progress in the panel at the top. Discs added while it runs are built right after it.
- Press Play on a part's row to start that part. With two or more parts ready, Play .hack// at the top starts the game's own menu, where you pick the part (the four-part selector Outbreak's disc carries but never uses).
The launcher works with a mouse, a touch screen, the keyboard (arrows, Enter, Escape) or a gamepad: the D-pad or left stick moves, A (Cross) chooses, B (Circle) goes back, L1 and R1 turn the pages.
Steam Deck
- In Desktop Mode, download
piney-apples-VERSION-x86_64.AppImagefrom the Releases page into a folder of its own, such as~/Games/piney-apples. - Copy your disc images to
~/Downloads,~/Gamesor an SD card, or add them from anywhere with Add discs (the normal file dialog). - Right-click the AppImage, Properties, Permissions, tick Is executable. Run it once and add your discs; the game builds by itself.
- In Steam, Add a Non-Steam Game, browse to the AppImage and add it. It now starts from Game Mode, where the launcher and the game fill the screen and work with the Deck's own controls.
In Game Mode the system's file dialogs cannot be used with the controls,
so Add discs becomes Find discs: it lists the .hack discs it finds
beside the AppImage, in ~/Downloads, ~/Games and your home folder, and
on SD cards and USB drives, and A adds one. If it finds none, copy them
there in Desktop Mode. The save folder can only be changed in Desktop Mode.
To skip the launcher and start a part straight away, give the AppImage
(or piney-apples) the launch option --start N, with N from 1
(Infection) to 4 (Quarantine). In Steam: the game's Properties, Launch
Options, --start 1. It plays as that row's Play does and ends when the
game ends.

Which discs work
Disc images (.iso) of the four North American releases:
| part | disc |
|---|---|
| .hack//Infection | SLUS_202.67 |
| .hack//Mutation | SLUS_205.62 |
| .hack//Outbreak | SLUS_205.63 |
| .hack//Quarantine | SLUS_205.64 |
Each disc you add is checked by its own data and named:
| the launcher says | what to do |
|---|---|
| This is Mutation (SLUS_205.62). | Nothing: it is in, and the build starts. |
| Needs Infection's disc too | Add Infection's disc as well. Mutation, Outbreak and Quarantine are made with Infection's disc beside them, so the build leaves them out until it is there. |
| This is a PAL or Japanese disc; only North American discs work for now. | Use a North American disc. Other regions are planned. |
| This is .hack//fragment (SLPS_255.27), which is not supported yet. | Nothing yet: fragment comes later. |
| This is not a .hack disc. | Check that you picked the right file. |
| The image looks damaged or incomplete. | Make the image again from the disc; the copy is cut short or unreadable. |
Once a part is built, it plays from the build: the disc images can move or go. They are wanted again only when an update changes the build's own file format (rare); an update that only changes the port's data remakes the game from the build itself.
Controls
In the game:
| PS2 pad | keyboard | gamepad |
|---|---|---|
| D-pad | arrow keys | D-pad |
| Cross / Circle | Z / X | south / east button |
| Square / Triangle | A / S | west / north button |
| L1 / R1 | Q / W | shoulders |
| L2 / R2 | 1 / 2 | triggers |
| L3 / R3 | C / V | stick clicks |
| Start / Select | Enter / Backspace | Options / Create (or Start / Back) |
| left stick | (none) | left stick |
| right stick (camera) | I / J / K / L | right stick |
Fullscreen: F11 or Alt+Enter switches the game between a window and
the whole screen (borderless, on the screen the window is on). The picture
keeps the PS2's 4:3 shape, with black bars at the sides of a wide screen,
and the mouse pointer is hidden. piney remembers the choice, and the
window's size, for next time; Settings, Fullscreen sets it too. In
the Steam Deck's Game Mode the game starts fullscreen. Escape still asks
to quit and does not leave fullscreen. For one run only, --fullscreen
or --windowed (Launch Options on Steam, after --start N --) overrides
the setting without changing it.
Any gamepad that gilrs knows
works (a DualSense, an Xbox pad, and the Steam Deck's controls, which
Steam presents as a gamepad), with its buttons where a DualShock 2 has
them. With more than one connected, the one
that last sent input is read. Escape or the window's close button asks to
quit, with the game, its picture and its sound, stopped while it asks;
F1 or ` opens the console (help lists its commands). Its
history scrolls with Page Up / Page Down, the mouse wheel or its scroll
bar; Tab completes a command and its arguments.
On a console the game softens the picture for an interlaced TV, mixing
each line with the one above. The port shows it sharp, as PCSX2 does by
default; Settings, TV softening shows it as the console did. The
picture's other settings (render scale, HUD size, vsync, the frame rate
cap) are on the Settings page too. The console changes them for the run
only: deflicker on, render_scale N (1 to 8), vsync off, fps_cap N
(0 for none), hud_scale N (0.5 to 1) and fullscreen on; settings
lists them all as the run has them. The game itself runs at its own rate
whatever these are.
Saves, settings and logs
Everything piney apples makes is kept in one folder beside it,
piney-apples-data (beside the .AppImage file for the AppImage): the
game it builds, your memory card, the settings, the logs and the list of
your discs. Nothing goes anywhere else. To move it, move both; to remove
it, delete both.
- Saves go to one memory card shared by all four parts,
piney-apples-data/memcard/slot1, one folder per part (BASLUS-20267DOTHACKis Infection's). To keep them somewhere else, such as a folder a sync service backs up, use Settings, Save folder, Change. If the old folder has saves, it offers to copy them over; the originals stay where they are, and a folder that already holds saves is never overwritten. Reset to default goes back. - Settings: the Settings page has a section each for Display
(fullscreen, render scale, HUD size, vsync, the frame rate cap, TV
softening, the picture's position), Sound (the volumes, stereo or mono,
the voices' language), Controls (vibration, the camera controls, the
field camera), Gameplay (the movies' text, the Data Drain movie, the
town map, the loading time between areas), Saves and Updates. Each row
says what it does, with a switch, choices side by side, a slider or
arrows. With a pad or the keys, up and down move between rows, left and
right change the value, A switches it and B goes back to the pages.
Each section's Reset to defaults asks before it resets. While a game
is running its settings wait (it keeps its own copy); Saves and Updates
can change any time. The game's own settings live in
piney-apples-data/settings.toml, and each part's Option menu changes the same values. - Logs: each game, build and launcher run writes a log to
piney-apples-data/logs(Logs and help, Open logs folder).
A part's clear data carries into the next as on the PS2: save after the ending's staff roll, then choose CONVERT on the next part's title and the cleared save. Leave the earlier part's folder where it is; the next part reads it there, and needs no save of its own first. Copying slot files into another part's folder does not convert them.

Saves from PCSX2 can be brought over. In the game's console (F1 or `)
type import_card and the path of PCSX2's memory card file (Mcd001.ps2
in PCSX2's memcards folder), of a folder memory card, or of one exported
save folder such as BASLUS-20267DOTHACK:
import_card path/to/Mcd001.ps2
The four parts' save folders are copied onto the port's card. A save it
replaces is kept in a backup-... folder beside the card. Only the North
American discs' saves are recognised.
A single slot file (dhdata01 to dhdata12, or a folder of them) can be
imported the same way. A slot shows as used only through its entry in its
folder's index file, so copying the file in by hand leaves it "unused";
the import writes that entry for it. A later part's slot file is imported
from that part's running game.
Saves from PCSX2 can be brought over: in the game's console (F1 or
`) type import_card and the path of PCSX2's memory card file
(Mcd001.ps2), a folder card, or one exported save folder. The parts'
saves are copied onto the port's card; a save it replaces is kept in a
backup-... folder beside it. A single slot file (dhdata01 to
dhdata12) imports the same way.
Updating
Download the new release and put it beside your piney-apples-data
(replace the old program, or keep both). On its first start it notices the
game was made by an older version and makes it again by itself. Your saves
and settings are not touched. When a new version is out, the Library
says so at the top, with Get it (its release page) and Skip this
version. To know, the launcher asks GitHub for the newest release's
number once at start; nothing else is sent and nothing is downloaded.
Settings turns this off ("Check GitHub for a new version at start").
Reporting a bug
On the Logs and help page, Copy bug report puts what a report needs
on the clipboard: the version, your system and graphics card, your discs'
ids, the save folder and the last lines of the newest log, with your home
folder and user name taken out. Report on GitHub opens a new issue in
your browser with the same text. Nothing is sent by the program itself.
Then say which part, where you were, what you did and what you expected.
The build is also in brackets after "Ported by helba" on the disc menu and
in the console's version (a 7-digit commit such as fc82e63). A
screenshot helps; a recording helps most:
Open the console (F1 or `) and type pad_log. The game has been
keeping every frame's pad since power-on, so this writes the whole run so
far and keeps recording. It prints where the file went: padlogs/ in
piney-apples-data, next to a .card folder with your memory card as it
was at power-on. Play until the bug shows, then type pad_log stop. Attach
the log and the .card folder (zipped) to the issue. piney-game --replay FILE plays the run back exactly, console commands included.
If the game seems to use a lot of memory, type memory in the console: it
says what the game holds (its textures and files, the graphics card's
memory it has taken, and which graphics card and driver it is on). Put
that in the report with what Task Manager or your system monitor shows for
piney-apples, and whether the discs were just built.
If something goes wrong
- It will not start, or says no graphics adapter: update your graphics
drivers. On Linux, install your card's Vulkan driver (
mesa-vulkan-driverson Debian and Ubuntu,vulkan-radeonorvulkan-intelon Arch). - It says it cannot write beside itself: it is in a folder you cannot write to. Move it (and the AppImage) to one you can.
- The file dialog does not open: the launcher says why. Drop the disc images on the window instead. On Linux the dialog is your desktop's (the XDG file chooser portal).
- No sound: the game plays on your system's default output. Check it there, and the Option menu's volumes.
- A gamepad does nothing: plug it in before starting, then press a button on it.
- More detail:
PINEY_LOG=debugmakes the game's log say everything (or one part, e.g.piney_world=debug,warn).
On Linux the program uses only the system's own libraries, which a desktop
already has: the Vulkan loader and driver, Wayland or X11, libxkbcommon,
ALSA (libasound.so.2, which PipeWire and PulseAudio provide) and udev
(libudev.so.1, for gamepads), on glibc 2.35 or later (Ubuntu 22.04,
Debian 12, Fedora 36, SteamOS 3 and newer). The AppImage holds the program
and nothing else.
Status
Status: all four parts play from power-on to their endings. Players have played each of them through on the port, with no emulator involved: Infection to its staff roll, Mutation on into its post-game quest, Outbreak through Gorre and its ending, and Quarantine through Corbenik, the ending and its credits. Thanks to everyone who played it and reported what they found, among them ThreePendant, shugo21-bit, CrackedPixel and dothacknetwork: their bug reports and pad recordings drove most of the fixes.
| part | disc | where it stands |
|---|---|---|
| .hack//Infection | SLUS_202.67 | The whole story, its bosses, the ending, the staff roll and the save after it |
| .hack//Mutation | SLUS_205.62 | The whole story (all 16 events), its bosses (Innis, Magus, Cubia), the ending, and the post-game quest; carries Infection's clear data |
| .hack//Outbreak | SLUS_205.63 | The whole story (all 19 events), its bosses (Fidchell, Cubia, Gorre), the ending and staff roll; carries Mutation's clear data |
| .hack//Quarantine | SLUS_205.64 | The whole story, its bosses (Macha, Tarvos, Cubia, Corbenik in all three forms), the ending and its own credits; carries Outbreak's clear data |
It is still a work in progress: some side events are not finished yet, and bugs turn up as people play. What is still missing is listed in GAPS.md, and the known bugs in BUGS.md.
Not an emulator
An emulator runs the PlayStation 2's code: it imitates the console's processors and the game runs as it did on the hardware. This project runs none of that code.
- What runs is the engine rewritten in Rust, part by part: the game loop and its tasks, the event-script interpreter, the battle rules and the AI, the Chaos Gate's area-word generator, the fields, dungeons and Root Towns, the menus, the ALTIMIT desktop, the in-engine cut scenes, the sound driver and synthesizer, and the movie decoder. The picture is drawn with wgpu from the port's own draw lists, and the sound is mixed by the port.
- How we know it matches. Each part is checked against the game's own code: the original functions are run one instruction at a time in a small interpreter written for this project, and the port has to give the same results. More than 1,200 tests, and 85 harnesses that run the game's own functions beside the port's, hold it to that.
- What it reads is your discs, once.
piney-buildreads them into a build and generates the tables the engine needs from the discs' own executables. During play nothing from the PlayStation 2 runs, and no BIOS is needed.
What owning the engine gives you
The games' systems become ordinary source code, so you can read them, change them and build on them. You do not have to patch a binary.
Today:
-
One program for all four parts. One build holds your discs and one memory card serves all four parts. It opens on the four-part selector that Outbreak's disc carries but never uses.
-
Every Root Town from any disc. The console's
town Nreaches Mac Anu, Dun Loireag, Carmina Gadelica, Fort Ouph and Lia Fail from any part. -
A console (F1 or
`) into the running game. It has god mode, items and gold, warps to any town, and any character into the party whatever the story says. It also sets event flags and the bracelet's infection, and restarts the game at any story event (helplists them all). -
A scriptable, repeatable game. The same input gives the same game.
--pad-log FILErecords your pad from power-on, or typepad_login the console at any time to write the run so far and go on recording;--replay FILEplays either back.--pressscripts button presses and--consolescripts console commands.--mode story:Nstarts at story event N.--shotand--webpcapture frames and video without a window.
The test suite plays the story this way and checks what the game draws and plays.
-
A viewer (
piney-viewer) for every scene on the discs: models, animations, towns as they are assembled, and any dungeon or field from its seed. -
Unused content, reachable. Outbreak's unused cut scenes play with
--mode loose:STREAM/STRT.BIN:N. The earlier builds of the later towns left in Infection's executable are documented. -
Documentation for everyone.
- docs/ is the reference for the formats and the engine.
- WORKLOG.md records how each piece was worked out.
piney-build --export-symbols DIRwrites the function and data names of all four executables for other reverse engineers.
Possible because of it (not done yet):
- Changing the rules in code: the battle, the AI, items and skills, the area words, the story's events. The event scripts already have a readable text form of their own.
- Fixing the originals' bugs, or keeping them. Either way it is a choice made in code.
- Drawing beyond the PS2, such as other resolutions and aspect ratios, since the picture is the port's own.
- Running on any platform that Rust, wgpu and cpal reach.
For developers
The port is a Cargo workspace under crates/:
| crate | what |
|---|---|
piney-data | the disc: ISO 9660, the DATA.BIN gzip archive, CCSF scene files - textures, palettes, models, clumps, animation playback - and the engine's generators (towns' placement tables, dungeons, fields) |
piney-viewer | every DATA.BIN scene textured, posed and playing, towns as their placement tables assemble them, generated dungeons and fields, with mouse, keyboard or a gamepad; --shot renders one to PNG without a window |
piney-input | the pad as ccPad::Read reads it: held, pressed, released, repeat, the stick as a direction |
piney-draw | one frame as the game hands it to the GS: primitives, model draws, run-time textures, blend and test state |
piney-gs | draws those frames as the GS does, on wgpu, in the game's 512 x 448 frame buffer |
piney-game | the game from power-on: the title with its movies and intro stream, New Game, the desktop with the game's own event scripts, the Root Towns, fields and dungeons, their cut scenes, voices and sound; modes on the game's own frame clock, pad or keyboard in, GS frames out |
piney-world | The World: the Root Towns, fields and dungeons as their tasks run them, the camera, the characters, the party and its AI |
piney-battle | the battle's rules: stats, hits, skills, items, conditions, the enemies' and members' AI, Data Drain |
piney-effect | the effects: skills, spells, transfers, the particles |
piney-fieldui | the field's menus and HUD |
piney-audio | the game's sound: sound effects and the sequenced music through ports of the IOP's MIDI sequencer and hardware synthesizer, an SPU2 model mixing at 48 kHz, BGM.BIN's streams; cpal output or headless WAV |
piney-desktop | the ALTIMIT desktop (DESKTOP.PRG) as a state machine: the opening, the main screen, the mailer, News, Accessory, Audio and Data (saving to a memory card), the event scripts' message windows and the START menu |
piney-demo | the title screen (DEMO.PRG) as a state machine: the memory-card check, the logo movies and intro stream, the menu (New Game, Load, Option), and New Game's hand-off to the desktop |
piney-toppage | THE WORLD's top page: the board, the news and the log in |
piney-mpeg | the PSS movies: our own MPEG-2 decoder and the IPU's colour conversion, every picture exact against ffmpeg, and the movies' SPU2-format sound |
piney-event | the event scripts: our own instruction set and its text form, the scripts and messages read from the disc and converted without loss, and the interpreter checked against the game's own code |
piney-stream | the in-engine cut scenes (ccRequestLoadStream): a stream's files read from STREAM/*.BIN, its scenes built and played frame by frame as the game's InitScene / DecodeFrameSection do them, pad in, draw list and PCM out |
piney-launcher | piney-apples, the player's program: a GPUI window over the builder and the game, one portable executable that keeps everything beside itself |
piney-build | one game from your discs: the disc images' files cut into chunks, each kept once and zstd-compressed, into a build piney-game finds by itself; the port's data generated from the discs into it |
piney-gen | the table generator: each volume's engine tables read out of its executable through Infection's DWARF types, into the build; the carry that finds Infection's globals in the later volumes; and the symbol transfer that names the stripped executables |
piney-eemu | the EE interpreter the checks run the game's own code in |
cargo run --release -p piney-viewer -- town01
cargo run --release -p piney-viewer -- --dungeon 1234,0,5
cargo run --release -p piney-viewer -- --field 777,2
cargo run --release -p piney-game -- --mode story:11 # the game at story event 11
cargo run --release -p piney-audio --example render -- desktop 50 out.wav
cargo run --release -p piney-stream --example stream_shot -- --stream 2 --frame 600 --out stream.png
cargo test --workspace # the checks; the disc tests need the images under work/
For the checks and the tools, put your disc images in originals/
and extract them under work/ (both are ignored by git).
docs/ is the reference: what the formats are and how the
engine works, with an honesty status on every page.
WORKLOG.md is how each piece was worked out.
Building from source
macOS has no prebuilt program: build it here (Windows and Linux can too). You need Git and Rust (the current stable version).
- Windows: install Git for Windows
and run
rustup-init.exefrom rustup.rs. When it asks, let it install the Visual Studio C++ build tools. Use the commands below in PowerShell or the "Developer PowerShell". - Linux: install Git, a C compiler,
pkg-config, and the ALSA (sound), udev (gamepads) and xkbcommon / Wayland / X11 (the launcher's window) headers, then Rust from rustup.rs:- Debian, Ubuntu, Mint:
sudo apt install git build-essential pkg-config libasound2-dev libudev-dev libxkbcommon-dev libxkbcommon-x11-dev libwayland-dev libx11-xcb-dev libvulkan-dev libfontconfig-dev - Fedora:
sudo dnf install git gcc pkgconf-pkg-config alsa-lib-devel systemd-devel libxkbcommon-x11-devel wayland-devel vulkan-loader-devel fontconfig-devel - Arch:
sudo pacman -S git base-devel alsa-lib systemd-libs libxkbcommon-x11 wayland vulkan-icd-loader fontconfig - then:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
- Debian, Ubuntu, Mint:
- macOS: run
xcode-select --install, then install Rust from rustup.rs.
The first compile takes a while. The programs end up in target/release/
(.exe on Windows). piney-apples is the player's program described
above: copy it anywhere you can write and use it the same way. The
developers' programs are piney-build and piney-game:
# Linux and macOS
# Windows (PowerShell)
piney-build tells the discs apart by their contents, checks every file
it reads, and keeps the game in the port's folder, which piney-game
finds by itself: ~/.local/share/piney/game on Linux, %APPDATA%\piney\game
on Windows, ~/Library/Application Support/piney/game on macOS
($PINEY_HOME moves it). Given another disc later, it keeps the ones
already in. Saves go to memcard/slot1 and the options to settings.toml
beside game. piney-game --iso path/to/infection.iso plays one image
without a build. After git pull and cargo build --release, a game that
says no port data of version N ... run piney-build again is remade by
target/release/piney-build with no arguments, from the discs already
in it. piney-game takes the settings' flags too, each for that run only
over settings.toml and never written back: --fullscreen, --windowed,
--render-scale N, --hud-scale N, --no-vsync, --fps-cap N,
--deflicker, --dvd [SPEED] and --voice en|jp (--help lists them,
from the same table the Settings page reads). --import-card PATH copies
PCSX2's saves onto the card.
Tools
The reverse engineering started on a machine with no tools for it, so they
are written here as the work needs them, under tools/, in Python
with nothing outside the standard library:
| tool | what it does |
|---|---|
tools/iso.py | list, extract and cat files from an ISO 9660 DVD image; map an LBA back to a file |
tools/elf.py | the EE executable: headers, sections, symbols, reads by VA |
tools/mips.py | R5900 instruction decoder: base MIPS, EE extensions, MMI, FPU, VU0 macro mode |
tools/image.py | the program image: main plus one overlay, symbols and relocations; a stripped volume's .syms sidecar |
tools/disasm.py | disassemble a function or range, exact xrefs from the relocations |
tools/fdtbl.py | the DATA.BIN index compiled into the executable; check verifies it against the archive |
tools/gzarc.py | list, cat and extract the sector-aligned gzip archives (DATA.BIN, STREAM/*.BIN) |
tools/ccs.py | CCSF scene files: header, name table, objects, chunk walk |
tools/dwarf1.py | the DWARF 1 debug information: functions, types, globals, lines, per-unit headers |
tools/demangle.py | CodeWarrior C++ symbol demangler, works like c++filt |
tools/ccstex.py | textures and palettes out of CCSF files, as PNG |
tools/ccsmodel.py | models out of CCSF files as Wavefront OBJ, optionally posed from an animation or a cutscene frame |
tools/areas.py | the Chaos Gate keywords, the story areas, and the area generator reproduced exactly |
tools/tables.py | any global table decoded through its DWARF type: enemies, skills, items, equipment, bosses |
tools/sound.py | sound banks, voice lines, streamed music and cutscene audio, through the game's own indexes |
tools/scei.py | Sony's SCEI .hd / .sq sound-bank formats |
tools/adpcm.py | PS-ADPCM decoder |
tools/midi.py, tools/hsyn.py | models of the IOP's MIDI sequencer and hardware synthesizer, checked against the modules |
tools/irx.py | IOP module (.IRX) disassembler: imports, exports, functions |
tools/iopemu.py | IOP modules run in eemu.py, the synthesizer's register writes recorded |
tools/sound_ee.py | the game's EE sound code run in eemu.py, what it sends to the IOP recorded |
tools/wav.py | WAV writer |
tools/vu.py | VU0/VU1 microcode: labels, disassembly, and the game's model packets built in the interpreter |
tools/vif.py | VIF code streams, DMA tags and GIFtags |
tools/evscript.py | event scripts: list, disassemble with dialogue and voice inlined, survey, check against the game code |
tools/dungeon.py | dungeon layouts from the area seed, reproduced exactly, as ASCII maps |
tools/battle.py | the battle rules reproduced: effective stats, hit and damage, protect break, status, experience, Data Drain |
tools/field.py | field terrain and objects from the area seed, with PNG height maps |
tools/anim.py | Anime chunks evaluated at any time as the game plays them: poses, texture offsets, morphs |
tools/png.py | minimal PNG writer |
tools/eemu.py | a small EE interpreter: runs static initialisers, and game functions to check reimplementations against |
tools/font.py | text rendering: glyph tables, measuring, and strings drawn to PNG as the game draws them |
tools/text.py | the desktop's mail, bulletin board and news text, English or parody |
tools/portdata.py | the port's data files (work/data, the build's PINEY/TABLES) read back for the other tools |
tools/save.py | the memory-card save as each volume's own code writes it, and the carry-over into the next volume |
tools/xfer.py | code compared across volumes: a body with its address fields masked, the addresses it forms, its opcode shape |
tools/docs.py | regenerate and check the reference index |
License
The code in this repository is licensed under either of
- Apache License, Version 2.0 (LICENSE-APACHE)
- MIT license (LICENSE-MIT)
at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in this work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.
The license covers this repository's own code and writing only. The games themselves, their data, text, art, sound and code, belong to their owners and are not covered by it. .hack is a trademark of its owners; this project is not affiliated with or endorsed by CyberConnect2 or Bandai Namco.
Third-party
piney-apples carries the Fira Sans typeface (Regular and SemiBold),
digitized data copyright 2012-2018 The Mozilla Foundation, Telefonica S.A.,
Carrois Corporate GbR and bBox Type GmbH, under the SIL Open Font License
1.1: crates/piney-launcher/assets/fonts/OFL.txt,
also in each release's licenses folder. The Rust crates the programs are
built from carry the licences deny.toml allows; CI checks
them. The Linux AppImage is made with appimagetool 1.9.1 and carries the
AppImage type2 runtime 20251108 (both MIT, the AppImage project). The
program's icon and the launcher's volume marks are drawn for the project.
Use of AI
This project is built with AI coding agents: Claude (Anthropic), through Claude Code. The split is:
The maintainer (Toyz)
- defined the system: a port, not an emulator; one core for all four volumes; the crates and how they fit; data made from your own discs, never shipped;
- defined the rules the work is held to: every behaviour bit-exact to the game and checked against its own code; idiomatic Rust; typed tables, no byte blobs; no shortcuts or cheats in the tests; unknowns closed, not listed;
- set the requirements: what each piece must do, and when it is done;
- understands every piece of the agents' work and can audit any of it: the reverse engineering, the code, the tests and the harnesses;
- decides what is worked on and in what order, and what ships;
- plays the port, with a pad, and finds and reports what is wrong;
- triages the players' bug reports on GitHub and hands them on;
- reviews the work and sends it back when it falls short of those rules;
- wrote cairns, the worklog tool below.
The agents
- do the reverse engineering: they read the game's code with the tools
under
tools/(which they also wrote) and work out what it does; - write the port's code, its tests and the harnesses that run the game's own code beside it;
- write the reference docs and every worklog entry;
- reproduce reported bugs, fix them, and draft the replies on the issues.
Nothing here is taken on the model's word. Each ported piece is checked
against the game's own code: the original routines run in an EE interpreter
(piney-eemu, tools/eemu.py) beside the port, and their results are
compared frame by frame or bit for bit. Those comparisons are part of the
test suite. Where something cannot be checked that way, the docs and the
worklog say so.
Keeping that record is what cairns is for. Every unit of work is a numbered worklog entry: what was found, how, what was checked against the game, and what is still unknown. The worklog is the full history of how the port was worked out, AI included. If you want to know how something here came to be, or how far to trust it, start there.



