summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBad Diode <bd@badd10de.dev>2021-06-11 18:25:16 +0200
committerBad Diode <bd@badd10de.dev>2021-06-11 18:25:16 +0200
commitc4fc5e9607ab9cc4bab7cfecfda12ae378b1e2d7 (patch)
tree86f057db494551c779a2d6952b33ce750e1d7389
parent8047b0c5b14ddfdef83d8a9b5d978947614ea80b (diff)
downloadgba-sequencer-c4fc5e9607ab9cc4bab7cfecfda12ae378b1e2d7.tar.gz
gba-sequencer-c4fc5e9607ab9cc4bab7cfecfda12ae378b1e2d7.zip
Limit wave_mode to A, B or A+B
-rw-r--r--src/sequencer.c13
1 files changed, 1 insertions, 12 deletions
diff --git a/src/sequencer.c b/src/sequencer.c
index d3e6858..31d5490 100644
--- a/src/sequencer.c
+++ b/src/sequencer.c
@@ -734,9 +734,6 @@ draw_parameters_ch3(void) {
734 case 2: { 734 case 2: {
735 txt_drawf("A+B", x + 6, y + 8, 6, COL_FG); 735 txt_drawf("A+B", x + 6, y + 8, 6, COL_FG);
736 } break; 736 } break;
737 case 3: {
738 txt_drawf("B+A", x + 6, y + 8, 6, COL_FG);
739 } break;
740 } 737 }
741 } 738 }
742 739
@@ -846,14 +843,6 @@ irq_timer(void) {
846 SOUND_WAVE_MODE = SOUND_WAVE_BANK_MODE(1) 843 SOUND_WAVE_MODE = SOUND_WAVE_BANK_MODE(1)
847 | SOUND_WAVE_BANK_SELECT(0); 844 | SOUND_WAVE_BANK_SELECT(0);
848 } break; 845 } break;
849 case 3: {
850 SOUND_WAVE_MODE = SOUND_WAVE_BANK_SELECT(1);
851 memcpy32(SOUND_WAVE_RAM, params->wave_a, 16);
852 SOUND_WAVE_MODE = SOUND_WAVE_BANK_SELECT(0);
853 memcpy32(SOUND_WAVE_RAM, params->wave_b, 16);
854 SOUND_WAVE_MODE = SOUND_WAVE_BANK_MODE(1)
855 | SOUND_WAVE_BANK_SELECT(1);
856 } break;
857 } 846 }
858 SOUND_WAVE_MODE |= SOUND_WAVE_ENABLE; 847 SOUND_WAVE_MODE |= SOUND_WAVE_ENABLE;
859 848
@@ -1272,7 +1261,7 @@ handle_param_selection_ch3(void) {
1272 } 1261 }
1273 } else if (param_selection_loc == 72) { 1262 } else if (param_selection_loc == 72) {
1274 u8 *wave_mode = &ch3.params[trig_selection_loc].wave_mode; 1263 u8 *wave_mode = &ch3.params[trig_selection_loc].wave_mode;
1275 *wave_mode = CLAMP(*wave_mode + inc, 0, 3); 1264 *wave_mode = CLAMP(*wave_mode + inc, 0, 2);
1276 } else if (param_selection_loc == 73) { 1265 } else if (param_selection_loc == 73) {
1277 u8 *wave_volume = &ch3.params[trig_selection_loc].wave_volume; 1266 u8 *wave_volume = &ch3.params[trig_selection_loc].wave_volume;
1278 *wave_volume = CLAMP(*wave_volume + inc, 0, 4); 1267 *wave_volume = CLAMP(*wave_volume + inc, 0, 4);