aboutsummaryrefslogtreecommitdiff
path: root/sound.c
diff options
context:
space:
mode:
authorJuan J. Martinez <jjm@usebox.net>2021-05-03 08:21:10 +0100
committerJuan J. Martinez <jjm@usebox.net>2021-05-03 10:00:00 +0100
commitc3b0fa04a663fe233765b83d3be41a42aa08c25d (patch)
tree0befda349001ef6ce306b39378f9c70ad917363e /sound.c
downloadreturn-of-traxtor-cpc-c3b0fa04a663fe233765b83d3be41a42aa08c25d.tar.gz
return-of-traxtor-cpc-c3b0fa04a663fe233765b83d3be41a42aa08c25d.zip
Initial import for public releaseHEADmain
Diffstat (limited to 'sound.c')
-rw-r--r--sound.c40
1 files changed, 40 insertions, 0 deletions
diff --git a/sound.c b/sound.c
new file mode 100644
index 0000000..aacdd22
--- /dev/null
+++ b/sound.c
@@ -0,0 +1,40 @@
+/*
+ The Return of Traxtor (Amstrad CPC)
+ Copyright (C) 2015 Juan J. Martinez <jjm@usebox.net>
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <https://www.gnu.org/licenses/>.
+ */
+#include <stdint.h>
+
+#include "theplayer_mus.h"
+#include "intro_mus.h"
+
+const uint8_t effect0[] = { 0xc2, 0x0e, 0xc2, 0x0e, 0x61, 0x0d, 0x61, 0x0d, 0x23, 0x1c, 0x23, 0x1c, 0xc2, 0x0c, 0xc2, 0x0c, 0x61, 0x0b, 0x61, 0x0b, 0x23, 0x1b, 0x23, 0x1b, 0xc2, 0x0a, 0xc2, 0x0a, 0x61, 0x0a, 0x61, 0x0a, 0x23, 0x19, 0x23, 0x19, 0xc2, 0x09, 0xc2, 0x09, 0x61, 0x08, 0x61, 0x08, 0x23, 0x18, 0x23, 0x18, 0xc2, 0x07, 0xc2, 0x07, 0x61, 0x07, 0x61, 0x07, 0x23, 0x16, 0x23, 0x16, 0xc2, 0x06, 0xc2, 0x06, 0x61, 0x05, 0x61, 0x05, 0x23, 0x15, 0x23, 0x15, 0xc2, 0x04, 0xc2, 0x04, 0x61, 0x04, 0x61, 0x04, 0x23, 0x13, 0x23, 0x13, 0xc2, 0x03, 0xc2, 0x03, 0x61, 0x02, 0x61, 0x02, 0x23, 0x12, 0x23, 0x12, 0xc2, 0x01, 0xc2, 0x01, 0xff };
+const uint8_t effect1[] = { 0x20, 0x9e, 0x50, 0x7e, 0xb6, 0x4e, 0x3d, 0x2d, 0xdb, 0x4d, 0x48, 0x6b, 0xd5, 0x8a, 0xff };
+const uint8_t effect2[] = { 0x0c, 0x1a, 0x94, 0x1a, 0x0c, 0x1a, 0x94, 0x1a, 0x0c, 0x1a, 0x94, 0x1a, 0xff };
+const uint8_t effect3[] = { 0x68, 0x0d, 0x72, 0x0c, 0x7c, 0x0b, 0x5e, 0x0a, 0x68, 0x09, 0x72, 0x08, 0x7c, 0x07, 0x5e, 0x06, 0x68, 0x05, 0x72, 0x04, 0x7c, 0x03, 0x5e, 0x02, 0xff };
+const uint8_t effect4[] = { 0x0c, 0x2b, 0x94, 0x2b, 0x0c, 0x28, 0x94, 0x28, 0x0c, 0x26, 0x94, 0x26, 0xff };
+const uint8_t *wyz_effect_table[] = { effect0, effect1, effect2, effect3, effect4 };
+
+const uint8_t ins0[] = { 14, 0, 11, 0, 10, 0, 129 }; // bass
+const uint8_t ins1[] = { 13, 0, 11, 0, 41, 0, 9, 0, 73, 0, 9, 0, 132 }; // lead
+const uint8_t ins2[] = { 13, 0, 9, 0, 5, 0, 129 }; // bass low vol
+const uint8_t *wyz_ins_table[] = { ins0, ins1, ins2 };
+
+const uint8_t sound0[] = { 189, 14, 31, 146, 9, 31, 255 };
+const uint8_t sound1[] = { 9, 110, 0, 30, 122, 0, 255 };
+const uint8_t sound2[] = { 194, 62, 1, 76, 92, 1, 255 };
+const uint8_t *wyz_sound_table[] = { sound0, sound1, sound2 };
+
+const uint8_t *wyz_song_table[] = { (const uint8_t *)7000, theplayer_mus, intro_mus };