summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDominik Wenger <domonoky@googlemail.com>2008-07-26 15:10:26 +0000
committerDominik Wenger <domonoky@googlemail.com>2008-07-26 15:10:26 +0000
commit4e4bf82fb756f36dca6af333357a54e09b9f4cca (patch)
tree33c98986cf95773a8a304c393f389065ec7ddb0e
parent43b11af169133572802bf19078eaac351c3bc140 (diff)
downloadrockbox-4e4bf82fb756f36dca6af333357a54e09b9f4cca.tar.gz
rockbox-4e4bf82fb756f36dca6af333357a54e09b9f4cca.zip
import ASAP codec (http://asap.sourceforge.net/). Plays Amiga 8bit Sound. (.sap and more formats).
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18120 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--apps/codecs/asap/CREDITS37
-rw-r--r--apps/codecs/asap/README59
-rw-r--r--apps/codecs/asap/acpu.c1262
-rw-r--r--apps/codecs/asap/apokeysnd.c537
-rw-r--r--apps/codecs/asap/asap.c2000
-rw-r--r--apps/codecs/asap/asap.h299
-rw-r--r--apps/codecs/asap/asap_internal.h93
-rw-r--r--apps/codecs/asap/players.h947
8 files changed, 5234 insertions, 0 deletions
diff --git a/apps/codecs/asap/CREDITS b/apps/codecs/asap/CREDITS
new file mode 100644
index 0000000000..97d41067fe
--- /dev/null
+++ b/apps/codecs/asap/CREDITS
@@ -0,0 +1,37 @@
1People who have contributed to ASAP
2-----------------------------------
3
4Atari800 Development Team (http://atari800.sourceforge.net)
5* 6502 and POKEY emulation used in 0.x.y versions of ASAP
6
7Zdenek Eisenhammer <pg@pinknet.cz>
8* testing
9
10Piotr Fusik <fox@scene.pl>
11* author and maintainer of ASAP
12
13Maciek Konecki <maciusk1@wp.pl>
14* porting to C#
15
16Marcin Lewandowski <jaskier@atari8.info>
17* 6502 routines for playing CMC, MPT, TMC and TM2
18
19Perry McFarlane <perry_m@fastmail.fm>
20* POKEY reverse-engineering
21
22Kostas Nakos <knakos@gmail.com>
23* compilation for Windows CE
24
25Slawomir Sledz <slaves@scene.pl>
26* testing
27
28Radek Sterba <raster@infos.cz>
29* 6502 routine for playing RMT
30* testing
31
32Lukasz Sychowicz <xray@scene.pl>
33* Windows icons
34* testing
35
36Michal Szpilowski <miker@atari.pl>
37* testing
diff --git a/apps/codecs/asap/README b/apps/codecs/asap/README
new file mode 100644
index 0000000000..d43a872b25
--- /dev/null
+++ b/apps/codecs/asap/README
@@ -0,0 +1,59 @@
1ASAP - Another Slight Atari Player
2----------------------------------
3
4ASAP is a player of Atari 8-bit music for modern computers.
5It emulates the POKEY sound chip and the 6502 processor.
6The project was initially based on the routines from the Atari800 emulator,
7but the current version has a completely new original emulation core.
8
9The ASAP project includes the following programs:
10* ASAP2WAV - portable command-line utility that generates WAV files
11* WASAP - tiny player for Windows
12* plugin for Apollo
13* plugin for foobar2000 0.9
14* plugin for GSPlayer
15* plugin for MOC
16* plugin for Winamp
17* plugin for XMMS
18* DirectShow source filter (for Windows Media Player)
19* Java version of ASAP2WAV
20* Java applet
21* Java midlet
22* C# version of ASAP2WAV
23
24The following input formats are supported:
25* SAP (Slight Atari Player - standard file format for playing Atari 8-bit
26 music on modern computers)
27* CMC (Chaos Music Composer)
28* CMR (CMC Rzog)
29* DMC (DoublePlay CMC)
30* MPT (Music ProTracker)
31* MPD (MPT DoublePlay)
32* RMT (Raster Music Tracker)
33* TMC, TM8 (Theta Music Composer 1.x)
34* TM2 (Theta Music Composer 2.x)
35
36If you are looking for Atari 8-bit music, there is a single big collection
37of it called Atari SAP Music Archive (http://asma.atari.org).
38
39If you are interested in the ASAP project, please subscribe its mailing list:
40https://lists.sourceforge.net/lists/listinfo/asap-users
41As in the Atari800 project, this is a combined list for end users
42and for developers. Once you subscribe, you can post comments, ideas
43and questions about ASAP. They will be answered ASAP. ;-)
44
45If, for some reason, you do not want to subscribe the mailing list,
46but have a bug report, feature request or a small code patch, you can use
47the sf.net tracker. Use "Bugs", "Feature Requests" or "Patches" link
48on this page:
49http://sourceforge.net/projects/asap/
50
51ASAP is free software; you can redistribute it and/or modify it
52under the terms of the GNU General Public License as published
53by the Free Software Foundation; either version 2 of the License,
54or (at your option) any later version.
55
56ASAP is distributed in the hope that it will be useful,
57but WITHOUT ANY WARRANTY; without even the implied warranty
58of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
59See the included GNU General Public License for more details.
diff --git a/apps/codecs/asap/acpu.c b/apps/codecs/asap/acpu.c
new file mode 100644
index 0000000000..a4def24371
--- /dev/null
+++ b/apps/codecs/asap/acpu.c
@@ -0,0 +1,1262 @@
1/*
2 * acpu.c - another 6502 CPU emulator
3 *
4 * Copyright (C) 2007-2008 Piotr Fusik
5 *
6 * This file is part of ASAP (Another Slight Atari Player),
7 * see http://asap.sourceforge.net
8 *
9 * ASAP is free software; you can redistribute it and/or modify it
10 * under the terms of the GNU General Public License as published
11 * by the Free Software Foundation; either version 2 of the License,
12 * or (at your option) any later version.
13 *
14 * ASAP is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty
16 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
17 * See the GNU General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public License
20 * along with ASAP; if not, write to the Free Software Foundation, Inc.,
21 * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
22 */
23
24#include "asap_internal.h"
25
26CONST_LOOKUP(int, opcode_cycles) =
27{
28/* 0 1 2 3 4 5 6 7 8 9 A B C D E F */
29 7, 6, 2, 8, 3, 3, 5, 5, 3, 2, 2, 2, 4, 4, 6, 6, /* 0x */
30 2, 5, 2, 8, 4, 4, 6, 6, 2, 4, 2, 7, 4, 4, 7, 7, /* 1x */
31 6, 6, 2, 8, 3, 3, 5, 5, 4, 2, 2, 2, 4, 4, 6, 6, /* 2x */
32 2, 5, 2, 8, 4, 4, 6, 6, 2, 4, 2, 7, 4, 4, 7, 7, /* 3x */
33 6, 6, 2, 8, 3, 3, 5, 5, 3, 2, 2, 2, 3, 4, 6, 6, /* 4x */
34 2, 5, 2, 8, 4, 4, 6, 6, 2, 4, 2, 7, 4, 4, 7, 7, /* 5x */
35 6, 6, 2, 8, 3, 3, 5, 5, 4, 2, 2, 2, 5, 4, 6, 6, /* 6x */
36 2, 5, 2, 8, 4, 4, 6, 6, 2, 4, 2, 7, 4, 4, 7, 7, /* 7x */
37 2, 6, 2, 6, 3, 3, 3, 3, 2, 2, 2, 2, 4, 4, 4, 4, /* 8x */
38 2, 6, 2, 6, 4, 4, 4, 4, 2, 5, 2, 5, 5, 5, 5, 5, /* 9x */
39 2, 6, 2, 6, 3, 3, 3, 3, 2, 2, 2, 2, 4, 4, 4, 4, /* Ax */
40 2, 5, 2, 5, 4, 4, 4, 4, 2, 4, 2, 4, 4, 4, 4, 4, /* Bx */
41 2, 6, 2, 8, 3, 3, 5, 5, 2, 2, 2, 2, 4, 4, 6, 6, /* Cx */
42 2, 5, 2, 8, 4, 4, 6, 6, 2, 4, 2, 7, 4, 4, 7, 7, /* Dx */
43 2, 6, 2, 8, 3, 3, 5, 5, 2, 2, 2, 2, 4, 4, 6, 6, /* Ex */
44 2, 5, 2, 8, 4, 4, 6, 6, 2, 4, 2, 7, 4, 4, 7, 7 /* Fx */
45};
46
47#define DO_ADC \
48 if ((vdi & D_FLAG) == 0) { \
49 /* binary mode */ \
50 int tmp = a + data + c; \
51 c = tmp >> 8; \
52 vdi &= D_FLAG | I_FLAG; \
53 if (((a ^ data) & 0x80) == 0 && ((data ^ tmp) & 0x80) != 0) \
54 vdi += V_FLAG; \
55 nz = a = tmp & 0xff; \
56 } \
57 else { \
58 /* decimal mode */ \
59 int tmp = (a & 0x0f) + (data & 0x0f) + c; \
60 if (tmp >= 10) \
61 tmp = (tmp - 10) | 0x10; \
62 tmp += (a & 0xf0) + (data & 0xf0); \
63 nz = ((tmp & 0x80) << 1) + ((a + data + c) & 0xff); \
64 vdi &= D_FLAG | I_FLAG; \
65 if (((a ^ data) & 0x80) == 0 && ((data ^ tmp) & 0x80) != 0) \
66 vdi += V_FLAG; \
67 if (tmp > 0x9f) \
68 tmp += 0x60; \
69 c = (tmp > 0xff) ? 1 : 0; \
70 a = tmp & 0xff; \
71 }
72
73#define DO_SBC \
74 if ((vdi & D_FLAG) == 0) { \
75 /* binary mode */ \
76 int tmp = a - data - 1 + c; \
77 c = (tmp >= 0) ? 1 : 0; \
78 vdi &= D_FLAG | I_FLAG; \
79 if (((a ^ tmp) & 0x80) != 0 && ((a ^ data) & 0x80) != 0) \
80 vdi += V_FLAG; \
81 nz = a = tmp & 0xff; \
82 } \
83 else { \
84 /* decimal mode */ \
85 int tmp = a - data - 1 + c; \
86 int al = (a & 0x0f) - (data & 0x0f) - 1 + c; \
87 int ah = (a >> 4) - (data >> 4); \
88 if ((al & 0x10) != 0) { \
89 al -= 6; \
90 ah--; \
91 } \
92 if ((ah & 0x10) != 0) \
93 ah -= 6; \
94 c = tmp >= 0 ? 1 : 0; \
95 vdi &= D_FLAG | I_FLAG; \
96 if (((a ^ tmp) & 0x80) != 0 && ((a ^ data) & 0x80) != 0) \
97 vdi += V_FLAG; \
98 nz = tmp & 0xff; \
99 a = ((ah & 0xf) << 4) + (al & 0x0f); \
100 }
101
102#define zGetByte(addr) dGetByte((addr) & 0xff)
103
104#define PEEK dGetByte(pc)
105#define FETCH dGetByte(pc++)
106
107#define ABSOLUTE addr = FETCH; addr += FETCH << 8
108#define ABSOLUTE_X addr = FETCH; addr = (addr + (FETCH << 8) + x) & 0xffff
109#define ABSOLUTE_Y addr = FETCH; addr = (addr + (FETCH << 8) + y) & 0xffff
110#define ZPAGE addr = FETCH
111#define ZPAGE_X addr = (FETCH + x) & 0xff
112#define ZPAGE_Y addr = (FETCH + y) & 0xff
113#define INDIRECT_X addr = (FETCH + x) & 0xff; addr = dGetByte(addr) + (zGetByte(addr + 1) << 8)
114#define INDIRECT_Y addr = FETCH; addr = (dGetByte(addr) + (zGetByte(addr + 1) << 8) + y) & 0xffff
115#define NCYCLES_X if ((addr & 0xff) < x) AST cycle++
116#define NCYCLES_Y if ((addr & 0xff) < y) AST cycle++
117
118#define PL(dest) s = (s + 1) & 0xff; dest = dGetByte(0x0100 + s)
119#define PLP PL(vdi); nz = ((vdi & 0x80) << 1) + (~vdi & Z_FLAG); c = vdi & 1; vdi &= V_FLAG | D_FLAG | I_FLAG
120#define PH(data) dPutByte(0x0100 + s, data); s = (s - 1) & 0xff
121#define PHW(data) PH((data) >> 8); PH(data)
122#define PHP(bflag) PH(((nz | (nz >> 1)) & 0x80) + vdi + ((nz & 0xff) == 0 ? Z_FLAG : 0) + c + bflag)
123#define PHPB0 PHP(0x20) /* push flags with B flag clear (NMI, IRQ) */
124#define PHPB1 PHP(0x30) /* push flags with B flag set (PHP, BRK) */
125#define PHPC PHW(pc)
126
127#define LDA nz = a = GetByte(addr)
128#define LDA_ZP nz = a = dGetByte(addr)
129#define LDX nz = x = GetByte(addr)
130#define LDX_ZP nz = x = dGetByte(addr)
131#define LDY nz = y = GetByte(addr)
132#define LDY_ZP nz = y = dGetByte(addr)
133#define LAX nz = x = a = GetByte(addr)
134#define LAX_ZP nz = x = a = dGetByte(addr)
135#define STA PutByte(addr, a)
136#define STA_ZP dPutByte(addr, a)
137#define STX PutByte(addr, x)
138#define STX_ZP dPutByte(addr, x)
139#define STY PutByte(addr, y)
140#define STY_ZP dPutByte(addr, y)
141#define SAX data = a & x; PutByte(addr, data)
142#define SAX_ZP data = a & x; dPutByte(addr, data)
143#define CMP nz = GetByte(addr); c = (a >= nz) ? 1 : 0; nz = (a - nz) & 0xff
144#define CMP_ZP nz = dGetByte(addr); c = (a >= nz) ? 1 : 0; nz = (a - nz) & 0xff
145#define CPX nz = GetByte(addr); c = (x >= nz) ? 1 : 0; nz = (x - nz) & 0xff
146#define CPX_ZP nz = dGetByte(addr); c = (x >= nz) ? 1 : 0; nz = (x - nz) & 0xff
147#define CPY nz = GetByte(addr); c = (y >= nz) ? 1 : 0; nz = (y - nz) & 0xff
148#define CPY_ZP nz = dGetByte(addr); c = (y >= nz) ? 1 : 0; nz = (y - nz) & 0xff
149#define AND nz = a &= GetByte(addr)
150#define AND_ZP nz = a &= dGetByte(addr)
151#define ORA nz = a |= GetByte(addr)
152#define ORA_ZP nz = a |= dGetByte(addr)
153#define EOR nz = a ^= GetByte(addr)
154#define EOR_ZP nz = a ^= dGetByte(addr)
155#define ADC data = GetByte(addr); DO_ADC
156#define ADC_ZP data = dGetByte(addr); DO_ADC
157#define SBC data = GetByte(addr); DO_SBC
158#define SBC_ZP data = dGetByte(addr); DO_SBC
159
160#define ASL RMW_GetByte(nz, addr); c = nz >> 7; nz = (nz << 1) & 0xff; PutByte(addr, nz)
161#define ASL_ZP nz = dGetByte(addr); c = nz >> 7; nz = (nz << 1) & 0xff; dPutByte(addr, nz)
162#define ROL RMW_GetByte(nz, addr); nz = (nz << 1) + c; c = nz >> 8; nz &= 0xff; PutByte(addr, nz)
163#define ROL_ZP nz = dGetByte(addr); nz = (nz << 1) + c; c = nz >> 8; nz &= 0xff; dPutByte(addr, nz)
164#define LSR RMW_GetByte(nz, addr); c = nz & 1; nz >>= 1; PutByte(addr, nz)
165#define LSR_ZP nz = dGetByte(addr); c = nz & 1; nz >>= 1; dPutByte(addr, nz)
166#define ROR \
167 RMW_GetByte(nz, addr); \
168 if (c == 0) { \
169 c = nz & 1; \
170 nz >>= 1; \
171 } \
172 else { \
173 c = nz & 1; \
174 nz = (nz >> 1) + 128; \
175 } \
176 PutByte(addr, nz)
177#define ROR_ZP \
178 nz = dGetByte(addr); \
179 if (c == 0) { \
180 c = nz & 1; \
181 nz >>= 1; \
182 } \
183 else { \
184 c = nz & 1; \
185 nz = (nz >> 1) + 128; \
186 } \
187 dPutByte(addr, nz)
188#define DEC RMW_GetByte(nz, addr); nz = (nz - 1) & 0xff; PutByte(addr, nz)
189#define DEC_ZP nz = dGetByte(addr); nz = (nz - 1) & 0xff; dPutByte(addr, nz)
190#define INC RMW_GetByte(nz, addr); nz = (nz + 1) & 0xff; PutByte(addr, nz)
191#define INC_ZP nz = dGetByte(addr); nz = (nz + 1) & 0xff; dPutByte(addr, nz)
192
193#define ASO ASL; nz = a |= nz
194#define ASO_ZP ASL_ZP; nz = a |= nz
195#define RLA ROL; nz = a &= nz
196#define RLA_ZP ROL_ZP; nz = a &= nz
197#define LSE LSR; nz = a ^= nz
198#define LSE_ZP LSR_ZP; nz = a ^= nz
199#define RRA ROR; data = nz; DO_ADC
200#define RRA_ZP ROR_ZP; data = nz; DO_ADC
201#define DCM DEC; c = (a >= nz) ? 1 : 0; nz = (a - nz) & 0xff
202#define DCM_ZP DEC_ZP; c = (a >= nz) ? 1 : 0; nz = (a - nz) & 0xff
203#define INS INC; data = nz; DO_SBC
204#define INS_ZP INC_ZP; data = nz; DO_SBC
205
206#define BRANCH(cond) \
207 if (cond) { \
208 addr = SBYTE(FETCH); \
209 addr += pc; \
210 if (((addr ^ pc) & 0xff00) != 0) \
211 AST cycle++; \
212 AST cycle++; \
213 pc = addr; \
214 break; \
215 } \
216 pc++; \
217 break
218
219#define CHECK_IRQ \
220 if ((vdi & I_FLAG) == 0 && AST irqst != 0xff) { \
221 PHPC; \
222 PHPB0; \
223 vdi |= I_FLAG; \
224 pc = dGetWord(0xfffe); \
225 AST cycle += 7; \
226 }
227
228ASAP_FUNC void Cpu_RunScanlines(ASAP_State PTR ast, int scanlines)
229{
230 int pc;
231 int nz;
232 int a;
233 int x;
234 int y;
235 int c;
236 int s;
237 int vdi;
238 int next_event_cycle;
239 int cycle_limit;
240 pc = AST cpu_pc;
241 nz = AST cpu_nz;
242 a = AST cpu_a;
243 x = AST cpu_x;
244 y = AST cpu_y;
245 c = AST cpu_c;
246 s = AST cpu_s;
247 vdi = AST cpu_vdi;
248 AST next_scanline_cycle = 114;
249 next_event_cycle = 114;
250 cycle_limit = 114 * scanlines;
251 if (next_event_cycle > AST timer1_cycle)
252 next_event_cycle = AST timer1_cycle;
253 if (next_event_cycle > AST timer2_cycle)
254 next_event_cycle = AST timer2_cycle;
255 if (next_event_cycle > AST timer4_cycle)
256 next_event_cycle = AST timer4_cycle;
257 AST nearest_event_cycle = next_event_cycle;
258 for (;;) {
259 int cycle;
260 int addr;
261 int data;
262 cycle = AST cycle;
263 if (cycle >= AST nearest_event_cycle) {
264 if (cycle >= AST next_scanline_cycle) {
265 if (++AST scanline_number == 312)
266 AST scanline_number = 0;
267 AST cycle = cycle += 9;
268 AST next_scanline_cycle += 114;
269 if (--scanlines <= 0)
270 break;
271 }
272 next_event_cycle = AST next_scanline_cycle;
273#define CHECK_TIMER_IRQ(ch) \
274 if (cycle >= AST timer##ch##_cycle) { \
275 AST irqst &= ~ch; \
276 AST timer##ch##_cycle = NEVER; \
277 } \
278 else if (next_event_cycle > AST timer##ch##_cycle) \
279 next_event_cycle = AST timer##ch##_cycle;
280 CHECK_TIMER_IRQ(1);
281 CHECK_TIMER_IRQ(2);
282 CHECK_TIMER_IRQ(4);
283 AST nearest_event_cycle = next_event_cycle;
284 CHECK_IRQ;
285 }
286#ifdef ASAPSCAN
287 if (cpu_trace)
288 print_cpu_state(as, pc, a, x, y, s, nz, vdi, c);
289#endif
290 data = FETCH;
291 AST cycle += opcode_cycles[data];
292 switch (data) {
293 case 0x00: /* BRK */
294 pc++;
295 PHPC;
296 PHPB1;
297 vdi |= I_FLAG;
298 pc = dGetWord(0xfffe);
299 break;
300 case 0x01: /* ORA (ab,x) */
301 INDIRECT_X;
302 ORA;
303 break;
304 case 0x02: /* CIM [unofficial] */
305 case 0x12:
306 case 0x22:
307 case 0x32:
308 case 0x42:
309 case 0x52:
310 case 0x62:
311 case 0x72:
312 case 0x92:
313 case 0xb2:
314 case 0xd2:
315 case 0xf2:
316 AST scanline_number = (AST scanline_number + scanlines - 1) % 312;
317 scanlines = 1;
318 AST cycle = cycle_limit;
319 break;
320 case 0x03: /* ASO (ab,x) [unofficial] */
321 INDIRECT_X;
322 ASO;
323 break;
324 case 0x04: /* NOP ab [unofficial] */
325 case 0x44:
326 case 0x64:
327 case 0x14: /* NOP ab,x [unofficial] */
328 case 0x34:
329 case 0x54:
330 case 0x74:
331 case 0xd4:
332 case 0xf4:
333 case 0x80: /* NOP #ab [unofficial] */
334 case 0x82:
335 case 0x89:
336 case 0xc2:
337 case 0xe2:
338 pc++;
339 break;
340 case 0x05: /* ORA ab */
341 ZPAGE;
342 ORA_ZP;
343 break;
344 case 0x06: /* ASL ab */
345 ZPAGE;
346 ASL_ZP;
347 break;
348 case 0x07: /* ASO ab [unofficial] */
349 ZPAGE;
350 ASO_ZP;
351 break;
352 case 0x08: /* PHP */
353 PHPB1;
354 break;
355 case 0x09: /* ORA #ab */
356 nz = a |= FETCH;
357 break;
358 case 0x0a: /* ASL */
359 c = a >> 7;
360 nz = a = (a << 1) & 0xff;
361 break;
362 case 0x0b: /* ANC #ab [unofficial] */
363 case 0x2b:
364 nz = a &= FETCH;
365 c = nz >> 7;
366 break;
367 case 0x0c: /* NOP abcd [unofficial] */
368 pc += 2;
369 break;
370 case 0x0d: /* ORA abcd */
371 ABSOLUTE;
372 ORA;
373 break;
374 case 0x0e: /* ASL abcd */
375 ABSOLUTE;
376 ASL;
377 break;
378 case 0x0f: /* ASO abcd [unofficial] */
379 ABSOLUTE;
380 ASO;
381 break;
382 case 0x10: /* BPL */
383 BRANCH(nz < 0x80);
384 case 0x11: /* ORA (ab),y */
385 INDIRECT_Y;
386 NCYCLES_Y;
387 ORA;
388 break;
389 case 0x13: /* ASO (ab),y [unofficial] */
390 INDIRECT_Y;
391 ASO;
392 break;
393 case 0x15: /* ORA ab,x */
394 ZPAGE_X;
395 ORA_ZP;
396 break;
397 case 0x16: /* ASL ab,x */
398 ZPAGE_X;
399 ASL_ZP;
400 break;
401 case 0x17: /* ASO ab,x [unofficial] */
402 ZPAGE_X;
403 ASO_ZP;
404 break;
405 case 0x18: /* CLC */
406 c = 0;
407 break;
408 case 0x19: /* ORA abcd,y */
409 ABSOLUTE_Y;
410 NCYCLES_Y;
411 ORA;
412 break;
413 case 0x1b: /* ASO abcd,y [unofficial] */
414 ABSOLUTE_Y;
415 ASO;
416 break;
417 case 0x1c: /* NOP abcd,x [unofficial] */
418 case 0x3c:
419 case 0x5c:
420 case 0x7c:
421 case 0xdc:
422 case 0xfc:
423 if (FETCH + x >= 0x100)
424 AST cycle++;
425 pc++;
426 break;
427 case 0x1d: /* ORA abcd,x */
428 ABSOLUTE_X;
429 NCYCLES_X;
430 ORA;
431 break;
432 case 0x1e: /* ASL abcd,x */
433 ABSOLUTE_X;
434 ASL;
435 break;
436 case 0x1f: /* ASO abcd,x [unofficial] */
437 ABSOLUTE_X;
438 ASO;
439 break;
440 case 0x20: /* JSR abcd */
441 addr = FETCH;
442 PHPC;
443 pc = addr + (PEEK << 8);
444 break;
445 case 0x21: /* AND (ab,x) */
446 INDIRECT_X;
447 AND;
448 break;
449 case 0x23: /* RLA (ab,x) [unofficial] */
450 INDIRECT_X;
451 RLA;
452 break;
453 case 0x24: /* BIT ab */
454 ZPAGE;
455 nz = dGetByte(addr);
456 vdi = (vdi & (D_FLAG | I_FLAG)) + (nz & V_FLAG);
457 nz = ((nz & 0x80) << 1) + (nz & a);
458 break;
459 case 0x25: /* AND ab */
460 ZPAGE;
461 AND_ZP;
462 break;
463 case 0x26: /* ROL ab */
464 ZPAGE;
465 ROL_ZP;
466 break;
467 case 0x27: /* RLA ab [unofficial] */
468 ZPAGE;
469 RLA_ZP;
470 break;
471 case 0x28: /* PLP */
472 PLP;
473 CHECK_IRQ;
474 break;
475 case 0x29: /* AND #ab */
476 nz = a &= FETCH;
477 break;
478 case 0x2a: /* ROL */
479 a = (a << 1) + c;
480 c = a >> 8;
481 nz = a &= 0xff;
482 break;
483 case 0x2c: /* BIT abcd */
484 ABSOLUTE;
485 nz = GetByte(addr);
486 vdi = (vdi & (D_FLAG | I_FLAG)) + (nz & V_FLAG);
487 nz = ((nz & 0x80) << 1) + (nz & a);
488 break;
489 case 0x2d: /* AND abcd */
490 ABSOLUTE;
491 AND;
492 break;
493 case 0x2e: /* ROL abcd */
494 ABSOLUTE;
495 ROL;
496 break;
497 case 0x2f: /* RLA abcd [unofficial] */
498 ABSOLUTE;
499 RLA;
500 break;
501 case 0x30: /* BMI */
502 BRANCH(nz >= 0x80);
503 case 0x31: /* AND (ab),y */
504 INDIRECT_Y;
505 NCYCLES_Y;
506 AND;
507 break;
508 case 0x33: /* RLA (ab),y [unofficial] */
509 INDIRECT_Y;
510 RLA;
511 break;
512 case 0x35: /* AND ab,x */
513 ZPAGE_X;
514 AND_ZP;
515 break;
516 case 0x36: /* ROL ab,x */
517 ZPAGE_X;
518 ROL_ZP;
519 break;
520 case 0x37: /* RLA ab,x [unofficial] */
521 ZPAGE_X;
522 RLA_ZP;
523 break;
524 case 0x38: /* SEC */
525 c = 1;
526 break;
527 case 0x39: /* AND abcd,y */
528 ABSOLUTE_Y;
529 NCYCLES_Y;
530 AND;
531 break;
532 case 0x3b: /* RLA abcd,y [unofficial] */
533 ABSOLUTE_Y;
534 RLA;
535 break;
536 case 0x3d: /* AND abcd,x */
537 ABSOLUTE_X;
538 NCYCLES_X;
539 AND;
540 break;
541 case 0x3e: /* ROL abcd,x */
542 ABSOLUTE_X;
543 ROL;
544 break;
545 case 0x3f: /* RLA abcd,x [unofficial] */
546 ABSOLUTE_X;
547 RLA;
548 break;
549 case 0x40: /* RTI */
550 PLP;
551 PL(pc);
552 PL(addr);
553 pc += addr << 8;
554 CHECK_IRQ;
555 break;
556 case 0x41: /* EOR (ab,x) */
557 INDIRECT_X;
558 EOR;
559 break;
560 case 0x43: /* LSE (ab,x) [unofficial] */
561 INDIRECT_X;
562 LSE;
563 break;
564 case 0x45: /* EOR ab */
565 ZPAGE;
566 EOR_ZP;
567 break;
568 case 0x46: /* LSR ab */
569 ZPAGE;
570 LSR_ZP;
571 break;
572 case 0x47: /* LSE ab [unofficial] */
573 ZPAGE;
574 LSE_ZP;
575 break;
576 case 0x48: /* PHA */
577 PH(a);
578 break;
579 case 0x49: /* EOR #ab */
580 nz = a ^= FETCH;
581 break;
582 case 0x4a: /* LSR */
583 c = a & 1;
584 nz = a >>= 1;
585 break;
586 case 0x4b: /* ALR #ab [unofficial] */
587 a &= FETCH;
588 c = a & 1;
589 nz = a >>= 1;
590 break;
591 case 0x4c: /* JMP abcd */
592 addr = FETCH;
593 pc = addr + (PEEK << 8);
594 break;
595 case 0x4d: /* EOR abcd */
596 ABSOLUTE;
597 EOR;
598 break;
599 case 0x4e: /* LSR abcd */
600 ABSOLUTE;
601 LSR;
602 break;
603 case 0x4f: /* LSE abcd [unofficial] */
604 ABSOLUTE;
605 LSE;
606 break;
607 case 0x50: /* BVC */
608 BRANCH((vdi & V_FLAG) == 0);
609 case 0x51: /* EOR (ab),y */
610 INDIRECT_Y;
611 NCYCLES_Y;
612 EOR;
613 break;
614 case 0x53: /* LSE (ab),y [unofficial] */
615 INDIRECT_Y;
616 LSE;
617 break;
618 case 0x55: /* EOR ab,x */
619 ZPAGE_X;
620 EOR_ZP;
621 break;
622 case 0x56: /* LSR ab,x */
623 ZPAGE_X;
624 LSR_ZP;
625 break;
626 case 0x57: /* LSE ab,x [unofficial] */
627 ZPAGE_X;
628 LSE_ZP;
629 break;
630 case 0x58: /* CLI */
631 vdi &= V_FLAG | D_FLAG;
632 CHECK_IRQ;
633 break;
634 case 0x59: /* EOR abcd,y */
635 ABSOLUTE_Y;
636 NCYCLES_Y;
637 EOR;
638 break;
639 case 0x5b: /* LSE abcd,y [unofficial] */
640 ABSOLUTE_Y;
641 LSE;
642 break;
643 case 0x5d: /* EOR abcd,x */
644 ABSOLUTE_X;
645 NCYCLES_X;
646 EOR;
647 break;
648 case 0x5e: /* LSR abcd,x */
649 ABSOLUTE_X;
650 LSR;
651 break;
652 case 0x5f: /* LSE abcd,x [unofficial] */
653 ABSOLUTE_X;
654 LSE;
655 break;
656 case 0x60: /* RTS */
657 PL(pc);
658 PL(addr);
659 pc += (addr << 8) + 1;
660 break;
661 case 0x61: /* ADC (ab,x) */
662 INDIRECT_X;
663 ADC;
664 break;
665 case 0x63: /* RRA (ab,x) [unofficial] */
666 INDIRECT_X;
667 RRA;
668 break;
669 case 0x65: /* ADC ab */
670 ZPAGE;
671 ADC_ZP;
672 break;
673 case 0x66: /* ROR ab */
674 ZPAGE;
675 ROR_ZP;
676 break;
677 case 0x67: /* RRA ab [unofficial] */
678 ZPAGE;
679 RRA_ZP;
680 break;
681 case 0x68: /* PLA */
682 PL(a);
683 nz = a;
684 break;
685 case 0x69: /* ADC #ab */
686 data = FETCH;
687 DO_ADC;
688 break;
689 case 0x6a: /* ROR */
690 nz = (c << 7) + (a >> 1);
691 c = a & 1;
692 a = nz;
693 break;
694 case 0x6b: /* ARR #ab [unofficial] */
695 data = a & FETCH;
696 nz = a = (data >> 1) + (c << 7);
697 vdi = (vdi & (D_FLAG | I_FLAG)) + ((a ^ data) & V_FLAG);
698 if ((vdi & D_FLAG) == 0)
699 c = data >> 7;
700 else {
701 if ((data & 0xf) + (data & 1) > 5)
702 a = (a & 0xf0) + ((a + 6) & 0xf);
703 if (data + (data & 0x10) >= 0x60) {
704 a += 0x60;
705 c = 1;
706 }
707 else
708 c = 0;
709 a &= 0xff;
710 }
711 break;
712 case 0x6c: /* JMP (abcd) */
713 ABSOLUTE;
714 if ((addr & 0xff) == 0xff)
715 pc = (dGetByte(addr - 0xff) << 8) + dGetByte(addr);
716 else
717 pc = dGetWord(addr);
718 break;
719 case 0x6d: /* ADC abcd */
720 ABSOLUTE;
721 ADC;
722 break;
723 case 0x6e: /* ROR abcd */
724 ABSOLUTE;
725 ROR;
726 break;
727 case 0x6f: /* RRA abcd [unofficial] */
728 ABSOLUTE;
729 RRA;
730 break;
731 case 0x70: /* BVS */
732 BRANCH((vdi & V_FLAG) != 0);
733 case 0x71: /* ADC (ab),y */
734 INDIRECT_Y;
735 NCYCLES_Y;
736 ADC;
737 break;
738 case 0x73: /* RRA (ab),y [unofficial] */
739 INDIRECT_Y;
740 RRA;
741 break;
742 case 0x75: /* ADC ab,x */
743 ZPAGE_X;
744 ADC_ZP;
745 break;
746 case 0x76: /* ROR ab,x */
747 ZPAGE_X;
748 ROR_ZP;
749 break;
750 case 0x77: /* RRA ab,x [unofficial] */
751 ZPAGE_X;
752 RRA_ZP;
753 break;
754 case 0x78: /* SEI */
755 vdi |= I_FLAG;
756 break;
757 case 0x79: /* ADC abcd,y */
758 ABSOLUTE_Y;
759 NCYCLES_Y;
760 ADC;
761 break;
762 case 0x7b: /* RRA abcd,y [unofficial] */
763 ABSOLUTE_Y;
764 RRA;
765 break;
766 case 0x7d: /* ADC abcd,x */
767 ABSOLUTE_X;
768 NCYCLES_X;
769 ADC;
770 break;
771 case 0x7e: /* ROR abcd,x */
772 ABSOLUTE_X;
773 ROR;
774 break;
775 case 0x7f: /* RRA abcd,x [unofficial] */
776 ABSOLUTE_X;
777 RRA;
778 break;
779 case 0x81: /* STA (ab,x) */
780 INDIRECT_X;
781 STA;
782 break;
783 case 0x83: /* SAX (ab,x) [unofficial] */
784 INDIRECT_X;
785 SAX;
786 break;
787 case 0x84: /* STY ab */
788 ZPAGE;
789 STY_ZP;
790 break;
791 case 0x85: /* STA ab */
792 ZPAGE;
793 STA_ZP;
794 break;
795 case 0x86: /* STX ab */
796 ZPAGE;
797 STX_ZP;
798 break;
799 case 0x87: /* SAX ab [unofficial] */
800 ZPAGE;
801 SAX_ZP;
802 break;
803 case 0x88: /* DEY */
804 nz = y = (y - 1) & 0xff;
805 break;
806 case 0x8a: /* TXA */
807 nz = a = x;
808 break;
809 case 0x8b: /* ANE #ab [unofficial] */
810 data = FETCH;
811 a &= x;
812 nz = a & data;
813 a &= data | 0xef;
814 break;
815 case 0x8c: /* STY abcd */
816 ABSOLUTE;
817 STY;
818 break;
819 case 0x8d: /* STA abcd */
820 ABSOLUTE;
821 STA;
822 break;
823 case 0x8e: /* STX abcd */
824 ABSOLUTE;
825 STX;
826 break;
827 case 0x8f: /* SAX abcd [unofficial] */
828 ABSOLUTE;
829 SAX;
830 break;
831 case 0x90: /* BCC */
832 BRANCH(c == 0);
833 case 0x91: /* STA (ab),y */
834 INDIRECT_Y;
835 STA;
836 break;
837 case 0x93: /* SHA (ab),y [unofficial, unstable] */
838 ZPAGE;
839 data = zGetByte(addr + 1);
840 addr = (dGetByte(addr) + (data << 8) + y) & 0xffff;
841 data = a & x & (data + 1);
842 PutByte(addr, data);
843 break;
844 case 0x94: /* STY ab,x */
845 ZPAGE_X;
846 STY_ZP;
847 break;
848 case 0x95: /* STA ab,x */
849 ZPAGE_X;
850 STA_ZP;
851 break;
852 case 0x96: /* STX ab,y */
853 ZPAGE_Y;
854 STX_ZP;
855 break;
856 case 0x97: /* SAX ab,y [unofficial] */
857 ZPAGE_Y;
858 SAX_ZP;
859 break;
860 case 0x98: /* TYA */
861 nz = a = y;
862 break;
863 case 0x99: /* STA abcd,y */
864 ABSOLUTE_Y;
865 STA;
866 break;
867 case 0x9a: /* TXS */
868 s = x;
869 break;
870 case 0x9b: /* SHS abcd,y [unofficial, unstable] */
871 /* S seems to be stable, only memory values vary */
872 addr = FETCH;
873 data = FETCH;
874 addr = (addr + (data << 8) + y) & 0xffff;
875 s = a & x;
876 data = s & (data + 1);
877 PutByte(addr, data);
878 break;
879 case 0x9c: /* SHY abcd,x [unofficial] */
880 addr = FETCH;
881 data = FETCH;
882 addr = (addr + (data << 8) + x) & 0xffff;
883 data = y & (data + 1);
884 PutByte(addr, data);
885 break;
886 case 0x9d: /* STA abcd,x */
887 ABSOLUTE_X;
888 STA;
889 break;
890 case 0x9e: /* SHX abcd,y [unofficial] */
891 addr = FETCH;
892 data = FETCH;
893 addr = (addr + (data << 8) + y) & 0xffff;
894 data = x & (data + 1);
895 PutByte(addr, data);
896 break;
897 case 0x9f: /* SHA abcd,y [unofficial, unstable] */
898 addr = FETCH;
899 data = FETCH;
900 addr = (addr + (data << 8) + y) & 0xffff;
901 data = a & x & (data + 1);
902 PutByte(addr, data);
903 break;
904 case 0xa0: /* LDY #ab */
905 nz = y = FETCH;
906 break;
907 case 0xa1: /* LDA (ab,x) */
908 INDIRECT_X;
909 LDA;
910 break;
911 case 0xa2: /* LDX #ab */
912 nz = x = FETCH;
913 break;
914 case 0xa3: /* LAX (ab,x) [unofficial] */
915 INDIRECT_X;
916 LAX;
917 break;
918 case 0xa4: /* LDY ab */
919 ZPAGE;
920 LDY_ZP;
921 break;
922 case 0xa5: /* LDA ab */
923 ZPAGE;
924 LDA_ZP;
925 break;
926 case 0xa6: /* LDX ab */
927 ZPAGE;
928 LDX_ZP;
929 break;
930 case 0xa7: /* LAX ab [unofficial] */
931 ZPAGE;
932 LAX_ZP;
933 break;
934 case 0xa8: /* TAY */
935 nz = y = a;
936 break;
937 case 0xa9: /* LDA #ab */
938 nz = a = FETCH;
939 break;
940 case 0xaa: /* TAX */
941 nz = x = a;
942 break;
943 case 0xab: /* ANX #ab [unofficial] */
944 nz = x = a &= FETCH;
945 break;
946 case 0xac: /* LDY abcd */
947 ABSOLUTE;
948 LDY;
949 break;
950 case 0xad: /* LDA abcd */
951 ABSOLUTE;
952 LDA;
953 break;
954 case 0xae: /* LDX abcd */
955 ABSOLUTE;
956 LDX;
957 break;
958 case 0xaf: /* LAX abcd [unofficial] */
959 ABSOLUTE;
960 LAX;
961 break;
962 case 0xb0: /* BCS */
963 BRANCH(c != 0);
964 case 0xb1: /* LDA (ab),y */
965 INDIRECT_Y;
966 NCYCLES_Y;
967 LDA;
968 break;
969 case 0xb3: /* LAX (ab),y [unofficial] */
970 INDIRECT_Y;
971 NCYCLES_Y;
972 LAX;
973 break;
974 case 0xb4: /* LDY ab,x */
975 ZPAGE_X;
976 LDY_ZP;
977 break;
978 case 0xb5: /* LDA ab,x */
979 ZPAGE_X;
980 LDA_ZP;
981 break;
982 case 0xb6: /* LDX ab,y */
983 ZPAGE_Y;
984 LDX_ZP;
985 break;
986 case 0xb7: /* LAX ab,y [unofficial] */
987 ZPAGE_Y;
988 LAX_ZP;
989 break;
990 case 0xb8: /* CLV */
991 vdi &= D_FLAG | I_FLAG;
992 break;
993 case 0xb9: /* LDA abcd,y */
994 ABSOLUTE_Y;
995 NCYCLES_Y;
996 LDA;
997 break;
998 case 0xba: /* TSX */
999 nz = x = s;
1000 break;
1001 case 0xbb: /* LAS abcd,y [unofficial] */
1002 ABSOLUTE_Y;
1003 NCYCLES_Y;
1004 nz = x = a = s &= GetByte(addr);
1005 break;
1006 case 0xbc: /* LDY abcd,x */
1007 ABSOLUTE_X;
1008 NCYCLES_X;
1009 LDY;
1010 break;
1011 case 0xbd: /* LDA abcd,x */
1012 ABSOLUTE_X;
1013 NCYCLES_X;
1014 LDA;
1015 break;
1016 case 0xbe: /* LDX abcd,y */
1017 ABSOLUTE_Y;
1018 NCYCLES_Y;
1019 LDX;
1020 break;
1021 case 0xbf: /* LAX abcd,y [unofficial] */
1022 ABSOLUTE_Y;
1023 NCYCLES_Y;
1024 LAX;
1025 break;
1026 case 0xc0: /* CPY #ab */
1027 nz = FETCH;
1028 c = (y >= nz) ? 1 : 0;
1029 nz = (y - nz) & 0xff;
1030 break;
1031 case 0xc1: /* CMP (ab,x) */
1032 INDIRECT_X;
1033 CMP;
1034 break;
1035 case 0xc3: /* DCM (ab,x) [unofficial] */
1036 INDIRECT_X;
1037 DCM;
1038 break;
1039 case 0xc4: /* CPY ab */
1040 ZPAGE;
1041 CPY_ZP;
1042 break;
1043 case 0xc5: /* CMP ab */
1044 ZPAGE;
1045 CMP_ZP;
1046 break;
1047 case 0xc6: /* DEC ab */
1048 ZPAGE;
1049 DEC_ZP;
1050 break;
1051 case 0xc7: /* DCM ab [unofficial] */
1052 ZPAGE;
1053 DCM_ZP;
1054 break;
1055 case 0xc8: /* INY */
1056 nz = y = (y + 1) & 0xff;
1057 break;
1058 case 0xc9: /* CMP #ab */
1059 nz = FETCH;
1060 c = (a >= nz) ? 1 : 0;
1061 nz = (a - nz) & 0xff;
1062 break;
1063 case 0xca: /* DEX */
1064 nz = x = (x - 1) & 0xff;
1065 break;
1066 case 0xcb: /* SBX #ab [unofficial] */
1067 nz = FETCH;
1068 x &= a;
1069 c = (x >= nz) ? 1 : 0;
1070 nz = x = (x - nz) & 0xff;
1071 break;
1072 case 0xcc: /* CPY abcd */
1073 ABSOLUTE;
1074 CPY;
1075 break;
1076 case 0xcd: /* CMP abcd */
1077 ABSOLUTE;
1078 CMP;
1079 break;
1080 case 0xce: /* DEC abcd */
1081 ABSOLUTE;
1082 DEC;
1083 break;
1084 case 0xcf: /* DCM abcd [unofficial] */
1085 ABSOLUTE;
1086 DCM;
1087 break;
1088 case 0xd0: /* BNE */
1089 BRANCH((nz & 0xff) != 0);
1090 case 0xd1: /* CMP (ab),y */
1091 INDIRECT_Y;
1092 NCYCLES_Y;
1093 CMP;
1094 break;
1095 case 0xd3: /* DCM (ab),y [unofficial] */
1096 INDIRECT_Y;
1097 DCM;
1098 break;
1099 case 0xd5: /* CMP ab,x */
1100 ZPAGE_X;
1101 CMP_ZP;
1102 break;
1103 case 0xd6: /* DEC ab,x */
1104 ZPAGE_X;
1105 DEC_ZP;
1106 break;
1107 case 0xd7: /* DCM ab,x [unofficial] */
1108 ZPAGE_X;
1109 DCM_ZP;
1110 break;
1111 case 0xd8: /* CLD */
1112 vdi &= V_FLAG | I_FLAG;
1113 break;
1114 case 0xd9: /* CMP abcd,y */
1115 ABSOLUTE_Y;
1116 NCYCLES_Y;
1117 CMP;
1118 break;
1119 case 0xdb: /* DCM abcd,y [unofficial] */
1120 ABSOLUTE_Y;
1121 DCM;
1122 break;
1123 case 0xdd: /* CMP abcd,x */
1124 ABSOLUTE_X;
1125 NCYCLES_X;
1126 CMP;
1127 break;
1128 case 0xde: /* DEC abcd,x */
1129 ABSOLUTE_X;
1130 DEC;
1131 break;
1132 case 0xdf: /* DCM abcd,x [unofficial] */
1133 ABSOLUTE_X;
1134 DCM;
1135 break;
1136 case 0xe0: /* CPX #ab */
1137 nz = FETCH;
1138 c = (x >= nz) ? 1 : 0;
1139 nz = (x - nz) & 0xff;
1140 break;
1141 case 0xe1: /* SBC (ab,x) */
1142 INDIRECT_X;
1143 SBC;
1144 break;
1145 case 0xe3: /* INS (ab,x) [unofficial] */
1146 INDIRECT_X;
1147 INS;
1148 break;
1149 case 0xe4: /* CPX ab */
1150 ZPAGE;
1151 CPX_ZP;
1152 break;
1153 case 0xe5: /* SBC ab */
1154 ZPAGE;
1155 SBC_ZP;
1156 break;
1157 case 0xe6: /* INC ab */
1158 ZPAGE;
1159 INC_ZP;
1160 break;
1161 case 0xe7: /* INS ab [unofficial] */
1162 ZPAGE;
1163 INS_ZP;
1164 break;
1165 case 0xe8: /* INX */
1166 nz = x = (x + 1) & 0xff;
1167 break;
1168 case 0xe9: /* SBC #ab */
1169 case 0xeb: /* SBC #ab [unofficial] */
1170 data = FETCH;
1171 DO_SBC;
1172 break;
1173 case 0xea: /* NOP */
1174 case 0x1a: /* NOP [unofficial] */
1175 case 0x3a:
1176 case 0x5a:
1177 case 0x7a:
1178 case 0xda:
1179 case 0xfa:
1180 break;
1181 case 0xec: /* CPX abcd */
1182 ABSOLUTE;
1183 CPX;
1184 break;
1185 case 0xed: /* SBC abcd */
1186 ABSOLUTE;
1187 SBC;
1188 break;
1189 case 0xee: /* INC abcd */
1190 ABSOLUTE;
1191 INC;
1192 break;
1193 case 0xef: /* INS abcd [unofficial] */
1194 ABSOLUTE;
1195 INS;
1196 break;
1197 case 0xf0: /* BEQ */
1198 BRANCH((nz & 0xff) == 0);
1199 case 0xf1: /* SBC (ab),y */
1200 INDIRECT_Y;
1201 NCYCLES_Y;
1202 SBC;
1203 break;
1204 case 0xf3: /* INS (ab),y [unofficial] */
1205 INDIRECT_Y;
1206 INS;
1207 break;
1208 case 0xf5: /* SBC ab,x */
1209 ZPAGE_X;
1210 SBC_ZP;
1211 break;
1212 case 0xf6: /* INC ab,x */
1213 ZPAGE_X;
1214 INC_ZP;
1215 break;
1216 case 0xf7: /* INS ab,x [unofficial] */
1217 ZPAGE_X;
1218 INS_ZP;
1219 break;
1220 case 0xf8: /* SED */
1221 vdi |= D_FLAG;
1222 break;
1223 case 0xf9: /* SBC abcd,y */
1224 ABSOLUTE_Y;
1225 NCYCLES_Y;
1226 SBC;
1227 break;
1228 case 0xfb: /* INS abcd,y [unofficial] */
1229 ABSOLUTE_Y;
1230 INS;
1231 break;
1232 case 0xfd: /* SBC abcd,x */
1233 ABSOLUTE_X;
1234 NCYCLES_X;
1235 SBC;
1236 break;
1237 case 0xfe: /* INC abcd,x */
1238 ABSOLUTE_X;
1239 INC;
1240 break;
1241 case 0xff: /* INS abcd,x */
1242 ABSOLUTE_X;
1243 INS;
1244 break;
1245 }
1246 }
1247 AST cpu_pc = pc;
1248 AST cpu_nz = nz;
1249 AST cpu_a = a;
1250 AST cpu_x = x;
1251 AST cpu_y = y;
1252 AST cpu_c = c;
1253 AST cpu_s = s;
1254 AST cpu_vdi = vdi;
1255 AST cycle -= cycle_limit;
1256 if (AST timer1_cycle != NEVER)
1257 AST timer1_cycle -= cycle_limit;
1258 if (AST timer2_cycle != NEVER)
1259 AST timer2_cycle -= cycle_limit;
1260 if (AST timer4_cycle != NEVER)
1261 AST timer4_cycle -= cycle_limit;
1262}
diff --git a/apps/codecs/asap/apokeysnd.c b/apps/codecs/asap/apokeysnd.c
new file mode 100644
index 0000000000..d0a4b1bd91
--- /dev/null
+++ b/apps/codecs/asap/apokeysnd.c
@@ -0,0 +1,537 @@
1/*
2 * apokeysnd.c - another POKEY sound emulator
3 *
4 * Copyright (C) 2007-2008 Piotr Fusik
5 *
6 * This file is part of ASAP (Another Slight Atari Player),
7 * see http://asap.sourceforge.net
8 *
9 * ASAP is free software; you can redistribute it and/or modify it
10 * under the terms of the GNU General Public License as published
11 * by the Free Software Foundation; either version 2 of the License,
12 * or (at your option) any later version.
13 *
14 * ASAP is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty
16 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
17 * See the GNU General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public License
20 * along with ASAP; if not, write to the Free Software Foundation, Inc.,
21 * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
22 */
23
24#if !defined(JAVA) && !defined(CSHARP)
25#include <string.h>
26#endif
27
28#include "asap_internal.h"
29
30#define ULTRASOUND_CYCLES 112
31
32#define MUTE_FREQUENCY 1
33#define MUTE_INIT 2
34#define MUTE_USER 4
35
36CONST_LOOKUP(byte, poly4_lookup) =
37 { 0, 0, 0, 0, 1, 1, 1, 0, 1, 1, 0, 0, 1, 0, 1 };
38CONST_LOOKUP(byte, poly5_lookup) =
39 { 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 0, 1,
40 0, 1, 0, 1, 1, 1, 1, 0, 1, 1, 0, 1, 0, 0, 1, 1 };
41
42FILE_FUNC void init_state(PokeyState PTR pst)
43{
44 PST audctl = 0;
45 PST init = FALSE;
46 PST poly_index = 15 * 31 * 131071;
47 PST div_cycles = 28;
48 PST mute1 = MUTE_FREQUENCY | MUTE_USER;
49 PST mute2 = MUTE_FREQUENCY | MUTE_USER;
50 PST mute3 = MUTE_FREQUENCY | MUTE_USER;
51 PST mute4 = MUTE_FREQUENCY | MUTE_USER;
52 PST audf1 = 0;
53 PST audf2 = 0;
54 PST audf3 = 0;
55 PST audf4 = 0;
56 PST audc1 = 0;
57 PST audc2 = 0;
58 PST audc3 = 0;
59 PST audc4 = 0;
60 PST tick_cycle1 = NEVER;
61 PST tick_cycle2 = NEVER;
62 PST tick_cycle3 = NEVER;
63 PST tick_cycle4 = NEVER;
64 PST period_cycles1 = 28;
65 PST period_cycles2 = 28;
66 PST period_cycles3 = 28;
67 PST period_cycles4 = 28;
68 PST reload_cycles1 = 28;
69 PST reload_cycles3 = 28;
70 PST out1 = 0;
71 PST out2 = 0;
72 PST out3 = 0;
73 PST out4 = 0;
74 PST delta1 = 0;
75 PST delta2 = 0;
76 PST delta3 = 0;
77 PST delta4 = 0;
78 PST skctl = 3;
79 ZERO_ARRAY(PST delta_buffer);
80}
81
82ASAP_FUNC void PokeySound_Initialize(ASAP_State PTR ast)
83{
84 int i;
85 int reg;
86 reg = 0x1ff;
87 for (i = 0; i < 511; i++) {
88 reg = ((((reg >> 5) ^ reg) & 1) << 8) + (reg >> 1);
89 AST poly9_lookup[i] = (byte) reg;
90 }
91 reg = 0x1ffff;
92 for (i = 0; i < 16385; i++) {
93 reg = ((((reg >> 5) ^ reg) & 0xff) << 9) + (reg >> 8);
94 AST poly17_lookup[i] = (byte) (reg >> 1);
95 }
96 AST sample_offset = 0;
97 AST sample_index = 0;
98 AST samples = 0;
99 AST iir_acc_left = 0;
100 AST iir_acc_right = 0;
101 init_state(ADDRESSOF AST base_pokey);
102 init_state(ADDRESSOF AST extra_pokey);
103}
104
105#define CYCLE_TO_SAMPLE(cycle) (((cycle) * ASAP_SAMPLE_RATE + AST sample_offset) / ASAP_MAIN_CLOCK)
106
107#define DO_TICK(ch) \
108 if (PST init) { \
109 switch (PST audc##ch >> 4) { \
110 case 10: \
111 case 14: \
112 PST out##ch ^= 1; \
113 PST delta_buffer[CYCLE_TO_SAMPLE(cycle)] += PST delta##ch = -PST delta##ch; \
114 break; \
115 default: \
116 break; \
117 } \
118 } \
119 else { \
120 int poly = cycle + PST poly_index - (ch - 1); \
121 int newout = PST out##ch; \
122 switch (PST audc##ch >> 4) { \
123 case 0: \
124 if (poly5_lookup[poly % 31] != 0) { \
125 if ((PST audctl & 0x80) != 0) \
126 newout = AST poly9_lookup[poly % 511] & 1; \
127 else { \
128 poly %= 131071; \
129 newout = (AST poly17_lookup[poly >> 3] >> (poly & 7)) & 1; \
130 } \
131 } \
132 break; \
133 case 2: \
134 case 6: \
135 newout ^= poly5_lookup[poly % 31]; \
136 break; \
137 case 4: \
138 if (poly5_lookup[poly % 31] != 0) \
139 newout = poly4_lookup[poly % 15]; \
140 break; \
141 case 8: \
142 if ((PST audctl & 0x80) != 0) \
143 newout = AST poly9_lookup[poly % 511] & 1; \
144 else { \
145 poly %= 131071; \
146 newout = (AST poly17_lookup[poly >> 3] >> (poly & 7)) & 1; \
147 } \
148 break; \
149 case 10: \
150 case 14: \
151 newout ^= 1; \
152 break; \
153 case 12: \
154 newout = poly4_lookup[poly % 15]; \
155 break; \
156 default: \
157 break; \
158 } \
159 if (newout != PST out##ch) { \
160 PST out##ch = newout; \
161 PST delta_buffer[CYCLE_TO_SAMPLE(cycle)] += PST delta##ch = -PST delta##ch; \
162 } \
163 }
164
165FILE_FUNC void generate(ASAP_State PTR ast, PokeyState PTR pst, int current_cycle)
166{
167 for (;;) {
168 int cycle = current_cycle;
169 if (cycle > PST tick_cycle1)
170 cycle = PST tick_cycle1;
171 if (cycle > PST tick_cycle2)
172 cycle = PST tick_cycle2;
173 if (cycle > PST tick_cycle3)
174 cycle = PST tick_cycle3;
175 if (cycle > PST tick_cycle4)
176 cycle = PST tick_cycle4;
177 if (cycle == current_cycle)
178 break;
179 if (cycle == PST tick_cycle3) {
180 PST tick_cycle3 += PST period_cycles3;
181 if ((PST audctl & 4) != 0 && PST delta1 > 0 && PST mute1 == 0)
182 PST delta_buffer[CYCLE_TO_SAMPLE(cycle)] += PST delta1 = -PST delta1;
183 DO_TICK(3);
184 }
185 if (cycle == PST tick_cycle4) {
186 PST tick_cycle4 += PST period_cycles4;
187 if ((PST audctl & 8) != 0)
188 PST tick_cycle3 = cycle + PST reload_cycles3;
189 if ((PST audctl & 2) != 0 && PST delta2 > 0 && PST mute2 == 0)
190 PST delta_buffer[CYCLE_TO_SAMPLE(cycle)] += PST delta2 = -PST delta2;
191 DO_TICK(4);
192 }
193 if (cycle == PST tick_cycle1) {
194 PST tick_cycle1 += PST period_cycles1;
195 if ((PST skctl & 0x88) == 8)
196 PST tick_cycle2 = cycle + PST period_cycles2;
197 DO_TICK(1);
198 }
199 if (cycle == PST tick_cycle2) {
200 PST tick_cycle2 += PST period_cycles2;
201 if ((PST audctl & 0x10) != 0)
202 PST tick_cycle1 = cycle + PST reload_cycles1;
203 else if ((PST skctl & 8) != 0)
204 PST tick_cycle1 = cycle + PST period_cycles1;
205 DO_TICK(2);
206 }
207 }
208}
209
210#define MUTE_CHANNEL(ch, cond, mask) \
211 if (cond) { \
212 PST mute##ch |= mask; \
213 PST tick_cycle##ch = NEVER; \
214 } \
215 else { \
216 PST mute##ch &= ~mask; \
217 if (PST tick_cycle##ch == NEVER && PST mute##ch == 0) \
218 PST tick_cycle##ch = AST cycle; \
219 }
220
221#define DO_ULTRASOUND(ch) \
222 MUTE_CHANNEL(ch, PST period_cycles##ch <= ULTRASOUND_CYCLES && (PST audc##ch >> 4 == 10 || PST audc##ch >> 4 == 14), MUTE_FREQUENCY)
223
224#define DO_AUDC(ch) \
225 if (data == PST audc##ch) \
226 break; \
227 generate(ast, pst, AST cycle); \
228 PST audc##ch = data; \
229 if ((data & 0x10) != 0) { \
230 data &= 0xf; \
231 if ((PST mute##ch & MUTE_USER) == 0) \
232 PST delta_buffer[CYCLE_TO_SAMPLE(AST cycle)] \
233 += PST delta##ch > 0 ? data - PST delta##ch : data; \
234 PST delta##ch = data; \
235 } \
236 else { \
237 data &= 0xf; \
238 DO_ULTRASOUND(ch); \
239 if (PST delta##ch > 0) { \
240 if ((PST mute##ch & MUTE_USER) == 0) \
241 PST delta_buffer[CYCLE_TO_SAMPLE(AST cycle)] \
242 += data - PST delta##ch; \
243 PST delta##ch = data; \
244 } \
245 else \
246 PST delta##ch = -data; \
247 } \
248 break;
249
250#define DO_INIT(ch, cond) \
251 MUTE_CHANNEL(ch, PST init && cond, MUTE_INIT)
252
253ASAP_FUNC void PokeySound_PutByte(ASAP_State PTR ast, int addr, int data)
254{
255 PokeyState PTR pst = (addr & AST extra_pokey_mask) != 0
256 ? ADDRESSOF AST extra_pokey : ADDRESSOF AST base_pokey;
257 switch (addr & 0xf) {
258 case 0x00:
259 if (data == PST audf1)
260 break;
261 generate(ast, pst, AST cycle);
262 PST audf1 = data;
263 switch (PST audctl & 0x50) {
264 case 0x00:
265 PST period_cycles1 = PST div_cycles * (data + 1);
266 break;
267 case 0x10:
268 PST period_cycles2 = PST div_cycles * (data + 256 * PST audf2 + 1);
269 PST reload_cycles1 = PST div_cycles * (data + 1);
270 DO_ULTRASOUND(2);
271 break;
272 case 0x40:
273 PST period_cycles1 = data + 4;
274 break;
275 case 0x50:
276 PST period_cycles2 = data + 256 * PST audf2 + 7;
277 PST reload_cycles1 = data + 4;
278 DO_ULTRASOUND(2);
279 break;
280 }
281 DO_ULTRASOUND(1);
282 break;
283 case 0x01:
284 DO_AUDC(1)
285 case 0x02:
286 if (data == PST audf2)
287 break;
288 generate(ast, pst, AST cycle);
289 PST audf2 = data;
290 switch (PST audctl & 0x50) {
291 case 0x00:
292 case 0x40:
293 PST period_cycles2 = PST div_cycles * (data + 1);
294 break;
295 case 0x10:
296 PST period_cycles2 = PST div_cycles * (PST audf1 + 256 * data + 1);
297 break;
298 case 0x50:
299 PST period_cycles2 = PST audf1 + 256 * data + 7;
300 break;
301 }
302 DO_ULTRASOUND(2);
303 break;
304 case 0x03:
305 DO_AUDC(2)
306 case 0x04:
307 if (data == PST audf3)
308 break;
309 generate(ast, pst, AST cycle);
310 PST audf3 = data;
311 switch (PST audctl & 0x28) {
312 case 0x00:
313 PST period_cycles3 = PST div_cycles * (data + 1);
314 break;
315 case 0x08:
316 PST period_cycles4 = PST div_cycles * (data + 256 * PST audf4 + 1);
317 PST reload_cycles3 = PST div_cycles * (data + 1);
318 DO_ULTRASOUND(4);
319 break;
320 case 0x20:
321 PST period_cycles3 = data + 4;
322 break;
323 case 0x28:
324 PST period_cycles4 = data + 256 * PST audf4 + 7;
325 PST reload_cycles3 = data + 4;
326 DO_ULTRASOUND(4);
327 break;
328 }
329 DO_ULTRASOUND(3);
330 break;
331 case 0x05:
332 DO_AUDC(3)
333 case 0x06:
334 if (data == PST audf4)
335 break;
336 generate(ast, pst, AST cycle);
337 PST audf4 = data;
338 switch (PST audctl & 0x28) {
339 case 0x00:
340 case 0x20:
341 PST period_cycles4 = PST div_cycles * (data + 1);
342 break;
343 case 0x08:
344 PST period_cycles4 = PST div_cycles * (PST audf3 + 256 * data + 1);
345 break;
346 case 0x28:
347 PST period_cycles4 = PST audf3 + 256 * data + 7;
348 break;
349 }
350 DO_ULTRASOUND(4);
351 break;
352 case 0x07:
353 DO_AUDC(4)
354 case 0x08:
355 if (data == PST audctl)
356 break;
357 generate(ast, pst, AST cycle);
358 PST audctl = data;
359 PST div_cycles = ((data & 1) != 0) ? 114 : 28;
360 /* TODO: tick_cycles */
361 switch (data & 0x50) {
362 case 0x00:
363 PST period_cycles1 = PST div_cycles * (PST audf1 + 1);
364 PST period_cycles2 = PST div_cycles * (PST audf2 + 1);
365 break;
366 case 0x10:
367 PST period_cycles1 = PST div_cycles * 256;
368 PST period_cycles2 = PST div_cycles * (PST audf1 + 256 * PST audf2 + 1);
369 PST reload_cycles1 = PST div_cycles * (PST audf1 + 1);
370 break;
371 case 0x40:
372 PST period_cycles1 = PST audf1 + 4;
373 PST period_cycles2 = PST div_cycles * (PST audf2 + 1);
374 break;
375 case 0x50:
376 PST period_cycles1 = 256;
377 PST period_cycles2 = PST audf1 + 256 * PST audf2 + 7;
378 PST reload_cycles1 = PST audf1 + 4;
379 break;
380 }
381 DO_ULTRASOUND(1);
382 DO_ULTRASOUND(2);
383 switch (data & 0x28) {
384 case 0x00:
385 PST period_cycles3 = PST div_cycles * (PST audf3 + 1);
386 PST period_cycles4 = PST div_cycles * (PST audf4 + 1);
387 break;
388 case 0x08:
389 PST period_cycles3 = PST div_cycles * 256;
390 PST period_cycles4 = PST div_cycles * (PST audf3 + 256 * PST audf4 + 1);
391 PST reload_cycles3 = PST div_cycles * (PST audf3 + 1);
392 break;
393 case 0x20:
394 PST period_cycles3 = PST audf3 + 4;
395 PST period_cycles4 = PST div_cycles * (PST audf4 + 1);
396 break;
397 case 0x28:
398 PST period_cycles3 = 256;
399 PST period_cycles4 = PST audf3 + 256 * PST audf4 + 7;
400 PST reload_cycles3 = PST audf3 + 4;
401 break;
402 }
403 DO_ULTRASOUND(3);
404 DO_ULTRASOUND(4);
405 break;
406 case 0x09:
407 /* TODO: STIMER */
408 break;
409 case 0x0f:
410 PST skctl = data;
411 PST init = ((data & 3) == 0);
412 DO_INIT(1, (PST audctl & 0x40) == 0);
413 DO_INIT(2, (PST audctl & 0x50) != 0x50);
414 DO_INIT(3, (PST audctl & 0x20) == 0);
415 DO_INIT(4, (PST audctl & 0x28) != 0x28);
416 break;
417 default:
418 break;
419 }
420}
421
422ASAP_FUNC int PokeySound_GetRandom(ASAP_State PTR ast, int addr)
423{
424 PokeyState PTR pst = (addr & AST extra_pokey_mask) != 0
425 ? ADDRESSOF AST extra_pokey : ADDRESSOF AST base_pokey;
426 int i;
427 if (PST init)
428 return 0xff;
429 i = AST cycle + PST poly_index;
430 if ((PST audctl & 0x80) != 0)
431 return AST poly9_lookup[i % 511];
432 else {
433 int j;
434 i %= 131071;
435 j = i >> 3;
436 i &= 7;
437 return ((AST poly17_lookup[j] >> i) + (AST poly17_lookup[j + 1] << (8 - i))) & 0xff;
438 }
439}
440
441FILE_FUNC void end_frame(ASAP_State PTR ast, PokeyState PTR pst, int cycle_limit)
442{
443 int m;
444 generate(ast, pst, cycle_limit);
445 PST poly_index += cycle_limit;
446 m = ((PST audctl & 0x80) != 0) ? 15 * 31 * 511 : 15 * 31 * 131071;
447 if (PST poly_index >= 2 * m)
448 PST poly_index -= m;
449 if (PST tick_cycle1 != NEVER)
450 PST tick_cycle1 -= cycle_limit;
451 if (PST tick_cycle2 != NEVER)
452 PST tick_cycle2 -= cycle_limit;
453 if (PST tick_cycle3 != NEVER)
454 PST tick_cycle3 -= cycle_limit;
455 if (PST tick_cycle4 != NEVER)
456 PST tick_cycle4 -= cycle_limit;
457}
458
459ASAP_FUNC void PokeySound_StartFrame(ASAP_State PTR ast)
460{
461 ZERO_ARRAY(AST base_pokey.delta_buffer);
462 if (AST extra_pokey_mask != 0)
463 ZERO_ARRAY(AST extra_pokey.delta_buffer);
464}
465
466ASAP_FUNC void PokeySound_EndFrame(ASAP_State PTR ast, int current_cycle)
467{
468 end_frame(ast, ADDRESSOF AST base_pokey, current_cycle);
469 if (AST extra_pokey_mask != 0)
470 end_frame(ast, ADDRESSOF AST extra_pokey, current_cycle);
471 AST sample_offset += current_cycle * ASAP_SAMPLE_RATE;
472 AST sample_index = 0;
473 AST samples = AST sample_offset / ASAP_MAIN_CLOCK;
474 AST sample_offset %= ASAP_MAIN_CLOCK;
475}
476
477ASAP_FUNC int PokeySound_Generate(ASAP_State PTR ast, byte ARRAY buffer, int buffer_offset, int blocks, ASAP_SampleFormat format)
478{
479 int i = AST sample_index;
480 int samples = AST samples;
481 int acc_left = AST iir_acc_left;
482 int acc_right = AST iir_acc_right;
483 if (blocks < samples - i)
484 samples = i + blocks;
485 else
486 blocks = samples - i;
487 for (; i < samples; i++) {
488 int sample;
489 acc_left += (AST base_pokey.delta_buffer[i] << 20) - (acc_left * 3 >> 10);
490 sample = acc_left >> 10;
491#define STORE_SAMPLE \
492 if (sample < -32767) \
493 sample = -32767; \
494 else if (sample > 32767) \
495 sample = 32767; \
496 switch (format) { \
497 case ASAP_FORMAT_U8: \
498 buffer[buffer_offset++] = (byte) ((sample >> 8) + 128); \
499 break; \
500 case ASAP_FORMAT_S16_LE: \
501 buffer[buffer_offset++] = (byte) sample; \
502 buffer[buffer_offset++] = (byte) (sample >> 8); \
503 break; \
504 case ASAP_FORMAT_S16_BE: \
505 buffer[buffer_offset++] = (byte) (sample >> 8); \
506 buffer[buffer_offset++] = (byte) sample; \
507 break; \
508 }
509 STORE_SAMPLE;
510 if (AST extra_pokey_mask != 0) {
511 acc_right += (AST extra_pokey.delta_buffer[i] << 20) - (acc_right * 3 >> 10);
512 sample = acc_right >> 10;
513 STORE_SAMPLE;
514 }
515 }
516 if (i == AST samples) {
517 acc_left += AST base_pokey.delta_buffer[i] << 20;
518 acc_right += AST extra_pokey.delta_buffer[i] << 20;
519 }
520 AST sample_index = i;
521 AST iir_acc_left = acc_left;
522 AST iir_acc_right = acc_right;
523 return blocks;
524}
525
526ASAP_FUNC abool PokeySound_IsSilent(const PokeyState PTR pst)
527{
528 return ((PST audc1 | PST audc2 | PST audc3 | PST audc4) & 0xf) == 0;
529}
530
531ASAP_FUNC void PokeySound_Mute(const ASAP_State PTR ast, PokeyState PTR pst, int mask)
532{
533 MUTE_CHANNEL(1, (mask & 1) != 0, MUTE_USER);
534 MUTE_CHANNEL(2, (mask & 2) != 0, MUTE_USER);
535 MUTE_CHANNEL(3, (mask & 4) != 0, MUTE_USER);
536 MUTE_CHANNEL(4, (mask & 8) != 0, MUTE_USER);
537}
diff --git a/apps/codecs/asap/asap.c b/apps/codecs/asap/asap.c
new file mode 100644
index 0000000000..084708af4c
--- /dev/null
+++ b/apps/codecs/asap/asap.c
@@ -0,0 +1,2000 @@
1/*
2 * asap.c - ASAP engine
3 *
4 * Copyright (C) 2005-2008 Piotr Fusik
5 *
6 * This file is part of ASAP (Another Slight Atari Player),
7 * see http://asap.sourceforge.net
8 *
9 * ASAP is free software; you can redistribute it and/or modify it
10 * under the terms of the GNU General Public License as published
11 * by the Free Software Foundation; either version 2 of the License,
12 * or (at your option) any later version.
13 *
14 * ASAP is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty
16 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
17 * See the GNU General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public License
20 * along with ASAP; if not, write to the Free Software Foundation, Inc.,
21 * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
22 */
23
24#if !defined(JAVA) && !defined(CSHARP)
25#include <string.h>
26#endif
27
28#include "asap_internal.h"
29#if !defined(JAVA) && !defined(CSHARP)
30#include "players.h"
31#endif
32
33#define CMR_BASS_TABLE_OFFSET 0x70f
34
35CONST_LOOKUP(byte, cmr_bass_table) = {
36 0x5C, 0x56, 0x50, 0x4D, 0x47, 0x44, 0x41, 0x3E,
37 0x38, 0x35, (byte) 0x88, 0x7F, 0x79, 0x73, 0x6C, 0x67,
38 0x60, 0x5A, 0x55, 0x51, 0x4C, 0x48, 0x43, 0x3F,
39 0x3D, 0x39, 0x34, 0x33, 0x30, 0x2D, 0x2A, 0x28,
40 0x25, 0x24, 0x21, 0x1F, 0x1E
41};
42
43ASAP_FUNC int ASAP_GetByte(ASAP_State PTR ast, int addr)
44{
45 switch (addr & 0xff0f) {
46 case 0xd20a:
47 return PokeySound_GetRandom(ast, addr);
48 case 0xd20e:
49 if ((addr & AST extra_pokey_mask) != 0)
50 return 0xff;
51 return AST irqst;
52 case 0xd20f:
53 return 0xff;
54 case 0xd40b:
55 return AST scanline_number >> 1;
56 default:
57 return dGetByte(addr);
58 }
59}
60
61ASAP_FUNC void ASAP_PutByte(ASAP_State PTR ast, int addr, int data)
62{
63 if ((addr >> 8) == 0xd2) {
64 if ((addr & (AST extra_pokey_mask + 0xf)) == 0xe) {
65 AST irqst |= data ^ 0xff;
66#define SET_TIMER_IRQ(ch) \
67 if ((data & AST irqst & ch) != 0) { \
68 if (AST timer##ch##_cycle == NEVER) { \
69 int t = AST base_pokey.tick_cycle##ch; \
70 while (t < AST cycle) \
71 t += AST base_pokey.period_cycles##ch; \
72 AST timer##ch##_cycle = t; \
73 if (AST nearest_event_cycle > t) \
74 AST nearest_event_cycle = t; \
75 } \
76 } \
77 else \
78 AST timer##ch##_cycle = NEVER;
79 SET_TIMER_IRQ(1);
80 SET_TIMER_IRQ(2);
81 SET_TIMER_IRQ(4);
82 }
83 else
84 PokeySound_PutByte(ast, addr, data);
85 }
86 else if ((addr & 0xff0f) == 0xd40a) {
87 if (AST cycle <= AST next_scanline_cycle - 8)
88 AST cycle = AST next_scanline_cycle - 8;
89 else
90 AST cycle = AST next_scanline_cycle + 106;
91 }
92 else
93 dPutByte(addr, data);
94}
95
96#define MAX_SONGS 32
97
98CONST_LOOKUP(int, perframe2fastplay) = { 312, 312 / 2, 312 / 3, 312 / 4 };
99
100FILE_FUNC abool load_native(ASAP_State PTR ast, ASAP_ModuleInfo PTR module_info,
101 const byte ARRAY module, int module_len, ASAP_OBX player)
102{
103#if defined(JAVA) || defined(CSHARP)
104 try
105#endif
106 {
107 int player_last_byte;
108 int block_len;
109 if (UBYTE(module[0]) != 0xff || UBYTE(module[1]) != 0xff)
110 return FALSE;
111#ifdef JAVA
112 try {
113 player.read();
114 player.read();
115 MODULE_INFO player = player.read();
116 MODULE_INFO player += player.read() << 8;
117 player_last_byte = player.read();
118 player_last_byte += player.read() << 8;
119 } catch (IOException e) {
120 throw new RuntimeException();
121 }
122#elif defined(CSHARP)
123 player.ReadByte();
124 player.ReadByte();
125 MODULE_INFO player = player.ReadByte();
126 MODULE_INFO player += player.ReadByte() << 8;
127 player_last_byte = player.ReadByte();
128 player_last_byte += player.ReadByte() << 8;
129#else
130 MODULE_INFO player = UBYTE(player[2]) + (UBYTE(player[3]) << 8);
131 player_last_byte = UBYTE(player[4]) + (UBYTE(player[5]) << 8);
132#endif
133 MODULE_INFO music = UBYTE(module[2]) + (UBYTE(module[3]) << 8);
134 if (MODULE_INFO music <= player_last_byte)
135 return FALSE;
136 block_len = UBYTE(module[4]) + (UBYTE(module[5]) << 8) + 1 - MODULE_INFO music;
137 if (6 + block_len != module_len) {
138 int info_addr;
139 int info_len;
140 if (MODULE_INFO type != 'r' || 11 + block_len > module_len)
141 return FALSE;
142 /* allow optional info for Raster Music Tracker */
143 info_addr = UBYTE(module[6 + block_len]) + (UBYTE(module[7 + block_len]) << 8);
144 if (info_addr != MODULE_INFO music + block_len)
145 return FALSE;
146 info_len = UBYTE(module[8 + block_len]) + (UBYTE(module[9 + block_len]) << 8) + 1 - info_addr;
147 if (10 + block_len + info_len != module_len)
148 return FALSE;
149 }
150 if (ast != NULL) {
151 COPY_ARRAY(AST memory, MODULE_INFO music, module, 6, block_len);
152#ifdef JAVA
153 int addr = MODULE_INFO player;
154 do {
155 int i;
156 try {
157 i = player.read(AST memory, addr, player_last_byte + 1 - addr);
158 } catch (IOException e) {
159 throw new RuntimeException();
160 }
161 if (i <= 0)
162 throw new RuntimeException();
163 addr += i;
164 } while (addr <= player_last_byte);
165#elif defined(CSHARP)
166 int addr = MODULE_INFO player;
167 do {
168 int i = player.Read(AST memory, addr, player_last_byte + 1 - addr);
169 if (i <= 0)
170 throw new Exception();
171 addr += i;
172 } while (addr <= player_last_byte);
173#else
174 COPY_ARRAY(AST memory, MODULE_INFO player, player, 6, player_last_byte + 1 - MODULE_INFO player);
175#endif
176 }
177 return TRUE;
178 }
179#ifdef JAVA
180 finally {
181 try {
182 player.close();
183 } catch (IOException e) {
184 throw new RuntimeException();
185 }
186 }
187#elif defined(CSHARP)
188 finally {
189 player.Close();
190 }
191#endif
192}
193
194FILE_FUNC void set_song_duration(ASAP_ModuleInfo PTR module_info, int player_calls)
195{
196 MODULE_INFO durations[MODULE_INFO songs] = (int) (player_calls * MODULE_INFO fastplay * 114000.0 / 1773447);
197 MODULE_INFO songs++;
198}
199
200#define SEEN_THIS_CALL 1
201#define SEEN_BEFORE 2
202#define SEEN_REPEAT 3
203
204FILE_FUNC void parse_cmc_song(ASAP_ModuleInfo PTR module_info, const byte ARRAY module, int pos)
205{
206 int tempo = UBYTE(module[0x19]);
207 int player_calls = 0;
208 int rep_start_pos = 0;
209 int rep_end_pos = 0;
210 int rep_times = 0;
211 NEW_ARRAY(byte, seen, 0x55);
212 INIT_ARRAY(seen);
213 while (pos >= 0 && pos < 0x55) {
214 int p1;
215 int p2;
216 int p3;
217 if (pos == rep_end_pos && rep_times > 0) {
218 for (p1 = 0; p1 < 0x55; p1++)
219 if (seen[p1] == SEEN_THIS_CALL || seen[p1] == SEEN_REPEAT)
220 seen[p1] = 0;
221 rep_times--;
222 pos = rep_start_pos;
223 }
224 if (seen[pos] != 0) {
225 if (seen[pos] != SEEN_THIS_CALL)
226 MODULE_INFO loops[MODULE_INFO songs] = TRUE;
227 break;
228 }
229 seen[pos] = SEEN_THIS_CALL;
230 p1 = UBYTE(module[0x206 + pos]);
231 p2 = UBYTE(module[0x25b + pos]);
232 p3 = UBYTE(module[0x2b0 + pos]);
233 if (p1 == 0xfe || p2 == 0xfe || p3 == 0xfe) {
234 pos++;
235 continue;
236 }
237 p1 >>= 4;
238 if (p1 == 8)
239 break;
240 if (p1 == 9) {
241 pos = p2;
242 continue;
243 }
244 if (p1 == 0xa) {
245 pos -= p2;
246 continue;
247 }
248 if (p1 == 0xb) {
249 pos += p2;
250 continue;
251 }
252 if (p1 == 0xc) {
253 tempo = p2;
254 pos++;
255 continue;
256 }
257 if (p1 == 0xd) {
258 pos++;
259 rep_start_pos = pos;
260 rep_end_pos = pos + p2;
261 rep_times = p3 - 1;
262 continue;
263 }
264 if (p1 == 0xe) {
265 MODULE_INFO loops[MODULE_INFO songs] = TRUE;
266 break;
267 }
268 p2 = rep_times > 0 ? SEEN_REPEAT : SEEN_BEFORE;
269 for (p1 = 0; p1 < 0x55; p1++)
270 if (seen[p1] == SEEN_THIS_CALL)
271 seen[p1] = (byte) p2;
272 player_calls += tempo << 6;
273 pos++;
274 }
275 set_song_duration(module_info, player_calls);
276}
277
278FILE_FUNC abool parse_cmc(ASAP_State PTR ast, ASAP_ModuleInfo PTR module_info,
279 const byte ARRAY module, int module_len, abool cmr)
280{
281 int last_pos;
282 int pos;
283 if (module_len < 0x306)
284 return FALSE;
285 MODULE_INFO type = cmr ? 'z' : 'c';
286 if (!load_native(ast, module_info, module, module_len, GET_OBX(cmc)))
287 return FALSE;
288 if (ast != NULL && cmr)
289 COPY_ARRAY(AST memory, 0x500 + CMR_BASS_TABLE_OFFSET, cmr_bass_table, 0, sizeof(cmr_bass_table));
290 /* auto-detect number of subsongs */
291 last_pos = 0x54;
292 while (--last_pos >= 0) {
293 if (UBYTE(module[0x206 + last_pos]) < 0xb0
294 || UBYTE(module[0x25b + last_pos]) < 0x40
295 || UBYTE(module[0x2b0 + last_pos]) < 0x40)
296 break;
297 }
298 MODULE_INFO songs = 0;
299 parse_cmc_song(module_info, module, 0);
300 for (pos = 0; pos < last_pos && MODULE_INFO songs < MAX_SONGS; pos++)
301 if (UBYTE(module[0x206 + pos]) == 0x8f || UBYTE(module[0x206 + pos]) == 0xef)
302 parse_cmc_song(module_info, module, pos + 1);
303 return TRUE;
304}
305
306FILE_FUNC void parse_mpt_song(ASAP_ModuleInfo PTR module_info, const byte ARRAY module,
307 abool ARRAY global_seen, int song_len, int pos)
308{
309 int addr_to_offset = UBYTE(module[2]) + (UBYTE(module[3]) << 8) - 6;
310 int tempo = UBYTE(module[0x1cf]);
311 int player_calls = 0;
312 NEW_ARRAY(byte, seen, 256);
313 NEW_ARRAY(int, pattern_offset, 4);
314 NEW_ARRAY(int, blank_rows, 4);
315 NEW_ARRAY(int, blank_rows_counter, 4);
316 INIT_ARRAY(seen);
317 INIT_ARRAY(blank_rows);
318 while (pos < song_len) {
319 int i;
320 int ch;
321 int pattern_rows;
322 if (seen[pos] != 0) {
323 if (seen[pos] != SEEN_THIS_CALL)
324 MODULE_INFO loops[MODULE_INFO songs] = TRUE;
325 break;
326 }
327 seen[pos] = SEEN_THIS_CALL;
328 global_seen[pos] = TRUE;
329 i = UBYTE(module[0x1d0 + pos * 2]);
330 if (i == 0xff) {
331 pos = UBYTE(module[0x1d1 + pos * 2]);
332 continue;
333 }
334 for (ch = 3; ch >= 0; ch--) {
335 i = UBYTE(module[0x1c6 + ch]) + (UBYTE(module[0x1ca + ch]) << 8) - addr_to_offset;
336 i = UBYTE(module[i + pos * 2]);
337 if (i >= 0x40)
338 break;
339 i <<= 1;
340 i = UBYTE(module[0x46 + i]) + (UBYTE(module[0x47 + i]) << 8);
341 pattern_offset[ch] = i == 0 ? 0 : i - addr_to_offset;
342 blank_rows_counter[ch] = 0;
343 }
344 if (ch >= 0)
345 break;
346 for (i = 0; i < song_len; i++)
347 if (seen[i] == SEEN_THIS_CALL)
348 seen[i] = SEEN_BEFORE;
349 for (pattern_rows = UBYTE(module[0x1ce]); --pattern_rows >= 0; ) {
350 for (ch = 3; ch >= 0; ch--) {
351 if (pattern_offset[ch] == 0 || --blank_rows_counter[ch] >= 0)
352 continue;
353 for (;;) {
354 i = UBYTE(module[pattern_offset[ch]++]);
355 if (i < 0x40 || i == 0xfe)
356 break;
357 if (i < 0x80)
358 continue;
359 if (i < 0xc0) {
360 blank_rows[ch] = i - 0x80;
361 continue;
362 }
363 if (i < 0xd0)
364 continue;
365 if (i < 0xe0) {
366 tempo = i - 0xcf;
367 continue;
368 }
369 pattern_rows = 0;
370 }
371 blank_rows_counter[ch] = blank_rows[ch];
372 }
373 player_calls += tempo;
374 }
375 pos++;
376 }
377 if (player_calls > 0)
378 set_song_duration(module_info, player_calls);
379}
380
381FILE_FUNC abool parse_mpt(ASAP_State PTR ast, ASAP_ModuleInfo PTR module_info,
382 const byte ARRAY module, int module_len)
383{
384 int track0_addr;
385 int pos;
386 int song_len;
387 /* seen[i] == TRUE if the track position i has been processed */
388 NEW_ARRAY(abool, global_seen, 256);
389 if (module_len < 0x1d0)
390 return FALSE;
391 MODULE_INFO type = 'm';
392 if (!load_native(ast, module_info, module, module_len, GET_OBX(mpt)))
393 return FALSE;
394 track0_addr = UBYTE(module[2]) + (UBYTE(module[3]) << 8) + 0x1ca;
395 if (UBYTE(module[0x1c6]) + (UBYTE(module[0x1ca]) << 8) != track0_addr)
396 return FALSE;
397 /* Calculate the length of the first track. Address of the second track minus
398 address of the first track equals the length of the first track in bytes.
399 Divide by two to get number of track positions. */
400 song_len = (UBYTE(module[0x1c7]) + (UBYTE(module[0x1cb]) << 8) - track0_addr) >> 1;
401 if (song_len > 0xfe)
402 return FALSE;
403 INIT_ARRAY(global_seen);
404 MODULE_INFO songs = 0;
405 for (pos = 0; pos < song_len && MODULE_INFO songs < MAX_SONGS; pos++) {
406 if (!global_seen[pos]) {
407 MODULE_INFO song_pos[MODULE_INFO songs] = (byte) pos;
408 parse_mpt_song(module_info, module, global_seen, song_len, pos);
409 }
410 }
411 return MODULE_INFO songs != 0;
412}
413
414CONST_LOOKUP(byte, rmt_volume_silent) = { 16, 8, 4, 3, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1 };
415
416FILE_FUNC int rmt_instrument_frames(const byte ARRAY module, int instrument, int volume, int volume_frame, abool extra_pokey)
417{
418 int addr_to_offset = UBYTE(module[2]) + (UBYTE(module[3]) << 8) - 6;
419 int per_frame = module[0xc];
420 int player_call;
421 int player_calls;
422 int index;
423 int index_end;
424 int index_loop;
425 int volume_slide_depth;
426 int volume_min;
427 abool looping;
428 int volume_slide;
429 abool silent_loop;
430 instrument = UBYTE(module[0xe]) + (UBYTE(module[0xf]) << 8) - addr_to_offset + (instrument << 1);
431 if (module[instrument + 1] == 0)
432 return 0;
433 instrument = UBYTE(module[instrument]) + (UBYTE(module[instrument + 1]) << 8) - addr_to_offset;
434 player_calls = player_call = volume_frame * per_frame;
435 index = UBYTE(module[instrument]) + 1 + player_call * 3;
436 index_end = UBYTE(module[instrument + 2]) + 3;
437 index_loop = UBYTE(module[instrument + 3]);
438 if (index_loop >= index_end)
439 return 0; /* error */
440 volume_slide_depth = UBYTE(module[instrument + 6]);
441 volume_min = UBYTE(module[instrument + 7]);
442 looping = index >= index_end;
443 if (looping)
444 index = (index - index_end) % (index_end - index_loop) + index_loop;
445 else {
446 do {
447 int vol = module[instrument + index];
448 if (extra_pokey)
449 vol >>= 4;
450 if ((vol & 0xf) >= rmt_volume_silent[volume])
451 player_calls = player_call + 1;
452 player_call++;
453 index += 3;
454 } while (index < index_end);
455 }
456 if (volume_slide_depth == 0)
457 return player_calls / per_frame;
458 volume_slide = 128;
459 silent_loop = FALSE;
460 for (;;) {
461 int vol;
462 if (index >= index_end) {
463 if (silent_loop)
464 break;
465 silent_loop = TRUE;
466 index = index_loop;
467 }
468 vol = module[instrument + index];
469 if (extra_pokey)
470 vol >>= 4;
471 if ((vol & 0xf) >= rmt_volume_silent[volume]) {
472 player_calls = player_call + 1;
473 silent_loop = FALSE;
474 }
475 player_call++;
476 index += 3;
477 volume_slide -= volume_slide_depth;
478 if (volume_slide < 0) {
479 volume_slide += 256;
480 if (--volume <= volume_min)
481 break;
482 }
483 }
484 return player_calls / per_frame;
485}
486
487FILE_FUNC void parse_rmt_song(ASAP_ModuleInfo PTR module_info, const byte ARRAY module,
488 abool ARRAY global_seen, int song_len, int pos_shift, int pos)
489{
490 int ch;
491 int addr_to_offset = UBYTE(module[2]) + (UBYTE(module[3]) << 8) - 6;
492 int tempo = UBYTE(module[0xb]);
493 int frames = 0;
494 int song_offset = UBYTE(module[0x14]) + (UBYTE(module[0x15]) << 8) - addr_to_offset;
495 int pattern_lo_offset = UBYTE(module[0x10]) + (UBYTE(module[0x11]) << 8) - addr_to_offset;
496 int pattern_hi_offset = UBYTE(module[0x12]) + (UBYTE(module[0x13]) << 8) - addr_to_offset;
497 int instrument_frames;
498 NEW_ARRAY(byte, seen, 256);
499 NEW_ARRAY(int, pattern_begin, 8);
500 NEW_ARRAY(int, pattern_offset, 8);
501 NEW_ARRAY(int, blank_rows, 8);
502 NEW_ARRAY(int, instrument_no, 8);
503 NEW_ARRAY(int, instrument_frame, 8);
504 NEW_ARRAY(int, volume_value, 8);
505 NEW_ARRAY(int, volume_frame, 8);
506 INIT_ARRAY(seen);
507 INIT_ARRAY(instrument_no);
508 INIT_ARRAY(instrument_frame);
509 INIT_ARRAY(volume_value);
510 INIT_ARRAY(volume_frame);
511 while (pos < song_len) {
512 int i;
513 int pattern_rows;
514 if (seen[pos] != 0) {
515 if (seen[pos] != SEEN_THIS_CALL)
516 MODULE_INFO loops[MODULE_INFO songs] = TRUE;
517 break;
518 }
519 seen[pos] = SEEN_THIS_CALL;
520 global_seen[pos] = TRUE;
521 if (UBYTE(module[song_offset + (pos << pos_shift)]) == 0xfe) {
522 pos = UBYTE(module[song_offset + (pos << pos_shift) + 1]);
523 continue;
524 }
525 for (ch = 0; ch < 1 << pos_shift; ch++) {
526 i = UBYTE(module[song_offset + (pos << pos_shift) + ch]);
527 if (i == 0xff)
528 blank_rows[ch] = 256;
529 else {
530 pattern_offset[ch] = pattern_begin[ch] = UBYTE(module[pattern_lo_offset + i])
531 + (UBYTE(module[pattern_hi_offset + i]) << 8) - addr_to_offset;
532 blank_rows[ch] = 0;
533 }
534 }
535 for (i = 0; i < song_len; i++)
536 if (seen[i] == SEEN_THIS_CALL)
537 seen[i] = SEEN_BEFORE;
538 for (pattern_rows = UBYTE(module[0xa]); --pattern_rows >= 0; ) {
539 for (ch = 0; ch < 1 << pos_shift; ch++) {
540 if (--blank_rows[ch] > 0)
541 continue;
542 for (;;) {
543 i = UBYTE(module[pattern_offset[ch]++]);
544 if ((i & 0x3f) < 62) {
545 i += UBYTE(module[pattern_offset[ch]++]) << 8;
546 if ((i & 0x3f) != 61) {
547 instrument_no[ch] = i >> 10;
548 instrument_frame[ch] = frames;
549 }
550 volume_value[ch] = (i >> 6) & 0xf;
551 volume_frame[ch] = frames;
552 break;
553 }
554 if (i == 62) {
555 blank_rows[ch] = UBYTE(module[pattern_offset[ch]++]);
556 break;
557 }
558 if ((i & 0x3f) == 62) {
559 blank_rows[ch] = i >> 6;
560 break;
561 }
562 if ((i & 0xbf) == 63) {
563 tempo = UBYTE(module[pattern_offset[ch]++]);
564 continue;
565 }
566 if (i == 0xbf) {
567 pattern_offset[ch] = pattern_begin[ch] + UBYTE(module[pattern_offset[ch]]);
568 continue;
569 }
570 /* assert(i == 0xff); */
571 pattern_rows = -1;
572 break;
573 }
574 if (pattern_rows < 0)
575 break;
576 }
577 if (pattern_rows >= 0)
578 frames += tempo;
579 }
580 pos++;
581 }
582 instrument_frames = 0;
583 for (ch = 0; ch < 1 << pos_shift; ch++) {
584 int frame = instrument_frame[ch];
585 frame += rmt_instrument_frames(module, instrument_no[ch], volume_value[ch], volume_frame[ch] - frame, ch >= 4);
586 if (instrument_frames < frame)
587 instrument_frames = frame;
588 }
589 if (frames > instrument_frames) {
590 if (frames - instrument_frames > 100)
591 MODULE_INFO loops[MODULE_INFO songs] = FALSE;
592 frames = instrument_frames;
593 }
594 if (frames > 0)
595 set_song_duration(module_info, frames);
596}
597
598FILE_FUNC abool parse_rmt(ASAP_State PTR ast, ASAP_ModuleInfo PTR module_info,
599 const byte ARRAY module, int module_len)
600{
601 int per_frame;
602 int pos_shift;
603 int song_len;
604 int pos;
605 NEW_ARRAY(abool, global_seen, 256);
606 if (module_len < 0x30 || module[6] != 'R' || module[7] != 'M'
607 || module[8] != 'T' || module[0xd] != 1)
608 return FALSE;
609 switch ((char) module[9]) {
610 case '4':
611 pos_shift = 2;
612 break;
613 case '8':
614 MODULE_INFO channels = 2;
615 pos_shift = 3;
616 break;
617 default:
618 return FALSE;
619 }
620 per_frame = module[0xc];
621 if (per_frame < 1 || per_frame > 4)
622 return FALSE;
623 MODULE_INFO type = 'r';
624 if (!load_native(ast, module_info, module, module_len,
625 MODULE_INFO channels == 2 ? GET_OBX(rmt8) : GET_OBX(rmt4)))
626 return FALSE;
627 song_len = UBYTE(module[4]) + (UBYTE(module[5]) << 8) + 1
628 - UBYTE(module[0x14]) - (UBYTE(module[0x15]) << 8);
629 if (pos_shift == 3 && (song_len & 4) != 0
630 && UBYTE(module[6 + UBYTE(module[4]) + (UBYTE(module[5]) << 8)
631 - UBYTE(module[2]) - (UBYTE(module[3]) << 8) - 3]) == 0xfe)
632 song_len += 4;
633 song_len >>= pos_shift;
634 if (song_len >= 0x100)
635 return FALSE;
636 INIT_ARRAY(global_seen);
637 MODULE_INFO songs = 0;
638 for (pos = 0; pos < song_len && MODULE_INFO songs < MAX_SONGS; pos++) {
639 if (!global_seen[pos]) {
640 MODULE_INFO song_pos[MODULE_INFO songs] = (byte) pos;
641 parse_rmt_song(module_info, module, global_seen, song_len, pos_shift, pos);
642 }
643 }
644 /* must set fastplay after song durations calculations, so they assume 312 */
645 MODULE_INFO fastplay = perframe2fastplay[per_frame - 1];
646 MODULE_INFO player = 0x600;
647 return MODULE_INFO songs != 0;
648}
649
650FILE_FUNC void parse_tmc_song(ASAP_ModuleInfo PTR module_info, const byte ARRAY module, int pos)
651{
652 int addr_to_offset = UBYTE(module[2]) + (UBYTE(module[3]) << 8) - 6;
653 int tempo = UBYTE(module[0x24]) + 1;
654 int frames = 0;
655 NEW_ARRAY(int, pattern_offset, 8);
656 NEW_ARRAY(int, blank_rows, 8);
657 while (UBYTE(module[0x1a6 + 15 + pos]) < 0x80) {
658 int ch;
659 int pattern_rows;
660 for (ch = 7; ch >= 0; ch--) {
661 int pat = UBYTE(module[0x1a6 + 15 + pos - 2 * ch]);
662 pattern_offset[ch] = UBYTE(module[0xa6 + pat]) + (UBYTE(module[0x126 + pat]) << 8) - addr_to_offset;
663 blank_rows[ch] = 0;
664 }
665 for (pattern_rows = 64; --pattern_rows >= 0; ) {
666 for (ch = 7; ch >= 0; ch--) {
667 if (--blank_rows[ch] >= 0)
668 continue;
669 for (;;) {
670 int i = UBYTE(module[pattern_offset[ch]++]);
671 if (i < 0x40) {
672 pattern_offset[ch]++;
673 break;
674 }
675 if (i == 0x40) {
676 i = UBYTE(module[pattern_offset[ch]++]);
677 if ((i & 0x7f) == 0)
678 pattern_rows = 0;
679 else
680 tempo = (i & 0x7f) + 1;
681 if (i >= 0x80)
682 pattern_offset[ch]++;
683 break;
684 }
685 if (i < 0x80) {
686 i = module[pattern_offset[ch]++] & 0x7f;
687 if (i == 0)
688 pattern_rows = 0;
689 else
690 tempo = i + 1;
691 pattern_offset[ch]++;
692 break;
693 }
694 if (i < 0xc0)
695 continue;
696 blank_rows[ch] = i - 0xbf;
697 break;
698 }
699 }
700 frames += tempo;
701 }
702 pos += 16;
703 }
704 if (UBYTE(module[0x1a6 + 14 + pos]) < 0x80)
705 MODULE_INFO loops[MODULE_INFO songs] = TRUE;
706 set_song_duration(module_info, frames);
707}
708
709FILE_FUNC abool parse_tmc(ASAP_State PTR ast, ASAP_ModuleInfo PTR module_info,
710 const byte ARRAY module, int module_len)
711{
712 int i;
713 int last_pos;
714 if (module_len < 0x1d0)
715 return FALSE;
716 MODULE_INFO type = 't';
717 if (!load_native(ast, module_info, module, module_len, GET_OBX(tmc)))
718 return FALSE;
719 MODULE_INFO channels = 2;
720 i = 0;
721 /* find first instrument */
722 while (module[0x66 + i] == 0) {
723 if (++i >= 64)
724 return FALSE; /* no instrument */
725 }
726 last_pos = (UBYTE(module[0x66 + i]) << 8) + UBYTE(module[0x26 + i])
727 - UBYTE(module[2]) - (UBYTE(module[3]) << 8) - 0x1b0;
728 if (0x1b5 + last_pos >= module_len)
729 return FALSE;
730 /* skip trailing jumps */
731 do {
732 if (last_pos <= 0)
733 return FALSE; /* no pattern to play */
734 last_pos -= 16;
735 } while (UBYTE(module[0x1b5 + last_pos]) >= 0x80);
736 MODULE_INFO songs = 0;
737 parse_tmc_song(module_info, module, 0);
738 for (i = 0; i < last_pos && MODULE_INFO songs < MAX_SONGS; i += 16)
739 if (UBYTE(module[0x1b5 + i]) >= 0x80)
740 parse_tmc_song(module_info, module, i + 16);
741 /* must set fastplay after song durations calculations, so they assume 312 */
742 i = module[0x25];
743 if (i < 1 || i > 4)
744 return FALSE;
745 if (ast != NULL)
746 AST tmc_per_frame = module[0x25];
747 MODULE_INFO fastplay = perframe2fastplay[i - 1];
748 return TRUE;
749}
750
751FILE_FUNC void parse_tm2_song(ASAP_ModuleInfo PTR module_info, const byte ARRAY module, int pos)
752{
753 int addr_to_offset = UBYTE(module[2]) + (UBYTE(module[3]) << 8) - 6;
754 int tempo = UBYTE(module[0x24]) + 1;
755 int player_calls = 0;
756 NEW_ARRAY(int, pattern_offset, 8);
757 NEW_ARRAY(int, blank_rows, 8);
758 for (;;) {
759 int ch;
760 int pattern_rows = UBYTE(module[0x386 + 16 + pos]);
761 if (pattern_rows == 0)
762 break;
763 if (pattern_rows >= 0x80) {
764 MODULE_INFO loops[MODULE_INFO songs] = TRUE;
765 break;
766 }
767 for (ch = 7; ch >= 0; ch--) {
768 int pat = UBYTE(module[0x386 + 15 + pos - 2 * ch]);
769 pattern_offset[ch] = UBYTE(module[0x106 + pat]) + (UBYTE(module[0x206 + pat]) << 8) - addr_to_offset;
770 blank_rows[ch] = 0;
771 }
772 while (--pattern_rows >= 0) {
773 for (ch = 7; ch >= 0; ch--) {
774 if (--blank_rows[ch] >= 0)
775 continue;
776 for (;;) {
777 int i = UBYTE(module[pattern_offset[ch]++]);
778 if (i == 0) {
779 pattern_offset[ch]++;
780 break;
781 }
782 if (i < 0x40) {
783 if (UBYTE(module[pattern_offset[ch]++]) >= 0x80)
784 pattern_offset[ch]++;
785 break;
786 }
787 if (i < 0x80) {
788 pattern_offset[ch]++;
789 break;
790 }
791 if (i == 0x80) {
792 blank_rows[ch] = UBYTE(module[pattern_offset[ch]++]);
793 break;
794 }
795 if (i < 0xc0)
796 break;
797 if (i < 0xd0) {
798 tempo = i - 0xbf;
799 continue;
800 }
801 if (i < 0xe0) {
802 pattern_offset[ch]++;
803 break;
804 }
805 if (i < 0xf0) {
806 pattern_offset[ch] += 2;
807 break;
808 }
809 if (i < 0xff) {
810 blank_rows[ch] = i - 0xf0;
811 break;
812 }
813 blank_rows[ch] = 64;
814 break;
815 }
816 }
817 player_calls += tempo;
818 }
819 pos += 17;
820 }
821 set_song_duration(module_info, player_calls);
822}
823
824FILE_FUNC abool parse_tm2(ASAP_State PTR ast, ASAP_ModuleInfo PTR module_info,
825 const byte ARRAY module, int module_len)
826{
827 int i;
828 int last_pos;
829 int c;
830 if (module_len < 0x3a4)
831 return FALSE;
832 MODULE_INFO type = 'T';
833 if (!load_native(ast, module_info, module, module_len, GET_OBX(tm2)))
834 return FALSE;
835 i = module[0x25];
836 if (i < 1 || i > 4)
837 return FALSE;
838 MODULE_INFO fastplay = perframe2fastplay[i - 1];
839 MODULE_INFO player = 0x500;
840 if (module[0x1f] != 0)
841 MODULE_INFO channels = 2;
842 last_pos = 0xffff;
843 for (i = 0; i < 0x80; i++) {
844 int instr_addr = UBYTE(module[0x86 + i]) + (UBYTE(module[0x306 + i]) << 8);
845 if (instr_addr != 0 && instr_addr < last_pos)
846 last_pos = instr_addr;
847 }
848 for (i = 0; i < 0x100; i++) {
849 int pattern_addr = UBYTE(module[0x106 + i]) + (UBYTE(module[0x206 + i]) << 8);
850 if (pattern_addr != 0 && pattern_addr < last_pos)
851 last_pos = pattern_addr;
852 }
853 last_pos -= UBYTE(module[2]) + (UBYTE(module[3]) << 8) + 0x380;
854 if (0x386 + last_pos >= module_len)
855 return FALSE;
856 /* skip trailing stop/jump commands */
857 do {
858 if (last_pos <= 0)
859 return FALSE;
860 last_pos -= 17;
861 c = UBYTE(module[0x386 + 16 + last_pos]);
862 } while (c == 0 || c >= 0x80);
863 MODULE_INFO songs = 0;
864 parse_tm2_song(module_info, module, 0);
865 for (i = 0; i < last_pos && MODULE_INFO songs < MAX_SONGS; i += 17) {
866 c = UBYTE(module[0x386 + 16 + i]);
867 if (c == 0 || c >= 0x80)
868 parse_tm2_song(module_info, module, i + 17);
869 }
870 return TRUE;
871}
872
873#if !defined(JAVA) && !defined(CSHARP)
874
875static abool parse_hex(int *retval, const char *p)
876{
877 int r = 0;
878 do {
879 char c = *p;
880 if (r > 0xfff)
881 return FALSE;
882 r <<= 4;
883 if (c >= '0' && c <= '9')
884 r += c - '0';
885 else if (c >= 'A' && c <= 'F')
886 r += c - 'A' + 10;
887 else if (c >= 'a' && c <= 'f')
888 r += c - 'a' + 10;
889 else
890 return FALSE;
891 } while (*++p != '\0');
892 *retval = r;
893 return TRUE;
894}
895
896static abool parse_dec(int *retval, const char *p, int minval, int maxval)
897{
898 int r = 0;
899 do {
900 char c = *p;
901 if (c >= '0' && c <= '9')
902 r = 10 * r + c - '0';
903 else
904 return FALSE;
905 if (r > maxval)
906 return FALSE;
907 } while (*++p != '\0');
908 if (r < minval)
909 return FALSE;
910 *retval = r;
911 return TRUE;
912}
913
914static abool parse_text(char *retval, const char *p)
915{
916 int i;
917 if (*p != '"')
918 return FALSE;
919 p++;
920 if (p[0] == '<' && p[1] == '?' && p[2] == '>' && p[3] == '"')
921 return TRUE;
922 i = 0;
923 while (*p != '"') {
924 if (i >= 127)
925 return FALSE;
926 if (*p == '\0')
927 return FALSE;
928 retval[i++] = *p++;
929 }
930 retval[i] = '\0';
931 return TRUE;
932}
933
934int ASAP_ParseDuration(const char *s)
935{
936 int r;
937 if (*s < '0' || *s > '9')
938 return -1;
939 r = *s++ - '0';
940 if (*s >= '0' && *s <= '9')
941 r = 10 * r + *s++ - '0';
942 if (*s == ':') {
943 s++;
944 if (*s < '0' || *s > '5')
945 return -1;
946 r = 60 * r + (*s++ - '0') * 10;
947 if (*s < '0' || *s > '9')
948 return -1;
949 r += *s++ - '0';
950 }
951 r *= 1000;
952 if (*s != '.')
953 return r;
954 s++;
955 if (*s < '0' || *s > '9')
956 return r;
957 r += 100 * (*s++ - '0');
958 if (*s < '0' || *s > '9')
959 return r;
960 r += 10 * (*s++ - '0');
961 if (*s < '0' || *s > '9')
962 return r;
963 r += *s - '0';
964 return r;
965}
966
967static char *two_digits(char *s, int x)
968{
969 s[0] = '0' + x / 10;
970 s[1] = '0' + x % 10;
971 return s + 2;
972}
973
974void ASAP_DurationToString(char *s, int duration)
975{
976 if (duration >= 0) {
977 int seconds = duration / 1000;
978 int minutes = seconds / 60;
979 s = two_digits(s, minutes);
980 *s++ = ':';
981 s = two_digits(s, seconds % 60);
982 duration %= 1000;
983 if (duration != 0) {
984 *s++ = '.';
985 s = two_digits(s, duration / 10);
986 duration %= 10;
987 if (duration != 0)
988 *s++ = '0' + duration;
989 }
990 }
991 *s = '\0';
992}
993
994#endif /* !defined(JAVA) && !defined(CSHARP) */
995
996FILE_FUNC abool parse_sap_header(ASAP_ModuleInfo PTR module_info,
997 const byte ARRAY module, int module_len)
998{
999 int module_index = 0;
1000 abool sap_signature = FALSE;
1001 int duration_index = 0;
1002 for (;;) {
1003 NEW_ARRAY(char, line, 256);
1004 int i;
1005#if !defined(JAVA) && !defined(CSHARP)
1006 char *p;
1007#endif
1008 if (module_index + 8 >= module_len)
1009 return FALSE;
1010 if (UBYTE(module[module_index]) == 0xff)
1011 break;
1012 i = 0;
1013 while (module[module_index] != 0x0d) {
1014 line[i++] = (char) module[module_index++];
1015 if (module_index >= module_len || i >= sizeof(line) - 1)
1016 return FALSE;
1017 }
1018 if (++module_index >= module_len || module[module_index++] != 0x0a)
1019 return FALSE;
1020
1021#ifdef JAVA
1022 String tag = new String(line, 0, i);
1023 String arg = null;
1024 i = tag.indexOf(' ');
1025 if (i >= 0) {
1026 arg = tag.substring(i + 1);
1027 tag = tag.substring(0, i);
1028 }
1029#define TAG_IS(t) tag.equals(t)
1030#define CHAR_ARG arg.charAt(0)
1031#define SET_HEX(v) v = Integer.parseInt(arg, 16)
1032#define SET_DEC(v, min, max) do { v = Integer.parseInt(arg); if (v < min || v > max) return FALSE; } while (FALSE)
1033#define SET_TEXT(v) v = arg.substring(1, arg.length() - 1)
1034#define DURATION_ARG parseDuration(arg)
1035#define ARG_CONTAINS(t) (arg.indexOf(t) >= 0)
1036#elif defined(CSHARP)
1037 string tag = new string(line, 0, i);
1038 string arg = null;
1039 i = tag.IndexOf(' ');
1040 if (i >= 0) {
1041 arg = tag.Substring(i + 1);
1042 tag = tag.Substring(0, i);
1043 }
1044#define TAG_IS(t) tag == t
1045#define CHAR_ARG arg[0]
1046#define SET_HEX(v) v = int.Parse(arg, System.Globalization.NumberStyles.HexNumber)
1047#define SET_DEC(v, min, max) do { v = int.Parse(arg); if (v < min || v > max) return FALSE; } while (FALSE)
1048#define SET_TEXT(v) v = arg.Substring(1, arg.Length - 1)
1049#define DURATION_ARG ParseDuration(arg)
1050#define ARG_CONTAINS(t) (arg.IndexOf(t) >= 0)
1051#else
1052 line[i] = '\0';
1053 for (p = line; *p != '\0'; p++) {
1054 if (*p == ' ') {
1055 *p++ = '\0';
1056 break;
1057 }
1058 }
1059#define TAG_IS(t) (strcmp(line, t) == 0)
1060#define CHAR_ARG *p
1061#define SET_HEX(v) do { if (!parse_hex(&v, p)) return FALSE; } while (FALSE)
1062#define SET_DEC(v, min, max) do { if (!parse_dec(&v, p, min, max)) return FALSE; } while (FALSE)
1063#define SET_TEXT(v) do { if (!parse_text(v, p)) return FALSE; } while (FALSE)
1064#define DURATION_ARG ASAP_ParseDuration(p)
1065#define ARG_CONTAINS(t) (strstr(p, t) != NULL)
1066#endif
1067
1068 if (TAG_IS("SAP"))
1069 sap_signature = TRUE;
1070 if (!sap_signature)
1071 return FALSE;
1072 if (TAG_IS("AUTHOR"))
1073 SET_TEXT(MODULE_INFO author);
1074 else if (TAG_IS("NAME"))
1075 SET_TEXT(MODULE_INFO name);
1076 else if (TAG_IS("DATE"))
1077 SET_TEXT(MODULE_INFO date);
1078 else if (TAG_IS("SONGS"))
1079 SET_DEC(MODULE_INFO songs, 1, MAX_SONGS);
1080 else if (TAG_IS("DEFSONG"))
1081 SET_DEC(MODULE_INFO default_song, 0, MAX_SONGS - 1);
1082 else if (TAG_IS("STEREO"))
1083 MODULE_INFO channels = 2;
1084 else if (TAG_IS("TIME")) {
1085 int duration = DURATION_ARG;
1086 if (duration < 0 || duration_index >= MAX_SONGS)
1087 return FALSE;
1088 MODULE_INFO durations[duration_index] = duration;
1089 if (ARG_CONTAINS("LOOP"))
1090 MODULE_INFO loops[duration_index] = TRUE;
1091 duration_index++;
1092 }
1093 else if (TAG_IS("TYPE"))
1094 MODULE_INFO type = CHAR_ARG;
1095 else if (TAG_IS("FASTPLAY"))
1096 SET_DEC(MODULE_INFO fastplay, 1, 312);
1097 else if (TAG_IS("MUSIC"))
1098 SET_HEX(MODULE_INFO music);
1099 else if (TAG_IS("INIT"))
1100 SET_HEX(MODULE_INFO init);
1101 else if (TAG_IS("PLAYER"))
1102 SET_HEX(MODULE_INFO player);
1103 }
1104 if (MODULE_INFO default_song >= MODULE_INFO songs)
1105 return FALSE;
1106 switch (MODULE_INFO type) {
1107 case 'B':
1108 case 'D':
1109 if (MODULE_INFO player < 0 || MODULE_INFO init < 0)
1110 return FALSE;
1111 break;
1112 case 'C':
1113 if (MODULE_INFO player < 0 || MODULE_INFO music < 0)
1114 return FALSE;
1115 break;
1116 case 'S':
1117 if (MODULE_INFO init < 0)
1118 return FALSE;
1119 MODULE_INFO fastplay = 78;
1120 break;
1121 default:
1122 return FALSE;
1123 }
1124 if (UBYTE(module[module_index + 1]) != 0xff)
1125 return FALSE;
1126 MODULE_INFO header_len = module_index;
1127 return TRUE;
1128}
1129
1130FILE_FUNC abool parse_sap(ASAP_State PTR ast, ASAP_ModuleInfo PTR module_info,
1131 const byte ARRAY module, int module_len)
1132{
1133 int module_index;
1134 if (!parse_sap_header(module_info, module, module_len))
1135 return FALSE;
1136 if (ast == NULL)
1137 return TRUE;
1138 ZERO_ARRAY(AST memory);
1139 module_index = MODULE_INFO header_len + 2;
1140 while (module_index + 5 <= module_len) {
1141 int start_addr = UBYTE(module[module_index]) + (UBYTE(module[module_index + 1]) << 8);
1142 int block_len = UBYTE(module[module_index + 2]) + (UBYTE(module[module_index + 3]) << 8) + 1 - start_addr;
1143 if (block_len <= 0 || module_index + block_len > module_len)
1144 return FALSE;
1145 module_index += 4;
1146 COPY_ARRAY(AST memory, start_addr, module, module_index, block_len);
1147 module_index += block_len;
1148 if (module_index == module_len)
1149 return TRUE;
1150 if (module_index + 7 <= module_len
1151 && UBYTE(module[module_index]) == 0xff && UBYTE(module[module_index + 1]) == 0xff)
1152 module_index += 2;
1153 }
1154 return FALSE;
1155}
1156
1157#define ASAP_EXT(c1, c2, c3) (((c1) + ((c2) << 8) + ((c3) << 16)) | 0x202020)
1158
1159FILE_FUNC int get_packed_ext(STRING filename)
1160{
1161#ifdef JAVA
1162 int i = filename.length();
1163 int ext = 0;
1164 while (--i > 0) {
1165 if (filename.charAt(i) == '.')
1166 return ext | 0x202020;
1167 ext = (ext << 8) + filename.charAt(i);
1168 }
1169 return 0;
1170#elif defined(CSHARP)
1171 int i = filename.Length;
1172 int ext = 0;
1173 while (--i > 0) {
1174 if (filename[i] == '.')
1175 return ext | 0x202020;
1176 ext = (ext << 8) + filename[i];
1177 }
1178 return 0;
1179#else
1180 const char *p;
1181 int ext;
1182 for (p = filename; *p != '\0'; p++);
1183 ext = 0;
1184 for (;;) {
1185 if (--p <= filename || *p <= ' ')
1186 return 0; /* no filename extension or invalid character */
1187 if (*p == '.')
1188 return ext | 0x202020;
1189 ext = (ext << 8) + (*p & 0xff);
1190 }
1191#endif
1192}
1193
1194FILE_FUNC abool is_our_ext(int ext)
1195{
1196 switch (ext) {
1197 case ASAP_EXT('C', 'M', 'C'):
1198 case ASAP_EXT('C', 'M', 'R'):
1199 case ASAP_EXT('D', 'M', 'C'):
1200 case ASAP_EXT('M', 'P', 'D'):
1201 case ASAP_EXT('M', 'P', 'T'):
1202 case ASAP_EXT('R', 'M', 'T'):
1203 case ASAP_EXT('S', 'A', 'P'):
1204 case ASAP_EXT('T', 'M', '2'):
1205 case ASAP_EXT('T', 'M', '8'):
1206 case ASAP_EXT('T', 'M', 'C'):
1207 return TRUE;
1208 default:
1209 return FALSE;
1210 }
1211}
1212
1213ASAP_FUNC abool ASAP_IsOurFile(STRING filename)
1214{
1215 int ext = get_packed_ext(filename);
1216 return is_our_ext(ext);
1217}
1218
1219ASAP_FUNC abool ASAP_IsOurExt(STRING ext)
1220{
1221#ifdef JAVA
1222 return ext.length() == 3
1223 && is_our_ext(ASAP_EXT(ext.charAt(0), ext.charAt(1), ext.charAt(2)));
1224#else
1225 return ext[0] > ' ' && ext[1] > ' ' && ext[2] > ' ' && ext[3] == '\0'
1226 && is_our_ext(ASAP_EXT(ext[0], ext[1], ext[2]));
1227#endif
1228}
1229
1230FILE_FUNC abool parse_file(ASAP_State PTR ast, ASAP_ModuleInfo PTR module_info,
1231 STRING filename, const byte ARRAY module, int module_len)
1232{
1233 int i;
1234#ifdef JAVA
1235 int basename = 0;
1236 int ext = -1;
1237 for (i = 0; i < filename.length(); i++) {
1238 int c = filename.charAt(i);
1239 if (c == '/' || c == '\\')
1240 basename = i + 1;
1241 else if (c == '.')
1242 ext = i;
1243 }
1244 if (ext < 0)
1245 ext = i;
1246 module_info.author = "";
1247 module_info.name = filename.substring(basename, ext);
1248 module_info.date = "";
1249#elif defined(CSHARP)
1250 int basename = 0;
1251 int ext = -1;
1252 for (i = 0; i < filename.Length; i++) {
1253 int c = filename[i];
1254 if (c == '/' || c == '\\')
1255 basename = i + 1;
1256 else if (c == '.')
1257 ext = i;
1258 }
1259 if (ext < 0)
1260 ext = i;
1261 module_info.author = string.Empty;
1262 module_info.name = filename.Substring(basename, ext - basename);
1263 module_info.date = string.Empty;
1264#else
1265 const char *p;
1266 const char *basename = filename;
1267 const char *ext = NULL;
1268 for (p = filename; *p != '\0'; p++) {
1269 if (*p == '/' || *p == '\\')
1270 basename = p + 1;
1271 else if (*p == '.')
1272 ext = p;
1273 }
1274 if (ext == NULL)
1275 ext = p;
1276 module_info->author[0] = '\0';
1277 i = ext - basename;
1278 memcpy(module_info->name, basename, i);
1279 module_info->name[i] = '\0';
1280 module_info->date[0] = '\0';
1281#endif
1282 MODULE_INFO channels = 1;
1283 MODULE_INFO songs = 1;
1284 MODULE_INFO default_song = 0;
1285 for (i = 0; i < MAX_SONGS; i++) {
1286 MODULE_INFO durations[i] = -1;
1287 MODULE_INFO loops[i] = FALSE;
1288 }
1289 MODULE_INFO type = '?';
1290 MODULE_INFO fastplay = 312;
1291 MODULE_INFO music = -1;
1292 MODULE_INFO init = -1;
1293 MODULE_INFO player = -1;
1294 switch (get_packed_ext(filename)) {
1295 case ASAP_EXT('C', 'M', 'C'):
1296 return parse_cmc(ast, module_info, module, module_len, FALSE);
1297 case ASAP_EXT('C', 'M', 'R'):
1298 return parse_cmc(ast, module_info, module, module_len, TRUE);
1299 case ASAP_EXT('D', 'M', 'C'):
1300 MODULE_INFO fastplay = 156;
1301 return parse_cmc(ast, module_info, module, module_len, FALSE);
1302 case ASAP_EXT('M', 'P', 'D'):
1303 MODULE_INFO fastplay = 156;
1304 return parse_mpt(ast, module_info, module, module_len);
1305 case ASAP_EXT('M', 'P', 'T'):
1306 return parse_mpt(ast, module_info, module, module_len);
1307 case ASAP_EXT('R', 'M', 'T'):
1308 return parse_rmt(ast, module_info, module, module_len);
1309 case ASAP_EXT('S', 'A', 'P'):
1310 return parse_sap(ast, module_info, module, module_len);
1311 case ASAP_EXT('T', 'M', '2'):
1312 return parse_tm2(ast, module_info, module, module_len);
1313 case ASAP_EXT('T', 'M', '8'):
1314 case ASAP_EXT('T', 'M', 'C'):
1315 return parse_tmc(ast, module_info, module, module_len);
1316 default:
1317 return FALSE;
1318 }
1319}
1320
1321ASAP_FUNC abool ASAP_GetModuleInfo(ASAP_ModuleInfo PTR module_info, STRING filename,
1322 const byte ARRAY module, int module_len)
1323{
1324 return parse_file(NULL, module_info, filename, module, module_len);
1325}
1326
1327ASAP_FUNC abool ASAP_Load(ASAP_State PTR ast, STRING filename,
1328 const byte ARRAY module, int module_len)
1329{
1330 AST silence_cycles = 0;
1331 return parse_file(ast, ADDRESSOF AST module_info, filename, module, module_len);
1332}
1333
1334ASAP_FUNC void ASAP_DetectSilence(ASAP_State PTR ast, int seconds)
1335{
1336 AST silence_cycles = seconds * ASAP_MAIN_CLOCK;
1337}
1338
1339FILE_FUNC void call_6502(ASAP_State PTR ast, int addr, int max_scanlines)
1340{
1341 AST cpu_pc = addr;
1342 /* put a CIM at 0xd20a and a return address on stack */
1343 dPutByte(0xd20a, 0xd2);
1344 dPutByte(0x01fe, 0x09);
1345 dPutByte(0x01ff, 0xd2);
1346 AST cpu_s = 0xfd;
1347 Cpu_RunScanlines(ast, max_scanlines);
1348}
1349
1350/* 50 Atari frames for the initialization routine - some SAPs are self-extracting. */
1351#define SCANLINES_FOR_INIT (50 * 312)
1352
1353FILE_FUNC void call_6502_init(ASAP_State PTR ast, int addr, int a, int x, int y)
1354{
1355 AST cpu_a = a & 0xff;
1356 AST cpu_x = x & 0xff;
1357 AST cpu_y = y & 0xff;
1358 call_6502(ast, addr, SCANLINES_FOR_INIT);
1359}
1360
1361ASAP_FUNC void ASAP_PlaySong(ASAP_State PTR ast, int song, int duration)
1362{
1363 AST current_song = song;
1364 AST current_duration = duration;
1365 AST blocks_played = 0;
1366 AST silence_cycles_counter = AST silence_cycles;
1367 AST extra_pokey_mask = AST module_info.channels > 1 ? 0x10 : 0;
1368 PokeySound_Initialize(ast);
1369 AST cycle = 0;
1370 AST cpu_nz = 0;
1371 AST cpu_c = 0;
1372 AST cpu_vdi = 0;
1373 AST scanline_number = 0;
1374 AST next_scanline_cycle = 0;
1375 AST timer1_cycle = NEVER;
1376 AST timer2_cycle = NEVER;
1377 AST timer4_cycle = NEVER;
1378 AST irqst = 0xff;
1379 switch (AST module_info.type) {
1380 case 'B':
1381 call_6502_init(ast, AST module_info.init, song, 0, 0);
1382 break;
1383 case 'C':
1384 case 'c':
1385 case 'z':
1386 call_6502_init(ast, AST module_info.player + 3, 0x70, AST module_info.music, AST module_info.music >> 8);
1387 call_6502_init(ast, AST module_info.player + 3, 0x00, song, 0);
1388 break;
1389 case 'D':
1390 case 'S':
1391 AST cpu_a = song;
1392 AST cpu_x = 0x00;
1393 AST cpu_y = 0x00;
1394 AST cpu_s = 0xff;
1395 AST cpu_pc = AST module_info.init;
1396 break;
1397 case 'm':
1398 call_6502_init(ast, AST module_info.player, 0x00, AST module_info.music >> 8, AST module_info.music);
1399 call_6502_init(ast, AST module_info.player, 0x02, AST module_info.song_pos[song], 0);
1400 break;
1401 case 'r':
1402 call_6502_init(ast, AST module_info.player, AST module_info.song_pos[song], AST module_info.music, AST module_info.music >> 8);
1403 break;
1404 case 't':
1405 case 'T':
1406 call_6502_init(ast, AST module_info.player, 0x70, AST module_info.music >> 8, AST module_info.music);
1407 call_6502_init(ast, AST module_info.player, 0x00, song, 0);
1408 AST tmc_per_frame_counter = 1;
1409 break;
1410 }
1411 ASAP_MutePokeyChannels(ast, 0);
1412}
1413
1414ASAP_FUNC void ASAP_MutePokeyChannels(ASAP_State PTR ast, int mask)
1415{
1416 PokeySound_Mute(ast, ADDRESSOF AST base_pokey, mask);
1417 PokeySound_Mute(ast, ADDRESSOF AST extra_pokey, mask >> 4);
1418}
1419
1420ASAP_FUNC abool call_6502_player(ASAP_State PTR ast)
1421{
1422 int s;
1423 PokeySound_StartFrame(ast);
1424 switch (AST module_info.type) {
1425 case 'B':
1426 call_6502(ast, AST module_info.player, AST module_info.fastplay);
1427 break;
1428 case 'C':
1429 case 'c':
1430 case 'z':
1431 call_6502(ast, AST module_info.player + 6, AST module_info.fastplay);
1432 break;
1433 case 'D':
1434 s = AST cpu_s;
1435#define PUSH_ON_6502_STACK(x) dPutByte(0x100 + s, x); s = (s - 1) & 0xff
1436#define RETURN_FROM_PLAYER_ADDR 0xd200
1437 /* save 6502 state on 6502 stack */
1438 PUSH_ON_6502_STACK(AST cpu_pc >> 8);
1439 PUSH_ON_6502_STACK(AST cpu_pc & 0xff);
1440 PUSH_ON_6502_STACK(((AST cpu_nz | (AST cpu_nz >> 1)) & 0x80) + AST cpu_vdi + \
1441 ((AST cpu_nz & 0xff) == 0 ? Z_FLAG : 0) + AST cpu_c + 0x20);
1442 PUSH_ON_6502_STACK(AST cpu_a);
1443 PUSH_ON_6502_STACK(AST cpu_x);
1444 PUSH_ON_6502_STACK(AST cpu_y);
1445 /* RTS will jump to 6502 code that restores the state */
1446 PUSH_ON_6502_STACK((RETURN_FROM_PLAYER_ADDR - 1) >> 8);
1447 PUSH_ON_6502_STACK((RETURN_FROM_PLAYER_ADDR - 1) & 0xff);
1448 AST cpu_s = s;
1449 dPutByte(RETURN_FROM_PLAYER_ADDR, 0x68); /* PLA */
1450 dPutByte(RETURN_FROM_PLAYER_ADDR + 1, 0xa8); /* TAY */
1451 dPutByte(RETURN_FROM_PLAYER_ADDR + 2, 0x68); /* PLA */
1452 dPutByte(RETURN_FROM_PLAYER_ADDR + 3, 0xaa); /* TAX */
1453 dPutByte(RETURN_FROM_PLAYER_ADDR + 4, 0x68); /* PLA */
1454 dPutByte(RETURN_FROM_PLAYER_ADDR + 5, 0x40); /* RTI */
1455 AST cpu_pc = AST module_info.player;
1456 Cpu_RunScanlines(ast, AST module_info.fastplay);
1457 break;
1458 case 'S':
1459 Cpu_RunScanlines(ast, AST module_info.fastplay);
1460 {
1461 int i = dGetByte(0x45) - 1;
1462 dPutByte(0x45, i);
1463 if (i == 0)
1464 dPutByte(0xb07b, dGetByte(0xb07b) + 1);
1465 }
1466 break;
1467 case 'm':
1468 case 'r':
1469 case 'T':
1470 call_6502(ast, AST module_info.player + 3, AST module_info.fastplay);
1471 break;
1472 case 't':
1473 if (--AST tmc_per_frame_counter <= 0) {
1474 AST tmc_per_frame_counter = AST tmc_per_frame;
1475 call_6502(ast, AST module_info.player + 3, AST module_info.fastplay);
1476 }
1477 else
1478 call_6502(ast, AST module_info.player + 6, AST module_info.fastplay);
1479 break;
1480 }
1481 PokeySound_EndFrame(ast, AST module_info.fastplay * 114);
1482 if (AST silence_cycles > 0) {
1483 if (PokeySound_IsSilent(ADDRESSOF AST base_pokey)
1484 && PokeySound_IsSilent(ADDRESSOF AST extra_pokey)) {
1485 AST silence_cycles_counter -= AST module_info.fastplay * 114;
1486 if (AST silence_cycles_counter <= 0)
1487 return FALSE;
1488 }
1489 else
1490 AST silence_cycles_counter = AST silence_cycles;
1491 }
1492 return TRUE;
1493}
1494
1495FILE_FUNC int milliseconds_to_blocks(int milliseconds)
1496{
1497 return milliseconds * (ASAP_SAMPLE_RATE / 100) / 10;
1498}
1499
1500ASAP_FUNC void ASAP_Seek(ASAP_State PTR ast, int position)
1501{
1502 int block = milliseconds_to_blocks(position);
1503 if (block < AST blocks_played)
1504 ASAP_PlaySong(ast, AST current_song, AST current_duration);
1505 while (AST blocks_played + AST samples - AST sample_index < block) {
1506 AST blocks_played += AST samples - AST sample_index;
1507 call_6502_player(ast);
1508 }
1509 AST sample_index += block - AST blocks_played;
1510 AST blocks_played = block;
1511}
1512
1513ASAP_FUNC int ASAP_Generate(ASAP_State PTR ast, VOIDPTR buffer, int buffer_len,
1514 ASAP_SampleFormat format)
1515{
1516 int block_shift;
1517 int buffer_blocks;
1518 int block;
1519 if (AST silence_cycles > 0 && AST silence_cycles_counter <= 0)
1520 return 0;
1521 block_shift = (AST module_info.channels - 1) + (format != ASAP_FORMAT_U8 ? 1 : 0);
1522 buffer_blocks = buffer_len >> block_shift;
1523 if (AST current_duration > 0) {
1524 int total_blocks = milliseconds_to_blocks(AST current_duration);
1525 if (buffer_blocks > total_blocks - AST blocks_played)
1526 buffer_blocks = total_blocks - AST blocks_played;
1527 }
1528 block = 0;
1529 do {
1530 int blocks = PokeySound_Generate(ast, buffer, block << block_shift, buffer_blocks - block, format);
1531 AST blocks_played += blocks;
1532 block += blocks;
1533 } while (block < buffer_blocks && call_6502_player(ast));
1534 return block << block_shift;
1535}
1536
1537#if !defined(JAVA) && !defined(CSHARP)
1538
1539abool ASAP_ChangeExt(char *filename, const char *ext)
1540{
1541 char *dest = NULL;
1542 while (*filename != '\0') {
1543 if (*filename == '/' || *filename == '\\')
1544 dest = NULL;
1545 else if (*filename == '.')
1546 dest = filename + 1;
1547 filename++;
1548 }
1549 if (dest == NULL)
1550 return FALSE;
1551 strcpy(dest, ext);
1552 return TRUE;
1553}
1554
1555abool ASAP_CanSetModuleInfo(const char *filename)
1556{
1557 int ext = get_packed_ext(filename);
1558 return ext == ASAP_EXT('S', 'A', 'P');
1559}
1560
1561static byte *put_string(byte *dest, const char *str)
1562{
1563 while (*str != '\0')
1564 *dest++ = *str++;
1565 return dest;
1566}
1567
1568static byte *put_dec(byte *dest, int value)
1569{
1570 if (value >= 10) {
1571 dest = put_dec(dest, value / 10);
1572 value %= 10;
1573 }
1574 *dest++ = '0' + value;
1575 return dest;
1576}
1577
1578static byte *put_text_tag(byte *dest, const char *tag, const char *value)
1579{
1580 dest = put_string(dest, tag);
1581 *dest++ = ' ';
1582 *dest++ = '"';
1583 if (*value == '\0')
1584 value = "<?>";
1585 while (*value != '\0') {
1586 if (*value < ' ' || *value > 'z' || *value == '"' || *value == '`')
1587 return NULL;
1588 *dest++ = *value++;
1589 }
1590 *dest++ = '"';
1591 *dest++ = '\r';
1592 *dest++ = '\n';
1593 return dest;
1594}
1595
1596static byte *put_hex_tag(byte *dest, const char *tag, int value)
1597{
1598 int i;
1599 if (value < 0)
1600 return dest;
1601 dest = put_string(dest, tag);
1602 *dest++ = ' ';
1603 for (i = 12; i >= 0; i -= 4) {
1604 int digit = (value >> i) & 0xf;
1605 *dest++ = (byte) (digit + (digit < 10 ? '0' : 'A' - 10));
1606 }
1607 *dest++ = '\r';
1608 *dest++ = '\n';
1609 return dest;
1610}
1611
1612static byte *put_dec_tag(byte *dest, const char *tag, int value)
1613{
1614 dest = put_string(dest, tag);
1615 *dest++ = ' ';
1616 dest = put_dec(dest, value);
1617 *dest++ = '\r';
1618 *dest++ = '\n';
1619 return dest;
1620}
1621
1622static byte *start_sap_header(byte *dest, const ASAP_ModuleInfo *module_info)
1623{
1624 dest = put_string(dest, "SAP\r\n");
1625 dest = put_text_tag(dest, "AUTHOR", module_info->author);
1626 if (dest == NULL)
1627 return NULL;
1628 dest = put_text_tag(dest, "NAME", module_info->name);
1629 if (dest == NULL)
1630 return NULL;
1631 dest = put_text_tag(dest, "DATE", module_info->date);
1632 if (dest == NULL)
1633 return NULL;
1634 if (module_info->songs > 1) {
1635 dest = put_dec_tag(dest, "SONGS", module_info->songs);
1636 if (module_info->default_song > 0)
1637 dest = put_dec_tag(dest, "DEFSONG", module_info->default_song);
1638 }
1639 if (module_info->channels > 1)
1640 dest = put_string(dest, "STEREO\r\n");
1641 return dest;
1642}
1643
1644static byte *put_durations(byte *dest, const ASAP_ModuleInfo *module_info)
1645{
1646 int song;
1647 for (song = 0; song < module_info->songs; song++) {
1648 if (module_info->durations[song] < 0)
1649 break;
1650 dest = put_string(dest, "TIME ");
1651 ASAP_DurationToString((char *) dest, module_info->durations[song]);
1652 while (*dest != '\0')
1653 dest++;
1654 if (module_info->loops[song])
1655 dest = put_string(dest, " LOOP");
1656 *dest++ = '\r';
1657 *dest++ = '\n';
1658 }
1659 return dest;
1660}
1661
1662static byte *put_sap_header(byte *dest, const ASAP_ModuleInfo *module_info, char type, int music, int init, int player)
1663{
1664 dest = start_sap_header(dest, module_info);
1665 if (dest == NULL)
1666 return NULL;
1667 dest = put_string(dest, "TYPE ");
1668 *dest++ = type;
1669 *dest++ = '\r';
1670 *dest++ = '\n';
1671 if (module_info->fastplay != 312)
1672 dest = put_dec_tag(dest, "FASTPLAY", module_info->fastplay);
1673 dest = put_hex_tag(dest, "MUSIC", music);
1674 dest = put_hex_tag(dest, "INIT", init);
1675 dest = put_hex_tag(dest, "PLAYER", player);
1676 dest = put_durations(dest, module_info);
1677 return dest;
1678}
1679
1680int ASAP_SetModuleInfo(const ASAP_ModuleInfo *module_info, const byte ARRAY module,
1681 int module_len, byte ARRAY out_module)
1682{
1683 byte *dest;
1684 int i;
1685 if (memcmp(module, "SAP\r\n", 5) != 0)
1686 return -1;
1687 dest = start_sap_header(out_module, module_info);
1688 if (dest == NULL)
1689 return -1;
1690 i = 5;
1691 while (i < module_len && module[i] != 0xff) {
1692 if (memcmp(module + i, "AUTHOR ", 7) == 0
1693 || memcmp(module + i, "NAME ", 5) == 0
1694 || memcmp(module + i, "DATE ", 5) == 0
1695 || memcmp(module + i, "SONGS ", 6) == 0
1696 || memcmp(module + i, "DEFSONG ", 8) == 0
1697 || memcmp(module + i, "STEREO", 6) == 0
1698 || memcmp(module + i, "TIME ", 5) == 0) {
1699 while (i < module_len && module[i++] != 0x0a);
1700 }
1701 else {
1702 int b;
1703 do {
1704 b = module[i++];
1705 *dest++ = b;
1706 } while (i < module_len && b != 0x0a);
1707 }
1708 }
1709 dest = put_durations(dest, module_info);
1710 module_len -= i;
1711 memcpy(dest, module + i, module_len);
1712 dest += module_len;
1713 return dest - out_module;
1714}
1715
1716#define RMT_INIT 0x0c80
1717#define TM2_INIT 0x1080
1718
1719const char *ASAP_CanConvert(const char *filename, const ASAP_ModuleInfo *module_info,
1720 const byte ARRAY module, int module_len)
1721{
1722 switch (module_info->type) {
1723 case 'B':
1724 if (module_info->init == 0x4f3 || module_info->init == 0xf4f3 || module_info->init == 0x4ef)
1725 return module_info->fastplay == 156 ? "mpd" : "mpt";
1726 if (module_info->init == RMT_INIT)
1727 return "rmt";
1728 if ((module_info->init == 0x4f5 || module_info->init == 0xf4f5 || module_info->init == 0x4f2)
1729 || ((module_info->init == 0x4e7 || module_info->init == 0xf4e7 || module_info->init == 0x4e4) && module_info->fastplay == 156)
1730 || ((module_info->init == 0x4e5 || module_info->init == 0xf4e5 || module_info->init == 0x4e2) && (module_info->fastplay == 104 || module_info->fastplay == 78)))
1731 return "tmc";
1732 if (module_info->init == TM2_INIT)
1733 return "tm2";
1734 break;
1735 case 'C':
1736 if (module_info->player == 0x500 || module_info->player == 0xf500) {
1737 if (module_info->fastplay == 156)
1738 return "dmc";
1739 return module[module_len - 170] == 0x1e ? "cmr" : "cmc";
1740 }
1741 break;
1742 case 'c':
1743 case 'z':
1744 case 'm':
1745 case 'r':
1746 case 't':
1747 case 'T':
1748 return "sap";
1749 default:
1750 break;
1751 }
1752 return NULL;
1753}
1754
1755int ASAP_Convert(const char *filename, const ASAP_ModuleInfo *module_info,
1756 const byte ARRAY module, int module_len, byte ARRAY out_module)
1757{
1758 int out_len;
1759 byte *dest;
1760 int addr;
1761 int player;
1762 static const int tmc_player[4] = { 3, -9, -10, -10 };
1763 static const int tmc_init[4] = { -14, -16, -17, -17 };
1764 switch (module_info->type) {
1765 case 'B':
1766 case 'C':
1767 out_len = module[module_info->header_len + 4] + (module[module_info->header_len + 5] << 8)
1768 - module[module_info->header_len + 2] - (module[module_info->header_len + 3] << 8) + 7;
1769 if (out_len < 7 || module_info->header_len + out_len >= module_len)
1770 return -1;
1771 memcpy(out_module, module + module_info->header_len, out_len);
1772 return out_len;
1773 case 'c':
1774 case 'z':
1775 dest = put_sap_header(out_module, module_info, 'C', module_info->music, -1, module_info->player);
1776 if (dest == NULL)
1777 return -1;
1778 memcpy(dest, module, module_len);
1779 dest += module_len;
1780 memcpy(dest, cmc_obx + 2, sizeof(cmc_obx) - 2);
1781 if (module_info->type == 'z')
1782 memcpy(dest + 4 + CMR_BASS_TABLE_OFFSET, cmr_bass_table, sizeof(cmr_bass_table));
1783 dest += sizeof(cmc_obx) - 2;
1784 return dest - out_module;
1785 case 'm':
1786 if (module_info->songs != 1) {
1787 addr = module_info->player - 17 - module_info->songs;
1788 dest = put_sap_header(out_module, module_info, 'B', -1, module_info->player - 17, module_info->player + 3);
1789 }
1790 else {
1791 addr = module_info->player - 13;
1792 dest = put_sap_header(out_module, module_info, 'B', -1, addr, module_info->player + 3);
1793 }
1794 if (dest == NULL)
1795 return -1;
1796 memcpy(dest, module, module_len);
1797 dest += module_len;
1798 *dest++ = (byte) addr;
1799 *dest++ = (byte) (addr >> 8);
1800 *dest++ = mpt_obx[4];
1801 *dest++ = mpt_obx[5];
1802 if (module_info->songs != 1) {
1803 memcpy(dest, module_info->song_pos, module_info->songs);
1804 dest += module_info->songs;
1805 *dest++ = 0x48; /* pha */
1806 }
1807 *dest++ = 0xa0; /* ldy #<music */
1808 *dest++ = (byte) module_info->music;
1809 *dest++ = 0xa2; /* ldx #>music */
1810 *dest++ = (byte) (module_info->music >> 8);
1811 *dest++ = 0xa9; /* lda #0 */
1812 *dest++ = 0;
1813 *dest++ = 0x20; /* jsr player */
1814 *dest++ = (byte) module_info->player;
1815 *dest++ = (byte) (module_info->player >> 8);
1816 if (module_info->songs != 1) {
1817 *dest++ = 0x68; /* pla */
1818 *dest++ = 0xa8; /* tay */
1819 *dest++ = 0xbe; /* ldx song2pos,y */
1820 *dest++ = (byte) addr;
1821 *dest++ = (byte) (addr >> 8);
1822 }
1823 else {
1824 *dest++ = 0xa2; /* ldx #0 */
1825 *dest++ = 0;
1826 }
1827 *dest++ = 0xa9; /* lda #2 */
1828 *dest++ = 2;
1829 memcpy(dest, mpt_obx + 6, sizeof(mpt_obx) - 6);
1830 dest += sizeof(mpt_obx) - 6;
1831 return dest - out_module;
1832 case 'r':
1833 dest = put_sap_header(out_module, module_info, 'B', -1, RMT_INIT, module_info->player + 3);
1834 if (dest == NULL)
1835 return -1;
1836 memcpy(dest, module, module_len);
1837 dest += module_len;
1838 *dest++ = (byte) RMT_INIT;
1839 *dest++ = (byte) (RMT_INIT >> 8);
1840 if (module_info->songs != 1) {
1841 addr = RMT_INIT + 10 + module_info->songs;
1842 *dest++ = (byte) addr;
1843 *dest++ = (byte) (addr >> 8);
1844 *dest++ = 0xa8; /* tay */
1845 *dest++ = 0xb9; /* lda song2pos,y */
1846 *dest++ = (byte) (RMT_INIT + 11);
1847 *dest++ = (byte) ((RMT_INIT + 11) >> 8);
1848 }
1849 else {
1850 *dest++ = (byte) (RMT_INIT + 8);
1851 *dest++ = (byte) ((RMT_INIT + 8) >> 8);
1852 *dest++ = 0xa9; /* lda #0 */
1853 *dest++ = 0;
1854 }
1855 *dest++ = 0xa2; /* ldx #<music */
1856 *dest++ = (byte) module_info->music;
1857 *dest++ = 0xa0; /* ldy #>music */
1858 *dest++ = (byte) (module_info->music >> 8);
1859 *dest++ = 0x4c; /* jmp player */
1860 *dest++ = (byte) module_info->player;
1861 *dest++ = (byte) (module_info->player >> 8);
1862 if (module_info->songs != 1) {
1863 memcpy(dest, module_info->song_pos, module_info->songs);
1864 dest += module_info->songs;
1865 }
1866 if (module_info->channels == 1) {
1867 memcpy(dest, rmt4_obx + 2, sizeof(rmt4_obx) - 2);
1868 dest += sizeof(rmt4_obx) - 2;
1869 }
1870 else {
1871 memcpy(dest, rmt8_obx + 2, sizeof(rmt8_obx) - 2);
1872 dest += sizeof(rmt8_obx) - 2;
1873 }
1874 return dest - out_module;
1875 case 't':
1876 player = module_info->player + tmc_player[module[0x25] - 1];
1877 addr = player + tmc_init[module[0x25] - 1];
1878 if (module_info->songs != 1)
1879 addr -= 3;
1880 dest = put_sap_header(out_module, module_info, 'B', -1, addr, player);
1881 if (dest == NULL)
1882 return -1;
1883 memcpy(dest, module, module_len);
1884 dest += module_len;
1885 *dest++ = (byte) addr;
1886 *dest++ = (byte) (addr >> 8);
1887 *dest++ = tmc_obx[4];
1888 *dest++ = tmc_obx[5];
1889 if (module_info->songs != 1)
1890 *dest++ = 0x48; /* pha */
1891 *dest++ = 0xa0; /* ldy #<music */
1892 *dest++ = (byte) module_info->music;
1893 *dest++ = 0xa2; /* ldx #>music */
1894 *dest++ = (byte) (module_info->music >> 8);
1895 *dest++ = 0xa9; /* lda #$70 */
1896 *dest++ = 0x70;
1897 *dest++ = 0x20; /* jsr player */
1898 *dest++ = (byte) module_info->player;
1899 *dest++ = (byte) (module_info->player >> 8);
1900 if (module_info->songs != 1) {
1901 *dest++ = 0x68; /* pla */
1902 *dest++ = 0xaa; /* tax */
1903 *dest++ = 0xa9; /* lda #0 */
1904 *dest++ = 0;
1905 }
1906 else {
1907 *dest++ = 0xa9; /* lda #$60 */
1908 *dest++ = 0x60;
1909 }
1910 switch (module[0x25]) {
1911 case 2:
1912 *dest++ = 0x06; /* asl 0 */
1913 *dest++ = 0;
1914 *dest++ = 0x4c; /* jmp player */
1915 *dest++ = (byte) module_info->player;
1916 *dest++ = (byte) (module_info->player >> 8);
1917 *dest++ = 0xa5; /* lda 0 */
1918 *dest++ = 0;
1919 *dest++ = 0xe6; /* inc 0 */
1920 *dest++ = 0;
1921 *dest++ = 0x4a; /* lsr @ */
1922 *dest++ = 0x90; /* bcc player+3 */
1923 *dest++ = 5;
1924 *dest++ = 0xb0; /* bcs player+6 */
1925 *dest++ = 6;
1926 break;
1927 case 3:
1928 case 4:
1929 *dest++ = 0xa0; /* ldy #1 */
1930 *dest++ = 1;
1931 *dest++ = 0x84; /* sty 0 */
1932 *dest++ = 0;
1933 *dest++ = 0xd0; /* bne player */
1934 *dest++ = 10;
1935 *dest++ = 0xc6; /* dec 0 */
1936 *dest++ = 0;
1937 *dest++ = 0xd0; /* bne player+6 */
1938 *dest++ = 12;
1939 *dest++ = 0xa0; /* ldy #3 */
1940 *dest++ = module[0x25];
1941 *dest++ = 0x84; /* sty 0 */
1942 *dest++ = 0;
1943 *dest++ = 0xd0; /* bne player+3 */
1944 *dest++ = 3;
1945 break;
1946 default:
1947 break;
1948 }
1949 memcpy(dest, tmc_obx + 6, sizeof(tmc_obx) - 6);
1950 dest += sizeof(tmc_obx) - 6;
1951 return dest - out_module;
1952 case 'T':
1953 dest = put_sap_header(out_module, module_info, 'B', -1, TM2_INIT, module_info->player + 3);
1954 if (dest == NULL)
1955 return -1;
1956 memcpy(dest, module, module_len);
1957 dest += module_len;
1958 *dest++ = (byte) TM2_INIT;
1959 *dest++ = (byte) (TM2_INIT >> 8);
1960 if (module_info->songs != 1) {
1961 *dest++ = (byte) (TM2_INIT + 16);
1962 *dest++ = (byte) ((TM2_INIT + 16) >> 8);
1963 *dest++ = 0x48; /* pha */
1964 }
1965 else {
1966 *dest++ = (byte) (TM2_INIT + 14);
1967 *dest++ = (byte) ((TM2_INIT + 14) >> 8);
1968 }
1969 *dest++ = 0xa0; /* ldy #<music */
1970 *dest++ = (byte) module_info->music;
1971 *dest++ = 0xa2; /* ldx #>music */
1972 *dest++ = (byte) (module_info->music >> 8);
1973 *dest++ = 0xa9; /* lda #$70 */
1974 *dest++ = 0x70;
1975 *dest++ = 0x20; /* jsr player */
1976 *dest++ = (byte) module_info->player;
1977 *dest++ = (byte) (module_info->player >> 8);
1978 if (module_info->songs != 1) {
1979 *dest++ = 0x68; /* pla */
1980 *dest++ = 0xaa; /* tax */
1981 *dest++ = 0xa9; /* lda #0 */
1982 *dest++ = 0;
1983 }
1984 else {
1985 *dest++ = 0xa9; /* lda #0 */
1986 *dest++ = 0;
1987 *dest++ = 0xaa; /* tax */
1988 }
1989 *dest++ = 0x4c; /* jmp player */
1990 *dest++ = (byte) module_info->player;
1991 *dest++ = (byte) (module_info->player >> 8);
1992 memcpy(dest, tm2_obx + 2, sizeof(tm2_obx) - 2);
1993 dest += sizeof(tm2_obx) - 2;
1994 return dest - out_module;
1995 default:
1996 return -1;
1997 }
1998}
1999
2000#endif /* !defined(JAVA) && !defined(CSHARP) */
diff --git a/apps/codecs/asap/asap.h b/apps/codecs/asap/asap.h
new file mode 100644
index 0000000000..194d4168eb
--- /dev/null
+++ b/apps/codecs/asap/asap.h
@@ -0,0 +1,299 @@
1/*
2 * asap.h - public interface of the ASAP engine
3 *
4 * Copyright (C) 2005-2008 Piotr Fusik
5 *
6 * This file is part of ASAP (Another Slight Atari Player),
7 * see http://asap.sourceforge.net
8 *
9 * ASAP is free software; you can redistribute it and/or modify it
10 * under the terms of the GNU General Public License as published
11 * by the Free Software Foundation; either version 2 of the License,
12 * or (at your option) any later version.
13 *
14 * ASAP is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty
16 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
17 * See the GNU General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public License
20 * along with ASAP; if not, write to the Free Software Foundation, Inc.,
21 * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
22 */
23
24#ifndef _ASAP_H_
25#define _ASAP_H_
26
27#ifdef __cplusplus
28extern "C" {
29#endif
30
31/* ASAP version. */
32#define ASAP_VERSION_MAJOR 1
33#define ASAP_VERSION_MINOR 2
34#define ASAP_VERSION_MICRO 0
35#define ASAP_VERSION "1.2.0"
36
37/* Short credits of the ASAP engine. */
38#define ASAP_YEARS "2005-2008"
39#define ASAP_CREDITS \
40 "Another Slight Atari Player (C) 2005-2008 Piotr Fusik\n" \
41 "CMC, MPT, TMC players (C) 1994-2005 Marcin Lewandowski\n" \
42 "RMT player (C) 2002-2005 Radek Sterba\n"
43
44/* Short GPL notice.
45 Display after the credits. */
46#define ASAP_COPYRIGHT \
47 "This program is free software; you can redistribute it and/or modify\n" \
48 "it under the terms of the GNU General Public License as published\n" \
49 "by the Free Software Foundation; either version 2 of the License,\n" \
50 "or (at your option) any later version."
51
52/* Useful type definitions. */
53#ifndef FALSE
54#define FALSE 0
55#endif
56#ifndef TRUE
57#define TRUE 1
58#endif
59typedef int abool;
60typedef unsigned char byte;
61
62/* Information about a file. */
63typedef struct {
64 char author[128]; /* author's name */
65 char name[128]; /* title */
66 char date[128]; /* creation date */
67 int channels; /* 1 for mono or 2 for stereo */
68 int songs; /* number of subsongs */
69 int default_song; /* 0-based index of the "main" subsong */
70 int durations[32]; /* lengths of songs, in milliseconds, -1 = unspecified */
71 abool loops[32]; /* whether songs repeat or not */
72 /* the following technical information should not be used outside ASAP. */
73 char type;
74 int fastplay;
75 int music;
76 int init;
77 int player;
78 int header_len;
79 byte song_pos[128];
80} ASAP_ModuleInfo;
81
82/* POKEY state.
83 Not for use outside the ASAP engine. */
84typedef struct {
85 int audctl;
86 abool init;
87 int poly_index;
88 int div_cycles;
89 int mute1;
90 int mute2;
91 int mute3;
92 int mute4;
93 int audf1;
94 int audf2;
95 int audf3;
96 int audf4;
97 int audc1;
98 int audc2;
99 int audc3;
100 int audc4;
101 int tick_cycle1;
102 int tick_cycle2;
103 int tick_cycle3;
104 int tick_cycle4;
105 int period_cycles1;
106 int period_cycles2;
107 int period_cycles3;
108 int period_cycles4;
109 int reload_cycles1;
110 int reload_cycles3;
111 int out1;
112 int out2;
113 int out3;
114 int out4;
115 int delta1;
116 int delta2;
117 int delta3;
118 int delta4;
119 int skctl;
120 char delta_buffer[888];
121} PokeyState;
122
123/* Player state.
124 Only module_info is meant to be read outside the ASAP engine. */
125typedef struct {
126 int cycle;
127 int cpu_pc;
128 int cpu_a;
129 int cpu_x;
130 int cpu_y;
131 int cpu_s;
132 int cpu_nz;
133 int cpu_c;
134 int cpu_vdi;
135 int scanline_number;
136 int nearest_event_cycle;
137 int next_scanline_cycle;
138 int timer1_cycle;
139 int timer2_cycle;
140 int timer4_cycle;
141 int irqst;
142 int extra_pokey_mask;
143 PokeyState base_pokey;
144 PokeyState extra_pokey;
145 int sample_offset;
146 int sample_index;
147 int samples;
148 int iir_acc_left;
149 int iir_acc_right;
150 ASAP_ModuleInfo module_info;
151 int tmc_per_frame;
152 int tmc_per_frame_counter;
153 int current_song;
154 int current_duration;
155 int blocks_played;
156 int silence_cycles;
157 int silence_cycles_counter;
158 byte poly9_lookup[511];
159 byte poly17_lookup[16385];
160 byte memory[65536];
161} ASAP_State;
162
163/* Maximum length of a "mm:ss.xxx" string including the terminator. */
164#define ASAP_DURATION_CHARS 10
165
166/* Maximum length of a supported input file.
167 You can assume that files longer than this are not supported by ASAP. */
168#define ASAP_MODULE_MAX 65000
169
170/* Output sample rate. */
171#define ASAP_SAMPLE_RATE 44100
172
173/* Output formats. */
174typedef enum {
175 ASAP_FORMAT_U8 = 8, /* unsigned char */
176 ASAP_FORMAT_S16_LE = 16, /* signed short, little-endian */
177 ASAP_FORMAT_S16_BE = -16 /* signed short, big-endian */
178} ASAP_SampleFormat;
179
180/* Parses the string in the "mm:ss.xxx" format
181 and returns the number of milliseconds or -1 if an error occurs. */
182int ASAP_ParseDuration(const char *s);
183
184/* Converts number of milliseconds to a string in the "mm:ss.xxx" format. */
185void ASAP_DurationToString(char *s, int duration);
186
187/* Checks whether the extension of the passed filename is known to ASAP. */
188abool ASAP_IsOurFile(const char *filename);
189
190/* Checks whether the filename extension is known to ASAP. */
191abool ASAP_IsOurExt(const char *ext);
192
193/* Changes the filename extension, returns true on success. */
194abool ASAP_ChangeExt(char *filename, const char *ext);
195
196/* Gets information about a module.
197 "module_info" is the structure where the information is returned.
198 "filename" determines file format.
199 "module" is the music data (contents of the file).
200 "module_len" is the number of data bytes.
201 ASAP_GetModuleInfo() returns true on success. */
202abool ASAP_GetModuleInfo(ASAP_ModuleInfo *module_info, const char *filename,
203 const byte module[], int module_len);
204
205/* Loads music data.
206 "as" is the destination structure.
207 "filename" determines file format.
208 "module" is the music data (contents of the file).
209 "module_len" is the number of data bytes.
210 ASAP does not make copies of the passed pointers. You can overwrite
211 or free "filename" and "module" once this function returns.
212 ASAP_Load() returns true on success.
213 If false is returned, the structure is invalid and you cannot
214 call the following functions. */
215abool ASAP_Load(ASAP_State *as, const char *filename,
216 const byte module[], int module_len);
217
218/* Enables silence detection.
219 Makes ASAP finish playing after the specified period of silence.
220 "as" is ASAP state initialized by ASAP_Load().
221 "seconds" is the minimum length of silence that ends playback. */
222void ASAP_DetectSilence(ASAP_State *as, int seconds);
223
224/* Prepares ASAP to play the specified song of the loaded module.
225 "as" is ASAP state initialized by ASAP_Load().
226 "song" is a zero-based index which must be less than the "songs" field
227 of the ASAP_ModuleInfo structure.
228 "duration" is playback time in milliseconds - use durations[song]
229 unless you want to override it. -1 means indefinitely. */
230void ASAP_PlaySong(ASAP_State *as, int song, int duration);
231
232/* Mutes the selected POKEY channels.
233 This is only useful for people who want to grab samples of individual
234 instruments.
235 "as" is ASAP state after calling ASAP_PlaySong().
236 "mask" is a bit mask which selects POKEY channels to be muted.
237 Bits 0-3 control the base POKEY channels,
238 bits 4-7 control the extra POKEY channels. */
239void ASAP_MutePokeyChannels(ASAP_State *as, int mask);
240
241/* Rewinds the current song.
242 "as" is ASAP state initialized by ASAP_PlaySong().
243 "position" is the requested absolute position in milliseconds. */
244void ASAP_Seek(ASAP_State *as, int position);
245
246/* Fills the specified buffer with generated samples.
247 "as" is ASAP state initialized by ASAP_PlaySong().
248 "buffer" is the destination buffer.
249 "buffer_len" is the length of this buffer in bytes.
250 "format" is the format of samples.
251 ASAP_Generate() returns number of bytes actually written
252 (less than buffer_len if reached the end of the song).
253 Normally you use a buffer of a few kilobytes or less,
254 and call ASAP_Generate() in a loop or via a callback. */
255int ASAP_Generate(ASAP_State *as, void *buffer, int buffer_len,
256 ASAP_SampleFormat format);
257
258/* Checks whether information in the specified file can be edited. */
259abool ASAP_CanSetModuleInfo(const char *filename);
260
261/* Updates the specified module with author, name, date, stereo
262 and song durations as specified in "module_info".
263 "module_info" contains the new module information.
264 "module" is the source file contents.
265 "module_len" is the source file length.
266 "out_module" is the destination buffer of size ASAP_MODULE_MAX.
267 ASAP_SetModuleInfo() returns the resulting file length (number of bytes
268 written to "out_module") or -1 if illegal characters were found. */
269int ASAP_SetModuleInfo(const ASAP_ModuleInfo *module_info, const byte module[],
270 int module_len, byte out_module[]);
271
272/* Checks whether the specified module can be converted to another format.
273 "filename" determines the source format.
274 "module_info" contains the information about the source module,
275 with possibly modified public fields.
276 "module" is the source file contents.
277 "module_len" is the source file length.
278 ASAP_CanConvert() returns the extension of the target format
279 or NULL if there's no possible conversion. */
280const char *ASAP_CanConvert(const char *filename, const ASAP_ModuleInfo *module_info,
281 const byte module[], int module_len);
282
283/* Converts the specified module to the format returned by ASAP_CanConvert().
284 "filename" determines the source format.
285 "module_info" contains the information about the source module,
286 with possibly modified public fields.
287 "module" is the source file contents.
288 "module_len" is the source file length.
289 "out_module" is the destination buffer of size ASAP_MODULE_MAX.
290 ASAP_Convert() returns the resulting file length (number of bytes
291 written to "out_module") or -1 on error. */
292int ASAP_Convert(const char *filename, const ASAP_ModuleInfo *module_info,
293 const byte module[], int module_len, byte out_module[]);
294
295#ifdef __cplusplus
296}
297#endif
298
299#endif
diff --git a/apps/codecs/asap/asap_internal.h b/apps/codecs/asap/asap_internal.h
new file mode 100644
index 0000000000..1385215f37
--- /dev/null
+++ b/apps/codecs/asap/asap_internal.h
@@ -0,0 +1,93 @@
1/*
2 * asap_internal.h - private interface of the ASAP engine
3 *
4 * Copyright (C) 2005-2008 Piotr Fusik
5 *
6 * This file is part of ASAP (Another Slight Atari Player),
7 * see http://asap.sourceforge.net
8 *
9 * ASAP is free software; you can redistribute it and/or modify it
10 * under the terms of the GNU General Public License as published
11 * by the Free Software Foundation; either version 2 of the License,
12 * or (at your option) any later version.
13 *
14 * ASAP is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty
16 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
17 * See the GNU General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public License
20 * along with ASAP; if not, write to the Free Software Foundation, Inc.,
21 * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
22 */
23
24#ifndef _ASAP_INTERNAL_H_
25#define _ASAP_INTERNAL_H_
26
27#if !defined(JAVA) && !defined(CSHARP)
28
29#include "asap.h"
30
31#define CONST_LOOKUP(type, name) \
32 static const type name[]
33#define FILE_FUNC static
34#define ASAP_FUNC
35#define PTR *
36#define ADDRESSOF &
37#define ARRAY *
38#define VOIDPTR void *
39#define UBYTE(data) (data)
40#define SBYTE(data) (signed char) (data)
41#define STRING const char *
42#define ZERO_ARRAY(array) memset(array, 0, sizeof(array))
43#define COPY_ARRAY(dest, dest_offset, src, src_offset, len) \
44 memcpy(dest + dest_offset, src + src_offset, len)
45#define NEW_ARRAY(type, name, size) \
46 type name[size]
47#define INIT_ARRAY(array) memset(array, 0, sizeof(array))
48
49#define AST ast->
50#define PST pst->
51#define MODULE_INFO module_info->
52#define ASAP_OBX const byte *
53#define GET_OBX(name) name##_obx
54
55int ASAP_GetByte(ASAP_State *ast, int addr);
56void ASAP_PutByte(ASAP_State *ast, int addr, int data);
57
58void Cpu_RunScanlines(ASAP_State *ast, int scanlines);
59
60void PokeySound_Initialize(ASAP_State *ast);
61void PokeySound_StartFrame(ASAP_State *ast);
62void PokeySound_PutByte(ASAP_State *ast, int addr, int data);
63int PokeySound_GetRandom(ASAP_State *ast, int addr);
64void PokeySound_EndFrame(ASAP_State *ast, int cycle_limit);
65int PokeySound_Generate(ASAP_State *ast, byte buffer[], int buffer_offset, int blocks, ASAP_SampleFormat format);
66abool PokeySound_IsSilent(const PokeyState *pst);
67void PokeySound_Mute(const ASAP_State *ast, PokeyState *pst, int mask);
68
69#ifdef ASAPSCAN
70abool call_6502_player(ASAP_State *ast);
71extern abool cpu_trace;
72void print_cpu_state(const ASAP_State *ast, int pc, int a, int x, int y, int s, int nz, int vdi, int c);
73#endif
74
75#endif /* !defined(JAVA) && !defined(CSHARP) */
76
77#define ASAP_MAIN_CLOCK 1773447
78
79#define V_FLAG 0x40
80#define D_FLAG 0x08
81#define I_FLAG 0x04
82#define Z_FLAG 0x02
83
84#define NEVER 0x800000
85
86#define dGetByte(addr) UBYTE(AST memory[addr])
87#define dPutByte(addr, data) AST memory[addr] = (byte) (data)
88#define dGetWord(addr) (dGetByte(addr) + (dGetByte((addr) + 1) << 8))
89#define GetByte(addr) (((addr) & 0xf900) == 0xd000 ? ASAP_GetByte(ast, addr) : dGetByte(addr))
90#define PutByte(addr, data) do { if (((addr) & 0xf900) == 0xd000) ASAP_PutByte(ast, addr, data); else dPutByte(addr, data); } while (FALSE)
91#define RMW_GetByte(dest, addr) do { if (((addr) >> 8) == 0xd2) { dest = ASAP_GetByte(ast, addr); AST cycle--; ASAP_PutByte(ast, addr, dest); AST cycle++; } else dest = dGetByte(addr); } while (FALSE)
92
93#endif /* _ASAP_INTERNAL_H_ */
diff --git a/apps/codecs/asap/players.h b/apps/codecs/asap/players.h
new file mode 100644
index 0000000000..ac94f66d49
--- /dev/null
+++ b/apps/codecs/asap/players.h
@@ -0,0 +1,947 @@
1static const unsigned char cmc_obx[] = {
2 0xFF, 0xFF, 0x00, 0x05, 0xDC, 0x0C, 0x4C, 0x0F, 0x0B, 0x4C, 0x78, 0x05, 0x4C, 0xCB, 0x07, 0x00,
3 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xA0, 0xE3, 0xED, 0xE3, 0xA0, 0xF0, 0xEC, 0xE1,
4 0xF9, 0xE5, 0xF2, 0xA0, 0xF6, 0xA0, 0xB2, 0xAE, 0xB1, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF,
6 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
8 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
9 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00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0xBD, 0x39, 0x05, 0xC9, 0x0F, 0xD0,
89 0x06, 0xBD, 0x58, 0x05, 0x9D, 0x3F, 0x05, 0xBD, 0x4B, 0x05, 0x10, 0x0A, 0xBD, 0x09, 0x05, 0xD0,
90 0x05, 0xA9, 0x40, 0x9D, 0x4B, 0x05, 0xFE, 0x3C, 0x05, 0xA0, 0x00, 0xBD, 0x52, 0x05, 0x4A, 0x4A,
91 0x4A, 0x4A, 0x90, 0x01, 0x88, 0x4A, 0x90, 0x01, 0xC8, 0x18, 0x98, 0x7D, 0x2D, 0x05, 0x9D, 0x2D,
92 0x05, 0xBD, 0x30, 0x05, 0xC9, 0xFF, 0xD0, 0x02, 0xA0, 0x00, 0x18, 0x98, 0x7D, 0x30, 0x05, 0x9D,
93 0x30, 0x05, 0xCA, 0x30, 0x03, 0x4C, 0x96, 0x09, 0xAD, 0x28, 0x05, 0x8D, 0x2B, 0x05, 0xAD, 0x52,
94 0x05, 0x29, 0x07, 0xAA, 0xA0, 0x03, 0xAD, 0x6E, 0x05, 0xF0, 0x03, 0xBC, 0xD5, 0x0C, 0x98, 0x48,
95 0xB9, 0xB9, 0x0C, 0x08, 0x29, 0x7F, 0xAA, 0x98, 0x29, 0x03, 0x0A, 0xA8, 0xBD, 0x24, 0x05, 0x99,
96 0x00, 0xD2, 0xC8, 0xBD, 0x09, 0x05, 0xE0, 0x03, 0xD0, 0x03, 0xAD, 0x09, 0x05, 0x1D, 0x28, 0x05,
97 0x28, 0x10, 0x02, 0xA9, 0x00, 0x99, 0x00, 0xD2, 0x68, 0xA8, 0x88, 0x29, 0x03, 0xD0, 0xCF, 0xA0,
98 0x08, 0xAD, 0x2C, 0x05, 0x99, 0x00, 0xD2, 0x18, 0x68, 0x85, 0xFF, 0x68, 0x85, 0xFE, 0x68, 0x85,
99 0xFD, 0x68, 0x85, 0xFC, 0x60, 0x68, 0xAA, 0xF0, 0x4E, 0xC9, 0x02, 0xF0, 0x06, 0x68, 0x68, 0xCA,
100 0xD0, 0xFB, 0x60, 0xA5, 0x14, 0xC5, 0x14, 0xF0, 0xFC, 0xAD, 0x24, 0x02, 0xC9, 0x86, 0xD0, 0x07,
101 0xAD, 0x25, 0x02, 0xC9, 0x0B, 0xF0, 0xE6, 0xAD, 0x24, 0x02, 0x8D, 0x8F, 0x0B, 0xAD, 0x25, 0x02,
102 0x8D, 0x90, 0x0B, 0xA9, 0x86, 0x8D, 0x24, 0x02, 0xA9, 0x0B, 0x8D, 0x25, 0x02, 0x68, 0x68, 0xF0,
103 0x03, 0x38, 0xE9, 0x01, 0x8D, 0x5D, 0x0B, 0x68, 0xA8, 0x68, 0xAA, 0xA9, 0x70, 0x20, 0x78, 0x05,
104 0xA9, 0x00, 0xA2, 0x00, 0x4C, 0x78, 0x05, 0xA5, 0x14, 0xC5, 0x14, 0xF0, 0xFC, 0xAD, 0x24, 0x02,
105 0xC9, 0x86, 0xD0, 0xAE, 0xAD, 0x25, 0x02, 0xC9, 0x0B, 0xD0, 0xA7, 0xAD, 0x8F, 0x0B, 0x8D, 0x24,
106 0x02, 0xAD, 0x90, 0x0B, 0x8D, 0x25, 0x02, 0xA9, 0x40, 0x4C, 0x78, 0x05, 0x20, 0xCB, 0x07, 0x90,
107 0x03, 0x20, 0x75, 0x0B, 0x4C, 0xFF, 0xFF, 0xB2, 0x05, 0xDD, 0x05, 0xA8, 0x06, 0x3B, 0x06, 0x7B,
108 0x06, 0x94, 0x06, 0x9F, 0x06, 0x52, 0x06, 0x93, 0x08, 0x99, 0x08, 0x9D, 0x08, 0xA5, 0x08, 0xAD,
109 0x08, 0xB7, 0x08, 0xCD, 0x08, 0xB9, 0x0B, 0xFA, 0x0B, 0x3B, 0x0C, 0x80, 0xA0, 0x20, 0x40, 0xFF,
110 0xF1, 0xE4, 0xD7, 0xCB, 0xC0, 0xB5, 0xAA, 0xA1, 0x98, 0x8F, 0x87, 0x7F, 0x78, 0x72, 0x6B, 0x65,
111 0x5F, 0x5A, 0x55, 0x50, 0x4B, 0x47, 0x43, 0x3F, 0x3C, 0x38, 0x35, 0x32, 0x2F, 0x2C, 0x2A, 0x27,
112 0x25, 0x23, 0x21, 0x1F, 0x1D, 0x1C, 0x1A, 0x18, 0x17, 0x16, 0x14, 0x13, 0x12, 0x11, 0x10, 0x0F,
113 0x0E, 0x0D, 0x0C, 0x0B, 0x0A, 0x09, 0x08, 0x07, 0x06, 0x05, 0x04, 0x03, 0x02, 0x01, 0x00, 0x00,
114 0x00, 0x00, 0x00, 0x00, 0xF2, 0xE9, 0xDA, 0xCE, 0xBF, 0xB6, 0xAA, 0xA1, 0x98, 0x8F, 0x89, 0x80,
115 0x7A, 0x71, 0x6B, 0x65, 0x5F, 0x00, 0x56, 0x50, 0x67, 0x60, 0x5A, 0x55, 0x51, 0x4C, 0x48, 0x43,
116 0x3F, 0x3D, 0x39, 0x34, 0x33, 0x39, 0x2D, 0x2A, 0x28, 0x25, 0x24, 0x21, 0x1F, 0x1E, 0x00, 0x00,
117 0x0F, 0x0E, 0x0D, 0x0C, 0x0B, 0x0A, 0x09, 0x08, 0x07, 0x06, 0x05, 0x04, 0x03, 0x02, 0x01, 0x00,
118 0x00, 0x38, 0x0B, 0x8C, 0x0A, 0x00, 0x0A, 0x6A, 0x09, 0xE8, 0x08, 0x6A, 0x08, 0xEF, 0x07, 0x80,
119 0x07, 0x08, 0x07, 0xAE, 0x06, 0x46, 0x06, 0xE6, 0x05, 0x95, 0x05, 0x41, 0x05, 0xF6, 0x04, 0xB0,
120 0x04, 0x6E, 0x04, 0x30, 0x04, 0xF6, 0x03, 0xBB, 0x03, 0x84, 0x03, 0x52, 0x03, 0x22, 0x03, 0xF4,
121 0x02, 0xC8, 0x02, 0xA0, 0x02, 0x7A, 0x02, 0x55, 0x02, 0x34, 0x02, 0x14, 0x02, 0xF5, 0x01, 0xD8,
122 0x01, 0xBD, 0x01, 0xA4, 0x01, 0x8D, 0x01, 0x77, 0x01, 0x60, 0x01, 0x4E, 0x01, 0x38, 0x01, 0x27,
123 0x01, 0x15, 0x01, 0x06, 0x01, 0xF7, 0x00, 0xE8, 0x00, 0xDB, 0x00, 0xCF, 0x00, 0xC3, 0x00, 0xB8,
124 0x00, 0xAC, 0x00, 0xA2, 0x00, 0x9A, 0x00, 0x90, 0x00, 0x88, 0x00, 0x7F, 0x00, 0x78, 0x00, 0x70,
125 0x00, 0x6A, 0x00, 0x64, 0x00, 0x5E, 0x00, 0x57, 0x00, 0x52, 0x00, 0x32, 0x00, 0x0A, 0x00, 0x00,
126 0x01, 0x02, 0x83, 0x00, 0x01, 0x02, 0x03, 0x01, 0x00, 0x02, 0x83, 0x01, 0x00, 0x02, 0x03, 0x01,
127 0x02, 0x80, 0x03, 0x80, 0x40, 0x20, 0x10, 0x08, 0x04, 0x02, 0x01, 0x03, 0x03, 0x03, 0x03, 0x07,
128 0x0B, 0x0F, 0x13
129};
130static const unsigned char mpt_obx[] = {
131 0xFF, 0xFF, 0x00, 0x05, 0xB2, 0x0D, 0x4C, 0xCD, 0x0B, 0xAD, 0x2E, 0x07, 0xD0, 0x01, 0x60, 0xA9,
132 0x00, 0x8D, 0x1C, 0x0E, 0xEE, 0x1D, 0x0E, 0xAD, 0x17, 0x0E, 0xCD, 0xBB, 0x0D, 0x90, 0x50, 0xCE,
133 0x15, 0x0E, 0xF0, 0x03, 0x4C, 0xC5, 0x05, 0xA2, 0x00, 0x8E, 0x17, 0x0E, 0xA9, 0x00, 0x9D, 0xED,
134 0x0D, 0x9D, 0xF5, 0x0D, 0xBD, 0xB3, 0x0D, 0x85, 0xEC, 0xBD, 0xB7, 0x0D, 0x85, 0xED, 0xAC, 0x16,
135 0x0E, 0xB1, 0xEC, 0xC8, 0xC9, 0xFF, 0xF0, 0x07, 0xC9, 0xFE, 0xD0, 0x0F, 0x4C, 0x2A, 0x0C, 0xB1,
136 0xEC, 0x30, 0xF9, 0x0A, 0xA8, 0x8C, 0x16, 0x0E, 0x4C, 0x3B, 0x05, 0x9D, 0xE9, 0x0D, 0xB1, 0xEC,
137 0x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x0D,
203 0xA8, 0xB9, 0xFF, 0xFF, 0x60, 0x94, 0x91, 0x98, 0xA5, 0xAD, 0xB4, 0xC0, 0x09, 0x09, 0x09, 0x09,
204 0x09, 0x09, 0x09, 0x40, 0x00, 0x20, 0x00, 0x7D, 0xC9, 0x0D, 0x9D, 0xC9, 0x0D, 0x60, 0x7D, 0xD1,
205 0x0D, 0x9D, 0xE1, 0x0D, 0x20, 0x75, 0x09, 0x9D, 0xC9, 0x0D, 0x60, 0x9D, 0xC9, 0x0D, 0xBD, 0x8D,
206 0x09, 0x10, 0x0C, 0x9D, 0xC9, 0x0D, 0xA9, 0x80, 0xD0, 0x05, 0x9D, 0xC9, 0x0D, 0xA9, 0x01, 0x0D,
207 0x1C, 0x0E, 0x8D, 0x1C, 0x0E, 0x60, 0x2D, 0x0A, 0xD2, 0x9D, 0xC9, 0x0D, 0x60, 0xF2, 0x33, 0x96,
208 0xE2, 0x38, 0x8C, 0x00, 0x6A, 0xE8, 0x6A, 0xEF, 0x80, 0x08, 0xAE, 0x46, 0xE6, 0x95, 0x41, 0xF6,
209 0xB0, 0x6E, 0x30, 0xF6, 0xBB, 0x84, 0x52, 0x22, 0xF4, 0xC8, 0xA0, 0x7A, 0x55, 0x34, 0x14, 0xF5,
210 0xD8, 0xBD, 0xA4, 0x8D, 0x77, 0x60, 0x4E, 0x38, 0x27, 0x15, 0x06, 0xF7, 0xE8, 0xDB, 0xCF, 0xC3,
211 0xB8, 0xAC, 0xA2, 0x9A, 0x90, 0x88, 0x7F, 0x78, 0x70, 0x6A, 0x64, 0x5E, 0x0D, 0x0D, 0x0C, 0x0B,
212 0x0B, 0x0A, 0x0A, 0x09, 0x08, 0x08, 0x07, 0x07, 0x07, 0x06, 0x06, 0x05, 0x05, 0x05, 0x04, 0x04,
213 0x04, 0x04, 0x03, 0x03, 0x03, 0x03, 0x03, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01,
214 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
215 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x18, 0x18, 0x18,
216 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x16, 0x16, 0x17, 0x17, 0x17,
217 0x17, 0x18, 0x18, 0x18, 0x18, 0x18, 0x19, 0x19, 0x19, 0x19, 0x1A, 0x15, 0x15, 0x16, 0x16, 0x16,
218 0x17, 0x17, 0x18, 0x18, 0x18, 0x19, 0x19, 0x1A, 0x1A, 0x1A, 0x1B, 0x14, 0x15, 0x15, 0x16, 0x16,
219 0x17, 0x17, 0x18, 0x18, 0x18, 0x19, 0x19, 0x1A, 0x1A, 0x1B, 0x1B, 0x14, 0x14, 0x15, 0x15, 0x16,
220 0x16, 0x17, 0x17, 0x18, 0x19, 0x19, 0x1A, 0x1A, 0x1B, 0x1B, 0x1C, 0x13, 0x14, 0x14, 0x15, 0x16,
221 0x16, 0x17, 0x17, 0x18, 0x19, 0x19, 0x1A, 0x1A, 0x1B, 0x1C, 0x1C, 0x13, 0x13, 0x14, 0x15, 0x15,
222 0x16, 0x17, 0x17, 0x18, 0x19, 0x19, 0x1A, 0x1B, 0x1B, 0x1C, 0x1D, 0x12, 0x13, 0x14, 0x14, 0x15,
223 0x16, 0x17, 0x17, 0x18, 0x19, 0x19, 0x1A, 0x1B, 0x1C, 0x1C, 0x1D, 0x12, 0x13, 0x13, 0x14, 0x15,
224 0x16, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1A, 0x1B, 0x1C, 0x1D, 0x1D, 0x12, 0x12, 0x13, 0x14, 0x15,
225 0x16, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x11, 0x12, 0x13, 0x14, 0x15,
226 0x16, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x11, 0x12, 0x13, 0x14, 0x15,
227 0x15, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x1B, 0x1C, 0x1D, 0x1E, 0x11, 0x12, 0x13, 0x14, 0x14,
228 0x15, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1C, 0x1D, 0x1E, 0x11, 0x12, 0x13, 0x13, 0x14,
229 0x15, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1D, 0x1E, 0x11, 0x12, 0x12, 0x13, 0x14,
230 0x15, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1E, 0x10, 0x11, 0x12, 0x13, 0x14,
231 0x15, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F, 0x20, 0x22, 0x24, 0x26, 0x29,
232 0x2B, 0x2E, 0x30, 0x33, 0x37, 0x3A, 0x3D, 0x41, 0x45, 0x49, 0x4D, 0x52, 0x57, 0x5C, 0x61, 0x67,
233 0x6E, 0x74, 0x7B, 0x82, 0x8A, 0x92, 0x9B, 0xA4, 0xAE, 0xB8, 0xC3, 0xCF, 0xDC, 0xE9, 0xF6, 0x05,
234 0x15, 0x25, 0x37, 0x49, 0x5D, 0x71, 0x87, 0x9F, 0xB8, 0xD2, 0xED, 0x0B, 0x2A, 0x4B, 0x6E, 0x93,
235 0xBA, 0xE3, 0x0F, 0x3E, 0x70, 0xA4, 0xDB, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
236 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
237 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01,
238 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x03, 0x03,
239 0x03, 0x03, 0x03, 0xE5, 0x2A, 0x40, 0x59, 0x64, 0xEE, 0x08, 0xA6, 0x0B, 0x0C, 0x0C, 0x0C, 0x0C,
240 0x0C, 0x0D, 0x0D, 0x8E, 0x32, 0x07, 0x8C, 0x36, 0x07, 0x29, 0x07, 0xA8, 0xB9, 0xBD, 0x0B, 0x8D,
241 0xE3, 0x0B, 0xB9, 0xC5, 0x0B, 0x8D, 0xE4, 0x0B, 0x4C, 0xFF, 0xFF, 0xAD, 0x36, 0x07, 0xAE, 0x32,
242 0x07, 0x8D, 0x94, 0x07, 0x8D, 0x9B, 0x07, 0x8E, 0x95, 0x07, 0x8E, 0x9C, 0x07, 0x18, 0x69, 0x40,
243 0x8D, 0x81, 0x05, 0x8D, 0x87, 0x05, 0x90, 0x01, 0xE8, 0x8E, 0x82, 0x05, 0x8E, 0x88, 0x05, 0x18,
244 0x69, 0x80, 0x8D, 0x7C, 0x09, 0x90, 0x01, 0xE8, 0x8E, 0x7D, 0x09, 0xE8, 0x8D, 0x1F, 0x0C, 0x8E,
245 0x20, 0x0C, 0xA2, 0x09, 0xBD, 0xFF, 0xFF, 0x9D, 0xB3, 0x0D, 0xCA, 0x10, 0xF7, 0xCE, 0xBC, 0x0D,
246 0xA9, 0x00, 0x8D, 0x2E, 0x07, 0xA2, 0x62, 0x9D, 0xBD, 0x0D, 0xCA, 0x10, 0xFA, 0xA2, 0x08, 0x9D,
247 0x00, 0xD2, 0xCA, 0x10, 0xFA, 0x60, 0x20, 0x2A, 0x0C, 0xAD, 0x32, 0x07, 0x0A, 0x8D, 0x16, 0x0E,
248 0xAD, 0xBB, 0x0D, 0x8D, 0x17, 0x0E, 0xA9, 0x01, 0x8D, 0x15, 0x0E, 0x8D, 0x2E, 0x07, 0x60, 0xAD,
249 0x36, 0x07, 0x85, 0xF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B, 0x0E, 0x8D, 0x19, 0x0E, 0xA9, 0x18, 0x8D, 0x07, 0xD2, 0xA9, 0x11, 0x85, 0xFA, 0xA9,
261 0x0D, 0x85, 0xFB, 0xA9, 0xAD, 0x8D, 0x61, 0x0D, 0x8D, 0x38, 0x0D, 0xA0, 0x00, 0x8C, 0x79, 0x0D,
262 0x8C, 0x7F, 0x0D, 0xAE, 0x0B, 0xD4, 0xB1, 0xFC, 0x4A, 0x4A, 0x4A, 0x4A, 0x09, 0x10, 0x8D, 0x07,
263 0xD2, 0x20, 0x75, 0x0D, 0xEC, 0x0B, 0xD4, 0xF0, 0xFB, 0x8D, 0x05, 0xD2, 0xAE, 0x0B, 0xD4, 0xB1,
264 0xFC, 0xE6, 0xFC, 0xD0, 0x10, 0xE6, 0xFD, 0xC6, 0xF8, 0xD0, 0x0A, 0xA9, 0xAD, 0x8D, 0x61, 0x0D,
265 0x8D, 0x38, 0x0D, 0xA9, 0x08, 0x09, 0x10, 0x8D, 0x07, 0xD2, 0x20, 0x75, 0x0D, 0xEC, 0x0B, 0xD4,
266 0xF0, 0xFB, 0x8D, 0x05, 0xD2, 0xAD, 0x1B, 0x0E, 0xD0, 0xB9, 0x60, 0x18, 0xA5, 0xF9, 0x69, 0x00,
267 0x85, 0xF9, 0xA5, 0xFA, 0x69, 0x00, 0x85, 0xFA, 0x90, 0x0F, 0xE6, 0xFB, 0xA5, 0xFB, 0xC9, 0x00,
268 0xD0, 0x07, 0x8C, 0x79, 0x0D, 0x8C, 0x7F, 0x0D, 0x60, 0xB1, 0xFA, 0x24, 0xF9, 0x30, 0x04, 0x4A,
269 0x4A, 0x4A, 0x4A, 0x29, 0x0F, 0xA8, 0xB9, 0x45, 0x0A, 0xA0, 0x00, 0x60, 0xA0, 0x00, 0x8C, 0x1B,
270 0x0E, 0x8C, 0x1A, 0x0E, 0x88, 0x8C, 0x19, 0x0E, 0x60
271};
272static const unsigned char rmt4_obx[] = {
273 0xFF, 0xFF, 0x90, 0x03, 0x60, 0x0B, 0x80, 0x00, 0x80, 0x20, 0x80, 0x40, 0x00, 0xC0, 0x80, 0x80,
274 0x80, 0xA0, 0x00, 0xC0, 0x40, 0xC0, 0x00, 0x01, 0x05, 0x0B, 0x15, 0x00, 0x01, 0xFF, 0xFF, 0x01,
275 0x01, 0x00, 0xFF, 0xFF, 0x00, 0x01, 0x01, 0x01, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x01, 0x01,
276 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF2, 0x33, 0x96, 0xE2, 0x38, 0x8C, 0x00, 0x6A, 0xE8, 0x6A,
277 0xEF, 0x80, 0x08, 0xAE, 0x46, 0xE6, 0x95, 0x41, 0xF6, 0xB0, 0x6E, 0x30, 0xF6, 0xBB, 0x84, 0x52,
278 0x22, 0xF4, 0xC8, 0xA0, 0x7A, 0x55, 0x34, 0x14, 0xF5, 0xD8, 0xBD, 0xA4, 0x8D, 0x77, 0x60, 0x4E,
279 0x38, 0x27, 0x15, 0x06, 0xF7, 0xE8, 0xDB, 0xCF, 0xC3, 0xB8, 0xAC, 0xA2, 0x9A, 0x90, 0x88, 0x7F,
280 0x78, 0x70, 0x6A, 0x64, 0x5E, 0x00, 0xBF, 0xB6, 0xAA, 0xA1, 0x98, 0x8F, 0x89, 0x80, 0xF2, 0xE6,
281 0xDA, 0xCE, 0xBF, 0xB6, 0xAA, 0xA1, 0x98, 0x8F, 0x89, 0x80, 0x7A, 0x71, 0x6B, 0x65, 0x5F, 0x5C,
282 0x56, 0x50, 0x4D, 0x47, 0x44, 0x3E, 0x3C, 0x38, 0x35, 0x32, 0x2F, 0x2D, 0x2A, 0x28, 0x25, 0x23,
283 0x21, 0x1F, 0x1D, 0x1C, 0x1A, 0x18, 0x17, 0x16, 0x14, 0x13, 0x12, 0x11, 0x10, 0x0F, 0x0E, 0x0D,
284 0x0C, 0x0B, 0x0A, 0x09, 0x08, 0x07, 0xFF, 0xF1, 0xE4, 0xD8, 0xCA, 0xC0, 0xB5, 0xAB, 0xA2, 0x99,
285 0x8E, 0x87, 0x7F, 0x79, 0x73, 0x70, 0x66, 0x61, 0x5A, 0x55, 0x52, 0x4B, 0x48, 0x43, 0x3F, 0x3C,
286 0x39, 0x37, 0x33, 0x30, 0x2D, 0x2A, 0x28, 0x25, 0x24, 0x21, 0x1F, 0x1E, 0x1C, 0x1B, 0x19, 0x17,
287 0x16, 0x15, 0x13, 0x12, 0x11, 0x10, 0x0F, 0x0E, 0x0D, 0x0C, 0x0B, 0x0A, 0x09, 0x08, 0x07, 0x06,
288 0x05, 0x04, 0x03, 0x02, 0x01, 0x00, 0xF3, 0xE6, 0xD9, 0xCC, 0xC1, 0xB5, 0xAD, 0xA2, 0x99, 0x90,
289 0x88, 0x80, 0x79, 0x72, 0x6C, 0x66, 0x60, 0x5B, 0x55, 0x51, 0x4C, 0x48, 0x44, 0x40, 0x3C, 0x39,
290 0x35, 0x32, 0x2F, 0x2D, 0x2A, 0x28, 0x25, 0x23, 0x21, 0x1F, 0x1D, 0x1C, 0x1A, 0x18, 0x17, 0x16,
291 0x14, 0x13, 0x12, 0x11, 0x10, 0x0F, 0x0E, 0x0D, 0x0C, 0x0B, 0x0A, 0x09, 0x08, 0x07, 0x06, 0x05,
292 0x04, 0x03, 0x02, 0x01, 0x00, 0x00, 0x0D, 0x0D, 0x0C, 0x0B, 0x0B, 0x0A, 0x0A, 0x09, 0x08, 0x08,
293 0x07, 0x07, 0x07, 0x06, 0x06, 0x05, 0x05, 0x05, 0x04, 0x04, 0x04, 0x04, 0x03, 0x03, 0x03, 0x03,
294 0x03, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
295 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
296 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
297 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01,
298 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
299 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02,
300 0x02, 0x02, 0x02, 0x03, 0x03, 0x03, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02,
301 0x03, 0x03, 0x03, 0x03, 0x04, 0x04, 0x00, 0x00, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x03, 0x03,
302 0x03, 0x04, 0x04, 0x04, 0x05, 0x05, 0x00, 0x00, 0x01, 0x01, 0x02, 0x02, 0x02, 0x03, 0x03, 0x04,
303 0x04, 0x04, 0x05, 0x05, 0x06, 0x06, 0x00, 0x00, 0x01, 0x01, 0x02, 0x02, 0x03, 0x03, 0x04, 0x04,
304 0x05, 0x05, 0x06, 0x06, 0x07, 0x07, 0x00, 0x01, 0x01, 0x02, 0x02, 0x03, 0x03, 0x04, 0x04, 0x05,
305 0x05, 0x06, 0x06, 0x07, 0x07, 0x08, 0x00, 0x01, 0x01, 0x02, 0x02, 0x03, 0x04, 0x04, 0x05, 0x05,
306 0x06, 0x07, 0x07, 0x08, 0x08, 0x09, 0x00, 0x01, 0x01, 0x02, 0x03, 0x03, 0x04, 0x05, 0x05, 0x06,
307 0x07, 0x07, 0x08, 0x09, 0x09, 0x0A, 0x00, 0x01, 0x01, 0x02, 0x03, 0x04, 0x04, 0x05, 0x06, 0x07,
308 0x07, 0x08, 0x09, 0x0A, 0x0A, 0x0B, 0x00, 0x01, 0x02, 0x02, 0x03, 0x04, 0x05, 0x06, 0x06, 0x07,
309 0x08, 0x09, 0x0A, 0x0A, 0x0B, 0x0C, 0x00, 0x01, 0x02, 0x03, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08,
310 0x09, 0x0A, 0x0A, 0x0B, 0x0C, 0x0D, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x07, 0x08,
311 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09,
312 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x4C, 0x0F, 0x06, 0x4C, 0xFC, 0x07, 0x4C, 0x21, 0x08, 0x4C,
313 0x58, 0x06, 0x4C, 0x2B, 0x0B, 0x86, 0xD3, 0x84, 0xD4, 0x48, 0xA0, 0xA8, 0xA9, 0x00, 0x99, 0x7F,
314 0x02, 0x88, 0xD0, 0xFA, 0xA0, 0x04, 0xB1, 0xD3, 0x8D, 0x15, 0x08, 0xC8, 0xB1, 0xD3, 0x8D, 0x24,
315 0x03, 0xC8, 0xB1, 0xD3, 0x8D, 0x05, 0x08, 0x8D, 0x26, 0x03, 0xA0, 0x08, 0xB1, 0xD3, 0x99, 0xC3,
316 0x00, 0xC8, 0xC0, 0x10, 0xD0, 0xF6, 0x68, 0x48, 0x0A, 0x0A, 0x18, 0x65, 0xD1, 0x85, 0xD1, 0x68,
317 0x08, 0x29, 0xC0, 0x0A, 0x2A, 0x2A, 0x28, 0x65, 0xD2, 0x85, 0xD2, 0x20, 0x6E, 0x06, 0xA9, 0x00,
318 0x8D, 0x08, 0xD2, 0xA0, 0x03, 0x8C, 0x0F, 0xD2, 0xA0, 0x08, 0x99, 0x00, 0xD2, 0x88, 0x10, 0xFA,
319 0xAD, 0x05, 0x08, 0x60, 0xA2, 0x00, 0x8E, 0x27, 0x03, 0x8A, 0xA8, 0xB1, 0xD1, 0xC9, 0xFE, 0xB0,
320 0x2D, 0xA8, 0xB1, 0xCD, 0x9D,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03, 0xAD, 0x1F, 0x03, 0x29, 0x10, 0xD0, 0x05, 0xA9, 0x00,
388 0x8D, 0x1F, 0x03, 0x8A, 0x09, 0x02, 0xAA, 0xEC, 0x2C, 0x0B, 0xD0, 0x5E, 0xAD, 0x0D, 0x03, 0x29,
389 0x0E, 0xC9, 0x06, 0xD0, 0x26, 0xAD, 0x1D, 0x03, 0x29, 0x0F, 0xF0, 0x1F, 0xAC, 0x11, 0x03, 0xB9,
390 0xC0, 0x03, 0x8D, 0x18, 0x03, 0xB9, 0xC0, 0x04, 0x8D, 0x19, 0x03, 0xAD, 0x1C, 0x03, 0x29, 0x10,
391 0xD0, 0x05, 0xA9, 0x00, 0x8D, 0x1C, 0x03, 0x8A, 0x09, 0x50, 0xAA, 0xAD, 0x0F, 0x03, 0x29, 0x0E,
392 0xC9, 0x06, 0xD0, 0x26, 0xAD, 0x1F, 0x03, 0x29, 0x0F, 0xF0, 0x1F, 0xAC, 0x13, 0x03, 0xB9, 0xC0,
393 0x03, 0x8D, 0x1A, 0x03, 0xB9, 0xC0, 0x04, 0x8D, 0x1B, 0x03, 0xAD, 0x1E, 0x03, 0x29, 0x10, 0xD0,
394 0x05, 0xA9, 0x00, 0x8D, 0x1E, 0x03, 0x8A, 0x09, 0x28, 0xAA, 0x8E, 0x2C, 0x0B, 0xAD, 0x26, 0x03,
395 0x60, 0xA0, 0xFF, 0xAD, 0x18, 0x03, 0xAE, 0x1C, 0x03, 0x8D, 0x00, 0xD2, 0x8E, 0x01, 0xD2, 0xAD,
396 0x19, 0x03, 0xAE, 0x1D, 0x03, 0x8D, 0x02, 0xD2, 0x8E, 0x03, 0xD2, 0xAD, 0x1A, 0x03, 0xAE, 0x1E,
397 0x03, 0x8D, 0x04, 0xD2, 0x8E, 0x05, 0xD2, 0xAD, 0x1B, 0x03, 0xAE, 0x1F, 0x03, 0x8D, 0x06, 0xD2,
398 0x8E, 0x07, 0xD2, 0x8C, 0x08, 0xD2, 0x60
399};
400static const unsigned char rmt8_obx[] = {
401 0xFF, 0xFF, 0x90, 0x03, 0x6C, 0x0C, 0x80, 0x00, 0x80, 0x20, 0x80, 0x40, 0x00, 0xC0, 0x80, 0x80,
402 0x80, 0xA0, 0x00, 0xC0, 0x40, 0xC0, 0x00, 0x01, 0x05, 0x0B, 0x15, 0x00, 0x01, 0xFF, 0xFF, 0x01,
403 0x01, 0x00, 0xFF, 0xFF, 0x00, 0x01, 0x01, 0x01, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x01, 0x01,
404 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF2, 0x33, 0x96, 0xE2, 0x38, 0x8C, 0x00, 0x6A, 0xE8, 0x6A,
405 0xEF, 0x80, 0x08, 0xAE, 0x46, 0xE6, 0x95, 0x41, 0xF6, 0xB0, 0x6E, 0x30, 0xF6, 0xBB, 0x84, 0x52,
406 0x22, 0xF4, 0xC8, 0xA0, 0x7A, 0x55, 0x34, 0x14, 0xF5, 0xD8, 0xBD, 0xA4, 0x8D, 0x77, 0x60, 0x4E,
407 0x38, 0x27, 0x15, 0x06, 0xF7, 0xE8, 0xDB, 0xCF, 0xC3, 0xB8, 0xAC, 0xA2, 0x9A, 0x90, 0x88, 0x7F,
408 0x78, 0x70, 0x6A, 0x64, 0x5E, 0x00, 0xBF, 0xB6, 0xAA, 0xA1, 0x98, 0x8F, 0x89, 0x80, 0xF2, 0xE6,
409 0xDA, 0xCE, 0xBF, 0xB6, 0xAA, 0xA1, 0x98, 0x8F, 0x89, 0x80, 0x7A, 0x71, 0x6B, 0x65, 0x5F, 0x5C,
410 0x56, 0x50, 0x4D, 0x47, 0x44, 0x3E, 0x3C, 0x38, 0x35, 0x32, 0x2F, 0x2D, 0x2A, 0x28, 0x25, 0x23,
411 0x21, 0x1F, 0x1D, 0x1C, 0x1A, 0x18, 0x17, 0x16, 0x14, 0x13, 0x12, 0x11, 0x10, 0x0F, 0x0E, 0x0D,
412 0x0C, 0x0B, 0x0A, 0x09, 0x08, 0x07, 0xFF, 0xF1, 0xE4, 0xD8, 0xCA, 0xC0, 0xB5, 0xAB, 0xA2, 0x99,
413 0x8E, 0x87, 0x7F, 0x79, 0x73, 0x70, 0x66, 0x61, 0x5A, 0x55, 0x52, 0x4B, 0x48, 0x43, 0x3F, 0x3C,
414 0x39, 0x37, 0x33, 0x30, 0x2D, 0x2A, 0x28, 0x25, 0x24, 0x21, 0x1F, 0x1E, 0x1C, 0x1B, 0x19, 0x17,
415 0x16, 0x15, 0x13, 0x12, 0x11, 0x10, 0x0F, 0x0E, 0x0D, 0x0C, 0x0B, 0x0A, 0x09, 0x08, 0x07, 0x06,
416 0x05, 0x04, 0x03, 0x02, 0x01, 0x00, 0xF3, 0xE6, 0xD9, 0xCC, 0xC1, 0xB5, 0xAD, 0xA2, 0x99, 0x90,
417 0x88, 0x80, 0x79, 0x72, 0x6C, 0x66, 0x60, 0x5B, 0x55, 0x51, 0x4C, 0x48, 0x44, 0x40, 0x3C, 0x39,
418 0x35, 0x32, 0x2F, 0x2D, 0x2A, 0x28, 0x25, 0x23, 0x21, 0x1F, 0x1D, 0x1C, 0x1A, 0x18, 0x17, 0x16,
419 0x14, 0x13, 0x12, 0x11, 0x10, 0x0F, 0x0E, 0x0D, 0x0C, 0x0B, 0x0A, 0x09, 0x08, 0x07, 0x06, 0x05,
420 0x04, 0x03, 0x02, 0x01, 0x00, 0x00, 0x0D, 0x0D, 0x0C, 0x0B, 0x0B, 0x0A, 0x0A, 0x09, 0x08, 0x08,
421 0x07, 0x07, 0x07, 0x06, 0x06, 0x05, 0x05, 0x05, 0x04, 0x04, 0x04, 0x04, 0x03, 0x03, 0x03, 0x03,
422 0x03, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
423 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
424 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
425 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01,
426 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
427 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02,
428 0x02, 0x02, 0x02, 0x03, 0x03, 0x03, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02,
429 0x03, 0x03, 0x03, 0x03, 0x04, 0x04, 0x00, 0x00, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x03, 0x03,
430 0x03, 0x04, 0x04, 0x04, 0x05, 0x05, 0x00, 0x00, 0x01, 0x01, 0x02, 0x02, 0x02, 0x03, 0x03, 0x04,
431 0x04, 0x04, 0x05, 0x05, 0x06, 0x06, 0x00, 0x00, 0x01, 0x01, 0x02, 0x02, 0x03, 0x03, 0x04, 0x04,
432 0x05, 0x05, 0x06, 0x06, 0x07, 0x07, 0x00, 0x01, 0x01, 0x02, 0x02, 0x03, 0x03, 0x04, 0x04, 0x05,
433 0x05, 0x06, 0x06, 0x07, 0x07, 0x08, 0x00, 0x01, 0x01, 0x02, 0x02, 0x03, 0x04, 0x04, 0x05, 0x05,
434 0x06, 0x07, 0x07, 0x08, 0x08, 0x09, 0x00, 0x01, 0x01, 0x02, 0x03, 0x03, 0x04, 0x05, 0x05, 0x06,
435 0x07, 0x07, 0x08, 0x09, 0x09, 0x0A, 0x00, 0x01, 0x01, 0x02, 0x03, 0x04, 0x04, 0x05, 0x06, 0x07,
436 0x07, 0x08, 0x09, 0x0A, 0x0A, 0x0B, 0x00, 0x01, 0x02, 0x02, 0x03, 0x04, 0x05, 0x06, 0x06, 0x07,
437 0x08, 0x09, 0x0A, 0x0A, 0x0B, 0x0C, 0x00, 0x01, 0x02, 0x03, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08,
438 0x09, 0x0A, 0x0A, 0x0B, 0x0C, 0x0D, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x07, 0x08,
439 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09,
440 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x4C, 0x0F, 0x06, 0x4C, 0x09, 0x08, 0x4C, 0x2E, 0x08, 0x4C,
441 0x5C, 0x06, 0x4C, 0x02, 0x0C, 0x86, 0xD3, 0x84, 0xD4, 0x48, 0xA0, 0x00, 0x98, 0x99, 0x00, 0x02,
442 0x99, 0x4C, 0x02, 0xC8, 0xD0, 0xF7, 0xA0, 0x04, 0xB1, 0xD3, 0x8D, 0x22, 0x08, 0xC8, 0xB1, 0xD3,
443 0x8D, 0x48, 0x03, 0xC8, 0xB1, 0xD3, 0x8D, 0x12, 0x08, 0x8D, 0x4A, 0x03, 0xA0, 0x08, 0xB1, 0xD3,
444 0x99, 0xC3, 0x00, 0xC8, 0xC0, 0x10, 0xD0, 0xF6, 0x68, 0x48, 0x0A, 0x0A, 0x0A, 0x18, 0x65, 0xD1,
445 0x85, 0xD1, 0x68, 0x08, 0x29, 0xE0, 0x0A, 0x2A, 0x2A, 0x2A, 0x28, 0x65, 0xD2, 0x85, 0xD2, 0x20,
446 0x7B, 0x06, 0xA9, 0x00, 0x8D, 0x08, 0xD2, 0x8D, 0x18, 0xD2, 0xA0, 0x03, 0x8C, 0x0F, 0xD2, 0x8C,
447 0x1F, 0xD2, 0xA0, 0x08, 0x99, 0x00, 0xD2, 0x99, 0x10, 0xD2, 0x88, 0x10, 0xF7, 0xAD, 0x12, 0x08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9, 0x01, 0xD0, 0x21, 0xBD, 0x38, 0x02, 0x18, 0x7D,
482 0xD8, 0x02, 0x18, 0xBC, 0xC0, 0x02, 0x79, 0xA5, 0x03, 0x9D, 0x38, 0x02, 0xC8, 0x98, 0xDD, 0xD0,
483 0x02, 0xD0, 0x03, 0xBD, 0xC8, 0x02, 0x9D, 0xC0, 0x02, 0x4C, 0xB9, 0x08, 0xDE, 0xB8, 0x02, 0xBC,
484 0x00, 0x03, 0xC0, 0x0D, 0x90, 0x3C, 0xBD, 0x10, 0x03, 0x10, 0x31, 0x98, 0xDD, 0xF8, 0x02, 0xD0,
485 0x08, 0xBD, 0x08, 0x03, 0x9D, 0xF8, 0x02, 0xD0, 0x03, 0xFE, 0xF8, 0x02, 0xBD, 0x70, 0x02, 0x85,
486 0xD7, 0xBD, 0x78, 0x02, 0x85, 0xD8, 0xBC, 0xF8, 0x02, 0xB1, 0xD7, 0xBC, 0xE8, 0x02, 0xF0, 0x04,
487 0x18, 0x7D, 0xF0, 0x02, 0x9D, 0xF0, 0x02, 0xBD, 0xE0, 0x02, 0x29, 0x3F, 0x38, 0xE9, 0x01, 0x9D,
488 0x10, 0x03, 0xBD, 0x98, 0x02, 0x10, 0x1F, 0xBD, 0x28, 0x02, 0xF0, 0x1A, 0xDD, 0xB0, 0x02, 0xF0,
489 0x15, 0x90, 0x13, 0xA8, 0xBD, 0xA8, 0x02, 0x18, 0x7D, 0xA0, 0x02, 0x9D, 0xA8, 0x02, 0x90, 0x06,
490 0x98, 0xE9, 0x10, 0x9D, 0x28, 0x02, 0xA9, 0x00, 0x85, 0xDD, 0xA5, 0xDA, 0x9D, 0x18, 0x03, 0x29,
491 0x70, 0x4A, 0x4A, 0x8D, 0x31, 0x09, 0x90, 0xFE, 0x4C, 0xE7, 0x09, 0xEA, 0x4C, 0x51, 0x09, 0xEA,
492 0x4C, 0x56, 0x09, 0xEA, 0x4C, 0x60, 0x09, 0xEA, 0x4C, 0x6C, 0x09, 0xEA, 0x4C, 0x7B, 0x09, 0xEA,
493 0x4C, 0xBE, 0x09, 0xEA, 0x4C, 0xCD, 0x09, 0xA5, 0xDB, 0x4C, 0x2A, 0x0A, 0xA5, 0xDB, 0x85, 0xDD,
494 0xBD, 0x20, 0x02, 0x4C, 0xED, 0x09, 0xBD, 0x20, 0x02, 0x18, 0x65, 0xDB, 0x9D, 0x20, 0x02, 0x4C,
495 0xED, 0x09, 0xBD, 0x38, 0x02, 0x18, 0x65, 0xDB, 0x9D, 0x38, 0x02, 0xBD, 0x20, 0x02, 0x4C, 0xED,
496 0x09, 0xBD, 0xE0, 0x02, 0x10, 0x0C, 0xBC, 0x20, 0x02, 0xB1, 0xD5, 0x18, 0x7D, 0xF0, 0x02, 0x4C,
497 0x9C, 0x09, 0xBD, 0x20, 0x02, 0x18, 0x7D, 0xF0, 0x02, 0xC9, 0x3D, 0x90, 0x02, 0xA9, 0x3F, 0xA8,
498 0xB1, 0xD5, 0x9D, 0x40, 0x02, 0xA4, 0xDB, 0xD0, 0x03, 0x9D, 0x48, 0x02, 0x98, 0x4A, 0x4A, 0x4A,
499 0x4A, 0x9D, 0x50, 0x02, 0x9D, 0x58, 0x02, 0xA5, 0xDB, 0x29, 0x0F, 0x9D, 0x60, 0x02, 0xBD, 0x20,
500 0x02, 0x4C, 0xED, 0x09, 0xA5, 0xDB, 0x18, 0x7D, 0x28, 0x03, 0x9D, 0x28, 0x03, 0xBD, 0x20, 0x02,
501 0x4C, 0xED, 0x09, 0xA5, 0xDB, 0xC9, 0x80, 0xF0, 0x06, 0x9D, 0x20, 0x02, 0x4C, 0xED, 0x09, 0xBD,
502 0x38, 0x03, 0x09, 0xF0, 0x9D, 0x38, 0x03, 0xBD, 0x20, 0x02, 0x4C, 0xED, 0x09, 0xBD, 0x20, 0x02,
503 0x18, 0x65, 0xDB, 0xBC, 0xE0, 0x02, 0x30, 0x1F, 0x18, 0x7D, 0xF0, 0x02, 0xC9, 0x3D, 0x90, 0x07,
504 0xA9, 0x00, 0x9D, 0x38, 0x03, 0xA9, 0x3F, 0x9D, 0x20, 0x03, 0xA8, 0xB1, 0xD5, 0x18, 0x7D, 0x38,
505 0x02, 0x18, 0x65, 0xDD, 0x4C, 0x2A, 0x0A, 0xC9, 0x3D, 0x90, 0x07, 0xA9, 0x00, 0x9D, 0x38, 0x03,
506 0xA9, 0x3F, 0xA8, 0xBD, 0x38, 0x02, 0x18, 0x7D, 0xF0, 0x02, 0x18, 0x71, 0xD5, 0x18, 0x65, 0xDD,
507 0x9D, 0x30, 0x03, 0xBD, 0x58, 0x02, 0xF0, 0x32, 0xDE, 0x58, 0x02, 0xD0, 0x2D, 0xBD, 0x50, 0x02,
508 0x9D, 0x58, 0x02, 0xBD, 0x48, 0x02, 0xDD, 0x40, 0x02, 0xF0, 0x1F, 0xB0, 0x0D, 0x7D, 0x60, 0x02,
509 0xB0, 0x12, 0xDD, 0x40, 0x02, 0xB0, 0x0D, 0x4C, 0x61, 0x0A, 0xFD, 0x60, 0x02, 0x90, 0x05, 0xDD,
510 0x40, 0x02, 0xB0, 0x03, 0xBD, 0x40, 0x02, 0x9D, 0x48, 0x02, 0xA5, 0xDA, 0x29, 0x01, 0xF0, 0x0A,
511 0xBD, 0x48, 0x02, 0x18, 0x7D, 0x38, 0x02, 0x9D, 0x30, 0x03, 0xCA, 0x30, 0x03, 0x4C, 0x34, 0x08,
512 0xAD, 0x40, 0x03, 0x0D, 0x41, 0x03, 0x0D, 0x42, 0x03, 0x0D, 0x43, 0x03, 0xAA, 0x8E, 0x65, 0x0C,
513 0xAD, 0x18, 0x03, 0x10, 0x21, 0xAD, 0x38, 0x03, 0x29, 0x0F, 0xF0, 0x1A, 0xAD, 0x30, 0x03, 0x18,
514 0x6D, 0x28, 0x03, 0x8D, 0x32, 0x03, 0xAD, 0x3A, 0x03, 0x29, 0x10, 0xD0, 0x05, 0xA9, 0x00, 0x8D,
515 0x3A, 0x03, 0x8A, 0x09, 0x04, 0xAA, 0xAD, 0x19, 0x03, 0x10, 0x21, 0xAD, 0x39, 0x03, 0x29, 0x0F,
516 0xF0, 0x1A, 0xAD, 0x31, 0x03, 0x18, 0x6D, 0x29, 0x03, 0x8D, 0x33, 0x03, 0xAD, 0x3B, 0x03, 0x29,
517 0x10, 0xD0, 0x05, 0xA9, 0x00, 0x8D, 0x3B, 0x03, 0x8A, 0x09, 0x02, 0xAA, 0xEC, 0x65, 0x0C, 0xD0,
518 0x5E, 0xAD, 0x19, 0x03, 0x29, 0x0E, 0xC9, 0x06, 0xD0, 0x26, 0xAD, 0x39, 0x03, 0x29, 0x0F, 0xF0,
519 0x1F, 0xAC, 0x21, 0x03, 0xB9, 0xC0, 0x03, 0x8D, 0x30, 0x03, 0xB9, 0xC0, 0x04, 0x8D, 0x31, 0x03,
520 0xAD, 0x38, 0x03, 0x29, 0x10, 0xD0, 0x05, 0xA9, 0x00, 0x8D, 0x38, 0x03, 0x8A, 0x09, 0x50, 0xAA,
521 0xAD, 0x1B, 0x03, 0x29, 0x0E, 0xC9, 0x06, 0xD0, 0x26, 0xAD, 0x3B, 0x03, 0x29, 0x0F, 0xF0, 0x1F,
522 0xAC, 0x23, 0x03, 0xB9, 0xC0, 0x03, 0x8D, 0x32, 0x03, 0xB9, 0xC0, 0x04, 0x8D, 0x33, 0x03, 0xAD,
523 0x3A, 0x03, 0x29, 0x10, 0xD0, 0x05, 0xA9, 0x00, 0x8D, 0x3A, 0x03, 0x8A, 0x09, 0x28, 0xAA, 0x8E,
524 0x65, 0x0C, 0xAD, 0x44, 0x03, 0x0D, 0x45, 0x03, 0x0D, 0x46, 0x03, 0x0D, 0x47, 0x03, 0xAA, 0x8E,
525 0x03, 0x0C, 0xAD, 0x1C, 0x03, 0x10, 0x21, 0xAD, 0x3C, 0x03, 0x29, 0x0F, 0xF0, 0x1A, 0xAD, 0x34,
526 0x03, 0x18, 0x6D, 0x2C, 0x03, 0x8D, 0x36, 0x03, 0xAD, 0x3E, 0x03, 0x29, 0x10, 0xD0, 0x05, 0xA9,
527 0x00, 0x8D, 0x3E, 0x03, 0x8A, 0x09, 0x04, 0xAA, 0xAD, 0x1D, 0x03, 0x10, 0x21, 0xAD, 0x3D, 0x03,
528 0x29, 0x0F, 0xF0, 0x1A, 0xAD, 0x35, 0x03, 0x18, 0x6D, 0x2D, 0x03, 0x8D, 0x37, 0x03, 0xAD, 0x3F,
529 0x03, 0x29, 0x10, 0xD0, 0x05, 0xA9, 0x00, 0x8D, 0x3F, 0x03, 0x8A, 0x09, 0x02, 0xAA, 0xEC, 0x03,
530 0x0C, 0xD0, 0x5E, 0xAD, 0x1D, 0x03, 0x29, 0x0E, 0xC9, 0x06, 0xD0, 0x26, 0xAD, 0x3D, 0x03, 0x29,
531 0x0F, 0xF0, 0x1F, 0xAC, 0x25, 0x03, 0xB9, 0xC0, 0x03, 0x8D, 0x34, 0x03, 0xB9, 0xC0, 0x04, 0x8D,
532 0x35, 0x03, 0xAD, 0x3C, 0x03, 0x29, 0x10, 0xD0, 0x05, 0xA9, 0x00, 0x8D, 0x3C, 0x03, 0x8A, 0x09,
533 0x50, 0xAA, 0xAD, 0x1F, 0x03, 0x29, 0x0E, 0xC9, 0x06, 0xD0, 0x26, 0xAD, 0x3F, 0x03, 0x29, 0x0F,
534 0xF0, 0x1F, 0xAC, 0x27, 0x03, 0xB9, 0xC0, 0x03, 0x8D, 0x36, 0x03, 0xB9, 0xC0, 0x04, 0x8D, 0x37,
535 0x03, 0xAD, 0x3E, 0x03, 0x29, 0x10, 0xD0, 0x05, 0xA9, 0x00, 0x8D, 0x3E, 0x03, 0x8A, 0x09, 0x28,
536 0xAA, 0x8E, 0x03, 0x0C, 0xAD, 0x4A, 0x03, 0x60, 0xA0, 0xFF, 0xAD, 0x34, 0x03, 0xAE, 0x30, 0x03,
537 0x8D, 0x10, 0xD2, 0x8E, 0x00, 0xD2, 0xAD, 0x3C, 0x03, 0xAE, 0x38, 0x03, 0x8D, 0x11, 0xD2, 0x8E,
538 0x01, 0xD2, 0xAD, 0x35, 0x03, 0xAE, 0x31, 0x03, 0x8D, 0x12, 0xD2, 0x8E, 0x02, 0xD2, 0xAD, 0x3D,
539 0x03, 0xAE, 0x39, 0x03, 0x8D, 0x13, 0xD2, 0x8E, 0x03, 0xD2, 0xAD, 0x36, 0x03, 0xAE, 0x32, 0x03,
540 0x8D, 0x14, 0xD2, 0x8E, 0x04, 0xD2, 0xAD, 0x3E, 0x03, 0xAE, 0x3A, 0x03, 0x8D, 0x15, 0xD2, 0x8E,
541 0x05, 0xD2, 0xAD, 0x37, 0x03, 0xAE, 0x33, 0x03, 0x8D, 0x16, 0xD2, 0x8E, 0x06, 0xD2, 0xAD, 0x3F,
542 0x03, 0xAE, 0x3B, 0x03, 0x8D, 0x17, 0xD2, 0x8E, 0x07, 0xD2, 0xA9, 0xFF, 0x8C, 0x18, 0xD2, 0x8D,
543 0x08, 0xD2, 0x60
544};
545static const unsigned char tmc_obx[] = {
546 0xFF, 0xFF, 0x00, 0x05, 0x68, 0x0F, 0x4C, 0xCE, 0x0D, 0x4C, 0xD0, 0x08, 0x4C, 0xEF, 0x09, 0x0F,
547 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
548 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
549 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
550 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
551 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
552 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02,
553 0x02, 0x02, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x03,
554 0x03, 0x03, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x03, 0x03, 0x03, 0x03,
555 0x04, 0x04, 0x00, 0x00, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x03, 0x03, 0x03, 0x04, 0x04, 0x04,
556 0x05, 0x05, 0x00, 0x00, 0x01, 0x01, 0x02, 0x02, 0x02, 0x03, 0x03, 0x04, 0x04, 0x04, 0x05, 0x05,
557 0x06, 0x06, 0x00, 0x00, 0x01, 0x01, 0x02, 0x02, 0x03, 0x03, 0x04, 0x04, 0x05, 0x05, 0x06, 0x06,
558 0x07, 0x07, 0x00, 0x01, 0x01, 0x02, 0x02, 0x03, 0x03, 0x04, 0x04, 0x05, 0x05, 0x06, 0x06, 0x07,
559 0x07, 0x08, 0x00, 0x01, 0x01, 0x02, 0x02, 0x03, 0x04, 0x04, 0x05, 0x05, 0x06, 0x07, 0x07, 0x08,
560 0x08, 0x09, 0x00, 0x01, 0x01, 0x02, 0x03, 0x03, 0x04, 0x05, 0x05, 0x06, 0x07, 0x07, 0x08, 0x09,
561 0x09, 0x0A, 0x00, 0x01, 0x01, 0x02, 0x03, 0x04, 0x04, 0x05, 0x06, 0x07, 0x07, 0x08, 0x09, 0x0A,
562 0x0A, 0x0B, 0x00, 0x01, 0x02, 0x02, 0x03, 0x04, 0x05, 0x06, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0A,
563 0x0B, 0x0C, 0x00, 0x01, 0x02, 0x03, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0A, 0x0B,
564 0x0C, 0x0D, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C,
565 0x0D, 0x0E, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D,
566 0x0E, 0x0F, 0x00, 0xF1, 0xE4, 0xD7, 0xCB, 0xC0, 0xB5, 0xAA, 0xA1, 0x98, 0x8F, 0x87, 0x7F, 0x78,
567 0x72, 0x6B, 0x65, 0x5F, 0x5A, 0x55, 0x50, 0x4B, 0x47, 0x43, 0x3F, 0x3C, 0x38, 0x35, 0x32, 0x2F,
568 0x2C, 0x2A, 0x27, 0x25, 0x23, 0x21, 0x1F, 0x1D, 0x1C, 0x1A, 0x18, 0x17, 0x16, 0x14, 0x13, 0x12,
569 0x11, 0x10, 0x0F, 0x0E, 0x0D, 0x0C, 0x0B, 0x0A, 0x09, 0x08, 0x07, 0x06, 0x05, 0x04, 0x03, 0x02,
570 0x01, 0x00, 0x00, 0xF2, 0xE6, 0xDA, 0xCE, 0xBF, 0xB6, 0xAA, 0xA1, 0x98, 0x8F, 0x89, 0x80, 0x7A,
571 0x71, 0x6B, 0x65, 0x5F, 0x5C, 0x56, 0x50, 0x4D, 0x47, 0x44, 0x3E, 0x3C, 0x38, 0x35, 0x32, 0x2F,
572 0x2D, 0x2A, 0x28, 0x25, 0x23, 0x21, 0x1F, 0x1D, 0x1C, 0x1A, 0x18, 0x17, 0x16, 0x14, 0x13, 0x12,
573 0x11, 0x10, 0x0F, 0x0E, 0x0D, 0x0C, 0x0B, 0x0A, 0x09, 0x08, 0x07, 0x06, 0x05, 0x04, 0x03, 0x02,
574 0x01, 0x00, 0x00, 0xFF, 0xF1, 0xE4, 0xD8, 0xCA, 0xC0, 0xB5, 0xAB, 0xA2, 0x99, 0x8E, 0x87, 0x7F,
575 0x79, 0x73, 0x70, 0x66, 0x61, 0x5A, 0x55, 0x52, 0x4B, 0x48, 0x43, 0x3F, 0x3C, 0x39, 0x37, 0x33,
576 0x30, 0x2D, 0x2A, 0x28, 0x25, 0x24, 0x21, 0x1F, 0x1E, 0x1C, 0x1B, 0x19, 0x17, 0x16, 0x15, 0x13,
577 0x12, 0x11, 0x10, 0x0F, 0x0E, 0x0D, 0x0C, 0x0B, 0x0A, 0x09, 0x08, 0x07, 0x06, 0x05, 0x04, 0x03,
578 0x02, 0x01, 0x00, 0xF3, 0xE6, 0xD9, 0xCC, 0xC1, 0xB5, 0xAD, 0xA2, 0x99, 0x90, 0x88, 0x80, 0x79,
579 0x72, 0x6C, 0x66, 0x60, 0x5B, 0x55, 0x51, 0x4C, 0x48, 0x44, 0x40, 0x3C, 0x39, 0x35, 0x32, 0x2F,
580 0x2D, 0x2A, 0x28, 0x25, 0x23, 0x21, 0x1F, 0x1D, 0x1C, 0x1A, 0x18, 0x17, 0x16, 0x14, 0x13, 0x12,
581 0x11, 0x10, 0x0F, 0x0E, 0x0D, 0x0C, 0x0B, 0x0A, 0x09, 0x08, 0x07, 0x06, 0x05, 0x04, 0x03, 0x02,
582 0x01, 0x00, 0x00, 0xF2, 0x33, 0x96, 0xE2, 0x38, 0x8C, 0x00, 0x6A, 0xE8, 0x6A, 0xEF, 0x80, 0x08,
583 0xAE, 0x46, 0xE6, 0x95, 0x41, 0xF6, 0xB0, 0x6E, 0x30, 0xF6, 0xBB, 0x84, 0x52, 0x22, 0xF4, 0xC8,
584 0xA0, 0x7A, 0x55, 0x34, 0x14, 0xF5, 0xD8, 0xBD, 0xA4, 0x8D, 0x77, 0x60, 0x4E, 0x38, 0x27, 0x15,
585 0x06, 0xF7, 0xE8, 0xDB, 0xCF, 0xC3, 0xB8, 0xAC, 0xA2, 0x9A, 0x90, 0x88, 0x7F, 0x78, 0x70, 0x6A,
586 0x64, 0x5E, 0x00, 0x0D, 0x0D, 0x0C, 0x0B, 0x0B, 0x0A, 0x0A, 0x09, 0x08, 0x08, 0x07, 0x07, 0x07,
587 0x06, 0x06, 0x05, 0x05, 0x05, 0x04, 0x04, 0x04, 0x04, 0x03, 0x03, 0x03, 0x03, 0x03, 0x02, 0x02,
588 0x02, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
589 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
590 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
591 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
592 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
593 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
594 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
595 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
596 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
597 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
598 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
599 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
600 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
601 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
602 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
603 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
604 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
605 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x05,
606 0x06, 0x07, 0x00, 0x01, 0x02, 0x03, 0x04, 0x02, 0x00, 0x00, 0x04, 0x02, 0x00, 0x00, 0x00, 0x10,
607 0x00, 0x08, 0x00, 0x10, 0x00, 0x08, 0xAD, 0xB7, 0x08, 0xF0, 0x5E, 0xAD, 0xB6, 0x08, 0xC9, 0x40,
608 0x90, 0x5A, 0xCE, 0xB5, 0x08, 0xF0, 0x03, 0x4C, 0xEF, 0x09, 0xA2, 0x07, 0xA9, 0x00, 0x9D, 0xC4,
609 0x07, 0x9D, 0xCC, 0x07, 0xCA, 0x10, 0xF7, 0x8D, 0xB6, 0x08, 0xAA, 0xA0, 0x0F, 0xB1, 0xFE, 0x10,
610 0x20, 0x88, 0xB1, 0xFE, 0x10, 0x03, 0x4C, 0x5F, 0x0E, 0x86, 0xFC, 0x0A, 0x0A, 0x26, 0xFC, 0x0A,
611 0x26, 0xFC, 0x0A, 0x26, 0xFC, 0x69, 0x00, 0x85, 0xFE, 0xA5, 0xFC, 0x69, 0x00, 0x85, 0xFF, 0x90,
612 0xDA, 0x9D, 0xD4, 0x07, 0x88, 0xB1, 0x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, 0x84, 0xFC, 0x86, 0xFD,
691 0xA0, 0x1E, 0xB1, 0xFC, 0x8D, 0xB4, 0x08, 0xA5, 0xFC, 0x18, 0x69, 0x20, 0x8D, 0xC2, 0x0E, 0x90,
692 0x01, 0xE8, 0x8E, 0xC3, 0x0E, 0x18, 0x69, 0x40, 0x8D, 0xCA, 0x0E, 0x90, 0x01, 0xE8, 0x8E, 0xCB,
693 0x0E, 0x18, 0x69, 0x40, 0x8D, 0x52, 0x09, 0x90, 0x01, 0xE8, 0x8E, 0x53, 0x09, 0x18, 0x69, 0x80,
694 0x8D, 0x57, 0x09, 0x90, 0x01, 0xE8, 0x8E, 0x58, 0x09, 0x18, 0x69, 0x80, 0x85, 0xFE, 0x8D, 0x10,
695 0x09, 0x8D, 0x88, 0x0D, 0x8D, 0xB7, 0x0D, 0x90, 0x01, 0xE8, 0x86, 0xFF, 0x8E, 0x16, 0x09, 0x8E,
696 0x8C, 0x0D, 0x8E, 0xBD, 0x0D, 0xA0, 0x07, 0xA9, 0x00, 0x8D, 0xB7, 0x08, 0x99, 0x00, 0xD2, 0x99,
697 0x10, 0xD2, 0x99, 0x0A, 0x05, 0x99, 0xFC, 0x07, 0x99, 0x04, 0x08, 0x99, 0x32, 0x05, 0x99, 0xBC,
698 0x07, 0x88, 0x10, 0xE8, 0x8D, 0x08, 0xD2, 0x8D, 0x18, 0xD2, 0x8D, 0x3A, 0x05, 0x8D, 0x3B, 0x05,
699 0x60, 0x9D, 0xFC, 0x07, 0x9D, 0x04, 0x08, 0x9D, 0x32, 0x05, 0xBD, 0xE4, 0x07, 0x9D, 0x22, 0x05,
700 0x60, 0x98, 0x49, 0xF0, 0x4A, 0x4A, 0x4A, 0x4A, 0x9D, 0x0C, 0x08, 0x98, 0x29, 0x0F, 0x49, 0x0F,
701 0x9D, 0x14, 0x08, 0x60, 0x29, 0x07, 0x85, 0xFC, 0x8A, 0xA6, 0xFC, 0x29, 0x3F, 0xF0, 0xE2, 0x9D,
702 0xE4, 0x07, 0xA9, 0x00, 0x9D, 0xBC, 0x07, 0xB9, 0xFF, 0xFF, 0x9D, 0x1C, 0x08, 0x85, 0xFC, 0xB9,
703 0xFF, 0xFF, 0x9D, 0x24, 0x08, 0x85, 0xFD, 0x05, 0xFC, 0xF0, 0xB6, 0xA0, 0x4A, 0xB1, 0xFC, 0x9D,
704 0x34, 0x08, 0x9D, 0x44, 0x08, 0xC8, 0xB1, 0xFC, 0x9D, 0x3C, 0x08, 0x9D, 0x4C, 0x08, 0xC8, 0xB1,
705 0xFC, 0x29, 0x70, 0x4A, 0x4A, 0x9D, 0x54, 0x08, 0xB1, 0xFC, 0x29, 0x0F, 0x9D, 0x5C, 0x08, 0xB1,
706 0xFC, 0x10, 0x0B, 0xBD, 0x5C, 0x08, 0x49, 0xFF, 0x18, 0x69, 0x01, 0x9D, 0x5C, 0x08, 0xC8, 0xB1,
707 0xFC, 0x9D, 0x74, 0x08, 0xC8, 0xB1, 0xFC, 0x29, 0x3F, 0x9D, 0x7C, 0x08, 0x9D, 0x84, 0x08, 0xC8,
708 0xB1, 0xFC, 0x29, 0x80, 0xF0, 0x02, 0xA9, 0x01, 0x9D, 0xAC, 0x08, 0xB1, 0xFC, 0x29, 0x70, 0x4A,
709 0x4A, 0x4A, 0x4A, 0x9D, 0x8C, 0x08, 0xD0, 0x03, 0x9D, 0xAC, 0x08, 0xB1, 0xFC, 0x29, 0x0F, 0x9D,
710 0x9C, 0x08, 0x9D, 0xA4, 0x08, 0x88, 0xB1, 0xFC, 0x29, 0xC0, 0x18, 0x7D, 0xE4, 0x07, 0x9D, 0xE4,
711 0x07, 0x9D, 0x22, 0x05, 0xA8, 0xB9, 0x3C, 0x06, 0x9D, 0xF4, 0x07, 0xA9, 0x00, 0x9D, 0x2C, 0x08,
712 0x9D, 0x64, 0x08, 0x9D, 0x6C, 0x08, 0x9D, 0x94, 0x08, 0xA9, 0x01, 0x9D, 0xBC, 0x07, 0x60
713};
714static const unsigned char tm2_obx[] = {
715 0xFF, 0xFF, 0x00, 0x02, 0x6B, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
716 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01,
717 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
718 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02,
719 0x02, 0x02, 0x02, 0x03, 0x03, 0x03, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02,
720 0x03, 0x03, 0x03, 0x03, 0x04, 0x04, 0x00, 0x00, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x03, 0x03,
721 0x03, 0x04, 0x04, 0x04, 0x05, 0x05, 0x00, 0x00, 0x01, 0x01, 0x02, 0x02, 0x02, 0x03, 0x03, 0x04,
722 0x04, 0x04, 0x05, 0x05, 0x06, 0x06, 0x00, 0x00, 0x01, 0x01, 0x02, 0x02, 0x03, 0x03, 0x04, 0x04,
723 0x05, 0x05, 0x06, 0x06, 0x07, 0x07, 0x00, 0x01, 0x01, 0x02, 0x02, 0x03, 0x03, 0x04, 0x04, 0x05,
724 0x05, 0x06, 0x06, 0x07, 0x07, 0x08, 0x00, 0x01, 0x01, 0x02, 0x02, 0x03, 0x04, 0x04, 0x05, 0x05,
725 0x06, 0x07, 0x07, 0x08, 0x08, 0x09, 0x00, 0x01, 0x01, 0x02, 0x03, 0x03, 0x04, 0x05, 0x05, 0x06,
726 0x07, 0x07, 0x08, 0x09, 0x09, 0x0A, 0x00, 0x01, 0x01, 0x02, 0x03, 0x04, 0x04, 0x05, 0x06, 0x07,
727 0x07, 0x08, 0x09, 0x0A, 0x0A, 0x0B, 0x00, 0x01, 0x02, 0x02, 0x03, 0x04, 0x05, 0x06, 0x06, 0x07,
728 0x08, 0x09, 0x0A, 0x0A, 0x0B, 0x0C, 0x00, 0x01, 0x02, 0x03, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08,
729 0x09, 0x0A, 0x0A, 0x0B, 0x0C, 0x0D, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x07, 0x08,
730 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09,
731 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x00, 0xF1, 0xE4, 0xD7, 0xCB, 0xC0, 0xB5, 0xAA, 0xA1, 0x98,
732 0x8F, 0x87, 0x7F, 0x78, 0x72, 0x6B, 0x65, 0x5F, 0x5A, 0x55, 0x50, 0x4B, 0x47, 0x43, 0x3F, 0x3C,
733 0x38, 0x35, 0x32, 0x2F, 0x2C, 0x2A, 0x27, 0x25, 0x23, 0x21, 0x1F, 0x1D, 0x1C, 0x1A, 0x18, 0x17,
734 0x16, 0x14, 0x13, 0x12, 0x11, 0x10, 0x0F, 0x0E, 0x0D, 0x0C, 0x0B, 0x0A, 0x09, 0x08, 0x07, 0x06,
735 0x05, 0x04, 0x03, 0x02, 0x01, 0x00, 0x00, 0xF2, 0xE9, 0xDA, 0xCE, 0xBF, 0xB6, 0xAA, 0xA1, 0x98,
736 0x8F, 0x89, 0x80, 0x7A, 0x71, 0x6B, 0x65, 0x5F, 0x5C, 0x56, 0x50, 0x4D, 0x47, 0x44, 0x3E, 0x3C,
737 0x38, 0x35, 0x32, 0x2F, 0x2D, 0x2A, 0x28, 0x25, 0x23, 0x21, 0x1F, 0x1D, 0x1C, 0x1A, 0x18, 0x17,
738 0x16, 0x14, 0x13, 0x12, 0x11, 0x10, 0x0F, 0x0E, 0x0D, 0x0C, 0x0B, 0x0A, 0x09, 0x08, 0x07, 0x06,
739 0x05, 0x04, 0x03, 0x02, 0x01, 0x00, 0x00, 0xFF, 0xF1, 0xE4, 0xD8, 0xCA, 0xC0, 0xB5, 0xAB, 0xA2,
740 0x99, 0x8E, 0x87, 0x7F, 0x79, 0x73, 0x70, 0x66, 0x61, 0x5A, 0x55, 0x52, 0x4B, 0x48, 0x43, 0x3F,
741 0x3C, 0x39, 0x37, 0x33, 0x30, 0x2D, 0x2A, 0x28, 0x25, 0x24, 0x21, 0x1F, 0x1E, 0x1C, 0x1B, 0x19,
742 0x17, 0x16, 0x15, 0x13, 0x12, 0x11, 0x10, 0x0F, 0x0E, 0x0D, 0x0C, 0x0B, 0x0A, 0x09, 0x08, 0x07,
743 0x06, 0x05, 0x04, 0x03, 0x02, 0x01, 0x00, 0xF3, 0xE6, 0xD9, 0xCC, 0xC1, 0xB5, 0xAD, 0xA2, 0x99,
744 0x90, 0x88, 0x80, 0x79, 0x72, 0x6C, 0x66, 0x60, 0x5B, 0x55, 0x51, 0x4C, 0x48, 0x44, 0x40, 0x3C,
745 0x39, 0x35, 0x32, 0x2F, 0x2D, 0x2A, 0x28, 0x25, 0x23, 0x21, 0x1F, 0x1D, 0x1C, 0x1A, 0x18, 0x17,
746 0x16, 0x14, 0x13, 0x12, 0x11, 0x10, 0x0F, 0x0E, 0x0D, 0x0C, 0x0B, 0x0A, 0x09, 0x08, 0x07, 0x06,
747 0x05, 0x04, 0x03, 0x02, 0x01, 0x00, 0xE2, 0x38, 0x8C, 0x00, 0x6A, 0xE8, 0x6A, 0xEF, 0x80, 0x08,
748 0xAE, 0x46, 0xE6, 0x95, 0x41, 0xF6, 0xB0, 0x6E, 0x30, 0xF6, 0xBB, 0x84, 0x52, 0x22, 0xF4, 0xC8,
749 0xA0, 0x7A, 0x55, 0x34, 0x14, 0xF5, 0xD8, 0xBD, 0xA4, 0x8D, 0x77, 0x60, 0x4E, 0x38, 0x27, 0x15,
750 0x06, 0xF7, 0xE8, 0xDB, 0xCF, 0xC3, 0xB8, 0xAC, 0xA2, 0x9A, 0x90, 0x88, 0x7F, 0x78, 0x70, 0x6A,
751 0x64, 0x5E, 0x57, 0x52, 0x32, 0x0A, 0x00, 0xF2, 0x33, 0x96, 0xE2, 0x38, 0x8C, 0x00, 0x6A, 0xE8,
752 0x6A, 0xEF, 0x80, 0x08, 0xAE, 0x46, 0xE6, 0x95, 0x41, 0xF6, 0xB0, 0x6E, 0x30, 0xF6, 0xBB, 0x84,
753 0x52, 0x22, 0xF4, 0xC8, 0xA0, 0x7A, 0x55, 0x34, 0x14, 0xF5, 0xD8, 0xBD, 0xA4, 0x8D, 0x77, 0x60,
754 0x4E, 0x38, 0x27, 0x15, 0x06, 0xF7, 0xE8, 0xDB, 0xCF, 0xC3, 0xB8, 0xAC, 0xA2, 0x9A, 0x90, 0x88,
755 0x7F, 0x78, 0x70, 0x6A, 0x64, 0x5E, 0x0B, 0x0B, 0x0A, 0x0A, 0x09, 0x08, 0x08, 0x07, 0x07, 0x07,
756 0x06, 0x06, 0x05, 0x05, 0x05, 0x04, 0x04, 0x04, 0x04, 0x03, 0x03, 0x03, 0x03, 0x03, 0x02, 0x02,
757 0x02, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
758 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
759 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0D, 0x0D, 0x0C, 0x0B, 0x0B, 0x0A, 0x0A, 0x09, 0x08,
760 0x08, 0x07, 0x07, 0x07, 0x06, 0x06, 0x05, 0x05, 0x05, 0x04, 0x04, 0x04, 0x04, 0x03, 0x03, 0x03,
761 0x03, 0x03, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
762 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
763 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xE4, 0x0D, 0x4C, 0xE3, 0x06, 0x4C, 0x9F, 0x08, 0x01,
764 0x10, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
765 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
766 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
767 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
768 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
769 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
770 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
771 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
772 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
773 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
774 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
775 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
776 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
777 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
778 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
779 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
780 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
781 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
782 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
783 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
784 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
785 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
786 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
787 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
788 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x05,
789 0x06, 0x07, 0x00, 0x01, 0x02, 0x03, 0x04, 0x02, 0x00, 0x00, 0x04, 0x02, 0x00, 0x00, 0x00, 0x10,
790 0x00, 0x08, 0x00, 0x10, 0x00, 0x08, 0x85, 0xD3, 0x81, 0xA9, 0x85, 0xD3, 0x81, 0xA9, 0x88, 0xB1,
791 0xFA, 0x8D, 0x17, 0x05, 0xA2, 0x00, 0x86, 0xFC, 0x0A, 0x26, 0xFC, 0x0A, 0x26, 0xFC, 0x0A, 0x26,
792 0xFC, 0x0A, 0x26, 0xFC, 0x6D, 0x17, 0x05, 0x90, 0x02, 0xE6, 0xFC, 0x18, 0x69, 0x00, 0x85, 0xFA,
793 0xA5, 0xFC, 0x69, 0x00, 0x85, 0xFB, 0x4C, 0x07, 0x07, 0x20, 0xB5, 0x09, 0xAD, 0x16, 0x05, 0xF0,
794 0x05, 0xCE, 0x1C, 0x05, 0x30, 0x03, 0x4C, 0xA2, 0x08, 0xCE, 0x1D, 0x05, 0xD0, 0x52, 0xA2, 0x00,
795 0xEE, 0x17, 0x05, 0xAD, 0x19, 0x05, 0x85, 0xFA, 0xAD, 0x1A, 0x05, 0x85, 0xFB, 0xA0, 0x10, 0xB1,
796 0xFA, 0x30, 0xAB, 0xD0, 0x03, 0x4C, 0x2C, 0x0F, 0x8D, 0x1D, 0x05, 0x88, 0xB1, 0xFA, 0x88, 0x84,
797 0xFC, 0xA8, 0xB9, 0xFF, 0xFF, 0x9D, 0x50, 0x05, 0xB9, 0xFF, 0xFF, 0x9D, 0x58, 0x05, 0xA9, 0x00,
798 0x9D, 0x70, 0x05, 0x9D, 0x60, 0x05, 0xA4, 0xFC, 0xB1, 0xFA, 0x9D, 0x68, 0x05, 0xE8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C, 0x57, 0x07, 0x20, 0xB5, 0x09, 0xA2, 0x07, 0xBD, 0x78, 0x05, 0xF0, 0x73, 0x4C,
822 0xD9, 0x0A, 0xBD, 0x0E, 0x05, 0xF0, 0x0E, 0xA9, 0x00, 0x9D, 0x20, 0x05, 0x9D, 0x28, 0x05, 0xCA,
823 0x10, 0xE8, 0x4C, 0x1F, 0x09, 0xA4, 0xFD, 0xB9, 0x00, 0x03, 0x18, 0x65, 0xFC, 0x9D, 0x38, 0x05,
824 0x98, 0x9D, 0xA0, 0x05, 0xBD, 0xB0, 0x05, 0x3D, 0xA8, 0x06, 0xF0, 0x28, 0xA5, 0xFD, 0x29, 0x7F,
825 0xA8, 0xB9, 0x00, 0x04, 0x18, 0x65, 0xFC, 0x9D, 0x37, 0x05, 0xB9, 0x80, 0x04, 0x69, 0x00, 0x9D,
826 0x38, 0x05, 0xA9, 0x00, 0x9D, 0x1F, 0x05, 0xBC, 0x98, 0x06, 0x99, 0x27, 0x05, 0xCA, 0xCA, 0x10,
827 0xA9, 0x4C, 0x1F, 0x09, 0xBD, 0xB0, 0x05, 0x3D, 0xA0, 0x06, 0xF0, 0x16, 0xBD, 0x68, 0x06, 0x18,
828 0x65, 0xFD, 0x9D, 0xA2, 0x05, 0xA8, 0xB9, 0x00, 0x03, 0x18, 0x65, 0xFC, 0x38, 0x65, 0xFE, 0x9D,
829 0x3A, 0x05, 0xCA, 0x10, 0x85, 0xE8, 0x86, 0xFC, 0xA2, 0x03, 0xAD, 0x09, 0x05, 0xF0, 0x06, 0x29,
830 0x40, 0xD0, 0x3C, 0xA2, 0x07, 0x8A, 0xA8, 0xB9, 0x20, 0x05, 0xD0, 0x0C, 0xBC, 0x98, 0x06, 0xB9,
831 0x28, 0x05, 0xD0, 0x04, 0x8A, 0xA8, 0xA9, 0x00, 0x19, 0xA8, 0x05, 0x9D, 0x30, 0x05, 0xB9, 0x38,
832 0x05, 0x9D, 0x48, 0x05, 0xB9, 0xA0, 0x05, 0x9D, 0x40,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0x05, 0xAA, 0x4A,
844 0x4A, 0x29, 0x01, 0xA8, 0xB9, 0x1E, 0x05, 0x8D, 0x28, 0xD2, 0x8A, 0x29, 0x04, 0xA8, 0xB9, 0x38,
845 0x05, 0x8D, 0x20, 0xD2, 0xBD, 0x20, 0x05, 0x8D, 0x21, 0xD2, 0xB9, 0x39, 0x05, 0x8D, 0x22, 0xD2,
846 0xBD, 0x21, 0x05, 0x8D, 0x23, 0xD2, 0xB9, 0x3A, 0x05, 0x8D, 0x24, 0xD2, 0xBD, 0x22, 0x05, 0x8D,
847 0x25, 0xD2, 0xB9, 0x3B, 0x05, 0x8D, 0x26, 0xD2, 0xBD, 0x23, 0x05, 0x8D, 0x27, 0xD2, 0xAD, 0x0B,
848 0x05, 0xAA, 0x4A, 0x4A, 0x29, 0x01, 0xA8, 0xB9, 0x1E, 0x05, 0x8D, 0x18, 0xD2, 0x8A, 0xAC, 0x09,
849 0x05, 0x10, 0x02, 0x29, 0x04, 0xA8, 0xB9, 0x38, 0x05, 0x8D, 0x10, 0xD2, 0xBD, 0x20, 0x05, 0x8D,
850 0x11, 0xD2, 0xB9, 0x39, 0x05, 0x8D, 0x12, 0xD2, 0xBD, 0x21, 0x05, 0x8D, 0x13, 0xD2, 0xB9, 0x3A,
851 0x05, 0x8D, 0x14, 0xD2, 0xBD, 0x22, 0x05, 0x8D, 0x15, 0xD2, 0xB9, 0x3B, 0x05, 0x8D, 0x16, 0xD2,
852 0xBD, 0x23, 0x05, 0x8D, 0x17, 0xD2, 0xAD, 0x0A, 0x05, 0xAA, 0x4A, 0x4A, 0x29, 0x01, 0xA8, 0xB9,
853 0x1E, 0x05, 0x8D, 0x08, 0xD2, 0x8A, 0xAC, 0x09, 0x05, 0x10, 0x02, 0x29, 0x04, 0xA8, 0xB9, 0x38,
854 0x05, 0x8D, 0x00, 0xD2, 0xBD, 0x20, 0x05, 0x8D, 0x01, 0xD2, 0xB9, 0x39, 0x05, 0x8D, 0x02, 0xD2,
855 0xBD, 0x21, 0x05, 0x8D, 0x03, 0xD2, 0xB9, 0x3A, 0x05, 0x8D, 0x04, 0xD2, 0xBD, 0x22, 0x05, 0x8D,
856 0x05, 0xD2, 0xB9, 0x3B, 0x05, 0x8D, 0x06, 0xD2, 0xBD, 0x23, 0x05, 0x8D, 0x07, 0xD2, 0x60, 0xBD,
857 0x80, 0x05, 0x85, 0xFA, 0xBD, 0x88, 0x05, 0x85, 0xFB, 0xBD, 0x80, 0x06, 0x85, 0xFC, 0xBD, 0x88,
858 0x06, 0x85, 0xFD, 0xBD, 0x90, 0x06, 0x85, 0xFE, 0xBD, 0xB8, 0x05, 0xDD, 0xC0, 0x05, 0x90, 0x0C,
859 0x9D, 0x08, 0x06, 0xBD, 0xC8, 0x05, 0x9D, 0xB8, 0x05, 0x4C, 0x0B, 0x0B, 0xBD, 0x08, 0x06, 0xF0,
860 0x30, 0xBD, 0xE8, 0x05, 0xF0, 0x13, 0xDE, 0xF8, 0x05, 0xD0, 0x0E, 0x9D, 0xF8, 0x05, 0xBD, 0xD8,
861 0x05, 0xF0, 0x06, 0x38, 0xE9, 0x10, 0x9D, 0xD8, 0x05, 0xBD, 0xF0, 0x05, 0xF0, 0x13, 0xDE, 0x00,
862 0x06, 0xD0, 0x0E, 0x9D, 0x00, 0x06, 0xBD, 0xE0, 0x05, 0xF0, 0x06, 0x38, 0xE9, 0x10, 0x9D, 0xE0,
863 0x05, 0xBC, 0x48, 0x06, 0xB1, 0xFA, 0x18, 0x7D, 0x98, 0x05, 0x18, 0x65, 0xFD, 0x85, 0xFD, 0xDE,
864 0x58, 0x06, 0x10, 0x39, 0xBD, 0x50, 0x06, 0x9D, 0x58, 0x06, 0xBD, 0x60, 0x06, 0xF0, 0x1E, 0x18,
865 0x7D, 0x48, 0x06, 0x9D, 0x48, 0x06, 0xF0, 0x0D, 0xDD, 0x40, 0x06, 0x90, 0x20, 0xA9, 0xFF, 0x9D,
866 0x60, 0x06, 0x4C, 0x87, 0x0B, 0xA9, 0x01, 0x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x16, 0x90, 0x0C, 0x90, 0x22, 0x90,
878 0x18, 0x90, 0x2E, 0x90, 0x24, 0x90, 0x32, 0x90, 0x34, 0x7D, 0x80, 0x06, 0x9D, 0x80, 0x06, 0xB1,
879 0xFA, 0x18, 0x65, 0xFC, 0x85, 0xFC, 0x4C, 0xAC, 0x08, 0x7D, 0x88, 0x06, 0x9D, 0x88, 0x06, 0xB1,
880 0xFA, 0x18, 0x65, 0xFD, 0x85, 0xFD, 0x4C, 0xAC, 0x08, 0x7D, 0x90, 0x06, 0x9D, 0x90, 0x06, 0xB1,
881 0xFA, 0x18, 0x65, 0xFE, 0x85, 0xFE, 0x4C, 0xAC, 0x08, 0x85, 0xFC, 0xA9, 0x00, 0x85, 0xFD, 0x4C,
882 0xAC, 0x08, 0xBD, 0x20, 0x06, 0x29, 0x03, 0x4A, 0x90, 0x0A, 0xD0, 0x19, 0xBD, 0x18, 0x06, 0x18,
883 0x65, 0xFC, 0x85, 0xFC, 0xDE, 0x38, 0x06, 0x10, 0x4E, 0xFE, 0x20, 0x06, 0xBD, 0x30, 0x06, 0x9D,
884 0x38, 0x06, 0x4C, 0xF7, 0x0B, 0xA5, 0xFC, 0xFD, 0x18, 0x06, 0x85, 0xFC, 0xDE, 0x38, 0x06, 0x10,
885 0x36, 0xFE, 0x20, 0x06, 0xBD, 0x30, 0x06, 0x9D, 0x38, 0x06, 0x4C, 0xF7, 0x0B, 0xBC, 0x20, 0x06,
886 0xBD, 0x18, 0x06, 0x30, 0x02, 0xC8, 0xC8, 0x88, 0x98, 0x18, 0x65, 0xFC, 0x85, 0xFC, 0xDE, 0x38,
887 0x06, 0x10, 0x14, 0x98, 0x9D, 0x20, 0x06, 0xDD, 0x18, 0x06, 0xD0, 0x05, 0x49, 0xFF, 0x9D, 0x18,
888 0x06, 0xBD, 0x30, 0x06, 0x9D, 0x38, 0x06, 0x4C, 0xF7, 0x0B, 0xBC, 0x20, 0x06, 0xBD, 0x18, 0x06,
889 0x30, 0x02, 0xC8, 0xC8, 0x88, 0x98, 0x18, 0x65, 0xFD, 0x85, 0xFD, 0xDE, 0x38, 0x06, 0x10, 0xE7,
890 0x98, 0x9D, 0x20, 0x06, 0xDD, 0x18, 0x06, 0xD0, 0xD8, 0x49, 0xFF, 0x9D, 0x18, 0x06, 0xBD, 0x30,
891 0x06, 0x9D, 0x38, 0x06, 0x4C, 0xF7, 0x0B, 0xBD, 0x20, 0x06, 0x18, 0x65, 0xFC, 0x85, 0xFC, 0xDE,
892 0x38, 0x06, 0x10, 0xC3, 0xBD, 0x18, 0x06, 0x18, 0x7D, 0x20, 0x06, 0x9D, 0x20, 0x06, 0xBD, 0x30,
893 0x06, 0x9D, 0x38, 0x06, 0x4C, 0xF7, 0x0B, 0xA5, 0xFD, 0x38, 0xFD, 0x20, 0x06, 0x85, 0xFD, 0xDE,
894 0x38, 0x06, 0x10, 0xA3, 0xBD, 0x18, 0x06, 0x18, 0x7D, 0x20, 0x06, 0x9D, 0x20, 0x06, 0xBD, 0x30,
895 0x06, 0x9D, 0x38, 0x06, 0x4C, 0xF7, 0x0B, 0xBD, 0x18, 0x06, 0x18, 0x65, 0xFC, 0x85, 0xFC, 0x4C,
896 0xF7, 0x0B, 0xA0, 0x10, 0xA9, 0x00, 0x85, 0xFA, 0xA9, 0x00, 0x85, 0xFB, 0xA9, 0x00, 0x8D, 0x17,
897 0x05, 0x8A, 0xF0, 0x3F, 0xB1, 0xFA, 0xF0, 0x02, 0x10, 0x01, 0xCA, 0xA9, 0x11, 0x18, 0x65, 0xFA,
898 0x85, 0xFA, 0x90, 0x02, 0xE6, 0xFB, 0xEE, 0x17, 0x05, 0xD0, 0xE6, 0xA2, 0x00, 0xA9, 0x00, 0x85,
899 0xFC, 0x8A, 0x8D, 0x17, 0x05, 0x0A, 0x26, 0xFC, 0x0A, 0x26, 0xFC, 0x0A, 0x26, 0xFC, 0x0A, 0x26,
900 0xFC, 0x6D, 0x17, 0x05, 0x90, 0x02, 0xE6, 0xFC, 0x18, 0x69, 0x00, 0x85, 0xFA, 0xA5, 0xFC, 0x69,
901 0x00, 0x85, 0xFB, 0x20, 0x2C, 0x0F, 0xA5, 0xFA, 0x8D, 0x19, 0x05, 0xA5, 0xFB, 0x8D, 0x1A, 0x05,
902 0xA2, 0x07, 0xA9, 0xFF, 0x9D, 0xD0, 0x05, 0xA9, 0xF0, 0x9D, 0xD8, 0x05, 0x9D, 0xE0, 0x05, 0xCA,
903 0x10, 0xF0, 0xA9, 0x03, 0x8D, 0x0F, 0xD2, 0x8D, 0x1F, 0xD2, 0x8D, 0x2F, 0xD2, 0x8D, 0x3F, 0xD2,
904 0xCE, 0x17, 0x05, 0xE8, 0x8E, 0x1C, 0x05, 0xE8, 0x8E, 0x1D, 0x05, 0x8E, 0x16, 0x05, 0x60, 0x8A,
905 0x29, 0x0F, 0x8D, 0x1B, 0x05, 0x60, 0x8E, 0x16, 0x05, 0x60, 0xC9, 0x10, 0xB0, 0x03, 0x4C, 0x4C,
906 0x0D, 0xC9, 0x20, 0x90, 0x88, 0xC9, 0x30, 0xB0, 0x03, 0x4C, 0x85, 0x0F, 0xC9, 0x40, 0x90, 0xDF,
907 0xC9, 0x50, 0xB0, 0x03, 0x4C, 0x2C, 0x0F, 0xC9, 0x60, 0x90, 0xDB, 0xC9, 0x70, 0x90, 0x03, 0x4C,
908 0xB4, 0x0E, 0x84, 0xFD, 0x29, 0x0F, 0x0A, 0x8D, 0x17, 0x0E, 0xA5, 0xFD, 0x90, 0xFE, 0x90, 0x1E,
909 0x90, 0x38, 0x90, 0x59, 0x90, 0x60, 0x90, 0x1A, 0x90, 0x1C, 0x90, 0x1E, 0x90, 0x20, 0x90, 0x22,
910 0x90, 0x24, 0x90, 0x0D, 0x90, 0x0B, 0x90, 0x09, 0x90, 0x07, 0x90, 0x05, 0x90, 0x03, 0x8D, 0x18,
911 0x05, 0x60, 0x9D, 0x68, 0x06, 0x60, 0x9D, 0x70, 0x06, 0x60, 0x9D, 0x78, 0x06, 0x60, 0x9D, 0x90,
912 0x06, 0x60, 0x9D, 0x80, 0x06, 0x60, 0x9D, 0x88, 0x06, 0x60, 0x29, 0x70, 0x4A, 0x4A, 0x9D, 0x10,
913 0x06, 0x29, 0x30, 0xD0, 0x03, 0x9D, 0x20, 0x06, 0xA5, 0xFD, 0x30, 0x06, 0x29, 0x0F, 0x9D, 0x18,
914 0x06, 0x60, 0x29, 0x0F, 0x49, 0xFF, 0x18, 0x69, 0x01, 0x9D, 0x18, 0x06, 0x60, 0x29, 0x3F, 0x9D,
915 0x30, 0x06, 0x9D, 0x38, 0x06, 0x60, 0x29, 0x80, 0x0A, 0x2A, 0x9D, 0x60, 0x06, 0xA5, 0xFD, 0x29,
916 0x70, 0x4A, 0x4A, 0x4A, 0x4A, 0x9D, 0x40, 0x06, 0xD0, 0x03, 0x9D, 0x60, 0x06, 0xA5, 0xFD, 0x29,
917 0x0F, 0x9D, 0x50, 0x06, 0x9D, 0x58, 0x06, 0xBD, 0x48, 0x06, 0xDD, 0x40, 0x06, 0x90, 0x8F, 0xBD,
918 0x40, 0x06, 0xF0, 0x02, 0xE9, 0x01, 0x9D, 0x48, 0x06, 0x60, 0x84, 0xFA, 0x86, 0xFB, 0xA0, 0x19,
919 0xB1, 0xFA, 0xC8, 0x8D, 0x09, 0x05, 0xB1, 0xFA, 0xC8, 0x8D, 0x0A, 0x05, 0xB1, 0xFA, 0xC8, 0x8D,
920 0x0B, 0x05, 0xB1, 0xFA, 0xC8, 0x8D, 0x0C, 0x05, 0xB1, 0xFA, 0xC8, 0x8D, 0x0D, 0x05, 0xB1, 0xFA,
921 0x8D, 0x1B, 0x05, 0xA5, 0xFA, 0x49, 0x80, 0x30, 0x01, 0xE8, 0x8D, 0xAC, 0x0F, 0x8E, 0xAD, 0x0F,
922 0x49, 0x80, 0x30, 0x01, 0xE8, 0x8D, 0x1D, 0x07, 0x8E, 0x1E, 0x07, 0xE8, 0x8D, 0x23, 0x07, 0x8E,
923 0x24, 0x07, 0xE8, 0x8D, 0xA2, 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 0x98, 0x9D, 0x90, 0x05, 0xA0, 0x08, 0xB1,
935 0xFA, 0xC8, 0x9D, 0xC0, 0x05, 0xB1, 0xFA, 0xC8, 0x9D, 0xC8, 0x05, 0xB1, 0xFA, 0xC8, 0x9D, 0x68,
936 0x06, 0xB1, 0xFA, 0xC8, 0x9D, 0x70, 0x06, 0xB1, 0xFA, 0xC8, 0x9D, 0x78, 0x06, 0xB1, 0xFA, 0xC8,
937 0x9D, 0xE8, 0x05, 0x9D, 0xF8, 0x05, 0xB1, 0xFA, 0xC8, 0x9D, 0xF0, 0x05, 0x9D, 0x00, 0x06, 0xB1,
938 0xFA, 0x29, 0x70, 0x4A, 0x4A, 0x9D, 0x10, 0x06, 0xB1, 0xFA, 0xC8, 0x30, 0x08, 0x29, 0x0F, 0x9D,
939 0x18, 0x06, 0x4C, 0x09, 0x10, 0x29, 0x0F, 0x49, 0xFF, 0x18, 0x69, 0x01, 0x9D, 0x18, 0x06, 0xB1,
940 0xFA, 0xC8, 0x9D, 0x28, 0x06, 0xB1, 0xFA, 0xC8, 0x29, 0x3F, 0x9D, 0x30, 0x06, 0x9D, 0x38, 0x06,
941 0xB1, 0xFA, 0x29, 0x80, 0x0A, 0x2A, 0x9D, 0x60, 0x06, 0xB1, 0xFA, 0x29, 0x70, 0x4A, 0x4A, 0x4A,
942 0x4A, 0x9D, 0x40, 0x06, 0xD0, 0x03, 0x9D, 0x60, 0x06, 0xB1, 0xFA, 0x88, 0x29, 0x0F, 0x9D, 0x50,
943 0x06, 0x9D, 0x58, 0x06, 0xB1, 0xFA, 0x29, 0xC0, 0x1D, 0x98, 0x05, 0x9D, 0x98, 0x05, 0xA8, 0xB9,
944 0x00, 0x03, 0x9D, 0x38, 0x05, 0xA9, 0x00, 0x9D, 0xB8, 0x05, 0x9D, 0x20, 0x06, 0x9D, 0x08, 0x06,
945 0x9D, 0x48, 0x06, 0x9D, 0x80, 0x06, 0x9D, 0x88, 0x06, 0x9D, 0x90, 0x06, 0xA9, 0x01, 0x9D, 0x78,
946 0x05, 0x60
947};