| Crates.io | psy-k |
| lib.rs | psy-k |
| version | 0.4.0 |
| created_at | 2025-12-13 02:22:28.494846+00 |
| updated_at | 2025-12-19 13:30:10.689575+00 |
| description | A PSY-Q object & library parser & utility. |
| homepage | |
| repository | https://github.com/ttkb-oss/psy-k |
| max_upload_size | |
| id | 1982462 |
| size | 852,209 |
psy-kpsy-k is a pure-safe library and utility for parsing PSY-Q LIB & OBJ files.
As a utility, psyk will print the contents of LIB or OBJ files. psyk can split LIB files into OBJs or combine
OBJs into LIBs; your choice, really.
As a library, psy-k parses LIB and OBJ files for programmatic manipulation.
psy-k is used by mipsmatch.
default/list - dump a LIB or OBJ file
$> psyk PSX/LIB/LIBCARD.LIB
Module Date Time Externals defined
C112 26-12-95 17:43:08 _bu_init
C171 26-12-95 17:43:08 _card_info
C172 26-12-95 17:43:08 _card_load
C173 26-12-95 17:43:08 _card_auto
A74 26-12-95 17:43:10 InitCARD
A75 26-12-95 17:43:10 StartCARD
A76 26-12-95 17:43:10 StopCARD
A78 26-12-95 17:43:10 _card_write
A79 26-12-95 17:43:10 _card_read
A80 26-12-95 17:43:10 _new_card
A92 26-12-95 17:43:12 _card_status
A93 26-12-95 17:43:12 _card_wait
CARD 26-12-95 17:43:12 _card_clear
extract - extract OBJs from a a LIB file
$> psyk extract PSX/LIB/LIBCARD.LIB
psyk version 0.1.0
Extracted object file C112.OBJ
Extracted object file C171.OBJ
Extracted object file C172.OBJ
Extracted object file C173.OBJ
Extracted object file A74.OBJ
Extracted object file A75.OBJ
Extracted object file A76.OBJ
Extracted object file A78.OBJ
Extracted object file A79.OBJ
Extracted object file A80.OBJ
Extracted object file A92.OBJ
Extracted object file A93.OBJ
Extracted object file CARD.OBJ
create - create a new LIB from one or more OBJs
add - add another OBJ to an existing LIB
update - update an existing OBJ in a LIB
delete - delete an OBJ from a LIB
psy-k can be used to programmatically read and modify LIB and OBJ structures as well.
use std::path::Path;
use psyk::io;
use anyhow::Result;
fn main() -> Result<()> {
let lib = io::read_lib(Path::new("LIBAPI.LIB"))?;
for module in lib.modules() {
println!("Module: {}", module.name());
println!("Created: {}", module.created());
println!("Exports: {:?}", module.exports());
}
Ok(())
}
sozud's psy-q-splitter includes a LIB parser
and extractor.
spirit t0aster's worklog provided additional information for several expression operators that are present in Psy-Q for Saturn but were not in Psy-Q for Playstation.