1 #ifndef GCOMMON_H 2 #define GCOMMON_H 3 4 #define CMD_DONOTHING 0 5 #define CMD_PORTAUP 1 6 #define CMD_PORTADOWN 2 7 #define CMD_TONEPORTA 3 8 #define CMD_VIBRATO 4 9 #define CMD_SETAD 5 10 #define CMD_SETSR 6 11 #define CMD_SETWAVE 7 12 #define CMD_SETWAVEPTR 8 13 #define CMD_SETPULSEPTR 9 14 #define CMD_SETFILTERPTR 10 15 #define CMD_SETFILTERCTRL 11 16 #define CMD_SETFILTERCUTOFF 12 17 #define CMD_SETMASTERVOL 13 18 #define CMD_FUNKTEMPO 14 19 #define CMD_SETTEMPO 15 20 21 #define WTBL 0 22 #define PTBL 1 23 #define FTBL 2 24 #define STBL 3 25 26 #define MAX_FILT 64 27 #define MAX_STR 32 28 #define MAX_INSTR 64 29 #define MAX_CHN 3 30 #define MAX_PATT 208 31 #define MAX_TABLES 4 32 #define MAX_TABLELEN 255 33 #define MAX_INSTRNAMELEN 16 34 #define MAX_PATTROWS 128 35 #define MAX_SONGLEN 254 36 #define MAX_SONGS 32 37 #define MAX_NOTES 96 38 39 #define REPEAT 0xd0 40 #define TRANSDOWN 0xe0 41 #define TRANSUP 0xf0 42 #define LOOPSONG 0xff 43 44 #define ENDPATT 0xff 45 #define INSTRCHG 0x00 46 #define FX 0x40 47 #define FXONLY 0x50 48 #define FIRSTNOTE 0x60 49 #define LASTNOTE 0xbc 50 #define REST 0xbd 51 #define KEYOFF 0xbe 52 #define KEYON 0xbf 53 #define OLDKEYOFF 0x5e 54 #define OLDREST 0x5f 55 56 #define WAVEDELAY 0x1 57 #define WAVELASTDELAY 0xf 58 #define WAVESILENT 0xe0 59 #define WAVELASTSILENT 0xef 60 #define WAVECMD 0xf0 61 #define WAVELASTCMD 0xfe 62 63 typedef struct 64 { 65 unsigned char ad; 66 unsigned char sr; 67 unsigned char ptr[MAX_TABLES]; 68 unsigned char vibdelay; 69 unsigned char gatetimer; 70 unsigned char firstwave; 71 char name[MAX_INSTRNAMELEN]; 72 } INSTR; 73 74 #endif 75 76