mirror of
https://github.com/libretro/parallel-ps2.git
synced 2026-11-10 03:11:38 -10:00
The flat, CSO, CHD and gzip readers, the image layer above them and the ISO API are C89. A sector is lent where the reader holds it - the mapping, a cached chunk, or a stored CSO frame in the mapping - and copied once, into the drive's buffer; the drive's fetched sector is kept aside only if another read comes before its hand-over. The chunk cache keeps eight chunks, least recently used out, so interleaved streams keep theirs. A gzip chunk is 2 MiB decoded from the access point before it, not a whole 4 MiB span, and a read that follows the live stream goes on from it with its input still buffered. tests/cdvdread is C89 and adds CHD DVD and CD images (chdman), three interleaved streams, a read between the drive's fetch and its hand-over, and readSector's modes through CDVDapi_Iso.