From: Nathaniel Wesley Filardo Date: Sun, 21 Feb 2010 02:56:43 +0000 (-0500) Subject: Move some target/main.c definitions to progenv/ X-Git-Url: https://hydra-www.ietfng.org/gitweb/?a=commitdiff_plain;h=0dba54cc28fd50a13daa70918f5598466dd5dd0d;p=acmetensortoys-chiptunes Move some target/main.c definitions to progenv/ --- diff --git a/target/main.c b/target/main.c index fac68d6..3e354e1 100644 --- a/target/main.c +++ b/target/main.c @@ -4,11 +4,8 @@ #define TRACKLEN 32 -typedef unsigned char u8; -typedef unsigned short u16; -typedef char s8; -typedef short s16; -typedef unsigned long u32; +#include +#include volatile u8 callbackwait; volatile u8 lastsample; @@ -29,40 +26,6 @@ u8 light[2]; #include "../tracker/exported.h" -/*const u16 freqtable[] = { - 0x010b, 0x011b, 0x012c, 0x013e, 0x0151, 0x0165, 0x017a, 0x0191, 0x01a9, - 0x01c2, 0x01dd, 0x01f9, 0x0217, 0x0237, 0x0259, 0x027d, 0x02a3, 0x02cb, - 0x02f5, 0x0322, 0x0352, 0x0385, 0x03ba, 0x03f3, 0x042f, 0x046f, 0x04b2, - 0x04fa, 0x0546, 0x0596, 0x05eb, 0x0645, 0x06a5, 0x070a, 0x0775, 0x07e6, - 0x085f, 0x08de, 0x0965, 0x09f4, 0x0a8c, 0x0b2c, 0x0bd6, 0x0c8b, 0x0d4a, - 0x0e14, 0x0eea, 0x0fcd, 0x10be, 0x11bd, 0x12cb, 0x13e9, 0x1518, 0x1659, - 0x17ad, 0x1916, 0x1a94, 0x1c28, 0x1dd5, 0x1f9b, 0x217c, 0x237a, 0x2596, - 0x27d3, 0x2a31, 0x2cb3, 0x2f5b, 0x322c, 0x3528, 0x3851, 0x3bab, 0x3f37, - 0x42f9, 0x46f5, 0x4b2d, 0x4fa6, 0x5462, 0x5967, 0x5eb7, 0x6459, 0x6a51, - 0x70a3, 0x7756, 0x7e6f -};*/ - -const u16 freqtable[] = { - 0x0085, 0x008d, 0x0096, 0x009f, 0x00a8, 0x00b2, 0x00bd, 0x00c8, 0x00d4, - 0x00e1, 0x00ee, 0x00fc, 0x010b, 0x011b, 0x012c, 0x013e, 0x0151, 0x0165, - 0x017a, 0x0191, 0x01a9, 0x01c2, 0x01dd, 0x01f9, 0x0217, 0x0237, 0x0259, - 0x027d, 0x02a3, 0x02cb, 0x02f5, 0x0322, 0x0352, 0x0385, 0x03ba, 0x03f3, - 0x042f, 0x046f, 0x04b2, 0x04fa, 0x0546, 0x0596, 0x05eb, 0x0645, 0x06a5, - 0x070a, 0x0775, 0x07e6, 0x085f, 0x08de, 0x0965, 0x09f4, 0x0a8c, 0x0b2c, - 0x0bd6, 0x0c8b, 0x0d4a, 0x0e14, 0x0eea, 0x0fcd, 0x10be, 0x11bd, 0x12cb, - 0x13e9, 0x1518, 0x1659, 0x17ad, 0x1916, 0x1a94, 0x1c28, 0x1dd5, 0x1f9b, - 0x217c, 0x237a, 0x2596, 0x27d3, 0x2a31, 0x2cb3, 0x2f5b, 0x322c, 0x3528, - 0x3851, 0x3bab, 0x3f37 -}; - -const s8 sinetable[] = { - 0, 12, 25, 37, 49, 60, 71, 81, 90, 98, 106, 112, 117, 122, 125, 126, - 127, 126, 125, 122, 117, 112, 106, 98, 90, 81, 71, 60, 49, 37, 25, 12, - 0, -12, -25, -37, -49, -60, -71, -81, -90, -98, -106, -112, -117, -122, - -125, -126, -127, -126, -125, -122, -117, -112, -106, -98, -90, -81, - -71, -60, -49, -37, -25, -12 -}; - const u8 validcmds[] = "0dfijlmtvw~+="; enum {