From 53752655a52a8d9a6aaf96aa6cd858c85963b825 Mon Sep 17 00:00:00 2001 From: n-a-c-h <> Date: Thu, 24 Feb 2005 14:00:26 +0000 Subject: [PATCH] Fix crashing on reset. --- zsnes/src/chips/dsp4emu.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/zsnes/src/chips/dsp4emu.c b/zsnes/src/chips/dsp4emu.c index a8f2c94e..157adbed 100644 --- a/zsnes/src/chips/dsp4emu.c +++ b/zsnes/src/chips/dsp4emu.c @@ -63,6 +63,8 @@ struct uint8 output[512]; } DSP4; +//Todo: get all of this into a struct for easy save stating + // op control int8 DSP4_Logic; // controls op flow @@ -2267,7 +2269,7 @@ void DSP4GetByte() { if (DSP4.out_count) { - dsp4_byte = (uint8) DSP4.output[DSP4.out_index]; + dsp4_byte = (uint8) DSP4.output[DSP4.out_index&0x1FF]; DSP4.out_index++; if (DSP4.out_count == DSP4.out_index) DSP4.out_count = 0;