summaryrefslogtreecommitdiff
path: root/apps/codecs/libasap/asap.h
diff options
context:
space:
mode:
Diffstat (limited to 'apps/codecs/libasap/asap.h')
-rw-r--r--apps/codecs/libasap/asap.h204
1 files changed, 102 insertions, 102 deletions
diff --git a/apps/codecs/libasap/asap.h b/apps/codecs/libasap/asap.h
index 02f6e680f2..b43b3ce0c2 100644
--- a/apps/codecs/libasap/asap.h
+++ b/apps/codecs/libasap/asap.h
@@ -37,19 +37,19 @@ extern "C" {
37/* Short credits of the ASAP engine. */ 37/* Short credits of the ASAP engine. */
38#define ASAP_YEARS "2005-2010" 38#define ASAP_YEARS "2005-2010"
39#define ASAP_CREDITS \ 39#define ASAP_CREDITS \
40 "Another Slight Atari Player (C) 2005-2010 Piotr Fusik\n" \ 40 "Another Slight Atari Player (C) 2005-2010 Piotr Fusik\n" \
41 "CMC, MPT, TMC, TM2 players (C) 1994-2005 Marcin Lewandowski\n" \ 41 "CMC, MPT, TMC, TM2 players (C) 1994-2005 Marcin Lewandowski\n" \
42 "RMT player (C) 2002-2005 Radek Sterba\n" \ 42 "RMT player (C) 2002-2005 Radek Sterba\n" \
43 "DLT player (C) 2009 Marek Konopka\n" \ 43 "DLT player (C) 2009 Marek Konopka\n" \
44 "CMS player (C) 1999 David Spilka\n" 44 "CMS player (C) 1999 David Spilka\n"
45 45
46/* Short GPL notice. 46/* Short GPL notice.
47 Display after the credits. */ 47 Display after the credits. */
48#define ASAP_COPYRIGHT \ 48#define ASAP_COPYRIGHT \
49 "This program is free software; you can redistribute it and/or modify\n" \ 49 "This program is free software; you can redistribute it and/or modify\n" \
50 "it under the terms of the GNU General Public License as published\n" \ 50 "it under the terms of the GNU General Public License as published\n" \
51 "by the Free Software Foundation; either version 2 of the License,\n" \ 51 "by the Free Software Foundation; either version 2 of the License,\n" \
52 "or (at your option) any later version." 52 "or (at your option) any later version."
53 53
54/* Maximum length of AUTHOR, NAME and DATE tags including the terminator. */ 54/* Maximum length of AUTHOR, NAME and DATE tags including the terminator. */
55#define ASAP_INFO_CHARS 128 55#define ASAP_INFO_CHARS 128
@@ -72,9 +72,9 @@ extern "C" {
72 72
73/* Output formats. */ 73/* Output formats. */
74typedef enum { 74typedef enum {
75 ASAP_FORMAT_U8 = 8, /* unsigned char */ 75 ASAP_FORMAT_U8 = 8, /* unsigned char */
76 ASAP_FORMAT_S16_LE = 16, /* signed short, little-endian */ 76 ASAP_FORMAT_S16_LE = 16, /* signed short, little-endian */
77 ASAP_FORMAT_S16_BE = -16 /* signed short, big-endian */ 77 ASAP_FORMAT_S16_BE = -16 /* signed short, big-endian */
78} ASAP_SampleFormat; 78} ASAP_SampleFormat;
79 79
80/* Useful type definitions. */ 80/* Useful type definitions. */
@@ -89,106 +89,106 @@ typedef unsigned char byte;
89 89
90/* Information about a music file. */ 90/* Information about a music file. */
91typedef struct { 91typedef struct {
92 char author[ASAP_INFO_CHARS]; /* author's name */ 92 char author[ASAP_INFO_CHARS]; /* author's name */
93 char name[ASAP_INFO_CHARS]; /* title */ 93 char name[ASAP_INFO_CHARS]; /* title */
94 char date[ASAP_INFO_CHARS]; /* creation date */ 94 char date[ASAP_INFO_CHARS]; /* creation date */
95 int channels; /* 1 for mono or 2 for stereo */ 95 int channels; /* 1 for mono or 2 for stereo */
96 int songs; /* number of subsongs */ 96 int songs; /* number of subsongs */
97 int default_song; /* 0-based index of the "main" subsong */ 97 int default_song; /* 0-based index of the "main" subsong */
98 int durations[ASAP_SONGS_MAX]; /* lengths of songs, in milliseconds, -1 = indeterminate */ 98 int durations[ASAP_SONGS_MAX]; /* lengths of songs, in milliseconds, -1 = indeterminate */
99 abool loops[ASAP_SONGS_MAX]; /* whether songs repeat or not */ 99 abool loops[ASAP_SONGS_MAX]; /* whether songs repeat or not */
100 /* the following technical information should not be used outside ASAP. */ 100 /* the following technical information should not be used outside ASAP. */
101 int type; 101 int type;
102 int fastplay; 102 int fastplay;
103 int music; 103 int music;
104 int init; 104 int init;
105 int player; 105 int player;
106 int covox_addr; 106 int covox_addr;
107 int header_len; 107 int header_len;
108 byte song_pos[ASAP_SONGS_MAX]; 108 byte song_pos[ASAP_SONGS_MAX];
109} ASAP_ModuleInfo; 109} ASAP_ModuleInfo;
110 110
111/* POKEY state. 111/* POKEY state.
112 Not for use outside the ASAP engine. */ 112 Not for use outside the ASAP engine. */
113typedef struct { 113typedef struct {
114 int audctl; 114 int audctl;
115 abool init; 115 abool init;
116 int poly_index; 116 int poly_index;
117 int div_cycles; 117 int div_cycles;
118 int mute1; 118 int mute1;
119 int mute2; 119 int mute2;
120 int mute3; 120 int mute3;
121 int mute4; 121 int mute4;
122 int audf1; 122 int audf1;
123 int audf2; 123 int audf2;
124 int audf3; 124 int audf3;
125 int audf4; 125 int audf4;
126 int audc1; 126 int audc1;
127 int audc2; 127 int audc2;
128 int audc3; 128 int audc3;
129 int audc4; 129 int audc4;
130 int tick_cycle1; 130 int tick_cycle1;
131 int tick_cycle2; 131 int tick_cycle2;
132 int tick_cycle3; 132 int tick_cycle3;
133 int tick_cycle4; 133 int tick_cycle4;
134 int period_cycles1; 134 int period_cycles1;
135 int period_cycles2; 135 int period_cycles2;
136 int period_cycles3; 136 int period_cycles3;
137 int period_cycles4; 137 int period_cycles4;
138 int reload_cycles1; 138 int reload_cycles1;
139 int reload_cycles3; 139 int reload_cycles3;
140 int out1; 140 int out1;
141 int out2; 141 int out2;
142 int out3; 142 int out3;
143 int out4; 143 int out4;
144 int delta1; 144 int delta1;
145 int delta2; 145 int delta2;
146 int delta3; 146 int delta3;
147 int delta4; 147 int delta4;
148 int skctl; 148 int skctl;
149 int delta_buffer[888]; 149 int delta_buffer[888];
150} PokeyState; 150} PokeyState;
151 151
152/* Player state. 152/* Player state.
153 Only module_info is meant to be read outside the ASAP engine. */ 153 Only module_info is meant to be read outside the ASAP engine. */
154typedef struct { 154typedef struct {
155 int cycle; 155 int cycle;
156 int cpu_pc; 156 int cpu_pc;
157 int cpu_a; 157 int cpu_a;
158 int cpu_x; 158 int cpu_x;
159 int cpu_y; 159 int cpu_y;
160 int cpu_s; 160 int cpu_s;
161 int cpu_nz; 161 int cpu_nz;
162 int cpu_c; 162 int cpu_c;
163 int cpu_vdi; 163 int cpu_vdi;
164 int scanline_number; 164 int scanline_number;
165 int nearest_event_cycle; 165 int nearest_event_cycle;
166 int next_scanline_cycle; 166 int next_scanline_cycle;
167 int timer1_cycle; 167 int timer1_cycle;
168 int timer2_cycle; 168 int timer2_cycle;
169 int timer4_cycle; 169 int timer4_cycle;
170 int irqst; 170 int irqst;
171 int extra_pokey_mask; 171 int extra_pokey_mask;
172 int consol; 172 int consol;
173 byte covox[4]; 173 byte covox[4];
174 PokeyState base_pokey; 174 PokeyState base_pokey;
175 PokeyState extra_pokey; 175 PokeyState extra_pokey;
176 int sample_offset; 176 int sample_offset;
177 int sample_index; 177 int sample_index;
178 int samples; 178 int samples;
179 int iir_acc_left; 179 int iir_acc_left;
180 int iir_acc_right; 180 int iir_acc_right;
181 ASAP_ModuleInfo module_info; 181 ASAP_ModuleInfo module_info;
182 int tmc_per_frame; 182 int tmc_per_frame;
183 int tmc_per_frame_counter; 183 int tmc_per_frame_counter;
184 int current_song; 184 int current_song;
185 int current_duration; 185 int current_duration;
186 int blocks_played; 186 int blocks_played;
187 int silence_cycles; 187 int silence_cycles;
188 int silence_cycles_counter; 188 int silence_cycles_counter;
189 byte poly9_lookup[511]; 189 byte poly9_lookup[511];
190 byte poly17_lookup[16385]; 190 byte poly17_lookup[16385];
191 byte memory[65536]; 191 byte memory[65536];
192} ASAP_State; 192} ASAP_State;
193 193
194/* Parses the string in the "mm:ss.xxx" format 194/* Parses the string in the "mm:ss.xxx" format