From 8e92156bc6a977651771d2cf91ac5800a0e9a913 Mon Sep 17 00:00:00 2001 From: spicyjpeg Date: Tue, 11 Oct 2022 15:39:36 +0200 Subject: Update preset files, README, docs and changelog --- examples/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'examples/README.md') diff --git a/examples/README.md b/examples/README.md index 82d7698..b63b2a9 100644 --- a/examples/README.md +++ b/examples/README.md @@ -48,7 +48,7 @@ Notes: ## Building the examples -The instructions below assume that PSn00bSDK, CMake 3.20+ and a GCC toolchain +The instructions below assume that PSn00bSDK, CMake 3.21+ and a GCC toolchain are already installed. Refer to the [installation guide](../doc/installation.md) for details. @@ -84,4 +84,4 @@ are for rebuilding the examples *after* the SDK has been installed. CD images for each example. ----------------------------------------- -_Last updated on 2022-08-11 by spicyjpeg_ +_Last updated on 2022-10-11 by spicyjpeg_ -- cgit v1.2.3 From 8770122c970eeedb145ee903e2243b7d4a18605b Mon Sep 17 00:00:00 2001 From: spicyjpeg Date: Sun, 16 Oct 2022 23:58:05 +0200 Subject: Fix sound/spustream, update README and changelog --- CHANGELOG.md | 23 +++++++++++++++++- examples/README.md | 11 +++++---- examples/io/pads/spi.c | 6 ++--- examples/sound/spustream/main.c | 12 +++++---- template/iso.xml | 54 ++++++++++++++++++++++++++++++++++++++++- 5 files changed, 91 insertions(+), 15 deletions(-) (limited to 'examples/README.md') diff --git a/CHANGELOG.md b/CHANGELOG.md index 3f04108..461d2b8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,7 +19,28 @@ to ensure the changelog can be parsed correctly. ------------------------------------------------------------------------------- -## 2022-10-11: 0.21 +## 2022-10-16: 0.21 + +spicyjpeg: + +- psxetc: Fixed (another) critical bug in the IRQ callback dispatcher. This + also fixed some examples that were broken ever since the library was + rewritten in C. Made the dynamic linker less verbose, improving DLL loading + speed in debug mode. + +- psxcd: Added `CdDataSync()`. Renamed `CdlModeSize0` and `CdlModeSize1` to + `CdlModeIgnore` and `CdlModeSize` respectively. + +- psxpress: Fixed a bug in the Huffman decompression API that would make it + crash if the bitstream header didn't contain a valid decompressed length, + even if the bitstream was properly encoded. This fix makes the API fully + usable for video playback (as demonstrated by the new example). + +- examples: Added `mdec/strvideo` FMV playback example. Fixed + `system/childexec` not properly uninstalling BIOS callbacks before launching + the child executable. Added pause/resume code to `sound/spustream`. + +## 2022-10-11 spicyjpeg: diff --git a/examples/README.md b/examples/README.md index b63b2a9..ade94b0 100644 --- a/examples/README.md +++ b/examples/README.md @@ -24,7 +24,8 @@ Additional information may be found in the source code of each example. | [`io/pads`](./io/pads) | Demonstrates reading controllers via low-level access | EXE | 3 | | [`io/system573`](./io/system573) | Konami System 573 (PS1-based arcade board) example | CD | | | [`lowlevel/cartrom`](./lowlevel/cartrom) | ROM firmware for cheat devices written using GNU GAS | ROM | 4 | -| [`mdec/mdecimage`](./mdec/mdecimage) | Displays a (raw) MDEC format image using libpsxpress | EXE | | +| [`mdec/mdecimage`](./mdec/mdecimage) | Displays a (raw) MDEC format image | EXE | | +| [`mdec/strvideo`](./mdec/strvideo) | Plays a .STR video file using the MDEC | CD | 1 | | [`sound/spustream`](./sound/spustream) | Custom (non XA) CD-ROM audio streaming using the SPU | CD | | | [`sound/vagsample`](./sound/vagsample) | Demonstrates playing VAG sound files using the SPU | EXE | | | [`system/childexec`](./system/childexec) | Loading a child program and returning to parent | EXE | | @@ -35,9 +36,9 @@ Additional information may be found in the source code of each example. Notes: -1. `cdrom/cdxa` does not come with an example XA audio file. In order to run - this example you'll have to provide your own file and build the CD image - manually. +1. `cdrom/cdxa` and `mdec/strvideo` do not come with example files. In order + to run these examples you'll have to provide your own files and build the CD + image manually. 2. `demos/n00bdemo` suffers from flickering on real hardware, especially when masking/stencil buffering is used. 3. `io/pads` seems to work on real hardware, but fails to automatically enable @@ -84,4 +85,4 @@ are for rebuilding the examples *after* the SDK has been installed. CD images for each example. ----------------------------------------- -_Last updated on 2022-10-11 by spicyjpeg_ +_Last updated on 2022-10-16 by spicyjpeg_ diff --git a/examples/io/pads/spi.c b/examples/io/pads/spi.c index 133782c..292e682 100644 --- a/examples/io/pads/spi.c +++ b/examples/io/pads/spi.c @@ -46,9 +46,9 @@ typedef struct _SPI_Context { SPI_Callback callback; } SPI_Context; -static volatile SPI_Context _context; -static volatile SPI_Request volatile *_current_req; -static volatile SPI_Callback _default_cb; +static volatile SPI_Context _context; +static volatile SPI_Request *_current_req; +static volatile SPI_Callback _default_cb; /* Request queue management */ diff --git a/examples/sound/spustream/main.c b/examples/sound/spustream/main.c index acd4f60..1fee883 100644 --- a/examples/sound/spustream/main.c +++ b/examples/sound/spustream/main.c @@ -181,12 +181,14 @@ void display(RenderContext *ctx) { #define CHUNK_SIZE (BUFFER_SIZE * NUM_CHANNELS) typedef struct { - int lba, length, pos; - int spu_addr, spu_pos; - int db_active; + int lba, length; + + volatile int pos; + volatile int spu_addr, spu_pos; + volatile int db_active; } StreamContext; -static volatile StreamContext str_ctx; +static StreamContext str_ctx; // This buffer is used by cd_event_handler() as a temporary area for sectors // read from the CD and uploaded to SPU RAM. Due to DMA limitations it can't be @@ -328,8 +330,8 @@ void start_stream(void) { SPU_CH_VOL_L(1) = 0x0000; SPU_CH_VOL_R(1) = 0x3fff; - spu_irq_handler(); SPU_KEY_ON = CHANNEL_MASK; + spu_irq_handler(); } // This is basically a variant of reset_spu_channels() that only resets the diff --git a/template/iso.xml b/template/iso.xml index 87162b2..29fbd2d 100644 --- a/template/iso.xml +++ b/template/iso.xml @@ -11,6 +11,21 @@ cue_sheet="${CD_IMAGE_NAME}.cue" > + + + + + + - + + -- cgit v1.2.3