Crate picori

Source
Expand description

§Picori

Picori (ピッコル) is a library for decompilation, modding, and rom-hacking with focus on GameCube and Wii games. It support parsing and building common file formats, e.g., Dolphin executables (DOLs).

§Usage

Here is a simple example of how to use Picori to parse a DOL file (other formats have examples in their respective modules):

fn main() -> Result<()> {
    let mut file = File::open("main.dol")?;
    let dol = picori::Dol::from_binary(&mut file)?;
    println!("entry point: {:#08x}", dol.entry_point());
    Ok(())
}

§Examples

The examples directory contains a few examples of how to use Picori.

  • dol_dump - Dump information about a .dol file.
  • rel_dump - Dump information about a .rel file.
  • gcm_dump - Dump information about a .gcm/.iso file.

§Features

The following is a list of features supported. More features will be added over time, with the goal of supporting all common file formats used in GameCube and Wii games.

Modules§

ascii
ASCII encoding.
ciso
GameCube CISO (Compact ISO).
dol
Parse Dolphin executables (.dol).
error
The Error enum can indicate a variety of errors that can occur. This module contains the error types that can be returned by this library.
gcm
Parse GameCube master disc (GCM) files.
jis_x_0201
JisX0201 encoding.
rel
Parse Relocatable module (.rel).
shift_jis_1997
ShiftJis1997 encoding.
shift_jis_2004
ShiftJis2004 encoding.
yaz0
Yaz0 compression and decompression.

Structs§

Ascii
ASCII encoding.
CisoReader
Reader for CISO files.
Dol
.dol file object.
Gcm
.gcm file object.
JisX0201
JisX0201 encoding.
Rel
.rel file object.
ShiftJis1997
ShiftJis1997 encoding.
ShiftJis2004
ShiftJis2004 encoding.
Yaz0Reader
Decompresses a Yaz0 compressed file.

Enums§

Error
A error varient that can be used to represent any error that can occur in this crate.

Traits§

AsciiIteratorExt
Extension trait for iterators of bytes and adds the helper function IteratorExt::ascii for decoding as ASCII strings.
JisX0201IteratorExt
Extension trait for iterators of bytes and adds the helper function IteratorExt::jisx0201 for decoding as JIS X 0201 strings.
ShiftJis1997IteratorExt
Extension trait for iterators of bytes and adds the helper function IteratorExt::sjis1997 for decoding as Shift JIS 1997 strings.
ShiftJis2004IteratorExt
Extension trait for iterators of bytes and adds the helper function IteratorExt::sjis2004 for decoding as Shift JIS 2004 strings.

Type Aliases§

Result
A specialized Result type for Picori. This type is broadly used across internal and public APIs. The Err variant is Error.