From 4771c84572008a223b1f35f6b2cb1d8b92bb2083 Mon Sep 17 00:00:00 2001 From: Bad Diode Date: Mon, 24 Apr 2023 17:31:17 +0200 Subject: Fix SRAM bug due to exceeding 32KB capacity This means that currently the global channel parameters are not saved, but this is kind of unimportant, since they are just used to change all the triggers. In the future we may choose to discard a pattern, a bank or compress the data before storing it on the SRAM, depending on how much more data we need to save. --- src/patterns.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'src/patterns.c') diff --git a/src/patterns.c b/src/patterns.c index dbd9c9f..6ce0878 100644 --- a/src/patterns.c +++ b/src/patterns.c @@ -34,19 +34,19 @@ typedef struct ChannelNoiseParams { typedef struct ChannelSquare { bool active; TriggerNote notes[16]; - ChannelSquareParams params[17]; + ChannelSquareParams params[16]; } ChannelSquare; typedef struct ChannelWave { bool active; TriggerNote notes[16]; - ChannelWaveParams params[17]; + ChannelWaveParams params[16]; } ChannelWave; typedef struct ChannelNoise { bool active; TriggerNote notes[16]; - ChannelNoiseParams params[17]; + ChannelNoiseParams params[16]; } ChannelNoise; typedef struct Pattern { @@ -58,6 +58,11 @@ typedef struct Pattern { u8 bank; } Pattern; +static ChannelSquareParams ch1_params = {0}; +static ChannelSquareParams ch2_params = {0}; +static ChannelWaveParams ch3_params = {0}; +static ChannelNoiseParams ch4_params = {0}; + // // Defaults. // -- cgit v1.2.1