summaryrefslogtreecommitdiff
path: root/apps/codecs
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 /apps/codecs
parent43b11af169133572802bf19078eaac351c3bc140 (diff)
downloadrockbox-4e4bf82fb756f36dca6af333357a54e09b9f4cca.zip
rockbox-4e4bf82fb756f36dca6af333357a54e09b9f4cca.tar.gz
rockbox-4e4bf82fb756f36dca6af333357a54e09b9f4cca.tar.bz2
rockbox-4e4bf82fb756f36dca6af333357a54e09b9f4cca.tar.xz
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
Diffstat (limited to 'apps/codecs')
-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 0000000..97d4106
--- /dev/null
+++ b/apps/codecs/asap/CREDITS
@@ -0,0 +1,37 @@
+People who have contributed to ASAP
+-----------------------------------
+
+Atari800 Development Team (http://atari800.sourceforge.net)
+* 6502 and POKEY emulation used in 0.x.y versions of ASAP
+
+Zdenek Eisenhammer <pg@pinknet.cz>
+* testing
+
+Piotr Fusik <fox@scene.pl>
+* author and maintainer of ASAP
+
+Maciek Konecki <maciusk1@wp.pl>
+* porting to C#
+
+Marcin Lewandowski <jaskier@atari8.info>
+* 6502 routines for playing CMC, MPT, TMC and TM2
+
+Perry McFarlane <perry_m@fastmail.fm>
+* POKEY reverse-engineering
+
+Kostas Nakos <knakos@gmail.com>
+* compilation for Windows CE
+
+Slawomir Sledz <slaves@scene.pl>
+* testing
+
+Radek Sterba <raster@infos.cz>
+* 6502 routine for playing RMT
+* testing
+
+Lukasz Sychowicz <xray@scene.pl>
+* Windows icons
+* testing
+
+Michal Szpilowski <miker@atari.pl>
+* testing
diff --git a/apps/codecs/asap/README b/apps/codecs/asap/README
new file mode 100644
index 0000000..d43a872
--- /dev/null
+++ b/apps/codecs/asap/README
@@ -0,0 +1,59 @@
+ASAP - Another Slight Atari Player
+----------------------------------
+
+ASAP is a player of Atari 8-bit music for modern computers.
+It emulates the POKEY sound chip and the 6502 processor.
+The project was initially based on the routines from the Atari800 emulator,
+but the current version has a completely new original emulation core.
+
+The ASAP project includes the following programs:
+* ASAP2WAV - portable command-line utility that generates WAV files
+* WASAP - tiny player for Windows
+* plugin for Apollo
+* plugin for foobar2000 0.9
+* plugin for GSPlayer
+* plugin for MOC
+* plugin for Winamp
+* plugin for XMMS
+* DirectShow source filter (for Windows Media Player)
+* Java version of ASAP2WAV
+* Java applet
+* Java midlet
+* C# version of ASAP2WAV
+
+The following input formats are supported:
+* SAP (Slight Atari Player - standard file format for playing Atari 8-bit
+ music on modern computers)
+* CMC (Chaos Music Composer)
+* CMR (CMC Rzog)
+* DMC (DoublePlay CMC)
+* MPT (Music ProTracker)
+* MPD (MPT DoublePlay)
+* RMT (Raster Music Tracker)
+* TMC, TM8 (Theta Music Composer 1.x)
+* TM2 (Theta Music Composer 2.x)
+
+If you are looking for Atari 8-bit music, there is a single big collection
+of it called Atari SAP Music Archive (http://asma.atari.org).
+
+If you are interested in the ASAP project, please subscribe its mailing list:
+https://lists.sourceforge.net/lists/listinfo/asap-users
+As in the Atari800 project, this is a combined list for end users
+and for developers. Once you subscribe, you can post comments, ideas
+and questions about ASAP. They will be answered ASAP. ;-)
+
+If, for some reason, you do not want to subscribe the mailing list,
+but have a bug report, feature request or a small code patch, you can use
+the sf.net tracker. Use "Bugs", "Feature Requests" or "Patches" link
+on this page:
+http://sourceforge.net/projects/asap/
+
+ASAP is free software; you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published
+by the Free Software Foundation; either version 2 of the License,
+or (at your option) any later version.
+
+ASAP is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty
+of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+See the 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 0000000..a4def24
--- /dev/null
+++ b/apps/codecs/asap/acpu.c
@@ -0,0 +1,1262 @@
+/*
+ * acpu.c - another 6502 CPU emulator
+ *
+ * Copyright (C) 2007-2008 Piotr Fusik
+ *
+ * This file is part of ASAP (Another Slight Atari Player),
+ * see http://asap.sourceforge.net
+ *
+ * ASAP is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published
+ * by the Free Software Foundation; either version 2 of the License,
+ * or (at your option) any later version.
+ *
+ * ASAP is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty
+ * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with ASAP; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include "asap_internal.h"
+
+CONST_LOOKUP(int, opcode_cycles) =
+{
+/* 0 1 2 3 4 5 6 7 8 9 A B C D E F */
+ 7, 6, 2, 8, 3, 3, 5, 5, 3, 2, 2, 2, 4, 4, 6, 6, /* 0x */
+ 2, 5, 2, 8, 4, 4, 6, 6, 2, 4, 2, 7, 4, 4, 7, 7, /* 1x */
+ 6, 6, 2, 8, 3, 3, 5, 5, 4, 2, 2, 2, 4, 4, 6, 6, /* 2x */
+ 2, 5, 2, 8, 4, 4, 6, 6, 2, 4, 2, 7, 4, 4, 7, 7, /* 3x */
+ 6, 6, 2, 8, 3, 3, 5, 5, 3, 2, 2, 2, 3, 4, 6, 6, /* 4x */
+ 2, 5, 2, 8, 4, 4, 6, 6, 2, 4, 2, 7, 4, 4, 7, 7, /* 5x */
+ 6, 6, 2, 8, 3, 3, 5, 5, 4, 2, 2, 2, 5, 4, 6, 6, /* 6x */
+ 2, 5, 2, 8, 4, 4, 6, 6, 2, 4, 2, 7, 4, 4, 7, 7, /* 7x */
+ 2, 6, 2, 6, 3, 3, 3, 3, 2, 2, 2, 2, 4, 4, 4, 4, /* 8x */
+ 2, 6, 2, 6, 4, 4, 4, 4, 2, 5, 2, 5, 5, 5, 5, 5, /* 9x */
+ 2, 6, 2, 6, 3, 3, 3, 3, 2, 2, 2, 2, 4, 4, 4, 4, /* Ax */
+ 2, 5, 2, 5, 4, 4, 4, 4, 2, 4, 2, 4, 4, 4, 4, 4, /* Bx */
+ 2, 6, 2, 8, 3, 3, 5, 5, 2, 2, 2, 2, 4, 4, 6, 6, /* Cx */
+ 2, 5, 2, 8, 4, 4, 6, 6, 2, 4, 2, 7, 4, 4, 7, 7, /* Dx */
+ 2, 6, 2, 8, 3, 3, 5, 5, 2, 2, 2, 2, 4, 4, 6, 6, /* Ex */
+ 2, 5, 2, 8, 4, 4, 6, 6, 2, 4, 2, 7, 4, 4, 7, 7 /* Fx */
+};
+
+#define DO_ADC \
+ if ((vdi & D_FLAG) == 0) { \
+ /* binary mode */ \
+ int tmp = a + data + c; \
+ c = tmp >> 8; \
+ vdi &= D_FLAG | I_FLAG; \
+ if (((a ^ data) & 0x80) == 0 && ((data ^ tmp) & 0x80) != 0) \
+ vdi += V_FLAG; \
+ nz = a = tmp & 0xff; \
+ } \
+ else { \
+ /* decimal mode */ \
+ int tmp = (a & 0x0f) + (data & 0x0f) + c; \
+ if (tmp >= 10) \
+ tmp = (tmp - 10) | 0x10; \
+ tmp += (a & 0xf0) + (data & 0xf0); \
+ nz = ((tmp & 0x80) << 1) + ((a + data + c) & 0xff); \
+ vdi &= D_FLAG | I_FLAG; \
+ if (((a ^ data) & 0x80) == 0 && ((data ^ tmp) & 0x80) != 0) \
+ vdi += V_FLAG; \
+ if (tmp > 0x9f) \
+ tmp += 0x60; \
+ c = (tmp > 0xff) ? 1 : 0; \
+ a = tmp & 0xff; \
+ }
+
+#define DO_SBC \
+ if ((vdi & D_FLAG) == 0) { \
+ /* binary mode */ \
+ int tmp = a - data - 1 + c; \
+ c = (tmp >= 0) ? 1 : 0; \
+ vdi &= D_FLAG | I_FLAG; \
+ if (((a ^ tmp) & 0x80) != 0 && ((a ^ data) & 0x80) != 0) \
+ vdi += V_FLAG; \
+ nz = a = tmp & 0xff; \
+ } \
+ else { \
+ /* decimal mode */ \
+ int tmp = a - data - 1 + c; \
+ int al = (a & 0x0f) - (data & 0x0f) - 1 + c; \
+ int ah = (a >> 4) - (data >> 4); \
+ if ((al & 0x10) != 0) { \
+ al -= 6; \
+ ah--; \
+ } \
+ if ((ah & 0x10) != 0) \
+ ah -= 6; \
+ c = tmp >= 0 ? 1 : 0; \
+ vdi &= D_FLAG | I_FLAG; \
+ if (((a ^ tmp) & 0x80) != 0 && ((a ^ data) & 0x80) != 0) \
+ vdi += V_FLAG; \
+ nz = tmp & 0xff; \
+ a = ((ah & 0xf) << 4) + (al & 0x0f); \
+ }
+
+#define zGetByte(addr) dGetByte((addr) & 0xff)
+
+#define PEEK dGetByte(pc)
+#define FETCH dGetByte(pc++)
+
+#define ABSOLUTE addr = FETCH; addr += FETCH << 8
+#define ABSOLUTE_X addr = FETCH; addr = (addr + (FETCH << 8) + x) & 0xffff
+#define ABSOLUTE_Y addr = FETCH; addr = (addr + (FETCH << 8) + y) & 0xffff
+#define ZPAGE addr = FETCH
+#define ZPAGE_X addr = (FETCH + x) & 0xff
+#define ZPAGE_Y addr = (FETCH + y) & 0xff
+#define INDIRECT_X addr = (FETCH + x) & 0xff; addr = dGetByte(addr) + (zGetByte(addr + 1) << 8)
+#define INDIRECT_Y addr = FETCH; addr = (dGetByte(addr) + (zGetByte(addr + 1) << 8) + y) & 0xffff
+#define NCYCLES_X if ((addr & 0xff) < x) AST cycle++
+#define NCYCLES_Y if ((addr & 0xff) < y) AST cycle++
+
+#define PL(dest) s = (s + 1) & 0xff; dest = dGetByte(0x0100 + s)
+#define PLP PL(vdi); nz = ((vdi & 0x80) << 1) + (~vdi & Z_FLAG); c = vdi & 1; vdi &= V_FLAG | D_FLAG | I_FLAG
+#define PH(data) dPutByte(0x0100 + s, data); s = (s - 1) & 0xff
+#define PHW(data) PH((data) >> 8); PH(data)
+#define PHP(bflag) PH(((nz | (nz >> 1)) & 0x80) + vdi + ((nz & 0xff) == 0 ? Z_FLAG : 0) + c + bflag)
+#define PHPB0 PHP(0x20) /* push flags with B flag clear (NMI, IRQ) */
+#define PHPB1 PHP(0x30) /* push flags with B flag set (PHP, BRK) */
+#define PHPC PHW(pc)
+
+#define LDA nz = a = GetByte(addr)
+#define LDA_ZP nz = a = dGetByte(addr)
+#define LDX nz = x = GetByte(addr)
+#define LDX_ZP nz = x = dGetByte(addr)
+#define LDY nz = y = GetByte(addr)
+#define LDY_ZP nz = y = dGetByte(addr)
+#define LAX nz = x = a = GetByte(addr)
+#define LAX_ZP nz = x = a = dGetByte(addr)
+#define STA PutByte(addr, a)
+#define STA_ZP dPutByte(addr, a)
+#define STX PutByte(addr, x)
+#define STX_ZP dPutByte(addr, x)
+#define STY PutByte(addr, y)
+#define STY_ZP dPutByte(addr, y)
+#define SAX data = a & x; PutByte(addr, data)
+#define SAX_ZP data = a & x; dPutByte(addr, data)
+#define CMP nz = GetByte(addr); c = (a >= nz) ? 1 : 0; nz = (a - nz) & 0xff
+#define CMP_ZP nz = dGetByte(addr); c = (a >= nz) ? 1 : 0; nz = (a - nz) & 0xff
+#define CPX nz = GetByte(addr); c = (x >= nz) ? 1 : 0; nz = (x - nz) & 0xff
+#define CPX_ZP nz = dGetByte(addr); c = (x >= nz) ? 1 : 0; nz = (x - nz) & 0xff
+#define CPY nz = GetByte(addr); c = (y >= nz) ? 1 : 0; nz = (y - nz) & 0xff
+#define CPY_ZP nz = dGetByte(addr); c = (y >= nz) ? 1 : 0; nz = (y - nz) & 0xff
+#define AND nz = a &= GetByte(addr)
+#define AND_ZP nz = a &= dGetByte(addr)
+#define ORA nz = a |= GetByte(addr)
+#define ORA_ZP nz = a |= dGetByte(addr)
+#define EOR nz = a ^= GetByte(addr)
+#define EOR_ZP nz = a ^= dGetByte(addr)
+#define ADC data = GetByte(addr); DO_ADC
+#define ADC_ZP data = dGetByte(addr); DO_ADC
+#define SBC data = GetByte(addr); DO_SBC
+#define SBC_ZP data = dGetByte(addr); DO_SBC
+
+#define ASL RMW_GetByte(nz, addr); c = nz >> 7; nz = (nz << 1) & 0xff; PutByte(addr, nz)
+#define ASL_ZP nz = dGetByte(addr); c = nz >> 7; nz = (nz << 1) & 0xff; dPutByte(addr, nz)
+#define ROL RMW_GetByte(nz, addr); nz = (nz << 1) + c; c = nz >> 8; nz &= 0xff; PutByte(addr, nz)
+#define ROL_ZP nz = dGetByte(addr); nz = (nz << 1) + c; c = nz >> 8; nz &= 0xff; dPutByte(addr, nz)
+#define LSR RMW_GetByte(nz, addr); c = nz & 1; nz >>= 1; PutByte(addr, nz)
+#define LSR_ZP nz = dGetByte(addr); c = nz & 1; nz >>= 1; dPutByte(addr, nz)
+#define ROR \
+ RMW_GetByte(nz, addr); \
+ if (c == 0) { \
+ c = nz & 1; \
+ nz >>= 1; \
+ } \
+ else { \
+ c = nz & 1; \
+ nz = (nz >> 1) + 128; \
+ } \
+ PutByte(addr, nz)
+#define ROR_ZP \
+ nz = dGetByte(addr); \
+ if (c == 0) { \
+ c = nz & 1; \
+ nz >>= 1; \
+ } \
+ else { \
+ c = nz & 1; \
+ nz = (nz >> 1) + 128; \
+ } \
+ dPutByte(addr, nz)
+#define DEC RMW_GetByte(nz, addr); nz = (nz - 1) & 0xff; PutByte(addr, nz)
+#define DEC_ZP nz = dGetByte(addr); nz = (nz - 1) & 0xff; dPutByte(addr, nz)
+#define INC RMW_GetByte(nz, addr); nz = (nz + 1) & 0xff; PutByte(addr, nz)
+#define INC_ZP nz = dGetByte(addr); nz = (nz + 1) & 0xff; dPutByte(addr, nz)
+
+#define ASO ASL; nz = a |= nz
+#define ASO_ZP ASL_ZP; nz = a |= nz
+#define RLA ROL; nz = a &= nz
+#define RLA_ZP ROL_ZP; nz = a &= nz
+#define LSE LSR; nz = a ^= nz
+#define LSE_ZP LSR_ZP; nz = a ^= nz
+#define RRA ROR; data = nz; DO_ADC
+#define RRA_ZP ROR_ZP; data = nz; DO_ADC
+#define DCM DEC; c = (a >= nz) ? 1 : 0; nz = (a - nz) & 0xff
+#define DCM_ZP DEC_ZP; c = (a >= nz) ? 1 : 0; nz = (a - nz) & 0xff
+#define INS INC; data = nz; DO_SBC
+#define INS_ZP INC_ZP; data = nz; DO_SBC
+
+#define BRANCH(cond) \
+ if (cond) { \
+ addr = SBYTE(FETCH); \
+ addr += pc; \
+ if (((addr ^ pc) & 0xff00) != 0) \
+ AST cycle++; \
+ AST cycle++; \
+ pc = addr; \
+ break; \
+ } \
+ pc++; \
+ break
+
+#define CHECK_IRQ \
+ if ((vdi & I_FLAG) == 0 && AST irqst != 0xff) { \
+ PHPC; \
+ PHPB0; \
+ vdi |= I_FLAG; \
+ pc = dGetWord(0xfffe); \
+ AST cycle += 7; \
+ }
+
+ASAP_FUNC void Cpu_RunScanlines(ASAP_State PTR ast, int scanlines)
+{
+ int pc;
+ int nz;
+ int a;
+ int x;
+ int y;
+ int c;
+ int s;
+ int vdi;
+ int next_event_cycle;
+ int cycle_limit;
+ pc = AST cpu_pc;
+ nz = AST cpu_nz;
+ a = AST cpu_a;
+ x = AST cpu_x;
+ y = AST cpu_y;
+ c = AST cpu_c;
+ s = AST cpu_s;
+ vdi = AST cpu_vdi;
+ AST next_scanline_cycle = 114;
+ next_event_cycle = 114;
+ cycle_limit = 114 * scanlines;
+ if (next_event_cycle > AST timer1_cycle)
+ next_event_cycle = AST timer1_cycle;
+ if (next_event_cycle > AST timer2_cycle)
+ next_event_cycle = AST timer2_cycle;
+ if (next_event_cycle > AST timer4_cycle)
+ next_event_cycle = AST timer4_cycle;
+ AST nearest_event_cycle = next_event_cycle;
+ for (;;) {
+ int cycle;
+ int addr;
+ int data;
+ cycle = AST cycle;
+ if (cycle >= AST nearest_event_cycle) {
+ if (cycle >= AST next_scanline_cycle) {
+ if (++AST scanline_number == 312)
+ AST scanline_number = 0;
+ AST cycle = cycle += 9;
+ AST next_scanline_cycle += 114;
+ if (--scanlines <= 0)
+ break;
+ }
+ next_event_cycle = AST next_scanline_cycle;
+#define CHECK_TIMER_IRQ(ch) \
+ if (cycle >= AST timer##ch##_cycle) { \
+ AST irqst &= ~ch; \
+ AST timer##ch##_cycle = NEVER; \
+ } \
+ else if (next_event_cycle > AST timer##ch##_cycle) \
+ next_event_cycle = AST timer##ch##_cycle;
+ CHECK_TIMER_IRQ(1);
+ CHECK_TIMER_IRQ(2);
+ CHECK_TIMER_IRQ(4);
+ AST nearest_event_cycle = next_event_cycle;
+ CHECK_IRQ;
+ }
+#ifdef ASAPSCAN
+ if (cpu_trace)
+ print_cpu_state(as, pc, a, x, y, s, nz, vdi, c);
+#endif
+ data = FETCH;
+ AST cycle += opcode_cycles[data];
+ switch (data) {
+ case 0x00: /* BRK */
+ pc++;
+ PHPC;
+ PHPB1;
+ vdi |= I_FLAG;
+ pc = dGetWord(0xfffe);
+ break;
+ case 0x01: /* ORA (ab,x) */
+ INDIRECT_X;
+ ORA;
+ break;
+ case 0x02: /* CIM [unofficial] */
+ case 0x12:
+ case 0x22:
+ case 0x32:
+ case 0x42:
+ case 0x52:
+ case 0x62:
+ case 0x72:
+ case 0x92:
+ case 0xb2:
+ case 0xd2:
+ case 0xf2:
+ AST scanline_number = (AST scanline_number + scanlines - 1) % 312;
+ scanlines = 1;
+ AST cycle = cycle_limit;
+ break;
+ case 0x03: /* ASO (ab,x) [unofficial] */
+ INDIRECT_X;
+ ASO;
+ break;
+ case 0x04: /* NOP ab [unofficial] */
+ case 0x44:
+ case 0x64:
+ case 0x14: /* NOP ab,x [unofficial] */
+ case 0x34:
+ case 0x54:
+ case 0x74:
+ case 0xd4:
+ case 0xf4:
+ case 0x80: /* NOP #ab [unofficial] */
+ case 0x82:
+ case 0x89:
+ case 0xc2:
+ case 0xe2:
+ pc++;
+ break;
+ case 0x05: /* ORA ab */
+ ZPAGE;
+ ORA_ZP;
+ break;
+ case 0x06: /* ASL ab */
+ ZPAGE;
+ ASL_ZP;
+ break;
+ case 0x07: /* ASO ab [unofficial] */
+ ZPAGE;
+ ASO_ZP;
+ break;
+ case 0x08: /* PHP */
+ PHPB1;
+ break;
+ case 0x09: /* ORA #ab */
+ nz = a |= FETCH;
+ break;
+ case 0x0a: /* ASL */
+ c = a >> 7;
+ nz = a = (a << 1) & 0xff;
+ break;
+ case 0x0b: /* ANC #ab [unofficial] */
+ case 0x2b:
+ nz = a &= FETCH;
+ c = nz >> 7;
+ break;
+ case 0x0c: /* NOP abcd [unofficial] */
+ pc += 2;
+ break;
+ case 0x0d: /* ORA abcd */
+ ABSOLUTE;
+ ORA;
+ break;
+ case 0x0e: /* ASL abcd */
+ ABSOLUTE;
+ ASL;
+ break;
+ case 0x0f: /* ASO abcd [unofficial] */
+ ABSOLUTE;
+ ASO;
+ break;
+ case 0x10: /* BPL */
+ BRANCH(nz < 0x80);
+ case 0x11: /* ORA (ab),y */
+ INDIRECT_Y;
+ NCYCLES_Y;
+ ORA;
+ break;
+ case 0x13: /* ASO (ab),y [unofficial] */
+ INDIRECT_Y;
+ ASO;
+ break;
+ case 0x15: /* ORA ab,x */
+ ZPAGE_X;
+ ORA_ZP;
+ break;
+ case 0x16: /* ASL ab,x */
+ ZPAGE_X;
+ ASL_ZP;
+ break;
+ case 0x17: /* ASO ab,x [unofficial] */
+ ZPAGE_X;
+ ASO_ZP;
+ break;
+ case 0x18: /* CLC */
+ c = 0;
+ break;
+ case 0x19: /* ORA abcd,y */
+ ABSOLUTE_Y;
+ NCYCLES_Y;
+ ORA;
+ break;
+ case 0x1b: /* ASO abcd,y [unofficial] */
+ ABSOLUTE_Y;
+ ASO;
+ break;
+ case 0x1c: /* NOP abcd,x [unofficial] */
+ case 0x3c:
+ case 0x5c:
+ case 0x7c:
+ case 0xdc:
+ case 0xfc:
+ if (FETCH + x >= 0x100)
+ AST cycle++;
+ pc++;
+ break;
+ case 0x1d: /* ORA abcd,x */
+ ABSOLUTE_X;
+ NCYCLES_X;
+ ORA;
+ break;
+ case 0x1e: /* ASL abcd,x */
+ ABSOLUTE_X;
+ ASL;
+ break;
+ case 0x1f: /* ASO abcd,x [unofficial] */
+ ABSOLUTE_X;
+ ASO;
+ break;
+ case 0x20: /* JSR abcd */
+ addr = FETCH;
+ PHPC;
+ pc = addr + (PEEK << 8);
+ break;
+ case 0x21: /* AND (ab,x) */
+ INDIRECT_X;
+ AND;
+ break;
+ case 0x23: /* RLA (ab,x) [unofficial] */
+ INDIRECT_X;
+ RLA;
+ break;
+ case 0x24: /* BIT ab */
+ ZPAGE;
+ nz = dGetByte(addr);
+ vdi = (vdi & (D_FLAG | I_FLAG)) + (nz & V_FLAG);
+ nz = ((nz & 0x80) << 1) + (nz & a);
+ break;
+ case 0x25: /* AND ab */
+ ZPAGE;
+ AND_ZP;
+ break;
+ case 0x26: /* ROL ab */
+ ZPAGE;
+ ROL_ZP;
+ break;
+ case 0x27: /* RLA ab [unofficial] */
+ ZPAGE;
+ RLA_ZP;
+ break;
+ case 0x28: /* PLP */
+ PLP;
+ CHECK_IRQ;
+ break;
+ case 0x29: /* AND #ab */
+ nz = a &= FETCH;
+ break;
+ case 0x2a: /* ROL */
+ a = (a << 1) + c;
+ c = a >> 8;
+ nz = a &= 0xff;
+ break;
+ case 0x2c: /* BIT abcd */
+ ABSOLUTE;
+ nz = GetByte(addr);
+ vdi = (vdi & (D_FLAG | I_FLAG)) + (nz & V_FLAG);
+ nz = ((nz & 0x80) << 1) + (nz & a);
+ break;
+ case 0x2d: /* AND abcd */
+ ABSOLUTE;
+ AND;
+ break;
+ case 0x2e: /* ROL abcd */
+ ABSOLUTE;
+ ROL;
+ break;
+ case 0x2f: /* RLA abcd [unofficial] */
+ ABSOLUTE;
+ RLA;
+ break;
+ case 0x30: /* BMI */
+ BRANCH(nz >= 0x80);
+ case 0x31: /* AND (ab),y */
+ INDIRECT_Y;
+ NCYCLES_Y;
+ AND;
+ break;
+ case 0x33: /* RLA (ab),y [unofficial] */
+ INDIRECT_Y;
+ RLA;
+ break;
+ case 0x35: /* AND ab,x */
+ ZPAGE_X;
+ AND_ZP;
+ break;
+ case 0x36: /* ROL ab,x */
+ ZPAGE_X;
+ ROL_ZP;
+ break;
+ case 0x37: /* RLA ab,x [unofficial] */
+ ZPAGE_X;
+ RLA_ZP;
+ break;
+ case 0x38: /* SEC */
+ c = 1;
+ break;
+ case 0x39: /* AND abcd,y */
+ ABSOLUTE_Y;
+ NCYCLES_Y;
+ AND;
+ break;
+ case 0x3b: /* RLA abcd,y [unofficial] */
+ ABSOLUTE_Y;
+ RLA;
+ break;
+ case 0x3d: /* AND abcd,x */
+ ABSOLUTE_X;
+ NCYCLES_X;
+ AND;
+ break;
+ case 0x3e: /* ROL abcd,x */
+ ABSOLUTE_X;
+ ROL;
+ break;
+ case 0x3f: /* RLA abcd,x [unofficial] */
+ ABSOLUTE_X;
+ RLA;
+ break;
+ case 0x40: /* RTI */
+ PLP;
+ PL(pc);
+ PL(addr);
+ pc += addr << 8;
+ CHECK_IRQ;
+ break;
+ case 0x41: /* EOR (ab,x) */
+ INDIRECT_X;
+ EOR;
+ break;
+ case 0x43: /* LSE (ab,x) [unofficial] */
+ INDIRECT_X;
+ LSE;
+ break;
+ case 0x45: /* EOR ab */
+ ZPAGE;
+ EOR_ZP;
+ break;
+ case 0x46: /* LSR ab */
+ ZPAGE;
+ LSR_ZP;
+ break;
+ case 0x47: /* LSE ab [unofficial] */
+ ZPAGE;
+ LSE_ZP;
+ break;
+ case 0x48: /* PHA */
+ PH(a);
+ break;
+ case 0x49: /* EOR #ab */
+ nz = a ^= FETCH;
+ break;
+ case 0x4a: /* LSR */
+ c = a & 1;
+ nz = a >>= 1;
+ break;
+ case 0x4b: /* ALR #ab [unofficial] */
+ a &= FETCH;
+ c = a & 1;
+ nz = a >>= 1;
+ break;
+ case 0x4c: /* JMP abcd */
+ addr = FETCH;
+ pc = addr + (PEEK << 8);
+ break;
+ case 0x4d: /* EOR abcd */
+ ABSOLUTE;
+ EOR;
+ break;
+ case 0x4e: /* LSR abcd */
+ ABSOLUTE;
+ LSR;
+ break;
+ case 0x4f: /* LSE abcd [unofficial] */
+ ABSOLUTE;
+ LSE;
+ break;
+ case 0x50: /* BVC */
+ BRANCH((vdi & V_FLAG) == 0);
+ case 0x51: /* EOR (ab),y */
+ INDIRECT_Y;
+ NCYCLES_Y;
+ EOR;
+ break;
+ case 0x53: /* LSE (ab),y [unofficial] */
+ INDIRECT_Y;
+ LSE;
+ break;
+ case 0x55: /* EOR ab,x */
+ ZPAGE_X;
+ EOR_ZP;
+ break;
+ case 0x56: /* LSR ab,x */
+ ZPAGE_X;
+ LSR_ZP;
+ break;
+ case 0x57: /* LSE ab,x [unofficial] */
+ ZPAGE_X;
+ LSE_ZP;
+ break;
+ case 0x58: /* CLI */
+ vdi &= V_FLAG | D_FLAG;
+ CHECK_IRQ;
+ break;
+ case 0x59: /* EOR abcd,y */
+ ABSOLUTE_Y;
+ NCYCLES_Y;
+ EOR;
+ break;
+ case 0x5b: /* LSE abcd,y [unofficial] */
+ ABSOLUTE_Y;
+ LSE;
+ break;
+ case 0x5d: /* EOR abcd,x */
+ ABSOLUTE_X;
+ NCYCLES_X;
+ EOR;
+ break;
+ case 0x5e: /* LSR abcd,x */
+ ABSOLUTE_X;
+ LSR;
+ break;
+ case 0x5f: /* LSE abcd,x [unofficial] */
+ ABSOLUTE_X;
+ LSE;
+ break;
+ case 0x60: /* RTS */
+ PL(pc);
+ PL(addr);
+ pc += (addr << 8) + 1;
+ break;
+ case 0x61: /* ADC (ab,x) */
+ INDIRECT_X;
+ ADC;
+ break;
+ case 0x63: /* RRA (ab,x) [unofficial] */
+ INDIRECT_X;
+ RRA;
+ break;
+ case 0x65: /* ADC ab */
+ ZPAGE;
+ ADC_ZP;
+ break;
+ case 0x66: /* ROR ab */
+ ZPAGE;
+ ROR_ZP;
+ break;
+ case 0x67: /* RRA ab [unofficial] */
+ ZPAGE;
+ RRA_ZP;
+ break;
+ case 0x68: /* PLA */
+ PL(a);
+ nz = a;
+ break;
+ case 0x69: /* ADC #ab */
+ data = FETCH;
+ DO_ADC;
+ break;
+ case 0x6a: /* ROR */
+ nz = (c << 7) + (a >> 1);
+ c = a & 1;
+ a = nz;
+ break;
+ case 0x6b: /* ARR #ab [unofficial] */
+ data = a & FETCH;
+ nz = a = (data >> 1) + (c << 7);
+ vdi = (vdi & (D_FLAG | I_FLAG)) + ((a ^ data) & V_FLAG);
+ if ((vdi & D_FLAG) == 0)
+ c = data >> 7;
+ else {
+ if ((data & 0xf) + (data & 1) > 5)
+ a = (a & 0xf0) + ((a + 6) & 0xf);
+ if (data + (data & 0x10) >= 0x60) {
+ a += 0x60;
+ c = 1;
+ }
+ else
+ c = 0;
+ a &= 0xff;
+ }
+ break;
+ case 0x6c: /* JMP (abcd) */
+ ABSOLUTE;
+ if ((addr & 0xff) == 0xff)
+ pc = (dGetByte(addr - 0xff) << 8) + dGetByte(addr);
+ else
+ pc = dGetWord(addr);
+ break;
+ case 0x6d: /* ADC abcd */
+ ABSOLUTE;
+ ADC;
+ break;
+ case 0x6e: /* ROR abcd */
+ ABSOLUTE;
+ ROR;
+ break;
+ case 0x6f: /* RRA abcd [unofficial] */
+ ABSOLUTE;
+ RRA;
+ break;
+ case 0x70: /* BVS */
+ BRANCH((vdi & V_FLAG) != 0);
+ case 0x71: /* ADC (ab),y */
+ INDIRECT_Y;
+ NCYCLES_Y;
+ ADC;
+ break;
+ case 0x73: /* RRA (ab),y [unofficial] */
+ INDIRECT_Y;
+ RRA;
+ break;
+ case 0x75: /* ADC ab,x */
+ ZPAGE_X;
+ ADC_ZP;
+ break;
+ case 0x76: /* ROR ab,x */
+ ZPAGE_X;
+ ROR_ZP;
+ break;
+ case 0x77: /* RRA ab,x [unofficial] */
+ ZPAGE_X;
+ RRA_ZP;
+ break;
+ case 0x78: /* SEI */
+ vdi |= I_FLAG;
+ break;
+ case 0x79: /* ADC abcd,y */
+ ABSOLUTE_Y;
+ NCYCLES_Y;
+ ADC;
+ break;
+ case 0x7b: /* RRA abcd,y [unofficial] */
+ ABSOLUTE_Y;
+ RRA;
+ break;
+ case 0x7d: /* ADC abcd,x */
+ ABSOLUTE_X;
+ NCYCLES_X;
+ ADC;
+ break;
+ case 0x7e: /* ROR abcd,x */
+ ABSOLUTE_X;
+ ROR;
+ break;
+ case 0x7f: /* RRA abcd,x [unofficial] */
+ ABSOLUTE_X;
+ RRA;
+ break;
+ case 0x81: /* STA (ab,x) */
+ INDIRECT_X;
+ STA;
+ break;
+ case 0x83: /* SAX (ab,x) [unofficial] */
+ INDIRECT_X;
+ SAX;
+ break;
+ case 0x84: /* STY ab */
+ ZPAGE;
+ STY_ZP;
+ break;
+ case 0x85: /* STA ab */
+ ZPAGE;
+ STA_ZP;
+ break;
+ case 0x86: /* STX ab */
+ ZPAGE;
+ STX_ZP;
+ break;
+ case 0x87: /* SAX ab [unofficial] */
+ ZPAGE;
+ SAX_ZP;
+ break;
+ case 0x88: /* DEY */
+ nz = y = (y - 1) & 0xff;
+ break;
+ case 0x8a: /* TXA */
+ nz = a = x;
+ break;
+ case 0x8b: /* ANE #ab [unofficial] */
+ data = FETCH;
+ a &= x;
+ nz = a & data;
+ a &= data | 0xef;
+ break;
+ case 0x8c: /* STY abcd */
+ ABSOLUTE;
+ STY;
+ break;
+ case 0x8d: /* STA abcd */
+ ABSOLUTE;
+ STA;
+ break;
+ case 0x8e: /* STX abcd */
+ ABSOLUTE;
+ STX;
+ break;
+ case 0x8f: /* SAX abcd [unofficial] */
+ ABSOLUTE;
+ SAX;
+ break;
+ case 0x90: /* BCC */
+ BRANCH(c == 0);
+ case 0x91: /* STA (ab),y */
+ INDIRECT_Y;
+ STA;
+ break;
+ case 0x93: /* SHA (ab),y [unofficial, unstable] */
+ ZPAGE;
+ data = zGetByte(addr + 1);
+ addr = (dGetByte(addr) + (data << 8) + y) & 0xffff;
+ data = a & x & (data + 1);
+ PutByte(addr, data);
+ break;
+ case 0x94: /* STY ab,x */
+ ZPAGE_X;
+ STY_ZP;
+ break;
+ case 0x95: /* STA ab,x */
+ ZPAGE_X;
+ STA_ZP;
+ break;
+ case 0x96: /* STX ab,y */
+ ZPAGE_Y;
+ STX_ZP;
+ break;
+ case 0x97: /* SAX ab,y [unofficial] */
+ ZPAGE_Y;
+ SAX_ZP;
+ break;
+ case 0x98: /* TYA */
+ nz = a = y;
+ break;
+ case 0x99: /* STA abcd,y */
+ ABSOLUTE_Y;
+ STA;
+ break;
+ case 0x9a: /* TXS */
+ s = x;
+ break;
+ case 0x9b: /* SHS abcd,y [unofficial, unstable] */
+ /* S seems to be stable, only memory values vary */
+ addr = FETCH;
+ data = FETCH;
+ addr = (addr + (data << 8) + y) & 0xffff;
+ s = a & x;
+ data = s & (data + 1);
+ PutByte(addr, data);
+ break;
+ case 0x9c: /* SHY abcd,x [unofficial] */
+ addr = FETCH;
+ data = FETCH;
+ addr = (addr + (data << 8) + x) & 0xffff;
+ data = y & (data + 1);
+ PutByte(addr, data);
+ break;
+ case 0x9d: /* STA abcd,x */
+ ABSOLUTE_X;
+ STA;
+ break;
+ case 0x9e: /* SHX abcd,y [unofficial] */
+ addr = FETCH;
+ data = FETCH;
+ addr = (addr + (data << 8) + y) & 0xffff;
+ data = x & (data + 1);
+ PutByte(addr, data);
+ break;
+ case 0x9f: /* SHA abcd,y [unofficial, unstable] */
+ addr = FETCH;
+ data = FETCH;
+ addr = (addr + (data << 8) + y) & 0xffff;
+ data = a & x & (data + 1);
+ PutByte(addr, data);
+ break;
+ case 0xa0: /* LDY #ab */
+ nz = y = FETCH;
+ break;
+ case 0xa1: /* LDA (ab,x) */
+ INDIRECT_X;
+ LDA;
+ break;
+ case 0xa2: /* LDX #ab */
+ nz = x = FETCH;
+ break;
+ case 0xa3: /* LAX (ab,x) [unofficial] */
+ INDIRECT_X;
+ LAX;
+ break;
+ case 0xa4: /* LDY ab */
+ ZPAGE;
+ LDY_ZP;
+ break;
+ case 0xa5: /* LDA ab */
+ ZPAGE;
+ LDA_ZP;
+ break;
+ case 0xa6: /* LDX ab */
+ ZPAGE;
+ LDX_ZP;
+ break;
+ case 0xa7: /* LAX ab [unofficial] */
+ ZPAGE;
+ LAX_ZP;
+ break;
+ case 0xa8: /* TAY */
+ nz = y = a;
+ break;
+ case 0xa9: /* LDA #ab */
+ nz = a = FETCH;
+ break;
+ case 0xaa: /* TAX */
+ nz = x = a;
+ break;
+ case 0xab: /* ANX #ab [unofficial] */
+ nz = x = a &= FETCH;
+ break;
+ case 0xac: /* LDY abcd */
+ ABSOLUTE;
+ LDY;
+ break;
+ case 0xad: /* LDA abcd */
+ ABSOLUTE;
+ LDA;
+ break;
+ case 0xae: /* LDX abcd */
+ ABSOLUTE;
+ LDX;
+ break;
+ case 0xaf: /* LAX abcd [unofficial] */
+ ABSOLUTE;
+ LAX;
+ break;
+ case 0xb0: /* BCS */
+ BRANCH(c != 0);
+ case 0xb1: /* LDA (ab),y */
+ INDIRECT_Y;
+ NCYCLES_Y;
+ LDA;
+ break;
+ case 0xb3: /* LAX (ab),y [unofficial] */
+ INDIRECT_Y;
+ NCYCLES_Y;
+ LAX;
+ break;
+ case 0xb4: /* LDY ab,x */
+ ZPAGE_X;
+ LDY_ZP;
+ break;
+ case 0xb5: /* LDA ab,x */
+ ZPAGE_X;
+ LDA_ZP;
+ break;
+ case 0xb6: /* LDX ab,y */
+ ZPAGE_Y;
+ LDX_ZP;
+ break;
+ case 0xb7: /* LAX ab,y [unofficial] */
+ ZPAGE_Y;
+ LAX_ZP;
+ break;
+ case 0xb8: /* CLV */
+ vdi &= D_FLAG | I_FLAG;
+ break;
+ case 0xb9: /* LDA abcd,y */
+ ABSOLUTE_Y;
+ NCYCLES_Y;
+ LDA;
+ break;
+ case 0xba: /* TSX */
+ nz = x = s;
+ break;
+ case 0xbb: /* LAS abcd,y [unofficial] */
+ ABSOLUTE_Y;
+ NCYCLES_Y;
+ nz = x = a = s &= GetByte(addr);
+ break;
+ case 0xbc: /* LDY abcd,x */
+ ABSOLUTE_X;
+ NCYCLES_X;
+ LDY;
+ break;
+ case 0xbd: /* LDA abcd,x */
+ ABSOLUTE_X;
+ NCYCLES_X;
+ LDA;
+ break;
+ case 0xbe: /* LDX abcd,y */
+ ABSOLUTE_Y;
+ NCYCLES_Y;
+ LDX;
+ break;
+ case 0xbf: /* LAX abcd,y [unofficial] */
+ ABSOLUTE_Y;
+ NCYCLES_Y;
+ LAX;
+ break;
+ case 0xc0: /* CPY #ab */
+ nz = FETCH;
+ c = (y >= nz) ? 1 : 0;
+ nz = (y - nz) & 0xff;
+ break;
+ case 0xc1: /* CMP (ab,x) */
+ INDIRECT_X;
+ CMP;
+ break;
+ case 0xc3: /* DCM (ab,x) [unofficial] */
+ INDIRECT_X;
+ DCM;
+ break;
+ case 0xc4: /* CPY ab */
+ ZPAGE;
+ CPY_ZP;
+ break;
+ case 0xc5: /* CMP ab */
+ ZPAGE;
+ CMP_ZP;
+ break;
+ case 0xc6: /* DEC ab */
+ ZPAGE;
+ DEC_ZP;
+ break;
+ case 0xc7: /* DCM ab [unofficial] */
+ ZPAGE;
+ DCM_ZP;
+ break;
+ case 0xc8: /* INY */
+ nz = y = (y + 1) & 0xff;
+ break;
+ case 0xc9: /* CMP #ab */
+ nz = FETCH;
+ c = (a >= nz) ? 1 : 0;
+ nz = (a - nz) & 0xff;
+ break;
+ case 0xca: /* DEX */
+ nz = x = (x - 1) & 0xff;
+ break;
+ case 0xcb: /* SBX #ab [unofficial] */
+ nz = FETCH;
+ x &= a;
+ c = (x >= nz) ? 1 : 0;
+ nz = x = (x - nz) & 0xff;
+ break;
+ case 0xcc: /* CPY abcd */
+ ABSOLUTE;
+ CPY;
+ break;
+ case 0xcd: /* CMP abcd */
+ ABSOLUTE;
+ CMP;
+ break;
+ case 0xce: /* DEC abcd */
+ ABSOLUTE;
+ DEC;
+ break;
+ case 0xcf: /* DCM abcd [unofficial] */
+ ABSOLUTE;
+ DCM;
+ break;
+ case 0xd0: /* BNE */
+ BRANCH((nz & 0xff) != 0);
+ case 0xd1: /* CMP (ab),y */
+ INDIRECT_Y;
+ NCYCLES_Y;
+ CMP;
+ break;
+ case 0xd3: /* DCM (ab),y [unofficial] */
+ INDIRECT_Y;
+ DCM;
+ break;
+ case 0xd5: /* CMP ab,x */
+ ZPAGE_X;
+ CMP_ZP;
+ break;
+ case 0xd6: /* DEC ab,x */
+ ZPAGE_X;
+ DEC_ZP;
+ break;
+ case 0xd7: /* DCM ab,x [unofficial] */
+ ZPAGE_X;
+ DCM_ZP;
+ break;
+ case 0xd8: /* CLD */
+ vdi &= V_FLAG | I_FLAG;
+ break;
+ case 0xd9: /* CMP abcd,y */
+ ABSOLUTE_Y;
+ NCYCLES_Y;
+ CMP;
+ break;
+ case 0xdb: /* DCM abcd,y [unofficial] */
+ ABSOLUTE_Y;
+ DCM;
+ break;
+ case 0xdd: /* CMP abcd,x */
+ ABSOLUTE_X;
+ NCYCLES_X;
+ CMP;
+ break;
+ case 0xde: /* DEC abcd,x */
+ ABSOLUTE_X;
+ DEC;
+ break;
+ case 0xdf: /* DCM abcd,x [unofficial] */
+ ABSOLUTE_X;
+ DCM;
+ break;
+ case 0xe0: /* CPX #ab */
+ nz = FETCH;
+ c = (x >= nz) ? 1 : 0;
+ nz = (x - nz) & 0xff;
+ break;
+ case 0xe1: /* SBC (ab,x) */
+ INDIRECT_X;
+ SBC;
+ break;
+ case 0xe3: /* INS (ab,x) [unofficial] */
+ INDIRECT_X;
+ INS;
+ break;
+ case 0xe4: /* CPX ab */
+ ZPAGE;
+ CPX_ZP;
+ break;
+ case 0xe5: /* SBC ab */
+ ZPAGE;
+ SBC_ZP;
+ break;
+ case 0xe6: /* INC ab */
+ ZPAGE;
+ INC_ZP;
+ break;
+ case 0xe7: /* INS ab [unofficial] */
+ ZPAGE;
+ INS_ZP;
+ break;
+ case 0xe8: /* INX */
+ nz = x = (x + 1) & 0xff;
+ break;
+ case 0xe9: /* SBC #ab */
+ case 0xeb: /* SBC #ab [unofficial] */
+ data = FETCH;
+ DO_SBC;
+ break;
+ case 0xea: /* NOP */
+ case 0x1a: /* NOP [unofficial] */
+ case 0x3a:
+ case 0x5a:
+ case 0x7a:
+ case 0xda:
+ case 0xfa:
+ break;
+ case 0xec: /* CPX abcd */
+ ABSOLUTE;
+ CPX;
+ break;
+ case 0xed: /* SBC abcd */
+ ABSOLUTE;
+ SBC;
+ break;
+ case 0xee: /* INC abcd */
+ ABSOLUTE;
+ INC;
+ break;
+ case 0xef: /* INS abcd [unofficial] */
+ ABSOLUTE;
+ INS;
+ break;
+ case 0xf0: /* BEQ */
+ BRANCH((nz & 0xff) == 0);
+ case 0xf1: /* SBC (ab),y */
+ INDIRECT_Y;
+ NCYCLES_Y;
+ SBC;
+ break;
+ case 0xf3: /* INS (ab),y [unofficial] */
+ INDIRECT_Y;
+ INS;
+ break;
+ case 0xf5: /* SBC ab,x */
+ ZPAGE_X;
+ SBC_ZP;
+ break;
+ case 0xf6: /* INC ab,x */
+ ZPAGE_X;
+ INC_ZP;
+ break;
+ case 0xf7: /* INS ab,x [unofficial] */
+ ZPAGE_X;
+ INS_ZP;
+ break;
+ case 0xf8: /* SED */
+ vdi |= D_FLAG;
+ break;
+ case 0xf9: /* SBC abcd,y */
+ ABSOLUTE_Y;
+ NCYCLES_Y;
+ SBC;
+ break;
+ case 0xfb: /* INS abcd,y [unofficial] */
+ ABSOLUTE_Y;
+ INS;
+ break;
+ case 0xfd: /* SBC abcd,x */
+ ABSOLUTE_X;
+ NCYCLES_X;
+ SBC;
+ break;
+ case 0xfe: /* INC abcd,x */
+ ABSOLUTE_X;
+ INC;
+ break;
+ case 0xff: /* INS abcd,x */
+ ABSOLUTE_X;
+ INS;
+ break;
+ }
+ }
+ AST cpu_pc = pc;
+ AST cpu_nz = nz;
+ AST cpu_a = a;
+ AST cpu_x = x;
+ AST cpu_y = y;
+ AST cpu_c = c;
+ AST cpu_s = s;
+ AST cpu_vdi = vdi;
+ AST cycle -= cycle_limit;
+ if (AST timer1_cycle != NEVER)
+ AST timer1_cycle -= cycle_limit;
+ if (AST timer2_cycle != NEVER)
+ AST timer2_cycle -= cycle_limit;
+ if (AST timer4_cycle != NEVER)
+ AST timer4_cycle -= cycle_limit;
+}
diff --git a/apps/codecs/asap/apokeysnd.c b/apps/codecs/asap/apokeysnd.c
new file mode 100644
index 0000000..d0a4b1b
--- /dev/null
+++ b/apps/codecs/asap/apokeysnd.c
@@ -0,0 +1,537 @@
+/*
+ * apokeysnd.c - another POKEY sound emulator
+ *
+ * Copyright (C) 2007-2008 Piotr Fusik
+ *
+ * This file is part of ASAP (Another Slight Atari Player),
+ * see http://asap.sourceforge.net
+ *
+ * ASAP is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published
+ * by the Free Software Foundation; either version 2 of the License,
+ * or (at your option) any later version.
+ *
+ * ASAP is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty
+ * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with ASAP; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#if !defined(JAVA) && !defined(CSHARP)
+#include <string.h>
+#endif
+
+#include "asap_internal.h"
+
+#define ULTRASOUND_CYCLES 112
+
+#define MUTE_FREQUENCY 1
+#define MUTE_INIT 2
+#define MUTE_USER 4
+
+CONST_LOOKUP(byte, poly4_lookup) =
+ { 0, 0, 0, 0, 1, 1, 1, 0, 1, 1, 0, 0, 1, 0, 1 };
+CONST_LOOKUP(byte, poly5_lookup) =
+ { 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 0, 1,
+ 0, 1, 0, 1, 1, 1, 1, 0, 1, 1, 0, 1, 0, 0, 1, 1 };
+
+FILE_FUNC void init_state(PokeyState PTR pst)
+{
+ PST audctl = 0;
+ PST init = FALSE;
+ PST poly_index = 15 * 31 * 131071;
+ PST div_cycles = 28;
+ PST mute1 = MUTE_FREQUENCY | MUTE_USER;
+ PST mute2 = MUTE_FREQUENCY | MUTE_USER;
+ PST mute3 = MUTE_FREQUENCY | MUTE_USER;
+ PST mute4 = MUTE_FREQUENCY | MUTE_USER;
+ PST audf1 = 0;
+ PST audf2 = 0;
+ PST audf3 = 0;
+ PST audf4 = 0;
+ PST audc1 = 0;
+ PST audc2 = 0;
+ PST audc3 = 0;
+ PST audc4 = 0;
+ PST tick_cycle1 = NEVER;
+ PST tick_cycle2 = NEVER;
+ PST tick_cycle3 = NEVER;
+ PST tick_cycle4 = NEVER;
+ PST period_cycles1 = 28;
+ PST period_cycles2 = 28;
+ PST period_cycles3 = 28;
+ PST period_cycles4 = 28;
+ PST reload_cycles1 = 28;
+ PST reload_cycles3 = 28;
+ PST out1 = 0;
+ PST out2 = 0;
+ PST out3 = 0;
+ PST out4 = 0;
+ PST delta1 = 0;
+ PST delta2 = 0;
+ PST delta3 = 0;
+ PST delta4 = 0;
+ PST skctl = 3;
+ ZERO_ARRAY(PST delta_buffer);
+}
+
+ASAP_FUNC void PokeySound_Initialize(ASAP_State PTR ast)
+{
+ int i;
+ int reg;
+ reg = 0x1ff;
+ for (i = 0; i < 511; i++) {
+ reg = ((((reg >> 5) ^ reg) & 1) << 8) + (reg >> 1);
+ AST poly9_lookup[i] = (byte) reg;
+ }
+ reg = 0x1ffff;
+ for (i = 0; i < 16385; i++) {
+ reg = ((((reg >> 5) ^ reg) & 0xff) << 9) + (reg >> 8);
+ AST poly17_lookup[i] = (byte) (reg >> 1);
+ }
+ AST sample_offset = 0;
+ AST sample_index = 0;
+ AST samples = 0;
+ AST iir_acc_left = 0;
+ AST iir_acc_right = 0;
+ init_state(ADDRESSOF AST base_pokey);
+ init_state(ADDRESSOF AST extra_pokey);
+}
+
+#define CYCLE_TO_SAMPLE(cycle) (((cycle) * ASAP_SAMPLE_RATE + AST sample_offset) / ASAP_MAIN_CLOCK)
+
+#define DO_TICK(ch) \
+ if (PST init) { \
+ switch (PST audc##ch >> 4) { \
+ case 10: \
+ case 14: \
+ PST out##ch ^= 1; \
+ PST delta_buffer[CYCLE_TO_SAMPLE(cycle)] += PST delta##ch = -PST delta##ch; \
+ break; \
+ default: \
+ break; \
+ } \
+ } \
+ else { \
+ int poly = cycle + PST poly_index - (ch - 1); \
+ int newout = PST out##ch; \
+ switch (PST audc##ch >> 4) { \
+ case 0: \
+ if (poly5_lookup[poly % 31] != 0) { \
+ if ((PST audctl & 0x80) != 0) \
+ newout = AST poly9_lookup[poly % 511] & 1; \
+ else { \
+ poly %= 131071; \
+ newout = (AST poly17_lookup[poly >> 3] >> (poly & 7)) & 1; \
+ } \
+ } \
+ break; \
+ case 2: \
+ case 6: \
+ newout ^= poly5_lookup[poly % 31]; \
+ break; \
+ case 4: \
+ if (poly5_lookup[poly % 31] != 0) \
+ newout = poly4_lookup[poly % 15]; \
+ break; \
+ case 8: \
+ if ((PST audctl & 0x80) != 0) \
+ newout = AST poly9_lookup[poly % 511] & 1; \
+ else { \
+ poly %= 131071; \
+ newout = (AST poly17_lookup[poly >> 3] >> (poly & 7)) & 1; \
+ } \
+ break; \
+ case 10: \
+ case 14: \
+ newout ^= 1; \
+ break; \
+ case 12: \
+ newout = poly4_lookup[poly % 15]; \
+ break; \
+ default: \
+ break; \
+ } \
+ if (newout != PST out##ch) { \
+ PST out##ch = newout; \
+ PST delta_buffer[CYCLE_TO_SAMPLE(cycle)] += PST delta##ch = -PST delta##ch; \
+ } \
+ }
+
+FILE_FUNC void generate(ASAP_State PTR ast, PokeyState PTR pst, int current_cycle)
+{
+ for (;;) {
+ int cycle = current_cycle;
+ if (cycle > PST tick_cycle1)
+ cycle = PST tick_cycle1;
+ if (cycle > PST tick_cycle2)
+ cycle = PST tick_cycle2;
+ if (cycle > PST tick_cycle3)
+ cycle = PST tick_cycle3;
+ if (cycle > PST tick_cycle4)
+ cycle = PST tick_cycle4;
+ if (cycle == current_cycle)
+ break;
+ if (cycle == PST tick_cycle3) {
+ PST tick_cycle3 += PST period_cycles3;
+ if ((PST audctl & 4) != 0 && PST delta1 > 0 && PST mute1 == 0)
+ PST delta_buffer[CYCLE_TO_SAMPLE(cycle)] += PST delta1 = -PST delta1;
+ DO_TICK(3);
+ }
+ if (cycle == PST tick_cycle4) {
+ PST tick_cycle4 += PST period_cycles4;
+ if ((PST audctl & 8) != 0)
+ PST tick_cycle3 = cycle + PST reload_cycles3;
+ if ((PST audctl & 2) != 0 && PST delta2 > 0 && PST mute2 == 0)
+ PST delta_buffer[CYCLE_TO_SAMPLE(cycle)] += PST delta2 = -PST delta2;
+ DO_TICK(4);
+ }
+ if (cycle == PST tick_cycle1) {
+ PST tick_cycle1 += PST period_cycles1;
+ if ((PST skctl & 0x88) == 8)
+ PST tick_cycle2 = cycle + PST period_cycles2;
+ DO_TICK(1);
+ }
+ if (cycle == PST tick_cycle2) {
+ PST tick_cycle2 += PST period_cycles2;
+ if ((PST audctl & 0x10) != 0)
+ PST tick_cycle1 = cycle + PST reload_cycles1;
+ else if ((PST skctl & 8) != 0)
+ PST tick_cycle1 = cycle + PST period_cycles1;
+ DO_TICK(2);
+ }
+ }
+}
+
+#define MUTE_CHANNEL(ch, cond, mask) \
+ if (cond) { \
+ PST mute##ch |= mask; \
+ PST tick_cycle##ch = NEVER; \
+ } \
+ else { \
+ PST mute##ch &= ~mask; \
+ if (PST tick_cycle##ch == NEVER && PST mute##ch == 0) \
+ PST tick_cycle##ch = AST cycle; \
+ }
+
+#define DO_ULTRASOUND(ch) \
+ MUTE_CHANNEL(ch, PST period_cycles##ch <= ULTRASOUND_CYCLES && (PST audc##ch >> 4 == 10 || PST audc##ch >> 4 == 14), MUTE_FREQUENCY)
+
+#define DO_AUDC(ch) \
+ if (data == PST audc##ch) \
+ break; \
+ generate(ast, pst, AST cycle); \
+ PST audc##ch = data; \
+ if ((data & 0x10) != 0) { \
+ data &= 0xf; \
+ if ((PST mute##ch & MUTE_USER) == 0) \
+ PST delta_buffer[CYCLE_TO_SAMPLE(AST cycle)] \
+ += PST delta##ch > 0 ? data - PST delta##ch : data; \
+ PST delta##ch = data; \
+ } \
+ else { \
+ data &= 0xf; \
+ DO_ULTRASOUND(ch); \
+ if (PST delta##ch > 0) { \
+ if ((PST mute##ch & MUTE_USER) == 0) \
+ PST delta_buffer[CYCLE_TO_SAMPLE(AST cycle)] \
+ += data - PST delta##ch; \
+ PST delta##ch = data; \
+ } \
+ else \
+ PST delta##ch = -data; \
+ } \
+ break;
+
+#define DO_INIT(ch, cond) \
+ MUTE_CHANNEL(ch, PST init && cond, MUTE_INIT)
+
+ASAP_FUNC void PokeySound_PutByte(ASAP_State PTR ast, int addr, int data)
+{
+ PokeyState PTR pst = (addr & AST extra_pokey_mask) != 0
+ ? ADDRESSOF AST extra_pokey : ADDRESSOF AST base_pokey;
+ switch (addr & 0xf) {
+ case 0x00:
+ if (data == PST audf1)
+ break;
+ generate(ast, pst, AST cycle);
+ PST audf1 = data;
+ switch (PST audctl & 0x50) {
+ case 0x00:
+ PST period_cycles1 = PST div_cycles * (data + 1);
+ break;
+ case 0x10:
+ PST period_cycles2 = PST div_cycles * (data + 256 * PST audf2 + 1);
+ PST reload_cycles1 = PST div_cycles * (data + 1);
+ DO_ULTRASOUND(2);
+ break;
+ case 0x40:
+ PST period_cycles1 = data + 4;
+ break;
+ case 0x50:
+ PST period_cycles2 = data + 256 * PST audf2 + 7;
+ PST reload_cycles1 = data + 4;
+ DO_ULTRASOUND(2);
+ break;
+ }
+ DO_ULTRASOUND(1);
+ break;
+ case 0x01:
+ DO_AUDC(1)
+ case 0x02:
+ if (data == PST audf2)
+ break;
+ generate(ast, pst, AST cycle);
+ PST audf2 = data;
+ switch (PST audctl & 0x50) {
+ case 0x00:
+ case 0x40:
+ PST period_cycles2 = PST div_cycles * (data + 1);
+ break;
+ case 0x10:
+ PST period_cycles2 = PST div_cycles * (PST audf1 + 256 * data + 1);
+ break;
+ case 0x50:
+ PST period_cycles2 = PST audf1 + 256 * data + 7;
+ break;
+ }
+ DO_ULTRASOUND(2);
+ break;
+ case 0x03:
+ DO_AUDC(2)
+ case 0x04:
+ if (data == PST audf3)
+ break;
+ generate(ast, pst, AST cycle);
+ PST audf3 = data;
+ switch (PST audctl & 0x28) {
+ case 0x00:
+ PST period_cycles3 = PST div_cycles * (data + 1);
+ break;
+ case 0x08:
+ PST period_cycles4 = PST div_cycles * (data + 256 * PST audf4 + 1);
+ PST reload_cycles3 = PST div_cycles * (data + 1);
+ DO_ULTRASOUND(4);
+ break;
+ case 0x20:
+ PST period_cycles3 = data + 4;
+ break;
+ case 0x28:
+ PST period_cycles4 = data + 256 * PST audf4 + 7;
+ PST reload_cycles3 = data + 4;
+ DO_ULTRASOUND(4);
+ break;
+ }
+ DO_ULTRASOUND(3);
+ break;
+ case 0x05:
+ DO_AUDC(3)
+ case 0x06:
+ if (data == PST audf4)
+ break;
+ generate(ast, pst, AST cycle);
+ PST audf4 = data;
+ switch (PST audctl & 0x28) {
+ case 0x00:
+ case 0x20:
+ PST period_cycles4 = PST div_cycles * (data + 1);
+ break;
+ case 0x08:
+ PST period_cycles4 = PST div_cycles * (PST audf3 + 256 * data + 1);
+ break;
+ case 0x28:
+ PST period_cycles4 = PST audf3 + 256 * data + 7;
+ break;
+ }
+ DO_ULTRASOUND(4);
+ break;
+ case 0x07:
+ DO_AUDC(4)
+ case 0x08:
+ if (data == PST audctl)
+ break;
+ generate(ast, pst, AST cycle);
+ PST audctl = data;
+ PST div_cycles = ((data & 1) != 0) ? 114 : 28;
+ /* TODO: tick_cycles */
+ switch (data & 0x50) {
+ case 0x00:
+ PST period_cycles1 = PST div_cycles * (PST audf1 + 1);
+ PST period_cycles2 = PST div_cycles * (PST audf2 + 1);
+ break;
+ case 0x10:
+ PST period_cycles1 = PST div_cycles * 256;
+ PST period_cycles2 = PST div_cycles * (PST audf1 + 256 * PST audf2 + 1);
+ PST reload_cycles1 = PST div_cycles * (PST audf1 + 1);
+ break;
+ case 0x40:
+ PST period_cycles1 = PST audf1 + 4;
+ PST period_cycles2 = PST div_cycles * (PST audf2 + 1);
+ break;
+ case 0x50:
+ PST period_cycles1 = 256;
+ PST period_cycles2 = PST audf1 + 256 * PST audf2 + 7;
+ PST reload_cycles1 = PST audf1 + 4;
+ break;
+ }
+ DO_ULTRASOUND(1);
+ DO_ULTRASOUND(2);
+ switch (data & 0x28) {
+ case 0x00:
+ PST period_cycles3 = PST div_cycles * (PST audf3 + 1);
+ PST period_cycles4 = PST div_cycles * (PST audf4 + 1);
+ break;
+ case 0x08:
+ PST period_cycles3 = PST div_cycles * 256;
+ PST period_cycles4 = PST div_cycles * (PST audf3 + 256 * PST audf4 + 1);
+ PST reload_cycles3 = PST div_cycles * (PST audf3 + 1);
+ break;
+ case 0x20:
+ PST period_cycles3 = PST audf3 + 4;
+ PST period_cycles4 = PST div_cycles * (PST audf4 + 1);
+ break;
+ case 0x28:
+ PST period_cycles3 = 256;
+ PST period_cycles4 = PST audf3 + 256 * PST audf4 + 7;
+ PST reload_cycles3 = PST audf3 + 4;
+ break;
+ }
+ DO_ULTRASOUND(3);
+ DO_ULTRASOUND(4);
+ break;
+ case 0x09:
+ /* TODO: STIMER */
+ break;
+ case 0x0f:
+ PST skctl = data;
+ PST init = ((data & 3) == 0);
+ DO_INIT(1, (PST audctl & 0x40) == 0);
+ DO_INIT(2, (PST audctl & 0x50) != 0x50);
+ DO_INIT(3, (PST audctl & 0x20) == 0);
+ DO_INIT(4, (PST audctl & 0x28) != 0x28);
+ break;
+ default:
+ break;
+ }
+}
+
+ASAP_FUNC int PokeySound_GetRandom(ASAP_State PTR ast, int addr)
+{
+ PokeyState PTR pst = (addr & AST extra_pokey_mask) != 0
+ ? ADDRESSOF AST extra_pokey : ADDRESSOF AST base_pokey;
+ int i;
+ if (PST init)
+ return 0xff;
+ i = AST cycle + PST poly_index;
+ if ((PST audctl & 0x80) != 0)
+ return AST poly9_lookup[i % 511];
+ else {
+ int j;
+ i %= 131071;
+ j = i >> 3;
+ i &= 7;
+ return ((AST poly17_lookup[j] >> i) + (AST poly17_lookup[j + 1] << (8 - i))) & 0xff;
+ }
+}
+
+FILE_FUNC void end_frame(ASAP_State PTR ast, PokeyState PTR pst, int cycle_limit)
+{
+ int m;
+ generate(ast, pst, cycle_limit);
+ PST poly_index += cycle_limit;
+ m = ((PST audctl & 0x80) != 0) ? 15 * 31 * 511 : 15 * 31 * 131071;
+ if (PST poly_index >= 2 * m)
+ PST poly_index -= m;
+ if (PST tick_cycle1 != NEVER)
+ PST tick_cycle1 -= cycle_limit;
+ if (PST tick_cycle2 != NEVER)
+ PST tick_cycle2 -= cycle_limit;
+ if (PST tick_cycle3 != NEVER)
+ PST tick_cycle3 -= cycle_limit;
+ if (PST tick_cycle4 != NEVER)
+ PST tick_cycle4 -= cycle_limit;
+}
+
+ASAP_FUNC void PokeySound_StartFrame(ASAP_State PTR ast)
+{
+ ZERO_ARRAY(AST base_pokey.delta_buffer);
+ if (AST extra_pokey_mask != 0)
+ ZERO_ARRAY(AST extra_pokey.delta_buffer);
+}
+
+ASAP_FUNC void PokeySound_EndFrame(ASAP_State PTR ast, int current_cycle)
+{
+ end_frame(ast, ADDRESSOF AST base_pokey, current_cycle);
+ if (AST extra_pokey_mask != 0)
+ end_frame(ast, ADDRESSOF AST extra_pokey, current_cycle);
+ AST sample_offset += current_cycle * ASAP_SAMPLE_RATE;
+ AST sample_index = 0;
+ AST samples = AST sample_offset / ASAP_MAIN_CLOCK;
+ AST sample_offset %= ASAP_MAIN_CLOCK;
+}
+
+ASAP_FUNC int PokeySound_Generate(ASAP_State PTR ast, byte ARRAY buffer, int buffer_offset, int blocks, ASAP_SampleFormat format)
+{
+ int i = AST sample_index;
+ int samples = AST samples;
+ int acc_left = AST iir_acc_left;
+ int acc_right = AST iir_acc_right;
+ if (blocks < samples - i)
+ samples = i + blocks;
+ else
+ blocks = samples - i;
+ for (; i < samples; i++) {
+ int sample;
+ acc_left += (AST base_pokey.delta_buffer[i] << 20) - (acc_left * 3 >> 10);
+ sample = acc_left >> 10;
+#define STORE_SAMPLE \
+ if (sample < -32767) \
+ sample = -32767; \
+ else if (sample > 32767) \
+ sample = 32767; \
+ switch (format) { \
+ case ASAP_FORMAT_U8: \
+ buffer[buffer_offset++] = (byte) ((sample >> 8) + 128); \
+ break; \
+ case ASAP_FORMAT_S16_LE: \
+ buffer[buffer_offset++] = (byte) sample; \
+ buffer[buffer_offset++] = (byte) (sample >> 8); \
+ break; \
+ case ASAP_FORMAT_S16_BE: \
+ buffer[buffer_offset++] = (byte) (sample >> 8); \
+ buffer[buffer_offset++] = (byte) sample; \
+ break; \
+ }
+ STORE_SAMPLE;
+ if (AST extra_pokey_mask != 0) {
+ acc_right += (AST extra_pokey.delta_buffer[i] << 20) - (acc_right * 3 >> 10);
+ sample = acc_right >> 10;
+ STORE_SAMPLE;
+ }
+ }
+ if (i == AST samples) {
+ acc_left += AST base_pokey.delta_buffer[i] << 20;
+ acc_right += AST extra_pokey.delta_buffer[i] << 20;
+ }
+ AST sample_index = i;
+ AST iir_acc_left = acc_left;
+ AST iir_acc_right = acc_right;
+ return blocks;
+}
+
+ASAP_FUNC abool PokeySound_IsSilent(const PokeyState PTR pst)
+{
+ return ((PST audc1 | PST audc2 | PST audc3 | PST audc4) & 0xf) == 0;
+}
+
+ASAP_FUNC void PokeySound_Mute(const ASAP_State PTR ast, PokeyState PTR pst, int mask)
+{
+ MUTE_CHANNEL(1, (mask & 1) != 0, MUTE_USER);
+ MUTE_CHANNEL(2, (mask & 2) != 0, MUTE_USER);
+ MUTE_CHANNEL(3, (mask & 4) != 0, MUTE_USER);
+ MUTE_CHANNEL(4, (mask & 8) != 0, MUTE_USER);
+}
diff --git a/apps/codecs/asap/asap.c b/apps/codecs/asap/asap.c
new file mode 100644
index 0000000..084708a
--- /dev/null
+++ b/apps/codecs/asap/asap.c
@@ -0,0 +1,2000 @@
+/*
+ * asap.c - ASAP engine
+ *
+ * Copyright (C) 2005-2008 Piotr Fusik
+ *
+ * This file is part of ASAP (Another Slight Atari Player),
+ * see http://asap.sourceforge.net
+ *
+ * ASAP is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published
+ * by the Free Software Foundation; either version 2 of the License,
+ * or (at your option) any later version.
+ *
+ * ASAP is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty
+ * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with ASAP; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#if !defined(JAVA) && !defined(CSHARP)
+#include <string.h>
+#endif
+
+#include "asap_internal.h"
+#if !defined(JAVA) && !defined(CSHARP)
+#include "players.h"
+#endif
+
+#define CMR_BASS_TABLE_OFFSET 0x70f
+
+CONST_LOOKUP(byte, cmr_bass_table) = {
+ 0x5C, 0x56, 0x50, 0x4D, 0x47, 0x44, 0x41, 0x3E,
+ 0x38, 0x35, (byte) 0x88, 0x7F, 0x79, 0x73, 0x6C, 0x67,
+ 0x60, 0x5A, 0x55, 0x51, 0x4C, 0x48, 0x43, 0x3F,
+ 0x3D, 0x39, 0x34, 0x33, 0x30, 0x2D, 0x2A, 0x28,
+ 0x25, 0x24, 0x21, 0x1F, 0x1E
+};
+
+ASAP_FUNC int ASAP_GetByte(ASAP_State PTR ast, int addr)
+{
+ switch (addr & 0xff0f) {
+ case 0xd20a:
+ return PokeySound_GetRandom(ast, addr);
+ case 0xd20e:
+ if ((addr & AST extra_pokey_mask) != 0)
+ return 0xff;
+ return AST irqst;
+ case 0xd20f:
+ return 0xff;
+ case 0xd40b:
+ return AST scanline_number >> 1;
+ default:
+ return dGetByte(addr);
+ }
+}
+
+ASAP_FUNC void ASAP_PutByte(ASAP_State PTR ast, int addr, int data)
+{
+ if ((addr >> 8) == 0xd2) {
+ if ((addr & (AST extra_pokey_mask + 0xf)) == 0xe) {
+ AST irqst |= data ^ 0xff;
+#define SET_TIMER_IRQ(ch) \
+ if ((data & AST irqst & ch) != 0) { \
+ if (AST timer##ch##_cycle == NEVER) { \
+ int t = AST base_pokey.tick_cycle##ch; \
+ while (t < AST cycle) \
+ t += AST base_pokey.period_cycles##ch; \
+ AST timer##ch##_cycle = t; \
+ if (AST nearest_event_cycle > t) \
+ AST nearest_event_cycle = t; \
+ } \
+ } \
+ else \
+ AST timer##ch##_cycle = NEVER;
+ SET_TIMER_IRQ(1);
+ SET_TIMER_IRQ(2);
+ SET_TIMER_IRQ(4);
+ }
+ else
+ PokeySound_PutByte(ast, addr, data);
+ }
+ else if ((addr & 0xff0f) == 0xd40a) {
+ if (AST cycle <= AST next_scanline_cycle - 8)
+ AST cycle = AST next_scanline_cycle - 8;
+ else
+ AST cycle = AST next_scanline_cycle + 106;
+ }
+ else
+ dPutByte(addr, data);
+}
+
+#define MAX_SONGS 32
+
+CONST_LOOKUP(int, perframe2fastplay) = { 312, 312 / 2, 312 / 3, 312 / 4 };
+
+FILE_FUNC abool load_native(ASAP_State PTR ast, ASAP_ModuleInfo PTR module_info,
+ const byte ARRAY module, int module_len, ASAP_OBX player)
+{
+#if defined(JAVA) || defined(CSHARP)
+ try
+#endif
+ {
+ int player_last_byte;
+ int block_len;
+ if (UBYTE(module[0]) != 0xff || UBYTE(module[1]) != 0xff)
+ return FALSE;
+#ifdef JAVA
+ try {
+ player.read();
+ player.read();
+ MODULE_INFO player = player.read();
+ MODULE_INFO player += player.read() << 8;
+ player_last_byte = player.read();
+ player_last_byte += player.read() << 8;
+ } catch (IOException e) {
+ throw new RuntimeException();
+ }
+#elif defined(CSHARP)
+ player.ReadByte();
+ player.ReadByte();
+ MODULE_INFO player = player.ReadByte();
+ MODULE_INFO player += player.ReadByte() << 8;
+ player_last_byte = player.ReadByte();
+ player_last_byte += player.ReadByte() << 8;
+#else
+ MODULE_INFO player = UBYTE(player[2]) + (UBYTE(player[3]) << 8);
+ player_last_byte = UBYTE(player[4]) + (UBYTE(player[5]) << 8);
+#endif
+ MODULE_INFO music = UBYTE(module[2]) + (UBYTE(module[3]) << 8);
+ if (MODULE_INFO music <= player_last_byte)
+ return FALSE;
+ block_len = UBYTE(module[4]) + (UBYTE(module[5]) << 8) + 1 - MODULE_INFO music;
+ if (6 + block_len != module_len) {
+ int info_addr;
+ int info_len;
+ if (MODULE_INFO type != 'r' || 11 + block_len > module_len)
+ return FALSE;
+ /* allow optional info for Raster Music Tracker */
+ info_addr = UBYTE(module[6 + block_len]) + (UBYTE(module[7 + block_len]) << 8);
+ if (info_addr != MODULE_INFO music + block_len)
+ return FALSE;
+ info_len = UBYTE(module[8 + block_len]) + (UBYTE(module[9 + block_len]) << 8) + 1 - info_addr;
+ if (10 + block_len + info_len != module_len)
+ return FALSE;
+ }
+ if (ast != NULL) {
+ COPY_ARRAY(AST memory, MODULE_INFO music, module, 6, block_len);
+#ifdef JAVA
+ int addr = MODULE_INFO player;
+ do {
+ int i;
+ try {
+ i = player.read(AST memory, addr, player_last_byte + 1 - addr);
+ } catch (IOException e) {
+ throw new RuntimeException();
+ }
+ if (i <= 0)
+ throw new RuntimeException();
+ addr += i;
+ } while (addr <= player_last_byte);
+#elif defined(CSHARP)
+ int addr = MODULE_INFO player;
+ do {
+ int i = player.Read(AST memory, addr, player_last_byte + 1 - addr);
+ if (i <= 0)
+ throw new Exception();
+ addr += i;
+ } while (addr <= player_last_byte);
+#else
+ COPY_ARRAY(AST memory, MODULE_INFO player, player, 6, player_last_byte + 1 - MODULE_INFO player);
+#endif
+ }
+ return TRUE;
+ }
+#ifdef JAVA
+ finally {
+ try {
+ player.close();
+ } catch (IOException e) {
+ throw new RuntimeException();
+ }
+ }
+#elif defined(CSHARP)
+ finally {
+ player.Close();
+ }
+#endif
+}
+
+FILE_FUNC void set_song_duration(ASAP_ModuleInfo PTR module_info, int player_calls)
+{
+ MODULE_INFO durations[MODULE_INFO songs] = (int) (player_calls * MODULE_INFO fastplay * 114000.0 / 1773447);
+ MODULE_INFO songs++;
+}
+
+#define SEEN_THIS_CALL 1
+#define SEEN_BEFORE 2
+#define SEEN_REPEAT 3
+
+FILE_FUNC void parse_cmc_song(ASAP_ModuleInfo PTR module_info, const byte ARRAY module, int pos)
+{
+ int tempo = UBYTE(module[0x19]);
+ int player_calls = 0;
+ int rep_start_pos = 0;
+ int rep_end_pos = 0;
+ int rep_times = 0;
+ NEW_ARRAY(byte, seen, 0x55);
+ INIT_ARRAY(seen);
+ while (pos >= 0 && pos < 0x55) {
+ int p1;
+ int p2;
+ int p3;
+ if (pos == rep_end_pos && rep_times > 0) {
+ for (p1 = 0; p1 < 0x55; p1++)
+ if (seen[p1] == SEEN_THIS_CALL || seen[p1] == SEEN_REPEAT)
+ seen[p1] = 0;
+ rep_times--;
+ pos = rep_start_pos;
+ }
+ if (seen[pos] != 0) {
+ if (seen[pos] != SEEN_THIS_CALL)
+ MODULE_INFO loops[MODULE_INFO songs] = TRUE;
+ break;
+ }
+ seen[pos] = SEEN_THIS_CALL;
+ p1 = UBYTE(module[0x206 + pos]);
+ p2 = UBYTE(module[0x25b + pos]);
+ p3 = UBYTE(module[0x2b0 + pos]);
+ if (p1 == 0xfe || p2 == 0xfe || p3 == 0xfe) {
+ pos++;
+ continue;
+ }
+ p1 >>= 4;
+ if (p1 == 8)
+ break;
+ if (p1 == 9) {
+ pos = p2;
+ continue;
+ }
+ if (p1 == 0xa) {
+ pos -= p2;
+ continue;
+ }
+ if (p1 == 0xb) {
+ pos += p2;
+ continue;
+ }
+ if (p1 == 0xc) {
+ tempo = p2;
+ pos++;
+ continue;
+ }
+ if (p1 == 0xd) {
+ pos++;
+ rep_start_pos = pos;
+ rep_end_pos = pos + p2;
+ rep_times = p3 - 1;
+ continue;
+ }
+ if (p1 == 0xe) {
+ MODULE_INFO loops[MODULE_INFO songs] = TRUE;
+ break;
+ }
+ p2 = rep_times > 0 ? SEEN_REPEAT : SEEN_BEFORE;
+ for (p1 = 0; p1 < 0x55; p1++)
+ if (seen[p1] == SEEN_THIS_CALL)
+ seen[p1] = (byte) p2;
+ player_calls += tempo << 6;
+ pos++;
+ }
+ set_song_duration(module_info, player_calls);
+}
+
+FILE_FUNC abool parse_cmc(ASAP_State PTR ast, ASAP_ModuleInfo PTR module_info,
+ const byte ARRAY module, int module_len, abool cmr)
+{
+ int last_pos;
+ int pos;
+ if (module_len < 0x306)
+ return FALSE;
+ MODULE_INFO type = cmr ? 'z' : 'c';
+ if (!load_native(ast, module_info, module, module_len, GET_OBX(cmc)))
+ return FALSE;
+ if (ast != NULL && cmr)
+ COPY_ARRAY(AST memory, 0x500 + CMR_BASS_TABLE_OFFSET, cmr_bass_table, 0, sizeof(cmr_bass_table));
+ /* auto-detect number of subsongs */
+ last_pos = 0x54;
+ while (--last_pos >= 0) {
+ if (UBYTE(module[0x206 + last_pos]) < 0xb0
+ || UBYTE(module[0x25b + last_pos]) < 0x40
+ || UBYTE(module[0x2b0 + last_pos]) < 0x40)
+ break;
+ }
+ MODULE_INFO songs = 0;
+ parse_cmc_song(module_info, module, 0);
+ for (pos = 0; pos < last_pos && MODULE_INFO songs < MAX_SONGS; pos++)
+ if (UBYTE(module[0x206 + pos]) == 0x8f || UBYTE(module[0x206 + pos]) == 0xef)
+ parse_cmc_song(module_info, module, pos + 1);
+ return TRUE;
+}
+
+FILE_FUNC void parse_mpt_song(ASAP_ModuleInfo PTR module_info, const byte ARRAY module,
+ abool ARRAY global_seen, int song_len, int pos)
+{
+ int addr_to_offset = UBYTE(module[2]) + (UBYTE(module[3]) << 8) - 6;
+ int tempo = UBYTE(module[0x1cf]);
+ int player_calls = 0;
+ NEW_ARRAY(byte, seen, 256);
+ NEW_ARRAY(int, pattern_offset, 4);
+ NEW_ARRAY(int, blank_rows, 4);
+ NEW_ARRAY(int, blank_rows_counter, 4);
+ INIT_ARRAY(seen);
+ INIT_ARRAY(blank_rows);
+ while (pos < song_len) {
+ int i;
+ int ch;
+ int pattern_rows;
+ if (seen[pos] != 0) {
+ if (seen[pos] != SEEN_THIS_CALL)
+ MODULE_INFO loops[MODULE_INFO songs] = TRUE;
+ break;
+ }
+ seen[pos] = SEEN_THIS_CALL;
+ global_seen[pos] = TRUE;
+ i = UBYTE(module[0x1d0 + pos * 2]);
+ if (i == 0xff) {
+ pos = UBYTE(module[0x1d1 + pos * 2]);
+ continue;
+ }
+ for (ch = 3; ch >= 0; ch--) {
+ i = UBYTE(module[0x1c6 + ch]) + (UBYTE(module[0x1ca + ch]) << 8) - addr_to_offset;
+ i = UBYTE(module[i + pos * 2]);
+ if (i >= 0x40)
+ break;
+ i <<= 1;
+ i = UBYTE(module[0x46 + i]) + (UBYTE(module[0x47 + i]) << 8);
+ pattern_offset[ch] = i == 0 ? 0 : i - addr_to_offset;
+ blank_rows_counter[ch] = 0;
+ }
+ if (ch >= 0)
+ break;
+ for (i = 0; i < song_len; i++)
+ if (seen[i] == SEEN_THIS_CALL)
+ seen[i] = SEEN_BEFORE;
+ for (pattern_rows = UBYTE(module[0x1ce]); --pattern_rows >= 0; ) {
+ for (ch = 3; ch >= 0; ch--) {
+ if (pattern_offset[ch] == 0 || --blank_rows_counter[ch] >= 0)
+ continue;
+ for (;;) {
+ i = UBYTE(module[pattern_offset[ch]++]);
+ if (i < 0x40 || i == 0xfe)
+ break;
+ if (i < 0x80)
+ continue;
+ if (i < 0xc0) {
+ blank_rows[ch] = i - 0x80;
+ continue;
+ }
+ if (i < 0xd0)
+ continue;
+ if (i < 0xe0) {
+ tempo = i - 0xcf;
+ continue;
+ }
+ pattern_rows = 0;
+ }
+ blank_rows_counter[ch] = blank_rows[ch];
+ }
+ player_calls += tempo;
+ }
+ pos++;
+ }
+ if (player_calls > 0)
+ set_song_duration(module_info, player_calls);
+}
+
+FILE_FUNC abool parse_mpt(ASAP_State PTR ast, ASAP_ModuleInfo PTR module_info,
+ const byte ARRAY module, int module_len)
+{
+ int track0_addr;
+ int pos;
+ int song_len;
+ /* seen[i] == TRUE if the track position i has been processed */
+ NEW_ARRAY(abool, global_seen, 256);
+ if (module_len < 0x1d0)
+ return FALSE;
+ MODULE_INFO type = 'm';
+ if (!load_native(ast, module_info, module, module_len, GET_OBX(mpt)))
+ return FALSE;
+ track0_addr = UBYTE(module[2]) + (UBYTE(module[3]) << 8) + 0x1ca;
+ if (UBYTE(module[0x1c6]) + (UBYTE(module[0x1ca]) << 8) != track0_addr)
+ return FALSE;
+ /* Calculate the length of the first track. Address of the second track minus
+ address of the first track equals the length of the first track in bytes.
+ Divide by two to get number of track positions. */
+ song_len = (UBYTE(module[0x1c7]) + (UBYTE(module[0x1cb]) << 8) - track0_addr) >> 1;
+ if (song_len > 0xfe)
+ return FALSE;
+ INIT_ARRAY(global_seen);
+ MODULE_INFO songs = 0;
+ for (pos = 0; pos < song_len && MODULE_INFO songs < MAX_SONGS; pos++) {
+ if (!global_seen[pos]) {
+ MODULE_INFO song_pos[MODULE_INFO songs] = (byte) pos;
+ parse_mpt_song(module_info, module, global_seen, song_len, pos);
+ }
+ }
+ return MODULE_INFO songs != 0;
+}
+
+CONST_LOOKUP(byte, rmt_volume_silent) = { 16, 8, 4, 3, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1 };
+
+FILE_FUNC int rmt_instrument_frames(const byte ARRAY module, int instrument, int volume, int volume_frame, abool extra_pokey)
+{
+ int addr_to_offset = UBYTE(module[2]) + (UBYTE(module[3]) << 8) - 6;
+ int per_frame = module[0xc];
+ int player_call;
+ int player_calls;
+ int index;
+ int index_end;
+ int index_loop;
+ int volume_slide_depth;
+ int volume_min;
+ abool looping;
+ int volume_slide;
+ abool silent_loop;
+ instrument = UBYTE(module[0xe]) + (UBYTE(module[0xf]) << 8) - addr_to_offset + (instrument << 1);
+ if (module[instrument + 1] == 0)
+ return 0;
+ instrument = UBYTE(module[instrument]) + (UBYTE(module[instrument + 1]) << 8) - addr_to_offset;
+ player_calls = player_call = volume_frame * per_frame;
+ index = UBYTE(module[instrument]) + 1 + player_call * 3;
+ index_end = UBYTE(module[instrument + 2]) + 3;
+ index_loop = UBYTE(module[instrument + 3]);
+ if (index_loop >= index_end)
+ return 0; /* error */
+ volume_slide_depth = UBYTE(module[instrument + 6]);
+ volume_min = UBYTE(module[instrument + 7]);
+ looping = index >= index_end;
+ if (looping)
+ index = (index - index_end) % (index_end - index_loop) + index_loop;
+ else {
+ do {
+ int vol = module[instrument + index];
+ if (extra_pokey)
+ vol >>= 4;
+ if ((vol & 0xf) >= rmt_volume_silent[volume])
+ player_calls = player_call + 1;
+ player_call++;
+ index += 3;
+ } while (index < index_end);
+ }
+ if (volume_slide_depth == 0)
+ return player_calls / per_frame;
+ volume_slide = 128;
+ silent_loop = FALSE;
+ for (;;) {
+ int vol;
+ if (index >= index_end) {
+ if (silent_loop)
+ break;
+ silent_loop = TRUE;
+ index = index_loop;
+ }
+ vol = module[instrument + index];
+ if (extra_pokey)
+ vol >>= 4;
+ if ((vol & 0xf) >= rmt_volume_silent[volume]) {
+ player_calls = player_call + 1;
+ silent_loop = FALSE;
+ }
+ player_call++;
+ index += 3;
+ volume_slide -= volume_slide_depth;
+ if (volume_slide < 0) {
+ volume_slide += 256;
+ if (--volume <= volume_min)
+ break;
+ }
+ }
+ return player_calls / per_frame;
+}
+
+FILE_FUNC void parse_rmt_song(ASAP_ModuleInfo PTR module_info, const byte ARRAY module,
+ abool ARRAY global_seen, int song_len, int pos_shift, int pos)
+{
+ int ch;
+ int addr_to_offset = UBYTE(module[2]) + (UBYTE(module[3]) << 8) - 6;
+ int tempo = UBYTE(module[0xb]);
+ int frames = 0;
+ int song_offset = UBYTE(module[0x14]) + (UBYTE(module[0x15]) << 8) - addr_to_offset;
+ int pattern_lo_offset = UBYTE(module[0x10]) + (UBYTE(module[0x11]) << 8) - addr_to_offset;
+ int pattern_hi_offset = UBYTE(module[0x12]) + (UBYTE(module[0x13]) << 8) - addr_to_offset;
+ int instrument_frames;
+ NEW_ARRAY(byte, seen, 256);
+ NEW_ARRAY(int, pattern_begin, 8);
+ NEW_ARRAY(int, pattern_offset, 8);
+ NEW_ARRAY(int, blank_rows, 8);
+ NEW_ARRAY(int, instrument_no, 8);
+ NEW_ARRAY(int, instrument_frame, 8);
+ NEW_ARRAY(int, volume_value, 8);
+ NEW_ARRAY(int, volume_frame, 8);
+ INIT_ARRAY(seen);
+ INIT_ARRAY(instrument_no);
+ INIT_ARRAY(instrument_frame);
+ INIT_ARRAY(volume_value);
+ INIT_ARRAY(volume_frame);
+ while (pos < song_len) {
+ int i;
+ int pattern_rows;
+ if (seen[pos] != 0) {
+ if (seen[pos] != SEEN_THIS_CALL)
+ MODULE_INFO loops[MODULE_INFO songs] = TRUE;
+ break;
+ }
+ seen[pos] = SEEN_THIS_CALL;
+ global_seen[pos] = TRUE;
+ if (UBYTE(module[song_offset + (pos << pos_shift)]) == 0xfe) {
+ pos = UBYTE(module[song_offset + (pos << pos_shift) + 1]);
+ continue;
+ }
+ for (ch = 0; ch < 1 << pos_shift; ch++) {
+ i = UBYTE(module[song_offset + (pos << pos_shift) + ch]);
+ if (i == 0xff)
+ blank_rows[ch] = 256;
+ else {
+ pattern_offset[ch] = pattern_begin[ch] = UBYTE(module[pattern_lo_offset + i])
+ + (UBYTE(module[pattern_hi_offset + i]) << 8) - addr_to_offset;
+ blank_rows[ch] = 0;
+ }
+ }
+ for (i = 0; i < song_len; i++)
+ if (seen[i] == SEEN_THIS_CALL)
+ seen[i] = SEEN_BEFORE;
+ for (pattern_rows = UBYTE(module[0xa]); --pattern_rows >= 0; ) {
+ for (ch = 0; ch < 1 << pos_shift; ch++) {
+ if (--blank_rows[ch] > 0)
+ continue;
+ for (;;) {
+ i = UBYTE(module[pattern_offset[ch]++]);
+ if ((i & 0x3f) < 62) {
+ i += UBYTE(module[pattern_offset[ch]++]) << 8;
+ if ((i & 0x3f) != 61) {
+ instrument_no[ch] = i >> 10;
+ instrument_frame[ch] = frames;
+ }
+ volume_value[ch] = (i >> 6) & 0xf;
+ volume_frame[ch] = frames;
+ break;
+ }
+ if (i == 62) {
+ blank_rows[ch] = UBYTE(module[pattern_offset[ch]++]);
+ break;
+ }
+ if ((i & 0x3f) == 62) {
+ blank_rows[ch] = i >> 6;
+ break;
+ }
+ if ((i & 0xbf) == 63) {
+ tempo = UBYTE(module[pattern_offset[ch]++]);
+ continue;
+ }
+ if (i == 0xbf) {
+ pattern_offset[ch] = pattern_begin[ch] + UBYTE(module[pattern_offset[ch]]);
+ continue;
+ }
+ /* assert(i == 0xff); */
+ pattern_rows = -1;
+ break;
+ }
+ if (pattern_rows < 0)
+ break;
+ }
+ if (pattern_rows >= 0)
+ frames += tempo;
+ }
+ pos++;
+ }
+ instrument_frames = 0;
+ for (ch = 0; ch < 1 << pos_shift; ch++) {
+ int frame = instrument_frame[ch];
+ frame += rmt_instrument_frames(module, instrument_no[ch], volume_value[ch], volume_frame[ch] - frame, ch >= 4);
+ if (instrument_frames < frame)
+ instrument_frames = frame;
+ }
+ if (frames > instrument_frames) {
+ if (frames - instrument_frames > 100)
+ MODULE_INFO loops[MODULE_INFO songs] = FALSE;
+ frames = instrument_frames;
+ }
+ if (frames > 0)
+ set_song_duration(module_info, frames);
+}
+
+FILE_FUNC abool parse_rmt(ASAP_State PTR ast, ASAP_ModuleInfo PTR module_info,
+ const byte ARRAY module, int module_len)
+{
+ int per_frame;
+ int pos_shift;
+ int song_len;
+ int pos;
+ NEW_ARRAY(abool, global_seen, 256);
+ if (module_len < 0x30 || module[6] != 'R' || module[7] != 'M'
+ || module[8] != 'T' || module[0xd] != 1)
+ return FALSE;
+ switch ((char) module[9]) {
+ case '4':
+ pos_shift = 2;
+ break;
+ case '8':
+ MODULE_INFO channels = 2;
+ pos_shift = 3;
+ break;
+ default:
+ return FALSE;
+ }
+ per_frame = module[0xc];
+ if (per_frame < 1 || per_frame > 4)
+ return FALSE;
+ MODULE_INFO type = 'r';
+ if (!load_native(ast, module_info, module, module_len,
+ MODULE_INFO channels == 2 ? GET_OBX(rmt8) : GET_OBX(rmt4)))
+ return FALSE;
+ song_len = UBYTE(module[4]) + (UBYTE(module[5]) << 8) + 1
+ - UBYTE(module[0x14]) - (UBYTE(module[0x15]) << 8);
+ if (pos_shift == 3 && (song_len & 4) != 0
+ && UBYTE(module[6 + UBYTE(module[4]) + (UBYTE(module[5]) << 8)
+ - UBYTE(module[2]) - (UBYTE(module[3]) << 8) - 3]) == 0xfe)
+ song_len += 4;
+ song_len >>= pos_shift;
+ if (song_len >= 0x100)
+ return FALSE;
+ INIT_ARRAY(global_seen);
+ MODULE_INFO songs = 0;
+ for (pos = 0; pos < song_len && MODULE_INFO songs < MAX_SONGS; pos++) {
+ if (!global_seen[pos]) {
+ MODULE_INFO song_pos[MODULE_INFO songs] = (byte) pos;
+ parse_rmt_song(module_info, module, global_seen, song_len, pos_shift, pos);
+ }
+ }
+ /* must set fastplay after song durations calculations, so they assume 312 */
+ MODULE_INFO fastplay = perframe2fastplay[per_frame - 1];
+ MODULE_INFO player = 0x600;
+ return MODULE_INFO songs != 0;
+}
+
+FILE_FUNC void parse_tmc_song(ASAP_ModuleInfo PTR module_info, const byte ARRAY module, int pos)
+{
+ int addr_to_offset = UBYTE(module[2]) + (UBYTE(module[3]) << 8) - 6;
+ int tempo = UBYTE(module[0x24]) + 1;
+ int frames = 0;
+ NEW_ARRAY(int, pattern_offset, 8);
+ NEW_ARRAY(int, blank_rows, 8);
+ while (UBYTE(module[0x1a6 + 15 + pos]) < 0x80) {
+ int ch;
+ int pattern_rows;
+ for (ch = 7; ch >= 0; ch--) {
+ int pat = UBYTE(module[0x1a6 + 15 + pos - 2 * ch]);
+ pattern_offset[ch] = UBYTE(module[0xa6 + pat]) + (UBYTE(module[0x126 + pat]) << 8) - addr_to_offset;
+ blank_rows[ch] = 0;
+ }
+ for (pattern_rows = 64; --pattern_rows >= 0; ) {
+ for (ch = 7; ch >= 0; ch--) {
+ if (--blank_rows[ch] >= 0)
+ continue;
+ for (;;) {
+ int i = UBYTE(module[pattern_offset[ch]++]);
+ if (i < 0x40) {
+ pattern_offset[ch]++;
+ break;
+ }
+ if (i == 0x40) {
+ i = UBYTE(module[pattern_offset[ch]++]);
+ if ((i & 0x7f) == 0)
+ pattern_rows = 0;
+ else
+ tempo = (i & 0x7f) + 1;
+ if (i >= 0x80)
+ pattern_offset[ch]++;
+ break;
+ }
+ if (i < 0x80) {
+ i = module[pattern_offset[ch]++] & 0x7f;
+ if (i == 0)
+ pattern_rows = 0;
+ else
+ tempo = i + 1;
+ pattern_offset[ch]++;
+ break;
+ }
+ if (i < 0xc0)
+ continue;
+ blank_rows[ch] = i - 0xbf;
+ break;
+ }
+ }
+ frames += tempo;
+ }
+ pos += 16;
+ }
+ if (UBYTE(module[0x1a6 + 14 + pos]) < 0x80)
+ MODULE_INFO loops[MODULE_INFO songs] = TRUE;
+ set_song_duration(module_info, frames);
+}
+
+FILE_FUNC abool parse_tmc(ASAP_State PTR ast, ASAP_ModuleInfo PTR module_info,
+ const byte ARRAY module, int module_len)
+{
+ int i;
+ int last_pos;
+ if (module_len < 0x1d0)
+ return FALSE;
+ MODULE_INFO type = 't';
+ if (!load_native(ast, module_info, module, module_len, GET_OBX(tmc)))
+ return FALSE;
+ MODULE_INFO channels = 2;
+ i = 0;
+ /* find first instrument */
+ while (module[0x66 + i] == 0) {
+ if (++i >= 64)
+ return FALSE; /* no instrument */
+ }
+ last_pos = (UBYTE(module[0x66 + i]) << 8) + UBYTE(module[0x26 + i])
+ - UBYTE(module[2]) - (UBYTE(module[3]) << 8) - 0x1b0;
+ if (0x1b5 + last_pos >= module_len)
+ return FALSE;
+ /* skip trailing jumps */
+ do {
+ if (last_pos <= 0)
+ return FALSE; /* no pattern to play */
+ last_pos -= 16;
+ } while (UBYTE(module[0x1b5 + last_pos]) >= 0x80);
+ MODULE_INFO songs = 0;
+ parse_tmc_song(module_info, module, 0);
+ for (i = 0; i < last_pos && MODULE_INFO songs < MAX_SONGS; i += 16)
+ if (UBYTE(module[0x1b5 + i]) >= 0x80)
+ parse_tmc_song(module_info, module, i + 16);
+ /* must set fastplay after song durations calculations, so they assume 312 */
+ i = module[0x25];
+ if (i < 1 || i > 4)
+ return FALSE;
+ if (ast != NULL)
+ AST tmc_per_frame = module[0x25];
+ MODULE_INFO fastplay = perframe2fastplay[i - 1];
+ return TRUE;
+}
+
+FILE_FUNC void parse_tm2_song(ASAP_ModuleInfo PTR module_info, const byte ARRAY module, int pos)
+{
+ int addr_to_offset = UBYTE(module[2]) + (UBYTE(module[3]) << 8) - 6;
+ int tempo = UBYTE(module[0x24]) + 1;
+ int player_calls = 0;
+ NEW_ARRAY(int, pattern_offset, 8);
+ NEW_ARRAY(int, blank_rows, 8);
+ for (;;) {
+ int ch;
+ int pattern_rows = UBYTE(module[0x386 + 16 + pos]);
+ if (pattern_rows == 0)
+ break;
+ if (pattern_rows >= 0x80) {
+ MODULE_INFO loops[MODULE_INFO songs] = TRUE;
+ break;
+ }
+ for (ch = 7; ch >= 0; ch--) {
+ int pat = UBYTE(module[0x386 + 15 + pos - 2 * ch]);
+ pattern_offset[ch] = UBYTE(module[0x106 + pat]) + (UBYTE(module[0x206 + pat]) << 8) - addr_to_offset;
+ blank_rows[ch] = 0;
+ }
+ while (--pattern_rows >= 0) {
+ for (ch = 7; ch >= 0; ch--) {
+ if (--blank_rows[ch] >= 0)
+ continue;
+ for (;;) {
+ int i = UBYTE(module[pattern_offset[ch]++]);
+ if (i == 0) {
+ pattern_offset[ch]++;
+ break;
+ }
+ if (i < 0x40) {
+ if (UBYTE(module[pattern_offset[ch]++]) >= 0x80)
+ pattern_offset[ch]++;
+ break;
+ }
+ if (i < 0x80) {
+ pattern_offset[ch]++;
+ break;
+ }
+ if (i == 0x80) {
+ blank_rows[ch] = UBYTE(module[pattern_offset[ch]++]);
+ break;
+ }
+ if (i < 0xc0)
+ break;
+ if (i < 0xd0) {
+ tempo = i - 0xbf;
+ continue;
+ }
+ if (i < 0xe0) {
+ pattern_offset[ch]++;
+ break;
+ }
+ if (i < 0xf0) {
+ pattern_offset[ch] += 2;
+ break;
+ }
+ if (i < 0xff) {
+ blank_rows[ch] = i - 0xf0;
+ break;
+ }
+ blank_rows[ch] = 64;
+ break;
+ }
+ }
+ player_calls += tempo;
+ }
+ pos += 17;
+ }
+ set_song_duration(module_info, player_calls);
+}
+
+FILE_FUNC abool parse_tm2(ASAP_State PTR ast, ASAP_ModuleInfo PTR module_info,
+ const byte ARRAY module, int module_len)
+{
+ int i;
+ int last_pos;
+ int c;
+ if (module_len < 0x3a4)
+ return FALSE;
+ MODULE_INFO type = 'T';
+ if (!load_native(ast, module_info, module, module_len, GET_OBX(tm2)))
+ return FALSE;
+ i = module[0x25];
+ if (i < 1 || i > 4)
+ return FALSE;
+ MODULE_INFO fastplay = perframe2fastplay[i - 1];
+ MODULE_INFO player = 0x500;
+ if (module[0x1f] != 0)
+ MODULE_INFO channels = 2;
+ last_pos = 0xffff;
+ for (i = 0; i < 0x80; i++) {
+ int instr_addr = UBYTE(module[0x86 + i]) + (UBYTE(module[0x306 + i]) << 8);
+ if (instr_addr != 0 && instr_addr < last_pos)
+ last_pos = instr_addr;
+ }
+ for (i = 0; i < 0x100; i++) {
+ int pattern_addr = UBYTE(module[0x106 + i]) + (UBYTE(module[0x206 + i]) << 8);
+ if (pattern_addr != 0 && pattern_addr < last_pos)
+ last_pos = pattern_addr;
+ }
+ last_pos -= UBYTE(module[2]) + (UBYTE(module[3]) << 8) + 0x380;
+ if (0x386 + last_pos >= module_len)
+ return FALSE;
+ /* skip trailing stop/jump commands */
+ do {
+ if (last_pos <= 0)
+ return FALSE;
+ last_pos -= 17;
+ c = UBYTE(module[0x386 + 16 + last_pos]);
+ } while (c == 0 || c >= 0x80);
+ MODULE_INFO songs = 0;
+ parse_tm2_song(module_info, module, 0);
+ for (i = 0; i < last_pos && MODULE_INFO songs < MAX_SONGS; i += 17) {
+ c = UBYTE(module[0x386 + 16 + i]);
+ if (c == 0 || c >= 0x80)
+ parse_tm2_song(module_info, module, i + 17);
+ }
+ return TRUE;
+}
+
+#if !defined(JAVA) && !defined(CSHARP)
+
+static abool parse_hex(int *retval, const char *p)
+{
+ int r = 0;
+ do {
+ char c = *p;
+ if (r > 0xfff)
+ return FALSE;
+ r <<= 4;
+ if (c >= '0' && c <= '9')
+ r += c - '0';
+ else if (c >= 'A' && c <= 'F')
+ r += c - 'A' + 10;
+ else if (c >= 'a' && c <= 'f')
+ r += c - 'a' + 10;
+ else
+ return FALSE;
+ } while (*++p != '\0');
+ *retval = r;
+ return TRUE;
+}
+
+static abool parse_dec(int *retval, const char *p, int minval, int maxval)
+{
+ int r = 0;
+ do {
+ char c = *p;
+ if (c >= '0' && c <= '9')
+ r = 10 * r + c - '0';
+ else
+ return FALSE;
+ if (r > maxval)
+ return FALSE;
+ } while (*++p != '\0');
+ if (r < minval)
+ return FALSE;
+ *retval = r;
+ return TRUE;
+}
+
+static abool parse_text(char *retval, const char *p)
+{
+ int i;
+ if (*p != '"')
+ return FALSE;
+ p++;
+ if (p[0] == '<' && p[1] == '?' && p[2] == '>' && p[3] == '"')
+ return TRUE;
+ i = 0;
+ while (*p != '"') {
+ if (i >= 127)
+ return FALSE;
+ if (*p == '\0')
+ return FALSE;
+ retval[i++] = *p++;
+ }
+ retval[i] = '\0';
+ return TRUE;
+}
+
+int ASAP_ParseDuration(const char *s)
+{
+ int r;
+ if (*s < '0' || *s > '9')
+ return -1;
+ r = *s++ - '0';
+ if (*s >= '0' && *s <= '9')
+ r = 10 * r + *s++ - '0';
+ if (*s == ':') {
+ s++;
+ if (*s < '0' || *s > '5')
+ return -1;
+ r = 60 * r + (*s++ - '0') * 10;
+ if (*s < '0' || *s > '9')
+ return -1;
+ r += *s++ - '0';
+ }
+ r *= 1000;
+ if (*s != '.')
+ return r;
+ s++;
+ if (*s < '0' || *s > '9')
+ return r;
+ r += 100 * (*s++ - '0');
+ if (*s < '0' || *s > '9')
+ return r;
+ r += 10 * (*s++ - '0');
+ if (*s < '0' || *s > '9')
+ return r;
+ r += *s - '0';
+ return r;
+}
+
+static char *two_digits(char *s, int x)
+{
+ s[0] = '0' + x / 10;
+ s[1] = '0' + x % 10;
+ return s + 2;
+}
+
+void ASAP_DurationToString(char *s, int duration)
+{
+ if (duration >= 0) {
+ int seconds = duration / 1000;
+ int minutes = seconds / 60;
+ s = two_digits(s, minutes);
+ *s++ = ':';
+ s = two_digits(s, seconds % 60);
+ duration %= 1000;
+ if (duration != 0) {
+ *s++ = '.';
+ s = two_digits(s, duration / 10);
+ duration %= 10;
+ if (duration != 0)
+ *s++ = '0' + duration;
+ }
+ }
+ *s = '\0';
+}
+
+#endif /* !defined(JAVA) && !defined(CSHARP) */
+
+FILE_FUNC abool parse_sap_header(ASAP_ModuleInfo PTR module_info,
+ const byte ARRAY module, int module_len)
+{
+ int module_index = 0;
+ abool sap_signature = FALSE;
+ int duration_index = 0;
+ for (;;) {
+ NEW_ARRAY(char, line, 256);
+ int i;
+#if !defined(JAVA) && !defined(CSHARP)
+ char *p;
+#endif
+ if (module_index + 8 >= module_len)
+ return FALSE;
+ if (UBYTE(module[module_index]) == 0xff)
+ break;
+ i = 0;
+ while (module[module_index] != 0x0d) {
+ line[i++] = (char) module[module_index++];
+ if (module_index >= module_len || i >= sizeof(line) - 1)
+ return FALSE;
+ }
+ if (++module_index >= module_len || module[module_index++] != 0x0a)
+ return FALSE;
+
+#ifdef JAVA
+ String tag = new String(line, 0, i);
+ String arg = null;
+ i = tag.indexOf(' ');
+ if (i >= 0) {
+ arg = tag.substring(i + 1);
+ tag = tag.substring(0, i);
+ }
+#define TAG_IS(t) tag.equals(t)
+#define CHAR_ARG arg.charAt(0)
+#define SET_HEX(v) v = Integer.parseInt(arg, 16)
+#define SET_DEC(v, min, max) do { v = Integer.parseInt(arg); if (v < min || v > max) return FALSE; } while (FALSE)
+#define SET_TEXT(v) v = arg.substring(1, arg.length() - 1)
+#define DURATION_ARG parseDuration(arg)
+#define ARG_CONTAINS(t) (arg.indexOf(t) >= 0)
+#elif defined(CSHARP)
+ string tag = new string(line, 0, i);
+ string arg = null;
+ i = tag.IndexOf(' ');
+ if (i >= 0) {
+ arg = tag.Substring(i + 1);
+ tag = tag.Substring(0, i);
+ }
+#define TAG_IS(t) tag == t
+#define CHAR_ARG arg[0]
+#define SET_HEX(v) v = int.Parse(arg, System.Globalization.NumberStyles.HexNumber)
+#define SET_DEC(v, min, max) do { v = int.Parse(arg); if (v < min || v > max) return FALSE; } while (FALSE)
+#define SET_TEXT(v) v = arg.Substring(1, arg.Length - 1)
+#define DURATION_ARG ParseDuration(arg)
+#define ARG_CONTAINS(t) (arg.IndexOf(t) >= 0)
+#else
+ line[i] = '\0';
+ for (p = line; *p != '\0'; p++) {
+ if (*p == ' ') {
+ *p++ = '\0';
+ break;
+ }
+ }
+#define TAG_IS(t) (strcmp(line, t) == 0)
+#define CHAR_ARG *p
+#define SET_HEX(v) do { if (!parse_hex(&v, p)) return FALSE; } while (FALSE)
+#define SET_DEC(v, min, max) do { if (!parse_dec(&v, p, min, max)) return FALSE; } while (FALSE)
+#define SET_TEXT(v) do { if (!parse_text(v, p)) return FALSE; } while (FALSE)
+#define DURATION_ARG ASAP_ParseDuration(p)
+#define ARG_CONTAINS(t) (strstr(p, t) != NULL)
+#endif
+
+ if (TAG_IS("SAP"))
+ sap_signature = TRUE;
+ if (!sap_signature)
+ return FALSE;
+ if (TAG_IS("AUTHOR"))
+ SET_TEXT(MODULE_INFO author);
+ else if (TAG_IS("NAME"))
+ SET_TEXT(MODULE_INFO name);
+ else if (TAG_IS("DATE"))
+ SET_TEXT(MODULE_INFO date);
+ else if (TAG_IS("SONGS"))
+ SET_DEC(MODULE_INFO songs, 1, MAX_SONGS);
+ else if (TAG_IS("DEFSONG"))
+ SET_DEC(MODULE_INFO default_song, 0, MAX_SONGS - 1);
+ else if (TAG_IS("STEREO"))
+ MODULE_INFO channels = 2;
+ else if (TAG_IS("TIME")) {
+ int duration = DURATION_ARG;
+ if (duration < 0 || duration_index >= MAX_SONGS)
+ return FALSE;
+ MODULE_INFO durations[duration_index] = duration;
+ if (ARG_CONTAINS("LOOP"))
+ MODULE_INFO loops[duration_index] = TRUE;
+ duration_index++;
+ }
+ else if (TAG_IS("TYPE"))
+ MODULE_INFO type = CHAR_ARG;
+ else if (TAG_IS("FASTPLAY"))
+ SET_DEC(MODULE_INFO fastplay, 1, 312);
+ else if (TAG_IS("MUSIC"))
+ SET_HEX(MODULE_INFO music);
+ else if (TAG_IS("INIT"))
+ SET_HEX(MODULE_INFO init);
+ else if (TAG_IS("PLAYER"))
+ SET_HEX(MODULE_INFO player);
+ }
+ if (MODULE_INFO default_song >= MODULE_INFO songs)
+ return FALSE;
+ switch (MODULE_INFO type) {
+ case 'B':
+ case 'D':
+ if (MODULE_INFO player < 0 || MODULE_INFO init < 0)
+ return FALSE;
+ break;
+ case 'C':
+ if (MODULE_INFO player < 0 || MODULE_INFO music < 0)
+ return FALSE;
+ break;
+ case 'S':
+ if (MODULE_INFO init < 0)
+ return FALSE;
+ MODULE_INFO fastplay = 78;
+ break;
+ default:
+ return FALSE;
+ }
+ if (UBYTE(module[module_index + 1]) != 0xff)
+ return FALSE;
+ MODULE_INFO header_len = module_index;
+ return TRUE;
+}
+
+FILE_FUNC abool parse_sap(ASAP_State PTR ast, ASAP_ModuleInfo PTR module_info,
+ const byte ARRAY module, int module_len)
+{
+ int module_index;
+ if (!parse_sap_header(module_info, module, module_len))
+ return FALSE;
+ if (ast == NULL)
+ return TRUE;
+ ZERO_ARRAY(AST memory);
+ module_index = MODULE_INFO header_len + 2;
+ while (module_index + 5 <= module_len) {
+ int start_addr = UBYTE(module[module_index]) + (UBYTE(module[module_index + 1]) << 8);
+ int block_len = UBYTE(module[module_index + 2]) + (UBYTE(module[module_index + 3]) << 8) + 1 - start_addr;
+ if (block_len <= 0 || module_index + block_len > module_len)
+ return FALSE;
+ module_index += 4;
+ COPY_ARRAY(AST memory, start_addr, module, module_index, block_len);
+ module_index += block_len;
+ if (module_index == module_len)
+ return TRUE;
+ if (module_index + 7 <= module_len
+ && UBYTE(module[module_index]) == 0xff && UBYTE(module[module_index + 1]) == 0xff)
+ module_index += 2;
+ }
+ return FALSE;
+}
+
+#define ASAP_EXT(c1, c2, c3) (((c1) + ((c2) << 8) + ((c3) << 16)) | 0x202020)
+
+FILE_FUNC int get_packed_ext(STRING filename)
+{
+#ifdef JAVA
+ int i = filename.length();
+ int ext = 0;
+ while (--i > 0) {
+ if (filename.charAt(i) == '.')
+ return ext | 0x202020;
+ ext = (ext << 8) + filename.charAt(i);
+ }
+ return 0;
+#elif defined(CSHARP)
+ int i = filename.Length;
+ int ext = 0;
+ while (--i > 0) {
+ if (filename[i] == '.')
+ return ext | 0x202020;
+ ext = (ext << 8) + filename[i];
+ }
+ return 0;
+#else
+ const char *p;
+ int ext;
+ for (p = filename; *p != '\0'; p++);
+ ext = 0;
+ for (;;) {
+ if (--p <= filename || *p <= ' ')
+ return 0; /* no filename extension or invalid character */
+ if (*p == '.')
+ return ext | 0x202020;
+ ext = (ext << 8) + (*p & 0xff);
+ }
+#endif
+}
+
+FILE_FUNC abool is_our_ext(int ext)
+{
+ switch (ext) {
+ case ASAP_EXT('C', 'M', 'C'):
+ case ASAP_EXT('C', 'M', 'R'):
+ case ASAP_EXT('D', 'M', 'C'):
+ case ASAP_EXT('M', 'P', 'D'):
+ case ASAP_EXT('M', 'P', 'T'):
+ case ASAP_EXT('R', 'M', 'T'):
+ case ASAP_EXT('S', 'A', 'P'):
+ case ASAP_EXT('T', 'M', '2'):
+ case ASAP_EXT('T', 'M', '8'):
+ case ASAP_EXT('T', 'M', 'C'):
+ return TRUE;
+ default:
+ return FALSE;
+ }
+}
+
+ASAP_FUNC abool ASAP_IsOurFile(STRING filename)
+{
+ int ext = get_packed_ext(filename);
+ return is_our_ext(ext);
+}
+
+ASAP_FUNC abool ASAP_IsOurExt(STRING ext)
+{
+#ifdef JAVA
+ return ext.length() == 3
+ && is_our_ext(ASAP_EXT(ext.charAt(0), ext.charAt(1), ext.charAt(2)));
+#else
+ return ext[0] > ' ' && ext[1] > ' ' && ext[2] > ' ' && ext[3] == '\0'
+ && is_our_ext(ASAP_EXT(ext[0], ext[1], ext[2]));
+#endif
+}
+
+FILE_FUNC abool parse_file(ASAP_State PTR ast, ASAP_ModuleInfo PTR module_info,
+ STRING filename, const byte ARRAY module, int module_len)
+{
+ int i;
+#ifdef JAVA
+ int basename = 0;
+ int ext = -1;
+ for (i = 0; i < filename.length(); i++) {
+ int c = filename.charAt(i);
+ if (c == '/' || c == '\\')
+ basename = i + 1;
+ else if (c == '.')
+ ext = i;
+ }
+ if (ext < 0)
+ ext = i;
+ module_info.author = "";
+ module_info.name = filename.substring(basename, ext);
+ module_info.date = "";
+#elif defined(CSHARP)
+ int basename = 0;
+ int ext = -1;
+ for (i = 0; i < filename.Length; i++) {
+ int c = filename[i];
+ if (c == '/' || c == '\\')
+ basename = i + 1;
+ else if (c == '.')
+ ext = i;
+ }
+ if (ext < 0)
+ ext = i;
+ module_info.author = string.Empty;
+ module_info.name = filename.Substring(basename, ext - basename);
+ module_info.date = string.Empty;
+#else
+ const char *p;
+ const char *basename = filename;
+ const char *ext = NULL;
+ for (p = filename; *p != '\0'; p++) {
+ if (*p == '/' || *p == '\\')
+ basename = p + 1;
+ else if (*p == '.')
+ ext = p;
+ }
+ if (ext == NULL)
+ ext = p;
+ module_info->author[0] = '\0';
+ i = ext - basename;
+ memcpy(module_info->name, basename, i);
+ module_info->name[i] = '\0';
+ module_info->date[0] = '\0';
+#endif
+ MODULE_INFO channels = 1;
+ MODULE_INFO songs = 1;
+ MODULE_INFO default_song = 0;
+ for (i = 0; i < MAX_SONGS; i++) {
+ MODULE_INFO durations[i] = -1;
+ MODULE_INFO loops[i] = FALSE;
+ }
+ MODULE_INFO type = '?';
+ MODULE_INFO fastplay = 312;
+ MODULE_INFO music = -1;
+ MODULE_INFO init = -1;
+ MODULE_INFO player = -1;
+ switch (get_packed_ext(filename)) {
+ case ASAP_EXT('C', 'M', 'C'):
+ return parse_cmc(ast, module_info, module, module_len, FALSE);
+ case ASAP_EXT('C', 'M', 'R'):
+ return parse_cmc(ast, module_info, module, module_len, TRUE);
+ case ASAP_EXT('D', 'M', 'C'):
+ MODULE_INFO fastplay = 156;
+ return parse_cmc(ast, module_info, module, module_len, FALSE);
+ case ASAP_EXT('M', 'P', 'D'):
+ MODULE_INFO fastplay = 156;
+ return parse_mpt(ast, module_info, module, module_len);
+ case ASAP_EXT('M', 'P', 'T'):
+ return parse_mpt(ast, module_info, module, module_len);
+ case ASAP_EXT('R', 'M', 'T'):
+ return parse_rmt(ast, module_info, module, module_len);
+ case ASAP_EXT('S', 'A', 'P'):
+ return parse_sap(ast, module_info, module, module_len);
+ case ASAP_EXT('T', 'M', '2'):
+ return parse_tm2(ast, module_info, module, module_len);
+ case ASAP_EXT('T', 'M', '8'):
+ case ASAP_EXT('T', 'M', 'C'):
+ return parse_tmc(ast, module_info, module, module_len);
+ default:
+ return FALSE;
+ }
+}
+
+ASAP_FUNC abool ASAP_GetModuleInfo(ASAP_ModuleInfo PTR module_info, STRING filename,
+ const byte ARRAY module, int module_len)
+{
+ return parse_file(NULL, module_info, filename, module, module_len);
+}
+
+ASAP_FUNC abool ASAP_Load(ASAP_State PTR ast, STRING filename,
+ const byte ARRAY module, int module_len)
+{
+ AST silence_cycles = 0;
+ return parse_file(ast, ADDRESSOF AST module_info, filename, module, module_len);
+}
+
+ASAP_FUNC void ASAP_DetectSilence(ASAP_State PTR ast, int seconds)
+{
+ AST silence_cycles = seconds * ASAP_MAIN_CLOCK;
+}
+
+FILE_FUNC void call_6502(ASAP_State PTR ast, int addr, int max_scanlines)
+{
+ AST cpu_pc = addr;
+ /* put a CIM at 0xd20a and a return address on stack */
+ dPutByte(0xd20a, 0xd2);
+ dPutByte(0x01fe, 0x09);
+ dPutByte(0x01ff, 0xd2);
+ AST cpu_s = 0xfd;
+ Cpu_RunScanlines(ast, max_scanlines);
+}
+
+/* 50 Atari frames for the initialization routine - some SAPs are self-extracting. */
+#define SCANLINES_FOR_INIT (50 * 312)
+
+FILE_FUNC void call_6502_init(ASAP_State PTR ast, int addr, int a, int x, int y)
+{
+ AST cpu_a = a & 0xff;
+ AST cpu_x = x & 0xff;
+ AST cpu_y = y & 0xff;
+ call_6502(ast, addr, SCANLINES_FOR_INIT);
+}
+
+ASAP_FUNC void ASAP_PlaySong(ASAP_State PTR ast, int song, int duration)
+{
+ AST current_song = song;
+ AST current_duration = duration;
+ AST blocks_played = 0;
+ AST silence_cycles_counter = AST silence_cycles;
+ AST extra_pokey_mask = AST module_info.channels > 1 ? 0x10 : 0;
+ PokeySound_Initialize(ast);
+ AST cycle = 0;
+ AST cpu_nz = 0;
+ AST cpu_c = 0;
+ AST cpu_vdi = 0;
+ AST scanline_number = 0;
+ AST next_scanline_cycle = 0;
+ AST timer1_cycle = NEVER;
+ AST timer2_cycle = NEVER;
+ AST timer4_cycle = NEVER;
+ AST irqst = 0xff;
+ switch (AST module_info.type) {
+ case 'B':
+ call_6502_init(ast, AST module_info.init, song, 0, 0);
+ break;
+ case 'C':
+ case 'c':
+ case 'z':
+ call_6502_init(ast, AST module_info.player + 3, 0x70, AST module_info.music, AST module_info.music >> 8);
+ call_6502_init(ast, AST module_info.player + 3, 0x00, song, 0);
+ break;
+ case 'D':
+ case 'S':
+ AST cpu_a = song;
+ AST cpu_x = 0x00;
+ AST cpu_y = 0x00;
+ AST cpu_s = 0xff;
+ AST cpu_pc = AST module_info.init;
+ break;
+ case 'm':
+ call_6502_init(ast, AST module_info.player, 0x00, AST module_info.music >> 8, AST module_info.music);
+ call_6502_init(ast, AST module_info.player, 0x02, AST module_info.song_pos[song], 0);
+ break;
+ case 'r':
+ call_6502_init(ast, AST module_info.player, AST module_info.song_pos[song], AST module_info.music, AST module_info.music >> 8);
+ break;
+ case 't':
+ case 'T':
+ call_6502_init(ast, AST module_info.player, 0x70, AST module_info.music >> 8, AST module_info.music);
+ call_6502_init(ast, AST module_info.player, 0x00, song, 0);
+ AST tmc_per_frame_counter = 1;
+ break;
+ }
+ ASAP_MutePokeyChannels(ast, 0);
+}
+
+ASAP_FUNC void ASAP_MutePokeyChannels(ASAP_State PTR ast, int mask)
+{
+ PokeySound_Mute(ast, ADDRESSOF AST base_pokey, mask);
+ PokeySound_Mute(ast, ADDRESSOF AST extra_pokey, mask >> 4);
+}
+
+ASAP_FUNC abool call_6502_player(ASAP_State PTR ast)
+{
+ int s;
+ PokeySound_StartFrame(ast);
+ switch (AST module_info.type) {
+ case 'B':
+ call_6502(ast, AST module_info.player, AST module_info.fastplay);
+ break;
+ case 'C':
+ case 'c':
+ case 'z':
+ call_6502(ast, AST module_info.player + 6, AST module_info.fastplay);
+ break;
+ case 'D':
+ s = AST cpu_s;
+#define PUSH_ON_6502_STACK(x) dPutByte(0x100 + s, x); s = (s - 1) & 0xff
+#define RETURN_FROM_PLAYER_ADDR 0xd200
+ /* save 6502 state on 6502 stack */
+ PUSH_ON_6502_STACK(AST cpu_pc >> 8);
+ PUSH_ON_6502_STACK(AST cpu_pc & 0xff);
+ PUSH_ON_6502_STACK(((AST cpu_nz | (AST cpu_nz >> 1)) & 0x80) + AST cpu_vdi + \
+ ((AST cpu_nz & 0xff) == 0 ? Z_FLAG : 0) + AST cpu_c + 0x20);
+ PUSH_ON_6502_STACK(AST cpu_a);
+ PUSH_ON_6502_STACK(AST cpu_x);
+ PUSH_ON_6502_STACK(AST cpu_y);
+ /* RTS will jump to 6502 code that restores the state */
+ PUSH_ON_6502_STACK((RETURN_FROM_PLAYER_ADDR - 1) >> 8);
+ PUSH_ON_6502_STACK((RETURN_FROM_PLAYER_ADDR - 1) & 0xff);
+ AST cpu_s = s;
+ dPutByte(RETURN_FROM_PLAYER_ADDR, 0x68); /* PLA */
+ dPutByte(RETURN_FROM_PLAYER_ADDR + 1, 0xa8); /* TAY */
+ dPutByte(RETURN_FROM_PLAYER_ADDR + 2, 0x68); /* PLA */
+ dPutByte(RETURN_FROM_PLAYER_ADDR + 3, 0xaa); /* TAX */
+ dPutByte(RETURN_FROM_PLAYER_ADDR + 4, 0x68); /* PLA */
+ dPutByte(RETURN_FROM_PLAYER_ADDR + 5, 0x40); /* RTI */
+ AST cpu_pc = AST module_info.player;
+ Cpu_RunScanlines(ast, AST module_info.fastplay);
+ break;
+ case 'S':
+ Cpu_RunScanlines(ast, AST module_info.fastplay);
+ {
+ int i = dGetByte(0x45) - 1;
+ dPutByte(0x45, i);
+ if (i == 0)
+ dPutByte(0xb07b, dGetByte(0xb07b) + 1);
+ }
+ break;
+ case 'm':
+ case 'r':
+ case 'T':
+ call_6502(ast, AST module_info.player + 3, AST module_info.fastplay);
+ break;
+ case 't':
+ if (--AST tmc_per_frame_counter <= 0) {
+ AST tmc_per_frame_counter = AST tmc_per_frame;
+ call_6502(ast, AST module_info.player + 3, AST module_info.fastplay);
+ }
+ else
+ call_6502(ast, AST module_info.player + 6, AST module_info.fastplay);
+ break;
+ }
+ PokeySound_EndFrame(ast, AST module_info.fastplay * 114);
+ if (AST silence_cycles > 0) {
+ if (PokeySound_IsSilent(ADDRESSOF AST base_pokey)
+ && PokeySound_IsSilent(ADDRESSOF AST extra_pokey)) {
+ AST silence_cycles_counter -= AST module_info.fastplay * 114;
+ if (AST silence_cycles_counter <= 0)
+ return FALSE;
+ }
+ else
+ AST silence_cycles_counter = AST silence_cycles;
+ }
+ return TRUE;
+}
+
+FILE_FUNC int milliseconds_to_blocks(int milliseconds)
+{
+ return milliseconds * (ASAP_SAMPLE_RATE / 100) / 10;
+}
+
+ASAP_FUNC void ASAP_Seek(ASAP_State PTR ast, int position)
+{
+ int block = milliseconds_to_blocks(position);
+ if (block < AST blocks_played)
+ ASAP_PlaySong(ast, AST current_song, AST current_duration);
+ while (AST blocks_played + AST samples - AST sample_index < block) {
+ AST blocks_played += AST samples - AST sample_index;
+ call_6502_player(ast);
+ }
+ AST sample_index += block - AST blocks_played;
+ AST blocks_played = block;
+}
+
+ASAP_FUNC int ASAP_Generate(ASAP_State PTR ast, VOIDPTR buffer, int buffer_len,
+ ASAP_SampleFormat format)
+{
+ int block_shift;
+ int buffer_blocks;
+ int block;
+ if (AST silence_cycles > 0 && AST silence_cycles_counter <= 0)
+ return 0;
+ block_shift = (AST module_info.channels - 1) + (format != ASAP_FORMAT_U8 ? 1 : 0);
+ buffer_blocks = buffer_len >> block_shift;
+ if (AST current_duration > 0) {
+ int total_blocks = milliseconds_to_blocks(AST current_duration);
+ if (buffer_blocks > total_blocks - AST blocks_played)
+ buffer_blocks = total_blocks - AST blocks_played;
+ }
+ block = 0;
+ do {
+ int blocks = PokeySound_Generate(ast, buffer, block << block_shift, buffer_blocks - block, format);
+ AST blocks_played += blocks;
+ block += blocks;
+ } while (block < buffer_blocks && call_6502_player(ast));
+ return block << block_shift;
+}
+
+#if !defined(JAVA) && !defined(CSHARP)
+
+abool ASAP_ChangeExt(char *filename, const char *ext)
+{
+ char *dest = NULL;
+ while (*filename != '\0') {
+ if (*filename == '/' || *filename == '\\')
+ dest = NULL;
+ else if (*filename == '.')
+ dest = filename + 1;
+ filename++;
+ }
+ if (dest == NULL)
+ return FALSE;
+ strcpy(dest, ext);
+ return TRUE;
+}
+
+abool ASAP_CanSetModuleInfo(const char *filename)
+{
+ int ext = get_packed_ext(filename);
+ return ext == ASAP_EXT('S', 'A', 'P');
+}
+
+static byte *put_string(byte *dest, const char *str)
+{
+ while (*str != '\0')
+ *dest++ = *str++;
+ return dest;
+}
+
+static byte *put_dec(byte *dest, int value)
+{
+ if (value >= 10) {
+ dest = put_dec(dest, value / 10);
+ value %= 10;
+ }
+ *dest++ = '0' + value;
+ return dest;
+}
+
+static byte *put_text_tag(byte *dest, const char *tag, const char *value)
+{
+ dest = put_string(dest, tag);
+ *dest++ = ' ';
+ *dest++ = '"';
+ if (*value == '\0')
+ value = "<?>";
+ while (*value != '\0') {
+ if (*value < ' ' || *value > 'z' || *value == '"' || *value == '`')
+ return NULL;
+ *dest++ = *value++;
+ }
+ *dest++ = '"';
+ *dest++ = '\r';
+ *dest++ = '\n';
+ return dest;
+}
+
+static byte *put_hex_tag(byte *dest, const char *tag, int value)
+{
+ int i;
+ if (value < 0)
+ return dest;
+ dest = put_string(dest, tag);
+ *dest++ = ' ';
+ for (i = 12; i >= 0; i -= 4) {
+ int digit = (value >> i) & 0xf;
+ *dest++ = (byte) (digit + (digit < 10 ? '0' : 'A' - 10));
+ }
+ *dest++ = '\r';
+ *dest++ = '\n';
+ return dest;
+}
+
+static byte *put_dec_tag(byte *dest, const char *tag, int value)
+{
+ dest = put_string(dest, tag);
+ *dest++ = ' ';
+ dest = put_dec(dest, value);
+ *dest++ = '\r';
+ *dest++ = '\n';
+ return dest;
+}
+
+static byte *start_sap_header(byte *dest, const ASAP_ModuleInfo *module_info)
+{
+ dest = put_string(dest, "SAP\r\n");
+ dest = put_text_tag(dest, "AUTHOR", module_info->author);
+ if (dest == NULL)
+ return NULL;
+ dest = put_text_tag(dest, "NAME", module_info->name);
+ if (dest == NULL)
+ return NULL;
+ dest = put_text_tag(dest, "DATE", module_info->date);
+ if (dest == NULL)
+ return NULL;
+ if (module_info->songs > 1) {
+ dest = put_dec_tag(dest, "SONGS", module_info->songs);
+ if (module_info->default_song > 0)
+ dest = put_dec_tag(dest, "DEFSONG", module_info->default_song);
+ }
+ if (module_info->channels > 1)
+ dest = put_string(dest, "STEREO\r\n");
+ return dest;
+}
+
+static byte *put_durations(byte *dest, const ASAP_ModuleInfo *module_info)
+{
+ int song;
+ for (song = 0; song < module_info->songs; song++) {
+ if (module_info->durations[song] < 0)
+ break;
+ dest = put_string(dest, "TIME ");
+ ASAP_DurationToString((char *) dest, module_info->durations[song]);
+ while (*dest != '\0')
+ dest++;
+ if (module_info->loops[song])
+ dest = put_string(dest, " LOOP");
+ *dest++ = '\r';
+ *dest++ = '\n';
+ }
+ return dest;
+}
+
+static byte *put_sap_header(byte *dest, const ASAP_ModuleInfo *module_info, char type, int music, int init, int player)
+{
+ dest = start_sap_header(dest, module_info);
+ if (dest == NULL)
+ return NULL;
+ dest = put_string(dest, "TYPE ");
+ *dest++ = type;
+ *dest++ = '\r';
+ *dest++ = '\n';
+ if (module_info->fastplay != 312)
+ dest = put_dec_tag(dest, "FASTPLAY", module_info->fastplay);
+ dest = put_hex_tag(dest, "MUSIC", music);
+ dest = put_hex_tag(dest, "INIT", init);
+ dest = put_hex_tag(dest, "PLAYER", player);
+ dest = put_durations(dest, module_info);
+ return dest;
+}
+
+int ASAP_SetModuleInfo(const ASAP_ModuleInfo *module_info, const byte ARRAY module,
+ int module_len, byte ARRAY out_module)
+{
+ byte *dest;
+ int i;
+ if (memcmp(module, "SAP\r\n", 5) != 0)
+ return -1;
+ dest = start_sap_header(out_module, module_info);
+ if (dest == NULL)
+ return -1;
+ i = 5;
+ while (i < module_len && module[i] != 0xff) {
+ if (memcmp(module + i, "AUTHOR ", 7) == 0
+ || memcmp(module + i, "NAME ", 5) == 0
+ || memcmp(module + i, "DATE ", 5) == 0
+ || memcmp(module + i, "SONGS ", 6) == 0
+ || memcmp(module + i, "DEFSONG ", 8) == 0
+ || memcmp(module + i, "STEREO", 6) == 0
+ || memcmp(module + i, "TIME ", 5) == 0) {
+ while (i < module_len && module[i++] != 0x0a);
+ }
+ else {
+ int b;
+ do {
+ b = module[i++];
+ *dest++ = b;
+ } while (i < module_len && b != 0x0a);
+ }
+ }
+ dest = put_durations(dest, module_info);
+ module_len -= i;
+ memcpy(dest, module + i, module_len);
+ dest += module_len;
+ return dest - out_module;
+}
+
+#define RMT_INIT 0x0c80
+#define TM2_INIT 0x1080
+
+const char *ASAP_CanConvert(const char *filename, const ASAP_ModuleInfo *module_info,
+ const byte ARRAY module, int module_len)
+{
+ switch (module_info->type) {
+ case 'B':
+ if (module_info->init == 0x4f3 || module_info->init == 0xf4f3 || module_info->init == 0x4ef)
+ return module_info->fastplay == 156 ? "mpd" : "mpt";
+ if (module_info->init == RMT_INIT)
+ return "rmt";
+ if ((module_info->init == 0x4f5 || module_info->init == 0xf4f5 || module_info->init == 0x4f2)
+ || ((module_info->init == 0x4e7 || module_info->init == 0xf4e7 || module_info->init == 0x4e4) && module_info->fastplay == 156)
+ || ((module_info->init == 0x4e5 || module_info->init == 0xf4e5 || module_info->init == 0x4e2) && (module_info->fastplay == 104 || module_info->fastplay == 78)))
+ return "tmc";
+ if (module_info->init == TM2_INIT)
+ return "tm2";
+ break;
+ case 'C':
+ if (module_info->player == 0x500 || module_info->player == 0xf500) {
+ if (module_info->fastplay == 156)
+ return "dmc";
+ return module[module_len - 170] == 0x1e ? "cmr" : "cmc";
+ }
+ break;
+ case 'c':
+ case 'z':
+ case 'm':
+ case 'r':
+ case 't':
+ case 'T':
+ return "sap";
+ default:
+ break;
+ }
+ return NULL;
+}
+
+int ASAP_Convert(const char *filename, const ASAP_ModuleInfo *module_info,
+ const byte ARRAY module, int module_len, byte ARRAY out_module)
+{
+ int out_len;
+ byte *dest;
+ int addr;
+ int player;
+ static const int tmc_player[4] = { 3, -9, -10, -10 };
+ static const int tmc_init[4] = { -14, -16, -17, -17 };
+ switch (module_info->type) {
+ case 'B':
+ case 'C':
+ out_len = module[module_info->header_len + 4] + (module[module_info->header_len + 5] << 8)
+ - module[module_info->header_len + 2] - (module[module_info->header_len + 3] << 8) + 7;
+ if (out_len < 7 || module_info->header_len + out_len >= module_len)
+ return -1;
+ memcpy(out_module, module + module_info->header_len, out_len);
+ return out_len;
+ case 'c':
+ case 'z':
+ dest = put_sap_header(out_module, module_info, 'C', module_info->music, -1, module_info->player);
+ if (dest == NULL)
+ return -1;
+ memcpy(dest, module, module_len);
+ dest += module_len;
+ memcpy(dest, cmc_obx + 2, sizeof(cmc_obx) - 2);
+ if (module_info->type == 'z')
+ memcpy(dest + 4 + CMR_BASS_TABLE_OFFSET, cmr_bass_table, sizeof(cmr_bass_table));
+ dest += sizeof(cmc_obx) - 2;
+ return dest - out_module;
+ case 'm':
+ if (module_info->songs != 1) {
+ addr = module_info->player - 17 - module_info->songs;
+ dest = put_sap_header(out_module, module_info, 'B', -1, module_info->player - 17, module_info->player + 3);
+ }
+ else {
+ addr = module_info->player - 13;
+ dest = put_sap_header(out_module, module_info, 'B', -1, addr, module_info->player + 3);
+ }
+ if (dest == NULL)
+ return -1;
+ memcpy(dest, module, module_len);
+ dest += module_len;
+ *dest++ = (byte) addr;
+ *dest++ = (byte) (addr >> 8);
+ *dest++ = mpt_obx[4];
+ *dest++ = mpt_obx[5];
+ if (module_info->songs != 1) {
+ memcpy(dest, module_info->song_pos, module_info->songs);
+ dest += module_info->songs;
+ *dest++ = 0x48; /* pha */
+ }
+ *dest++ = 0xa0; /* ldy #<music */
+ *dest++ = (byte) module_info->music;
+ *dest++ = 0xa2; /* ldx #>music */
+ *dest++ = (byte) (module_info->music >> 8);
+ *dest++ = 0xa9; /* lda #0 */
+ *dest++ = 0;
+ *dest++ = 0x20; /* jsr player */
+ *dest++ = (byte) module_info->player;
+ *dest++ = (byte) (module_info->player >> 8);
+ if (module_info->songs != 1) {
+ *dest++ = 0x68; /* pla */
+ *dest++ = 0xa8; /* tay */
+ *dest++ = 0xbe; /* ldx song2pos,y */
+ *dest++ = (byte) addr;
+ *dest++ = (byte) (addr >> 8);
+ }
+ else {
+ *dest++ = 0xa2; /* ldx #0 */
+ *dest++ = 0;
+ }
+ *dest++ = 0xa9; /* lda #2 */
+ *dest++ = 2;
+ memcpy(dest, mpt_obx + 6, sizeof(mpt_obx) - 6);
+ dest += sizeof(mpt_obx) - 6;
+ return dest - out_module;
+ case 'r':
+ dest = put_sap_header(out_module, module_info, 'B', -1, RMT_INIT, module_info->player + 3);
+ if (dest == NULL)
+ return -1;
+ memcpy(dest, module, module_len);
+ dest += module_len;
+ *dest++ = (byte) RMT_INIT;
+ *dest++ = (byte) (RMT_INIT >> 8);
+ if (module_info->songs != 1) {
+ addr = RMT_INIT + 10 + module_info->songs;
+ *dest++ = (byte) addr;
+ *dest++ = (byte) (addr >> 8);
+ *dest++ = 0xa8; /* tay */
+ *dest++ = 0xb9; /* lda song2pos,y */
+ *dest++ = (byte) (RMT_INIT + 11);
+ *dest++ = (byte) ((RMT_INIT + 11) >> 8);
+ }
+ else {
+ *dest++ = (byte) (RMT_INIT + 8);
+ *dest++ = (byte) ((RMT_INIT + 8) >> 8);
+ *dest++ = 0xa9; /* lda #0 */
+ *dest++ = 0;
+ }
+ *dest++ = 0xa2; /* ldx #<music */
+ *dest++ = (byte) module_info->music;
+ *dest++ = 0xa0; /* ldy #>music */
+ *dest++ = (byte) (module_info->music >> 8);
+ *dest++ = 0x4c; /* jmp player */
+ *dest++ = (byte) module_info->player;
+ *dest++ = (byte) (module_info->player >> 8);
+ if (module_info->songs != 1) {
+ memcpy(dest, module_info->song_pos, module_info->songs);
+ dest += module_info->songs;
+ }
+ if (module_info->channels == 1) {
+ memcpy(dest, rmt4_obx + 2, sizeof(rmt4_obx) - 2);
+ dest += sizeof(rmt4_obx) - 2;
+ }
+ else {
+ memcpy(dest, rmt8_obx + 2, sizeof(rmt8_obx) - 2);
+ dest += sizeof(rmt8_obx) - 2;
+ }
+ return dest - out_module;
+ case 't':
+ player = module_info->player + tmc_player[module[0x25] - 1];
+ addr = player + tmc_init[module[0x25] - 1];
+ if (module_info->songs != 1)
+ addr -= 3;
+ dest = put_sap_header(out_module, module_info, 'B', -1, addr, player);
+ if (dest == NULL)
+ return -1;
+ memcpy(dest, module, module_len);
+ dest += module_len;
+ *dest++ = (byte) addr;
+ *dest++ = (byte) (addr >> 8);
+ *dest++ = tmc_obx[4];
+ *dest++ = tmc_obx[5];
+ if (module_info->songs != 1)
+ *dest++ = 0x48; /* pha */
+ *dest++ = 0xa0; /* ldy #<music */
+ *dest++ = (byte) module_info->music;
+ *dest++ = 0xa2; /* ldx #>music */
+ *dest++ = (byte) (module_info->music >> 8);
+ *dest++ = 0xa9; /* lda #$70 */
+ *dest++ = 0x70;
+ *dest++ = 0x20; /* jsr player */
+ *dest++ = (byte) module_info->player;
+ *dest++ = (byte) (module_info->player >> 8);
+ if (module_info->songs != 1) {
+ *dest++ = 0x68; /* pla */
+ *dest++ = 0xaa; /* tax */
+ *dest++ = 0xa9; /* lda #0 */
+ *dest++ = 0;
+ }
+ else {
+ *dest++ = 0xa9; /* lda #$60 */
+ *dest++ = 0x60;
+ }
+ switch (module[0x25]) {
+ case 2:
+ *dest++ = 0x06; /* asl 0 */
+ *dest++ = 0;
+ *dest++ = 0x4c; /* jmp player */
+ *dest++ = (byte) module_info->player;
+ *dest++ = (byte) (module_info->player >> 8);
+ *dest++ = 0xa5; /* lda 0 */
+ *dest++ = 0;
+ *dest++ = 0xe6; /* inc 0 */
+ *dest++ = 0;
+ *dest++ = 0x4a; /* lsr @ */
+ *dest++ = 0x90; /* bcc player+3 */
+ *dest++ = 5;
+ *dest++ = 0xb0; /* bcs player+6 */
+ *dest++ = 6;
+ break;
+ case 3:
+ case 4:
+ *dest++ = 0xa0; /* ldy #1 */
+ *dest++ = 1;
+ *dest++ = 0x84; /* sty 0 */
+ *dest++ = 0;
+ *dest++ = 0xd0; /* bne player */
+ *dest++ = 10;
+ *dest++ = 0xc6; /* dec 0 */
+ *dest++ = 0;
+ *dest++ = 0xd0; /* bne player+6 */
+ *dest++ = 12;
+ *dest++ = 0xa0; /* ldy #3 */
+ *dest++ = module[0x25];
+ *dest++ = 0x84; /* sty 0 */
+ *dest++ = 0;
+ *dest++ = 0xd0; /* bne player+3 */
+ *dest++ = 3;
+ break;
+ default:
+ break;
+ }
+ memcpy(dest, tmc_obx + 6, sizeof(tmc_obx) - 6);
+ dest += sizeof(tmc_obx) - 6;
+ return dest - out_module;
+ case 'T':
+ dest = put_sap_header(out_module, module_info, 'B', -1, TM2_INIT, module_info->player + 3);
+ if (dest == NULL)
+ return -1;
+ memcpy(dest, module, module_len);
+ dest += module_len;
+ *dest++ = (byte) TM2_INIT;
+ *dest++ = (byte) (TM2_INIT >> 8);
+ if (module_info->songs != 1) {
+ *dest++ = (byte) (TM2_INIT + 16);
+ *dest++ = (byte) ((TM2_INIT + 16) >> 8);
+ *dest++ = 0x48; /* pha */
+ }
+ else {
+ *dest++ = (byte) (TM2_INIT + 14);
+ *dest++ = (byte) ((TM2_INIT + 14) >> 8);
+ }
+ *dest++ = 0xa0; /* ldy #<music */
+ *dest++ = (byte) module_info->music;
+ *dest++ = 0xa2; /* ldx #>music */
+ *dest++ = (byte) (module_info->music >> 8);
+ *dest++ = 0xa9; /* lda #$70 */
+ *dest++ = 0x70;
+ *dest++ = 0x20; /* jsr player */
+ *dest++ = (byte) module_info->player;
+ *dest++ = (byte) (module_info->player >> 8);
+ if (module_info->songs != 1) {
+ *dest++ = 0x68; /* pla */
+ *dest++ = 0xaa; /* tax */
+ *dest++ = 0xa9; /* lda #0 */
+ *dest++ = 0;
+ }
+ else {
+ *dest++ = 0xa9; /* lda #0 */
+ *dest++ = 0;
+ *dest++ = 0xaa; /* tax */
+ }
+ *dest++ = 0x4c; /* jmp player */
+ *dest++ = (byte) module_info->player;
+ *dest++ = (byte) (module_info->player >> 8);
+ memcpy(dest, tm2_obx + 2, sizeof(tm2_obx) - 2);
+ dest += sizeof(tm2_obx) - 2;
+ return dest - out_module;
+ default:
+ return -1;
+ }
+}
+
+#endif /* !defined(JAVA) && !defined(CSHARP) */
diff --git a/apps/codecs/asap/asap.h b/apps/codecs/asap/asap.h
new file mode 100644
index 0000000..194d416
--- /dev/null
+++ b/apps/codecs/asap/asap.h
@@ -0,0 +1,299 @@
+/*
+ * asap.h - public interface of the ASAP engine
+ *
+ * Copyright (C) 2005-2008 Piotr Fusik
+ *
+ * This file is part of ASAP (Another Slight Atari Player),
+ * see http://asap.sourceforge.net
+ *
+ * ASAP is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published
+ * by the Free Software Foundation; either version 2 of the License,
+ * or (at your option) any later version.
+ *
+ * ASAP is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty
+ * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with ASAP; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#ifndef _ASAP_H_
+#define _ASAP_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* ASAP version. */
+#define ASAP_VERSION_MAJOR 1
+#define ASAP_VERSION_MINOR 2
+#define ASAP_VERSION_MICRO 0
+#define ASAP_VERSION "1.2.0"
+
+/* Short credits of the ASAP engine. */
+#define ASAP_YEARS "2005-2008"
+#define ASAP_CREDITS \
+ "Another Slight Atari Player (C) 2005-2008 Piotr Fusik\n" \
+ "CMC, MPT, TMC players (C) 1994-2005 Marcin Lewandowski\n" \
+ "RMT player (C) 2002-2005 Radek Sterba\n"
+
+/* Short GPL notice.
+ Display after the credits. */
+#define ASAP_COPYRIGHT \
+ "This program is free software; you can redistribute it and/or modify\n" \
+ "it under the terms of the GNU General Public License as published\n" \
+ "by the Free Software Foundation; either version 2 of the License,\n" \
+ "or (at your option) any later version."
+
+/* Useful type definitions. */
+#ifndef FALSE
+#define FALSE 0
+#endif
+#ifndef TRUE
+#define TRUE 1
+#endif
+typedef int abool;
+typedef unsigned char byte;
+
+/* Information about a file. */
+typedef struct {
+ char author[128]; /* author's name */
+ char name[128]; /* title */
+ char date[128]; /* creation date */
+ int channels; /* 1 for mono or 2 for stereo */
+ int songs; /* number of subsongs */
+ int default_song; /* 0-based index of the "main" subsong */
+ int durations[32]; /* lengths of songs, in milliseconds, -1 = unspecified */
+ abool loops[32]; /* whether songs repeat or not */
+ /* the following technical information should not be used outside ASAP. */
+ char type;
+ int fastplay;
+ int music;
+ int init;
+ int player;
+ int header_len;
+ byte song_pos[128];
+} ASAP_ModuleInfo;
+
+/* POKEY state.
+ Not for use outside the ASAP engine. */
+typedef struct {
+ int audctl;
+ abool init;
+ int poly_index;
+ int div_cycles;
+ int mute1;
+ int mute2;
+ int mute3;
+ int mute4;
+ int audf1;
+ int audf2;
+ int audf3;
+ int audf4;
+ int audc1;
+ int audc2;
+ int audc3;
+ int audc4;
+ int tick_cycle1;
+ int tick_cycle2;
+ int tick_cycle3;
+ int tick_cycle4;
+ int period_cycles1;
+ int period_cycles2;
+ int period_cycles3;
+ int period_cycles4;
+ int reload_cycles1;
+ int reload_cycles3;
+ int out1;
+ int out2;
+ int out3;
+ int out4;
+ int delta1;
+ int delta2;
+ int delta3;
+ int delta4;
+ int skctl;
+ char delta_buffer[888];
+} PokeyState;
+
+/* Player state.
+ Only module_info is meant to be read outside the ASAP engine. */
+typedef struct {
+ int cycle;
+ int cpu_pc;
+ int cpu_a;
+ int cpu_x;
+ int cpu_y;
+ int cpu_s;
+ int cpu_nz;
+ int cpu_c;
+ int cpu_vdi;
+ int scanline_number;
+ int nearest_event_cycle;
+ int next_scanline_cycle;
+ int timer1_cycle;
+ int timer2_cycle;
+ int timer4_cycle;
+ int irqst;
+ int extra_pokey_mask;
+ PokeyState base_pokey;
+ PokeyState extra_pokey;
+ int sample_offset;
+ int sample_index;
+ int samples;
+ int iir_acc_left;
+ int iir_acc_right;
+ ASAP_ModuleInfo module_info;
+ int tmc_per_frame;
+ int tmc_per_frame_counter;
+ int current_song;
+ int current_duration;
+ int blocks_played;
+ int silence_cycles;
+ int silence_cycles_counter;
+ byte poly9_lookup[511];
+ byte poly17_lookup[16385];
+ byte memory[65536];
+} ASAP_State;
+
+/* Maximum length of a "mm:ss.xxx" string including the terminator. */
+#define ASAP_DURATION_CHARS 10
+
+/* Maximum length of a supported input file.
+ You can assume that files longer than this are not supported by ASAP. */
+#define ASAP_MODULE_MAX 65000
+
+/* Output sample rate. */
+#define ASAP_SAMPLE_RATE 44100
+
+/* Output formats. */
+typedef enum {
+ ASAP_FORMAT_U8 = 8, /* unsigned char */
+ ASAP_FORMAT_S16_LE = 16, /* signed short, little-endian */
+ ASAP_FORMAT_S16_BE = -16 /* signed short, big-endian */
+} ASAP_SampleFormat;
+
+/* Parses the string in the "mm:ss.xxx" format
+ and returns the number of milliseconds or -1 if an error occurs. */
+int ASAP_ParseDuration(const char *s);
+
+/* Converts number of milliseconds to a string in the "mm:ss.xxx" format. */
+void ASAP_DurationToString(char *s, int duration);
+
+/* Checks whether the extension of the passed filename is known to ASAP. */
+abool ASAP_IsOurFile(const char *filename);
+
+/* Checks whether the filename extension is known to ASAP. */
+abool ASAP_IsOurExt(const char *ext);
+
+/* Changes the filename extension, returns true on success. */
+abool ASAP_ChangeExt(char *filename, const char *ext);
+
+/* Gets information about a module.
+ "module_info" is the structure where the information is returned.
+ "filename" determines file format.
+ "module" is the music data (contents of the file).
+ "module_len" is the number of data bytes.
+ ASAP_GetModuleInfo() returns true on success. */
+abool ASAP_GetModuleInfo(ASAP_ModuleInfo *module_info, const char *filename,
+ const byte module[], int module_len);
+
+/* Loads music data.
+ "as" is the destination structure.
+ "filename" determines file format.
+ "module" is the music data (contents of the file).
+ "module_len" is the number of data bytes.
+ ASAP does not make copies of the passed pointers. You can overwrite
+ or free "filename" and "module" once this function returns.
+ ASAP_Load() returns true on success.
+ If false is returned, the structure is invalid and you cannot
+ call the following functions. */
+abool ASAP_Load(ASAP_State *as, const char *filename,
+ const byte module[], int module_len);
+
+/* Enables silence detection.
+ Makes ASAP finish playing after the specified period of silence.
+ "as" is ASAP state initialized by ASAP_Load().
+ "seconds" is the minimum length of silence that ends playback. */
+void ASAP_DetectSilence(ASAP_State *as, int seconds);
+
+/* Prepares ASAP to play the specified song of the loaded module.
+ "as" is ASAP state initialized by ASAP_Load().
+ "song" is a zero-based index which must be less than the "songs" field
+ of the ASAP_ModuleInfo structure.
+ "duration" is playback time in milliseconds - use durations[song]
+ unless you want to override it. -1 means indefinitely. */
+void ASAP_PlaySong(ASAP_State *as, int song, int duration);
+
+/* Mutes the selected POKEY channels.
+ This is only useful for people who want to grab samples of individual
+ instruments.
+ "as" is ASAP state after calling ASAP_PlaySong().
+ "mask" is a bit mask which selects POKEY channels to be muted.
+ Bits 0-3 control the base POKEY channels,
+ bits 4-7 control the extra POKEY channels. */
+void ASAP_MutePokeyChannels(ASAP_State *as, int mask);
+
+/* Rewinds the current song.
+ "as" is ASAP state initialized by ASAP_PlaySong().
+ "position" is the requested absolute position in milliseconds. */
+void ASAP_Seek(ASAP_State *as, int position);
+
+/* Fills the specified buffer with generated samples.
+ "as" is ASAP state initialized by ASAP_PlaySong().
+ "buffer" is the destination buffer.
+ "buffer_len" is the length of this buffer in bytes.
+ "format" is the format of samples.
+ ASAP_Generate() returns number of bytes actually written
+ (less than buffer_len if reached the end of the song).
+ Normally you use a buffer of a few kilobytes or less,
+ and call ASAP_Generate() in a loop or via a callback. */
+int ASAP_Generate(ASAP_State *as, void *buffer, int buffer_len,
+ ASAP_SampleFormat format);
+
+/* Checks whether information in the specified file can be edited. */
+abool ASAP_CanSetModuleInfo(const char *filename);
+
+/* Updates the specified module with author, name, date, stereo
+ and song durations as specified in "module_info".
+ "module_info" contains the new module information.
+ "module" is the source file contents.
+ "module_len" is the source file length.
+ "out_module" is the destination buffer of size ASAP_MODULE_MAX.
+ ASAP_SetModuleInfo() returns the resulting file length (number of bytes
+ written to "out_module") or -1 if illegal characters were found. */
+int ASAP_SetModuleInfo(const ASAP_ModuleInfo *module_info, const byte module[],
+ int module_len, byte out_module[]);
+
+/* Checks whether the specified module can be converted to another format.
+ "filename" determines the source format.
+ "module_info" contains the information about the source module,
+ with possibly modified public fields.
+ "module" is the source file contents.
+ "module_len" is the source file length.
+ ASAP_CanConvert() returns the extension of the target format
+ or NULL if there's no possible conversion. */
+const char *ASAP_CanConvert(const char *filename, const ASAP_ModuleInfo *module_info,
+ const byte module[], int module_len);
+
+/* Converts the specified module to the format returned by ASAP_CanConvert().
+ "filename" determines the source format.
+ "module_info" contains the information about the source module,
+ with possibly modified public fields.
+ "module" is the source file contents.
+ "module_len" is the source file length.
+ "out_module" is the destination buffer of size ASAP_MODULE_MAX.
+ ASAP_Convert() returns the resulting file length (number of bytes
+ written to "out_module") or -1 on error. */
+int ASAP_Convert(const char *filename, const ASAP_ModuleInfo *module_info,
+ const byte module[], int module_len, byte out_module[]);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/apps/codecs/asap/asap_internal.h b/apps/codecs/asap/asap_internal.h
new file mode 100644
index 0000000..1385215
--- /dev/null
+++ b/apps/codecs/asap/asap_internal.h
@@ -0,0 +1,93 @@
+/*
+ * asap_internal.h - private interface of the ASAP engine
+ *
+ * Copyright (C) 2005-2008 Piotr Fusik
+ *
+ * This file is part of ASAP (Another Slight Atari Player),
+ * see http://asap.sourceforge.net
+ *
+ * ASAP is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published
+ * by the Free Software Foundation; either version 2 of the License,
+ * or (at your option) any later version.
+ *
+ * ASAP is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty
+ * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with ASAP; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#ifndef _ASAP_INTERNAL_H_
+#define _ASAP_INTERNAL_H_
+
+#if !defined(JAVA) && !defined(CSHARP)
+
+#include "asap.h"
+
+#define CONST_LOOKUP(type, name) \
+ static const type name[]
+#define FILE_FUNC static
+#define ASAP_FUNC
+#define PTR *
+#define ADDRESSOF &
+#define ARRAY *
+#define VOIDPTR void *
+#define UBYTE(data) (data)
+#define SBYTE(data) (signed char) (data)
+#define STRING const char *
+#define ZERO_ARRAY(array) memset(array, 0, sizeof(array))
+#define COPY_ARRAY(dest, dest_offset, src, src_offset, len) \
+ memcpy(dest + dest_offset, src + src_offset, len)
+#define NEW_ARRAY(type, name, size) \
+ type name[size]
+#define INIT_ARRAY(array) memset(array, 0, sizeof(array))
+
+#define AST ast->
+#define PST pst->
+#define MODULE_INFO module_info->
+#define ASAP_OBX const byte *
+#define GET_OBX(name) name##_obx
+
+int ASAP_GetByte(ASAP_State *ast, int addr);
+void ASAP_PutByte(ASAP_State *ast, int addr, int data);
+
+void Cpu_RunScanlines(ASAP_State *ast, int scanlines);
+
+void PokeySound_Initialize(ASAP_State *ast);
+void PokeySound_StartFrame(ASAP_State *ast);
+void PokeySound_PutByte(ASAP_State *ast, int addr, int data);
+int PokeySound_GetRandom(ASAP_State *ast, int addr);
+void PokeySound_EndFrame(ASAP_State *ast, int cycle_limit);
+int PokeySound_Generate(ASAP_State *ast, byte buffer[], int buffer_offset, int blocks, ASAP_SampleFormat format);
+abool PokeySound_IsSilent(const PokeyState *pst);
+void PokeySound_Mute(const ASAP_State *ast, PokeyState *pst, int mask);
+
+#ifdef ASAPSCAN
+abool call_6502_player(ASAP_State *ast);
+extern abool cpu_trace;
+void print_cpu_state(const ASAP_State *ast, int pc, int a, int x, int y, int s, int nz, int vdi, int c);
+#endif
+
+#endif /* !defined(JAVA) && !defined(CSHARP) */
+
+#define ASAP_MAIN_CLOCK 1773447
+
+#define V_FLAG 0x40
+#define D_FLAG 0x08
+#define I_FLAG 0x04
+#define Z_FLAG 0x02
+
+#define NEVER 0x800000
+
+#define dGetByte(addr) UBYTE(AST memory[addr])
+#define dPutByte(addr, data) AST memory[addr] = (byte) (data)
+#define dGetWord(addr) (dGetByte(addr) + (dGetByte((addr) + 1) << 8))
+#define GetByte(addr) (((addr) & 0xf900) == 0xd000 ? ASAP_GetByte(ast, addr) : dGetByte(addr))
+#define PutByte(addr, data) do { if (((addr) & 0xf900) == 0xd000) ASAP_PutByte(ast, addr, data); else dPutByte(addr, data); } while (FALSE)
+#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)
+
+#endif /* _ASAP_INTERNAL_H_ */
diff --git a/apps/codecs/asap/players.h b/apps/codecs/asap/players.h
new file mode 100644
index 0000000..ac94f66
--- /dev/null
+++ b/apps/codecs/asap/players.h
@@ -0,0 +1,947 @@
+static const unsigned char cmc_obx[] = {
+ 0xFF, 0xFF, 0x00, 0x05, 0xDC, 0x0C, 0x4C, 0x0F, 0x0B, 0x4C, 0x78, 0x05, 0x4C, 0xCB, 0x07, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xA0, 0xE3, 0xED, 0xE3, 0xA0, 0xF0, 0xEC, 0xE1,
+ 0xF9, 0xE5, 0xF2, 0xA0, 0xF6, 0xA0, 0xB2, 0xAE, 0xB1, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF,
+ 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x8D, 0x6E,
+ 0x05, 0x8E, 0x6F, 0x05, 0x8C, 0x70, 0x05, 0x29, 0x70, 0x4A, 0x4A, 0x4A, 0xAA, 0xBD, 0x91, 0x0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0x38, 0x35, 0x32, 0x2F, 0x2C, 0x2A, 0x27,
+ 0x25, 0x23, 0x21, 0x1F, 0x1D, 0x1C, 0x1A, 0x18, 0x17, 0x16, 0x14, 0x13, 0x12, 0x11, 0x10, 0x0F,
+ 0x0E, 0x0D, 0x0C, 0x0B, 0x0A, 0x09, 0x08, 0x07, 0x06, 0x05, 0x04, 0x03, 0x02, 0x01, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0xF2, 0xE9, 0xDA, 0xCE, 0xBF, 0xB6, 0xAA, 0xA1, 0x98, 0x8F, 0x89, 0x80,
+ 0x7A, 0x71, 0x6B, 0x65, 0x5F, 0x00, 0x56, 0x50, 0x67, 0x60, 0x5A, 0x55, 0x51, 0x4C, 0x48, 0x43,
+ 0x3F, 0x3D, 0x39, 0x34, 0x33, 0x39, 0x2D, 0x2A, 0x28, 0x25, 0x24, 0x21, 0x1F, 0x1E, 0x00, 0x00,
+ 0x0F, 0x0E, 0x0D, 0x0C, 0x0B, 0x0A, 0x09, 0x08, 0x07, 0x06, 0x05, 0x04, 0x03, 0x02, 0x01, 0x00,
+ 0x00, 0x38, 0x0B, 0x8C, 0x0A, 0x00, 0x0A, 0x6A, 0x09, 0xE8, 0x08, 0x6A, 0x08, 0xEF, 0x07, 0x80,
+ 0x07, 0x08, 0x07, 0xAE, 0x06, 0x46, 0x06, 0xE6, 0x05, 0x95, 0x05, 0x41, 0x05, 0xF6, 0x04, 0xB0,
+ 0x04, 0x6E, 0x04, 0x30, 0x04, 0xF6, 0x03, 0xBB, 0x03, 0x84, 0x03, 0x52, 0x03, 0x22, 0x03, 0xF4,
+ 0x02, 0xC8, 0x02, 0xA0, 0x02, 0x7A, 0x02, 0x55, 0x02, 0x34, 0x02, 0x14, 0x02, 0xF5, 0x01, 0xD8,
+ 0x01, 0xBD, 0x01, 0xA4, 0x01, 0x8D, 0x01, 0x77, 0x01, 0x60, 0x01, 0x4E, 0x01, 0x38, 0x01, 0x27,
+ 0x01, 0x15, 0x01, 0x06, 0x01, 0xF7, 0x00, 0xE8, 0x00, 0xDB, 0x00, 0xCF, 0x00, 0xC3, 0x00, 0xB8,
+ 0x00, 0xAC, 0x00, 0xA2, 0x00, 0x9A, 0x00, 0x90, 0x00, 0x88, 0x00, 0x7F, 0x00, 0x78, 0x00, 0x70,
+ 0x00, 0x6A, 0x00, 0x64, 0x00, 0x5E, 0x00, 0x57, 0x00, 0x52, 0x00, 0x32, 0x00, 0x0A, 0x00, 0x00,
+ 0x01, 0x02, 0x83, 0x00, 0x01, 0x02, 0x03, 0x01, 0x00, 0x02, 0x83, 0x01, 0x00, 0x02, 0x03, 0x01,
+ 0x02, 0x80, 0x03, 0x80, 0x40, 0x20, 0x10, 0x08, 0x04, 0x02, 0x01, 0x03, 0x03, 0x03, 0x03, 0x07,
+ 0x0B, 0x0F, 0x13
+};
+static const unsigned char mpt_obx[] = {
+ 0xFF, 0xFF, 0x00, 0x05, 0xB2, 0x0D, 0x4C, 0xCD, 0x0B, 0xAD, 0x2E, 0x07, 0xD0, 0x01, 0x60, 0xA9,
+ 0x00, 0x8D, 0x1C, 0x0E, 0xEE, 0x1D, 0x0E, 0xAD, 0x17, 0x0E, 0xCD, 0xBB, 0x0D, 0x90, 0x50, 0xCE,
+ 0x15, 0x0E, 0xF0, 0x03, 0x4C, 0xC5, 0x05, 0xA2, 0x00, 0x8E, 0x17, 0x0E, 0xA9, 0x00, 0x9D, 0xED,
+ 0x0D, 0x9D, 0xF5, 0x0D, 0xBD, 0xB3, 0x0D, 0x85, 0xEC, 0xBD, 0xB7, 0x0D, 0x85, 0xED, 0xAC, 0x16,
+ 0x0E, 0xB1, 0xEC, 0xC8, 0xC9, 0xFF, 0xF0, 0x07, 0xC9, 0xFE, 0xD0, 0x0F, 0x4C, 0x2A, 0x0C, 0xB1,
+ 0xEC, 0x30, 0xF9, 0x0A, 0xA8, 0x8C, 0x16, 0x0E, 0x4C, 0x3B, 0x05, 0x9D, 0xE9, 0x0D, 0xB1, 0xE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0x03, 0x03, 0x03, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01,
+ 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x18, 0x18, 0x18,
+ 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x16, 0x16, 0x17, 0x17, 0x17,
+ 0x17, 0x18, 0x18, 0x18, 0x18, 0x18, 0x19, 0x19, 0x19, 0x19, 0x1A, 0x15, 0x15, 0x16, 0x16, 0x16,
+ 0x17, 0x17, 0x18, 0x18, 0x18, 0x19, 0x19, 0x1A, 0x1A, 0x1A, 0x1B, 0x14, 0x15, 0x15, 0x16, 0x16,
+ 0x17, 0x17, 0x18, 0x18, 0x18, 0x19, 0x19, 0x1A, 0x1A, 0x1B, 0x1B, 0x14, 0x14, 0x15, 0x15, 0x16,
+ 0x16, 0x17, 0x17, 0x18, 0x19, 0x19, 0x1A, 0x1A, 0x1B, 0x1B, 0x1C, 0x13, 0x14, 0x14, 0x15, 0x16,
+ 0x16, 0x17, 0x17, 0x18, 0x19, 0x19, 0x1A, 0x1A, 0x1B, 0x1C, 0x1C, 0x13, 0x13, 0x14, 0x15, 0x15,
+ 0x16, 0x17, 0x17, 0x18, 0x19, 0x19, 0x1A, 0x1B, 0x1B, 0x1C, 0x1D, 0x12, 0x13, 0x14, 0x14, 0x15,
+ 0x16, 0x17, 0x17, 0x18, 0x19, 0x19, 0x1A, 0x1B, 0x1C, 0x1C, 0x1D, 0x12, 0x13, 0x13, 0x14, 0x15,
+ 0x16, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1A, 0x1B, 0x1C, 0x1D, 0x1D, 0x12, 0x12, 0x13, 0x14, 0x15,
+ 0x16, 0x16, 0x17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x21, 0x1F, 0x1D, 0x1C, 0x1A, 0x18, 0x17, 0x16, 0x14, 0x13, 0x12, 0x11, 0x10, 0x0F, 0x0E, 0x0D,
+ 0x0C, 0x0B, 0x0A, 0x09, 0x08, 0x07, 0xFF, 0xF1, 0xE4, 0xD8, 0xCA, 0xC0, 0xB5, 0xAB, 0xA2, 0x99,
+ 0x8E, 0x87, 0x7F, 0x79, 0x73, 0x70, 0x66, 0x61, 0x5A, 0x55, 0x52, 0x4B, 0x48, 0x43, 0x3F, 0x3C,
+ 0x39, 0x37, 0x33, 0x30, 0x2D, 0x2A, 0x28, 0x25, 0x24, 0x21, 0x1F, 0x1E, 0x1C, 0x1B, 0x19, 0x17,
+ 0x16, 0x15, 0x13, 0x12, 0x11, 0x10, 0x0F, 0x0E, 0x0D, 0x0C, 0x0B, 0x0A, 0x09, 0x08, 0x07, 0x06,
+ 0x05, 0x04, 0x03, 0x02, 0x01, 0x00, 0xF3, 0xE6, 0xD9, 0xCC, 0xC1, 0xB5, 0xAD, 0xA2, 0x99, 0x90,
+ 0x88, 0x80, 0x79, 0x72, 0x6C, 0x66, 0x60, 0x5B, 0x55, 0x51, 0x4C, 0x48, 0x44, 0x40, 0x3C, 0x39,
+ 0x35, 0x32, 0x2F, 0x2D, 0x2A, 0x28, 0x25, 0x23, 0x21, 0x1F, 0x1D, 0x1C, 0x1A, 0x18, 0x17, 0x16,
+ 0x14, 0x13, 0x12, 0x11, 0x10, 0x0F, 0x0E, 0x0D, 0x0C, 0x0B, 0x0A, 0x09, 0x08, 0x07, 0x06, 0x05,
+ 0x04, 0x03, 0x02, 0x01, 0x00, 0x00, 0x0D, 0x0D, 0x0C, 0x0B, 0x0B, 0x0A, 0x0A, 0x09, 0x08, 0x08,
+ 0x07, 0x07, 0x07, 0x06, 0x06, 0x05, 0x05, 0x05, 0x04, 0x04, 0x04, 0x04, 0x03, 0x03, 0x03, 0x03,
+ 0x03, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
+ 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01,
+ 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
+ 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02,
+ 0x02, 0x02, 0x02, 0x03, 0x03, 0x03, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02,
+ 0x03, 0x03, 0x03, 0x03, 0x04, 0x04, 0x00, 0x00, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x03, 0x03,
+ 0x03, 0x04, 0x04, 0x04, 0x05, 0x05, 0x00, 0x00, 0x01, 0x01, 0x02, 0x02, 0x02, 0x03, 0x03, 0x04,
+ 0x04, 0x04, 0x05, 0x05, 0x06, 0x06, 0x00, 0x00, 0x01, 0x01, 0x02, 0x02, 0x03, 0x03, 0x04, 0x04,
+ 0x05, 0x05, 0x06, 0x06, 0x07, 0x07, 0x00, 0x01, 0x01, 0x02, 0x02, 0x03, 0x03, 0x04, 0x04, 0x05,
+ 0x05, 0x06, 0x06, 0x07, 0x07, 0x08, 0x00, 0x01, 0x01, 0x02, 0x02, 0x03, 0x04, 0x04, 0x05, 0x05,
+ 0x06, 0x07, 0x07, 0x08, 0x08, 0x09, 0x00, 0x01, 0x01, 0x02, 0x03, 0x03, 0x04, 0x05, 0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0B, 0x0A, 0x0A, 0x09, 0x08, 0x08,
+ 0x07, 0x07, 0x07, 0x06, 0x06, 0x05, 0x05, 0x05, 0x04, 0x04, 0x04, 0x04, 0x03, 0x03, 0x03, 0x03,
+ 0x03, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
+ 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01,
+ 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
+ 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02,
+ 0x02, 0x02, 0x02, 0x03, 0x03, 0x03, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02,
+ 0x03, 0x03, 0x03, 0x03, 0x04, 0x04, 0x00, 0x00, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x03, 0x03,
+ 0x03, 0x04, 0x04, 0x04, 0x05, 0x05, 0x00, 0x00, 0x01, 0x01, 0x02, 0x02, 0x02, 0x03, 0x03, 0x04,
+ 0x04, 0x04, 0x05, 0x05, 0x06, 0x06, 0x00, 0x00, 0x01, 0x01, 0x02, 0x02, 0x03, 0x03, 0x04, 0x04,
+ 0x05, 0x05, 0x06, 0x06, 0x07, 0x07, 0x00, 0x01, 0x01, 0x02, 0x02, 0x03, 0x03, 0x04, 0x04, 0x05,
+ 0x05, 0x06, 0x06, 0x07, 0x07, 0x08, 0x00, 0x01, 0x01, 0x02, 0x02, 0x03, 0x04, 0x04, 0x05, 0x05,
+ 0x06, 0x07, 0x07, 0x08, 0x08, 0x09, 0x00, 0x01, 0x01, 0x02, 0x03, 0x03, 0x04, 0x05, 0x05, 0x06,
+ 0x07, 0x07, 0x08, 0x09, 0x09, 0x0A, 0x00, 0x01, 0x01, 0x02, 0x03, 0x04, 0x04, 0x05, 0x06, 0x07,
+ 0x07, 0x08, 0x09, 0x0A, 0x0A, 0x0B, 0x00, 0x01, 0x02, 0x02, 0x03, 0x04, 0x05, 0x06, 0x06, 0x07,
+ 0x08, 0x09, 0x0A, 0x0A, 0x0B, 0x0C, 0x00, 0x01, 0x02, 0x03, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08,
+ 0x09, 0x0A, 0x0A, 0x0B, 0x0C, 0x0D, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x07, 0x08,
+ 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09,
+ 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x4C, 0x0F, 0x06, 0x4C, 0x09, 0x08, 0x4C, 0x2E, 0x08, 0x4C,
+ 0x5C, 0x06, 0x4C, 0x02, 0x0C, 0x86, 0xD3, 0x84, 0xD4, 0x48, 0xA0, 0x00, 0x98, 0x99, 0x00, 0x02,
+ 0x99, 0x4C, 0x02, 0xC8, 0xD0, 0xF7, 0xA0, 0x04, 0xB1, 0xD3, 0x8D, 0x22, 0x08, 0xC8, 0xB1, 0xD3,
+ 0x8D, 0x48, 0x03, 0xC8, 0xB1, 0xD3, 0x8D, 0x12, 0x08, 0x8D, 0x4A, 0x03, 0xA0, 0x08, 0xB1, 0xD3,
+ 0x99, 0xC3, 0x00, 0xC8, 0xC0, 0x10, 0xD0, 0xF6, 0x68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x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
+ 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02,
+ 0x02, 0x02, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x03,
+ 0x03, 0x03, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x03, 0x03, 0x03, 0x03,
+ 0x04, 0x04, 0x00, 0x00, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x03, 0x03, 0x03, 0x04, 0x04, 0x04,
+ 0x05, 0x05, 0x00, 0x00, 0x01, 0x01, 0x02, 0x02, 0x02, 0x03, 0x03, 0x04, 0x04, 0x04, 0x05, 0x05,
+ 0x06, 0x06, 0x00, 0x00, 0x01, 0x01, 0x02, 0x02, 0x03, 0x03, 0x04, 0x04, 0x05, 0x05, 0x06, 0x06,
+ 0x07, 0x07, 0x00, 0x01, 0x01, 0x02, 0x02, 0x03, 0x03, 0x04, 0x04, 0x05, 0x05, 0x06, 0x06, 0x07,
+ 0x07, 0x08, 0x00, 0x01, 0x01, 0x02, 0x02, 0x03, 0x04, 0x04, 0x05, 0x05, 0x06, 0x07, 0x07, 0x08,
+ 0x08, 0x09, 0x00, 0x01, 0x01, 0x02, 0x03, 0x03, 0x04, 0x05, 0x05, 0x06, 0x07, 0x07, 0x08, 0x09,
+ 0x09, 0x0A, 0x00, 0x01, 0x01, 0x02, 0x03, 0x04, 0x04, 0x05, 0x06, 0x07, 0x07, 0x08, 0x09, 0x0A,
+ 0x0A, 0x0B, 0x00, 0x01, 0x02, 0x02, 0x03, 0x04, 0x05, 0x06, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0A,
+ 0x0B, 0x0C, 0x00, 0x01, 0x02, 0x03, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0A, 0x0B,
+ 0x0C, 0x0D, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C,
+ 0x0D, 0x0E, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D,
+ 0x0E, 0x0F, 0x00, 0xF1, 0xE4, 0xD7, 0xCB, 0xC0, 0xB5, 0xAA, 0xA1, 0x98, 0x8F, 0x87, 0x7F, 0x78,
+ 0x72, 0x6B, 0x65, 0x5F, 0x5A, 0x55, 0x50, 0x4B, 0x47, 0x43, 0x3F, 0x3C, 0x38, 0x35, 0x32, 0x2F,
+ 0x2C, 0x2A, 0x27, 0x25, 0x23, 0x21, 0x1F, 0x1D, 0x1C, 0x1A, 0x18, 0x17, 0x16, 0x14, 0x13, 0x12,
+ 0x11, 0x10, 0x0F, 0x0E, 0x0D, 0x0C, 0x0B, 0x0A, 0x09, 0x08, 0x07, 0x06, 0x05, 0x04, 0x03, 0x02,
+ 0x01, 0x00, 0x00, 0xF2, 0xE6, 0xDA, 0xCE, 0xBF, 0xB6, 0xAA, 0xA1, 0x98, 0x8F, 0x89, 0x80, 0x7A,
+ 0x71, 0x6B, 0x65, 0x5F, 0x5C, 0x56, 0x50, 0x4D, 0x47, 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 0xAE, 0x46, 0xE6, 0x95, 0x41, 0xF6, 0xB0, 0x6E, 0x30, 0xF6, 0xBB, 0x84, 0x52, 0x22, 0xF4, 0xC8,
+ 0xA0, 0x7A, 0x55, 0x34, 0x14, 0xF5, 0xD8, 0xBD, 0xA4, 0x8D, 0x77, 0x60, 0x4E, 0x38, 0x27, 0x15,
+ 0x06, 0xF7, 0xE8, 0xDB, 0xCF, 0xC3, 0xB8, 0xAC, 0xA2, 0x9A, 0x90, 0x88, 0x7F, 0x78, 0x70, 0x6A,
+ 0x64, 0x5E, 0x00, 0x0D, 0x0D, 0x0C, 0x0B, 0x0B, 0x0A, 0x0A, 0x09, 0x08, 0x08, 0x07, 0x07, 0x07,
+ 0x06, 0x06, 0x05, 0x05, 0x05, 0x04, 0x04, 0x04, 0x04, 0x03, 0x03, 0x03, 0x03, 0x03, 0x02, 0x02,
+ 0x02, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
+ 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x05,
+ 0x06, 0x07, 0x00, 0x01, 0x02, 0x03, 0x04, 0x02, 0x00, 0x00, 0x04, 0x02, 0x00, 0x00, 0x00, 0x10,
+ 0x00, 0x08, 0x00, 0x10,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 0xFC, 0x9D, 0x74, 0x08, 0xC8, 0xB1, 0xFC, 0x29, 0x3F, 0x9D, 0x7C, 0x08, 0x9D, 0x84, 0x08, 0xC8,
+ 0xB1, 0xFC, 0x29, 0x80, 0xF0, 0x02, 0xA9, 0x01, 0x9D, 0xAC, 0x08, 0xB1, 0xFC, 0x29, 0x70, 0x4A,
+ 0x4A, 0x4A, 0x4A, 0x9D, 0x8C, 0x08, 0xD0, 0x03, 0x9D, 0xAC, 0x08, 0xB1, 0xFC, 0x29, 0x0F, 0x9D,
+ 0x9C, 0x08, 0x9D, 0xA4, 0x08, 0x88, 0xB1, 0xFC, 0x29, 0xC0, 0x18, 0x7D, 0xE4, 0x07, 0x9D, 0xE4,
+ 0x07, 0x9D, 0x22, 0x05, 0xA8, 0xB9, 0x3C, 0x06, 0x9D, 0xF4, 0x07, 0xA9, 0x00, 0x9D, 0x2C, 0x08,
+ 0x9D, 0x64, 0x08, 0x9D, 0x6C, 0x08, 0x9D, 0x94, 0x08, 0xA9, 0x01, 0x9D, 0xBC, 0x07, 0x60
+};
+static const unsigned char tm2_obx[] = {
+ 0xFF, 0xFF, 0x00, 0x02, 0x6B, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01,
+ 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
+ 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02,
+ 0x02, 0x02, 0x02, 0x03, 0x03, 0x03, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02,
+ 0x03, 0x03, 0x03, 0x03, 0x04, 0x04, 0x00, 0x00, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x03, 0x03,
+ 0x03, 0x04, 0x04, 0x04, 0x05, 0x05, 0x00, 0x00, 0x01, 0x01, 0x02, 0x02, 0x02, 0x03, 0x03, 0x04,
+ 0x04, 0x04, 0x05, 0x05, 0x06, 0x06, 0x00, 0x00, 0x01, 0x01, 0x02, 0x02, 0x03, 0x03, 0x04, 0x04,
+ 0x05, 0x05, 0x06, 0x06, 0x07, 0x07, 0x00, 0x01, 0x01, 0x02, 0x02, 0x03, 0x03, 0x04, 0x04, 0x05,
+ 0x05, 0x06, 0x06, 0x07, 0x07, 0x08, 0x00, 0x01, 0x01, 0x02, 0x02, 0x03, 0x04, 0x04, 0x05, 0x05,
+ 0x06, 0x07, 0x07, 0x08, 0x08, 0x09, 0x00, 0x01, 0x01, 0x02, 0x03, 0x03, 0x04, 0x05, 0x05, 0x06,
+ 0x07, 0x07, 0x08, 0x09, 0x09, 0x0A, 0x00, 0x01, 0x01, 0x02, 0x03, 0x04, 0x04, 0x05, 0x06, 0x07,
+ 0x07, 0x08, 0x09, 0x0A, 0x0A, 0x0B, 0x00, 0x01, 0x02, 0x02, 0x03, 0x04, 0x05, 0x06, 0x06, 0x07,
+ 0x08, 0x09, 0x0A, 0x0A, 0x0B, 0x0C, 0x00, 0x01, 0x02, 0x03, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08,
+ 0x09, 0x0A, 0x0A, 0x0B, 0x0C, 0x0D, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x07, 0x08,
+ 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09,
+ 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x00, 0xF1, 0xE4, 0xD7, 0xCB, 0xC0, 0xB5, 0xAA, 0xA1, 0x98,
+ 0x8F, 0x87, 0x7F, 0x78, 0x72, 0x6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 0x7F, 0x78, 0x70, 0x6A, 0x64, 0x5E, 0x0B, 0x0B, 0x0A, 0x0A, 0x09, 0x08, 0x08, 0x07, 0x07, 0x07,
+ 0x06, 0x06, 0x05, 0x05, 0x05, 0x04, 0x04, 0x04, 0x04, 0x03, 0x03, 0x03, 0x03, 0x03, 0x02, 0x02,
+ 0x02, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
+ 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0D, 0x0D, 0x0C, 0x0B, 0x0B, 0x0A, 0x0A, 0x09, 0x08,
+ 0x08, 0x07, 0x07, 0x07, 0x06, 0x06, 0x05, 0x05, 0x05, 0x04, 0x04, 0x04, 0x04, 0x03, 0x03, 0x03,
+ 0x03, 0x03, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
+ 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xE4, 0x0D, 0x4C, 0xE3, 0x06, 0x4C, 0x9F, 0x08, 0x01,
+ 0x10, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x05,
+ 0x06, 0x07, 0x00, 0x01, 0x02, 0x03, 0x04, 0x02, 0x00, 0x00, 0x04, 0x02, 0x00, 0x00, 0x00, 0x10,
+ 0x00, 0x08, 0x00, 0x10, 0x00, 0x08, 0x85, 0xD3, 0x81, 0xA9, 0x85, 0xD3, 0x81, 0xA9, 0x88, 0xB1,
+ 0xFA, 0x8D, 0x17, 0x05, 0xA2, 0x00, 0x86, 0xFC, 0x0A, 0x26, 0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