summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormarkm <markm@FreeBSD.org>1997-10-31 17:25:35 +0000
committermarkm <markm@FreeBSD.org>1997-10-31 17:25:35 +0000
commit5f92dabd2c91914e0d516d6a0fa9d090e5e428c3 (patch)
tree725c723fbf2585904eea091c302ee4aa7206bdb7
parentf164448775c6362174ad4512e2afa6f31506ac29 (diff)
downloadFreeBSD-src-5f92dabd2c91914e0d516d6a0fa9d090e5e428c3.zip
FreeBSD-src-5f92dabd2c91914e0d516d6a0fa9d090e5e428c3.tar.gz
Bring our sound sources up to the level of Amancio's latest-and-greatest.
This corresponds to Voxware 3.5-alpha-<something> and Amancio's guspnp21. There was a bit of a FUBAR during the commmit, so not all files are mentioned in this commit's mail. X-rant: I have just started to _*HATE*_ CVS...
-rw-r--r--sys/i386/isa/sound/pss.c693
-rw-r--r--sys/i386/isa/sound/pss.h371
-rw-r--r--sys/i386/isa/sound/sb16_dsp.c750
-rw-r--r--sys/i386/isa/sound/sb16_midi.c354
-rw-r--r--sys/i386/isa/sound/sb_card.c50
-rw-r--r--sys/i386/isa/sound/sb_dsp.c1664
-rw-r--r--sys/i386/isa/sound/sb_midi.c250
-rw-r--r--sys/i386/isa/sound/sb_mixer.c716
-rw-r--r--sys/i386/isa/sound/sb_mixer.h237
-rw-r--r--sys/i386/isa/sound/sbcard.h54
-rw-r--r--sys/i386/isa/sound/sequencer.c2570
-rw-r--r--sys/i386/isa/sound/sound_calls.h203
-rw-r--r--sys/i386/isa/sound/sound_config.h292
-rw-r--r--sys/i386/isa/sound/sound_pnp.c186
-rw-r--r--sys/i386/isa/sound/sound_switch.c631
-rw-r--r--sys/i386/isa/sound/sound_timer.c456
-rw-r--r--sys/i386/isa/sound/soundcard.c890
-rw-r--r--sys/i386/isa/sound/soundvers.h3
-rw-r--r--sys/i386/isa/sound/sscape.c1334
-rw-r--r--sys/i386/isa/sound/sys_timer.c326
-rw-r--r--sys/i386/isa/sound/trix.c439
-rw-r--r--sys/i386/isa/sound/trix_boot.h2488
-rw-r--r--sys/i386/isa/sound/tuning.h7
-rw-r--r--sys/i386/isa/sound/uart6850.c320
-rw-r--r--sys/i386/isa/sound/ultrasound.h137
25 files changed, 9231 insertions, 6190 deletions
diff --git a/sys/i386/isa/sound/pss.c b/sys/i386/isa/sound/pss.c
new file mode 100644
index 0000000..17acfb2
--- /dev/null
+++ b/sys/i386/isa/sound/pss.c
@@ -0,0 +1,693 @@
+/*
+ * sound/pss.c
+ *
+ * The low level driver for the Personal Sound System (ECHO ESC614).
+ *
+ * Copyright by Hannu Savolainen 1993
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met: 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer. 2.
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ */
+
+#include <i386/isa/sound/sound_config.h>
+
+#if defined(CONFIG_PSS) && defined(CONFIG_AUDIO)
+
+/*
+ * PSS registers.
+ */
+#define REG(x) (devc->base+x)
+#define PSS_DATA 0
+#define PSS_STATUS 2
+#define PSS_CONTROL 2
+#define PSS_ID 4
+#define PSS_IRQACK 4
+#define PSS_PIO 0x1a
+
+/*
+ * Config registers
+ */
+#define CONF_PSS 0x10
+#define CONF_WSS 0x12
+#define CONF_SB 0x13
+#define CONF_CDROM 0x16
+#define CONF_MIDI 0x18
+
+/*
+ * Status bits.
+ */
+#define PSS_FLAG3 0x0800
+#define PSS_FLAG2 0x0400
+#define PSS_FLAG1 0x1000
+#define PSS_FLAG0 0x0800
+#define PSS_WRITE_EMPTY 0x8000
+#define PSS_READ_FULL 0x4000
+
+#include "coproc.h"
+
+#ifdef PSS_HAVE_LD
+#include "synth-ld.h"
+#else
+static int pss_synthLen = 0;
+static u_char pss_synth[1] =
+{0};
+
+#endif
+
+typedef struct pss_config {
+ int base;
+ int irq;
+ int dma;
+ sound_os_info *osp;
+} pss_config;
+
+static pss_config pss_data;
+static pss_config *devc = &pss_data;
+
+static int pss_initialized = 0;
+static int nonstandard_microcode = 0;
+
+int
+probe_pss(struct address_info * hw_config)
+{
+ u_short id;
+ int irq, dma;
+
+ devc->base = hw_config->io_base;
+ irq = devc->irq = hw_config->irq;
+ dma = devc->dma = hw_config->dma;
+ devc->osp = hw_config->osp;
+
+ /* these are the possible addresses */
+ if (devc->base != 0x220 && devc->base != 0x240 &&
+ devc->base != 0x230 && devc->base != 0x250)
+ return 0;
+
+ /* these are the possible irqs */
+ if (irq != 3 && irq != 5 && irq != 7 && irq != 9 &&
+ irq != 10 && irq != 11 && irq != 12)
+ return 0;
+
+ /* and these are the possible dmas */
+ if (dma != 5 && dma != 6 && dma != 7)
+ return 0;
+
+ id = inb(REG(PSS_ID));
+
+ /* XXX the following test cannot possibly succeed! - lr970714 */
+ if ((id >> 8) != 'E') {
+ /*
+ * printf ("No PSS signature detected at 0x%x (0x%x)\n",
+ * devc->base, id);
+ */
+ return 0;
+ }
+ return 1;
+}
+
+static int
+set_irq(pss_config * devc, int dev, int irq)
+{
+ static u_short irq_bits[16] =
+ {
+ 0x0000, 0x0000, 0x0000, 0x0008,
+ 0x0000, 0x0010, 0x0000, 0x0018,
+ 0x0000, 0x0020, 0x0028, 0x0030,
+ 0x0038, 0x0000, 0x0000, 0x0000
+ };
+
+ u_short tmp, bits;
+
+ if (irq < 0 || irq > 15)
+ return 0;
+
+ tmp = inb(REG(dev)) & ~0x38; /* Load confreg, mask IRQ bits out */
+
+ if ((bits = irq_bits[irq]) == 0 && irq != 0) {
+ printf("PSS: Invalid IRQ %d\n", irq);
+ return 0;
+ }
+ outw(REG(dev), tmp | bits);
+ return 1;
+}
+
+static int
+set_io_base(pss_config * devc, int dev, int base)
+{
+ u_short tmp = inb(REG(dev)) & 0x003f;
+ u_short bits = (base & 0x0ffc) << 4;
+
+ outw(REG(dev), bits | tmp);
+
+ return 1;
+}
+
+static int
+set_dma(pss_config * devc, int dev, int dma)
+{
+ static u_short dma_bits[8] =
+ {
+ 0x0001, 0x0002, 0x0000, 0x0003,
+ 0x0000, 0x0005, 0x0006, 0x0007
+ };
+
+ u_short tmp, bits;
+
+ if (dma < 0 || dma > 7)
+ return 0;
+
+ tmp = inb(REG(dev)) & ~0x07; /* Load confreg, mask DMA bits out */
+
+ if ((bits = dma_bits[dma]) == 0 && dma != 4) {
+ printf("PSS: Invalid DMA %d\n", dma);
+ return 0;
+ }
+ outw(REG(dev), tmp | bits);
+ return 1;
+}
+
+static int
+pss_reset_dsp(pss_config * devc)
+{
+ u_long i, limit = get_time() + 10;
+
+ outw(REG(PSS_CONTROL), 0x2000);
+
+ for (i = 0; i < 32768 && get_time() < limit; i++)
+ inb(REG(PSS_CONTROL));
+
+ outw(REG(PSS_CONTROL), 0x0000);
+
+ return 1;
+}
+
+static int
+pss_put_dspword(pss_config * devc, u_short word)
+{
+ int i, val;
+
+ for (i = 0; i < 327680; i++) {
+ val = inb(REG(PSS_STATUS));
+ if (val & PSS_WRITE_EMPTY) {
+ outw(REG(PSS_DATA), word);
+ return 1;
+ }
+ }
+ return 0;
+}
+
+static int
+pss_get_dspword(pss_config * devc, u_short *word)
+{
+ int i, val;
+
+ for (i = 0; i < 327680; i++) {
+ val = inb(REG(PSS_STATUS));
+ if (val & PSS_READ_FULL) {
+ *word = inb(REG(PSS_DATA));
+ return 1;
+ }
+ }
+
+ return 0;
+}
+
+static int
+pss_download_boot(pss_config * devc, u_char *block, int size, int flags)
+{
+ int i, limit, val, count;
+
+ if (flags & CPF_FIRST) {
+ /* _____ Warn DSP software that a boot is coming */
+ outw(REG(PSS_DATA), 0x00fe);
+
+ limit = get_time() + 10;
+
+ for (i = 0; i < 32768 && get_time() < limit; i++)
+ if (inb(REG(PSS_DATA)) == 0x5500)
+ break;
+
+ outw(REG(PSS_DATA), *block++);
+
+ pss_reset_dsp(devc);
+ }
+ count = 1;
+ while (1) {
+ int j;
+
+ for (j = 0; j < 327670; j++) {
+ /* _____ Wait for BG to appear */
+ if (inb(REG(PSS_STATUS)) & PSS_FLAG3)
+ break;
+ }
+
+ if (j == 327670) {
+ /* It's ok we timed out when the file was empty */
+ if (count >= size && flags & CPF_LAST)
+ break;
+ else {
+ printf("\nPSS: DownLoad timeout problems, byte %d=%d\n",
+ count, size);
+ return 0;
+ }
+ }
+ /* _____ Send the next byte */
+ outw(REG(PSS_DATA), *block++);
+ count++;
+ }
+
+ if (flags & CPF_LAST) {
+ /* _____ Why */
+ outw(REG(PSS_DATA), 0);
+
+ limit = get_time() + 10;
+ for (i = 0; i < 32768 && get_time() < limit; i++)
+ val = inb(REG(PSS_STATUS));
+
+ limit = get_time() + 10;
+ for (i = 0; i < 32768 && get_time() < limit; i++) {
+ val = inb(REG(PSS_STATUS));
+ if (val & 0x4000)
+ break;
+ }
+
+ /* now read the version */
+ for (i = 0; i < 32000; i++) {
+ val = inb(REG(PSS_STATUS));
+ if (val & PSS_READ_FULL)
+ break;
+ }
+ if (i == 32000)
+ return 0;
+
+ val = inb(REG(PSS_DATA));
+ /*
+ * printf("<PSS: microcode version %d.%d loaded>", val/16,
+ * val % 16);
+ */
+ }
+ return 1;
+}
+
+void
+attach_pss(struct address_info * hw_config)
+{
+ u_short id;
+ char tmp[100];
+
+ devc->base = hw_config->io_base;
+ devc->irq = hw_config->irq;
+ devc->dma = hw_config->dma;
+ devc->osp = hw_config->osp;
+
+ if (!probe_pss(hw_config))
+ return;
+
+ id = inb(REG(PSS_ID)) & 0x00ff;
+
+ /*
+ * Disable all emulations. Will be enabled later (if required).
+ */
+ outw(REG(CONF_PSS), 0x0000);
+ outw(REG(CONF_WSS), 0x0000);
+ outw(REG(CONF_SB), 0x0000);
+ outw(REG(CONF_MIDI), 0x0000);
+ outw(REG(CONF_CDROM), 0x0000);
+
+#if YOU_REALLY_WANT_TO_ALLOCATE_THESE_RESOURCES
+ if (0) {
+ printf("pss.c: Can't allocate DMA channel\n");
+ return;
+ }
+ if (!set_irq(devc, CONF_PSS, devc->irq)) {
+ printf("PSS: IRQ error\n");
+ return;
+ }
+ if (!set_dma(devc, CONF_PSS, devc->dma)) {
+ printf("PSS: DRQ error\n");
+ return;
+ }
+#endif
+
+ pss_initialized = 1;
+ sprintf(tmp, "ECHO-PSS Rev. %d", id);
+ conf_printf(tmp, hw_config);
+
+ return;
+}
+
+int
+probe_pss_mpu(struct address_info * hw_config)
+{
+ int timeout;
+
+ if (!pss_initialized)
+ return 0;
+
+ if (0) {
+ printf("PSS: MPU I/O port conflict\n");
+ return 0;
+ }
+ if (!set_io_base(devc, CONF_MIDI, hw_config->io_base)) {
+ printf("PSS: MIDI base error.\n");
+ return 0;
+ }
+ if (!set_irq(devc, CONF_MIDI, hw_config->irq)) {
+ printf("PSS: MIDI IRQ error.\n");
+ return 0;
+ }
+ if (!pss_synthLen) {
+ printf("PSS: Can't enable MPU. MIDI synth microcode not available.\n");
+ return 0;
+ }
+ if (!pss_download_boot(devc, pss_synth, pss_synthLen, CPF_FIRST | CPF_LAST)) {
+ printf("PSS: Unable to load MIDI synth microcode to DSP.\n");
+ return 0;
+ }
+ /*
+ * Finally wait until the DSP algorithm has initialized itself and
+ * deactivates receive interrupt.
+ */
+
+ for (timeout = 900000; timeout > 0; timeout--) {
+ if ((inb(hw_config->io_base + 1) & 0x80) == 0) /* Input data avail */
+ inb(hw_config->io_base); /* Discard it */
+ else
+ break; /* No more input */
+ }
+
+#if (defined(CONFIG_MPU401) || defined(CONFIG_MPU_EMU)) && defined(CONFIG_MIDI)
+ return probe_mpu401(hw_config);
+#else
+ return 0
+#endif
+}
+
+static int
+pss_coproc_open(void *dev_info, int sub_device)
+{
+ switch (sub_device) {
+ case COPR_MIDI:
+
+ if (pss_synthLen == 0) {
+ printf("PSS: MIDI synth microcode not available.\n");
+ return -(EIO);
+ }
+ if (nonstandard_microcode)
+ if (!pss_download_boot(devc, pss_synth, pss_synthLen, CPF_FIRST | CPF_LAST)) {
+ printf("PSS: Unable to load MIDI synth microcode to DSP.\n");
+ return -(EIO);
+ }
+ nonstandard_microcode = 0;
+ break;
+
+ default:;
+ }
+ return 0;
+}
+
+static void
+pss_coproc_close(void *dev_info, int sub_device)
+{
+ return;
+}
+
+static void
+pss_coproc_reset(void *dev_info)
+{
+ if (pss_synthLen)
+ if (!pss_download_boot(devc, pss_synth, pss_synthLen, CPF_FIRST | CPF_LAST)) {
+ printf("PSS: Unable to load MIDI synth microcode to DSP.\n");
+ }
+ nonstandard_microcode = 0;
+}
+
+static int
+download_boot_block(void *dev_info, copr_buffer * buf)
+{
+ if (buf->len <= 0 || buf->len > sizeof(buf->data))
+ return -(EINVAL);
+
+ if (!pss_download_boot(devc, buf->data, buf->len, buf->flags)) {
+ printf("PSS: Unable to load microcode block to DSP.\n");
+ return -(EIO);
+ }
+ nonstandard_microcode = 1; /* The MIDI microcode has been
+ * overwritten */
+
+ return 0;
+}
+
+static int
+pss_coproc_ioctl(void *dev_info, u_int cmd, ioctl_arg arg, int local)
+{
+ /* printf("PSS coproc ioctl %x %x %d\n", cmd, arg, local); */
+
+ switch (cmd) {
+ case SNDCTL_COPR_RESET:
+ pss_coproc_reset(dev_info);
+ return 0;
+ break;
+
+ case SNDCTL_COPR_LOAD:
+ {
+ copr_buffer *buf;
+ int err;
+
+ buf = (copr_buffer *) malloc(sizeof(copr_buffer), M_TEMP, M_WAITOK);
+ if (buf == NULL)
+ return -(ENOSPC);
+
+ bcopy(&(((char *) arg)[0]), (char *) buf, sizeof(*buf));
+ err = download_boot_block(dev_info, buf);
+ free(buf, M_TEMP);
+ return err;
+ }
+ break;
+
+ case SNDCTL_COPR_RDATA:
+ {
+ copr_debug_buf buf;
+ u_long flags;
+ u_short tmp;
+
+ bcopy(&(((char *) arg)[0]), (char *) &buf, sizeof(buf));
+
+ flags = splhigh();
+ if (!pss_put_dspword(devc, 0x00d0)) {
+ splx(flags);
+ return -(EIO);
+ }
+ if (!pss_put_dspword(devc, (u_short) (buf.parm1 & 0xffff))) {
+ splx(flags);
+ return -(EIO);
+ }
+ if (!pss_get_dspword(devc, &tmp)) {
+ splx(flags);
+ return -(EIO);
+ }
+ buf.parm1 = tmp;
+ splx(flags);
+
+ bcopy(&buf, &(((char *) arg)[0]), sizeof(buf));
+ return 0;
+ }
+ break;
+
+ case SNDCTL_COPR_WDATA:
+ {
+ copr_debug_buf buf;
+ u_long flags;
+ u_short tmp;
+
+ bcopy(&(((char *) arg)[0]), (char *) &buf, sizeof(buf));
+
+ flags = splhigh();
+ if (!pss_put_dspword(devc, 0x00d1)) {
+ splx(flags);
+ return -(EIO);
+ }
+ if (!pss_put_dspword(devc, (u_short) (buf.parm1 & 0xffff))) {
+ splx(flags);
+ return -(EIO);
+ }
+ tmp = (u_int) buf.parm2 & 0xffff;
+ if (!pss_put_dspword(devc, tmp)) {
+ splx(flags);
+ return -(EIO);
+ }
+ splx(flags);
+ return 0;
+ }
+ break;
+
+ case SNDCTL_COPR_WCODE:
+ {
+ copr_debug_buf buf;
+ u_long flags;
+ u_short tmp;
+
+ bcopy(&(((char *) arg)[0]), (char *) &buf, sizeof(buf));
+
+ flags = splhigh();
+ if (!pss_put_dspword(devc, 0x00d3)) {
+ splx(flags);
+ return -(EIO);
+ }
+ if (!pss_put_dspword(devc, (u_short) (buf.parm1 & 0xffff))) {
+ splx(flags);
+ return -(EIO);
+ }
+ tmp = ((u_int) buf.parm2 >> 8) & 0xffff;
+ if (!pss_put_dspword(devc, tmp)) {
+ splx(flags);
+ return -(EIO);
+ }
+ tmp = (u_int) buf.parm2 & 0x00ff;
+ if (!pss_put_dspword(devc, tmp)) {
+ splx(flags);
+ return -(EIO);
+ }
+ splx(flags);
+ return 0;
+ }
+ break;
+
+ case SNDCTL_COPR_RCODE:
+ {
+ copr_debug_buf buf;
+ u_long flags;
+ u_short tmp;
+
+ bcopy(&(((char *) arg)[0]), (char *) &buf, sizeof(buf));
+
+ flags = splhigh();
+ if (!pss_put_dspword(devc, 0x00d2)) {
+ splx(flags);
+ return -(EIO);
+ }
+ if (!pss_put_dspword(devc, (u_short) (buf.parm1 & 0xffff))) {
+ splx(flags);
+ return -(EIO);
+ }
+ if (!pss_get_dspword(devc, &tmp)) { /* Read msb */
+ splx(flags);
+ return -(EIO);
+ }
+ buf.parm1 = tmp << 8;
+
+ if (!pss_get_dspword(devc, &tmp)) { /* Read lsb */
+ splx(flags);
+ return -(EIO);
+ }
+ buf.parm1 |= tmp & 0x00ff;
+
+ splx(flags);
+
+ bcopy(&buf, &(((char *) arg)[0]), sizeof(buf));
+ return 0;
+ }
+ break;
+
+ default:
+ return -(EINVAL);
+ }
+
+ return -(EINVAL);
+}
+
+static coproc_operations pss_coproc_operations =
+{
+ "ADSP-2115",
+ pss_coproc_open,
+ pss_coproc_close,
+ pss_coproc_ioctl,
+ pss_coproc_reset,
+ &pss_data
+};
+
+void
+attach_pss_mpu(struct address_info * hw_config)
+{
+ int prev_devs;
+
+#if (defined(CONFIG_MPU401) || defined(CONFIG_MPU_EMU)) && defined(CONFIG_MIDI)
+ prev_devs = num_midis;
+ attach_mpu401(hw_config);
+
+ if (num_midis == (prev_devs + 1)) /* The MPU driver installed
+ * itself */
+ midi_devs[prev_devs]->coproc = &pss_coproc_operations;
+#endif
+}
+
+int
+probe_pss_mss(struct address_info * hw_config)
+{
+ int timeout;
+
+ if (!pss_initialized)
+ return 0;
+
+ if (0) {
+ printf("PSS: WSS I/O port conflict\n");
+ return 0;
+ }
+ if (!set_io_base(devc, CONF_WSS, hw_config->io_base)) {
+ printf("PSS: WSS base error.\n");
+ return 0;
+ }
+ if (!set_irq(devc, CONF_WSS, hw_config->irq)) {
+ printf("PSS: WSS IRQ error.\n");
+ return 0;
+ }
+ if (!set_dma(devc, CONF_WSS, hw_config->dma)) {
+ printf("PSS: WSS DRQ error\n");
+ return 0;
+ }
+ /*
+ * For some reason the card returns 0xff in the WSS status register
+ * immediately after boot. Propably MIDI+SB emulation algorithm
+ * downloaded to the ADSP2115 spends some time initializing the card.
+ * Let's try to wait until it finishes this task.
+ */
+ for (timeout = 0;
+ timeout < 100000 && (inb(hw_config->io_base + 3) & 0x3f) != 0x04;
+ timeout++);
+
+ return probe_mss(hw_config);
+}
+
+void
+attach_pss_mss(struct address_info * hw_config)
+{
+ int prev_devs;
+ long ret;
+
+ prev_devs = num_audiodevs;
+ attach_mss(hw_config);
+
+ /* Check if The MSS driver installed itself */
+ if (num_audiodevs == (prev_devs + 1))
+ audio_devs[prev_devs]->coproc = &pss_coproc_operations;
+}
+
+#endif
diff --git a/sys/i386/isa/sound/pss.h b/sys/i386/isa/sound/pss.h
new file mode 100644
index 0000000..e020af6
--- /dev/null
+++ b/sys/i386/isa/sound/pss.h
@@ -0,0 +1,371 @@
+/******************************************************************************
+
+ def.h
+
+ Version 1.3 11/2/93
+
+ Copyright (c) 1993 Analog Devices Inc. All rights reserved
+
+******************************************************************************/
+/* Port offsets from base port for Sound Blaster DSP */
+#define DSP_PORT_CMSD0 0x00 /* C/MS music voice 1-6 data port, write only */
+#define DSP_PORT_CMSR0 0x01 /* C/MS music voice 1-6 register port, write only */
+#define DSP_PORT_CMSD1 0x02 /* C/MS music voice 7-12 data port, write only */
+#define DSP_PORT_CMSR1 0x03 /* C/MS music voice 7-12 register port, write only */
+
+#define DSP_PORT_STATUS 0x04 /* DSP Status bits, read only */
+#define DSP_PORT_CONTROL 0x04 /* DSP Control bits, write only */
+#define DSP_PORT_DATA_LSB 0x05 /* Read or write LSB of 16 bit data */
+
+
+#define DSP_PORT_RESET 0x06 /* DSP Reset, write only */
+#define DSP_PORT_07h 0x07 /* reserved port */
+
+#define DSP_PORT_FMD0 0x08 /* FM music data/status port, read/write */
+#define DSP_PORT_FMR0 0x09 /* FM music data/status port, write only */
+
+#define DSP_PORT_RDDATA 0x0A /* DSP Read data, read only reading signals DSP */
+#define DSP_PORT_0Bh 0x0B /* reserved port */
+#define DSP_PORT_WRDATA 0x0C /* DSP Write data or command, write */
+#define DSP_PORT_WRBUSY 0x0C /* DSP Write buffer status (bit 7), read */
+#define DSP_PORT_0Dh 0x0D /* reserved port */
+#define DSP_PORT_DATAAVAIL 0x0E /* DSP Data available status (bit 7), read only */
+#define DSP_PORT_INTERFACE 0x0E /* Sets DMA Channel and Interrupt, write only */
+#define DSP_PORT_0Fh 0x0F /* reserved port (used on Pro cards) */
+
+#define ADDR_MASK 0x003f
+
+#define INT_MASK 0xffc7
+#define INT_3_BITS 0x0008
+#define INT_5_BITS 0x0010
+#define INT_7_BITS 0x0018
+#define INT_9_BITS 0x0020
+#define INT_10_BITS 0x0028
+#define INT_11_BITS 0x0030
+#define INT_12_BITS 0x0038
+
+#define GAME_BIT 0x0400
+#define GAME_BIT_MASK 0xfbff
+
+#define INT_TEST_BIT 0x0200
+#define INT_TEST_PASS 0x0100
+#define INT_TEST_BIT_MASK 0xFDFF
+
+#define DMA_MASK 0xfff8
+#define DMA_0_BITS 0x0001
+#define DMA_1_BITS 0x0002
+#define DMA_3_BITS 0x0003
+#define DMA_5_BITS 0x0004
+#define DMA_6_BITS 0x0005
+#define DMA_7_BITS 0x0006
+
+#define DMA_TEST_BIT 0x0080
+#define DMA_TEST_PASS 0x0040
+#define DMA_TEST_BIT_MASK 0xFF7F
+
+
+/* Echo DSP Flags */
+
+#define DSP_FLAG3 0x10
+#define DSP_FLAG2 0x08
+#define DSP_FLAG1 0x80
+#define DSP_FLAG0 0x40
+
+#define PSS_CONFIG 0x10
+#define PSS_WSS_CONFIG 0x12
+#define SB_CONFIG 0x14
+#define MIDI_CONFIG 0x18
+#define CD_CONFIG 0x16
+#define UART_CONFIG 0x1a
+
+#define PSS_DATA 0x00
+#define PSS_STATUS 0x02
+#define PSS_CONTROL 0x02
+#define PSS_ID_VERS 0x04
+
+#define PSS_FLAG3 0x0800
+#define PSS_FLAG2 0x0400
+#define PSS_FLAG1 0x1000
+#define PSS_FLAG0 0x0800
+
+/*_____ WSS defines */
+#define WSS_BASE_ADDRESS 0x530
+#define WSS_CONFIG 0x0
+#define WSS_VERSION 0x03
+#define WSS_SP0 0x04
+#define WSS_SP1 0x05
+#define WSS_SP2 0x06
+#define WSS_SP3 0x07
+
+/*_____ SoundPort register addresses */
+
+#define SP_LIN_SOURCE_CTRL 0x00
+#define SP_RIN_SOURCE_CTRL 0x01
+#define SP_LIN_GAIN_CTRL 0x10
+#define SP_RIN_GAIN_CTRL 0x11
+#define SP_LAUX1_CTRL 0x02
+#define SP_RAUX1_CTRL 0x03
+#define SP_LAUX2_CTRL 0x04
+#define SP_RAUX2_CTRL 0x05
+#define SP_LOUT_CTRL 0x06
+#define SP_ROUT_CTRL 0x07
+#define SP_CLK_FORMAT 0x48
+#define SP_INT_CONF 0x09
+#define SP_INT_CONF_MCE 0x49
+#define SP_PIN_CTRL 0x0a
+#define SP_TEST_INIT 0x0b
+#define SP_MISC_CTRL 0x0c
+#define SP_MIX_CTRL 0x0d
+#define SP_DMA_UCNT 0x0e
+#define SP_DMA_LCNT 0x0f
+
+/*_____ Gain constants */
+
+#define GAIN_0 0x00
+#define GAIN_1_5 0x01
+#define GAIN_3 0x02
+#define GAIN_4_5 0x03
+#define GAIN_6 0x04
+#define GAIN_7_5 0x05
+#define GAIN_9 0x06
+#define GAIN_10_5 0x07
+#define GAIN_12 0x08
+#define GAIN_13_5 0x09
+#define GAIN_15 0x0a
+#define GAIN_16_5 0x0b
+#define GAIN_18 0x0c
+#define GAIN_19_5 0x0d
+#define GAIN_21 0x0e
+#define GAIN_22_5 0x0f
+#define MUTE 0XFFFF
+
+/*_____ Attenuation constants */
+
+#define ATTEN_0 0x00
+#define ATTEN_1_5 0x01
+#define ATTEN_3 0x02
+#define ATTEN_4_5 0x03
+#define ATTEN_6 0x04
+#define ATTEN_7_5 0x05
+#define ATTEN_9 0x06
+#define ATTEN_10_5 0x07
+#define ATTEN_12 0x08
+#define ATTEN_13_5 0x09
+#define ATTEN_15 0x0a
+#define ATTEN_16_5 0x0b
+#define ATTEN_18 0x0c
+#define ATTEN_19_5 0x0d
+#define ATTEN_21 0x0e
+#define ATTEN_22_5 0x0f
+
+
+#define PSS_WRITE_EMPTY 0x8000
+
+#define CD_POL_MASK 0xFFBF
+#define CD_POL_BIT 0x0040
+
+
+
+/******************************************************************************
+
+ host.h
+
+ Version 1.2 9/27/93
+
+ Copyright (c) 1993 Analog Devices Inc. All rights reserved
+
+******************************************************************************/
+#define SB_WRITE_FULL 0x80
+#define SB_READ_FULL 0x80
+#define SB_WRITE_STATUS 0x0C
+#define SB_READ_STATUS 0x0E
+#define SB_READ_DATA 0x0A
+#define SB_WRITE_DATA 0x0C
+
+#define PSS_DATA_REG 0x00
+#define PSS_STATUS_REG 0x02
+#define PSS_WRITE_EMPTY 0x8000
+#define PSS_READ_FULL 0x4000
+
+/*_____ 1848 Sound Port bit defines */
+
+#define SP_IN_INIT 0x80
+#define MODE_CHANGE_ENABLE 0x40
+#define MODE_CHANGE_MASK 0xbf
+#define TRANSFER_DISABLE 0x20
+#define TRANSFER_DISABLE_MASK 0xdf
+#define ADDRESS_MASK 0xf0
+
+/*_____ Status bits */
+#define INTERRUPT_STATUS 0x01
+#define PLAYBACK_READY 0x02
+#define PLAYBACK_LEFT 0x04
+/*_____ pbright is not left */
+#define PLAYBACK_UPPER 0x08
+/*_____ bplower is not upper */
+
+#define SAMPLE_OVERRUN 0x10
+#define SAMPLE_UNDERRUN 0x10
+#define CAPTURE_READY 0x20
+#define CAPTURE_LEFT 0x40
+/*_____ cpright is not left */
+#define CAPTURE_UPPER 0x08
+/*_____ cplower is not upper */
+
+/*_____ Input & Output regs bits */
+#define LINE_INPUT 0x80
+#define AUX_INPUT 0x40
+#define MIC_INPUT 0x80
+#define MIXED_DAC_INPUT 0xC0
+#define INPUT_GAIN_MASK 0xf0
+#define INPUT_MIC_GAIN_ENABLE 0x20
+#define INPUT_MIC_GAIN_MASK 0xdf
+#define INPUT_SOURCE_MASK 0x3f
+#define AUX_INPUT_ATTEN_MASK 0xf0
+#define AUX_INPUT_MUTE 0x80
+#define AUX_INPUT_MUTE_MASK 0x7f
+#define OUTPUT_MUTE 0x80
+#define OUTPUT_MUTE_MASK 0x7f
+#define OUTPUT_ATTEN_MASK 0xc0
+
+/*_____ Clock and Data format reg bits */
+#define CLOCK_SELECT_MASK 0xfe
+#define CLOCK_XTAL2 0x01
+#define CLOCK_XTAL1 0x00
+#define CLOCK_FREQ_MASK 0xf1
+#define STEREO_MONO_MASK 0xef
+#define STEREO 0x10
+#define AUDIO_MONO 0x00
+#define LINEAR_COMP_MASK 0xdf
+#define LINEAR 0x00
+#define COMPANDED 0x20
+#define FORMAT_MASK 0xbf
+#define PCM 0x00
+#define ULAW 0x00
+#define TWOS_COMP 0x40
+#define ALAW 0x40
+
+/*_____ Interface Configuration reg bits */
+#define PLAYBACK_ENABLE 0x01
+#define PLAYBACK_ENABLE_MASK 0xfe
+#define CAPTURE_ENABLE 0x02
+#define CAPTURE_ENABLE_MASK 0xfd
+#define SINGLE_DMA 0x04
+#define SINGLE_DMA_MASK 0xfb
+#define DUAL_DMA 0x00
+#define AUTO_CAL_ENABLE 0x08
+#define AUTO_CAL_DISABLE_MASK 0xf7
+#define PLAYBACK_PIO_ENABLE 0x40
+#define PLAYBACK_DMA_MASK 0xbf
+#define CAPTURE_PIO_ENABLE 0x80
+#define CAPTURE_DMA_MASK 0x7f
+
+/*_____ Pin control bits */
+#define INTERRUPT_ENABLE 0x02
+#define INTERRUPT_MASK 0xfd
+
+/*_____ Test and init reg bits */
+#define OVERRANGE_LEFT_MASK 0xfc
+#define OVERRANGE_RIGHT_MASK 0xf3
+#define DATA_REQUEST_STATUS 0x10
+#define AUTO_CAL_IN_PROG 0x20
+#define PLAYBACK_UNDERRUN 0x40
+#define CAPTURE_UNDERRUN 0x80
+
+/*_____ Miscellaneous Control reg bits */
+#define ID_MASK 0xf0
+
+/*_____ Digital Mix Control reg bits */
+#define DIGITAL_MIX1_MUTE_MASK 0xfe
+#define MIX_ATTEN_MASK 0x03
+
+/*_____ 1848 Sound Port reg defines */
+
+#define SP_LEFT_INPUT_CONTROL 0x0
+#define SP_RIGHT_INPUT_CONTROL 0x1
+#define SP_LEFT_AUX1_CONTROL 0x2
+#define SP_RIGHT_AUX1_CONTROL 0x3
+#define SP_LEFT_AUX2_CONTROL 0x4
+#define SP_RIGHT_AUX2_CONTROL 0x5
+#define SP_LEFT_OUTPUT_CONTROL 0x6
+#define SP_RIGHT_OUTPUT_CONTROL 0x7
+#define SP_CLOCK_DATA_FORMAT 0x8
+#define SP_INTERFACE_CONFIG 0x9
+#define SP_PIN_CONTROL 0xA
+#define SP_TEST_AND_INIT 0xB
+#define SP_MISC_INFO 0xC
+#define SP_DIGITAL_MIX 0xD
+#define SP_UPPER_BASE_COUNT 0xE
+#define SP_LOWER_BASE_COUNT 0xF
+
+#define HOST_SP_ADDR (0x534)
+#define HOST_SP_DATA (0x535)
+
+
+/******************************************************************************
+
+ phillips.h
+
+ Version 1.2 9/27/93
+
+ Copyright (c) 1993 Analog Devices Inc. All rights reserved
+
+******************************************************************************/
+/*_____ Phillips control SW defines */
+
+/*_____ Settings and ranges */
+#define VOLUME_MAX 6
+#define VOLUME_MIN (-64)
+#define VOLUME_RANGE 70
+#define VOLUME_STEP 2
+#define BASS_MAX 15
+#define BASS_MIN (-12)
+#define BASS_STEP 2
+#define BASS_RANGE 27
+#define TREBLE_MAX 12
+#define TREBLE_MIN (-12)
+#define TREBLE_STEP 2
+#define TREBLE_RANGE 24
+
+#define VOLUME_CONSTANT 252
+#define BASS_CONSTANT 246
+#define TREBLE_CONSTANT 246
+
+/*_____ Software commands */
+#define SET_MASTER_COMMAND 0x0010
+#define MASTER_VOLUME_LEFT 0x0000
+#define MASTER_VOLUME_RIGHT 0x0100
+#define MASTER_BASS 0x0200
+#define MASTER_TREBLE 0x0300
+#define MASTER_SWITCH 0x0800
+
+#define STEREO_MODE 0x00ce
+#define PSEUDO_MODE 0x00d6
+#define SPATIAL_MODE 0x00de
+#define MONO_MODE 0x00c6
+
+
+#define PSS_STEREO 0x00ce
+#define PSS_PSEUDO 0x00d6
+#define PSS_SPATIAL 0x00de
+#define PSS_MONO 0x00c6
+
+#define PHILLIPS_VOL_MIN -64
+#define PHILLIPS_VOL_MAX 6
+#define PHILLIPS_VOL_DELTA 70
+#define PHILLIPS_VOL_INITIAL -20
+#define PHILLIPS_VOL_CONSTANT 252
+#define PHILLIPS_VOL_STEP 2
+#define PHILLIPS_BASS_MIN -12
+#define PHILLIPS_BASS_MAX 15
+#define PHILLIPS_BASS_DELTA 27
+#define PHILLIPS_BASS_INITIAL 0
+#define PHILLIPS_BASS_CONSTANT 246
+#define PHILLIPS_BASS_STEP 2
+#define PHILLIPS_TREBLE_MIN -12
+#define PHILLIPS_TREBLE_MAX 12
+#define PHILLIPS_TREBLE_DELTA 24
+#define PHILLIPS_TREBLE_INITIAL 0
+#define PHILLIPS_TREBLE_CONSTANT 246
+#define PHILLIPS_TREBLE_STEP 2
+
diff --git a/sys/i386/isa/sound/sb16_dsp.c b/sys/i386/isa/sound/sb16_dsp.c
index 16df9d5..1e94e15 100644
--- a/sys/i386/isa/sound/sb16_dsp.c
+++ b/sys/i386/isa/sound/sb16_dsp.c
@@ -1,12 +1,12 @@
/*
* sound/sb16_dsp.c
- *
+ *
* The low level driver for the SoundBlaster DSP chip.
- *
+ *
* (C) 1993 J. Schubert (jsb@sth.ruhr-uni-bochum.de)
- *
+ *
* based on SB-driver by (C) Hannu Savolainen
- *
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met: 1. Redistributions of source code must retain the above copyright
@@ -14,7 +14,7 @@
* Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
@@ -26,568 +26,486 @@
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
- *
+ *
*/
#define DEB(x)
#define DEB1(x)
-/*
- * #define DEB_DMARES
- */
#include <i386/isa/sound/sound_config.h>
-#include <i386/isa/sound/sb_defs.h>
+#include "sb.h"
#include <i386/isa/sound/sb_mixer.h>
+#include <i386/isa/sound/sbcard.h>
-#if defined(CONFIGURE_SOUNDCARD) && !defined(EXCLUDE_SB16) && !defined(EXCLUDE_SB) && !defined(EXCLUDE_AUDIO) && !defined(EXCLUDE_SBPRO)
+#if defined(CONFIG_SB16) && (NSB > 0) && defined(CONFIG_AUDIO) && defined(CONFIG_SBPRO)
-extern int sbc_base;
-extern int sbc_major;
-extern int sbc_minor;
-
-static int sb16_dsp_ok = 0; /*
+extern sound_os_info *sb_osp;
+extern int sbc_base;
- * * * * Set to 1 after successful *
- * * initialization */
+static int sb16_dsp_ok = 0;
static int dsp_16bit = 0;
static int dsp_stereo = 0;
-static int dsp_current_speed = 8000; /*
-
-
- * * * * DSP_DEFAULT_SPEED; */
+static int dsp_current_speed = 8000;
static int dsp_busy = 0;
static int dma16, dma8;
-static unsigned long dsp_count = 0;
-
-static int irq_mode = IMODE_NONE; /*
+static int trigger_bits = 0;
+static u_long dsp_count = 0;
-
- * * * * IMODE_INPUT, IMODE_OUTPUT
- * or * * IMODE_NONE */
+static int irq_mode = IMODE_NONE;
static int my_dev = 0;
static volatile int intr_active = 0;
-static int sb16_dsp_open (int dev, int mode);
-static void sb16_dsp_close (int dev);
-static void sb16_dsp_output_block (int dev, unsigned long buf, int count, int intrflag, int dma_restart);
-static void sb16_dsp_start_input (int dev, unsigned long buf, int count, int intrflag, int dma_restart);
-static int sb16_dsp_ioctl (int dev, unsigned int cmd, unsigned int arg, int local);
-static int sb16_dsp_prepare_for_input (int dev, int bsize, int bcount);
-static int sb16_dsp_prepare_for_output (int dev, int bsize, int bcount);
-static void sb16_dsp_reset (int dev);
-static void sb16_dsp_halt (int dev);
-static int dsp_set_speed (int);
-static int dsp_set_stereo (int);
-static void dsp_cleanup (void);
+static int sb16_dsp_open(int dev, int mode);
+static void sb16_dsp_close(int dev);
+static void sb16_dsp_output_block(int dev, u_long buf, int count, int intrflag, int dma_restart);
+static void sb16_dsp_start_input(int dev, u_long buf, int count, int intrflag, int dma_restart);
+static int sb16_dsp_ioctl(int dev, u_int cmd, ioctl_arg arg, int local);
+static int sb16_dsp_prepare_for_input(int dev, int bsize, int bcount);
+static int sb16_dsp_prepare_for_output(int dev, int bsize, int bcount);
+static void sb16_dsp_reset(int dev);
+static void sb16_dsp_halt(int dev);
+static void sb16_dsp_trigger(int dev, int bits);
+static int dsp_set_speed(int);
+static int dsp_set_stereo(int);
+static void dsp_cleanup(void);
static struct audio_operations sb16_dsp_operations =
{
- "SoundBlaster 16",
- DMA_AUTOMODE,
- AFMT_U8 | AFMT_S16_LE,
- NULL,
- sb16_dsp_open,
- sb16_dsp_close,
- sb16_dsp_output_block,
- sb16_dsp_start_input,
- sb16_dsp_ioctl,
- sb16_dsp_prepare_for_input,
- sb16_dsp_prepare_for_output,
- sb16_dsp_reset,
- sb16_dsp_halt,
- NULL,
- NULL
+ "SoundBlaster 16",
+ DMA_AUTOMODE,
+ AFMT_U8 | AFMT_S16_LE,
+ NULL,
+ sb16_dsp_open,
+ sb16_dsp_close,
+ sb16_dsp_output_block,
+ sb16_dsp_start_input,
+ sb16_dsp_ioctl,
+ sb16_dsp_prepare_for_input,
+ sb16_dsp_prepare_for_output,
+ sb16_dsp_reset,
+ sb16_dsp_halt,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ sb16_dsp_trigger
};
static int
-sb_dsp_command01 (unsigned char val)
+sb_dsp_command01(u_char val)
{
- int i = 1 << 16;
+ int i = 1 << 16;
- while (--i & (!INB (DSP_STATUS) & 0x80));
- if (!i)
- printk ("SB16 sb_dsp_command01 Timeout\n");
- return sb_dsp_command (val);
+ while (--i & (!inb(DSP_STATUS) & 0x80));
+ if (!i)
+ printf("SB16 sb_dsp_command01 Timeout\n");
+ return sb_dsp_command(val);
}
static int
-dsp_set_speed (int mode)
+dsp_set_speed(int mode)
{
- DEB (printk ("dsp_set_speed(%d)\n", mode));
- if (mode)
- {
- if (mode < 5000)
- mode = 5000;
- if (mode > 44100)
- mode = 44100;
- dsp_current_speed = mode;
+ DEB(printf("dsp_set_speed(%d)\n", mode));
+ if (mode) {
+ RANGE (mode, 5000, 44100);
+ dsp_current_speed = mode;
}
- return mode;
+ return mode;
}
static int
-dsp_set_stereo (int mode)
+dsp_set_stereo(int mode)
{
- DEB (printk ("dsp_set_stereo(%d)\n", mode));
-
- dsp_stereo = mode;
-
- return mode;
+ DEB(printf("dsp_set_stereo(%d)\n", mode));
+ dsp_stereo = mode;
+ return mode;
}
static int
-dsp_set_bits (int arg)
+dsp_set_bits(int arg)
{
- DEB (printk ("dsp_set_bits(%d)\n", arg));
+ DEB(printf("dsp_set_bits(%d)\n", arg));
- if (arg)
- switch (arg)
- {
- case 8:
- dsp_16bit = 0;
- break;
- case 16:
- dsp_16bit = 1;
- break;
- default:
- dsp_16bit = 0;
- }
- return dsp_16bit ? 16 : 8;
+ if (arg)
+ dsp_16bit = (arg == 16) ? 1 : 0 ;
+ return dsp_16bit ? 16 : 8;
}
static int
-sb16_dsp_ioctl (int dev, unsigned int cmd, unsigned int arg, int local)
+sb16_dsp_ioctl(int dev, u_int cmd, ioctl_arg arg, int local)
{
- switch (cmd)
- {
+ switch (cmd) {
case SOUND_PCM_WRITE_RATE:
- if (local)
- return dsp_set_speed (arg);
- return IOCTL_OUT (arg, dsp_set_speed (IOCTL_IN (arg)));
+ if (local)
+ return dsp_set_speed((int) arg);
+ return *(int *) arg = dsp_set_speed((*(int *) arg));
case SOUND_PCM_READ_RATE:
- if (local)
- return dsp_current_speed;
- return IOCTL_OUT (arg, dsp_current_speed);
+ if (local)
+ return dsp_current_speed;
+ return *(int *) arg = dsp_current_speed;
case SNDCTL_DSP_STEREO:
- if (local)
- return dsp_set_stereo (arg);
- return IOCTL_OUT (arg, dsp_set_stereo (IOCTL_IN (arg)));
+ if (local)
+ return dsp_set_stereo((int) arg);
+ return *(int *) arg = dsp_set_stereo((*(int *) arg));
case SOUND_PCM_WRITE_CHANNELS:
- if (local)
- return dsp_set_stereo (arg - 1) + 1;
- return IOCTL_OUT (arg, dsp_set_stereo (IOCTL_IN (arg) - 1) + 1);
+ if (local)
+ return dsp_set_stereo((int) arg - 1) + 1;
+ return *(int *) arg = dsp_set_stereo((*(int *) arg) - 1) + 1;
case SOUND_PCM_READ_CHANNELS:
- if (local)
- return dsp_stereo + 1;
- return IOCTL_OUT (arg, dsp_stereo + 1);
+ if (local)
+ return dsp_stereo + 1;
+ return *(int *) arg = dsp_stereo + 1;
case SNDCTL_DSP_SETFMT:
- if (local)
- return dsp_set_bits (arg);
- return IOCTL_OUT (arg, dsp_set_bits (IOCTL_IN (arg)));
+ if (local)
+ return dsp_set_bits((int) arg);
+ return *(int *) arg = dsp_set_bits((*(int *) arg));
case SOUND_PCM_READ_BITS:
- if (local)
- return dsp_16bit ? 16 : 8;
- return IOCTL_OUT (arg, dsp_16bit ? 16 : 8);
-
- case SOUND_PCM_WRITE_FILTER: /*
- * NOT YET IMPLEMENTED
- */
- if (IOCTL_IN (arg) > 1)
- return IOCTL_OUT (arg, RET_ERROR (EINVAL));
+ if (local)
+ return dsp_16bit ? 16 : 8;
+ return *(int *) arg = dsp_16bit ? 16 : 8;
+
+ case SOUND_PCM_WRITE_FILTER: /* NOT YET IMPLEMENTED */
+ if ((*(int *) arg) > 1)
+ return *(int *) arg = -(EINVAL);
+
+ case FIOASYNC:
+ if (local)
+ return 1;
+ return *(int *) arg = 1;
+
+ case FIONBIO:
+ if (local)
+ return 1;
+ return *(int *) arg = 1;
+
default:
- return RET_ERROR (EINVAL);
+ return -(EINVAL);
}
- return RET_ERROR (EINVAL);
+ return -(EINVAL);
}
static int
-sb16_dsp_open (int dev, int mode)
+sb16_dsp_open(int dev, int mode)
{
- int retval;
+ int retval;
- DEB (printk ("sb16_dsp_open()\n"));
- if (!sb16_dsp_ok)
- {
- printk ("SB16 Error: SoundBlaster board not installed\n");
- return RET_ERROR (ENXIO);
+ DEB(printf("sb16_dsp_open()\n"));
+ if (!sb16_dsp_ok) {
+ printf("SB16 Error: SoundBlaster board not installed\n");
+ return -(ENXIO);
}
+ if (intr_active)
+ return -(EBUSY);
- if (intr_active)
- return RET_ERROR (EBUSY);
+ sb_reset_dsp();
- retval = sb_get_irq ();
- if (retval < 0)
- return retval;
+ irq_mode = IMODE_NONE;
+ dsp_busy = 1;
+ trigger_bits = 0;
- sb_reset_dsp ();
-
- if (ALLOC_DMA_CHN (dma8, "SB16 (8bit)"))
- {
- printk ("SB16: Unable to grab DMA%d\n", dma8);
- sb_free_irq ();
- return RET_ERROR (EBUSY);
- }
-
- if (dma16 != dma8)
- if (ALLOC_DMA_CHN (dma16, "SB16 (16bit)"))
- {
- printk ("SB16: Unable to grab DMA%d\n", dma16);
- sb_free_irq ();
- RELEASE_DMA_CHN (dma8);
- return RET_ERROR (EBUSY);
- }
-
- irq_mode = IMODE_NONE;
- dsp_busy = 1;
-
- return 0;
+ return 0;
}
static void
-sb16_dsp_close (int dev)
+sb16_dsp_close(int dev)
{
- unsigned long flags;
+ u_long flags;
+
+ DEB(printf("sb16_dsp_close()\n"));
+ sb_dsp_command01(0xd9);
+ sb_dsp_command01(0xd5);
- DEB (printk ("sb16_dsp_close()\n"));
- sb_dsp_command01 (0xd9);
- sb_dsp_command01 (0xd5);
+ flags = splhigh();
- DISABLE_INTR (flags);
- RELEASE_DMA_CHN (dma8);
+ audio_devs[dev]->dmachan1 = dma8;
- if (dma16 != dma8)
- RELEASE_DMA_CHN (dma16);
- sb_free_irq ();
- dsp_cleanup ();
- dsp_busy = 0;
- RESTORE_INTR (flags);
+ dsp_cleanup();
+ dsp_busy = 0;
+ splx(flags);
}
static void
-sb16_dsp_output_block (int dev, unsigned long buf, int count, int intrflag, int dma_restart)
+sb16_dsp_output_block(int dev, u_long buf, int count, int intrflag, int dma_restart)
{
- unsigned long flags, cnt;
-
- cnt = count;
- if (dsp_16bit)
- cnt >>= 1;
- cnt--;
-
-#ifdef DEB_DMARES
- printk ("output_block: %x %d %d\n", buf, count, intrflag);
- if (intrflag)
- {
- int pos, chan = audio_devs[dev]->dmachan;
-
- DISABLE_INTR (flags);
- clear_dma_ff (chan);
- disable_dma (chan);
- pos = get_dma_residue (chan);
- enable_dma (chan);
- RESTORE_INTR (flags);
- printk ("dmapos=%d %x\n", pos, pos);
+ u_long flags, cnt;
+
+ cnt = count;
+ if (dsp_16bit)
+ cnt >>= 1;
+ cnt--;
+ if (audio_devs[dev]->flags & DMA_AUTOMODE && intrflag && cnt==dsp_count) {
+ irq_mode = IMODE_OUTPUT;
+ intr_active = 1;
+ return; /* Auto mode on. No need to react */
}
-#endif
- if (audio_devs[dev]->flags & DMA_AUTOMODE &&
- intrflag &&
- cnt == dsp_count)
- {
- irq_mode = IMODE_OUTPUT;
- intr_active = 1;
- return; /*
- * Auto mode on. No need to react
- */
- }
- DISABLE_INTR (flags);
+ flags = splhigh();
- if (dma_restart)
- {
- sb16_dsp_halt (dev);
- DMAbuf_start_dma (dev, buf, count, DMA_MODE_WRITE);
+ if (dma_restart) {
+
+ sb16_dsp_halt(dev);
+ DMAbuf_start_dma(dev, buf, count, 1);
}
- sb_dsp_command (0x41);
- sb_dsp_command ((unsigned char) ((dsp_current_speed >> 8) & 0xff));
- sb_dsp_command ((unsigned char) (dsp_current_speed & 0xff));
- sb_dsp_command ((unsigned char) (dsp_16bit ? 0xb6 : 0xc6));
- sb_dsp_command ((unsigned char) ((dsp_stereo ? 0x20 : 0) +
- (dsp_16bit ? 0x10 : 0)));
- sb_dsp_command01 ((unsigned char) (cnt & 0xff));
- sb_dsp_command ((unsigned char) (cnt >> 8));
-
- dsp_count = cnt;
- irq_mode = IMODE_OUTPUT;
- intr_active = 1;
- RESTORE_INTR (flags);
+
+
+ sb_dsp_command(0x41);
+ sb_dsp_command((u_char) ((dsp_current_speed >> 8) & 0xff));
+ sb_dsp_command((u_char) (dsp_current_speed & 0xff));
+ sb_dsp_command((u_char) (dsp_16bit ? 0xb6 : 0xc6));
+ dsp_count = cnt;
+ sb_dsp_command((u_char) ((dsp_stereo ? 0x20 : 0) +
+ (dsp_16bit ? 0x10 : 0)));
+ sb_dsp_command((u_char) (cnt & 0xff));
+ sb_dsp_command((u_char) (cnt >> 8));
+
+ irq_mode = IMODE_OUTPUT;
+ intr_active = 1;
+ splx(flags);
}
static void
-sb16_dsp_start_input (int dev, unsigned long buf, int count, int intrflag, int dma_restart)
+sb16_dsp_start_input(int dev, u_long buf, int count, int intrflag, int dma_restart)
{
- unsigned long flags, cnt;
-
- cnt = count;
- if (dsp_16bit)
- cnt >>= 1;
- cnt--;
-
-#ifdef DEB_DMARES
- printk ("start_input: %x %d %d\n", buf, count, intrflag);
- if (intrflag)
- {
- int pos, chan = audio_devs[dev]->dmachan;
-
- DISABLE_INTR (flags);
- clear_dma_ff (chan);
- disable_dma (chan);
- pos = get_dma_residue (chan);
- enable_dma (chan);
- RESTORE_INTR (flags);
- printk ("dmapos=%d %x\n", pos, pos);
- }
-#endif
- if (audio_devs[dev]->flags & DMA_AUTOMODE &&
- intrflag &&
- cnt == dsp_count)
- {
- irq_mode = IMODE_INPUT;
- intr_active = 1;
- return; /*
- * Auto mode on. No need to react
- */
- }
- DISABLE_INTR (flags);
+ u_long flags, cnt;
- if (dma_restart)
- {
- sb_reset_dsp ();
- DMAbuf_start_dma (dev, buf, count, DMA_MODE_READ);
+ cnt = count;
+ if (dsp_16bit)
+ cnt >>= 1;
+ cnt--;
+
+ if (audio_devs[dev]->flags & DMA_AUTOMODE && intrflag && cnt == dsp_count) {
+ irq_mode = IMODE_INPUT;
+ intr_active = 1;
+ return; /* Auto mode on. No need to react */
}
+ flags = splhigh();
- sb_dsp_command (0x42);
- sb_dsp_command ((unsigned char) ((dsp_current_speed >> 8) & 0xff));
- sb_dsp_command ((unsigned char) (dsp_current_speed & 0xff));
- sb_dsp_command ((unsigned char) (dsp_16bit ? 0xbe : 0xce));
- sb_dsp_command ((unsigned char) ((dsp_stereo ? 0x20 : 0) +
- (dsp_16bit ? 0x10 : 0)));
- sb_dsp_command01 ((unsigned char) (cnt & 0xff));
- sb_dsp_command ((unsigned char) (cnt >> 8));
-
- dsp_count = cnt;
- irq_mode = IMODE_INPUT;
- intr_active = 1;
- RESTORE_INTR (flags);
+ if (dma_restart) {
+ sb_reset_dsp();
+ DMAbuf_start_dma(dev, buf, count, 0);
+ }
+ sb_dsp_command(0x42);
+ sb_dsp_command((u_char) ((dsp_current_speed >> 8) & 0xff));
+ sb_dsp_command((u_char) (dsp_current_speed & 0xff));
+ sb_dsp_command((u_char) (dsp_16bit ? 0xbe : 0xce));
+ dsp_count = cnt;
+ sb_dsp_command((u_char) ((dsp_stereo ? 0x20 : 0) +
+ (dsp_16bit ? 0x10 : 0)));
+ sb_dsp_command01((u_char) (cnt & 0xff));
+ sb_dsp_command((u_char) (cnt >> 8));
+
+ irq_mode = IMODE_INPUT;
+ intr_active = 1;
+ splx(flags);
}
static int
-sb16_dsp_prepare_for_input (int dev, int bsize, int bcount)
+sb16_dsp_prepare_for_input(int dev, int bsize, int bcount)
{
- audio_devs[my_dev]->dmachan = dsp_16bit ? dma16 : dma8;
- dsp_count = 0;
- dsp_cleanup ();
- return 0;
+ audio_devs[my_dev]->dmachan2 = dsp_16bit ? dma16 : dma8;
+ dsp_count = 0;
+ dsp_cleanup();
+ if (dsp_16bit)
+ sb_dsp_command(0xd5); /* Halt DMA until trigger() is called */
+ else
+ sb_dsp_command(0xd0); /* Halt DMA until trigger() is called */
+
+ trigger_bits = 0;
+ return 0;
}
static int
-sb16_dsp_prepare_for_output (int dev, int bsize, int bcount)
+sb16_dsp_prepare_for_output(int dev, int bsize, int bcount)
{
- audio_devs[my_dev]->dmachan = dsp_16bit ? dma16 : dma8;
- dsp_count = 0;
- dsp_cleanup ();
- return 0;
+ int fudge = dsp_16bit ? dma16 : dma8;
+
+ isa_dma_release( audio_devs[my_dev]->dmachan1 );
+ isa_dma_acquire(fudge);
+
+ audio_devs[my_dev]->dmachan1 = fudge;
+ dsp_count = 0;
+ dsp_cleanup();
+ if (dsp_16bit)
+ sb_dsp_command(0xd5); /* Halt DMA until trigger() is called */
+ else
+ sb_dsp_command(0xd0); /* Halt DMA until trigger() is called */
+
+ trigger_bits = 0;
+ return 0;
+}
+
+static void
+sb16_dsp_trigger(int dev, int bits)
+{
+ if (bits != 0)
+ bits = 1;
+
+ if (bits == trigger_bits) /* No change */
+ return;
+
+ trigger_bits = bits;
+
+ if (!bits)
+ sb_dsp_command(0xd0); /* Halt DMA */
+ else if (bits & irq_mode)
+ sb_dsp_command(0xd4); /* Continue DMA */
}
static void
-dsp_cleanup (void)
+dsp_cleanup(void)
{
- irq_mode = IMODE_NONE;
- intr_active = 0;
+ irq_mode = IMODE_NONE;
+ intr_active = 0;
}
static void
-sb16_dsp_reset (int dev)
+sb16_dsp_reset(int dev)
{
- unsigned long flags;
+ u_long flags;
- DISABLE_INTR (flags);
+ flags = splhigh();
- sb_reset_dsp ();
- dsp_cleanup ();
+ sb_reset_dsp();
+ dsp_cleanup();
- RESTORE_INTR (flags);
+ splx(flags);
}
static void
-sb16_dsp_halt (int dev)
+sb16_dsp_halt(int dev)
{
- if (dsp_16bit)
- {
- sb_dsp_command01 (0xd9);
- sb_dsp_command01 (0xd5);
- }
- else
- {
- sb_dsp_command01 (0xda);
- sb_dsp_command01 (0xd0);
+
+ if (dsp_16bit) {
+ sb_dsp_command01(0xd9);
+ sb_dsp_command01(0xd5);
+ } else {
+ sb_dsp_command01(0xda);
+ sb_dsp_command01(0xd0);
}
- DMAbuf_reset_dma (dev);
+
+
}
static void
-set_irq_hw (int level)
+set_irq_hw(int level)
{
- int ival;
+ int ival;
- switch (level)
- {
-#ifdef PC98
+ switch (level) {
case 5:
- ival = 8;
- break;
- case 3:
- ival = 1;
- break;
- case 10:
- ival = 2;
- break;
-#else
- case 5:
- ival = 2;
- break;
+ ival = 2;
+ break;
case 7:
- ival = 4;
- break;
+ ival = 4;
+ break;
case 9:
- ival = 1;
- break;
+ ival = 1;
+ break;
case 10:
- ival = 8;
- break;
-#endif
+ ival = 8;
+ break;
default:
- printk ("SB16_IRQ_LEVEL %d does not exist\n", level);
- return;
+ printf("SB16_IRQ_LEVEL %d does not exist\n", level);
+ return;
}
- sb_setmixer (IRQ_NR, ival);
+ sb_setmixer(IRQ_NR, ival);
}
-long
-sb16_dsp_init (long mem_start, struct address_info *hw_config)
+void
+sb16_dsp_init(struct address_info * hw_config)
{
- if (sbc_major < 4)
- return mem_start; /* Not a SB16 */
+ if (sbc_major < 4)
+ return; /* Not a SB16 */
- sprintf (sb16_dsp_operations.name, "SoundBlaster 16 %d.%d", sbc_major, sbc_minor);
+ sprintf(sb16_dsp_operations.name, "SoundBlaster 16 %d.%d",
+ sbc_major, sbc_minor);
-#if defined(__FreeBSD__)
- printk ("sbxvi0: <%s>", sb16_dsp_operations.name);
-#else
- printk (" <%s>", sb16_dsp_operations.name);
-#endif
+ conf_printf(sb16_dsp_operations.name, hw_config);
- if (num_audiodevs < MAX_AUDIO_DEV)
- {
- audio_devs[my_dev = num_audiodevs++] = &sb16_dsp_operations;
- audio_devs[my_dev]->dmachan = hw_config->dma;
- audio_devs[my_dev]->buffcount = 1;
- audio_devs[my_dev]->buffsize = DSP_BUFFSIZE;
- }
- else
- printk ("SB: Too many DSP devices available\n");
- sb16_dsp_ok = 1;
- return mem_start;
+ if (num_audiodevs < MAX_AUDIO_DEV) {
+ audio_devs[my_dev = num_audiodevs++] = &sb16_dsp_operations;
+ audio_devs[my_dev]->dmachan1 = dma8;
+ audio_devs[my_dev]->buffsize = DSP_BUFFSIZE;
+
+ } else
+ printf("SB: Too many DSP devices available\n");
+ sb16_dsp_ok = 1;
+ return;
}
int
-sb16_dsp_detect (struct address_info *hw_config)
+sb16_dsp_detect(struct address_info * hw_config)
{
- struct address_info *sb_config;
+ struct address_info *sb_config;
- if (sb16_dsp_ok)
- return 0; /* Can't drive two cards */
+ if (sb16_dsp_ok)
+ return 1; /* Can't drive two cards */
- if (!(sb_config = sound_getconf (SNDCARD_SB)))
- {
- printk ("SB16 Error: Plain SB not configured\n");
- return 0;
+ if (!(sb_config = sound_getconf(SNDCARD_SB))) {
+ printf("SB16 Error: Plain SB not configured\n");
+ return 0;
}
+ /*
+ * sb_setmixer(OPSW,0xf); if(sb_getmixer(OPSW)!=0xf) return 0;
+ */
- /*
- * sb_setmixer(OPSW,0xf); if(sb_getmixer(OPSW)!=0xf) return 0;
- */
+ if (!sb_reset_dsp())
+ return 0;
- if (!sb_reset_dsp ())
- return 0;
+ if (sbc_major < 4) /* Set by the plain SB driver */
+ return 0; /* Not a SB16 */
- if (sbc_major < 4) /* Set by the plain SB driver */
- return 0; /* Not a SB16 */
-
-/* cause conflicts */
-/* hw_config->io_base = sb_config->io_base; */
-/* hw_config->irq = sb_config->irq; */
-#ifdef PC98
- hw_config->dma = sb_config->dma;
-#else
- if (hw_config->dma < 4)
- if (hw_config->dma != sb_config->dma)
- {
- printk ("SB16 Error: Invalid DMA channel %d/%d\n",
- sb_config->dma, hw_config->dma);
- return 0;
- }
-#endif
+ if (hw_config->dma < 4)
+ if (hw_config->dma != sb_config->dma) {
+ printf("SB16 Error: Invalid DMA channel %d/%d\n",
+ sb_config->dma, hw_config->dma);
+ return 0;
+ }
+ dma16 = hw_config->dma;
+ dma8 = sb_config->dma;
+ /* hw_config->irq = 0; sb_config->irq;
+ hw_config->io_base = sb_config->io_base;
+ */
+ set_irq_hw(sb_config->irq);
- dma16 = hw_config->dma;
- dma8 = sb_config->dma;
- set_irq_hw (sb_config->irq);
-#ifdef PC98
- sb_setmixer (DMA_NR, hw_config->dma == 0 ? 1 : 2);
-#else
- sb_setmixer (DMA_NR, (1 << hw_config->dma) | (1 << sb_config->dma));
-#endif
+ sb_setmixer(DMA_NR, (1 << hw_config->dma) | (1 << sb_config->dma));
- DEB (printk ("SoundBlaster 16: IRQ %d DMA %d OK\n", sb_config->irq, hw_config->dma));
+ DEB(printf("SoundBlaster 16: IRQ %d DMA %d OK\n",
+ sb_config->irq, hw_config->dma));
- /*
+ /*
* dsp_showmessage(0xe3,99);
- */
- sb16_dsp_ok = 1;
-/* return 0x10; */
- return -1;
+ */
+ sb16_dsp_ok = 1;
+ return 1;
}
void
-sb16_dsp_interrupt (int unused)
+sb16_dsp_interrupt(int unused)
{
- int data;
-
- data = INB (DSP_DATA_AVL16); /*
- * Interrupt acknowledge
- */
-
- if (intr_active)
- switch (irq_mode)
- {
- case IMODE_OUTPUT:
- intr_active = 0;
- DMAbuf_outputintr (my_dev, 1);
- break;
+ int data;
- case IMODE_INPUT:
- intr_active = 0;
- DMAbuf_inputintr (my_dev);
- break;
+ data = inb(DSP_DATA_AVL16); /* Interrupt acknowledge */
- default:
- printk ("SoundBlaster: Unexpected interrupt\n");
- }
-}
+ if (intr_active)
+ switch (irq_mode) {
+ case IMODE_OUTPUT:
+ DMAbuf_outputintr(my_dev, 1);
+ break;
+ case IMODE_INPUT:
+ DMAbuf_inputintr(my_dev);
+ break;
+
+ default:
+ printf("SoundBlaster: Unexpected interrupt\n");
+ }
+}
#endif
diff --git a/sys/i386/isa/sound/sb16_midi.c b/sys/i386/isa/sound/sb16_midi.c
index c1a6518..e7b5084 100644
--- a/sys/i386/isa/sound/sb16_midi.c
+++ b/sys/i386/isa/sound/sb16_midi.c
@@ -1,10 +1,10 @@
/*
* sound/sb16_midi.c
- *
+ *
* The low level driver for the MPU-401 UART emulation of the SB16.
- *
+ *
* Copyright by Hannu Savolainen 1993
- *
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met: 1. Redistributions of source code must retain the above copyright
@@ -12,7 +12,7 @@
* Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
@@ -24,33 +24,28 @@
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
- *
+ *
*/
#include <i386/isa/sound/sound_config.h>
+#include <i386/isa/sound/sbcard.h>
-#ifdef CONFIGURE_SOUNDCARD
+#if defined(CONFIG_SB) && defined(CONFIG_SB16) && defined(CONFIG_MIDI)
-#if !defined(EXCLUDE_SB) && !defined(EXCLUDE_SB16) && !defined(EXCLUDE_MIDI)
+#include "sb.h"
-#include <i386/isa/sound/sb_defs.h>
-
-#ifdef PC98
-#define DATAPORT (sb16midi_base)
-#define COMDPORT (sb16midi_base+0x100)
-#define STATPORT (sb16midi_base+0x100)
-#else
#define DATAPORT (sb16midi_base)
#define COMDPORT (sb16midi_base+1)
#define STATPORT (sb16midi_base+1)
-#endif
-#define sb16midi_status() INB(STATPORT)
+extern sound_os_info *sb_osp;
+
+#define sb16midi_status() inb( STATPORT)
#define input_avail() (!(sb16midi_status()&INPUT_AVAIL))
#define output_ready() (!(sb16midi_status()&OUTPUT_READY))
-#define sb16midi_cmd(cmd) OUTB(cmd, COMDPORT)
-#define sb16midi_read() INB(DATAPORT)
-#define sb16midi_write(byte) OUTB(byte, DATAPORT)
+#define sb16midi_cmd(cmd) outb( COMDPORT, cmd)
+#define sb16midi_read() inb( DATAPORT)
+#define sb16midi_write(byte) outb( DATAPORT, byte)
#define OUTPUT_READY 0x40
#define INPUT_AVAIL 0x80
@@ -58,126 +53,118 @@
#define MPU_RESET 0xFF
#define UART_MODE_ON 0x3F
-extern int sbc_major;
-
static int sb16midi_opened = 0;
static int sb16midi_base = 0x330;
static int sb16midi_detected = 0;
static int my_dev;
extern int sbc_base;
-static int reset_sb16midi (void);
-static void (*midi_input_intr) (int dev, unsigned char data);
+static int reset_sb16midi(void);
+static void (*midi_input_intr) (int dev, u_char data);
+static volatile u_char input_byte;
static void
-sb16midi_input_loop (void)
+sb16midi_input_loop(void)
{
- while (input_avail ())
- {
- unsigned char c = sb16midi_read ();
-
- if (sb16midi_opened & OPEN_READ)
- midi_input_intr (my_dev, c);
- }
+ while (input_avail()) {
+ u_char c = sb16midi_read();
+
+ if (c == MPU_ACK)
+ input_byte = c;
+ else if (sb16midi_opened & OPEN_READ && midi_input_intr)
+ midi_input_intr(my_dev, c);
+ }
}
void
-sb16midiintr (int unit)
+sb16midiintr(int unit)
{
- if (input_avail ())
- sb16midi_input_loop ();
+ if (input_avail())
+ sb16midi_input_loop();
}
static int
-sb16midi_open (int dev, int mode,
- void (*input) (int dev, unsigned char data),
- void (*output) (int dev)
+sb16midi_open(int dev, int mode,
+ void (*input) (int dev, u_char data),
+ void (*output) (int dev)
)
{
- if (sb16midi_opened)
- {
- return RET_ERROR (EBUSY);
- }
-
- sb16midi_input_loop ();
+ if (sb16midi_opened) {
+ return -(EBUSY);
+ }
+ sb16midi_input_loop();
- midi_input_intr = input;
- sb16midi_opened = mode;
+ midi_input_intr = input;
+ sb16midi_opened = mode;
- return 0;
+ return 0;
}
static void
-sb16midi_close (int dev)
+sb16midi_close(int dev)
{
- sb16midi_opened = 0;
+ sb16midi_opened = 0;
}
static int
-sb16midi_out (int dev, unsigned char midi_byte)
+sb16midi_out(int dev, u_char midi_byte)
{
- int timeout;
- unsigned long flags;
+ int timeout;
+ u_long flags;
- /*
- * Test for input since pending input seems to block the output.
- */
+ /*
+ * Test for input since pending input seems to block the output.
+ */
- DISABLE_INTR (flags);
+ flags = splhigh();
- if (input_avail ())
- sb16midi_input_loop ();
+ if (input_avail())
+ sb16midi_input_loop();
- RESTORE_INTR (flags);
+ splx(flags);
- /*
- * Sometimes it takes about 13000 loops before the output becomes ready
- * (After reset). Normally it takes just about 10 loops.
- */
+ /*
+ * Sometimes it takes about 13000 loops before the output becomes
+ * ready (After reset). Normally it takes just about 10 loops.
+ */
- for (timeout = 30000; timeout > 0 && !output_ready (); timeout--); /*
- * Wait
- */
+ for (timeout = 30000; timeout > 0 && !output_ready(); timeout--); /* Wait */
- if (!output_ready ())
- {
- printk ("MPU-401: Timeout\n");
- return 0;
- }
-
- sb16midi_write (midi_byte);
- return 1;
+ if (!output_ready()) {
+ printf("MPU-401: Timeout\n");
+ return 0;
+ }
+ sb16midi_write(midi_byte);
+ return 1;
}
static int
-sb16midi_start_read (int dev)
+sb16midi_start_read(int dev)
{
- return 0;
+ return 0;
}
static int
-sb16midi_end_read (int dev)
+sb16midi_end_read(int dev)
{
- return 0;
+ return 0;
}
static int
-sb16midi_ioctl (int dev, unsigned cmd, unsigned arg)
+sb16midi_ioctl(int dev, u_int cmd, ioctl_arg arg)
{
- return RET_ERROR (EINVAL);
+ return -(EINVAL);
}
static void
-sb16midi_kick (int dev)
+sb16midi_kick(int dev)
{
}
static int
-sb16midi_buffer_status (int dev)
+sb16midi_buffer_status(int dev)
{
- return 0; /*
- * No data in buffers
- */
+ return 0; /* No data in buffers */
}
#define MIDI_SYNTH_NAME "SoundBlaster 16 Midi"
@@ -186,142 +173,127 @@ sb16midi_buffer_status (int dev)
static struct midi_operations sb16midi_operations =
{
- {"SoundBlaster 16 Midi", 0, 0, SNDCARD_SB16MIDI},
- &std_midi_synth,
- {0},
- sb16midi_open,
- sb16midi_close,
- sb16midi_ioctl,
- sb16midi_out,
- sb16midi_start_read,
- sb16midi_end_read,
- sb16midi_kick,
- NULL,
- sb16midi_buffer_status,
- NULL
+ {"SoundBlaster 16 Midi", 0, 0, SNDCARD_SB16MIDI},
+ &std_midi_synth,
+ {0},
+ sb16midi_open,
+ sb16midi_close,
+ sb16midi_ioctl,
+ sb16midi_out,
+ sb16midi_start_read,
+ sb16midi_end_read,
+ sb16midi_kick,
+ NULL,
+ sb16midi_buffer_status,
+ NULL
};
-long
-attach_sb16midi (long mem_start, struct address_info *hw_config)
+void
+attach_sb16midi(struct address_info * hw_config)
{
- int ok, timeout;
- unsigned long flags;
-
- sb16midi_base = hw_config->io_base;
-
- if (!sb16midi_detected)
- return RET_ERROR (EIO);
-
- DISABLE_INTR (flags);
- for (timeout = 30000; timeout < 0 && !output_ready (); timeout--); /*
- * Wait
- */
- sb16midi_cmd (UART_MODE_ON);
-
- ok = 0;
- for (timeout = 50000; timeout > 0 && !ok; timeout--)
- if (input_avail ())
- if (sb16midi_read () == MPU_ACK)
- ok = 1;
-
- RESTORE_INTR (flags);
-
- if (num_midis >= MAX_MIDI_DEV)
- {
- printk ("Sound: Too many midi devices detected\n");
- return mem_start;
- }
-
-#ifdef __FreeBSD__
- printk ("sbmidi0: <SoundBlaster 16 MPU-401>");
-#else
- printk (" <SoundBlaster 16 MPU-401>");
-#endif
-
- std_midi_synth.midi_dev = my_dev = num_midis;
- midi_devs[num_midis++] = &sb16midi_operations;
- return mem_start;
+ int ok, timeout;
+ u_long flags;
+
+ sb16midi_base = hw_config->io_base;
+
+ if (!sb16midi_detected)
+ return;
+
+ flags = splhigh();
+ for (timeout = 30000; timeout < 0 && !output_ready(); timeout--); /* Wait */
+ input_byte = 0;
+ sb16midi_cmd(UART_MODE_ON);
+
+ ok = 0;
+ for (timeout = 50000; timeout > 0 && !ok; timeout--)
+ if (input_byte == MPU_ACK)
+ ok = 1;
+ else if (input_avail())
+ if (sb16midi_read() == MPU_ACK)
+ ok = 1;
+
+ splx(flags);
+
+ if (num_midis >= MAX_MIDI_DEV) {
+ printf("Sound: Too many midi devices detected\n");
+ return;
+ }
+
+ conf_printf("SoundBlaster MPU-401", hw_config);
+ std_midi_synth.midi_dev = my_dev = num_midis;
+ midi_devs[num_midis++] = &sb16midi_operations;
+ return;
}
static int
-reset_sb16midi (void)
+reset_sb16midi(void)
{
- unsigned long flags;
- int ok, timeout, n;
+ int ok, timeout, n;
- /*
- * Send the RESET command. Try again if no success at the first time.
- */
+ /*
+ * Send the RESET command. Try again if no success at the first time.
+ */
- ok = 0;
+ if (inb(STATPORT) == 0xff)
+ return 0;
- DISABLE_INTR (flags);
+ ok = 0;
- for (n = 0; n < 2 && !ok; n++)
- {
- for (timeout = 30000; timeout < 0 && !output_ready (); timeout--); /*
- * Wait
- */
- sb16midi_cmd (MPU_RESET); /*
- * Send MPU-401 RESET Command
- */
+ /* flags = splhigh(); */
- /*
- * Wait at least 25 msec. This method is not accurate so let's make the
- * loop bit longer. Cannot sleep since this is called during boot.
- */
+ for (n = 0; n < 2 && !ok; n++) {
+ for (timeout = 30000; timeout < 0 && !output_ready(); timeout--); /* Wait */
+ input_byte = 0;
+ sb16midi_cmd(MPU_RESET); /* Send MPU-401 RESET Command */
- for (timeout = 50000; timeout > 0 && !ok; timeout--)
- if (input_avail ())
- if (sb16midi_read () == MPU_ACK)
- ok = 1;
+ /*
+ * Wait at least 25 msec. This method is not accurate so
+ * let's make the loop bit longer. Cannot sleep since this is
+ * called during boot.
+ */
- }
+ for (timeout = 50000; timeout > 0 && !ok; timeout--)
+ if (input_byte == MPU_ACK) /* Interrupt */
+ ok = 1;
+ else if (input_avail())
+ if (sb16midi_read() == MPU_ACK)
+ ok = 1;
- sb16midi_opened = 0;
- if (ok)
- sb16midi_input_loop (); /*
- * Flush input before enabling interrupts
- */
+ }
- RESTORE_INTR (flags);
+ sb16midi_opened = 0;
+ if (ok)
+ sb16midi_input_loop(); /* Flush input before enabling
+ * interrupts */
- return ok;
+ /* splx(flags); */
+
+ return ok;
}
int
-probe_sb16midi (struct address_info *hw_config)
+probe_sb16midi(struct address_info * hw_config)
{
- struct address_info *sb_config;
- int ok = 0;
-
- if (!(sb_config = sound_getconf (SNDCARD_SB)))
- {
- printk ("SB16 Error: Plain SB not configured\n");
- return 0;
- }
+ int ok = 0;
+ struct address_info *sb_config;
- if (sbc_major < 4)
- return 0; /* Not a SB16 */
+ if (sbc_major < 4)
+ return 0; /* Not a SB16 */
- sb16midi_base = hw_config->io_base;
+ if (!(sb_config = sound_getconf(SNDCARD_SB))) {
+ printf("SB16 Error: Plain SB not configured\n");
+ return 0;
+ }
- if (sb_get_irq () < 0)
- return 0;
+ sb16midi_base = hw_config->io_base;
- ok = reset_sb16midi ();
+ ok = reset_sb16midi();
- sb16midi_detected = ok;
- if (ok) {
-/* cause conflicts */
-/* hw_config->irq = sb_config->irq; */
- return 2;
- } else
- return 0;
+ sb16midi_detected = ok;
+ return ok;
}
#endif
-#endif
diff --git a/sys/i386/isa/sound/sb_card.c b/sys/i386/isa/sound/sb_card.c
index 37455d1..37da6b4 100644
--- a/sys/i386/isa/sound/sb_card.c
+++ b/sys/i386/isa/sound/sb_card.c
@@ -1,10 +1,10 @@
/*
* sound/sb_card.c
- *
+ *
* Detection routine for the SoundBlaster cards.
- *
+ *
* Copyright by Hannu Savolainen 1993
- *
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met: 1. Redistributions of source code must retain the above copyright
@@ -12,7 +12,7 @@
* Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
@@ -24,38 +24,44 @@
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
+ *
+ * Modified: Riccardo Facchetti 24 Mar 1995 - Added the Audio Excel DSP 16
+ * initialization routine.
*
- * Modified:
- * Riccardo Facchetti 24 Mar 1995
- * - Added the Audio Excel DSP 16 initialization routine.
+ * Major code cleanup - Luigi Rizzo (luigi@iet.unipi.it) 970711
*/
#include <i386/isa/sound/sound_config.h>
-#if defined(CONFIGURE_SOUNDCARD) && !defined(EXCLUDE_SB)
+#if NSB > 0
+#include <i386/isa/sound/sbcard.h>
-long
-attach_sb_card (long mem_start, struct address_info *hw_config)
+void
+attach_sb_card(struct address_info * hw_config)
{
-#if !defined(EXCLUDE_AUDIO) || !defined(EXCLUDE_MIDI)
- if (!sb_dsp_detect (hw_config))
- return mem_start;
- mem_start = sb_dsp_init (mem_start, hw_config);
+#if defined(CONFIG_AUDIO) || defined(CONFIG_MIDI)
+
+#if 0
+ /* why do a detect during the attach ? XXX */
+ if (!sb_dsp_detect(hw_config))
+ return ;
+#endif
+ sb_dsp_init(hw_config);
#endif
- return mem_start;
+ return ;
}
int
-probe_sb (struct address_info *hw_config)
+probe_sb(struct address_info * hw_config)
{
-#if !defined(EXCLUDE_AEDSP16) && defined(AEDSP16_SBPRO)
- /*
+
+#if defined(CONFIG_AEDSP16) && defined(AEDSP16_SBPRO)
+ /*
* Initialize Audio Excel DSP 16 to SBPRO.
- */
- InitAEDSP16_SBPRO (hw_config);
+ */
+ InitAEDSP16_SBPRO(hw_config);
#endif
- return sb_dsp_detect (hw_config);
+ return sb_dsp_detect(hw_config);
}
-
#endif
diff --git a/sys/i386/isa/sound/sb_dsp.c b/sys/i386/isa/sound/sb_dsp.c
index d65ecbf..67c66f7 100644
--- a/sys/i386/isa/sound/sb_dsp.c
+++ b/sys/i386/isa/sound/sb_dsp.c
@@ -1,10 +1,10 @@
/*
* sound/sb_dsp.c
- *
+ *
* The low level driver for the SoundBlaster DSP chip (SB1.0 to 2.1, SB Pro).
- *
+ *
* Copyright by Hannu Savolainen 1994
- *
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met: 1. Redistributions of source code must retain the above copyright
@@ -12,7 +12,7 @@
* Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
@@ -24,27 +24,39 @@
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
- *
- * Modified:
- * Hunyue Yau Jan 6 1994
- * Added code to support Sound Galaxy NX Pro
- *
- * JRA Gibson April 1995
- * Code added for MV ProSonic/Jazz 16 in 16 bit mode
+ *
+ * Modified: Hunyue Yau Jan 6 1994 Added code to support Sound Galaxy NX
+ * Pro
+ *
+ * JRA Gibson April 1995 Code added for MV ProSonic/Jazz 16 in 16 bit mode
*/
#include <i386/isa/sound/sound_config.h>
-#if defined(CONFIGURE_SOUNDCARD) && !defined(EXCLUDE_SB)
+#if (NSB > 0)
-#include <i386/isa/sound/sb_defs.h>
+#ifdef SM_WAVE
+#define JAZZ16
+#endif
+
+#include <i386/isa/sound/sbcard.h>
#include <i386/isa/sound/sb_mixer.h>
+#include <machine/clock.h>
+
#undef SB_TEST_IRQ
+/*
+ * XXX note -- only one sb-like device is supported until these
+ * variables are put in a struct sb_unit[] array
+ */
+
int sbc_base = 0;
-static int sbc_irq = 0;
+int sbc_irq = 0;
static int open_mode = 0; /* Read, write or both */
int Jazz16_detected = 0;
+int sb_no_recording = 0;
+static int dsp_count = 0;
+static int trigger_bits;
/*
* The DSP channel can be used either for input or output. Variable
@@ -54,768 +66,619 @@ int Jazz16_detected = 0;
* future version of this driver.
*/
-int sb_dsp_ok = 0; /*
-
-
- * * * * Set to 1 after successful
- * initialization * */
+int sb_dsp_ok = 0; /* Set to 1 after successful init */
static int midi_disabled = 0;
int sb_dsp_highspeed = 0;
-int sbc_major = 1, sbc_minor = 0; /*
-
-
- * * * * DSP version */
+int sbc_major = 1, sbc_minor = 0; /* DSP version */
static int dsp_stereo = 0;
static int dsp_current_speed = DSP_DEFAULT_SPEED;
static int sb16 = 0;
-static int irq_verified = 0;
int sb_midi_mode = NORMAL_MIDI;
-int sb_midi_busy = 0; /*
-
-
- * * * * 1 if the process has output
- * to * * MIDI */
+int sb_midi_busy = 0; /* 1 if the process has output to * *
+ * MIDI */
int sb_dsp_busy = 0;
-volatile int sb_irq_mode = IMODE_NONE; /*
-
+volatile int sb_irq_mode = IMODE_NONE; /* or IMODE_INPUT or IMODE_OUTPUT */
- * * * * IMODE_INPUT, *
- * IMODE_OUTPUT * * or *
- * IMODE_NONE */
-static volatile int irq_ok = 0;
+static int dma8 = 1;
-#ifdef JAZZ16
-/* 16 bit support
- */
+#ifdef JAZZ16 /* 16 bit support for JAZZ16 */
static int dsp_16bit = 0;
-static int dma8 = 1;
static int dma16 = 5;
-static int dsp_set_bits (int arg);
-static int initialize_ProSonic16 (void);
-
-/* end of 16 bit support
- */
-#endif
+static int dsp_set_bits(int arg);
+static int initialize_ProSonic16(void);
+#endif /* end of 16 bit support for JAZZ16 */
int sb_duplex_midi = 0;
static int my_dev = 0;
volatile int sb_intr_active = 0;
-static int dsp_speed (int);
-static int dsp_set_stereo (int mode);
+static int dsp_speed(int);
+static int dsp_set_stereo(int mode);
+static void sb_dsp_reset(int dev);
+sound_os_info *sb_osp = NULL;
-#if !defined(EXCLUDE_MIDI) || !defined(EXCLUDE_AUDIO)
+#if defined(CONFIG_MIDI) || defined(CONFIG_AUDIO)
/*
* Common code for the midi and pcm functions
*/
int
-sb_dsp_command (unsigned char val)
+sb_dsp_command(u_char val)
{
- int i;
- unsigned long limit;
-
- limit = GET_TIME () + HZ / 10; /*
- * The timeout is 0.1 secods
- */
-
- /*
- * Note! the i<500000 is an emergency exit. The sb_dsp_command() is sometimes
- * called while interrupts are disabled. This means that the timer is
- * disabled also. However the timeout situation is a abnormal condition.
- * Normally the DSP should be ready to accept commands after just couple of
- * loops.
- */
-
- for (i = 0; i < 500000 && GET_TIME () < limit; i++)
- {
- if ((INB (DSP_STATUS) & 0x80) == 0)
- {
- OUTB (val, DSP_COMMAND);
- return 1;
+ int i;
+ u_long limit;
+
+ limit = get_time() + hz / 10; /* The timeout is 0.1 secods */
+
+ /*
+ * Note! the i<500000 is an emergency exit. The sb_dsp_command() is
+ * sometimes called while interrupts are disabled. This means that
+ * the timer is disabled also. However the timeout situation is a
+ * abnormal condition. Normally the DSP should be ready to accept
+ * commands after just couple of loops.
+ */
+
+ for (i = 0; i < 500000 && get_time() < limit; i++) {
+ if ((inb(DSP_STATUS) & 0x80) == 0) {
+ outb(DSP_COMMAND, val);
+ return 1;
}
}
- printk ("SoundBlaster: DSP Command(%x) Timeout.\n", val);
- printk ("IRQ conflict???\n");
- return 0;
+ printf("SoundBlaster: DSP Command(0x%02x) timeout. IRQ conflict ?\n", val);
+ return 0;
}
void
-sbintr (INT_HANDLER_PARMS (irq, dummy))
+sbintr(int irq)
{
- int status;
-
-#ifndef EXCLUDE_SBPRO
- if (sb16)
- {
- unsigned char src = sb_getmixer (IRQ_STAT); /* Interrupt source register */
-
-#ifndef EXCLUDE_SB16
- if (src & 3)
- sb16_dsp_interrupt (irq);
-
-#ifndef EXCLUDE_MIDI
- if (src & 4)
- sb16midiintr (irq); /*
- * SB MPU401 interrupt
- */
-#endif
-
-#endif
-
- if (!(src & 1))
- return; /*
- * Not a DSP interupt
- */
+ int status;
+
+#ifdef CONFIG_SBPRO
+ if (sb16) {
+ u_char src = sb_getmixer(IRQ_STAT); /* Interrupt source register */
+#ifdef CONFIG_SB16
+ if (src & 3)
+ sb16_dsp_interrupt(irq);
+#ifdef CONFIG_MIDI
+ if (src & 4)
+ sb16midiintr(irq); /* SB MPU401 interrupt */
+#endif /* CONFIG_MIDI */
+#endif /* CONFIG_SB16 */
+ if (!(src & 1))
+ return; /* Not a DSP interupt */
}
+#endif /* CONFIG_SBPRO */
+
+ status = inb(DSP_DATA_AVAIL); /* Clear interrupt */
+
+ if (sb_intr_active)
+ switch (sb_irq_mode) {
+ case IMODE_OUTPUT:
+ sb_intr_active = 0;
+ DMAbuf_outputintr(my_dev, 1);
+ break;
+
+ case IMODE_INPUT:
+ sb_intr_active = 0;
+ DMAbuf_inputintr(my_dev);
+ /*
+ * A complete buffer has been input. Let's start new one
+ */
+ break;
+
+ case IMODE_INIT:
+ sb_intr_active = 0;
+ break;
+
+ case IMODE_MIDI:
+#ifdef CONFIG_MIDI
+ sb_midi_interrupt(irq);
#endif
+ break;
- status = INB (DSP_DATA_AVAIL); /*
- * Clear interrupt
- */
-
- if (sb_intr_active)
- switch (sb_irq_mode)
- {
- case IMODE_OUTPUT:
- sb_intr_active = 0;
- DMAbuf_outputintr (my_dev, 1);
- break;
-
- case IMODE_INPUT:
- sb_intr_active = 0;
- DMAbuf_inputintr (my_dev);
- /*
- * A complete buffer has been input. Let's start new one
- */
- break;
-
- case IMODE_INIT:
- sb_intr_active = 0;
- irq_ok = 1;
- break;
-
- case IMODE_MIDI:
-#ifndef EXCLUDE_MIDI
- sb_midi_interrupt (irq);
-#endif
- break;
-
- default:
- printk ("SoundBlaster: Unexpected interrupt\n");
- }
+ default:
+ printf("SoundBlaster: Unexpected interrupt\n");
+ }
}
-static int sb_irq_usecount = 0;
int
-sb_get_irq (void)
+sb_reset_dsp(void)
{
- int ok;
+ int loopc;
- if (!sb_irq_usecount)
- if ((ok = snd_set_irq_handler (sbc_irq, sbintr, "SoundBlaster")) < 0)
- return ok;
+ outb(DSP_RESET, 1);
+ DELAY(10);
+ outb(DSP_RESET, 0);
+ DELAY(30);
- sb_irq_usecount++;
- return 0;
-}
-
-void
-sb_free_irq (void)
-{
- if (!sb_irq_usecount)
- return;
+ for (loopc = 0; loopc < 100 && !(inb(DSP_DATA_AVAIL) & 0x80); loopc++)
+ DELAY(10);
- sb_irq_usecount--;
-
- if (!sb_irq_usecount)
- snd_release_irq (sbc_irq);
-}
+ if (inb(DSP_READ) != 0xAA) {
+ printf("sb_reset_dsp failed\n");
+ return 0; /* Sorry */
+ }
-int
-sb_reset_dsp (void)
-{
- int loopc;
-
- OUTB (1, DSP_RESET);
- tenmicrosec ();
- OUTB (0, DSP_RESET);
- tenmicrosec ();
- tenmicrosec ();
- tenmicrosec ();
-
- for (loopc = 0; loopc < 1000 && !(INB (DSP_DATA_AVAIL) & 0x80); loopc++); /*
- * Wait
- * for
- * data
- * *
- * available
- * status
- */
-
- if (INB (DSP_READ) != 0xAA)
- return 0; /*
- * Sorry
- */
-
- return 1;
+ return 1;
}
#endif
-#ifndef EXCLUDE_AUDIO
+#ifdef CONFIG_AUDIO
-static void
-dsp_speaker (char state)
+void
+dsp_speaker(char state)
{
- if (state)
- sb_dsp_command (DSP_CMD_SPKON);
- else
- sb_dsp_command (DSP_CMD_SPKOFF);
+ if (state)
+ sb_dsp_command(DSP_CMD_SPKON);
+ else
+ sb_dsp_command(DSP_CMD_SPKOFF);
}
static int
-dsp_speed (int speed)
+dsp_speed(int speed)
{
- unsigned char tconst;
- unsigned long flags;
- int max_speed = 44100;
+ u_char tconst;
+ u_long flags;
+ int max_speed = 44100;
- if (speed < 4000)
- speed = 4000;
+printf("dsp_speed %d\n", speed); /* XXX lr 970601 */
+ if (speed < 4000)
+ speed = 4000;
- /*
+ /*
* Older SB models don't support higher speeds than 22050.
- */
+ */
- if (sbc_major < 2 ||
- (sbc_major == 2 && sbc_minor == 0))
- max_speed = 22050;
+ if (sbc_major < 2 || (sbc_major == 2 && sbc_minor == 0))
+ max_speed = 22050;
- /*
+ /*
* SB models earlier than SB Pro have low limit for the input speed.
- */
- if (open_mode != OPEN_WRITE) /* Recording is possible */
- if (sbc_major < 3) /* Limited input speed with these cards */
- if (sbc_major == 2 && sbc_minor > 0)
- max_speed = 15000;
- else
- max_speed = 13000;
-
- if (speed > max_speed)
- speed = max_speed; /*
- * Invalid speed
- */
-
- /* Logitech SoundMan Games and Jazz16 cards can support 44.1kHz stereo */
+ */
+ if (open_mode != OPEN_WRITE) /* Recording is possible */
+ if (sbc_major < 3) /* Limited input speed with these cards */
+ if (sbc_major == 2 && sbc_minor > 0)
+ max_speed = 15000;
+ else
+ max_speed = 13000;
+
+ if (speed > max_speed)
+ speed = max_speed; /* Invalid speed */
+
+ /*
+ * Logitech SoundMan Games and Jazz16 cards can support 44.1kHz
+ * stereo
+ */
#if !defined (SM_GAMES)
- /*
- * Max. stereo speed is 22050
- */
- if (dsp_stereo && speed > 22050 && Jazz16_detected == 0)
- speed = 22050;
+ /*
+ * Max. stereo speed is 22050
+ */
+ if (dsp_stereo && speed > 22050 && Jazz16_detected == 0)
+ speed = 22050;
#endif
- if ((speed > 22050) && sb_midi_busy)
- {
- printk ("SB Warning: High speed DSP not possible simultaneously with MIDI output\n");
- speed = 22050;
+ if ((speed > 22050) && sb_midi_busy) {
+ printf("SB Warning: High speed DSP not possible simultaneously with MIDI output\n");
+ speed = 22050;
}
+ if (dsp_stereo)
+ speed *= 2;
- if (dsp_stereo)
- speed *= 2;
-
- /*
- * Now the speed should be valid
- */
+ /*
+ * Now the speed should be valid
+ */
- if (speed > 22050)
- { /*
- * High speed mode
- */
- int tmp;
+ if (speed > 22050) { /* High speed mode */
+ int tmp;
- tconst = (unsigned char) ((65536 -
- ((256000000 + speed / 2) / speed)) >> 8);
- sb_dsp_highspeed = 1;
+ tconst = (u_char) ((65536 - ((256000000 + speed / 2) / speed)) >> 8);
+ sb_dsp_highspeed = 1;
- DISABLE_INTR (flags);
- if (sb_dsp_command (0x40))
- sb_dsp_command (tconst);
- RESTORE_INTR (flags);
+ flags = splhigh();
+ if (sb_dsp_command(DSP_CMD_TCONST))
+ sb_dsp_command(tconst);
+ splx(flags);
- tmp = 65536 - (tconst << 8);
- speed = (256000000 + tmp / 2) / tmp;
- }
- else
- {
- int tmp;
+ tmp = 65536 - (tconst << 8);
+ speed = (256000000 + tmp / 2) / tmp;
+ } else {
+ int tmp;
- sb_dsp_highspeed = 0;
- tconst = (256 - ((1000000 + speed / 2) / speed)) & 0xff;
+ sb_dsp_highspeed = 0;
+ tconst = (256 - ((1000000 + speed / 2) / speed)) & 0xff;
- DISABLE_INTR (flags);
- if (sb_dsp_command (0x40)) /*
- * Set time constant
- */
- sb_dsp_command (tconst);
- RESTORE_INTR (flags);
+ flags = splhigh();
+ if (sb_dsp_command(DSP_CMD_TCONST)) /* Set time constant */
+ sb_dsp_command(tconst);
+ splx(flags);
- tmp = 256 - tconst;
- speed = (1000000 + tmp / 2) / tmp;
+ tmp = 256 - tconst;
+ speed = (1000000 + tmp / 2) / tmp;
}
- if (dsp_stereo)
- speed /= 2;
+ if (dsp_stereo)
+ speed /= 2;
- dsp_current_speed = speed;
- return speed;
+ dsp_current_speed = speed;
+printf("dsp_speed done %d\n", speed);
+ return speed;
}
static int
-dsp_set_stereo (int mode)
+dsp_set_stereo(int mode)
{
- dsp_stereo = 0;
+ dsp_stereo = 0;
-#ifdef EXCLUDE_SBPRO
- return 0;
+#ifndef CONFIG_SBPRO
+ return 0;
#else
- if (sbc_major < 3 || sb16)
- return 0; /*
- * Sorry no stereo
- */
+ if (sbc_major < 3 || sb16)
+ return 0; /* Sorry no stereo */
- if (mode && sb_midi_busy)
- {
- printk ("SB Warning: Stereo DSP not possible simultaneously with MIDI output\n");
- return 0;
+ if (mode && sb_midi_busy) {
+ printf("SB Warning: Stereo DSP not possible simultaneously with MIDI output\n");
+ return 0;
}
-
- dsp_stereo = !!mode;
- return dsp_stereo;
+ dsp_stereo = !!mode;
+ return dsp_stereo;
#endif
}
static void
-sb_dsp_output_block (int dev, unsigned long buf, int count,
- int intrflag, int restart_dma)
+sb_dsp_output_block(int dev, u_long buf, int count,
+ int intrflag, int restart_dma)
{
- unsigned long flags;
-
- if (!sb_irq_mode)
- dsp_speaker (ON);
-
- sb_irq_mode = IMODE_OUTPUT;
- DMAbuf_start_dma (dev, buf, count, DMA_MODE_WRITE);
-
- if (audio_devs[dev]->dmachan > 3)
- count >>= 1;
- count--;
-
- if (sb_dsp_highspeed)
- {
- DISABLE_INTR (flags);
- if (sb_dsp_command (0x48)) /*
- * High speed size
- */
- {
- sb_dsp_command ((unsigned char) (count & 0xff));
- sb_dsp_command ((unsigned char) ((count >> 8) & 0xff));
- sb_dsp_command (0x91); /*
- * High speed 8 bit DAC
- */
- }
- else
- printk ("SB Error: Unable to start (high speed) DAC\n");
- RESTORE_INTR (flags);
- }
- else
- {
- DISABLE_INTR (flags);
- if (sb_dsp_command (0x14)) /*
- * 8-bit DAC (DMA)
- */
- {
- sb_dsp_command ((unsigned char) (count & 0xff));
- sb_dsp_command ((unsigned char) ((count >> 8) & 0xff));
- }
- else
- printk ("SB Error: Unable to start DAC\n");
- RESTORE_INTR (flags);
+ u_long flags;
+
+ if (!sb_irq_mode)
+ dsp_speaker(ON);
+
+ DMAbuf_start_dma(dev, buf, count, 1);
+
+ sb_irq_mode = 0;
+
+ if (audio_devs[dev]->dmachan1 > 3)
+ count >>= 1;
+ count--;
+ dsp_count = count;
+
+ sb_irq_mode = IMODE_OUTPUT;
+ if (sb_dsp_highspeed) {
+ flags = splhigh();
+ if (sb_dsp_command(DSP_CMD_HSSIZE)) { /* High speed size */
+ sb_dsp_command((u_char) (dsp_count & 0xff));
+ sb_dsp_command((u_char) ((dsp_count >> 8) & 0xff));
+ sb_dsp_command(DSP_CMD_HSDAC); /* High speed 8 bit DAC */
+ } else
+ printf("SB Error: Unable to start (high speed) DAC\n");
+ splx(flags);
+ } else {
+ flags = splhigh();
+ if (sb_dsp_command(DSP_CMD_DAC8)) { /* 8-bit DAC (DMA) */
+ sb_dsp_command((u_char) (dsp_count & 0xff));
+ sb_dsp_command((u_char) ((dsp_count >> 8) & 0xff));
+ } else
+ printf("SB Error: Unable to start DAC\n");
+ splx(flags);
}
- sb_intr_active = 1;
+ sb_intr_active = 1;
}
static void
-sb_dsp_start_input (int dev, unsigned long buf, int count, int intrflag,
- int restart_dma)
+sb_dsp_start_input(int dev, u_long buf, int count, int intrflag,
+ int restart_dma)
{
- /*
- * Start a DMA input to the buffer pointed by dmaqtail
- */
+ u_long flags;
- unsigned long flags;
+ if (sb_no_recording) {
+ printf("SB Error: This device doesn't support recording\n");
+ return;
+ }
+ /*
+ * Start a DMA input to the buffer pointed by dmaqtail
+ */
+
+ if (!sb_irq_mode)
+ dsp_speaker(OFF);
+
+ DMAbuf_start_dma(dev, buf, count, 0);
+ sb_irq_mode = 0;
+
+ if (audio_devs[dev]->dmachan1 > 3)
+ count >>= 1;
+ count--;
+ dsp_count = count;
+
+ sb_irq_mode = IMODE_INPUT;
+ if (sb_dsp_highspeed) {
+ flags = splhigh();
+ if (sb_dsp_command(DSP_CMD_HSSIZE)) { /* High speed size */
+ sb_dsp_command((u_char) (dsp_count & 0xff));
+ sb_dsp_command((u_char) ((dsp_count >> 8) & 0xff));
+ sb_dsp_command(DSP_CMD_HSADC); /* High speed 8 bit ADC */
+ } else
+ printf("SB Error: Unable to start (high speed) ADC\n");
+ splx(flags);
+ } else {
+ flags = splhigh();
+ if (sb_dsp_command(DSP_CMD_ADC8)) { /* 8-bit ADC (DMA) */
+ sb_dsp_command((u_char) (dsp_count & 0xff));
+ sb_dsp_command((u_char) ((dsp_count >> 8) & 0xff));
+ } else
+ printf("SB Error: Unable to start ADC\n");
+ splx(flags);
+ }
- if (!sb_irq_mode)
- dsp_speaker (OFF);
+ sb_intr_active = 1;
+}
- sb_irq_mode = IMODE_INPUT;
- DMAbuf_start_dma (dev, buf, count, DMA_MODE_READ);
+static void
+sb_dsp_trigger(int dev, int bits)
+{
+ if (bits == trigger_bits)
+ return;
- if (audio_devs[dev]->dmachan > 3)
- count >>= 1;
- count--;
+ if (!bits)
+ sb_dsp_command(0xd0); /* Halt DMA */
+ else if (bits & sb_irq_mode)
+ sb_dsp_command(0xd4); /* Continue DMA */
- if (sb_dsp_highspeed)
- {
- DISABLE_INTR (flags);
- if (sb_dsp_command (0x48)) /*
- * High speed size
- */
- {
- sb_dsp_command ((unsigned char) (count & 0xff));
- sb_dsp_command ((unsigned char) ((count >> 8) & 0xff));
- sb_dsp_command (0x99); /*
- * High speed 8 bit ADC
- */
- }
- else
- printk ("SB Error: Unable to start (high speed) ADC\n");
- RESTORE_INTR (flags);
- }
- else
- {
- DISABLE_INTR (flags);
- if (sb_dsp_command (0x24)) /*
- * 8-bit ADC (DMA)
- */
- {
- sb_dsp_command ((unsigned char) (count & 0xff));
- sb_dsp_command ((unsigned char) ((count >> 8) & 0xff));
- }
- else
- printk ("SB Error: Unable to start ADC\n");
- RESTORE_INTR (flags);
- }
-
- sb_intr_active = 1;
+ trigger_bits = bits;
}
static void
-dsp_cleanup (void)
+dsp_cleanup(void)
{
- sb_intr_active = 0;
+ sb_intr_active = 0;
}
static int
-sb_dsp_prepare_for_input (int dev, int bsize, int bcount)
+sb_dsp_prepare_for_input(int dev, int bsize, int bcount)
{
- dsp_cleanup ();
- dsp_speaker (OFF);
+ dsp_cleanup();
+ dsp_speaker(OFF);
- if (sbc_major == 3) /*
- * SB Pro
- */
- {
+ if (sbc_major == 3) { /* SB Pro */
#ifdef JAZZ16
- /* Select correct dma channel
- * for 16/8 bit acccess
- */
- audio_devs[my_dev]->dmachan = dsp_16bit ? dma16 : dma8;
- if (dsp_stereo)
- sb_dsp_command (dsp_16bit ? 0xac : 0xa8);
- else
- sb_dsp_command (dsp_16bit ? 0xa4 : 0xa0);
+ /*
+ * Select correct dma channel for 16/8 bit acccess
+ */
+ audio_devs[my_dev]->dmachan1 = dsp_16bit ? dma16 : dma8;
+ if (dsp_stereo)
+ sb_dsp_command(dsp_16bit ? 0xac : 0xa8);
+ else
+ sb_dsp_command(dsp_16bit ? 0xa4 : 0xa0);
#else
- /* 8 bit only cards use this
- */
- if (dsp_stereo)
- sb_dsp_command (0xa8);
- else
- sb_dsp_command (0xa0);
+ /*
+ * 8 bit only cards use this
+ */
+ if (dsp_stereo)
+ sb_dsp_command(0xa8);
+ else
+ sb_dsp_command(0xa0);
#endif
- dsp_speed (dsp_current_speed); /*
- * Speed must be recalculated if
- * #channels * changes
- */
+ dsp_speed(dsp_current_speed); /* Speed must be recalculated
+ * if #channels * changes */
}
- return 0;
+ trigger_bits = 0;
+ sb_dsp_command(DSP_CMD_DMAHALT); /* Halt DMA */
+ return 0;
}
static int
-sb_dsp_prepare_for_output (int dev, int bsize, int bcount)
+sb_dsp_prepare_for_output(int dev, int bsize, int bcount)
{
- dsp_cleanup ();
- dsp_speaker (ON);
+ dsp_cleanup();
+ dsp_speaker(ON);
-#ifndef EXCLUDE_SBPRO
- if (sbc_major == 3) /*
- * SB Pro
- */
- {
+#ifdef CONFIG_SBPRO
+ if (sbc_major == 3) { /* SB Pro */
#ifdef JAZZ16
- /* 16 bit specific instructions
- */
- audio_devs[my_dev]->dmachan = dsp_16bit ? dma16 : dma8;
- if (Jazz16_detected != 2) /* SM Wave */
- sb_mixer_set_stereo (dsp_stereo);
- if (dsp_stereo)
- sb_dsp_command (dsp_16bit ? 0xac : 0xa8);
- else
- sb_dsp_command (dsp_16bit ? 0xa4 : 0xa0);
+ /*
+ * 16 bit specific instructions
+ */
+ audio_devs[my_dev]->dmachan1 = dsp_16bit ? dma16 : dma8;
+ if (Jazz16_detected != 2) /* SM Wave */
+ sb_mixer_set_stereo(dsp_stereo);
+ if (dsp_stereo)
+ sb_dsp_command(dsp_16bit ? 0xac : 0xa8);
+ else
+ sb_dsp_command(dsp_16bit ? 0xa4 : 0xa0);
#else
- sb_mixer_set_stereo (dsp_stereo);
+ sb_mixer_set_stereo(dsp_stereo);
#endif
- dsp_speed (dsp_current_speed); /*
- * Speed must be recalculated if
- * #channels * changes
- */
+ dsp_speed(dsp_current_speed); /* Speed must be recalculated
+ * if #channels * changes */
}
#endif
- return 0;
+ trigger_bits = 0;
+ sb_dsp_command(DSP_CMD_DMAHALT); /* Halt DMA */
+ return 0;
}
static void
-sb_dsp_halt_xfer (int dev)
+sb_dsp_halt_xfer(int dev)
{
}
static int
-verify_irq (void)
+sb_dsp_open(int dev, int mode)
{
-#if 0
- DEFINE_WAIT_QUEUE (testq, testf);
-
- irq_ok = 0;
+ int retval;
- if (sb_get_irq () == -1)
- {
- printk ("*** SB Error: Irq %d already in use\n", sbc_irq);
- return 0;
+ if (!sb_dsp_ok) {
+ printf("SB Error: SoundBlaster board not installed\n");
+ return -(ENXIO);
}
-
-
- sb_irq_mode = IMODE_INIT;
-
- sb_dsp_command (0xf2); /*
- * This should cause immediate interrupt
- */
-
- DO_SLEEP (testq, testf, HZ / 5);
-
- sb_free_irq ();
-
- if (!irq_ok)
- {
- printk ("SB Warning: IRQ%d test not passed!", sbc_irq);
- irq_ok = 1;
- }
-#else
- irq_ok = 1;
-#endif
- return irq_ok;
-}
-
-static int
-sb_dsp_open (int dev, int mode)
-{
- int retval;
-
- if (!sb_dsp_ok)
- {
- printk ("SB Error: SoundBlaster board not installed\n");
- return RET_ERROR (ENXIO);
+ if (sb_no_recording && mode & OPEN_READ) {
+ printf("SB Warning: Recording not supported by this device\n");
}
-
- if (sb_intr_active || (sb_midi_busy && sb_midi_mode == UART_MIDI))
- {
- printk ("SB: PCM not possible during MIDI input\n");
- return RET_ERROR (EBUSY);
- }
-
- if (!irq_verified)
- {
- verify_irq ();
- irq_verified = 1;
- }
- else if (!irq_ok)
- printk ("SB Warning: Incorrect IRQ setting %d\n",
- sbc_irq);
-
- retval = sb_get_irq ();
- if (retval)
- return retval;
-
- /* Allocate 8 bit dma
- */
- if (DMAbuf_open_dma (dev) < 0)
- {
- sb_free_irq ();
- printk ("SB: DMA Busy\n");
- return RET_ERROR (EBUSY);
+ if (sb_intr_active || (sb_midi_busy && sb_midi_mode == UART_MIDI)) {
+ printf("SB: PCM not possible during MIDI input\n");
+ return -(EBUSY);
}
+ /*
+ * Allocate 8 bit dma
+ */
#ifdef JAZZ16
- /* Allocate 16 bit dma
- */
- if (Jazz16_detected != 0)
- if (dma16 != dma8)
- {
- if (ALLOC_DMA_CHN (dma16, "Jazz16 16 bit"))
- {
- sb_free_irq ();
- RELEASE_DMA_CHN (dma8);
- return RET_ERROR (EBUSY);
- }
- }
+ audio_devs[my_dev]->dmachan1 = dma8;
+ /*
+ * Allocate 16 bit dma
+ */
+ if (Jazz16_detected != 0)
+ if (dma16 != dma8) {
+ if (0) {
+ return -(EBUSY);
+ }
+ }
#endif
- sb_irq_mode = IMODE_NONE;
+ sb_irq_mode = IMODE_NONE;
- sb_dsp_busy = 1;
- open_mode = mode;
+ sb_dsp_busy = 1;
+ open_mode = mode;
- return 0;
+ return 0;
}
static void
-sb_dsp_close (int dev)
+sb_dsp_close(int dev)
{
#ifdef JAZZ16
- /* Release 16 bit dma channel
- */
- if (Jazz16_detected)
- RELEASE_DMA_CHN (dma16);
+ /*
+ * Release 16 bit dma channel
+ */
+ if (Jazz16_detected) {
+ audio_devs[my_dev]->dmachan1 = dma8;
+
+ }
#endif
- DMAbuf_close_dma (dev);
- sb_free_irq ();
- dsp_cleanup ();
- dsp_speaker (OFF);
- sb_dsp_busy = 0;
- sb_dsp_highspeed = 0;
- open_mode = 0;
+ dsp_cleanup();
+ dsp_speaker(OFF);
+ sb_dsp_busy = 0;
+ sb_dsp_highspeed = 0;
+ open_mode = 0;
}
#ifdef JAZZ16
-/* Function dsp_set_bits() only required for 16 bit cards
+/*
+ * Function dsp_set_bits() only required for 16 bit cards
*/
static int
-dsp_set_bits (int arg)
+dsp_set_bits(int arg)
{
- if (arg)
- if (Jazz16_detected == 0)
- dsp_16bit = 0;
- else
- switch (arg)
- {
- case 8:
- dsp_16bit = 0;
- break;
- case 16:
- dsp_16bit = 1;
- break;
- default:
- dsp_16bit = 0;
- }
- return dsp_16bit ? 16 : 8;
+ if (arg)
+ if (Jazz16_detected == 0)
+ dsp_16bit = 0;
+ else
+ switch (arg) {
+ case 8:
+ dsp_16bit = 0;
+ break;
+ case 16:
+ dsp_16bit = 1;
+ break;
+ default:
+ dsp_16bit = 0;
+ }
+ return dsp_16bit ? 16 : 8;
}
-#endif /* ifdef JAZZ16 */
+#endif /* ifdef JAZZ16 */
static int
-sb_dsp_ioctl (int dev, unsigned int cmd, unsigned int arg, int local)
+sb_dsp_ioctl(int dev, u_int cmd, ioctl_arg arg, int local)
{
- switch (cmd)
- {
+ switch (cmd) {
case SOUND_PCM_WRITE_RATE:
- if (local)
- return dsp_speed (arg);
- return IOCTL_OUT (arg, dsp_speed (IOCTL_IN (arg)));
- break;
+ if (local)
+ return dsp_speed((int) arg);
+ return *(int *) arg = dsp_speed((*(int *) arg));
+ break;
case SOUND_PCM_READ_RATE:
- if (local)
- return dsp_current_speed;
- return IOCTL_OUT (arg, dsp_current_speed);
- break;
+ if (local)
+ return dsp_current_speed;
+ return *(int *) arg = dsp_current_speed;
+ break;
case SOUND_PCM_WRITE_CHANNELS:
- if (local)
- return dsp_set_stereo (arg - 1) + 1;
- return IOCTL_OUT (arg, dsp_set_stereo (IOCTL_IN (arg) - 1) + 1);
- break;
+ if (local)
+ return dsp_set_stereo((int) arg - 1) + 1;
+ return *(int *) arg = dsp_set_stereo((*(int *) arg) - 1) + 1;
+ break;
case SOUND_PCM_READ_CHANNELS:
- if (local)
- return dsp_stereo + 1;
- return IOCTL_OUT (arg, dsp_stereo + 1);
- break;
+ if (local)
+ return dsp_stereo + 1;
+ return *(int *) arg = dsp_stereo + 1;
+ break;
case SNDCTL_DSP_STEREO:
- if (local)
- return dsp_set_stereo (arg);
- return IOCTL_OUT (arg, dsp_set_stereo (IOCTL_IN (arg)));
- break;
+ if (local)
+ return dsp_set_stereo((int) arg);
+ return *(int *) arg = dsp_set_stereo((*(int *) arg));
+ break;
#ifdef JAZZ16
- /* Word size specific cases here.
- * SNDCTL_DSP_SETFMT=SOUND_PCM_WRITE_BITS
- */
+ /*
+ * Word size specific cases here.
+ * SNDCTL_DSP_SETFMT=SOUND_PCM_WRITE_BITS
+ */
case SNDCTL_DSP_SETFMT:
- if (local)
- return dsp_set_bits (arg);
- return IOCTL_OUT (arg, dsp_set_bits (IOCTL_IN (arg)));
- break;
+ if (local)
+ return dsp_set_bits((int) arg);
+ return *(int *) arg = dsp_set_bits((*(int *) arg));
+ break;
case SOUND_PCM_READ_BITS:
- if (local)
- return dsp_16bit ? 16 : 8;
- return IOCTL_OUT (arg, dsp_16bit ? 16 : 8);
- break;
+ if (local)
+ return dsp_16bit ? 16 : 8;
+ return *(int *) arg = dsp_16bit ? 16 : 8;
+ break;
#else
case SOUND_PCM_WRITE_BITS:
case SOUND_PCM_READ_BITS:
- if (local)
- return 8;
- return IOCTL_OUT (arg, 8); /*
- * Only 8 bits/sample supported
- */
- break;
-#endif /* ifdef JAZZ16 */
+ if (local)
+ return 8;
+ return *(int *) (int) arg = 8; /* Only 8 bits/sample supported */
+ break;
+#endif /* ifdef JAZZ16 */
case SOUND_PCM_WRITE_FILTER:
case SOUND_PCM_READ_FILTER:
- return RET_ERROR (EINVAL);
- break;
+ return -(EINVAL);
+ break;
- default:
- return RET_ERROR (EINVAL);
+ default:;
}
- return RET_ERROR (EINVAL);
+ return -(EINVAL);
}
static void
-sb_dsp_reset (int dev)
+sb_dsp_reset(int dev)
{
- unsigned long flags;
+ u_long flags;
- DISABLE_INTR (flags);
+ flags = splhigh();
- sb_reset_dsp ();
- dsp_speed (dsp_current_speed);
- dsp_cleanup ();
+ sb_reset_dsp();
+ dsp_speed(dsp_current_speed);
+ dsp_cleanup();
- RESTORE_INTR (flags);
+ splx(flags);
}
#endif
@@ -824,429 +687,416 @@ sb_dsp_reset (int dev)
#ifdef JAZZ16
/*
- * Initialization of a Media Vision ProSonic 16 Soundcard.
- * The function initializes a ProSonic 16 like PROS.EXE does for DOS. It sets
- * the base address, the DMA-channels, interrupts and enables the joystickport.
- *
+ * Initialization of a Media Vision ProSonic 16 Soundcard. The function
+ * initializes a ProSonic 16 like PROS.EXE does for DOS. It sets the base
+ * address, the DMA-channels, interrupts and enables the joystickport.
+ *
* Also used by Jazz 16 (same card, different name)
- *
- * written 1994 by Rainer Vranken
- * E-Mail: rvranken@polaris.informatik.uni-essen.de
+ *
+ * written 1994 by Rainer Vranken E-Mail:
+ * rvranken@polaris.informatik.uni-essen.de
*/
-
-#ifndef MPU_BASE /* take default values if not specified */
-#define MPU_BASE 0x330
-#endif
-#ifndef MPU_IRQ
-#define MPU_IRQ 9
-#endif
-
-unsigned int
-get_sb_byte (void)
+u_int
+get_sb_byte(void)
{
- int i;
-
- for (i = 1000; i; i--)
- if (INB (DSP_DATA_AVAIL) & 0x80)
- {
- return INB (DSP_READ);
- }
+ int i;
- return 0xffff;
+ for (i = 1000; i; i--)
+ if (inb(DSP_DATA_AVAIL) & 0x80) {
+ return inb(DSP_READ);
+ }
+ return 0xffff;
}
#ifdef SM_WAVE
/*
* Logitech Soundman Wave detection and initialization by Hannu Savolainen.
- *
+ *
* There is a microcontroller (8031) in the SM Wave card for MIDI emulation.
* it's located at address MPU_BASE+4. MPU_BASE+7 is a SM Wave specific
* control register for MC reset, SCSI, OPL4 and DSP (future expansion)
- * address decoding. Otherwise the SM Wave is just a ordinary MV Jazz16
- * based soundcard.
+ * address decoding. Otherwise the SM Wave is just a ordinary MV Jazz16 based
+ * soundcard.
*/
static void
-smw_putmem (int base, int addr, unsigned char val)
+smw_putmem(int base, int addr, u_char val)
{
- unsigned long flags;
+ u_long flags;
- DISABLE_INTR (flags);
+ flags = splhigh();
- OUTB (addr & 0xff, base + 1); /* Low address bits */
- OUTB (addr >> 8, base + 2); /* High address bits */
- OUTB (val, base); /* Data */
+ outb(base + 1, addr & 0xff); /* Low address bits */
+ outb(base + 2, addr >> 8); /* High address bits */
+ outb(base, val); /* Data */
- RESTORE_INTR (flags);
+ splx(flags);
}
-static unsigned char
-smw_getmem (int base, int addr)
+static u_char
+smw_getmem(int base, int addr)
{
- unsigned long flags;
- unsigned char val;
+ u_long flags;
+ u_char val;
- DISABLE_INTR (flags);
+ flags = splhigh();
- OUTB (addr & 0xff, base + 1); /* Low address bits */
- OUTB (addr >> 8, base + 2); /* High address bits */
- val = INB (base); /* Data */
+ outb(base + 1, addr & 0xff); /* Low address bits */
+ outb(base + 2, addr >> 8); /* High address bits */
+ val = inb(base); /* Data */
- RESTORE_INTR (flags);
- return val;
+ splx(flags);
+ return val;
}
-static int
-initialize_smw (void)
-{
#ifdef SMW_MIDI0001_INCLUDED
-#include <i386/isa/sound/smw-midi0001.h>
+#include </sys/i386/isa/sound/smw-midi0001.h>
#else
- unsigned char smw_ucode[1];
- int smw_ucodeLen = 0;
+u_char *smw_ucode = NULL;
+int smw_ucodeLen = 0;
#endif
- int mp_base = MPU_BASE + 4; /* Microcontroller base */
- int i;
- unsigned char control;
-
- /*
- * Reset the microcontroller so that the RAM can be accessed
- */
-
- control = INB (MPU_BASE + 7);
- OUTB (control | 3, MPU_BASE + 7); /* Set last two bits to 1 (?) */
- OUTB ((control & 0xfe) | 2, MPU_BASE + 7); /* xxxxxxx0 resets the mc */
-
- for (i = 0; i < 300; i++) /* Wait at least 1ms */
- tenmicrosec ();
-
- OUTB (control & 0xfc, MPU_BASE + 7); /* xxxxxx00 enables RAM */
-
- /*
- * Detect microcontroller by probing the 8k RAM area
- */
- smw_putmem (mp_base, 0, 0x00);
- smw_putmem (mp_base, 1, 0xff);
- tenmicrosec ();
+static int
+initialize_smw(int mpu_base)
+{
- if (smw_getmem (mp_base, 0) != 0x00 || smw_getmem (mp_base, 1) != 0xff)
- {
- printk ("\nSM Wave: No microcontroller RAM detected (%02x, %02x)\n",
- smw_getmem (mp_base, 0), smw_getmem (mp_base, 1));
- return 0; /* No RAM */
+ int mp_base = mpu_base + 4; /* Microcontroller base */
+ int i;
+ u_char control;
+
+
+ /*
+ * Reset the microcontroller so that the RAM can be accessed
+ */
+
+ control = inb(mpu_base + 7);
+ outb(mpu_base + 7, control | 3); /* Set last two bits to 1 (?) */
+ outb(mpu_base + 7, (control & 0xfe) | 2); /* xxxxxxx0 resets the mc */
+ DELAY(3000); /* Wait at least 1ms */
+
+ outb(mpu_base + 7, control & 0xfc); /* xxxxxx00 enables RAM */
+
+ /*
+ * Detect microcontroller by probing the 8k RAM area
+ */
+ smw_putmem(mp_base, 0, 0x00);
+ smw_putmem(mp_base, 1, 0xff);
+ DELAY(10);
+
+ if (smw_getmem(mp_base, 0) != 0x00 || smw_getmem(mp_base, 1) != 0xff) {
+ printf("\nSM Wave: No microcontroller RAM detected (%02x, %02x)\n",
+ smw_getmem(mp_base, 0), smw_getmem(mp_base, 1));
+ return 0; /* No RAM */
}
+ /*
+ * There is RAM so assume it's really a SM Wave
+ */
+
+ if (smw_ucodeLen > 0) {
+ if (smw_ucodeLen != 8192) {
+ printf("\nSM Wave: Invalid microcode (MIDI0001.BIN) length\n");
+ return 1;
+ }
+ /*
+ * Download microcode
+ */
- /*
- * There is RAM so assume it's really a SM Wave
- */
-
-#ifdef SMW_MIDI0001_INCLUDED
- if (smw_ucodeLen != 8192)
- {
- printk ("\nSM Wave: Invalid microcode (MIDI0001.BIN) length\n");
- return 1;
- }
-#endif
-
- /*
- * Download microcode
- */
-
- for (i = 0; i < 8192; i++)
- smw_putmem (mp_base, i, smw_ucode[i]);
-
- /*
- * Verify microcode
- */
+ for (i = 0; i < 8192; i++)
+ smw_putmem(mp_base, i, smw_ucode[i]);
- for (i = 0; i < 8192; i++)
- if (smw_getmem (mp_base, i) != smw_ucode[i])
- {
- printk ("SM Wave: Microcode verification failed\n");
- return 0;
- }
+ /*
+ * Verify microcode
+ */
- control = 0;
+ for (i = 0; i < 8192; i++)
+ if (smw_getmem(mp_base, i) != smw_ucode[i]) {
+ printf("SM Wave: Microcode verification failed\n");
+ return 0;
+ }
+ }
+ control = 0;
#ifdef SMW_SCSI_IRQ
- /*
+ /*
* Set the SCSI interrupt (IRQ2/9, IRQ3 or IRQ10). The SCSI interrupt
* is disabled by default.
- *
+ *
* Btw the Zilog 5380 SCSI controller is located at MPU base + 0x10.
- */
- {
- static unsigned char scsi_irq_bits[] =
- {0, 0, 3, 1, 0, 0, 0, 0, 0, 3, 2, 0, 0, 0, 0, 0};
+ */
+ {
+ static u_char scsi_irq_bits[] =
+ {0, 0, 3, 1, 0, 0, 0, 0, 0, 3, 2, 0, 0, 0, 0, 0};
- control |= scsi_irq_bits[SMW_SCSI_IRQ] << 6;
- }
+ control |= scsi_irq_bits[SMW_SCSI_IRQ] << 6;
+ }
#endif
#ifdef SMW_OPL4_ENABLE
- /*
- * Make the OPL4 chip visible on the PC bus at 0x380.
- *
- * There is no need to enable this feature since VoxWare
- * doesn't support OPL4 yet. Also there is no RAM in SM Wave so
- * enabling OPL4 is pretty useless.
- */
- control |= 0x10; /* Uses IRQ12 if bit 0x20 == 0 */
- /* control |= 0x20; Uncomment this if you want to use IRQ7 */
+ /*
+ * Make the OPL4 chip visible on the PC bus at 0x380.
+ *
+ * There is no need to enable this feature since VoxWare doesn't support
+ * OPL4 yet. Also there is no RAM in SM Wave so enabling OPL4 is
+ * pretty useless.
+ */
+ control |= 0x10; /* Uses IRQ12 if bit 0x20 == 0 */
+ /* control |= 0x20; Uncomment this if you want to use IRQ7 */
#endif
- OUTB (control | 0x03, MPU_BASE + 7); /* xxxxxx11 restarts */
- return 1;
+ outb(mpu_base + 7, control | 0x03); /* xxxxxx11 restarts */
+ return 1;
}
#endif
static int
-initialize_ProSonic16 (void)
+initialize_ProSonic16(void)
{
- int x;
- static unsigned char int_translat[16] =
- {0, 0, 2, 3, 0, 1, 0, 4, 0, 2, 5, 0, 0, 0, 0, 6}, dma_translat[8] =
- {0, 1, 0, 2, 0, 3, 0, 4};
-
- OUTB (0xAF, 0x201); /* ProSonic/Jazz16 wakeup */
- for (x = 0; x < 1000; ++x) /* wait 10 milliseconds */
- tenmicrosec ();
- OUTB (0x50, 0x201);
- OUTB ((sbc_base & 0x70) | ((MPU_BASE & 0x30) >> 4), 0x201);
-
- if (sb_reset_dsp ())
- { /* OK. We have at least a SB */
-
- /* Check the version number of ProSonic (I guess) */
-
- if (!sb_dsp_command (0xFA))
- return 1;
- if (get_sb_byte () != 0x12)
- return 1;
-
- if (sb_dsp_command (0xFB) && /* set DMA-channels and Interrupts */
- sb_dsp_command ((dma_translat[JAZZ_DMA16] << 4) | dma_translat[SBC_DMA]) &&
- sb_dsp_command ((int_translat[MPU_IRQ] << 4) | int_translat[sbc_irq]))
- {
- Jazz16_detected = 1;
+ int x;
+ static u_char int_translat[16] =
+ {0, 0, 2, 3, 0, 1, 0, 4, 0, 2, 5, 0, 0, 0, 0, 6},
+ dma_translat[8] =
+ {0, 1, 0, 2, 0, 3, 0, 4};
+
+ struct address_info *mpu_config;
+
+ int mpu_base, mpu_irq;
+
+ if ((mpu_config = sound_getconf(SNDCARD_MPU401))) {
+ mpu_base = mpu_config->io_base;
+ mpu_irq = mpu_config->irq;
+ } else {
+ mpu_base = mpu_irq = 0;
+ }
+
+ outb(0x201, 0xAF); /* ProSonic/Jazz16 wakeup */
+ DELAY(15000); /* wait at least 10 milliseconds */
+ outb(0x201, 0x50);
+ outb(0x201, (sbc_base & 0x70) | ((mpu_base & 0x30) >> 4));
+
+ if (sb_reset_dsp()) { /* OK. We have at least a SB */
+
+ /* Check the version number of ProSonic (I guess) */
+
+ if (!sb_dsp_command(0xFA))
+ return 1;
+ if (get_sb_byte() != 0x12)
+ return 1;
+
+ if (sb_dsp_command(0xFB) && /* set DMA-channels and Interrupts */
+ sb_dsp_command((dma_translat[JAZZ_DMA16]<<4)|dma_translat[dma8]) &&
+ sb_dsp_command((int_translat[mpu_irq]<<4)|int_translat[sbc_irq])) {
+ Jazz16_detected = 1;
+ if (mpu_base == 0)
+ printf("Jazz16: No MPU401 devices configured - MIDI port not initialized\n");
+
#ifdef SM_WAVE
- if (initialize_smw ())
- Jazz16_detected = 2;
+ if (mpu_base != 0)
+ if (initialize_smw(mpu_base))
+ Jazz16_detected = 2;
#endif
- sb_dsp_disable_midi ();
+ sb_dsp_disable_midi();
}
-
- return 1; /* There was at least a SB */
+ return 1; /* There was at least a SB */
}
- return 0; /* No SB or ProSonic16 detected */
+ return 0; /* No SB or ProSonic16 detected */
}
-#endif /* ifdef JAZZ16 */
+#endif /* ifdef JAZZ16 */
int
-sb_dsp_detect (struct address_info *hw_config)
+sb_dsp_detect(struct address_info * hw_config)
{
- sbc_base = hw_config->io_base;
- sbc_irq = hw_config->irq;
+ sbc_base = hw_config->io_base;
+ sbc_irq = hw_config->irq;
+ sb_osp = hw_config->osp;
+
+
+ if (sb_dsp_ok)
+ return 0; /* Already initialized */
+ dma8 = hw_config->dma;
- if (sb_dsp_ok)
- return 0; /*
- * Already initialized
- */
#ifdef JAZZ16
- dma8 = hw_config->dma;
- dma16 = JAZZ_DMA16;
+ dma16 = JAZZ_DMA16;
- if (!initialize_ProSonic16 ())
- return 0;
+ if (!initialize_ProSonic16())
+ return 0;
#else
- if (!sb_reset_dsp ())
- return 0;
-#endif
-
-#ifdef PC98
- switch (sbc_irq)
- {
- case 3:
- sb_setmixer (IRQ_NR, 1);
- break;
- case 5:
- sb_setmixer (IRQ_NR, 8);
- break;
- case 10:
- sb_setmixer (IRQ_NR, 2);
- break;
- }
- switch (hw_config->dma)
- {
- case 0:
- sb_setmixer (DMA_NR, 1);
- break;
- case 3:
- sb_setmixer (DMA_NR, 2);
- break;
- }
+ if (!sb_reset_dsp())
+ return 0;
#endif
- return 0x10; /*
- * Detected
- */
+ return 1; /* Detected */
}
-#ifndef EXCLUDE_AUDIO
+#ifdef CONFIG_AUDIO
static struct audio_operations sb_dsp_operations =
{
- "SoundBlaster",
- NOTHING_SPECIAL,
- AFMT_U8, /* Just 8 bits. Poor old SB */
- NULL,
- sb_dsp_open,
- sb_dsp_close,
- sb_dsp_output_block,
- sb_dsp_start_input,
- sb_dsp_ioctl,
- sb_dsp_prepare_for_input,
- sb_dsp_prepare_for_output,
- sb_dsp_reset,
- sb_dsp_halt_xfer,
- NULL, /* local_qlen */
- NULL /* copy_from_user */
+ "SoundBlaster",
+ NOTHING_SPECIAL,
+ AFMT_U8, /* Just 8 bits. Poor old SB */
+ NULL,
+ sb_dsp_open,
+ sb_dsp_close,
+ sb_dsp_output_block,
+ sb_dsp_start_input,
+ sb_dsp_ioctl,
+ sb_dsp_prepare_for_input,
+ sb_dsp_prepare_for_output,
+ sb_dsp_reset,
+ sb_dsp_halt_xfer,
+ NULL, /* local_qlen */
+ NULL, /* copy_from_user */
+ NULL,
+ NULL,
+ sb_dsp_trigger
};
#endif
-long
-sb_dsp_init (long mem_start, struct address_info *hw_config)
+void
+sb_dsp_init(struct address_info * hw_config)
{
- int i;
- int mixer_type = 0;
+ int i;
+ char *fmt = NULL ;
- sbc_major = sbc_minor = 0;
- sb_dsp_command (0xe1); /*
- * Get version
- */
+#ifdef CONFIG_SBPRO
+ int mixer_type = 0;
- for (i = 1000; i; i--)
- {
- if (INB (DSP_DATA_AVAIL) & 0x80)
- { /*
- * wait for Data Ready
- */
- if (sbc_major == 0)
- sbc_major = INB (DSP_READ);
- else
- {
- sbc_minor = INB (DSP_READ);
- break;
+#endif
+
+ sb_osp = hw_config->osp;
+ sbc_major = sbc_minor = 0;
+ sb_dsp_command(DSP_CMD_GETVER); /* Get version */
+
+ for (i = 10000; i; i--) { /* perhaps wait longer on a fast machine ? */
+ if (inb(DSP_DATA_AVAIL) & 0x80) { /* wait for Data Ready */
+ if (sbc_major == 0)
+ sbc_major = inb(DSP_READ);
+ else {
+ sbc_minor = inb(DSP_READ);
+ break;
}
- }
+ } else
+ DELAY(20);
}
- if (sbc_major == 2 || sbc_major == 3)
- sb_duplex_midi = 1;
+ if (sbc_major == 0) {
+ printf("\n\nFailed to get SB version (%x) - possible I/O conflict\n\n",
+ inb(DSP_DATA_AVAIL));
+ sbc_major = 1;
+ }
+ if (sbc_major == 2 || sbc_major == 3)
+ sb_duplex_midi = 1;
- if (sbc_major == 4)
- sb16 = 1;
+ if (sbc_major == 4)
+ sb16 = 1;
-#ifndef EXCLUDE_SBPRO
- if (sbc_major >= 3)
- mixer_type = sb_mixer_init (sbc_major);
-#else
- if (sbc_major >= 3)
- printk ("\n\n\n\nNOTE! SB Pro support is required with your soundcard!\n\n\n");
-#endif
+ if (sbc_major == 3 && sbc_minor == 1) {
+ int ess_major = 0, ess_minor = 0;
-#ifndef EXCLUDE_YM3812
+ /*
+ * Try to detect ESS chips.
+ */
-#ifdef PC98
- if (sbc_major > 3 ||
- (sbc_major == 3 && INB (0x28d2) == 0x00))
-#else
- if (sbc_major > 3 ||
- (sbc_major == 3 && INB (0x388) == 0x00)) /* Should be 0x06 if not OPL-3 */
-#endif
- enable_opl3_mode (OPL3_LEFT, OPL3_RIGHT, OPL3_BOTH);
-#endif
+ sb_dsp_command(DSP_CMD_GETID); /* Return identification bytes. */
-#ifndef EXCLUDE_AUDIO
- if (sbc_major >= 3)
- {
- if (Jazz16_detected)
- {
- if (Jazz16_detected == 2)
- sprintf (sb_dsp_operations.name, "SoundMan Wave %d.%d", sbc_major, sbc_minor);
- else
- sprintf (sb_dsp_operations.name, "MV Jazz16 %d.%d", sbc_major, sbc_minor);
- sb_dsp_operations.format_mask |= AFMT_S16_LE; /* Hurrah, 16 bits */
- }
- else
-#ifdef __SGNXPRO__
- if (mixer_type == 2)
- {
- sprintf (sb_dsp_operations.name, "Sound Galaxy NX Pro %d.%d", sbc_major, sbc_minor);
+ for (i = 1000; i; i--) {
+ if (inb(DSP_DATA_AVAIL) & 0x80) { /* wait for Data Ready */
+ if (ess_major == 0)
+ ess_major = inb(DSP_READ);
+ else {
+ ess_minor = inb(DSP_READ);
+ break;
+ }
+ }
}
- else
-#endif
- if (sbc_major == 4)
- {
- sprintf (sb_dsp_operations.name, "SoundBlaster 16 %d.%d", sbc_major, sbc_minor);
- }
- else
- {
- sprintf (sb_dsp_operations.name, "SoundBlaster Pro %d.%d", sbc_major, sbc_minor);
- }
- }
- else
- {
- sprintf (sb_dsp_operations.name, "SoundBlaster %d.%d", sbc_major, sbc_minor);
+ if (ess_major == 0x48 && (ess_minor & 0xf0) == 0x80)
+ printf("Hmm... Could this be an ESS488 based card (rev %d)\n",
+ ess_minor & 0x0f);
+ else if (ess_major == 0x68 && (ess_minor & 0xf0) == 0x80)
+ printf("Hmm... Could this be an ESS688 based card (rev %d)\n",
+ ess_minor & 0x0f);
}
+ if (snd_set_irq_handler(sbc_irq, sbintr, sb_osp) < 0)
+ printf("sb_dsp: Can't allocate IRQ\n");;
-#if defined(__FreeBSD__)
- printk ("sb0: <%s>", sb_dsp_operations.name);
+#ifdef CONFIG_SBPRO
+ if (sbc_major >= 3)
+ mixer_type = sb_mixer_init(sbc_major);
#else
- printk (" <%s>", sb_dsp_operations.name);
+ if (sbc_major >= 3)
+ printf("\nNOTE! SB Pro support required with your soundcard!\n");
#endif
-#if !defined(EXCLUDE_SB16) && !defined(EXCLUDE_SBPRO)
- if (!sb16) /*
- * There is a better driver for SB16
- */
-#endif
- if (num_audiodevs < MAX_AUDIO_DEV)
- {
- audio_devs[my_dev = num_audiodevs++] = &sb_dsp_operations;
- audio_devs[my_dev]->buffcount = DSP_BUFFCOUNT;
- audio_devs[my_dev]->buffsize = (
- (sbc_major > 2 || sbc_major == 2 && sbc_minor > 0) ?
- 16 : 8) * 1024;
- audio_devs[my_dev]->dmachan = hw_config->dma;
- }
- else
- printk ("SB: Too many DSP devices available\n");
-#else
- printk (" <SoundBlaster (configured without audio support)>");
-#endif
-#ifndef EXCLUDE_MIDI
- if (!midi_disabled && !sb16) /*
- * Midi don't work in the SB emulation mode *
- * of PAS, SB16 has better midi interface
- */
- sb_midi_init (sbc_major);
+#ifdef CONFIG_AUDIO
+ if (sbc_major >= 3) {
+ if (Jazz16_detected) {
+ if (Jazz16_detected == 2)
+ fmt = "SoundMan Wave %d.%d";
+ else
+ fmt = "MV Jazz16 %d.%d";
+ sb_dsp_operations.format_mask |= AFMT_S16_LE; /* 16 bits */
+ } else
+#ifdef __SGNXPRO__
+ if (mixer_type == 2)
+ fmt = "Sound Galaxy NX Pro %d.%d" ;
+ else
+#endif /* __SGNXPRO__ */
+ if (sbc_major == 4)
+ fmt = "SoundBlaster 16 %d.%d";
+ else
+ fmt = "SoundBlaster Pro %d.%d";
+ } else {
+ fmt = "SoundBlaster %d.%d" ;
+ }
+
+ sprintf(sb_dsp_operations.name, fmt, sbc_major, sbc_minor);
+ conf_printf(sb_dsp_operations.name, hw_config);
+
+#if defined(CONFIG_SB16) && defined(CONFIG_SBPRO)
+ if (!sb16) /* There is a better driver for SB16 */
+#endif /* CONFIG_SB16 && CONFIG_SBPRO */
+ if (num_audiodevs < MAX_AUDIO_DEV) {
+ audio_devs[my_dev = num_audiodevs++] = &sb_dsp_operations;
+ audio_devs[my_dev]->buffsize = DSP_BUFFSIZE;
+ dma8 = audio_devs[my_dev]->dmachan1 = hw_config->dma;
+ audio_devs[my_dev]->dmachan2 = -1;
+#ifdef JAZZ16
+ /*
+ * Allocate 16 bit dma
+ */
+ if (Jazz16_detected != 0)
+ if (dma16 != dma8) {
+ if (0) {
+ printf("Jazz16: Can't allocate 16 bit DMA channel\n");
+ }
+ }
+#endif /* JAZZ16 */
+ } else
+ printf("SB: Too many DSP devices available\n");
+#else
+ conf_printf("SoundBlaster (configured without audio support)", hw_config);
#endif
- sb_dsp_ok = 1;
- return mem_start;
+#ifdef CONFIG_MIDI
+ if (!midi_disabled && !sb16) {
+ /*
+ * Midi don't work in the SB emulation mode of PAS,
+ * SB16 has better midi interface
+ */
+ sb_midi_init(sbc_major);
+ }
+#endif /* CONFIG_MIDI */
+ sb_dsp_ok = 1;
}
void
-sb_dsp_disable_midi (void)
+sb_dsp_disable_midi(void)
{
- midi_disabled = 1;
+ midi_disabled = 1;
}
-
#endif
diff --git a/sys/i386/isa/sound/sb_midi.c b/sys/i386/isa/sound/sb_midi.c
index 96fdcb9..a1d50bd 100644
--- a/sys/i386/isa/sound/sb_midi.c
+++ b/sys/i386/isa/sound/sb_midi.c
@@ -1,10 +1,10 @@
/*
* sound/sb_dsp.c
- *
+ *
* The low level driver for the SoundBlaster DS chips.
- *
+ *
* Copyright by Hannu Savolainen 1993
- *
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met: 1. Redistributions of source code must retain the above copyright
@@ -12,7 +12,7 @@
* Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
@@ -24,14 +24,14 @@
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
- *
+ *
*/
#include <i386/isa/sound/sound_config.h>
-#if defined(CONFIGURE_SOUNDCARD) && !defined(EXCLUDE_SB) && !defined(EXCLUDE_MIDI)
+#if (NSND > 0) && defined(CONFIG_SB) && defined(CONFIG_MIDI)
-#include <i386/isa/sound/sb_defs.h>
+#include <i386/isa/sound/sbcard.h>
#undef SB_TEST_IRQ
/*
@@ -46,167 +46,133 @@ extern int sb_dsp_ok; /* Set to 1 atfer successful initialization */
extern int sbc_base;
extern int sb_midi_mode;
-extern int sb_midi_busy; /*
-
-
- * * * * 1 if the process has output to MIDI
- *
- */
+extern int sb_midi_busy; /* 1 if the process has output to MIDI */
extern int sb_dsp_busy;
extern int sb_dsp_highspeed;
extern volatile int sb_irq_mode;
extern int sb_duplex_midi;
extern int sb_intr_active;
-static int input_opened = 0;
+int input_opened = 0;
static int my_dev;
-void (*midi_input_intr) (int dev, unsigned char data);
+extern sound_os_info *sb_osp;
+
+void (*midi_input_intr) (int dev, u_char data);
static int
-sb_midi_open (int dev, int mode,
- void (*input) (int dev, unsigned char data),
- void (*output) (int dev)
-)
+sb_midi_open(int dev, int mode, void (*input) (int dev, u_char data),
+ void (*output) (int dev))
{
- int ret;
+ int ret;
- if (!sb_dsp_ok)
- {
- printk ("SB Error: MIDI hardware not installed\n");
- return RET_ERROR (ENXIO);
+ if (!sb_dsp_ok) {
+ printf("SB Error: MIDI hardware not installed\n");
+ return -(ENXIO);
}
+ if (sb_midi_busy)
+ return -(EBUSY);
- if (sb_midi_busy)
- return RET_ERROR (EBUSY);
-
- if (mode != OPEN_WRITE && !sb_duplex_midi)
- {
- if (num_midis == 1)
- printk ("SoundBlaster: Midi input not currently supported\n");
- return RET_ERROR (EPERM);
+ if (mode != OPEN_WRITE && !sb_duplex_midi) {
+ if (num_midis == 1)
+ printf("SoundBlaster: Midi input not currently supported\n");
+ return -(EPERM);
}
-
- sb_midi_mode = NORMAL_MIDI;
- if (mode != OPEN_WRITE)
- {
- if (sb_dsp_busy || sb_intr_active)
- return RET_ERROR (EBUSY);
- sb_midi_mode = UART_MIDI;
+ sb_midi_mode = NORMAL_MIDI;
+ if (mode != OPEN_WRITE) {
+ if (sb_dsp_busy || sb_intr_active)
+ return -(EBUSY);
+ sb_midi_mode = UART_MIDI;
}
-
- if (sb_dsp_highspeed)
- {
- printk ("SB Error: Midi output not possible during stereo or high speed audio\n");
- return RET_ERROR (EBUSY);
+ if (sb_dsp_highspeed) {
+ printf("SB Error: Midi output not possible during stereo or high speed audio\n");
+ return -(EBUSY);
}
+ if (sb_midi_mode == UART_MIDI) {
+ sb_irq_mode = IMODE_MIDI;
- if (sb_midi_mode == UART_MIDI)
- {
- sb_irq_mode = IMODE_MIDI;
-
- sb_reset_dsp ();
-
- if (!sb_dsp_command (0x35))
- return RET_ERROR (EIO); /*
- * Enter the UART mode
- */
- sb_intr_active = 1;
-
- if ((ret = sb_get_irq ()) < 0)
- {
- sb_reset_dsp ();
- return 0; /*
- * IRQ not free
- */
- }
- input_opened = 1;
- midi_input_intr = input;
- }
+ sb_reset_dsp();
+
+ if (!sb_dsp_command(0x35))
+ return -(EIO); /* Enter the UART mode */
+ sb_intr_active = 1;
- sb_midi_busy = 1;
+ input_opened = 1;
+ midi_input_intr = input;
+ }
+ sb_midi_busy = 1;
- return 0;
+ return 0;
}
static void
-sb_midi_close (int dev)
+sb_midi_close(int dev)
{
- if (sb_midi_mode == UART_MIDI)
- {
- sb_reset_dsp (); /*
- * The only way to kill the UART mode
- */
- sb_free_irq ();
+ if (sb_midi_mode == UART_MIDI) {
+ sb_reset_dsp(); /* The only way to kill the UART mode */
}
- sb_intr_active = 0;
- sb_midi_busy = 0;
- input_opened = 0;
+ sb_intr_active = 0;
+ sb_midi_busy = 0;
+ input_opened = 0;
}
static int
-sb_midi_out (int dev, unsigned char midi_byte)
+sb_midi_out(int dev, u_char midi_byte)
{
- unsigned long flags;
-
- if (sb_midi_mode == NORMAL_MIDI)
- {
- DISABLE_INTR (flags);
- if (sb_dsp_command (0x38))
- sb_dsp_command (midi_byte);
- else
- printk ("SB Error: Unable to send a MIDI byte\n");
- RESTORE_INTR (flags);
- }
- else
- sb_dsp_command (midi_byte); /*
- * UART write
- */
-
- return 1;
+ u_long flags;
+
+ if (sb_midi_mode == NORMAL_MIDI) {
+ flags = splhigh();
+ if (sb_dsp_command(0x38))
+ sb_dsp_command(midi_byte);
+ else
+ printf("SB Error: Unable to send a MIDI byte\n");
+ splx(flags);
+ } else
+ sb_dsp_command(midi_byte); /* UART write */
+
+ return 1;
}
static int
-sb_midi_start_read (int dev)
+sb_midi_start_read(int dev)
{
- if (sb_midi_mode != UART_MIDI)
- {
- printk ("SoundBlaster: MIDI input not implemented.\n");
- return RET_ERROR (EPERM);
+ if (sb_midi_mode != UART_MIDI) {
+ printf("SoundBlaster: MIDI input not implemented.\n");
+ return -(EPERM);
}
- return 0;
+ return 0;
}
static int
-sb_midi_end_read (int dev)
+sb_midi_end_read(int dev)
{
- if (sb_midi_mode == UART_MIDI)
- {
- sb_reset_dsp ();
- sb_intr_active = 0;
+ if (sb_midi_mode == UART_MIDI) {
+ sb_reset_dsp();
+ sb_intr_active = 0;
}
- return 0;
+ return 0;
}
static int
-sb_midi_ioctl (int dev, unsigned cmd, unsigned arg)
+sb_midi_ioctl(int dev, u_int cmd, ioctl_arg arg)
{
- return RET_ERROR (EPERM);
+ return -(EPERM);
}
void
-sb_midi_interrupt (int dummy)
+sb_midi_interrupt(int dummy)
{
- unsigned long flags;
- unsigned char data;
+ u_long flags;
+ u_char data;
- DISABLE_INTR (flags);
+ flags = splhigh();
- data = INB (DSP_READ);
- if (input_opened)
- midi_input_intr (my_dev, data);
+ data = inb(DSP_READ);
+ if (input_opened)
+ midi_input_intr(my_dev, data);
- RESTORE_INTR (flags);
+ splx(flags);
}
#define MIDI_SYNTH_NAME "SoundBlaster Midi"
@@ -215,39 +181,31 @@ sb_midi_interrupt (int dummy)
static struct midi_operations sb_midi_operations =
{
- {"SoundBlaster", 0, 0, SNDCARD_SB},
- &std_midi_synth,
- {0},
- sb_midi_open,
- sb_midi_close,
- sb_midi_ioctl,
- sb_midi_out,
- sb_midi_start_read,
- sb_midi_end_read,
- NULL, /*
- * Kick
- */
- NULL, /*
- * command
- */
- NULL, /*
- * buffer_status
- */
- NULL
+ {"SoundBlaster", 0, 0, SNDCARD_SB},
+ &std_midi_synth,
+ {0},
+ sb_midi_open,
+ sb_midi_close,
+ sb_midi_ioctl,
+ sb_midi_out,
+ sb_midi_start_read,
+ sb_midi_end_read,
+ NULL, /* Kick */
+ NULL, /* command */
+ NULL, /* buffer_status */
+ NULL
};
void
-sb_midi_init (int model)
+sb_midi_init(int model)
{
- if (num_midis >= MAX_MIDI_DEV)
- {
- printk ("Sound: Too many midi devices detected\n");
- return;
+ if (num_midis >= MAX_MIDI_DEV) {
+ printf("Sound: Too many midi devices detected\n");
+ return;
}
-
- std_midi_synth.midi_dev = num_midis;
- my_dev = num_midis;
- midi_devs[num_midis++] = &sb_midi_operations;
+ std_midi_synth.midi_dev = num_midis;
+ my_dev = num_midis;
+ midi_devs[num_midis++] = &sb_midi_operations;
}
#endif
diff --git a/sys/i386/isa/sound/sb_mixer.c b/sys/i386/isa/sound/sb_mixer.c
index dc34c09..14db176 100644
--- a/sys/i386/isa/sound/sb_mixer.c
+++ b/sys/i386/isa/sound/sb_mixer.c
@@ -1,11 +1,10 @@
-
/*
* sound/sb_mixer.c
- *
+ *
* The low level mixer driver for the SoundBlaster Pro and SB16 cards.
- *
+ *
* Copyright by Hannu Savolainen 1994
- *
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met: 1. Redistributions of source code must retain the above copyright
@@ -13,7 +12,7 @@
* Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
@@ -25,25 +24,24 @@
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
- *
- * Modified:
- * Hunyue Yau Jan 6 1994
- * Added code to support the Sound Galaxy NX Pro mixer.
- *
+ *
+ * Modified: Hunyue Yau Jan 6 1994 Added code to support the Sound Galaxy
+ * NX Pro mixer.
+ *
*/
#include <i386/isa/sound/sound_config.h>
-#if defined(CONFIGURE_SOUNDCARD) && !defined(EXCLUDE_SB) && !defined(EXCLUDE_SBPRO)
+#if (NSB > 0) && defined(CONFIG_SBPRO)
#define __SB_MIXER_C__
-#include <i386/isa/sound/sb_defs.h>
+#include <i386/isa/sound/sbcard.h>
#include <i386/isa/sound/sb_mixer.h>
#undef SB_TEST_IRQ
extern int sbc_base;
-extern int sbc_major;
extern int Jazz16_detected;
+extern sound_os_info *sb_osp;
static int mixer_initialized = 0;
@@ -55,533 +53,477 @@ static int mixer_caps;
static mixer_tab *iomap;
void
-sb_setmixer (unsigned int port, unsigned int value)
+sb_setmixer(u_int port, u_int value)
{
- unsigned long flags;
-
- DISABLE_INTR (flags);
- OUTB ((unsigned char) (port & 0xff), MIXER_ADDR); /*
- * Select register
- */
- tenmicrosec ();
- OUTB ((unsigned char) (value & 0xff), MIXER_DATA);
- tenmicrosec ();
- RESTORE_INTR (flags);
+ u_long flags;
+
+ flags = splhigh(); /* XXX ouch... */
+ outb(MIXER_ADDR, (u_char) (port & 0xff)); /* Select register */
+ DELAY(10);
+ outb(MIXER_DATA, (u_char) (value & 0xff));
+ DELAY(10);
+ splx(flags);
}
int
-sb_getmixer (unsigned int port)
+sb_getmixer(u_int port)
{
- int val;
- unsigned long flags;
-
- DISABLE_INTR (flags);
- OUTB ((unsigned char) (port & 0xff), MIXER_ADDR); /*
- * Select register
- */
- tenmicrosec ();
- val = INB (MIXER_DATA);
- tenmicrosec ();
- RESTORE_INTR (flags);
-
- return val;
+ int val;
+ u_long flags;
+
+ flags = splhigh();
+ outb(MIXER_ADDR, (u_char) (port & 0xff)); /* Select register */
+ DELAY(10);
+ val = inb(MIXER_DATA);
+ DELAY(10);
+ splx(flags);
+
+ return val;
}
void
-sb_mixer_set_stereo (int mode)
+sb_mixer_set_stereo(int mode)
{
- if (!mixer_initialized)
- return;
+ if (!mixer_initialized)
+ return;
- sb_setmixer (OUT_FILTER, ((sb_getmixer (OUT_FILTER) & ~STEREO_DAC)
- | (mode ? STEREO_DAC : MONO_DAC)));
+ sb_setmixer(OUT_FILTER, ((sb_getmixer(OUT_FILTER) & ~STEREO_DAC)
+ | (mode ? STEREO_DAC : MONO_DAC)));
}
/*
* Returns:
- * 0 No mixer detected.
- * 1 Only a plain Sound Blaster Pro style mixer detected.
- * 2 The Sound Galaxy NX Pro mixer detected.
+ * 0 No mixer detected.
+ * 1 Only a plain Sound Blaster Pro style mixer detected.
+ * 2 The Sound Galaxy NX Pro mixer detected.
*/
static int
-detect_mixer (void)
+detect_mixer(void)
{
-#ifdef __SGNXPRO__
- int oldbass, oldtreble;
+#ifdef __SGNXPRO__
+ int oldbass, oldtreble;
+ extern int sbc_major;
#endif
- int retcode = 1;
-
- /*
- * Detect the mixer by changing parameters of two volume channels. If the
- * values read back match with the values written, the mixer is there (is
- * it?)
- */
- sb_setmixer (FM_VOL, 0xff);
- sb_setmixer (VOC_VOL, 0x33);
-
- if (sb_getmixer (FM_VOL) != 0xff)
- return 0; /*
- * No match
- */
- if (sb_getmixer (VOC_VOL) != 0x33)
- return 0;
+ int retcode = 1;
-#ifdef __SGNXPRO__
- /* Attempt to detect the SG NX Pro by check for valid bass/treble
- * registers.
- */
- oldbass = sb_getmixer (BASS_LVL);
- oldtreble = sb_getmixer (TREBLE_LVL);
+ /*
+ * Detect the mixer by changing parameters of two volume channels. If
+ * the values read back match with the values written, the mixer is
+ * there (is it?)
+ */
+ sb_setmixer(FM_VOL, 0xff);
+ sb_setmixer(VOC_VOL, 0x33);
- sb_setmixer (BASS_LVL, 0xaa);
- sb_setmixer (TREBLE_LVL, 0x55);
+ if (sb_getmixer(FM_VOL) != 0xff)
+ return 0; /* No match */
+ if (sb_getmixer(VOC_VOL) != 0x33)
+ return 0;
- if ((sb_getmixer (BASS_LVL) != 0xaa) ||
- (sb_getmixer (TREBLE_LVL) != 0x55))
- {
- retcode = 1; /* 1 == Only SB Pro detected */
- }
- else
- retcode = 2; /* 2 == SG NX Pro detected */
- /* Restore register in either case since SG NX Pro has EEPROM with
- * 'preferred' values stored.
- */
- sb_setmixer (BASS_LVL, oldbass);
- sb_setmixer (TREBLE_LVL, oldtreble);
-
- /*
+#ifdef __SGNXPRO__
+ /*
+ * Attempt to detect the SG NX Pro by check for valid bass/treble
+ * registers.
+ */
+ oldbass = sb_getmixer(BASS_LVL);
+ oldtreble = sb_getmixer(TREBLE_LVL);
+
+ sb_setmixer(BASS_LVL, 0xaa);
+ sb_setmixer(TREBLE_LVL, 0x55);
+
+ if ((sb_getmixer(BASS_LVL) != 0xaa) ||
+ (sb_getmixer(TREBLE_LVL) != 0x55)) {
+ retcode = 1; /* 1 == Only SB Pro detected */
+ } else
+ retcode = 2; /* 2 == SG NX Pro detected */
+ /*
+ * Restore register in either case since SG NX Pro has EEPROM with
+ * 'preferred' values stored.
+ */
+ sb_setmixer(BASS_LVL, oldbass);
+ sb_setmixer(TREBLE_LVL, oldtreble);
+
+ /*
* If the SB version is 3.X (SB Pro), assume we have a SG NX Pro 16.
* In this case it's good idea to disable the Disney Sound Source
- * compatibility mode. It's useless and just causes noise every time the
- * LPT-port is accessed.
- *
+ * compatibility mode. It's useless and just causes noise every time
+ * the LPT-port is accessed.
+ *
* Also place the card into WSS mode.
- */
- if (sbc_major == 3)
- {
- OUTB (0x01, sbc_base + 0x1c);
- OUTB (0x00, sbc_base + 0x1a);
+ */
+ if (sbc_major == 3) {
+ outb(sbc_base + 0x1c, 0x01);
+ outb(sbc_base + 0x1a, 0x00);
}
-
#endif
- return retcode;
+ return retcode;
}
static void
-change_bits (unsigned char *regval, int dev, int chn, int newval)
+change_bits(u_char *regval, int dev, int chn, int newval)
{
- unsigned char mask;
- int shift;
-
- mask = (1 << (*iomap)[dev][chn].nbits) - 1;
- newval = (int) ((newval * mask) + 50) / 100; /*
- * Scale it
- */
-
- shift = (*iomap)[dev][chn].bitoffs - (*iomap)[dev][LEFT_CHN].nbits + 1;
-
- *regval &= ~(mask << shift); /*
- * Filter out the previous value
- */
- *regval |= (newval & mask) << shift; /*
- * Set the new value
- */
+ u_char mask;
+ int shift;
+
+ mask = (1 << (*iomap)[dev][chn].nbits) - 1;
+ newval = (int) ((newval * mask) + 50) / 100; /* Scale it */
+
+ shift = (*iomap)[dev][chn].bitoffs - (*iomap)[dev][LEFT_CHN].nbits + 1;
+
+ *regval &= ~(mask << shift); /* Filter out the previous value */
+ *regval |= (newval & mask) << shift; /* Set the new value */
}
static int
-sb_mixer_get (int dev)
+sb_mixer_get(int dev)
{
- if (!((1 << dev) & supported_devices))
- return RET_ERROR (EINVAL);
+ if (!((1 << dev) & supported_devices))
+ return -(EINVAL);
- return levels[dev];
+ return levels[dev];
}
#ifdef JAZZ16
-static char smw_mix_regs[] = /* Left mixer registers */
+static char smw_mix_regs[] =/* Left mixer registers */
{
- 0x0b, /* SOUND_MIXER_VOLUME */
- 0x0d, /* SOUND_MIXER_BASS */
- 0x0d, /* SOUND_MIXER_TREBLE */
- 0x05, /* SOUND_MIXER_SYNTH */
- 0x09, /* SOUND_MIXER_PCM */
- 0x00, /* SOUND_MIXER_SPEAKER */
- 0x03, /* SOUND_MIXER_LINE */
- 0x01, /* SOUND_MIXER_MIC */
- 0x07, /* SOUND_MIXER_CD */
- 0x00, /* SOUND_MIXER_IMIX */
- 0x00, /* SOUND_MIXER_ALTPCM */
- 0x00, /* SOUND_MIXER_RECLEV */
- 0x00, /* SOUND_MIXER_IGAIN */
- 0x00, /* SOUND_MIXER_OGAIN */
- 0x00, /* SOUND_MIXER_LINE1 */
- 0x00, /* SOUND_MIXER_LINE2 */
- 0x00 /* SOUND_MIXER_LINE3 */
+ 0x0b, /* SOUND_MIXER_VOLUME */
+ 0x0d, /* SOUND_MIXER_BASS */
+ 0x0d, /* SOUND_MIXER_TREBLE */
+ 0x05, /* SOUND_MIXER_SYNTH */
+ 0x09, /* SOUND_MIXER_PCM */
+ 0x00, /* SOUND_MIXER_SPEAKER */
+ 0x03, /* SOUND_MIXER_LINE */
+ 0x01, /* SOUND_MIXER_MIC */
+ 0x07, /* SOUND_MIXER_CD */
+ 0x00, /* SOUND_MIXER_IMIX */
+ 0x00, /* SOUND_MIXER_ALTPCM */
+ 0x00, /* SOUND_MIXER_RECLEV */
+ 0x00, /* SOUND_MIXER_IGAIN */
+ 0x00, /* SOUND_MIXER_OGAIN */
+ 0x00, /* SOUND_MIXER_LINE1 */
+ 0x00, /* SOUND_MIXER_LINE2 */
+ 0x00 /* SOUND_MIXER_LINE3 */
};
static void
-smw_mixer_init (void)
+smw_mixer_init(void)
{
- int i;
+ int i;
- sb_setmixer (0x00, 0x18); /* Mute unused (Telephone) line */
- sb_setmixer (0x10, 0x38); /* Config register 2 */
+ sb_setmixer(0x00, 0x18);/* Mute unused (Telephone) line */
+ sb_setmixer(0x10, 0x38);/* Config register 2 */
- supported_devices = 0;
- for (i = 0; i < sizeof (smw_mix_regs); i++)
- if (smw_mix_regs[i] != 0)
- supported_devices |= (1 << i);
+ supported_devices = 0;
+ for (i = 0; i < sizeof(smw_mix_regs); i++)
+ if (smw_mix_regs[i] != 0)
+ supported_devices |= (1 << i);
- supported_rec_devices = supported_devices &
- ~(SOUND_MASK_BASS | SOUND_MASK_TREBLE | SOUND_MASK_PCM |
- SOUND_MASK_VOLUME);
+ supported_rec_devices = supported_devices &
+ ~(SOUND_MASK_BASS | SOUND_MASK_TREBLE | SOUND_MASK_PCM |
+ SOUND_MASK_VOLUME);
}
static int
-smw_mixer_set (int dev, int value)
+smw_mixer_set(int dev, int value)
{
- int left = value & 0x000000ff;
- int right = (value & 0x0000ff00) >> 8;
- int reg, val;
+ int left = value & 0x000000ff;
+ int right = (value & 0x0000ff00) >> 8;
+ int reg, val;
- if (left > 100)
- left = 100;
- if (right > 100)
- right = 100;
+ if (left > 100)
+ left = 100;
+ if (right > 100)
+ right = 100;
- if (dev > 31)
- return RET_ERROR (EINVAL);
+ if (dev > 31)
+ return -(EINVAL);
- if (!(supported_devices & (1 << dev))) /* Not supported */
- return RET_ERROR (EINVAL);
+ if (!(supported_devices & (1 << dev))) /* Not supported */
+ return -(EINVAL);
- switch (dev)
- {
+ switch (dev) {
case SOUND_MIXER_VOLUME:
- sb_setmixer (0x0b, 96 - (96 * left / 100)); /* 96=mute, 0=max */
- sb_setmixer (0x0c, 96 - (96 * right / 100));
- break;
+ sb_setmixer(0x0b, 96 - (96 * left / 100)); /* 96=mute, 0=max */
+ sb_setmixer(0x0c, 96 - (96 * right / 100));
+ break;
case SOUND_MIXER_BASS:
case SOUND_MIXER_TREBLE:
- levels[dev] = left | (right << 8);
+ levels[dev] = left | (right << 8);
- /* Set left bass and treble values */
- val = ((levels[SOUND_MIXER_TREBLE] & 0xff) * 16 / 100) << 4;
- val |= ((levels[SOUND_MIXER_BASS] & 0xff) * 16 / 100) & 0x0f;
- sb_setmixer (0x0d, val);
+ /* Set left bass and treble values */
+ val = ((levels[SOUND_MIXER_TREBLE] & 0xff) * 16 / 100) << 4;
+ val |= ((levels[SOUND_MIXER_BASS] & 0xff) * 16 / 100) & 0x0f;
+ sb_setmixer(0x0d, val);
- /* Set right bass and treble values */
- val = (((levels[SOUND_MIXER_TREBLE] >> 8) & 0xff) * 16 / 100) << 4;
- val |= (((levels[SOUND_MIXER_BASS] >> 8) & 0xff) * 16 / 100) & 0x0f;
- sb_setmixer (0x0e, val);
- break;
+ /* Set right bass and treble values */
+ val = (((levels[SOUND_MIXER_TREBLE] >> 8) & 0xff) * 16 / 100) << 4;
+ val |= (((levels[SOUND_MIXER_BASS] >> 8) & 0xff) * 16 / 100) & 0x0f;
+ sb_setmixer(0x0e, val);
+ break;
default:
- reg = smw_mix_regs[dev];
- if (reg == 0)
- return RET_ERROR (EINVAL);
- sb_setmixer (reg, (24 - (24 * left / 100)) | 0x20); /* 24=mute, 0=max */
- sb_setmixer (reg + 1, (24 - (24 * right / 100)) | 0x40);
+ reg = smw_mix_regs[dev];
+ if (reg == 0)
+ return -(EINVAL);
+ sb_setmixer(reg, (24 - (24 * left / 100)) | 0x20); /* 24=mute, 0=max */
+ sb_setmixer(reg + 1, (24 - (24 * right / 100)) | 0x40);
}
- levels[dev] = left | (right << 8);
- return left | (right << 8);
+ levels[dev] = left | (right << 8);
+ return left | (right << 8);
}
#endif
static int
-sb_mixer_set (int dev, int value)
+sb_mixer_set(int dev, int value)
{
- int left = value & 0x000000ff;
- int right = (value & 0x0000ff00) >> 8;
+ int left = value & 0x000000ff;
+ int right = (value & 0x0000ff00) >> 8;
- int regoffs;
- unsigned char val;
+ int regoffs;
+ u_char val;
#ifdef JAZZ16
- if (Jazz16_detected == 2)
- return smw_mixer_set (dev, value);
+ if (Jazz16_detected == 2)
+ return smw_mixer_set(dev, value);
#endif
- if (left > 100)
- left = 100;
- if (right > 100)
- right = 100;
+ if (left > 100)
+ left = 100;
+ if (right > 100)
+ right = 100;
- if (dev > 31)
- return RET_ERROR (EINVAL);
+ if (dev > 31)
+ return -(EINVAL);
- if (!(supported_devices & (1 << dev))) /*
- * Not supported
- */
- return RET_ERROR (EINVAL);
+ if (!(supported_devices & (1 << dev))) /* Not supported */
+ return -(EINVAL);
- regoffs = (*iomap)[dev][LEFT_CHN].regno;
+ regoffs = (*iomap)[dev][LEFT_CHN].regno;
- if (regoffs == 0)
- return RET_ERROR (EINVAL);
+ if (regoffs == 0)
+ return -(EINVAL);
- val = sb_getmixer (regoffs);
- change_bits (&val, dev, LEFT_CHN, left);
+ val = sb_getmixer(regoffs);
+ change_bits(&val, dev, LEFT_CHN, left);
- levels[dev] = left | (left << 8);
+ levels[dev] = left | (left << 8);
- if ((*iomap)[dev][RIGHT_CHN].regno != regoffs) /*
- * Change register
- */
- {
- sb_setmixer (regoffs, val); /*
- * Save the old one
- */
- regoffs = (*iomap)[dev][RIGHT_CHN].regno;
+ if ((*iomap)[dev][RIGHT_CHN].regno != regoffs) { /* Change register */
+ sb_setmixer(regoffs, val); /* Save the old one */
+ regoffs = (*iomap)[dev][RIGHT_CHN].regno;
- if (regoffs == 0)
- return left | (left << 8); /*
- * Just left channel present
- */
+ if (regoffs == 0)
+ return left | (left << 8); /* Just left channel present */
- val = sb_getmixer (regoffs); /*
- * Read the new one
- */
+ val = sb_getmixer(regoffs); /* Read the new one */
}
+ change_bits(&val, dev, RIGHT_CHN, right);
- change_bits (&val, dev, RIGHT_CHN, right);
-
- sb_setmixer (regoffs, val);
+ sb_setmixer(regoffs, val);
- levels[dev] = left | (right << 8);
- return left | (right << 8);
+ levels[dev] = left | (right << 8);
+ return left | (right << 8);
}
static void
-set_recsrc (int src)
+set_recsrc(int src)
{
- sb_setmixer (RECORD_SRC, (sb_getmixer (RECORD_SRC) & ~7) | (src & 0x7));
+ sb_setmixer(RECORD_SRC, (sb_getmixer(RECORD_SRC) & ~7) | (src & 0x7));
}
static int
-set_recmask (int mask)
+set_recmask(int mask)
{
- int devmask, i;
- unsigned char regimageL, regimageR;
+ int devmask, i;
+ u_char regimageL, regimageR;
- devmask = mask & supported_rec_devices;
+ devmask = mask & supported_rec_devices;
- switch (mixer_model)
- {
+ switch (mixer_model) {
case 3:
- if (devmask != SOUND_MASK_MIC &&
- devmask != SOUND_MASK_LINE &&
- devmask != SOUND_MASK_CD)
- { /*
- * More than one devices selected. Drop the *
- * previous selection
- */
- devmask &= ~recmask;
+ if (devmask != SOUND_MASK_MIC && devmask != SOUND_MASK_LINE &&
+ devmask != SOUND_MASK_CD) {
+ /*
+ * More than one devices selected. Drop the previous
+ * selection
+ */
+ devmask &= ~recmask;
}
-
- if (devmask != SOUND_MASK_MIC &&
- devmask != SOUND_MASK_LINE &&
- devmask != SOUND_MASK_CD)
- { /*
- * More than one devices selected. Default to
- * * mic
- */
- devmask = SOUND_MASK_MIC;
+ if (devmask != SOUND_MASK_MIC && devmask != SOUND_MASK_LINE &&
+ devmask != SOUND_MASK_CD) {
+ /* More than one devices selected. Default to mic */
+ devmask = SOUND_MASK_MIC;
}
-
-
- if (devmask ^ recmask) /*
- * Input source changed
- */
- {
- switch (devmask)
- {
+ if (devmask ^ recmask) { /* Input source changed */
+ switch (devmask) {
case SOUND_MASK_MIC:
- set_recsrc (SRC_MIC);
- break;
+ set_recsrc(SRC_MIC);
+ break;
case SOUND_MASK_LINE:
- set_recsrc (SRC_LINE);
- break;
+ set_recsrc(SRC_LINE);
+ break;
case SOUND_MASK_CD:
- set_recsrc (SRC_CD);
- break;
+ set_recsrc(SRC_CD);
+ break;
default:
- set_recsrc (SRC_MIC);
+ set_recsrc(SRC_MIC);
}
}
-
- break;
+ break;
case 4:
- if (!devmask)
- devmask = SOUND_MASK_MIC;
-
- regimageL = regimageR = 0;
- for (i = 0; i < SOUND_MIXER_NRDEVICES; i++)
- if ((1 << i) & devmask)
- {
- regimageL |= sb16_recmasks_L[i];
- regimageR |= sb16_recmasks_R[i];
- }
- sb_setmixer (SB16_IMASK_L, regimageL);
- sb_setmixer (SB16_IMASK_R, regimageR);
- break;
+ if (!devmask)
+ devmask = SOUND_MASK_MIC;
+
+ regimageL = regimageR = 0;
+ for (i = 0; i < SOUND_MIXER_NRDEVICES; i++)
+ if ((1 << i) & devmask) {
+ regimageL |= sb16_recmasks_L[i];
+ regimageR |= sb16_recmasks_R[i];
+ }
+ sb_setmixer(SB16_IMASK_L, regimageL);
+ sb_setmixer(SB16_IMASK_R, regimageR);
+ break;
}
- recmask = devmask;
- return recmask;
+ recmask = devmask;
+ return recmask;
}
static int
-sb_mixer_ioctl (int dev, unsigned int cmd, unsigned int arg)
+sb_mixer_ioctl(int dev, u_int cmd, ioctl_arg arg)
{
- if (((cmd >> 8) & 0xff) == 'M')
- {
- if (cmd & IOC_IN)
- switch (cmd & 0xff)
- {
- case SOUND_MIXER_RECSRC:
- return IOCTL_OUT (arg, set_recmask (IOCTL_IN (arg)));
- break;
-
- default:
-
- return IOCTL_OUT (arg, sb_mixer_set (cmd & 0xff, IOCTL_IN (arg)));
- }
- else
- switch (cmd & 0xff) /*
- * Return parameters
- */
- {
-
- case SOUND_MIXER_RECSRC:
- return IOCTL_OUT (arg, recmask);
- break;
-
- case SOUND_MIXER_DEVMASK:
- return IOCTL_OUT (arg, supported_devices);
- break;
-
- case SOUND_MIXER_STEREODEVS:
- if (Jazz16_detected)
- return IOCTL_OUT (arg, supported_devices);
- else
- return IOCTL_OUT (arg, supported_devices &
- ~(SOUND_MASK_MIC | SOUND_MASK_SPEAKER));
- break;
-
- case SOUND_MIXER_RECMASK:
- return IOCTL_OUT (arg, supported_rec_devices);
- break;
-
- case SOUND_MIXER_CAPS:
- return IOCTL_OUT (arg, mixer_caps);
- break;
-
- default:
- return IOCTL_OUT (arg, sb_mixer_get (cmd & 0xff));
- }
- }
- else
- return RET_ERROR (EINVAL);
+ if (((cmd >> 8) & 0xff) == 'M') {
+ if (cmd & IOC_IN)
+ switch (cmd & 0xff) {
+ case SOUND_MIXER_RECSRC:
+ return *(int *) arg = set_recmask((*(int *) arg));
+ break;
+
+ default:
+ return *(int *) arg = sb_mixer_set(cmd & 0xff, (*(int *) arg));
+ }
+ else
+ switch (cmd & 0xff) { /* Return parameters */
+
+ case SOUND_MIXER_RECSRC:
+ return *(int *) arg = recmask;
+ break;
+
+ case SOUND_MIXER_DEVMASK:
+ return *(int *) arg = supported_devices;
+ break;
+
+ case SOUND_MIXER_STEREODEVS:
+ if (Jazz16_detected)
+ return *(int *) arg = supported_devices;
+ else
+ return *(int *) arg = supported_devices & ~(SOUND_MASK_MIC | SOUND_MASK_SPEAKER);
+ break;
+
+ case SOUND_MIXER_RECMASK:
+ return *(int *) arg = supported_rec_devices;
+ break;
+
+ case SOUND_MIXER_CAPS:
+ return *(int *) arg = mixer_caps;
+ break;
+
+ default:
+ return *(int *) arg = sb_mixer_get(cmd & 0xff);
+ }
+ } else
+ return -(EINVAL);
}
static struct mixer_operations sb_mixer_operations =
{
- "SoundBlaster",
- sb_mixer_ioctl
+ "SoundBlaster",
+ sb_mixer_ioctl
};
static void
-sb_mixer_reset (void)
+sb_mixer_reset(void)
{
- int i;
+ int i;
- for (i = 0; i < SOUND_MIXER_NRDEVICES; i++)
- sb_mixer_set (i, levels[i]);
- set_recmask (SOUND_MASK_MIC);
+ for (i = 0; i < SOUND_MIXER_NRDEVICES; i++)
+ sb_mixer_set(i, levels[i]);
+ set_recmask(SOUND_MASK_MIC);
}
/*
- * Returns a code depending on whether a SG NX Pro was detected.
- * 1 == Plain SB Pro
- * 2 == SG NX Pro detected.
- * 3 == SB16
- *
+ * Returns a code depending on whether a SG NX Pro was detected. 1 == Plain
+ * SB Pro 2 == SG NX Pro detected. 3 == SB16
+ *
* Used to update message.
*/
int
-sb_mixer_init (int major_model)
+sb_mixer_init(int major_model)
{
- int mixer_type = 0;
+ int mixer_type = 0;
- sb_setmixer (0x00, 0); /* Reset mixer */
+ sb_setmixer(0x00, 0); /* Reset mixer */
- if (!(mixer_type = detect_mixer ()))
- return 0; /* No mixer. Why? */
+ if (!(mixer_type = detect_mixer()))
+ return 0; /* No mixer. Why? */
- mixer_initialized = 1;
- mixer_model = major_model;
+ mixer_initialized = 1;
+ mixer_model = major_model;
- switch (major_model)
- {
+ switch (major_model) {
case 3:
- mixer_caps = SOUND_CAP_EXCL_INPUT;
+ mixer_caps = SOUND_CAP_EXCL_INPUT;
#ifdef JAZZ16
- if (Jazz16_detected == 2) /* SM Wave */
- {
- supported_devices = 0;
- supported_rec_devices = 0;
- iomap = &sbpro_mix;
- smw_mixer_init ();
- mixer_type = 1;
- }
- else
+ if (Jazz16_detected == 2) { /* SM Wave */
+ supported_devices = 0;
+ supported_rec_devices = 0;
+ iomap = &sbpro_mix;
+ smw_mixer_init();
+ mixer_type = 1;
+ } else
#endif
#ifdef __SGNXPRO__
- if (mixer_type == 2) /* A SGNXPRO was detected */
- {
- supported_devices = SGNXPRO_MIXER_DEVICES;
- supported_rec_devices = SGNXPRO_RECORDING_DEVICES;
- iomap = &sgnxpro_mix;
- }
- else
+ if (mixer_type == 2) { /* A SGNXPRO was detected */
+ supported_devices = SGNXPRO_MIXER_DEVICES;
+ supported_rec_devices = SGNXPRO_RECORDING_DEVICES;
+ iomap = &sgnxpro_mix;
+ } else
#endif
{
- supported_devices = SBPRO_MIXER_DEVICES;
- supported_rec_devices = SBPRO_RECORDING_DEVICES;
- iomap = &sbpro_mix;
- mixer_type = 1;
+ supported_devices = SBPRO_MIXER_DEVICES;
+ supported_rec_devices = SBPRO_RECORDING_DEVICES;
+ iomap = &sbpro_mix;
+ mixer_type = 1;
}
- break;
+ break;
case 4:
- mixer_caps = 0;
- supported_devices = SB16_MIXER_DEVICES;
- supported_rec_devices = SB16_RECORDING_DEVICES;
- iomap = &sb16_mix;
- mixer_type = 3;
- break;
+ mixer_caps = 0;
+ supported_devices = SB16_MIXER_DEVICES;
+ supported_rec_devices = SB16_RECORDING_DEVICES;
+ iomap = &sb16_mix;
+ mixer_type = 3;
+ break;
default:
- printk ("SB Warning: Unsupported mixer type\n");
- return 0;
- }
+ printf("SB Warning: Unsupported mixer type\n");
+ return 0;
+ }
- if (num_mixers < MAX_MIXER_DEV)
- mixer_devs[num_mixers++] = &sb_mixer_operations;
- sb_mixer_reset ();
- return mixer_type;
+ if (num_mixers < MAX_MIXER_DEV)
+ mixer_devs[num_mixers++] = &sb_mixer_operations;
+ sb_mixer_reset();
+ return mixer_type;
}
#endif
diff --git a/sys/i386/isa/sound/sb_mixer.h b/sys/i386/isa/sound/sb_mixer.h
index b712eea..155d6c7 100644
--- a/sys/i386/isa/sound/sb_mixer.h
+++ b/sys/i386/isa/sound/sb_mixer.h
@@ -24,10 +24,9 @@
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
- *
- * Modified:
- * Hunyue Yau Jan 6 1994
- * Added defines for the Sound Galaxy NX Pro mixer.
+ *
+ * Modified: Hunyue Yau Jan 6 1994 Added defines for the Sound Galaxy NX Pro
+ * mixer.
*
*/
@@ -39,10 +38,10 @@
#define SBPRO_MIXER_DEVICES (SOUND_MASK_SYNTH | SOUND_MASK_PCM | SOUND_MASK_LINE | SOUND_MASK_MIC | \
SOUND_MASK_CD | SOUND_MASK_VOLUME)
-/* SG NX Pro has treble and bass settings on the mixer. The 'speaker'
- * channel is the COVOX/DisneySoundSource emulation volume control
- * on the mixer. It does NOT control speaker volume. Should have own
- * mask eventually?
+/*
+ * SG NX Pro has treble and bass settings on the mixer. The 'speaker' channel
+ * is the COVOX/DisneySoundSource emulation volume control on the mixer. It
+ * does NOT control speaker volume. Should have own mask eventually?
*/
#define SGNXPRO_MIXER_DEVICES (SBPRO_MIXER_DEVICES|SOUND_MASK_BASS| \
SOUND_MASK_TREBLE|SOUND_MASK_SPEAKER )
@@ -61,7 +60,7 @@
* NOTE! RECORD_SRC == IN_FILTER
*/
-/*
+/*
* Mixer registers of SB Pro
*/
#define VOC_VOL 0x04
@@ -80,7 +79,7 @@
#define OPSW 0x3c
/*
- * Additional registers on the SG NX Pro
+ * Additional registers on the SG NX Pro
*/
#define COVOX_VOL 0x42
#define TREBLE_LVL 0x44
@@ -104,9 +103,9 @@
#define RIGHT_CHN 1
struct mixer_def {
- unsigned int regno: 8;
- unsigned int bitoffs:4;
- unsigned int nbits:4;
+ unsigned int regno:8;
+ unsigned int bitoffs:4;
+ unsigned int nbits:4;
};
@@ -117,136 +116,136 @@ typedef struct mixer_def mixer_ent;
{{reg_l, bit_l, len_l}, {reg_r, bit_r, len_r}}
#ifdef __SB_MIXER_C__
-static mixer_tab sbpro_mix = {
-MIX_ENT(SOUND_MIXER_VOLUME, 0x22, 7, 4, 0x22, 3, 4),
-MIX_ENT(SOUND_MIXER_BASS, 0x00, 0, 0, 0x00, 0, 0),
-MIX_ENT(SOUND_MIXER_TREBLE, 0x00, 0, 0, 0x00, 0, 0),
-MIX_ENT(SOUND_MIXER_SYNTH, 0x26, 7, 4, 0x26, 3, 4),
-MIX_ENT(SOUND_MIXER_PCM, 0x04, 7, 4, 0x04, 3, 4),
-MIX_ENT(SOUND_MIXER_SPEAKER, 0x00, 0, 0, 0x00, 0, 0),
-MIX_ENT(SOUND_MIXER_LINE, 0x2e, 7, 4, 0x2e, 3, 4),
-MIX_ENT(SOUND_MIXER_MIC, 0x0a, 2, 3, 0x00, 0, 0),
-MIX_ENT(SOUND_MIXER_CD, 0x28, 7, 4, 0x28, 3, 4),
-MIX_ENT(SOUND_MIXER_IMIX, 0x00, 0, 0, 0x00, 0, 0),
-MIX_ENT(SOUND_MIXER_ALTPCM, 0x00, 0, 0, 0x00, 0, 0),
-MIX_ENT(SOUND_MIXER_RECLEV, 0x00, 0, 0, 0x00, 0, 0)
+mixer_tab sbpro_mix = {
+ MIX_ENT(SOUND_MIXER_VOLUME, 0x22, 7, 4, 0x22, 3, 4),
+ MIX_ENT(SOUND_MIXER_BASS, 0x00, 0, 0, 0x00, 0, 0),
+ MIX_ENT(SOUND_MIXER_TREBLE, 0x00, 0, 0, 0x00, 0, 0),
+ MIX_ENT(SOUND_MIXER_SYNTH, 0x26, 7, 4, 0x26, 3, 4),
+ MIX_ENT(SOUND_MIXER_PCM, 0x04, 7, 4, 0x04, 3, 4),
+ MIX_ENT(SOUND_MIXER_SPEAKER, 0x00, 0, 0, 0x00, 0, 0),
+ MIX_ENT(SOUND_MIXER_LINE, 0x2e, 7, 4, 0x2e, 3, 4),
+ MIX_ENT(SOUND_MIXER_MIC, 0x0a, 2, 3, 0x00, 0, 0),
+ MIX_ENT(SOUND_MIXER_CD, 0x28, 7, 4, 0x28, 3, 4),
+ MIX_ENT(SOUND_MIXER_IMIX, 0x00, 0, 0, 0x00, 0, 0),
+ MIX_ENT(SOUND_MIXER_ALTPCM, 0x00, 0, 0, 0x00, 0, 0),
+ MIX_ENT(SOUND_MIXER_RECLEV, 0x00, 0, 0, 0x00, 0, 0)
};
#ifdef __SGNXPRO__
-static mixer_tab sgnxpro_mix = {
-MIX_ENT(SOUND_MIXER_VOLUME, 0x22, 7, 4, 0x22, 3, 4),
-MIX_ENT(SOUND_MIXER_BASS, 0x46, 2, 3, 0x00, 0, 0),
-MIX_ENT(SOUND_MIXER_TREBLE, 0x44, 2, 3, 0x00, 0, 0),
-MIX_ENT(SOUND_MIXER_SYNTH, 0x26, 7, 4, 0x26, 3, 4),
-MIX_ENT(SOUND_MIXER_PCM, 0x04, 7, 4, 0x04, 3, 4),
-MIX_ENT(SOUND_MIXER_SPEAKER, 0x42, 2, 3, 0x00, 0, 0),
-MIX_ENT(SOUND_MIXER_LINE, 0x2e, 7, 4, 0x2e, 3, 4),
-MIX_ENT(SOUND_MIXER_MIC, 0x0a, 2, 3, 0x00, 0, 0),
-MIX_ENT(SOUND_MIXER_CD, 0x28, 7, 4, 0x28, 3, 4),
-MIX_ENT(SOUND_MIXER_IMIX, 0x00, 0, 0, 0x00, 0, 0),
-MIX_ENT(SOUND_MIXER_ALTPCM, 0x00, 0, 0, 0x00, 0, 0),
-MIX_ENT(SOUND_MIXER_RECLEV, 0x00, 0, 0, 0x00, 0, 0),
-MIX_ENT(SOUND_MIXER_IGAIN, 0x00, 0, 0, 0x00, 0, 0),
-MIX_ENT(SOUND_MIXER_OGAIN, 0x00, 0, 0, 0x00, 0, 0)
+mixer_tab sgnxpro_mix = {
+ MIX_ENT(SOUND_MIXER_VOLUME, 0x22, 7, 4, 0x22, 3, 4),
+ MIX_ENT(SOUND_MIXER_BASS, 0x46, 2, 3, 0x00, 0, 0),
+ MIX_ENT(SOUND_MIXER_TREBLE, 0x44, 2, 3, 0x00, 0, 0),
+ MIX_ENT(SOUND_MIXER_SYNTH, 0x26, 7, 4, 0x26, 3, 4),
+ MIX_ENT(SOUND_MIXER_PCM, 0x04, 7, 4, 0x04, 3, 4),
+ MIX_ENT(SOUND_MIXER_SPEAKER, 0x42, 2, 3, 0x00, 0, 0),
+ MIX_ENT(SOUND_MIXER_LINE, 0x2e, 7, 4, 0x2e, 3, 4),
+ MIX_ENT(SOUND_MIXER_MIC, 0x0a, 2, 3, 0x00, 0, 0),
+ MIX_ENT(SOUND_MIXER_CD, 0x28, 7, 4, 0x28, 3, 4),
+ MIX_ENT(SOUND_MIXER_IMIX, 0x00, 0, 0, 0x00, 0, 0),
+ MIX_ENT(SOUND_MIXER_ALTPCM, 0x00, 0, 0, 0x00, 0, 0),
+ MIX_ENT(SOUND_MIXER_RECLEV, 0x00, 0, 0, 0x00, 0, 0),
+ MIX_ENT(SOUND_MIXER_IGAIN, 0x00, 0, 0, 0x00, 0, 0),
+ MIX_ENT(SOUND_MIXER_OGAIN, 0x00, 0, 0, 0x00, 0, 0)
};
#endif
-static mixer_tab sb16_mix = {
-MIX_ENT(SOUND_MIXER_VOLUME, 0x30, 7, 5, 0x31, 7, 5),
-MIX_ENT(SOUND_MIXER_BASS, 0x46, 7, 4, 0x47, 7, 4),
-MIX_ENT(SOUND_MIXER_TREBLE, 0x44, 7, 4, 0x45, 7, 4),
-MIX_ENT(SOUND_MIXER_SYNTH, 0x34, 7, 5, 0x35, 7, 5),
-MIX_ENT(SOUND_MIXER_PCM, 0x32, 7, 5, 0x33, 7, 5),
-MIX_ENT(SOUND_MIXER_SPEAKER, 0x3b, 7, 2, 0x00, 0, 0),
-MIX_ENT(SOUND_MIXER_LINE, 0x38, 7, 5, 0x39, 7, 5),
-MIX_ENT(SOUND_MIXER_MIC, 0x3a, 7, 5, 0x00, 0, 0),
-MIX_ENT(SOUND_MIXER_CD, 0x36, 7, 5, 0x37, 7, 5),
-MIX_ENT(SOUND_MIXER_IMIX, 0x00, 0, 0, 0x00, 0, 0),
-MIX_ENT(SOUND_MIXER_ALTPCM, 0x00, 0, 0, 0x00, 0, 0),
-MIX_ENT(SOUND_MIXER_RECLEV, 0x3f, 7, 2, 0x40, 7, 2), /* Obsolete. Use IGAIN */
-MIX_ENT(SOUND_MIXER_IGAIN, 0x3f, 7, 2, 0x40, 7, 2),
-MIX_ENT(SOUND_MIXER_OGAIN, 0x41, 7, 2, 0x42, 7, 2)
+mixer_tab sb16_mix = {
+ MIX_ENT(SOUND_MIXER_VOLUME, 0x30, 7, 5, 0x31, 7, 5),
+ MIX_ENT(SOUND_MIXER_BASS, 0x46, 7, 4, 0x47, 7, 4),
+ MIX_ENT(SOUND_MIXER_TREBLE, 0x44, 7, 4, 0x45, 7, 4),
+ MIX_ENT(SOUND_MIXER_SYNTH, 0x34, 7, 5, 0x35, 7, 5),
+ MIX_ENT(SOUND_MIXER_PCM, 0x32, 7, 5, 0x33, 7, 5),
+ MIX_ENT(SOUND_MIXER_SPEAKER, 0x3b, 7, 2, 0x00, 0, 0),
+ MIX_ENT(SOUND_MIXER_LINE, 0x38, 7, 5, 0x39, 7, 5),
+ MIX_ENT(SOUND_MIXER_MIC, 0x3a, 7, 5, 0x00, 0, 0),
+ MIX_ENT(SOUND_MIXER_CD, 0x36, 7, 5, 0x37, 7, 5),
+ MIX_ENT(SOUND_MIXER_IMIX, 0x00, 0, 0, 0x00, 0, 0),
+ MIX_ENT(SOUND_MIXER_ALTPCM, 0x00, 0, 0, 0x00, 0, 0),
+ MIX_ENT(SOUND_MIXER_RECLEV, 0x3f, 7, 2, 0x40, 7, 2), /* Obsolete. Use IGAIN */
+ MIX_ENT(SOUND_MIXER_IGAIN, 0x3f, 7, 2, 0x40, 7, 2),
+ MIX_ENT(SOUND_MIXER_OGAIN, 0x41, 7, 2, 0x42, 7, 2)
};
-#ifdef SM_GAMES /* Master volume is lower and PCM & FM volumes
- higher than with SB Pro. This improves the
- sound quality */
+#ifdef SM_GAMES /* Master volume is lower and PCM & FM
+ * volumes higher than with SB Pro. This
+ * improves the sound quality */
static unsigned short levels[SOUND_MIXER_NRDEVICES] =
{
- 0x2020, /* Master Volume */
- 0x4b4b, /* Bass */
- 0x4b4b, /* Treble */
- 0x6464, /* FM */
- 0x6464, /* PCM */
- 0x4b4b, /* PC Speaker */
- 0x4b4b, /* Ext Line */
- 0x0000, /* Mic */
- 0x4b4b, /* CD */
- 0x4b4b, /* Recording monitor */
- 0x4b4b, /* SB PCM */
- 0x4b4b, /* Recording level */
- 0x4b4b, /* Input gain */
- 0x4b4b}; /* Output gain */
-
-#else /* If the user selected just plain SB Pro */
+ 0x2020, /* Master Volume */
+ 0x4b4b, /* Bass */
+ 0x4b4b, /* Treble */
+ 0x6464, /* FM */
+ 0x6464, /* PCM */
+ 0x4b4b, /* PC Speaker */
+ 0x4b4b, /* Ext Line */
+ 0x0000, /* Mic */
+ 0x4b4b, /* CD */
+ 0x4b4b, /* Recording monitor */
+ 0x4b4b, /* SB PCM */
+ 0x4b4b, /* Recording level */
+ 0x4b4b, /* Input gain */
+0x4b4b}; /* Output gain */
+
+#else /* If the user selected just plain SB Pro */
static unsigned short levels[SOUND_MIXER_NRDEVICES] =
{
- 0x5a5a, /* Master Volume */
- 0x4b4b, /* Bass */
- 0x4b4b, /* Treble */
- 0x4b4b, /* FM */
- 0x4b4b, /* PCM */
- 0x4b4b, /* PC Speaker */
- 0x4b4b, /* Ext Line */
- 0x1010, /* Mic */
- 0x4b4b, /* CD */
- 0x4b4b, /* Recording monitor */
- 0x4b4b, /* SB PCM */
- 0x4b4b, /* Recording level */
- 0x4b4b, /* Input gain */
- 0x4b4b}; /* Output gain */
-#endif /* SM_GAMES */
+ 0x5a5a, /* Master Volume */
+ 0x4b4b, /* Bass */
+ 0x4b4b, /* Treble */
+ 0x4b4b, /* FM */
+ 0x4b4b, /* PCM */
+ 0x4b4b, /* PC Speaker */
+ 0x4b4b, /* Ext Line */
+ 0x1010, /* Mic */
+ 0x4b4b, /* CD */
+ 0x4b4b, /* Recording monitor */
+ 0x4b4b, /* SB PCM */
+ 0x4b4b, /* Recording level */
+ 0x4b4b, /* Input gain */
+0x4b4b}; /* Output gain */
+#endif /* SM_GAMES */
static unsigned char sb16_recmasks_L[SOUND_MIXER_NRDEVICES] =
{
- 0x00, /* SOUND_MIXER_VOLUME */
- 0x00, /* SOUND_MIXER_BASS */
- 0x00, /* SOUND_MIXER_TREBLE */
- 0x40, /* SOUND_MIXER_SYNTH */
- 0x00, /* SOUND_MIXER_PCM */
- 0x00, /* SOUND_MIXER_SPEAKER */
- 0x10, /* SOUND_MIXER_LINE */
- 0x01, /* SOUND_MIXER_MIC */
- 0x04, /* SOUND_MIXER_CD */
- 0x00, /* SOUND_MIXER_IMIX */
- 0x00, /* SOUND_MIXER_ALTPCM */
- 0x00, /* SOUND_MIXER_RECLEV */
- 0x00, /* SOUND_MIXER_IGAIN */
- 0x00 /* SOUND_MIXER_OGAIN */
+ 0x00, /* SOUND_MIXER_VOLUME */
+ 0x00, /* SOUND_MIXER_BASS */
+ 0x00, /* SOUND_MIXER_TREBLE */
+ 0x40, /* SOUND_MIXER_SYNTH */
+ 0x00, /* SOUND_MIXER_PCM */
+ 0x00, /* SOUND_MIXER_SPEAKER */
+ 0x10, /* SOUND_MIXER_LINE */
+ 0x01, /* SOUND_MIXER_MIC */
+ 0x04, /* SOUND_MIXER_CD */
+ 0x00, /* SOUND_MIXER_IMIX */
+ 0x00, /* SOUND_MIXER_ALTPCM */
+ 0x00, /* SOUND_MIXER_RECLEV */
+ 0x00, /* SOUND_MIXER_IGAIN */
+ 0x00 /* SOUND_MIXER_OGAIN */
};
static unsigned char sb16_recmasks_R[SOUND_MIXER_NRDEVICES] =
{
- 0x00, /* SOUND_MIXER_VOLUME */
- 0x00, /* SOUND_MIXER_BASS */
- 0x00, /* SOUND_MIXER_TREBLE */
- 0x20, /* SOUND_MIXER_SYNTH */
- 0x00, /* SOUND_MIXER_PCM */
- 0x00, /* SOUND_MIXER_SPEAKER */
- 0x08, /* SOUND_MIXER_LINE */
- 0x01, /* SOUND_MIXER_MIC */
- 0x02, /* SOUND_MIXER_CD */
- 0x00, /* SOUND_MIXER_IMIX */
- 0x00, /* SOUND_MIXER_ALTPCM */
- 0x00, /* SOUND_MIXER_RECLEV */
- 0x00, /* SOUND_MIXER_IGAIN */
- 0x00 /* SOUND_MIXER_OGAIN */
+ 0x00, /* SOUND_MIXER_VOLUME */
+ 0x00, /* SOUND_MIXER_BASS */
+ 0x00, /* SOUND_MIXER_TREBLE */
+ 0x20, /* SOUND_MIXER_SYNTH */
+ 0x00, /* SOUND_MIXER_PCM */
+ 0x00, /* SOUND_MIXER_SPEAKER */
+ 0x08, /* SOUND_MIXER_LINE */
+ 0x01, /* SOUND_MIXER_MIC */
+ 0x02, /* SOUND_MIXER_CD */
+ 0x00, /* SOUND_MIXER_IMIX */
+ 0x00, /* SOUND_MIXER_ALTPCM */
+ 0x00, /* SOUND_MIXER_RECLEV */
+ 0x00, /* SOUND_MIXER_IGAIN */
+ 0x00 /* SOUND_MIXER_OGAIN */
};
/*
- * Recording sources (SB Pro)
+ * Recording sources (SB Pro)
*/
#define SRC_MIC 1 /* Select Microphone recording source */
diff --git a/sys/i386/isa/sound/sbcard.h b/sys/i386/isa/sound/sbcard.h
new file mode 100644
index 0000000..464128c
--- /dev/null
+++ b/sys/i386/isa/sound/sbcard.h
@@ -0,0 +1,54 @@
+/*
+ * file: sbcard.h
+ */
+
+extern int sbc_major, sbc_minor ;
+/*
+ * sound blaster registers
+ */
+
+#define DSP_RESET (sbc_base + 0x6)
+#define DSP_READ (sbc_base + 0xA)
+#define DSP_WRITE (sbc_base + 0xC)
+#define DSP_COMMAND (sbc_base + 0xC)
+#define DSP_STATUS (sbc_base + 0xC)
+#define DSP_DATA_AVAIL (sbc_base + 0xE)
+#define DSP_DATA_AVL16 (sbc_base + 0xF)
+#define MIXER_ADDR (sbc_base + 0x4)
+#define MIXER_DATA (sbc_base + 0x5)
+#define OPL3_LEFT (sbc_base + 0x0)
+#define OPL3_RIGHT (sbc_base + 0x2)
+#define OPL3_BOTH (sbc_base + 0x8)
+
+/*
+ * DSP Commands. There are many, and in many cases they are used explicitly
+ */
+
+#define DSP_CMD_SPKON 0xD1
+#define DSP_CMD_SPKOFF 0xD3
+#define DSP_CMD_DMAON 0xD0 /* ??? the comment says Halt DMA */
+#define DSP_CMD_DMAOFF 0xD4 /* ??? comment says continue dma */
+
+#define DSP_CMD_DMAHALT 0xD0
+#define DSP_CMD_TCONST 0x40 /* set time constant */
+#define DSP_CMD_HSSIZE 0x48 /* high speed dma count */
+#define DSP_CMD_HSDAC 0x91 /* high speed dac */
+#define DSP_CMD_HSADC 0x99 /* high speed adc */
+#define DSP_CMD_DAC8 0x14 /* 8-bit dac (dma count) */
+#define DSP_CMD_ADC8 0x24 /* 8-bit adc (dma count) */
+
+#define DSP_CMD_GETVER 0xE1
+#define DSP_CMD_GETID 0xE7 /* return id bytes */
+
+#if 0 /*** unknown ***/
+
+#endif
+
+#define IMODE_NONE 0
+#define IMODE_OUTPUT PCM_ENABLE_OUTPUT
+#define IMODE_INPUT PCM_ENABLE_INPUT
+#define IMODE_INIT 3
+#define IMODE_MIDI 4
+
+#define NORMAL_MIDI 0
+#define UART_MIDI 1
diff --git a/sys/i386/isa/sound/sequencer.c b/sys/i386/isa/sound/sequencer.c
index bf50bd7..ef86ed7 100644
--- a/sys/i386/isa/sound/sequencer.c
+++ b/sys/i386/isa/sound/sequencer.c
@@ -1,10 +1,10 @@
/*
* sound/sequencer.c
- *
+ *
* The sequencer personality manager.
- *
+ *
* Copyright by Hannu Savolainen 1993
- *
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met: 1. Redistributions of source code must retain the above copyright
@@ -12,7 +12,7 @@
* Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
@@ -24,18 +24,19 @@
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
- *
+ *
*/
#define SEQUENCER_C
#include <i386/isa/sound/sound_config.h>
-#include <i386/isa/sound/midi_ctrl.h>
-extern void seq_drain_midi_queues __P((void));
+#if NSND > 0
+
+#ifdef CONFIG_SEQUENCER
-#ifdef CONFIGURE_SOUNDCARD
+#include <i386/isa/sound/midi_ctrl.h>
-#ifndef EXCLUDE_SEQUENCER
+void seq_drain_midi_queues(void);
static int sequencer_ok = 0;
static struct sound_timer_operations *tmr;
@@ -50,1375 +51,1313 @@ static int max_mididev = 0;
static int max_synthdev = 0;
/*
- * The seq_mode gives the operating mode of the sequencer:
- * 1 = level1 (the default)
- * 2 = level2 (extended capabilites)
+ * The seq_mode gives the operating mode of the sequencer: 1 = level1 (the
+ * default) 2 = level2 (extended capabilites)
*/
#define SEQ_1 1
#define SEQ_2 2
static int seq_mode = SEQ_1;
-DEFINE_WAIT_QUEUE (seq_sleeper, seq_sleep_flag);
-DEFINE_WAIT_QUEUE (midi_sleeper, midi_sleep_flag);
+static int *seq_sleeper = NULL;
+static volatile struct snd_wait seq_sleep_flag = {0};
+static int *midi_sleeper = NULL;
+static volatile struct snd_wait midi_sleep_flag = {0};
-static int midi_opened[MAX_MIDI_DEV] =
-{0};
-static int midi_written[MAX_MIDI_DEV] =
-{0};
+static int midi_opened[MAX_MIDI_DEV] = {0};
+static int midi_written[MAX_MIDI_DEV] = {0};
-static unsigned long prev_input_time = 0;
-static int prev_event_time;
-static unsigned long seq_time = 0;
+u_long prev_input_time = 0;
+int prev_event_time;
+u_long seq_time = 0;
#include <i386/isa/sound/tuning.h>
#define EV_SZ 8
#define IEV_SZ 8
-static unsigned char *queue = NULL;
-static unsigned char *iqueue = NULL;
+static u_char *queue = NULL;
+static u_char *iqueue = NULL;
static volatile int qhead = 0, qtail = 0, qlen = 0;
static volatile int iqhead = 0, iqtail = 0, iqlen = 0;
static volatile int seq_playing = 0;
-static int sequencer_busy = 0;
+static volatile int sequencer_busy = 0;
static int output_treshold;
static int pre_event_timeout;
-static unsigned synth_open_mask;
+static u_int synth_open_mask;
-static int seq_queue (unsigned char *note, char nonblock);
-static void seq_startplay (void);
-static int seq_sync (void);
-static void seq_reset (void);
+static int seq_queue(u_char *note, char nonblock);
+static void seq_startplay(void);
+static int seq_sync(void);
+static void seq_reset(void);
static int pmgr_present[MAX_SYNTH_DEV] =
{0};
+static struct callout_handle sequencertimeout_ch
+ = CALLOUT_HANDLE_INITIALIZER(&sequencertimeout_ch);
#if MAX_SYNTH_DEV > 15
#error Too many synthesizer devices enabled.
#endif
+/*
+ * sound_timer stuff -- originally in soundcard.c
+ *
+ * A negative value means a relative timeout in |count| ticks.
+ * A positive value is used for what ?
+ *
+ * In any case, this is only used in sequencer.c
+ */
+
+static int timer_running = 0;
+
+void
+request_sound_timer(int count)
+{
+ static int current = 0;
+ int tmp = count;
+
+ if (count < 0)
+ sequencertimeout_ch = timeout(sequencer_timer, 0, -count);
+ else {
+
+ if (count < current)
+ current = 0; /* Timer restarted */
+
+ count = count - current;
+ current = tmp;
+ if (!count)
+ count = 1;
+ sequencertimeout_ch = timeout(sequencer_timer, 0, count);
+ }
+ timer_running = 1;
+}
+
+void
+sound_stop_timer(void)
+{
+ if (timer_running)
+ untimeout( sequencer_timer, 0, sequencertimeout_ch);
+ timer_running = 0;
+}
+
int
-sequencer_read (int dev, struct fileinfo *file, snd_rw_buf * buf, int count)
+sequencer_read(int dev, struct fileinfo * file, snd_rw_buf * buf, int count)
{
- int c = count, p = 0;
- int ev_len;
- unsigned long flags;
+ int c = count, p = 0;
+ int ev_len;
+ u_long flags;
- dev = dev >> 4;
+ dev = dev >> 4;
- ev_len = seq_mode == SEQ_1 ? 4 : 8;
+ ev_len = seq_mode == SEQ_1 ? 4 : 8;
- if (dev) /*
- * Patch manager device
- */
- return pmgr_read (dev - 1, file, buf, count);
+ if (dev) /* Patch manager device */
+ return pmgr_read(dev - 1, file, buf, count);
- DISABLE_INTR (flags);
- if (!iqlen)
- {
- if (ISSET_FILE_FLAG (file, O_NONBLOCK))
- {
- RESTORE_INTR (flags);
- return RET_ERROR (EAGAIN);
- }
+ flags = splhigh();
+ if (!iqlen) {
+ int flag, chn;
- DO_SLEEP (midi_sleeper, midi_sleep_flag, pre_event_timeout);
- if (!iqlen)
- {
- RESTORE_INTR (flags);
- return 0;
+ midi_sleeper = &chn;
+ DO_SLEEP(chn, midi_sleep_flag, pre_event_timeout);
+
+ if (!iqlen) {
+ splx(flags);
+ return 0;
}
}
+ while (iqlen && c >= ev_len) {
- while (iqlen && c >= ev_len)
- {
-
- COPY_TO_USER (buf, p, &iqueue[iqhead * IEV_SZ], ev_len);
- p += ev_len;
- c -= ev_len;
+ if (uiomove((char *) &iqueue[iqhead * IEV_SZ], ev_len, buf))
+ printf("sb: Bad copyout()!\n");
+ p += ev_len;
+ c -= ev_len;
- iqhead = (iqhead + 1) % SEQ_MAX_QUEUE;
- iqlen--;
+ iqhead = (iqhead + 1) % SEQ_MAX_QUEUE;
+ iqlen--;
}
- RESTORE_INTR (flags);
+ splx(flags);
- return count - c;
+ return count - c;
}
static void
-sequencer_midi_output (int dev)
+sequencer_midi_output(int dev)
{
- /*
- * Currently NOP
- */
+ /*
+ * Currently NOP
+ */
}
void
-seq_copy_to_input (unsigned char *event, int len)
+seq_copy_to_input(u_char *event, int len)
{
- unsigned long flags;
+ u_long flags;
- /*
+ /*
* Verify that the len is valid for the current mode.
- */
+ */
- if (len != 4 && len != 8)
- return;
- if ((seq_mode == SEQ_1) != (len == 4))
- return;
+ if (len != 4 && len != 8)
+ return;
+ if ((seq_mode == SEQ_1) != (len == 4))
+ return;
- if (iqlen >= (SEQ_MAX_QUEUE - 1))
- return; /* Overflow */
+ if (iqlen >= (SEQ_MAX_QUEUE - 1))
+ return; /* Overflow */
- DISABLE_INTR (flags);
- memcpy (&iqueue[iqtail * IEV_SZ], event, len);
- iqlen++;
- iqtail = (iqtail + 1) % SEQ_MAX_QUEUE;
+ flags = splhigh();
+ bcopy(event, &iqueue[iqtail * IEV_SZ], len);
+ iqlen++;
+ iqtail = (iqtail + 1) % SEQ_MAX_QUEUE;
- if (SOMEONE_WAITING (midi_sleeper, midi_sleep_flag))
- {
- WAKE_UP (midi_sleeper, midi_sleep_flag);
+ if ((midi_sleep_flag.mode & WK_SLEEP)) {
+ midi_sleep_flag.mode = WK_WAKEUP;
+ wakeup(midi_sleeper);
}
- RESTORE_INTR (flags);
-#if defined(__FreeBSD__)
- if (selinfo[0].si_pid)
- selwakeup(&selinfo[0]);
-#endif
+ splx(flags);
}
static void
-sequencer_midi_input (int dev, unsigned char data)
+sequencer_midi_input(int dev, u_char data)
{
- unsigned int tstamp;
- unsigned char event[4];
+ u_int tstamp;
+ u_char event[4];
- if (data == 0xfe) /* Ignore active sensing */
- return;
+ if (data == 0xfe) /* Ignore active sensing */
+ return;
- tstamp = GET_TIME () - seq_time;
- if (tstamp != prev_input_time)
- {
- tstamp = (tstamp << 8) | SEQ_WAIT;
+ tstamp = get_time() - seq_time;
+ if (tstamp != prev_input_time) {
+ tstamp = (tstamp << 8) | SEQ_WAIT;
- seq_copy_to_input ((unsigned char *) &tstamp, 4);
- prev_input_time = tstamp;
+ seq_copy_to_input((u_char *) &tstamp, 4);
+ prev_input_time = tstamp;
}
+ event[0] = SEQ_MIDIPUTC;
+ event[1] = data;
+ event[2] = dev;
+ event[3] = 0;
- event[0] = SEQ_MIDIPUTC;
- event[1] = data;
- event[2] = dev;
- event[3] = 0;
-
- seq_copy_to_input (event, 4);
+ seq_copy_to_input(event, 4);
}
void
-seq_input_event (unsigned char *event, int len)
+seq_input_event(u_char *event, int len)
{
- unsigned long this_time;
+ u_long this_time;
- if (seq_mode == SEQ_2)
- this_time = tmr->get_time (tmr_no);
- else
- this_time = GET_TIME () - seq_time;
+ if (seq_mode == SEQ_2)
+ this_time = tmr->get_time(tmr_no);
+ else
+ this_time = get_time() - seq_time;
- if (this_time != prev_input_time)
- {
- unsigned char tmp_event[8];
+ if (this_time != prev_input_time) {
+ u_char tmp_event[8];
- tmp_event[0] = EV_TIMING;
- tmp_event[1] = TMR_WAIT_ABS;
- tmp_event[2] = 0;
- tmp_event[3] = 0;
- *(unsigned long *) &tmp_event[4] = this_time;
+ tmp_event[0] = EV_TIMING;
+ tmp_event[1] = TMR_WAIT_ABS;
+ tmp_event[2] = 0;
+ tmp_event[3] = 0;
+ *(u_long *) &tmp_event[4] = this_time;
- seq_copy_to_input (tmp_event, 8);
- prev_input_time = this_time;
+ seq_copy_to_input(tmp_event, 8);
+ prev_input_time = this_time;
}
-
- seq_copy_to_input (event, len);
+ seq_copy_to_input(event, len);
}
int
-sequencer_write (int dev, struct fileinfo *file, snd_rw_buf * buf, int count)
+sequencer_write(int dev, struct fileinfo * file, snd_rw_buf * buf, int count)
{
- unsigned char event[EV_SZ], ev_code;
- int p = 0, c, ev_size;
- int err;
- int mode = file->mode & O_ACCMODE;
+ u_char event[EV_SZ], ev_code;
+ int p = 0, c, ev_size;
+ int err;
+ int mode = file->mode & O_ACCMODE;
- dev = dev >> 4;
+ dev = dev >> 4;
- DEB (printk ("sequencer_write(dev=%d, count=%d)\n", dev, count));
+ DEB(printf("sequencer_write(dev=%d, count=%d)\n", dev, count));
- if (mode == OPEN_READ)
- return RET_ERROR (EIO);
+ if (mode == OPEN_READ)
+ return -(EIO);
- if (dev) /*
- * Patch manager device
- */
- return pmgr_write (dev - 1, file, buf, count);
+ if (dev)
+ return pmgr_write(dev - 1, file, buf, count);
- c = count;
+ c = count;
- while (c >= 4)
- {
- COPY_FROM_USER (event, buf, p, 4);
- ev_code = event[0];
+ while (c >= 4) {
- if (ev_code == SEQ_FULLSIZE)
- {
- int err;
+ if (uiomove((char *) event, 4, buf))
+ printf("sb: Bad copyin()!\n");
+ ev_code = event[0];
- dev = *(unsigned short *) &event[2];
- if (dev < 0 || dev >= max_synthdev)
- return RET_ERROR (ENXIO);
+ if (ev_code == SEQ_FULLSIZE) {
+ int err;
- if (!(synth_open_mask & (1 << dev)))
- return RET_ERROR (ENXIO);
+ dev = *(u_short *) &event[2];
+ if (dev < 0 || dev >= max_synthdev)
+ return -(ENXIO);
- err = synth_devs[dev]->load_patch (dev, *(short *) &event[0], buf, p + 4, c, 0);
- if (err < 0)
- return err;
+ if (!(synth_open_mask & (1 << dev)))
+ return -(ENXIO);
- return err;
- }
+ err = synth_devs[dev]->load_patch(dev,
+ *(short *) &event[0], buf, p + 4, c, 0);
+ if (err < 0)
+ return err;
- if (ev_code >= 128)
- {
- if (seq_mode == SEQ_2 && ev_code == SEQ_EXTENDED)
- {
- printk ("Sequencer: Invalid level 2 event %x\n", ev_code);
- return RET_ERROR (EINVAL);
+ return err;
+ }
+ if (ev_code >= 128) {
+ if (seq_mode == SEQ_2 && ev_code == SEQ_EXTENDED) {
+ printf("Sequencer: Invalid level 2 event %x\n", ev_code);
+ return -(EINVAL);
}
+ ev_size = 8;
- ev_size = 8;
-
- if (c < ev_size)
- {
- if (!seq_playing)
- seq_startplay ();
- return count - c;
+ if (c < ev_size) {
+ if (!seq_playing)
+ seq_startplay();
+ return count - c;
}
-
- COPY_FROM_USER (&event[4], buf, p + 4, 4);
-
- }
- else
- {
- if (seq_mode == SEQ_2)
- {
- printk ("Sequencer: 4 byte event in level 2 mode\n");
- return RET_ERROR (EINVAL);
+ if (uiomove((char *) &event[4], 4, buf))
+ printf("sb: Bad copyin()!\n");
+ } else {
+ if (seq_mode == SEQ_2) {
+ printf("Sequencer: 4 byte event in level 2 mode\n");
+ return -(EINVAL);
}
- ev_size = 4;
+ ev_size = 4;
}
- if (event[0] == SEQ_MIDIPUTC)
- {
+ if (event[0] == SEQ_MIDIPUTC) {
- if (!midi_opened[event[2]])
- {
- int mode;
- int dev = event[2];
+ if (!midi_opened[event[2]]) {
+ int mode;
+ int dev = event[2];
- if (dev >= max_mididev)
- {
- printk ("Sequencer Error: Nonexistent MIDI device %d\n", dev);
- return RET_ERROR (ENXIO);
+ if (dev >= max_mididev) {
+ printf("Sequencer Error: Nonexistent MIDI device %d\n",dev);
+ return -(ENXIO);
}
+ mode = file->mode & O_ACCMODE;
- mode = file->mode & O_ACCMODE;
-
- if ((err = midi_devs[dev]->open (dev, mode,
- sequencer_midi_input, sequencer_midi_output)) < 0)
- {
- seq_reset ();
- printk ("Sequencer Error: Unable to open Midi #%d\n", dev);
- return err;
+ if ((err = midi_devs[dev]->open(dev, mode,
+ sequencer_midi_input, sequencer_midi_output)) < 0) {
+ seq_reset();
+ printf("Sequencer Error: Unable to open Midi #%d\n", dev);
+ return err;
}
-
- midi_opened[dev] = 1;
+ midi_opened[dev] = 1;
}
-
}
+ if (!seq_queue(event, 0)) {
+ int processed = count - c;
- if (!seq_queue (event, ISSET_FILE_FLAG (file, O_NONBLOCK)))
- {
- int processed = count - c;
+ if (!seq_playing)
+ seq_startplay();
- if (!seq_playing)
- seq_startplay ();
-
- if (!processed && ISSET_FILE_FLAG (file, O_NONBLOCK))
- return RET_ERROR (EAGAIN);
- else
- return processed;
+ if (!processed && 0)
+ return -(EAGAIN);
+ else
+ return processed;
}
-
- p += ev_size;
- c -= ev_size;
+ p += ev_size;
+ c -= ev_size;
}
- if (!seq_playing)
- seq_startplay ();
+ if (!seq_playing)
+ seq_startplay();
- return count; /* This will "eat" chunks shorter than 4 bytes (if written
- * alone) Should we really do that ?
- */
+ return count; /* This will "eat" chunks shorter than 4 bytes
+ * (if written alone) Should we really do that ?
+ */
}
static int
-seq_queue (unsigned char *note, char nonblock)
+seq_queue(u_char *note, char nonblock)
{
- /*
- * Test if there is space in the queue
- */
+ /*
+ * Test if there is space in the queue
+ */
- if (qlen >= SEQ_MAX_QUEUE)
- if (!seq_playing)
- seq_startplay (); /*
- * Give chance to drain the queue
- */
+ if (qlen >= SEQ_MAX_QUEUE)
+ if (!seq_playing)
+ seq_startplay(); /* Give chance to drain the queue */
- if (!nonblock && qlen >= SEQ_MAX_QUEUE && !SOMEONE_WAITING (seq_sleeper, seq_sleep_flag))
- {
- /*
- * Sleep until there is enough space on the queue
- */
- DO_SLEEP (seq_sleeper, seq_sleep_flag, 0);
- }
+ if (!nonblock && qlen >= SEQ_MAX_QUEUE &&
+ !(seq_sleep_flag.mode & WK_SLEEP)) {
+ /*
+ * Sleep until there is enough space on the queue
+ */
+
+ int chn;
+
+
+ seq_sleeper = &chn;
+ DO_SLEEP(chn, seq_sleep_flag, 0);
- if (qlen >= SEQ_MAX_QUEUE)
- {
- return 0; /*
- * To be sure
- */
}
- memcpy (&queue[qtail * EV_SZ], note, EV_SZ);
+ if (qlen >= SEQ_MAX_QUEUE)
+ return 0; /* To be sure */
+ bcopy(note, &queue[qtail * EV_SZ], EV_SZ);
- qtail = (qtail + 1) % SEQ_MAX_QUEUE;
- qlen++;
+ qtail = (qtail + 1) % SEQ_MAX_QUEUE;
+ qlen++;
- return 1;
+ return 1;
}
static int
-extended_event (unsigned char *q)
+extended_event(u_char *q)
{
- int dev = q[2];
+ int dev = q[2];
- if (dev < 0 || dev >= max_synthdev)
- return RET_ERROR (ENXIO);
+ if (dev < 0 || dev >= max_synthdev)
+ return -(ENXIO);
- if (!(synth_open_mask & (1 << dev)))
- return RET_ERROR (ENXIO);
+ if (!(synth_open_mask & (1 << dev)))
+ return -(ENXIO);
- switch (q[1])
- {
+ switch (q[1]) {
case SEQ_NOTEOFF:
- synth_devs[dev]->kill_note (dev, q[3], q[4], q[5]);
- break;
+ synth_devs[dev]->kill_note(dev, q[3], q[4], q[5]);
+ break;
case SEQ_NOTEON:
- if (q[4] > 127 && q[4] != 255)
- return 0;
+ if (q[4] > 127 && q[4] != 255)
+ return 0;
- synth_devs[dev]->start_note (dev, q[3], q[4], q[5]);
- break;
+ synth_devs[dev]->start_note(dev, q[3], q[4], q[5]);
+ break;
case SEQ_PGMCHANGE:
- synth_devs[dev]->set_instr (dev, q[3], q[4]);
- break;
+ synth_devs[dev]->set_instr(dev, q[3], q[4]);
+ break;
case SEQ_AFTERTOUCH:
- synth_devs[dev]->aftertouch (dev, q[3], q[4]);
- break;
+ synth_devs[dev]->aftertouch(dev, q[3], q[4]);
+ break;
case SEQ_BALANCE:
- synth_devs[dev]->panning (dev, q[3], (char) q[4]);
- break;
+ synth_devs[dev]->panning(dev, q[3], (char) q[4]);
+ break;
case SEQ_CONTROLLER:
- synth_devs[dev]->controller (dev, q[3], q[4], *(short *) &q[5]);
- break;
+ synth_devs[dev]->controller(dev, q[3], q[4], *(short *) &q[5]);
+ break;
case SEQ_VOLMODE:
- if (synth_devs[dev]->volume_method != NULL)
- synth_devs[dev]->volume_method (dev, q[3]);
- break;
+ if (synth_devs[dev]->volume_method != NULL)
+ synth_devs[dev]->volume_method(dev, q[3]);
+ break;
default:
- return RET_ERROR (EINVAL);
+ return -(EINVAL);
}
- return 0;
+ return 0;
}
static int
-find_voice (int dev, int chn, int note)
+find_voice(int dev, int chn, int note)
{
- unsigned short key;
- int i;
+ u_short key;
+ int i;
- key = (chn << 8) | (note + 1);
+ key = (chn << 8) | (note + 1);
- for (i = 0; i < synth_devs[dev]->alloc.max_voice; i++)
- if (synth_devs[dev]->alloc.map[i] == key)
- return i;
+ for (i = 0; i < synth_devs[dev]->alloc.max_voice; i++)
+ if (synth_devs[dev]->alloc.map[i] == key)
+ return i;
- return -1;
+ return -1;
}
static int
-alloc_voice (int dev, int chn, int note)
+alloc_voice(int dev, int chn, int note)
{
- unsigned short key;
- int voice;
+ u_short key;
+ int voice;
- key = (chn << 8) | (note + 1);
+ key = (chn << 8) | (note + 1);
- voice = synth_devs[dev]->alloc_voice (dev, chn, note,
- &synth_devs[dev]->alloc);
- synth_devs[dev]->alloc.map[voice] = key;
- synth_devs[dev]->alloc.alloc_times[voice] =
- synth_devs[dev]->alloc.timestamp++;
- return voice;
+ voice = synth_devs[dev]->alloc_voice(dev, chn, note,
+ &synth_devs[dev]->alloc);
+ synth_devs[dev]->alloc.map[voice] = key;
+ synth_devs[dev]->alloc.alloc_times[voice] =
+ synth_devs[dev]->alloc.timestamp++;
+ return voice;
}
static void
-seq_chn_voice_event (unsigned char *event)
+seq_chn_voice_event(u_char *event)
{
- unsigned char dev = event[1];
- unsigned char cmd = event[2];
- unsigned char chn = event[3];
- unsigned char note = event[4];
- unsigned char parm = event[5];
- int voice = -1;
-
- if ((int) dev > max_synthdev)
- return;
- if (!(synth_open_mask & (1 << dev)))
- return;
- if (!synth_devs[dev])
- return;
-
- if (seq_mode == SEQ_2)
- {
- if (synth_devs[dev]->alloc_voice)
- voice = find_voice (dev, chn, note);
+ u_char dev = event[1];
+ u_char cmd = event[2];
+ u_char chn = event[3];
+ u_char note = event[4];
+ u_char parm = event[5];
+ int voice = -1;
+
+ if ((int) dev > max_synthdev)
+ return;
+ if (!(synth_open_mask & (1 << dev)))
+ return;
+ if (!synth_devs[dev])
+ return;
- if (cmd == MIDI_NOTEON && parm == 0)
- {
- cmd = MIDI_NOTEOFF;
- parm = 64;
+ if (seq_mode == SEQ_2) {
+ if (synth_devs[dev]->alloc_voice)
+ voice = find_voice(dev, chn, note);
+
+ if (cmd == MIDI_NOTEON && parm == 0) {
+ cmd = MIDI_NOTEOFF;
+ parm = 64;
}
}
-
- switch (cmd)
- {
+ switch (cmd) {
case MIDI_NOTEON:
- if (note > 127 && note != 255) /* Not a seq2 feature */
- return;
+ if (note > 127 && note != 255) /* Not a seq2 feature */
+ return;
- if (voice == -1 && seq_mode == SEQ_2 && synth_devs[dev]->alloc_voice)
- { /* Internal synthesizer (FM, GUS, etc) */
- voice = alloc_voice (dev, chn, note);
+ if (voice == -1 && seq_mode == SEQ_2 && synth_devs[dev]->alloc_voice) {
+ /* Internal synthesizer (FM, GUS, etc) */
+ voice = alloc_voice(dev, chn, note);
}
+ if (voice == -1)
+ voice = chn;
- if (voice == -1)
- voice = chn;
-
- if (seq_mode == SEQ_2 && dev < num_synths)
- {
- /*
- * The MIDI channel 10 is a percussive channel. Use the note
- * number to select the proper patch (128 to 255) to play.
- */
+ if (seq_mode == SEQ_2 && (int) dev < num_synths) {
+ /*
+ * The MIDI channel 10 is a percussive channel. Use
+ * the note number to select the proper patch (128 to
+ * 255) to play.
+ */
- if (chn == 9)
- {
- synth_devs[dev]->set_instr (dev, voice, 128 + note);
- note = 60; /* Middle C */
+ if (chn == 9) {
+ synth_devs[dev]->set_instr(dev, voice, 128 + note);
+ note = 60; /* Middle C */
}
}
-
- if (seq_mode == SEQ_2)
- {
- synth_devs[dev]->setup_voice (dev, voice, chn);
- }
-
- synth_devs[dev]->start_note (dev, voice, note, parm);
- break;
+ if (seq_mode == SEQ_2)
+ synth_devs[dev]->setup_voice(dev, voice, chn);
+ synth_devs[dev]->start_note(dev, voice, note, parm);
+ break;
case MIDI_NOTEOFF:
- if (voice == -1)
- voice = chn;
- synth_devs[dev]->kill_note (dev, voice, note, parm);
- break;
+ if (voice == -1)
+ voice = chn;
+ synth_devs[dev]->kill_note(dev, voice, note, parm);
+ break;
case MIDI_KEY_PRESSURE:
- if (voice == -1)
- voice = chn;
- synth_devs[dev]->aftertouch (dev, voice, parm);
- break;
+ if (voice == -1)
+ voice = chn;
+ synth_devs[dev]->aftertouch(dev, voice, parm);
+ break;
default:;
}
}
static void
-seq_chn_common_event (unsigned char *event)
+seq_chn_common_event(u_char *event)
{
- unsigned char dev = event[1];
- unsigned char cmd = event[2];
- unsigned char chn = event[3];
- unsigned char p1 = event[4];
-
- /* unsigned char p2 = event[5]; */
- unsigned short w14 = *(short *) &event[6];
-
- if ((int) dev > max_synthdev)
- return;
- if (!(synth_open_mask & (1 << dev)))
- return;
- if (!synth_devs[dev])
- return;
-
- switch (cmd)
- {
+ u_char dev = event[1];
+ u_char cmd = event[2];
+ u_char chn = event[3];
+ u_char p1 = event[4];
+
+ /* u_char p2 = event[5]; */
+ u_short w14 = *(short *) &event[6];
+
+ if ((int) dev > max_synthdev)
+ return;
+ if (!(synth_open_mask & (1 << dev)))
+ return;
+ if (!synth_devs[dev])
+ return;
+
+ switch (cmd) {
case MIDI_PGM_CHANGE:
- if (seq_mode == SEQ_2)
- {
- synth_devs[dev]->chn_info[chn].pgm_num = p1;
- if (dev >= num_synths)
- synth_devs[dev]->set_instr (dev, chn, p1);
- }
- else
- synth_devs[dev]->set_instr (dev, chn, p1);
+ if (seq_mode == SEQ_2) {
+ synth_devs[dev]->chn_info[chn].pgm_num = p1;
+ if ((int) dev >= num_synths)
+ synth_devs[dev]->set_instr(dev, chn, p1);
+ } else
+ synth_devs[dev]->set_instr(dev, chn, p1);
- break;
+ break;
case MIDI_CTL_CHANGE:
+ if (seq_mode == SEQ_2) {
+ if (chn > 15 || p1 > 127)
+ break;
- if (seq_mode == SEQ_2)
- {
- if (chn > 15 || p1 > 127)
- break;
-
- synth_devs[dev]->chn_info[chn].controllers[p1] = w14 & 0x7f;
-
- if (dev < num_synths)
- {
- int val = w14 & 0x7f;
- int i, key;
-
- if (p1 < 64) /* Combine MSB and LSB */
- {
- val = ((synth_devs[dev]->
- chn_info[chn].controllers[p1 & ~32] & 0x7f) << 7)
- | (synth_devs[dev]->
- chn_info[chn].controllers[p1 | 32] & 0x7f);
- p1 &= ~32;
- }
+ synth_devs[dev]->chn_info[chn].controllers[p1] = w14 & 0x7f;
- /* Handle all playing notes on this channel */
+ if (p1 < 32) /* Setting MSB should clear LSB to 0 */
+ synth_devs[dev]->chn_info[chn].controllers[p1 + 32] = 0;
- key = (chn << 8);
+ if ((int) dev < num_synths) {
+ int val = w14 & 0x7f;
+ int i, key;
- for (i = 0; i < synth_devs[dev]->alloc.max_voice; i++)
- if ((synth_devs[dev]->alloc.map[i] & 0xff00) == key)
- synth_devs[dev]->controller (dev, i, p1, val);
- }
- else
- synth_devs[dev]->controller (dev, chn, p1, w14);
- }
- else /* Mode 1 */
- synth_devs[dev]->controller (dev, chn, p1, w14);
- break;
+ if (p1 < 64) { /* Combine MSB and LSB */
+ val = ((synth_devs[dev]->
+ chn_info[chn].controllers[p1 & ~32] & 0x7f) << 7)
+ | (synth_devs[dev]->
+ chn_info[chn].controllers[p1 | 32] & 0x7f);
+ p1 &= ~32;
+ }
+ /* Handle all playing notes on this channel */
+
+ key = ((int) chn << 8);
+
+ for (i = 0; i < synth_devs[dev]->alloc.max_voice; i++)
+ if ((synth_devs[dev]->alloc.map[i] & 0xff00) == key)
+ synth_devs[dev]->controller(dev, i, p1, val);
+ } else
+ synth_devs[dev]->controller(dev, chn, p1, w14);
+ } else /* Mode 1 */
+ synth_devs[dev]->controller(dev, chn, p1, w14);
+ break;
case MIDI_PITCH_BEND:
- if (seq_mode == SEQ_2)
- {
- synth_devs[dev]->chn_info[chn].bender_value = w14;
+ if (seq_mode == SEQ_2) {
+ synth_devs[dev]->chn_info[chn].bender_value = w14;
- if (dev < num_synths)
- { /* Handle all playing notes on this channel */
- int i, key;
+ if ((int) dev < num_synths) { /* Handle all playing
+ * notes on this channel */
+ int i, key;
- key = (chn << 8);
+ key = (chn << 8);
- for (i = 0; i < synth_devs[dev]->alloc.max_voice; i++)
- if ((synth_devs[dev]->alloc.map[i] & 0xff00) == key)
- synth_devs[dev]->bender (dev, i, w14);
- }
- else
- synth_devs[dev]->bender (dev, chn, w14);
- }
- else /* MODE 1 */
- synth_devs[dev]->bender (dev, chn, w14);
- break;
+ for (i = 0; i < synth_devs[dev]->alloc.max_voice; i++)
+ if ((synth_devs[dev]->alloc.map[i] & 0xff00) == key)
+ synth_devs[dev]->bender(dev, i, w14);
+ } else
+ synth_devs[dev]->bender(dev, chn, w14);
+ } else /* MODE 1 */
+ synth_devs[dev]->bender(dev, chn, w14);
+ break;
default:;
}
}
static int
-seq_timing_event (unsigned char *event)
+seq_timing_event(u_char *event)
{
- unsigned char cmd = event[1];
- unsigned int parm = *(int *) &event[4];
+ u_char cmd = event[1];
+ u_int parm = *(int *) &event[4];
- if (seq_mode == SEQ_2)
- {
- int ret;
+ if (seq_mode == SEQ_2) {
+ int ret;
- if ((ret = tmr->event (tmr_no, event)) == TIMER_ARMED)
- {
- if ((SEQ_MAX_QUEUE - qlen) >= output_treshold)
- {
- unsigned long flags;
-
- DISABLE_INTR (flags);
- if (SOMEONE_WAITING (seq_sleeper, seq_sleep_flag))
- {
- WAKE_UP (seq_sleeper, seq_sleep_flag);
+ if ((ret = tmr->event(tmr_no, event)) == TIMER_ARMED) {
+ if ((SEQ_MAX_QUEUE - qlen) >= output_treshold) {
+ u_long flags;
+
+ flags = splhigh();
+ if ((seq_sleep_flag.mode & WK_SLEEP)) {
+ seq_sleep_flag.mode = WK_WAKEUP;
+ wakeup(seq_sleeper);
}
- RESTORE_INTR (flags);
-#if defined(__FreeBSD__)
- /* must issue a wakeup for anyone waiting (select) XXX */
-#endif
+ splx(flags);
}
}
- return ret;
+ return ret;
}
-
- switch (cmd)
- {
+ switch (cmd) {
case TMR_WAIT_REL:
- parm += prev_event_time;
+ parm += prev_event_time;
- /*
- * NOTE! No break here. Execution of TMR_WAIT_REL continues in the
- * next case (TMR_WAIT_ABS)
- */
+ /*
+ * NOTE! No break here. Execution of TMR_WAIT_REL continues
+ * in the next case (TMR_WAIT_ABS)
+ */
case TMR_WAIT_ABS:
- if (parm > 0)
- {
- long time;
+ if (parm > 0) {
+ long time;
- seq_playing = 1;
- time = parm;
- prev_event_time = time;
+ seq_playing = 1;
+ time = parm;
+ prev_event_time = time;
- request_sound_timer (time);
+ request_sound_timer(time);
- if ((SEQ_MAX_QUEUE - qlen) >= output_treshold)
- {
- unsigned long flags;
+ if ((SEQ_MAX_QUEUE - qlen) >= output_treshold) {
+ u_long flags;
- DISABLE_INTR (flags);
- if (SOMEONE_WAITING (seq_sleeper, seq_sleep_flag))
- {
- WAKE_UP (seq_sleeper, seq_sleep_flag);
+ flags = splhigh();
+ if ((seq_sleep_flag.mode & WK_SLEEP)) {
+ seq_sleep_flag.mode = WK_WAKEUP;
+ wakeup(seq_sleeper);
}
- RESTORE_INTR (flags);
-#if defined(__FreeBSD__)
- /* must issue a wakeup for select XXX */
-#endif
+ splx(flags);
}
-
- return TIMER_ARMED;
+ return TIMER_ARMED;
}
- break;
+ break;
case TMR_START:
- seq_time = GET_TIME ();
- prev_input_time = 0;
- prev_event_time = 0;
- break;
+ seq_time = get_time();
+ prev_input_time = 0;
+ prev_event_time = 0;
+ break;
case TMR_STOP:
- break;
+ break;
case TMR_CONTINUE:
- break;
+ break;
case TMR_TEMPO:
- break;
+ break;
case TMR_ECHO:
- if (seq_mode == SEQ_2)
- seq_copy_to_input (event, 8);
- else
- {
- parm = (parm << 8 | SEQ_ECHO);
- seq_copy_to_input ((unsigned char *) &parm, 4);
+ if (seq_mode == SEQ_2)
+ seq_copy_to_input(event, 8);
+ else {
+ parm = (parm << 8 | SEQ_ECHO);
+ seq_copy_to_input((u_char *) &parm, 4);
}
- break;
+ break;
default:;
}
- return TIMER_NOT_ARMED;
+ return TIMER_NOT_ARMED;
+}
+
+static void
+seq_local_event(u_char *event)
+{
+ u_char cmd = event[1];
+ u_int parm = *((u_int *) &event[4]);
+
+ switch (cmd) {
+ case LOCL_STARTAUDIO:
+#ifdef CONFIG_AUDIO
+ DMAbuf_start_devices(parm);
+#endif
+ break;
+
+ default:;
+ }
}
static void
-seq_local_event (unsigned char *event)
+seq_sysex_message(u_char *event)
{
- /* unsigned char cmd = event[1]; */
+ int dev = event[1];
+ int i, l = 0;
+ u_char *buf = &event[2];
+
+ if ((int) dev > max_synthdev)
+ return;
+ if (!(synth_open_mask & (1 << dev)))
+ return;
+ if (!synth_devs[dev])
+ return;
+ if (!synth_devs[dev]->send_sysex)
+ return;
+
+ l = 0;
+ for (i = 0; i < 6 && buf[i] != 0xff; i++)
+ l = i + 1;
- printk ("seq_local_event() called. WHY????????\n");
+ if (l > 0)
+ synth_devs[dev]->send_sysex(dev, buf, l);
}
static int
-play_event (unsigned char *q)
+play_event(u_char *q)
{
- /*
- * NOTE! This routine returns
- * 0 = normal event played.
- * 1 = Timer armed. Suspend playback until timer callback.
- * 2 = MIDI output buffer full. Restore queue and suspend until timer
- */
- unsigned long *delay;
-
- switch (q[0])
- {
+ /*
+ * NOTE! This routine returns 0 = normal event played. 1 = Timer
+ * armed. Suspend playback until timer callback. 2 = MIDI output
+ * buffer full. Restore queue and suspend until timer
+ */
+ u_long *delay;
+
+ switch (q[0]) {
case SEQ_NOTEOFF:
- if (synth_open_mask & (1 << 0))
- if (synth_devs[0])
- synth_devs[0]->kill_note (0, q[1], 255, q[3]);
- break;
+ if (synth_open_mask & (1 << 0))
+ if (synth_devs[0])
+ synth_devs[0]->kill_note(0, q[1], 255, q[3]);
+ break;
case SEQ_NOTEON:
- if (q[4] < 128 || q[4] == 255)
- if (synth_open_mask & (1 << 0))
- if (synth_devs[0])
- synth_devs[0]->start_note (0, q[1], q[2], q[3]);
- break;
+ if (q[4] < 128 || q[4] == 255)
+ if (synth_open_mask & (1 << 0))
+ if (synth_devs[0])
+ synth_devs[0]->start_note(0, q[1], q[2], q[3]);
+ break;
case SEQ_WAIT:
- delay = (unsigned long *) q; /*
- * Bytes 1 to 3 are containing the *
- * delay in GET_TIME()
- */
- *delay = (*delay >> 8) & 0xffffff;
+ delay = (u_long *) q; /* Bytes 1 to 3 are
+ * containing the * delay in
+ * get_time() */
+ *delay = (*delay >> 8) & 0xffffff;
- if (*delay > 0)
- {
- long time;
+ if (*delay > 0) {
+ long time;
- seq_playing = 1;
- time = *delay;
- prev_event_time = time;
+ seq_playing = 1;
+ time = *delay;
+ prev_event_time = time;
- request_sound_timer (time);
+ request_sound_timer(time);
- if ((SEQ_MAX_QUEUE - qlen) >= output_treshold)
- {
- unsigned long flags;
+ if ((SEQ_MAX_QUEUE - qlen) >= output_treshold) {
+ u_long flags;
- DISABLE_INTR (flags);
- if (SOMEONE_WAITING (seq_sleeper, seq_sleep_flag))
- {
- WAKE_UP (seq_sleeper, seq_sleep_flag);
+ flags = splhigh();
+ if ((seq_sleep_flag.mode & WK_SLEEP)) {
+ seq_sleep_flag.mode = WK_WAKEUP;
+ wakeup(seq_sleeper);
}
- RESTORE_INTR (flags);
-#if defined(__FreeBSD__)
- /* must issue a wakeup for selects XXX */
-#endif
+ splx(flags);
}
- /*
- * The timer is now active and will reinvoke this function
- * after the timer expires. Return to the caller now.
- */
- return 1;
+ /*
+ * The timer is now active and will reinvoke this
+ * function after the timer expires. Return to the
+ * caller now.
+ */
+ return 1;
}
- break;
+ break;
case SEQ_PGMCHANGE:
- if (synth_open_mask & (1 << 0))
- if (synth_devs[0])
- synth_devs[0]->set_instr (0, q[1], q[2]);
- break;
-
- case SEQ_SYNCTIMER: /*
- * Reset timer
- */
- seq_time = GET_TIME ();
- prev_input_time = 0;
- prev_event_time = 0;
- break;
-
- case SEQ_MIDIPUTC: /*
- * Put a midi character
- */
- if (midi_opened[q[2]])
- {
- int dev;
-
- dev = q[2];
-
- if (!midi_devs[dev]->putc (dev, q[1]))
- {
- /*
- * Output FIFO is full. Wait one timer cycle and try again.
- */
-
- seq_playing = 1;
- request_sound_timer (-1);
- return 2;
- }
- else
- midi_written[dev] = 1;
+ if (synth_open_mask & (1 << 0))
+ if (synth_devs[0])
+ synth_devs[0]->set_instr(0, q[1], q[2]);
+ break;
+
+ case SEQ_SYNCTIMER: /* Reset timer */
+ seq_time = get_time();
+ prev_input_time = 0;
+ prev_event_time = 0;
+ break;
+
+ case SEQ_MIDIPUTC: /* Put a midi character */
+ if (midi_opened[q[2]]) {
+ int dev;
+
+ dev = q[2];
+
+ if (!midi_devs[dev]->putc(dev, q[1])) {
+ /*
+ * Output FIFO is full. Wait one timer cycle and try again.
+ */
+
+ seq_playing = 1;
+ request_sound_timer(-1);
+ return 2;
+ } else
+ midi_written[dev] = 1;
}
- break;
+ break;
case SEQ_ECHO:
- seq_copy_to_input (q, 4); /*
- * Echo back to the process
- */
- break;
+ seq_copy_to_input(q, 4); /* Echo back to the process */
+ break;
case SEQ_PRIVATE:
- if ((int) q[1] < max_synthdev)
- synth_devs[q[1]]->hw_control (q[1], q);
- break;
+ if ((int) q[1] < max_synthdev)
+ synth_devs[q[1]]->hw_control(q[1], q);
+ break;
case SEQ_EXTENDED:
- extended_event (q);
- break;
+ extended_event(q);
+ break;
case EV_CHN_VOICE:
- seq_chn_voice_event (q);
- break;
+ seq_chn_voice_event(q);
+ break;
case EV_CHN_COMMON:
- seq_chn_common_event (q);
- break;
+ seq_chn_common_event(q);
+ break;
case EV_TIMING:
- if (seq_timing_event (q) == TIMER_ARMED)
- {
- return 1;
+ if (seq_timing_event(q) == TIMER_ARMED) {
+ return 1;
}
- break;
+ break;
case EV_SEQ_LOCAL:
- seq_local_event (q);
- break;
+ seq_local_event(q);
+ break;
+
+ case EV_SYSEX:
+ seq_sysex_message(q);
+ break;
default:;
}
- return 0;
+ return 0;
}
static void
-seq_startplay (void)
+seq_startplay(void)
{
- unsigned long flags;
- int this_one, action;
+ u_long flags;
+ int this_one, action;
- while (qlen > 0)
- {
+ while (qlen > 0) {
- DISABLE_INTR (flags);
- qhead = ((this_one = qhead) + 1) % SEQ_MAX_QUEUE;
- qlen--;
- RESTORE_INTR (flags);
+ flags = splhigh();
+ qhead = ((this_one = qhead) + 1) % SEQ_MAX_QUEUE;
+ qlen--;
+ splx(flags);
- seq_playing = 1;
+ seq_playing = 1;
- if ((action = play_event (&queue[this_one * EV_SZ])))
- { /* Suspend playback. Next timer routine invokes this routine again */
- if (action == 2)
- {
- qlen++;
- qhead = this_one;
+ if ((action = play_event(&queue[this_one * EV_SZ]))) {
+ /*
+ * Suspend playback. Next timer routine invokes this routine again
+ */
+ if (action == 2) {
+ qlen++;
+ qhead = this_one;
}
- return;
+ return;
}
-
}
- seq_playing = 0;
+ seq_playing = 0;
- if ((SEQ_MAX_QUEUE - qlen) >= output_treshold)
- {
- unsigned long flags;
+ if ((SEQ_MAX_QUEUE - qlen) >= output_treshold) {
+ u_long flags;
- DISABLE_INTR (flags);
- if (SOMEONE_WAITING (seq_sleeper, seq_sleep_flag))
- {
- WAKE_UP (seq_sleeper, seq_sleep_flag);
+ flags = splhigh();
+ if ((seq_sleep_flag.mode & WK_SLEEP)) {
+ seq_sleep_flag.mode = WK_WAKEUP;
+ wakeup(seq_sleeper);
}
- RESTORE_INTR (flags);
-#if defined(__FreeBSD__)
- /* must issue a wakeup for selects XXX */
-#endif
+ splx(flags);
}
}
static void
-reset_controllers (int dev, unsigned char *controller, int update_dev)
+reset_controllers(int dev, u_char *controller, int update_dev)
{
- int i;
+ int i;
- for (i = 0; i < 128; i++)
- controller[i] = ctrl_def_values[i];
+ for (i = 0; i < 128; i++)
+ controller[i] = ctrl_def_values[i];
}
static void
-setup_mode2 (void)
+setup_mode2(void)
{
- int dev;
+ int dev;
- max_synthdev = num_synths;
+ max_synthdev = num_synths;
- for (dev = 0; dev < num_midis; dev++)
- if (midi_devs[dev]->converter != NULL)
- {
- synth_devs[max_synthdev++] =
- midi_devs[dev]->converter;
- }
+ for (dev = 0; dev < num_midis; dev++)
+ if (midi_devs[dev]->converter != NULL)
+ synth_devs[max_synthdev++] = midi_devs[dev]->converter;
+ for (dev = 0; dev < max_synthdev; dev++) {
+ int chn;
- for (dev = 0; dev < max_synthdev; dev++)
- {
- int chn;
-
- for (chn = 0; chn < 16; chn++)
- {
- synth_devs[dev]->chn_info[chn].pgm_num = 0;
- reset_controllers (dev,
- synth_devs[dev]->chn_info[chn].controllers,
- 0);
- synth_devs[dev]->chn_info[chn].bender_value = (1 << 7); /* Neutral */
+ for (chn = 0; chn < 16; chn++) {
+ synth_devs[dev]->chn_info[chn].pgm_num = 0;
+ reset_controllers(dev,
+ synth_devs[dev]->chn_info[chn].controllers, 0);
+ synth_devs[dev]->chn_info[chn].bender_value = (1<<7); /* Neutral */
}
}
- max_mididev = 0;
- seq_mode = SEQ_2;
+ max_mididev = 0;
+ seq_mode = SEQ_2;
}
int
-sequencer_open (int dev, struct fileinfo *file)
+sequencer_open(int dev, struct fileinfo * file)
{
- int retval, mode, i;
- int level, tmp;
+ int retval, mode, i;
+ int level, tmp;
+ u_long flags;
- level = ((dev & 0x0f) == SND_DEV_SEQ2) ? 2 : 1;
+ level = ((dev & 0x0f) == SND_DEV_SEQ2) ? 2 : 1;
- dev = dev >> 4;
- mode = file->mode & O_ACCMODE;
+ dev = dev >> 4;
+ mode = file->mode & O_ACCMODE;
- DEB (printk ("sequencer_open(dev=%d)\n", dev));
+ DEB(printf("sequencer_open(dev=%d)\n", dev));
- if (!sequencer_ok)
- {
- printk ("Soundcard: Sequencer not initialized\n");
- return RET_ERROR (ENXIO);
+ if (!sequencer_ok) {
+ printf("Soundcard: Sequencer not initialized\n");
+ return -(ENXIO);
}
+ if (dev) { /* Patch manager device */
+ int err;
- if (dev) /*
- * Patch manager device
- */
- {
- int err;
+ printf("Patch manager interface is currently broken. Sorry\n");
+ return -(ENXIO);
- dev--;
+ dev--;
- if (dev >= MAX_SYNTH_DEV)
- return RET_ERROR (ENXIO);
- if (pmgr_present[dev])
- return RET_ERROR (EBUSY);
- if ((err = pmgr_open (dev)) < 0)
- return err; /*
- * Failed
- */
+ if (dev >= MAX_SYNTH_DEV)
+ return -(ENXIO);
+ if (pmgr_present[dev])
+ return -(EBUSY);
+ if ((err = pmgr_open(dev)) < 0)
+ return err;
- pmgr_present[dev] = 1;
- return err;
+ pmgr_present[dev] = 1;
+ return err;
}
-
- if (sequencer_busy)
- {
- printk ("Sequencer busy\n");
- return RET_ERROR (EBUSY);
+ flags = splhigh();
+ if (sequencer_busy) {
+ printf("Sequencer busy\n");
+ splx(flags);
+ return -(EBUSY);
}
+ sequencer_busy = 1;
+ splx(flags);
- max_mididev = num_midis;
- max_synthdev = num_synths;
- pre_event_timeout = 0;
- seq_mode = SEQ_1;
+ max_mididev = num_midis;
+ max_synthdev = num_synths;
+ pre_event_timeout = 0;
+ seq_mode = SEQ_1;
- if (pending_timer != -1)
- {
- tmr_no = pending_timer;
- pending_timer = -1;
+ if (pending_timer != -1) {
+ tmr_no = pending_timer;
+ pending_timer = -1;
}
-
- if (tmr_no == -1) /* Not selected yet */
- {
- int i, best;
-
- best = -1;
- for (i = 0; i < num_sound_timers; i++)
- if (sound_timer_devs[i]->priority > best)
- {
- tmr_no = i;
- best = sound_timer_devs[i]->priority;
- }
-
- if (tmr_no == -1) /* Should not be */
- tmr_no = 0;
+ if (tmr_no == -1) { /* Not selected yet */
+ int i, best;
+
+ best = -1;
+ for (i = 0; i < num_sound_timers; i++)
+ if (sound_timer_devs[i]->priority > best) {
+ tmr_no = i;
+ best = sound_timer_devs[i]->priority;
+ }
+ if (tmr_no == -1) /* Should not be */
+ tmr_no = 0;
}
+ tmr = sound_timer_devs[tmr_no];
- tmr = sound_timer_devs[tmr_no];
-
- if (level == 2)
- {
- if (tmr == NULL)
- {
- printk ("sequencer: No timer for level 2\n");
- return RET_ERROR (ENXIO);
+ if (level == 2) {
+ if (tmr == NULL) {
+ printf("sequencer: No timer for level 2\n");
+ sequencer_busy = 0;
+ return -(ENXIO);
}
- setup_mode2 ();
+ setup_mode2();
}
+ if (seq_mode == SEQ_1 && (mode == OPEN_READ || mode == OPEN_READWRITE))
+ if (!max_mididev) {
+ printf("Sequencer: No Midi devices. Input not possible\n");
+ sequencer_busy = 0;
+ return -(ENXIO);
+ }
+ if (!max_synthdev && !max_mididev)
+ return -(ENXIO);
- if (seq_mode == SEQ_1 && (mode == OPEN_READ || mode == OPEN_READWRITE))
- if (!max_mididev)
- {
- printk ("Sequencer: No Midi devices. Input not possible\n");
- return RET_ERROR (ENXIO);
- }
+ synth_open_mask = 0;
- if (!max_synthdev && !max_mididev)
- return RET_ERROR (ENXIO);
+ for (i = 0; i < max_mididev; i++) {
+ midi_opened[i] = 0;
+ midi_written[i] = 0;
+ }
- synth_open_mask = 0;
+ /*
+ * if (mode == OPEN_WRITE || mode == OPEN_READWRITE)
+ */
+ for (i = 0; i < max_synthdev; i++) /* Open synth devices */
+ if ((tmp = synth_devs[i]->open(i, mode)) < 0) {
+ printf("Sequencer: Warning! Cannot open synth device #%d (%d)\n",
+ i, tmp);
+ if (synth_devs[i]->midi_dev)
+ printf("(Maps to MIDI dev #%d)\n", synth_devs[i]->midi_dev);
+ } else {
+ synth_open_mask |= (1 << i);
+ if (synth_devs[i]->midi_dev) /* Is a midi interface */
+ midi_opened[synth_devs[i]->midi_dev] = 1;
+ }
- for (i = 0; i < max_mididev; i++)
- {
- midi_opened[i] = 0;
- midi_written[i] = 0;
- }
+ seq_time = get_time();
+ prev_input_time = 0;
+ prev_event_time = 0;
- /*
- * if (mode == OPEN_WRITE || mode == OPEN_READWRITE)
- */
- for (i = 0; i < max_synthdev; i++) /*
- * Open synth devices
- */
- if ((tmp = synth_devs[i]->open (i, mode)) < 0)
- {
- printk ("Sequencer: Warning! Cannot open synth device #%d (%d)\n", i, tmp);
- if (synth_devs[i]->midi_dev)
- printk ("(Maps to MIDI dev #%d)\n", synth_devs[i]->midi_dev);
- }
- else
- {
- synth_open_mask |= (1 << i);
- if (synth_devs[i]->midi_dev) /*
- * Is a midi interface
- */
- midi_opened[synth_devs[i]->midi_dev] = 1;
- }
-
- seq_time = GET_TIME ();
- prev_input_time = 0;
- prev_event_time = 0;
-
- if (seq_mode == SEQ_1 && (mode == OPEN_READ || mode == OPEN_READWRITE))
- { /*
- * Initialize midi input devices
- */
- for (i = 0; i < max_mididev; i++)
- if (!midi_opened[i])
- {
- if ((retval = midi_devs[i]->open (i, mode,
+ if (seq_mode == SEQ_1 && (mode == OPEN_READ || mode == OPEN_READWRITE)) {
+ /* Initialize midi input devices */
+ for (i = 0; i < max_mididev; i++)
+ if (!midi_opened[i]) {
+ if ((retval = midi_devs[i]->open(i, mode,
sequencer_midi_input, sequencer_midi_output)) >= 0)
- midi_opened[i] = 1;
- }
+ midi_opened[i] = 1;
+ }
}
-
- if (seq_mode == SEQ_2)
- {
- tmr->open (tmr_no, seq_mode);
+ if (seq_mode == SEQ_2) {
+ tmr->open(tmr_no, seq_mode);
}
+ seq_sleep_flag.aborting = 0;
+ seq_sleep_flag.mode = WK_NONE;
+ midi_sleep_flag.aborting = 0;
+ midi_sleep_flag.mode = WK_NONE;
+ output_treshold = SEQ_MAX_QUEUE / 2;
- sequencer_busy = 1;
- RESET_WAIT_QUEUE (seq_sleeper, seq_sleep_flag);
- RESET_WAIT_QUEUE (midi_sleeper, midi_sleep_flag);
- output_treshold = SEQ_MAX_QUEUE / 2;
-
- for (i = 0; i < num_synths; i++)
- if (pmgr_present[i])
- pmgr_inform (i, PM_E_OPENED, 0, 0, 0, 0);
+ for (i = 0; i < num_synths; i++)
+ if (pmgr_present[i])
+ pmgr_inform(i, PM_E_OPENED, 0, 0, 0, 0);
- return 0;
+ return 0;
}
void
-seq_drain_midi_queues (void)
+seq_drain_midi_queues(void)
{
- int i, n;
+ int i, n;
- /*
- * Give the Midi drivers time to drain their output queues
- */
+ /*
+ * Give the Midi drivers time to drain their output queues
+ */
- n = 1;
+ n = 1;
+
+ while (!(seq_sleep_flag.aborting) && n) {
+ n = 0;
+
+ for (i = 0; i < max_mididev; i++)
+ if (midi_opened[i] && midi_written[i])
+ if (midi_devs[i]->buffer_status != NULL)
+ if (midi_devs[i]->buffer_status(i))
+ n++;
+
+ /*
+ * Let's have a delay
+ */
+ if (n) {
+ int chn;
+
+ seq_sleeper = &chn;
+ DO_SLEEP(chn, seq_sleep_flag, hz / 10);
- while (!PROCESS_ABORTING (seq_sleeper, seq_sleep_flag) && n)
- {
- n = 0;
-
- for (i = 0; i < max_mididev; i++)
- if (midi_opened[i] && midi_written[i])
- if (midi_devs[i]->buffer_status != NULL)
- if (midi_devs[i]->buffer_status (i))
- n++;
-
- /*
- * Let's have a delay
- */
- if (n)
- {
- DO_SLEEP (seq_sleeper, seq_sleep_flag, HZ / 10);
}
}
}
void
-sequencer_release (int dev, struct fileinfo *file)
+sequencer_release(int dev, struct fileinfo * file)
{
- int i;
- int mode = file->mode & O_ACCMODE;
+ int i;
+ int mode = file->mode & O_ACCMODE;
- dev = dev >> 4;
+ dev = dev >> 4;
- DEB (printk ("sequencer_release(dev=%d)\n", dev));
+ DEB(printf("sequencer_release(dev=%d)\n", dev));
- if (dev) /*
- * Patch manager device
- */
- {
- dev--;
- pmgr_release (dev);
- pmgr_present[dev] = 0;
- return;
+ if (dev) { /* Patch manager device */
+ dev--;
+ pmgr_release(dev);
+ pmgr_present[dev] = 0;
+ return;
}
+ /*
+ * Wait until the queue is empty (if we don't have nonblock)
+ */
- /*
- * * Wait until the queue is empty (if we don't have nonblock)
- */
-
- if (mode != OPEN_READ && !ISSET_FILE_FLAG (file, O_NONBLOCK))
- while (!PROCESS_ABORTING (seq_sleeper, seq_sleep_flag) && qlen)
- {
- seq_sync ();
- }
-
- if (mode != OPEN_READ)
- seq_drain_midi_queues (); /*
- * Ensure the output queues are empty
- */
- seq_reset ();
- if (mode != OPEN_READ)
- seq_drain_midi_queues (); /*
- * Flush the all notes off messages
- */
-
- for (i = 0; i < max_synthdev; i++)
- if (synth_open_mask & (1 << i)) /*
- * Actually opened
- */
- if (synth_devs[i])
- {
- synth_devs[i]->close (i);
-
- if (synth_devs[i]->midi_dev)
- midi_opened[synth_devs[i]->midi_dev] = 0;
+ if (mode != OPEN_READ && !0)
+ while (!(seq_sleep_flag.aborting) && qlen) {
+ seq_sync();
}
- for (i = 0; i < num_synths; i++)
- if (pmgr_present[i])
- pmgr_inform (i, PM_E_CLOSED, 0, 0, 0, 0);
+ if (mode != OPEN_READ)
+ seq_drain_midi_queues(); /* Ensure the output queues are empty */
+ seq_reset();
+ if (mode != OPEN_READ)
+ seq_drain_midi_queues(); /* Flush the all notes off messages */
- for (i = 0; i < max_mididev; i++)
- if (midi_opened[i])
- midi_devs[i]->close (i);
+ for (i = 0; i < max_synthdev; i++)
+ if (synth_open_mask & (1 << i)) /* Actually opened */
+ if (synth_devs[i]) {
+ synth_devs[i]->close(i);
- if (seq_mode == SEQ_2)
- tmr->close (tmr_no);
+ if (synth_devs[i]->midi_dev)
+ midi_opened[synth_devs[i]->midi_dev] = 0;
+ }
+ for (i = 0; i < num_synths; i++)
+ if (pmgr_present[i])
+ pmgr_inform(i, PM_E_CLOSED, 0, 0, 0, 0);
+
+ for (i = 0; i < max_mididev; i++)
+ if (midi_opened[i])
+ midi_devs[i]->close(i);
+
+ if (seq_mode == SEQ_2)
+ tmr->close(tmr_no);
- sequencer_busy = 0;
+ sequencer_busy = 0;
}
static int
-seq_sync (void)
+seq_sync(void)
{
- unsigned long flags;
+ u_long flags;
- if (qlen && !seq_playing && !PROCESS_ABORTING (seq_sleeper, seq_sleep_flag))
- seq_startplay ();
+ if (qlen && !seq_playing && !(seq_sleep_flag.aborting))
+ seq_startplay();
+
+ flags = splhigh();
+ if (qlen && !(seq_sleep_flag.mode & WK_SLEEP)) {
+ int chn;
+
+ seq_sleeper = &chn;
+ DO_SLEEP(chn, seq_sleep_flag, 0);
- DISABLE_INTR (flags);
- if (qlen && !SOMEONE_WAITING (seq_sleeper, seq_sleep_flag))
- {
- DO_SLEEP (seq_sleeper, seq_sleep_flag, 0);
}
- RESTORE_INTR (flags);
+ splx(flags);
- return qlen;
+ return qlen;
}
static void
-midi_outc (int dev, unsigned char data)
+midi_outc(int dev, u_char data)
{
- /*
- * NOTE! Calls sleep(). Don't call this from interrupt.
- */
+ /*
+ * NOTE! Calls sleep(). Don't call this from interrupt.
+ */
- int n;
- unsigned long flags;
+ int n;
+ u_long flags;
- /*
- * This routine sends one byte to the Midi channel.
- * If the output Fifo is full, it waits until there
- * is space in the queue
- */
+ /*
+ * This routine sends one byte to the Midi channel. If the output
+ * Fifo is full, it waits until there is space in the queue
+ */
- n = 3 * HZ; /* Timeout */
+ n = 3 * hz; /* Timeout */
- DISABLE_INTR (flags);
- while (n && !midi_devs[dev]->putc (dev, data))
- {
- DO_SLEEP (seq_sleeper, seq_sleep_flag, 4);
- n--;
+ flags = splhigh();
+ while (n && !midi_devs[dev]->putc(dev, data)) {
+ int chn;
+ seq_sleeper = &chn;
+ DO_SLEEP(chn, seq_sleep_flag, 4);
+
+ n--;
}
- RESTORE_INTR (flags);
+ splx(flags);
}
static void
-seq_reset (void)
+seq_reset(void)
{
- /*
- * NOTE! Calls sleep(). Don't call this from interrupt.
- */
-
- int i;
- int chn;
- unsigned long flags;
-
- sound_stop_timer ();
- seq_time = GET_TIME ();
- prev_input_time = 0;
- prev_event_time = 0;
+ /*
+ * NOTE! Calls sleep(). Don't call this from interrupt.
+ */
- qlen = qhead = qtail = 0;
- iqlen = iqhead = iqtail = 0;
+ int i;
+ int chn;
+ u_long flags;
- for (i = 0; i < max_synthdev; i++)
- if (synth_open_mask & (1 << i))
- if (synth_devs[i])
- synth_devs[i]->reset (i);
+ sound_stop_timer();
+ seq_time = get_time();
+ prev_input_time = 0;
+ prev_event_time = 0;
- if (seq_mode == SEQ_2)
- {
+ qlen = qhead = qtail = 0;
+ iqlen = iqhead = iqtail = 0;
- for (chn = 0; chn < 16; chn++)
- for (i = 0; i < max_synthdev; i++)
- if (synth_open_mask & (1 << i))
+ for (i = 0; i < max_synthdev; i++)
+ if (synth_open_mask & (1 << i))
if (synth_devs[i])
- {
- synth_devs[i]->controller (i, chn, 123, 0); /* All notes off */
- synth_devs[i]->controller (i, chn, 121, 0); /* Reset all ctl */
- synth_devs[i]->bender (i, chn, 1 << 13); /* Bender off */
- }
-
- }
- else
- /* seq_mode == SEQ_1 */
- {
- for (i = 0; i < max_mididev; i++)
- if (midi_written[i]) /*
- * Midi used. Some notes may still be playing
- */
- {
- /*
- * Sending just a ACTIVE SENSING message should be enough to stop all
- * playing notes. Since there are devices not recognizing the
- * active sensing, we have to send some all notes off messages also.
- */
- midi_outc (i, 0xfe);
+ synth_devs[i]->reset(i);
+
+ if (seq_mode == SEQ_2) {
+ for (chn = 0; chn < 16; chn++)
+ for (i = 0; i < max_synthdev; i++)
+ if ( (synth_open_mask & (1 << i)) && (synth_devs[i]) ) {
+ synth_devs[i]->controller(i, chn,123,0);/* All notes off */
+ synth_devs[i]->controller(i, chn,121,0);/* Reset all ctl */
+ synth_devs[i]->bender(i, chn, 1 << 13); /* Bender off */
+ }
- for (chn = 0; chn < 16; chn++)
- {
- midi_outc (i,
- (unsigned char) (0xb0 + (chn & 0x0f))); /* control change */
- midi_outc (i, 0x7b); /* All notes off */
- midi_outc (i, 0); /* Dummy parameter */
- }
+ } else { /* seq_mode == SEQ_1 */
+ for (i = 0; i < max_mididev; i++)
+ if (midi_written[i]) {
+ /* Midi used. Some notes may still be playing */
+ /*
+ * Sending just a ACTIVE SENSING message
+ * should be enough to stop all playing
+ * notes. Since there are devices not
+ * recognizing the active sensing, we have to
+ * send some all notes off messages also.
+ */
+ midi_outc(i, 0xfe);
+
+ for (chn = 0; chn < 16; chn++) {
+ midi_outc(i, (u_char) (0xb0 + (chn & 0x0f))); /* control change */
+ midi_outc(i, 0x7b); /* All notes off */
+ midi_outc(i, 0); /* Dummy parameter */
+ }
- midi_devs[i]->close (i);
+ midi_devs[i]->close(i);
- midi_written[i] = 0;
- midi_opened[i] = 0;
- }
+ midi_written[i] = 0;
+ midi_opened[i] = 0;
+ }
}
- seq_playing = 0;
+ seq_playing = 0;
- DISABLE_INTR (flags);
- if (SOMEONE_WAITING (seq_sleeper, seq_sleep_flag))
- {
- /* printk ("Sequencer Warning: Unexpected sleeping process - Waking up\n"); */
- WAKE_UP (seq_sleeper, seq_sleep_flag);
+ flags = splhigh();
+ if ((seq_sleep_flag.mode & WK_SLEEP)) {
+ seq_sleep_flag.mode = WK_WAKEUP;
+ wakeup(seq_sleeper);
}
- RESTORE_INTR (flags);
+ splx(flags);
}
static void
-seq_panic (void)
+seq_panic(void)
{
- /*
- * This routine is called by the application in case the user
- * wants to reset the system to the default state.
- */
+ /*
+ * This routine is called by the application in case the user wants
+ * to reset the system to the default state.
+ */
- seq_reset ();
+ seq_reset();
- /*
+ /*
* Since some of the devices don't recognize the active sensing and
* all notes off messages, we have to shut all notes manually.
- *
- * TO BE IMPLEMENTED LATER
- */
+ *
+ * TO BE IMPLEMENTED LATER
+ */
- /*
+ /*
* Also return the controllers to their default states
- */
+ */
}
int
-sequencer_ioctl (int dev, struct fileinfo *file,
- unsigned int cmd, unsigned int arg)
+sequencer_ioctl(int dev, struct fileinfo * file,
+ u_int cmd, ioctl_arg arg)
{
- int midi_dev, orig_dev;
- int mode = file->mode & O_ACCMODE;
+ int midi_dev, orig_dev;
+ int mode = file->mode & O_ACCMODE;
- orig_dev = dev = dev >> 4;
+ orig_dev = dev = dev >> 4;
- switch (cmd)
- {
+ switch (cmd) {
case SNDCTL_TMR_TIMEBASE:
case SNDCTL_TMR_TEMPO:
case SNDCTL_TMR_START:
@@ -1426,542 +1365,423 @@ sequencer_ioctl (int dev, struct fileinfo *file,
case SNDCTL_TMR_CONTINUE:
case SNDCTL_TMR_METRONOME:
case SNDCTL_TMR_SOURCE:
- if (dev) /* Patch manager */
- return RET_ERROR (EIO);
+ if (dev) /* Patch manager */
+ return -(EIO);
- if (seq_mode != SEQ_2)
- return RET_ERROR (EINVAL);
- return tmr->ioctl (tmr_no, cmd, arg);
- break;
+ if (seq_mode != SEQ_2)
+ return -(EINVAL);
+ return tmr->ioctl(tmr_no, cmd, arg);
+ break;
case SNDCTL_TMR_SELECT:
- if (dev) /* Patch manager */
- return RET_ERROR (EIO);
+ if (dev) /* Patch manager */
+ return -(EIO);
- if (seq_mode != SEQ_2)
- return RET_ERROR (EINVAL);
- pending_timer = IOCTL_IN (arg);
+ if (seq_mode != SEQ_2)
+ return -(EINVAL);
+ pending_timer = (*(int *) arg);
- if (pending_timer < 0 || pending_timer >= num_sound_timers)
- {
- pending_timer = -1;
- return RET_ERROR (EINVAL);
+ if (pending_timer < 0 || pending_timer >= num_sound_timers) {
+ pending_timer = -1;
+ return -(EINVAL);
}
-
- return IOCTL_OUT (arg, pending_timer);
- break;
+ return *(int *) arg = pending_timer;
+ break;
case SNDCTL_SEQ_PANIC:
- seq_panic ();
- break;
+ seq_panic();
+ break;
case SNDCTL_SEQ_SYNC:
- if (dev) /*
- * Patch manager
- */
- return RET_ERROR (EIO);
-
- if (mode == OPEN_READ)
- return 0;
- while (qlen && !PROCESS_ABORTING (seq_sleeper, seq_sleep_flag))
- seq_sync ();
- if (qlen)
- return RET_ERROR (EINTR);
- else
- return 0;
- break;
+ if (dev) /* Patch manager */
+ return -(EIO);
+
+ if (mode == OPEN_READ)
+ return 0;
+ while (qlen && !(seq_sleep_flag.aborting))
+ seq_sync();
+ if (qlen)
+ return -(EINTR);
+ else
+ return 0;
+ break;
case SNDCTL_SEQ_RESET:
- if (dev) /*
- * Patch manager
- */
- return RET_ERROR (EIO);
+ if (dev) /* Patch manager */
+ return -(EIO);
- seq_reset ();
- return 0;
- break;
+ seq_reset();
+ return 0;
+ break;
case SNDCTL_SEQ_TESTMIDI:
- if (dev) /*
- * Patch manager
- */
- return RET_ERROR (EIO);
+ if (dev) /* Patch manager */
+ return -(EIO);
- midi_dev = IOCTL_IN (arg);
- if (midi_dev >= max_mididev)
- return RET_ERROR (ENXIO);
+ midi_dev = (*(int *) arg);
+ if (midi_dev >= max_mididev)
+ return -(ENXIO);
- if (!midi_opened[midi_dev])
- {
- int err, mode;
+ if (!midi_opened[midi_dev]) {
+ int err, mode;
- mode = file->mode & O_ACCMODE;
- if ((err = midi_devs[midi_dev]->open (midi_dev, mode,
- sequencer_midi_input,
- sequencer_midi_output)) < 0)
- return err;
+ mode = file->mode & O_ACCMODE;
+ if ((err = midi_devs[midi_dev]->open(midi_dev, mode,
+ sequencer_midi_input, sequencer_midi_output)) < 0)
+ return err;
}
+ midi_opened[midi_dev] = 1;
- midi_opened[midi_dev] = 1;
-
- return 0;
- break;
+ return 0;
+ break;
case SNDCTL_SEQ_GETINCOUNT:
- if (dev) /*
- * Patch manager
- */
- return RET_ERROR (EIO);
+ if (dev) /* Patch manager */
+ return -(EIO);
- if (mode == OPEN_WRITE)
- return 0;
- return IOCTL_OUT (arg, iqlen);
- break;
+ if (mode == OPEN_WRITE)
+ return 0;
+ return *(int *) arg = iqlen;
+ break;
case SNDCTL_SEQ_GETOUTCOUNT:
- if (mode == OPEN_READ)
- return 0;
- return IOCTL_OUT (arg, SEQ_MAX_QUEUE - qlen);
- break;
+ if (mode == OPEN_READ)
+ return 0;
+ return *(int *) arg = SEQ_MAX_QUEUE - qlen;
+ break;
case SNDCTL_SEQ_CTRLRATE:
- if (dev) /* Patch manager */
- return RET_ERROR (EIO);
+ if (dev) /* Patch manager */
+ return -(EIO);
- /*
- * If *arg == 0, just return the current rate
- */
- if (seq_mode == SEQ_2)
- return tmr->ioctl (tmr_no, cmd, arg);
+ /*
+ * If *arg == 0, just return the current rate
+ */
+ if (seq_mode == SEQ_2)
+ return tmr->ioctl(tmr_no, cmd, arg);
- if (IOCTL_IN (arg) != 0)
- return RET_ERROR (EINVAL);
+ if ((*(int *) arg) != 0)
+ return -(EINVAL);
- return IOCTL_OUT (arg, HZ);
- break;
+ return *(int *) arg = hz;
+ break;
case SNDCTL_SEQ_RESETSAMPLES:
- dev = IOCTL_IN (arg);
- if (dev < 0 || dev >= num_synths)
- return RET_ERROR (ENXIO);
-
- if (!(synth_open_mask & (1 << dev)) && !orig_dev)
- return RET_ERROR (EBUSY);
+ {
+ int err;
- if (!orig_dev && pmgr_present[dev])
- pmgr_inform (dev, PM_E_PATCH_RESET, 0, 0, 0, 0);
+ dev = (*(int *) arg);
+ if (dev < 0 || dev >= num_synths)
+ return -(ENXIO);
+ if (!(synth_open_mask & (1 << dev)) && !orig_dev)
+ return -(EBUSY);
+ if (!orig_dev && pmgr_present[dev])
+ pmgr_inform(dev, PM_E_PATCH_RESET, 0, 0, 0, 0);
- return synth_devs[dev]->ioctl (dev, cmd, arg);
- break;
+ err = synth_devs[dev]->ioctl(dev, cmd, arg);
+ return err;
+ }
+ break;
case SNDCTL_SEQ_NRSYNTHS:
- return IOCTL_OUT (arg, max_synthdev);
- break;
+ return *(int *) arg = max_synthdev;
+ break;
case SNDCTL_SEQ_NRMIDIS:
- return IOCTL_OUT (arg, max_mididev);
- break;
+ return *(int *) arg = max_mididev;
+ break;
case SNDCTL_SYNTH_MEMAVL:
- {
- int dev = IOCTL_IN (arg);
+ {
+ int dev = (*(int *) arg);
- if (dev < 0 || dev >= num_synths)
- return RET_ERROR (ENXIO);
+ if (dev < 0 || dev >= num_synths)
+ return -(ENXIO);
- if (!(synth_open_mask & (1 << dev)) && !orig_dev)
- return RET_ERROR (EBUSY);
+ if (!(synth_open_mask & (1 << dev)) && !orig_dev)
+ return -(EBUSY);
- return IOCTL_OUT (arg, synth_devs[dev]->ioctl (dev, cmd, arg));
- }
- break;
+ return *(int *) arg = synth_devs[dev]->ioctl(dev, cmd, arg);
+ }
+ break;
case SNDCTL_FM_4OP_ENABLE:
- {
- int dev = IOCTL_IN (arg);
+ {
+ int dev = (*(int *) arg);
- if (dev < 0 || dev >= num_synths)
- return RET_ERROR (ENXIO);
+ if (dev < 0 || dev >= num_synths)
+ return -(ENXIO);
- if (!(synth_open_mask & (1 << dev)))
- return RET_ERROR (ENXIO);
+ if (!(synth_open_mask & (1 << dev)))
+ return -(ENXIO);
- synth_devs[dev]->ioctl (dev, cmd, arg);
- return 0;
- }
- break;
+ synth_devs[dev]->ioctl(dev, cmd, arg);
+ return 0;
+ }
+ break;
case SNDCTL_SYNTH_INFO:
- {
- struct synth_info inf;
- int dev;
+ {
+ struct synth_info inf;
+ int dev;
- IOCTL_FROM_USER ((char *) &inf, (char *) arg, 0, sizeof (inf));
- dev = inf.device;
+ bcopy(&(((char *) arg)[0]), (char *) &inf, sizeof(inf));
+ dev = inf.device;
- if (dev < 0 || dev >= max_synthdev)
- return RET_ERROR (ENXIO);
+ if (dev < 0 || dev >= max_synthdev)
+ return -(ENXIO);
- if (!(synth_open_mask & (1 << dev)) && !orig_dev)
- return RET_ERROR (EBUSY);
+ if (!(synth_open_mask & (1 << dev)) && !orig_dev)
+ return -(EBUSY);
- return synth_devs[dev]->ioctl (dev, cmd, arg);
- }
- break;
+ return synth_devs[dev]->ioctl(dev, cmd, arg);
+ }
+ break;
case SNDCTL_SEQ_OUTOFBAND:
- {
- struct seq_event_rec event;
- unsigned long flags;
+ {
+ struct seq_event_rec event;
+ u_long flags;
- IOCTL_FROM_USER ((char *) &event, (char *) arg, 0, sizeof (event));
+ bcopy(&(((char *) arg)[0]), (char *) &event, sizeof(event));
- DISABLE_INTR (flags);
- play_event (event.arr);
- RESTORE_INTR (flags);
+ flags = splhigh();
+ play_event(event.arr);
+ splx(flags);
- return 0;
- }
- break;
+ return 0;
+ }
+ break;
case SNDCTL_MIDI_INFO:
- {
- struct midi_info inf;
- int dev;
+ {
+ struct midi_info inf;
+ int dev;
- IOCTL_FROM_USER ((char *) &inf, (char *) arg, 0, sizeof (inf));
- dev = inf.device;
+ bcopy(&(((char *) arg)[0]), (char *) &inf, sizeof(inf));
+ dev = inf.device;
- if (dev < 0 || dev >= max_mididev)
- return RET_ERROR (ENXIO);
+ if (dev < 0 || dev >= max_mididev)
+ return -(ENXIO);
- IOCTL_TO_USER ((char *) arg, 0, (char *) &(midi_devs[dev]->info), sizeof (inf));
- return 0;
- }
- break;
+ bcopy((char *) &(midi_devs[dev]->info), &(((char *) arg)[0]), sizeof(inf));
+ return 0;
+ }
+ break;
case SNDCTL_PMGR_IFACE:
- {
- struct patmgr_info *inf;
- int dev, err;
-
- if ((inf = (struct patmgr_info *) KERNEL_MALLOC (sizeof (*inf))) == NULL)
- {
- printk ("patmgr: Can't allocate memory for a message\n");
- return RET_ERROR (EIO);
- }
-
- IOCTL_FROM_USER ((char *) inf, (char *) arg, 0, sizeof (*inf));
- dev = inf->device;
-
- if (dev < 0 || dev >= num_synths)
- {
- KERNEL_FREE (inf);
- return RET_ERROR (ENXIO);
- }
-
- if (!synth_devs[dev]->pmgr_interface)
- {
- KERNEL_FREE (inf);
- return RET_ERROR (ENXIO);
- }
-
- if ((err = synth_devs[dev]->pmgr_interface (dev, inf)) == -1)
- {
- KERNEL_FREE (inf);
- return err;
- }
-
- IOCTL_TO_USER ((char *) arg, 0, (char *) inf, sizeof (*inf));
- KERNEL_FREE (inf);
- return 0;
- }
- break;
+ {
+ struct patmgr_info *inf;
+ int dev, err;
- case SNDCTL_PMGR_ACCESS:
- {
- struct patmgr_info *inf;
- int dev, err;
-
- if ((inf = (struct patmgr_info *) KERNEL_MALLOC (sizeof (*inf))) == NULL)
- {
- printk ("patmgr: Can't allocate memory for a message\n");
- return RET_ERROR (EIO);
- }
-
- IOCTL_FROM_USER ((char *) inf, (char *) arg, 0, sizeof (*inf));
- dev = inf->device;
-
- if (dev < 0 || dev >= num_synths)
- {
- KERNEL_FREE (inf);
- return RET_ERROR (ENXIO);
- }
-
- if (!pmgr_present[dev])
- {
- KERNEL_FREE (inf);
- return RET_ERROR (ESRCH);
- }
-
- if ((err = pmgr_access (dev, inf)) < 0)
- {
- KERNEL_FREE (inf);
- return err;
- }
+ if ((inf = (struct patmgr_info *) malloc(sizeof(*inf), M_TEMP, M_WAITOK)) == NULL) {
+ printf("patmgr: Can't allocate memory for a message\n");
+ return -(EIO);
+ }
+ bcopy(&(((char *) arg)[0]), (char *) inf, sizeof(*inf));
+ dev = inf->device;
- IOCTL_TO_USER ((char *) arg, 0, (char *) inf, sizeof (*inf));
- KERNEL_FREE (inf);
- return 0;
- }
- break;
-
- case SNDCTL_SEQ_TRESHOLD:
- {
- int tmp = IOCTL_IN (arg);
-
- if (dev) /*
- * Patch manager
- */
- return RET_ERROR (EIO);
-
- if (tmp < 1)
- tmp = 1;
- if (tmp >= SEQ_MAX_QUEUE)
- tmp = SEQ_MAX_QUEUE - 1;
- output_treshold = tmp;
- return 0;
- }
- break;
+ if (dev < 0 || dev >= num_synths) {
+ free(inf, M_TEMP);
+ return -(ENXIO);
+ }
+ if (!synth_devs[dev]->pmgr_interface) {
+ free(inf, M_TEMP);
+ return -(ENXIO);
+ }
+ if ((err = synth_devs[dev]->pmgr_interface(dev, inf)) == -1) {
+ free(inf, M_TEMP);
+ return err;
+ }
+ bcopy((char *) inf, &(((char *) arg)[0]), sizeof(*inf));
+ free(inf, M_TEMP);
+ return 0;
+ }
+ break;
- case SNDCTL_MIDI_PRETIME:
- {
- int val = IOCTL_IN (arg);
+ case SNDCTL_PMGR_ACCESS:
+ {
+ struct patmgr_info *inf;
+ int dev, err;
- if (val < 0)
- val = 0;
+ if ((inf = (struct patmgr_info *) malloc(sizeof(*inf), M_TEMP, M_WAITOK)) == NULL) {
+ printf("patmgr: Can't allocate memory for a message\n");
+ return -(EIO);
+ }
+ bcopy(&(((char *) arg)[0]), (char *) inf, sizeof(*inf));
+ dev = inf->device;
- val = (HZ * val) / 10;
- pre_event_timeout = val;
- return IOCTL_OUT (arg, val);
- }
- break;
+ if (dev < 0 || dev >= num_synths) {
+ free(inf, M_TEMP);
+ return -(ENXIO);
+ }
+ if (!pmgr_present[dev]) {
+ free(inf, M_TEMP);
+ return -(ESRCH);
+ }
+ if ((err = pmgr_access(dev, inf)) < 0) {
+ free(inf, M_TEMP);
+ return err;
+ }
+ bcopy((char *) inf, &(((char *) arg)[0]), sizeof(*inf));
+ free(inf, M_TEMP);
+ return 0;
+ }
+ break;
- default:
- if (dev) /*
- * Patch manager
- */
- return RET_ERROR (EIO);
-
- if (mode == OPEN_READ)
- return RET_ERROR (EIO);
-
- if (!synth_devs[0])
- return RET_ERROR (ENXIO);
- if (!(synth_open_mask & (1 << 0)))
- return RET_ERROR (ENXIO);
- return synth_devs[0]->ioctl (0, cmd, arg);
- break;
- }
+ case SNDCTL_SEQ_THRESHOLD:
+ {
+ int tmp = (*(int *) arg);
- return RET_ERROR (EINVAL);
-}
+ if (dev)/* Patch manager */
+ return -(EIO);
-#ifdef ALLOW_SELECT
-int
-sequencer_poll (int dev, struct fileinfo *file, int events, select_table * wait)
-{
- unsigned long flags;
- int revents = 0;
+ if (tmp < 1)
+ tmp = 1;
+ if (tmp >= SEQ_MAX_QUEUE)
+ tmp = SEQ_MAX_QUEUE - 1;
+ output_treshold = tmp;
+ return 0;
+ }
+ break;
- dev = dev >> 4;
+ case SNDCTL_MIDI_PRETIME:
+ {
+ int val = (*(int *) arg);
- DISABLE_INTR (flags);
+ if (val < 0)
+ val = 0;
- if (events & (POLLIN | POLLRDNORM))
- if (!iqlen)
- selrecord(wait, &selinfo[dev]);
- else {
- revents |= events & (POLLIN | POLLRDNORM);
- midi_sleep_flag.mode &= ~WK_SLEEP;
- }
+ val = (hz * val) / 10;
+ pre_event_timeout = val;
+ return *(int *) arg = val;
+ }
+ break;
- if (events & (POLLOUT | POLLWRNORM))
- if (qlen >= SEQ_MAX_QUEUE)
- selrecord(wait, &selinfo[dev]);
- else {
- revents |= events & (POLLOUT | POLLWRNORM);
- seq_sleep_flag.mode &= ~WK_SLEEP;
+ default:
+ if (dev) /* Patch manager */
+ return -(EIO);
+
+ if (mode == OPEN_READ)
+ return -(EIO);
+
+ if (!synth_devs[0])
+ return -(ENXIO);
+ if (!(synth_open_mask & (1 << 0)))
+ return -(ENXIO);
+ return synth_devs[0]->ioctl(0, cmd, arg);
+ break;
}
- RESTORE_INTR (flags);
-
- return (revents);
+ return -(EINVAL);
}
-#endif
void
-sequencer_timer (void *arg)
+sequencer_timer(void *dummy)
{
- seq_startplay ();
+ seq_startplay();
}
int
-note_to_freq (int note_num)
+note_to_freq(int note_num)
{
- /*
- * This routine converts a midi note to a frequency (multiplied by 1000)
- */
+ /*
+ * This routine converts a midi note to a frequency (multiplied by
+ * 1000)
+ */
- int note, octave, note_freq;
- int notes[] =
- {
- 261632, 277189, 293671, 311132, 329632, 349232,
- 369998, 391998, 415306, 440000, 466162, 493880
- };
+ int note, octave, note_freq;
+ int notes[] =
+ {
+ 261632, 277189, 293671, 311132, 329632, 349232,
+ 369998, 391998, 415306, 440000, 466162, 493880
+ };
#define BASE_OCTAVE 5
- octave = note_num / 12;
- note = note_num % 12;
+ octave = note_num / 12;
+ note = note_num % 12;
- note_freq = notes[note];
+ note_freq = notes[note];
- if (octave < BASE_OCTAVE)
- note_freq >>= (BASE_OCTAVE - octave);
- else if (octave > BASE_OCTAVE)
- note_freq <<= (octave - BASE_OCTAVE);
+ if (octave < BASE_OCTAVE)
+ note_freq >>= (BASE_OCTAVE - octave);
+ else if (octave > BASE_OCTAVE)
+ note_freq <<= (octave - BASE_OCTAVE);
- /*
- * note_freq >>= 1;
- */
+ /*
+ * note_freq >>= 1;
+ */
- return note_freq;
+ return note_freq;
}
-unsigned long
-compute_finetune (unsigned long base_freq, int bend, int range)
+u_long
+compute_finetune(u_long base_freq, int bend, int range)
{
- unsigned long amount;
- int negative, semitones, cents, multiplier = 1;
+ u_long amount;
+ int negative, semitones, cents, multiplier = 1;
- if (!bend)
- return base_freq;
- if (!range)
- return base_freq;
+ if (!bend)
+ return base_freq;
+ if (!range)
+ return base_freq;
- if (!base_freq)
- return base_freq;
+ if (!base_freq)
+ return base_freq;
- if (range >= 8192)
- range = 8191;
+ if (range >= 8192)
+ range = 8192;
- bend = bend * range / 8192;
- if (!bend)
- return base_freq;
+ bend = bend * range / 8192;
+ if (!bend)
+ return base_freq;
- negative = bend < 0 ? 1 : 0;
+ negative = bend < 0 ? 1 : 0;
- if (bend < 0)
- bend *= -1;
- if (bend > range)
- bend = range;
+ if (bend < 0)
+ bend *= -1;
+ if (bend > range)
+ bend = range;
- /*
- if (bend > 2399)
- bend = 2399;
- */
- while (bend > 2399)
- {
- multiplier *= 4;
- bend -= 2400;
+ /*
+ * if (bend > 2399) bend = 2399;
+ */
+ while (bend > 2399) {
+ multiplier *= 4;
+ bend -= 2400;
}
- semitones = bend / 100;
- cents = bend % 100;
-
- amount = (int) (semitone_tuning[semitones] * multiplier * cent_tuning[cents])
- / 10000;
-
- if (negative)
- return (base_freq * 10000) / amount; /*
- * Bend down
- */
- else
- return (base_freq * amount) / 10000; /*
- * Bend up
- */
-}
-
-
-long
-sequencer_init (long mem_start)
-{
-
- sequencer_ok = 1;
- PERMANENT_MALLOC (unsigned char *, queue, SEQ_MAX_QUEUE * EV_SZ, mem_start);
- PERMANENT_MALLOC (unsigned char *, iqueue, SEQ_MAX_QUEUE * IEV_SZ, mem_start);
+ semitones = bend / 100;
+ cents = bend % 100;
- return mem_start;
-}
-
-#else
-/*
- * Stub version
- */
-int
-sequencer_read (int dev, struct fileinfo *file, snd_rw_buf * buf, int count)
-{
- return RET_ERROR (EIO);
-}
+ amount = (int) (semitone_tuning[semitones] * multiplier * cent_tuning[cents])
+ / 10000;
-int
-sequencer_write (int dev, struct fileinfo *file, snd_rw_buf * buf, int count)
-{
- return RET_ERROR (EIO);
+ if (negative)
+ return (base_freq * 10000) / amount; /* Bend down */
+ else
+ return (base_freq * amount) / 10000; /* Bend up */
}
-int
-sequencer_open (int dev, struct fileinfo *file)
-{
- return RET_ERROR (ENXIO);
-}
void
-sequencer_release (int dev, struct fileinfo *file)
+sequencer_init()
{
-}
-int
-sequencer_ioctl (int dev, struct fileinfo *file,
- unsigned int cmd, unsigned int arg)
-{
- return RET_ERROR (EIO);
-}
-int
-sequencer_lseek (int dev, struct fileinfo *file, off_t offset, int orig)
-{
- return RET_ERROR (EIO);
-}
+ sequencer_ok = 1;
-long
-sequencer_init (long mem_start)
-{
- return mem_start;
-}
+ queue = (u_char *) malloc(SEQ_MAX_QUEUE * EV_SZ, M_DEVBUF, M_NOWAIT);
+ if (!queue)
+ panic("SOUND: Cannot allocate memory\n");
-#ifdef ALLOW_SELECT
-int
-sequencer_poll (int dev, struct fileinfo *file, int events, select_table * wait)
-{
- return (events & (POLLIN | POLLOUT | POLLRDNORM | POLLWRNORM | POLLHUP));
+ iqueue = (u_char *) malloc(SEQ_MAX_QUEUE * IEV_SZ, M_DEVBUF, M_NOWAIT);
+ if (!iqueue)
+ panic("SOUND: Cannot allocate memory\n");
}
#endif
-
-#endif
-
#endif
diff --git a/sys/i386/isa/sound/sound_calls.h b/sys/i386/isa/sound/sound_calls.h
index 28fcc4d..c0b0721 100644
--- a/sys/i386/isa/sound/sound_calls.h
+++ b/sys/i386/isa/sound/sound_calls.h
@@ -8,16 +8,17 @@ int DMAbuf_getwrbuffer(int dev, char **buf, int *size, int dontblock);
int DMAbuf_getrdbuffer(int dev, char **buf, int *len, int dontblock);
int DMAbuf_rmchars(int dev, int buff_no, int c);
int DMAbuf_start_output(int dev, int buff_no, int l);
-int DMAbuf_ioctl(int dev, unsigned int cmd, unsigned int arg, int local);
-long DMAbuf_init(long mem_start);
-int DMAbuf_start_dma (int dev, unsigned long physaddr, int count, int dma_mode);
+int DMAbuf_ioctl(int dev, u_int cmd, ioctl_arg arg, int local);
+void DMAbuf_init(void);
+int DMAbuf_start_dma (int dev, u_long physaddr, int count, int dma_mode);
int DMAbuf_open_dma (int dev);
void DMAbuf_close_dma (int dev);
void DMAbuf_reset_dma (int dev);
void DMAbuf_inputintr(int dev);
void DMAbuf_outputintr(int dev, int underflow_flag);
+void DMAbuf_start_devices(u_int devmask);
#ifdef ALLOW_SELECT
-int DMAbuf_poll(int dev, struct fileinfo *file, int events, select_table * wait);
+int DMAbuf_select(int dev, struct fileinfo *file, int sel_type, select_table * wait);
#endif
/*
@@ -29,12 +30,12 @@ int audio_write (int dev, struct fileinfo *file, snd_rw_buf *buf, int count);
int audio_open (int dev, struct fileinfo *file);
void audio_release (int dev, struct fileinfo *file);
int audio_ioctl (int dev, struct fileinfo *file,
- unsigned int cmd, unsigned int arg);
+ u_int cmd, ioctl_arg arg);
int audio_lseek (int dev, struct fileinfo *file, off_t offset, int orig);
-long audio_init (long mem_start);
+/* long audio_init (void); */
#ifdef ALLOW_SELECT
-int audio_poll(int dev, struct fileinfo *file, int events, select_table * wait);
+int audio_poll(int dev, struct fileinfo *file, int events, select_table * wait);
#endif
/*
@@ -46,18 +47,15 @@ int sequencer_write (int dev, struct fileinfo *file, snd_rw_buf *buf, int count)
int sequencer_open (int dev, struct fileinfo *file);
void sequencer_release (int dev, struct fileinfo *file);
int sequencer_ioctl (int dev, struct fileinfo *file,
- unsigned int cmd, unsigned int arg);
+ u_int cmd, ioctl_arg arg);
int sequencer_lseek (int dev, struct fileinfo *file, off_t offset, int orig);
-long sequencer_init (long mem_start);
-void sequencer_timer(void *arg);
+void sequencer_init (void);
+void sequencer_timer(void *dummy);
int note_to_freq(int note_num);
-unsigned long compute_finetune(unsigned long base_freq, int bend, int range);
-void seq_input_event(unsigned char *event, int len);
-void seq_copy_to_input (unsigned char *event, int len);
+u_long compute_finetune(u_long base_freq, int bend, int range);
+void seq_input_event(u_char *event, int len);
+void seq_copy_to_input (u_char *event, int len);
-#ifdef ALLOW_SELECT
-int sequencer_poll(int dev, struct fileinfo *file, int events, select_table * wait);
-#endif
/*
* System calls for the /dev/midi
@@ -68,25 +66,9 @@ int MIDIbuf_write (int dev, struct fileinfo *file, snd_rw_buf *buf, int count);
int MIDIbuf_open (int dev, struct fileinfo *file);
void MIDIbuf_release (int dev, struct fileinfo *file);
int MIDIbuf_ioctl (int dev, struct fileinfo *file,
- unsigned int cmd, unsigned int arg);
+ u_int cmd, ioctl_arg arg);
int MIDIbuf_lseek (int dev, struct fileinfo *file, off_t offset, int orig);
-void MIDIbuf_bytes_received(int dev, unsigned char *buf, int count);
-long MIDIbuf_init(long mem_start);
-
-#ifdef ALLOW_SELECT
-int MIDIbuf_poll(int dev, struct fileinfo *file, int events, select_table * wait);
-#endif
-
-/*
- * System calls for the generic midi interface.
- *
- */
-
-long CMIDI_init (long mem_start);
-int CMIDI_open (int dev, struct fileinfo *file);
-int CMIDI_write (int dev, struct fileinfo *file, snd_rw_buf *buf, int count);
-int CMIDI_read (int dev, struct fileinfo *file, snd_rw_buf *buf, int count);
-int CMIDI_close (int dev, struct fileinfo *file);
+void MIDIbuf_bytes_received(int dev, u_char *buf, int count);
/*
*
@@ -94,40 +76,39 @@ int CMIDI_close (int dev, struct fileinfo *file);
*/
/* From soundcard.c */
-long soundcard_init(long mem_start);
-void tenmicrosec(void);
+void soundcard_init(void);
+void tenmicrosec(int);
void request_sound_timer (int count);
void sound_stop_timer(void);
-int snd_set_irq_handler (int interrupt_level, INT_HANDLER_PROTO(), char *name);
-void snd_release_irq(int vect);
+int snd_ioctl_return(int *addr, int value);
+int snd_set_irq_handler (int int_lvl, void(*hndlr)(int), sound_os_info *osp);
void sound_dma_malloc(int dev);
void sound_dma_free(int dev);
+void conf_printf(char *name, struct address_info *hw_config);
+void conf_printf2(char *name, int base, int irq, int dma, int dma2);
/* From sound_switch.c */
int sound_read_sw (int dev, struct fileinfo *file, snd_rw_buf *buf, int count);
int sound_write_sw (int dev, struct fileinfo *file, snd_rw_buf *buf, int count);
int sound_open_sw (int dev, struct fileinfo *file);
void sound_release_sw (int dev, struct fileinfo *file);
-int sound_ioctl_sw (int dev, struct fileinfo *file,
- unsigned int cmd, unsigned long arg);
+int sound_ioctl_sw (int dev, struct fileinfo *file, u_int cmd, ioctl_arg arg);
/* From sb_dsp.c */
int sb_dsp_detect (struct address_info *hw_config);
-long sb_dsp_init (long mem_start, struct address_info *hw_config);
+void sb_dsp_init (struct address_info *hw_config);
void sb_dsp_disable_midi(void);
-int sb_get_irq(void);
-void sb_free_irq(void);
-int sb_dsp_command (unsigned char val);
+int sb_dsp_command (u_char val);
int sb_reset_dsp (void);
/* From sb16_dsp.c */
void sb16_dsp_interrupt (int irq);
-long sb16_dsp_init(long mem_start, struct address_info *hw_config);
+void sb16_dsp_init(struct address_info *hw_config);
int sb16_dsp_detect(struct address_info *hw_config);
/* From sb16_midi.c */
void sb16midiintr (int unit);
-long attach_sb16midi(long mem_start, struct address_info * hw_config);
+void attach_sb16midi(struct address_info * hw_config);
int probe_sb16midi(struct address_info *hw_config);
void sb_midi_interrupt(int dummy);
@@ -135,73 +116,76 @@ void sb_midi_interrupt(int dummy);
void sb_midi_init(int model);
/* From sb_mixer.c */
-void sb_setmixer (unsigned int port, unsigned int value);
-int sb_getmixer (unsigned int port);
+void sb_setmixer (u_int port, u_int value);
+int sb_getmixer (u_int port);
void sb_mixer_set_stereo(int mode);
int sb_mixer_init(int major_model);
/* From opl3.c */
-int opl3_detect (int ioaddr);
-long opl3_init(long mem_start);
+int opl3_detect (int ioaddr, sound_os_info *osp);
+void opl3_init(int ioaddr, sound_os_info *osp);
/* From sb_card.c */
-long attach_sb_card(long mem_start, struct address_info *hw_config);
+void attach_sb_card(struct address_info *hw_config);
int probe_sb(struct address_info *hw_config);
+/* From awe_wave.c */
+void attach_awe_obsolete(struct address_info *hw_config);
+int probe_awe_obsolete(struct address_info *hw_config);
+
/* From adlib_card.c */
-long attach_adlib_card(long mem_start, struct address_info *hw_config);
+void attach_adlib_card(struct address_info *hw_config);
int probe_adlib(struct address_info *hw_config);
-/* from awe_wave.c */
-long attach_awe_obsolete(long mem_start, struct address_info *hw_config);
-int probe_awe_obsolete(struct address_info *hw_config);
-
/* From pas_card.c */
-long attach_pas_card(long mem_start, struct address_info *hw_config);
+void attach_pas_card(struct address_info *hw_config);
int probe_pas(struct address_info *hw_config);
int pas_set_intr(int mask);
int pas_remove_intr(int mask);
-unsigned char pas_read(int ioaddr);
-void pas_write(unsigned char data, int ioaddr);
+u_char pas_read(int ioaddr);
+void pas_write(u_char data, int ioaddr);
/* From pas_audio.c */
-void pas_pcm_interrupt(unsigned char status, int cause);
-long pas_pcm_init(long mem_start, struct address_info *hw_config);
+void pas_pcm_interrupt(u_char status, int cause);
+void pas_pcm_init(struct address_info *hw_config);
/* From pas_mixer.c */
int pas_init_mixer(void);
/* From pas_midi.c */
-long pas_midi_init(long mem_start);
+void pas_midi_init(void);
void pas_midi_interrupt(void);
/* From gus_card.c */
-long attach_gus_card(long mem_start, struct address_info * hw_config);
+void attach_gus_card(struct address_info * hw_config);
int probe_gus(struct address_info *hw_config);
int gus_set_midi_irq(int num);
-long attach_gus_db16(long mem_start, struct address_info * hw_config);
+/*void gusintr(int irq); */
+void attach_gus_db16(struct address_info * hw_config);
int probe_gus_db16(struct address_info *hw_config);
/* From gus_wave.c */
int gus_wave_detect(int baseaddr);
-long gus_wave_init(long mem_start, int irq, int dma, int dma_read);
+void gus_wave_init(struct address_info *hw_config);
void gus_voice_irq(void);
-void gus_write8(int reg, unsigned int data);
+u_char gus_read8 (int reg);
+void gus_write8(int reg, u_int data);
void guswave_dma_irq(void);
void gus_delay(void);
-int gus_default_mixer_ioctl (int dev, unsigned int cmd, unsigned int arg);
+int gus_default_mixer_ioctl (int dev, u_int cmd, ioctl_arg arg);
+void gus_timer_command (u_int addr, u_int val);
/* From gus_midi.c */
-long gus_midi_init(long mem_start);
+void gus_midi_init(void);
void gus_midi_interrupt(int dummy);
/* From mpu401.c */
-long attach_mpu401(long mem_start, struct address_info * hw_config);
+void attach_mpu401(struct address_info * hw_config);
int probe_mpu401(struct address_info *hw_config);
-void mpuintr(INT_HANDLER_PARMS(irq, dummy));
+void mpuintr(int irq);
/* From uart6850.c */
-long attach_uart6850(long mem_start, struct address_info * hw_config);
+void attach_uart6850(struct address_info * hw_config);
int probe_uart6850(struct address_info *hw_config);
/* From opl3.c */
@@ -213,51 +197,51 @@ void pmgr_release(int dev);
int pmgr_read (int dev, struct fileinfo *file, snd_rw_buf * buf, int count);
int pmgr_write (int dev, struct fileinfo *file, snd_rw_buf * buf, int count);
int pmgr_access(int dev, struct patmgr_info *rec);
-int pmgr_inform(int dev, int event, unsigned long parm1, unsigned long parm2,
- unsigned long parm3, unsigned long parm4);
+int pmgr_inform(int dev, int event, u_long parm1, u_long parm2,
+ u_long parm3, u_long parm4);
/* From ics2101.c */
-long ics2101_mixer_init(long mem_start);
+void ics2101_mixer_init(void);
/* From sound_timer.c */
-void sound_timer_init(int io_base);
void sound_timer_interrupt(void);
+void sound_timer_syncinterval(u_int new_usecs);
/* From ad1848.c */
-void ad1848_init (char *name, int io_base, int irq, int dma_playback, int dma_capture);
-int ad1848_detect (int io_base);
-void ad1848_interrupt (INT_HANDLER_PARMS(irq, dummy));
-long attach_ms_sound(long mem_start, struct address_info * hw_config);
-int probe_ms_sound(struct address_info *hw_config);
+void ad1848_init (char *name, int io_base, int irq, int dma_playback, int dma_capture, int share_dma, sound_os_info *osp);
+
+int ad1848_detect (int io_base, int *flags, sound_os_info *osp);
+#define AD_F_CS4231 0x0001 /* Returned if a CS4232 (or compatible) detected */
+#define AD_F_CS4248 0x0001 /* Returned if a CS4248 (or compatible) detected */
+
+void ad1848_interrupt (int irq);
+void attach_mss(struct address_info * hw_config);
+int probe_mss(struct address_info *hw_config);
+void attach_pnp_ad1848(struct address_info * hw_config);
+int probe_pnp_ad1848(struct address_info *hw_config);
/* From pss.c */
int probe_pss (struct address_info *hw_config);
-long attach_pss (long mem_start, struct address_info *hw_config);
+void attach_pss (struct address_info *hw_config);
int probe_pss_mpu (struct address_info *hw_config);
-long attach_pss_mpu (long mem_start, struct address_info *hw_config);
+void attach_pss_mpu (struct address_info *hw_config);
int probe_pss_mss (struct address_info *hw_config);
-long attach_pss_mss (long mem_start, struct address_info *hw_config);
+void attach_pss_mss (struct address_info *hw_config);
/* From sscape.c */
int probe_sscape (struct address_info *hw_config);
-long attach_sscape (long mem_start, struct address_info *hw_config);
-int probe_ss_ms_sound (struct address_info *hw_config);
-long attach_ss_ms_sound(long mem_start, struct address_info * hw_config);
+void attach_sscape (struct address_info *hw_config);
+int probe_ss_mss(struct address_info *hw_config);
+void attach_ss_mss(struct address_info * hw_config);
int pss_read (int dev, struct fileinfo *file, snd_rw_buf *buf, int count);
int pss_write (int dev, struct fileinfo *file, snd_rw_buf *buf, int count);
int pss_open (int dev, struct fileinfo *file);
void pss_release (int dev, struct fileinfo *file);
int pss_ioctl (int dev, struct fileinfo *file,
- unsigned int cmd, unsigned int arg);
+ u_int cmd, ioctl_arg arg);
int pss_lseek (int dev, struct fileinfo *file, off_t offset, int orig);
-long pss_init(long mem_start);
-
-#ifdef PC98
-/* From pcm86.c */
-int probe_pcm86(struct address_info *hw_config);
-long attach_pcm86(long mem_start, struct address_info *hw_config);
-#endif PC98
+void pss_init(void);
/* From aedsp16.c */
int InitAEDSP16_SBPRO(struct address_info *hw_config);
@@ -265,12 +249,35 @@ int InitAEDSP16_MSS(struct address_info *hw_config);
int InitAEDSP16_MPU401(struct address_info *hw_config);
/* From midi_synth.c */
-void do_midi_msg (int synthno, unsigned char *msg, int mlen);
+void do_midi_msg (int synthno, u_char *msg, int mlen);
/* From trix.c */
-long attach_trix_wss (long mem_start, struct address_info *hw_config);
+void attach_trix_wss (struct address_info *hw_config);
int probe_trix_wss (struct address_info *hw_config);
-long attach_trix_sb (long mem_start, struct address_info *hw_config);
+void attach_trix_sb (struct address_info *hw_config);
int probe_trix_sb (struct address_info *hw_config);
-long attach_trix_mpu (long mem_start, struct address_info *hw_config);
+void attach_trix_mpu (struct address_info *hw_config);
int probe_trix_mpu (struct address_info *hw_config);
+
+/* From mad16.c */
+void attach_mad16 (struct address_info *hw_config);
+int probe_mad16 (struct address_info *hw_config);
+void attach_mad16_mpu (struct address_info *hw_config);
+int probe_mad16_mpu (struct address_info *hw_config);
+int mad16_sb_dsp_detect (struct address_info *hw_config);
+void mad16_sb_dsp_init (struct address_info *hw_config);
+
+/* From cs4232.c */
+
+int probe_cs4232 (struct address_info *hw_config);
+void attach_cs4232 (struct address_info *hw_config);
+int probe_cs4232_mpu (struct address_info *hw_config);
+void attach_cs4232_mpu (struct address_info *hw_config);
+
+/* From maui.c */
+void attach_maui(struct address_info * hw_config);
+int probe_maui(struct address_info *hw_config);
+
+/* From sound_pnp.c */
+void sound_pnp_init(void);
+void sound_pnp_disconnect(void);
diff --git a/sys/i386/isa/sound/sound_config.h b/sys/i386/isa/sound/sound_config.h
index 938495f..a802763 100644
--- a/sys/i386/isa/sound/sound_config.h
+++ b/sys/i386/isa/sound/sound_config.h
@@ -2,8 +2,7 @@
*
* A driver for Soundcards, misc configuration parameters.
*
- *
- * Copyright by Hannu Savolainen 1993
+ * Copyright by Hannu Savolainen 1995
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -28,43 +27,27 @@
*
*/
-#include <i386/isa/sound/local.h>
-#include <i386/isa/sound/os.h>
-#include <i386/isa/sound/soundvers.h>
-
-#if !defined(PSS_MPU_BASE) && defined(EXCLUDE_SSCAPE) && defined(EXCLUDE_TRIX)
-#define EXCLUDE_MPU_EMU
-#endif
-
-#if defined(ISC) || defined(SCO) || defined(SVR42)
-#define GENERIC_SYSV
-#endif
-
/*
- * Disable the AD1848 driver if there are no other drivers requiring it.
+ * many variables should be reduced to a range. Here define a macro
*/
-#if defined(EXCLUDE_GUS16) && defined(EXCLUDE_MSS) && defined(EXCLUDE_PSS) && defined(EXCLUDE_GUSMAX) && defined(EXCLUDE_SSCAPE) && defined(EXCLUDE_TRIX)
-#define EXCLUDE_AD1848
-#endif
-
-#ifdef PSS_MSS_BASE
-#undef EXCLUDE_AD1848
-#endif
-
+#define RANGE(var, low, high) (var) = \
+ ((var)<(low)?(low) : (var)>(high)?(high) : (var))
+
#undef CONFIGURE_SOUNDCARD
#undef DYNAMIC_BUFFER
-#ifdef KERNEL_SOUNDCARD
+#include <i386/isa/sound/local.h>
+
#define CONFIGURE_SOUNDCARD
#define DYNAMIC_BUFFER
#undef LOADABLE_SOUNDCARD
-#endif
-#ifdef EXCLUDE_SEQUENCER
-#define EXCLUDE_MIDI
-#define EXCLUDE_YM3812
-#define EXCLUDE_OPL3
+#include <i386/isa/sound/os.h>
+#include <i386/isa/sound/soundvers.h>
+
+#if defined(ISC) || defined(SCO) || defined(SVR42)
+#define GENERIC_SYSV
#endif
#ifndef SND_DEFAULT_ENABLE
@@ -73,180 +56,6 @@
#ifdef CONFIGURE_SOUNDCARD
-/* ****** IO-address, DMA and IRQ settings ****
-
-If your card has nonstandard I/O address or IRQ number, change defines
- for the following settings in your kernel Makefile */
-
-#ifndef SBC_BASE
-#ifdef PC98
-#define SBC_BASE 0x20d2 /* 0x20d2 is the factory default. */
-#else
-#define SBC_BASE 0x220 /* 0x220 is the factory default. */
-#endif
-#endif
-
-#ifndef SBC_IRQ
-#ifdef PC98
-#define SBC_IRQ 10 /* IQR10 is not the factory default on PC9821. */
-#else
-#define SBC_IRQ 5 /* IQR5 is the factory default. */
-#endif
-#endif
-
-#ifndef SBC_DMA
-#ifdef PC98
-#define SBC_DMA 3
-#else
-#define SBC_DMA 1
-#endif
-#endif
-
-#ifndef SB16_DMA
-#ifdef PC98
-#define SB16_DMA 3
-#else
-#define SB16_DMA 6
-#endif
-#endif
-
-#ifndef SB16MIDI_BASE
-#ifdef PC98
-#define SB16MIDI_BASE 0x80d2
-#else
-#define SB16MIDI_BASE 0x300
-#endif
-#endif
-
-#ifndef AWE32_BASE
-#define AWE32_BASE 0x620 /* Default = 0x620-3, 0xA20-3, 0xE20-3 */
-#endif
-
-#ifndef PAS_BASE
-#define PAS_BASE 0x388
-#endif
-
-#ifndef PAS_IRQ
-#define PAS_IRQ 5
-#endif
-
-#ifndef PAS_DMA
-#define PAS_DMA 3
-#endif
-
-#ifndef GUS_BASE
-#define GUS_BASE 0x220
-#endif
-
-#ifndef GUS_IRQ
-#define GUS_IRQ 15
-#endif
-
-#ifndef GUS_MIDI_IRQ
-#define GUS_MIDI_IRQ GUS_IRQ
-#endif
-
-#ifndef GUS_DMA
-#define GUS_DMA 6
-#endif
-
-#ifndef GUS_DMA_READ
-#define GUS_DMA_READ 3
-#endif
-
-#ifndef MPU_BASE
-#define MPU_BASE 0x330
-#endif
-
-#ifndef MPU_IRQ
-#define MPU_IRQ 9
-#endif
-
-/* Echo Personal Sound System */
-#ifndef PSS_BASE
-#define PSS_BASE 0x220 /* 0x240 or */
-#endif
-
-#ifndef PSS_IRQ
-#define PSS_IRQ 7
-#endif
-
-#ifndef PSS_DMA
-#define PSS_DMA 1
-#endif
-
-#ifndef MSS_BASE
-#define MSS_BASE 0
-#endif
-
-#ifndef MSS_DMA
-#define MSS_DMA 0
-#endif
-
-#ifndef MSS_IRQ
-#define MSS_IRQ 0
-#endif
-
-#ifndef GUS16_BASE
-#define GUS16_BASE 0
-#endif
-
-#ifndef GUS16_DMA
-#define GUS16_DMA 0
-#endif
-
-#ifndef GUS16_IRQ
-#define GUS16_IRQ 0
-#endif
-
-#ifndef SSCAPE_BASE
-#define SSCAPE_BASE 0
-#endif
-
-#ifndef SSCAPE_DMA
-#define SSCAPE_DMA 0
-#endif
-
-#ifndef SSCAPE_IRQ
-#define SSCAPE_IRQ 0
-#endif
-
-#ifndef SSCAPE_MSS_BASE
-#define SSCAPE_MSS_BASE 0
-#endif
-
-#ifndef SSCAPE_MSS_DMA
-#define SSCAPE_MSS_DMA 0
-#endif
-
-#ifndef SSCAPE_MSS_IRQ
-#define SSCAPE_MSS_IRQ 0
-#endif
-
-#ifndef TRIX_BASE
-#define TRIX_BASE 0x530
-#endif
-
-#ifndef TRIX_IRQ
-#define TRIX_IRQ 10
-#endif
-
-#ifndef TRIX_DMA
-#define TRIX_DMA 1
-#endif
-
-#ifndef U6850_BASE
-#define U6850_BASE 0x330
-#endif
-
-#ifndef U6850_IRQ
-#define U6850_IRQ 5
-#endif
-
-#ifndef U6850_DMA
-#define U6850_DMA 1
-#endif
-
#ifndef MAX_REALTIME_FACTOR
#define MAX_REALTIME_FACTOR 4
#endif
@@ -260,22 +69,34 @@ If your card has nonstandard I/O address or IRQ number, change defines
4k for SB.
If you change the DSP_BUFFSIZE, don't modify this file.
- Use the make config command instead. */
+ Use the make config command instead. Seems to allow only 4K, 16K,
+ 32K, 64K.
+ */
#ifndef DSP_BUFFSIZE
-#define DSP_BUFFSIZE (4096)
+#define DSP_BUFFSIZE (32760)
#endif
#ifndef DSP_BUFFCOUNT
-#define DSP_BUFFCOUNT 2 /* 2 is recommended. */
+#define DSP_BUFFCOUNT 1 /* 1 is recommended. */
#endif
-#define DMA_AUTOINIT 0x10
+#define DMA_AUTOINIT 0x10 /* XXX never used */
-#ifdef PC98
-#define FM_MONO 0x28d2 /* This is the I/O address used by AdLib */
-#else
#define FM_MONO 0x388 /* This is the I/O address used by AdLib */
+
+#ifndef AWE32_BASE
+#define AWE32_BASE 0x620 /* Default = 0x620-3, 0xA20-3, 0xE20-3 */
+#endif
+
+#ifndef PAS_BASE
+#define PAS_BASE 0x388
+#endif
+
+#ifdef JAZZ16
+#ifndef JAZZ_DMA16
+#define JAZZ_DMA16 5
+#endif
#endif
/* SEQ_MAX_QUEUE is the maximum number of sequencer events buffered by the
@@ -295,6 +116,7 @@ If your card has nonstandard I/O address or IRQ number, change defines
*/
#define SND_NDEVS 256 /* Number of supported devices */
+
#define SND_DEV_CTL 0 /* Control port /dev/mixer */
#define SND_DEV_SEQ 1 /* Sequencer output /dev/sequencer (FM
synthesizer and MIDI output) */
@@ -304,7 +126,7 @@ If your card has nonstandard I/O address or IRQ number, change defines
#define SND_DEV_DSP16 5 /* Like /dev/dsp but 16 bits/sample */
#define SND_DEV_STATUS 6 /* /dev/sndstat */
/* #7 not in use now. Was in 2.4. Free for use after v3.0. */
-#define SND_DEV_SEQ2 8 /* /dev/sequecer, level 2 interface */
+#define SND_DEV_SEQ2 8 /* /dev/sequencer, level 2 interface */
#define SND_DEV_SNDPROC 9 /* /dev/sndproc for programmable devices */
#define SND_DEV_PSS SND_DEV_SNDPROC
@@ -320,34 +142,38 @@ If your card has nonstandard I/O address or IRQ number, change defines
#define MAX_TIMER_DEV 3
struct fileinfo {
- int mode; /* Open mode */
- DECLARE_FILE(); /* Reference to file-flags. OS-dependent. */
- };
+ int mode; /* Open mode */
+ int flags;
+ int dummy; /* Reference to file-flags. OS-dependent. */
+};
struct address_info {
int io_base;
int irq;
- int dma; /* write dma channel */
- int dma_read; /* read dma channel */
+ int dma;
+ int dma2;
int always_detect; /* 1=Trust me, it's there */
+ char *name;
+ sound_os_info *osp; /* OS specific info */
+ int card_subtype; /* Driver specific. Usually 0 */
};
#define SYNTH_MAX_VOICES 32
struct voice_alloc_info {
- int max_voice;
- int used_voices;
- int ptr; /* For device specific use */
- unsigned short map[SYNTH_MAX_VOICES]; /* (ch << 8) | (note+1) */
- int timestamp;
- int alloc_times[SYNTH_MAX_VOICES];
- };
+ int max_voice;
+ int used_voices;
+ int ptr; /* For device specific use */
+ unsigned short map[SYNTH_MAX_VOICES]; /* (ch << 8) | (note+1) */
+ int timestamp;
+ int alloc_times[SYNTH_MAX_VOICES];
+};
struct channel_info {
- int pgm_num;
- int bender_value;
- unsigned char controllers[128];
- };
+ int pgm_num;
+ int bender_value;
+ unsigned char controllers[128];
+};
/*
* Process wakeup reasons
@@ -358,9 +184,9 @@ struct channel_info {
#define WK_SIGNAL 0x04
#define WK_SLEEP 0x08
-#define OPEN_READ 1
-#define OPEN_WRITE 2
-#define OPEN_READWRITE 3
+#define OPEN_READ PCM_ENABLE_INPUT
+#define OPEN_WRITE PCM_ENABLE_OUTPUT
+#define OPEN_READWRITE (OPEN_READ|OPEN_WRITE)
#include <i386/isa/sound/sound_calls.h>
#include <i386/isa/sound/dev_table.h>
@@ -368,9 +194,9 @@ struct channel_info {
#ifndef DEB
#define DEB(x)
#endif
-
-#ifndef AUDIO_DDB
-#define AUDIO_DDB(x)
+#ifndef DDB
+/* #define DDB(x) x XXX */
+#define DDB(x)
#endif
#define TIMER_ARMED 121234
diff --git a/sys/i386/isa/sound/sound_pnp.c b/sys/i386/isa/sound/sound_pnp.c
new file mode 100644
index 0000000..d3d278b
--- /dev/null
+++ b/sys/i386/isa/sound/sound_pnp.c
@@ -0,0 +1,186 @@
+/*
+ * sound/sound_pnp.c
+ *
+ * PnP soundcard support (Linux spesific)
+ *
+ * Copyright by Hannu Savolainen 1995
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met: 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer. 2.
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ */
+#include <i386/isa/sound/sound_config.h>
+
+/*
+ * XXX check what to use in place of CONFIG_PNP
+ */
+#if (NSND > 0) && defined(CONFIG_PNP)
+
+#include <linux/pnp.h>
+
+static struct pnp_sounddev *pnp_devs[20] = { NULL };
+
+static int max_pnpdevs = 20;
+static int nr_pnpdevs = 0;
+static int pnp_sig = 0;
+
+void
+install_pnp_sounddrv(struct pnp_sounddev * drv)
+{
+ if (nr_pnpdevs < max_pnpdevs) {
+ pnp_devs[nr_pnpdevs++] = drv;
+ } else
+ printf("Sound: More than 20 PnP drivers defined\n");
+}
+
+void
+cs4232_pnp(void *parm)
+{
+ struct pnp_dev *dev = (struct pnp_dev *) parm;
+ char *name;
+
+ int portmask = 0x00, irqmask = 0x01, dmamask = 0x03;
+ int opl3_driver, wss_driver;
+
+ printf("CS4232 driver waking up\n");
+
+ if (dev->card && dev->card->name)
+ name = dev->card->name;
+ else
+ name = "PnP WSS";
+
+ if ((wss_driver = sndtable_identify_card("AD1848")))
+ portmask |= 0x01; /* MSS */
+ else
+ printf("Sound: MSS/WSS device detected but no driver enabled\n");
+
+ if ((opl3_driver = sndtable_identify_card("OPL3")))
+ portmask |= 0x02; /* OPL3 */
+ else
+ printf("Sound: OPL3/4 device detected but no driver enabled\n");
+
+ printf("WSS driver %d, OPL3 driver %d\n", wss_driver, opl3_driver);
+
+ if (!portmask) /* No drivers available */
+ return;
+
+ if (!pnp_allocate_device(pnp_sig, dev, portmask, irqmask, dmamask, 0x00))
+ printf("Device activation failed\n");
+ else {
+ struct address_info hw_config;
+ int wss_base, opl3_base;
+ int irq;
+ int dma1, dma2;
+
+ printf("Device activation OK\n");
+ wss_base = pnp_get_port(dev, 0);
+ opl3_base = pnp_get_port(dev, 1);
+ irq = pnp_get_irq(dev, 0);
+ dma1 = pnp_get_dma(dev, 0);
+ dma2 = pnp_get_dma(dev, 1);
+
+ printf("I/O0 %03x\n", wss_base);
+ printf("I/O1 %03x\n", opl3_base);
+ printf("IRQ %d\n", irq);
+ printf("DMA0 %d\n", dma1);
+ printf("DMA1 %d\n", dma2);
+
+ if (opl3_base && opl3_driver) {
+ hw_config.io_base = opl3_base;
+ hw_config.irq = 0;
+ hw_config.dma = -1;
+ hw_config.dma2 = -1;
+ hw_config.always_detect = 0;
+ hw_config.name = "";
+ hw_config.osp = NULL;
+ hw_config.card_subtype = 0;
+
+ if (sndtable_probe(opl3_driver, &hw_config))
+ sndtable_init_card(opl3_driver, &hw_config);
+
+ }
+ if (wss_base && wss_driver) {
+ hw_config.io_base = wss_base;
+ hw_config.irq = irq;
+ hw_config.dma = dma1;
+ hw_config.dma2 = (dma2 == NO_DMA) ? dma1 : dma2;
+ hw_config.always_detect = 0;
+ hw_config.name = name;
+ hw_config.osp = NULL;
+ hw_config.card_subtype = 0;
+
+ if (sndtable_probe(wss_driver, &hw_config))
+ sndtable_init_card(wss_driver, &hw_config);
+
+ }
+ }
+}
+
+static int
+pnp_activate(int id, struct pnp_dev * dev)
+{
+ int i;
+
+ for (i = 0; i < nr_pnpdevs; i++)
+ if (pnp_devs[i]->id == id) {
+
+ printf("PnP dev: %08x, %s\n", id, pnp_devid2asc(id));
+
+ pnp_devs[i]->setup((void *) dev);
+ return 1;
+ }
+ return 0;
+}
+
+void
+sound_pnp_init(void)
+{
+ static struct pnp_sounddev cs4232_dev =
+ {PNP_DEVID('C', 'S', 'C', 0x0000), cs4232_pnp, "CS4232"};
+
+ struct pnp_dev *dev;
+
+ install_pnp_sounddrv(&cs4232_dev);
+
+ dev = NULL;
+
+ if ((pnp_sig = pnp_connect("sound")) == -1) {
+ printf("Sound: Can't connect to kernel PnP services.\n");
+ return;
+ }
+ while ((dev = pnp_get_next_device(pnp_sig, dev)) != NULL) {
+ if (!pnp_activate(dev->key, dev)) {
+ /* Scan all compatible devices */
+
+ int i;
+
+ for (i = 0; i < dev->ncompat; i++)
+ if (pnp_activate(dev->compat_keys[i], dev))
+ break;
+ }
+ }
+}
+
+void
+sound_pnp_disconnect(void)
+{
+ pnp_disconnect(pnp_sig);
+}
+#endif
diff --git a/sys/i386/isa/sound/sound_switch.c b/sys/i386/isa/sound/sound_switch.c
index 83994e0..763a10c 100644
--- a/sys/i386/isa/sound/sound_switch.c
+++ b/sys/i386/isa/sound/sound_switch.c
@@ -1,10 +1,10 @@
/*
* sound/sound_switch.c
- *
+ *
* The system call switch
- *
+ *
* Copyright by Hannu Savolainen 1993
- *
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met: 1. Redistributions of source code must retain the above copyright
@@ -12,7 +12,7 @@
* Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
@@ -24,27 +24,14 @@
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
- *
+ *
*/
#include <i386/isa/sound/sound_config.h>
-#ifdef CONFIGURE_SOUNDCARD
+#if NSND > 0
-struct sbc_device
- {
- int usecount;
- };
-
-static struct sbc_device sbc_devices[SND_NDEVS] =
-{
- {0}};
-
-static int in_use = 0; /*
-
-
- * * * * Total # of open device files
- * (excluding * * * minor 0) */
+#define SNDSTAT_BUF_SIZE 4000
/*
* /dev/sndstatus -device
@@ -54,491 +41,459 @@ static int status_len, status_ptr;
static int status_busy = 0;
static int
-put_status (char *s)
+put_status(char *s)
{
- int l;
+ int l = strlen(s);
- for (l = 0; l < 256, s[l]; l++); /*
- * l=strlen(s);
- */
+ if (status_len + l >= SNDSTAT_BUF_SIZE)
+ return 0;
- if (status_len + l >= 4000)
- return 0;
-
- memcpy (&status_buf[status_len], s, l);
- status_len += l;
+ bcopy(s, &status_buf[status_len], l);
+ status_len += l;
- return 1;
+ return 1;
}
+/*
+ * in principle, we never overflow the buffer. But... if radix=2 ...
+ * and if smaller... lr970711
+ */
+
static int
-put_status_int (unsigned int val, int radix)
+put_status_int(u_int val, int radix)
{
- int l, v;
+ int l, v;
+ static char hx[] = "0123456789abcdef";
+ char buf[33]; /* int is 32 bit+null, in base 2 */
- static char hx[] = "0123456789abcdef";
- char buf[11];
+ if (radix < 2 || radix > 16) /* better than panic */
+ return put_status("???");
- if (!val)
- return put_status ("0");
+ if (!val)
+ return put_status("0");
- l = 0;
- buf[10] = 0;
+ l = 0;
+ buf[10] = 0;
- while (val)
- {
- v = val % radix;
- val = val / radix;
+ while (val) {
+ v = val % radix;
+ val = val / radix;
- buf[9 - l] = hx[v];
- l++;
+ buf[9 - l] = hx[v];
+ l++;
}
- if (status_len + l >= 4000)
- return 0;
+ if (status_len + l >= SNDSTAT_BUF_SIZE)
+ return 0;
- memcpy (&status_buf[status_len], &buf[10 - l], l);
- status_len += l;
+ bcopy(&buf[10 - l], &status_buf[status_len], l);
+ status_len += l;
- return 1;
+ return 1;
}
static void
-init_status (void)
+init_status(void)
{
- /*
- * Write the status information to the status_buf and update status_len.
- * There is a limit of 4000 bytes for the data.
- */
-
- int i;
-
- status_ptr = 0;
-
- put_status ("VoxWare Sound Driver:" SOUND_VERSION_STRING
- " (" SOUND_CONFIG_DATE " " SOUND_CONFIG_BY "@"
- SOUND_CONFIG_HOST "." SOUND_CONFIG_DOMAIN ")"
- "\n");
-
- if (!put_status ("Config options: "))
- return;
- if (!put_status_int (SELECTED_SOUND_OPTIONS, 16))
- return;
-
- if (!put_status ("\n\nInstalled drivers: \n"))
- return;
-
- for (i = 0; i < (num_sound_drivers - 1); i++)
- {
- if (!put_status ("Type "))
- return;
- if (!put_status_int (sound_drivers[i].card_type, 10))
- return;
- if (!put_status (": "))
- return;
- if (!put_status (sound_drivers[i].name))
- return;
-
- if (!put_status ("\n"))
- return;
- }
-
- if (!put_status ("\n\nCard config: \n"))
- return;
+ /*
+ * Write the status information to the status_buf and update
+ * status_len. There is a limit of SNDSTAT_BUF_SIZE bytes for the data.
+ * put_status handles this and returns 0 in case of failure. Since
+ * it never oveflows the buffer, we do not care to check.
+ */
- for (i = 0; i < (num_sound_cards - 1); i++)
- {
- int drv;
+ int i;
- if (!snd_installed_cards[i].enabled)
- if (!put_status ("("))
- return;
+ status_ptr = 0;
- /*
- * if (!put_status_int(snd_installed_cards[i].card_type, 10)) return;
- * if (!put_status (": ")) return;
- */
-
- if ((drv = snd_find_driver (snd_installed_cards[i].card_type)) != -1)
- if (!put_status (sound_drivers[drv].name))
- return;
-
- if (!put_status (" at 0x"))
- return;
- if (!put_status_int (snd_installed_cards[i].config.io_base, 16))
- return;
- if (!put_status (" irq "))
- return;
- if (!put_status_int (snd_installed_cards[i].config.irq, 10))
- return;
-#ifdef PC98
- if (snd_installed_cards[i].config.dma >= 0) {
-#endif
- if (!put_status (" drq "))
- return;
- if (!put_status_int (snd_installed_cards[i].config.dma, 10))
- return;
-#ifdef PC98
- }
+#ifdef SOUND_UNAME_A
+ put_status("VoxWare Sound Driver:" SOUND_VERSION_STRING
+ " (" SOUND_CONFIG_DATE " " SOUND_CONFIG_BY ",\n"
+ SOUND_UNAME_A ")\n");
+#else
+ put_status("VoxWare Sound Driver:" SOUND_VERSION_STRING
+ " (" SOUND_CONFIG_DATE " " SOUND_CONFIG_BY "@"
+ SOUND_CONFIG_HOST "." SOUND_CONFIG_DOMAIN ")\n");
#endif
- if (!snd_installed_cards[i].enabled)
- if (!put_status (")"))
- return;
-
- if (!put_status ("\n"))
+ put_status("Config options: ") ;
+ /* put_status_int(SELECTED_SOUND_OPTIONS, 16) ; */
+ put_status("\n\nInstalled drivers: \n") ;
+
+ for (i = 0; i < num_sound_drivers; i++)
+ if (sound_drivers[i].card_type != 0) {
+ put_status("Type ") ;
+ put_status_int(sound_drivers[i].card_type, 10);
+ put_status(": ") ;
+ put_status(sound_drivers[i].name) ;
+ put_status("\n") ;
+ }
+ put_status("\n\nCard config: \n") ;
+
+ for (i = 0; i < num_sound_cards; i++)
+ if (snd_installed_cards[i].card_type != 0) {
+ int drv, tmp;
+
+ if (!snd_installed_cards[i].enabled)
+ put_status("(") ;
+
+ if ((drv = snd_find_driver(snd_installed_cards[i].card_type)) != -1)
+ put_status(sound_drivers[drv].name) ;
+
+ put_status(" at 0x") ;
+ put_status_int(snd_installed_cards[i].config.io_base, 16);
+
+ put_status(" irq ") ;
+ tmp = snd_installed_cards[i].config.irq;
+ if (tmp < 0)
+ tmp = -tmp;
+ put_status_int(tmp, 10) ;
+
+ if (snd_installed_cards[i].config.dma != -1) {
+ put_status(" drq ") ;
+ put_status_int(snd_installed_cards[i].config.dma, 10) ;
+ if (snd_installed_cards[i].config.dma2 != -1) {
+ put_status(",") ;
+ put_status_int(snd_installed_cards[i].config.dma2, 10) ;
+ }
+ }
+ if (!snd_installed_cards[i].enabled)
+ put_status(")") ;
+
+ put_status("\n") ;
+ }
+ if (!sound_started) {
+ put_status("\n\n***** Sound driver not started *****\n\n");
return;
}
-
-#ifdef EXCLUDE_AUDIO
- if (!put_status ("\nAudio devices: NOT ENABLED IN CONFIG\n"))
- return;
+#ifndef CONFIG_AUDIO
+ put_status("\nAudio devices: NOT ENABLED IN CONFIG\n") ;
#else
- if (!put_status ("\nAudio devices:\n"))
- return;
+ put_status("\nAudio devices:\n") ;
- for (i = 0; i < num_audiodevs; i++)
- {
- if (!put_status_int (i, 10))
- return;
- if (!put_status (": "))
- return;
- if (!put_status (audio_devs[i]->name))
- return;
- if (!put_status ("\n"))
- return;
+ for (i = 0; i < num_audiodevs; i++) {
+ put_status_int(i, 10) ;
+ put_status(": ") ;
+ put_status(audio_devs[i]->name) ;
+
+ if (audio_devs[i]->flags & DMA_DUPLEX)
+ put_status(" (DUPLEX)") ;
+
+ put_status("\n") ;
}
#endif
-#ifdef EXCLUDE_SEQUENCER
- if (!put_status ("\nSynth devices: NOT ENABLED IN CONFIG\n"))
- return;
+#ifndef CONFIG_SEQUENCER
+ put_status("\nSynth devices: NOT ENABLED IN CONFIG\n");
#else
- if (!put_status ("\nSynth devices:\n"))
- return;
+ put_status("\nSynth devices:\n") ;
- for (i = 0; i < num_synths; i++)
- {
- if (!put_status_int (i, 10))
- return;
- if (!put_status (": "))
- return;
- if (!put_status (synth_devs[i]->info->name))
- return;
- if (!put_status ("\n"))
- return;
+ for (i = 0; i < num_synths; i++) {
+ put_status_int(i, 10) ;
+ put_status(": ") ;
+ put_status(synth_devs[i]->info->name) ;
+ put_status("\n") ;
}
#endif
-#ifdef EXCLUDE_MIDI
- if (!put_status ("\nMidi devices: NOT ENABLED IN CONFIG\n"))
- return;
+#ifndef CONFIG_MIDI
+ put_status("\nMidi devices: NOT ENABLED IN CONFIG\n") ;
#else
- if (!put_status ("\nMidi devices:\n"))
- return;
+ put_status("\nMidi devices:\n") ;
- for (i = 0; i < num_midis; i++)
- {
- if (!put_status_int (i, 10))
- return;
- if (!put_status (": "))
- return;
- if (!put_status (midi_devs[i]->info.name))
- return;
- if (!put_status ("\n"))
- return;
+ for (i = 0; i < num_midis; i++) {
+ put_status_int(i, 10) ;
+ put_status(": ") ;
+ put_status(midi_devs[i]->info.name) ;
+ put_status("\n") ;
}
#endif
- if (!put_status ("\nTimers:\n"))
- return;
+ put_status("\nTimers:\n");
- for (i = 0; i < num_sound_timers; i++)
- {
- if (!put_status_int (i, 10))
- return;
- if (!put_status (": "))
- return;
- if (!put_status (sound_timer_devs[i]->info.name))
- return;
- if (!put_status ("\n"))
- return;
+ for (i = 0; i < num_sound_timers; i++) {
+ put_status_int(i, 10);
+ put_status(": ");
+ put_status(sound_timer_devs[i]->info.name);
+ put_status("\n");
}
- if (!put_status ("\nMixers:\n"))
- return;
+ put_status("\nMixers:\n");
- for (i = 0; i < num_mixers; i++)
- {
- if (!put_status_int (i, 10))
- return;
- if (!put_status (": "))
- return;
- if (!put_status (mixer_devs[i]->name))
- return;
- if (!put_status ("\n"))
- return;
+ for (i = 0; i < num_mixers; i++) {
+ put_status_int(i, 10);
+ put_status(": ");
+ put_status(mixer_devs[i]->name);
+ put_status("\n");
}
}
static int
-read_status (snd_rw_buf * buf, int count)
+read_status(snd_rw_buf * buf, int count)
{
- /*
- * Return at most 'count' bytes from the status_buf.
- */
- int l, c;
+ /*
+ * Return at most 'count' bytes from the status_buf.
+ */
+ int l, c;
- l = count;
- c = status_len - status_ptr;
+ l = count;
+ c = status_len - status_ptr;
- if (l > c)
- l = c;
- if (l <= 0)
- return 0;
+ if (l > c)
+ l = c;
+ if (l <= 0)
+ return 0;
- COPY_TO_USER (buf, 0, &status_buf[status_ptr], l);
- status_ptr += l;
- return l;
+ if (uiomove(&status_buf[status_ptr], l, buf)) {
+ printf("sb: Bad copyout()!\n");
+ };
+ status_ptr += l;
+
+ return l;
}
int
-sound_read_sw (int dev, struct fileinfo *file, snd_rw_buf * buf, int count)
+sound_read_sw(int dev, struct fileinfo * file, snd_rw_buf * buf, int count)
{
- DEB (printk ("sound_read_sw(dev=%d, count=%d)\n", dev, count));
+ DEB(printf("sound_read_sw(dev=%d, count=%d)\n", dev, count));
- switch (dev & 0x0f)
- {
+ switch (dev & 0x0f) {
case SND_DEV_STATUS:
- return read_status (buf, count);
- break;
+ return read_status(buf, count);
+ break;
+#ifdef CONFIG_AUDIO
case SND_DEV_DSP:
case SND_DEV_DSP16:
case SND_DEV_AUDIO:
- return audio_read (dev, file, buf, count);
- break;
+ return audio_read(dev, file, buf, count);
+ break;
+#endif
+#ifdef CONFIG_SEQUENCER
case SND_DEV_SEQ:
case SND_DEV_SEQ2:
- return sequencer_read (dev, file, buf, count);
- break;
+ return sequencer_read(dev, file, buf, count);
+ break;
+#endif
-#ifndef EXCLUDE_MIDI
+#ifdef CONFIG_MIDI
case SND_DEV_MIDIN:
- return MIDIbuf_read (dev, file, buf, count);
+ return MIDIbuf_read(dev, file, buf, count);
#endif
default:
- printk ("Sound: Undefined minor device %d\n", dev);
+ printf("Sound: Undefined minor device %d\n", dev);
}
- return RET_ERROR (EPERM);
+ return -(EPERM);
}
int
-sound_write_sw (int dev, struct fileinfo *file, snd_rw_buf * buf, int count)
+sound_write_sw(int dev, struct fileinfo * file, snd_rw_buf * buf, int count)
{
- DEB (printk ("sound_write_sw(dev=%d, count=%d)\n", dev, count));
+ DEB(printf("sound_write_sw(dev=%d, count=%d)\n", dev, count));
- switch (dev & 0x0f)
- {
+ switch (dev & 0x0f) {
+#ifdef CONFIG_SEQUENCER
case SND_DEV_SEQ:
case SND_DEV_SEQ2:
- return sequencer_write (dev, file, buf, count);
- break;
+ return sequencer_write(dev, file, buf, count);
+ break;
+#endif
+#ifdef CONFIG_AUDIO
case SND_DEV_DSP:
case SND_DEV_DSP16:
case SND_DEV_AUDIO:
- return audio_write (dev, file, buf, count);
- break;
+ return audio_write(dev, file, buf, count);
+ break;
+#endif
-#ifndef EXCLUDE_MIDI
+#ifdef CONFIG_MIDI
case SND_DEV_MIDIN:
- return MIDIbuf_write (dev, file, buf, count);
+ return MIDIbuf_write(dev, file, buf, count);
#endif
default:
- return RET_ERROR (EPERM);
+ return -(EPERM);
}
- return count;
+ return count;
}
int
-sound_open_sw (int dev, struct fileinfo *file)
+sound_open_sw(int dev, struct fileinfo * file)
{
- int retval;
+ int retval;
- DEB (printk ("sound_open_sw(dev=%d) : usecount=%d\n", dev, sbc_devices[dev].usecount));
+ DEB(printf("sound_open_sw(dev=%d)\n", dev));
- if ((dev >= SND_NDEVS) || (dev < 0))
- {
- printk ("Invalid minor device %d\n", dev);
- return RET_ERROR (ENXIO);
+ if ((dev >= SND_NDEVS) || (dev < 0)) {
+ printf("Invalid minor device %d\n", dev);
+ return -(ENXIO);
}
-
- switch (dev & 0x0f)
- {
+ switch (dev & 0x0f) {
case SND_DEV_STATUS:
- if (status_busy)
- return RET_ERROR (EBUSY);
- status_busy = 1;
- if ((status_buf = (char *) KERNEL_MALLOC (4000)) == NULL)
- return RET_ERROR (EIO);
- status_len = status_ptr = 0;
- init_status ();
- break;
+ if (status_busy)
+ return -(EBUSY);
+ status_busy = 1;
+ if ((status_buf = (char *) malloc(SNDSTAT_BUF_SIZE, M_TEMP, M_WAITOK)) == NULL)
+ return -(EIO);
+ status_len = status_ptr = 0;
+ init_status();
+ break;
case SND_DEV_CTL:
- return 0;
- break;
+ return 0;
+ break;
+#ifdef CONFIG_SEQUENCER
case SND_DEV_SEQ:
case SND_DEV_SEQ2:
- if ((retval = sequencer_open (dev, file)) < 0)
- return retval;
- break;
+ if ((retval = sequencer_open(dev, file)) < 0)
+ return retval;
+ break;
+#endif
-#ifndef EXCLUDE_MIDI
+#ifdef CONFIG_MIDI
case SND_DEV_MIDIN:
- if ((retval = MIDIbuf_open (dev, file)) < 0)
- return retval;
- break;
+ if ((retval = MIDIbuf_open(dev, file)) < 0)
+ return retval;
+ break;
#endif
+#ifdef CONFIG_AUDIO
case SND_DEV_DSP:
case SND_DEV_DSP16:
case SND_DEV_AUDIO:
- if ((retval = audio_open (dev, file)) < 0)
- return retval;
- break;
+ if ((retval = audio_open(dev, file)) < 0)
+ return retval;
+ break;
+#endif
default:
- printk ("Invalid minor device %d\n", dev);
- return RET_ERROR (ENXIO);
+ printf("Invalid minor device %d\n", dev);
+ return -(ENXIO);
}
- sbc_devices[dev].usecount++;
- in_use++;
-
- return 0;
+ return 0;
}
void
-sound_release_sw (int dev, struct fileinfo *file)
+sound_release_sw(int dev, struct fileinfo * file)
{
- DEB (printk ("sound_release_sw(dev=%d)\n", dev));
+ DEB(printf("sound_release_sw(dev=%d)\n", dev));
- switch (dev & 0x0f)
- {
+ switch (dev & 0x0f) {
case SND_DEV_STATUS:
- if (status_buf)
- KERNEL_FREE (status_buf);
- status_buf = NULL;
- status_busy = 0;
- break;
+ if (status_buf)
+ free(status_buf, M_TEMP);
+ status_buf = NULL;
+ status_busy = 0;
+ break;
case SND_DEV_CTL:
- break;
+ break;
+#ifdef CONFIG_SEQUENCER
case SND_DEV_SEQ:
case SND_DEV_SEQ2:
- sequencer_release (dev, file);
- break;
+ sequencer_release(dev, file);
+ break;
+#endif
-#ifndef EXCLUDE_MIDI
+#ifdef CONFIG_MIDI
case SND_DEV_MIDIN:
- MIDIbuf_release (dev, file);
- break;
+ MIDIbuf_release(dev, file);
+ break;
#endif
+#ifdef CONFIG_AUDIO
case SND_DEV_DSP:
case SND_DEV_DSP16:
case SND_DEV_AUDIO:
- audio_release (dev, file);
- break;
+ audio_release(dev, file);
+ break;
+#endif
default:
- printk ("Sound error: Releasing unknown device 0x%02x\n", dev);
+ printf("Sound error: Releasing unknown device 0x%02x\n", dev);
}
-
- sbc_devices[dev].usecount--;
- in_use--;
}
int
-sound_ioctl_sw (int dev, struct fileinfo *file,
- unsigned int cmd, unsigned long arg)
+sound_ioctl_sw(int dev, struct fileinfo * file, u_int cmd, ioctl_arg arg)
{
- DEB (printk ("sound_ioctl_sw(dev=%d, cmd=0x%x, arg=0x%x)\n", dev, cmd, arg));
-
- if ((cmd >> 8) & 0xff == 'M' && num_mixers > 0) /* Mixer ioctl */
- if ((dev & 0x0f) != SND_DEV_CTL)
- {
- int dtype = dev & 0x0f;
- int mixdev;
-
- switch (dtype)
- {
- case SND_DEV_DSP:
- case SND_DEV_DSP16:
- case SND_DEV_AUDIO:
- mixdev = audio_devs[dev >> 4]->mixer_dev;
- if (mixdev < 0 || mixdev >= num_mixers)
- return RET_ERROR (ENXIO);
- return mixer_devs[mixdev]->ioctl (mixdev, cmd, arg);
- break;
-
- default:
- return mixer_devs[0]->ioctl (0, cmd, arg);
- }
- }
+ DEB(printf("sound_ioctl_sw(dev=%d, cmd=0x%x, arg=0x%x)\n", dev, cmd, arg));
+
+ if (((cmd >> 8) & 0xff) == 'M' && num_mixers > 0) /* Mixer ioctl */
+ if ((dev & 0x0f) != SND_DEV_CTL) {
+ int dtype = dev & 0x0f;
+ int mixdev;
+
+ switch (dtype) {
+#ifdef CONFIG_AUDIO
+ case SND_DEV_DSP:
+ case SND_DEV_DSP16:
+ case SND_DEV_AUDIO:
+ mixdev = audio_devs[dev >> 4]->mixer_dev;
+ if (mixdev < 0 || mixdev >= num_mixers)
+ return -(ENXIO);
+ return mixer_devs[mixdev]->ioctl(mixdev, cmd, arg);
+ break;
+#endif
- switch (dev & 0x0f)
- {
+ default:
+ return mixer_devs[0]->ioctl(0, cmd, arg);
+ }
+ }
+ switch (dev & 0x0f) {
case SND_DEV_CTL:
- if (!num_mixers)
- return RET_ERROR (ENXIO);
+ if (!num_mixers)
+ return -(ENXIO);
- dev = dev >> 4;
+ dev = dev >> 4;
- if (dev >= num_mixers)
- return RET_ERROR (ENXIO);
+ if (dev >= num_mixers)
+ return -(ENXIO);
- return mixer_devs[dev]->ioctl (dev, cmd, arg);
- break;
+ return mixer_devs[dev]->ioctl(dev, cmd, arg);
+ break;
+#ifdef CONFIG_SEQUENCER
case SND_DEV_SEQ:
case SND_DEV_SEQ2:
- return sequencer_ioctl (dev, file, cmd, arg);
- break;
+ return sequencer_ioctl(dev, file, cmd, arg);
+ break;
+#endif
+#ifdef CONFIG_AUDIO
case SND_DEV_DSP:
case SND_DEV_DSP16:
case SND_DEV_AUDIO:
- return audio_ioctl (dev, file, cmd, arg);
- break;
+ return audio_ioctl(dev, file, cmd, arg);
+ break;
+#endif
-#ifndef EXCLUDE_MIDI
+#ifdef CONFIG_MIDI
case SND_DEV_MIDIN:
- return MIDIbuf_ioctl (dev, file, cmd, arg);
- break;
+ return MIDIbuf_ioctl(dev, file, cmd, arg);
+ break;
#endif
default:
- return RET_ERROR (EPERM);
- break;
+ return -(EPERM);
+ break;
}
- return RET_ERROR (EPERM);
+ return -(EPERM);
}
#endif
diff --git a/sys/i386/isa/sound/sound_timer.c b/sys/i386/isa/sound/sound_timer.c
index b887375..8450b2d 100644
--- a/sys/i386/isa/sound/sound_timer.c
+++ b/sys/i386/isa/sound/sound_timer.c
@@ -1,11 +1,8 @@
/*
* sound/sound_timer.c
- *
- * Timer for the level 2 interface of the /dev/sequencer. Uses the
- * 80 and 320 usec timers of OPL-3 (PAS16 only) and GUS.
- *
+ *
* Copyright by Hannu Savolainen 1993
- *
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met: 1. Redistributions of source code must retain the above copyright
@@ -13,7 +10,7 @@
* Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
@@ -25,381 +22,322 @@
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
- *
+ *
*/
#define SEQUENCER_C
#include <i386/isa/sound/sound_config.h>
-#ifdef CONFIGURE_SOUNDCARD
+#if NSND > 0
-#if !defined(EXCLUDE_SEQUENCER) && (!defined(EXCLUDE_GUS) || (!defined(EXCLUDE_PAS) && !defined(EXCLUDE_YM3812)))
+#if defined(CONFIG_SEQUENCER)
static volatile int initialized = 0, opened = 0, tmr_running = 0;
static volatile time_t tmr_offs, tmr_ctr;
-static volatile unsigned long ticks_offs;
+static volatile u_long ticks_offs;
static volatile int curr_tempo, curr_timebase;
-static volatile unsigned long curr_ticks;
-static volatile unsigned long next_event_time;
-static unsigned long prev_event_time;
-static volatile int select_addr, data_addr;
-static volatile int curr_timer = 0;
-static volatile unsigned long usecs_per_tmr; /* Length of the current interval */
+static volatile u_long curr_ticks;
+static volatile u_long next_event_time;
+static u_long prev_event_time;
+static volatile u_long usecs_per_tmr; /* Length of the current interval */
+static struct sound_lowlev_timer *tmr = NULL;
-static void
-timer_command (unsigned int addr, unsigned int val)
+static u_long
+tmr2ticks(int tmr_value)
{
- int i;
+ /*
+ * Convert timer ticks to MIDI ticks
+ */
- OUTB ((unsigned char) (addr & 0xff), select_addr);
+ u_long tmp;
+ u_long scale;
- for (i = 0; i < 2; i++)
- INB (select_addr);
+ tmp = tmr_value * usecs_per_tmr; /* Convert to usecs */
- OUTB ((unsigned char) (val & 0xff), data_addr);
+ scale = (60 * 1000000) / (curr_tempo * curr_timebase); /* usecs per MIDI tick */
- for (i = 0; i < 2; i++)
- INB (select_addr);
+ return (tmp + (scale / 2)) / scale;
}
static void
-arm_timer (int timer, unsigned int interval)
-{
-
- curr_timer = timer;
-
- if (timer == 1)
- {
- gus_write8 (0x46, 256 - interval); /* Set counter for timer 1 */
- gus_write8 (0x45, 0x04); /* Enable timer 1 IRQ */
- timer_command (0x04, 0x01); /* Start timer 1 */
- }
- else
- {
- gus_write8 (0x47, 256 - interval); /* Set counter for timer 2 */
- gus_write8 (0x45, 0x08); /* Enable timer 2 IRQ */
- timer_command (0x04, 0x02); /* Start timer 2 */
- }
-}
-
-static unsigned long
-tmr2ticks (int tmr_value)
+reprogram_timer(void)
{
- /*
- * Convert timer ticks to MIDI ticks
- */
+ u_long usecs_per_tick;
- unsigned long tmp;
- unsigned long scale;
+ usecs_per_tick = (60 * 1000000) / (curr_tempo * curr_timebase);
- tmp = tmr_value * usecs_per_tmr; /* Convert to usecs */
-
- scale = (60 * 1000000) / (curr_tempo * curr_timebase); /* usecs per MIDI tick */
+ /*
+ * Don't kill the system by setting too high timer rate
+ */
+ if (usecs_per_tick < 2000)
+ usecs_per_tick = 2000;
- return (tmp + (scale / 2)) / scale;
+ usecs_per_tmr = tmr->tmr_start(tmr->dev, usecs_per_tick);
}
-static void
-reprogram_timer (void)
+void
+sound_timer_syncinterval(u_int new_usecs)
{
- unsigned long usecs_per_tick;
- int timer_no, resolution;
- int divisor;
-
- usecs_per_tick = (60 * 1000000) / (curr_tempo * curr_timebase);
-
- /*
- * Don't kill the system by setting too high timer rate
- */
- if (usecs_per_tick < 2000)
- usecs_per_tick = 2000;
-
- if (usecs_per_tick > (256 * 80))
- {
- timer_no = 2;
- resolution = 320; /* usec */
- }
- else
- {
- timer_no = 1;
- resolution = 80; /* usec */
- }
-
- divisor = (usecs_per_tick + (resolution / 2)) / resolution;
- usecs_per_tmr = divisor * resolution;
-
- arm_timer (timer_no, divisor);
+ /*
+ * This routine is called by the hardware level if the clock
+ * frequency has changed for some reason.
+ */
+ tmr_offs = tmr_ctr;
+ ticks_offs += tmr2ticks(tmr_ctr);
+ tmr_ctr = 0;
+
+ usecs_per_tmr = new_usecs;
}
static void
-tmr_reset (void)
+tmr_reset(void)
{
- unsigned long flags;
-
- DISABLE_INTR (flags);
- tmr_offs = 0;
- ticks_offs = 0;
- tmr_ctr = 0;
- next_event_time = 0xffffffff;
- prev_event_time = 0;
- curr_ticks = 0;
- RESTORE_INTR (flags);
+ u_long flags;
+
+ flags = splhigh();
+ tmr_offs = 0;
+ ticks_offs = 0;
+ tmr_ctr = 0;
+ next_event_time = 0xffffffff;
+ prev_event_time = 0;
+ curr_ticks = 0;
+ splx(flags);
}
static int
-timer_open (int dev, int mode)
+timer_open(int dev, int mode)
{
- if (opened)
- return RET_ERROR (EBUSY);
+ if (opened)
+ return -(EBUSY);
- tmr_reset ();
- curr_tempo = 60;
- curr_timebase = HZ;
- opened = 1;
- reprogram_timer ();
+ tmr_reset();
+ curr_tempo = 60;
+ curr_timebase = hz;
+ opened = 1;
+ reprogram_timer();
- return 0;
+ return 0;
}
static void
-timer_close (int dev)
+timer_close(int dev)
{
- opened = tmr_running = 0;
- gus_write8 (0x45, 0); /* Disable both timers */
+ opened = tmr_running = 0;
+ tmr->tmr_disable(tmr->dev);
}
static int
-timer_event (int dev, unsigned char *event)
+timer_event(int dev, u_char *event)
{
- unsigned char cmd = event[1];
- unsigned long parm = *(int *) &event[4];
+ u_char cmd = event[1];
+ u_long parm = *(int *) &event[4];
- switch (cmd)
- {
+ switch (cmd) {
case TMR_WAIT_REL:
- parm += prev_event_time;
+ parm += prev_event_time;
case TMR_WAIT_ABS:
- if (parm > 0)
- {
- long time;
+ if (parm > 0) {
+ long time;
- if (parm <= curr_ticks) /* It's the time */
- return TIMER_NOT_ARMED;
+ if (parm <= curr_ticks) /* It's the time */
+ return TIMER_NOT_ARMED;
- time = parm;
- next_event_time = prev_event_time = time;
+ time = parm;
+ next_event_time = prev_event_time = time;
- return TIMER_ARMED;
+ return TIMER_ARMED;
}
- break;
+ break;
case TMR_START:
- tmr_reset ();
- tmr_running = 1;
- reprogram_timer ();
- break;
+ tmr_reset();
+ tmr_running = 1;
+ reprogram_timer();
+ break;
case TMR_STOP:
- tmr_running = 0;
- break;
+ tmr_running = 0;
+ break;
case TMR_CONTINUE:
- tmr_running = 1;
- reprogram_timer ();
- break;
+ tmr_running = 1;
+ reprogram_timer();
+ break;
case TMR_TEMPO:
- if (parm)
- {
- if (parm < 8)
- parm = 8;
- if (parm > 250)
- parm = 250;
- tmr_offs = tmr_ctr;
- ticks_offs += tmr2ticks (tmr_ctr);
- tmr_ctr = 0;
- curr_tempo = parm;
- reprogram_timer ();
+ if (parm) {
+ if (parm < 8)
+ parm = 8;
+ if (parm > 250)
+ parm = 250;
+ tmr_offs = tmr_ctr;
+ ticks_offs += tmr2ticks(tmr_ctr);
+ tmr_ctr = 0;
+ curr_tempo = parm;
+ reprogram_timer();
}
- break;
+ break;
case TMR_ECHO:
- seq_copy_to_input (event, 8);
- break;
+ seq_copy_to_input(event, 8);
+ break;
default:;
}
- return TIMER_NOT_ARMED;
+ return TIMER_NOT_ARMED;
}
-static unsigned long
-timer_get_time (int dev)
+static u_long
+timer_get_time(int dev)
{
- if (!opened)
- return 0;
+ if (!opened)
+ return 0;
- return curr_ticks;
+ return curr_ticks;
}
static int
-timer_ioctl (int dev,
- unsigned int cmd, unsigned int arg)
+timer_ioctl(int dev, u_int cmd, ioctl_arg arg)
{
- switch (cmd)
- {
+ switch (cmd) {
case SNDCTL_TMR_SOURCE:
- return IOCTL_OUT (arg, TMR_INTERNAL);
- break;
+ return *(int *) arg = TMR_INTERNAL;
+ break;
case SNDCTL_TMR_START:
- tmr_reset ();
- tmr_running = 1;
- return 0;
- break;
+ tmr_reset();
+ tmr_running = 1;
+ return 0;
+ break;
case SNDCTL_TMR_STOP:
- tmr_running = 0;
- return 0;
- break;
+ tmr_running = 0;
+ return 0;
+ break;
case SNDCTL_TMR_CONTINUE:
- tmr_running = 1;
- return 0;
- break;
+ tmr_running = 1;
+ return 0;
+ break;
case SNDCTL_TMR_TIMEBASE:
- {
- int val = IOCTL_IN (arg);
-
- if (val)
- {
- if (val < 1)
- val = 1;
- if (val > 1000)
- val = 1000;
- curr_timebase = val;
- }
-
- return IOCTL_OUT (arg, curr_timebase);
- }
- break;
+ {
+ int val = (*(int *) arg);
+
+ if (val) {
+ if (val < 1)
+ val = 1;
+ if (val > 1000)
+ val = 1000;
+ curr_timebase = val;
+ }
+ return *(int *) arg = curr_timebase;
+ }
+ break;
case SNDCTL_TMR_TEMPO:
- {
- int val = IOCTL_IN (arg);
-
- if (val)
- {
- if (val < 8)
- val = 8;
- if (val > 250)
- val = 250;
- tmr_offs = tmr_ctr;
- ticks_offs += tmr2ticks (tmr_ctr);
- tmr_ctr = 0;
- curr_tempo = val;
- reprogram_timer ();
- }
-
- return IOCTL_OUT (arg, curr_tempo);
- }
- break;
+ {
+ int val = (*(int *) arg);
+
+ if (val) {
+ if (val < 8)
+ val = 8;
+ if (val > 250)
+ val = 250;
+ tmr_offs = tmr_ctr;
+ ticks_offs += tmr2ticks(tmr_ctr);
+ tmr_ctr = 0;
+ curr_tempo = val;
+ reprogram_timer();
+ }
+ return *(int *) arg = curr_tempo;
+ }
+ break;
case SNDCTL_SEQ_CTRLRATE:
- if (IOCTL_IN (arg) != 0) /* Can't change */
- return RET_ERROR (EINVAL);
+ if ((*(int *) arg) != 0) /* Can't change */
+ return -(EINVAL);
- return IOCTL_OUT (arg, ((curr_tempo * curr_timebase) + 30) / 60);
- break;
+ return *(int *) arg = ((curr_tempo * curr_timebase) + 30) / 60;
+ break;
case SNDCTL_TMR_METRONOME:
- /* NOP */
- break;
+ /* NOP */
+ break;
- default:
+ default:;
}
- return RET_ERROR (EINVAL);
+ return -(EINVAL);
}
static void
-timer_arm (int dev, long time)
+timer_arm(int dev, long time)
{
- if (time < 0)
- time = curr_ticks + 1;
- else if (time <= curr_ticks) /* It's the time */
- return;
+ if (time < 0)
+ time = curr_ticks + 1;
+ else if (time <= curr_ticks) /* It's the time */
+ return;
- next_event_time = prev_event_time = time;
+ next_event_time = prev_event_time = time;
- return;
+ return;
}
static struct sound_timer_operations sound_timer =
{
- {"OPL-3/GUS Timer", 0},
- 1, /* Priority */
- 0, /* Local device link */
- timer_open,
- timer_close,
- timer_event,
- timer_get_time,
- timer_ioctl,
- timer_arm
+ {"GUS Timer", 0},
+ 1, /* Priority */
+ 0, /* Local device link */
+ timer_open,
+ timer_close,
+ timer_event,
+ timer_get_time,
+ timer_ioctl,
+ timer_arm
};
void
-sound_timer_interrupt (void)
+sound_timer_interrupt(void)
{
- gus_write8 (0x45, 0); /* Ack IRQ */
- timer_command (4, 0x80); /* Reset IRQ flags */
+ if (!opened)
+ return;
- if (!opened)
- return;
-
- if (curr_timer == 1)
- gus_write8 (0x45, 0x04); /* Start timer 1 again */
- else
- gus_write8 (0x45, 0x08); /* Start timer 2 again */
+ tmr->tmr_restart(tmr->dev);
- if (!tmr_running)
- return;
+ if (!tmr_running)
+ return;
- tmr_ctr++;
- curr_ticks = ticks_offs + tmr2ticks (tmr_ctr);
+ tmr_ctr++;
+ curr_ticks = ticks_offs + tmr2ticks(tmr_ctr);
- if (curr_ticks >= next_event_time)
- {
- next_event_time = 0xffffffff;
- sequencer_timer (NULL);
+ if (curr_ticks >= next_event_time) {
+ next_event_time = 0xffffffff;
+ sequencer_timer(0);
}
}
void
-sound_timer_init (int io_base)
+sound_timer_init(struct sound_lowlev_timer * t, char *name)
{
- int n;
+ int n;
- if (initialized)
- return; /* There is already a similar timer */
+ if (initialized || t == NULL)
+ return; /* There is already a similar timer */
- select_addr = io_base;
- data_addr = io_base + 1;
+ initialized = 1;
+ tmr = t;
- initialized = 1;
+ if (num_sound_timers >= MAX_TIMER_DEV)
+ n = 0; /* Overwrite the system timer */
+ else
+ n = num_sound_timers++;
-#if 1
- if (num_sound_timers >= MAX_TIMER_DEV)
- n = 0; /* Overwrite the system timer */
- else
- n = num_sound_timers++;
-#else
- n = 0;
-#endif
+ strcpy(sound_timer.info.name, name);
- sound_timer_devs[n] = &sound_timer;
+ sound_timer_devs[n] = &sound_timer;
}
#endif
diff --git a/sys/i386/isa/sound/soundcard.c b/sys/i386/isa/sound/soundcard.c
index 95eefb9..37601f0 100644
--- a/sys/i386/isa/sound/soundcard.c
+++ b/sys/i386/isa/sound/soundcard.c
@@ -1,599 +1,595 @@
/*
* sound/386bsd/soundcard.c
*
- * Soundcard driver for FreeBSD.
+ * Soundcard driver for 386BSD.
*
* Copyright by Hannu Savolainen 1993
- *
+ *
* Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * modification, are permitted provided that the following conditions are
+ * met: 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer. 2.
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
- *
- * $Id: soundcard.c,v 1.53 1997/09/14 03:12:54 peter Exp $
+ *
*/
#include <i386/isa/sound/sound_config.h>
+
+#if NSND > 0 /* from "snd.h" */
#include <vm/vm.h>
+#include <vm/vm_kern.h>
+#include <vm/vm_param.h>
+#include <vm/pmap.h>
#include <vm/vm_extern.h>
-
-#ifdef CONFIGURE_SOUNDCARD
+#include <sys/mman.h>
#include <i386/isa/sound/dev_table.h>
-#ifdef DEVFS
-#include <sys/devfsext.h>
-#endif /*DEVFS*/
+#include <i386/isa/isa_device.h>
+#include <i386/isa/isa.h>
-#define FIX_RETURN(ret) { \
- int tmp_ret = (ret); \
- if (tmp_ret<0) return -tmp_ret; else return 0; \
- }
-static int timer_running = 0;
-static struct callout_handle timer_ch;
+/*
+** Register definitions for DMA controller 1 (channels 0..3):
+*/
+#define DMA1_CHN(c) (IO_DMA1 + 1*(2*(c))) /* addr reg for channel c */
+#define DMA1_SMSK (IO_DMA1 + 1*10) /* single mask register */
+#define DMA1_MODE (IO_DMA1 + 1*11) /* mode register */
+#define DMA1_FFC (IO_DMA1 + 1*12) /* clear first/last FF */
+
+/*
+** Register definitions for DMA controller 2 (channels 4..7):
+*/
+#define DMA2_CHN(c) (IO_DMA2 + 2*(2*(c))) /* addr reg for channel c */
+#define DMA2_SMSK (IO_DMA2 + 2*10) /* single mask register */
+#define DMA2_MODE (IO_DMA2 + 2*11) /* mode register */
+#define DMA2_FFC (IO_DMA2 + 2*12) /* clear first/last FF */
+
-static int soundcards_installed = 0; /* Number of installed
- * soundcards */
+#define FIX_RETURN(ret) {if ((ret)<0) return -(ret); else return 0;}
+
+static int soundcards_installed = 0; /* Number of installed soundcards */
static int soundcard_configured = 0;
static struct fileinfo files[SND_NDEVS];
+struct selinfo selinfo[SND_NDEVS >> 4];
-#ifdef DEVFS
-static void * snd_devfs_token[SND_NDEVS];
-static void * sndstat_devfs_token;
-#endif
-struct selinfo selinfo[SND_NDEVS >> 4];
+void sndintr __P((int unit));
+int sndprobe __P((struct isa_device *));
+int sndattach __P((struct isa_device *));
+int sndmmap __P((dev_t dev, int offset, int nprot ));
-static int sndprobe (struct isa_device *dev);
-static int sndattach (struct isa_device *dev);
-static void sound_mem_init(void);
+static d_open_t sndopen;
+static d_close_t sndclose;
+static d_ioctl_t sndioctl;
+static d_read_t sndread;
+static d_write_t sndwrite;
+static d_poll_t sndpoll;
-static d_open_t sndopen;
-static d_close_t sndclose;
-static d_read_t sndread;
-static d_write_t sndwrite;
-static d_ioctl_t sndioctl;
-static d_poll_t sndpoll;
+static char driver_name[] = "snd";
#define CDEV_MAJOR 30
-static struct cdevsw snd_cdevsw =
- { sndopen, sndclose, sndread, sndwrite, /*30*/
- sndioctl, nostop, nullreset, nodevtotty,/* sound */
- sndpoll, nommap, NULL, "snd", NULL, -1 };
-
-struct isa_driver opldriver = {sndprobe, sndattach, "opl"};
-struct isa_driver sbdriver = {sndprobe, sndattach, "sb"};
-struct isa_driver sbxvidriver = {sndprobe, sndattach, "sbxvi"};
-struct isa_driver sbmididriver = {sndprobe, sndattach, "sbmidi"};
-struct isa_driver awedriver = {sndprobe, sndattach, "awe"};
-struct isa_driver pasdriver = {sndprobe, sndattach, "pas"};
-struct isa_driver mpudriver = {sndprobe, sndattach, "mpu"};
-struct isa_driver gusdriver = {sndprobe, sndattach, "gus"};
-struct isa_driver gusxvidriver = {sndprobe, sndattach, "gusxvi"};
-struct isa_driver gusmaxdriver = {sndprobe, sndattach, "gusmax"};
-struct isa_driver uartdriver = {sndprobe, sndattach, "uart"};
-struct isa_driver mssdriver = {sndprobe, sndattach, "mss"};
-#ifdef PC98
-struct isa_driver pcmdriver = {sndprobe, sndattach, "pcm"};
-#endif
+static struct cdevsw snd_cdevsw = {
+ sndopen, sndclose, sndread, sndwrite,
+ sndioctl, nxstop, nxreset, nxdevtotty,
+ sndpoll, sndmmap, nxstrategy, driver_name,
+ NULL, -1,
+};
-static int
-ipri_to_irq (unsigned short ipri);
-void
-adintr(INT_HANDLER_PARMS(unit,dummy))
-{
-#ifndef EXCLUDE_AD1848
- static short unit_to_irq[4] = { -1, -1, -1, -1 };
- struct isa_device *dev;
-
- if (unit_to_irq [unit] > 0)
- ad1848_interrupt(INT_HANDLER_CALL (unit_to_irq [unit]));
- else {
- dev = find_isadev (isa_devtab_null, &mssdriver, unit);
- if (!dev)
- printk ("ad1848: Couldn't determine unit\n");
- else {
- unit_to_irq [unit] = ipri_to_irq (dev->id_irq);
- ad1848_interrupt(INT_HANDLER_CALL (unit_to_irq [unit]));
- }
- }
-#endif
-}
-unsigned
-long
+
+static void sound_mem_init(void);
+
+/*
+ * for each "device XXX" entry in the config file, we have
+ * a struct isa_driver which is linked into isa_devtab_null[]
+ *
+ * XXX It is a bit stupid to call the generic routine so many times and
+ * switch then to the specific one, but the alternative way would be
+ * to replicate some code in the probe/attach routines.
+ */
+
+struct isa_driver opldriver = {sndprobe, sndattach, "opl"};
+struct isa_driver trixdriver = {sndprobe, sndattach, "trix"};
+struct isa_driver trixsbdriver = {sndprobe, sndattach, "trixsb"};
+struct isa_driver sbdriver = {sndprobe, sndattach, "sb"};
+struct isa_driver sbxvidriver = {sndprobe, sndattach, "sbxvi"};
+struct isa_driver sbmididriver = {sndprobe, sndattach, "sbmidi"};
+struct isa_driver awedriver = {sndprobe, sndattach, "awe"};
+struct isa_driver pasdriver = {sndprobe, sndattach, "pas"};
+struct isa_driver mpudriver = {sndprobe, sndattach, "mpu"};
+struct isa_driver gusdriver = {sndprobe, sndattach, "gus"};
+struct isa_driver gusxvidriver = {sndprobe, sndattach, "gusxvi"};
+struct isa_driver gusmaxdriver = {sndprobe, sndattach, "gusmax"};
+struct isa_driver uartdriver = {sndprobe, sndattach, "uart"};
+struct isa_driver mssdriver = {sndprobe, sndattach, "mss"};
+
+/* XXX does this work ? lr 970714 */
+struct isa_driver sscapedriver = {sndprobe, sndattach, "ss_mss"};
+
+short ipri_to_irq(u_short ipri);
+
+u_long
get_time(void)
{
-struct timeval timecopy;
-int x;
-
- x = splclock();
- timecopy = time;
- splx(x);
- return timecopy.tv_usec/(1000000/HZ) +
- (unsigned long)timecopy.tv_sec*HZ;
+ struct timeval timecopy;
+ int x;
+
+ x = splclock();
+ timecopy = time;
+ splx(x);
+ return timecopy.tv_usec / (1000000 / hz) +
+ (u_long) timecopy.tv_sec * hz;
}
-
-static int
-sndread (dev_t dev, struct uio *buf, int ioflag)
+int
+sndmmap( dev_t dev, int offset, int nprot )
{
- int count = buf->uio_resid;
+ int unit;
+ struct dma_buffparms * dmap;
- dev = minor (dev);
+ dev = minor(dev) >> 4;
+ if (dev > 0 ) return (-1);
- FIX_RETURN (sound_read_sw (dev, &files[dev], buf, count));
+ dmap = audio_devs[dev]->dmap_out;
+
+ if (nprot & PROT_EXEC)
+ return( -1 );
+ dmap->mapping_flags |= DMA_MAP_MAPPED ;
+ return( i386_btop(vtophys(dmap->raw_buf) + offset) );
}
+
static int
-sndwrite (dev_t dev, struct uio *buf, int ioflag)
+sndread(dev_t dev, struct uio * buf, int flag)
{
- int count = buf->uio_resid;
+ int count = buf->uio_resid;
+
+ dev = minor(dev);
+ FIX_RETURN(sound_read_sw(dev, &files[dev], buf, count));
+}
+
- dev = minor (dev);
+static int
+sndwrite(dev_t dev, struct uio * buf, int flag)
+{
+ int count = buf->uio_resid;
- FIX_RETURN (sound_write_sw (dev, &files[dev], buf, count));
+ dev = minor(dev);
+ FIX_RETURN(sound_write_sw(dev, &files[dev], buf, count));
}
static int
-sndopen (dev_t dev, int flags, int fmt, struct proc *p)
+sndopen(dev_t dev, int flags, int mode, struct proc * p)
{
- dev = minor (dev);
+ int retval;
+ struct fileinfo tmp_file;
- if (!soundcard_configured && dev)
- {
- printk ("SoundCard Error: The soundcard system has not been configured\n");
- FIX_RETURN (-ENODEV);
+ dev = minor(dev);
+ if (!soundcard_configured && dev) {
+ printf("SoundCard Error: soundcard system has not been configured\n");
+ return ENODEV ;
}
+ tmp_file.mode = 0;
- files[dev].mode = 0;
+ if (flags & FREAD && flags & FWRITE)
+ tmp_file.mode = OPEN_READWRITE;
+ else if (flags & FREAD)
+ tmp_file.mode = OPEN_READ;
+ else if (flags & FWRITE)
+ tmp_file.mode = OPEN_WRITE;
- if (flags & FREAD && flags & FWRITE)
- files[dev].mode = OPEN_READWRITE;
- else if (flags & FREAD)
- files[dev].mode = OPEN_READ;
- else if (flags & FWRITE)
- files[dev].mode = OPEN_WRITE;
+ selinfo[dev >> 4].si_pid = 0;
+ selinfo[dev >> 4].si_flags = 0;
+ if ((retval = sound_open_sw(dev, &tmp_file)) < 0)
+ FIX_RETURN(retval);
- selinfo[dev >> 4].si_pid = 0;
- selinfo[dev >> 4].si_flags = 0;
+ bcopy((char *) &tmp_file, (char *) &files[dev], sizeof(tmp_file));
- FIX_RETURN(sound_open_sw (dev, &files[dev]));
+ FIX_RETURN(retval);
}
+
static int
-sndclose (dev_t dev, int flags, int fmt, struct proc *p)
+sndclose(dev_t dev, int flags, int mode, struct proc * p)
{
+ dev = minor(dev);
+ sound_release_sw(dev, &files[dev]);
- dev = minor (dev);
-
- sound_release_sw(dev, &files[dev]);
- FIX_RETURN (0);
+ return 0 ;
}
static int
-sndioctl (dev_t dev, int cmd, caddr_t arg, int flags, struct proc *p)
+sndioctl(dev_t dev, int cmd, caddr_t arg, int mode, struct proc * p)
{
- dev = minor (dev);
-
- FIX_RETURN (sound_ioctl_sw (dev, &files[dev], cmd, (unsigned int) arg));
+ dev = minor(dev);
+ FIX_RETURN(sound_ioctl_sw(dev, &files[dev], cmd, arg));
}
-static int
-sndpoll (dev_t dev, int events, struct proc *p)
+int
+sndpoll(dev_t dev, int events, struct proc * p)
{
- dev = minor (dev);
+ dev = minor(dev);
+ dev = minor(dev);
- DEB (printk ("snd_poll(dev=%d, rw=%d, pid=%d)\n", dev, rw, p->p_pid));
+ /* printf ("snd_select(dev=%d, rw=%d, pid=%d)\n", dev, rw, p->p_pid); */
#ifdef ALLOW_SELECT
- switch (dev & 0x0f)
- {
-#ifndef EXCLUDE_SEQUENCER
+ switch (dev & 0x0f) {
+#ifdef EXCLUDE_SEQUENCER
case SND_DEV_SEQ:
case SND_DEV_SEQ2:
- return sequencer_poll (dev, &files[dev], events, p);
- break;
+ return sequencer_poll(dev, &files[dev], events, p);
+ break;
#endif
-#ifndef EXCLUDE_MIDI
+#ifdef EXCLUDE_MIDI
case SND_DEV_MIDIN:
- return MIDIbuf_poll (dev, &files[dev], events, p);
- break;
+ return MIDIbuf_poll(dev, &files[dev], events, p);
+ break;
#endif
-#ifndef EXCLUDE_AUDIO
+#ifdef CONFIG_AUDIO
case SND_DEV_DSP:
case SND_DEV_DSP16:
case SND_DEV_AUDIO:
- return audio_poll (dev, &files[dev], events, p);
- break;
+
+ return audio_poll(dev, &files[dev], events, p);
+ break;
#endif
default:
- return 0;
+ return 0;
}
-#endif
+#endif /* ALLOW_SELECT */
+ DEB(printf("sound_ioctl(dev=%d, cmd=0x%x, arg=0x%x)\n", dev, cmd, arg));
- return 0;
+ return 0 ;
}
-static int
-ipri_to_irq (unsigned short ipri)
+/* XXX this should become ffs(ipri), perhaps -1 lr 970705 */
+short
+ipri_to_irq(u_short ipri)
{
- /*
- * Converts the ipri (bitmask) to the corresponding irq number
- */
- int irq;
+ /*
+ * Converts the ipri (bitmask) to the corresponding irq number
+ */
+ int irq;
- for (irq = 0; irq < 16; irq++)
- if (ipri == (1 << irq))
- return irq;
+ for (irq = 0; irq < 16; irq++)
+ if (ipri == (1 << irq))
+ return irq;
- return -1; /* Invalid argument */
+ return -1; /* Invalid argument */
}
static int
-driver_to_voxunit(struct isa_driver *driver)
+driver_to_voxunit(struct isa_driver * driver)
{
- /* converts a sound driver pointer into the equivalent
- VoxWare device unit number */
- if(driver == &opldriver)
- return(SNDCARD_ADLIB);
- else if(driver == &sbdriver)
- return(SNDCARD_SB);
- else if(driver == &pasdriver)
- return(SNDCARD_PAS);
- else if(driver == &gusdriver)
- return(SNDCARD_GUS);
- else if(driver == &mpudriver)
- return(SNDCARD_MPU401);
- else if(driver == &sbxvidriver)
- return(SNDCARD_SB16);
- else if(driver == &sbmididriver)
- return(SNDCARD_SB16MIDI);
- else if(driver == &awedriver)
- return(SNDCARD_AWE32);
- else if(driver == &uartdriver)
- return(SNDCARD_UART6850);
- else if(driver == &gusdriver)
- return(SNDCARD_GUS16);
- else if(driver == &mssdriver)
- return(SNDCARD_MSS);
-#ifdef PC98
- else if(driver == &pcmdriver)
- return(SNDCARD_PCM86);
-#endif
- else
- return(0);
+ /*
+ * converts a sound driver pointer into the equivalent VoxWare device
+ * unit number
+ */
+ if (driver == &opldriver)
+ return (SNDCARD_ADLIB);
+ else if (driver == &sbdriver)
+ return (SNDCARD_SB);
+ else if (driver == &pasdriver)
+ return (SNDCARD_PAS);
+ else if (driver == &gusdriver)
+ return (SNDCARD_GUS);
+ else if (driver == &mpudriver)
+ return (SNDCARD_MPU401);
+ else if (driver == &sbxvidriver)
+ return (SNDCARD_SB16);
+ else if (driver == &sbmididriver)
+ return (SNDCARD_SB16MIDI);
+ else if(driver == &awedriver)
+ return(SNDCARD_AWE32);
+ else if (driver == &uartdriver)
+ return (SNDCARD_UART6850);
+ else if (driver == &gusdriver)
+ return (SNDCARD_GUS16);
+ else if (driver == &mssdriver)
+ return (SNDCARD_MSS);
+ else if (driver == &trixdriver)
+ return (SNDCARD_TRXPRO);
+ else if (driver == &trixsbdriver)
+ return (SNDCARD_TRXPRO_SB);
+ else if (driver == &sscapedriver)
+ return (SNDCARD_SSCAPE_MSS);
+ else
+ return (0);
}
-static int
-sndprobe (struct isa_device *dev)
+/*
+ * very dirty: tmp_osp is allocated in sndprobe, and used at the next
+ * call in sndattach
+ */
+
+static sound_os_info *temp_osp;
+
+/*
+ * sndprobe is called for each isa_device. From here, a voxware unit
+ * number is determined, and the appropriate probe routine is selected.
+ * The parameters from the config line are passed to the hw_config struct.
+ */
+
+int
+sndprobe(struct isa_device * dev)
{
- struct address_info hw_config;
- int unit;
-
- unit = driver_to_voxunit(dev->id_driver);
- hw_config.io_base = dev->id_iobase;
- hw_config.irq = ipri_to_irq (dev->id_irq);
- hw_config.dma = dev->id_drq;
- hw_config.dma_read = dev->id_flags; /* misuse the flags field for read dma*/
-
- if(unit) {
- int result;
-
- result = sndtable_probe (unit, &hw_config);
- dev->id_iobase = hw_config.io_base;
- dev->id_irq = hw_config.irq == -1 ? 0 : (1 << hw_config.irq);
- dev->id_drq = hw_config.dma;
-
- return result;
- } else
- return 0;
+ struct address_info hw_config;
+ int unit;
+
+ temp_osp = (sound_os_info *)malloc(sizeof(sound_os_info),
+ M_DEVBUF, M_NOWAIT);
+ if (!temp_osp)
+ panic("SOUND: Cannot allocate memory\n");
+
+ /*
+ * get config info from the kernel config. These may be overridden
+ * by the local autoconfiguration routines though (e.g. pnp stuff).
+ */
+
+ hw_config.io_base = dev->id_iobase;
+ hw_config.irq = ipri_to_irq(dev->id_irq);
+ hw_config.dma = dev->id_drq;
+
+ /*
+ * misuse the flags field for read dma. Note that, to use 0 as
+ * read dma channel, one of the high bits should be set. lr970705 XXX
+ */
+
+ if (dev->id_flags != 0)
+ hw_config.dma2 = dev->id_flags & 0x7;
+ else
+ hw_config.dma2 = -1;
+
+ hw_config.always_detect = 0;
+ hw_config.name = NULL;
+ hw_config.card_subtype = 0;
+
+ temp_osp->unit = dev->id_unit;
+ hw_config.osp = temp_osp;
+ unit = driver_to_voxunit(dev->id_driver);
+
+ if (sndtable_probe(unit, &hw_config)) {
+ dev->id_iobase = hw_config.io_base;
+ dev->id_irq = hw_config.irq == -1 ? 0 : (1 << hw_config.irq);
+ dev->id_drq = hw_config.dma;
+
+ if (hw_config.dma != hw_config.dma2 && ( hw_config.dma2 != -1))
+ dev->id_flags = hw_config.dma2 | 0x100; /* XXX lr */
+ else
+ dev->id_flags = 0;
+ return TRUE;
+ }
+ return 0;
}
-static int
-sndattach (struct isa_device *dev)
+int
+sndattach(struct isa_device * dev)
{
- int unit;
- int minor;
- int voxunit;
- static int midi_initialized = 0;
- static int seq_initialized = 0;
- unsigned long mem_start = 0xefffffffUL;
- struct address_info hw_config;
-
- unit = dev->id_unit;
- voxunit = driver_to_voxunit(dev->id_driver);
- hw_config.io_base = dev->id_iobase;
- hw_config.irq = ipri_to_irq (dev->id_irq);
- hw_config.dma = dev->id_drq;
- hw_config.dma_read = dev->id_flags; /* misuse the flags field for read dma*/
-
- if(!voxunit)
- return FALSE;
- if (!sndtable_init_card (voxunit, &hw_config))
- {
- printf (" <Driver not configured>");
- return FALSE;
+ int unit;
+ static int midi_initialized = 0;
+ static int seq_initialized = 0;
+ struct address_info hw_config;
+
+ unit = driver_to_voxunit(dev->id_driver);
+ hw_config.io_base = dev->id_iobase;
+ hw_config.irq = ipri_to_irq(dev->id_irq);
+ hw_config.dma = dev->id_drq;
+
+ /* misuse the flags field for read dma */
+ if (dev->id_flags != 0)
+ hw_config.dma2 = dev->id_flags & 0x7;
+ else
+ hw_config.dma2 = -1;
+
+ hw_config.card_subtype = 0;
+ hw_config.osp = temp_osp;
+
+ if (!unit)
+ return FALSE;
+
+ if (!(sndtable_init_card(unit, &hw_config))) { /* init card */
+ printf(" <Driver not configured>");
+ return FALSE;
}
+ /*
+ * Init the high level sound driver
+ */
- /*
- * Init the high level sound driver
- */
-
- if (!(soundcards_installed = sndtable_get_cardcount ()))
- {
- printf (" <No such hardware>");
- return FALSE; /* No cards detected */
+ if (!(soundcards_installed = sndtable_get_cardcount())) {
+ DDB(printf("No drivers actually installed\n"));
+ return FALSE; /* No cards detected */
}
+ printf("\n");
- printf("\n");
-
-#ifndef EXCLUDE_AUDIO
- if (num_audiodevs) /* Audio devices present */
- {
- mem_start = DMAbuf_init (mem_start);
- mem_start = audio_init (mem_start);
- sound_mem_init ();
+#ifdef CONFIG_AUDIO
+ if (num_audiodevs) { /* Audio devices present */
+ DMAbuf_init();
+ sound_mem_init();
}
-
- soundcard_configured = 1;
+ soundcard_configured = 1;
#endif
-#ifndef EXCLUDE_MIDI
- if (num_midis && !midi_initialized)
- {
- midi_initialized = 1;
- mem_start = MIDIbuf_init (mem_start);
- }
-#endif
+ if (num_midis && !midi_initialized)
+ midi_initialized = 1;
-#ifndef EXCLUDE_SEQUENCER
- if ((num_midis + num_synths) && !seq_initialized)
- {
- seq_initialized = 1;
- mem_start = sequencer_init (mem_start);
+ if ((num_midis + num_synths) && !seq_initialized) {
+ seq_initialized = 1;
+ sequencer_init();
}
-#endif
-#ifdef DEVFS
-/* XXX */ /* should only create devices if that card has them */
- if ( ! sndstat_devfs_token)
- {
- sndstat_devfs_token =
- devfs_add_devswf(&snd_cdevsw, SND_DEV_STATUS, DV_CHR, UID_ROOT,
- GID_WHEEL, 0600, "sndstat");
- }
-
- minor = (unit << 4)+SND_DEV_CTL;
- if ( ! snd_devfs_token[minor])
{
- snd_devfs_token[minor] =
- devfs_add_devswf(&snd_cdevsw, minor, DV_CHR, UID_ROOT,
- GID_WHEEL, 0600, "mixer%d", unit);
- }
+ dev_t dev;
-#ifndef EXCLUDE_SEQUENCER
- minor = (unit << 4)+SND_DEV_SEQ;
- if ( ! snd_devfs_token[minor])
- {
- snd_devfs_token[minor] =
- devfs_add_devswf(&snd_cdevsw, minor, DV_CHR, UID_ROOT,
- GID_WHEEL, 0600, "sequencer%d", unit);
- }
-
- minor = (unit << 4)+SND_DEV_SEQ2;
- if ( ! snd_devfs_token[minor])
- {
- snd_devfs_token[minor] =
- devfs_add_devswf(&snd_cdevsw, minor, DV_CHR, UID_ROOT,
- GID_WHEEL, 0600, "music%d", unit);
+ dev = makedev(CDEV_MAJOR, 0);
+ cdevsw_add(&dev, &snd_cdevsw, NULL);
}
-#endif
-#ifndef EXCLUDE_MIDI
- minor = (unit << 4)+SND_DEV_MIDIN;
- if ( ! snd_devfs_token[minor])
- {
- snd_devfs_token[minor] =
- devfs_add_devswf(&snd_cdevsw, minor, DV_CHR, UID_ROOT,
- GID_WHEEL, 0600, "midi%d", unit);
- }
-#endif
-#ifndef EXCLUDE_AUDIO
- minor = (unit << 4)+SND_DEV_DSP;
- if ( ! snd_devfs_token[minor])
- {
- snd_devfs_token[minor] =
- devfs_add_devswf(&snd_cdevsw, minor, DV_CHR, UID_ROOT,
- GID_WHEEL, 0600, "dsp%d", unit);
- }
+ return TRUE;
+}
- minor = (unit << 4)+SND_DEV_AUDIO;
- if ( ! snd_devfs_token[minor])
- {
- snd_devfs_token[minor] =
- devfs_add_devswf(&snd_cdevsw, minor, DV_CHR, UID_ROOT,
- GID_WHEEL, 0600, "audio%d", unit);
- }
- minor = (unit << 4)+SND_DEV_DSP16;
- if ( ! snd_devfs_token[minor])
- {
- snd_devfs_token[minor] =
- devfs_add_devswf(&snd_cdevsw, minor, DV_CHR, UID_ROOT,
- GID_WHEEL, 0600, "dspW%d", unit);
+#ifdef CONFIG_AUDIO
+
+static void
+alloc_dmap(int dev, int chan, struct dma_buffparms * dmap)
+{
+ char *tmpbuf;
+ int i;
+
+ tmpbuf = contigmalloc(audio_devs[dev]->buffsize, M_DEVBUF, M_NOWAIT,
+ 0ul, 0xfffffful, 1ul, chan & 4 ? 0x20000ul : 0x10000ul);
+ if (tmpbuf == NULL)
+ printf("soundcard buffer alloc failed \n");
+
+ if (tmpbuf == NULL) {
+ printf("snd: Unable to allocate %d bytes of buffer\n",
+ 2 * (int) audio_devs[dev]->buffsize);
+ return;
}
+ dmap->raw_buf = tmpbuf;
+ /*
+ * Use virtual address as the physical address, since isa_dmastart
+ * performs the phys address computation.
+ */
+
+ dmap->raw_buf_phys = (u_long) tmpbuf;
+ for (i = 0; i < audio_devs[dev]->buffsize; i++) *tmpbuf++ = 0x80;
+
+}
+
+static void
+sound_mem_init(void)
+{
+ int dev;
+ static u_long dsp_init_mask = 0;
+
+ for (dev = 0; dev < num_audiodevs; dev++) /* Enumerate devices */
+ if (!(dsp_init_mask & (1 << dev))) /* Not already done */
+ if (audio_devs[dev]->dmachan1 >= 0) {
+ dsp_init_mask |= (1 << dev);
+ audio_devs[dev]->buffsize = DSP_BUFFSIZE;
+ /* Now allocate the buffers */
+ alloc_dmap(dev, audio_devs[dev]->dmachan1,
+ audio_devs[dev]->dmap_out);
+ if (audio_devs[dev]->flags & DMA_DUPLEX)
+ alloc_dmap(dev, audio_devs[dev]->dmachan2,
+ audio_devs[dev]->dmap_in);
+ } /* for dev */
+}
+
#endif
- minor = (unit << 4)+SND_DEV_SNDPROC;
- if ( ! snd_devfs_token[minor])
- {
- snd_devfs_token[minor] =
- devfs_add_devswf(&snd_cdevsw, minor, DV_CHR, UID_ROOT,
- GID_WHEEL, 0600, "pss%d", unit);
+
+int
+snd_ioctl_return(int *addr, int value)
+{
+ if (value < 0)
+ return value; /* Error */
+ suword(addr, value);
+ return 0;
+}
+
+#define MAX_UNIT 50
+typedef void (*irq_proc_t) (int irq);
+static irq_proc_t irq_proc[MAX_UNIT] = {NULL};
+static int irq_irq[MAX_UNIT] = {0};
+
+int
+snd_set_irq_handler(int int_lvl, void (*hndlr) (int), sound_os_info * osp)
+{
+ if (osp->unit >= MAX_UNIT) {
+ printf("Sound error: Unit number too high (%d)\n", osp->unit);
+ return 0;
}
-#endif /* DEVFS */
- return TRUE;
+ irq_proc[osp->unit] = hndlr;
+ irq_irq[osp->unit] = int_lvl;
+ return 1;
}
void
-tenmicrosec (void)
+sndintr(int unit)
{
- int i;
+ if ( (unit >= MAX_UNIT) || (irq_proc[unit] == NULL) )
+ return;
- for (i = 0; i < 16; i++)
- inb (0x80);
+ irq_proc[unit] (irq_irq[unit]); /* Call the installed handler */
}
-#ifndef EXCLUDE_SEQUENCER
void
-request_sound_timer (int count)
+conf_printf(char *name, struct address_info * hw_config)
{
- static int current = 0;
- int tmp = count;
-
- if (count < 0)
- timeout (sequencer_timer, 0, -count);
- else
- {
+ if (!trace_init)
+ return;
- if (count < current)
- current = 0; /* Timer restarted */
+ printf("<%s> ", name);
+ if (hw_config->io_base != -1 )
+ printf("at 0x%03x", hw_config->io_base);
- count = count - current;
+ if (hw_config->irq != -1 )
+ printf(" irq %d", hw_config->irq);
- current = tmp;
+ if (hw_config->dma != -1 || hw_config->dma2 != -1) {
+ printf(" dma %d", hw_config->dma);
+ if (hw_config->dma2 != -1)
+ printf(",%d", hw_config->dma2);
+ }
- if (!count)
- count = 1;
- timer_ch = timeout (sequencer_timer, 0, count);
- }
- timer_running = 1;
}
void
-sound_stop_timer (void)
+conf_printf2(char *name, int base, int irq, int dma, int dma2)
{
- if (timer_running)
- untimeout (sequencer_timer, 0, timer_ch);
- timer_running = 0;
-}
-#endif
+ if (!trace_init)
+ return;
-#ifndef EXCLUDE_AUDIO
-static void
-sound_mem_init (void)
-{
- int dev;
- unsigned long dma_pagesize;
- struct dma_buffparms *dmap;
- static unsigned long dsp_init_mask = 0;
-
- for (dev = 0; dev < num_audiodevs; dev++) /* Enumerate devices */
- if (!(dsp_init_mask & (1 << dev))) /* Not already done */
-#ifdef PC98
- if (audio_devs[dev]->buffcount > 0 && audio_devs[dev]->dmachan >= 0)
-#else
- if (audio_devs[dev]->buffcount > 0 && audio_devs[dev]->dmachan > 0)
-#endif
- {
- dsp_init_mask |= (1 << dev);
- dmap = audio_devs[dev]->dmap;
-
- if (audio_devs[dev]->flags & DMA_AUTOMODE)
- audio_devs[dev]->buffcount = 1;
-
- audio_devs[dev]->buffsize &= ~0xfff; /* Truncate to n*4k */
-
- if (audio_devs[dev]->dmachan > 3 && audio_devs[dev]->buffsize > 65536)
- dma_pagesize = 131072; /* 128k */
- else
- dma_pagesize = 65536;
-
- /* More sanity checks */
-
- if (audio_devs[dev]->buffsize > dma_pagesize)
- audio_devs[dev]->buffsize = dma_pagesize;
- if (audio_devs[dev]->buffsize < 4096)
- audio_devs[dev]->buffsize = 4096;
-
- /* Now allocate the buffers */
-
- for (dmap->raw_count = 0; dmap->raw_count < audio_devs[dev]->buffcount; dmap->raw_count++)
- {
- char *tmpbuf = (char *)vm_page_alloc_contig(audio_devs[dev]->buffsize, 0ul, 0xfffffful, dma_pagesize);
-
- if (tmpbuf == NULL)
- {
- printk ("snd: Unable to allocate %ld bytes of buffer\n",
- audio_devs[dev]->buffsize);
- return;
- }
-
- dmap->raw_buf[dmap->raw_count] = tmpbuf;
- /*
- * Use virtual address as the physical address, since
- * isa_dmastart performs the phys address computation.
- */
- dmap->raw_buf_phys[dmap->raw_count] =
- (unsigned long) dmap->raw_buf[dmap->raw_count];
- }
- } /* for dev */
+ printf("<%s> at 0x%03x", name, base);
-}
+ if (irq)
+ printf(" irq %d", irq);
+
+ if (dma != -1 || dma2 != -1) {
+ printf(" dma %d", dma);
+ if (dma2 != -1)
+ printf(",%d", dma2);
+ }
-#endif
-int
-snd_set_irq_handler (int interrupt_level, INT_HANDLER_PROTO(), char *name)
-{
- return 1;
}
-void
-snd_release_irq(int vect)
+void tenmicrosec (int j)
{
+ int i, k;
+ for (k = 0; k < j/10 ; k++) {
+ for (i = 0; i < 16; i++)
+ inb (0x80);
+ }
}
-static snd_devsw_installed = 0;
+#endif /* NSND > 0 */
-static void
-snd_drvinit(void *unused)
-{
- dev_t dev;
- if( ! snd_devsw_installed ) {
- dev = makedev(CDEV_MAJOR, 0);
- cdevsw_add(&dev,&snd_cdevsw, NULL);
- snd_devsw_installed = 1;
- }
-}
-
-SYSINIT(snddev,SI_SUB_DRIVERS,SI_ORDER_MIDDLE+CDEV_MAJOR,snd_drvinit,NULL)
-#endif
diff --git a/sys/i386/isa/sound/soundvers.h b/sys/i386/isa/sound/soundvers.h
index ca892e8..66ca10d 100644
--- a/sys/i386/isa/sound/soundvers.h
+++ b/sys/i386/isa/sound/soundvers.h
@@ -1 +1,2 @@
-#define SOUND_VERSION_STRING "3.0-beta-950506"
+#define SOUND_VERSION_STRING "3.5-alpha15-970902"
+#define SOUND_INTERNAL_VERSION 0x030518
diff --git a/sys/i386/isa/sound/sscape.c b/sys/i386/isa/sound/sscape.c
index 23d39ce..3ba866e 100644
--- a/sys/i386/isa/sound/sscape.c
+++ b/sys/i386/isa/sound/sscape.c
@@ -1,10 +1,10 @@
/*
* sound/sscape.c
- *
+ *
* Low level driver for Ensoniq Soundscape
- *
+ *
* Copyright by Hannu Savolainen 1994
- *
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met: 1. Redistributions of source code must retain the above copyright
@@ -12,7 +12,7 @@
* Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
@@ -24,17 +24,17 @@
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
- *
+ *
*/
#include <i386/isa/sound/sound_config.h>
-#if defined(CONFIGURE_SOUNDCARD) && !defined(EXCLUDE_SSCAPE)
+#if NSSCAPE > 0
#include <i386/isa/sound/coproc.h>
/*
- * I/O ports
+ * I/O ports
*/
#define MIDI_DATA 0
#define MIDI_CTRL 1
@@ -46,7 +46,7 @@
#define ODIE_DATA 5
/*
- * Indirect registers
+ * Indirect registers
*/
#define GA_INTSTAT_REG 0
#define GA_INTENA_REG 1
@@ -75,6 +75,10 @@
#define CMD_GET_BOARD_TYPE 0x82
#define CMD_SET_CONTROL 0x88
#define CMD_GET_CONTROL 0x89
+#define CTL_MASTER_VOL 0
+#define CTL_MIC_MODE 2
+#define CTL_SYNTH_VOL 4
+#define CTL_WAVE_VOL 7
#define CMD_SET_MT32 0x96
#define CMD_GET_MT32 0x97
#define CMD_SET_EXTMIDI 0x9b
@@ -82,748 +86,689 @@
#define CMD_ACK 0x80
-typedef struct sscape_info
- {
- int base, irq, dma;
- int ok; /* Properly detected */
- int dma_allocated;
- int my_audiodev;
- int opened;
- }
+typedef struct sscape_info {
+ int base, irq, dma;
+ int ok; /* Properly detected */
+ int failed;
+ int dma_allocated;
+ int my_audiodev;
+ int opened;
+ sound_os_info *osp;
+}
-sscape_info;
+ sscape_info;
static struct sscape_info dev_info =
{0};
static struct sscape_info *devc = &dev_info;
-DEFINE_WAIT_QUEUE (sscape_sleeper, sscape_sleep_flag);
+static int *sscape_sleeper = NULL;
+static volatile struct snd_wait sscape_sleep_flag =
+{0};
-#ifdef REVEAL_SPEA
-/* Spea and Reveal have assigned interrupt bits differently than Ensoniq */
-static char valid_interrupts[] =
+/* Some older cards have assigned interrupt bits differently than new ones */
+static char valid_interrupts_old[] =
{9, 7, 5, 15};
-#else
-static char valid_interrupts[] =
+static char valid_interrupts_new[] =
{9, 5, 7, 10};
+static char *valid_interrupts = valid_interrupts_new;
+
+#ifdef REVEAL_SPEA
+static char old_hardware = 1;
+
+#else
+static char old_hardware = 0;
+
#endif
-static unsigned char
-sscape_read (struct sscape_info *devc, int reg)
+static u_char
+sscape_read(struct sscape_info * devc, int reg)
{
- unsigned long flags;
- unsigned char val;
-
- DISABLE_INTR (flags);
- OUTB (reg, PORT (ODIE_ADDR));
- val = INB (PORT (ODIE_DATA));
- RESTORE_INTR (flags);
- return val;
+ u_long flags;
+ u_char val;
+
+ flags = splhigh();
+ outb(PORT(ODIE_ADDR), reg);
+ val = inb(PORT(ODIE_DATA));
+ splx(flags);
+ return val;
}
static void
-sscape_write (struct sscape_info *devc, int reg, int data)
+sscape_write(struct sscape_info * devc, int reg, int data)
{
- unsigned long flags;
+ u_long flags;
- DISABLE_INTR (flags);
- OUTB (reg, PORT (ODIE_ADDR));
- OUTB (data, PORT (ODIE_DATA));
- RESTORE_INTR (flags);
+ flags = splhigh();
+ outb(PORT(ODIE_ADDR), reg);
+ outb(PORT(ODIE_DATA), data);
+ splx(flags);
}
static void
-host_open (struct sscape_info *devc)
+host_open(struct sscape_info * devc)
{
- OUTB (0x00, PORT (HOST_CTRL)); /* Put the board to the host mode */
+ outb(PORT(HOST_CTRL), 0x00); /* Put the board to the host mode */
}
static void
-host_close (struct sscape_info *devc)
+host_close(struct sscape_info * devc)
{
- OUTB (0x03, PORT (HOST_CTRL)); /* Put the board to the MIDI mode */
+ outb(PORT(HOST_CTRL), 0x03); /* Put the board to the MIDI mode */
}
static int
-host_write (struct sscape_info *devc, unsigned char *data, int count)
+host_write(struct sscape_info * devc, u_char *data, int count)
{
- unsigned long flags;
- int i, timeout;
+ u_long flags;
+ int i, timeout_val;
- DISABLE_INTR (flags);
+ flags = splhigh();
- /*
- * Send the command and data bytes
- */
+ /*
+ * Send the command and data bytes
+ */
- for (i = 0; i < count; i++)
- {
- for (timeout = 10000; timeout > 0; timeout--)
- if (INB (PORT (HOST_CTRL)) & TX_READY)
- break;
+ for (i = 0; i < count; i++) {
+ for (timeout_val = 10000; timeout_val > 0; timeout_val--)
+ if (inb(PORT(HOST_CTRL)) & TX_READY)
+ break;
- if (timeout <= 0)
- {
- RESTORE_INTR (flags);
- return 0;
+ if (timeout_val <= 0) {
+ splx(flags);
+ return 0;
+ }
+ outb(PORT(HOST_DATA), data[i]);
}
- OUTB (data[i], PORT (HOST_DATA));
- }
+ splx(flags);
- RESTORE_INTR (flags);
-
- return 1;
+ return 1;
}
static int
-host_read (struct sscape_info *devc)
+host_read(struct sscape_info * devc)
{
- unsigned long flags;
- int timeout;
- unsigned char data;
-
- DISABLE_INTR (flags);
+ u_long flags;
+ int timeout_val;
+ u_char data;
- /*
- * Read a byte
- */
+ flags = splhigh();
- for (timeout = 10000; timeout > 0; timeout--)
- if (INB (PORT (HOST_CTRL)) & RX_READY)
- break;
+ /*
+ * Read a byte
+ */
- if (timeout <= 0)
- {
- RESTORE_INTR (flags);
- return -1;
- }
+ for (timeout_val = 10000; timeout_val > 0; timeout_val--)
+ if (inb(PORT(HOST_CTRL)) & RX_READY)
+ break;
- data = INB (PORT (HOST_DATA));
+ if (timeout_val <= 0) {
+ splx(flags);
+ return -1;
+ }
+ data = inb(PORT(HOST_DATA));
- RESTORE_INTR (flags);
+ splx(flags);
- return data;
+ return data;
}
static int
-host_command1 (struct sscape_info *devc, int cmd)
+host_command1(struct sscape_info * devc, int cmd)
{
- unsigned char buf[10];
+ u_char buf[10];
- buf[0] = (unsigned char) (cmd & 0xff);
+ buf[0] = (u_char) (cmd & 0xff);
- return host_write (devc, buf, 1);
+ return host_write(devc, buf, 1);
}
static int
-host_command2 (struct sscape_info *devc, int cmd, int parm1)
+host_command2(struct sscape_info * devc, int cmd, int parm1)
{
- unsigned char buf[10];
+ u_char buf[10];
- buf[0] = (unsigned char) (cmd & 0xff);
- buf[1] = (unsigned char) (parm1 & 0xff);
+ buf[0] = (u_char) (cmd & 0xff);
+ buf[1] = (u_char) (parm1 & 0xff);
- return host_write (devc, buf, 2);
+ return host_write(devc, buf, 2);
}
static int
-host_command3 (struct sscape_info *devc, int cmd, int parm1, int parm2)
+host_command3(struct sscape_info * devc, int cmd, int parm1, int parm2)
{
- unsigned char buf[10];
+ u_char buf[10];
- buf[0] = (unsigned char) (cmd & 0xff);
- buf[1] = (unsigned char) (parm1 & 0xff);
- buf[2] = (unsigned char) (parm2 & 0xff);
+ buf[0] = (u_char) (cmd & 0xff);
+ buf[1] = (u_char) (parm1 & 0xff);
+ buf[2] = (u_char) (parm2 & 0xff);
- return host_write (devc, buf, 3);
+ return host_write(devc, buf, 3);
}
static void
-set_mt32 (struct sscape_info *devc, int value)
+set_mt32(struct sscape_info * devc, int value)
{
- host_open (devc);
- host_command2 (devc, CMD_SET_MT32,
- value ? 1 : 0);
- if (host_read (devc) != CMD_ACK)
- {
- printk ("SNDSCAPE: Setting MT32 mode failed\n");
- }
- host_close (devc);
+ host_open(devc);
+ host_command2(devc, CMD_SET_MT32,
+ value ? 1 : 0);
+ if (host_read(devc) != CMD_ACK) {
+ printf("SNDSCAPE: Setting MT32 mode failed\n");
+ }
+ host_close(devc);
+}
+
+static void
+set_control(struct sscape_info * devc, int ctrl, int value)
+{
+ host_open(devc);
+ host_command3(devc, CMD_SET_CONTROL, ctrl, value);
+ if (host_read(devc) != CMD_ACK) {
+ printf("SNDSCAPE: Setting control (%d) failed\n", ctrl);
+ }
+ host_close(devc);
}
static int
-get_board_type (struct sscape_info *devc)
+get_board_type(struct sscape_info * devc)
{
- int tmp;
-
- host_open (devc);
- if (!host_command1 (devc, CMD_GET_BOARD_TYPE))
- tmp = -1;
- else
- tmp = host_read (devc);
- host_close (devc);
- return tmp;
+ int tmp;
+
+ host_open(devc);
+ if (!host_command1(devc, CMD_GET_BOARD_TYPE))
+ tmp = -1;
+ else
+ tmp = host_read(devc);
+ host_close(devc);
+ return tmp;
}
void
-sscapeintr (INT_HANDLER_PARMS (irq, dummy))
+sscapeintr(int irq)
{
- unsigned char bits, tmp;
- static int debug = 0;
+ u_char bits, tmp;
+ static int debug = 0;
- printk ("sscapeintr(0x%02x)\n", (bits = sscape_read (devc, GA_INTSTAT_REG)));
- if (SOMEONE_WAITING (sscape_sleeper, sscape_sleep_flag))
- {
- WAKE_UP (sscape_sleeper, sscape_sleep_flag);
+ printf("sscapeintr(0x%02x)\n", (bits = sscape_read(devc, GA_INTSTAT_REG)));
+ if ((sscape_sleep_flag.mode & WK_SLEEP)) {
+ sscape_sleep_flag.mode = WK_WAKEUP;
+ wakeup(sscape_sleeper);
}
-
- if (bits & 0x02) /* Host interface interrupt */
- {
- printk ("SSCAPE: Host interrupt, data=%02x\n", host_read (devc));
+ if (bits & 0x02) { /* Host interface interrupt */
+ printf("SSCAPE: Host interrupt, data=%02x\n", host_read(devc));
}
-
-#if (!defined(EXCLUDE_MPU401) || !defined(EXCLUDE_MPU_EMU)) && !defined(EXCLUDE_MIDI)
- if (bits & 0x01)
- {
- mpuintr (INT_HANDLER_CALL (irq));
- if (debug++ > 10) /* Temporary debugging hack */
- {
- sscape_write (devc, GA_INTENA_REG, 0x00); /* Disable all interrupts */
+#if (defined(CONFIG_MPU401) || defined(CONFIG_MPU_EMU)) && defined(CONFIG_MIDI)
+ if (bits & 0x01) {
+ mpuintr(irq);
+ if (debug++ > 10) { /* Temporary debugging hack */
+ sscape_write(devc, GA_INTENA_REG, 0x00); /* Disable all interr. */
}
}
#endif
- /*
+ /*
* Acknowledge interrupts (toggle the interrupt bits)
- */
-
- tmp = sscape_read (devc, GA_INTENA_REG);
- sscape_write (devc, GA_INTENA_REG, (~bits & 0x0e) | (tmp & 0xf1));
-
-}
-
-static void
-sscape_enable_intr (struct sscape_info *devc, unsigned intr_bits)
-{
- unsigned char temp, orig;
-
- temp = orig = sscape_read (devc, GA_INTENA_REG);
- temp |= intr_bits;
- temp |= 0x80; /* Master IRQ enable */
-
- if (temp == orig)
- return; /* No change */
+ */
- sscape_write (devc, GA_INTENA_REG, temp);
+ tmp = sscape_read(devc, GA_INTENA_REG);
+ sscape_write(devc, GA_INTENA_REG, (~bits & 0x0e) | (tmp & 0xf1));
}
-static void
-sscape_disable_intr (struct sscape_info *devc, unsigned intr_bits)
-{
- unsigned char temp, orig;
-
- temp = orig = sscape_read (devc, GA_INTENA_REG);
- temp &= ~intr_bits;
- if ((temp & ~0x80) == 0x00)
- temp = 0x00; /* Master IRQ disable */
- if (temp == orig)
- return; /* No change */
-
- sscape_write (devc, GA_INTENA_REG, temp);
-}
static void
-do_dma (struct sscape_info *devc, int dma_chan, unsigned long buf, int blk_size, int mode)
+do_dma(struct sscape_info * devc, int dma_chan, u_long buf, int blk_size, int mode)
{
- unsigned char temp;
+ u_char temp;
- if (dma_chan != SSCAPE_DMA_A)
- {
- printk ("SSCAPE: Tried to use DMA channel != A. Why?\n");
- return;
+ if (dma_chan != SSCAPE_DMA_A) {
+ printf("SSCAPE: Tried to use DMA channel != A. Why?\n");
+ return;
}
+ DMAbuf_start_dma(devc->my_audiodev, buf, blk_size, mode);
- DMAbuf_start_dma (devc->my_audiodev,
- buf,
- blk_size, mode);
-
- temp = devc->dma << 4; /* Setup DMA channel select bits */
- if (devc->dma <= 3)
- temp |= 0x80; /* 8 bit DMA channel */
+ temp = devc->dma << 4; /* Setup DMA channel select bits */
+ if (devc->dma <= 3)
+ temp |= 0x80; /* 8 bit DMA channel */
- temp |= 1; /* Trigger DMA */
- sscape_write (devc, GA_DMAA_REG, temp);
- temp &= 0xfe; /* Clear DMA trigger */
- sscape_write (devc, GA_DMAA_REG, temp);
+ temp |= 1; /* Trigger DMA */
+ sscape_write(devc, GA_DMAA_REG, temp);
+ temp &= 0xfe; /* Clear DMA trigger */
+ sscape_write(devc, GA_DMAA_REG, temp);
}
static int
-verify_mpu (struct sscape_info *devc)
+verify_mpu(struct sscape_info * devc)
{
- /*
+ /*
* The SoundScape board could be in three modes (MPU, 8250 and host).
* If the card is not in the MPU mode, enabling the MPU driver will
* cause infinite loop (the driver believes that there is always some
* received data in the buffer.
- *
+ *
* Detect this by looking if there are more than 10 received MIDI bytes
* (0x00) in the buffer.
- */
+ */
- int i;
+ int i;
- for (i = 0; i < 10; i++)
- {
- if (INB (devc->base + HOST_CTRL) & 0x80)
- return 1;
+ for (i = 0; i < 10; i++) {
+ if (inb(devc->base + HOST_CTRL) & 0x80)
+ return 1;
- if (INB (devc->base) != 0x00)
- return 1;
+ if (inb(devc->base) != 0x00)
+ return 1;
}
- printk ("SoundScape: The device is not in the MPU-401 mode\n");
- return 0;
+ printf("SoundScape: The device is not in the MPU-401 mode\n");
+ return 0;
}
static int
-sscape_coproc_open (void *dev_info, int sub_device)
+sscape_coproc_open(void *dev_info, int sub_device)
{
- if (sub_device == COPR_MIDI)
- {
- set_mt32 (devc, 0);
- if (!verify_mpu (devc))
- return RET_ERROR (EIO);
+ if (sub_device == COPR_MIDI) {
+ set_mt32(devc, 0);
+ if (!verify_mpu(devc))
+ return -(EIO);
}
-
- return 0;
+ sscape_sleep_flag.aborting = 0;
+ sscape_sleep_flag.mode = WK_NONE;
+ return 0;
}
static void
-sscape_coproc_close (void *dev_info, int sub_device)
+sscape_coproc_close(void *dev_info, int sub_device)
{
- struct sscape_info *devc = dev_info;
- unsigned long flags;
+ struct sscape_info *devc = dev_info;
+ u_long flags;
- DISABLE_INTR (flags);
- if (devc->dma_allocated)
- {
- sscape_write (devc, GA_DMAA_REG, 0x20); /* DMA channel disabled */
-#ifndef EXCLUDE_NATIVE_PCM
- DMAbuf_close_dma (devc->my_audiodev);
+ flags = splhigh();
+ if (devc->dma_allocated) {
+ sscape_write(devc, GA_DMAA_REG, 0x20); /* DMA channel disabled */
+#ifdef CONFIG_NATIVE_PCM
#endif
- devc->dma_allocated = 0;
+ devc->dma_allocated = 0;
}
- RESET_WAIT_QUEUE (sscape_sleeper, sscape_sleep_flag);
- RESTORE_INTR (flags);
+ sscape_sleep_flag.aborting = 0;
+ sscape_sleep_flag.mode = WK_NONE;
+ splx(flags);
- return;
+ return;
}
static void
-sscape_coproc_reset (void *dev_info)
+sscape_coproc_reset(void *dev_info)
{
}
static int
-sscape_download_boot (struct sscape_info *devc, unsigned char *block, int size, int flag)
+sscape_download_boot(struct sscape_info * devc, u_char *block, int size, int flag)
{
- unsigned long flags;
- unsigned char temp;
- int done, timeout;
-
- if (flag & CPF_FIRST)
- {
- /*
- * First block. Have to allocate DMA and to reset the board
- * before continuing.
- */
-
- DISABLE_INTR (flags);
- if (devc->dma_allocated == 0)
- {
-#ifndef EXCLUDE_NATIVE_PCM
- if (DMAbuf_open_dma (devc->my_audiodev) < 0)
- {
- RESTORE_INTR (flags);
- return 0;
- }
-#endif
-
- devc->dma_allocated = 1;
+ u_long flags;
+ u_char temp;
+ int done, timeout_val;
+
+ if (flag & CPF_FIRST) {
+ /*
+ * First block. Have to allocate DMA and to reset the board
+ * before continuing.
+ */
+
+ flags = splhigh();
+ if (devc->dma_allocated == 0) {
+ devc->dma_allocated = 1;
}
- RESTORE_INTR (flags);
+ splx(flags);
- sscape_write (devc, GA_HMCTL_REG,
- (temp = sscape_read (devc, GA_HMCTL_REG)) & 0x3f); /*Reset */
+ sscape_write(devc, GA_HMCTL_REG,
+ (temp = sscape_read(devc, GA_HMCTL_REG)) & 0x3f); /* Reset */
- for (timeout = 10000; timeout > 0; timeout--)
- sscape_read (devc, GA_HMCTL_REG); /* Delay */
+ for (timeout_val = 10000; timeout_val > 0; timeout_val--)
+ sscape_read(devc, GA_HMCTL_REG); /* Delay */
- /* Take board out of reset */
- sscape_write (devc, GA_HMCTL_REG,
- (temp = sscape_read (devc, GA_HMCTL_REG)) | 0x80);
+ /* Take board out of reset */
+ sscape_write(devc, GA_HMCTL_REG,
+ (temp = sscape_read(devc, GA_HMCTL_REG)) | 0x80);
}
-
- /*
+ /*
* Transfer one code block using DMA
- */
- memcpy (audio_devs[devc->my_audiodev]->dmap->raw_buf[0], block, size);
-
- DISABLE_INTR (flags);
-/******** INTERRUPTS DISABLED NOW ********/
- do_dma (devc, SSCAPE_DMA_A,
- audio_devs[devc->my_audiodev]->dmap->raw_buf_phys[0],
- size, DMA_MODE_WRITE);
-
- /*
- * Wait until transfer completes.
- */
- RESET_WAIT_QUEUE (sscape_sleeper, sscape_sleep_flag);
- done = 0;
- timeout = 100;
- while (!done && timeout-- > 0)
- {
- int resid;
+ */
+ bcopy(block, audio_devs[devc->my_audiodev]->dmap_out->raw_buf, size);
+
+ flags = splhigh();
+ /******** INTERRUPTS DISABLED NOW ********/
+ do_dma(devc, SSCAPE_DMA_A,
+ audio_devs[devc->my_audiodev]->dmap_out->raw_buf_phys,
+ size, 1);
+
+ /*
+ * Wait until transfer completes.
+ */
+ sscape_sleep_flag.aborting = 0;
+ sscape_sleep_flag.mode = WK_NONE;
+ done = 0;
+ timeout_val = 100;
+ while (!done && timeout_val-- > 0) {
+ int resid;
+ int chn;
+ sscape_sleeper = &chn;
+ DO_SLEEP(chn, sscape_sleep_flag, 1);
- DO_SLEEP (sscape_sleeper, sscape_sleep_flag, 1);
- clear_dma_ff (devc->dma);
- if ((resid = get_dma_residue (devc->dma)) == 0)
done = 1;
}
- RESTORE_INTR (flags);
- if (!done)
- return 0;
+ splx(flags);
+ if (!done)
+ return 0;
- if (flag & CPF_LAST)
- {
- /*
- * Take the board out of reset
- */
- OUTB (0x00, PORT (HOST_CTRL));
- OUTB (0x00, PORT (MIDI_CTRL));
-
- temp = sscape_read (devc, GA_HMCTL_REG);
- temp |= 0x40;
- sscape_write (devc, GA_HMCTL_REG, temp); /* Kickstart the board */
-
- /*
- * Wait until the ODB wakes up
- */
-
- DISABLE_INTR (flags);
- done = 0;
- timeout = 5 * HZ;
- while (!done && timeout-- > 0)
- {
- DO_SLEEP (sscape_sleeper, sscape_sleep_flag, 1);
- if (INB (PORT (HOST_DATA)) == 0xff) /* OBP startup acknowledge */
+ if (flag & CPF_LAST) {
+ /*
+ * Take the board out of reset
+ */
+ outb(PORT(HOST_CTRL), 0x00);
+ outb(PORT(MIDI_CTRL), 0x00);
+
+ temp = sscape_read(devc, GA_HMCTL_REG);
+ temp |= 0x40;
+ sscape_write(devc, GA_HMCTL_REG, temp); /* Kickstart the board */
+
+ /*
+ * Wait until the ODB wakes up
+ */
+
+ flags = splhigh();
+ done = 0;
+ timeout_val = 5 * hz;
+ while (!done && timeout_val-- > 0) {
+ int chn;
+
+ sscape_sleeper = &chn;
+ DO_SLEEP(chn, sscape_sleep_flag, 1);
+
+ if (inb(PORT(HOST_DATA)) == 0xff) /* OBP startup acknowledge */
done = 1;
}
- RESTORE_INTR (flags);
- if (!done)
- {
- printk ("SoundScape: The OBP didn't respond after code download\n");
- return 0;
+ splx(flags);
+ if (!done) {
+ printf("SoundScape: The OBP didn't respond after code download\n");
+ return 0;
}
+ flags = splhigh();
+ done = 0;
+ timeout_val = 5 * hz;
+ while (!done && timeout_val-- > 0) {
+ int chn;
- DISABLE_INTR (flags);
- done = 0;
- timeout = 5 * HZ;
- while (!done && timeout-- > 0)
- {
- DO_SLEEP (sscape_sleeper, sscape_sleep_flag, 1);
- if (INB (PORT (HOST_DATA)) == 0xfe) /* Host startup acknowledge */
+ sscape_sleeper = &chn;
+ DO_SLEEP(chn, sscape_sleep_flag, 1);
+
+ if (inb(PORT(HOST_DATA)) == 0xfe) /* Host startup acknowledge */
done = 1;
}
- RESTORE_INTR (flags);
- if (!done)
- {
- printk ("SoundScape: OBP Initialization failed.\n");
- return 0;
+ splx(flags);
+ if (!done) {
+ printf("SoundScape: OBP Initialization failed.\n");
+ return 0;
}
+ printf("SoundScape board of type %d initialized OK\n",
+ get_board_type(devc));
- printk ("SoundScape board of type %d initialized OK\n",
- get_board_type (devc));
+ set_control(devc, CTL_MASTER_VOL, 100);
+ set_control(devc, CTL_SYNTH_VOL, 100);
#ifdef SSCAPE_DEBUG3
- /*
- * Temporary debugging aid. Print contents of the registers after
- * downloading the code.
- */
- {
- int i;
+ /*
+ * Temporary debugging aid. Print contents of the registers
+ * after downloading the code.
+ */
+ {
+ int i;
- for (i = 0; i < 13; i++)
- printk ("I%d = %02x (new value)\n", i, sscape_read (devc, i));
- }
+ for (i = 0; i < 13; i++)
+ printf("I%d = %02x (new value)\n", i, sscape_read(devc, i));
+ }
#endif
}
-
- return 1;
+ return 1;
}
static int
-download_boot_block (void *dev_info, copr_buffer * buf)
+download_boot_block(void *dev_info, copr_buffer * buf)
{
- if (buf->len <= 0 || buf->len > sizeof (buf->data))
- return RET_ERROR (EINVAL);
+ if (buf->len <= 0 || buf->len > sizeof(buf->data))
+ return -(EINVAL);
- if (!sscape_download_boot (devc, buf->data, buf->len, buf->flags))
- {
- printk ("SSCAPE: Unable to load microcode block to the OBP.\n");
- return RET_ERROR (EIO);
+ if (!sscape_download_boot(devc, buf->data, buf->len, buf->flags)) {
+ printf("SSCAPE: Unable to load microcode block to the OBP.\n");
+ return -(EIO);
}
-
- return 0;
+ return 0;
}
static int
-sscape_coproc_ioctl (void *dev_info, unsigned int cmd, unsigned int arg, int local)
+sscape_coproc_ioctl(void *dev_info, u_int cmd, ioctl_arg arg, int local)
{
- switch (cmd)
- {
+ switch (cmd) {
case SNDCTL_COPR_RESET:
- sscape_coproc_reset (dev_info);
- return 0;
- break;
+ sscape_coproc_reset(dev_info);
+ return 0;
+ break;
case SNDCTL_COPR_LOAD:
- {
- copr_buffer *buf;
- int err;
-
- buf = (copr_buffer *) KERNEL_MALLOC (sizeof (copr_buffer));
- IOCTL_FROM_USER ((char *) buf, (char *) arg, 0, sizeof (*buf));
- err = download_boot_block (dev_info, buf);
- KERNEL_FREE (buf);
- return err;
- }
- break;
+ {
+ copr_buffer *buf;
+ int err;
+
+ buf = (copr_buffer *) malloc(sizeof(copr_buffer), M_TEMP, M_WAITOK);
+ if (buf == NULL)
+ return -(ENOSPC);
+ bcopy(&(((char *) arg)[0]), (char *) buf, sizeof(*buf));
+ err = download_boot_block(dev_info, buf);
+ free(buf, M_TEMP);
+ return err;
+ }
+ break;
default:
- return RET_ERROR (EINVAL);
+ return -(EINVAL);
}
- return RET_ERROR (EINVAL);
}
static coproc_operations sscape_coproc_operations =
{
- "SoundScape M68K",
- sscape_coproc_open,
- sscape_coproc_close,
- sscape_coproc_ioctl,
- sscape_coproc_reset,
- &dev_info
+ "SoundScape M68K",
+ sscape_coproc_open,
+ sscape_coproc_close,
+ sscape_coproc_ioctl,
+ sscape_coproc_reset,
+ &dev_info
};
static int
-sscape_audio_open (int dev, int mode)
+sscape_audio_open(int dev, int mode)
{
- unsigned long flags;
- sscape_info *devc = (sscape_info *) audio_devs[dev]->devc;
+ u_long flags;
+ sscape_info *devc = (sscape_info *) audio_devs[dev]->devc;
- DISABLE_INTR (flags);
- if (devc->opened)
- {
- RESTORE_INTR (flags);
- return RET_ERROR (EBUSY);
+ flags = splhigh();
+ if (devc->opened) {
+ splx(flags);
+ return -(EBUSY);
}
-
- if (devc->dma_allocated == 0)
+ devc->opened = 1;
+ splx(flags);
+#ifdef SSCAPE_DEBUG4
+ /*
+ * Temporary debugging aid. Print contents of the registers when the
+ * device is opened.
+ */
{
- int err;
-
- if ((err = DMAbuf_open_dma (devc->my_audiodev)) < 0)
- {
- RESTORE_INTR (flags);
- return err;
- }
+ int i;
- devc->dma_allocated = 1;
+ for (i = 0; i < 13; i++)
+ printf("I%d = %02x\n", i, sscape_read(devc, i));
}
-
- devc->opened = 1;
- RESTORE_INTR (flags);
-#ifdef SSCAPE_DEBUG4
- /*
- * Temporary debugging aid. Print contents of the registers
- * when the device is opened.
- */
- {
- int i;
-
- for (i = 0; i < 13; i++)
- printk ("I%d = %02x\n", i, sscape_read (devc, i));
- }
#endif
- return 0;
+ return 0;
}
static void
-sscape_audio_close (int dev)
+sscape_audio_close(int dev)
{
- unsigned long flags;
- sscape_info *devc = (sscape_info *) audio_devs[dev]->devc;
+ u_long flags;
+ sscape_info *devc = (sscape_info *) audio_devs[dev]->devc;
- DEB (printk ("sscape_audio_close(void)\n"));
+ DEB(printf("sscape_audio_close(void)\n"));
- DISABLE_INTR (flags);
+ flags = splhigh();
- if (devc->dma_allocated)
- {
- sscape_write (devc, GA_DMAA_REG, 0x20); /* DMA channel disabled */
- DMAbuf_close_dma (dev);
- devc->dma_allocated = 0;
- }
- devc->opened = 0;
+ devc->opened = 0;
- RESTORE_INTR (flags);
+ splx(flags);
}
static int
-set_speed (sscape_info * devc, int arg)
+set_speed(sscape_info * devc, int arg)
{
- return 8000;
+ return 8000;
}
static int
-set_channels (sscape_info * devc, int arg)
+set_channels(sscape_info * devc, int arg)
{
- return 1;
+ return 1;
}
static int
-set_format (sscape_info * devc, int arg)
+set_format(sscape_info * devc, int arg)
{
- return AFMT_U8;
+ return AFMT_U8;
}
static int
-sscape_audio_ioctl (int dev, unsigned int cmd, unsigned int arg, int local)
+sscape_audio_ioctl(int dev, u_int cmd, ioctl_arg arg, int local)
{
- sscape_info *devc = (sscape_info *) audio_devs[dev]->devc;
+ sscape_info *devc = (sscape_info *) audio_devs[dev]->devc;
- switch (cmd)
- {
+ switch (cmd) {
case SOUND_PCM_WRITE_RATE:
- if (local)
- return set_speed (devc, arg);
- return IOCTL_OUT (arg, set_speed (devc, IOCTL_IN (arg)));
+ if (local)
+ return set_speed(devc, (int) arg);
+ return *(int *) arg = set_speed(devc, (*(int *) arg));
case SOUND_PCM_READ_RATE:
- if (local)
- return 8000;
- return IOCTL_OUT (arg, 8000);
+ if (local)
+ return 8000;
+ return *(int *) arg = 8000;
case SNDCTL_DSP_STEREO:
- if (local)
- return set_channels (devc, arg + 1) - 1;
- return IOCTL_OUT (arg, set_channels (devc, IOCTL_IN (arg) + 1) - 1);
+ if (local)
+ return set_channels(devc, (int) arg + 1) - 1;
+ return *(int *) arg = set_channels(devc, (*(int *) arg) + 1) - 1;
case SOUND_PCM_WRITE_CHANNELS:
- if (local)
- return set_channels (devc, arg);
- return IOCTL_OUT (arg, set_channels (devc, IOCTL_IN (arg)));
+ if (local)
+ return set_channels(devc, (int) arg);
+ return *(int *) arg = set_channels(devc, (*(int *) arg));
case SOUND_PCM_READ_CHANNELS:
- if (local)
- return 1;
- return IOCTL_OUT (arg, 1);
+ if (local)
+ return 1;
+ return *(int *) arg = 1;
case SNDCTL_DSP_SAMPLESIZE:
- if (local)
- return set_format (devc, arg);
- return IOCTL_OUT (arg, set_format (devc, IOCTL_IN (arg)));
+ if (local)
+ return set_format(devc, (int) arg);
+ return *(int *) arg = set_format(devc, (*(int *) arg));
case SOUND_PCM_READ_BITS:
- if (local)
- return 8;
- return IOCTL_OUT (arg, 8);
+ if (local)
+ return 8;
+ return *(int *) arg = 8;
default:;
}
- return RET_ERROR (EINVAL);
+ return -(EINVAL);
}
static void
-sscape_audio_output_block (int dev, unsigned long buf, int count, int intrflag, int dma_restart)
+sscape_audio_output_block(int dev, u_long buf, int count, int intrflag, int dma_restart)
{
}
static void
-sscape_audio_start_input (int dev, unsigned long buf, int count, int intrflag, int dma_restart)
+sscape_audio_start_input(int dev, u_long buf, int count, int intrflag, int dma_restart)
{
}
static int
-sscape_audio_prepare_for_input (int dev, int bsize, int bcount)
+sscape_audio_prepare_for_input(int dev, int bsize, int bcount)
{
- return 0;
+ return 0;
}
static int
-sscape_audio_prepare_for_output (int dev, int bsize, int bcount)
+sscape_audio_prepare_for_output(int dev, int bsize, int bcount)
{
- return 0;
+ return 0;
}
static void
-sscape_audio_halt (int dev)
+sscape_audio_halt(int dev)
{
}
static void
-sscape_audio_reset (int dev)
+sscape_audio_reset(int dev)
{
- sscape_audio_halt (dev);
+ sscape_audio_halt(dev);
}
static struct audio_operations sscape_audio_operations =
{
- "Ensoniq SoundScape channel A",
- 0,
- AFMT_U8 | AFMT_S16_LE,
- NULL,
- sscape_audio_open,
- sscape_audio_close,
- sscape_audio_output_block,
- sscape_audio_start_input,
- sscape_audio_ioctl,
- sscape_audio_prepare_for_input,
- sscape_audio_prepare_for_output,
- sscape_audio_reset,
- sscape_audio_halt,
- NULL,
- NULL
+ "Not functional",
+ 0,
+ AFMT_U8 | AFMT_S16_LE,
+ NULL,
+ sscape_audio_open,
+ sscape_audio_close,
+ sscape_audio_output_block,
+ sscape_audio_start_input,
+ sscape_audio_ioctl,
+ sscape_audio_prepare_for_input,
+ sscape_audio_prepare_for_output,
+ sscape_audio_reset,
+ sscape_audio_halt,
+ NULL,
+ NULL
};
-long
-attach_sscape (long mem_start, struct address_info *hw_config)
+static int sscape_detected = 0;
+
+void
+attach_sscape(struct address_info * hw_config)
{
- int my_dev;
+ int my_dev;
#ifndef SSCAPE_REGS
- /*
+ /*
* Config register values for Spea/V7 Media FX and Ensoniq S-2000.
- * These values are card
- * dependent. If you have another SoundScape based card, you have to
- * find the correct values. Do the following:
- * - Compile this driver with SSCAPE_DEBUG1 defined.
- * - Shut down and power off your machine.
- * - Boot with DOS so that the SSINIT.EXE program is run.
- * - Warm boot to {Linux|SYSV|BSD} and write down the lines displayed
- * when detecting the SoundScape.
- * - Modify the following list to use the values printed during boot.
- * Undefine the SSCAPE_DEBUG1
- */
+ * These values are card dependent. If you have another SoundScape
+ * based card, you have to find the correct values. Do the following:
+ * - Compile this driver with SSCAPE_DEBUG1 defined. - Shut down and
+ * power off your machine. - Boot with DOS so that the SSINIT.EXE
+ * program is run. - Warm boot to {Linux|SYSV|BSD} and write down the
+ * lines displayed when detecting the SoundScape. - Modify the
+ * following list to use the values printed during boot. Undefine the
+ * SSCAPE_DEBUG1
+ */
#define SSCAPE_REGS { \
/* I0 */ 0x00, \
0xf0, /* Note! Ignored. Set always to 0xf0 */ \
@@ -833,288 +778,279 @@ attach_sscape (long mem_start, struct address_info *hw_config)
0x10, \
0x00, \
0x2e, /* I7 MEM config A. Likely to vary between models */ \
- 0x00, /* I8 MEM config A. Likely to vary between models */ \
+ 0x00, /* I8 MEM config B. Likely to vary between models */ \
/* I9 */ 0x40 /* Ignored */ \
}
#endif
- unsigned long flags;
- static unsigned char regs[10] = SSCAPE_REGS;
+ u_long flags;
+ static u_char regs[10] = SSCAPE_REGS;
- int i, irq_bits = 0xff;
+ int i, irq_bits = 0xff;
- if (!probe_sscape (hw_config))
- return mem_start;
+ if (sscape_detected != hw_config->io_base)
+ return;
- printk (" <Ensoniq Soundscape>");
+ if (old_hardware) {
+ valid_interrupts = valid_interrupts_old;
+ conf_printf("Ensoniq Soundscape (old)", hw_config);
+ } else
+ conf_printf("Ensoniq Soundscape", hw_config);
- for (i = 0; i < sizeof (valid_interrupts); i++)
- if (hw_config->irq == valid_interrupts[i])
- {
- irq_bits = i;
- break;
- }
-
- if (hw_config->irq > 15 || (regs[4] = irq_bits == 0xff))
- {
- printk ("Invalid IRQ%d\n", hw_config->irq);
- return mem_start;
+ for (i = 0; i < sizeof(valid_interrupts); i++)
+ if (hw_config->irq == valid_interrupts[i]) {
+ irq_bits = i;
+ break;
+ }
+ if (hw_config->irq > 15 || (regs[4] = irq_bits == 0xff)) {
+ printf("Invalid IRQ%d\n", hw_config->irq);
+ return;
}
+ flags = splhigh();
+
+ for (i = 1; i < 10; i++)
+ switch (i) {
+ case 1: /* Host interrupt enable */
+ sscape_write(devc, i, 0xf0); /* All interrupts enabled */
+ break;
+
+ case 2: /* DMA A status/trigger register */
+ case 3: /* DMA B status/trigger register */
+ sscape_write(devc, i, 0x20); /* DMA channel disabled */
+ break;
+
+ case 4: /* Host interrupt config reg */
+ sscape_write(devc, i, 0xf0 | (irq_bits << 2) | irq_bits);
+ break;
+
+ case 5: /* Don't destroy CD-ROM DMA config bits (0xc0) */
+ sscape_write(devc, i, (regs[i] & 0x3f) |
+ (sscape_read(devc, i) & 0xc0));
+ break;
+
+ case 6: /* CD-ROM config. Don't touch. */
+ break;
+
+ case 9: /* Master control reg. Don't modify CR-ROM
+ * bits. Disable SB emul */
+ sscape_write(devc, i, (sscape_read(devc, i) & 0xf0) | 0x00);
+ break;
+
+ default:
+ sscape_write(devc, i, regs[i]);
+ }
- DISABLE_INTR (flags);
-
- for (i = 1; i < 10; i++)
- switch (i)
- {
- case 1: /* Host interrupt enable */
- sscape_write (devc, i, 0xf0); /* All interrupts enabled */
- break;
-
- case 2: /* DMA A status/trigger register */
- case 3: /* DMA B status/trigger register */
- sscape_write (devc, i, 0x20); /* DMA channel disabled */
- break;
-
- case 4: /* Host interrupt config reg */
- sscape_write (devc, i, 0xf0 | (irq_bits << 2) | irq_bits);
- break;
-
- case 5: /* Don't destroy CD-ROM DMA config bits (0xc0) */
- sscape_write (devc, i, (regs[i] & 0x3f) |
- (sscape_read (devc, i) & 0x0c));
- break;
-
- case 6: /* CD-ROM config. Don't touch. */
- break;
-
- case 9: /* Master control reg. Don't modify CR-ROM bits. Disable SB emul */
- sscape_write (devc, i,
- (sscape_read (devc, i) & 0xf0) | 0x00);
- break;
-
- default:
- sscape_write (devc, i, regs[i]);
- }
-
- RESTORE_INTR (flags);
+ splx(flags);
#ifdef SSCAPE_DEBUG2
- /*
+ /*
* Temporary debugging aid. Print contents of the registers after
* changing them.
- */
- {
- int i;
+ */
+ {
+ int i;
- for (i = 0; i < 13; i++)
- printk ("I%d = %02x (new value)\n", i, sscape_read (devc, i));
- }
+ for (i = 0; i < 13; i++)
+ printf("I%d = %02x (new value)\n", i, sscape_read(devc, i));
+ }
#endif
-#if !defined(EXCLUDE_MIDI) && !defined(EXCLUDE_MPU_EMU)
- hw_config->always_detect = 1;
- if (probe_mpu401 (hw_config))
+#if defined(CONFIG_MIDI) && defined(CONFIG_MPU_EMU)
+ if (probe_mpu401(hw_config))
+ hw_config->always_detect = 1;
{
- int prev_devs;
+ int prev_devs;
- prev_devs = num_midis;
- mem_start = attach_mpu401 (mem_start, hw_config);
+ prev_devs = num_midis;
+ attach_mpu401(hw_config);
- if (num_midis == (prev_devs + 1)) /* The MPU driver installed itself */
- midi_devs[prev_devs]->coproc = &sscape_coproc_operations;
+ if (num_midis == (prev_devs + 1)) /* The MPU driver
+ * installed itself */
+ midi_devs[prev_devs]->coproc = &sscape_coproc_operations;
}
#endif
#ifndef EXCLUDE_NATIVE_PCM
- /* Not supported yet */
-
-#ifndef EXCLUDE_AUDIO
- if (num_audiodevs < MAX_AUDIO_DEV)
- {
- audio_devs[my_dev = num_audiodevs++] = &sscape_audio_operations;
- audio_devs[my_dev]->dmachan = hw_config->dma;
- audio_devs[my_dev]->buffcount = 1;
- audio_devs[my_dev]->buffsize = DSP_BUFFSIZE;
- audio_devs[my_dev]->devc = devc;
- devc->my_audiodev = my_dev;
- devc->opened = 0;
- audio_devs[my_dev]->coproc = &sscape_coproc_operations;
- if (snd_set_irq_handler (hw_config->irq, sscapeintr, "SoundScape") < 0)
- printk ("Error: Can't allocate IRQ for SoundScape\n");
-
- sscape_write (devc, GA_INTENA_REG, 0x80); /* Master IRQ enable */
- }
- else
- printk ("SoundScape: More than enough audio devices detected\n");
+ /* Not supported yet */
+
+#ifdef CONFIG_AUDIO
+ if (num_audiodevs < MAX_AUDIO_DEV) {
+ audio_devs[my_dev = num_audiodevs++] = &sscape_audio_operations;
+ audio_devs[my_dev]->dmachan1 = hw_config->dma;
+ audio_devs[my_dev]->buffsize = DSP_BUFFSIZE;
+ audio_devs[my_dev]->devc = devc;
+ devc->my_audiodev = my_dev;
+ devc->opened = 0;
+ audio_devs[my_dev]->coproc = &sscape_coproc_operations;
+ if (snd_set_irq_handler(hw_config->irq, sscapeintr, devc->osp) < 0)
+ printf("Error: Can't allocate IRQ for SoundScape\n");
+ sscape_write(devc, GA_INTENA_REG, 0x80); /* Master IRQ enable */
+ } else
+ printf("SoundScape: More than enough audio devices detected\n");
#endif
#endif
- devc->ok = 1;
- return mem_start;
+ devc->ok = 1;
+ devc->failed = 0;
+ return;
}
int
-probe_sscape (struct address_info *hw_config)
+probe_sscape(struct address_info * hw_config)
{
- unsigned char save;
-
- devc->base = hw_config->io_base;
- devc->irq = hw_config->irq;
- devc->dma = hw_config->dma;
-
- /*
- * First check that the address register of "ODIE" is
- * there and that it has exactly 4 writeable bits.
- * First 4 bits
- */
- if ((save = INB (PORT (ODIE_ADDR))) & 0xf0)
- return 0;
+ u_char save;
- OUTB (0x00, PORT (ODIE_ADDR));
- if (INB (PORT (ODIE_ADDR)) != 0x00)
- return 0;
+ devc->failed = 1;
+ devc->base = hw_config->io_base;
+ devc->irq = hw_config->irq;
+ devc->dma = hw_config->dma;
+ devc->osp = hw_config->osp;
- OUTB (0xff, PORT (ODIE_ADDR));
- if (INB (PORT (ODIE_ADDR)) != 0x0f)
- return 0;
+ if (sscape_detected != 0 && sscape_detected != hw_config->io_base)
+ return 0;
+
+ /*
+ * First check that the address register of "ODIE" is there and that
+ * it has exactly 4 writeable bits. First 4 bits
+ */
+ if ((save = inb(PORT(ODIE_ADDR))) & 0xf0)
+ return 0;
+
+ outb(PORT(ODIE_ADDR), 0x00);
+ if (inb(PORT(ODIE_ADDR)) != 0x00)
+ return 0;
+
+ outb(PORT(ODIE_ADDR), 0xff);
+ if (inb(PORT(ODIE_ADDR)) != 0x0f)
+ return 0;
- OUTB (save, PORT (ODIE_ADDR));
+ outb(PORT(ODIE_ADDR), save);
- /*
+ /*
* Now verify that some indirect registers return zero on some bits.
- * This may break the driver with some future revisions of "ODIE" but...
- */
+ * This may break the driver with some future revisions of "ODIE"
+ * but...
+ */
- if (sscape_read (devc, 0) & 0x0c)
- return 0;
+ if (sscape_read(devc, 0) & 0x0c)
+ return 0;
- if (sscape_read (devc, 1) & 0x0f)
- return 0;
+ if (sscape_read(devc, 1) & 0x0f)
+ return 0;
- if (sscape_read (devc, 5) & 0x0f)
- return 0;
+ if (sscape_read(devc, 5) & 0x0f)
+ return 0;
#ifdef SSCAPE_DEBUG1
- /*
+ /*
* Temporary debugging aid. Print contents of the registers before
* changing them.
- */
- {
- int i;
+ */
+ {
+ int i;
- for (i = 0; i < 13; i++)
- printk ("I%d = %02x (old value)\n", i, sscape_read (devc, i));
- }
+ for (i = 0; i < 13; i++)
+ printf("I%d = %02x (old value)\n", i, sscape_read(devc, i));
+ }
#endif
- return 1;
+ if (old_hardware) { /* Check that it's really an old Spea/Reveal card. */
+ u_char tmp;
+ int cc;
+
+ if (!((tmp = sscape_read(devc, GA_HMCTL_REG)) & 0xc0)) {
+ sscape_write(devc, GA_HMCTL_REG, tmp | 0x80);
+ for (cc = 0; cc < 200000; ++cc)
+ inb(devc->base + ODIE_ADDR);
+ } else
+ old_hardware = 0;
+ }
+ if (0) {
+ printf("sscape.c: Can't allocate DMA channel\n");
+ return 0;
+ }
+ sscape_detected = hw_config->io_base;
+
+ return 1;
}
int
-probe_ss_ms_sound (struct address_info *hw_config)
+probe_ss_mss(struct address_info * hw_config)
{
- int i, irq_bits = 0xff;
+ int i, irq_bits = 0xff;
- if (devc->ok == 0)
- {
- printk ("SoundScape: Invalid initialization order.\n");
- return 0;
- }
+ if (devc->failed)
+ return 0;
- for (i = 0; i < sizeof (valid_interrupts); i++)
- if (hw_config->irq == valid_interrupts[i])
- {
- irq_bits = i;
- break;
- }
-#ifdef REVEAL_SPEA
- {
- int tmp, status = 0;
- int cc;
-
- if (!((tmp = sscape_read (devc, GA_HMCTL_REG)) & 0xc0))
- {
- sscape_write (devc, GA_HMCTL_REG, tmp | 0x80);
- for (cc = 0; cc < 200000; ++cc)
- INB (devc->base + ODIE_ADDR);
- }
- }
-#endif
-
- if (hw_config->irq > 15 || irq_bits == 0xff)
- {
- printk ("SoundScape: Invalid MSS IRQ%d\n", hw_config->irq);
- return 0;
+ if (devc->ok == 0) {
+ printf("SoundScape: Invalid initialization order.\n");
+ return 0;
}
-
- return ad1848_detect (hw_config->io_base);
+ for (i = 0; i < sizeof(valid_interrupts); i++)
+ if (hw_config->irq == valid_interrupts[i]) {
+ irq_bits = i;
+ break;
+ }
+ if (hw_config->irq > 15 || irq_bits == 0xff) {
+ printf("SoundScape: Invalid MSS IRQ%d\n", hw_config->irq);
+ return 0;
+ }
+ return ad1848_detect(hw_config->io_base, NULL, hw_config->osp);
}
-long
-attach_ss_ms_sound (long mem_start, struct address_info *hw_config)
+void
+attach_ss_mss(struct address_info * hw_config)
{
- /*
- * This routine configures the SoundScape card for use with the
- * Win Sound System driver. The AD1848 codec interface uses the CD-ROM
+ /*
+ * This routine configures the SoundScape card for use with the Win
+ * Sound System driver. The AD1848 codec interface uses the CD-ROM
* config registers of the "ODIE".
- */
-
- int i, irq_bits = 0xff;
+ */
-#ifdef EXCLUDE_NATIVE_PCM
- int prev_devs = num_audiodevs;
+ int i, irq_bits = 0xff;
+#ifndef CONFIG_NATIVE_PCM
+ int prev_devs = num_audiodevs;
#endif
- /*
+ /*
* Setup the DMA polarity.
- */
- sscape_write (devc, GA_DMACFG_REG, 0x50);
+ */
+ sscape_write(devc, GA_DMACFG_REG, 0x50);
- /*
+ /*
* Take the gate-arry off of the DMA channel.
- */
- sscape_write (devc, GA_DMAB_REG, 0x20);
+ */
+ sscape_write(devc, GA_DMAB_REG, 0x20);
- /*
+ /*
* Init the AD1848 (CD-ROM) config reg.
- */
-
- for (i = 0; i < sizeof (valid_interrupts); i++)
- if (hw_config->irq == valid_interrupts[i])
- {
- irq_bits = i;
- break;
- }
-
- sscape_write (devc, GA_CDCFG_REG, 0x89 | (hw_config->dma << 4) |
- (irq_bits << 1));
-
- if (hw_config->irq == devc->irq)
- printk ("SoundScape: Warning! The WSS mode can't share IRQ with MIDI\n");
+ */
- ad1848_init ("SoundScape", hw_config->io_base,
- hw_config->irq,
- hw_config->dma,
- hw_config->dma);
-
-#ifdef EXCLUDE_NATIVE_PCM
- if (num_audiodevs == (prev_devs + 1)) /* The AD1848 driver installed itself */
- audio_devs[prev_devs]->coproc = &sscape_coproc_operations;
-#endif
-#ifdef SSCAPE_DEBUG5
- /*
- * Temporary debugging aid. Print contents of the registers
- * after the AD1848 device has been initialized.
- */
- {
- int i;
-
- for (i = 0; i < 13; i++)
- printk ("I%d = %02x\n", i, sscape_read (devc, i));
- }
+ for (i = 0; i < sizeof(valid_interrupts); i++)
+ if (hw_config->irq == valid_interrupts[i]) {
+ irq_bits = i;
+ break;
+ }
+ sscape_write(devc, GA_CDCFG_REG, 0x89 | (hw_config->dma << 4) |
+ (irq_bits << 1));
+
+ if (hw_config->irq == devc->irq)
+ printf("SoundScape: Warning! WSS mode can't share IRQ with MIDI\n");
+
+ ad1848_init("SoundScape", hw_config->io_base,
+ hw_config->irq,
+ hw_config->dma,
+ hw_config->dma,
+ 0,
+ devc->osp);
+
+#ifndef CONFIG_NATIVE_PCM
+ /* Check if the AD1848 driver installed itself */
+ if (num_audiodevs == (prev_devs + 1))
+ audio_devs[prev_devs]->coproc = &sscape_coproc_operations;
#endif
- return mem_start;
+ return;
}
#endif
diff --git a/sys/i386/isa/sound/sys_timer.c b/sys/i386/isa/sound/sys_timer.c
index 74b42b2..a605dfc 100644
--- a/sys/i386/isa/sound/sys_timer.c
+++ b/sys/i386/isa/sound/sys_timer.c
@@ -1,11 +1,11 @@
/*
* sound/sys_timer.c
- *
- * The default timer for the Level 2 sequencer interface
- * Uses the (100HZ) timer of kernel.
- *
+ *
+ * The default timer for the Level 2 sequencer interface.
+ * Uses the (100hz) timer of kernel.
+ *
* Copyright by Hannu Savolainen 1993
- *
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met: 1. Redistributions of source code must retain the above copyright
@@ -13,7 +13,7 @@
* Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
@@ -25,280 +25,252 @@
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
- *
+ *
*/
#define SEQUENCER_C
#include <i386/isa/sound/sound_config.h>
-#ifdef CONFIGURE_SOUNDCARD
+#if NSND > 0
-#ifndef EXCLUDE_SEQUENCER
+#if defined(CONFIG_SEQUENCER)
static volatile int opened = 0, tmr_running = 0;
static volatile time_t tmr_offs, tmr_ctr;
-static volatile unsigned long ticks_offs;
+static volatile u_long ticks_offs;
static volatile int curr_tempo, curr_timebase;
-static volatile unsigned long curr_ticks;
-static volatile unsigned long next_event_time;
-static unsigned long prev_event_time;
+static volatile u_long curr_ticks;
+static volatile u_long next_event_time;
+static u_long prev_event_time;
-static void poll_def_tmr (void *dummy);
+static void poll_def_tmr(void *dummy);
-DEFINE_TIMER (def_tmr, poll_def_tmr);
-
-static unsigned long
-tmr2ticks (int tmr_value)
+static u_long
+tmr2ticks(int tmr_value)
{
- /*
- * Convert system timer ticks (HZ) to MIDI ticks
- */
-
- unsigned long tmp;
- unsigned long scale;
-
- tmp = (tmr_value * 1000) / HZ; /* Convert to msecs */
-
- scale = (60 * 1000) / (curr_tempo * curr_timebase); /* msecs per MIDI tick */
+ /*
+ * Convert system timer ticks (hz) to MIDI ticks (divide # of MIDI
+ * ticks/minute by # of system ticks/minute).
+ */
- return (tmp + (scale / 2)) / scale;
+ return ((tmr_value * curr_tempo * curr_timebase) + (30 * hz)) / (60 * hz);
}
static void
-poll_def_tmr (void *dummy)
+poll_def_tmr(void *dummy)
{
- if (opened)
- {
- ACTIVATE_TIMER (def_tmr, poll_def_tmr, 1);
+ if (opened) {
- if (tmr_running)
- {
- tmr_ctr++;
- curr_ticks = ticks_offs + tmr2ticks (tmr_ctr);
+ timeout( poll_def_tmr, 0, 1);;
+
+ if (tmr_running) {
+ tmr_ctr++;
+ curr_ticks = ticks_offs + tmr2ticks(tmr_ctr);
- if (curr_ticks >= next_event_time)
- {
- next_event_time = 0xffffffff;
- sequencer_timer (NULL);
+ if (curr_ticks >= next_event_time) {
+ next_event_time = 0xffffffff;
+ sequencer_timer(0);
}
}
}
}
static void
-tmr_reset (void)
+tmr_reset(void)
{
- unsigned long flags;
-
- DISABLE_INTR (flags);
- tmr_offs = 0;
- ticks_offs = 0;
- tmr_ctr = 0;
- next_event_time = 0xffffffff;
- prev_event_time = 0;
- curr_ticks = 0;
- RESTORE_INTR (flags);
+ u_long flags;
+
+ flags = splhigh();
+ tmr_offs = 0;
+ ticks_offs = 0;
+ tmr_ctr = 0;
+ next_event_time = 0xffffffff;
+ prev_event_time = 0;
+ curr_ticks = 0;
+ splx(flags);
}
static int
-def_tmr_open (int dev, int mode)
+def_tmr_open(int dev, int mode)
{
- if (opened)
- return RET_ERROR (EBUSY);
+ if (opened)
+ return -(EBUSY);
- tmr_reset ();
- curr_tempo = 60;
- curr_timebase = HZ;
- opened = 1;
+ tmr_reset();
+ curr_tempo = 60;
+ curr_timebase = hz;
+ opened = 1;
- ACTIVATE_TIMER (def_tmr, poll_def_tmr, 1);
+ timeout( poll_def_tmr, 0, 1);;
- return 0;
+ return 0;
}
static void
-def_tmr_close (int dev)
+def_tmr_close(int dev)
{
- opened = tmr_running = 0;
+ opened = tmr_running = 0;
}
static int
-def_tmr_event (int dev, unsigned char *event)
+def_tmr_event(int dev, u_char *event)
{
- unsigned char cmd = event[1];
- unsigned long parm = *(int *) &event[4];
+ u_char cmd = event[1];
+ u_long parm = *(int *) &event[4];
- switch (cmd)
- {
+ switch (cmd) {
case TMR_WAIT_REL:
- parm += prev_event_time;
+ parm += prev_event_time;
case TMR_WAIT_ABS:
- if (parm > 0)
- {
- long time;
+ if (parm > 0) {
+ long time;
- if (parm <= curr_ticks) /* It's the time */
- return TIMER_NOT_ARMED;
+ if (parm <= curr_ticks) /* It's the time */
+ return TIMER_NOT_ARMED;
- time = parm;
- next_event_time = prev_event_time = time;
+ time = parm;
+ next_event_time = prev_event_time = time;
- return TIMER_ARMED;
+ return TIMER_ARMED;
}
- break;
+ break;
case TMR_START:
- tmr_reset ();
- tmr_running = 1;
- break;
+ tmr_reset();
+ tmr_running = 1;
+ break;
case TMR_STOP:
- tmr_running = 0;
- break;
+ tmr_running = 0;
+ break;
case TMR_CONTINUE:
- tmr_running = 1;
- break;
+ tmr_running = 1;
+ break;
case TMR_TEMPO:
- if (parm)
- {
- if (parm < 8)
- parm = 8;
- if (parm > 250)
- parm = 250;
- tmr_offs = tmr_ctr;
- ticks_offs += tmr2ticks (tmr_ctr);
- tmr_ctr = 0;
- curr_tempo = parm;
+ if (parm) {
+ RANGE (parm, 8, 360) ;
+ tmr_offs = tmr_ctr;
+ ticks_offs += tmr2ticks(tmr_ctr);
+ tmr_ctr = 0;
+ curr_tempo = parm;
}
- break;
+ break;
case TMR_ECHO:
- seq_copy_to_input (event, 8);
- break;
+ seq_copy_to_input(event, 8);
+ break;
default:;
}
- return TIMER_NOT_ARMED;
+ return TIMER_NOT_ARMED;
}
-static unsigned long
-def_tmr_get_time (int dev)
+static u_long
+def_tmr_get_time(int dev)
{
- if (!opened)
- return 0;
+ if (!opened)
+ return 0;
- return curr_ticks;
+ return curr_ticks;
}
static int
-def_tmr_ioctl (int dev,
- unsigned int cmd, unsigned int arg)
+def_tmr_ioctl(int dev, u_int cmd, ioctl_arg arg)
{
- switch (cmd)
- {
+ switch (cmd) {
case SNDCTL_TMR_SOURCE:
- return IOCTL_OUT (arg, TMR_INTERNAL);
- break;
+ return *(int *) arg = TMR_INTERNAL;
+ break;
case SNDCTL_TMR_START:
- tmr_reset ();
- tmr_running = 1;
- return 0;
- break;
+ tmr_reset();
+ tmr_running = 1;
+ return 0;
+ break;
case SNDCTL_TMR_STOP:
- tmr_running = 0;
- return 0;
- break;
+ tmr_running = 0;
+ return 0;
+ break;
case SNDCTL_TMR_CONTINUE:
- tmr_running = 1;
- return 0;
- break;
+ tmr_running = 1;
+ return 0;
+ break;
case SNDCTL_TMR_TIMEBASE:
- {
- int val = IOCTL_IN (arg);
-
- if (val)
- {
- if (val < 1)
- val = 1;
- if (val > 1000)
- val = 1000;
- curr_timebase = val;
- }
-
- return IOCTL_OUT (arg, curr_timebase);
- }
- break;
+ {
+ int val = (*(int *) arg);
- case SNDCTL_TMR_TEMPO:
- {
- int val = IOCTL_IN (arg);
-
- if (val)
- {
- if (val < 8)
- val = 8;
- if (val > 250)
- val = 250;
- tmr_offs = tmr_ctr;
- ticks_offs += tmr2ticks (tmr_ctr);
- tmr_ctr = 0;
- curr_tempo = val;
- }
+ if (val) {
+ RANGE (val, 1, 1000) ;
+ curr_timebase = val;
+ }
+ return *(int *) arg = curr_timebase;
+ }
+ break;
- return IOCTL_OUT (arg, curr_tempo);
- }
- break;
+ case SNDCTL_TMR_TEMPO:
+ {
+ int val = (*(int *) arg);
+
+ if (val) {
+ RANGE (val, 8, 250) ;
+ tmr_offs = tmr_ctr;
+ ticks_offs += tmr2ticks(tmr_ctr);
+ tmr_ctr = 0;
+ curr_tempo = val;
+ }
+ return *(int *) arg = curr_tempo;
+ }
+ break;
case SNDCTL_SEQ_CTRLRATE:
- if (IOCTL_IN (arg) != 0) /* Can't change */
- return RET_ERROR (EINVAL);
+ if ((*(int *) arg) != 0) /* Can't change */
+ return -(EINVAL);
- return IOCTL_OUT (arg, ((curr_tempo * curr_timebase) + 30) / 60);
- break;
+ return *(int *) arg = ((curr_tempo * curr_timebase) + 30) / 60;
+ break;
case SNDCTL_TMR_METRONOME:
- /* NOP */
- break;
+ /* NOP */
+ break;
default:;
}
- return RET_ERROR (EINVAL);
+ return -(EINVAL);
}
static void
-def_tmr_arm (int dev, long time)
+def_tmr_arm(int dev, long time)
{
- if (time < 0)
- time = curr_ticks + 1;
- else if (time <= curr_ticks) /* It's the time */
- return;
+ if (time < 0)
+ time = curr_ticks + 1;
+ else if (time <= curr_ticks) /* It's the time */
+ return;
- next_event_time = prev_event_time = time;
+ next_event_time = prev_event_time = time;
- return;
+ return;
}
struct sound_timer_operations default_sound_timer =
{
- {"System Timer", 0},
- 0, /* Priority */
- 0, /* Local device link */
- def_tmr_open,
- def_tmr_close,
- def_tmr_event,
- def_tmr_get_time,
- def_tmr_ioctl,
- def_tmr_arm
+ {"System clock", 0},
+ 0, /* Priority */
+ 0, /* Local device link */
+ def_tmr_open,
+ def_tmr_close,
+ def_tmr_event,
+ def_tmr_get_time,
+ def_tmr_ioctl,
+ def_tmr_arm
};
#endif
-#endif
+#endif /* NSND > 0 */
diff --git a/sys/i386/isa/sound/trix.c b/sys/i386/isa/sound/trix.c
index 21ca20a..818ad5f 100644
--- a/sys/i386/isa/sound/trix.c
+++ b/sys/i386/isa/sound/trix.c
@@ -1,11 +1,10 @@
/*
* sound/trix.c
- *
- * Low level driver for the MediaTriX AudioTriX Pro
- * (MT-0002-PC Control Chip)
- *
+ *
+ * Low level driver for the MediaTriX AudioTriX Pro (MT-0002-PC Control Chip)
+ *
* Copyright by Hannu Savolainen 1995
- *
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met: 1. Redistributions of source code must retain the above copyright
@@ -13,7 +12,7 @@
* Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
@@ -25,299 +24,345 @@
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
- *
+ *
*/
#include <i386/isa/sound/sound_config.h>
-#if defined(CONFIGURE_SOUNDCARD) && !defined(EXCLUDE_TRIX)
+#if NTRIX > 0
#ifdef INCLUDE_TRIX_BOOT
#include <i386/isa/sound/trix_boot.h>
#endif
+#if (NSB > 0)
+extern int sb_no_recording;
+#endif
+
static int kilroy_was_here = 0; /* Don't detect twice */
static int sb_initialized = 0;
-static int mpu_initialized = 0;
-static unsigned char
-trix_read (int addr)
+static sound_os_info *trix_osp = NULL;
+
+static u_char
+trix_read(int addr)
{
- OUTB ((unsigned char) addr, 0x390); /* MT-0002-PC ASIC address */
- return INB (0x391); /* MT-0002-PC ASIC data */
+ outb(0x390, (u_char) addr); /* MT-0002-PC ASIC address */
+ return inb(0x391); /* MT-0002-PC ASIC data */
}
static void
-trix_write (int addr, int data)
+trix_write(int addr, int data)
{
- OUTB ((unsigned char) addr, 0x390); /* MT-0002-PC ASIC address */
- OUTB ((unsigned char) data, 0x391); /* MT-0002-PC ASIC data */
+ outb(0x390, (u_char) addr); /* MT-0002-PC ASIC address */
+ outb(0x391, (u_char) data); /* MT-0002-PC ASIC data */
}
static void
-download_boot (int base)
+download_boot(int base)
{
- int i = 0, n = sizeof (trix_boot);
-
- trix_write (0xf8, 0x00); /* ??????? */
- OUTB (0x01, base + 6); /* Clear the internal data pointer */
- OUTB (0x00, base + 6); /* Restart */
-
- /*
- * Write the boot code to the RAM upload/download register.
- * Each write increments the internal data pointer.
- */
- OUTB (0x01, base + 6); /* Clear the internal data pointer */
- OUTB (0x1A, 0x390); /* Select RAM download/upload port */
-
- for (i = 0; i < n; i++)
- OUTB (trix_boot[i], 0x391);
- for (i = n; i < 10016; i++) /* Clear up to first 16 bytes of data RAM */
- OUTB (0x00, 0x391);
- OUTB (0x00, base + 6); /* Reset */
- OUTB (0x50, 0x390); /* ?????? */
+#ifdef INCLUDE_TRIX_BOOT
+ int i = 0, n = sizeof(trix_boot);
+
+ trix_write(0xf8, 0x00); /* ??????? */
+ outb(base + 6, 0x01); /* Clear the internal data pointer */
+ outb(base + 6, 0x00); /* Restart */
+
+ /*
+ * Write the boot code to the RAM upload/download register. Each
+ * write increments the internal data pointer.
+ */
+ outb(base + 6, 0x01); /* Clear the internal data pointer */
+ outb(0x390, 0x1A); /* Select RAM download/upload port */
+
+ for (i = 0; i < n; i++)
+ outb(0x391, trix_boot[i]);
+ for (i = n; i < 10016; i++) /* Clear up to first 16 bytes of data RAM */
+ outb(0x391, 0x00);
+ outb(base + 6, 0x00); /* Reset */
+ outb(0x390, 0x50); /* ?????? */
+#endif
+
}
static int
-trix_set_wss_port (struct address_info *hw_config)
+trix_set_wss_port(struct address_info * hw_config)
{
- unsigned char addr_bits;
+ u_char addr_bits;
- if (kilroy_was_here) /* Already initialized */
- return 0;
+ if (0) {
+ printf("AudioTriX: Config port I/O conflict\n");
+ return 0;
+ }
+ if (kilroy_was_here) /* Already initialized */
+ return 0;
- kilroy_was_here = 1;
+ if (trix_read(0x15) != 0x71) { /* No asic signature */
+ DDB(printf("No AudioTriX ASIC signature found\n"));
+ return 0;
+ }
- if (trix_read (0x15) != 0x71) /* No asic signature */
- return 0;
+ kilroy_was_here = 1;
- /*
- * Disable separate wave playback and recording DMA channels since
- * the driver doesn't support duplex mode yet.
- */
+ /*
+ * Reset some registers.
+ */
- trix_write (0x13, trix_read (0x13) & ~0x80);
- trix_write (0x14, trix_read (0x14) & ~0x80);
+ trix_write(0x13, 0);
+ trix_write(0x14, 0);
- /*
+ /*
* Configure the ASIC to place the codec to the proper I/O location
- */
+ */
- switch (hw_config->io_base)
- {
+ switch (hw_config->io_base) {
case 0x530:
- addr_bits = 0;
- break;
+ addr_bits = 0;
+ break;
case 0x604:
- addr_bits = 1;
- break;
+ addr_bits = 1;
+ break;
case 0xE80:
- addr_bits = 2;
- break;
+ addr_bits = 2;
+ break;
case 0xF40:
- addr_bits = 3;
- break;
+ addr_bits = 3;
+ break;
default:
- return 0;
+ return 0;
}
- trix_write (0x19, (trix_read (0x19) & 0x03) | addr_bits);
- return 1;
+ trix_write(0x19, (trix_read(0x19) & 0x03) | addr_bits);
+ return 1;
}
/*
- * Probe and attach routines for the Windows Sound System mode of
- * AudioTriX Pro
+ * Probe and attach routines for the Windows Sound System mode of AudioTriX
+ * Pro
*/
int
-probe_trix_wss (struct address_info *hw_config)
+probe_trix_wss(struct address_info * hw_config)
{
- /*
- * Check if the IO port returns valid signature. The original MS Sound
- * system returns 0x04 while some cards (AudioTriX Pro for example)
- * return 0x00.
- */
- if (!trix_set_wss_port (hw_config))
- return 0;
-
- if ((INB (hw_config->io_base + 3) & 0x3f) != 0x00)
- {
- DDB (printk ("No MSS signature detected on port 0x%x\n", hw_config->io_base));
- return 0;
+ /*
+ * Check if the IO port returns valid signature. The original MS
+ * Sound system returns 0x04 while some cards (AudioTriX Pro for
+ * example) return 0x00.
+ */
+
+ if (0) {
+ printf("AudioTriX: MSS I/O port conflict\n");
+ return 0;
}
+ trix_osp = hw_config->osp;
- if (hw_config->irq > 11)
- {
- printk ("AudioTriX: Bad WSS IRQ %d\n", hw_config->irq);
- return 0;
- }
+ if (!trix_set_wss_port(hw_config))
+ return 0;
- if (hw_config->dma != 0 && hw_config->dma != 1 && hw_config->dma != 3)
- {
- printk ("AudioTriX: Bad WSS DMA %d\n", hw_config->dma);
- return 0;
+ if ((inb(hw_config->io_base + 3) & 0x3f) != 0x00) {
+ DDB(printf("No MSS signature detected on port 0x%x\n",
+ hw_config->io_base));
+ return 0;
}
-
- /*
+ if (hw_config->irq > 11) {
+ printf("AudioTriX: Bad WSS IRQ %d\n", hw_config->irq);
+ return 0;
+ }
+ if (hw_config->dma != 0 && hw_config->dma != 1 && hw_config->dma != 3) {
+ printf("AudioTriX: Bad WSS DMA %d\n", hw_config->dma);
+ return 0;
+ }
+ if (hw_config->dma2 != -1)
+ if (hw_config->dma2 != 0 && hw_config->dma2 != 1 && hw_config->dma2 != 3) {
+ printf("AudioTriX: Bad capture DMA %d\n", hw_config->dma2);
+ return 0;
+ }
+ /*
* Check that DMA0 is not in use with a 8 bit board.
- */
+ */
- if (hw_config->dma == 0 && INB (hw_config->io_base + 3) & 0x80)
- {
- printk ("AudioTriX: Can't use DMA0 with a 8 bit card\n");
- return 0;
+ if (hw_config->dma == 0 && inb(hw_config->io_base + 3) & 0x80) {
+ printf("AudioTriX: Can't use DMA0 with a 8 bit card\n");
+ return 0;
}
-
- if (hw_config->irq > 7 && hw_config->irq != 9 && INB (hw_config->io_base + 3) & 0x80)
- {
- printk ("AudioTriX: Can't use IRQ%d with a 8 bit card\n", hw_config->irq);
- return 0;
+ if (hw_config->irq > 7 && hw_config->irq != 9 && inb(hw_config->io_base + 3) & 0x80) {
+ printf("AudioTriX: Can't use IRQ%d with a 8 bit card\n", hw_config->irq);
+ return 0;
}
-
- return ad1848_detect (hw_config->io_base + 4);
+ return ad1848_detect(hw_config->io_base + 4, NULL, hw_config->osp);
}
-long
-attach_trix_wss (long mem_start, struct address_info *hw_config)
+void
+attach_trix_wss(struct address_info * hw_config)
{
- static unsigned char interrupt_bits[12] =
- {-1, -1, -1, -1, -1, -1, -1, 0x08, -1, 0x10, 0x18, 0x20};
- char bits;
+ static u_char interrupt_bits[12] =
+ {-1, -1, -1, -1, -1, -1, -1, 0x08, -1, 0x10, 0x18, 0x20};
+ char bits;
- static unsigned char dma_bits[4] =
- {1, 2, 0, 3};
+ static u_char dma_bits[4] =
+ {1, 2, 0, 3};
- int config_port = hw_config->io_base + 0, version_port = hw_config->io_base + 3;
+ int config_port = hw_config->io_base + 0,
+ version_port = hw_config->io_base + 3;
+ int dma1 = hw_config->dma, dma2 = hw_config->dma2;
- if (!kilroy_was_here)
- return mem_start;
+ trix_osp = hw_config->osp;
- /*
+ if (!kilroy_was_here) {
+ DDB(printf("AudioTriX: Attach called but not probed yet???\n"));
+ return ;
+ }
+ /*
* Set the IRQ and DMA addresses.
- */
+ */
+
+ bits = interrupt_bits[hw_config->irq];
+ if (bits == -1) {
+ printf("AudioTriX: Bad IRQ (%d)\n", hw_config->irq);
+ return ;
+ }
+ outb(config_port, bits | 0x40);
+ if ((inb(version_port) & 0x40) == 0)
+ printf("[IRQ Conflict?]");
- bits = interrupt_bits[hw_config->irq];
- if (bits == -1)
- return mem_start;
+ if (hw_config->dma2 == -1) { /* Single DMA mode */
+ bits |= dma_bits[dma1];
+ dma2 = dma1;
+ } else {
+ u_char tmp;
- OUTB (bits | 0x40, config_port);
- if ((INB (version_port) & 0x40) == 0)
- printk ("[IRQ Conflict?]");
+ tmp = trix_read(0x13) & ~30;
+ trix_write(0x13, tmp | 0x80 | (dma1 << 4));
- OUTB (bits | dma_bits[hw_config->dma], config_port); /* Write IRQ+DMA setup */
+ tmp = trix_read(0x14) & ~30;
+ trix_write(0x14, tmp | 0x80 | (dma2 << 4));
+ }
+
+ outb(config_port, bits);/* Write IRQ+DMA setup */
- ad1848_init ("AudioTriX Pro", hw_config->io_base + 4,
- hw_config->irq,
- hw_config->dma,
- hw_config->dma);
- return mem_start;
+ ad1848_init("AudioTriX Pro", hw_config->io_base + 4,
+ hw_config->irq,
+ dma1,
+ dma2,
+ 0,
+ hw_config->osp);
+ return ;
}
int
-probe_trix_sb (struct address_info *hw_config)
+probe_trix_sb(struct address_info * hw_config)
{
-
- int tmp;
- unsigned char conf;
- static char irq_translate[] =
- {-1, -1, -1, 0, 1, 2, -1, 3};
+ int tmp;
+ u_char conf;
+ static char irq_translate[] = {-1, -1, -1, 0, 1, 2, -1, 3};
#ifndef INCLUDE_TRIX_BOOT
- return 0; /* No boot code -> no fun */
+ return 0; /* No boot code -> no fun */
#endif
- if (!kilroy_was_here)
- return 0; /* AudioTriX Pro has not been detected earlier */
+ if (!kilroy_was_here)
+ return 0; /* AudioTriX Pro has not been detected earlier */
- if (sb_initialized)
- return 0;
+ if (sb_initialized)
+ return 0;
- if (hw_config->io_base & 0xffffff8f != 0x200)
- return 0;
+ if ((hw_config->io_base & 0xffffff8f) != 0x200)
+ return 0;
- tmp = hw_config->irq;
- if (tmp > 7)
- return 0;
- if (irq_translate[tmp] == -1)
- return 0;
+ tmp = hw_config->irq;
+ if (tmp > 7)
+ return 0;
+ if (irq_translate[tmp] == -1)
+ return 0;
- tmp = hw_config->dma;
- if (tmp != 1 && tmp != 3)
- return 0;
+ tmp = hw_config->dma;
+ if (tmp != 1 && tmp != 3)
+ return 0;
- conf = 0x84; /* DMA and IRQ enable */
- conf |= hw_config->io_base & 0x70; /* I/O address bits */
- conf |= irq_translate[hw_config->irq];
- if (hw_config->dma == 3)
- conf |= 0x08;
- trix_write (0x1b, conf);
+ conf = 0x84; /* DMA and IRQ enable */
+ conf |= hw_config->io_base & 0x70; /* I/O address bits */
+ conf |= irq_translate[hw_config->irq];
+ if (hw_config->dma == 3)
+ conf |= 0x08;
+ trix_write(0x1b, conf);
- download_boot (hw_config->io_base);
- sb_initialized = 1;
+ download_boot(hw_config->io_base);
+ sb_initialized = 1;
- return 1;
+ return 1;
}
-long
-attach_trix_sb (long mem_start, struct address_info *hw_config)
+void
+attach_trix_sb(struct address_info * hw_config)
{
- printk (" <AudioTriX>");
- return mem_start;
+#if (NSB > 0)
+ sb_dsp_disable_midi();
+ sb_no_recording = 1;
+#endif
+ conf_printf("AudioTriX (SB)", hw_config);
}
-long
-attach_trix_mpu (long mem_start, struct address_info *hw_config)
+void
+attach_trix_mpu(struct address_info * hw_config)
{
- return attach_mpu401 (mem_start, hw_config);
+#if (defined(CONFIG_MPU401) || defined(CONFIG_MPU_EMU)) && defined(CONFIG_MIDI)
+ attach_mpu401(hw_config);
+#endif
}
int
-probe_trix_mpu (struct address_info *hw_config)
+probe_trix_mpu(struct address_info * hw_config)
{
- unsigned char conf;
- static char irq_bits[] =
- {-1, -1, -1, 1, 2, 3, -1, 4, -1, 5};
-
- if (!kilroy_was_here)
- return 0; /* AudioTriX Pro has not been detected earlier */
-
- if (!sb_initialized)
- return 0;
-
- if (mpu_initialized)
- return 0;
+#if (defined(CONFIG_MPU401) || defined(CONFIG_MPU_EMU)) && defined(CONFIG_MIDI)
+ u_char conf;
+ static char irq_bits[] = {-1, -1, -1, 1, 2, 3, -1, 4, -1, 5};
- if (hw_config->irq > 9)
- return 0;
-
- if (irq_bits[hw_config->irq] == -1)
- return 0;
-
- switch (hw_config->io_base)
- {
+ if (!kilroy_was_here) {
+ DDB(printf("Trix: WSS and SB modes must be initialized before MPU\n"));
+ return 0; /* AudioTriX Pro has not been detected earlier */
+ }
+ if (!sb_initialized) {
+ DDB(printf("Trix: SB mode must be initialized before MPU\n"));
+ return 0;
+ }
+ if (mpu_initialized) {
+ DDB(printf("Trix: MPU mode already initialized\n"));
+ return 0;
+ }
+ if (hw_config->irq > 9) {
+ printf("AudioTriX: Bad MPU IRQ %d\n", hw_config->irq);
+ return 0;
+ }
+ if (irq_bits[hw_config->irq] == -1) {
+ printf("AudioTriX: Bad MPU IRQ %d\n", hw_config->irq);
+ return 0;
+ }
+ switch (hw_config->io_base) {
case 0x330:
- conf = 0x00;
- break;
+ conf = 0x00;
+ break;
case 0x370:
- conf = 0x04;
- break;
+ conf = 0x04;
+ break;
case 0x3b0:
- conf = 0x08;
- break;
+ conf = 0x08;
+ break;
case 0x3f0:
- conf = 0x0c;
- break;
+ conf = 0x0c;
+ break;
default:
- return 0; /* Invalid port */
+ return 0; /* Invalid port */
}
- conf |= irq_bits[hw_config->irq] << 4;
+ conf |= irq_bits[hw_config->irq] << 4;
- trix_write (0x19, (trix_read (0x19) & 0x83) | conf);
+ trix_write(0x19, (trix_read(0x19) & 0x83) | conf);
- mpu_initialized = 1;
+ mpu_initialized = 1;
- return probe_mpu401 (hw_config);
+ return probe_mpu401(hw_config);
+#else
+ return 0;
+#endif
}
#endif
diff --git a/sys/i386/isa/sound/trix_boot.h b/sys/i386/isa/sound/trix_boot.h
new file mode 100644
index 0000000..d6bd16a
--- /dev/null
+++ b/sys/i386/isa/sound/trix_boot.h
@@ -0,0 +1,2488 @@
+/*
+ * Computer generated file. Do not edit.
+ */
+static unsigned char trix_boot[] = {
+0x80,0x2e,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x40,0xe1,0x00,0x00,
+0x00,0x00,0x00,0x02,0x44,0x3f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x02,0x44,0xcb,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x74,0x00,0xa2,0xe3,0x92,0xd3,0xa2,0xe4,0x92,0xd4,0x75,0x81,0x45,0x12,0x3d,0x2e,
+0xd2,0xaa,0xd2,0xaf,0x12,0x04,0xb9,0x7e,0x97,0x7f,0x54,0x90,0x00,0x00,0x02,0x0e,
+0x14,0x80,0xfe,0x12,0x00,0x5c,0x12,0x03,0xc7,0x02,0x00,0x74,0xd0,0x00,0xd0,0x01,
+0xc0,0x02,0xc0,0x03,0xc0,0x01,0xc0,0x00,0x8b,0x82,0x8a,0x83,0xe0,0xcc,0xfa,0xa3,
+0xe0,0xcd,0xfb,0x22,0xd0,0x82,0xd0,0x83,0xf5,0xf0,0xea,0xf0,0xa3,0xeb,0xf0,0xe5,
+0xf0,0x22,0xeb,0x33,0xe4,0x95,0xe0,0xfa,0xed,0x33,0xe4,0x95,0xe0,0xfc,0xec,0x33,
+0xea,0x6c,0x13,0xc0,0xe0,0x12,0x03,0xcf,0xd0,0xf0,0x60,0x0c,0x30,0xf6,0x02,0xaa,
+0xf0,0xea,0x33,0xb3,0xe4,0xfa,0x33,0xfb,0x22,0x7a,0x00,0x7c,0x00,0x12,0x03,0xcf,
+0x60,0x05,0xb3,0xe4,0xfa,0x33,0xfb,0x22,0xeb,0x33,0xe4,0x95,0xe0,0xfa,0xed,0x33,
+0xe4,0x95,0xe0,0xfc,0xec,0x33,0xea,0x6c,0x13,0xc0,0xe0,0x12,0x03,0xcf,0xd0,0xe0,
+0x30,0xe6,0x01,0xfa,0xe4,0xca,0x23,0x54,0x01,0xfb,0x22,0x7a,0x00,0x7c,0x00,0x12,
+0x03,0xcf,0xe4,0xfa,0x33,0xfb,0x22,0xeb,0x33,0xe4,0x95,0xe0,0xfa,0xed,0x33,0xe4,
+0x95,0xe0,0xfc,0xec,0x33,0xea,0x6c,0x13,0xc0,0xe0,0x12,0x03,0xcf,0xd0,0xe0,0x30,
+0xe6,0x01,0xfa,0xe4,0xca,0xf4,0x23,0x54,0x01,0xfb,0x22,0x7a,0x00,0x7c,0x00,0x12,
+0x03,0xcf,0xe4,0xfa,0xb3,0x33,0xfb,0x22,0x7a,0x00,0x7c,0x00,0x12,0x03,0xcf,0x0b,
+0x60,0x04,0xe4,0xfa,0x33,0xfb,0xeb,0x22,0x7a,0x00,0x7c,0x00,0x12,0x03,0xcf,0x0b,
+0x60,0x03,0xe4,0xfa,0xfb,0xeb,0x22,0x7a,0x00,0x7c,0x00,0x12,0x03,0xcf,0x60,0x04,
+0xe4,0xfa,0x04,0xfb,0xeb,0x22,0xd0,0x83,0xd0,0x82,0xe4,0x93,0xf5,0xf0,0xa3,0xe4,
+0x93,0xa3,0xc0,0x82,0xc0,0x83,0xb8,0x03,0x0a,0xc0,0x04,0xc0,0x05,0xc0,0x00,0x78,
+0x04,0x80,0x08,0xc0,0x02,0xc0,0x03,0xc0,0x00,0x78,0x02,0xa6,0xf0,0x08,0xf6,0x12,
+0x03,0xd8,0xd0,0x00,0xb8,0x03,0x05,0xd0,0x05,0xd0,0x04,0x22,0x8b,0x05,0x8a,0x04,
+0xd0,0x03,0xd0,0x02,0x22,0xd0,0x83,0xd0,0x82,0x12,0x02,0x14,0x80,0x0e,0xd0,0x83,
+0xd0,0x82,0x12,0x02,0x14,0xc3,0xe4,0x99,0xf9,0xe4,0x98,0xf8,0xc0,0x82,0xc0,0x83,
+0x8a,0x83,0x8b,0x82,0xc0,0x82,0xc0,0x83,0x80,0x28,0x78,0x00,0x79,0x01,0x80,0x04,
+0x78,0xff,0x79,0xff,0xd0,0x83,0xd0,0x82,0xe4,0x93,0xa3,0xc0,0x82,0xc0,0x83,0x8a,
+0x83,0x8b,0x82,0xb4,0x01,0x05,0xe0,0x29,0xfb,0xf0,0x22,0xc0,0x82,0xc0,0x83,0xb4,
+0x02,0x13,0xe0,0xfa,0xa3,0xe0,0x29,0xfb,0xea,0x38,0xfa,0xd0,0x83,0xd0,0x82,0xf0,
+0xa3,0xeb,0xf0,0x4a,0x22,0x75,0xf0,0x04,0xc0,0x00,0x78,0x02,0xe0,0xf6,0x08,0xa3,
+0xd5,0xf0,0xf9,0x29,0xfd,0xd0,0x00,0xec,0x38,0xfc,0xeb,0x38,0xfb,0xea,0x38,0xfa,
+0xd0,0x83,0xd0,0x82,0x75,0xf0,0x04,0x78,0x02,0xe6,0xf0,0xa3,0x08,0xd5,0xf0,0xf9,
+0x4c,0x4b,0x4a,0x22,0xe4,0x93,0xf8,0xa3,0xe4,0x93,0xf9,0xa3,0x22,0xd0,0x83,0xd0,
+0x82,0x12,0x02,0x14,0x80,0x0e,0xd0,0x83,0xd0,0x82,0x12,0x02,0x14,0xc3,0xe4,0x99,
+0xf9,0xe4,0x98,0xf8,0xc0,0x82,0xc0,0x83,0x8a,0x83,0x8b,0x82,0xc0,0x82,0xc0,0x83,
+0x80,0x2a,0x78,0x00,0x79,0x01,0x80,0x04,0x78,0xff,0x79,0xff,0xd0,0x83,0xd0,0x82,
+0xe4,0x93,0xa3,0xc0,0x82,0xc0,0x83,0x8a,0x83,0x8b,0x82,0xb4,0x01,0x07,0xe0,0x29,
+0xf0,0xc3,0x99,0xfb,0x22,0xc0,0x82,0xc0,0x83,0xb4,0x02,0x19,0xe0,0xfa,0xa3,0xe0,
+0x29,0xfb,0xea,0x38,0xfa,0xd0,0x83,0xd0,0x82,0xf0,0xa3,0xeb,0xf0,0xc3,0x99,0xfb,
+0xea,0x98,0xfa,0x4b,0x22,0x75,0xf0,0x04,0xc0,0x00,0x78,0x02,0xe0,0xf6,0x08,0xa3,
+0xd5,0xf0,0xf9,0x29,0xfd,0xd0,0x00,0xec,0x38,0xfc,0xeb,0x38,0xfb,0xea,0x38,0xfa,
+0xd0,0x83,0xd0,0x82,0x75,0xf0,0x04,0xc0,0x00,0x78,0x02,0xe6,0xf0,0xa3,0x08,0xd5,
+0xf0,0xf9,0xd0,0x00,0xc3,0x99,0xfd,0xec,0x98,0xfc,0xeb,0x98,0xfb,0xea,0x98,0xfa,
+0x4b,0x4c,0x4d,0x22,0xeb,0x60,0x11,0x24,0xf0,0x50,0x04,0xe4,0xfa,0xfb,0x22,0xec,
+0xc3,0x13,0xfc,0xed,0x13,0xfd,0xdb,0xf7,0x8c,0x02,0x8d,0x03,0xea,0x4b,0x22,0xeb,
+0x60,0x11,0x24,0xf0,0x50,0x04,0xe4,0xfa,0xfb,0x22,0xed,0xc3,0x33,0xfd,0xec,0x33,
+0xfc,0xdb,0xf7,0x8c,0x02,0x8d,0x03,0xea,0x4b,0x22,0xea,0x5c,0xfa,0xeb,0x5d,0xfb,
+0x4a,0x22,0xea,0x4c,0xfa,0xeb,0x4d,0xfb,0x4a,0x22,0x8a,0x83,0x8b,0x82,0xed,0xf0,
+0xfb,0x22,0x8a,0x83,0x8b,0x82,0xec,0xf0,0xfa,0xa3,0xed,0xf0,0xfb,0x4a,0x22,0xc0,
+0x03,0xc0,0x02,0x12,0x05,0xf9,0xd0,0x83,0xd0,0x82,0x78,0x04,0x79,0x02,0xe7,0xf0,
+0x09,0xa3,0xd8,0xfa,0x4c,0x4b,0x4a,0x22,0x78,0x03,0x79,0x01,0x80,0x08,0x79,0x02,
+0x80,0x02,0x79,0x04,0x78,0x02,0xd0,0x83,0xd0,0x82,0xe4,0x93,0x2b,0xf5,0xf0,0xa3,
+0xe4,0x93,0x3a,0x80,0x27,0x78,0x03,0x79,0x01,0x80,0x14,0x78,0x05,0x79,0x01,0x80,
+0x0e,0x79,0x02,0x80,0x08,0x78,0x04,0x79,0x02,0x80,0x04,0x79,0x04,0x78,0x02,0xd0,
+0x83,0xd0,0x82,0xe4,0x93,0x2f,0xf5,0xf0,0xa3,0xe4,0x93,0x3e,0xa3,0xc0,0x82,0xc0,
+0x83,0xf5,0x83,0x85,0xf0,0x82,0x75,0xf0,0x00,0xe0,0xf6,0x42,0xf0,0x08,0xa3,0xd9,
+0xf8,0xe5,0xf0,0x22,0x78,0x03,0x79,0x01,0x80,0x08,0x79,0x02,0x80,0x02,0x79,0x04,
+0x78,0x02,0xd0,0x83,0xd0,0x82,0xe4,0x93,0x2f,0xf5,0xf0,0xa3,0xe4,0x93,0x3e,0xa3,
+0xc0,0x82,0xc0,0x83,0xf5,0x83,0x85,0xf0,0x82,0x75,0xf0,0x00,0xe6,0xf0,0xa3,0x08,
+0x42,0xf0,0xd9,0xf8,0xe5,0xf0,0x22,0xeb,0x2d,0xfb,0xea,0x3c,0xfa,0x4b,0x22,0xed,
+0xc3,0x9b,0xfb,0xec,0x9a,0xfa,0x4b,0x22,0xeb,0x8c,0xf0,0xa4,0xca,0x8d,0xf0,0xa4,
+0x2a,0xfa,0xeb,0x8d,0xf0,0xa4,0xfb,0xe5,0xf0,0x2a,0xfa,0x4b,0x22,0x79,0x00,0xea,
+0x30,0xe7,0x07,0x79,0x01,0x78,0x03,0x12,0x04,0x5f,0xec,0x30,0xe7,0x08,0x63,0x01,
+0x01,0x78,0x05,0x12,0x04,0x5f,0xc0,0x01,0x12,0x04,0x25,0xd0,0x01,0xb9,0x01,0x05,
+0x78,0x05,0x12,0x04,0x5f,0x8c,0x02,0x8d,0x03,0xea,0x4b,0x22,0xe4,0xc3,0x9b,0xfb,
+0xe4,0x9a,0xfa,0x4b,0x22,0xbb,0x00,0x04,0xba,0x00,0x01,0x22,0x78,0x00,0x79,0x00,
+0x74,0x10,0xc0,0xe0,0xc3,0xed,0x33,0xfd,0xec,0x33,0xfc,0xe9,0x33,0xf9,0xe8,0x33,
+0xf8,0xc3,0xe9,0x9b,0xf5,0xf0,0xe8,0x9a,0x40,0x0b,0xf8,0xa9,0xf0,0xed,0x24,0x01,
+0xfd,0xec,0x34,0x00,0xfc,0xd0,0xe0,0x14,0xc0,0xe0,0x70,0xd8,0xd0,0xe0,0x22,0xe4,
+0xc3,0x96,0xf6,0x18,0xe4,0x96,0xf6,0x22,0xd0,0x83,0xd0,0x82,0xe4,0x93,0xf8,0xa3,
+0xe4,0x93,0xf9,0xa3,0xe4,0x93,0xfc,0xa3,0xe4,0x93,0xfd,0xa3,0xc3,0xeb,0x99,0xf9,
+0xea,0x98,0xf8,0x20,0xe7,0x08,0xc3,0xed,0x9b,0xec,0x9a,0x30,0xe7,0x0d,0xe4,0x93,
+0xf5,0xf0,0xa3,0xe4,0x93,0xa3,0xc0,0xe0,0xc0,0xf0,0x22,0xa3,0xa3,0xe9,0x29,0x50,
+0x02,0x05,0x83,0x25,0x82,0xf5,0x82,0xe5,0x83,0x38,0x28,0xf5,0x83,0xe4,0x93,0xf5,
+0xf0,0xa3,0xe4,0x93,0xc0,0xe0,0xc0,0xf0,0x22,0x90,0x46,0xc2,0xaa,0x83,0xab,0x82,
+0x90,0x42,0x80,0x12,0x05,0x14,0x90,0x9b,0x15,0xaa,0x83,0xab,0x82,0x90,0x9b,0x15,
+0x12,0x05,0x1f,0x60,0x2c,0xc0,0x02,0xc0,0x03,0xc0,0x82,0xc0,0x83,0x78,0x02,0x79,
+0x04,0xe4,0x93,0xf6,0xa3,0x08,0xd9,0xf9,0x8b,0x82,0x8a,0x83,0x8c,0x02,0x8d,0x03,
+0x12,0x05,0x14,0xd0,0x83,0xd0,0x82,0xd0,0x03,0xd0,0x02,0xa3,0xa3,0xa3,0xa3,0x80,
+0xcf,0x12,0x05,0x28,0x9b,0x15,0x4c,0x83,0x46,0xc2,0x12,0x05,0x28,0x9b,0x15,0x9b,
+0x15,0x95,0x54,0x22,0x12,0x05,0x1f,0x70,0x01,0x22,0xe4,0xf0,0xa3,0x80,0xf5,0xeb,
+0x65,0x82,0x70,0x03,0xea,0x65,0x83,0x22,0xd0,0x83,0xd0,0x82,0x78,0x02,0x79,0x06,
+0xe4,0x93,0xf6,0xa3,0x08,0xd9,0xf9,0xc0,0x82,0xc0,0x83,0x8d,0x82,0x8c,0x83,0x12,
+0x05,0x1f,0x60,0x13,0xe4,0x93,0xa3,0xad,0x82,0xac,0x83,0x8f,0x82,0x8e,0x83,0xf0,
+0xa3,0xaf,0x82,0xae,0x83,0x80,0xe4,0x22,0x60,0x19,0xc0,0x00,0xc0,0x01,0xc0,0x83,
+0xc0,0x82,0xf8,0x54,0x01,0x24,0x02,0xf9,0x12,0x06,0x00,0xd0,0x82,0xd0,0x83,0xd0,
+0x01,0xd0,0x00,0xef,0x25,0x82,0xfd,0xee,0x35,0x83,0xfc,0xc3,0xef,0x99,0xf5,0x82,
+0xff,0xee,0x98,0xfe,0xf5,0x83,0xd0,0x02,0xd0,0x03,0xd0,0xe0,0xf0,0xa3,0xd0,0xe0,
+0xf0,0xa3,0xec,0xf0,0xa3,0xed,0xf0,0xc0,0x03,0xc0,0x02,0x22,0x8e,0x83,0x8f,0x82,
+0xe0,0xf5,0xf0,0xa3,0xe0,0xc0,0xe0,0xc0,0xf0,0xa3,0xe0,0xfe,0xa3,0xe0,0xff,0x22,
+0xd0,0x01,0xd0,0x00,0xd0,0xe0,0xd0,0xf0,0xc0,0x00,0xc0,0x01,0xc0,0xf0,0xc0,0xe0,
+0x22,0x78,0x01,0x79,0x03,0x02,0x06,0x00,0x78,0x01,0x79,0x05,0x02,0x06,0x00,0x78,
+0x02,0x79,0x02,0x02,0x06,0x00,0x78,0x02,0x79,0x04,0x02,0x06,0x00,0x78,0x01,0x79,
+0x03,0x02,0x06,0x13,0x78,0x01,0x79,0x05,0x02,0x06,0x13,0x78,0x02,0x79,0x02,0x02,
+0x06,0x13,0x78,0x02,0x79,0x04,0x02,0x06,0x13,0x78,0x04,0x79,0x02,0x02,0x06,0x13,
+0xef,0xc3,0x98,0xff,0xee,0x94,0x00,0xfe,0x8f,0x82,0x8e,0x83,0xe7,0xf0,0xa3,0x09,
+0xd8,0xfa,0x22,0xc0,0xe0,0x8f,0x82,0x8e,0x83,0xe0,0xf7,0xa3,0x09,0xd8,0xfa,0xae,
+0x83,0xaf,0x82,0xd0,0xe0,0x22,0x74,0x02,0x78,0x00,0x79,0x04,0x12,0x05,0x58,0x12,
+0x03,0x61,0x04,0x00,0x90,0x42,0x80,0xea,0xf0,0xeb,0xa3,0xf0,0x7b,0x00,0x12,0x05,
+0xc1,0x7b,0x05,0x12,0x05,0xc1,0x7b,0x01,0x90,0x00,0x03,0x12,0x0d,0x73,0x7b,0x02,
+0x12,0x05,0xc1,0x7b,0x05,0x12,0x05,0xc1,0x7b,0x01,0x90,0x00,0x03,0x12,0x0d,0x73,
+0x90,0x00,0x00,0x12,0x0d,0xed,0x7b,0xf9,0x90,0x42,0x0c,0xeb,0xf0,0x90,0x42,0x0c,
+0xe0,0xfb,0x7a,0x00,0x8b,0x05,0x8a,0x04,0x7b,0xff,0x7a,0x00,0x12,0x01,0x3b,0x60,
+0x1a,0x7b,0x00,0x12,0x05,0xc1,0x90,0x42,0x0c,0xe0,0xfb,0x90,0x00,0x02,0x12,0x0c,
+0xe7,0x7b,0x0c,0x7a,0x42,0x12,0x02,0x48,0x01,0x80,0xd2,0x7b,0x1b,0x12,0x05,0xc1,
+0x7b,0xf8,0x90,0x00,0x02,0x12,0x0c,0xe7,0x7b,0x01,0x7a,0x00,0x02,0x05,0x9c,0xe4,
+0x78,0x00,0x79,0x04,0x12,0x05,0x58,0x02,0x05,0x9c,0x74,0x01,0x78,0x00,0x79,0x04,
+0x12,0x05,0x58,0x12,0x03,0x55,0x04,0x00,0x8b,0x05,0x7b,0x20,0xeb,0x2d,0xfb,0x90,
+0x42,0x0d,0xeb,0xf0,0x7b,0x82,0x7a,0x42,0x8b,0x05,0x8a,0x04,0x90,0x42,0x0d,0xe0,
+0xfb,0x7a,0x00,0x12,0x03,0xc7,0x8a,0x83,0x8b,0x82,0xe0,0xfb,0x8b,0x05,0x7b,0xfe,
+0xeb,0x5d,0xfb,0x8b,0x05,0x12,0x03,0x55,0x05,0x00,0xeb,0x4d,0xfb,0x12,0x05,0xc1,
+0x90,0x42,0x0d,0xe0,0xfb,0x90,0x00,0x02,0x12,0x0c,0xe7,0x7b,0xe8,0x8b,0x05,0x7b,
+0x0d,0x7a,0x42,0x8a,0x83,0x8b,0x82,0xe0,0x2d,0xf0,0xfb,0x12,0x03,0x55,0x06,0x00,
+0x12,0x05,0xc1,0x90,0x42,0x0d,0xe0,0xfb,0x90,0x00,0x02,0x12,0x0c,0xe7,0x02,0x05,
+0x9c,0x74,0x01,0x78,0x00,0x79,0x04,0x12,0x05,0x58,0x7b,0x00,0x7a,0x00,0x90,0x42,
+0x0f,0xea,0xf0,0xeb,0xa3,0xf0,0x90,0x42,0x0f,0xe0,0xfa,0xa3,0xe0,0xfb,0x8b,0x05,
+0x8a,0x04,0x7b,0xe8,0x7a,0x03,0x12,0x00,0xc4,0x60,0x1a,0x90,0x00,0x00,0x12,0x0d,
+0xed,0x8b,0x05,0x7b,0x02,0xeb,0x5d,0x70,0x02,0x80,0x0a,0x7b,0x0f,0x7a,0x42,0x12,
+0x02,0x42,0x02,0x80,0xd1,0x12,0x03,0x55,0x04,0x00,0x7a,0x00,0x8b,0x05,0x8a,0x04,
+0x7b,0x80,0x7a,0x00,0x12,0x03,0xc7,0x90,0x42,0x0e,0xeb,0xf0,0x74,0x05,0x2f,0xfb,
+0xe4,0x3e,0xfa,0x12,0x02,0x42,0x02,0x8a,0x83,0x8b,0x82,0xe0,0xfb,0x8b,0x05,0x7b,
+0x3f,0xeb,0x5d,0xfb,0x12,0x05,0xc1,0x90,0x42,0x0e,0xe0,0xfb,0x90,0x00,0x02,0x12,
+0x0c,0xe7,0x7b,0x18,0x8b,0x05,0x7b,0x0e,0x7a,0x42,0x8a,0x83,0x8b,0x82,0xe0,0x2d,
+0xf0,0xfb,0x74,0x05,0x2f,0xfb,0xe4,0x3e,0xfa,0x12,0x02,0x42,0x02,0x8a,0x83,0x8b,
+0x82,0xe0,0xfb,0x12,0x05,0xc1,0x90,0x42,0x0e,0xe0,0xfb,0x90,0x00,0x02,0x12,0x0c,
+0xe7,0x7b,0x18,0x8b,0x05,0x7b,0x0e,0x7a,0x42,0x8a,0x83,0x8b,0x82,0xe0,0x2d,0xf0,
+0xfb,0x74,0x05,0x2f,0xfb,0xe4,0x3e,0xfa,0x12,0x02,0x42,0x02,0x8a,0x83,0x8b,0x82,
+0xe0,0xfb,0x12,0x05,0xc1,0x90,0x42,0x0e,0xe0,0xfb,0x90,0x00,0x02,0x12,0x0c,0xe7,
+0x7b,0x18,0x8b,0x05,0x7b,0x0e,0x7a,0x42,0x8a,0x83,0x8b,0x82,0xe0,0x2d,0xf0,0xfb,
+0x74,0x05,0x2f,0xfb,0xe4,0x3e,0xfa,0x12,0x02,0x42,0x02,0x8a,0x83,0x8b,0x82,0xe0,
+0xfb,0x12,0x05,0xc1,0x90,0x42,0x0e,0xe0,0xfb,0x90,0x00,0x02,0x12,0x0c,0xe7,0x7b,
+0x18,0x8b,0x05,0x7b,0x0e,0x7a,0x42,0x8a,0x83,0x8b,0x82,0xe0,0x2d,0xf0,0xfb,0x74,
+0x05,0x2f,0xfb,0xe4,0x3e,0xfa,0x12,0x02,0x42,0x02,0x8a,0x83,0x8b,0x82,0xe0,0xfb,
+0x8b,0x05,0x7b,0x07,0xeb,0x5d,0xfb,0x12,0x05,0xc1,0x90,0x42,0x0e,0xe0,0xfb,0x90,
+0x00,0x02,0x12,0x0c,0xe7,0x02,0x05,0x9c,0x74,0x01,0x78,0x00,0x79,0x04,0x12,0x05,
+0x58,0x12,0x03,0x55,0x04,0x00,0x8b,0x05,0x7b,0x50,0xeb,0x2d,0xfb,0x90,0x42,0x11,
+0xeb,0xf0,0x12,0x03,0x55,0x05,0x00,0x7a,0x00,0x8b,0x05,0x8a,0x04,0x7b,0x01,0x12,
+0x02,0xdf,0x8b,0x05,0x8a,0x04,0x12,0x03,0x55,0x06,0x00,0x12,0x05,0xd6,0x8b,0x05,
+0x7b,0x01,0xeb,0x5d,0xfb,0x12,0x05,0xf2,0x7a,0x00,0x12,0x03,0x02,0x12,0x05,0xc1,
+0x90,0x42,0x11,0xe0,0xfb,0x90,0x00,0x02,0x12,0x0c,0xe7,0x02,0x05,0x9c,0x74,0x01,
+0x78,0x00,0x79,0x04,0x12,0x05,0x58,0x12,0x03,0x55,0x04,0x00,0x8b,0x05,0x7b,0x68,
+0xeb,0x2d,0xfb,0x90,0x42,0x12,0xeb,0xf0,0x7b,0x82,0x7a,0x42,0x8b,0x05,0x8a,0x04,
+0x90,0x42,0x12,0xe0,0xfb,0x7a,0x00,0x12,0x03,0xc7,0x8a,0x83,0x8b,0x82,0xe0,0xfb,
+0x7a,0x00,0x8b,0x05,0x8a,0x04,0x7b,0x30,0x7a,0xff,0x12,0x02,0xfa,0x8b,0x05,0x8a,
+0x04,0x12,0x03,0x55,0x05,0x00,0x12,0x05,0xd6,0x8b,0x05,0x7b,0x0f,0xeb,0x5d,0xfb,
+0x12,0x05,0xf2,0x7a,0x00,0x12,0x05,0xd6,0x8b,0x05,0x8a,0x04,0x7b,0x80,0x7a,0x00,
+0x12,0x03,0x02,0x12,0x05,0xf2,0x12,0x03,0x02,0x12,0x05,0xc1,0x90,0x42,0x12,0xe0,
+0xfb,0x90,0x00,0x02,0x12,0x0c,0xe7,0x02,0x05,0x9c,0x74,0x01,0x78,0x00,0x79,0x04,
+0x12,0x05,0x58,0x12,0x03,0x55,0x04,0x00,0x8b,0x05,0x7b,0x68,0xeb,0x2d,0xfb,0x90,
+0x42,0x13,0xeb,0xf0,0x7b,0x82,0x7a,0x42,0x8b,0x05,0x8a,0x04,0x90,0x42,0x13,0xe0,
+0xfb,0x7a,0x00,0x12,0x03,0xc7,0x8a,0x83,0x8b,0x82,0xe0,0xfb,0x7a,0x00,0x8b,0x05,
+0x8a,0x04,0x7b,0x7f,0x7a,0xff,0x12,0x02,0xfa,0x12,0x05,0xc1,0x90,0x42,0x13,0xe0,
+0xfb,0x90,0x00,0x02,0x12,0x0c,0xe7,0x02,0x05,0x9c,0x74,0x01,0x78,0x00,0x79,0x04,
+0x12,0x05,0x58,0x12,0x03,0x55,0x04,0x00,0x8b,0x05,0x7b,0x38,0xeb,0x2d,0xfb,0x90,
+0x42,0x14,0xeb,0xf0,0x7b,0x82,0x7a,0x42,0x8b,0x05,0x8a,0x04,0x90,0x42,0x14,0xe0,
+0xfb,0x7a,0x00,0x12,0x03,0xc7,0x8a,0x83,0x8b,0x82,0xe0,0xfb,0x7a,0x00,0x8b,0x05,
+0x8a,0x04,0x7b,0x08,0x7a,0xff,0x12,0x02,0xfa,0x8b,0x05,0x8a,0x04,0x12,0x03,0x55,
+0x05,0x00,0x7a,0x00,0x12,0x05,0xd6,0x8b,0x05,0x8a,0x04,0x7b,0x04,0x12,0x02,0xdf,
+0x12,0x05,0xf2,0x12,0x05,0xd6,0x8b,0x05,0x8a,0x04,0x7b,0xf0,0x7a,0x00,0x12,0x02,
+0xfa,0x12,0x05,0xf2,0x12,0x05,0xd6,0x8b,0x05,0x8a,0x04,0x12,0x03,0x61,0x08,0x00,
+0x12,0x05,0xd6,0x8b,0x05,0x8a,0x04,0x7b,0x07,0x12,0x02,0xc4,0x12,0x05,0xf2,0x12,
+0x05,0xd6,0x8b,0x05,0x8a,0x04,0x7b,0x07,0x7a,0x00,0x12,0x02,0xfa,0x12,0x05,0xf2,
+0x12,0x03,0x02,0x12,0x05,0xf2,0x12,0x03,0x02,0x12,0x05,0xc1,0x90,0x42,0x14,0xe0,
+0xfb,0x90,0x00,0x02,0x12,0x0c,0xe7,0x7b,0xe8,0x8b,0x05,0x7b,0x14,0x7a,0x42,0x8a,
+0x83,0x8b,0x82,0xe0,0x2d,0xf0,0xfb,0x7b,0x82,0x7a,0x42,0x8b,0x05,0x8a,0x04,0x90,
+0x42,0x14,0xe0,0xfb,0x7a,0x00,0x12,0x03,0xc7,0x8a,0x83,0x8b,0x82,0xe0,0xfb,0x7a,
+0x00,0x8b,0x05,0x8a,0x04,0x7b,0x01,0x7a,0xff,0x12,0x02,0xfa,0x8b,0x05,0x8a,0x04,
+0x12,0x03,0x61,0x06,0x00,0x7a,0x00,0x12,0x05,0xd6,0x8b,0x05,0x8a,0x04,0x7b,0x01,
+0x12,0x02,0xdf,0x12,0x05,0xf2,0x12,0x03,0x02,0x12,0x05,0xc1,0x90,0x42,0x14,0xe0,
+0xfb,0x90,0x00,0x02,0x12,0x0c,0xe7,0x02,0x05,0x9c,0x74,0x01,0x78,0x00,0x79,0x04,
+0x12,0x05,0x58,0x12,0x03,0x55,0x04,0x00,0x8b,0x05,0x7b,0x68,0xeb,0x2d,0xfb,0x90,
+0x42,0x15,0xeb,0xf0,0x7b,0x82,0x7a,0x42,0x8b,0x05,0x8a,0x04,0x90,0x42,0x15,0xe0,
+0xfb,0x7a,0x00,0x12,0x03,0xc7,0x8a,0x83,0x8b,0x82,0xe0,0xfb,0x8b,0x05,0x7b,0xf0,
+0xeb,0x5d,0xfb,0x8b,0x05,0x12,0x03,0x55,0x05,0x00,0x12,0x05,0xc8,0x8b,0x05,0x7b,
+0x0f,0xeb,0x5d,0xfb,0x12,0x05,0xe4,0xeb,0x4d,0xfb,0x12,0x05,0xc1,0x90,0x42,0x15,
+0xe0,0xfb,0x90,0x00,0x02,0x12,0x0c,0xe7,0x02,0x05,0x9c,0x74,0x01,0x78,0x00,0x79,
+0x04,0x12,0x05,0x58,0x12,0x03,0x55,0x04,0x00,0x8b,0x05,0x7b,0x68,0xeb,0x2d,0xfb,
+0x90,0x42,0x16,0xeb,0xf0,0x7b,0x82,0x7a,0x42,0x8b,0x05,0x8a,0x04,0x90,0x42,0x16,
+0xe0,0xfb,0x7a,0x00,0x12,0x03,0xc7,0x8a,0x83,0x8b,0x82,0xe0,0xfb,0x8b,0x05,0x7b,
+0xbf,0xeb,0x5d,0xfb,0x8b,0x05,0x12,0x03,0x55,0x05,0x00,0x8d,0x03,0x60,0x0d,0x8b,
+0x05,0x7b,0x40,0x90,0x42,0x17,0xeb,0xf0,0x8d,0x03,0x80,0x0b,0x8b,0x05,0x7b,0x00,
+0x90,0x42,0x17,0xeb,0xf0,0x8d,0x03,0x8b,0x05,0x90,0x42,0x17,0xe0,0xfb,0xeb,0x4d,
+0xfb,0x12,0x05,0xc1,0x90,0x42,0x16,0xe0,0xfb,0x90,0x00,0x02,0x12,0x0c,0xe7,0x02,
+0x05,0x9c,0x74,0x01,0x78,0x00,0x79,0x04,0x12,0x05,0x58,0x12,0x03,0x55,0x04,0x00,
+0x8b,0x05,0x7b,0x68,0xeb,0x2d,0xfb,0x90,0x42,0x18,0xeb,0xf0,0x7b,0x82,0x7a,0x42,
+0x8b,0x05,0x8a,0x04,0x90,0x42,0x18,0xe0,0xfb,0x7a,0x00,0x12,0x03,0xc7,0x8a,0x83,
+0x8b,0x82,0xe0,0xfb,0x8b,0x05,0x7b,0xdf,0xeb,0x5d,0xfb,0x8b,0x05,0x12,0x03,0x55,
+0x05,0x00,0x8d,0x03,0x60,0x0d,0x8b,0x05,0x7b,0x20,0x90,0x42,0x19,0xeb,0xf0,0x8d,
+0x03,0x80,0x0b,0x8b,0x05,0x7b,0x00,0x90,0x42,0x19,0xeb,0xf0,0x8d,0x03,0x8b,0x05,
+0x90,0x42,0x19,0xe0,0xfb,0xeb,0x4d,0xfb,0x12,0x05,0xc1,0x90,0x42,0x18,0xe0,0xfb,
+0x90,0x00,0x02,0x12,0x0c,0xe7,0x02,0x05,0x9c,0x74,0x01,0x78,0x00,0x79,0x04,0x12,
+0x05,0x58,0x12,0x03,0x55,0x04,0x00,0x8b,0x05,0x7b,0x68,0xeb,0x2d,0xfb,0x90,0x42,
+0x1a,0xeb,0xf0,0x7b,0x82,0x7a,0x42,0x8b,0x05,0x8a,0x04,0x90,0x42,0x1a,0xe0,0xfb,
+0x7a,0x00,0x12,0x03,0xc7,0x8a,0x83,0x8b,0x82,0xe0,0xfb,0x8b,0x05,0x7b,0xef,0xeb,
+0x5d,0xfb,0x8b,0x05,0x12,0x03,0x55,0x05,0x00,0x8d,0x03,0x60,0x0d,0x8b,0x05,0x7b,
+0x10,0x90,0x42,0x1b,0xeb,0xf0,0x8d,0x03,0x80,0x0b,0x8b,0x05,0x7b,0x00,0x90,0x42,
+0x1b,0xeb,0xf0,0x8d,0x03,0x8b,0x05,0x90,0x42,0x1b,0xe0,0xfb,0xeb,0x4d,0xfb,0x12,
+0x05,0xc1,0x90,0x42,0x1a,0xe0,0xfb,0x90,0x00,0x02,0x12,0x0c,0xe7,0x02,0x05,0x9c,
+0x74,0x01,0x78,0x00,0x79,0x04,0x12,0x05,0x58,0x12,0x03,0x55,0x04,0x00,0x8b,0x05,
+0x7b,0x38,0xeb,0x2d,0xfb,0x90,0x42,0x1c,0xeb,0xf0,0x7b,0x82,0x7a,0x42,0x8b,0x05,
+0x8a,0x04,0x90,0x42,0x1c,0xe0,0xfb,0x7a,0x00,0x12,0x03,0xc7,0x8a,0x83,0x8b,0x82,
+0xe0,0xfb,0x8b,0x05,0x7b,0xf7,0xeb,0x5d,0xfb,0x8b,0x05,0x12,0x03,0x55,0x05,0x00,
+0x8d,0x03,0x60,0x0d,0x8b,0x05,0x7b,0x08,0x90,0x42,0x1d,0xeb,0xf0,0x8d,0x03,0x80,
+0x0b,0x8b,0x05,0x7b,0x00,0x90,0x42,0x1d,0xeb,0xf0,0x8d,0x03,0x8b,0x05,0x90,0x42,
+0x1d,0xe0,0xfb,0xeb,0x4d,0xfb,0x12,0x05,0xc1,0x90,0x42,0x1c,0xe0,0xfb,0x90,0x00,
+0x02,0x12,0x0c,0xe7,0x02,0x05,0x9c,0x74,0x01,0x78,0x00,0x79,0x04,0x12,0x05,0x58,
+0xc2,0xb4,0x12,0x03,0x55,0x04,0x00,0x8b,0x05,0x90,0x46,0xc2,0xe0,0xfa,0xa3,0xe0,
+0xfb,0x12,0x05,0xc8,0x8b,0x05,0x8a,0x04,0x7b,0x04,0x7a,0x00,0x12,0x03,0xc7,0x12,
+0x05,0xe4,0x12,0x03,0x0a,0x12,0x03,0x55,0x05,0x00,0x8b,0x05,0x90,0x46,0xc2,0xe0,
+0xfa,0xa3,0xe0,0xfb,0x12,0x05,0xc8,0x8b,0x05,0x8a,0x04,0x7b,0x05,0x7a,0x00,0x12,
+0x03,0xc7,0x12,0x05,0xe4,0x12,0x03,0x0a,0x12,0x03,0x55,0x04,0x00,0x7a,0x00,0x8b,
+0x05,0x8a,0x04,0x7b,0x00,0x7a,0x01,0x12,0x00,0xc4,0x60,0x22,0x12,0x03,0x55,0x05,
+0x00,0x8b,0x05,0x7b,0x82,0x7a,0x42,0x12,0x05,0xc8,0x8b,0x05,0x8a,0x04,0x12,0x03,
+0x55,0x05,0x00,0x7a,0x00,0x12,0x03,0xc7,0x12,0x05,0xe4,0x12,0x03,0x0a,0xd2,0xb4,
+0x02,0x05,0x9c,0x74,0x01,0x78,0x00,0x79,0x04,0x12,0x05,0x58,0xc2,0xb4,0x12,0x03,
+0x55,0x04,0x00,0x60,0x09,0x7b,0x02,0x90,0x42,0x20,0xeb,0xf0,0x80,0x07,0x7b,0x00,
+0x90,0x42,0x20,0xeb,0xf0,0x90,0x42,0x20,0xe0,0xfb,0x7a,0x00,0x8b,0x05,0x8a,0x04,
+0x90,0x46,0xc2,0xe0,0xfa,0xa3,0xe0,0xfb,0x12,0x03,0xc7,0x90,0x42,0x1e,0xea,0xf0,
+0xeb,0xa3,0xf0,0x12,0x03,0x55,0x05,0x00,0x8b,0x05,0x90,0x42,0x1e,0xe0,0xfa,0xa3,
+0xe0,0xfb,0x12,0x03,0x0a,0x12,0x03,0x55,0x06,0x00,0x8b,0x05,0x90,0x42,0x1e,0xe0,
+0xfa,0xa3,0xe0,0xfb,0x12,0x05,0xc8,0x8b,0x05,0x8a,0x04,0x7b,0x01,0x7a,0x00,0x12,
+0x03,0xc7,0x12,0x05,0xe4,0x12,0x03,0x0a,0xd2,0xb4,0x02,0x05,0x9c,0xe4,0x78,0x00,
+0x79,0x04,0x12,0x05,0x58,0xc2,0xb4,0x90,0x46,0xc2,0xe0,0xfa,0xa3,0xe0,0xfb,0x8a,
+0x83,0x8b,0x82,0xe0,0xfb,0x90,0x42,0x21,0xeb,0xf0,0xd2,0xb4,0x90,0x42,0x21,0xe0,
+0xfb,0x02,0x05,0x9c,0xe4,0x78,0x00,0x79,0x04,0x12,0x05,0x58,0x90,0x00,0x00,0x12,
+0x0e,0x2f,0x90,0x00,0x00,0x12,0x42,0x7e,0x7b,0x00,0x7a,0x00,0x02,0x05,0x9c,0xe4,
+0x78,0x00,0x79,0x04,0x12,0x05,0x58,0x90,0x00,0x00,0x12,0x1a,0xf2,0x02,0x05,0x9c,
+0xe4,0x78,0x00,0x79,0x04,0x12,0x05,0x58,0xab,0x87,0x90,0x42,0x22,0xeb,0xf0,0x7b,
+0x7f,0x8b,0x05,0x7b,0x22,0x7a,0x42,0x8a,0x83,0x8b,0x82,0xe0,0x5d,0xf0,0xfb,0x90,
+0x42,0x22,0xe0,0xfb,0x8b,0x87,0xab,0x89,0x90,0x42,0x22,0xeb,0xf0,0x90,0x42,0x22,
+0xe0,0xfb,0x8b,0x05,0x7b,0x0f,0xeb,0x5d,0xfb,0x8b,0x05,0x7b,0x20,0xeb,0x4d,0xfb,
+0x90,0x42,0x22,0xeb,0xf0,0x90,0x42,0x22,0xe0,0xfb,0x8b,0x89,0x7b,0xfe,0x8b,0x8d,
+0x7b,0x00,0x8b,0x8b,0xd2,0x8e,0xc2,0x9f,0xd2,0x9e,0xc2,0x9d,0xd2,0x9c,0xd2,0xac,
+0x7b,0x00,0x7a,0x00,0x02,0x05,0x9c,0xe4,0x78,0x00,0x79,0x04,0x12,0x05,0x58,0x90,
+0x43,0x84,0xe0,0xfb,0x8b,0x05,0x7b,0x0f,0xeb,0x5d,0xfb,0x90,0x42,0x27,0xeb,0xf0,
+0x90,0x43,0x85,0xe0,0xfb,0x90,0x42,0x28,0xeb,0xf0,0x90,0x43,0x86,0xe0,0xfb,0x90,
+0x42,0x29,0xeb,0xf0,0x7b,0x87,0x7a,0x43,0x8b,0x05,0x8a,0x04,0x90,0x42,0x27,0xe0,
+0xfb,0x7a,0x00,0x12,0x03,0xc7,0x8a,0x83,0x8b,0x82,0xe0,0xfb,0x7a,0x00,0x8b,0x05,
+0x8a,0x04,0x7b,0x07,0x12,0x02,0xdf,0x8b,0x05,0x8a,0x04,0x7b,0x97,0x7a,0x43,0x12,
+0x05,0xd6,0x8b,0x05,0x8a,0x04,0x90,0x42,0x27,0xe0,0xfb,0x7a,0x00,0x12,0x03,0xc7,
+0x12,0x05,0xf2,0x8a,0x83,0x8b,0x82,0xe0,0xfb,0x7a,0x00,0x12,0x03,0xc7,0x90,0x42,
+0x23,0xea,0xf0,0xeb,0xa3,0xf0,0x7b,0xa7,0x7a,0x43,0x8b,0x05,0x8a,0x04,0x90,0x42,
+0x27,0xe0,0xfb,0x7a,0x00,0x12,0x03,0xc7,0x8a,0x83,0x8b,0x82,0xe0,0xfb,0x7a,0x00,
+0x8b,0x05,0x8a,0x04,0x7b,0x07,0x12,0x02,0xdf,0x8b,0x05,0x8a,0x04,0x7b,0xb7,0x7a,
+0x43,0x12,0x05,0xd6,0x8b,0x05,0x8a,0x04,0x90,0x42,0x27,0xe0,0xfb,0x7a,0x00,0x12,
+0x03,0xc7,0x12,0x05,0xf2,0x8a,0x83,0x8b,0x82,0xe0,0xfb,0x7a,0x00,0x12,0x03,0xc7,
+0x90,0x42,0x25,0xea,0xf0,0xeb,0xa3,0xf0,0x90,0x42,0x28,0xe0,0xfb,0x7a,0x00,0x12,
+0x04,0x68,0x00,0x06,0x00,0x7f,0x15,0x60,0x10,0x7c,0x15,0x60,0x15,0x60,0x15,0x60,
+0x15,0x60,0x15,0x60,0x15,0x60,0x15,0x60,0x15,0x60,0x15,0x60,0x15,0x60,0x15,0x60,
+0x15,0x60,0x15,0x60,0x15,0x60,0x15,0x60,0x15,0x60,0x15,0x60,0x15,0x60,0x15,0x60,
+0x15,0x60,0x15,0x60,0x15,0x60,0x15,0x60,0x15,0x60,0x15,0x60,0x15,0x60,0x15,0x60,
+0x15,0x60,0x15,0x60,0x15,0x60,0x15,0x60,0x11,0x72,0x15,0x60,0x15,0x60,0x15,0x60,
+0x15,0x60,0x15,0x60,0x15,0x60,0x15,0x60,0x15,0x60,0x15,0x60,0x15,0x60,0x15,0x60,
+0x15,0x60,0x15,0x60,0x15,0x60,0x15,0x60,0x15,0x60,0x15,0x60,0x15,0x60,0x15,0x60,
+0x15,0x60,0x15,0x60,0x15,0x60,0x15,0x60,0x15,0x60,0x15,0x60,0x15,0x60,0x15,0x60,
+0x15,0x60,0x15,0x60,0x15,0x60,0x15,0x60,0x15,0x60,0x15,0x60,0x15,0x60,0x15,0x60,
+0x15,0x60,0x15,0x60,0x15,0x60,0x15,0x60,0x15,0x60,0x15,0x60,0x15,0x60,0x15,0x60,
+0x15,0x60,0x15,0x60,0x15,0x60,0x15,0x60,0x15,0x60,0x15,0x60,0x15,0x60,0x15,0x60,
+0x15,0x60,0x15,0x60,0x15,0x60,0x15,0x60,0x15,0x60,0x15,0x60,0x12,0x68,0x13,0x4e,
+0x14,0x34,0x14,0x78,0x14,0xbc,0x15,0x00,0x15,0x60,0x15,0x60,0x15,0x60,0x15,0x60,
+0x15,0x60,0x15,0x60,0x15,0x60,0x15,0x60,0x15,0x60,0x15,0x60,0x15,0x60,0x15,0x60,
+0x15,0x60,0x15,0x60,0x15,0x60,0x15,0x60,0x15,0x60,0x15,0x60,0x15,0x60,0x15,0x44,
+0x15,0x60,0x15,0x52,0x15,0x52,0x15,0x52,0x15,0x52,0x15,0x52,0x7b,0xc7,0x7a,0x43,
+0x8b,0x05,0x8a,0x04,0x90,0x42,0x27,0xe0,0xfb,0x7a,0x00,0x12,0x03,0xc7,0x8a,0x83,
+0x8b,0x82,0xe0,0x60,0x6e,0x7b,0x87,0x7a,0x43,0x8b,0x05,0x8a,0x04,0x90,0x42,0x27,
+0xe0,0xfb,0x7a,0x00,0x12,0x03,0xc7,0x8a,0x83,0x8b,0x82,0xe0,0xfb,0x7a,0x00,0x8b,
+0x05,0x8a,0x04,0x7b,0xff,0x7a,0x00,0x12,0x01,0x3b,0x60,0x45,0x7b,0x97,0x7a,0x43,
+0x8b,0x05,0x8a,0x04,0x90,0x42,0x27,0xe0,0xfb,0x7a,0x00,0x12,0x03,0xc7,0x8a,0x83,
+0x8b,0x82,0xe0,0xfb,0x7a,0x00,0x8b,0x05,0x8a,0x04,0x7b,0xff,0x7a,0x00,0x12,0x01,
+0x3b,0x60,0x1e,0x90,0x42,0x29,0xe0,0xfb,0x12,0x05,0xc1,0x90,0x42,0x23,0xe0,0xfa,
+0xa3,0xe0,0xfb,0x12,0x05,0xcf,0x90,0x42,0x27,0xe0,0xfb,0x90,0x00,0x04,0x12,0x28,
+0xf4,0x80,0x6c,0x7b,0xa7,0x7a,0x43,0x8b,0x05,0x8a,0x04,0x90,0x42,0x27,0xe0,0xfb,
+0x7a,0x00,0x12,0x03,0xc7,0x8a,0x83,0x8b,0x82,0xe0,0xfb,0x7a,0x00,0x8b,0x05,0x8a,
+0x04,0x7b,0xff,0x7a,0x00,0x12,0x01,0x3b,0x60,0x45,0x7b,0xb7,0x7a,0x43,0x8b,0x05,
+0x8a,0x04,0x90,0x42,0x27,0xe0,0xfb,0x7a,0x00,0x12,0x03,0xc7,0x8a,0x83,0x8b,0x82,
+0xe0,0xfb,0x7a,0x00,0x8b,0x05,0x8a,0x04,0x7b,0xff,0x7a,0x00,0x12,0x01,0x3b,0x60,
+0x1e,0x90,0x42,0x29,0xe0,0xfb,0x12,0x05,0xc1,0x90,0x42,0x25,0xe0,0xfa,0xa3,0xe0,
+0xfb,0x12,0x05,0xc1,0x90,0x42,0x27,0xe0,0xfb,0x90,0x00,0x03,0x12,0x33,0xda,0x02,
+0x16,0x7b,0x7b,0xc7,0x7a,0x43,0x8b,0x05,0x8a,0x04,0x90,0x42,0x27,0xe0,0xfb,0x7a,
+0x00,0x12,0x03,0xc7,0x8a,0x83,0x8b,0x82,0xe0,0x60,0x6e,0x7b,0x87,0x7a,0x43,0x8b,
+0x05,0x8a,0x04,0x90,0x42,0x27,0xe0,0xfb,0x7a,0x00,0x12,0x03,0xc7,0x8a,0x83,0x8b,
+0x82,0xe0,0xfb,0x7a,0x00,0x8b,0x05,0x8a,0x04,0x7b,0xff,0x7a,0x00,0x12,0x01,0x3b,
+0x60,0x45,0x7b,0x97,0x7a,0x43,0x8b,0x05,0x8a,0x04,0x90,0x42,0x27,0xe0,0xfb,0x7a,
+0x00,0x12,0x03,0xc7,0x8a,0x83,0x8b,0x82,0xe0,0xfb,0x7a,0x00,0x8b,0x05,0x8a,0x04,
+0x7b,0xff,0x7a,0x00,0x12,0x01,0x3b,0x60,0x1e,0x90,0x42,0x29,0xe0,0xfb,0x12,0x05,
+0xc1,0x90,0x42,0x23,0xe0,0xfa,0xa3,0xe0,0xfb,0x12,0x05,0xc1,0x90,0x42,0x27,0xe0,
+0xfb,0x90,0x00,0x03,0x12,0x33,0xb6,0x80,0x6c,0x7b,0xa7,0x7a,0x43,0x8b,0x05,0x8a,
+0x04,0x90,0x42,0x27,0xe0,0xfb,0x7a,0x00,0x12,0x03,0xc7,0x8a,0x83,0x8b,0x82,0xe0,
+0xfb,0x7a,0x00,0x8b,0x05,0x8a,0x04,0x7b,0xff,0x7a,0x00,0x12,0x01,0x3b,0x60,0x45,
+0x7b,0xb7,0x7a,0x43,0x8b,0x05,0x8a,0x04,0x90,0x42,0x27,0xe0,0xfb,0x7a,0x00,0x12,
+0x03,0xc7,0x8a,0x83,0x8b,0x82,0xe0,0xfb,0x7a,0x00,0x8b,0x05,0x8a,0x04,0x7b,0xff,
+0x7a,0x00,0x12,0x01,0x3b,0x60,0x1e,0x90,0x42,0x29,0xe0,0xfb,0x12,0x05,0xc1,0x90,
+0x42,0x25,0xe0,0xfa,0xa3,0xe0,0xfb,0x12,0x05,0xc1,0x90,0x42,0x27,0xe0,0xfb,0x90,
+0x00,0x03,0x12,0x33,0xe6,0x02,0x16,0x7b,0x7b,0xc7,0x7a,0x43,0x8b,0x05,0x8a,0x04,
+0x90,0x42,0x27,0xe0,0xfb,0x7a,0x00,0x12,0x03,0xc7,0x8a,0x83,0x8b,0x82,0xe0,0x60,
+0x66,0x7b,0x87,0x7a,0x43,0x8b,0x05,0x8a,0x04,0x90,0x42,0x27,0xe0,0xfb,0x7a,0x00,
+0x12,0x03,0xc7,0x8a,0x83,0x8b,0x82,0xe0,0xfb,0x7a,0x00,0x8b,0x05,0x8a,0x04,0x7b,
+0xff,0x7a,0x00,0x12,0x01,0x3b,0x60,0x3d,0x7b,0x97,0x7a,0x43,0x8b,0x05,0x8a,0x04,
+0x90,0x42,0x27,0xe0,0xfb,0x7a,0x00,0x12,0x03,0xc7,0x8a,0x83,0x8b,0x82,0xe0,0xfb,
+0x7a,0x00,0x8b,0x05,0x8a,0x04,0x7b,0xff,0x7a,0x00,0x12,0x01,0x3b,0x60,0x16,0x90,
+0x42,0x23,0xe0,0xfa,0xa3,0xe0,0xfb,0x12,0x05,0xc1,0x90,0x42,0x27,0xe0,0xfb,0x90,
+0x00,0x02,0x12,0x33,0xc2,0x80,0x64,0x7b,0xa7,0x7a,0x43,0x8b,0x05,0x8a,0x04,0x90,
+0x42,0x27,0xe0,0xfb,0x7a,0x00,0x12,0x03,0xc7,0x8a,0x83,0x8b,0x82,0xe0,0xfb,0x7a,
+0x00,0x8b,0x05,0x8a,0x04,0x7b,0xff,0x7a,0x00,0x12,0x01,0x3b,0x60,0x3d,0x7b,0xb7,
+0x7a,0x43,0x8b,0x05,0x8a,0x04,0x90,0x42,0x27,0xe0,0xfb,0x7a,0x00,0x12,0x03,0xc7,
+0x8a,0x83,0x8b,0x82,0xe0,0xfb,0x7a,0x00,0x8b,0x05,0x8a,0x04,0x7b,0xff,0x7a,0x00,
+0x12,0x01,0x3b,0x60,0x16,0x90,0x42,0x25,0xe0,0xfa,0xa3,0xe0,0xfb,0x12,0x05,0xc1,
+0x90,0x42,0x27,0xe0,0xfb,0x90,0x00,0x02,0x12,0x33,0xf2,0x02,0x16,0x7b,0x7b,0xc7,
+0x7a,0x43,0x8b,0x05,0x8a,0x04,0x90,0x42,0x27,0xe0,0xfb,0x7a,0x00,0x12,0x03,0xc7,
+0x8a,0x83,0x8b,0x82,0xe0,0x60,0x66,0x7b,0x87,0x7a,0x43,0x8b,0x05,0x8a,0x04,0x90,
+0x42,0x27,0xe0,0xfb,0x7a,0x00,0x12,0x03,0xc7,0x8a,0x83,0x8b,0x82,0xe0,0xfb,0x7a,
+0x00,0x8b,0x05,0x8a,0x04,0x7b,0xff,0x7a,0x00,0x12,0x01,0x3b,0x60,0x3d,0x7b,0x97,
+0x7a,0x43,0x8b,0x05,0x8a,0x04,0x90,0x42,0x27,0xe0,0xfb,0x7a,0x00,0x12,0x03,0xc7,
+0x8a,0x83,0x8b,0x82,0xe0,0xfb,0x7a,0x00,0x8b,0x05,0x8a,0x04,0x7b,0xff,0x7a,0x00,
+0x12,0x01,0x3b,0x60,0x16,0x90,0x42,0x23,0xe0,0xfa,0xa3,0xe0,0xfb,0x12,0x05,0xc1,
+0x90,0x42,0x27,0xe0,0xfb,0x90,0x00,0x02,0x12,0x33,0xce,0x80,0x64,0x7b,0xa7,0x7a,
+0x43,0x8b,0x05,0x8a,0x04,0x90,0x42,0x27,0xe0,0xfb,0x7a,0x00,0x12,0x03,0xc7,0x8a,
+0x83,0x8b,0x82,0xe0,0xfb,0x7a,0x00,0x8b,0x05,0x8a,0x04,0x7b,0xff,0x7a,0x00,0x12,
+0x01,0x3b,0x60,0x3d,0x7b,0xb7,0x7a,0x43,0x8b,0x05,0x8a,0x04,0x90,0x42,0x27,0xe0,
+0xfb,0x7a,0x00,0x12,0x03,0xc7,0x8a,0x83,0x8b,0x82,0xe0,0xfb,0x7a,0x00,0x8b,0x05,
+0x8a,0x04,0x7b,0xff,0x7a,0x00,0x12,0x01,0x3b,0x60,0x16,0x90,0x42,0x25,0xe0,0xfa,
+0xa3,0xe0,0xfb,0x12,0x05,0xc1,0x90,0x42,0x27,0xe0,0xfb,0x90,0x00,0x02,0x12,0x33,
+0xfe,0x02,0x16,0x7b,0x90,0x42,0x29,0xe0,0xfb,0x8b,0x05,0x7b,0xb7,0x7a,0x43,0x12,
+0x05,0xc8,0x8b,0x05,0x8a,0x04,0x90,0x42,0x27,0xe0,0xfb,0x7a,0x00,0x12,0x03,0xc7,
+0x12,0x05,0xe4,0x12,0x03,0x0a,0x7b,0x00,0x8b,0x05,0x7b,0xc7,0x7a,0x43,0x12,0x05,
+0xc8,0x8b,0x05,0x8a,0x04,0x90,0x42,0x27,0xe0,0xfb,0x7a,0x00,0x12,0x03,0xc7,0x12,
+0x05,0xe4,0x12,0x03,0x0a,0x02,0x16,0x7b,0x90,0x42,0x29,0xe0,0xfb,0x8b,0x05,0x7b,
+0xa7,0x7a,0x43,0x12,0x05,0xc8,0x8b,0x05,0x8a,0x04,0x90,0x42,0x27,0xe0,0xfb,0x7a,
+0x00,0x12,0x03,0xc7,0x12,0x05,0xe4,0x12,0x03,0x0a,0x7b,0x00,0x8b,0x05,0x7b,0xc7,
+0x7a,0x43,0x12,0x05,0xc8,0x8b,0x05,0x8a,0x04,0x90,0x42,0x27,0xe0,0xfb,0x7a,0x00,
+0x12,0x03,0xc7,0x12,0x05,0xe4,0x12,0x03,0x0a,0x02,0x16,0x7b,0x90,0x42,0x29,0xe0,
+0xfb,0x8b,0x05,0x7b,0x97,0x7a,0x43,0x12,0x05,0xc8,0x8b,0x05,0x8a,0x04,0x90,0x42,
+0x27,0xe0,0xfb,0x7a,0x00,0x12,0x03,0xc7,0x12,0x05,0xe4,0x12,0x03,0x0a,0x7b,0x01,
+0x8b,0x05,0x7b,0xc7,0x7a,0x43,0x12,0x05,0xc8,0x8b,0x05,0x8a,0x04,0x90,0x42,0x27,
+0xe0,0xfb,0x7a,0x00,0x12,0x03,0xc7,0x12,0x05,0xe4,0x12,0x03,0x0a,0x02,0x16,0x7b,
+0x90,0x42,0x29,0xe0,0xfb,0x8b,0x05,0x7b,0x87,0x7a,0x43,0x12,0x05,0xc8,0x8b,0x05,
+0x8a,0x04,0x90,0x42,0x27,0xe0,0xfb,0x7a,0x00,0x12,0x03,0xc7,0x12,0x05,0xe4,0x12,
+0x03,0x0a,0x7b,0x01,0x8b,0x05,0x7b,0xc7,0x7a,0x43,0x12,0x05,0xc8,0x8b,0x05,0x8a,
+0x04,0x90,0x42,0x27,0xe0,0xfb,0x7a,0x00,0x12,0x03,0xc7,0x12,0x05,0xe4,0x12,0x03,
+0x0a,0x02,0x16,0x7b,0x90,0x42,0x27,0xe0,0xfb,0x90,0x00,0x01,0x12,0x32,0x3e,0x02,
+0x16,0x7b,0x90,0x42,0x27,0xe0,0xfb,0x90,0x00,0x01,0x12,0x31,0x8a,0x02,0x16,0x7b,
+0x90,0x42,0x28,0xe0,0xfb,0x8b,0x05,0x7b,0x20,0x12,0x00,0xdb,0x60,0x66,0x90,0x42,
+0x29,0xe0,0xfb,0x8b,0x05,0x7b,0xd7,0x7a,0x43,0x12,0x05,0xc8,0x8b,0x05,0x8a,0x04,
+0x90,0x42,0x27,0xe0,0xfb,0x7a,0x00,0x78,0x03,0x12,0x01,0x46,0x00,0x20,0x12,0x03,
+0xc7,0x12,0x05,0xe4,0x12,0x05,0xc8,0x8b,0x05,0x8a,0x04,0x90,0x42,0x28,0xe0,0xfb,
+0x7a,0x00,0x12,0x03,0xc7,0x12,0x05,0xe4,0x12,0x03,0x0a,0x90,0x42,0x29,0xe0,0xfb,
+0x7a,0x00,0x8b,0x05,0x8a,0x04,0x7b,0x07,0x12,0x02,0xdf,0x12,0x05,0xcf,0x90,0x42,
+0x28,0xe0,0xfb,0x12,0x05,0xc1,0x90,0x42,0x27,0xe0,0xfb,0x90,0x00,0x04,0x12,0x34,
+0xed,0x02,0x16,0x7b,0x90,0x42,0x28,0xe0,0xfb,0x8b,0x05,0x7b,0x40,0x12,0x00,0xdb,
+0x60,0x6e,0x7b,0xe0,0x8b,0x05,0x7b,0x28,0x7a,0x42,0x8a,0x83,0x8b,0x82,0xe0,0x2d,
+0xf0,0xfb,0x7b,0xd7,0x7a,0x43,0x8b,0x05,0x8a,0x04,0x90,0x42,0x27,0xe0,0xfb,0x7a,
+0x00,0x78,0x03,0x12,0x01,0x46,0x00,0x20,0x12,0x03,0xc7,0x8b,0x05,0x8a,0x04,0x90,
+0x42,0x28,0xe0,0xfb,0x7a,0x00,0x12,0x03,0xc7,0x8a,0x83,0x8b,0x82,0xe0,0xfb,0x7a,
+0x00,0x8b,0x05,0x8a,0x04,0x7b,0x07,0x12,0x02,0xdf,0x8b,0x05,0x8a,0x04,0x90,0x42,
+0x29,0xe0,0xfb,0x7a,0x00,0x12,0x03,0xc7,0x12,0x05,0xcf,0x90,0x42,0x28,0xe0,0xfb,
+0x12,0x05,0xc1,0x90,0x42,0x27,0xe0,0xfb,0x90,0x00,0x04,0x12,0x34,0xed,0x80,0x2b,
+0x90,0x43,0x85,0xe0,0xfb,0x8b,0x05,0x7b,0x60,0x12,0x00,0xdb,0x60,0x1d,0x90,0x42,
+0x29,0xe0,0xfb,0x7a,0x00,0x12,0x05,0xcf,0x90,0x42,0x28,0xe0,0xfb,0x12,0x05,0xc1,
+0x90,0x42,0x27,0xe0,0xfb,0x90,0x00,0x04,0x12,0x34,0xed,0x02,0x05,0x9c,0x74,0x01,
+0x78,0x00,0x79,0x04,0x12,0x05,0x58,0x90,0x43,0x83,0xe0,0xfb,0x8b,0x05,0x7b,0x00,
+0x12,0x01,0x28,0x60,0x03,0x02,0x05,0x9c,0x12,0x03,0x55,0x04,0x00,0x8b,0x05,0x7b,
+0x85,0x7a,0x43,0x12,0x05,0xc8,0x8b,0x05,0x8a,0x04,0x7b,0x82,0x7a,0x43,0x12,0x02,
+0x42,0x01,0x7a,0x00,0x12,0x03,0xc7,0x12,0x05,0xe4,0x12,0x03,0x0a,0x90,0x43,0x83,
+0xe0,0xfb,0x8b,0x05,0x90,0x43,0x82,0xe0,0xfb,0x12,0x01,0x37,0x60,0x03,0x02,0x05,
+0x9c,0x7b,0x00,0x90,0x43,0x82,0xeb,0xf0,0x90,0x43,0x84,0xe0,0xfb,0x7a,0x00,0x8b,
+0x05,0x8a,0x04,0x7b,0xf0,0x7a,0x00,0x12,0x02,0xfa,0x12,0x04,0x68,0x00,0x80,0x00,
+0xe0,0x18,0xae,0x17,0xb5,0x18,0xae,0x18,0xae,0x18,0xae,0x18,0xae,0x18,0xae,0x18,
+0xae,0x18,0xae,0x18,0xae,0x18,0xae,0x18,0xae,0x18,0xae,0x18,0xae,0x18,0xae,0x18,
+0xae,0x18,0xae,0x17,0xda,0x18,0xae,0x18,0xae,0x18,0xae,0x18,0xae,0x18,0xae,0x18,
+0xae,0x18,0xae,0x18,0xae,0x18,0xae,0x18,0xae,0x18,0xae,0x18,0xae,0x18,0xae,0x18,
+0xae,0x18,0xae,0x18,0x2e,0x18,0xae,0x18,0xae,0x18,0xae,0x18,0xae,0x18,0xae,0x18,
+0xae,0x18,0xae,0x18,0xae,0x18,0xae,0x18,0xae,0x18,0xae,0x18,0xae,0x18,0xae,0x18,
+0xae,0x18,0xae,0x18,0x52,0x18,0xae,0x18,0xae,0x18,0xae,0x18,0xae,0x18,0xae,0x18,
+0xae,0x18,0xae,0x18,0xae,0x18,0xae,0x18,0xae,0x18,0xae,0x18,0xae,0x18,0xae,0x18,
+0xae,0x18,0xae,0x18,0x5a,0x18,0xae,0x18,0xae,0x18,0xae,0x18,0xae,0x18,0xae,0x18,
+0xae,0x18,0xae,0x18,0xae,0x18,0xae,0x18,0xae,0x18,0xae,0x18,0xae,0x18,0xae,0x18,
+0xae,0x18,0xae,0x18,0x76,0x18,0xae,0x18,0xae,0x18,0xae,0x18,0xae,0x18,0xae,0x18,
+0xae,0x18,0xae,0x18,0xae,0x18,0xae,0x18,0xae,0x18,0xae,0x18,0xae,0x18,0xae,0x18,
+0xae,0x18,0xae,0x18,0x92,0x90,0x43,0x86,0xe0,0xfb,0x12,0x05,0xc1,0x90,0x43,0x85,
+0xe0,0xfb,0x12,0x05,0xc1,0x90,0x43,0x84,0xe0,0xfb,0x8b,0x05,0x7b,0x0f,0xeb,0x5d,
+0xfb,0x90,0x00,0x03,0x12,0x26,0xe4,0x02,0x18,0xae,0x90,0x43,0x86,0xe0,0xfb,0x8b,
+0x05,0x7b,0x00,0x12,0x01,0x28,0x60,0x21,0x7b,0x40,0x12,0x05,0xc1,0x90,0x43,0x85,
+0xe0,0xfb,0x12,0x05,0xc1,0x90,0x43,0x84,0xe0,0xfb,0x8b,0x05,0x7b,0x0f,0xeb,0x5d,
+0xfb,0x90,0x00,0x03,0x12,0x26,0xe4,0x80,0x22,0x90,0x43,0x86,0xe0,0xfb,0x12,0x05,
+0xc1,0x90,0x43,0x85,0xe0,0xfb,0x12,0x05,0xc1,0x90,0x43,0x84,0xe0,0xfb,0x8b,0x05,
+0x7b,0x0f,0xeb,0x5d,0xfb,0x90,0x00,0x03,0x12,0x21,0x57,0x02,0x18,0xae,0x90,0x43,
+0x86,0xe0,0xfb,0x12,0x05,0xc1,0x90,0x43,0x85,0xe0,0xfb,0x12,0x05,0xc1,0x90,0x43,
+0x84,0xe0,0xfb,0x8b,0x05,0x7b,0x0f,0xeb,0x5d,0xfb,0x90,0x00,0x03,0x12,0x27,0xd2,
+0x80,0x5c,0x90,0x00,0x00,0x12,0x0e,0xa7,0x80,0x54,0x90,0x43,0x85,0xe0,0xfb,0x12,
+0x05,0xc1,0x90,0x43,0x84,0xe0,0xfb,0x8b,0x05,0x7b,0x0f,0xeb,0x5d,0xfb,0x90,0x00,
+0x02,0x12,0x27,0xea,0x80,0x38,0x90,0x43,0x85,0xe0,0xfb,0x12,0x05,0xc1,0x90,0x43,
+0x84,0xe0,0xfb,0x8b,0x05,0x7b,0x0f,0xeb,0x5d,0xfb,0x90,0x00,0x02,0x12,0x27,0xde,
+0x80,0x1c,0x90,0x43,0x86,0xe0,0xfb,0x12,0x05,0xc1,0x90,0x43,0x84,0xe0,0xfb,0x8b,
+0x05,0x7b,0x0f,0xeb,0x5d,0xfb,0x90,0x00,0x02,0x12,0x3b,0xc3,0x80,0x00,0x02,0x05,
+0x9c,0x74,0x01,0x78,0x00,0x79,0x04,0x12,0x05,0x58,0x12,0x03,0x55,0x04,0x00,0x7a,
+0x00,0x12,0x04,0x68,0x00,0xf0,0x00,0xff,0x19,0x56,0x18,0xea,0x19,0x1a,0x19,0x31,
+0x19,0x1a,0x19,0x03,0x19,0x03,0x19,0x03,0x18,0xfb,0x19,0x56,0x19,0x56,0x19,0x56,
+0x19,0x56,0x19,0x56,0x19,0x56,0x19,0x56,0x19,0x48,0x7b,0x01,0x90,0x45,0xd7,0xeb,
+0xf0,0x7b,0xf0,0x90,0x00,0x01,0x12,0x2a,0x68,0x80,0x5b,0x7b,0xf7,0x90,0x00,0x01,
+0x12,0x2a,0x68,0x7b,0x00,0x90,0x43,0x84,0xeb,0xf0,0x7b,0x00,0x90,0x43,0x83,0xeb,
+0xf0,0x7b,0x00,0x90,0x43,0x82,0xeb,0xf0,0x80,0x3c,0x7b,0x00,0x90,0x43,0x84,0xeb,
+0xf0,0x7b,0x01,0x90,0x43,0x83,0xeb,0xf0,0x7b,0x00,0x90,0x43,0x82,0xeb,0xf0,0x80,
+0x25,0x7b,0x00,0x90,0x43,0x84,0xeb,0xf0,0x7b,0x02,0x90,0x43,0x83,0xeb,0xf0,0x7b,
+0x00,0x90,0x43,0x82,0xeb,0xf0,0x80,0x0e,0x90,0x46,0xc4,0xe0,0x60,0x06,0x90,0x00,
+0x00,0x12,0x1a,0xf2,0x80,0x00,0x02,0x05,0x9c,0x74,0x01,0x78,0x00,0x79,0x04,0x12,
+0x05,0x58,0x12,0x03,0x55,0x04,0x00,0x7a,0x00,0x8b,0x05,0x8a,0x04,0x7b,0x80,0x7a,
+0x00,0x12,0x00,0xf3,0x60,0x1b,0x12,0x03,0x55,0x04,0x00,0x7a,0x00,0x8b,0x05,0x8a,
+0x04,0x7b,0xf8,0x7a,0x00,0x12,0x00,0xc4,0x60,0x07,0x7b,0x00,0x90,0x45,0xd7,0xeb,
+0xf0,0x12,0x03,0x55,0x04,0x00,0x7a,0x00,0x8b,0x05,0x8a,0x04,0x7b,0xf0,0x7a,0x00,
+0x12,0x02,0xfa,0x12,0x04,0x68,0x00,0x80,0x00,0xf0,0x1a,0xcf,0x1a,0x8e,0x1a,0xcf,
+0x1a,0xcf,0x1a,0xcf,0x1a,0xcf,0x1a,0xcf,0x1a,0xcf,0x1a,0xcf,0x1a,0xcf,0x1a,0xcf,
+0x1a,0xcf,0x1a,0xcf,0x1a,0xcf,0x1a,0xcf,0x1a,0xcf,0x1a,0xcf,0x1a,0x8e,0x1a,0xcf,
+0x1a,0xcf,0x1a,0xcf,0x1a,0xcf,0x1a,0xcf,0x1a,0xcf,0x1a,0xcf,0x1a,0xcf,0x1a,0xcf,
+0x1a,0xcf,0x1a,0xcf,0x1a,0xcf,0x1a,0xcf,0x1a,0xcf,0x1a,0xcf,0x1a,0x8e,0x1a,0xcf,
+0x1a,0xcf,0x1a,0xcf,0x1a,0xcf,0x1a,0xcf,0x1a,0xcf,0x1a,0xcf,0x1a,0xcf,0x1a,0xcf,
+0x1a,0xcf,0x1a,0xcf,0x1a,0xcf,0x1a,0xcf,0x1a,0xcf,0x1a,0xcf,0x1a,0x8e,0x1a,0xcf,
+0x1a,0xcf,0x1a,0xcf,0x1a,0xcf,0x1a,0xcf,0x1a,0xcf,0x1a,0xcf,0x1a,0xcf,0x1a,0xcf,
+0x1a,0xcf,0x1a,0xcf,0x1a,0xcf,0x1a,0xcf,0x1a,0xcf,0x1a,0xcf,0x1a,0xa8,0x1a,0xcf,
+0x1a,0xcf,0x1a,0xcf,0x1a,0xcf,0x1a,0xcf,0x1a,0xcf,0x1a,0xcf,0x1a,0xcf,0x1a,0xcf,
+0x1a,0xcf,0x1a,0xcf,0x1a,0xcf,0x1a,0xcf,0x1a,0xcf,0x1a,0xcf,0x1a,0xa8,0x1a,0xcf,
+0x1a,0xcf,0x1a,0xcf,0x1a,0xcf,0x1a,0xcf,0x1a,0xcf,0x1a,0xcf,0x1a,0xcf,0x1a,0xcf,
+0x1a,0xcf,0x1a,0xcf,0x1a,0xcf,0x1a,0xcf,0x1a,0xcf,0x1a,0xcf,0x1a,0x8e,0x1a,0xcf,
+0x1a,0xcf,0x1a,0xcf,0x1a,0xcf,0x1a,0xcf,0x1a,0xcf,0x1a,0xcf,0x1a,0xcf,0x1a,0xcf,
+0x1a,0xcf,0x1a,0xcf,0x1a,0xcf,0x1a,0xcf,0x1a,0xcf,0x1a,0xcf,0x1a,0xc2,0x12,0x03,
+0x55,0x04,0x00,0x90,0x43,0x84,0xeb,0xf0,0x7b,0x00,0x90,0x43,0x82,0xeb,0xf0,0x7b,
+0x02,0x90,0x43,0x83,0xeb,0xf0,0x80,0x47,0x12,0x03,0x55,0x04,0x00,0x90,0x43,0x84,
+0xeb,0xf0,0x7b,0x00,0x90,0x43,0x82,0xeb,0xf0,0x7b,0x01,0x90,0x43,0x83,0xeb,0xf0,
+0x80,0x2d,0x12,0x03,0x55,0x04,0x00,0x90,0x00,0x01,0x12,0x18,0xb1,0x80,0x20,0x90,
+0x45,0xd7,0xe0,0x60,0x0d,0x12,0x03,0x55,0x04,0x00,0x90,0x00,0x01,0x12,0x2a,0x68,
+0x80,0x0b,0x12,0x03,0x55,0x04,0x00,0x90,0x00,0x01,0x12,0x16,0x7e,0x80,0x00,0x02,
+0x05,0x9c,0xe4,0x78,0x00,0x79,0x04,0x12,0x05,0x58,0x90,0x00,0x00,0x12,0x2a,0x57,
+0x7b,0x00,0x90,0x43,0x82,0xeb,0xf0,0x7b,0x00,0x90,0x43,0x83,0xeb,0xf0,0x7b,0x00,
+0x90,0x43,0x84,0xeb,0xf0,0x7b,0x00,0x90,0x45,0xd7,0xeb,0xf0,0x7b,0x00,0x7a,0x00,
+0x90,0x42,0x2a,0xea,0xf0,0xeb,0xa3,0xf0,0x90,0x42,0x2a,0xe0,0xfa,0xa3,0xe0,0xfb,
+0x8b,0x05,0x8a,0x04,0x7b,0x10,0x7a,0x00,0x12,0x00,0xc4,0x70,0x03,0x02,0x1c,0x52,
+0x7b,0xff,0x8b,0x05,0x7b,0x87,0x7a,0x43,0x12,0x05,0xc8,0x8b,0x05,0x8a,0x04,0x90,
+0x42,0x2a,0xe0,0xfa,0xa3,0xe0,0xfb,0x12,0x03,0xc7,0x12,0x05,0xe4,0x12,0x03,0x0a,
+0x7b,0xff,0x8b,0x05,0x7b,0x97,0x7a,0x43,0x12,0x05,0xc8,0x8b,0x05,0x8a,0x04,0x90,
+0x42,0x2a,0xe0,0xfa,0xa3,0xe0,0xfb,0x12,0x03,0xc7,0x12,0x05,0xe4,0x12,0x03,0x0a,
+0x7b,0xff,0x8b,0x05,0x7b,0xa7,0x7a,0x43,0x12,0x05,0xc8,0x8b,0x05,0x8a,0x04,0x90,
+0x42,0x2a,0xe0,0xfa,0xa3,0xe0,0xfb,0x12,0x03,0xc7,0x12,0x05,0xe4,0x12,0x03,0x0a,
+0x7b,0xff,0x8b,0x05,0x7b,0xb7,0x7a,0x43,0x12,0x05,0xc8,0x8b,0x05,0x8a,0x04,0x90,
+0x42,0x2a,0xe0,0xfa,0xa3,0xe0,0xfb,0x12,0x03,0xc7,0x12,0x05,0xe4,0x12,0x03,0x0a,
+0x7b,0x00,0x8b,0x05,0x7b,0xc7,0x7a,0x43,0x12,0x05,0xc8,0x8b,0x05,0x8a,0x04,0x90,
+0x42,0x2a,0xe0,0xfa,0xa3,0xe0,0xfb,0x12,0x03,0xc7,0x12,0x05,0xe4,0x12,0x03,0x0a,
+0x7b,0x00,0x7a,0x00,0x90,0x42,0x2c,0xea,0xf0,0xeb,0xa3,0xf0,0x90,0x42,0x2c,0xe0,
+0xfa,0xa3,0xe0,0xfb,0x8b,0x05,0x8a,0x04,0x7b,0x20,0x7a,0x00,0x12,0x00,0xc4,0x60,
+0x46,0x7b,0x00,0x8b,0x05,0x7b,0xd7,0x7a,0x43,0x12,0x05,0xc8,0x8b,0x05,0x8a,0x04,
+0x90,0x42,0x2a,0xe0,0xfa,0xa3,0xe0,0xfb,0x78,0x03,0x12,0x01,0x46,0x00,0x20,0x12,
+0x03,0xc7,0x12,0x05,0xe4,0x12,0x05,0xc8,0x8b,0x05,0x8a,0x04,0x90,0x42,0x2c,0xe0,
+0xfa,0xa3,0xe0,0xfb,0x12,0x03,0xc7,0x12,0x05,0xe4,0x12,0x03,0x0a,0x7b,0x2c,0x7a,
+0x42,0x12,0x02,0x42,0x02,0x80,0xa5,0x7b,0x2a,0x7a,0x42,0x12,0x02,0x42,0x02,0x02,
+0x1b,0x28,0x02,0x05,0x9c,0x74,0x02,0x78,0x00,0x79,0x04,0x12,0x05,0x58,0x12,0x03,
+0x61,0x04,0x00,0x12,0x03,0x38,0x04,0x00,0x8b,0x05,0x7b,0x04,0x7c,0x00,0x12,0x02,
+0xc4,0x7a,0x00,0x8b,0x05,0x8a,0x04,0x7b,0xf8,0x7a,0xff,0x12,0x03,0xc7,0x90,0x42,
+0x2e,0xea,0xf0,0xeb,0xa3,0xf0,0x90,0x42,0x2e,0xe0,0xfa,0xa3,0xe0,0xfb,0x8b,0x05,
+0x8a,0x04,0x7b,0x0c,0x7a,0x00,0x12,0x03,0xd8,0x8b,0x05,0x8a,0x04,0x12,0x03,0x61,
+0x04,0x00,0x12,0x03,0x38,0x05,0x00,0x12,0x05,0xd6,0x8b,0x05,0x7b,0x7f,0xeb,0x5d,
+0xfb,0x12,0x05,0xf2,0x7a,0x00,0x12,0x03,0xcf,0x90,0x42,0x2e,0xea,0xf0,0xeb,0xa3,
+0xf0,0x90,0x42,0x2e,0xe0,0xfa,0xa3,0xe0,0xfb,0x8b,0x05,0x8a,0x04,0x7b,0x80,0x7a,
+0x00,0x12,0x03,0xd8,0x8b,0x05,0x8a,0x04,0x12,0x03,0x61,0x04,0x00,0x12,0x03,0x38,
+0x07,0x00,0x12,0x05,0xd6,0x8b,0x05,0x7b,0x7f,0xeb,0x5d,0xfb,0x12,0x05,0xf2,0x7a,
+0x00,0x12,0x03,0xc7,0x8b,0x05,0x8a,0x04,0x7b,0xc0,0x7a,0xff,0x12,0x03,0xc7,0x90,
+0x42,0x2e,0xea,0xf0,0xeb,0xa3,0xf0,0x7b,0x00,0x7a,0x36,0x8b,0x05,0x8a,0x04,0x7b,
+0x2e,0x7a,0x42,0x12,0x00,0x53,0x90,0x42,0x2e,0xe0,0xfa,0xa3,0xe0,0xfb,0x8b,0x05,
+0x8a,0x04,0x12,0x03,0x61,0x04,0x00,0x12,0x05,0xd6,0x8b,0x05,0x8a,0x04,0x7b,0x08,
+0x7a,0x00,0x12,0x03,0xc7,0x12,0x05,0xf2,0x12,0x03,0x12,0x02,0x05,0x9c,0xe4,0x78,
+0x00,0x79,0x04,0x12,0x05,0x58,0x7b,0x14,0x7a,0x00,0x90,0x00,0x02,0x12,0x06,0x26,
+0x90,0x88,0x43,0xe0,0x70,0x03,0x02,0x1e,0x84,0x7b,0x00,0x90,0x88,0x43,0xeb,0xf0,
+0x7b,0x00,0x7a,0x00,0x90,0x42,0x34,0xea,0xf0,0xeb,0xa3,0xf0,0x90,0x42,0x34,0xe0,
+0xfa,0xa3,0xe0,0xfb,0x8b,0x05,0x8a,0x04,0x7b,0x80,0x7a,0x00,0x12,0x00,0xc4,0x70,
+0x03,0x02,0x1e,0x84,0x7b,0xc1,0x7a,0x4a,0x8b,0x05,0x8a,0x04,0x90,0x42,0x34,0xe0,
+0xfa,0xa3,0xe0,0xfb,0xeb,0x2b,0xfb,0xea,0x3a,0xfa,0x12,0x03,0xc7,0x8a,0x83,0x8b,
+0x82,0xe0,0xfa,0xa3,0xe0,0xfb,0x90,0x42,0x3e,0xea,0xf0,0xeb,0xa3,0xf0,0x90,0x42,
+0x3e,0xe0,0xfa,0xa3,0xe0,0xfb,0x8b,0x05,0x8a,0x04,0x7b,0x00,0x7a,0x00,0x12,0x01,
+0x3b,0x60,0x0e,0x90,0x42,0x3e,0xe0,0xfa,0xa3,0xe0,0xfb,0x90,0x00,0x02,0x12,0x1c,
+0x55,0x7b,0xb3,0x7a,0x7f,0x8b,0x05,0x8a,0x04,0x90,0x42,0x34,0xe0,0xfa,0xa3,0xe0,
+0xfb,0xeb,0x2b,0xfb,0xea,0x3a,0xfa,0x12,0x03,0xc7,0x8a,0x83,0x8b,0x82,0xe0,0xfa,
+0xa3,0xe0,0xfb,0x90,0x42,0x3c,0xea,0xf0,0xeb,0xa3,0xf0,0x90,0x42,0x3c,0xe0,0xfa,
+0xa3,0xe0,0xfb,0x8b,0x05,0x8a,0x04,0x7b,0x04,0x7a,0x00,0x12,0x03,0xc7,0x90,0x42,
+0x3a,0xea,0xf0,0xeb,0xa3,0xf0,0x90,0x42,0x3c,0xe0,0xfa,0xa3,0xe0,0xfb,0x8a,0x83,
+0x8b,0x82,0xe0,0xfb,0x7a,0x00,0x90,0x42,0x36,0xea,0xf0,0xeb,0xa3,0xf0,0x90,0x42,
+0x36,0xe0,0xfa,0xa3,0xe0,0xfb,0x8b,0x05,0x8a,0x04,0x7b,0x00,0x7a,0x00,0x12,0x00,
+0x8e,0x60,0x36,0x90,0x42,0x3a,0xe0,0xfa,0xa3,0xe0,0xfb,0x12,0x03,0x3e,0x02,0x00,
+0x90,0x42,0x3e,0xea,0xf0,0xeb,0xa3,0xf0,0x90,0x42,0x3e,0xe0,0xfa,0xa3,0xe0,0xfb,
+0x90,0x00,0x02,0x12,0x1c,0x55,0x7b,0x36,0x7a,0x42,0x12,0x02,0x48,0x02,0x7b,0x3a,
+0x7a,0x42,0x12,0x02,0x1d,0x00,0x04,0x80,0xb5,0x7b,0x34,0x7a,0x42,0x12,0x02,0x42,
+0x02,0x02,0x1d,0x6c,0x7b,0x00,0x7a,0x00,0x90,0x42,0x34,0xea,0xf0,0xeb,0xa3,0xf0,
+0x90,0x42,0x34,0xe0,0xfa,0xa3,0xe0,0xfb,0x8b,0x05,0x8a,0x04,0x7b,0x10,0x7a,0x00,
+0x12,0x00,0xc4,0x70,0x03,0x02,0x1f,0x26,0x90,0x42,0x34,0xe0,0xfa,0xa3,0xe0,0xfb,
+0x8b,0x05,0x7b,0xe0,0x7a,0x45,0x12,0x05,0xc8,0x8b,0x05,0x8a,0x04,0x90,0x42,0x34,
+0xe0,0xfa,0xa3,0xe0,0xfb,0x78,0x03,0x12,0x01,0x46,0x00,0x0e,0x12,0x03,0xc7,0x12,
+0x05,0xe4,0x12,0x03,0x0a,0x7b,0x00,0x8b,0x05,0x7b,0xe0,0x7a,0x45,0x12,0x05,0xc8,
+0x8b,0x05,0x8a,0x04,0x90,0x42,0x34,0xe0,0xfa,0xa3,0xe0,0xfb,0x78,0x03,0x12,0x01,
+0x46,0x00,0x0e,0x12,0x03,0xc7,0x12,0x05,0xe4,0x12,0x05,0xc8,0x8b,0x05,0x8a,0x04,
+0x7b,0x01,0x7a,0x00,0x12,0x03,0xc7,0x12,0x05,0xe4,0x12,0x03,0x0a,0x90,0x42,0x34,
+0xe0,0xfa,0xa3,0xe0,0xfb,0x90,0x00,0x01,0x12,0x32,0x3e,0x7b,0x34,0x7a,0x42,0x12,
+0x02,0x42,0x02,0x02,0x1e,0x90,0x7b,0x00,0x7a,0x00,0x90,0x42,0x34,0xea,0xf0,0xeb,
+0xa3,0xf0,0x90,0x42,0x34,0xe0,0xfa,0xa3,0xe0,0xfb,0x8b,0x05,0x8a,0x04,0x7b,0x18,
+0x7a,0x00,0x12,0x00,0xc4,0x70,0x03,0x02,0x20,0xf4,0x7b,0xff,0x8b,0x05,0x7b,0x02,
+0x7a,0x00,0x12,0x05,0xc8,0x8b,0x05,0x8a,0x04,0x90,0x42,0x34,0xe0,0xfa,0xa3,0xe0,
+0xfb,0x78,0x03,0x12,0x01,0x46,0x00,0x0a,0x12,0x03,0xc7,0x12,0x05,0xe4,0x12,0x05,
+0xc8,0x8b,0x05,0x8a,0x04,0x7b,0x01,0x7a,0x00,0x12,0x03,0xc7,0x12,0x05,0xe4,0x12,
+0x03,0x0a,0x7b,0x80,0x8b,0x05,0x7b,0x02,0x7a,0x00,0x12,0x05,0xc8,0x8b,0x05,0x8a,
+0x04,0x90,0x42,0x34,0xe0,0xfa,0xa3,0xe0,0xfb,0x78,0x03,0x12,0x01,0x46,0x00,0x0a,
+0x12,0x03,0xc7,0x12,0x05,0xe4,0x12,0x05,0xc8,0x8b,0x05,0x8a,0x04,0x7b,0x02,0x7a,
+0x00,0x12,0x03,0xc7,0x12,0x05,0xe4,0x12,0x03,0x0a,0x7b,0x00,0x7a,0x00,0x8b,0x05,
+0x8a,0x04,0x7b,0x02,0x7a,0x00,0x12,0x05,0xd6,0x8b,0x05,0x8a,0x04,0x90,0x42,0x34,
+0xe0,0xfa,0xa3,0xe0,0xfb,0x78,0x03,0x12,0x01,0x46,0x00,0x0a,0x12,0x03,0xc7,0x12,
+0x05,0xf2,0x12,0x05,0xd6,0x8b,0x05,0x8a,0x04,0x7b,0x04,0x7a,0x00,0x12,0x03,0xc7,
+0x12,0x05,0xf2,0x12,0x03,0x12,0x90,0x42,0x34,0xe0,0xfa,0xa3,0xe0,0xfb,0x8b,0x05,
+0x7b,0x02,0x7a,0x00,0x12,0x05,0xc8,0x8b,0x05,0x8a,0x04,0x90,0x42,0x34,0xe0,0xfa,
+0xa3,0xe0,0xfb,0x78,0x03,0x12,0x01,0x46,0x00,0x0a,0x12,0x03,0xc7,0x12,0x05,0xe4,
+0x12,0x03,0x0a,0x7b,0x02,0x7a,0x00,0x8b,0x05,0x8a,0x04,0x90,0x42,0x34,0xe0,0xfa,
+0xa3,0xe0,0xfb,0x12,0x05,0xd6,0x8b,0x05,0x8a,0x04,0x7b,0xff,0x7a,0xff,0x12,0x03,
+0xc7,0x12,0x05,0xf2,0x78,0x03,0x12,0x01,0x46,0x00,0x0a,0x12,0x03,0xc7,0x8b,0x05,
+0x8a,0x04,0x7b,0x02,0x7a,0x00,0x12,0x05,0xd6,0x8b,0x05,0x8a,0x04,0x90,0x42,0x34,
+0xe0,0xfa,0xa3,0xe0,0xfb,0x78,0x03,0x12,0x01,0x46,0x00,0x0a,0x12,0x03,0xc7,0x12,
+0x05,0xf2,0x12,0x05,0xd6,0x8b,0x05,0x8a,0x04,0x7b,0x06,0x7a,0x00,0x12,0x03,0xc7,
+0x12,0x05,0xf2,0x12,0x03,0x12,0x7b,0x02,0x7a,0x00,0x8b,0x05,0x8a,0x04,0x90,0x42,
+0x34,0xe0,0xfa,0xa3,0xe0,0xfb,0x12,0x05,0xd6,0x8b,0x05,0x8a,0x04,0x7b,0x01,0x7a,
+0x00,0x12,0x03,0xc7,0x12,0x05,0xf2,0x78,0x03,0x12,0x01,0x46,0x00,0x0a,0x12,0x03,
+0xc7,0x8b,0x05,0x8a,0x04,0x7b,0x02,0x7a,0x00,0x12,0x05,0xd6,0x8b,0x05,0x8a,0x04,
+0x90,0x42,0x34,0xe0,0xfa,0xa3,0xe0,0xfb,0x78,0x03,0x12,0x01,0x46,0x00,0x0a,0x12,
+0x03,0xc7,0x12,0x05,0xf2,0x12,0x05,0xd6,0x8b,0x05,0x8a,0x04,0x7b,0x08,0x7a,0x00,
+0x12,0x03,0xc7,0x12,0x05,0xf2,0x12,0x03,0x12,0x7b,0x34,0x7a,0x42,0x12,0x02,0x42,
+0x02,0x02,0x1f,0x32,0x7b,0x00,0x7a,0x00,0x90,0x00,0x08,0xea,0xf0,0xeb,0xa3,0xf0,
+0x7b,0x00,0x7a,0x00,0x90,0x00,0xf0,0xea,0xf0,0xeb,0xa3,0xf0,0x7b,0x02,0x7a,0x00,
+0x90,0x45,0xd8,0xea,0xf0,0xeb,0xa3,0xf0,0x7b,0xe8,0x7a,0x00,0x90,0x45,0xda,0xea,
+0xf0,0xeb,0xa3,0xf0,0x7b,0x00,0x7a,0x00,0x90,0x45,0xde,0xea,0xf0,0xeb,0xa3,0xf0,
+0x90,0x45,0xdc,0xea,0xf0,0xeb,0xa3,0xf0,0x7b,0x12,0x90,0x46,0xc0,0xeb,0xf0,0x7b,
+0x01,0x7a,0x00,0x02,0x05,0x9c,0xe4,0x78,0x00,0x79,0x04,0x12,0x05,0x58,0x90,0x00,
+0x00,0x12,0x06,0xaf,0x02,0x05,0x9c,0x74,0x01,0x78,0x00,0x79,0x04,0x12,0x05,0x58,
+0x12,0x03,0x55,0x04,0x00,0x8b,0x05,0x7b,0x09,0x12,0x01,0x28,0x60,0x16,0x12,0x03,
+0x55,0x06,0x00,0x12,0x05,0xc1,0x12,0x03,0x55,0x06,0x00,0x90,0x00,0x02,0x12,0x24,
+0x93,0x02,0x05,0x9c,0x7b,0xe0,0x7a,0x45,0x8b,0x05,0x8a,0x04,0x12,0x03,0x55,0x04,
+0x00,0x7a,0x00,0x78,0x03,0x12,0x01,0x46,0x00,0x0e,0x12,0x03,0xc7,0x90,0x42,0x42,
+0xea,0xf0,0xeb,0xa3,0xf0,0x90,0x42,0x42,0xe0,0xfa,0xa3,0xe0,0xfb,0x12,0x03,0x38,
+0x01,0x00,0x7a,0x00,0x8b,0x05,0x8a,0x04,0x7b,0xff,0x7a,0x00,0x12,0x01,0x2c,0x60,
+0x03,0x02,0x05,0x9c,0x7b,0xb3,0x7a,0x7f,0x8b,0x05,0x8a,0x04,0x90,0x42,0x42,0xe0,
+0xfa,0xa3,0xe0,0xfb,0x12,0x03,0x38,0x01,0x00,0x7a,0x00,0xeb,0x2b,0xfb,0xea,0x3a,
+0xfa,0x12,0x03,0xc7,0x8a,0x83,0x8b,0x82,0xe0,0xfa,0xa3,0xe0,0xfb,0x90,0x42,0x48,
+0xea,0xf0,0xeb,0xa3,0xf0,0x90,0x42,0x48,0xe0,0xfa,0xa3,0xe0,0xfb,0x8b,0x05,0x8a,
+0x04,0x7b,0x04,0x7a,0x00,0x12,0x03,0xc7,0x90,0x42,0x46,0xea,0xf0,0xeb,0xa3,0xf0,
+0x90,0x42,0x48,0xe0,0xfa,0xa3,0xe0,0xfb,0x8a,0x83,0x8b,0x82,0xe0,0xfb,0x90,0x42,
+0x44,0xeb,0xf0,0x90,0x42,0x44,0xe0,0xfb,0x8b,0x05,0x7b,0x00,0x12,0x00,0x82,0x70,
+0x03,0x02,0x24,0x90,0x90,0x42,0x46,0xe0,0xfa,0xa3,0xe0,0xfb,0x8a,0x83,0x8b,0x82,
+0xe0,0xfb,0x8b,0x05,0x12,0x03,0x55,0x05,0x00,0x12,0x00,0xa9,0x70,0x19,0x90,0x42,
+0x46,0xe0,0xfa,0xa3,0xe0,0xfb,0x12,0x03,0x38,0x01,0x00,0x8b,0x05,0x12,0x03,0x55,
+0x05,0x00,0x12,0x00,0xdb,0x60,0x03,0x02,0x24,0x7c,0x90,0x42,0x46,0xe0,0xfa,0xa3,
+0xe0,0xfb,0x12,0x03,0x3e,0x02,0x00,0x90,0x42,0x4a,0xea,0xf0,0xeb,0xa3,0xf0,0x90,
+0x00,0x00,0x12,0x3a,0xeb,0x90,0x42,0x40,0xea,0xf0,0xeb,0xa3,0xf0,0x8b,0x05,0x8a,
+0x04,0x7b,0x00,0x7a,0x00,0x12,0x01,0x2c,0x60,0x03,0x02,0x05,0x9c,0x90,0x42,0x40,
+0xe0,0xfa,0xa3,0xe0,0xfb,0x12,0x03,0x38,0x02,0x00,0x8b,0x05,0x7b,0x80,0x12,0x01,
+0x37,0x60,0x14,0x90,0x42,0x40,0xe0,0xfa,0xa3,0xe0,0xfb,0x8a,0x83,0x8b,0x82,0xe0,
+0xfb,0x90,0x00,0x01,0x12,0x39,0xf6,0x90,0x42,0x40,0xe0,0xfa,0xa3,0xe0,0xfb,0x12,
+0x03,0x3e,0x04,0x00,0x8b,0x05,0x8a,0x04,0x90,0x42,0x4a,0xe0,0xfa,0xa3,0xe0,0xfb,
+0x12,0x01,0x3b,0x60,0x63,0x90,0x42,0x4a,0xe0,0xfa,0xa3,0xe0,0xfb,0x12,0x03,0x38,
+0x03,0x00,0x12,0x05,0xc1,0x90,0x42,0x4a,0xe0,0xfa,0xa3,0xe0,0xfb,0x12,0x03,0x38,
+0x04,0x00,0x8b,0x05,0x7b,0x01,0xeb,0x5d,0xfb,0x12,0x05,0xc1,0x90,0x42,0x40,0xe0,
+0xfa,0xa3,0xe0,0xfb,0x8a,0x83,0x8b,0x82,0xe0,0xfb,0x90,0x00,0x03,0x12,0x39,0x8b,
+0x90,0x42,0x4a,0xe0,0xfa,0xa3,0xe0,0xfb,0x8b,0x05,0x8a,0x04,0x90,0x42,0x40,0xe0,
+0xfa,0xa3,0xe0,0xfb,0x12,0x05,0xd6,0x8b,0x05,0x8a,0x04,0x7b,0x04,0x7a,0x00,0x12,
+0x03,0xc7,0x12,0x05,0xf2,0x12,0x03,0x12,0x12,0x03,0x55,0x04,0x00,0x8b,0x05,0x90,
+0x42,0x40,0xe0,0xfa,0xa3,0xe0,0xfb,0x12,0x05,0xc8,0x8b,0x05,0x8a,0x04,0x7b,0x01,
+0x7a,0x00,0x12,0x03,0xc7,0x12,0x05,0xe4,0x12,0x03,0x0a,0x12,0x03,0x55,0x05,0x00,
+0x8b,0x05,0x90,0x42,0x40,0xe0,0xfa,0xa3,0xe0,0xfb,0x12,0x05,0xc8,0x8b,0x05,0x8a,
+0x04,0x7b,0x02,0x7a,0x00,0x12,0x03,0xc7,0x12,0x05,0xe4,0x12,0x03,0x0a,0x12,0x03,
+0x55,0x06,0x00,0x8b,0x05,0x90,0x42,0x40,0xe0,0xfa,0xa3,0xe0,0xfb,0x12,0x05,0xc8,
+0x8b,0x05,0x8a,0x04,0x7b,0x03,0x7a,0x00,0x12,0x03,0xc7,0x12,0x05,0xe4,0x12,0x03,
+0x0a,0x90,0x42,0x42,0xe0,0xfa,0xa3,0xe0,0xfb,0x12,0x03,0x38,0x0d,0x00,0x8b,0x05,
+0x7b,0x01,0xeb,0x5d,0xfb,0x12,0x05,0xc1,0x90,0x42,0x40,0xe0,0xfa,0xa3,0xe0,0xfb,
+0x8a,0x83,0x8b,0x82,0xe0,0xfb,0x90,0x00,0x02,0x12,0x3a,0x0d,0x90,0x42,0x40,0xe0,
+0xfa,0xa3,0xe0,0xfb,0x90,0x00,0x02,0x12,0x3b,0x2b,0x90,0x42,0x40,0xe0,0xfa,0xa3,
+0xe0,0xfb,0x90,0x00,0x02,0x12,0x2d,0x5b,0x90,0x42,0x4a,0xe0,0xfa,0xa3,0xe0,0xfb,
+0x8b,0x05,0x8a,0x04,0x7b,0x0b,0x7a,0x00,0x12,0x03,0xc7,0x12,0x05,0xcf,0x90,0x42,
+0x40,0xe0,0xfa,0xa3,0xe0,0xfb,0x8a,0x83,0x8b,0x82,0xe0,0xfb,0x90,0x00,0x03,0x12,
+0x38,0xd9,0x90,0x42,0x4a,0xe0,0xfa,0xa3,0xe0,0xfb,0x8a,0x83,0x8b,0x82,0xe0,0xfb,
+0x8b,0x05,0x7b,0x04,0x7c,0x00,0x12,0x02,0xc4,0x90,0x42,0x45,0xeb,0xf0,0x90,0x42,
+0x45,0xe0,0xfb,0x8b,0x05,0x7b,0x00,0x12,0x01,0x28,0x60,0x12,0x90,0x42,0x42,0xe0,
+0xfa,0xa3,0xe0,0xfb,0x12,0x03,0x38,0x09,0x00,0x90,0x42,0x45,0xeb,0xf0,0x90,0x42,
+0x45,0xe0,0xfb,0x12,0x05,0xc1,0x90,0x42,0x40,0xe0,0xfa,0xa3,0xe0,0xfb,0x8a,0x83,
+0x8b,0x82,0xe0,0xfb,0x90,0x00,0x02,0x12,0x39,0xd9,0x80,0x14,0x7b,0x44,0x7a,0x42,
+0x12,0x02,0x48,0x01,0x7b,0x46,0x7a,0x42,0x12,0x02,0x1d,0x00,0x04,0x02,0x22,0x23,
+0x02,0x05,0x9c,0x74,0x01,0x78,0x00,0x79,0x04,0x12,0x05,0x58,0x7b,0xc1,0x7a,0x4a,
+0x8b,0x05,0x8a,0x04,0x12,0x03,0x55,0x04,0x00,0x7a,0x00,0xeb,0x2b,0xfb,0xea,0x3a,
+0xfa,0x12,0x03,0xc7,0x8a,0x83,0x8b,0x82,0xe0,0xfa,0xa3,0xe0,0xfb,0x90,0x42,0x51,
+0xea,0xf0,0xeb,0xa3,0xf0,0x90,0x42,0x51,0xe0,0xfa,0xa3,0xe0,0xfb,0x8b,0x05,0x8a,
+0x04,0x7b,0x00,0x7a,0x00,0x12,0x01,0x2c,0x60,0x03,0x02,0x05,0x9c,0x7b,0x5e,0x7a,
+0x46,0x90,0x42,0x4e,0xea,0xf0,0xeb,0xa3,0xf0,0x90,0x00,0x00,0x12,0x3a,0xeb,0x90,
+0x42,0x4c,0xea,0xf0,0xeb,0xa3,0xf0,0x8b,0x05,0x8a,0x04,0x7b,0x00,0x7a,0x00,0x12,
+0x01,0x2c,0x60,0x03,0x02,0x05,0x9c,0x90,0x42,0x4c,0xe0,0xfa,0xa3,0xe0,0xfb,0x12,
+0x03,0x38,0x02,0x00,0x8b,0x05,0x7b,0x80,0x12,0x01,0x37,0x60,0x14,0x90,0x42,0x4c,
+0xe0,0xfa,0xa3,0xe0,0xfb,0x8a,0x83,0x8b,0x82,0xe0,0xfb,0x90,0x00,0x01,0x12,0x39,
+0xf6,0x90,0x42,0x4c,0xe0,0xfa,0xa3,0xe0,0xfb,0x12,0x03,0x3e,0x04,0x00,0x8b,0x05,
+0x8a,0x04,0x90,0x42,0x51,0xe0,0xfa,0xa3,0xe0,0xfb,0x12,0x01,0x3b,0x60,0x63,0x90,
+0x42,0x51,0xe0,0xfa,0xa3,0xe0,0xfb,0x12,0x03,0x38,0x03,0x00,0x12,0x05,0xc1,0x90,
+0x42,0x51,0xe0,0xfa,0xa3,0xe0,0xfb,0x12,0x03,0x38,0x04,0x00,0x8b,0x05,0x7b,0x01,
+0xeb,0x5d,0xfb,0x12,0x05,0xc1,0x90,0x42,0x4c,0xe0,0xfa,0xa3,0xe0,0xfb,0x8a,0x83,
+0x8b,0x82,0xe0,0xfb,0x90,0x00,0x03,0x12,0x39,0x8b,0x90,0x42,0x51,0xe0,0xfa,0xa3,
+0xe0,0xfb,0x8b,0x05,0x8a,0x04,0x90,0x42,0x4c,0xe0,0xfa,0xa3,0xe0,0xfb,0x12,0x05,
+0xd6,0x8b,0x05,0x8a,0x04,0x7b,0x04,0x7a,0x00,0x12,0x03,0xc7,0x12,0x05,0xf2,0x12,
+0x03,0x12,0x7b,0x09,0x8b,0x05,0x90,0x42,0x4c,0xe0,0xfa,0xa3,0xe0,0xfb,0x12,0x05,
+0xc8,0x8b,0x05,0x8a,0x04,0x7b,0x01,0x7a,0x00,0x12,0x03,0xc7,0x12,0x05,0xe4,0x12,
+0x03,0x0a,0x12,0x03,0x55,0x04,0x00,0x8b,0x05,0x90,0x42,0x4c,0xe0,0xfa,0xa3,0xe0,
+0xfb,0x12,0x05,0xc8,0x8b,0x05,0x8a,0x04,0x7b,0x02,0x7a,0x00,0x12,0x03,0xc7,0x12,
+0x05,0xe4,0x12,0x03,0x0a,0x12,0x03,0x55,0x05,0x00,0x8b,0x05,0x90,0x42,0x4c,0xe0,
+0xfa,0xa3,0xe0,0xfb,0x12,0x05,0xc8,0x8b,0x05,0x8a,0x04,0x7b,0x03,0x7a,0x00,0x12,
+0x03,0xc7,0x12,0x05,0xe4,0x12,0x03,0x0a,0x90,0x42,0x4e,0xe0,0xfa,0xa3,0xe0,0xfb,
+0x12,0x03,0x38,0x0d,0x00,0x8b,0x05,0x7b,0x01,0xeb,0x5d,0xfb,0x12,0x05,0xc1,0x90,
+0x42,0x4c,0xe0,0xfa,0xa3,0xe0,0xfb,0x8a,0x83,0x8b,0x82,0xe0,0xfb,0x90,0x00,0x02,
+0x12,0x3a,0x0d,0x90,0x42,0x4c,0xe0,0xfa,0xa3,0xe0,0xfb,0x90,0x00,0x02,0x12,0x3b,
+0x2b,0x90,0x42,0x4c,0xe0,0xfa,0xa3,0xe0,0xfb,0x90,0x00,0x02,0x12,0x2d,0x5b,0x90,
+0x42,0x51,0xe0,0xfa,0xa3,0xe0,0xfb,0x8b,0x05,0x8a,0x04,0x7b,0x0b,0x7a,0x00,0x12,
+0x03,0xc7,0x12,0x05,0xcf,0x90,0x42,0x4c,0xe0,0xfa,0xa3,0xe0,0xfb,0x8a,0x83,0x8b,
+0x82,0xe0,0xfb,0x90,0x00,0x03,0x12,0x38,0xd9,0x90,0x42,0x51,0xe0,0xfa,0xa3,0xe0,
+0xfb,0x8a,0x83,0x8b,0x82,0xe0,0xfb,0x8b,0x05,0x7b,0x04,0x7c,0x00,0x12,0x02,0xc4,
+0x90,0x42,0x50,0xeb,0xf0,0x90,0x42,0x50,0xe0,0xfb,0x8b,0x05,0x7b,0x00,0x12,0x01,
+0x28,0x60,0x12,0x90,0x42,0x4e,0xe0,0xfa,0xa3,0xe0,0xfb,0x12,0x03,0x38,0x09,0x00,
+0x90,0x42,0x50,0xeb,0xf0,0x90,0x42,0x50,0xe0,0xfb,0x12,0x05,0xc1,0x90,0x42,0x4c,
+0xe0,0xfa,0xa3,0xe0,0xfb,0x8a,0x83,0x8b,0x82,0xe0,0xfb,0x90,0x00,0x02,0x12,0x39,
+0xd9,0x02,0x05,0x9c,0x74,0x01,0x78,0x00,0x79,0x04,0x12,0x05,0x58,0x7b,0xe0,0x7a,
+0x45,0x8b,0x05,0x8a,0x04,0x12,0x03,0x55,0x04,0x00,0x7a,0x00,0x78,0x03,0x12,0x01,
+0x46,0x00,0x0e,0x12,0x03,0xc7,0x12,0x03,0x38,0x0d,0x00,0x8b,0x05,0x7b,0x00,0xeb,
+0x5d,0xfb,0x90,0x42,0x57,0xeb,0xf0,0x90,0x45,0xdc,0xe0,0xfa,0xa3,0xe0,0xfb,0x90,
+0x42,0x53,0xea,0xf0,0xeb,0xa3,0xf0,0x90,0x42,0x53,0xe0,0xfa,0xa3,0xe0,0xfb,0x8b,
+0x05,0x8a,0x04,0x7b,0x00,0x7a,0x00,0x12,0x01,0x3b,0x70,0x03,0x02,0x27,0xcf,0x90,
+0x42,0x53,0xe0,0xfa,0xa3,0xe0,0xfb,0x12,0x03,0x3e,0x08,0x00,0x90,0x42,0x55,0xea,
+0xf0,0xeb,0xa3,0xf0,0x90,0x42,0x53,0xe0,0xfa,0xa3,0xe0,0xfb,0x12,0x03,0x38,0x01,
+0x00,0x8b,0x05,0x12,0x03,0x55,0x04,0x00,0x12,0x01,0x28,0x60,0x4f,0x90,0x42,0x53,
+0xe0,0xfa,0xa3,0xe0,0xfb,0x12,0x03,0x38,0x02,0x00,0x8b,0x05,0x12,0x03,0x55,0x05,
+0x00,0x12,0x01,0x28,0x60,0x36,0x90,0x42,0x57,0xe0,0x60,0x22,0x7b,0x81,0x8b,0x05,
+0x90,0x42,0x53,0xe0,0xfa,0xa3,0xe0,0xfb,0x12,0x05,0xc8,0x8b,0x05,0x8a,0x04,0x7b,
+0x02,0x7a,0x00,0x12,0x03,0xc7,0x12,0x05,0xe4,0x12,0x03,0x0a,0x80,0x0e,0x90,0x42,
+0x53,0xe0,0xfa,0xa3,0xe0,0xfb,0x90,0x00,0x02,0x12,0x31,0x2c,0x90,0x42,0x55,0xe0,
+0xfa,0xa3,0xe0,0xfb,0x90,0x42,0x53,0xea,0xf0,0xeb,0xa3,0xf0,0x02,0x27,0x27,0x02,
+0x05,0x9c,0x74,0x01,0x78,0x00,0x79,0x04,0x12,0x05,0x58,0x02,0x05,0x9c,0x74,0x01,
+0x78,0x00,0x79,0x04,0x12,0x05,0x58,0x02,0x05,0x9c,0x74,0x01,0x78,0x00,0x79,0x04,
+0x12,0x05,0x58,0x90,0x42,0x00,0xe0,0x60,0x4f,0x7b,0xd4,0x7a,0x94,0x8b,0x05,0x8a,
+0x04,0x12,0x03,0x55,0x05,0x00,0x7a,0x00,0x12,0x03,0xc7,0x8a,0x83,0x8b,0x82,0xe0,
+0xfb,0x8b,0x05,0x7b,0xe0,0x7a,0x45,0x12,0x05,0xc8,0x8b,0x05,0x8a,0x04,0x12,0x03,
+0x55,0x05,0x00,0x7a,0x00,0x78,0x03,0x12,0x01,0x46,0x00,0x0e,0x12,0x03,0xc7,0x12,
+0x05,0xe4,0x12,0x05,0xc8,0x8b,0x05,0x8a,0x04,0x7b,0x01,0x7a,0x00,0x12,0x03,0xc7,
+0x12,0x05,0xe4,0x12,0x03,0x0a,0x80,0x3a,0x12,0x03,0x55,0x05,0x00,0x8b,0x05,0x7b,
+0xe0,0x7a,0x45,0x12,0x05,0xc8,0x8b,0x05,0x8a,0x04,0x12,0x03,0x55,0x05,0x00,0x7a,
+0x00,0x78,0x03,0x12,0x01,0x46,0x00,0x0e,0x12,0x03,0xc7,0x12,0x05,0xe4,0x12,0x05,
+0xc8,0x8b,0x05,0x8a,0x04,0x7b,0x01,0x7a,0x00,0x12,0x03,0xc7,0x12,0x05,0xe4,0x12,
+0x03,0x0a,0x02,0x05,0x9c,0x74,0x01,0x78,0x00,0x79,0x04,0x12,0x05,0x58,0x12,0x03,
+0x55,0x04,0x00,0x8b,0x05,0x7b,0x09,0x12,0x01,0x28,0x60,0x03,0x02,0x05,0x9c,0x7b,
+0xe0,0x7a,0x45,0x8b,0x05,0x8a,0x04,0x12,0x03,0x55,0x04,0x00,0x7a,0x00,0x78,0x03,
+0x12,0x01,0x46,0x00,0x0e,0x12,0x03,0xc7,0x90,0x42,0x58,0xea,0xf0,0xeb,0xa3,0xf0,
+0x12,0x03,0x55,0x05,0x00,0x8b,0x05,0x90,0x42,0x58,0xe0,0xfa,0xa3,0xe0,0xfb,0x12,
+0x05,0xc8,0x8b,0x05,0x8a,0x04,0x7b,0x04,0x7a,0x00,0x12,0x03,0xc7,0x12,0x05,0xe4,
+0x12,0x03,0x0a,0x90,0x42,0x58,0xe0,0xfa,0xa3,0xe0,0xfb,0x90,0x00,0x02,0x12,0x3b,
+0xe5,0x02,0x05,0x9c,0x74,0x01,0x78,0x00,0x79,0x04,0x12,0x05,0x58,0x12,0x03,0x55,
+0x04,0x00,0x8b,0x05,0x7b,0x09,0x12,0x01,0x28,0x60,0x03,0x02,0x05,0x9c,0x12,0x03,
+0x61,0x05,0x00,0x12,0x04,0x68,0x00,0x00,0x00,0x02,0x2a,0x54,0x29,0x22,0x29,0x74,
+0x29,0xe2,0x12,0x03,0x55,0x07,0x00,0x8b,0x05,0x7b,0x0c,0x12,0x00,0xa9,0x60,0x07,
+0x7b,0x0c,0x12,0x03,0x94,0x07,0x00,0x12,0x03,0x55,0x07,0x00,0x8b,0x05,0x7b,0xe0,
+0x7a,0x45,0x12,0x05,0xc8,0x8b,0x05,0x8a,0x04,0x12,0x03,0x55,0x05,0x00,0x7a,0x00,
+0x78,0x03,0x12,0x01,0x46,0x00,0x0e,0x12,0x03,0xc7,0x12,0x05,0xe4,0x12,0x05,0xc8,
+0x8b,0x05,0x8a,0x04,0x7b,0x05,0x7a,0x00,0x12,0x03,0xc7,0x12,0x05,0xe4,0x12,0x03,
+0x0a,0x02,0x2a,0x54,0x7b,0xe0,0x7a,0x45,0x8b,0x05,0x8a,0x04,0x12,0x03,0x55,0x04,
+0x00,0x7a,0x00,0x78,0x03,0x12,0x01,0x46,0x00,0x0e,0x12,0x03,0xc7,0x90,0x42,0x5a,
+0xea,0xf0,0xeb,0xa3,0xf0,0x12,0x03,0x55,0x07,0x00,0xeb,0x33,0xe4,0x95,0xe0,0xfa,
+0x8b,0x05,0x8a,0x04,0x7b,0xc0,0x7a,0xff,0x12,0x03,0xc7,0x8b,0x05,0x8a,0x04,0x7b,
+0x01,0x12,0x02,0xdf,0x8b,0x05,0x90,0x42,0x5a,0xe0,0xfa,0xa3,0xe0,0xfb,0x12,0x05,
+0xc8,0x8b,0x05,0x8a,0x04,0x7b,0x08,0x7a,0x00,0x12,0x03,0xc7,0x12,0x05,0xe4,0x12,
+0x03,0x0a,0x90,0x42,0x5a,0xe0,0xfa,0xa3,0xe0,0xfb,0x90,0x00,0x02,0x12,0x3b,0xe5,
+0x80,0x72,0x7b,0xe0,0x7a,0x45,0x8b,0x05,0x8a,0x04,0x12,0x03,0x55,0x04,0x00,0x7a,
+0x00,0x78,0x03,0x12,0x01,0x46,0x00,0x0e,0x12,0x03,0xc7,0x90,0x42,0x5a,0xea,0xf0,
+0xeb,0xa3,0xf0,0x12,0x03,0x55,0x07,0x00,0xeb,0x33,0xe4,0x95,0xe0,0xfa,0x8b,0x05,
+0x8a,0x04,0x7b,0xc0,0x7a,0xff,0x12,0x03,0xc7,0x8b,0x05,0x8a,0x04,0x7b,0x80,0x7a,
+0x00,0x12,0x03,0xd8,0x8b,0x05,0x8a,0x04,0x90,0x42,0x5a,0xe0,0xfa,0xa3,0xe0,0xfb,
+0x12,0x05,0xd6,0x8b,0x05,0x8a,0x04,0x7b,0x06,0x7a,0x00,0x12,0x03,0xc7,0x12,0x05,
+0xf2,0x12,0x03,0x12,0x90,0x42,0x5a,0xe0,0xfa,0xa3,0xe0,0xfb,0x90,0x00,0x02,0x12,
+0x3b,0xe5,0x80,0x00,0x02,0x05,0x9c,0xe4,0x78,0x00,0x79,0x04,0x12,0x05,0x58,0x90,
+0x00,0x00,0x12,0x1d,0x3e,0x02,0x05,0x9c,0x74,0x01,0x78,0x00,0x79,0x04,0x12,0x05,
+0x58,0x12,0x03,0x55,0x04,0x00,0x7a,0x00,0x8b,0x05,0x8a,0x04,0x7b,0xf0,0x7a,0x00,
+0x12,0x01,0x2c,0x60,0x09,0x7b,0x01,0x90,0x46,0xc1,0xeb,0xf0,0x80,0x5b,0x90,0x46,
+0xc1,0xe0,0xfb,0x8b,0x05,0x7b,0x02,0x12,0x01,0x28,0x60,0x0a,0x7b,0xc1,0x7a,0x46,
+0x12,0x02,0x42,0x01,0x80,0x43,0x90,0x46,0xc1,0xe0,0xfb,0x8b,0x05,0x7b,0x05,0x12,
+0x01,0x18,0x60,0x35,0x7b,0x44,0x7a,0x88,0x8b,0x05,0x8a,0x04,0x90,0x46,0xc1,0xe0,
+0xfb,0x7a,0x00,0x12,0x03,0xc7,0x8a,0x83,0x8b,0x82,0xe0,0xfb,0x8b,0x05,0x12,0x03,
+0x55,0x04,0x00,0x12,0x01,0x28,0x60,0x0a,0x7b,0xc1,0x7a,0x46,0x12,0x02,0x42,0x01,
+0x80,0x07,0x7b,0xe7,0x90,0x46,0xc1,0xeb,0xf0,0x90,0x46,0xc1,0xe0,0xfb,0x8b,0x05,
+0x7b,0x06,0x12,0x01,0x28,0x60,0x06,0x90,0x00,0x00,0x12,0x1a,0xf2,0x02,0x05,0x9c,
+0x74,0x02,0x78,0x00,0x79,0x04,0x12,0x05,0x58,0x12,0x03,0x61,0x04,0x00,0x8a,0x83,
+0x8b,0x82,0xe0,0xfb,0x7a,0x00,0x8b,0x05,0x8a,0x04,0x12,0x03,0x61,0x06,0x00,0x12,
+0x00,0x8e,0x60,0x26,0x12,0x03,0x61,0x04,0x00,0x8b,0x05,0x8a,0x04,0x7b,0x04,0x7a,
+0x00,0x12,0x03,0xc7,0x8a,0x83,0x8b,0x82,0xe0,0xfb,0x7a,0x00,0x8b,0x05,0x8a,0x04,
+0x7b,0x80,0x7a,0xff,0x12,0x03,0xc7,0x02,0x05,0x9c,0x7b,0x00,0x7a,0x00,0x90,0x42,
+0x5c,0xea,0xf0,0xeb,0xa3,0xf0,0x90,0x42,0x5c,0xe0,0xfa,0xa3,0xe0,0xfb,0x8b,0x05,
+0x8a,0x04,0x7b,0x03,0x7a,0x00,0x12,0x00,0xc4,0x70,0x03,0x02,0x2d,0x2a,0x12,0x03,
+0x61,0x04,0x00,0x8b,0x05,0x8a,0x04,0x90,0x42,0x5c,0xe0,0xfa,0xa3,0xe0,0xfb,0x12,
+0x05,0xd6,0x8b,0x05,0x8a,0x04,0x7b,0x01,0x7a,0x00,0x12,0x03,0xc7,0x12,0x05,0xf2,
+0x12,0x03,0xc7,0x8a,0x83,0x8b,0x82,0xe0,0xfb,0x7a,0x00,0x8b,0x05,0x8a,0x04,0x12,
+0x03,0x61,0x06,0x00,0x12,0x00,0x8e,0x70,0x03,0x02,0x2d,0x1f,0x12,0x03,0x61,0x04,
+0x00,0x8b,0x05,0x8a,0x04,0x7b,0x04,0x7a,0x00,0x12,0x03,0xc7,0x8b,0x05,0x8a,0x04,
+0x90,0x42,0x5c,0xe0,0xfa,0xa3,0xe0,0xfb,0x12,0x03,0xc7,0x8a,0x83,0x8b,0x82,0xe0,
+0xfb,0x7a,0x00,0x8b,0x05,0x8a,0x04,0x7b,0x80,0x7a,0xff,0x12,0x03,0xc7,0x8b,0x05,
+0x8a,0x04,0x12,0x03,0x61,0x04,0x00,0x12,0x05,0xd6,0x8b,0x05,0x8a,0x04,0x90,0x42,
+0x5c,0xe0,0xfa,0xa3,0xe0,0xfb,0x12,0x03,0xc7,0x12,0x05,0xf2,0x8a,0x83,0x8b,0x82,
+0xe0,0xfb,0x7a,0x00,0x12,0x04,0x1c,0x12,0x05,0xd6,0x8b,0x05,0x8a,0x04,0x12,0x03,
+0x61,0x08,0x00,0x12,0x03,0xc7,0x12,0x05,0xf2,0x12,0x05,0xd6,0x8b,0x05,0x8a,0x04,
+0x12,0x03,0x61,0x06,0x00,0x12,0x05,0xd6,0x8b,0x05,0x8a,0x04,0x7b,0x04,0x7a,0x00,
+0x12,0x03,0xc7,0x12,0x05,0xf2,0x12,0x05,0xd6,0x8b,0x05,0x8a,0x04,0x90,0x42,0x5c,
+0xe0,0xfa,0xa3,0xe0,0xfb,0x12,0x05,0xd6,0x8b,0x05,0x8a,0x04,0x7b,0x01,0x7a,0x00,
+0x12,0x03,0xc7,0x12,0x05,0xf2,0x12,0x03,0xc7,0x12,0x05,0xf2,0x8a,0x83,0x8b,0x82,
+0xe0,0xfb,0x7a,0x00,0x12,0x05,0xd6,0x8b,0x05,0x8a,0x04,0x12,0x03,0x61,0x08,0x00,
+0x12,0x05,0xd6,0x8b,0x05,0x8a,0x04,0x7b,0x04,0x7a,0x00,0x12,0x03,0xc7,0x12,0x05,
+0xf2,0x12,0x05,0xd6,0x8b,0x05,0x8a,0x04,0x90,0x42,0x5c,0xe0,0xfa,0xa3,0xe0,0xfb,
+0x12,0x03,0xc7,0x12,0x05,0xf2,0x8a,0x83,0x8b,0x82,0xe0,0xfb,0x7a,0x00,0x12,0x03,
+0xcf,0x12,0x05,0xf2,0x12,0x03,0xd8,0x12,0x05,0xf2,0x12,0x05,0xd6,0x8b,0x05,0x8a,
+0x04,0x12,0x03,0x61,0x06,0x00,0x12,0x05,0xd6,0x8b,0x05,0x8a,0x04,0x90,0x42,0x5c,
+0xe0,0xfa,0xa3,0xe0,0xfb,0x12,0x05,0xd6,0x8b,0x05,0x8a,0x04,0x7b,0x01,0x7a,0x00,
+0x12,0x03,0xc7,0x12,0x05,0xf2,0x12,0x03,0xc7,0x12,0x05,0xf2,0x8a,0x83,0x8b,0x82,
+0xe0,0xfb,0x7a,0x00,0x12,0x05,0xd6,0x8b,0x05,0x8a,0x04,0x12,0x03,0x61,0x08,0x00,
+0x12,0x05,0xd6,0x8b,0x05,0x8a,0x04,0x90,0x42,0x5c,0xe0,0xfa,0xa3,0xe0,0xfb,0x12,
+0x03,0xc7,0x12,0x05,0xf2,0x8a,0x83,0x8b,0x82,0xe0,0xfb,0x7a,0x00,0x12,0x03,0xcf,
+0x12,0x05,0xf2,0x12,0x03,0xed,0x12,0x05,0xf2,0x12,0x03,0xc7,0x02,0x05,0x9c,0x7b,
+0x5c,0x7a,0x42,0x12,0x02,0x42,0x02,0x02,0x2b,0x56,0x12,0x03,0x61,0x04,0x00,0x8b,
+0x05,0x8a,0x04,0x7b,0x04,0x7a,0x00,0x12,0x03,0xc7,0x8b,0x05,0x8a,0x04,0x7b,0x03,
+0x7a,0x00,0x12,0x03,0xc7,0x8a,0x83,0x8b,0x82,0xe0,0xfb,0x7a,0x00,0x8b,0x05,0x8a,
+0x04,0x7b,0x80,0x7a,0xff,0x12,0x03,0xc7,0x02,0x05,0x9c,0x74,0x02,0x78,0x00,0x79,
+0x04,0x12,0x05,0x58,0x12,0x03,0x61,0x04,0x00,0x12,0x03,0x3e,0x04,0x00,0x12,0x03,
+0x38,0x02,0x00,0x90,0x42,0x5e,0xeb,0xf0,0x7b,0x00,0x7a,0x00,0x90,0x42,0x61,0xea,
+0xf0,0xeb,0xa3,0xf0,0x7b,0xb3,0x7a,0x80,0x8b,0x05,0x8a,0x04,0x90,0x42,0x5e,0xe0,
+0xfb,0x12,0x05,0xd6,0x8b,0x05,0x7b,0x04,0x7c,0x00,0x12,0x02,0xc4,0x12,0x05,0xf2,
+0x7a,0x00,0xeb,0x2b,0xfb,0xea,0x3a,0xfa,0x12,0x03,0xc7,0x8a,0x83,0x8b,0x82,0xe0,
+0xfa,0xa3,0xe0,0xfb,0x8b,0x05,0x8a,0x04,0x12,0x03,0x61,0x04,0x00,0x12,0x03,0x38,
+0x03,0x00,0x7a,0x00,0x12,0x03,0xc7,0x8a,0x83,0x8b,0x82,0xe0,0xfb,0x7a,0x00,0x90,
+0x42,0x5f,0xea,0xf0,0xeb,0xa3,0xf0,0x12,0x03,0x61,0x04,0x00,0x12,0x03,0x38,0x01,
+0x00,0x8b,0x05,0x7b,0x09,0x12,0x01,0x37,0x70,0x03,0x02,0x2e,0x7b,0x12,0x03,0x61,
+0x04,0x00,0x12,0x03,0x3e,0x04,0x00,0x8a,0x83,0x8b,0x82,0xe0,0xfb,0x8b,0x05,0x7b,
+0x0f,0xeb,0x5d,0xfb,0x7a,0x00,0x8b,0x05,0x8a,0x04,0x90,0x42,0x5e,0xe0,0xfb,0x12,
+0x05,0xd6,0x8b,0x05,0x7b,0x0f,0xeb,0x5d,0xfb,0x12,0x05,0xf2,0x7a,0x00,0x12,0x05,
+0xd6,0x8b,0x05,0x8a,0x04,0x7b,0x04,0x12,0x02,0xdf,0x12,0x05,0xf2,0x12,0x03,0xc7,
+0x8b,0x05,0x8a,0x04,0x7b,0x5f,0x7a,0x42,0x12,0x00,0x53,0x12,0x03,0x61,0x04,0x00,
+0x12,0x03,0x38,0x02,0x00,0x7a,0x00,0x12,0x05,0xcf,0x7b,0xcb,0x7a,0x80,0x8b,0x05,
+0x8a,0x04,0x12,0x03,0x61,0x06,0x00,0x12,0x03,0x3e,0x04,0x00,0x12,0x03,0x38,0x10,
+0x00,0x7a,0x00,0x78,0x03,0x12,0x01,0x46,0x00,0x08,0x12,0x03,0xc7,0x90,0x00,0x04,
+0x12,0x2b,0x00,0x90,0x42,0x61,0xea,0xf0,0xeb,0xa3,0xf0,0x90,0x42,0x5f,0xe0,0xfa,
+0xa3,0xe0,0xfb,0x8b,0x05,0x8a,0x04,0x7b,0x7e,0x7a,0x00,0x12,0x00,0x8e,0x60,0x0c,
+0x7b,0x7e,0x7a,0x00,0x90,0x42,0x5f,0xea,0xf0,0xeb,0xa3,0xf0,0x12,0x03,0x61,0x04,
+0x00,0x12,0x03,0x3e,0x04,0x00,0x12,0x03,0x38,0x0a,0x00,0x8b,0x05,0x7b,0x01,0x7c,
+0x00,0x12,0x02,0xc4,0x7a,0x00,0x12,0x04,0x1c,0x8b,0x05,0x8a,0x04,0x7b,0x7f,0x7a,
+0x00,0x12,0x03,0xc7,0x90,0x42,0x63,0xea,0xf0,0xeb,0xa3,0xf0,0x90,0x42,0x61,0xe0,
+0xfa,0xa3,0xe0,0xfb,0x8b,0x05,0x8a,0x04,0x7b,0x63,0x7a,0x42,0x12,0x00,0x53,0x90,
+0x42,0x63,0xe0,0xfa,0xa3,0xe0,0xfb,0x8b,0x05,0x8a,0x04,0x7b,0x7f,0x7a,0x00,0x12,
+0x00,0x8e,0x60,0x0c,0x7b,0x7f,0x7a,0x00,0x90,0x42,0x63,0xea,0xf0,0xeb,0xa3,0xf0,
+0x90,0x42,0x63,0xe0,0xfa,0xa3,0xe0,0xfb,0x8b,0x05,0x8a,0x04,0x7b,0x01,0x7a,0x00,
+0x12,0x00,0xc4,0x60,0x0c,0x7b,0x01,0x7a,0x00,0x90,0x42,0x63,0xea,0xf0,0xeb,0xa3,
+0xf0,0x7b,0x7f,0x7a,0x00,0x8b,0x05,0x8a,0x04,0x90,0x42,0x5f,0xe0,0xfa,0xa3,0xe0,
+0xfb,0x12,0x03,0xcf,0x8b,0x05,0x8a,0x04,0x90,0x42,0x63,0xe0,0xfa,0xa3,0xe0,0xfb,
+0x12,0x03,0xd8,0x8b,0x05,0x8a,0x04,0x7b,0x7f,0x7a,0x00,0x12,0x03,0xed,0x90,0x42,
+0x63,0xea,0xf0,0xeb,0xa3,0xf0,0x7b,0xe0,0x7a,0x45,0x8b,0x05,0x8a,0x04,0x12,0x03,
+0x61,0x04,0x00,0x12,0x03,0x38,0x01,0x00,0x7a,0x00,0x78,0x03,0x12,0x01,0x46,0x00,
+0x0e,0x12,0x03,0xc7,0x12,0x03,0x38,0x0c,0x00,0x7a,0x00,0x12,0x04,0x1c,0x8b,0x05,
+0x8a,0x04,0x7b,0x7f,0x7a,0x00,0x12,0x03,0xc7,0x8b,0x05,0x8a,0x04,0x90,0x42,0x63,
+0xe0,0xfa,0xa3,0xe0,0xfb,0x12,0x03,0xd8,0x8b,0x05,0x8a,0x04,0x7b,0x7f,0x7a,0x00,
+0x12,0x03,0xed,0x90,0x42,0x63,0xea,0xf0,0xeb,0xa3,0xf0,0x7b,0x7f,0x7a,0x00,0x8b,
+0x05,0x8a,0x04,0x90,0x42,0x63,0xe0,0xfa,0xa3,0xe0,0xfb,0x12,0x03,0xcf,0x90,0x42,
+0x63,0xea,0xf0,0xeb,0xa3,0xf0,0x12,0x03,0x61,0x04,0x00,0x12,0x03,0x38,0x01,0x00,
+0x8b,0x05,0x7b,0x09,0x12,0x01,0x28,0x60,0x12,0x90,0x46,0xc0,0xe0,0xfb,0x7a,0x00,
+0x8b,0x05,0x8a,0x04,0x7b,0x63,0x7a,0x42,0x12,0x00,0x53,0x90,0x42,0x63,0xe0,0xfa,
+0xa3,0xe0,0xfb,0x8b,0x05,0x8a,0x04,0x7b,0x7e,0x7a,0x00,0x12,0x00,0x8e,0x60,0x0c,
+0x7b,0x7e,0x7a,0x00,0x90,0x42,0x63,0xea,0xf0,0xeb,0xa3,0xf0,0x90,0x42,0x63,0xe0,
+0xfa,0xa3,0xe0,0xfb,0x8b,0x05,0x8a,0x04,0x7b,0x00,0x7a,0x00,0x12,0x00,0xc4,0x60,
+0x0c,0x7b,0x00,0x7a,0x00,0x90,0x42,0x63,0xea,0xf0,0xeb,0xa3,0xf0,0x7b,0x01,0x12,
+0x05,0xc1,0x90,0x42,0x63,0xe0,0xfa,0xa3,0xe0,0xfb,0x12,0x05,0xc1,0x12,0x03,0x61,
+0x06,0x00,0x8a,0x83,0x8b,0x82,0xe0,0xfb,0x90,0x00,0x03,0x12,0x39,0xbc,0x02,0x05,
+0x9c,0x74,0x01,0x78,0x00,0x79,0x04,0x12,0x05,0x58,0x7b,0x4a,0x7a,0x88,0x8b,0x05,
+0x8a,0x04,0x7b,0xe0,0x7a,0x45,0x12,0x05,0xd6,0x8b,0x05,0x8a,0x04,0x12,0x03,0x55,
+0x06,0x00,0x7a,0x00,0x78,0x03,0x12,0x01,0x46,0x00,0x0e,0x12,0x03,0xc7,0x12,0x05,
+0xf2,0x12,0x03,0x38,0x03,0x00,0x7a,0x00,0x12,0x03,0xc7,0x8a,0x83,0x8b,0x82,0xe0,
+0xfb,0x8b,0x05,0x7b,0xe0,0x7a,0x45,0x12,0x05,0xc8,0x8b,0x05,0x8a,0x04,0x12,0x03,
+0x55,0x05,0x00,0x7a,0x00,0x78,0x03,0x12,0x01,0x46,0x00,0x0e,0x12,0x03,0xc7,0x12,
+0x05,0xe4,0x12,0x05,0xc8,0x8b,0x05,0x8a,0x04,0x7b,0x0c,0x7a,0x00,0x12,0x03,0xc7,
+0x12,0x05,0xe4,0x12,0x03,0x0a,0x90,0x45,0xdc,0xe0,0xfa,0xa3,0xe0,0xfb,0x90,0x42,
+0x65,0xea,0xf0,0xeb,0xa3,0xf0,0x90,0x42,0x65,0xe0,0xfa,0xa3,0xe0,0xfb,0x8b,0x05,
+0x8a,0x04,0x7b,0x00,0x7a,0x00,0x12,0x01,0x3b,0x60,0x3e,0x90,0x42,0x65,0xe0,0xfa,
+0xa3,0xe0,0xfb,0x12,0x03,0x38,0x01,0x00,0x8b,0x05,0x12,0x03,0x55,0x04,0x00,0x12,
+0x01,0x28,0x60,0x0e,0x90,0x42,0x65,0xe0,0xfa,0xa3,0xe0,0xfb,0x90,0x00,0x02,0x12,
+0x2d,0x5b,0x90,0x42,0x65,0xe0,0xfa,0xa3,0xe0,0xfb,0x12,0x03,0x3e,0x08,0x00,0x90,
+0x42,0x65,0xea,0xf0,0xeb,0xa3,0xf0,0x80,0xad,0x02,0x05,0x9c,0x74,0x02,0x78,0x00,
+0x79,0x04,0x12,0x05,0x58,0x12,0x03,0x61,0x04,0x00,0x8a,0x83,0x8b,0x82,0xe0,0xfb,
+0x90,0x00,0x01,0x12,0x39,0xf6,0x7b,0x80,0x8b,0x05,0x12,0x03,0x61,0x04,0x00,0x12,
+0x05,0xc8,0x8b,0x05,0x8a,0x04,0x7b,0x02,0x7a,0x00,0x12,0x03,0xc7,0x12,0x05,0xe4,
+0x12,0x03,0x0a,0x12,0x03,0x61,0x04,0x00,0x12,0x05,0xcf,0x7b,0xdc,0x7a,0x45,0x90,
+0x00,0x04,0x12,0x3a,0x87,0x12,0x03,0x61,0x04,0x00,0x12,0x05,0xcf,0x7b,0xd8,0x7a,
+0x45,0x90,0x00,0x04,0x12,0x3a,0x30,0x02,0x05,0x9c,0x74,0x01,0x78,0x00,0x79,0x04,
+0x12,0x05,0x58,0x90,0x45,0xdc,0xe0,0xfa,0xa3,0xe0,0xfb,0x90,0x42,0x67,0xea,0xf0,
+0xeb,0xa3,0xf0,0x90,0x42,0x67,0xe0,0xfa,0xa3,0xe0,0xfb,0x8b,0x05,0x8a,0x04,0x7b,
+0x00,0x7a,0x00,0x12,0x01,0x3b,0x60,0x4e,0x90,0x42,0x67,0xe0,0xfa,0xa3,0xe0,0xfb,
+0x12,0x03,0x3e,0x08,0x00,0x90,0x42,0x69,0xea,0xf0,0xeb,0xa3,0xf0,0x90,0x42,0x67,
+0xe0,0xfa,0xa3,0xe0,0xfb,0x12,0x03,0x38,0x01,0x00,0x8b,0x05,0x12,0x03,0x55,0x04,
+0x00,0x12,0x01,0x28,0x60,0x0e,0x90,0x42,0x67,0xe0,0xfa,0xa3,0xe0,0xfb,0x90,0x00,
+0x02,0x12,0x31,0x2c,0x90,0x42,0x69,0xe0,0xfa,0xa3,0xe0,0xfb,0x90,0x42,0x67,0xea,
+0xf0,0xeb,0xa3,0xf0,0x80,0x9d,0x02,0x05,0x9c,0xe4,0x78,0x00,0x79,0x04,0x12,0x05,
+0x58,0x7b,0x00,0x90,0x42,0x6b,0xeb,0xf0,0x90,0x42,0x6b,0xe0,0xfb,0x8b,0x05,0x7b,
+0x10,0x12,0x00,0xdb,0x60,0x15,0x90,0x42,0x6b,0xe0,0xfb,0x90,0x00,0x01,0x12,0x31,
+0x8a,0x7b,0x6b,0x7a,0x42,0x12,0x02,0x42,0x01,0x80,0xdd,0x02,0x05,0x9c,0x74,0x01,
+0x78,0x00,0x79,0x04,0x12,0x05,0x58,0x7b,0xe0,0x7a,0x45,0x8b,0x05,0x8a,0x04,0x12,
+0x03,0x55,0x04,0x00,0x7a,0x00,0x78,0x03,0x12,0x01,0x46,0x00,0x0e,0x12,0x03,0xc7,
+0x90,0x42,0x6c,0xea,0xf0,0xeb,0xa3,0xf0,0x7b,0x00,0x8b,0x05,0x90,0x42,0x6c,0xe0,
+0xfa,0xa3,0xe0,0xfb,0x12,0x05,0xc8,0x8b,0x05,0x8a,0x04,0x7b,0x02,0x7a,0x00,0x12,
+0x03,0xc7,0x12,0x05,0xe4,0x12,0x03,0x0a,0x7b,0x64,0x8b,0x05,0x90,0x42,0x6c,0xe0,
+0xfa,0xa3,0xe0,0xfb,0x12,0x05,0xc8,0x8b,0x05,0x8a,0x04,0x7b,0x03,0x7a,0x00,0x12,
+0x03,0xc7,0x12,0x05,0xe4,0x12,0x03,0x0a,0x7b,0x40,0x8b,0x05,0x90,0x42,0x6c,0xe0,
+0xfa,0xa3,0xe0,0xfb,0x12,0x05,0xc8,0x8b,0x05,0x8a,0x04,0x7b,0x04,0x7a,0x00,0x12,
+0x03,0xc7,0x12,0x05,0xe4,0x12,0x03,0x0a,0x7b,0x02,0x8b,0x05,0x90,0x42,0x6c,0xe0,
+0xfa,0xa3,0xe0,0xfb,0x12,0x05,0xc8,0x8b,0x05,0x8a,0x04,0x7b,0x05,0x7a,0x00,0x12,
+0x03,0xc7,0x12,0x05,0xe4,0x12,0x03,0x0a,0x7b,0x00,0x7a,0x00,0x8b,0x05,0x8a,0x04,
+0x90,0x42,0x6c,0xe0,0xfa,0xa3,0xe0,0xfb,0x12,0x05,0xd6,0x8b,0x05,0x8a,0x04,0x7b,
+0x06,0x7a,0x00,0x12,0x03,0xc7,0x12,0x05,0xf2,0x12,0x03,0x12,0x7b,0x00,0x8b,0x05,
+0x90,0x42,0x6c,0xe0,0xfa,0xa3,0xe0,0xfb,0x12,0x05,0xc8,0x8b,0x05,0x8a,0x04,0x7b,
+0x08,0x7a,0x00,0x12,0x03,0xc7,0x12,0x05,0xe4,0x12,0x03,0x0a,0x7b,0x00,0x8b,0x05,
+0x90,0x42,0x6c,0xe0,0xfa,0xa3,0xe0,0xfb,0x12,0x05,0xc8,0x8b,0x05,0x8a,0x04,0x7b,
+0x09,0x7a,0x00,0x12,0x03,0xc7,0x12,0x05,0xe4,0x12,0x03,0x0a,0x7b,0x00,0x8b,0x05,
+0x90,0x42,0x6c,0xe0,0xfa,0xa3,0xe0,0xfb,0x12,0x05,0xc8,0x8b,0x05,0x8a,0x04,0x7b,
+0x0d,0x7a,0x00,0x12,0x03,0xc7,0x12,0x05,0xe4,0x12,0x03,0x0a,0x7b,0x00,0x7a,0x00,
+0x8b,0x05,0x8a,0x04,0x90,0x42,0x6c,0xe0,0xfa,0xa3,0xe0,0xfb,0x12,0x05,0xd6,0x8b,
+0x05,0x8a,0x04,0x7b,0x0a,0x7a,0x00,0x12,0x03,0xc7,0x12,0x05,0xf2,0x12,0x03,0x12,
+0x90,0x88,0xae,0xe0,0xfb,0x8b,0x05,0x90,0x42,0x6c,0xe0,0xfa,0xa3,0xe0,0xfb,0x12,
+0x05,0xc8,0x8b,0x05,0x8a,0x04,0x7b,0x0c,0x7a,0x00,0x12,0x03,0xc7,0x12,0x05,0xe4,
+0x12,0x03,0x0a,0x02,0x05,0x9c,0x74,0x01,0x78,0x00,0x79,0x04,0x12,0x05,0x58,0x02,
+0x05,0x9c,0x74,0x01,0x78,0x00,0x79,0x04,0x12,0x05,0x58,0x02,0x05,0x9c,0x74,0x01,
+0x78,0x00,0x79,0x04,0x12,0x05,0x58,0x02,0x05,0x9c,0x74,0x01,0x78,0x00,0x79,0x04,
+0x12,0x05,0x58,0x02,0x05,0x9c,0x74,0x01,0x78,0x00,0x79,0x04,0x12,0x05,0x58,0x02,
+0x05,0x9c,0x74,0x01,0x78,0x00,0x79,0x04,0x12,0x05,0x58,0x02,0x05,0x9c,0x74,0x01,
+0x78,0x00,0x79,0x04,0x12,0x05,0x58,0x02,0x05,0x9c,0x74,0x01,0x78,0x00,0x79,0x04,
+0x12,0x05,0x58,0x7b,0x33,0x7a,0x88,0x8b,0x05,0x8a,0x04,0x12,0x03,0x55,0x05,0x00,
+0x12,0x05,0xd6,0x8b,0x05,0x7b,0x03,0x7c,0x00,0x12,0x02,0xc4,0x12,0x05,0xf2,0x7a,
+0x00,0x12,0x03,0xc7,0x8a,0x83,0x8b,0x82,0xe0,0xfb,0x90,0x42,0x70,0xeb,0xf0,0x90,
+0x42,0x70,0xe0,0xfb,0x8b,0x05,0x7b,0xe0,0x7a,0x45,0x12,0x05,0xc8,0x8b,0x05,0x8a,
+0x04,0x12,0x03,0x55,0x05,0x00,0x7a,0x00,0x78,0x03,0x12,0x01,0x46,0x00,0x0e,0x12,
+0x03,0xc7,0x12,0x05,0xe4,0x12,0x05,0xc8,0x8b,0x05,0x8a,0x04,0x7b,0x09,0x7a,0x00,
+0x12,0x03,0xc7,0x12,0x05,0xe4,0x12,0x03,0x0a,0x90,0x45,0xdc,0xe0,0xfa,0xa3,0xe0,
+0xfb,0x90,0x42,0x6e,0xea,0xf0,0xeb,0xa3,0xf0,0x90,0x42,0x6e,0xe0,0xfa,0xa3,0xe0,
+0xfb,0x8b,0x05,0x8a,0x04,0x7b,0x00,0x7a,0x00,0x12,0x01,0x3b,0x60,0x4c,0x90,0x42,
+0x6e,0xe0,0xfa,0xa3,0xe0,0xfb,0x12,0x03,0x38,0x01,0x00,0x8b,0x05,0x12,0x03,0x55,
+0x04,0x00,0x12,0x01,0x28,0x60,0x1c,0x90,0x42,0x70,0xe0,0xfb,0x12,0x05,0xc1,0x90,
+0x42,0x6e,0xe0,0xfa,0xa3,0xe0,0xfb,0x8a,0x83,0x8b,0x82,0xe0,0xfb,0x90,0x00,0x02,
+0x12,0x0a,0xaa,0x90,0x42,0x6e,0xe0,0xfa,0xa3,0xe0,0xfb,0x12,0x03,0x3e,0x08,0x00,
+0x90,0x42,0x6e,0xea,0xf0,0xeb,0xa3,0xf0,0x80,0x9f,0x02,0x05,0x9c,0x74,0x01,0x78,
+0x00,0x79,0x04,0x12,0x05,0x58,0x12,0x03,0x55,0x05,0x00,0x7a,0x00,0x12,0x04,0x68,
+0x00,0x07,0x00,0x5b,0x36,0x9b,0x35,0xb0,0x36,0x9b,0x36,0x9b,0x36,0x33,0x36,0x9b,
+0x36,0x9b,0x36,0x9b,0x36,0x9b,0x36,0x9b,0x36,0x9b,0x36,0x9b,0x36,0x9b,0x36,0x9b,
+0x36,0x9b,0x36,0x9b,0x36,0x9b,0x36,0x9b,0x36,0x9b,0x36,0x9b,0x36,0x9b,0x36,0x9b,
+0x36,0x9b,0x36,0x9b,0x36,0x9b,0x36,0x9b,0x36,0x9b,0x36,0x9b,0x36,0x9b,0x36,0x9b,
+0x36,0x9b,0x36,0x9b,0x36,0x9b,0x36,0x9b,0x36,0x9b,0x36,0x9b,0x36,0x9b,0x36,0x9b,
+0x36,0x9b,0x36,0x9b,0x36,0x9b,0x36,0x9b,0x36,0x9b,0x36,0x9b,0x36,0x9b,0x36,0x9b,
+0x36,0x9b,0x36,0x9b,0x36,0x9b,0x36,0x9b,0x36,0x9b,0x36,0x9b,0x36,0x9b,0x36,0x9b,
+0x36,0x9b,0x36,0x9b,0x36,0x9b,0x36,0x9b,0x36,0x61,0x36,0x9b,0x36,0x9b,0x36,0x9b,
+0x36,0x9b,0x36,0x9b,0x36,0x9b,0x36,0x9b,0x36,0x9b,0x36,0x9b,0x36,0x9b,0x36,0x9b,
+0x36,0x9b,0x36,0x9b,0x36,0x9b,0x36,0x9b,0x36,0x9b,0x36,0x9b,0x36,0x9b,0x36,0x9b,
+0x36,0x9b,0x36,0x9b,0x36,0x9b,0x36,0x9b,0x36,0x9b,0x36,0x9b,0x36,0x9b,0x36,0x86,
+0x7b,0xe0,0x7a,0x45,0x8b,0x05,0x8a,0x04,0x12,0x03,0x55,0x04,0x00,0x7a,0x00,0x78,
+0x03,0x12,0x01,0x46,0x00,0x0e,0x12,0x03,0xc7,0x8b,0x05,0x8a,0x04,0x7b,0x03,0x7a,
+0x00,0x12,0x03,0xc7,0x90,0x42,0x71,0xea,0xf0,0xeb,0xa3,0xf0,0x12,0x03,0x61,0x06,
+0x00,0x8b,0x05,0x8a,0x04,0x7b,0x07,0x12,0x02,0xc4,0x8b,0x05,0x8a,0x04,0x7b,0x7c,
+0x7a,0x00,0x12,0x02,0xfa,0x90,0x42,0x73,0xeb,0xf0,0x90,0x42,0x71,0xe0,0xfa,0xa3,
+0xe0,0xfb,0x8a,0x83,0x8b,0x82,0xe0,0xfb,0x8b,0x05,0x90,0x42,0x73,0xe0,0xfb,0x12,
+0x01,0x37,0x60,0x1d,0x90,0x42,0x73,0xe0,0xfb,0x8b,0x05,0x90,0x42,0x71,0xe0,0xfa,
+0xa3,0xe0,0xfb,0x12,0x03,0x0a,0x12,0x03,0x55,0x04,0x00,0x90,0x00,0x01,0x12,0x30,
+0x51,0x80,0x68,0x12,0x03,0x55,0x04,0x00,0x8b,0x05,0x7b,0x09,0x12,0x01,0x28,0x60,
+0x02,0x80,0x58,0x12,0x03,0x61,0x06,0x00,0x8b,0x05,0x8a,0x04,0x7b,0x07,0x12,0x02,
+0xc4,0x12,0x05,0xc1,0x12,0x03,0x55,0x05,0x00,0x90,0x00,0x02,0x12,0x34,0x0a,0x80,
+0x3a,0x12,0x03,0x55,0x04,0x00,0x8b,0x05,0x7b,0x09,0x12,0x01,0x28,0x60,0x02,0x80,
+0x2a,0x12,0x03,0x61,0x06,0x00,0x12,0x05,0xc1,0x12,0x03,0x55,0x05,0x00,0x90,0x00,
+0x02,0x12,0x37,0xa0,0x80,0x15,0x12,0x03,0x61,0x06,0x00,0x12,0x05,0xc1,0x12,0x03,
+0x55,0x05,0x00,0x90,0x00,0x02,0x12,0x36,0x9e,0x80,0x00,0x02,0x05,0x9c,0x74,0x01,
+0x78,0x00,0x79,0x04,0x12,0x05,0x58,0x12,0x03,0x55,0x05,0x00,0x8b,0x05,0x7b,0x40,
+0x12,0x01,0x0b,0x60,0x09,0x7b,0x01,0x90,0x42,0x79,0xeb,0xf0,0x80,0x07,0x7b,0x00,
+0x90,0x42,0x79,0xeb,0xf0,0x90,0x42,0x79,0xe0,0xfb,0x90,0x42,0x76,0xeb,0xf0,0x7b,
+0xe0,0x7a,0x45,0x8b,0x05,0x8a,0x04,0x12,0x03,0x55,0x04,0x00,0x7a,0x00,0x78,0x03,
+0x12,0x01,0x46,0x00,0x0e,0x12,0x03,0xc7,0x90,0x42,0x77,0xea,0xf0,0xeb,0xa3,0xf0,
+0x90,0x42,0x77,0xe0,0xfa,0xa3,0xe0,0xfb,0x12,0x03,0x38,0x0d,0x00,0x8b,0x05,0x7b,
+0xfe,0xeb,0x5d,0xfb,0x8b,0x05,0x90,0x42,0x76,0xe0,0xfb,0xeb,0x4d,0xfb,0x8b,0x05,
+0x90,0x42,0x77,0xe0,0xfa,0xa3,0xe0,0xfb,0x12,0x05,0xc8,0x8b,0x05,0x8a,0x04,0x7b,
+0x0d,0x7a,0x00,0x12,0x03,0xc7,0x12,0x05,0xe4,0x12,0x03,0x0a,0x90,0x45,0xdc,0xe0,
+0xfa,0xa3,0xe0,0xfb,0x90,0x42,0x74,0xea,0xf0,0xeb,0xa3,0xf0,0x90,0x42,0x74,0xe0,
+0xfa,0xa3,0xe0,0xfb,0x8b,0x05,0x8a,0x04,0x7b,0x00,0x7a,0x00,0x12,0x01,0x3b,0x60,
+0x4c,0x90,0x42,0x74,0xe0,0xfa,0xa3,0xe0,0xfb,0x12,0x03,0x38,0x01,0x00,0x8b,0x05,
+0x12,0x03,0x55,0x04,0x00,0x12,0x01,0x28,0x60,0x1c,0x90,0x42,0x76,0xe0,0xfb,0x12,
+0x05,0xc1,0x90,0x42,0x74,0xe0,0xfa,0xa3,0xe0,0xfb,0x8a,0x83,0x8b,0x82,0xe0,0xfb,
+0x90,0x00,0x02,0x12,0x3a,0x0d,0x90,0x42,0x74,0xe0,0xfa,0xa3,0xe0,0xfb,0x12,0x03,
+0x3e,0x08,0x00,0x90,0x42,0x74,0xea,0xf0,0xeb,0xa3,0xf0,0x80,0x9f,0x02,0x05,0x9c,
+0x74,0x01,0x78,0x00,0x79,0x04,0x12,0x05,0x58,0x12,0x03,0x55,0x05,0x00,0x8b,0x05,
+0x7b,0x40,0x12,0x01,0x0b,0x60,0x09,0x7b,0x00,0x90,0x42,0x7f,0xeb,0xf0,0x80,0x07,
+0x7b,0x00,0x90,0x42,0x7f,0xeb,0xf0,0x90,0x42,0x7f,0xe0,0xfb,0x90,0x42,0x7a,0xeb,
+0xf0,0x7b,0xe0,0x7a,0x45,0x8b,0x05,0x8a,0x04,0x12,0x03,0x55,0x04,0x00,0x7a,0x00,
+0x78,0x03,0x12,0x01,0x46,0x00,0x0e,0x12,0x03,0xc7,0x90,0x42,0x7b,0xea,0xf0,0xeb,
+0xa3,0xf0,0x90,0x42,0x7b,0xe0,0xfa,0xa3,0xe0,0xfb,0x12,0x03,0x38,0x0d,0x00,0x8b,
+0x05,0x7b,0xff,0xeb,0x5d,0xfb,0x8b,0x05,0x90,0x42,0x7a,0xe0,0xfb,0xeb,0x4d,0xfb,
+0x8b,0x05,0x90,0x42,0x7b,0xe0,0xfa,0xa3,0xe0,0xfb,0x12,0x05,0xc8,0x8b,0x05,0x8a,
+0x04,0x7b,0x0d,0x7a,0x00,0x12,0x03,0xc7,0x12,0x05,0xe4,0x12,0x03,0x0a,0x90,0x42,
+0x7a,0xe0,0x60,0x03,0x02,0x38,0xb0,0x90,0x45,0xdc,0xe0,0xfa,0xa3,0xe0,0xfb,0x90,
+0x42,0x7d,0xea,0xf0,0xeb,0xa3,0xf0,0x90,0x42,0x7d,0xe0,0xfa,0xa3,0xe0,0xfb,0x8b,
+0x05,0x8a,0x04,0x7b,0x00,0x7a,0x00,0x12,0x01,0x3b,0x60,0x54,0x90,0x42,0x7d,0xe0,
+0xfa,0xa3,0xe0,0xfb,0x12,0x03,0x38,0x01,0x00,0x8b,0x05,0x12,0x03,0x55,0x04,0x00,
+0x12,0x01,0x28,0x60,0x24,0x90,0x42,0x7d,0xe0,0xfa,0xa3,0xe0,0xfb,0x12,0x03,0x38,
+0x02,0x00,0x8b,0x05,0x7b,0x81,0x12,0x01,0x28,0x60,0x0e,0x90,0x42,0x7d,0xe0,0xfa,
+0xa3,0xe0,0xfb,0x90,0x00,0x02,0x12,0x31,0x2c,0x90,0x42,0x7d,0xe0,0xfa,0xa3,0xe0,
+0xfb,0x12,0x03,0x3e,0x08,0x00,0x90,0x42,0x7d,0xea,0xf0,0xeb,0xa3,0xf0,0x80,0x97,
+0x02,0x05,0x9c,0x8b,0xf0,0x12,0x05,0xdd,0xa9,0x03,0xa8,0xf0,0x80,0x00,0xc2,0xb4,
+0x90,0xff,0xc4,0xe8,0xf0,0xa3,0xe9,0x00,0xf0,0x74,0x82,0x28,0xf5,0x82,0x74,0x42,
+0x34,0x00,0xf5,0x83,0xe9,0xf0,0xd2,0xb4,0x22,0xc2,0xb4,0x7c,0x03,0x7d,0xe8,0x90,
+0xff,0xc0,0xe0,0x30,0xe1,0x04,0xdd,0xf7,0xdc,0xf5,0xd2,0xb4,0x12,0x05,0xf2,0xeb,
+0x24,0x80,0xf5,0xf0,0xa8,0xf0,0x8c,0x83,0x8d,0x82,0xe0,0xa3,0xac,0x83,0xad,0x82,
+0x54,0x3f,0xf9,0x12,0x38,0xbe,0xe5,0xf0,0x24,0x18,0xf5,0xf0,0x7a,0x03,0xa8,0xf0,
+0x8c,0x83,0x8d,0x82,0xe0,0xa3,0xac,0x83,0xad,0x82,0xf9,0x12,0x38,0xbe,0xe5,0xf0,
+0x24,0x18,0xf5,0xf0,0xda,0xe8,0xa8,0xf0,0x8c,0x83,0x8d,0x82,0xe0,0xa3,0xac,0x83,
+0xad,0x82,0x54,0x07,0xf9,0x02,0x38,0xbe,0x22,0xc0,0x03,0x12,0x05,0xe4,0x12,0x05,
+0xeb,0xd0,0x00,0xa9,0x05,0x80,0x00,0xe8,0x24,0x38,0xfc,0x74,0x82,0x2c,0xf5,0x82,
+0x74,0x42,0x34,0x00,0xf5,0x83,0xe0,0x54,0x08,0xfd,0xe9,0x54,0x0f,0xc4,0x4d,0xfd,
+0xeb,0x33,0xea,0x33,0x54,0x07,0x4d,0xf9,0xa8,0x04,0x12,0x38,0xbe,0xec,0xc3,0x94,
+0x18,0xfc,0x24,0x82,0xf5,0x82,0x74,0x42,0x34,0x00,0xf5,0x83,0xe0,0x54,0x01,0xfd,
+0xeb,0xc3,0x33,0x4d,0xa8,0x04,0xf9,0x02,0x38,0xbe,0x22,0x12,0x05,0xe4,0xc0,0x05,
+0x12,0x05,0xe4,0xaa,0x05,0xd0,0x01,0xa8,0x03,0x80,0x00,0xe8,0x24,0x20,0xf8,0x74,
+0x82,0x28,0xf5,0x82,0x74,0x42,0x34,0x00,0xf5,0x83,0xe0,0x54,0xfe,0x49,0xf9,0x12,
+0x38,0xbe,0xe8,0x24,0xe8,0xf8,0xa9,0x02,0x02,0x38,0xbe,0x22,0x12,0x05,0xe4,0xc0,
+0x05,0x12,0x05,0xe4,0xaa,0x05,0xd0,0x01,0xa8,0x03,0x80,0x00,0xe8,0x24,0x50,0xf8,
+0xea,0x13,0xe9,0x33,0xf9,0x02,0x38,0xbe,0x22,0x12,0x05,0xe4,0xeb,0x24,0x68,0xf8,
+0x74,0x82,0x28,0xf5,0x82,0x74,0x42,0x34,0x00,0xf5,0x83,0xe0,0x54,0x30,0x44,0x80,
+0x4d,0xf9,0x02,0x38,0xbe,0x22,0xeb,0x24,0x68,0xf8,0x74,0x82,0x28,0xf5,0x82,0x74,
+0x42,0x34,0x00,0xf5,0x83,0xe0,0x54,0x7f,0xf9,0x02,0x38,0xbe,0x22,0x12,0x05,0xe4,
+0x80,0x00,0xeb,0x24,0x38,0xf8,0x74,0x82,0x28,0xf5,0x82,0x74,0x42,0x34,0x00,0xf5,
+0x83,0xe0,0xbd,0x00,0x05,0x54,0xf7,0x02,0x3a,0x2c,0x44,0x08,0xf9,0x02,0x38,0xbe,
+0x12,0x05,0xf2,0xac,0x05,0x02,0x3a,0x38,0x75,0xa0,0x00,0xeb,0x24,0x01,0xf5,0x82,
+0xea,0x34,0x00,0xf5,0x83,0xe0,0x70,0x1f,0xec,0xf0,0xe5,0x82,0x24,0x02,0xf5,0x82,
+0xe5,0x83,0x34,0x00,0xf5,0x83,0xec,0xf0,0xec,0x24,0x07,0xf8,0xe4,0xf2,0xec,0x24,
+0x09,0xf8,0xe4,0xf2,0x02,0x3a,0x86,0xeb,0x24,0x03,0xf5,0x82,0xea,0x34,0x00,0xf5,
+0x83,0xe0,0xf9,0x24,0x09,0xf8,0xec,0xf2,0xec,0x24,0x09,0xf8,0xe4,0xf2,0xec,0x24,
+0x07,0xf8,0xe9,0xf2,0xec,0xf0,0x22,0x12,0x05,0xf2,0xac,0x05,0x02,0x3a,0x8f,0x75,
+0xa0,0x00,0xec,0x24,0x09,0xf8,0xe2,0x70,0x13,0xeb,0x24,0x03,0xf5,0x82,0xea,0x34,
+0x00,0xf5,0x83,0xec,0x24,0x07,0xf8,0xe2,0xf0,0x02,0x3a,0xbe,0xec,0x24,0x07,0xf8,
+0xe2,0xf5,0xf0,0xec,0x24,0x09,0xf8,0xe2,0x24,0x07,0xf8,0xe5,0xf0,0xf2,0xec,0x24,
+0x07,0xf8,0xe2,0x70,0x13,0xeb,0x24,0x01,0xf5,0x82,0xea,0x34,0x00,0xf5,0x83,0xec,
+0x24,0x09,0xf8,0xe2,0xf0,0x02,0x3a,0xea,0xec,0x24,0x09,0xf8,0xe2,0xf5,0xf0,0xec,
+0x24,0x07,0xf8,0xe2,0x24,0x09,0xf8,0xe5,0xf0,0xf2,0x22,0x90,0x45,0xd9,0xe0,0x60,
+0x16,0xf5,0x25,0x7a,0x45,0x7b,0xd8,0xfc,0x12,0x3a,0x8f,0x7a,0x45,0x7b,0xdc,0xac,
+0x25,0x12,0x3a,0x38,0x02,0x3b,0x26,0x90,0x45,0xdd,0xe0,0x60,0x16,0xf5,0x25,0x7a,
+0x45,0x7b,0xdc,0xfc,0x12,0x3a,0x8f,0x7a,0x45,0x7b,0xdc,0xac,0x25,0x12,0x3a,0x38,
+0x02,0x3b,0x26,0x75,0x25,0x00,0x7a,0x00,0xab,0x25,0x22,0x75,0xa0,0x00,0xeb,0x24,
+0x02,0xf8,0xe2,0xc3,0x13,0xfc,0xe4,0x92,0xe7,0xfd,0xeb,0x24,0x05,0xf8,0xe2,0x24,
+0x05,0x92,0xd5,0xf5,0x82,0xeb,0x24,0x04,0xf8,0xe2,0xa2,0xd5,0x34,0x00,0xf5,0x83,
+0xe0,0x30,0xe7,0x04,0x7c,0x1e,0x7d,0x00,0xe5,0x82,0x24,0x03,0xf5,0x82,0xe5,0x83,
+0x34,0x00,0xf5,0x83,0xe0,0xf9,0xa3,0xe0,0x2d,0xfd,0xe9,0x3c,0xfc,0xeb,0x24,0x01,
+0xf8,0xe2,0x75,0xf0,0x0e,0xa4,0x24,0xea,0xf5,0x82,0xe5,0xf0,0x34,0x45,0xf5,0x83,
+0xe0,0xf9,0xa3,0xe0,0x2d,0xfd,0xe9,0x3c,0xfc,0xed,0xc3,0x94,0x00,0xec,0x94,0x60,
+0x40,0x04,0x7c,0x5f,0x7d,0xff,0xed,0x33,0xec,0x33,0x75,0xf0,0x0c,0x84,0x94,0x08,
+0xfa,0xed,0xc3,0x33,0x24,0xca,0xf5,0x82,0xe5,0xf0,0x34,0x88,0xf5,0x83,0xe0,0xfc,
+0xa3,0xe0,0xfd,0xeb,0x24,0x00,0xf8,0xe2,0xf8,0xa9,0x02,0xaa,0x04,0xab,0x05,0x12,
+0x39,0x47,0x22,0x12,0x05,0xe4,0x80,0x00,0xbb,0x09,0x01,0x22,0xeb,0x75,0xf0,0x0e,
+0xa4,0x24,0xe4,0xf5,0x82,0xe5,0xf0,0x34,0x45,0xf5,0x83,0xed,0xf0,0xa9,0x03,0xaa,
+0x83,0xab,0x82,0x80,0x12,0x8b,0x82,0x8a,0x83,0xe0,0xf9,0x80,0x00,0x74,0x04,0x2b,
+0xf5,0x82,0xea,0x34,0x00,0xf5,0x83,0xe0,0x24,0xc0,0xc3,0x33,0x92,0xd5,0x50,0x02,
+0xf4,0x04,0xfb,0x89,0x24,0xe5,0x82,0x24,0x01,0xf5,0x82,0xe5,0x83,0x34,0x00,0xf5,
+0x83,0xe0,0x8b,0xf0,0xa4,0x30,0xd5,0x0a,0xf4,0x24,0x01,0xc5,0xf0,0xf4,0x34,0x00,
+0xc5,0xf0,0xaa,0xf0,0xfb,0x74,0x01,0x25,0x82,0xf5,0x82,0xe5,0x83,0x34,0x00,0xf5,
+0x83,0xe0,0xfc,0xa3,0xe0,0xfd,0x74,0x01,0x25,0x82,0xf5,0x82,0xe5,0x83,0x34,0x00,
+0xf5,0x83,0xe0,0xa2,0xe7,0x92,0xd5,0x2d,0xfd,0xec,0x75,0xf0,0x00,0x30,0xd5,0x03,
+0x75,0xf0,0xff,0x35,0xf0,0xfc,0xed,0x2b,0xfd,0xec,0x3a,0xfc,0xe5,0x82,0x24,0x02,
+0xf5,0x82,0xe5,0x83,0x34,0x00,0xf5,0x83,0xec,0xf0,0xa3,0xed,0xf0,0x90,0x45,0xdd,
+0xe0,0xf5,0x23,0x75,0xa0,0x00,0x60,0x16,0x24,0x01,0xf8,0xe2,0xb5,0x24,0x05,0xab,
+0x23,0x12,0x3b,0x2b,0xe5,0x23,0x24,0x09,0xf8,0xe2,0xf5,0x23,0x80,0xe5,0x22,0x75,
+0xa0,0x00,0xeb,0x24,0x04,0xf8,0xe2,0xf5,0xf0,0xe8,0x04,0xf8,0xe2,0x24,0x0a,0xf5,
+0x82,0xe5,0xf0,0x34,0x00,0xf5,0x83,0xc0,0x83,0xc0,0x82,0xe0,0xc3,0x13,0xfa,0x79,
+0x00,0xeb,0x24,0x01,0xf8,0xe2,0xfc,0x75,0xf0,0x0e,0xa4,0x24,0xec,0xf5,0x82,0xe5,
+0xf0,0x34,0x45,0xf5,0x83,0xe0,0x2a,0xfa,0xe9,0x34,0x00,0xf9,0xd0,0xe0,0x24,0xf8,
+0xf5,0x82,0xd0,0xe0,0x34,0xff,0xf5,0x83,0xe0,0xc4,0x54,0x0f,0xc3,0x33,0x24,0xb3,
+0xf5,0x82,0x74,0x80,0x34,0x00,0xf5,0x83,0xe0,0xf5,0xf0,0xa3,0xe0,0xf5,0x82,0x85,
+0xf0,0x83,0xeb,0x24,0x03,0xf8,0xe2,0x25,0x82,0xf5,0x82,0xe5,0x83,0x34,0x00,0xf5,
+0x83,0xe0,0x2a,0xfa,0xe9,0x34,0x00,0xf9,0xbc,0x09,0x0a,0x90,0x46,0xc0,0xe0,0x2a,
+0xfa,0xe9,0x34,0x00,0xf9,0xc3,0xea,0x94,0x7e,0xe9,0x94,0x00,0x40,0x02,0x7a,0x7e,
+0xeb,0x24,0x00,0xf8,0xe2,0xf8,0xa9,0x02,0x7a,0x01,0x12,0x39,0xcc,0x22,0x74,0xaa,
+0x90,0xff,0xe1,0xf0,0x12,0x40,0x19,0x12,0x4c,0x48,0x22,0x12,0x40,0x3d,0xc3,0x33,
+0x40,0x05,0x90,0x3d,0x59,0x80,0x03,0x90,0x3e,0x59,0xf5,0xf0,0x93,0xc5,0xf0,0xa3,
+0x93,0x85,0xf0,0x83,0xf5,0x82,0xe4,0x73,0x22,0x40,0x16,0x40,0x16,0x40,0x16,0x40,
+0x16,0x40,0x16,0x40,0x16,0x40,0x16,0x40,0x16,0x40,0x16,0x40,0x16,0x40,0x16,0x40,
+0x16,0x40,0x16,0x40,0x16,0x40,0x16,0x40,0x16,0x3f,0x5f,0x40,0x16,0x40,0x16,0x40,
+0x16,0x3f,0x67,0x40,0x16,0x3f,0x6d,0x3f,0x73,0x40,0x16,0x40,0x16,0x40,0x16,0x40,
+0x16,0x40,0x16,0x40,0x16,0x40,0x16,0x40,0x16,0x3f,0x79,0x40,0x16,0x40,0x16,0x40,
+0x16,0x3f,0x81,0x40,0x16,0x40,0x16,0x40,0x16,0x40,0x16,0x40,0x16,0x40,0x16,0x40,
+0x16,0x40,0x16,0x40,0x16,0x40,0x16,0x40,0x16,0x3f,0x87,0x3f,0x8f,0x40,0x16,0x40,
+0x16,0x40,0x16,0x40,0x16,0x40,0x16,0x40,0x16,0x3f,0x92,0x40,0x16,0x40,0x16,0x40,
+0x16,0x40,0x16,0x40,0x16,0x40,0x16,0x40,0x16,0x3f,0x98,0x40,0x16,0x40,0x16,0x40,
+0x16,0x40,0x16,0x40,0x16,0x40,0x16,0x40,0x16,0x40,0x16,0x40,0x16,0x40,0x16,0x40,
+0x16,0x40,0x16,0x40,0x16,0x40,0x16,0x40,0x16,0x40,0x16,0x40,0x16,0x40,0x16,0x40,
+0x16,0x40,0x16,0x40,0x16,0x40,0x16,0x40,0x16,0x40,0x16,0x40,0x16,0x40,0x16,0x40,
+0x16,0x40,0x16,0x40,0x16,0x40,0x16,0x40,0x16,0x40,0x16,0x40,0x16,0x40,0x16,0x40,
+0x16,0x40,0x16,0x40,0x16,0x40,0x16,0x40,0x16,0x40,0x16,0x40,0x16,0x40,0x16,0x40,
+0x16,0x40,0x16,0x40,0x16,0x40,0x16,0x40,0x16,0x40,0x16,0x40,0x16,0x40,0x16,0x40,
+0x16,0x3f,0x9e,0x3f,0xa4,0x3f,0xaa,0x3f,0xb0,0x40,0x16,0x40,0x16,0x40,0x16,0x40,
+0x16,0x40,0x16,0x40,0x16,0x40,0x16,0x40,0x16,0x3f,0x59,0x40,0x16,0x40,0x16,0x40,
+0x16,0x40,0x16,0x40,0x16,0x40,0x16,0x40,0x16,0x40,0x16,0x40,0x16,0x40,0x16,0x40,
+0x16,0x40,0x16,0x40,0x16,0x40,0x16,0x40,0x16,0x40,0x16,0x40,0x16,0x40,0x16,0x40,
+0x16,0x40,0x16,0x40,0x16,0x40,0x16,0x40,0x16,0x40,0x16,0x40,0x16,0x40,0x16,0x40,
+0x16,0x40,0x16,0x40,0x16,0x40,0x16,0x40,0x16,0x40,0x16,0x40,0x16,0x40,0x16,0x40,
+0x16,0x40,0x16,0x40,0x16,0x40,0x16,0x40,0x16,0x40,0x16,0x40,0x16,0x40,0x16,0x40,
+0x16,0x40,0x16,0x40,0x16,0x40,0x16,0x40,0x16,0x40,0x16,0x40,0x16,0x40,0x16,0x40,
+0x16,0x40,0x16,0x40,0x16,0x40,0x16,0x40,0x16,0x40,0x16,0x40,0x16,0x40,0x16,0x40,
+0x16,0x40,0x16,0x40,0x16,0x40,0x16,0x40,0x16,0x40,0x16,0x40,0x16,0x40,0x16,0x40,
+0x16,0x40,0x16,0x40,0x16,0x40,0x16,0x40,0x16,0x40,0x16,0x40,0x16,0x40,0x16,0x40,
+0x16,0x40,0x16,0x40,0x16,0x40,0x16,0x40,0x16,0x3f,0xb6,0x3f,0xc1,0x40,0x16,0x3f,
+0xc4,0x3f,0xc7,0x40,0x16,0x40,0x16,0x40,0x16,0x40,0x16,0x40,0x16,0x40,0x16,0x40,
+0x16,0x40,0x16,0x40,0x16,0x40,0x16,0x40,0x16,0x3f,0xcc,0x3f,0xd6,0x3f,0xe3,0x40,
+0x16,0x3f,0xf5,0x40,0x16,0x40,0x16,0x40,0x16,0x3f,0xfd,0x40,0x16,0x40,0x16,0x40,
+0x16,0x40,0x16,0x40,0x16,0x40,0x16,0x40,0x16,0x40,0x16,0x40,0x16,0x40,0x05,0x40,
+0x16,0x40,0x16,0x40,0x16,0x40,0x16,0x40,0x16,0x40,0x0e,0x40,0x16,0x40,0x16,0x40,
+0x16,0x40,0x16,0x40,0x16,0x40,0x16,0x40,0x16,0x12,0x40,0xb7,0x02,0x3d,0x58,0x12,
+0x40,0x2a,0xf5,0x90,0x02,0x3d,0x58,0x12,0x40,0xa7,0x02,0x3d,0x58,0x12,0x40,0x9f,
+0x02,0x3d,0x58,0x12,0x40,0x9f,0x02,0x3d,0x58,0x74,0x00,0x12,0x40,0x42,0x02,0x3d,
+0x58,0x12,0x40,0xaf,0x02,0x3d,0x58,0x74,0xf8,0x12,0x40,0x42,0x02,0x3d,0x58,0x02,
+0x3d,0x58,0x12,0x40,0x2a,0x02,0x3d,0x58,0x12,0x40,0xbf,0x02,0x3d,0x58,0x12,0x40,
+0x87,0x02,0x3d,0x58,0x12,0x40,0x93,0x02,0x3d,0x58,0x12,0x40,0x9f,0x02,0x3d,0x58,
+0x12,0x40,0x9f,0x02,0x3d,0x58,0xc2,0xa9,0x74,0x00,0x90,0xff,0xe4,0xf0,0x02,0x3d,
+0x58,0x02,0x3d,0x58,0x02,0x3d,0x58,0xd2,0xa9,0x02,0x3d,0x58,0x12,0x40,0x2a,0xf4,
+0x12,0x40,0x42,0x02,0x3d,0x58,0x74,0x01,0x12,0x40,0x42,0x74,0x05,0x12,0x40,0x42,
+0x02,0x3d,0x58,0x12,0x40,0x2a,0x12,0x4c,0x4e,0x12,0x40,0x42,0x74,0x01,0x90,0xff,
+0xe4,0xf0,0x02,0x3d,0x58,0x12,0x40,0x2a,0xf5,0x26,0x02,0x3d,0x58,0xe5,0x26,0x12,
+0x40,0x42,0x02,0x3d,0x58,0x74,0x01,0x90,0xff,0xe5,0xf0,0x02,0x3d,0x58,0x74,0x00,
+0x12,0x40,0x42,0x02,0x3d,0x58,0x02,0x3d,0x58,0xe5,0x89,0x54,0xf0,0x44,0x02,0xf5,
+0x89,0x75,0x8c,0x83,0x75,0x8a,0x83,0xd2,0x8c,0x22,0x90,0xff,0xe2,0x75,0x27,0x00,
+0x75,0x28,0x00,0xe0,0x20,0xe0,0x06,0xd5,0x27,0xf9,0xd5,0x28,0xf6,0x90,0xff,0xe0,
+0xe0,0x22,0xc0,0xe0,0x90,0xff,0xe3,0x75,0x27,0x00,0x75,0x28,0x00,0xe0,0x30,0xe0,
+0x06,0xd5,0x27,0xf9,0xd5,0x28,0xf6,0xd0,0xe0,0x90,0xff,0xe1,0xf0,0x22,0x12,0x40,
+0x2a,0xf5,0x2a,0x12,0x40,0x2a,0xf5,0x29,0x30,0x08,0x14,0xc2,0x09,0xe5,0x2a,0x20,
+0xe0,0x02,0xd2,0x09,0xe5,0x29,0xc3,0x13,0xf5,0x29,0xe5,0x2a,0x13,0xf5,0x2a,0xe4,
+0x90,0xff,0xe4,0xf0,0xd2,0xa9,0x22,0xc2,0x00,0xc2,0x07,0xd2,0x01,0xd2,0x05,0xc2,
+0x06,0x80,0xcb,0xc2,0x00,0xc2,0x07,0xd2,0x01,0xd2,0x05,0xd2,0x06,0x80,0xbf,0xc2,
+0x00,0xc2,0x07,0xd2,0x01,0x80,0xb7,0xc2,0x00,0xc2,0x07,0xc2,0x01,0x80,0xaf,0xd2,
+0x00,0xc2,0x07,0xc2,0x01,0x80,0xa7,0xc2,0x00,0xc2,0x01,0xd2,0x07,0x80,0x9f,0x12,
+0x40,0x2a,0xc2,0x08,0xb4,0xce,0x00,0x40,0x04,0xc3,0x33,0xd2,0x08,0xc3,0x94,0x80,
+0x40,0x06,0xc2,0x03,0x33,0x02,0x40,0xdc,0x24,0x80,0xd2,0x03,0xf5,0x8c,0xf5,0x8a,
+0x22,0x30,0x03,0x07,0xb2,0x04,0x20,0x04,0x02,0x80,0x76,0x30,0x00,0x03,0x02,0x42,
+0x4b,0x20,0x01,0x6e,0xc0,0xd0,0xc0,0x83,0xc0,0x82,0xc0,0xe0,0x20,0x07,0x43,0x30,
+0x08,0x21,0x30,0x09,0x05,0xc2,0x09,0x02,0x41,0x23,0x74,0x01,0x90,0xff,0xe4,0xf0,
+0x90,0xff,0xd2,0x75,0x27,0x00,0x75,0x28,0x00,0xe0,0x30,0xe4,0x06,0xd5,0x27,0xf9,
+0xd5,0x28,0xf6,0x74,0x01,0x90,0xff,0xe4,0xf0,0x90,0xff,0xd2,0x75,0x27,0x00,0x75,
+0x28,0x00,0xe0,0x30,0xe4,0x06,0xd5,0x27,0xf9,0xd5,0x28,0xf6,0x90,0xff,0xe4,0xe0,
+0xf5,0x90,0xe5,0x2a,0xc3,0x94,0x01,0xf5,0x2a,0xe5,0x29,0x94,0x00,0xf5,0x29,0x50,
+0x08,0xc2,0xa9,0x74,0x01,0x90,0xff,0xe5,0xf0,0xd0,0xe0,0xd0,0x82,0xd0,0x83,0xd0,
+0xd0,0x32,0xc0,0xd0,0xc0,0x82,0xc0,0x83,0xc0,0xe0,0x30,0x05,0x36,0x74,0x01,0x90,
+0xff,0xe4,0xf0,0x90,0xff,0xd2,0x75,0x27,0x00,0x75,0x28,0x00,0xe0,0x30,0xe4,0x06,
+0xd5,0x27,0xf9,0xd5,0x28,0xf6,0x90,0xff,0xe4,0xe0,0xf5,0x2b,0xe5,0x2a,0xc3,0x94,
+0x01,0xf5,0x2a,0xe5,0x29,0x94,0x00,0xf5,0x29,0x50,0x08,0xc2,0xa9,0x74,0x01,0x90,
+0xff,0xe5,0xf0,0x30,0x06,0x0e,0x85,0x2b,0x2c,0x75,0x2d,0x01,0x85,0x2b,0x90,0xc2,
+0x06,0x02,0x42,0x3a,0xb2,0x05,0xe5,0x2b,0xc4,0xf5,0x2b,0x85,0x2d,0x2f,0xe5,0x2d,
+0xc3,0x33,0xf5,0x2e,0xe5,0x2b,0x30,0xe0,0x06,0xe5,0x2f,0x25,0x2e,0xf5,0x2f,0xe5,
+0x2e,0xc3,0x33,0xf5,0x2e,0xe5,0x2b,0x30,0xe1,0x06,0xe5,0x2f,0x25,0x2e,0xf5,0x2f,
+0xe5,0x2e,0xc3,0x33,0xf5,0x2e,0xe5,0x2b,0x30,0xe2,0x06,0xe5,0x2f,0x25,0x2e,0xf5,
+0x2f,0xe5,0x2b,0x30,0xe3,0x11,0xe5,0x2f,0xc3,0x13,0xc3,0xc5,0x2c,0x95,0x2c,0x50,
+0x02,0x74,0x00,0xf5,0x2c,0x80,0x0c,0xe5,0x2f,0xc3,0x13,0x25,0x2c,0x50,0x02,0x74,
+0xff,0xf5,0x2c,0xe5,0x2b,0x54,0x07,0x24,0x29,0x83,0x30,0xe0,0x06,0xe5,0x2d,0xc3,
+0x13,0x80,0x07,0x30,0xe1,0x11,0xe5,0x2d,0xc3,0x33,0x70,0x02,0x74,0x01,0xb4,0x09,
+0x00,0x40,0x02,0x74,0x08,0xf5,0x2d,0x85,0x2c,0x90,0xd0,0xe0,0xd0,0x83,0xd0,0x82,
+0xd0,0xd0,0x32,0x01,0x00,0x00,0x00,0x00,0x02,0x02,0x02,0xc0,0xd0,0xc0,0x83,0xc0,
+0x82,0xc0,0xe0,0x90,0xff,0xe1,0xe4,0xf0,0x74,0x01,0x90,0xff,0xe4,0xf0,0xe5,0x2a,
+0xc3,0x94,0x01,0xf5,0x2a,0xe5,0x29,0x94,0x00,0xf5,0x29,0x50,0x08,0xc2,0xa9,0x74,
+0x01,0x90,0xff,0xe5,0xf0,0xd0,0xe0,0xd0,0x82,0xd0,0x83,0xd0,0xd0,0x32,0x90,0x01,
+0x00,0xe4,0xf0,0xa3,0xf0,0xe4,0xf5,0x30,0xf5,0x31,0xf5,0x32,0xf5,0x33,0xe4,0xf5,
+0x34,0xf5,0x35,0xf5,0x36,0xf5,0x37,0xe4,0xf5,0x3c,0xf5,0x3d,0xf5,0x3e,0xf5,0x3f,
+0xe4,0xf5,0x38,0xf5,0x39,0xf5,0x3a,0xf5,0x3b,0xc2,0x14,0xc2,0x15,0xc2,0x16,0x90,
+0x42,0x08,0xe0,0xb4,0x41,0x07,0xa3,0xe0,0xb4,0x50,0x02,0x80,0x1d,0x90,0x42,0x08,
+0x74,0x41,0xf0,0xa3,0x74,0x50,0xf0,0x90,0x42,0x01,0x74,0x0a,0xf0,0xc2,0x10,0xd2,
+0x11,0xc2,0x12,0xd2,0x13,0x90,0x42,0x00,0xe4,0xf0,0xe4,0x90,0x42,0x02,0xf0,0x90,
+0x42,0x03,0xf0,0x90,0x00,0x00,0x12,0x0e,0x40,0x90,0xff,0xd0,0xe0,0x90,0xff,0xd1,
+0xe0,0x90,0xff,0xe0,0xe0,0x90,0xff,0xe4,0xe0,0xd2,0xaa,0xd2,0xaf,0x30,0x16,0x18,
+0xc2,0x16,0x90,0x00,0x00,0x12,0x32,0x09,0xc2,0xaf,0x85,0x3a,0x38,0x85,0x3b,0x39,
+0x85,0x32,0x30,0x85,0x33,0x31,0xd2,0xaf,0x30,0x11,0x36,0x90,0xff,0xd2,0xe0,0x30,
+0xe6,0x2f,0xe5,0x3d,0xb5,0x3f,0x08,0xe5,0x3c,0xb5,0x3e,0x03,0xc3,0x80,0x1c,0xe5,
+0x3c,0x24,0x00,0xf5,0x82,0x74,0x32,0x35,0x3d,0xf5,0x83,0xe5,0x3c,0x24,0x01,0xf5,
+0x3c,0xe5,0x3d,0x34,0x00,0x54,0x0f,0xf5,0x3d,0xe0,0xd3,0x50,0x04,0x90,0xff,0xd0,
+0xf0,0xe5,0x39,0xb5,0x3b,0x08,0xe5,0x38,0xb5,0x3a,0x03,0xc3,0x80,0x1c,0xe5,0x38,
+0x24,0x00,0xf5,0x82,0x74,0x22,0x35,0x39,0xf5,0x83,0xe5,0x38,0x24,0x01,0xf5,0x38,
+0xe5,0x39,0x34,0x00,0x54,0x0f,0xf5,0x39,0xe0,0xd3,0x50,0x14,0x30,0x13,0x0b,0xc0,
+0xe0,0xfb,0x90,0x00,0x01,0x12,0x19,0x59,0xd0,0xe0,0x30,0x12,0x03,0x12,0x44,0x00,
+0xe5,0x31,0xb5,0x33,0x08,0xe5,0x30,0xb5,0x32,0x03,0xc3,0x80,0x1c,0xe5,0x30,0x24,
+0x00,0xf5,0x82,0x74,0x02,0x35,0x31,0xf5,0x83,0xe5,0x30,0x24,0x01,0xf5,0x30,0xe5,
+0x31,0x34,0x00,0x54,0x0f,0xf5,0x31,0xe0,0xd3,0x50,0x42,0x30,0x10,0x0b,0xc0,0xe0,
+0xfb,0x90,0x00,0x01,0x12,0x19,0x59,0xd0,0xe0,0x30,0x11,0x31,0xf5,0xf0,0xe5,0x3e,
+0x24,0x01,0xf5,0x42,0xe5,0x3f,0x34,0x00,0x54,0x0f,0xf5,0x43,0xb5,0x3d,0x08,0xe5,
+0x42,0xb5,0x3c,0x03,0xd3,0x80,0x16,0x74,0x00,0x25,0x3e,0xf5,0x82,0x74,0x32,0x35,
+0x3f,0xf5,0x83,0xe5,0xf0,0xf0,0x85,0x42,0x3e,0x85,0x43,0x3f,0xc3,0x02,0x42,0xfd,
+0xc2,0xaf,0x20,0x14,0x06,0xf5,0x99,0xd2,0x14,0x80,0x31,0xf5,0xf0,0xe5,0x36,0x24,
+0x01,0xf5,0x42,0xe5,0x37,0x34,0x00,0x54,0x0f,0xf5,0x43,0xb5,0x35,0x08,0xe5,0x42,
+0xb5,0x34,0x03,0xd3,0x80,0x16,0x74,0x00,0x25,0x36,0xf5,0x82,0x74,0x12,0x35,0x37,
+0xf5,0x83,0xe5,0xf0,0xf0,0x85,0x42,0x36,0x85,0x43,0x37,0xc3,0xd2,0xaf,0x22,0xc0,
+0xd0,0xc0,0xe0,0xc0,0xf0,0xc0,0x83,0xc0,0x82,0x90,0xff,0xd2,0xe0,0x20,0xe4,0x12,
+0x90,0xff,0xe2,0xe0,0x20,0xe0,0x06,0x90,0xff,0xe4,0xe0,0x80,0x63,0x12,0x3d,0x3b,
+0x80,0x5e,0x30,0xe7,0x4f,0x90,0xff,0xd0,0xe0,0xf5,0xf0,0xe5,0x3a,0x24,0x01,0xf5,
+0x40,0xe5,0x3b,0x34,0x00,0x54,0x0f,0xf5,0x41,0xb5,0x39,0x08,0xe5,0x40,0xb5,0x38,
+0x03,0xd3,0x80,0x16,0x74,0x00,0x25,0x3a,0xf5,0x82,0x74,0x22,0x35,0x3b,0xf5,0x83,
+0xe5,0xf0,0xf0,0x85,0x40,0x3a,0x85,0x41,0x3b,0xc3,0x50,0x24,0xd2,0x16,0x85,0x3a,
+0x38,0x85,0x3b,0x39,0x90,0x42,0x0b,0xe0,0x24,0x01,0xf0,0x90,0x42,0x0a,0xe0,0x34,
+0x00,0xf0,0x80,0x0c,0x30,0xe5,0x09,0x90,0xff,0xd1,0xe0,0xf5,0xf0,0x12,0x45,0x50,
+0xd0,0x82,0xd0,0x83,0xd0,0xf0,0xd0,0xe0,0xd0,0xd0,0x32,0xc0,0xd0,0xc0,0xe0,0xc0,
+0xf0,0xc0,0x83,0xc0,0x82,0x30,0x99,0x35,0xc2,0x99,0xe5,0x35,0xb5,0x37,0x08,0xe5,
+0x34,0xb5,0x36,0x03,0xc3,0x80,0x1c,0xe5,0x34,0x24,0x00,0xf5,0x82,0x74,0x12,0x35,
+0x35,0xf5,0x83,0xe5,0x34,0x24,0x01,0xf5,0x34,0xe5,0x35,0x34,0x00,0x54,0x0f,0xf5,
+0x35,0xe0,0xd3,0x50,0x06,0xf5,0x99,0xd2,0x14,0x80,0x02,0xc2,0x14,0x30,0x98,0x35,
+0xe5,0x99,0xc2,0x98,0xf5,0xf0,0xe5,0x32,0x24,0x01,0xf5,0x40,0xe5,0x33,0x34,0x00,
+0x54,0x0f,0xf5,0x41,0xb5,0x31,0x08,0xe5,0x40,0xb5,0x30,0x03,0xd3,0x80,0x16,0x74,
+0x00,0x25,0x32,0xf5,0x82,0x74,0x02,0x35,0x33,0xf5,0x83,0xe5,0xf0,0xf0,0x85,0x40,
+0x32,0x85,0x41,0x33,0xc3,0xd0,0x82,0xd0,0x83,0xd0,0xf0,0xd0,0xe0,0xd0,0xd0,0x32,
+0x20,0x15,0x06,0x90,0xff,0xd0,0x74,0xfe,0xf0,0x90,0x42,0x03,0xe0,0xb4,0x00,0x4e,
+0x90,0x42,0x02,0xe0,0x70,0x1b,0xe5,0xf0,0xb4,0x3f,0x05,0xd2,0x15,0x02,0x47,0x47,
+0xb4,0xff,0x05,0xc2,0x15,0x02,0x47,0x47,0xb4,0xb9,0x05,0xd2,0x16,0x02,0x47,0x47,
+0xe0,0x24,0xca,0xf5,0x82,0x74,0x94,0x34,0x00,0xf5,0x83,0xe0,0xc3,0x95,0xf0,0x60,
+0x08,0x90,0x42,0x02,0xe4,0xf0,0x02,0x47,0x47,0x90,0x42,0x02,0xe0,0x04,0xf0,0x24,
+0xf8,0x70,0x08,0xe4,0xf0,0x90,0x42,0x03,0x74,0x01,0xf0,0x02,0x47,0x47,0xb4,0x01,
+0x74,0x90,0x42,0x03,0xe5,0xf0,0xb4,0x00,0x06,0x74,0x02,0xf0,0x02,0x47,0x47,0xb4,
+0x01,0x06,0x74,0x03,0xf0,0x02,0x47,0x47,0xb4,0x02,0x06,0x74,0x04,0xf0,0x02,0x47,
+0x47,0xb4,0x03,0x1d,0x90,0x42,0x0a,0x74,0x00,0xf0,0xa3,0xf0,0x90,0x42,0x04,0x74,
+0x42,0xf0,0xa3,0x74,0x01,0xf0,0x90,0x42,0x06,0xe4,0xf0,0xa3,0x04,0xf0,0x02,0x46,
+0xb7,0xb4,0x04,0x15,0x90,0x42,0x04,0x74,0x42,0xf0,0xa3,0x74,0x00,0xf0,0x90,0x42,
+0x06,0xe4,0xf0,0xa3,0x04,0xf0,0x02,0x46,0xb7,0xb4,0x05,0x16,0x90,0x42,0x04,0x74,
+0x94,0xf0,0xa3,0x74,0xca,0xf0,0x90,0x42,0x06,0xe4,0xf0,0xa3,0x74,0x0a,0xf0,0x02,
+0x46,0xb7,0x02,0x47,0x42,0xb4,0x02,0x27,0xc2,0x10,0xc2,0x11,0xc2,0x12,0xc2,0x13,
+0xe5,0xf0,0x54,0x0f,0x90,0x42,0x01,0xf0,0x30,0xe0,0x02,0xd2,0x10,0x30,0xe1,0x02,
+0xd2,0x11,0x30,0xe2,0x02,0xd2,0x12,0x30,0xe3,0x02,0xd2,0x13,0x02,0x47,0x42,0xb4,
+0x03,0x10,0xe5,0xf0,0x70,0x03,0xe4,0x80,0x02,0x74,0x01,0x90,0x42,0x00,0xf0,0x02,
+0x47,0x42,0xb4,0x04,0x0f,0xe5,0xf0,0x90,0x42,0x04,0xf0,0x90,0x42,0x03,0x74,0x05,
+0xf0,0x02,0x47,0x47,0xb4,0x05,0x0f,0xe5,0xf0,0x90,0x42,0x05,0xf0,0x90,0x42,0x03,
+0x74,0x06,0xf0,0x02,0x47,0x47,0xb4,0x06,0x0f,0xe5,0xf0,0x90,0x42,0x06,0xf0,0x90,
+0x42,0x03,0x74,0x07,0xf0,0x02,0x47,0x47,0xb4,0x07,0x0f,0xe5,0xf0,0x90,0x42,0x07,
+0xf0,0x90,0x42,0x03,0x74,0x08,0xf0,0x02,0x47,0x47,0xb4,0x08,0x07,0xe5,0xf0,0x60,
+0x06,0x02,0x47,0x09,0x02,0x47,0x42,0xc0,0x00,0xc0,0x01,0xc0,0x02,0xc0,0x03,0x90,
+0x42,0x06,0xe0,0x04,0xf8,0xa3,0xe0,0x04,0xf9,0x90,0x42,0x04,0xe0,0xc0,0xe0,0xa3,
+0xe0,0xc0,0xe0,0x02,0x46,0xf6,0x7a,0xc4,0x7b,0x51,0x90,0xff,0xd2,0xe0,0x20,0xe6,
+0x07,0xdb,0xfa,0xda,0xf8,0x02,0x46,0xfa,0xd0,0x82,0xd0,0x83,0xe0,0xa3,0xc0,0x83,
+0xc0,0x82,0x90,0xff,0xd0,0xf0,0xd9,0xde,0xd8,0xdc,0xd0,0xe0,0xd0,0xe0,0xd0,0x03,
+0xd0,0x02,0xd0,0x01,0xd0,0x00,0x02,0x47,0x42,0xc0,0x00,0xc0,0x01,0xc0,0x02,0xc0,
+0x03,0x90,0x42,0x07,0xe0,0x04,0xf9,0x90,0x42,0x05,0xe0,0xf8,0x80,0x17,0x7a,0xc4,
+0x7b,0x51,0x90,0xff,0xd2,0xe0,0x20,0xe6,0x06,0xdb,0xfa,0xda,0xf8,0x80,0x08,0xe6,
+0x08,0x90,0xff,0xd0,0xf0,0xd9,0xe7,0xd0,0x03,0xd0,0x02,0xd0,0x01,0xd0,0x00,0x02,
+0x47,0x42,0x90,0x42,0x03,0xe4,0xf0,0x22,0xa5,0x69,0x5a,0x96,0xa4,0x68,0x5b,0x97,
+0xa7,0x6b,0x58,0x94,0xa6,0x6a,0x59,0x95,0xa1,0x6d,0x5e,0x92,0xa0,0x6c,0x5f,0x93,
+0xa3,0x6f,0x5c,0x90,0xa2,0x6e,0x5d,0x91,0xad,0x61,0x52,0x9e,0xac,0x60,0x53,0x9f,
+0xaf,0x63,0x50,0x9c,0xae,0x62,0x51,0x9d,0xa9,0x65,0x56,0x9a,0xa8,0x64,0x57,0x9b,
+0xab,0x67,0x54,0x98,0xaa,0x66,0x55,0x99,0xb5,0x79,0x4a,0x86,0xb4,0x78,0x4b,0x87,
+0xb7,0x7b,0x48,0x84,0xb6,0x7a,0x49,0x85,0xb1,0x7d,0x4e,0x82,0xb0,0x7c,0x4f,0x83,
+0xb3,0x7f,0x4c,0x80,0xb2,0x7e,0x4d,0x81,0xbd,0x71,0x42,0x8e,0xbc,0x70,0x43,0x8f,
+0xbf,0x73,0x40,0x8c,0xbe,0x72,0x41,0x8d,0xb9,0x75,0x46,0x8a,0xb8,0x74,0x47,0x8b,
+0xbb,0x77,0x44,0x88,0xba,0x76,0x45,0x89,0x85,0x49,0x7a,0xb6,0x84,0x48,0x7b,0xb7,
+0x87,0x4b,0x78,0xb4,0x86,0x4a,0x79,0xb5,0x81,0x4d,0x7e,0xb2,0x80,0x4c,0x7f,0xb3,
+0x83,0x4f,0x7c,0xb0,0x82,0x4e,0x7d,0xb1,0x8d,0x41,0x72,0xbe,0x8c,0x40,0x73,0xbf,
+0x8f,0x43,0x70,0xbc,0x8e,0x42,0x71,0xbd,0x89,0x45,0x76,0xba,0x88,0x44,0x77,0xbb,
+0x8b,0x47,0x74,0xb8,0x8a,0x46,0x75,0xb9,0x95,0x59,0x6a,0xa6,0x94,0x58,0x6b,0xa7,
+0x97,0x5b,0x68,0xa4,0x96,0x5a,0x69,0xa5,0x91,0x5d,0x6e,0xa2,0x90,0x5c,0x6f,0xa3,
+0x93,0x5f,0x6c,0xa0,0x92,0x5e,0x6d,0xa1,0x9d,0x51,0x62,0xae,0x9c,0x50,0x63,0xaf,
+0x9f,0x53,0x60,0xac,0x9e,0x52,0x61,0xad,0x99,0x55,0x66,0xaa,0x98,0x54,0x67,0xab,
+0x9b,0x57,0x64,0xa8,0x9a,0x56,0x65,0xa9,0xe5,0x29,0x1a,0xd6,0xe4,0x28,0x1b,0xd7,
+0xe7,0x2b,0x18,0xd4,0xe6,0x2a,0x19,0xd5,0xe1,0x2d,0x1e,0xd2,0xe0,0x2c,0x1f,0xd3,
+0xe3,0x2f,0x1c,0xd0,0xe2,0x2e,0x1d,0xd1,0xed,0x21,0x12,0xde,0xec,0x20,0x13,0xdf,
+0xef,0x23,0x10,0xdc,0xee,0x22,0x11,0xdd,0xe9,0x25,0x16,0xda,0xe8,0x24,0x17,0xdb,
+0xeb,0x27,0x14,0xd8,0xea,0x26,0x15,0xd9,0xf5,0x39,0x0a,0xc6,0xf4,0x38,0x0b,0xc7,
+0xf7,0x3b,0x08,0xc4,0xf6,0x3a,0x09,0xc5,0xf1,0x3d,0x0e,0xc2,0xf0,0x3c,0x0f,0xc3,
+0xf3,0x3f,0x0c,0xc0,0xf2,0x3e,0x0d,0xc1,0xfd,0x31,0x02,0xce,0xfc,0x30,0x03,0xcf,
+0xff,0x33,0x00,0xcc,0xfe,0x32,0x01,0xcd,0xf9,0x35,0x06,0xca,0xf8,0x34,0x07,0xcb,
+0xfb,0x37,0x04,0xc8,0xfa,0x36,0x05,0xc9,0xc5,0x09,0x3a,0xf6,0xc4,0x08,0x3b,0xf7,
+0xc7,0x0b,0x38,0xf4,0xc6,0x0a,0x39,0xf5,0xc1,0x0d,0x3e,0xf2,0xc0,0x0c,0x3f,0xf3,
+0xc3,0x0f,0x3c,0xf0,0xc2,0x0e,0x3d,0xf1,0xcd,0x01,0x32,0xfe,0xcc,0x00,0x33,0xff,
+0xcf,0x03,0x30,0xfc,0xce,0x02,0x31,0xfd,0xc9,0x05,0x36,0xfa,0xc8,0x04,0x37,0xfb,
+0xcb,0x07,0x34,0xf8,0xca,0x06,0x35,0xf9,0xd5,0x19,0x2a,0xe6,0xd4,0x18,0x2b,0xe7,
+0xd7,0x1b,0x28,0xe4,0xd6,0x1a,0x29,0xe5,0xd1,0x1d,0x2e,0xe2,0xd0,0x1c,0x2f,0xe3,
+0xd3,0x1f,0x2c,0xe0,0xd2,0x1e,0x2d,0xe1,0xdd,0x11,0x22,0xee,0xdc,0x10,0x23,0xef,
+0xdf,0x13,0x20,0xec,0xde,0x12,0x21,0xed,0xd9,0x15,0x26,0xea,0xd8,0x14,0x27,0xeb,
+0xdb,0x17,0x24,0xe8,0xda,0x16,0x25,0xe9,0x25,0xe9,0xda,0x16,0x24,0xe8,0xdb,0x17,
+0x27,0xeb,0xd8,0x14,0x26,0xea,0xd9,0x15,0x21,0xed,0xde,0x12,0x20,0xec,0xdf,0x13,
+0x23,0xef,0xdc,0x10,0x22,0xee,0xdd,0x11,0x2d,0xe1,0xd2,0x1e,0x2c,0xe0,0xd3,0x1f,
+0x2f,0xe3,0xd0,0x1c,0x2e,0xe2,0xd1,0x1d,0x29,0xe5,0xd6,0x1a,0x28,0xe4,0xd7,0x1b,
+0x2b,0xe7,0xd4,0x18,0x2a,0xe6,0xd5,0x19,0x35,0xf9,0xca,0x06,0x34,0xf8,0xcb,0x07,
+0x37,0xfb,0xc8,0x04,0x36,0xfa,0xc9,0x05,0x31,0xfd,0xce,0x02,0x30,0xfc,0xcf,0x03,
+0x33,0xff,0xcc,0x00,0x32,0xfe,0xcd,0x01,0x3d,0xf1,0xc2,0x0e,0x3c,0xf0,0xc3,0x0f,
+0x3f,0xf3,0xc0,0x0c,0x3e,0xf2,0xc1,0x0d,0x39,0xf5,0xc6,0x0a,0x38,0xf4,0xc7,0x0b,
+0x3b,0xf7,0xc4,0x08,0x3a,0xf6,0xc5,0x09,0x05,0xc9,0xfa,0x36,0x04,0xc8,0xfb,0x37,
+0x07,0xcb,0xf8,0x34,0x06,0xca,0xf9,0x35,0x01,0xcd,0xfe,0x32,0x00,0xcc,0xff,0x33,
+0x03,0xcf,0xfc,0x30,0x02,0xce,0xfd,0x31,0x0d,0xc1,0xf2,0x3e,0x0c,0xc0,0xf3,0x3f,
+0x0f,0xc3,0xf0,0x3c,0x0e,0xc2,0xf1,0x3d,0x09,0xc5,0xf6,0x3a,0x08,0xc4,0xf7,0x3b,
+0x0b,0xc7,0xf4,0x38,0x0a,0xc6,0xf5,0x39,0x15,0xd9,0xea,0x26,0x14,0xd8,0xeb,0x27,
+0x17,0xdb,0xe8,0x24,0x16,0xda,0xe9,0x25,0x11,0xdd,0xee,0x22,0x10,0xdc,0xef,0x23,
+0x13,0xdf,0xec,0x20,0x12,0xde,0xed,0x21,0x1d,0xd1,0xe2,0x2e,0x1c,0xd0,0xe3,0x2f,
+0x1f,0xd3,0xe0,0x2c,0x1e,0xd2,0xe1,0x2d,0x19,0xd5,0xe6,0x2a,0x18,0xd4,0xe7,0x2b,
+0x1b,0xd7,0xe4,0x28,0x1a,0xd6,0xe5,0x29,0x65,0xa9,0x9a,0x56,0x64,0xa8,0x9b,0x57,
+0x67,0xab,0x98,0x54,0x66,0xaa,0x99,0x55,0x61,0xad,0x9e,0x52,0x60,0xac,0x9f,0x53,
+0x63,0xaf,0x9c,0x50,0x62,0xae,0x9d,0x51,0x6d,0xa1,0x92,0x5e,0x6c,0xa0,0x93,0x5f,
+0x6f,0xa3,0x90,0x5c,0x6e,0xa2,0x91,0x5d,0x69,0xa5,0x96,0x5a,0x68,0xa4,0x97,0x5b,
+0x6b,0xa7,0x94,0x58,0x6a,0xa6,0x95,0x59,0x75,0xb9,0x8a,0x46,0x74,0xb8,0x8b,0x47,
+0x77,0xbb,0x88,0x44,0x76,0xba,0x89,0x45,0x71,0xbd,0x8e,0x42,0x70,0xbc,0x8f,0x43,
+0x73,0xbf,0x8c,0x40,0x72,0xbe,0x8d,0x41,0x7d,0xb1,0x82,0x4e,0x7c,0xb0,0x83,0x4f,
+0x7f,0xb3,0x80,0x4c,0x7e,0xb2,0x81,0x4d,0x79,0xb5,0x86,0x4a,0x78,0xb4,0x87,0x4b,
+0x7b,0xb7,0x84,0x48,0x7a,0xb6,0x85,0x49,0x45,0x89,0xba,0x76,0x44,0x88,0xbb,0x77,
+0x47,0x8b,0xb8,0x74,0x46,0x8a,0xb9,0x75,0x41,0x8d,0xbe,0x72,0x40,0x8c,0xbf,0x73,
+0x43,0x8f,0xbc,0x70,0x42,0x8e,0xbd,0x71,0x4d,0x81,0xb2,0x7e,0x4c,0x80,0xb3,0x7f,
+0x4f,0x83,0xb0,0x7c,0x4e,0x82,0xb1,0x7d,0x49,0x85,0xb6,0x7a,0x48,0x84,0xb7,0x7b,
+0x4b,0x87,0xb4,0x78,0x4a,0x86,0xb5,0x79,0x55,0x99,0xaa,0x66,0x54,0x98,0xab,0x67,
+0x57,0x9b,0xa8,0x64,0x56,0x9a,0xa9,0x65,0x51,0x9d,0xae,0x62,0x50,0x9c,0xaf,0x63,
+0x53,0x9f,0xac,0x60,0x52,0x9e,0xad,0x61,0x5d,0x91,0xa2,0x6e,0x5c,0x90,0xa3,0x6f,
+0x5f,0x93,0xa0,0x6c,0x5e,0x92,0xa1,0x6d,0x59,0x95,0xa6,0x6a,0x58,0x94,0xa7,0x6b,
+0x5b,0x97,0xa4,0x68,0x5a,0x96,0xa5,0x69,0x40,0x41,0x3e,0x3f,0x3c,0x3d,0x3a,0x3b,
+0x48,0x49,0x46,0x47,0x44,0x45,0x42,0x43,0x30,0x31,0x2e,0x2f,0x2c,0x2d,0x2a,0x2b,
+0x38,0x39,0x36,0x37,0x34,0x35,0x32,0x33,0x60,0x61,0x5e,0x5f,0x5c,0x5d,0x5a,0x5b,
+0x68,0x69,0x66,0x67,0x64,0x65,0x62,0x63,0x50,0x51,0x4e,0x4f,0x4c,0x4d,0x4a,0x4b,
+0x58,0x59,0x56,0x57,0x54,0x55,0x52,0x53,0x80,0x81,0x7e,0x7f,0x7c,0x7d,0x7a,0x7b,
+0x88,0x89,0x86,0x87,0x84,0x85,0x82,0x83,0x70,0x71,0x6e,0x6f,0x6c,0x6d,0x6a,0x6b,
+0x78,0x79,0x76,0x77,0x74,0x75,0x72,0x73,0xa0,0xa1,0x9e,0x9f,0x9c,0x9d,0x9a,0x9b,
+0xa8,0xa9,0xa6,0xa7,0xa4,0xa5,0xa2,0xa3,0x90,0x91,0x8e,0x8f,0x8c,0x8d,0x8a,0x8b,
+0x98,0x99,0x96,0x97,0x94,0x95,0x92,0x93,0xc0,0xc1,0xbe,0xbf,0xbc,0xbd,0xba,0xbb,
+0xc8,0xc9,0xc6,0xc7,0xc4,0xc5,0xc2,0xc3,0xb0,0xb1,0xae,0xaf,0xac,0xad,0xaa,0xab,
+0xb8,0xb9,0xb6,0xb7,0xb4,0xb5,0xb2,0xb3,0xe0,0xe1,0xde,0xdf,0xdc,0xdd,0xda,0xdb,
+0xe8,0xe9,0xe6,0xe7,0xe4,0xe5,0xe2,0xe3,0xd0,0xd1,0xce,0xcf,0xcc,0xcd,0xca,0xcb,
+0xd8,0xd9,0xd6,0xd7,0xd4,0xd5,0xd2,0xd3,0x00,0x01,0xfe,0xff,0xfc,0xfd,0xfa,0xfb,
+0x08,0x09,0x06,0x07,0x04,0x05,0x02,0x03,0xf0,0xf1,0xee,0xef,0xec,0xed,0xea,0xeb,
+0xf8,0xf9,0xf6,0xf7,0xf4,0xf5,0xf2,0xf3,0x20,0x21,0x1e,0x1f,0x1c,0x1d,0x1a,0x1b,
+0x28,0x29,0x26,0x27,0x24,0x25,0x22,0x23,0x10,0x11,0x0e,0x0f,0x0c,0x0d,0x0a,0x0b,
+0x18,0x19,0x16,0x17,0x14,0x15,0x12,0x13,0x75,0x44,0x00,0xd2,0x02,0x22,0x30,0x02,
+0x0b,0x90,0x4b,0x48,0x93,0xc2,0x02,0xf5,0x45,0x02,0x4c,0x82,0x75,0xf0,0x00,0xc3,
+0x33,0xc5,0xf0,0x33,0xc5,0xf0,0xc3,0x33,0xc5,0xf0,0x33,0xc5,0xf0,0x24,0x48,0xf5,
+0x82,0xe5,0xf0,0x34,0x47,0xf5,0x83,0xe5,0x44,0x54,0x03,0x93,0x25,0x45,0xf5,0x45,
+0x05,0x44,0x22,0xff,0xc0,0x01,0x30,0x10,0x00,0xcb,0x80,0xba,0x3c,0x3d,0x00,0x00,
+0x0b,0x38,0xc9,0x1c,0x0c,0xa0,0x00,0x00,0x00,0x20,0xc4,0x82,0xcf,0x3c,0x42,0x00,
+0x00,0x1f,0x00,0x97,0x19,0x09,0xa0,0x00,0x00,0x00,0x28,0xc4,0x86,0xd1,0x3c,0x7f,
+0x00,0x00,0x15,0x00,0x61,0x01,0x07,0xa0,0x00,0x00,0x00,0x20,0xc4,0x82,0xd0,0x3c,
+0x42,0x00,0x00,0x15,0x00,0xf7,0x19,0x09,0xa0,0x00,0x00,0x00,0x28,0xc4,0x86,0xd0,
+0x3c,0x42,0x00,0x00,0x15,0x00,0x81,0x01,0x07,0xa0,0x00,0x00,0x00,0x00,0xc3,0x80,
+0xc7,0x3c,0x6f,0x00,0x00,0x15,0x00,0xf0,0x00,0x09,0xa0,0x00,0x00,0x00,0x00,0xd1,
+0x82,0xcc,0x3c,0x0a,0x00,0x00,0x29,0x00,0xf0,0x05,0x05,0xa0,0x00,0x00,0x00,0x00,
+0xd2,0x82,0xbe,0x3c,0x77,0x00,0x00,0x33,0x00,0xf0,0x00,0x09,0xa0,0x00,0x00,0x00,
+0x00,0x11,0x82,0xce,0x3c,0x42,0x00,0x00,0x15,0x00,0xf0,0x16,0x06,0xa0,0x00,0x00,
+0x00,0x00,0xd2,0x82,0xca,0x3c,0x74,0x00,0x00,0x29,0x00,0xf0,0x00,0x06,0xa0,0x00,
+0x00,0x00,0x00,0x11,0x82,0xcc,0x3c,0x42,0x00,0x00,0x15,0x00,0xf0,0x16,0x06,0xa0,
+0x00,0x00,0x00,0x00,0x11,0x82,0xca,0x3c,0x52,0x00,0x00,0x15,0x00,0xf0,0x00,0x06,
+0xa0,0x00,0x00,0x00,0x00,0xd2,0x82,0xca,0x3c,0x74,0x00,0x00,0x29,0x00,0xf0,0x00,
+0x06,0xa0,0x00,0x00,0x00,0x00,0xd1,0x82,0xca,0x3c,0x0a,0x00,0x00,0x29,0x00,0xf0,
+0x05,0x05,0xa0,0x00,0xf0,0x00,0x00,0x0a,0x82,0xca,0x3c,0x73,0x00,0x00,0x29,0x00,
+0xf0,0x00,0x09,0xa0,0x00,0x00,0x00,0x00,0xd1,0x82,0xc8,0x3c,0x0a,0x00,0x00,0x23,
+0x00,0xf0,0x07,0x07,0xa0,0x00,0xc0,0x00,0x00,0xc8,0x82,0xcb,0x3c,0x52,0x00,0x00,
+0x29,0x00,0xf6,0x16,0x06,0xa0,0x00,0x20,0x00,0x00,0x79,0x82,0xbc,0x3c,0x50,0x00,
+0x00,0x1f,0x00,0xf5,0x19,0x09,0xa0,0x00,0xd0,0x00,0x00,0xc8,0x82,0xc8,0x3c,0x52,
+0x00,0x00,0x29,0x00,0xf6,0x16,0x06,0xa0,0x00,0x20,0x00,0x00,0x7b,0x82,0xbd,0x3c,
+0x57,0x00,0x00,0x29,0x00,0xf0,0x00,0x09,0xa0,0x00,0xe0,0x00,0x00,0xc8,0x82,0xc2,
+0x3c,0x52,0x00,0x00,0x29,0x00,0xf6,0x16,0x06,0xa0,0x00,0x20,0x00,0x00,0x7a,0x82,
+0xc0,0x3c,0x7a,0x00,0x00,0x29,0x00,0xf0,0x00,0x05,0xa0,0x00,0x20,0x00,0x00,0xc7,
+0x82,0xc3,0x3c,0x01,0x00,0x00,0x1f,0x00,0xf6,0x17,0x07,0xa0,0x00,0x30,0x00,0x00,
+0xc7,0x82,0xc0,0x3c,0x52,0x00,0x00,0x1f,0x00,0xf6,0x17,0x07,0xa0,0x00,0x20,0x00,
+0x00,0x31,0x88,0xca,0x3c,0x6b,0x00,0x00,0x15,0x00,0xf0,0x05,0x05,0xa0,0x00,0x40,
+0x00,0x00,0xc7,0x82,0xbc,0x3c,0x52,0x00,0x00,0x1f,0x00,0xf6,0x17,0x07,0xa0,0x00,
+0xe0,0x00,0x00,0x2e,0x84,0xca,0x3c,0x67,0x00,0x00,0x15,0x00,0xf0,0x05,0x05,0xa0,
+0x00,0xe0,0x00,0x00,0x7a,0x84,0xd4,0x3c,0x01,0x00,0x00,0x15,0x00,0xf2,0x15,0x05,
+0xa0,0x00,0xd0,0x00,0x00,0x21,0x84,0xc9,0x3c,0x6a,0x00,0x00,0x29,0x00,0xf0,0x05,
+0x05,0xa0,0x00,0x10,0x00,0x00,0x25,0x82,0xc4,0x3c,0x6b,0x00,0x00,0x1f,0x00,0xf0,
+0x00,0x09,0xa0,0x00,0xf0,0x00,0x00,0x31,0x86,0xc3,0x3c,0x67,0x00,0x00,0x15,0x00,
+0xf5,0x16,0x06,0xa0,0x00,0x20,0x00,0x00,0x1d,0x80,0xca,0x3c,0x6b,0x00,0x00,0x1f,
+0x00,0xf0,0x00,0x09,0xa0,0x00,0x43,0x6f,0x70,0x79,0x72,0x69,0x67,0x68,0x74,0x20,
+0x59,0x41,0x4d,0x41,0x48,0x41,0x00,0xe0,0x00,0x00,0x31,0x88,0xc8,0x3c,0x67,0x00,
+0x00,0x15,0x00,0xf4,0x16,0x06,0xa0,0x00,0xc0,0x00,0x00,0x9d,0x84,0xc9,0x3c,0x0a,
+0x00,0x00,0x1f,0x00,0xf4,0x17,0x07,0xa0,0x00,0xe0,0x00,0x00,0x2e,0x84,0xc8,0x3c,
+0x73,0x00,0x00,0x15,0x00,0xf0,0x06,0x06,0xa0,0x00,0x40,0x00,0x00,0x1c,0x82,0xc7,
+0x3c,0x61,0x00,0x00,0x15,0x00,0xf0,0x00,0x09,0xa0,0x00,0x40,0x00,0x00,0x1c,0x82,
+0xc8,0x3c,0x43,0x00,0x00,0x15,0x00,0xf0,0x00,0x09,0xa0,0x00,0xbd,0x91,0x90,0x87,
+0x8e,0x97,0x99,0x98,0xe0,0xa7,0xbf,0xb3,0xbf,0xb8,0xbf,0xf6,0x00,0xd0,0x00,0x00,
+0x1e,0x82,0xca,0x3c,0x72,0x00,0x00,0x15,0x00,0xf0,0x00,0x09,0xa0,0x00,0xd0,0x00,
+0x00,0x1f,0x82,0xca,0x3c,0x63,0x00,0x00,0x15,0x00,0xf0,0x00,0x09,0xa0,0x00,0xe0,
+0x00,0x00,0x1f,0x82,0xcd,0x3c,0x4f,0x00,0x00,0x15,0x00,0xf0,0x00,0x09,0xa0,0x00,
+0x20,0x00,0x00,0x9c,0x82,0xc9,0x3c,0x6e,0x00,0x00,0x15,0x00,0xf0,0x00,0x09,0xa0,
+0x00,0x20,0x00,0x00,0x9c,0x82,0xcd,0x3c,0x70,0x00,0x00,0x15,0x00,0xf0,0x00,0x09,
+0xa0,0x00,0xc0,0x00,0x00,0x0b,0x80,0xc7,0x3c,0x43,0x00,0x00,0x15,0x00,0xf0,0x00,
+0x09,0xa0,0x00,0xc0,0x00,0x00,0x0b,0x80,0xcb,0x3c,0x13,0x00,0x00,0x15,0x00,0xf0,
+0x00,0x09,0xa0,0x00,0xc0,0x00,0x00,0x2f,0x82,0xc7,0x3c,0x73,0x00,0x00,0x29,0x00,
+0xf0,0x00,0x09,0xa0,0x00,0xc0,0x00,0x00,0x30,0x82,0xc8,0x3c,0x79,0x00,0x00,0x29,
+0x00,0xf0,0x00,0x09,0xa0,0x00,0x40,0x00,0x08,0x44,0x83,0xc9,0x3c,0x67,0x00,0x00,
+0x15,0x00,0xf0,0x00,0x0b,0xa0,0x00,0x40,0x00,0x08,0x44,0x85,0xcc,0x3c,0x4f,0x00,
+0x00,0x15,0x00,0xf0,0x00,0x0b,0xa0,0x00,0x30,0x00,0x00,0x24,0x82,0xba,0x3c,0x48,
+0x00,0x00,0x1f,0x00,0xf0,0x00,0x09,0xa0,0x00,0x30,0x00,0x08,0x24,0x84,0xcc,0x3c,
+0x70,0x00,0x00,0x33,0x00,0xf0,0x00,0x09,0xa0,0x00,0x20,0x00,0x00,0x20,0x80,0xcd,
+0x3c,0x61,0x00,0x00,0x1f,0x00,0xf0,0x00,0x09,0xa0,0x00,0x40,0x00,0x00,0x2c,0x80,
+0xca,0x3c,0x72,0x00,0x00,0x15,0x00,0xf0,0x00,0x09,0xa0,0x00,0x40,0x00,0x00,0x2c,
+0x80,0xd0,0x3c,0x5c,0x00,0x00,0x15,0x00,0xf0,0x00,0x09,0xa0,0x00,0xe0,0x00,0x00,
+0x22,0x82,0xcc,0x3c,0x61,0x00,0x00,0x15,0x00,0xf0,0x00,0x09,0xa0,0x00,0xe0,0x00,
+0x00,0x23,0x82,0xcc,0x3c,0x73,0x00,0x00,0x15,0x00,0xf0,0x00,0x09,0xa0,0x00,0xc0,
+0x00,0x00,0x32,0x80,0xca,0x3c,0x7c,0x00,0x00,0x29,0x00,0xf0,0x08,0x09,0xa0,0x00,
+0xc0,0x00,0x00,0x32,0x84,0xca,0x3c,0x61,0x00,0x00,0x29,0x00,0xf0,0x00,0x09,0xa0,
+0x00,0xf0,0x00,0x00,0x2f,0x82,0xbe,0x3c,0x6f,0x00,0x00,0x29,0x00,0xf0,0x00,0x09,
+0xa0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x46,0xc5,0x46,0xd6,0x46,0xe7,0x46,0xf8,0x47,0x09,0x00,0x00,0x47,0x1a,
+0x47,0x2b,0x47,0x3c,0x47,0x4d,0x00,0x00,0x47,0x6f,0x47,0x80,0x47,0x91,0x47,0xa2,
+0x47,0xb3,0x47,0xc4,0x47,0xd5,0x47,0xe6,0x47,0xf7,0x48,0x08,0x48,0x19,0x48,0x2a,
+0x48,0x3b,0x48,0x4c,0x48,0x5d,0x48,0x6e,0x48,0x7f,0x48,0x90,0x48,0xa1,0x48,0xb2,
+0x48,0xc3,0x48,0xd4,0x48,0xf6,0x49,0x07,0x49,0x18,0x49,0x29,0x49,0x3a,0x49,0x5c,
+0x49,0x6d,0x49,0x7e,0x49,0x8f,0x49,0xa0,0x49,0xb1,0x49,0xc2,0x49,0xd3,0x49,0xe4,
+0x49,0xf5,0x4a,0x06,0x4a,0x17,0x4a,0x28,0x4a,0x39,0x4a,0x4a,0x4a,0x5b,0x4a,0x6c,
+0x4a,0x7d,0x4a,0x8e,0x4a,0x9f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,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,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0a,0x0b,0x0c,0x0d,
+0x0e,0x0f,0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1a,0x1b,0x1c,0x1d,
+0x1e,0x1f,0x20,0x21,0x22,0x23,0x24,0x25,0xff,0x27,0x28,0x29,0x2a,0x2b,0x2a,0x2d,
+0x2a,0x2f,0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3a,0x3b,0x3c,0x3d,
+0x3e,0x3f,0x40,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x47,0x49,0x49,0x4b,0x4c,0x4d,
+0x4e,0x4e,0x50,0x50,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5a,0x5b,0x5c,0x5d,
+0x5e,0x5f,0x60,0x61,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6a,0x6b,0x6c,0x6d,
+0x6e,0x6f,0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78,0x79,0x7a,0x7b,0x7c,0x7d,
+0x7e,0x7f,0x00,0x10,0x00,0x2c,0x81,0x32,0x3c,0x72,0x00,0x00,0x37,0x20,0xf2,0x13,
+0x08,0xa0,0x00,0x00,0x10,0x00,0x2d,0x81,0x37,0x3c,0x60,0x00,0x00,0x37,0x20,0xf2,
+0x14,0x08,0xa0,0x00,0x00,0x10,0x00,0x2e,0x81,0x3e,0x3c,0x4b,0x00,0x00,0x37,0x20,
+0xf2,0x14,0x08,0xa0,0x00,0x00,0x10,0x00,0x2f,0x81,0x43,0x3c,0x6a,0x00,0x00,0x37,
+0x20,0xf2,0x14,0x08,0xa0,0x00,0x0a,0x10,0x00,0x30,0x81,0x4b,0x3c,0x64,0x00,0x00,
+0x37,0x20,0xf2,0x14,0x08,0xa0,0x00,0x0a,0x10,0x00,0x31,0x81,0x50,0x3c,0x69,0x00,
+0x00,0x37,0x20,0xf2,0x14,0x08,0xa0,0x00,0x04,0x10,0x00,0x32,0x81,0x54,0x3c,0x6c,
+0x00,0x00,0x37,0x20,0xf2,0x14,0x08,0xa0,0x00,0x03,0x10,0x00,0x33,0x81,0x5c,0x3c,
+0x61,0x00,0x00,0x37,0x20,0xf2,0x14,0x18,0xa0,0x00,0x07,0x10,0x00,0x34,0x81,0x61,
+0x3c,0x64,0x00,0x00,0x37,0x20,0xf3,0x14,0x18,0xa0,0x00,0x00,0x10,0x00,0x35,0x81,
+0x5d,0x3c,0x3b,0x00,0x00,0x37,0x20,0xf4,0x15,0x08,0xa0,0x00,0x00,0x10,0x00,0x2c,
+0x81,0x32,0x3c,0x72,0x00,0x00,0x37,0x20,0xf2,0x13,0x08,0xa0,0x01,0x00,0x10,0x00,
+0x2d,0x81,0x37,0x3c,0x60,0x00,0x00,0x37,0x20,0xf2,0x14,0x08,0xa0,0x01,0x00,0x10,
+0x00,0x2e,0x81,0x3e,0x3c,0x4b,0x00,0x00,0x37,0x20,0xf2,0x14,0x08,0xa0,0x01,0x00,
+0x10,0x00,0x2f,0x81,0x43,0x3c,0x6a,0x00,0x00,0x37,0x20,0xf2,0x14,0x08,0xa0,0x01,
+0x0a,0x10,0x00,0x30,0x81,0x4b,0x3c,0x64,0x00,0x00,0x37,0x20,0xf2,0x14,0x08,0xa0,
+0x01,0x0a,0x10,0x00,0x31,0x81,0x50,0x3c,0x69,0x00,0x00,0x37,0x20,0xf2,0x14,0x08,
+0xa0,0x01,0x04,0x10,0x00,0x32,0x81,0x54,0x3c,0x6c,0x00,0x00,0x37,0x20,0xf2,0x14,
+0x08,0xa0,0x01,0x07,0x10,0x00,0x33,0x81,0x5c,0x3c,0x61,0x00,0x00,0x37,0x20,0xf2,
+0x14,0x18,0xa0,0x01,0x0a,0x10,0x00,0x34,0x81,0x61,0x3c,0x64,0x00,0x00,0x37,0x20,
+0xf3,0x14,0x18,0xa0,0x01,0x00,0x10,0x00,0x35,0x81,0x5d,0x3c,0x3b,0x00,0x00,0x37,
+0x20,0xf4,0x15,0x08,0xa0,0x01,0x10,0x10,0x00,0x2c,0x81,0x32,0x3c,0x74,0x00,0x00,
+0x51,0x20,0xf2,0x13,0x07,0xa0,0x02,0x10,0x10,0x00,0x2d,0x81,0x37,0x3c,0x62,0x00,
+0x00,0x51,0x20,0xf2,0x14,0x07,0xa0,0x02,0x10,0x10,0x00,0x2e,0x81,0x3e,0x3c,0x4d,
+0x00,0x00,0x51,0x20,0xf2,0x14,0x07,0xa0,0x02,0x10,0x10,0x00,0x2f,0x81,0x43,0x3c,
+0x6c,0x00,0x00,0x51,0x20,0xf2,0x14,0x07,0xa0,0x02,0x10,0x10,0x00,0x30,0x81,0x4b,
+0x3c,0x66,0x00,0x00,0x51,0x20,0xf2,0x14,0x07,0xa0,0x02,0x10,0x10,0x00,0x31,0x81,
+0x50,0x3c,0x6b,0x00,0x00,0x51,0x20,0xf2,0x14,0x07,0xa0,0x02,0x10,0x10,0x00,0x32,
+0x81,0x54,0x3c,0x6e,0x00,0x00,0x51,0x20,0xf2,0x14,0x07,0xa0,0x02,0x10,0x10,0x00,
+0x33,0x81,0x5c,0x3c,0x63,0x00,0x00,0x51,0x20,0xf2,0x14,0x17,0xa0,0x02,0x10,0x10,
+0x00,0x34,0x81,0x61,0x3c,0x66,0x00,0x00,0x51,0x20,0xf3,0x14,0x17,0xa0,0x02,0x10,
+0x10,0x00,0x35,0x81,0x5d,0x3c,0x3d,0x00,0x00,0x51,0x20,0xf4,0x15,0x07,0xa0,0x02,
+0xf0,0x10,0x00,0x6c,0x80,0x3a,0x2e,0x27,0x00,0x00,0x3d,0x28,0xf4,0x23,0x18,0xa0,
+0x03,0x00,0x10,0x00,0x2c,0x81,0x32,0x3c,0x72,0x00,0x00,0x4b,0x20,0xf2,0x13,0x08,
+0xa0,0x04,0x00,0x10,0x00,0x2d,0x81,0x37,0x3c,0x60,0x00,0x00,0x4b,0x20,0xf2,0x14,
+0x08,0xa0,0x04,0x00,0x10,0x00,0x2e,0x81,0x3e,0x3c,0x4b,0x00,0x00,0x4b,0x20,0xf2,
+0x14,0x08,0xa0,0x04,0x00,0x10,0x00,0x2f,0x81,0x43,0x3c,0x6a,0x00,0x00,0x4b,0x20,
+0xf2,0x14,0x08,0xa0,0x04,0x0a,0x10,0x00,0x30,0x81,0x4b,0x3c,0x64,0x00,0x00,0x4b,
+0x20,0xf2,0x14,0x08,0xa0,0x04,0x0a,0x10,0x00,0x31,0x81,0x50,0x3c,0x69,0x00,0x00,
+0x4b,0x20,0xf2,0x14,0x08,0xa0,0x04,0x04,0x10,0x00,0x32,0x81,0x54,0x3c,0x6c,0x00,
+0x00,0x4b,0x20,0xf2,0x14,0x08,0xa0,0x04,0x03,0x10,0x00,0x33,0x81,0x5c,0x3c,0x61,
+0x00,0x00,0x4b,0x20,0xf2,0x14,0x18,0xa0,0x04,0x07,0x10,0x00,0x34,0x81,0x61,0x3c,
+0x64,0x00,0x00,0x4b,0x20,0xf3,0x14,0x18,0xa0,0x04,0x00,0x10,0x00,0x35,0x81,0x5d,
+0x3c,0x3b,0x00,0x00,0x4b,0x20,0xf4,0x15,0x08,0xa0,0x04,0x00,0x10,0x00,0x2c,0x81,
+0x32,0x3c,0x7e,0x00,0x00,0x4b,0x20,0xf2,0x13,0x08,0xa0,0x04,0x00,0x10,0x00,0x2d,
+0x81,0x37,0x3c,0x53,0x00,0x00,0x4b,0x20,0xf2,0x14,0x08,0xa0,0x04,0x00,0x10,0x00,
+0x2e,0x81,0x3e,0x3c,0x58,0x00,0x00,0x4b,0x20,0xf2,0x14,0x08,0xa0,0x04,0x00,0x10,
+0x00,0x2f,0x81,0x43,0x3c,0x5b,0x00,0x00,0x4b,0x20,0xf2,0x14,0x08,0xa0,0x04,0x0a,
+0x10,0x00,0x30,0x81,0x4b,0x3c,0x72,0x00,0x00,0x4b,0x20,0xf2,0x14,0x08,0xa0,0x04,
+0x0a,0x10,0x00,0x31,0x81,0x50,0x3c,0x5b,0x00,0x00,0x4b,0x20,0xf2,0x14,0x08,0xa0,
+0x04,0x04,0x10,0x00,0x32,0x81,0x54,0x3c,0x79,0x00,0x00,0x4b,0x20,0xf2,0x14,0x08,
+0xa0,0x04,0x07,0x10,0x00,0x33,0x81,0x5c,0x3c,0x5a,0x00,0x00,0x4b,0x20,0xf2,0x14,
+0x18,0xa0,0x04,0x01,0x10,0x00,0x34,0x81,0x61,0x3c,0x71,0x00,0x00,0x4b,0x20,0xf3,
+0x14,0x18,0xa0,0x04,0x00,0x10,0x00,0x35,0x81,0x5d,0x3c,0x2f,0x00,0x00,0x4b,0x20,
+0xf4,0x15,0x08,0xa0,0x04,0x00,0x10,0x00,0x0b,0xa0,0x51,0x3c,0x6a,0x00,0x00,0xd7,
+0x38,0xf0,0x00,0x0c,0xa0,0x05,0x00,0x12,0x00,0x6c,0x80,0x3a,0x3c,0x27,0x00,0x00,
+0x4f,0x22,0xf4,0x23,0x19,0xa0,0x06,0x00,0x10,0x00,0x2c,0x81,0x32,0x3c,0x74,0x00,
+0x00,0x5d,0x1b,0xf2,0x13,0x08,0xa0,0x07,0x00,0x10,0x00,0x2d,0x81,0x37,0x3c,0x62,
+0x00,0x00,0x5d,0x1b,0xf2,0x14,0x08,0xa0,0x07,0x00,0x10,0x00,0x2e,0x81,0x3e,0x3c,
+0x4d,0x00,0x00,0x5d,0x1b,0xf2,0x14,0x08,0xa0,0x07,0x00,0x10,0x00,0x2f,0x81,0x43,
+0x3c,0x6c,0x00,0x00,0x5d,0x1b,0xf2,0x14,0x08,0xa0,0x07,0x0a,0x10,0x00,0x30,0x81,
+0x4b,0x3c,0x66,0x00,0x00,0x5d,0x1b,0xf2,0x14,0x08,0xa0,0x07,0x0a,0x10,0x00,0x31,
+0x81,0x50,0x3c,0x6b,0x00,0x00,0x5d,0x1b,0xf2,0x14,0x08,0xa0,0x07,0x04,0x10,0x00,
+0x32,0x81,0x54,0x3c,0x6e,0x00,0x00,0x5d,0x1b,0xf2,0x14,0x08,0xa0,0x07,0x03,0x10,
+0x00,0x33,0x81,0x5c,0x3c,0x63,0x00,0x00,0x5d,0x1b,0xf2,0x14,0x18,0xa0,0x07,0x07,
+0x10,0x00,0x34,0x81,0x61,0x3c,0x66,0x00,0x00,0x5d,0x1b,0xf3,0x14,0x18,0xa0,0x07,
+0x00,0x10,0x00,0x35,0x81,0x5d,0x3c,0x3d,0x00,0x00,0x5d,0x1b,0xf4,0x15,0x08,0xa0,
+0x07,0x00,0x10,0x00,0x2c,0x81,0x32,0x68,0x70,0x00,0x00,0x5d,0x18,0xf2,0x13,0x08,
+0xa0,0x04,0x00,0x10,0x00,0x2d,0x81,0x37,0x68,0x5e,0x00,0x00,0x5d,0x18,0xf2,0x14,
+0x08,0xa0,0x04,0x00,0x10,0x00,0x2e,0x81,0x3e,0x68,0x49,0x00,0x00,0x5d,0x18,0xf2,
+0x14,0x08,0xa0,0x04,0x00,0x10,0x00,0x2f,0x81,0x43,0x68,0x68,0x00,0x00,0x5d,0x18,
+0xf2,0x14,0x08,0xa0,0x04,0x0a,0x10,0x00,0x30,0x81,0x4b,0x68,0x62,0x00,0x00,0x5d,
+0x18,0xf2,0x14,0x08,0xa0,0x04,0x0a,0x10,0x00,0x31,0x81,0x50,0x68,0x67,0x00,0x00,
+0x5d,0x18,0xf2,0x14,0x08,0xa0,0x04,0x04,0x10,0x00,0x32,0x81,0x54,0x68,0x6a,0x00,
+0x00,0x5d,0x18,0xf2,0x14,0x08,0xa0,0x04,0x07,0x10,0x00,0x33,0x81,0x5c,0x68,0x5f,
+0x00,0x00,0x5d,0x18,0xf2,0x14,0x18,0xa0,0x04,0x0a,0x10,0x00,0x34,0x81,0x61,0x68,
+0x62,0x00,0x00,0x5d,0x18,0xf3,0x14,0x18,0xa0,0x04,0x00,0x10,0x00,0x35,0x81,0x5d,
+0x68,0x39,0x00,0x00,0x5d,0x18,0xf4,0x15,0x08,0xa0,0x04,0x00,0x10,0x00,0x80,0x80,
+0x44,0x3c,0x66,0x00,0x00,0x4d,0x20,0xf5,0x24,0x19,0xa0,0x08,0x00,0x10,0x00,0x81,
+0x80,0x4a,0x3c,0x78,0x00,0x00,0x4d,0x20,0xf5,0x25,0x09,0xa0,0x08,0x00,0x10,0x00,
+0x82,0x80,0x50,0x3c,0x66,0x00,0x00,0x4d,0x20,0xf5,0x25,0x09,0xa0,0x08,0x00,0x10,
+0x00,0x83,0x80,0x56,0x3c,0x5b,0x00,0x00,0x4d,0x20,0xf5,0x25,0x19,0xa0,0x08,0x00,
+0x10,0x00,0x84,0x80,0x62,0x3c,0x5b,0x00,0x00,0x4d,0x20,0xf5,0x25,0x29,0xa0,0x08,
+0x00,0x10,0x00,0x27,0x90,0x51,0x3c,0x51,0x00,0x00,0x2d,0x28,0xf5,0x13,0x2b,0xa0,
+0x09,0x00,0x10,0x00,0x28,0x90,0x5d,0x3c,0x67,0x00,0x00,0x2d,0x28,0xf5,0x13,0x3b,
+0xa0,0x09,0x00,0x10,0x00,0x2b,0x80,0x52,0x3c,0x03,0x00,0x00,0x23,0x20,0xf4,0x15,
+0x07,0xa3,0x0a,0x00,0x10,0x00,0xf3,0x60,0x52,0x3c,0x5d,0x00,0x00,0x3d,0x28,0xf6,
+0x25,0x25,0xa0,0x0b,0x00,0x10,0x00,0xf3,0x80,0x52,0x3c,0x62,0x00,0x00,0x49,0x20,
+0xa6,0x25,0x25,0xa0,0x0c,0x00,0x10,0x00,0x01,0x81,0x47,0x75,0x65,0x00,0x00,0x55,
+0x20,0xd4,0x14,0x16,0xa0,0x0d,0x00,0x10,0x70,0x01,0x81,0x47,0x3c,0x6a,0x00,0x00,
+0x3f,0x28,0xf4,0x14,0x16,0xa4,0x0e,0x00,0x10,0x00,0xf4,0x80,0x47,0x3c,0x6a,0x00,
+0x00,0x3b,0x38,0xf7,0x47,0x08,0xa0,0x0f,0x00,0x10,0x00,0xf5,0x80,0x53,0x3c,0x51,
+0x00,0x00,0x3b,0x38,0xf7,0x47,0x08,0xa0,0x0f,0x00,0x10,0x00,0xf5,0x80,0x53,0x3c,
+0x51,0x00,0x00,0x3b,0x38,0xf7,0x48,0x08,0xa0,0x0f,0x00,0x10,0x00,0xf5,0x80,0x53,
+0x3c,0x52,0x00,0x00,0x3b,0x38,0xf7,0x48,0x18,0xa0,0x0f,0x00,0x10,0x00,0x36,0x81,
+0x5e,0x3c,0x01,0x00,0x00,0x2d,0x38,0xf0,0x06,0x36,0xa0,0x10,0x00,0x10,0x10,0xff,
+0x80,0x4d,0x3c,0x5f,0x00,0x00,0x01,0x21,0xf4,0xa3,0x25,0xa1,0x11,0x00,0x14,0x00,
+0x3f,0x80,0x4b,0x3c,0x4c,0x00,0x00,0x43,0x29,0xf5,0x16,0x07,0xa0,0x12,0x0e,0x13,
+0x00,0x40,0x80,0x4b,0x3c,0x4c,0x00,0x00,0x6b,0x2a,0xf5,0x16,0x07,0xa0,0x13,0x04,
+0x12,0x01,0x8e,0x80,0x4a,0x3c,0x6a,0x00,0x00,0x3d,0x3a,0xf0,0x00,0x0a,0xa0,0x14,
+0x00,0x13,0x00,0x8c,0x80,0x3d,0x3c,0x6e,0x00,0x00,0x41,0x3b,0xf0,0x00,0x09,0xa0,
+0x15,0x00,0x13,0x00,0x8d,0x80,0x55,0x3c,0x68,0x00,0x00,0x41,0x3b,0xf0,0x00,0x09,
+0xa0,0x15,0x00,0x10,0x00,0x28,0x81,0x39,0x3c,0x6e,0x00,0x00,0x33,0x39,0xf0,0x00,
+0x0a,0xa0,0x16,0x00,0x10,0x00,0x29,0x81,0x45,0x3c,0x70,0x00,0x00,0x33,0x39,0xf0,
+0x00,0x0a,0xa0,0x16,0x00,0x10,0x00,0x2a,0x81,0x51,0x3c,0x6a,0x00,0x00,0x33,0x39,
+0xf0,0x00,0x0a,0xa0,0x16,0x00,0x10,0x00,0x2b,0x81,0x5d,0x3c,0x65,0x00,0x00,0x33,
+0x39,0xf0,0x00,0x0a,0xa0,0x16,0x00,0x10,0x00,0x27,0x71,0x5d,0x3c,0x67,0x00,0x00,
+0x33,0x39,0xf0,0x00,0x0a,0xa0,0x16,0x00,0x10,0x00,0x87,0x80,0x32,0x3c,0x6a,0x00,
+0x00,0x3b,0x11,0xf0,0x00,0x09,0xa0,0x17,0x00,0x10,0x00,0x88,0x80,0x3a,0x3c,0x78,
+0x00,0x00,0x3b,0x11,0xf0,0x00,0x09,0xa0,0x17,0x00,0x10,0x00,0x89,0x80,0x42,0x3c,
+0x74,0x00,0x00,0x3b,0x11,0xf0,0x00,0x09,0xa0,0x17,0x00,0x10,0x00,0x8a,0x80,0x4a,
+0x3c,0x78,0x00,0x00,0x3b,0x11,0xf0,0x00,0x09,0xa0,0x17,0x00,0x10,0x00,0x8b,0x80,
+0x51,0x3c,0x0e,0x00,0x00,0x3b,0x11,0xf0,0x00,0x09,0xa0,0x17,0x06,0x10,0x00,0xac,
+0x80,0x40,0x3c,0x02,0x00,0x00,0x3f,0x38,0xf0,0x00,0x09,0xa1,0x18,0x00,0x10,0x00,
+0xad,0x80,0x58,0x3c,0x01,0x00,0x00,0x3f,0x38,0xf0,0x00,0x09,0xa1,0x18,0x00,0x10,
+0x00,0x06,0x80,0x4b,0x3c,0x65,0x00,0x00,0x5b,0x22,0x90,0x00,0x09,0xa0,0x19,0x00,
+0x10,0x00,0x07,0x80,0x60,0x3c,0x3a,0x00,0x00,0x5b,0x22,0x90,0x00,0x09,0xa0,0x19,
+0x00,0x10,0x00,0x70,0x80,0x4a,0x63,0x67,0x00,0x00,0x75,0x23,0xa0,0x00,0x09,0xa0,
+0x1a,0x00,0x1c,0x00,0x70,0x80,0x4a,0x3c,0x78,0x00,0x00,0x51,0x30,0xa0,0x00,0x09,
+0xa2,0x1b,0x00,0x10,0x00,0xac,0x80,0x40,0x3c,0x05,0x00,0x00,0x51,0x38,0xf0,0x00,
+0x09,0xa0,0x1c,0x00,0x10,0x00,0xad,0x80,0x58,0x3c,0x04,0x00,0x00,0x51,0x38,0xf0,
+0x00,0x09,0xa0,0x1c,0x00,0x10,0x00,0x41,0xa0,0x42,0x6b,0x5f,0x00,0x00,0x95,0x3a,
+0x75,0x20,0x0a,0xa0,0x1d,0x05,0x10,0x00,0xb3,0x80,0x36,0x3c,0x74,0x00,0x00,0x35,
+0x28,0xf5,0x34,0x09,0xa0,0x1e,0x0c,0x10,0x00,0xb7,0x80,0x41,0x3c,0x7f,0x00,0x00,
+0x35,0x28,0xf5,0x34,0x09,0xa0,0x1e,0x00,0x10,0x00,0xb5,0x80,0x48,0x3c,0x6d,0x00,
+0x00,0x35,0x28,0xf6,0x34,0x09,0xa0,0x1e,0x00,0x10,0x00,0xb4,0x80,0x4e,0x3c,0x74,
+0x00,0x00,0x35,0x28,0xf6,0x35,0x09,0xa0,0x1e,0x00,0x10,0x00,0xb6,0x80,0x57,0x3c,
+0x63,0x00,0x00,0x35,0x28,0xf6,0x35,0x19,0xa0,0x1e,0x00,0x13,0x00,0x0c,0x80,0x36,
+0x3c,0x59,0x00,0x00,0x43,0x28,0xf0,0x04,0x19,0xa0,0x1f,0x00,0x13,0x00,0x0d,0x80,
+0x42,0x3c,0x62,0x00,0x00,0x43,0x28,0xf0,0x05,0x09,0xa0,0x1f,0x00,0x13,0x00,0x0e,
+0x80,0x4a,0x3c,0x5b,0x00,0x00,0x43,0x28,0xf5,0x94,0x09,0xa0,0x1f,0x00,0x13,0x00,
+0x0f,0x80,0x56,0x3c,0x5b,0x00,0x00,0x43,0x28,0xf6,0x95,0x09,0xa0,0x1f,0x00,0x10,
+0x00,0x5a,0x80,0x37,0x3c,0x70,0x00,0x00,0x35,0x28,0xf6,0x34,0x09,0xa0,0x20,0x00,
+0x10,0x00,0x5b,0x80,0x46,0x3c,0x61,0x00,0x00,0x35,0x28,0xf6,0x34,0x09,0xa0,0x20,
+0x00,0x10,0x00,0x5c,0x80,0x53,0x3c,0x52,0x00,0x00,0x35,0x28,0xf6,0x34,0x09,0xa0,
+0x20,0x00,0x15,0x20,0x61,0x80,0x35,0x3c,0x4d,0x00,0x00,0x4b,0x29,0xf5,0x54,0x0a,
+0xa0,0x21,0x00,0x15,0x20,0x60,0x80,0x3a,0x3c,0x62,0x00,0x00,0x4b,0x29,0xf5,0x54,
+0x0a,0xa0,0x21,0x00,0x15,0x20,0x63,0x80,0x3f,0x3c,0x44,0x00,0x00,0x41,0x29,0xf5,
+0x55,0x0a,0xa0,0x21,0x00,0x15,0x20,0x62,0x80,0x48,0x3c,0x53,0x00,0x00,0x4b,0x29,
+0xf5,0x55,0x0a,0xa0,0x21,0x00,0x15,0x20,0x65,0x80,0x4d,0x3c,0x3b,0x00,0x00,0x4b,
+0x29,0xf5,0x55,0x1a,0xa0,0x21,0x00,0x15,0x20,0x64,0x80,0x52,0x3c,0x31,0x00,0x00,
+0x4b,0x29,0xf5,0x55,0x1a,0xa0,0x21,0x00,0x15,0x20,0x66,0x80,0x59,0x3c,0x5e,0x00,
+0x00,0x4b,0x29,0xf5,0x55,0x2a,0xa0,0x21,0x00,0x15,0x20,0x67,0x80,0x62,0x3c,0x5b,
+0x00,0x00,0x4b,0x29,0xf6,0x56,0x0a,0xa0,0x21,0x00,0x10,0x00,0x68,0x80,0x4a,0x3c,
+0x78,0x00,0x00,0x33,0x28,0xf6,0x15,0x09,0xa0,0x22,0x00,0x13,0x00,0xa5,0x80,0x39,
+0x3c,0x7d,0x00,0x00,0x3f,0x29,0xf2,0x11,0x09,0xa0,0x23,0x00,0x13,0x00,0xa6,0x80,
+0x42,0x3c,0x74,0x00,0x00,0x3f,0x29,0xf2,0x11,0x09,0xa0,0x23,0x00,0x12,0x00,0x51,
+0x80,0x36,0x3c,0x50,0x00,0x00,0x43,0x21,0xa2,0x12,0x0a,0xa0,0x24,0x00,0x12,0x00,
+0x52,0x80,0x3a,0x3c,0x61,0x00,0x00,0x43,0x21,0xa2,0x12,0x0a,0xa0,0x24,0x00,0x12,
+0x00,0x53,0x80,0x3e,0x3c,0x78,0x00,0x00,0x43,0x21,0xa2,0x12,0x0a,0xa0,0x24,0x00,
+0x12,0x00,0x54,0x80,0x42,0x3c,0x4f,0x00,0x00,0x43,0x21,0xa2,0x12,0x0a,0xa0,0x24,
+0x00,0x12,0x00,0x55,0x80,0x46,0x3c,0x61,0x00,0x00,0x43,0x21,0xa2,0x12,0x0a,0xa0,
+0x24,0x00,0x12,0x00,0x56,0x80,0x4a,0x3c,0x78,0x00,0x00,0x43,0x21,0xa2,0x12,0x0a,
+0xa0,0x24,0x00,0x12,0x00,0x57,0x80,0x4e,0x3c,0x74,0x00,0x00,0x43,0x21,0xa2,0x12,
+0x0a,0xa0,0x24,0x00,0x12,0x00,0x58,0x80,0x52,0x3c,0x61,0x00,0x00,0x43,0x21,0xa2,
+0x12,0x0a,0xa0,0x24,0x00,0x12,0x00,0x59,0x80,0x56,0x3c,0x20,0x00,0x00,0x43,0x21,
+0xa2,0x12,0x0a,0xa0,0x24,0x00,0x10,0x00,0x5e,0x90,0x4d,0x3c,0x3b,0x00,0x00,0x31,
+0x28,0xf4,0x24,0x09,0xa0,0x25,0x00,0x10,0x00,0x5d,0x90,0x52,0x3c,0x32,0x00,0x00,
+0x1d,0x28,0xf4,0x24,0x09,0xa0,0x25,0x00,0x10,0x00,0x5f,0x90,0x57,0x3c,0x63,0x00,
+0x00,0x31,0x28,0xf4,0x24,0x09,0xa0,0x25,0x00,0x10,0x00,0x04,0x80,0x2d,0x3c,0x35,
+0x00,0x00,0x1d,0x18,0xf5,0x15,0x09,0xa0,0x26,0x00,0x10,0x00,0x05,0x80,0x47,0x3c,
+0x52,0x00,0x00,0x1d,0x18,0xf5,0x15,0x09,0xa0,0x26,0x00,0x10,0x00,0x4a,0x80,0x28,
+0x3c,0x7a,0x00,0x00,0x21,0x18,0xf6,0x14,0x09,0xa0,0x27,0x00,0x10,0x00,0x4b,0x80,
+0x2d,0x3c,0x72,0x00,0x00,0x21,0x18,0xf6,0x14,0x09,0xa0,0x27,0x00,0x10,0x00,0x4c,
+0x80,0x32,0x3c,0x73,0x00,0x00,0x21,0x18,0xf6,0x14,0x09,0xa0,0x27,0x00,0x10,0x00,
+0x4d,0x80,0x37,0x3c,0x79,0x00,0x00,0x21,0x18,0xf6,0x14,0x09,0xa0,0x27,0x00,0x12,
+0x00,0x4f,0x90,0x3a,0x3c,0x52,0x00,0x00,0x33,0x18,0xf3,0x90,0x0a,0xa0,0x28,0x05,
+0x12,0x00,0x50,0x90,0x3f,0x3c,0x56,0x00,0x00,0x33,0x18,0xf3,0x90,0x1a,0xa0,0x28,
+0x00,0x12,0x00,0x6b,0x90,0x44,0x3c,0x3e,0x00,0x00,0x33,0x18,0xf3,0x90,0x2a,0xa0,
+0x28,0x00,0x12,0x00,0x69,0x90,0x49,0x3c,0x4f,0x00,0x00,0x33,0x18,0xf5,0xb0,0x0a,
+0xa0,0x28,0x00,0x12,0x00,0x6a,0x90,0x4e,0x3c,0x51,0x00,0x00,0x33,0x18,0xf5,0xb0,
+0x0a,0xa0,0x28,0x00,0x10,0x00,0x4e,0x80,0x43,0x3c,0x71,0x00,0x00,0x2d,0x10,0xf3,
+0x63,0x19,0xa0,0x29,0x00,0x12,0x00,0xa3,0x90,0x3d,0x3c,0x76,0x00,0x00,0x21,0x19,
+0xf5,0x32,0x1a,0xa0,0x2a,0x00,0x10,0x00,0xa2,0x90,0x44,0x3c,0x66,0x00,0x00,0x25,
+0x20,0xb0,0x03,0x09,0xa0,0x2b,0x00,0x12,0x00,0xbe,0x90,0x3e,0x3c,0x6a,0x00,0x00,
+0x47,0x39,0xf4,0x14,0x09,0xa0,0x2c,0x00,0x12,0x00,0x17,0x81,0x2d,0x3c,0x67,0x00,
+0x00,0x35,0x39,0xf3,0x50,0x08,0xa0,0x2d,0x00,0x13,0x00,0x05,0x81,0x44,0x3c,0x66,
+0x00,0x00,0x33,0x3b,0xf3,0x20,0x09,0xa0,0x2e,0x00,0x13,0x00,0x02,0x81,0x47,0x3c,
+0x52,0x00,0x00,0x33,0x3b,0xf3,0x20,0x09,0xa0,0x2e,0x00,0x13,0x00,0x06,0x81,0x4c,
+0x3c,0x64,0x00,0x00,0x33,0x3b,0xf3,0x20,0x09,0xa0,0x2e,0x00,0x13,0x00,0x07,0x81,
+0x4c,0x3c,0x01,0x00,0x00,0x33,0x3b,0xf3,0x20,0x09,0xa0,0x2e,0x00,0x13,0x00,0x08,
+0x81,0x50,0x3c,0x3c,0x00,0x00,0x33,0x3b,0xf3,0x20,0x09,0xa0,0x2e,0x00,0x13,0x00,
+0x0a,0x81,0x55,0x3c,0x4d,0x00,0x00,0x33,0x3b,0xf3,0x20,0x09,0xa0,0x2e,0x00,0x13,
+0x00,0x0b,0x81,0x57,0x3c,0x64,0x00,0x00,0x33,0x3b,0xf3,0x20,0x09,0xa0,0x2e,0x00,
+0x13,0x00,0x0c,0x81,0x58,0x3c,0x22,0x00,0x00,0x33,0x3b,0xf3,0x20,0x09,0xa0,0x2e,
+0x00,0x13,0x00,0x0d,0x81,0x5b,0x3c,0x36,0x00,0x00,0x33,0x3b,0xf3,0x20,0x09,0xa0,
+0x2e,0x00,0x13,0x00,0x09,0x81,0x5e,0x3c,0x61,0x00,0x00,0x33,0x3b,0xf3,0x20,0x09,
+0xa0,0x2e,0x00,0x12,0x00,0x03,0x81,0x3f,0x3c,0x54,0x00,0x00,0x3b,0x3b,0xa3,0x20,
+0x09,0xa0,0x2f,0x00,0x12,0x00,0x04,0x81,0x41,0x3c,0x5e,0x00,0x00,0x3b,0x3b,0xa3,
+0x20,0x09,0xa0,0x2f,0x00,0x12,0x00,0x05,0x81,0x44,0x3c,0x66,0x00,0x00,0x3b,0x3b,
+0xa3,0x20,0x09,0xa0,0x2f,0x00,0x12,0x00,0x02,0x81,0x47,0x3c,0x52,0x00,0x00,0x35,
+0x3b,0xa3,0x20,0x09,0xa0,0x2f,0x00,0x12,0x00,0x06,0x81,0x4c,0x3c,0x64,0x00,0x00,
+0x3b,0x3b,0xa3,0x20,0x09,0xa0,0x2f,0x00,0x12,0x00,0x07,0x81,0x4c,0x3c,0x01,0x00,
+0x00,0x3b,0x3b,0xa3,0x20,0x09,0xa0,0x2f,0x00,0x12,0x00,0x08,0x81,0x50,0x3c,0x3c,
+0x00,0x00,0x2f,0x3b,0xa3,0x20,0x09,0xa0,0x2f,0x00,0x12,0x00,0x0a,0x81,0x55,0x3c,
+0x4d,0x00,0x00,0x35,0x3b,0xa3,0x20,0x09,0xa0,0x2f,0x00,0x12,0x00,0x0b,0x81,0x57,
+0x3c,0x64,0x00,0x00,0x2f,0x3b,0xa3,0x20,0x09,0xa0,0x2f,0x00,0x12,0x00,0x0c,0x81,
+0x58,0x3c,0x22,0x00,0x00,0x35,0x3b,0xa3,0x20,0x09,0xa0,0x2f,0x00,0x12,0x00,0x0d,
+0x81,0x5b,0x3c,0x36,0x00,0x00,0x2f,0x3b,0xa3,0x20,0x09,0xa0,0x2f,0x00,0x12,0x00,
+0x09,0x81,0x5e,0x3c,0x61,0x00,0x00,0x2f,0x3b,0xa3,0x20,0x09,0xa0,0x2f,0x00,0x13,
+0x00,0x12,0x91,0x45,0x3c,0x51,0x00,0x00,0x3f,0x33,0xa0,0x00,0x08,0xa0,0x30,0x00,
+0x13,0x00,0x13,0x91,0x4b,0x3c,0x44,0x00,0x00,0x3f,0x33,0xa0,0x00,0x08,0xa0,0x30,
+0x00,0x13,0x00,0x15,0x91,0x56,0x3c,0x5a,0x00,0x00,0x3f,0x33,0xa0,0x00,0x18,0xa0,
+0x30,0x00,0x13,0x00,0x16,0x91,0x59,0x3c,0x5e,0x00,0x00,0x3f,0x33,0xa0,0x00,0x18,
+0xa0,0x30,0x00,0x13,0x00,0x14,0x91,0x5f,0x3c,0x52,0x00,0x00,0x3f,0x33,0xa0,0x00,
+0x18,0xa0,0x30,0x00,0x13,0x00,0x10,0x81,0x30,0x3c,0x61,0x00,0x00,0x3d,0x19,0x90,
+0x00,0x09,0xa0,0x31,0x00,0x13,0x00,0x11,0x81,0x3c,0x3c,0x52,0x00,0x00,0x3d,0x19,
+0x90,0x00,0x09,0xa0,0x31,0x0a,0x12,0x00,0xb0,0x80,0x46,0x3c,0x0a,0x00,0x00,0x21,
+0x38,0xf0,0x00,0x07,0xa6,0x32,0x05,0x12,0x00,0x35,0x80,0x4c,0x3c,0x03,0x00,0x00,
+0x21,0x38,0xf0,0x00,0x07,0xa6,0x32,0x05,0x12,0x00,0x33,0x80,0x54,0x3c,0x79,0x00,
+0x00,0x21,0x38,0xf0,0x00,0x07,0xa6,0x32,0x05,0x12,0x00,0x34,0x80,0x57,0x3c,0x01,
+0x00,0x00,0x21,0x38,0xf0,0x00,0x07,0xa6,0x32,0x00,0x12,0x00,0xaf,0x80,0x65,0x3c,
+0x68,0x00,0x00,0x21,0x38,0xf0,0x00,0x07,0xa6,0x32,0x00,0x10,0x00,0xb8,0x80,0x3c,
+0x3c,0x6a,0x00,0x00,0x43,0x28,0xf0,0x00,0x05,0xa0,0x33,0x00,0x10,0x00,0xb9,0x80,
+0x45,0x3c,0x67,0x00,0x00,0x43,0x28,0xf0,0x00,0x05,0xa0,0x33,0x00,0x10,0x00,0xbb,
+0x80,0x4c,0x3c,0x72,0x00,0x00,0x43,0x28,0xf0,0x00,0x05,0xa0,0x33,0x00,0x10,0x00,
+0xba,0x80,0x53,0x3c,0x6d,0x00,0x00,0x3d,0x28,0xf0,0x00,0x05,0xa0,0x33,0x00,0x10,
+0x00,0xbc,0x80,0x5a,0x3c,0x70,0x00,0x00,0x43,0x28,0xf0,0x00,0x05,0xa0,0x33,0x00,
+0x10,0x00,0x7e,0x80,0x4f,0x3c,0x5c,0x00,0x00,0x2d,0x29,0xf5,0x25,0x07,0xa0,0x34,
+0x00,0x10,0x00,0x7f,0x80,0x5a,0x3c,0x4f,0x00,0x00,0x2d,0x29,0xf5,0x25,0x07,0xa0,
+0x34,0x00,0x10,0x70,0x00,0x81,0x39,0x3c,0x6a,0x00,0x00,0x15,0x28,0xf0,0x05,0x16,
+0xa0,0x35,0x00,0x10,0x00,0x3c,0x81,0x46,0x3c,0x06,0x00,0x00,0x37,0x20,0x80,0x00,
+0x07,0xa0,0x36,0x00,0x10,0x00,0x3e,0x81,0x4c,0x3c,0x03,0x00,0x00,0x37,0x20,0x80,
+0x00,0x07,0xa0,0x36,0x00,0x10,0x00,0x3d,0x81,0x54,0x3c,0x72,0x00,0x00,0x37,0x20,
+0x80,0x00,0x07,0xa0,0x36,0x00,0x10,0x00,0x3f,0x81,0x57,0x3c,0x05,0x00,0x00,0x41,
+0x20,0x80,0x00,0x07,0xa0,0x36,0x00,0x10,0x00,0x40,0x81,0x65,0x3c,0x76,0x00,0x00,
+0x41,0x20,0x80,0x00,0x07,0xa0,0x36,0x0a,0x10,0x00,0xb0,0x80,0x46,0x3c,0x0a,0x00,
+0x00,0x41,0x19,0xf0,0x00,0x07,0xa0,0x37,0x05,0x10,0x00,0x35,0x80,0x4c,0x3c,0x03,
+0x00,0x00,0x41,0x19,0xf0,0x00,0x07,0xa0,0x37,0x05,0x10,0x00,0x33,0x80,0x54,0x3c,
+0x79,0x00,0x00,0x41,0x19,0xf0,0x00,0x07,0xa0,0x37,0x05,0x10,0x00,0x34,0x80,0x57,
+0x3c,0x01,0x00,0x00,0x41,0x19,0xf0,0x00,0x07,0xa0,0x37,0x00,0x10,0x00,0xaf,0x80,
+0x65,0x3c,0x68,0x00,0x00,0x41,0x19,0xf0,0x00,0x07,0xa0,0x37,0xe0,0x10,0x00,0x02,
+0x90,0x49,0x3c,0x5d,0x00,0x00,0x59,0x20,0x93,0x22,0x06,0xa0,0x38,0x20,0x10,0x00,
+0xae,0x70,0x47,0x3a,0x7d,0x00,0x00,0x39,0x20,0x70,0x01,0x06,0xa0,0x39,0x50,0x10,
+0x00,0x02,0x90,0x55,0x3c,0x61,0x00,0x00,0x4b,0x19,0x70,0x00,0x06,0xa0,0x3a,0xb0,
+0x10,0x00,0x02,0x90,0x55,0x79,0x55,0x00,0x00,0x4b,0x19,0x70,0x00,0x06,0xa0,0x3b,
+0x00,0x10,0x00,0x18,0x80,0x45,0x3c,0x52,0x00,0x00,0x3d,0x1a,0x70,0x00,0x08,0xa0,
+0x3c,0x00,0x10,0x00,0x19,0x80,0x4a,0x3c,0x52,0x00,0x00,0x3d,0x1a,0x70,0x00,0x08,
+0xa0,0x3c,0x00,0x10,0x00,0x1a,0x80,0x51,0x3c,0x56,0x00,0x00,0x3d,0x1a,0x70,0x00,
+0x08,0xa0,0x3c,0x00,0x10,0x00,0x1b,0x80,0x5b,0x3c,0x55,0x00,0x00,0x3d,0x1a,0x70,
+0x00,0x08,0xa0,0x3c,0x00,0x10,0x00,0x29,0x80,0x50,0x3c,0x4c,0x00,0x00,0x19,0x20,
+0xf7,0x20,0x08,0xa0,0x3d,0x00,0x10,0x00,0x2a,0x80,0x51,0x3c,0x5a,0x00,0x00,0x3d,
+0x19,0x85,0x21,0x07,0xa0,0x3e,0x00,0x10,0x00,0x49,0x70,0x3e,0x3c,0x6a,0x00,0x00,
+0x01,0x30,0x80,0x05,0x05,0xa0,0x3f,0x00,0x12,0x00,0xf6,0x80,0x47,0x3c,0x22,0x00,
+0x00,0x29,0x32,0xf3,0x20,0x0a,0xa0,0x40,0x00,0x12,0x00,0xf8,0x80,0x4e,0x3c,0x76,
+0x00,0x00,0x29,0x32,0xf3,0x20,0x0a,0xa0,0x40,0x00,0x12,0x00,0xf7,0x80,0x54,0x3c,
+0x6e,0x00,0x00,0x29,0x32,0xf3,0x20,0x0a,0xa0,0x40,0x00,0x12,0x00,0xfa,0x80,0x5a,
+0x3c,0x52,0x00,0x00,0x29,0x32,0xf3,0x20,0x0a,0xa0,0x40,0x00,0x12,0x00,0xf9,0x80,
+0x5f,0x3c,0x22,0x00,0x00,0x29,0x32,0xf3,0x20,0x0a,0xa0,0x40,0x00,0x12,0x00,0xfb,
+0x80,0x66,0x3c,0x52,0x00,0x00,0x29,0x32,0xf3,0x20,0x0a,0xa0,0x40,0x00,0x13,0x00,
+0xf0,0x80,0x45,0x3c,0x7d,0x00,0x00,0x29,0x21,0xf0,0x00,0x09,0xa0,0x41,0x00,0x13,
+0x00,0xf1,0x80,0x4a,0x3c,0x02,0x00,0x00,0x29,0x21,0xf0,0x00,0x09,0xa0,0x41,0x00,
+0x13,0x00,0xf2,0x80,0x50,0x3c,0x3c,0x00,0x00,0x29,0x21,0xf0,0x00,0x09,0xa0,0x41,
+0x00,0x13,0x00,0x85,0x80,0x35,0x3c,0x78,0x00,0x00,0x21,0x21,0xf5,0x10,0x09,0xa0,
+0x42,0x00,0x13,0x00,0x86,0x80,0x3d,0x3c,0x3e,0x00,0x00,0x21,0x21,0xf5,0x10,0x09,
+0xa0,0x42,0x00,0x15,0x00,0xb1,0x80,0x4c,0x3c,0x67,0x00,0x00,0x33,0x28,0xf3,0xf0,
+0x0a,0xa1,0x43,0x00,0x15,0x00,0xb2,0x80,0x58,0x3c,0x67,0x00,0x00,0x33,0x28,0x83,
+0xf0,0x0a,0xa1,0x43,0x00,0x13,0x00,0x7c,0x80,0x50,0x3c,0x68,0x00,0x00,0x2f,0x1a,
+0xf0,0x00,0x09,0xa0,0x44,0x00,0x13,0x00,0x7d,0x80,0x57,0x3c,0x28,0x00,0x00,0x2f,
+0x1a,0xf0,0x00,0x09,0xa0,0x44,0x00,0x1a,0x00,0xfc,0x80,0x4a,0x3c,0x57,0x00,0x00,
+0x29,0x28,0xf0,0x00,0x0a,0xa0,0x45,0x00,0x1a,0x00,0xfd,0x80,0x56,0x3c,0x66,0x00,
+0x00,0x29,0x28,0xf0,0x00,0x0a,0xa0,0x45,0xf0,0x14,0x00,0xd3,0x80,0x25,0x3c,0x49,
+0xfc,0x04,0x41,0x18,0xa5,0x11,0x08,0xa0,0x46,0xf0,0x14,0x00,0xda,0x80,0x2b,0x3c,
+0x52,0xfc,0x04,0x41,0x18,0xa5,0x11,0x08,0xa0,0x46,0xf0,0x14,0x00,0xd4,0x80,0x31,
+0x3c,0x49,0xfc,0x04,0x41,0x18,0xa5,0x11,0x08,0xa0,0x46,0xf0,0x14,0x00,0xdb,0x80,
+0x37,0x3c,0x44,0xfc,0x04,0x41,0x18,0xa5,0x11,0x08,0xa0,0x46,0xf0,0x14,0x00,0xd5,
+0x80,0x3d,0x3c,0x5d,0xfc,0x04,0x41,0x18,0xa5,0x11,0x08,0xa0,0x46,0xf0,0x14,0x00,
+0xdc,0x80,0x43,0x3c,0x4c,0xfc,0x04,0x41,0x18,0xa5,0x11,0x08,0xa0,0x46,0xf0,0x14,
+0x00,0xd6,0x80,0x49,0x3c,0x50,0xfc,0x04,0x41,0x18,0xa5,0x11,0x08,0xa0,0x46,0xf0,
+0x14,0x00,0xdd,0x80,0x4f,0x3c,0x60,0xfc,0x04,0x41,0x18,0xa5,0x11,0x08,0xa0,0x46,
+0xf0,0x14,0x00,0xd7,0x80,0x54,0x3c,0x07,0xfc,0x04,0x41,0x18,0xa5,0x11,0x08,0xa0,
+0x46,0xf0,0x14,0x00,0xde,0x80,0x5b,0x3c,0x3a,0xfc,0x04,0x41,0x18,0xa5,0x11,0x08,
+0xa0,0x46,0xf0,0x14,0x00,0xd8,0x80,0x61,0x3c,0x50,0xfc,0x04,0x41,0x18,0xa5,0x11,
+0x08,0xa0,0x46,0xf0,0x14,0x00,0xd9,0x80,0x6d,0x3c,0x50,0xfc,0x04,0x41,0x18,0xa5,
+0x11,0x08,0xa0,0x46,0x10,0x12,0x00,0x18,0x81,0x25,0x79,0x57,0xfc,0x04,0x41,0x19,
+0x85,0x23,0x08,0xa0,0x47,0x10,0x12,0x00,0x19,0x81,0x2b,0x79,0x5c,0xfc,0x04,0x41,
+0x19,0x85,0x23,0x08,0xa0,0x47,0x10,0x12,0x00,0x1a,0x81,0x31,0x79,0x55,0xfc,0x04,
+0x41,0x19,0x85,0x23,0x08,0xa0,0x47,0x10,0x12,0x00,0x1b,0x81,0x37,0x79,0x5c,0xfc,
+0x04,0x41,0x19,0x85,0x23,0x08,0xa0,0x47,0x10,0x12,0x00,0x1c,0x81,0x3d,0x79,0x62,
+0xfc,0x04,0x41,0x19,0x85,0x23,0x08,0xa0,0x47,0x10,0x12,0x00,0x1d,0x81,0x43,0x79,
+0x65,0xfc,0x04,0x41,0x19,0x85,0x23,0x08,0xa0,0x47,0x10,0x12,0x00,0x1e,0x81,0x49,
+0x79,0x70,0xfc,0x04,0x41,0x19,0x85,0x23,0x08,0xa0,0x47,0x10,0x12,0x00,0x1f,0x81,
+0x4f,0x79,0x65,0xfc,0x04,0x41,0x19,0x85,0x23,0x08,0xa0,0x47,0x10,0x12,0x00,0x20,
+0x81,0x54,0x79,0x0c,0xfc,0x04,0x41,0x19,0x85,0x23,0x08,0xa0,0x47,0x10,0x12,0x00,
+0x21,0x81,0x5b,0x79,0x3e,0xfc,0x04,0x41,0x19,0x85,0x23,0x08,0xa0,0x47,0x10,0x12,
+0x00,0x22,0x81,0x61,0x79,0x55,0xfc,0x04,0x41,0x19,0x85,0x23,0x08,0xa0,0x47,0x10,
+0x12,0x00,0x23,0x81,0x6d,0x79,0x55,0xfc,0x04,0x41,0x19,0x85,0x23,0x08,0xa0,0x47,
+0x30,0x10,0x00,0x18,0x81,0x25,0x3c,0x59,0x00,0x00,0x51,0x26,0x85,0x23,0x08,0xa0,
+0x48,0x30,0x10,0x00,0x19,0x81,0x2b,0x3c,0x5e,0x00,0x00,0x51,0x26,0x85,0x23,0x08,
+0xa0,0x48,0x30,0x10,0x00,0x1a,0x81,0x31,0x3c,0x57,0x00,0x00,0x51,0x26,0x85,0x23,
+0x08,0xa0,0x48,0x30,0x10,0x00,0x1b,0x81,0x37,0x3c,0x5e,0x00,0x00,0x51,0x26,0x85,
+0x23,0x08,0xa0,0x48,0x30,0x10,0x00,0x1c,0x81,0x3d,0x3c,0x64,0x00,0x00,0x51,0x26,
+0x85,0x23,0x08,0xa0,0x48,0x30,0x10,0x00,0x1d,0x81,0x43,0x3c,0x67,0x00,0x00,0x51,
+0x26,0x85,0x23,0x08,0xa0,0x48,0x30,0x10,0x00,0x1e,0x81,0x49,0x3c,0x72,0x00,0x00,
+0x51,0x26,0x85,0x23,0x08,0xa0,0x48,0x30,0x10,0x00,0x1f,0x81,0x4f,0x3c,0x67,0x00,
+0x00,0x51,0x26,0x85,0x23,0x08,0xa0,0x48,0x30,0x10,0x00,0x20,0x81,0x54,0x3c,0x0e,
+0x00,0x00,0x51,0x26,0x85,0x23,0x08,0xa0,0x48,0x30,0x10,0x00,0x21,0x81,0x5b,0x3c,
+0x40,0x00,0x00,0x51,0x26,0x85,0x23,0x08,0xa0,0x48,0x30,0x10,0x00,0x22,0x81,0x61,
+0x3c,0x57,0x00,0x00,0x51,0x26,0x85,0x23,0x08,0xa0,0x48,0x30,0x10,0x00,0x23,0x81,
+0x6d,0x3c,0x57,0x00,0x00,0x51,0x26,0x85,0x23,0x08,0xa0,0x48,0xd0,0x10,0x00,0x24,
+0x71,0x40,0x79,0x02,0x00,0x00,0x15,0x22,0x85,0x23,0x08,0xa0,0x49,0x00,0x12,0x00,
+0xe3,0x80,0x4b,0x3c,0x44,0x00,0x00,0x37,0x21,0xf5,0x20,0x0a,0xa0,0x4a,0x00,0x12,
+0x00,0xe4,0x80,0x51,0x3c,0x67,0x00,0x00,0x37,0x21,0xf5,0x20,0x0a,0xa0,0x4a,0x00,
+0x12,0x00,0xe5,0x80,0x57,0x3c,0x24,0x00,0x00,0x29,0x21,0xf5,0x20,0x0a,0xa0,0x4a,
+0x00,0x12,0x00,0xe6,0x80,0x5c,0x3c,0x12,0x00,0x00,0x29,0x21,0xf5,0x20,0x0a,0xa0,
+0x4a,0x00,0x12,0x00,0xe7,0x80,0x63,0x3c,0x62,0x00,0x00,0x29,0x21,0xf5,0x20,0x0a,
+0xa0,0x4a,0x00,0x12,0x00,0xe8,0x80,0x5e,0x3c,0x02,0x00,0x00,0x37,0x21,0xf5,0x20,
+0x0a,0xa0,0x4a,0x00,0x12,0x00,0x92,0x80,0x3c,0x3c,0x7c,0x00,0x00,0x41,0x19,0xf5,
+0x20,0x0b,0xa0,0x4b,0x00,0x12,0x00,0x96,0x80,0x3f,0x3c,0x74,0x00,0x00,0x41,0x19,
+0xf5,0x20,0x0b,0xa0,0x4b,0x00,0x12,0x00,0x99,0x80,0x42,0x3c,0x06,0x00,0x00,0x41,
+0x19,0xf5,0x20,0x0b,0xa0,0x4b,0x00,0x12,0x00,0x8f,0x80,0x44,0x3c,0x14,0x00,0x00,
+0x41,0x19,0xf5,0x20,0x0b,0xa0,0x4b,0x00,0x12,0x00,0x93,0x80,0x47,0x3c,0x22,0x00,
+0x00,0x41,0x19,0xf5,0x20,0x0b,0xa0,0x4b,0x00,0x12,0x00,0x97,0x80,0x4a,0x3c,0x21,
+0x00,0x00,0x41,0x19,0xf5,0x20,0x0b,0xa0,0x4b,0x00,0x12,0x00,0x9a,0x80,0x4e,0x3c,
+0x75,0x00,0x00,0x41,0x19,0xf5,0x20,0x0b,0xa0,0x4b,0x00,0x12,0x00,0x90,0x80,0x51,
+0x3c,0x69,0x00,0x00,0x41,0x19,0xf5,0x20,0x0b,0xa0,0x4b,0x00,0x12,0x00,0x94,0x80,
+0x54,0x3c,0x6f,0x00,0x00,0x41,0x19,0xf5,0x20,0x0b,0xa0,0x4b,0x00,0x12,0x00,0x98,
+0x80,0x57,0x3c,0x66,0x00,0x00,0x41,0x19,0xf5,0x20,0x0b,0xa0,0x4b,0x00,0x12,0x00,
+0x9b,0x80,0x59,0x3c,0x19,0x00,0x00,0x41,0x19,0xf5,0x20,0x0b,0xa0,0x4b,0x00,0x12,
+0x00,0x91,0x80,0x5c,0x3c,0x68,0x00,0x00,0x41,0x19,0xf5,0x20,0x0b,0xa0,0x4b,0x00,
+0x12,0x00,0x95,0x80,0x5e,0x3c,0x04,0x00,0x00,0x41,0x19,0xf5,0x20,0x0b,0xa0,0x4b,
+0x00,0x12,0x00,0xe9,0x80,0x3b,0x3c,0x5d,0x00,0x00,0x43,0x19,0xf4,0x10,0x0b,0xa0,
+0x4c,0x00,0x12,0x00,0xea,0x80,0x3f,0x3c,0x55,0x00,0x00,0x43,0x19,0xf4,0x10,0x0b,
+0xa0,0x4c,0x00,0x12,0x00,0xeb,0x80,0x45,0x3c,0x7d,0x00,0x00,0x43,0x19,0xf4,0x10,
+0x0b,0xa0,0x4c,0x00,0x12,0x00,0xed,0x80,0x4b,0x3c,0x05,0x00,0x00,0x43,0x19,0xf4,
+0x10,0x0b,0xa0,0x4c,0x00,0x12,0x00,0xec,0x80,0x53,0x3c,0x52,0x00,0x00,0x43,0x19,
+0xf4,0x10,0x0b,0xa0,0x4c,0x00,0x12,0x00,0xee,0x80,0x59,0x3c,0x5e,0x00,0x00,0x43,
+0x19,0xf4,0x10,0x0b,0xa0,0x4c,0x00,0x12,0x00,0xef,0x80,0x61,0x3c,0x4d,0x00,0x00,
+0x43,0x19,0xf4,0x10,0x0b,0xa0,0x4c,0x00,0x12,0x00,0xdf,0x80,0x38,0x3c,0x7a,0x00,
+0x00,0x31,0x19,0xf0,0x00,0x0a,0xa0,0x4d,0x00,0x12,0x00,0xe1,0x80,0x41,0x3c,0x70,
+0x00,0x00,0x31,0x19,0xf0,0x00,0x0a,0xa0,0x4d,0x00,0x12,0x00,0xe2,0x80,0x44,0x3c,
+0x7a,0x00,0x00,0x31,0x19,0xf0,0x00,0x0a,0xa0,0x4d,0x00,0x12,0x00,0xe0,0x80,0x49,
+0x3c,0x15,0x00,0x00,0x31,0x19,0xf0,0x00,0x0a,0xa0,0x4d,0x00,0x12,0x00,0x42,0x80,
+0x49,0x3c,0x4d,0x00,0x00,0x19,0x39,0xf4,0x10,0x0a,0xa0,0x4e,0x00,0x12,0x00,0x44,
+0x80,0x4f,0x3c,0x36,0x00,0x00,0x23,0x39,0xf4,0x10,0x0a,0xa0,0x4e,0x00,0x12,0x00,
+0x43,0x80,0x55,0x3c,0x4c,0x00,0x00,0x23,0x39,0xf4,0x10,0x0a,0xa0,0x4e,0x00,0x12,
+0x00,0x46,0x80,0x5b,0x3c,0x36,0x00,0x00,0x23,0x39,0xf4,0x10,0x0a,0xa0,0x4e,0x00,
+0x12,0x00,0x45,0x80,0x61,0x3c,0x4c,0x00,0x00,0x23,0x39,0xf4,0x10,0x0a,0xa0,0x4e,
+0x00,0x12,0x00,0x47,0x80,0x67,0x3c,0x36,0x00,0x00,0x19,0x39,0xf4,0x10,0x0a,0xa0,
+0x4e,0x00,0x12,0x00,0x3c,0x80,0x44,0x3c,0x2a,0x00,0x00,0x3b,0x31,0xf0,0x00,0x09,
+0xa0,0x4f,0x00,0x12,0x00,0x3b,0x80,0x4a,0x3c,0x03,0x00,0x00,0x3b,0x31,0xf0,0x00,
+0x09,0xa0,0x4f,0x00,0x12,0x00,0x3d,0x80,0x50,0x3c,0x14,0x00,0x00,0x3b,0x31,0xf0,
+0x00,0x09,0xa0,0x4f,0x00,0x13,0x00,0x38,0x80,0x2f,0x3c,0x59,0x00,0x00,0x39,0x31,
+0xf0,0x00,0x0b,0xa0,0x50,0x00,0x13,0x00,0x3a,0x80,0x35,0x3c,0x5e,0x00,0x00,0x39,
+0x31,0xf0,0x00,0x0b,0xa0,0x50,0x00,0x13,0x00,0x39,0x80,0x3b,0x3c,0x5e,0x00,0x00,
+0x39,0x31,0xf0,0x00,0x0b,0xa0,0x50,0x00,0x13,0x00,0x9e,0x80,0x3e,0x3c,0x4c,0x00,
+0x00,0x37,0x29,0xf3,0x20,0x0a,0xa0,0x51,0x00,0x13,0x00,0xa0,0x80,0x44,0x3c,0x66,
+0x00,0x00,0x37,0x29,0xf3,0x20,0x0a,0xa0,0x51,0x00,0x13,0x00,0x9f,0x80,0x4b,0x3c,
+0x64,0x00,0x00,0x37,0x29,0xf3,0x20,0x0a,0xa0,0x51,0x00,0x13,0x00,0xa1,0x80,0x55,
+0x3c,0x4d,0x00,0x00,0x37,0x29,0xf3,0x20,0x0a,0xa0,0x51,0x00,0x10,0x00,0x71,0x80,
+0x46,0x3c,0x03,0x00,0x00,0x19,0x38,0xf0,0x00,0x0a,0xa2,0x52,0x00,0x10,0x00,0x72,
+0x80,0x52,0x3c,0x32,0x00,0x00,0x19,0x38,0xf0,0x00,0x0a,0xa2,0x52,0x00,0x10,0x00,
+0x73,0x80,0x5e,0x3c,0x03,0x00,0x00,0x19,0x38,0xf0,0x00,0x0a,0xa2,0x52,0x00,0x10,
+0x00,0x74,0x80,0x5c,0x3c,0x65,0x00,0x00,0x19,0x38,0xf0,0x00,0x0a,0xa2,0x52,0x00,
+0x10,0x00,0x75,0x80,0x61,0x3c,0x4d,0x00,0x00,0x19,0x38,0xf0,0x00,0x0a,0xa2,0x52,
+0x00,0x16,0x00,0x71,0x80,0x46,0x3c,0x03,0x00,0x00,0x23,0x38,0xf0,0x00,0x0a,0xa2,
+0x53,0x00,0x16,0x00,0x72,0x80,0x52,0x3c,0x32,0x00,0x00,0x23,0x38,0xf0,0x00,0x0a,
+0xa2,0x53,0x00,0x16,0x00,0x73,0x80,0x5e,0x3c,0x03,0x00,0x00,0x19,0x38,0xf0,0x00,
+0x0a,0xa2,0x53,0x00,0x10,0x00,0xbd,0x80,0x46,0x3c,0x61,0x00,0x00,0x13,0x30,0x70,
+0x00,0x09,0xa1,0x54,0x00,0x10,0x00,0x77,0x80,0x5a,0x3c,0x77,0x00,0x00,0x21,0x38,
+0xf0,0x00,0x09,0xa3,0x55,0x00,0x13,0x00,0x77,0x80,0x5a,0x3c,0x77,0x00,0x00,0x37,
+0x38,0xf0,0x00,0x09,0xa1,0x56,0x0e,0x10,0x01,0x25,0x81,0x52,0x3c,0x6d,0xfa,0x12,
+0x7f,0x00,0xf0,0x00,0x09,0xa0,0x57,0x00,0x10,0x00,0xab,0x80,0x48,0x3c,0x04,0x00,
+0x00,0x29,0x30,0xf0,0x00,0x0a,0xa3,0x58,0x00,0x12,0x00,0x76,0x80,0x4f,0x3c,0x44,
+0x00,0x00,0x5d,0x28,0x70,0x00,0x09,0xa2,0x59,0x00,0x10,0x00,0xaa,0x80,0x5e,0x3c,
+0x03,0xfb,0x01,0x2d,0x2c,0x70,0x00,0x0a,0xa0,0x5a,0x00,0x10,0x00,0xaa,0x80,0x5e,
+0x3c,0x03,0x00,0x00,0x31,0x29,0x90,0x00,0x0a,0xa1,0x5b,0x30,0x10,0x00,0xcc,0x90,
+0x2b,0x3c,0x3d,0x00,0x00,0x53,0x38,0xc6,0x21,0x09,0xa0,0x5c,0x30,0x10,0x00,0xcd,
+0x80,0x37,0x3c,0x41,0x00,0x00,0x53,0x38,0xc6,0x21,0x09,0xa0,0x5c,0x30,0x10,0x00,
+0xca,0x80,0x43,0x3c,0x40,0x00,0x00,0x53,0x38,0xc6,0x21,0x09,0xa0,0x5c,0x30,0x10,
+0x00,0xcf,0x80,0x4f,0x3c,0x41,0x00,0x00,0x53,0x38,0xc6,0x21,0x09,0xa0,0x5c,0x30,
+0x10,0x00,0xce,0x80,0x5b,0x3c,0x40,0x00,0x00,0x53,0x38,0xc6,0x21,0x09,0xa0,0x5c,
+0x30,0x10,0x00,0xcb,0x80,0x67,0x3c,0x40,0x00,0x00,0x53,0x38,0xc6,0x21,0x09,0xa0,
+0x5c,0xd0,0x10,0x00,0xcc,0x90,0x2b,0x79,0x34,0x00,0x00,0x53,0x08,0xc6,0x21,0x09,
+0xa0,0x5d,0xd0,0x10,0x00,0xcd,0x80,0x37,0x79,0x38,0x00,0x00,0x53,0x08,0xc6,0x21,
+0x09,0xa0,0x5d,0xd0,0x10,0x00,0xca,0x80,0x43,0x79,0x37,0x00,0x00,0x53,0x08,0xc6,
+0x21,0x09,0xa0,0x5d,0xd0,0x10,0x00,0xcf,0x80,0x4f,0x79,0x38,0x00,0x00,0x53,0x08,
+0xc6,0x21,0x09,0xa0,0x5d,0xd0,0x10,0x00,0xce,0x80,0x5b,0x79,0x37,0x00,0x00,0x53,
+0x08,0xc6,0x21,0x09,0xa0,0x5d,0xd0,0x10,0x00,0xcb,0x80,0x67,0x79,0x37,0x00,0x00,
+0x53,0x08,0xc6,0x21,0x09,0xa0,0x5d,0x00,0x10,0x00,0x18,0x81,0x25,0x3c,0x54,0x00,
+0x00,0x37,0x30,0xf2,0x22,0x0a,0xa0,0x5e,0x00,0x10,0x00,0x19,0x81,0x2b,0x3c,0x59,
+0x00,0x00,0x37,0x30,0xf2,0x22,0x0a,0xa0,0x5e,0x00,0x10,0x00,0x1a,0x81,0x31,0x3c,
+0x52,0x00,0x00,0x37,0x30,0xf2,0x22,0x0a,0xa0,0x5e,0x00,0x10,0x00,0x1b,0x81,0x37,
+0x3c,0x59,0x00,0x00,0x37,0x30,0xf2,0x22,0x0a,0xa0,0x5e,0x00,0x10,0x00,0x1c,0x81,
+0x3d,0x3c,0x5f,0x00,0x00,0x37,0x30,0xf2,0x22,0x0a,0xa0,0x5e,0x00,0x10,0x00,0x1d,
+0x81,0x43,0x3c,0x62,0x00,0x00,0x37,0x30,0xf2,0x22,0x0a,0xa0,0x5e,0x00,0x10,0x00,
+0x1e,0x81,0x49,0x3c,0x6d,0x00,0x00,0x37,0x30,0xf2,0x22,0x0a,0xa0,0x5e,0x00,0x10,
+0x00,0x1f,0x81,0x4f,0x3c,0x62,0x00,0x00,0x37,0x30,0xf2,0x22,0x0a,0xa0,0x5e,0x00,
+0x10,0x00,0x20,0x81,0x54,0x3c,0x09,0x00,0x00,0x37,0x30,0xf2,0x22,0x0a,0xa0,0x5e,
+0x00,0x10,0x00,0x21,0x81,0x5b,0x3c,0x3b,0x00,0x00,0x37,0x30,0xf2,0x22,0x0a,0xa0,
+0x5e,0x00,0x10,0x00,0x22,0x81,0x61,0x3c,0x52,0x00,0x00,0x37,0x30,0xf2,0x22,0x0a,
+0xa0,0x5e,0x00,0x10,0x00,0x23,0x81,0x6d,0x3c,0x52,0x00,0x00,0x37,0x30,0xf2,0x22,
+0x0a,0xa0,0x5e,0x00,0x10,0x00,0x18,0x81,0x25,0x3c,0x4a,0x00,0x00,0x37,0x30,0xf2,
+0x22,0x0a,0xa0,0x5e,0x00,0x10,0x00,0x19,0x81,0x2b,0x3c,0x4f,0x00,0x00,0x37,0x30,
+0xf2,0x22,0x0a,0xa0,0x5e,0x00,0x10,0x00,0x1a,0x81,0x31,0x3c,0x48,0x00,0x00,0x37,
+0x30,0xf2,0x22,0x0a,0xa0,0x5e,0x00,0x10,0x00,0x1b,0x81,0x37,0x3c,0x4f,0x00,0x00,
+0x37,0x30,0xf2,0x22,0x0a,0xa0,0x5e,0x00,0x10,0x00,0x1c,0x81,0x3d,0x3c,0x55,0x00,
+0x00,0x37,0x30,0xf2,0x22,0x0a,0xa0,0x5e,0x00,0x10,0x00,0x1d,0x81,0x43,0x3c,0x58,
+0x00,0x00,0x37,0x30,0xf2,0x22,0x0a,0xa0,0x5e,0x00,0x10,0x00,0x1e,0x81,0x49,0x3c,
+0x63,0x00,0x00,0x37,0x30,0xf2,0x22,0x0a,0xa0,0x5e,0x00,0x10,0x00,0x1f,0x81,0x4f,
+0x3c,0x58,0x00,0x00,0x37,0x30,0xf2,0x22,0x0a,0xa0,0x5e,0x00,0x10,0x00,0x20,0x81,
+0x55,0x3c,0x7f,0x00,0x00,0x37,0x30,0xf2,0x22,0x0a,0xa0,0x5e,0x00,0x10,0x00,0x21,
+0x81,0x5b,0x3c,0x31,0x00,0x00,0x37,0x30,0xf2,0x22,0x0a,0xa0,0x5e,0x00,0x10,0x00,
+0x22,0x81,0x61,0x3c,0x48,0x00,0x00,0x37,0x30,0xf2,0x22,0x0a,0xa0,0x5e,0x00,0x10,
+0x00,0x23,0x81,0x6d,0x3c,0x48,0x00,0x00,0x37,0x30,0xf2,0x22,0x0a,0xa0,0x5e,0x00,
+0x10,0x00,0xaa,0x80,0x5e,0x3c,0x03,0x00,0x00,0x3d,0x28,0x90,0x00,0x0a,0xa2,0x5f,
+0x00,0x10,0x00,0x76,0x80,0x4f,0x79,0x44,0x00,0x00,0x49,0x28,0xb0,0x00,0x09,0xa2,
+0x60,0x00,0x12,0x00,0x3a,0x71,0x43,0x3c,0x11,0x00,0x00,0x33,0x2a,0xf0,0x00,0x09,
+0xa1,0x61,0x00,0x10,0x00,0xfe,0x80,0x4f,0x79,0x0c,0x00,0x00,0x41,0x28,0xf3,0x00,
+0x17,0xa0,0x62,0x00,0x12,0x00,0xa5,0x80,0x38,0x3c,0x02,0x00,0x00,0x45,0x33,0xf2,
+0x11,0x09,0xa0,0x63,0x00,0x12,0x00,0xa6,0x80,0x42,0x3c,0x79,0x00,0x00,0x45,0x33,
+0xf2,0x11,0x09,0xa0,0x63,0x00,0x13,0x00,0x18,0x81,0x25,0x79,0x4a,0x00,0x00,0x5b,
+0x2a,0xf2,0x22,0x0e,0xa0,0x64,0x00,0x13,0x00,0x19,0x81,0x2b,0x79,0x4f,0x00,0x00,
+0x5b,0x2a,0xf2,0x22,0x0e,0xa0,0x64,0x00,0x13,0x00,0x1a,0x81,0x31,0x79,0x48,0x00,
+0x00,0x5b,0x2a,0xf2,0x22,0x0e,0xa0,0x64,0x00,0x13,0x00,0x1b,0x81,0x37,0x79,0x4f,
+0x00,0x00,0x5b,0x2a,0xf2,0x22,0x0e,0xa0,0x64,0x00,0x13,0x00,0x1c,0x81,0x3d,0x79,
+0x55,0x00,0x00,0x5b,0x2a,0xf2,0x22,0x0e,0xa0,0x64,0x00,0x13,0x00,0x1d,0x81,0x43,
+0x79,0x58,0x00,0x00,0x5b,0x2a,0xf2,0x22,0x0e,0xa0,0x64,0x00,0x13,0x00,0x1e,0x81,
+0x49,0x79,0x63,0x00,0x00,0x5b,0x2a,0xf2,0x22,0x0e,0xa0,0x64,0x00,0x13,0x00,0x1f,
+0x81,0x4f,0x79,0x58,0x00,0x00,0x5b,0x2a,0xf2,0x22,0x0e,0xa0,0x64,0x00,0x13,0x00,
+0x20,0x81,0x55,0x79,0x7f,0x00,0x00,0x5b,0x2a,0xf2,0x22,0x0e,0xa0,0x64,0x00,0x13,
+0x00,0x21,0x81,0x5b,0x79,0x31,0x00,0x00,0x5b,0x2a,0xf2,0x22,0x0e,0xa0,0x64,0x00,
+0x13,0x00,0x22,0x81,0x61,0x79,0x48,0x00,0x00,0x5b,0x2a,0xf2,0x22,0x0e,0xa0,0x64,
+0x00,0x13,0x00,0x23,0x81,0x6d,0x79,0x48,0x00,0x00,0x5b,0x2a,0xf2,0x22,0x0e,0xa0,
+0x64,0x00,0x10,0x00,0xaa,0x80,0x5e,0x3c,0x0b,0x00,0x00,0x73,0x2e,0x90,0x00,0x0a,
+0xa0,0x65,0x00,0x10,0x00,0x2a,0x80,0x51,0x79,0x52,0x00,0x00,0x27,0x29,0xf0,0x05,
+0x0a,0xa0,0x66,0x00,0x10,0x00,0x18,0x81,0x2a,0x3c,0x54,0x00,0x00,0x2f,0x32,0xf5,
+0x20,0x08,0xa0,0x67,0x00,0x10,0x00,0x19,0x81,0x30,0x3c,0x59,0x00,0x00,0x2f,0x32,
+0xf5,0x20,0x08,0xa0,0x67,0x00,0x10,0x00,0x1a,0x81,0x36,0x3c,0x52,0x00,0x00,0x2f,
+0x32,0xf5,0x20,0x08,0xa0,0x67,0x00,0x10,0x00,0x1b,0x81,0x3c,0x3c,0x59,0x00,0x00,
+0x2f,0x32,0xf5,0x20,0x08,0xa0,0x67,0x00,0x10,0x00,0x1c,0x81,0x42,0x3c,0x5f,0x00,
+0x00,0x2f,0x32,0xf5,0x20,0x08,0xa0,0x67,0x00,0x10,0x00,0x1d,0x81,0x48,0x3c,0x62,
+0x00,0x00,0x2f,0x32,0xf5,0x20,0x08,0xa0,0x67,0x00,0x10,0x00,0x1e,0x81,0x4e,0x3c,
+0x6d,0x00,0x00,0x2f,0x32,0xf5,0x20,0x08,0xa0,0x67,0x00,0x10,0x00,0x1f,0x81,0x54,
+0x3c,0x62,0x00,0x00,0x2f,0x32,0xf5,0x20,0x08,0xa0,0x67,0x00,0x10,0x00,0x20,0x81,
+0x59,0x3c,0x09,0x00,0x00,0x2f,0x32,0xf5,0x20,0x08,0xa0,0x67,0x00,0x10,0x00,0x21,
+0x81,0x60,0x3c,0x3b,0x00,0x00,0x2f,0x32,0xf5,0x20,0x08,0xa0,0x67,0x00,0x10,0x00,
+0x22,0x81,0x66,0x3c,0x52,0x00,0x00,0x2f,0x32,0xf5,0x20,0x08,0xa0,0x67,0x00,0x10,
+0x00,0x23,0x81,0x72,0x3c,0x52,0x00,0x00,0x2f,0x32,0xf5,0x20,0x08,0xa0,0x67,0x00,
+0x10,0x00,0x02,0x90,0x55,0x79,0x57,0x00,0x00,0x47,0x31,0xb3,0x20,0x0b,0xa0,0x68,
+0x00,0x10,0x00,0x17,0x81,0x2d,0x3c,0x6d,0x00,0x00,0x43,0x29,0xf1,0x50,0x08,0xa0,
+0x69,0x00,0x10,0x00,0x18,0x81,0x25,0x79,0x49,0x00,0x00,0x43,0x2a,0xf2,0x20,0x0a,
+0xa0,0x6a,0x00,0x10,0x00,0x19,0x81,0x2b,0x79,0x4e,0x00,0x00,0x43,0x2a,0xf2,0x20,
+0x0a,0xa0,0x6a,0x00,0x10,0x00,0x1a,0x81,0x31,0x79,0x47,0x00,0x00,0x43,0x2a,0xf2,
+0x20,0x0a,0xa0,0x6a,0x00,0x10,0x00,0x1b,0x81,0x37,0x79,0x4e,0x00,0x00,0x43,0x2a,
+0xf2,0x20,0x0a,0xa0,0x6a,0x00,0x10,0x00,0x1c,0x81,0x3d,0x79,0x54,0x00,0x00,0x43,
+0x2a,0xf2,0x20,0x0a,0xa0,0x6a,0x00,0x10,0x00,0x1d,0x81,0x43,0x79,0x57,0x00,0x00,
+0x43,0x2a,0xf2,0x20,0x0a,0xa0,0x6a,0x00,0x10,0x00,0x1e,0x81,0x49,0x79,0x62,0x00,
+0x00,0x43,0x2a,0xf2,0x20,0x0a,0xa0,0x6a,0x00,0x10,0x00,0x1f,0x81,0x4f,0x79,0x57,
+0x00,0x00,0x43,0x2a,0xf2,0x20,0x0a,0xa0,0x6a,0x00,0x10,0x00,0x20,0x81,0x55,0x79,
+0x7e,0x00,0x00,0x43,0x2a,0xf2,0x20,0x0a,0xa0,0x6a,0x00,0x10,0x00,0x21,0x81,0x5b,
+0x79,0x30,0x00,0x00,0x43,0x2a,0xf2,0x20,0x0a,0xa0,0x6a,0x00,0x10,0x00,0x22,0x81,
+0x61,0x79,0x47,0x00,0x00,0x43,0x2a,0xf2,0x20,0x0a,0xa0,0x6a,0x00,0x10,0x00,0x23,
+0x81,0x6d,0x79,0x47,0x00,0x00,0x43,0x2a,0xf2,0x20,0x0a,0xa0,0x6a,0x00,0x12,0x00,
+0x02,0x90,0x55,0x3c,0x55,0x00,0x00,0x5b,0x24,0x80,0x01,0x05,0xa0,0x6b,0x00,0x12,
+0x30,0xf3,0x80,0x4b,0x3c,0x5d,0x00,0x00,0x73,0x23,0xa2,0x14,0x06,0xa1,0x6c,0x20,
+0x10,0x30,0x4e,0x80,0x43,0x3c,0x7a,0x00,0x00,0x6d,0x2a,0x34,0x23,0x05,0xa2,0x6d,
+0xe0,0x10,0x00,0x29,0x80,0x50,0x3c,0x37,0x00,0x00,0x41,0x22,0x31,0x23,0x06,0xa0,
+0x6e,0x00,0x15,0x10,0x18,0x81,0x25,0x3c,0x57,0x00,0x00,0x45,0x23,0xf0,0x20,0x07,
+0xa1,0x6f,0x00,0x15,0x10,0x19,0x81,0x2b,0x3c,0x5c,0x00,0x00,0x45,0x23,0xf0,0x20,
+0x07,0xa1,0x6f,0x00,0x15,0x10,0x1a,0x81,0x31,0x3c,0x55,0x00,0x00,0x45,0x23,0xf0,
+0x20,0x07,0xa1,0x6f,0x00,0x15,0x10,0x1b,0x81,0x37,0x3c,0x5c,0x00,0x00,0x45,0x23,
+0xf0,0x20,0x07,0xa1,0x6f,0x00,0x15,0x10,0x1c,0x81,0x3d,0x3c,0x62,0x00,0x00,0x45,
+0x23,0xf0,0x20,0x07,0xa1,0x6f,0x00,0x15,0x10,0x1d,0x81,0x43,0x3c,0x65,0x00,0x00,
+0x45,0x23,0xf0,0x20,0x07,0xa1,0x6f,0x00,0x15,0x10,0x1e,0x81,0x49,0x3c,0x70,0x00,
+0x00,0x45,0x23,0xf0,0x20,0x07,0xa1,0x6f,0x00,0x15,0x10,0x1f,0x81,0x4f,0x3c,0x65,
+0x00,0x00,0x45,0x23,0xf0,0x20,0x07,0xa1,0x6f,0x00,0x15,0x00,0x20,0x81,0x54,0x3c,
+0x0c,0x00,0x00,0x45,0x23,0xf0,0x20,0x07,0xa1,0x6f,0x00,0x15,0x10,0x21,0x81,0x5b,
+0x3c,0x3e,0x00,0x00,0x45,0x23,0xf0,0x20,0x07,0xa1,0x6f,0x00,0x15,0x10,0x22,0x81,
+0x61,0x3c,0x55,0x00,0x00,0x45,0x23,0xf0,0x20,0x07,0xa1,0x6f,0x00,0x15,0x10,0x23,
+0x81,0x6d,0x3c,0x55,0x00,0x00,0x45,0x23,0xf0,0x20,0x07,0xa1,0x6f,0x00,0x12,0x30,
+0x24,0x71,0x41,0x3c,0x78,0x00,0x00,0x45,0x22,0xe2,0x21,0x08,0xa0,0x70,0x00,0x10,
+0x00,0x18,0x80,0x45,0x3c,0x52,0x00,0x00,0x4f,0x25,0x70,0x00,0x06,0xa0,0x71,0x00,
+0x10,0x00,0x19,0x80,0x4a,0x3c,0x52,0x00,0x00,0x4f,0x25,0x70,0x00,0x06,0xa0,0x71,
+0x00,0x10,0x00,0x1a,0x80,0x51,0x3c,0x56,0x00,0x00,0x4f,0x25,0x70,0x00,0x06,0xa0,
+0x71,0x00,0x10,0x00,0x1b,0x80,0x5b,0x3c,0x55,0x00,0x00,0x4f,0x25,0x70,0x00,0x06,
+0xa0,0x71,0x00,0x10,0x00,0x2a,0x80,0x51,0x79,0x5a,0x00,0x00,0x57,0x24,0x65,0x21,
+0x06,0xa0,0x72,0xf0,0x10,0x00,0x01,0x81,0x47,0x3c,0x76,0x00,0x00,0x41,0x19,0x44,
+0x14,0x16,0xa0,0x73,0x10,0x10,0x00,0xaa,0x80,0x5f,0x79,0x78,0x00,0x00,0x6b,0x19,
+0x40,0x00,0x06,0xa0,0x74,0x00,0x10,0x00,0x0c,0x80,0x36,0x3c,0x5f,0x00,0x00,0x51,
+0x0a,0x60,0x01,0x06,0xa0,0x75,0x00,0x10,0x00,0x0d,0x80,0x42,0x3c,0x68,0x00,0x00,
+0x51,0x0a,0x60,0x01,0x06,0xa0,0x75,0x00,0x10,0x00,0x0e,0x80,0x4a,0x3c,0x61,0x00,
+0x00,0x51,0x0a,0x60,0x01,0x06,0xa0,0x75,0x00,0x10,0x00,0x0f,0x80,0x56,0x3c,0x61,
+0x00,0x00,0x51,0x0a,0x60,0x01,0x06,0xa0,0x75,0x00,0x10,0x00,0x3f,0x80,0x4b,0x79,
+0x40,0x00,0x00,0x59,0x31,0x65,0x12,0x07,0xa0,0x76,0x00,0x10,0x00,0x24,0x71,0x40,
+0x3c,0x06,0x00,0x00,0x59,0x1a,0x85,0x23,0x08,0xa0,0x77,0x00,0x10,0x00,0x2a,0x80,
+0x51,0x79,0x4f,0x00,0x00,0x3f,0x1b,0xc0,0x05,0x06,0xa0,0x78,0x00,0x10,0x70,0xd3,
+0x80,0x25,0x3c,0x4c,0x00,0x00,0x29,0x19,0x33,0x11,0x06,0xa0,0x79,0x00,0x10,0x70,
+0xda,0x80,0x2b,0x3c,0x55,0x00,0x00,0x29,0x19,0x33,0x11,0x06,0xa0,0x79,0x00,0x10,
+0x70,0xd4,0x80,0x31,0x3c,0x4c,0x00,0x00,0x29,0x19,0x33,0x11,0x06,0xa0,0x79,0x00,
+0x10,0x70,0xdb,0x80,0x37,0x3c,0x47,0x00,0x00,0x29,0x19,0x33,0x11,0x06,0xa0,0x79,
+0x00,0x10,0x70,0xd5,0x80,0x3d,0x3c,0x60,0x00,0x00,0x29,0x19,0x33,0x11,0x06,0xa0,
+0x79,0x00,0x10,0x70,0xdc,0x80,0x43,0x3c,0x4f,0x00,0x00,0x29,0x19,0x33,0x11,0x06,
+0xa0,0x79,0x00,0x10,0x70,0xd6,0x80,0x49,0x3c,0x53,0x00,0x00,0x29,0x19,0x33,0x11,
+0x06,0xa0,0x79,0x00,0x10,0x70,0xdd,0x80,0x4f,0x3c,0x63,0x00,0x00,0x29,0x19,0x33,
+0x11,0x06,0xa0,0x79,0x00,0x10,0x70,0xd7,0x80,0x54,0x3c,0x0a,0x00,0x00,0x29,0x19,
+0x33,0x11,0x06,0xa0,0x79,0x00,0x10,0x70,0xde,0x80,0x5b,0x3c,0x3d,0x00,0x00,0x29,
+0x19,0x33,0x11,0x06,0xa0,0x79,0x00,0x10,0x70,0xd8,0x80,0x61,0x3c,0x53,0x00,0x00,
+0x29,0x19,0x33,0x11,0x06,0xa0,0x79,0x00,0x10,0x70,0xd9,0x80,0x6d,0x3c,0x53,0x00,
+0x00,0x29,0x19,0x33,0x11,0x06,0xa0,0x79,0x00,0x10,0x70,0xd3,0x80,0x25,0x3c,0x40,
+0x00,0x00,0x29,0x18,0x33,0x11,0x06,0xa0,0x7a,0x00,0x10,0x70,0xda,0x80,0x2b,0x3c,
+0x49,0x00,0x00,0x29,0x18,0x33,0x11,0x06,0xa0,0x7a,0x00,0x10,0x70,0xd4,0x80,0x31,
+0x3c,0x40,0x00,0x00,0x29,0x18,0x33,0x11,0x06,0xa0,0x7a,0x00,0x10,0x70,0xdb,0x80,
+0x37,0x3c,0x3b,0x00,0x00,0x29,0x18,0x33,0x11,0x06,0xa0,0x7a,0x00,0x10,0x70,0xd5,
+0x80,0x3d,0x3c,0x54,0x00,0x00,0x29,0x18,0x33,0x11,0x06,0xa0,0x7a,0x00,0x10,0x70,
+0xdc,0x80,0x43,0x3c,0x43,0x00,0x00,0x29,0x18,0x33,0x11,0x06,0xa0,0x7a,0x00,0x10,
+0x70,0xd6,0x80,0x49,0x3c,0x47,0x00,0x00,0x29,0x18,0x33,0x11,0x06,0xa0,0x7a,0x00,
+0x10,0x70,0xdd,0x80,0x4f,0x3c,0x57,0x00,0x00,0x29,0x18,0x33,0x11,0x06,0xa0,0x7a,
+0x00,0x10,0x70,0xd7,0x80,0x55,0x3c,0x7e,0x00,0x00,0x29,0x18,0x33,0x11,0x06,0xa0,
+0x7a,0x00,0x10,0x70,0xde,0x80,0x5b,0x3c,0x31,0x00,0x00,0x29,0x18,0x33,0x11,0x06,
+0xa0,0x7a,0x00,0x10,0x70,0xd8,0x80,0x61,0x3c,0x47,0x00,0x00,0x29,0x18,0x33,0x11,
+0x06,0xa0,0x7a,0x00,0x10,0x70,0xd9,0x80,0x6d,0x3c,0x47,0x00,0x00,0x29,0x18,0x33,
+0x11,0x06,0xa0,0x7a,0x00,0x10,0x00,0x4e,0x80,0x43,0x3c,0x71,0xfd,0x01,0x33,0x22,
+0xa3,0x63,0x17,0xa0,0x7b,0x00,0x10,0x30,0x43,0x61,0x47,0x5b,0x7d,0x2b,0x2a,0x91,
+0x2a,0xf0,0x05,0x05,0x20,0x7c,0x00,0x10,0x00,0x02,0x90,0x55,0x3c,0x55,0x00,0x00,
+0x49,0x2a,0x60,0x01,0x05,0xa0,0x7d,0x00,0x10,0x30,0xf3,0x70,0x57,0x79,0x48,0x00,
+0x00,0x57,0x2d,0x52,0x14,0x06,0xa2,0x7e,0x00,0x10,0x00,0xf3,0x70,0x52,0x3c,0x62,
+0x00,0x00,0x47,0x33,0xf6,0x25,0x25,0xa0,0x7f,0x00,0x10,0x00,0x6d,0x80,0x32,0x3c,
+0x5e,0x00,0x00,0x53,0x3b,0x85,0x24,0x06,0xa0,0x80,0x00,0x10,0x00,0x6e,0x80,0x3e,
+0x3c,0x65,0x00,0x00,0x53,0x3b,0x85,0x24,0x06,0xa0,0x80,0x09,0x10,0x00,0x6f,0x80,
+0x4a,0x3c,0x73,0x00,0x00,0x53,0x3b,0x85,0x24,0x06,0xa0,0x80,0x00,0x12,0x00,0x02,
+0x90,0x55,0x3c,0x5d,0x00,0x00,0x37,0x32,0x73,0x22,0x06,0xa1,0x81,0x05,0x12,0x00,
+0xb3,0x80,0x36,0x79,0x74,0x00,0x00,0x3d,0x32,0xf5,0x34,0x07,0xa2,0x82,0x0c,0x12,
+0x00,0xb7,0x80,0x41,0x79,0x7f,0x00,0x00,0x3d,0x32,0xf5,0x34,0x07,0xa2,0x82,0x00,
+0x12,0x00,0xb5,0x80,0x48,0x79,0x6d,0x00,0x00,0x3d,0x32,0xf6,0x34,0x07,0xa2,0x82,
+0x00,0x12,0x00,0xb4,0x80,0x4e,0x79,0x74,0x00,0x00,0x3d,0x32,0xf6,0x35,0x07,0xa2,
+0x82,0x00,0x12,0x00,0xb6,0x80,0x57,0x79,0x63,0x00,0x00,0x3d,0x32,0xf6,0x35,0x17,
+0xa2,0x82,0x00,0x10,0x00,0x37,0x91,0x4f,0x3c,0x65,0x00,0x00,0x41,0x2a,0xf5,0x18,
+0x08,0xa0,0x83,0x00,0x10,0x00,0x2a,0x80,0x51,0x79,0x59,0x00,0x00,0x37,0x29,0xc0,
+0x05,0x05,0xa0,0x84,0xf0,0x10,0x00,0x02,0x90,0x55,0x3c,0x55,0x00,0x00,0x35,0x2a,
+0x30,0x00,0x05,0xa0,0x85,0x10,0x10,0x30,0x09,0x70,0x44,0x52,0x52,0xef,0x01,0xc3,
+0x0c,0x20,0x00,0x06,0x20,0x86,0x00,0x10,0x00,0x2a,0x80,0x51,0x3c,0x5f,0x00,0x00,
+0x51,0x2b,0xf5,0x21,0x06,0xa0,0x87,0x00,0x10,0x00,0x24,0x71,0x41,0x79,0x7b,0x00,
+0x00,0x51,0x2b,0x85,0x23,0x07,0xa0,0x88,0x00,0x10,0x30,0x0c,0x80,0x36,0x3c,0x5c,
+0x00,0x00,0x01,0x2b,0x90,0x05,0x06,0xa3,0x89,0x00,0x10,0x30,0x0d,0x80,0x42,0x3c,
+0x65,0x00,0x00,0x01,0x2b,0x90,0x05,0x06,0xa3,0x89,0x00,0x10,0x30,0x0e,0x80,0x4a,
+0x3c,0x5e,0x00,0x00,0x01,0x2b,0x90,0x05,0x06,0xa3,0x89,0x00,0x10,0x30,0x0f,0x80,
+0x56,0x3c,0x5e,0x00,0x00,0x01,0x2b,0x90,0x05,0x06,0xa3,0x89,0x00,0x10,0x00,0x02,
+0x90,0x55,0x3c,0x52,0x00,0x00,0x01,0x22,0x80,0x01,0x05,0xa0,0x8a,0x00,0x10,0x00,
+0x0f,0x81,0x4a,0x3c,0x78,0x00,0x00,0x01,0x32,0xf4,0x15,0x16,0xa1,0x8b,0x00,0x10,
+0x00,0x13,0x80,0x40,0x3c,0x75,0x00,0x00,0x23,0x38,0xf0,0x05,0x09,0xa0,0x8c,0x00,
+0x10,0x00,0x14,0x80,0x45,0x3c,0x51,0x00,0x00,0x23,0x38,0xf0,0x05,0x09,0xa0,0x8c,
+0x00,0x10,0x00,0x12,0x80,0x49,0x3c,0x68,0x00,0x00,0x23,0x38,0xf0,0x05,0x09,0xa0,
+0x8c,0x00,0x10,0x00,0x15,0x80,0x50,0x3c,0x66,0x00,0x00,0x23,0x38,0xf0,0x05,0x09,
+0xa0,0x8c,0x00,0x10,0x00,0x17,0x80,0x57,0x3c,0x25,0x00,0x00,0x23,0x38,0xf0,0x05,
+0x09,0xa0,0x8c,0x00,0x10,0x00,0x16,0x80,0x5f,0x3c,0x20,0x00,0x00,0x23,0x38,0xf0,
+0x05,0x09,0xa0,0x8c,0x00,0x10,0x20,0x0e,0x81,0x52,0x3c,0x09,0x00,0x00,0x07,0x28,
+0xf7,0x35,0x45,0xa2,0x8d,0x00,0x12,0x00,0xa9,0x80,0x4c,0x3c,0x01,0x00,0x00,0x39,
+0x20,0xf0,0x04,0x07,0xa0,0x8e,0x00,0x10,0x00,0x37,0x81,0x4f,0x3c,0x65,0x00,0x00,
+0x31,0x38,0xf5,0x18,0x08,0xa0,0x8f,0x00,0x12,0x20,0xa4,0x80,0x30,0x3c,0x43,0x00,
+0x00,0x1f,0x1c,0xf0,0x00,0x09,0xa0,0x90,0x00,0x10,0x20,0xa7,0x80,0x30,0x61,0x40,
+0x00,0x00,0x1f,0x19,0xf0,0x00,0x09,0xa0,0x91,0x00,0x10,0x20,0xa8,0x80,0x4f,0x61,
+0x31,0x00,0x00,0x1f,0x19,0xf0,0x00,0x09,0xa0,0x91,0x00,0x12,0x00,0x05,0x81,0x44,
+0x3c,0x66,0x00,0x00,0x35,0x31,0xf3,0x20,0x09,0xa0,0x92,0x00,0x12,0x00,0x02,0x81,
+0x47,0x3c,0x52,0x00,0x00,0x35,0x31,0xf3,0x20,0x09,0xa0,0x92,0x00,0x12,0x00,0x06,
+0x81,0x4c,0x3c,0x64,0x00,0x00,0x35,0x31,0xf3,0x20,0x09,0xa0,0x92,0x00,0x12,0x00,
+0x07,0x81,0x4c,0x3c,0x01,0x00,0x00,0x35,0x31,0xf3,0x20,0x09,0xa0,0x92,0x00,0x12,
+0x00,0x08,0x81,0x50,0x3c,0x3c,0x00,0x00,0x35,0x31,0xf3,0x20,0x09,0xa0,0x92,0x00,
+0x12,0x00,0x0a,0x81,0x55,0x3c,0x4d,0x00,0x00,0x35,0x31,0xf3,0x20,0x09,0xa0,0x92,
+0x00,0x12,0x00,0x0b,0x81,0x57,0x3c,0x64,0x00,0x00,0x35,0x31,0xf3,0x20,0x09,0xa0,
+0x92,0x00,0x12,0x00,0x0c,0x81,0x58,0x3c,0x22,0x00,0x00,0x35,0x31,0xf3,0x20,0x09,
+0xa0,0x92,0x00,0x12,0x00,0x0d,0x81,0x5b,0x3c,0x36,0x00,0x00,0x35,0x31,0xf3,0x20,
+0x09,0xa0,0x92,0x00,0x12,0x00,0x09,0x81,0x5e,0x3c,0x61,0x00,0x00,0x35,0x31,0xf3,
+0x20,0x09,0xa0,0x92,0x00,0x13,0x00,0x41,0x90,0x42,0x3c,0x62,0x00,0x00,0x3b,0x31,
+0x95,0x20,0x09,0xa0,0x93,0x00,0x10,0x00,0xf3,0x70,0x52,0x3c,0x5d,0x00,0x00,0x37,
+0x3b,0xd6,0x25,0x25,0xa0,0x94,0x00,0x10,0x00,0x37,0x91,0x4c,0x6e,0x65,0x00,0x00,
+0x99,0x3b,0xf5,0x18,0x08,0xa0,0x95,0x00,0x10,0x00,0x0b,0x80,0x59,0x3c,0x6a,0x00,
+0x00,0x2d,0x38,0xf0,0x00,0x09,0xa0,0x96,0x00,0x10,0x00,0xfe,0x80,0x4f,0x3c,0x16,
+0x00,0x00,0x35,0x38,0xf3,0x06,0x17,0xa1,0x04,0x00,0x10,0x00,0x00,0xa1,0x39,0x74,
+0x42,0x00,0x00,0xab,0x38,0xb0,0x05,0x16,0xa1,0x04,0x07,0x10,0x00,0x2c,0x80,0x55,
+0x3c,0x53,0x00,0x00,0x2b,0x00,0xf0,0x00,0x09,0x50,0x04,0x00,0x10,0x10,0x3e,0x50,
+0x3f,0x3c,0x6a,0x00,0x00,0x21,0x38,0xf0,0x04,0x04,0x50,0x04,0x00,0x10,0x00,0xc7,
+0x80,0x3a,0x3c,0x52,0x00,0x00,0x1b,0x38,0xf0,0x05,0x01,0x50,0x04,0x00,0x10,0x00,
+0x26,0x80,0x4e,0x3c,0x7a,0x00,0x00,0x2f,0x38,0xf0,0x04,0x04,0x50,0x04,0x00,0x10,
+0x00,0x31,0x80,0x4c,0x3c,0x6a,0x00,0x00,0x01,0x38,0x3a,0xf0,0x09,0x50,0x04,0x00,
+0x10,0x00,0x38,0x81,0x43,0x3c,0x52,0x00,0x00,0x5f,0x38,0xf0,0x00,0x09,0xa0,0x04,
+0x0e,0x10,0x01,0x25,0x81,0x4b,0x3c,0x6d,0x00,0x00,0x2f,0x38,0xf0,0x00,0x09,0xa0,
+0x04,0xe0,0x10,0x00,0x08,0x80,0x55,0x3c,0x55,0x00,0x00,0x01,0x00,0x20,0x03,0x04,
+0x20,0x04,0x24,0x10,0x01,0x37,0x80,0x4a,0x3c,0x6a,0x00,0x00,0x01,0x00,0x20,0x04,
+0x05,0x20,0x04,0xc0,0x10,0x00,0x09,0x70,0x37,0xba,0x52,0xbf,0x50,0x3d,0x0f,0x22,
+0x12,0x07,0x08,0x04,0x40,0x10,0x00,0x09,0x70,0x46,0xbc,0x52,0x0f,0x32,0x51,0x15,
+0x72,0x12,0x07,0x08,0x04,0x00,0x10,0x00,0x03,0x80,0x50,0x3c,0x52,0x00,0x00,0x31,
+0x00,0xf0,0x00,0x0f,0x10,0x04,0xe0,0x10,0x00,0x01,0x80,0x55,0x3c,0x55,0x00,0x00,
+0x1f,0x08,0x30,0x01,0x07,0x10,0x04,0x24,0x10,0x04,0x37,0x80,0x4a,0x3c,0x6a,0x00,
+0x00,0x89,0x00,0x30,0x01,0x07,0x10,0x04,0xa0,0x10,0x00,0x36,0x80,0x49,0x3c,0x01,
+0xf1,0x02,0x3b,0x0f,0x40,0x01,0x07,0x20,0x04,0x60,0x10,0x00,0x36,0x80,0x4e,0x3e,
+0x70,0xf9,0x02,0x39,0x07,0x40,0x01,0x07,0x08,0x04,0x00,0x10,0x10,0x39,0x81,0x56,
+0x3c,0x6a,0x00,0x00,0x0f,0x38,0xf0,0x03,0x03,0x20,0x04,0x00,0x15,0x20,0x67,0x80,
+0x62,0x3c,0x5b,0x00,0x00,0x01,0x32,0xf4,0x15,0x16,0xa1,0x8b,0x7f,0x7d,0x7c,0x7a,
+0x78,0x77,0x75,0x73,0x71,0x70,0x6e,0x6c,0x6b,0x69,0x67,0x66,0x64,0x62,0x60,0x5e,
+0x5c,0x5b,0x59,0x57,0x55,0x53,0x51,0x4f,0x4d,0x4c,0x4a,0x48,0x46,0x45,0x44,0x43,
+0x42,0x41,0x3f,0x3e,0x3d,0x3c,0x3b,0x3a,0x39,0x38,0x37,0x36,0x34,0x33,0x32,0x31,
+0x30,0x2f,0x2e,0x2d,0x2c,0x2b,0x2a,0x28,0x27,0x26,0x25,0x24,0x23,0x22,0x22,0x21,
+0x20,0x20,0x1f,0x1e,0x1e,0x1d,0x1c,0x1c,0x1b,0x1a,0x1a,0x19,0x18,0x18,0x17,0x17,
+0x16,0x15,0x15,0x14,0x13,0x13,0x12,0x11,0x11,0x10,0x0f,0x0f,0x0e,0x0e,0x0d,0x0d,
+0x0c,0x0c,0x0b,0x0b,0x0a,0x0a,0x09,0x09,0x09,0x08,0x08,0x07,0x07,0x06,0x06,0x05,
+0x05,0x05,0x04,0x04,0x03,0x03,0x02,0x02,0x01,0x01,0x00,0x00,0x7f,0x7e,0x7e,0x7d,
+0x7c,0x7c,0x7b,0x7b,0x7a,0x79,0x79,0x78,0x77,0x77,0x76,0x76,0x75,0x74,0x72,0x71,
+0x70,0x6f,0x6d,0x6c,0x6b,0x6a,0x68,0x67,0x66,0x65,0x63,0x62,0x61,0x60,0x5e,0x5d,
+0x5c,0x5a,0x59,0x58,0x56,0x55,0x54,0x53,0x51,0x50,0x4f,0x4d,0x4c,0x4b,0x49,0x48,
+0x47,0x45,0x44,0x43,0x41,0x40,0x3f,0x3e,0x3c,0x3b,0x3a,0x38,0x37,0x36,0x35,0x34,
+0x33,0x32,0x32,0x31,0x30,0x2f,0x2e,0x2d,0x2c,0x2b,0x2a,0x29,0x28,0x28,0x27,0x26,
+0x25,0x24,0x23,0x22,0x21,0x20,0x1f,0x1f,0x1e,0x1d,0x1c,0x1b,0x1a,0x19,0x18,0x17,
+0x17,0x16,0x15,0x14,0x13,0x12,0x12,0x11,0x10,0x0f,0x0e,0x0d,0x0d,0x0c,0x0b,0x0a,
+0x09,0x08,0x08,0x07,0x06,0x05,0x04,0x03,0x03,0x02,0x01,0x00,0x7f,0x7d,0x7c,0x7a,
+0x78,0x77,0x75,0x73,0x71,0x70,0x6e,0x6c,0x6b,0x69,0x67,0x66,0x64,0x62,0x5f,0x5d,
+0x5b,0x58,0x56,0x54,0x51,0x4f,0x4d,0x4b,0x48,0x46,0x44,0x41,0x3f,0x3e,0x3d,0x3c,
+0x3a,0x39,0x38,0x37,0x36,0x35,0x34,0x33,0x31,0x30,0x2f,0x2e,0x2d,0x2c,0x2b,0x2a,
+0x28,0x27,0x26,0x25,0x24,0x23,0x22,0x21,0x1f,0x1e,0x1d,0x1c,0x1b,0x1a,0x1a,0x19,
+0x19,0x18,0x18,0x17,0x16,0x16,0x15,0x15,0x14,0x14,0x13,0x13,0x12,0x11,0x11,0x10,
+0x10,0x0f,0x0f,0x0e,0x0d,0x0d,0x0c,0x0c,0x0b,0x0b,0x0a,0x0a,0x09,0x09,0x08,0x08,
+0x08,0x08,0x07,0x07,0x07,0x06,0x06,0x06,0x06,0x05,0x05,0x05,0x04,0x04,0x04,0x03,
+0x03,0x03,0x03,0x02,0x02,0x02,0x01,0x01,0x01,0x01,0x00,0x00,0x7f,0x7e,0x7d,0x7c,
+0x7b,0x7a,0x79,0x78,0x77,0x77,0x76,0x75,0x74,0x73,0x72,0x71,0x70,0x6f,0x6d,0x6c,
+0x6b,0x69,0x68,0x67,0x65,0x64,0x63,0x62,0x60,0x5f,0x5e,0x5c,0x5b,0x59,0x57,0x55,
+0x53,0x52,0x50,0x4e,0x4c,0x4a,0x48,0x46,0x44,0x43,0x41,0x3f,0x3d,0x3b,0x39,0x37,
+0x35,0x34,0x32,0x30,0x2e,0x2c,0x2a,0x28,0x26,0x25,0x23,0x21,0x1f,0x1e,0x1e,0x1d,
+0x1c,0x1c,0x1b,0x1a,0x1a,0x19,0x18,0x18,0x17,0x16,0x16,0x15,0x14,0x14,0x13,0x13,
+0x12,0x11,0x11,0x10,0x0f,0x0f,0x0e,0x0d,0x0d,0x0c,0x0b,0x0b,0x0a,0x0a,0x09,0x09,
+0x09,0x08,0x08,0x08,0x07,0x07,0x07,0x06,0x06,0x06,0x05,0x05,0x05,0x05,0x04,0x04,
+0x04,0x03,0x03,0x03,0x02,0x02,0x02,0x01,0x01,0x01,0x00,0x00,0x7f,0x7f,0x7f,0x7f,
+0x7f,0x7f,0x7f,0x7f,0x7f,0x7f,0x7f,0x7f,0x7f,0x7f,0x7f,0x7f,0x7f,0x7f,0x7f,0x7f,
+0x7f,0x7f,0x7f,0x7f,0x7f,0x7f,0x7f,0x7f,0x7f,0x7f,0x7f,0x7f,0x7f,0x7f,0x7f,0x7f,
+0x7f,0x7f,0x7f,0x7f,0x7f,0x7f,0x7f,0x7f,0x7f,0x7f,0x7f,0x7f,0x7f,0x7f,0x7f,0x7f,
+0x7f,0x7f,0x7f,0x7f,0x7f,0x7f,0x7f,0x7f,0x7f,0x7f,0x7f,0x7f,0x7f,0x7f,0x7f,0x7f,
+0x7f,0x7f,0x7f,0x7f,0x7f,0x7f,0x7f,0x7f,0x7f,0x7f,0x7f,0x7f,0x7f,0x7f,0x7f,0x7f,
+0x7f,0x7f,0x7f,0x7f,0x7f,0x7f,0x7f,0x7f,0x7f,0x7f,0x7f,0x7f,0x7f,0x7f,0x7f,0x7f,
+0x0b,0x0b,0x0a,0x0a,0x0a,0x09,0x09,0x08,0x08,0x08,0x07,0x07,0x06,0x06,0x05,0x05,
+0x05,0x04,0x04,0x03,0x03,0x03,0x02,0x02,0x01,0x01,0x00,0x00,0x7f,0x7d,0x7c,0x7a,
+0x78,0x77,0x75,0x74,0x72,0x70,0x6f,0x6d,0x6b,0x6a,0x68,0x67,0x65,0x63,0x61,0x5f,
+0x5d,0x5c,0x5a,0x58,0x56,0x54,0x52,0x50,0x4e,0x4d,0x4b,0x49,0x47,0x46,0x45,0x44,
+0x43,0x42,0x40,0x3f,0x3e,0x3d,0x3c,0x3b,0x3a,0x39,0x38,0x37,0x35,0x34,0x33,0x32,
+0x31,0x30,0x2f,0x2e,0x2d,0x2c,0x2b,0x29,0x28,0x27,0x26,0x25,0x24,0x23,0x23,0x22,
+0x21,0x21,0x20,0x1f,0x1f,0x1e,0x1d,0x1d,0x1c,0x1b,0x1b,0x1a,0x19,0x19,0x18,0x18,
+0x17,0x16,0x16,0x15,0x15,0x14,0x13,0x13,0x12,0x11,0x11,0x10,0x0f,0x0d,0x0c,0x0c,
+0x7f,0x7f,0x7f,0x7f,0x7f,0x7f,0x7f,0x7f,0x7f,0x7f,0x7f,0x7f,0x7f,0x7f,0x7f,0x7f,
+0x7f,0x7f,0x7f,0x7f,0x7f,0x7f,0x7f,0x7f,0x7f,0x7f,0x7f,0x7f,0x7f,0x7c,0x79,0x77,
+0x74,0x71,0x6e,0x6c,0x69,0x65,0x62,0x5e,0x5b,0x57,0x54,0x50,0x4d,0x4b,0x48,0x46,
+0x44,0x42,0x3f,0x3d,0x3b,0x3a,0x39,0x38,0x36,0x35,0x34,0x33,0x32,0x31,0x30,0x2f,
+0x2e,0x2d,0x2c,0x2b,0x2a,0x29,0x28,0x27,0x26,0x26,0x25,0x24,0x23,0x22,0x21,0x20,
+0x1f,0x1f,0x1e,0x1d,0x1c,0x1b,0x1a,0x19,0x18,0x18,0x17,0x16,0x15,0x14,0x14,0x13,
+0x12,0x12,0x11,0x11,0x10,0x0f,0x0f,0x0e,0x0e,0x0d,0x0d,0x0d,0x0d,0x0c,0x0c,0x0b,
+0x0b,0x0b,0x0a,0x0a,0x09,0x09,0x08,0x08,0x08,0x07,0x07,0x07,0x07,0x06,0x06,0x06,
+0x06,0x05,0x05,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x03,0x03,0x03,0x02,0x02,0x02,
+0x02,0x02,0x02,0x02,0x01,0x01,0x01,0x00,0x00,0x00,0x00,0x00,0x7f,0x7c,0x7a,0x78,
+0x76,0x74,0x72,0x70,0x6d,0x6a,0x68,0x65,0x63,0x60,0x5d,0x5b,0x58,0x56,0x53,0x51,
+0x4f,0x4d,0x4a,0x48,0x46,0x44,0x43,0x41,0x3f,0x3d,0x3c,0x3a,0x38,0x37,0x36,0x35,
+0x34,0x33,0x32,0x31,0x30,0x2f,0x2e,0x2d,0x2b,0x2b,0x2a,0x29,0x28,0x27,0x26,0x25,
+0x23,0x23,0x22,0x21,0x20,0x1f,0x1e,0x1d,0x1b,0x1b,0x1a,0x19,0x18,0x17,0x17,0x16,
+0x15,0x15,0x14,0x14,0x13,0x12,0x12,0x11,0x11,0x10,0x10,0x10,0x0f,0x0e,0x0e,0x0d,
+0x0d,0x0d,0x0c,0x0c,0x0b,0x0b,0x0a,0x0a,0x09,0x09,0x08,0x08,0x08,0x07,0x07,0x07,
+0x07,0x06,0x06,0x05,0x05,0x05,0x05,0x05,0x05,0x04,0x04,0x04,0x03,0x03,0x03,0x02,
+0x02,0x02,0x02,0x02,0x01,0x01,0x01,0x00,0x00,0x00,0x00,0x00,0x0a,0x00,0x00,0x00,
+0x14,0x27,0x4c,0x41,0x28,0x2d,0x4c,0x52,0x2e,0x33,0x4c,0x63,0x34,0x39,0x4c,0x74,
+0x3a,0x3f,0x4c,0x85,0x40,0x45,0x4c,0x96,0x46,0x4b,0x4c,0xa7,0x4c,0x52,0x4c,0xb8,
+0x53,0x58,0x4c,0xc9,0x59,0x6d,0x4c,0xda,0x0a,0x00,0x00,0x00,0x14,0x2d,0x4c,0xeb,
+0x2e,0x33,0x4c,0xfc,0x34,0x39,0x4d,0x0d,0x3a,0x3f,0x4d,0x1e,0x40,0x45,0x4d,0x2f,
+0x46,0x4b,0x4d,0x40,0x4c,0x52,0x4d,0x51,0x53,0x58,0x4d,0x62,0x59,0x5e,0x4d,0x73,
+0x5f,0x6d,0x4d,0x84,0x0b,0x00,0x00,0x00,0x14,0x2d,0x4d,0x95,0x2e,0x33,0x4d,0xa6,
+0x34,0x39,0x4d,0xb7,0x3a,0x3f,0x4d,0xc8,0x40,0x45,0x4d,0xd9,0x46,0x4b,0x4d,0xea,
+0x4c,0x52,0x4d,0xfb,0x53,0x58,0x4e,0x0c,0x59,0x5e,0x4e,0x1d,0x5f,0x6d,0x4e,0x2e,
+0x00,0x7f,0x4e,0x3f,0x14,0x00,0x00,0x00,0x14,0x27,0x4e,0x50,0x28,0x2d,0x4e,0x61,
+0x2e,0x33,0x4e,0x72,0x34,0x39,0x4e,0x83,0x3a,0x3f,0x4e,0x94,0x40,0x45,0x4e,0xa5,
+0x46,0x4b,0x4e,0xb6,0x4c,0x52,0x4e,0xc7,0x53,0x58,0x4e,0xd8,0x59,0x6d,0x4e,0xe9,
+0x14,0x27,0x4e,0xfa,0x28,0x2d,0x4f,0x0b,0x2e,0x33,0x4f,0x1c,0x34,0x39,0x4f,0x2d,
+0x3a,0x3f,0x4f,0x3e,0x40,0x45,0x4f,0x4f,0x46,0x4b,0x4f,0x60,0x4c,0x52,0x4f,0x71,
+0x53,0x58,0x4f,0x82,0x59,0x6d,0x4f,0x93,0x02,0x00,0x00,0x00,0x00,0x7f,0x4f,0xb5,
+0x15,0x6c,0x4f,0xa4,0x14,0x00,0x00,0x00,0x14,0x27,0x4f,0xc6,0x28,0x2d,0x4f,0xd7,
+0x2e,0x33,0x4f,0xe8,0x34,0x39,0x4f,0xf9,0x3a,0x3f,0x50,0x0a,0x40,0x45,0x50,0x1b,
+0x46,0x4b,0x50,0x2c,0x4c,0x52,0x50,0x3d,0x53,0x58,0x50,0x4e,0x59,0x6d,0x50,0x5f,
+0x14,0x2d,0x50,0x70,0x2e,0x33,0x50,0x81,0x34,0x39,0x50,0x92,0x3a,0x3f,0x50,0xa3,
+0x40,0x45,0x50,0xb4,0x46,0x4b,0x50,0xc5,0x4c,0x52,0x50,0xd6,0x53,0x58,0x50,0xe7,
+0x59,0x5e,0x50,0xf8,0x5f,0x6d,0x51,0x09,0x05,0x00,0x00,0x00,0x15,0x39,0x51,0x1a,
+0x3a,0x3f,0x51,0x2b,0x40,0x45,0x51,0x3c,0x46,0x4d,0x51,0x4d,0x4e,0x6c,0x51,0x5e,
+0x02,0x00,0x00,0x00,0x15,0x51,0x51,0x6f,0x52,0x6c,0x51,0x80,0x01,0x00,0x00,0x00,
+0x15,0x6c,0x51,0x91,0x01,0x00,0x00,0x00,0x15,0x6c,0x51,0xa2,0x02,0x00,0x00,0x00,
+0x15,0x6c,0x51,0xb3,0x15,0x6c,0x51,0xc4,0x01,0x00,0x00,0x00,0x15,0x6c,0x51,0xd5,
+0x04,0x00,0x00,0x00,0x15,0x3f,0x51,0xe6,0x40,0x4c,0x51,0xf7,0x4d,0x5a,0x52,0x08,
+0x5b,0x7f,0x52,0x19,0x01,0x00,0x00,0x00,0x00,0x7f,0x52,0x2a,0x01,0x00,0x00,0x00,
+0x01,0x7f,0x52,0x3b,0x02,0x00,0x00,0x00,0x00,0x7f,0x52,0x4c,0x00,0x7f,0x52,0x5d,
+0x01,0x00,0x00,0x00,0x01,0x7f,0x52,0x6e,0x02,0x00,0x00,0x00,0x15,0x3b,0x52,0x7f,
+0x3c,0x6c,0x52,0x90,0x05,0x00,0x00,0x00,0x15,0x30,0x52,0xa1,0x31,0x3c,0x52,0xb2,
+0x3d,0x48,0x52,0xc3,0x49,0x54,0x52,0xd4,0x55,0x6c,0x52,0xe5,0x05,0x00,0x00,0x00,
+0x15,0x29,0x52,0xf6,0x2a,0x30,0x53,0x07,0x31,0x38,0x53,0x18,0x39,0x41,0x53,0x29,
+0x42,0x6c,0x53,0x3a,0x02,0x00,0x00,0x00,0x00,0x53,0x53,0x4b,0x54,0x7f,0x53,0x5c,
+0x03,0x00,0x00,0x00,0x15,0x4c,0x53,0x6d,0x4d,0x6c,0x53,0x7e,0x15,0x6c,0x53,0x8f,
+0x01,0x00,0x00,0x00,0x15,0x6c,0x53,0xa0,0x03,0x00,0x00,0x00,0x00,0x53,0x53,0xb1,
+0x54,0x7f,0x53,0xc2,0x15,0x6c,0x53,0xd3,0x05,0x00,0x00,0x00,0x15,0x2f,0x53,0xe4,
+0x30,0x36,0x53,0xf5,0x37,0x3c,0x54,0x06,0x3d,0x43,0x54,0x17,0x44,0x60,0x54,0x28,
+0x04,0x00,0x00,0x00,0x15,0x31,0x54,0x39,0x32,0x38,0x54,0x4a,0x39,0x47,0x54,0x5b,
+0x48,0x6c,0x54,0x6c,0x03,0x00,0x00,0x00,0x15,0x31,0x54,0x7d,0x32,0x3f,0x54,0x8e,
+0x40,0x6c,0x54,0x9f,0x08,0x00,0x00,0x00,0x15,0x2c,0x54,0xb0,0x2d,0x31,0x54,0xc1,
+0x32,0x38,0x54,0xd2,0x39,0x3f,0x54,0xe3,0x40,0x44,0x54,0xf4,0x45,0x4b,0x55,0x05,
+0x4c,0x54,0x55,0x16,0x55,0x6c,0x55,0x27,0x01,0x00,0x00,0x00,0x01,0x7f,0x55,0x38,
+0x02,0x00,0x00,0x00,0x00,0x40,0x55,0x49,0x41,0x7f,0x55,0x5a,0x09,0x00,0x00,0x00,
+0x15,0x2a,0x55,0x6b,0x2b,0x2e,0x55,0x7c,0x2f,0x32,0x55,0x8d,0x33,0x36,0x55,0x9e,
+0x37,0x3a,0x55,0xaf,0x3b,0x3e,0x55,0xc0,0x3f,0x42,0x55,0xd1,0x43,0x46,0x55,0xe2,
+0x47,0x6c,0x55,0xf3,0x03,0x00,0x00,0x00,0x15,0x44,0x56,0x04,0x45,0x49,0x56,0x15,
+0x4a,0x6c,0x56,0x26,0x02,0x00,0x00,0x00,0x15,0x30,0x56,0x37,0x31,0x6c,0x56,0x48,
+0x04,0x00,0x00,0x00,0x01,0x20,0x56,0x59,0x21,0x25,0x56,0x6a,0x26,0x2a,0x56,0x7b,
+0x2b,0x7f,0x56,0x8c,0x05,0x00,0x00,0x00,0x15,0x23,0x56,0x9d,0x24,0x2a,0x56,0xae,
+0x2b,0x2f,0x56,0xbf,0x30,0x47,0x56,0xd0,0x48,0x6c,0x56,0xe1,0x01,0x00,0x00,0x00,
+0x01,0x7f,0x56,0xf2,0x01,0x00,0x00,0x00,0x15,0x6c,0x57,0x03,0x01,0x00,0x00,0x00,
+0x01,0x7f,0x57,0x14,0x01,0x00,0x00,0x00,0x15,0x6c,0x57,0x25,0x01,0x00,0x00,0x00,
+0x00,0x7f,0x57,0x36,0x0a,0x00,0x00,0x00,0x15,0x3a,0x57,0x47,0x3b,0x3f,0x57,0x58,
+0x40,0x41,0x57,0x69,0x42,0x44,0x57,0x7a,0x45,0x47,0x57,0x8b,0x48,0x4a,0x57,0x9c,
+0x4b,0x4c,0x57,0xad,0x4d,0x4e,0x57,0xbe,0x4f,0x51,0x57,0xcf,0x52,0x6c,0x57,0xe0,
+0x0c,0x00,0x00,0x00,0x15,0x32,0x57,0xf1,0x33,0x35,0x58,0x02,0x36,0x38,0x58,0x13,
+0x39,0x3d,0x58,0x24,0x3e,0x3f,0x58,0x35,0x40,0x42,0x58,0x46,0x43,0x45,0x58,0x57,
+0x46,0x48,0x58,0x68,0x49,0x4a,0x58,0x79,0x4b,0x4c,0x58,0x8a,0x4d,0x4f,0x58,0x9b,
+0x50,0x6c,0x58,0xac,0x05,0x00,0x00,0x00,0x15,0x2d,0x58,0xbd,0x2e,0x37,0x58,0xce,
+0x38,0x3e,0x58,0xdf,0x3f,0x44,0x58,0xf0,0x45,0x6c,0x59,0x01,0x02,0x00,0x00,0x00,
+0x15,0x29,0x59,0x12,0x2a,0x6c,0x59,0x23,0x05,0x00,0x00,0x00,0x15,0x3b,0x59,0x34,
+0x3c,0x41,0x59,0x45,0x42,0x47,0x59,0x56,0x48,0x52,0x59,0x67,0x53,0x6c,0x59,0x78,
+0x05,0x00,0x00,0x00,0x15,0x32,0x59,0x89,0x33,0x3b,0x59,0x9a,0x3c,0x42,0x59,0xab,
+0x43,0x48,0x59,0xbc,0x49,0x6c,0x59,0xcd,0x02,0x00,0x00,0x00,0x15,0x46,0x59,0xde,
+0x47,0x6c,0x59,0xef,0x01,0x00,0x00,0x00,0x15,0x6c,0x5a,0x00,0x05,0x00,0x00,0x00,
+0x15,0x3b,0x5a,0x11,0x3c,0x41,0x5a,0x22,0x42,0x47,0x5a,0x33,0x48,0x52,0x5a,0x44,
+0x53,0x6c,0x5a,0x55,0x05,0x00,0x00,0x00,0x15,0x3b,0x5a,0x66,0x3c,0x41,0x5a,0x77,
+0x42,0x47,0x5a,0x88,0x48,0x52,0x5a,0x99,0x53,0x6c,0x5a,0xaa,0x02,0x00,0x00,0x00,
+0x05,0x71,0x5a,0xbb,0x15,0x6c,0x5a,0xcc,0x02,0x00,0x00,0x00,0x15,0x6c,0x5a,0xdd,
+0x15,0x6c,0x5a,0xee,0x04,0x00,0x00,0x00,0x15,0x3a,0x5a,0xff,0x3b,0x40,0x5b,0x10,
+0x41,0x47,0x5b,0x21,0x48,0x6c,0x5b,0x32,0x01,0x00,0x00,0x00,0x15,0x6c,0x5b,0x43,
+0x01,0x00,0x00,0x00,0x15,0x6c,0x5b,0x54,0x01,0x00,0x00,0x00,0x15,0x6c,0x5b,0x65,
+0x06,0x00,0x00,0x00,0x15,0x3c,0x5b,0x76,0x3d,0x43,0x5b,0x87,0x44,0x48,0x5b,0x98,
+0x49,0x4e,0x5b,0xa9,0x4f,0x55,0x5b,0xba,0x56,0x6c,0x5b,0xcb,0x03,0x00,0x00,0x00,
+0x15,0x3a,0x5b,0xdc,0x3b,0x3f,0x5b,0xed,0x40,0x6c,0x5b,0xfe,0x02,0x00,0x00,0x00,
+0x15,0x2d,0x5c,0x0f,0x2e,0x6c,0x5c,0x20,0x02,0x00,0x00,0x00,0x15,0x45,0x5c,0x31,
+0x46,0x6c,0x5c,0x42,0x02,0x00,0x00,0x00,0x15,0x49,0x5c,0x53,0x4a,0x6c,0x5c,0x64,
+0x02,0x00,0x00,0x00,0x15,0x42,0x5c,0x75,0x43,0x6c,0x5c,0x86,0x18,0x00,0x00,0x00,
+0x01,0x27,0x5c,0x97,0x28,0x2d,0x5c,0xa8,0x2e,0x33,0x5c,0xb9,0x34,0x39,0x5c,0xca,
+0x3a,0x3f,0x5c,0xdb,0x40,0x45,0x5c,0xec,0x46,0x4b,0x5c,0xfd,0x4c,0x51,0x5d,0x0e,
+0x52,0x57,0x5d,0x1f,0x58,0x5d,0x5d,0x30,0x5e,0x63,0x5d,0x41,0x64,0x7f,0x5d,0x52,
+0x01,0x27,0x5d,0x63,0x28,0x2d,0x5d,0x74,0x2e,0x33,0x5d,0x85,0x34,0x39,0x5d,0x96,
+0x3a,0x3f,0x5d,0xa7,0x40,0x45,0x5d,0xb8,0x46,0x4b,0x5d,0xc9,0x4c,0x51,0x5d,0xda,
+0x52,0x57,0x5d,0xeb,0x58,0x5d,0x5d,0xfc,0x5e,0x64,0x5e,0x0d,0x65,0x7f,0x5e,0x1e,
+0x0d,0x00,0x00,0x00,0x01,0x27,0x5e,0x2f,0x28,0x2d,0x5e,0x40,0x2e,0x33,0x5e,0x51,
+0x34,0x39,0x5e,0x62,0x3a,0x3f,0x5e,0x73,0x40,0x45,0x5e,0x84,0x46,0x4b,0x5e,0x95,
+0x4c,0x51,0x5e,0xa6,0x52,0x57,0x5e,0xb7,0x58,0x5d,0x5e,0xc8,0x5e,0x64,0x5e,0xd9,
+0x65,0x7f,0x5e,0xea,0x00,0x7f,0x5e,0xfb,0x06,0x00,0x00,0x00,0x15,0x3f,0x5f,0x0c,
+0x40,0x45,0x5f,0x1d,0x46,0x4b,0x5f,0x2e,0x4c,0x51,0x5f,0x3f,0x52,0x59,0x5f,0x50,
+0x59,0x6c,0x5f,0x61,0x0d,0x00,0x00,0x00,0x15,0x32,0x5f,0x72,0x33,0x35,0x5f,0x83,
+0x36,0x3a,0x5f,0x94,0x3b,0x3b,0x5f,0xa5,0x3c,0x3e,0x5f,0xb6,0x3f,0x41,0x5f,0xc7,
+0x42,0x44,0x5f,0xd8,0x45,0x47,0x5f,0xe9,0x48,0x4a,0x5f,0xfa,0x4b,0x4d,0x60,0x0b,
+0x4e,0x50,0x60,0x1c,0x51,0x53,0x60,0x2d,0x54,0x6c,0x60,0x3e,0x07,0x00,0x00,0x00,
+0x24,0x30,0x60,0x4f,0x31,0x34,0x60,0x60,0x35,0x3a,0x60,0x71,0x3b,0x41,0x60,0x82,
+0x42,0x47,0x60,0x93,0x48,0x51,0x60,0xa4,0x52,0x6c,0x60,0xb5,0x04,0x00,0x00,0x00,
+0x15,0x2d,0x60,0xc6,0x2e,0x34,0x60,0xd7,0x35,0x39,0x60,0xe8,0x3a,0x6c,0x60,0xf9,
+0x06,0x00,0x00,0x00,0x15,0x3c,0x61,0x0a,0x3d,0x43,0x61,0x1b,0x44,0x49,0x61,0x2c,
+0x4a,0x4f,0x61,0x3d,0x50,0x55,0x61,0x4e,0x56,0x6c,0x61,0x5f,0x03,0x00,0x00,0x00,
+0x15,0x38,0x61,0x70,0x39,0x3e,0x61,0x81,0x3f,0x6c,0x61,0x92,0x03,0x00,0x00,0x00,
+0x15,0x22,0x61,0xa3,0x23,0x2e,0x61,0xb4,0x2f,0x6c,0x61,0xc5,0x04,0x00,0x00,0x00,
+0x15,0x3b,0x61,0xd6,0x3c,0x41,0x61,0xe7,0x42,0x4a,0x61,0xf8,0x4b,0x6c,0x62,0x09,
+0x05,0x00,0x00,0x00,0x15,0x40,0x62,0x1a,0x41,0x4d,0x62,0x2b,0x4e,0x53,0x62,0x3c,
+0x54,0x5f,0x62,0x4d,0x60,0x6c,0x62,0x5e,0x03,0x00,0x00,0x00,0x15,0x40,0x62,0x6f,
+0x41,0x4d,0x62,0x80,0x4e,0x6c,0x62,0x91,0x01,0x00,0x00,0x00,0x15,0x6f,0x62,0xa2,
+0x01,0x00,0x00,0x00,0x15,0x6c,0x62,0xb3,0x02,0x00,0x00,0x00,0x15,0x6c,0x62,0xc4,
+0x01,0x7f,0x62,0xd5,0x02,0x00,0x00,0x00,0x00,0x7f,0x62,0xe6,0x15,0x6c,0x62,0xf7,
+0x01,0x00,0x00,0x00,0x00,0x7f,0x63,0x08,0x01,0x00,0x00,0x00,0x00,0x7f,0x63,0x19,
+0x0c,0x00,0x00,0x00,0x01,0x2a,0x63,0x2a,0x2b,0x36,0x63,0x3b,0x37,0x42,0x63,0x4c,
+0x43,0x4e,0x63,0x5d,0x4f,0x5a,0x63,0x6e,0x5b,0x7f,0x63,0x7f,0x01,0x2a,0x63,0x90,
+0x2b,0x36,0x63,0xa1,0x37,0x42,0x63,0xb2,0x43,0x4e,0x63,0xc3,0x4f,0x5a,0x63,0xd4,
+0x5b,0x7f,0x63,0xe5,0x18,0x00,0x00,0x00,0x01,0x27,0x63,0xf6,0x28,0x2d,0x64,0x07,
+0x2e,0x33,0x64,0x18,0x34,0x39,0x64,0x29,0x3a,0x3f,0x64,0x3a,0x40,0x45,0x64,0x4b,
+0x46,0x4b,0x64,0x5c,0x4c,0x51,0x64,0x6d,0x52,0x57,0x64,0x7e,0x58,0x5d,0x64,0x8f,
+0x5e,0x66,0x64,0xa0,0x67,0x7f,0x64,0xb1,0x01,0x27,0x64,0xc2,0x28,0x2d,0x64,0xd3,
+0x2e,0x33,0x64,0xe4,0x34,0x39,0x64,0xf5,0x3a,0x3f,0x65,0x06,0x40,0x45,0x65,0x17,
+0x46,0x4b,0x65,0x28,0x4c,0x51,0x65,0x39,0x52,0x57,0x65,0x4a,0x58,0x5d,0x65,0x5b,
+0x5e,0x66,0x65,0x6c,0x67,0x7f,0x65,0x7d,0x02,0x00,0x00,0x00,0x00,0x7f,0x65,0x8e,
+0x15,0x6c,0x65,0x9f,0x02,0x00,0x00,0x00,0x00,0x7f,0x65,0xb0,0x01,0x7f,0x65,0xc1,
+0x0e,0x00,0x00,0x00,0x00,0x40,0x65,0xd2,0x41,0x7f,0x65,0xe3,0x01,0x27,0x65,0xf4,
+0x28,0x2d,0x66,0x05,0x2e,0x33,0x66,0x16,0x34,0x39,0x66,0x27,0x3a,0x3f,0x66,0x38,
+0x40,0x45,0x66,0x49,0x46,0x4b,0x66,0x5a,0x4c,0x51,0x66,0x6b,0x52,0x57,0x66,0x7c,
+0x58,0x5d,0x66,0x8d,0x5e,0x66,0x66,0x9e,0x67,0x7f,0x66,0xaf,0x02,0x00,0x00,0x00,
+0x00,0x7f,0x66,0xc0,0x15,0x6c,0x66,0xd1,0x0d,0x00,0x00,0x00,0x01,0x27,0x66,0xe2,
+0x28,0x2d,0x66,0xf3,0x2e,0x33,0x67,0x04,0x34,0x39,0x67,0x15,0x3a,0x3f,0x67,0x26,
+0x40,0x45,0x67,0x37,0x46,0x4b,0x67,0x48,0x4c,0x51,0x67,0x59,0x52,0x57,0x67,0x6a,
+0x58,0x5d,0x67,0x7b,0x5e,0x64,0x67,0x8c,0x65,0x7f,0x67,0x9d,0x05,0x71,0x67,0xae,
+0x0d,0x00,0x00,0x00,0x00,0x7f,0x67,0xbf,0x01,0x27,0x67,0xd0,0x28,0x2d,0x67,0xe1,
+0x2e,0x33,0x67,0xf2,0x34,0x39,0x68,0x03,0x3a,0x3f,0x68,0x14,0x40,0x45,0x68,0x25,
+0x46,0x4b,0x68,0x36,0x4c,0x51,0x68,0x47,0x52,0x57,0x68,0x58,0x58,0x5d,0x68,0x69,
+0x5e,0x66,0x68,0x7a,0x67,0x7f,0x68,0x8b,0x02,0x00,0x00,0x00,0x15,0x6c,0x68,0x9c,
+0x15,0x6c,0x68,0xad,0x02,0x00,0x00,0x00,0x15,0x6c,0x68,0xbe,0x15,0x6c,0x68,0xcf,
+0x0d,0x00,0x00,0x00,0x01,0x27,0x68,0xe0,0x28,0x2d,0x68,0xf1,0x2e,0x33,0x69,0x02,
+0x34,0x39,0x69,0x13,0x3a,0x3f,0x69,0x24,0x40,0x45,0x69,0x35,0x46,0x4b,0x69,0x46,
+0x4c,0x51,0x69,0x57,0x52,0x57,0x69,0x68,0x58,0x5d,0x69,0x79,0x5e,0x66,0x69,0x8a,
+0x67,0x7f,0x69,0x9b,0x00,0x7f,0x69,0xac,0x05,0x00,0x00,0x00,0x15,0x3a,0x69,0xbd,
+0x3b,0x40,0x69,0xce,0x41,0x47,0x69,0xdf,0x48,0x6c,0x69,0xf0,0x15,0x6c,0x6a,0x01,
+0x02,0x00,0x00,0x00,0x15,0x6c,0x6a,0x12,0x00,0x7f,0x6a,0x23,0x05,0x00,0x00,0x00,
+0x15,0x31,0x6a,0x34,0x32,0x38,0x6a,0x45,0x39,0x47,0x6a,0x56,0x48,0x6c,0x6a,0x67,
+0x00,0x7f,0x6a,0x78,0x02,0x00,0x00,0x00,0x00,0x7f,0x6a,0x89,0x15,0x6c,0x6a,0x9a,
+0x18,0x00,0x00,0x00,0x01,0x27,0x6a,0xab,0x28,0x2d,0x6a,0xbc,0x2e,0x33,0x6a,0xcd,
+0x34,0x39,0x6a,0xde,0x3a,0x3f,0x6a,0xef,0x40,0x45,0x6b,0x00,0x46,0x4b,0x6b,0x11,
+0x4c,0x51,0x6b,0x22,0x52,0x57,0x6b,0x33,0x58,0x5d,0x6b,0x44,0x5e,0x63,0x6b,0x55,
+0x64,0x7f,0x6b,0x66,0x01,0x27,0x6b,0x77,0x28,0x2d,0x6b,0x88,0x2e,0x33,0x6b,0x99,
+0x34,0x39,0x6b,0xaa,0x3a,0x3f,0x6b,0xbb,0x40,0x45,0x6b,0xcc,0x46,0x4b,0x6b,0xdd,
+0x4c,0x51,0x6b,0xee,0x52,0x57,0x6b,0xff,0x58,0x5d,0x6c,0x10,0x5e,0x63,0x6c,0x21,
+0x64,0x7f,0x6c,0x32,0x02,0x00,0x00,0x00,0x01,0x7f,0x6c,0x43,0x00,0x7f,0x6c,0x54,
+0x02,0x00,0x00,0x00,0x15,0x6c,0x6c,0x65,0x15,0x6c,0x6c,0x76,0x04,0x00,0x00,0x00,
+0x15,0x6c,0x6c,0x87,0x15,0x2c,0x6c,0x98,0x2d,0x36,0x6c,0xa9,0x37,0x6c,0x6c,0xba,
+0x06,0x00,0x00,0x00,0x05,0x71,0x6c,0xcb,0x15,0x2f,0x6c,0xdc,0x30,0x36,0x6c,0xed,
+0x37,0x3c,0x6c,0xfe,0x3d,0x43,0x6d,0x0f,0x44,0x60,0x6d,0x20,0x02,0x00,0x00,0x00,
+0x00,0x7f,0x6d,0x31,0x15,0x6c,0x6d,0x42,0x02,0x00,0x00,0x00,0x15,0x6c,0x6d,0x53,
+0x15,0x6c,0x6d,0x64,0x02,0x00,0x00,0x00,0x15,0x6c,0x6d,0x75,0x00,0x7f,0x6d,0x86,
+0x05,0x00,0x00,0x00,0x15,0x31,0x6d,0x97,0x32,0x38,0x6d,0xa8,0x39,0x47,0x6d,0xb9,
+0x48,0x6c,0x6d,0xca,0x15,0x6c,0x6d,0xdb,0x02,0x00,0x00,0x00,0x00,0x83,0x6d,0xec,
+0x84,0x7f,0x70,0xfa,0x06,0x00,0x00,0x00,0x15,0x34,0x6d,0xfd,0x35,0x38,0x6e,0x0e,
+0x39,0x3c,0x6e,0x1f,0x3d,0x44,0x6e,0x30,0x45,0x4c,0x6e,0x41,0x4d,0x6d,0x6e,0x52,
+0x01,0x00,0x00,0x00,0x15,0x6c,0x6e,0x63,0x01,0x00,0x00,0x00,0x00,0x7f,0x6e,0x74,
+0x01,0x00,0x00,0x00,0x00,0x7f,0x6e,0x85,0x03,0x00,0x00,0x00,0x15,0x39,0x6e,0x96,
+0x15,0x39,0x6e,0xa7,0x3a,0x6c,0x6e,0xb8,0x0a,0x00,0x00,0x00,0x15,0x3a,0x6e,0xc9,
+0x3b,0x3f,0x6e,0xda,0x40,0x41,0x6e,0xeb,0x42,0x44,0x6e,0xfc,0x45,0x47,0x6f,0x0d,
+0x48,0x4a,0x6f,0x1e,0x4b,0x4c,0x6f,0x2f,0x4d,0x4e,0x6f,0x40,0x4f,0x51,0x6f,0x51,
+0x52,0x6c,0x6f,0x62,0x01,0x00,0x00,0x00,0x15,0x6c,0x6f,0x73,0x02,0x00,0x00,0x00,
+0x15,0x6c,0x6f,0x84,0x00,0x7f,0x6f,0x95,0x01,0x00,0x00,0x00,0x15,0x6c,0x6f,0xa6,
+0x02,0x00,0x00,0x00,0x01,0x7f,0x6f,0xb7,0x15,0x6c,0x6f,0xc8,0x01,0x00,0x00,0x00,
+0x15,0x6c,0x6f,0xd9,0x01,0x00,0x00,0x00,0x13,0x6c,0x6f,0xea,0x01,0x00,0x00,0x00,
+0x15,0x6c,0x6f,0xfb,0x01,0x00,0x00,0x00,0x15,0x6c,0x70,0x0c,0x01,0x00,0x00,0x00,
+0x15,0x6c,0x70,0x1d,0x01,0x00,0x00,0x00,0x15,0x6c,0x70,0x2e,0x01,0x00,0x00,0x00,
+0x01,0x7f,0x70,0x3f,0x02,0x00,0x00,0x00,0x15,0x6c,0x70,0x50,0x01,0x7f,0x70,0x61,
+0x02,0x00,0x00,0x00,0x15,0x6c,0x70,0x72,0x15,0x6c,0x70,0x83,0x01,0x00,0x00,0x00,
+0x15,0x6c,0x70,0x94,0x02,0x00,0x00,0x00,0x0c,0x7f,0x70,0xa5,0x01,0x7f,0x70,0xb6,
+0x02,0x00,0x00,0x00,0x15,0x6c,0x70,0xc7,0x15,0x6c,0x70,0xd8,0x01,0x00,0x00,0x00,
+0x15,0x6c,0x70,0xe9,0x75,0x0b,0x75,0x37,0x75,0x63,0x75,0x93,0x75,0xe7,0x75,0xf3,
+0x76,0x47,0x76,0x5f,0x76,0x6b,0x76,0x73,0x76,0x7b,0x76,0x87,0x76,0x8f,0x76,0xa3,
+0x76,0xab,0x76,0xb3,0x76,0xbf,0x76,0xc7,0x76,0xd3,0x76,0xeb,0x77,0x03,0x77,0x0f,
+0x77,0x1f,0x77,0x27,0x77,0x37,0x77,0x4f,0x77,0x63,0x77,0x73,0x77,0x97,0x77,0x9f,
+0x77,0xab,0x77,0xd3,0x77,0xe3,0x77,0xef,0x78,0x03,0x78,0x1b,0x78,0x23,0x78,0x2b,
+0x78,0x33,0x78,0x3b,0x78,0x43,0x78,0x6f,0x78,0xa3,0x78,0xbb,0x78,0xc7,0x78,0xdf,
+0x78,0xf7,0x79,0x03,0x79,0x0b,0x79,0x23,0x79,0x3b,0x79,0x47,0x79,0x53,0x79,0x67,
+0x79,0x6f,0x79,0x77,0x79,0x7f,0x79,0x9b,0x79,0xab,0x79,0xb7,0x79,0xc3,0x79,0xcf,
+0x79,0xdb,0x7a,0x3f,0x7a,0x77,0x7a,0x93,0x7a,0xcb,0x7a,0xeb,0x7a,0xff,0x7b,0x1b,
+0x7b,0x2b,0x7b,0x3b,0x7b,0x4f,0x7b,0x67,0x7b,0x77,0x7b,0x7f,0x7b,0x87,0x7b,0x93,
+0x7b,0x9f,0x7b,0xa7,0x7b,0xaf,0x7b,0xe3,0x7c,0x47,0x7c,0x53,0x7c,0x5f,0x7c,0x9b,
+0x7c,0xa7,0x7c,0xdf,0x7d,0x17,0x7d,0x23,0x7d,0x2f,0x7d,0x67,0x7d,0x7f,0x7d,0x8b,
+0x7d,0xa3,0x7d,0xaf,0x7e,0x13,0x7e,0x1f,0x7e,0x2b,0x7e,0x3f,0x7e,0x5b,0x7e,0x67,
+0x7e,0x73,0x7e,0x7f,0x7e,0x97,0x7e,0xa3,0x7e,0xbf,0x7e,0xc7,0x7e,0xcf,0x7e,0xd7,
+0x7e,0xe7,0x7f,0x13,0x7f,0x1b,0x7f,0x27,0x7f,0x2f,0x7f,0x3b,0x7f,0x43,0x7f,0x4b,
+0x7f,0x53,0x7f,0x5b,0x7f,0x63,0x7f,0x6b,0x7f,0x73,0x7f,0x7f,0x7f,0x8b,0x7f,0x93,
+0x7f,0x9f,0x7f,0xab,0x71,0x0b,0x71,0x8b,0x72,0x0b,0x72,0x8b,0x73,0x0b,0x73,0x8b,
+0x74,0x0b,0x74,0x8b,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x2f,0x40,0x4d,0x5c,
+0x80,0x80,0x79,0x73,0x30,0x3c,0x54,0x60,0x6c,0x80,0x76,0x6c,0x40,0x40,0x40,0x69,
+0x80,0x80,0x80,0x39,0x40,0x40,0x40,0x69,0x80,0x80,0x80,0x4f,0x18,0x1a,0x3c,0x54,
+0x6b,0x76,0x76,0x76,0x1d,0x35,0x48,0x53,0x73,0x80,0x80,0x73,0x40,0x40,0x4c,0x5c,
+0x80,0x80,0x7d,0x69,0x40,0x40,0x57,0x6c,0x80,0x80,0x6f,0x4f,0x40,0x40,0x4a,0x6b,
+0x80,0x80,0x7b,0x61,0x1c,0x40,0x5a,0x6b,0x61,0x80,0x65,0x38,0x28,0x40,0x58,0x70,
+0x67,0x75,0x81,0x79,0x18,0x24,0x3c,0x54,0x8a,0x6e,0x82,0x7d,0x1c,0x32,0x40,0x65,
+0x59,0x80,0x80,0x65,0x1a,0x33,0x5a,0x69,0x4f,0x80,0x80,0x67,0x40,0x40,0x54,0x69,
+0x80,0x80,0x7b,0x65,0x40,0x40,0x53,0x68,0x80,0x80,0x7d,0x63,0x1b,0x3c,0x56,0x6c,
+0x5f,0x80,0x7d,0x77,0x24,0x30,0x48,0x54,0x72,0x78,0x78,0x70,0x40,0x40,0x5e,0x6d,
+0x80,0x80,0x6f,0x2d,0x40,0x40,0x5d,0x6c,0x80,0x80,0x75,0x2b,0x40,0x40,0x54,0x71,
+0x80,0x80,0x5f,0x35,0x40,0x40,0x49,0x6a,0x80,0x80,0x79,0x5b,0x40,0x40,0x5a,0x73,
+0x80,0x80,0x7b,0x49,0x40,0x40,0x5a,0x68,0x80,0x80,0x6b,0x4d,0x40,0x40,0x56,0x74,
+0x80,0x80,0x75,0x5d,0x2b,0x40,0x5d,0x74,0x76,0x80,0x6b,0x53,0x40,0x40,0x5b,0x6e,
+0x76,0x80,0x61,0x3e,0x40,0x40,0x5b,0x62,0x80,0x80,0x65,0x1f,0x40,0x40,0x5b,0x68,
+0x80,0x80,0x7b,0x63,0x40,0x40,0x5b,0x6a,0x80,0x80,0x79,0x63,0x40,0x40,0x57,0x60,
+0x80,0x80,0x7a,0x49,0x40,0x4d,0x58,0x67,0x80,0x80,0x7a,0x4b,0x40,0x4e,0x5a,0x67,
+0x80,0x80,0x79,0x5f,0x40,0x4d,0x5d,0x6f,0x80,0x80,0x79,0x4d,0x40,0x40,0x4e,0x6d,
+0x80,0x80,0x6a,0x4c,0x40,0x4e,0x58,0x6e,0x80,0x80,0x7b,0x31,0x40,0x40,0x58,0x69,
+0x80,0x80,0x7c,0x29,0x18,0x3c,0x48,0x54,0x8d,0x87,0x9a,0x7a,0x1f,0x25,0x40,0x54,
+0x8b,0x80,0x75,0x4b,0x1c,0x28,0x40,0x68,0x8b,0x80,0x80,0x2e,0x40,0x40,0x56,0x67,
+0x80,0x80,0x6f,0x4f,0x40,0x40,0x50,0x61,0x80,0x80,0x59,0x2d,0x40,0x40,0x4e,0x67,
+0x80,0x80,0x6c,0x2a,0x40,0x40,0x50,0x64,0x80,0x80,0x63,0x21,0x40,0x40,0x54,0x66,
+0x80,0x80,0x71,0x45,0x40,0x40,0x5c,0x6c,0x80,0x80,0x6f,0x4b,0x40,0x40,0x5a,0x6d,
+0x80,0x80,0x73,0x29,0x40,0x40,0x56,0x6a,0x80,0x80,0x65,0x27,0x18,0x30,0x48,0x54,
+0x86,0x86,0x7d,0x69,0x40,0x40,0x44,0x67,0x80,0x80,0x79,0x29,0x40,0x40,0x5e,0x77,
+0x80,0x80,0x73,0x62,0x40,0x40,0x52,0x63,0x80,0x80,0x73,0x61,0x40,0x40,0x54,0x65,
+0x80,0x80,0x79,0x63,0x24,0x3c,0x48,0x54,0x7b,0x79,0x6c,0x48,0x40,0x40,0x5e,0x70,
+0x80,0x80,0x7b,0x72,0x40,0x40,0x61,0x70,0x80,0x80,0x7b,0x71,0x20,0x40,0x5a,0x75,
+0x80,0x80,0x71,0x2b,0x2b,0x40,0x5d,0x75,0x80,0x80,0x71,0x24,0x40,0x40,0x51,0x63,
+0x80,0x80,0x6d,0x3d,0x40,0x40,0x52,0x5f,0x80,0x80,0x73,0x51,0x40,0x40,0x56,0x69,
+0x80,0x80,0x6b,0x37,0x40,0x4e,0x63,0x75,0x80,0x80,0x76,0x4e,0x40,0x4c,0x5b,0x68,
+0x80,0x80,0x77,0x63,0x24,0x30,0x48,0x54,0x6b,0x72,0x78,0x75,0x40,0x40,0x54,0x66,
+0x80,0x80,0x7f,0x5f,0x40,0x40,0x52,0x60,0x80,0x80,0x77,0x23,0x40,0x40,0x52,0x68,
+0x80,0x80,0x75,0x43,0x40,0x40,0x56,0x67,0x80,0x80,0x78,0x49,0x40,0x4d,0x5b,0x67,
+0x80,0x80,0x78,0x32,0x40,0x55,0x5b,0x66,0x80,0x7d,0x6f,0x07,0x40,0x4c,0x57,0x6c,
+0x80,0x80,0x77,0x2d,0x40,0x4c,0x54,0x67,0x80,0x80,0x77,0x4b,0x2d,0x40,0x50,0x5d,
+0x6d,0x80,0x76,0x24,0x40,0x40,0x4f,0x5b,0x80,0x80,0x75,0x3f,0x40,0x40,0x40,0x73,
+0x80,0x80,0x80,0x29,0x40,0x40,0x55,0x70,0x80,0x80,0x7a,0x07,0x40,0x40,0x53,0x6f,
+0x80,0x80,0x7b,0x11,0x40,0x40,0x56,0x62,0x80,0x80,0x80,0x0d,0x2d,0x39,0x4d,0x69,
+0x71,0x80,0x7b,0x68,0x40,0x40,0x5e,0x6f,0x80,0x80,0x71,0x47,0x40,0x40,0x4e,0x5f,
+0x80,0x80,0x79,0x42,0x40,0x40,0x55,0x66,0x80,0x80,0x6b,0x43,0x25,0x40,0x58,0x65,
+0x69,0x80,0x79,0x73,0x40,0x40,0x55,0x61,0x80,0x80,0x7b,0x63,0x18,0x3c,0x48,0x54,
+0x72,0x63,0x5f,0x63,0x29,0x40,0x5c,0x67,0x6e,0x80,0x7a,0x58,0x2d,0x40,0x59,0x68,
+0x73,0x80,0x75,0x59,0x40,0x40,0x5f,0x75,0x80,0x80,0x73,0x64,0x40,0x40,0x55,0x6e,
+0x80,0x80,0x73,0x49,0x40,0x40,0x48,0x5a,0x80,0x80,0x73,0x5f,0x1c,0x40,0x5e,0x67,
+0x5f,0x80,0x77,0x61,0x1c,0x40,0x5b,0x67,0x71,0x80,0x73,0x5b,0x40,0x40,0x5c,0x6f,
+0x80,0x80,0x73,0x57,0x40,0x40,0x5e,0x6f,0x80,0x80,0x71,0x49,0x40,0x4c,0x5b,0x6c,
+0x80,0x80,0x76,0x58,0x40,0x40,0x5e,0x6b,0x80,0x80,0x73,0x57,0x40,0x40,0x5c,0x72,
+0x80,0x80,0x6f,0x4e,0x40,0x40,0x59,0x6c,0x80,0x80,0x71,0x59,0x40,0x40,0x5c,0x6e,
+0x80,0x80,0x71,0x45,0x40,0x40,0x58,0x6d,0x80,0x80,0x71,0x54,0x40,0x40,0x63,0x74,
+0x80,0x80,0x6e,0x51,0x40,0x4e,0x5f,0x6c,0x80,0x80,0x6d,0x59,0x40,0x4c,0x5d,0x72,
+0x80,0x80,0x71,0x56,0x40,0x40,0x56,0x69,0x80,0x80,0x6d,0x4f,0x40,0x40,0x5c,0x6f,
+0x80,0x80,0x6b,0x49,0x18,0x30,0x48,0x54,0x8c,0x7a,0x7a,0x78,0x40,0x4c,0x5d,0x74,
+0x80,0x80,0x77,0x55,0x40,0x40,0x60,0x71,0x80,0x80,0x71,0x53,0x33,0x4c,0x5a,0x6d,
+0x74,0x80,0x77,0x62,0x40,0x40,0x5d,0x6d,0x80,0x80,0x70,0x4b,0x40,0x40,0x5c,0x6b,
+0x80,0x80,0x6c,0x47,0x30,0x3c,0x48,0x54,0x78,0x73,0x72,0x71,0x30,0x3c,0x48,0x54,
+0x78,0x73,0x72,0x71,0x18,0x30,0x3c,0x54,0x8b,0x88,0x8a,0x82,0x18,0x30,0x3c,0x54,
+0x8b,0x88,0x8a,0x82,0x40,0x40,0x5c,0x6c,0x80,0x80,0x73,0x5a,0x40,0x40,0x58,0x71,
+0x80,0x80,0x73,0x5c,0x40,0x40,0x5c,0x6b,0x80,0x80,0x73,0x61,0x40,0x40,0x5b,0x6c,
+0x80,0x80,0x71,0x4e,0x40,0x40,0x5d,0x6e,0x80,0x80,0x73,0x4e,0x40,0x40,0x64,0x71,
+0x80,0x80,0x71,0x4b,0x24,0x3c,0x48,0x54,0x5a,0x6e,0x79,0x76,0x40,0x40,0x60,0x73,
+0x80,0x80,0x65,0x4d,0x40,0x4c,0x5b,0x6b,0x80,0x80,0x75,0x5d,0x40,0x48,0x5c,0x6b,
+0x80,0x80,0x75,0x61,0x40,0x49,0x60,0x6f,0x80,0x80,0x75,0x65,0x40,0x51,0x63,0x72,
+0x7e,0x80,0x76,0x62,0x40,0x40,0x5f,0x75,0x80,0x80,0x75,0x63,0x40,0x40,0x5a,0x70,
+0x80,0x80,0x75,0x5b,0x40,0x40,0x63,0x76,0x80,0x80,0x77,0x55,0x40,0x40,0x5f,0x70,
+0x80,0x80,0x73,0x55,0x40,0x40,0x5a,0x6a,0x80,0x80,0x6c,0x4d,0x40,0x40,0x55,0x6c,
+0x80,0x80,0x75,0x4a,0x40,0x40,0x5c,0x73,0x80,0x80,0x71,0x5d,0x40,0x40,0x5b,0x6f,
+0x80,0x80,0x74,0x51,0x40,0x40,0x63,0x75,0x80,0x80,0x75,0x58,0x40,0x40,0x5f,0x74,
+0x80,0x80,0x73,0x55,0x24,0x3c,0x48,0x54,0x6e,0x6a,0x5d,0x64,0x24,0x3c,0x48,0x54,
+0x6e,0x6a,0x5d,0x64,0x24,0x30,0x48,0x54,0x73,0x78,0x7d,0x76,0x40,0x40,0x54,0x68,
+0x80,0x80,0x80,0x4f,0x24,0x3c,0x48,0x54,0x7b,0x7f,0x83,0x6e,0x40,0x40,0x54,0x67,
+0x80,0x80,0x67,0x42,0x40,0x40,0x55,0x68,0x80,0x80,0x77,0x57,0x24,0x3c,0x48,0x54,
+0x77,0x7e,0x7a,0x68,0x24,0x3c,0x48,0x54,0x77,0x7e,0x7a,0x68,0x18,0x24,0x3c,0x54,
+0x67,0x5e,0x79,0x84,0x40,0x40,0x54,0x63,0x80,0x80,0x73,0x2f,0x40,0x40,0x54,0x6c,
+0x80,0x80,0x71,0x2b,0x40,0x40,0x4e,0x5f,0x80,0x80,0x69,0x47,0x40,0x40,0x48,0x6c,
+0x80,0x80,0x80,0x8c,0x40,0x40,0x5e,0x72,0x80,0x80,0x75,0x67,0x40,0x40,0x60,0x71,
+0x80,0x80,0x75,0x61,0x40,0x40,0x60,0x6a,0x80,0x80,0x7b,0x31,0x40,0x40,0x59,0x73,
+0x80,0x80,0x7b,0x6b,0x40,0x40,0x55,0x60,0x80,0x80,0x7b,0x31,0x40,0x40,0x5e,0x6f,
+0x80,0x80,0x67,0x53,0x40,0x40,0x54,0x6a,0x80,0x80,0x6f,0x43,0x40,0x40,0x5c,0x73,
+0x80,0x80,0x75,0x52,0x40,0x40,0x59,0x75,0x80,0x80,0x71,0x52,0x40,0x40,0x5f,0x75,
+0x80,0x80,0x75,0x5d,0x40,0x40,0x60,0x79,0x80,0x80,0x71,0x59,0x40,0x40,0x65,0x75,
+0x80,0x80,0x77,0x5b,0x40,0x40,0x61,0x73,0x80,0x80,0x79,0x5f,0x40,0x40,0x58,0x69,
+0x80,0x80,0x75,0x57,0x40,0x40,0x55,0x66,0x80,0x80,0x6b,0x51,0x40,0x40,0x51,0x66,
+0x80,0x80,0x6d,0x53,0x40,0x40,0x55,0x6a,0x80,0x80,0x71,0x61,0x40,0x40,0x54,0x62,
+0x80,0x80,0x79,0x61,0x40,0x40,0x5b,0x6c,0x80,0x80,0x75,0x65,0x40,0x40,0x60,0x70,
+0x80,0x80,0x73,0x59,0x40,0x40,0x61,0x6d,0x80,0x80,0x77,0x63,0x40,0x40,0x59,0x6a,
+0x80,0x80,0x73,0x5d,0x40,0x40,0x51,0x69,0x80,0x80,0x79,0x69,0x40,0x40,0x57,0x69,
+0x80,0x80,0x73,0x61,0x40,0x40,0x56,0x67,0x80,0x80,0x75,0x6b,0x40,0x40,0x5b,0x6d,
+0x80,0x80,0x77,0x69,0x40,0x40,0x5c,0x69,0x80,0x80,0x75,0x65,0x40,0x40,0x5b,0x6c,
+0x80,0x80,0x71,0x5b,0x40,0x49,0x56,0x62,0x80,0x80,0x6f,0x21,0x40,0x55,0x62,0x6e,
+0x80,0x80,0x6f,0x25,0x40,0x40,0x5d,0x70,0x80,0x80,0x73,0x59,0x40,0x40,0x5e,0x76,
+0x80,0x80,0x69,0x29,0x40,0x41,0x41,0x42,0x80,0x80,0x80,0x00,0x41,0x42,0x55,0x66,
+0x00,0x80,0x75,0x55,0x40,0x40,0x57,0x68,0x80,0x80,0x73,0x49,0x40,0x40,0x52,0x68,
+0x80,0x80,0x65,0x47,0x40,0x40,0x56,0x66,0x80,0x80,0x71,0x43,0x40,0x40,0x54,0x63,
+0x80,0x80,0x71,0x4f,0x40,0x40,0x51,0x69,0x80,0x80,0x65,0x3d,0x40,0x40,0x53,0x68,
+0x80,0x80,0x67,0x3f,0x40,0x40,0x55,0x67,0x80,0x80,0x65,0x35,0x40,0x40,0x55,0x68,
+0x80,0x80,0x5d,0x39,0x40,0x40,0x59,0x72,0x80,0x80,0x6b,0x47,0x40,0x40,0x59,0x71,
+0x80,0x80,0x6b,0x47,0x40,0x53,0x5b,0x6d,0x80,0x80,0x65,0x45,0x40,0x52,0x5c,0x73,
+0x80,0x80,0x75,0x61,0x40,0x51,0x5f,0x6b,0x80,0x80,0x65,0x51,0x40,0x4d,0x60,0x6d,
+0x80,0x80,0x6d,0x59,0x40,0x40,0x5a,0x6b,0x80,0x80,0x71,0x60,0x40,0x40,0x5a,0x72,
+0x80,0x80,0x73,0x61,0x40,0x40,0x5b,0x6f,0x80,0x80,0x69,0x43,0x40,0x40,0x5a,0x6a,
+0x80,0x80,0x77,0x57,0x40,0x49,0x54,0x60,0x80,0x80,0x79,0x4b,0x40,0x40,0x4f,0x67,
+0x80,0x80,0x7a,0x4b,0x40,0x40,0x56,0x68,0x80,0x80,0x77,0x59,0x40,0x40,0x4d,0x54,
+0x80,0x80,0x79,0x4d,0x40,0x40,0x5b,0x60,0x80,0x80,0x71,0x2c,0x40,0x5b,0x60,0x65,
+0x00,0x00,0x80,0x64,0x40,0x40,0x55,0x62,0x80,0x80,0x6b,0x43,0x40,0x40,0x53,0x65,
+0x80,0x80,0x6d,0x57,0x40,0x40,0x52,0x66,0x80,0x80,0x71,0x63,0x40,0x40,0x52,0x68,
+0x80,0x80,0x69,0x53,0x40,0x40,0x5c,0x6e,0x80,0x80,0x73,0x4f,0x40,0x40,0x54,0x66,
+0x80,0x80,0x6f,0x4f,0x40,0x4f,0x5d,0x6e,0x80,0x80,0x6d,0x4f,0x40,0x40,0x5b,0x6f,
+0x80,0x80,0x73,0x55,0x40,0x40,0x55,0x66,0x80,0x80,0x71,0x5d,0x40,0x40,0x54,0x69,
+0x80,0x80,0x73,0x5a,0x40,0x40,0x40,0x4c,0x80,0x80,0x82,0x02,0x35,0x41,0x59,0x6b,
+0x00,0x80,0x67,0x2f,0x40,0x40,0x62,0x71,0x80,0x80,0x73,0x53,0x40,0x40,0x62,0x73,
+0x80,0x80,0x73,0x57,0x40,0x40,0x5a,0x6d,0x80,0x80,0x77,0x63,0x40,0x40,0x5c,0x6d,
+0x80,0x80,0x75,0x67,0x40,0x40,0x66,0x6f,0x80,0x80,0x71,0x4d,0x40,0x40,0x66,0x6e,
+0x80,0x80,0x65,0x37,0x40,0x40,0x61,0x6d,0x80,0x80,0x73,0x5d,0x40,0x40,0x5e,0x6c,
+0x80,0x80,0x6f,0x57,0x40,0x40,0x5f,0x6f,0x80,0x80,0x6d,0x4f,0x40,0x40,0x5b,0x72,
+0x80,0x80,0x71,0x57,0x40,0x40,0x63,0x72,0x80,0x80,0x75,0x48,0x40,0x56,0x69,0x77,
+0x80,0x80,0x6c,0x51,0x40,0x4f,0x64,0x74,0x80,0x80,0x6b,0x53,0x1e,0x2a,0x36,0x37,
+0x80,0x80,0x80,0x00,0x40,0x40,0x5a,0x69,0x80,0x80,0x6c,0x4b,0x40,0x40,0x55,0x68,
+0x80,0x80,0x71,0x4d,0x09,0x0a,0x0b,0x0c,0x0d,0x0e,0x0f,0x00,0x00,0x01,0x02,0x03,
+0x04,0x05,0x06,0x07,0x01,0xf0,0x7e,0x00,0x09,0x01,0xf7,0x7f,0x7f,0x7f,0x7f,0x7f,
+0x7f,0x7f,0x7f,0x7f,0x7a,0x75,0x71,0x6d,0x69,0x66,0x62,0x5f,0x5d,0x5a,0x58,0x55,
+0x53,0x51,0x4f,0x4d,0x4b,0x49,0x47,0x46,0x44,0x42,0x41,0x3f,0x3e,0x3d,0x3b,0x3a,
+0x39,0x37,0x36,0x35,0x34,0x33,0x32,0x31,0x30,0x2f,0x2e,0x2d,0x2c,0x2b,0x2a,0x29,
+0x28,0x27,0x26,0x25,0x25,0x24,0x23,0x22,0x21,0x21,0x20,0x1f,0x1f,0x1e,0x1d,0x1c,
+0x1c,0x1b,0x1a,0x1a,0x19,0x19,0x18,0x17,0x17,0x16,0x15,0x15,0x14,0x14,0x13,0x13,
+0x12,0x12,0x11,0x10,0x10,0x0f,0x0f,0x0e,0x0e,0x0d,0x0d,0x0c,0x0c,0x0c,0x0b,0x0b,
+0x0a,0x0a,0x09,0x09,0x08,0x08,0x07,0x07,0x07,0x06,0x06,0x05,0x05,0x05,0x04,0x04,
+0x03,0x03,0x03,0x02,0x02,0x01,0x01,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x01,0x00,0x01,0x00,0x02,0x00,0x02,0x00,0x03,0x00,0x03,0x00,0x04,0x00,
+0x04,0x00,0x05,0x00,0x05,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x07,0x00,0x07,0x00,
+0x08,0x00,0x08,0x00,0x09,0x00,0x09,0x00,0x0a,0x00,0x0a,0x00,0x0b,0x00,0x0b,0x00,
+0x0c,0x00,0x0c,0x00,0x0d,0x00,0x0d,0x00,0x0d,0x00,0x0e,0x00,0x0e,0x00,0x0f,0x00,
+0x0f,0x00,0x10,0x00,0x10,0x00,0x11,0x00,0x11,0x00,0x12,0x00,0x12,0x00,0x13,0x00,
+0x13,0x00,0x14,0x00,0x14,0x00,0x15,0x00,0x15,0x00,0x15,0x00,0x16,0x00,0x16,0x00,
+0x17,0x00,0x17,0x00,0x18,0x00,0x18,0x00,0x19,0x00,0x19,0x00,0x1a,0x00,0x1a,0x00,
+0x1b,0x00,0x1b,0x00,0x1c,0x00,0x1c,0x00,0x1d,0x00,0x1d,0x00,0x1e,0x00,0x1e,0x00,
+0x1e,0x00,0x1f,0x00,0x1f,0x00,0x20,0x00,0x20,0x00,0x21,0x00,0x21,0x00,0x22,0x00,
+0x22,0x00,0x23,0x00,0x23,0x00,0x24,0x00,0x24,0x00,0x25,0x00,0x25,0x00,0x26,0x00,
+0x26,0x00,0x27,0x00,0x27,0x00,0x28,0x00,0x28,0x00,0x29,0x00,0x29,0x00,0x29,0x00,
+0x2a,0x00,0x2a,0x00,0x2b,0x00,0x2b,0x00,0x2c,0x00,0x2c,0x00,0x2d,0x00,0x2d,0x00,
+0x2e,0x00,0x2e,0x00,0x2f,0x00,0x2f,0x00,0x30,0x00,0x30,0x00,0x31,0x00,0x31,0x00,
+0x32,0x00,0x32,0x00,0x33,0x00,0x33,0x00,0x34,0x00,0x34,0x00,0x35,0x00,0x35,0x00,
+0x36,0x00,0x36,0x00,0x37,0x00,0x37,0x00,0x38,0x00,0x38,0x00,0x38,0x00,0x39,0x00,
+0x39,0x00,0x3a,0x00,0x3a,0x00,0x3b,0x00,0x3b,0x00,0x3c,0x00,0x3c,0x00,0x3d,0x00,
+0x3d,0x00,0x3e,0x00,0x3e,0x00,0x3f,0x00,0x3f,0x00,0x40,0x00,0x40,0x00,0x41,0x00,
+0x41,0x00,0x42,0x00,0x42,0x00,0x43,0x00,0x43,0x00,0x44,0x00,0x44,0x00,0x45,0x00,
+0x45,0x00,0x46,0x00,0x46,0x00,0x47,0x00,0x47,0x00,0x48,0x00,0x48,0x00,0x49,0x00,
+0x49,0x00,0x4a,0x00,0x4a,0x00,0x4b,0x00,0x4b,0x00,0x4c,0x00,0x4c,0x00,0x4d,0x00,
+0x4d,0x00,0x4e,0x00,0x4e,0x00,0x4f,0x00,0x4f,0x00,0x50,0x00,0x50,0x00,0x51,0x00,
+0x51,0x00,0x52,0x00,0x52,0x00,0x53,0x00,0x53,0x00,0x54,0x00,0x54,0x00,0x55,0x00,
+0x55,0x00,0x56,0x00,0x56,0x00,0x57,0x00,0x57,0x00,0x58,0x00,0x58,0x00,0x59,0x00,
+0x59,0x00,0x5a,0x00,0x5a,0x00,0x5b,0x00,0x5b,0x00,0x5c,0x00,0x5c,0x00,0x5d,0x00,
+0x5d,0x00,0x5e,0x00,0x5e,0x00,0x5f,0x00,0x5f,0x00,0x60,0x00,0x60,0x00,0x61,0x00,
+0x61,0x00,0x62,0x00,0x62,0x00,0x63,0x00,0x63,0x00,0x64,0x00,0x64,0x00,0x65,0x00,
+0x65,0x00,0x66,0x00,0x66,0x00,0x67,0x00,0x67,0x00,0x68,0x00,0x68,0x00,0x69,0x00,
+0x69,0x00,0x6a,0x00,0x6a,0x00,0x6b,0x00,0x6b,0x00,0x6c,0x00,0x6c,0x00,0x6d,0x00,
+0x6d,0x00,0x6e,0x00,0x6e,0x00,0x6f,0x00,0x6f,0x00,0x70,0x00,0x71,0x00,0x71,0x00,
+0x72,0x00,0x72,0x00,0x73,0x00,0x73,0x00,0x74,0x00,0x74,0x00,0x75,0x00,0x75,0x00,
+0x76,0x00,0x76,0x00,0x77,0x00,0x77,0x00,0x78,0x00,0x78,0x00,0x79,0x00,0x79,0x00,
+0x7a,0x00,0x7a,0x00,0x7b,0x00,0x7b,0x00,0x7c,0x00,0x7c,0x00,0x7d,0x00,0x7d,0x00,
+0x7e,0x00,0x7e,0x00,0x7f,0x00,0x7f,0x00,0x80,0x00,0x81,0x00,0x81,0x00,0x82,0x00,
+0x82,0x00,0x83,0x00,0x83,0x00,0x84,0x00,0x84,0x00,0x85,0x00,0x85,0x00,0x86,0x00,
+0x86,0x00,0x87,0x00,0x87,0x00,0x88,0x00,0x88,0x00,0x89,0x00,0x89,0x00,0x8a,0x00,
+0x8a,0x00,0x8b,0x00,0x8c,0x00,0x8c,0x00,0x8d,0x00,0x8d,0x00,0x8e,0x00,0x8e,0x00,
+0x8f,0x00,0x8f,0x00,0x90,0x00,0x90,0x00,0x91,0x00,0x91,0x00,0x92,0x00,0x92,0x00,
+0x93,0x00,0x93,0x00,0x94,0x00,0x94,0x00,0x95,0x00,0x96,0x00,0x96,0x00,0x97,0x00,
+0x97,0x00,0x98,0x00,0x98,0x00,0x99,0x00,0x99,0x00,0x9a,0x00,0x9a,0x00,0x9b,0x00,
+0x9b,0x00,0x9c,0x00,0x9c,0x00,0x9d,0x00,0x9e,0x00,0x9e,0x00,0x9f,0x00,0x9f,0x00,
+0xa0,0x00,0xa0,0x00,0xa1,0x00,0xa1,0x00,0xa2,0x00,0xa2,0x00,0xa3,0x00,0xa3,0x00,
+0xa4,0x00,0xa4,0x00,0xa5,0x00,0xa6,0x00,0xa6,0x00,0xa7,0x00,0xa7,0x00,0xa8,0x00,
+0xa8,0x00,0xa9,0x00,0xa9,0x00,0xaa,0x00,0xaa,0x00,0xab,0x00,0xab,0x00,0xac,0x00,
+0xad,0x00,0xad,0x00,0xae,0x00,0xae,0x00,0xaf,0x00,0xaf,0x00,0xb0,0x00,0xb0,0x00,
+0xb1,0x00,0xb1,0x00,0xb2,0x00,0xb3,0x00,0xb3,0x00,0xb4,0x00,0xb4,0x00,0xb5,0x00,
+0xb5,0x00,0xb6,0x00,0xb6,0x00,0xb7,0x00,0xb7,0x00,0xb8,0x00,0xb8,0x00,0xb9,0x00,
+0xba,0x00,0xba,0x00,0xbb,0x00,0xbb,0x00,0xbc,0x00,0xbc,0x00,0xbd,0x00,0xbd,0x00,
+0xbe,0x00,0xbf,0x00,0xbf,0x00,0xc0,0x00,0xc0,0x00,0xc1,0x00,0xc1,0x00,0xc2,0x00,
+0xc2,0x00,0xc3,0x00,0xc3,0x00,0xc4,0x00,0xc5,0x00,0xc5,0x00,0xc6,0x00,0xc6,0x00,
+0xc7,0x00,0xc7,0x00,0xc8,0x00,0xc8,0x00,0xc9,0x00,0xca,0x00,0xca,0x00,0xcb,0x00,
+0xcb,0x00,0xcc,0x00,0xcc,0x00,0xcd,0x00,0xcd,0x00,0xce,0x00,0xcf,0x00,0xcf,0x00,
+0xd0,0x00,0xd0,0x00,0xd1,0x00,0xd1,0x00,0xd2,0x00,0xd2,0x00,0xd3,0x00,0xd4,0x00,
+0xd4,0x00,0xd5,0x00,0xd5,0x00,0xd6,0x00,0xd6,0x00,0xd7,0x00,0xd7,0x00,0xd8,0x00,
+0xd9,0x00,0xd9,0x00,0xda,0x00,0xda,0x00,0xdb,0x00,0xdb,0x00,0xdc,0x00,0xdc,0x00,
+0xdd,0x00,0xde,0x00,0xde,0x00,0xdf,0x00,0xdf,0x00,0xe0,0x00,0xe0,0x00,0xe1,0x00,
+0xe2,0x00,0xe2,0x00,0xe3,0x00,0xe3,0x00,0xe4,0x00,0xe4,0x00,0xe5,0x00,0xe5,0x00,
+0xe6,0x00,0xe7,0x00,0xe7,0x00,0xe8,0x00,0xe8,0x00,0xe9,0x00,0xe9,0x00,0xea,0x00,
+0xeb,0x00,0xeb,0x00,0xec,0x00,0xec,0x00,0xed,0x00,0xed,0x00,0xee,0x00,0xef,0x00,
+0xef,0x00,0xf0,0x00,0xf0,0x00,0xf1,0x00,0xf1,0x00,0xf2,0x00,0xf3,0x00,0xf3,0x00,
+0xf4,0x00,0xf4,0x00,0xf5,0x00,0xf5,0x00,0xf6,0x00,0xf7,0x00,0xf7,0x00,0xf8,0x00,
+0xf8,0x00,0xf9,0x00,0xf9,0x00,0xfa,0x00,0xfb,0x00,0xfb,0x00,0xfc,0x00,0xfc,0x00,
+0xfd,0x00,0xfd,0x00,0xfe,0x00,0xff,0x00,0xff,0x01,0x00,0x01,0x00,0x01,0x01,0x01,
+0x02,0x01,0x02,0x01,0x03,0x01,0x03,0x01,0x04,0x01,0x04,0x01,0x05,0x01,0x06,0x01,
+0x06,0x01,0x07,0x01,0x07,0x01,0x08,0x01,0x08,0x01,0x09,0x01,0x0a,0x01,0x0a,0x01,
+0x0b,0x01,0x0b,0x01,0x0c,0x01,0x0d,0x01,0x0d,0x01,0x0e,0x01,0x0e,0x01,0x0f,0x01,
+0x0f,0x01,0x10,0x01,0x11,0x01,0x11,0x01,0x12,0x01,0x12,0x01,0x13,0x01,0x14,0x01,
+0x14,0x01,0x15,0x01,0x15,0x01,0x16,0x01,0x17,0x01,0x17,0x01,0x18,0x01,0x18,0x01,
+0x19,0x01,0x19,0x01,0x1a,0x01,0x1b,0x01,0x1b,0x01,0x1c,0x01,0x1c,0x01,0x1d,0x01,
+0x1e,0x01,0x1e,0x01,0x1f,0x01,0x1f,0x01,0x20,0x01,0x21,0x01,0x21,0x01,0x22,0x01,
+0x22,0x01,0x23,0x01,0x24,0x01,0x24,0x01,0x25,0x01,0x25,0x01,0x26,0x01,0x27,0x01,
+0x27,0x01,0x28,0x01,0x28,0x01,0x29,0x01,0x29,0x01,0x2a,0x01,0x2b,0x01,0x2b,0x01,
+0x2c,0x01,0x2c,0x01,0x2d,0x01,0x2e,0x01,0x2e,0x01,0x2f,0x01,0x2f,0x01,0x30,0x01,
+0x31,0x01,0x31,0x01,0x32,0x01,0x32,0x01,0x33,0x01,0x34,0x01,0x34,0x01,0x35,0x01,
+0x35,0x01,0x36,0x01,0x37,0x01,0x37,0x01,0x38,0x01,0x38,0x01,0x39,0x01,0x3a,0x01,
+0x3a,0x01,0x3b,0x01,0x3c,0x01,0x3c,0x01,0x3d,0x01,0x3d,0x01,0x3e,0x01,0x3f,0x01,
+0x3f,0x01,0x40,0x01,0x40,0x01,0x41,0x01,0x42,0x01,0x42,0x01,0x43,0x01,0x43,0x01,
+0x44,0x01,0x45,0x01,0x45,0x01,0x46,0x01,0x46,0x01,0x47,0x01,0x48,0x01,0x48,0x01,
+0x49,0x01,0x49,0x01,0x4a,0x01,0x4b,0x01,0x4b,0x01,0x4c,0x01,0x4d,0x01,0x4d,0x01,
+0x4e,0x01,0x4e,0x01,0x4f,0x01,0x50,0x01,0x50,0x01,0x51,0x01,0x51,0x01,0x52,0x01,
+0x53,0x01,0x53,0x01,0x54,0x01,0x55,0x01,0x55,0x01,0x56,0x01,0x56,0x01,0x57,0x01,
+0x58,0x01,0x58,0x01,0x59,0x01,0x59,0x01,0x5a,0x01,0x5b,0x01,0x5b,0x01,0x5c,0x01,
+0x5d,0x01,0x5d,0x01,0x5e,0x01,0x5e,0x01,0x5f,0x01,0x60,0x01,0x60,0x01,0x61,0x01,
+0x62,0x01,0x62,0x01,0x63,0x01,0x63,0x01,0x64,0x01,0x65,0x01,0x65,0x01,0x66,0x01,
+0x67,0x01,0x67,0x01,0x68,0x01,0x68,0x01,0x69,0x01,0x6a,0x01,0x6a,0x01,0x6b,0x01,
+0x6c,0x01,0x6c,0x01,0x6d,0x01,0x6d,0x01,0x6e,0x01,0x6f,0x01,0x6f,0x01,0x70,0x01,
+0x71,0x01,0x71,0x01,0x72,0x01,0x72,0x01,0x73,0x01,0x74,0x01,0x74,0x01,0x75,0x01,
+0x76,0x01,0x76,0x01,0x77,0x01,0x77,0x01,0x78,0x01,0x79,0x01,0x79,0x01,0x7a,0x01,
+0x7b,0x01,0x7b,0x01,0x7c,0x01,0x7d,0x01,0x7d,0x01,0x7e,0x01,0x7e,0x01,0x7f,0x01,
+0x80,0x01,0x80,0x01,0x81,0x01,0x82,0x01,0x82,0x01,0x83,0x01,0x84,0x01,0x84,0x01,
+0x85,0x01,0x85,0x01,0x86,0x01,0x87,0x01,0x87,0x01,0x88,0x01,0x89,0x01,0x89,0x01,
+0x8a,0x01,0x8b,0x01,0x8b,0x01,0x8c,0x01,0x8c,0x01,0x8d,0x01,0x8e,0x01,0x8e,0x01,
+0x8f,0x01,0x90,0x01,0x90,0x01,0x91,0x01,0x92,0x01,0x92,0x01,0x93,0x01,0x94,0x01,
+0x94,0x01,0x95,0x01,0x95,0x01,0x96,0x01,0x97,0x01,0x97,0x01,0x98,0x01,0x99,0x01,
+0x99,0x01,0x9a,0x01,0x9b,0x01,0x9b,0x01,0x9c,0x01,0x9d,0x01,0x9d,0x01,0x9e,0x01,
+0x9f,0x01,0x9f,0x01,0xa0,0x01,0xa0,0x01,0xa1,0x01,0xa2,0x01,0xa2,0x01,0xa3,0x01,
+0xa4,0x01,0xa4,0x01,0xa5,0x01,0xa6,0x01,0xa6,0x01,0xa7,0x01,0xa8,0x01,0xa8,0x01,
+0xa9,0x01,0xaa,0x01,0xaa,0x01,0xab,0x01,0xac,0x01,0xac,0x01,0xad,0x01,0xae,0x01,
+0xae,0x01,0xaf,0x01,0xb0,0x01,0xb0,0x01,0xb1,0x01,0xb1,0x01,0xb2,0x01,0xb3,0x01,
+0xb3,0x01,0xb4,0x01,0xb5,0x01,0xb5,0x01,0xb6,0x01,0xb7,0x01,0xb7,0x01,0xb8,0x01,
+0xb9,0x01,0xb9,0x01,0xba,0x01,0xbb,0x01,0xbb,0x01,0xbc,0x01,0xbd,0x01,0xbd,0x01,
+0xbe,0x01,0xbf,0x01,0xbf,0x01,0xc0,0x01,0xc1,0x01,0xc1,0x01,0xc2,0x01,0xc3,0x01,
+0xc3,0x01,0xc4,0x01,0xc5,0x01,0xc5,0x01,0xc6,0x01,0xc7,0x01,0xc7,0x01,0xc8,0x01,
+0xc9,0x01,0xc9,0x01,0xca,0x01,0xcb,0x01,0xcb,0x01,0xcc,0x01,0xcd,0x01,0xcd,0x01,
+0xce,0x01,0xcf,0x01,0xcf,0x01,0xd0,0x01,0xd1,0x01,0xd1,0x01,0xd2,0x01,0xd3,0x01,
+0xd3,0x01,0xd4,0x01,0xd5,0x01,0xd5,0x01,0xd6,0x01,0xd7,0x01,0xd7,0x01,0xd8,0x01,
+0xd9,0x01,0xda,0x01,0xda,0x01,0xdb,0x01,0xdc,0x01,0xdc,0x01,0xdd,0x01,0xde,0x01,
+0xde,0x01,0xdf,0x01,0xe0,0x01,0xe0,0x01,0xe1,0x01,0xe2,0x01,0xe2,0x01,0xe3,0x01,
+0xe4,0x01,0xe4,0x01,0xe5,0x01,0xe6,0x01,0xe6,0x01,0xe7,0x01,0xe8,0x01,0xe8,0x01,
+0xe9,0x01,0xea,0x01,0xeb,0x01,0xeb,0x01,0xec,0x01,0xed,0x01,0xed,0x01,0xee,0x01,
+0xef,0x01,0xef,0x01,0xf0,0x01,0xf1,0x01,0xf1,0x01,0xf2,0x01,0xf3,0x01,0xf3,0x01,
+0xf4,0x01,0xf5,0x01,0xf5,0x01,0xf6,0x01,0xf7,0x01,0xf8,0x01,0xf8,0x01,0xf9,0x01,
+0xfa,0x01,0xfa,0x01,0xfb,0x01,0xfc,0x01,0xfc,0x01,0xfd,0x01,0xfe,0x01,0xfe,0x01,
+0xff,0x02,0x00,0x02,0x01,0x02,0x01,0x02,0x02,0x02,0x03,0x02,0x03,0x02,0x04,0x02,
+0x05,0x02,0x05,0x02,0x06,0x02,0x07,0x02,0x07,0x02,0x08,0x02,0x09,0x02,0x0a,0x02,
+0x0a,0x02,0x0b,0x02,0x0c,0x02,0x0c,0x02,0x0d,0x02,0x0e,0x02,0x0e,0x02,0x0f,0x02,
+0x10,0x02,0x11,0x02,0x11,0x02,0x12,0x02,0x13,0x02,0x13,0x02,0x14,0x02,0x15,0x02,
+0x15,0x02,0x16,0x02,0x17,0x02,0x18,0x02,0x18,0x02,0x19,0x02,0x1a,0x02,0x1a,0x02,
+0x1b,0x02,0x1c,0x02,0x1d,0x02,0x1d,0x02,0x1e,0x02,0x1f,0x02,0x1f,0x02,0x20,0x02,
+0x21,0x02,0x21,0x02,0x22,0x02,0x23,0x02,0x24,0x02,0x24,0x02,0x25,0x02,0x26,0x02,
+0x26,0x02,0x27,0x02,0x28,0x02,0x29,0x02,0x29,0x02,0x2a,0x02,0x2b,0x02,0x2b,0x02,
+0x2c,0x02,0x2d,0x02,0x2e,0x02,0x2e,0x02,0x2f,0x02,0x30,0x02,0x30,0x02,0x31,0x02,
+0x32,0x02,0x33,0x02,0x33,0x02,0x34,0x02,0x35,0x02,0x35,0x02,0x36,0x02,0x37,0x02,
+0x38,0x02,0x38,0x02,0x39,0x02,0x3a,0x02,0x3a,0x02,0x3b,0x02,0x3c,0x02,0x3d,0x02,
+0x3d,0x02,0x3e,0x02,0x3f,0x02,0x40,0x02,0x40,0x02,0x41,0x02,0x42,0x02,0x42,0x02,
+0x43,0x02,0x44,0x02,0x45,0x02,0x45,0x02,0x46,0x02,0x47,0x02,0x47,0x02,0x48,0x02,
+0x49,0x02,0x4a,0x02,0x4a,0x02,0x4b,0x02,0x4c,0x02,0x4d,0x02,0x4d,0x02,0x4e,0x02,
+0x4f,0x02,0x4f,0x02,0x50,0x02,0x51,0x02,0x52,0x02,0x52,0x02,0x53,0x02,0x54,0x02,
+0x55,0x02,0x55,0x02,0x56,0x02,0x57,0x02,0x58,0x02,0x58,0x02,0x59,0x02,0x5a,0x02,
+0x5a,0x02,0x5b,0x02,0x5c,0x02,0x5d,0x02,0x5d,0x02,0x5e,0x02,0x5f,0x02,0x60,0x02,
+0x60,0x02,0x61,0x02,0x62,0x02,0x63,0x02,0x63,0x02,0x64,0x02,0x65,0x02,0x66,0x02,
+0x66,0x02,0x67,0x02,0x68,0x02,0x68,0x02,0x69,0x02,0x6a,0x02,0x6b,0x02,0x6b,0x02,
+0x6c,0x02,0x6d,0x02,0x6e,0x02,0x6e,0x02,0x6f,0x02,0x70,0x02,0x71,0x02,0x71,0x02,
+0x72,0x02,0x73,0x02,0x74,0x02,0x74,0x02,0x75,0x02,0x76,0x02,0x77,0x02,0x77,0x02,
+0x78,0x02,0x79,0x02,0x7a,0x02,0x7a,0x02,0x7b,0x02,0x7c,0x02,0x7d,0x02,0x7d,0x02,
+0x7e,0x02,0x7f,0x02,0x80,0x02,0x80,0x02,0x81,0x02,0x82,0x02,0x83,0x02,0x83,0x02,
+0x84,0x02,0x85,0x02,0x86,0x02,0x86,0x02,0x87,0x02,0x88,0x02,0x89,0x02,0x89,0x02,
+0x8a,0x02,0x8b,0x02,0x8c,0x02,0x8c,0x02,0x8d,0x02,0x8e,0x02,0x8f,0x02,0x8f,0x02,
+0x90,0x02,0x91,0x02,0x92,0x02,0x92,0x02,0x93,0x02,0x94,0x02,0x95,0x02,0x96,0x02,
+0x96,0x02,0x97,0x02,0x98,0x02,0x99,0x02,0x99,0x02,0x9a,0x02,0x9b,0x02,0x9c,0x02,
+0x9c,0x02,0x9d,0x02,0x9e,0x02,0x9f,0x02,0x9f,0x02,0xa0,0x02,0xa1,0x02,0xa2,0x02,
+0xa2,0x02,0xa3,0x02,0xa4,0x02,0xa5,0x02,0xa6,0x02,0xa6,0x02,0xa7,0x02,0xa8,0x02,
+0xa9,0x02,0xa9,0x02,0xaa,0x02,0xab,0x02,0xac,0x02,0xac,0x02,0xad,0x02,0xae,0x02,
+0xaf,0x02,0xb0,0x02,0xb0,0x02,0xb1,0x02,0xb2,0x02,0xb3,0x02,0xb3,0x02,0xb4,0x02,
+0xb5,0x02,0xb6,0x02,0xb7,0x02,0xb7,0x02,0xb8,0x02,0xb9,0x02,0xba,0x02,0xba,0x02,
+0xbb,0x02,0xbc,0x02,0xbd,0x02,0xbe,0x02,0xbe,0x02,0xbf,0x02,0xc0,0x02,0xc1,0x02,
+0xc1,0x02,0xc2,0x02,0xc3,0x02,0xc4,0x02,0xc5,0x02,0xc5,0x02,0xc6,0x02,0xc7,0x02,
+0xc8,0x02,0xc8,0x02,0xc9,0x02,0xca,0x02,0xcb,0x02,0xcc,0x02,0xcc,0x02,0xcd,0x02,
+0xce,0x02,0xcf,0x02,0xd0,0x02,0xd0,0x02,0xd1,0x02,0xd2,0x02,0xd3,0x02,0xd3,0x02,
+0xd4,0x02,0xd5,0x02,0xd6,0x02,0xd7,0x02,0xd7,0x02,0xd8,0x02,0xd9,0x02,0xda,0x02,
+0xdb,0x02,0xdb,0x02,0xdc,0x02,0xdd,0x02,0xde,0x02,0xdf,0x02,0xdf,0x02,0xe0,0x02,
+0xe1,0x02,0xe2,0x02,0xe3,0x02,0xe3,0x02,0xe4,0x02,0xe5,0x02,0xe6,0x02,0xe7,0x02,
+0xe7,0x02,0xe8,0x02,0xe9,0x02,0xea,0x02,0xeb,0x02,0xeb,0x02,0xec,0x02,0xed,0x02,
+0xee,0x02,0xef,0x02,0xef,0x02,0xf0,0x02,0xf1,0x02,0xf2,0x02,0xf3,0x02,0xf3,0x02,
+0xf4,0x02,0xf5,0x02,0xf6,0x02,0xf7,0x02,0xf7,0x02,0xf8,0x02,0xf9,0x02,0xfa,0x02,
+0xfb,0x02,0xfb,0x02,0xfc,0x02,0xfd,0x02,0xfe,0x02,0xff,0x02,0xff,0x03,0x00,0x03,
+0x01,0x03,0x02,0x03,0x03,0x03,0x03,0x03,0x04,0x03,0x05,0x03,0x06,0x03,0x07,0x03,
+0x08,0x03,0x08,0x03,0x09,0x03,0x0a,0x03,0x0b,0x03,0x0c,0x03,0x0c,0x03,0x0d,0x03,
+0x0e,0x03,0x0f,0x03,0x10,0x03,0x10,0x03,0x11,0x03,0x12,0x03,0x13,0x03,0x14,0x03,
+0x15,0x03,0x15,0x03,0x16,0x03,0x17,0x03,0x18,0x03,0x19,0x03,0x19,0x03,0x1a,0x03,
+0x1b,0x03,0x1c,0x03,0x1d,0x03,0x1e,0x03,0x1e,0x03,0x1f,0x03,0x20,0x03,0x21,0x03,
+0x22,0x03,0x23,0x03,0x23,0x03,0x24,0x03,0x25,0x03,0x26,0x03,0x27,0x03,0x27,0x03,
+0x28,0x03,0x29,0x03,0x2a,0x03,0x2b,0x03,0x2c,0x03,0x2c,0x03,0x2d,0x03,0x2e,0x03,
+0x2f,0x03,0x30,0x03,0x31,0x03,0x31,0x03,0x32,0x03,0x33,0x03,0x34,0x03,0x35,0x03,
+0x36,0x03,0x36,0x03,0x37,0x03,0x38,0x03,0x39,0x03,0x3a,0x03,0x3b,0x03,0x3b,0x03,
+0x3c,0x03,0x3d,0x03,0x3e,0x03,0x3f,0x03,0x40,0x03,0x40,0x03,0x41,0x03,0x42,0x03,
+0x43,0x03,0x44,0x03,0x45,0x03,0x45,0x03,0x46,0x03,0x47,0x03,0x48,0x03,0x49,0x03,
+0x4a,0x03,0x4b,0x03,0x4b,0x03,0x4c,0x03,0x4d,0x03,0x4e,0x03,0x4f,0x03,0x50,0x03,
+0x50,0x03,0x51,0x03,0x52,0x03,0x53,0x03,0x54,0x03,0x55,0x03,0x56,0x03,0x56,0x03,
+0x57,0x03,0x58,0x03,0x59,0x03,0x5a,0x03,0x5b,0x03,0x5b,0x03,0x5c,0x03,0x5d,0x03,
+0x5e,0x03,0x5f,0x03,0x60,0x03,0x61,0x03,0x61,0x03,0x62,0x03,0x63,0x03,0x64,0x03,
+0x65,0x03,0x66,0x03,0x67,0x03,0x67,0x03,0x68,0x03,0x69,0x03,0x6a,0x03,0x6b,0x03,
+0x6c,0x03,0x6d,0x03,0x6d,0x03,0x6e,0x03,0x6f,0x03,0x70,0x03,0x71,0x03,0x72,0x03,
+0x73,0x03,0x73,0x03,0x74,0x03,0x75,0x03,0x76,0x03,0x77,0x03,0x78,0x03,0x79,0x03,
+0x79,0x03,0x7a,0x03,0x7b,0x03,0x7c,0x03,0x7d,0x03,0x7e,0x03,0x7f,0x03,0x80,0x03,
+0x80,0x03,0x81,0x03,0x82,0x03,0x83,0x03,0x84,0x03,0x85,0x03,0x86,0x03,0x86,0x03,
+0x87,0x03,0x88,0x03,0x89,0x03,0x8a,0x03,0x8b,0x03,0x8c,0x03,0x8d,0x03,0x8d,0x03,
+0x8e,0x03,0x8f,0x03,0x90,0x03,0x91,0x03,0x92,0x03,0x93,0x03,0x94,0x03,0x94,0x03,
+0x95,0x03,0x96,0x03,0x97,0x03,0x98,0x03,0x99,0x03,0x9a,0x03,0x9b,0x03,0x9b,0x03,
+0x9c,0x03,0x9d,0x03,0x9e,0x03,0x9f,0x03,0xa0,0x03,0xa1,0x03,0xa2,0x03,0xa2,0x03,
+0xa3,0x03,0xa4,0x03,0xa5,0x03,0xa6,0x03,0xa7,0x03,0xa8,0x03,0xa9,0x03,0xaa,0x03,
+0xaa,0x03,0xab,0x03,0xac,0x03,0xad,0x03,0xae,0x03,0xaf,0x03,0xb0,0x03,0xb1,0x03,
+0xb2,0x03,0xb2,0x03,0xb3,0x03,0xb4,0x03,0xb5,0x03,0xb6,0x03,0xb7,0x03,0xb8,0x03,
+0xb9,0x03,0xba,0x03,0xba,0x03,0xbb,0x03,0xbc,0x03,0xbd,0x03,0xbe,0x03,0xbf,0x03,
+0xc0,0x03,0xc1,0x03,0xc2,0x03,0xc3,0x03,0xc3,0x03,0xc4,0x03,0xc5,0x03,0xc6,0x03,
+0xc7,0x03,0xc8,0x03,0xc9,0x03,0xca,0x03,0xcb,0x03,0xcb,0x03,0xcc,0x03,0xcd,0x03,
+0xce,0x03,0xcf,0x03,0xd0,0x03,0xd1,0x03,0xd2,0x03,0xd3,0x03,0xd4,0x03,0xd5,0x03,
+0xd5,0x03,0xd6,0x03,0xd7,0x03,0xd8,0x03,0xd9,0x03,0xda,0x03,0xdb,0x03,0xdc,0x03,
+0xdd,0x03,0xde,0x03,0xde,0x03,0xdf,0x03,0xe0,0x03,0xe1,0x03,0xe2,0x03,0xe3,0x03,
+0xe4,0x03,0xe5,0x03,0xe6,0x03,0xe7,0x03,0xe8,0x03,0xe9,0x03,0xe9,0x03,0xea,0x03,
+0xeb,0x03,0xec,0x03,0xed,0x03,0xee,0x03,0xef,0x03,0xf0,0x03,0xf1,0x03,0xf2,0x03,
+0xf3,0x03,0xf4,0x03,0xf4,0x03,0xf5,0x03,0xf6,0x03,0xf7,0x03,0xf8,0x03,0xf9,0x03,
+0xfa,0x03,0xfb,0x03,0xfc,0x03,0xfd,0x03,0xfe,0x03,0xff,0x54,0x52,0x49,0x58,0x2d,
+0x50,0x52,0x4f,0x01,0x0a,0x00,0x01,0x02,0x03,0x04,0x05,0x04,0x03,0x10,0x10,0x48,
+0x12,0x13,0x14,0x15,0x17,0x06,0x06,0x06,0x06,0x07,0x07,0x08,0x08,0x3e,0x3f,0x3e,
+0x3f,0x27,0x27,0x51,0x26,0x58,0x5e,0x36,0x5c,0x61,0x63,0x62,0x6d,0x66,0x60,0x44,
+0x5d,0x50,0x51,0x09,0x50,0x30,0x30,0x31,0x2d,0x28,0x29,0x2a,0x2a,0x2b,0x2e,0x2e,
+0x18,0x19,0x1a,0x1b,0x68,0x20,0x21,0x22,0x22,0x24,0x25,0x23,0x20,0x49,0x49,0x48,
+0x48,0x4a,0x4b,0x40,0x41,0x42,0x43,0x47,0x47,0x44,0x45,0x46,0x16,0x38,0x38,0x39,
+0x39,0x3c,0x3c,0x3a,0x3d,0x3e,0x0b,0x62,0x2e,0x64,0x09,0x0e,0x0d,0x0c,0x6b,0x56,
+0x52,0x4e,0x4e,0x4b,0x5e,0x2f,0x75,0x76,0x76,0x76,0x74,0x73,0x77,0x73,0x09,0x37,
+0x7c,0x7b,0x7d,0x70,0x52
+};
+
diff --git a/sys/i386/isa/sound/tuning.h b/sys/i386/isa/sound/tuning.h
index 98048cc..858e1fe 100644
--- a/sys/i386/isa/sound/tuning.h
+++ b/sys/i386/isa/sound/tuning.h
@@ -1,13 +1,13 @@
#ifdef SEQUENCER_C
-static unsigned short semitone_tuning[24] =
+unsigned short semitone_tuning[24] =
{
/* 0 */ 10000, 10595, 11225, 11892, 12599, 13348, 14142, 14983,
/* 8 */ 15874, 16818, 17818, 18877, 20000, 21189, 22449, 23784,
/* 16 */ 25198, 26697, 28284, 29966, 31748, 33636, 35636, 37755
};
-static unsigned short cent_tuning[100] =
+unsigned short cent_tuning[100] =
{
/* 0 */ 10000, 10006, 10012, 10017, 10023, 10029, 10035, 10041,
/* 8 */ 10046, 10052, 10058, 10064, 10070, 10075, 10081, 10087,
@@ -23,4 +23,7 @@ static unsigned short cent_tuning[100] =
/* 88 */ 10521, 10528, 10534, 10540, 10546, 10552, 10558, 10564,
/* 96 */ 10570, 10576, 10582, 10589
};
+#else
+extern unsigned short semitone_tuning[24];
+extern unsigned short cent_tuning[100];
#endif
diff --git a/sys/i386/isa/sound/uart6850.c b/sys/i386/isa/sound/uart6850.c
index 5160bec..c9d5c39 100644
--- a/sys/i386/isa/sound/uart6850.c
+++ b/sys/i386/isa/sound/uart6850.c
@@ -1,11 +1,11 @@
/*
* sound/uart6850.c
- *
+ *
* Copyright by Hannu Savolainen 1993
- *
- * Mon Nov 22 22:38:35 MET 1993 marco@driq.home.usn.nl:
- * added 6850 support, used with COVOX SoundMaster II and custom cards.
- *
+ *
+ * Mon Nov 22 22:38:35 MET 1993 marco@driq.home.usn.nl: added 6850 support, used
+ * with COVOX SoundMaster II and custom cards.
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met: 1. Redistributions of source code must retain the above copyright
@@ -13,7 +13,7 @@
* Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
@@ -25,39 +25,32 @@
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
- *
+ *
*/
#include <i386/isa/sound/sound_config.h>
-#ifdef CONFIGURE_SOUNDCARD
+#if NSND > 0
-#if !defined(EXCLUDE_UART6850) && !defined(EXCLUDE_MIDI)
+#if 1
+/* #if defined(CONFIG_UART6850) && defined(CONFIG_MIDI) */
-#define DATAPORT (uart6850_base) /*
- * * * Midi6850 Data I/O Port on IBM
- * */
-#define COMDPORT (uart6850_base+1) /*
- * * * Midi6850 Command Port on IBM */
-#define STATPORT (uart6850_base+1) /*
- * * * Midi6850 Status Port on IBM */
+#define DATAPORT (uart6850_base) /* * * Midi6850 Data I/O Port on IBM */
+#define COMDPORT (uart6850_base+1) /* * * Midi6850 Command Port on IBM */
+#define STATPORT (uart6850_base+1) /* * * Midi6850 Status Port on IBM */
-#define uart6850_status() INB(STATPORT)
-#define input_avail() ((uart6850_status()&INPUT_AVAIL))
-#define output_ready() ((uart6850_status()&OUTPUT_READY))
-#define uart6850_cmd(cmd) OUTB(cmd, COMDPORT)
-#define uart6850_read() INB(DATAPORT)
-#define uart6850_write(byte) OUTB(byte, DATAPORT)
+#define uart6850_status() inb( STATPORT)
+#define input_avail() (uart6850_status()&INPUT_AVAIL)
+#define output_ready() (uart6850_status()&OUTPUT_READY)
+#define uart6850_cmd(cmd) outb( COMDPORT, cmd)
+#define uart6850_read() inb( DATAPORT)
+#define uart6850_write(byte) outb( DATAPORT, byte)
-#define OUTPUT_READY 0x02 /*
- * * * Mask for Data Read Ready Bit */
-#define INPUT_AVAIL 0x01 /*
- * * * Mask for Data Send Ready Bit */
+#define OUTPUT_READY 0x02 /* * * Mask for Data Read Ready Bit */
+#define INPUT_AVAIL 0x01 /* * * Mask for Data Send Ready Bit */
-#define UART_RESET 0x95 /*
- * * * 6850 Total Reset Command */
-#define UART_MODE_ON 0x03 /*
- * * * 6850 Send/Receive UART Mode */
+#define UART_RESET 0x95 /* * * 6850 Total Reset Command */
+#define UART_MODE_ON 0x03 /* * * 6850 Send/Receive UART Mode */
static int uart6850_opened = 0;
static int uart6850_base = 0x330;
@@ -65,38 +58,37 @@ static int uart6850_irq;
static int uart6850_detected = 0;
static int my_dev;
-static int reset_uart6850 (void);
-static void (*midi_input_intr) (int dev, unsigned char data);
+static int reset_uart6850(void);
+static void (*midi_input_intr) (int dev, u_char data);
+static void poll_uart6850(u_long dummy);
+
+static sound_os_info *uart6850_osp;
static void
-uart6850_input_loop (void)
+uart6850_input_loop(void)
{
- int count;
+ int count;
- count = 10;
+ count = 10;
- while (count) /*
- * Not timed out
- */
- if (input_avail ())
- {
- unsigned char c = uart6850_read ();
+ while (count) /* Not timed out */
+ if (input_avail()) {
+ u_char c = uart6850_read();
- count = 100;
+ count = 100;
- if (uart6850_opened & OPEN_READ)
- midi_input_intr (my_dev, c);
- }
- else
- while (!input_avail () && count)
- count--;
+ if (uart6850_opened & OPEN_READ)
+ midi_input_intr(my_dev, c);
+ } else
+ while (!input_avail() && count)
+ count--;
}
void
-m6850intr (int unit)
+m6850intr(int irq)
{
- if (input_avail ())
- uart6850_input_loop ();
+ if (input_avail())
+ uart6850_input_loop();
}
/*
@@ -105,133 +97,118 @@ m6850intr (int unit)
*/
static void
-poll_uart6850 (void *dummy)
+poll_uart6850(u_long dummy)
{
- unsigned long flags;
+ u_long flags;
- DEFINE_TIMER (uart6850_timer, poll_uart6850);
+ if (!(uart6850_opened & OPEN_READ))
+ return; /* Device has been closed */
- if (!(uart6850_opened & OPEN_READ))
- return; /*
- * No longer required
- */
+ flags = splhigh();
- DISABLE_INTR (flags);
+ if (input_avail())
+ uart6850_input_loop();
- if (input_avail ())
- uart6850_input_loop ();
- ACTIVATE_TIMER (uart6850_timer, poll_uart6850, 1); /*
- * Come back later
- */
+ timeout((timeout_func_t) poll_uart6850, 0, 1);; /* Come back later */
- RESTORE_INTR (flags);
+ splx(flags);
}
static int
-uart6850_open (int dev, int mode,
- void (*input) (int dev, unsigned char data),
- void (*output) (int dev)
+uart6850_open(int dev, int mode,
+ void (*input) (int dev, u_char data),
+ void (*output) (int dev)
)
{
- if (uart6850_opened)
- {
- printk ("Midi6850: Midi busy\n");
- return RET_ERROR (EBUSY);
+ if (uart6850_opened) {
+ printf("Midi6850: Midi busy\n");
+ return -(EBUSY);
}
+ uart6850_cmd(UART_RESET);
- uart6850_cmd (UART_RESET);
-
- uart6850_input_loop ();
+ uart6850_input_loop();
- midi_input_intr = input;
- uart6850_opened = mode;
- poll_uart6850 (0); /*
- * Enable input polling
- */
+ midi_input_intr = input;
+ uart6850_opened = mode;
+ poll_uart6850(0); /* Enable input polling */
- return 0;
+ return 0;
}
static void
-uart6850_close (int dev)
+uart6850_close(int dev)
{
- uart6850_cmd (UART_MODE_ON);
+ uart6850_cmd(UART_MODE_ON);
- uart6850_opened = 0;
+ uart6850_opened = 0;
}
static int
-uart6850_out (int dev, unsigned char midi_byte)
+uart6850_out(int dev, u_char midi_byte)
{
- int timeout;
- unsigned long flags;
+ int timeout;
+ u_long flags;
- /*
- * Test for input since pending input seems to block the output.
- */
+ /*
+ * Test for input since pending input seems to block the output.
+ */
- DISABLE_INTR (flags);
+ flags = splhigh();
- if (input_avail ())
- uart6850_input_loop ();
+ if (input_avail())
+ uart6850_input_loop();
- RESTORE_INTR (flags);
+ splx(flags);
- /*
- * Sometimes it takes about 13000 loops before the output becomes ready
- * (After reset). Normally it takes just about 10 loops.
- */
+ /*
+ * Sometimes it takes about 13000 loops before the output becomes
+ * ready (After reset). Normally it takes just about 10 loops.
+ */
- for (timeout = 30000; timeout > 0 && !output_ready (); timeout--); /*
- * Wait
- */
+ for (timeout = 30000; timeout > 0 && !output_ready(); timeout--); /* Wait */
- if (!output_ready ())
- {
- printk ("Midi6850: Timeout\n");
- return 0;
+ if (!output_ready()) {
+ printf("Midi6850: Timeout\n");
+ return 0;
}
-
- uart6850_write (midi_byte);
- return 1;
+ uart6850_write(midi_byte);
+ return 1;
}
static int
-uart6850_command (int dev, unsigned char *midi_byte)
+uart6850_command(int dev, u_char *midi_byte)
{
- return 1;
+ return 1;
}
static int
-uart6850_start_read (int dev)
+uart6850_start_read(int dev)
{
- return 0;
+ return 0;
}
static int
-uart6850_end_read (int dev)
+uart6850_end_read(int dev)
{
- return 0;
+ return 0;
}
static int
-uart6850_ioctl (int dev, unsigned cmd, unsigned arg)
+uart6850_ioctl(int dev, u_int cmd, ioctl_arg arg)
{
- return RET_ERROR (EINVAL);
+ return -(EINVAL);
}
static void
-uart6850_kick (int dev)
+uart6850_kick(int dev)
{
}
static int
-uart6850_buffer_status (int dev)
+uart6850_buffer_status(int dev)
{
- return 0; /*
- * No data in buffers
- */
+ return 0; /* No data in buffers */
}
#define MIDI_SYNTH_NAME "6850 UART Midi"
@@ -240,88 +217,79 @@ uart6850_buffer_status (int dev)
static struct midi_operations uart6850_operations =
{
- {"6850 UART", 0, 0, SNDCARD_UART6850},
- &std_midi_synth,
- {0},
- uart6850_open,
- uart6850_close,
- uart6850_ioctl,
- uart6850_out,
- uart6850_start_read,
- uart6850_end_read,
- uart6850_kick,
- uart6850_command,
- uart6850_buffer_status
+ {"6850 UART", 0, 0, SNDCARD_UART6850},
+ &std_midi_synth,
+ {0},
+ uart6850_open,
+ uart6850_close,
+ uart6850_ioctl,
+ uart6850_out,
+ uart6850_start_read,
+ uart6850_end_read,
+ uart6850_kick,
+ uart6850_command,
+ uart6850_buffer_status
};
-long
-attach_uart6850 (long mem_start, struct address_info *hw_config)
+void
+attach_uart6850(struct address_info * hw_config)
{
- int ok, timeout;
- unsigned long flags;
+ int ok, timeout;
+ u_long flags;
- if (num_midis >= MAX_MIDI_DEV)
- {
- printk ("Sound: Too many midi devices detected\n");
- return mem_start;
+ if (num_midis >= MAX_MIDI_DEV) {
+ printf("Sound: Too many midi devices detected\n");
+ return ;
}
+ uart6850_base = hw_config->io_base;
+ uart6850_osp = hw_config->osp;
+ uart6850_irq = hw_config->irq;
- uart6850_base = hw_config->io_base;
- uart6850_irq = hw_config->irq;
-
- if (!uart6850_detected)
- return RET_ERROR (EIO);
+ if (!uart6850_detected)
+ return ;
- DISABLE_INTR (flags);
+ flags = splhigh();
- for (timeout = 30000; timeout < 0 && !output_ready (); timeout--); /*
- * Wait
- */
- uart6850_cmd (UART_MODE_ON);
+ for (timeout = 30000; timeout < 0 && !output_ready(); timeout--); /* Wait */
+ uart6850_cmd(UART_MODE_ON);
- ok = 1;
+ ok = 1;
- RESTORE_INTR (flags);
+ splx(flags);
-#if defined(__FreeBSD__)
- printk ("uart0: <6850 Midi Interface>");
-#else
- printk (" <6850 Midi Interface>");
-#endif
+ conf_printf("6850 Midi Interface", hw_config);
- std_midi_synth.midi_dev = my_dev = num_midis;
- midi_devs[num_midis++] = &uart6850_operations;
- return mem_start;
+ std_midi_synth.midi_dev = my_dev = num_midis;
+ midi_devs[num_midis++] = &uart6850_operations;
+ return ;
}
static int
-reset_uart6850 (void)
+reset_uart6850(void)
{
- uart6850_read ();
- return 1; /*
- * OK
- */
+ uart6850_read();
+ return 1; /* OK */
}
int
-probe_uart6850 (struct address_info *hw_config)
+probe_uart6850(struct address_info * hw_config)
{
- int ok = 0;
+ int ok = 0;
- uart6850_base = hw_config->io_base;
- uart6850_irq = hw_config->irq;
+ uart6850_osp = hw_config->osp;
+ uart6850_base = hw_config->io_base;
+ uart6850_irq = hw_config->irq;
- if (snd_set_irq_handler (uart6850_irq, m6850intr, "MIDI6850") < 0)
- return 0;
+ if (snd_set_irq_handler(uart6850_irq, m6850intr, uart6850_osp) < 0)
+ return 0;
- ok = reset_uart6850 ();
+ ok = reset_uart6850();
- uart6850_detected = ok;
- return ok;
+ uart6850_detected = ok;
+ return ok;
}
#endif
-
#endif
diff --git a/sys/i386/isa/sound/ultrasound.h b/sys/i386/isa/sound/ultrasound.h
new file mode 100644
index 0000000..5c63b03
--- /dev/null
+++ b/sys/i386/isa/sound/ultrasound.h
@@ -0,0 +1,137 @@
+#ifndef _ULTRASOUND_H_
+#define _ULTRASOUND_H_
+/*
+ * Copyright by Hannu Savolainen 1993
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ */
+
+/*
+ * ultrasound.h - Macros for programming the Gravis Ultrasound
+ * These macros are extremely device dependent
+ * and not portable.
+ */
+
+/*
+ * Private events for Gravis Ultrasound (GUS)
+ *
+ * Format:
+ * byte 0 - SEQ_PRIVATE (0xfe)
+ * byte 1 - Synthesizer device number (0-N)
+ * byte 2 - Command (see below)
+ * byte 3 - Voice number (0-31)
+ * bytes 4 and 5 - parameter P1 (u_short)
+ * bytes 6 and 7 - parameter P2 (u_short)
+ *
+ * Commands:
+ * Each command affects one voice defined in byte 3.
+ * Unused parameters (P1 and/or P2 *MUST* be initialized to zero).
+ * _GUS_NUMVOICES - Sets max. number of concurrent voices (P1=14-31, default 16)
+ * _GUS_VOICESAMPLE- ************ OBSOLETE *************
+ * _GUS_VOICEON - Starts voice (P1=voice mode)
+ * _GUS_VOICEOFF - Stops voice (no parameters)
+ * _GUS_VOICEFADE - Stops the voice smoothly.
+ * _GUS_VOICEMODE - Alters the voice mode, don't start or stop voice (P1=voice mode)
+ * _GUS_VOICEBALA - Sets voice balence (P1, 0=left, 7=middle and 15=right, default 7)
+ * _GUS_VOICEFREQ - Sets voice (sample) playback frequency (P1=Hz)
+ * _GUS_VOICEVOL - Sets voice volume (P1=volume, 0xfff=max, 0xeff=half, 0x000=off)
+ * _GUS_VOICEVOL2 - Sets voice volume (P1=volume, 0xfff=max, 0xeff=half, 0x000=off)
+ * (Like GUS_VOICEVOL but doesn't change the hw
+ * volume. It just updates volume in the voice table).
+ *
+ * _GUS_RAMPRANGE - Sets limits for volume ramping (P1=low volume, P2=high volume)
+ * _GUS_RAMPRATE - Sets the speed for volume ramping (P1=scale, P2=rate)
+ * _GUS_RAMPMODE - Sets the volume ramping mode (P1=ramping mode)
+ * _GUS_RAMPON - Starts volume ramping (no parameters)
+ * _GUS_RAMPOFF - Stops volume ramping (no parameters)
+ * _GUS_VOLUME_SCALE - Changes the volume calculation constants
+ * for all voices.
+ */
+
+#define _GUS_NUMVOICES 0x00
+#define _GUS_VOICESAMPLE 0x01 /* OBSOLETE */
+#define _GUS_VOICEON 0x02
+#define _GUS_VOICEOFF 0x03
+#define _GUS_VOICEMODE 0x04
+#define _GUS_VOICEBALA 0x05
+#define _GUS_VOICEFREQ 0x06
+#define _GUS_VOICEVOL 0x07
+#define _GUS_RAMPRANGE 0x08
+#define _GUS_RAMPRATE 0x09
+#define _GUS_RAMPMODE 0x0a
+#define _GUS_RAMPON 0x0b
+#define _GUS_RAMPOFF 0x0c
+#define _GUS_VOICEFADE 0x0d
+#define _GUS_VOLUME_SCALE 0x0e
+#define _GUS_VOICEVOL2 0x0f
+#define _GUS_VOICE_POS 0x10
+
+/*
+ * GUS API macros
+ */
+
+#define _GUS_CMD(chn, voice, cmd, p1, p2) {\
+ _SEQ_NEEDBUF(8); _seqbuf[_seqbufptr] = SEQ_PRIVATE;\
+ _seqbuf[_seqbufptr+1] = (chn); _seqbuf[_seqbufptr+2] = cmd;\
+ _seqbuf[_seqbufptr+3] = voice;\
+ *(u_short*)&_seqbuf[_seqbufptr+4] = p1;\
+ *(u_short*)&_seqbuf[_seqbufptr+6] = p2;\
+ _SEQ_ADVBUF(8);}
+
+#define GUS_NUMVOICES(chn, p1) _GUS_CMD(chn, 0, _GUS_NUMVOICES, (p1), 0)
+#define GUS_VOICESAMPLE(chn, voice, p1) \
+ _GUS_CMD(chn, voice, _GUS_VOICESAMPLE, (p1), 0) /* OBSOLETE */
+#define GUS_VOICEON(chn, voice, p1) \
+ _GUS_CMD(chn, voice, _GUS_VOICEON, (p1), 0)
+#define GUS_VOICEOFF(chn, voice) \
+ _GUS_CMD(chn, voice, _GUS_VOICEOFF, 0, 0)
+#define GUS_VOICEFADE(chn, voice) \
+ _GUS_CMD(chn, voice, _GUS_VOICEFADE, 0, 0)
+#define GUS_VOICEMODE(chn, voice, p1) \
+ _GUS_CMD(chn, voice, _GUS_VOICEMODE, (p1), 0)
+#define GUS_VOICEBALA(chn, voice, p1) \
+ _GUS_CMD(chn, voice, _GUS_VOICEBALA, (p1), 0)
+#define GUS_VOICEFREQ(chn, voice, p) \
+ _GUS_CMD(chn, voice, _GUS_VOICEFREQ, \
+ (p) & 0xffff, ((p) >> 16) & 0xffff)
+#define GUS_VOICEVOL(chn, voice, p1) \
+ _GUS_CMD(chn, voice, _GUS_VOICEVOL, (p1), 0)
+#define GUS_VOICEVOL2(chn, voice, p1) \
+ _GUS_CMD(chn, voice, _GUS_VOICEVOL2, (p1), 0)
+#define GUS_RAMPRANGE(chn, voice, low, high) \
+ _GUS_CMD(chn, voice, _GUS_RAMPRANGE, (low), (high))
+#define GUS_RAMPRATE(chn, voice, p1, p2) \
+ _GUS_CMD(chn, voice, _GUS_RAMPRATE, (p1), (p2))
+#define GUS_RAMPMODE(chn, voice, p1) \
+ _GUS_CMD(chn, voice, _GUS_RAMPMODE, (p1), 0)
+#define GUS_RAMPON(chn, voice, p1) \
+ _GUS_CMD(chn, voice, _GUS_RAMPON, (p1), 0)
+#define GUS_RAMPOFF(chn, voice) \
+ _GUS_CMD(chn, voice, _GUS_RAMPOFF, 0, 0)
+#define GUS_VOLUME_SCALE(chn, voice, p1, p2) \
+ _GUS_CMD(chn, voice, _GUS_VOLUME_SCALE, (p1), (p2))
+#define GUS_VOICE_POS(chn, voice, p) \
+ _GUS_CMD(chn, voice, _GUS_VOICE_POS, \
+ (p) & 0xffff, ((p) >> 16) & 0xffff)
+
+#endif
OpenPOWER on IntegriCloud