2023-11-28 06:52:34 -05:00
|
|
|
# icondumper2 (working title)
|
|
|
|
A JavaScript library (sorta) to read PS2 icons, and their related formats.
|
|
|
|
|
2023-12-05 13:40:46 -05:00
|
|
|
## What is a "PS2 icon"?
|
|
|
|
A set of vertices with may or may not include a texture while defining colours for those vertices.
|
|
|
|
|
|
|
|
## Why?
|
|
|
|
Current implementations had some issues with rendering some icons. These were mostly:
|
|
|
|
* Not rendering any color for texture type 3.
|
|
|
|
* Failing to decompress some specific RLE-compressed icons. (types above 8)
|
|
|
|
* Requires writing/reading a specific format for successful output of data.
|
|
|
|
|
|
|
|
As of writing, there was no exporter that exists for the format that exhibited one of these problems.
|
|
|
|
|
|
|
|
**icondumper2** is the result of me trying to avoid these problems.
|
|
|
|
|
|
|
|
## What it supports:
|
2023-11-28 06:52:34 -05:00
|
|
|
* EMS Memory Adapter export files (.psu)
|
|
|
|
* PS3 virtual memory card export files (.psv)
|
|
|
|
* SharkPort export files (.sps)
|
|
|
|
* X-Port export files (.xps)
|
2023-12-07 09:14:07 -05:00
|
|
|
* CodeBreaker Save export files (.cbs)
|
2023-12-18 09:03:51 -05:00
|
|
|
* Max Drive "PowerSave"/export files (.max)
|
2023-11-28 06:52:34 -05:00
|
|
|
* PS2 icons (.ico, .icn)
|
|
|
|
* PS2D format (icon.sys)
|
|
|
|
|
2023-12-05 13:40:46 -05:00
|
|
|
## What can it do:
|
|
|
|
* Allow any file in a supported virtual filesystem (such as those from export files) to be read.
|
2023-11-28 06:52:34 -05:00
|
|
|
* Warn of invalid icon.sys display names.
|
2023-12-05 13:40:46 -05:00
|
|
|
* Export the icon model, with all seperate shapes included as a JavaScript Object.
|
|
|
|
* CommonJS (that includes node!) module exporting while still being compatible with other JavaScript implementations.
|
|
|
|
* Convert a 128x128x16 BGR5A1 bitmap to a standard RGB5A1 format.
|
2023-11-29 08:25:58 -05:00
|
|
|
* Convert an icon or a set of icons to glTF 2, with textures saved as PNG.
|
2023-12-18 09:03:51 -05:00
|
|
|
* Decompress any LZARI-formatted data.
|
2023-11-28 06:52:34 -05:00
|
|
|
|
2023-12-05 13:40:46 -05:00
|
|
|
## What it doesn't do:
|
|
|
|
* Create, manipulate or otherwise taint save files.
|
|
|
|
* Modify any original input files.
|
|
|
|
* Use any implementation-specific features.
|
2023-11-28 06:52:34 -05:00
|
|
|
|
2023-12-05 13:40:46 -05:00
|
|
|
## Client compatibility:
|
|
|
|
The library requires use of `const`, `let` and `class` declarations.
|
|
|
|
|
|
|
|
Any JavaScript implementation should work if they support all three of these declarations.
|
|
|
|
|
|
|
|
### Tested clients:
|
|
|
|
* Chrome (or Blink-based browser) 49 (or higher) - HTML reference client
|
|
|
|
* Firefox (or Gecko-based browser) 45 (or higher) - HTML reference client
|
|
|
|
* Node.js 13 (or higher) - Example client and glTF 2 exporter.
|
2023-11-28 06:52:34 -05:00
|
|
|
|
|
|
|
## Why "icondumper2"?
|
|
|
|
Because it replaced what *was* left of icondumper (1).
|
|
|
|
|
2023-12-05 13:40:46 -05:00
|
|
|
## Included files:
|
2023-11-28 06:52:34 -05:00
|
|
|
| File | Description |
|
2023-11-29 08:25:58 -05:00
|
|
|
| ---------------- | ----------------------------------------- |
|
2023-11-28 06:52:34 -05:00
|
|
|
| icon.js | The library itself. |
|
|
|
|
| index.js | Node.js example client. |
|
|
|
|
| gltf-exporter.js | Node.js client to export icons to glTF 2. |
|
|
|
|
| index.htm | HTML reference client. |
|
2023-12-18 09:03:51 -05:00
|
|
|
| lzari.js | A LZARI decompression-only library. |
|
2023-12-05 13:40:46 -05:00
|
|
|
|
|
|
|
## Included example files:
|
|
|
|
| Directory | Description | Formats |
|
|
|
|
| ------------ | ----------------------------------------- | -------- |
|
|
|
|
| /example_001 | A tetrahedron with all 3 base colors set. | PSU, SPS |
|