aboutsummaryrefslogtreecommitdiff
path: root/libpsn00b
diff options
context:
space:
mode:
authorspicyjpeg <thatspicyjpeg@gmail.com>2022-09-21 23:49:20 +0200
committerspicyjpeg <thatspicyjpeg@gmail.com>2022-09-21 23:49:20 +0200
commit5746b6ef9df16447d78e77d00ad21a4dba0fe169 (patch)
treef749fc834da08660d878d0319a932e33dcc56a23 /libpsn00b
parentf2e946cc0f9730c0da56aae533b3429a0381003e (diff)
downloadpsn00bsdk-5746b6ef9df16447d78e77d00ad21a4dba0fe169.tar.gz
Bump GCC to 12.2.0, update docs and installation guide
Diffstat (limited to 'libpsn00b')
-rw-r--r--libpsn00b/psxpress/README.md42
1 files changed, 42 insertions, 0 deletions
diff --git a/libpsn00b/psxpress/README.md b/libpsn00b/psxpress/README.md
new file mode 100644
index 0000000..a894874
--- /dev/null
+++ b/libpsn00b/psxpress/README.md
@@ -0,0 +1,42 @@
+
+# PSn00bSDK MDEC library
+
+This is a fully open source reimplementation of the official SDK's "data
+compression" library. This library is made up of two parts, the MDEC API and
+functions to decompress Huffman-encoded bitstreams (.BS files, or frames in
+.STR files) into data to be fed to the MDEC. FMV playback is not part of this
+library (nor the official one) per se, but can implemented by using these APIs
+alongside some code to stream data from the CD drive.
+
+**Currently only version 1 and 2 bitstreams are supported**.
+
+## MDEC API
+
+The MDEC data input/output API is almost identical to the official one, with
+only two minor differences:
+
+- `DecDCTPutEnv()` takes a second argument specifying whether the MDEC shall be
+ put into monochrome or color mode (the original API only supported color).
+- A `DecDCTinRaw()` function was added for easier feeding of headerless data
+ buffers to the MDEC. This function does not affect how `DecDCTin()` works.
+
+## Decompression API
+
+The following functions are currently provided:
+
+- `DecDCTvlcStart()`, `DecDCTvlcContinue()`: a decompressor implementation that
+ uses a small (<1 KB) lookup table and leverages the GTE, written in assembly.
+ `DecDCTvlcCopyTable()` can optionally be called to temporarily move the table
+ to the scratchpad region to improve decompression speed.
+- `DecDCTvlcStart2()`, `DecDCTvlcContinue2()`: a different implementation using
+ a large (34 KB) lookup table in main RAM, written in C. The table must be
+ decompressed ahead of time using `DecDCTvlcBuild()`, but can be deallocated
+ when no longer needed.
+- `DecDCTvlc()`, `DecDCTvlc2()`: wrappers around the functions listed above,
+ for compatibility with the Sony SDK. Using them is not recommended.
+
+## SPU ADPCM encoding API
+
+The Sony library has functions that can be used to convert raw 16-bit PCM audio
+data to SPU ADPCM. These are currently unimplemented due to their limited
+usefulness, but might be added at some point.