Subject: port-dreamcast/22543: AICA audio driver for dreamcast
To: None <gnats-bugs@gnats.netbsd.org>
From: None <ryo@nerv.org>
List: netbsd-bugs
Date: 08/19/2003 12:21:57
>Number:         22543
>Category:       port-dreamcast
>Synopsis:       AICA audio driver for dreamcast
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    port-dreamcast-maintainer
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Tue Aug 19 03:23:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator:     Ryo Shimizu
>Release:        NetBSD 1.6W
>Organization:
>Environment:
System: NetBSD guruguru 1.6W NetBSD 1.6W (GURUGURU) #324: Mon Aug 18 04:58:42 JST 2003  ryo@moveq.nerv.org:/usr/src/sys/arch/dreamcast/compile/GURUGURU dreamcast
Architecture: sh3
Machine: dreamcast
>Description:
	This is an audio driver for dreamcast.
	AICA has 64 pcm channels. But this driver support only 2 channels (left & right).
	The remaining 62 channels are idle.
>How-To-Repeat:

>Fix:
diff -ruN src.orig/sys/arch/dreamcast/conf/GENERIC src/sys/arch/dreamcast/conf/GENERIC
--- src.orig/sys/arch/dreamcast/conf/GENERIC	2003-06-15 01:28:32.000000000 +0900
+++ src/sys/arch/dreamcast/conf/GENERIC	2003-08-19 12:13:35.000000000 +0900
@@ -167,6 +167,9 @@
 
 mbe*		at g2bus?			# SEGA LAN Adapter
 
+aica*		at g2bus?			# AICA Sound Processing Unit (ARM7)
+audio*		at aica?
+
 #pseudo-device	cgd		2	# cryptographic disk devices
 pseudo-device	md		1	# memory disk device (ramdisk)
 pseudo-device	vnd		2	# disk-like interface to files
diff -ruN src.orig/sys/arch/dreamcast/conf/files.dreamcast src/sys/arch/dreamcast/conf/files.dreamcast
--- src.orig/sys/arch/dreamcast/conf/files.dreamcast	2003-06-15 01:15:16.000000000 +0900
+++ src/sys/arch/dreamcast/conf/files.dreamcast	2003-08-16 09:55:55.000000000 +0900
@@ -99,4 +99,8 @@
 attach	mbe at g2bus with mbe_g2bus
 file	arch/dreamcast/dev/g2/if_mbe_g2.c		mbe_g2bus
 
+device	aica: audiobus, auconv, mulaw
+attach	aica at g2bus
+file	arch/dreamcast/dev/g2/aica.c			aica	needs-flag
+
 include "arch/dreamcast/conf/majors.dreamcast"
diff -ruN src.orig/sys/arch/dreamcast/dev/g2/aica.c src/sys/arch/dreamcast/dev/g2/aica.c
--- src.orig/sys/arch/dreamcast/dev/g2/aica.c	1970-01-01 09:00:00.000000000 +0900
+++ src/sys/arch/dreamcast/dev/g2/aica.c	2003-08-16 16:22:38.000000000 +0900
@@ -0,0 +1,767 @@
+/*	$NetBSD$	*/
+
+/*
+ * Copyright (c) 2003 SHIMIZU Ryo <ryo@misakimix.org>
+ * All rights reserved.
+ *
+ * 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.
+ * 3. The name of the author may not be used to endorse or promote products
+ *    derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 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 "aica.h"
+#if NAICA > 0
+
+#include <sys/cdefs.h>
+#include <sys/param.h>
+#include <sys/systm.h>
+#include <sys/kernel.h>
+#include <sys/proc.h>
+
+#include <sys/audioio.h>
+#include <dev/audio_if.h>
+#include <dev/mulaw.h>
+#include <dev/auconv.h>
+
+#include <machine/sysasicvar.h>
+
+#include <dreamcast/dev/g2/g2busvar.h>
+#include <dreamcast/dev/g2/aicavar.h>
+#include <dreamcast/dev/g2/microcode/aica_armcode.h>
+
+#ifndef offsetof
+#define offsetof(type, member)	((size_t)(unsigned long)(&((type *)0)->member))
+#endif
+
+struct aica_softc {
+	struct device		sc_dev;		/* base device */
+	bus_space_tag_t		sc_memt;
+	bus_space_handle_t	sc_aica_regh;
+#define	AICA_REG_ADDR	0xa0700000
+	bus_space_handle_t	sc_aica_memh;
+#define	AICA_RAM_START	0xa0800000
+#define	AICA_RAM_END	0xa0a00000
+
+	/* audio property */
+	int			sc_open;
+	int			sc_encodings;
+	int			sc_precision;
+	int			sc_channels;
+	int			sc_rate;
+	void			(*sc_intr)(void *);
+	void			*sc_intr_arg;
+
+	int			sc_output_master;
+	int			sc_output_gain[2];
+#define	AICA_VOLUME_LEFT	0
+#define	AICA_VOLUME_RIGHT	1
+
+	/* work for output */
+	void			*sc_buffer;
+	void			*sc_buffer_start;
+	void			*sc_buffer_end;
+	int			sc_blksize;
+	int			sc_nextfill;
+};
+
+struct {
+	char	*name;
+	int 	encoding;
+	int 	precision;
+} aica_encodings[] = {
+	{AudioEadpcm,		AUDIO_ENCODING_ADPCM,		4},
+	{AudioEslinear,		AUDIO_ENCODING_SLINEAR,		8},
+	{AudioEulinear,		AUDIO_ENCODING_ULINEAR,		8},
+	{AudioEmulaw,		AUDIO_ENCODING_ULAW,		8},
+	{AudioEslinear_be,	AUDIO_ENCODING_SLINEAR_BE,	16},
+	{AudioEslinear_le,	AUDIO_ENCODING_SLINEAR_LE,	16},
+};
+
+
+int aica_match(struct device *, struct cfdata *, void *);
+void aica_attach(struct device *, struct device *, void *);
+int aica_print(void *, const char *);
+
+CFATTACH_DECL(aica, sizeof(struct aica_softc), aica_match, aica_attach, NULL, NULL);
+
+struct audio_device aica_device = {
+	"Dreamcast Sound",
+	"",
+	"aica"
+};
+
+inline static void aica_g2fifo_wait(void);
+void aica_enable(struct aica_softc *);
+void aica_disable(struct aica_softc *);
+void aica_memcpy(struct aica_softc *, u_int32_t *, u_int32_t *, int);
+void aica_ch2p16cpy(struct aica_softc *, u_int16_t *, u_int16_t *, int);
+void aica_ch2p8cpy(struct aica_softc *, u_int8_t *, u_int8_t *, int);
+void aica_command(void *,unsigned int);
+void aica_play(void *,int,int,int,int);
+void aica_sendparam(void *,unsigned int,int,int);
+void aica_fillbuffer(void *);
+
+/* intr */
+int aica_intr(void *);
+
+/* for audio */
+int aica_open(void *, int);
+void aica_close(void *);
+int aica_query_encoding(void *, struct audio_encoding *);
+int aica_set_params(void *, int, int, struct audio_params *, struct audio_params *);
+int aica_round_blocksize(void *, int);
+size_t aica_round_buffersize(void *, int, size_t);
+int aica_trigger_output(void *, void *, void *, int, void (*)(void *), void *, struct audio_params *);
+int aica_trigger_input(void *, void *, void *, int, void (*)(void *), void *, struct audio_params *);
+int aica_halt_output(void *);
+int aica_halt_input(void *);
+int aica_getdev(void *, struct audio_device *);
+int aica_set_port(void *, mixer_ctrl_t *);
+int aica_get_port(void *, mixer_ctrl_t *);
+int aica_query_devinfo(void *, mixer_devinfo_t *);
+void aica_encode(int, int, int, int, u_char *, u_short **);
+int aica_get_props(void *);
+
+struct audio_hw_if aica_hw_if = {
+	aica_open,
+	aica_close,
+	NULL,				/* aica_drain */
+	aica_query_encoding,
+	aica_set_params,
+	aica_round_blocksize,
+	NULL,				/* aica_commit_setting */
+	NULL,				/* aica_init_output */
+	NULL,				/* aica_init_input */
+	NULL,				/* aica_start_output */
+	NULL,				/* aica_start_input */
+	aica_halt_output,
+	aica_halt_input,
+	NULL,				/* aica_speaker_ctl */
+	aica_getdev,
+	NULL,				/* aica_setfd */
+	aica_set_port,
+	aica_get_port,
+	aica_query_devinfo,
+	NULL,				/* aica_allocm */
+	NULL,				/* aica_freem */
+
+	aica_round_buffersize,		/* aica_round_buffersize */
+
+	NULL,				/* aica_mappage */
+	aica_get_props,
+	aica_trigger_output,
+	aica_trigger_input,
+	NULL,				/* aica_dev_ioctl */
+};
+
+
+int
+aica_match(struct device *parent, struct cfdata *cf, void *aux)
+{
+	static int aica_matched = 0;
+
+	if (aica_matched)
+		return 0;
+
+	aica_matched = 1;
+	return 1;
+}
+
+
+void
+aica_attach(struct device *parent, struct device *self, void *aux)
+{
+	struct aica_softc *sc = (struct aica_softc *)self;
+	struct g2bus_attach_args *ga = aux;
+
+	printf(": ARM7 Sound Processing Unit\n");
+
+	sc->sc_memt = ga->ga_memt;
+
+	if (bus_space_map(sc->sc_memt, AICA_REG_ADDR, 0x3000, 0, &sc->sc_aica_regh) != 0)
+		panic("aica_attach: can't map AICA register space");
+
+	if (bus_space_map(sc->sc_memt, AICA_RAM_START, (AICA_RAM_END-AICA_RAM_START), 0, &sc->sc_aica_memh) != 0)
+		panic("aica_attach: can't map AICA memory space");
+
+	aica_disable(sc);
+	{
+		int ch;
+		for (ch=0; ch<64; ch++) {
+			bus_space_write_4(sc->sc_memt,sc->sc_aica_regh, 0x80*ch,
+			                  ((bus_space_read_4(sc->sc_memt,sc->sc_aica_regh, 0x80*ch) & ~0x4000) | 0x8000));
+		}
+	}
+
+	/* load microcode, and clear memory */
+	{
+		int i;
+		aica_memcpy(sc,0x00000000,(void*)aica_armcode,sizeof(aica_armcode));
+		for (i=(sizeof(aica_armcode)+3)&~3;i<AICA_ARM_END;i+=4) {
+			bus_space_write_4(sc->sc_memt,sc->sc_aica_memh,i,0);
+		}
+	}
+
+	aica_enable(sc);
+
+	printf("%s: interrupting at %s\n",sc->sc_dev.dv_xname,sysasic_intr_string(IPL_BIO));
+	sysasic_intr_establish(SYSASIC_EVENT_AICA, IPL_BIO, aica_intr, sc);
+
+	audio_attach_mi(&aica_hw_if, sc, &sc->sc_dev);
+
+
+	/* init parameters */
+	sc->sc_output_master = 255;
+	sc->sc_output_gain[AICA_VOLUME_LEFT]  = 255;
+	sc->sc_output_gain[AICA_VOLUME_RIGHT] = 255;
+}
+
+
+void
+aica_enable(struct aica_softc *sc)
+{
+	bus_space_write_4(sc->sc_memt, sc->sc_aica_regh, 0x28a8, 24);
+	bus_space_write_4(sc->sc_memt, sc->sc_aica_regh, 0x2c00,
+	                  bus_space_read_4(sc->sc_memt, sc->sc_aica_regh, 0x2c00) & ~1);
+}
+
+void
+aica_disable(struct aica_softc *sc)
+{
+	bus_space_write_4(sc->sc_memt, sc->sc_aica_regh, 0x2c00,
+	                  bus_space_read_4(sc->sc_memt, sc->sc_aica_regh, 0x2c00) | 1);
+}
+
+
+inline static void
+aica_g2fifo_wait()
+{
+	int i;
+	for (i=0x1800; (i>0) && !((*(volatile unsigned int *)0xa05f688c)&0x11); i--)
+		;
+}
+
+void
+aica_memcpy(struct aica_softc *sc, u_int32_t *dst, u_int32_t *src, int len)
+{
+	u_int32_t tmp[8];
+	int n = (len+3)/4;	/* u_int32_t * n (aligned) */
+
+	while (n>8) {
+		u_int32_t *d = tmp;
+		*d++ = *src++; *d++ = *src++; *d++ = *src++; *d++ = *src++;
+		*d++ = *src++; *d++ = *src++; *d++ = *src++; *d++ = *src++;
+
+		aica_g2fifo_wait();
+		bus_space_write_region_4(sc->sc_memt, sc->sc_aica_memh, (bus_size_t)dst, tmp, 8);
+
+		dst+=8;
+		n-=8;
+	}
+
+	if (n) {
+		int i;
+		for (i=0;i<n;i++)
+			tmp[i] = src[i];
+
+		aica_g2fifo_wait();
+		bus_space_write_region_4(sc->sc_memt, sc->sc_aica_memh, (bus_size_t)dst, tmp, n);
+	}
+}
+
+
+void
+aica_ch2p16cpy(struct aica_softc *sc, u_int16_t *dst, u_int16_t *src, int len)
+{
+	u_int32_t tmp[8];
+
+	while (len>=32) {
+		u_int16_t *d = (u_int16_t *)tmp;
+		*d++ = *src++; src++;  *d++ = *src++; src++;  *d++ = *src++; src++;  *d++ = *src++; src++;
+		*d++ = *src++; src++;  *d++ = *src++; src++;  *d++ = *src++; src++;  *d++ = *src++; src++;
+		*d++ = *src++; src++;  *d++ = *src++; src++;  *d++ = *src++; src++;  *d++ = *src++; src++;
+		*d++ = *src++; src++;  *d++ = *src++; src++;  *d++ = *src++; src++;  *d++ = *src++; src++;
+
+		aica_g2fifo_wait();
+		bus_space_write_region_4(sc->sc_memt, sc->sc_aica_memh, (bus_size_t)dst, tmp, 32/4);
+
+		dst+=16;
+		len-=32;
+	}
+
+	if (len) {
+		int i;
+		u_int16_t *d = (u_int16_t *)tmp;
+		for (i=0;i<len/2;i++) {
+			*d++ = *src++; src++;
+		}
+
+		aica_g2fifo_wait();
+		bus_space_write_region_4(sc->sc_memt, sc->sc_aica_memh, (bus_size_t)dst, tmp, len/4);
+	}
+}
+
+
+void
+aica_ch2p8cpy(struct aica_softc *sc, u_int8_t *dst, u_int8_t *src, int len)
+{
+	u_int32_t tmp[8];
+
+	while (len>=32) {
+		u_int8_t *d = (u_int8_t *)tmp;
+		*d++ = *src++; src++;  *d++ = *src++; src++;  *d++ = *src++; src++;  *d++ = *src++; src++;
+		*d++ = *src++; src++;  *d++ = *src++; src++;  *d++ = *src++; src++;  *d++ = *src++; src++;
+		*d++ = *src++; src++;  *d++ = *src++; src++;  *d++ = *src++; src++;  *d++ = *src++; src++;
+		*d++ = *src++; src++;  *d++ = *src++; src++;  *d++ = *src++; src++;  *d++ = *src++; src++;
+		*d++ = *src++; src++;  *d++ = *src++; src++;  *d++ = *src++; src++;  *d++ = *src++; src++;
+		*d++ = *src++; src++;  *d++ = *src++; src++;  *d++ = *src++; src++;  *d++ = *src++; src++;
+		*d++ = *src++; src++;  *d++ = *src++; src++;  *d++ = *src++; src++;  *d++ = *src++; src++;
+		*d++ = *src++; src++;  *d++ = *src++; src++;  *d++ = *src++; src++;  *d++ = *src++; src++;
+
+		aica_g2fifo_wait();
+		bus_space_write_region_4(sc->sc_memt, sc->sc_aica_memh, (bus_size_t)dst, tmp, 32/4);
+
+		dst+=32;
+		len-=32;
+	}
+
+	if (len) {
+		int i;
+		u_int8_t *d = (u_int8_t *)tmp;
+		for (i=0;i<len;i++) {
+			*d++ = *src++; src++;
+		}
+
+		aica_g2fifo_wait();
+		bus_space_write_region_4(sc->sc_memt, sc->sc_aica_memh, (bus_size_t)dst, tmp, len/4);
+	}
+}
+
+
+
+
+int
+aica_open(void *addr, int flags)
+{
+	struct aica_softc *sc = addr;
+
+	if (sc->sc_open)
+		return EBUSY;
+
+	sc->sc_intr = NULL;
+	sc->sc_open = 1;
+
+	return 0;
+}
+
+
+void
+aica_close(void *addr)
+{
+	struct aica_softc *sc = addr;
+
+	sc->sc_open = 0;
+	sc->sc_intr = NULL;
+}
+
+
+int
+aica_query_encoding(void *addr, struct audio_encoding *fp)
+{
+	if (fp->index >= sizeof(aica_encodings)/sizeof(aica_encodings[0]))
+		return EINVAL;
+
+	strcpy(fp->name, aica_encodings[fp->index].name);
+	fp->encoding = aica_encodings[fp->index].encoding;
+	fp->precision = aica_encodings[fp->index].precision;
+	fp->flags = 0;
+
+	return 0;
+}
+
+int
+aica_set_params(void *addr, int setmode, int usemode,
+                struct audio_params *play,
+                struct audio_params *rec)
+{
+	struct aica_softc *sc = addr;
+
+	if ((play->channels != 1) &&
+	    (play->channels != 2))
+		return EINVAL;
+
+	if ((play->precision != 4) &&
+	    (play->precision != 8) &&
+	    (play->precision != 16))
+		return EINVAL;
+
+	play->factor = 1;
+	play->factor_denom = 1;
+
+	play->hw_precision = play->precision;
+	play->hw_channels = play->channels;
+	play->hw_sample_rate = play->sample_rate;
+	play->hw_encoding = AUDIO_ENCODING_SLINEAR_LE;
+
+	play->sw_code = NULL;
+
+	sc->sc_precision = play->hw_precision;
+	sc->sc_channels = play->hw_channels;
+	sc->sc_rate = play->hw_sample_rate;
+	sc->sc_encodings = play->hw_encoding;
+
+
+#if 1
+	/* XXX: limit check */
+	if ((play->precision == 4) &&
+	    (play->channels == 1) &&
+	    (play->sample_rate >= 65536))
+		return EINVAL;
+
+	if ((play->precision == 8) &&
+	    (play->channels == 1) &&
+	    (play->sample_rate >= 65536))
+		return EINVAL;
+#endif
+
+
+	switch (play->encoding) {
+	case AUDIO_ENCODING_ADPCM:
+		if (play->precision != 4)
+			return EINVAL;
+		if (play->channels != 1)
+			return EINVAL;
+
+		play->hw_encoding = AUDIO_ENCODING_ADPCM;
+		play->hw_precision = 8;	/* 4? XXX */
+		sc->sc_precision = 4;
+		break;
+
+	case AUDIO_ENCODING_SLINEAR:
+		break;
+	case AUDIO_ENCODING_ULINEAR:
+		play->sw_code = change_sign8;
+		break;
+
+	case AUDIO_ENCODING_SLINEAR_BE:
+		if (play->precision == 16)
+			play->sw_code = swap_bytes;
+		break;
+	case AUDIO_ENCODING_SLINEAR_LE:
+		break;
+	case AUDIO_ENCODING_ULINEAR_BE:
+		if (play->precision == 16)
+			play->sw_code = swap_bytes_change_sign16_le;
+		break;
+	case AUDIO_ENCODING_ULINEAR_LE:
+		if (play->precision == 16)
+			play->sw_code = change_sign16_le;
+		break;
+
+	case AUDIO_ENCODING_ULAW:
+		play->sw_code = mulaw_to_slinear16_le;
+		play->hw_precision = 16;
+		sc->sc_precision = play->hw_precision;
+		break;
+	case AUDIO_ENCODING_ALAW:
+		play->sw_code = alaw_to_slinear16_le;
+		play->hw_precision = 16;
+		sc->sc_precision = play->hw_precision;
+		break;
+
+	default:
+		return EINVAL;
+	}
+
+	return 0;
+}
+
+int
+aica_round_blocksize(void *addr, int blk)
+{
+	struct aica_softc *sc = addr;
+	switch (sc->sc_precision) {
+	case 4:
+		if (sc->sc_channels == 1)
+			return AICA_DMABUF_SIZE/4;
+		else
+			return AICA_DMABUF_SIZE/2;
+		break;
+	case 8:
+		if (sc->sc_channels == 1)
+			return AICA_DMABUF_SIZE/2;
+		else
+			return AICA_DMABUF_SIZE;
+		break;
+	case 16:
+		if (sc->sc_channels == 1)
+			return AICA_DMABUF_SIZE;
+		else
+			return AICA_DMABUF_SIZE*2;
+		break;
+	default:
+		break;
+	}
+
+	return AICA_DMABUF_SIZE/4;
+}
+
+size_t
+aica_round_buffersize(void *addr, int dir, size_t bufsize)
+{
+	if (dir == AUMODE_PLAY)
+		return 65536;
+
+	return 512;	/* XXX: AUMINBUF */
+}
+
+
+void
+aica_command(void *addr,unsigned int command)
+{
+	struct aica_softc *sc = addr;
+
+	bus_space_write_4(sc->sc_memt,sc->sc_aica_memh,
+	                  AICA_ARM_CMD+offsetof(aica_cmd_t,command),
+	                  command);
+	bus_space_write_4(sc->sc_memt,sc->sc_aica_memh,
+	                  AICA_ARM_CMD+offsetof(aica_cmd_t,serial),
+	                  bus_space_read_4(sc->sc_memt,sc->sc_aica_memh,
+	                                   AICA_ARM_CMD+offsetof(aica_cmd_t,serial))+1);
+}
+
+void
+aica_sendparam(void *addr,unsigned int command,int lparam,int rparam)
+{
+	struct aica_softc *sc = addr;
+
+	bus_space_write_4(sc->sc_memt,sc->sc_aica_memh,
+	                  AICA_ARM_CMD+offsetof(aica_cmd_t,l_param),lparam);
+	bus_space_write_4(sc->sc_memt,sc->sc_aica_memh,
+	                  AICA_ARM_CMD+offsetof(aica_cmd_t,r_param),rparam);
+
+	aica_command(sc,command);
+}
+
+
+void
+aica_play(void *addr,int blksize,int channel,int rate,int prec)
+{
+	struct aica_softc *sc = addr;
+
+	bus_space_write_4(sc->sc_memt,sc->sc_aica_memh,
+	                  AICA_ARM_CMD+offsetof(aica_cmd_t,blocksize),blksize);
+	bus_space_write_4(sc->sc_memt,sc->sc_aica_memh,
+	                  AICA_ARM_CMD+offsetof(aica_cmd_t,channel),channel);
+	bus_space_write_4(sc->sc_memt,sc->sc_aica_memh,
+	                  AICA_ARM_CMD+offsetof(aica_cmd_t,rate),rate);
+	bus_space_write_4(sc->sc_memt,sc->sc_aica_memh,
+	                  AICA_ARM_CMD+offsetof(aica_cmd_t,precision),prec);
+
+	aica_command(sc,AICA_COMMAND_PLAY);
+}
+
+
+void
+aica_fillbuffer(void *addr)
+{
+	struct aica_softc *sc = addr;
+
+	if (sc->sc_channels == 2) {
+		if (sc->sc_precision == 16) {
+			aica_ch2p16cpy(sc,(void*)(AICA_DMABUF_LEFT +sc->sc_nextfill), (u_int16_t *)sc->sc_buffer+0, sc->sc_blksize/2);
+			aica_ch2p16cpy(sc,(void*)(AICA_DMABUF_RIGHT+sc->sc_nextfill), (u_int16_t *)sc->sc_buffer+1, sc->sc_blksize/2);
+		} else if (sc->sc_precision == 8) {
+			aica_ch2p8cpy(sc,(void*)(AICA_DMABUF_LEFT +sc->sc_nextfill), (u_int8_t *)sc->sc_buffer+0, sc->sc_blksize/2);
+			aica_ch2p8cpy(sc,(void*)(AICA_DMABUF_RIGHT+sc->sc_nextfill), (u_int8_t *)sc->sc_buffer+1, sc->sc_blksize/2);
+		}
+	} else {
+		aica_memcpy(sc,(void*)(AICA_DMABUF_LEFT+sc->sc_nextfill),sc->sc_buffer,sc->sc_blksize);
+	}
+
+	(char*)sc->sc_buffer+=sc->sc_blksize;
+	if (sc->sc_buffer >= sc->sc_buffer_end)
+		sc->sc_buffer = sc->sc_buffer_start;
+
+	sc->sc_nextfill ^= sc->sc_blksize/sc->sc_channels;
+}
+
+
+int
+aica_intr(void *arg)
+{
+	struct aica_softc *sc = arg;
+
+	aica_fillbuffer(sc);
+
+	/* call audio interrupt handler (audio_pint()) */
+	if (sc->sc_open && sc->sc_intr != NULL) {
+		(*(sc->sc_intr))(sc->sc_intr_arg);
+	}
+
+	bus_space_write_4(sc->sc_memt, sc->sc_aica_regh, 0x28bc, 0x20); /* clear SPU interrupt */
+	return 1;
+}
+
+
+int
+aica_trigger_output(void *addr, void *start, void *end, int blksize,
+                    void (*intr)(void *), void *arg, struct audio_params *param)
+{
+	struct aica_softc *sc = addr;
+
+	aica_command(sc,AICA_COMMAND_INIT);
+	tsleep(aica_trigger_output,PWAIT,"aicawait",hz/20);
+
+	sc->sc_buffer_start = sc->sc_buffer = start;
+	sc->sc_buffer_end = end;
+	sc->sc_blksize = blksize;
+	sc->sc_nextfill = 0;
+
+	sc->sc_intr = intr;
+	sc->sc_intr_arg = arg;
+
+	/* fill buffers in advance */
+	aica_intr(sc);
+	aica_intr(sc);
+
+	/* ...and start playing */
+	aica_play(addr,blksize/sc->sc_channels,sc->sc_channels,sc->sc_rate,sc->sc_precision);
+
+	return 0;
+}
+
+
+int
+aica_trigger_input(void *addr, void *start, void *end, int blksize,
+                   void (*intr)(void *), void *arg, struct audio_params *param)
+{
+	return ENODEV;
+}
+
+int
+aica_halt_output(void *addr)
+{
+	struct aica_softc *sc = addr;
+
+	aica_command(sc,AICA_COMMAND_STOP);
+
+	return 0;
+}
+
+int
+aica_halt_input(void *addr)
+{
+	return ENODEV;
+}
+
+int
+aica_getdev(void *addr, struct audio_device *ret)
+{
+	*ret = aica_device;
+	return 0;
+}
+
+int
+aica_set_port(void *addr, mixer_ctrl_t *mc)
+{
+	struct aica_softc *sc = addr;
+
+	switch (mc->dev) {
+	case AICA_MASTER_VOL:
+		sc->sc_output_master = mc->un.value.level[AUDIO_MIXER_LEVEL_MONO] & 0xff;
+		aica_sendparam(sc,AICA_COMMAND_MVOL,sc->sc_output_master,sc->sc_output_master);
+		break;
+	case AICA_OUTPUT_GAIN:
+		sc->sc_output_gain[AICA_VOLUME_LEFT]  = mc->un.value.level[AUDIO_MIXER_LEVEL_LEFT]  & 0xff;
+		sc->sc_output_gain[AICA_VOLUME_RIGHT] = mc->un.value.level[AUDIO_MIXER_LEVEL_RIGHT] & 0xff;
+		aica_sendparam(sc,AICA_COMMAND_VOL,
+		               sc->sc_output_gain[AICA_VOLUME_LEFT],
+		               sc->sc_output_gain[AICA_VOLUME_RIGHT]);
+		break;
+	default:
+		return EINVAL;
+	}
+
+	return 0;
+}
+
+int
+aica_get_port(void *addr, mixer_ctrl_t *mc)
+{
+	struct aica_softc *sc = addr;
+
+	switch (mc->dev) {
+	case AICA_MASTER_VOL:
+		if (mc->un.value.num_channels != 1)
+			return EINVAL;
+		mc->un.value.level[AUDIO_MIXER_LEVEL_MONO] = L16TO256(L256TO16(sc->sc_output_master));
+		break;
+	case AICA_OUTPUT_GAIN:
+		mc->un.value.level[AUDIO_MIXER_LEVEL_LEFT]  = sc->sc_output_gain[AICA_VOLUME_LEFT];
+		mc->un.value.level[AUDIO_MIXER_LEVEL_RIGHT] = sc->sc_output_gain[AICA_VOLUME_RIGHT];
+		break;
+	default:
+		return EINVAL;
+	}
+	return 0;
+}
+
+int
+aica_query_devinfo(void *addr, mixer_devinfo_t *md)
+{
+	switch (md->index) {
+	case AICA_MASTER_VOL:
+		md->type = AUDIO_MIXER_VALUE;
+		md->mixer_class = AICA_OUTPUT_CLASS;
+		md->prev = md->next = AUDIO_MIXER_LAST;
+		strcpy(md->label.name, AudioNmaster);
+		md->un.v.num_channels = 1;
+		strcpy(md->un.v.units.name, AudioNvolume);
+		return 0;
+	case AICA_OUTPUT_GAIN:
+		md->type = AUDIO_MIXER_VALUE;
+		md->mixer_class = AICA_OUTPUT_CLASS;
+		md->prev = md->next = AUDIO_MIXER_LAST;
+		strcpy(md->label.name, AudioNoutput);
+		md->un.v.num_channels = 2;
+		strcpy(md->label.name, AudioNvolume);
+		return 0;
+	case AICA_OUTPUT_CLASS:
+		md->type = AUDIO_MIXER_CLASS;
+		md->mixer_class = AICA_OUTPUT_CLASS;
+		md->next = md->prev = AUDIO_MIXER_LAST;
+		strcpy(md->label.name, AudioCoutputs);
+		return 0;
+	}
+
+	return ENXIO;
+}
+
+int
+aica_get_props(void *addr)
+{
+	return 0;
+}
+
+
+#endif /* NAICA > 0 */
diff -ruN src.orig/sys/arch/dreamcast/dev/g2/aicavar.h src/sys/arch/dreamcast/dev/g2/aicavar.h
--- src.orig/sys/arch/dreamcast/dev/g2/aicavar.h	1970-01-01 09:00:00.000000000 +0900
+++ src/sys/arch/dreamcast/dev/g2/aicavar.h	2003-08-16 12:02:01.000000000 +0900
@@ -0,0 +1,82 @@
+/*	$NetBSD$	*/
+
+/*
+ * Copyright (c) 2003 SHIMIZU Ryo <ryo@misakimix.org>
+ * All rights reserved.
+ *
+ * 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.
+ * 3. The name of the author may not be used to endorse or promote products
+ *    derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 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.
+ */
+
+#ifndef _AICAVAR_H_
+#define _AICAVAR_H_
+
+typedef struct {
+	unsigned int serial;
+	unsigned int command;
+	unsigned int blocksize;
+	unsigned int channel;
+	unsigned int rate;
+	unsigned int precision;
+	unsigned int l_param;	/* volume,etc... for left */
+	unsigned int r_param;	/* volume,etc... for right */
+} aica_cmd_t;
+
+#define	AICA_COMMAND_NOP	0
+#define	AICA_COMMAND_PLAY	1
+#define	AICA_COMMAND_STOP	2
+#define	AICA_COMMAND_INIT	3
+#define	AICA_COMMAND_MVOL	4
+#define	AICA_COMMAND_VOL	5
+
+
+
+#define	AICA_ARM_CODE		0x00000000	/* text+data+bss+stack 0x00000000-0x0000ff00 */
+#define	AICA_ARM_CMD		0x0000ff00	/* SH4<->ARM work for communication */
+#define	AICA_ARM_END		0x00010000
+
+#define	AICA_DMABUF_START	0x00010000
+#define	AICA_DMABUF_LEFT	0x00010000	/* DMA buffer for PLAY 0x00010000-0x0001FFFF */
+#define	AICA_DMABUF_RIGHT	0x00020000	/* DMA buffer for PLAY 0x00020000-0x0002FFFF */
+#define	AICA_DMABUF_END		0x00030000
+
+#define	AICA_DMABUF_SIZE	0x0000ffc0
+
+#define	AICA_MEMORY_END		0x00200000
+
+
+#define L256TO16(l)	(((l)>>4)&0x0f)
+#define L16TO256(l)	((((l)<<4)&0xf0)+((l)&0x0f))
+
+
+enum MIXER_CLASS {
+	AICA_MASTER_VOL = 0,
+	AICA_OUTPUT_GAIN,
+	AICA_OUTPUT_CLASS,
+
+	AICA_NDEVS
+};
+
+
+#endif /* _AICAVAR_H_ */
+
diff -ruN src.orig/sys/arch/dreamcast/dev/g2/g2bus_bus_mem.c src/sys/arch/dreamcast/dev/g2/g2bus_bus_mem.c
--- src.orig/sys/arch/dreamcast/dev/g2/g2bus_bus_mem.c	2003-07-15 10:31:38.000000000 +0900
+++ src/sys/arch/dreamcast/dev/g2/g2bus_bus_mem.c	2003-07-20 08:32:51.000000000 +0900
@@ -74,9 +74,17 @@
 
 void	g2bus_bus_mem_read_region_1(void *, bus_space_handle_t, bus_size_t,
 	    u_int8_t *, bus_size_t);
+void	g2bus_bus_mem_read_region_2(void *, bus_space_handle_t, bus_size_t,
+	    u_int16_t *, bus_size_t);
+void	g2bus_bus_mem_read_region_4(void *, bus_space_handle_t, bus_size_t,
+	    u_int32_t *, bus_size_t);
 
 void	g2bus_bus_mem_write_region_1(void *, bus_space_handle_t, bus_size_t,
 	    const u_int8_t *, bus_size_t);
+void	g2bus_bus_mem_write_region_2(void *, bus_space_handle_t, bus_size_t,
+	    const u_int16_t *, bus_size_t);
+void	g2bus_bus_mem_write_region_4(void *, bus_space_handle_t, bus_size_t,
+	    const u_int32_t *, bus_size_t);
 
 u_int8_t g2bus_sparse_bus_mem_read_1(void *, bus_space_handle_t, bus_size_t);
 u_int16_t g2bus_sparse_bus_mem_read_2(void *, bus_space_handle_t, bus_size_t);
@@ -120,8 +128,12 @@
 	t->dbs_w_4 = g2bus_bus_mem_write_4;
 
 	t->dbs_rr_1 = g2bus_bus_mem_read_region_1;
+	t->dbs_rr_2 = g2bus_bus_mem_read_region_2;
+	t->dbs_rr_4 = g2bus_bus_mem_read_region_4;
 
 	t->dbs_wr_1 = g2bus_bus_mem_write_region_1;
+	t->dbs_wr_2 = g2bus_bus_mem_write_region_2;
+	t->dbs_wr_4 = g2bus_bus_mem_write_region_4;
 }
 
 int
@@ -265,6 +277,36 @@
 }
 
 void
+g2bus_bus_mem_read_region_2(void *v, bus_space_handle_t sh, bus_size_t off,
+    u_int16_t *addr, bus_size_t len)
+{
+	G2LOCK_DECL;
+	__volatile const u_int16_t *baddr = (u_int16_t *)(sh + off);
+
+	G2_LOCK();
+
+	while (len--)
+		*addr++ = *baddr++;
+
+	G2_UNLOCK();
+}
+
+void
+g2bus_bus_mem_read_region_4(void *v, bus_space_handle_t sh, bus_size_t off,
+    u_int32_t *addr, bus_size_t len)
+{
+	G2LOCK_DECL;
+	__volatile const u_int32_t *baddr = (u_int32_t *)(sh + off);
+
+	G2_LOCK();
+
+	while (len--)
+		*addr++ = *baddr++;
+
+	G2_UNLOCK();
+}
+
+void
 g2bus_bus_mem_write_region_1(void *v, bus_space_handle_t sh, bus_size_t off,
     const u_int8_t *addr, bus_size_t len)
 {
@@ -280,6 +322,36 @@
 }
 
 void
+g2bus_bus_mem_write_region_2(void *v, bus_space_handle_t sh, bus_size_t off,
+    const u_int16_t *addr, bus_size_t len)
+{
+	G2LOCK_DECL;
+	__volatile u_int16_t *baddr = (u_int16_t *)(sh + off);
+
+	G2_LOCK();
+
+	while (len--)
+		*baddr++ = *addr++;
+
+	G2_UNLOCK();
+}
+
+void
+g2bus_bus_mem_write_region_4(void *v, bus_space_handle_t sh, bus_size_t off,
+    const u_int32_t *addr, bus_size_t len)
+{
+	G2LOCK_DECL;
+	__volatile u_int32_t *baddr = (u_int32_t *)(sh + off);
+
+	G2_LOCK();
+
+	while (len--)
+		*baddr++ = *addr++;
+
+	G2_UNLOCK();
+}
+
+void
 g2bus_set_bus_mem_sparse(bus_space_tag_t memt)
 {
 
diff -ruN src.orig/sys/arch/dreamcast/dev/g2/microcode/Makefile src/sys/arch/dreamcast/dev/g2/microcode/Makefile
--- src.orig/sys/arch/dreamcast/dev/g2/microcode/Makefile	1970-01-01 09:00:00.000000000 +0900
+++ src/sys/arch/dreamcast/dev/g2/microcode/Makefile	2003-08-17 05:35:27.000000000 +0900
@@ -0,0 +1,25 @@
+
+CC	= arm--netbsdelf-gcc
+OBJCOPY	= arm--netbsdelf-objcopy
+CFLAGS	= -W -Wall -mlittle-endian -O3 -fomit-frame-pointer -funroll-loops -finline-functions
+AFLAGS	= -I../../../../../arch
+#AFLAGS	= -I../../../../../arch -mcpu=arm7tdmi -mthumb -mthumb-interwork -mapcs-32
+
+all: aica_armcode.h
+
+aica_armcode.h: aica_armcode.elf
+	echo "static u_int8_t aica_armcode[] = {" >aica_armcode.h
+	$(OBJCOPY) -O binary aica_armcode.elf aica_armcode.bin
+	hexdump -v -e '" /* %04.4_ax */\t" 4/1 "0x%02x, " "\n"' aica_armcode.bin >>aica_armcode.h
+	echo "0 };" >>aica_armcode.h
+
+aica_armcode.elf: aica_arm_locore.o aica_arm.o
+	$(CC) $(CFLAGS) -Wl,-Ttext,0 -Wl,-T ldscript -nostdlib -e 0 -o aica_armcode.elf aica_arm_locore.o aica_arm.o
+
+clean: clean-tmp
+	rm -f aica_armcode.h
+
+clean-tmp:
+	rm -f *.o aica_armcode.elf aica_armcode.bin
+
+
diff -ruN src.orig/sys/arch/dreamcast/dev/g2/microcode/aica_arm.c src/sys/arch/dreamcast/dev/g2/microcode/aica_arm.c
--- src.orig/sys/arch/dreamcast/dev/g2/microcode/aica_arm.c	1970-01-01 09:00:00.000000000 +0900
+++ src/sys/arch/dreamcast/dev/g2/microcode/aica_arm.c	2003-08-16 16:03:00.000000000 +0900
@@ -0,0 +1,378 @@
+/*	$NetBSD$	*/
+
+/*
+ * Copyright (c) 2003 SHIMIZU Ryo <ryo@misakimix.org>
+ * All rights reserved.
+ *
+ * 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.
+ * 3. The name of the author may not be used to endorse or promote products
+ *    derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 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 "../aicavar.h"
+
+#define	DC_REG_ADDR	0x00800000
+
+#define	REG_READ_1(off)		(*(volatile unsigned char *)((DC_REG_ADDR)+(off)))
+#define	REG_READ_2(off)		(*(volatile unsigned short *)((DC_REG_ADDR)+(off)))
+#define	REG_READ_4(off)		(*(volatile unsigned int *)((DC_REG_ADDR)+(off)))
+#define	REG_WRITE_1(off,val)	((*(volatile unsigned char *)((DC_REG_ADDR)+(off))) = (val))
+#define	REG_WRITE_2(off,val)	((*(volatile unsigned short *)((DC_REG_ADDR)+(off))) = (val))
+#define	REG_WRITE_4(off,val)	((*(volatile unsigned int *)((DC_REG_ADDR)+(off))) = (val))
+
+#define	CH_READ_1(ch,off)	REG_READ_1(0x80*(ch)+(off))
+#define	CH_READ_2(ch,off)	REG_READ_2(0x80*(ch)+(off))
+#define	CH_READ_4(ch,off)	REG_READ_4(0x80*(ch)+(off))
+#define	CH_WRITE_1(ch,off,val)	REG_WRITE_1(0x80*(ch)+(off),val)
+#define	CH_WRITE_2(ch,off,val)	REG_WRITE_2(0x80*(ch)+(off),val)
+#define	CH_WRITE_4(ch,off,val)	REG_WRITE_4(0x80*(ch)+(off),val)
+
+void
+aica_init()
+{
+	int ch,off;
+
+	/* Initialize AICA channels */
+	REG_WRITE_4(0x2800,0x0000);	/* Master volume: Min */
+
+	for (ch=0;ch<64;ch++) {
+		CH_WRITE_4(ch,0x00,0x8000);	/* Key off */
+		CH_WRITE_4(ch,0x04,0x0000);	/* DataAddress (low) */
+		CH_WRITE_4(ch,0x08,0x0000);	/* LoopStartPosition */
+		CH_WRITE_4(ch,0x0c,0x0000);	/* LoopEndPosition */
+		CH_WRITE_4(ch,0x10,0x001f);	/* AR = 0x1f = 0 msec */
+		CH_WRITE_4(ch,0x14,0x001f);	/* RR = 0x1f = 0 msec */
+		CH_WRITE_4(ch,0x18,0x0000);	/* Pitch */
+		CH_WRITE_4(ch,0x1c,0x0000);	/* LFO Control */
+		CH_WRITE_4(ch,0x20,0x0000);	/* DSP Channel to send */
+		CH_WRITE_4(ch,0x24,0x0000);	/* Pan & Volume */
+		CH_WRITE_4(ch,0x28,0x0024);	/* Volume & LowPassFilter */
+		CH_WRITE_4(ch,0x2c,0x0000);	/* LowPassFilter for Attack  */
+		CH_WRITE_4(ch,0x30,0x0000);	/* LowPassFilter for Decay   */
+		CH_WRITE_4(ch,0x34,0x0000);	/* LowPassFilter for Sustain */
+		CH_WRITE_4(ch,0x38,0x0000);	/* LowPassFilter for Keyoff  */
+		CH_WRITE_4(ch,0x3c,0x0000);	/* LowPassFilter for Release */
+		CH_WRITE_4(ch,0x40,0x0000);	/* LowPassFilter transition for Attack,Decay */
+		CH_WRITE_4(ch,0x44,0x0000);	/* LowPassFilter transition for Decay,Release */
+
+		for (off=0x48;off<0x80;off+=4) {
+			CH_WRITE_4(ch,off,0x0000);	/* other = 0 */
+		}
+	}
+
+	REG_WRITE_4(0x2800,0x000f);	/* Master volume: Max */
+}
+
+
+inline int
+in_first_half(unsigned int loophalf)
+{
+	REG_WRITE_1(0x280d,0);	/* select channel 0 */
+	return (REG_READ_4(0x2814) < loophalf);
+}
+
+inline int
+in_second_half(unsigned int loophalf)
+{
+	REG_WRITE_1(0x280d,0);	/* select channel 0 */
+	return (REG_READ_4(0x2814) >= loophalf);
+}
+
+
+void
+bzero_4(void *b,unsigned int len)
+{
+	len = (len+3) & ~3;
+	for (;len!=0;len-=4)
+		*(unsigned int*)b++ = 0;
+}
+
+void
+bzero(void *b,unsigned int len)
+{
+	for (;len!=0;len--)
+		*(unsigned char*)b++ = 0;
+}
+
+
+unsigned int
+rate2reg(unsigned int rate)
+{
+	unsigned int base,fns;
+	int oct;
+
+	base = 44100<<7;
+	for (oct=7; oct>=-8 && rate<base; oct--)
+		base>>=1;
+
+	if (rate<base)
+		return ((oct<<11)&0xf800);
+
+	rate-=base;
+
+#if 0
+	/* (base/2) : round off */
+	fns = (rate*1024+(base/2))/base;
+#else
+	/* avoid using udivsi3() */
+	{
+		unsigned int tmp = (rate*1024+(base/2));
+		for (fns=0;tmp>=base;tmp-=base,fns++)
+			;
+	}
+#endif
+
+	/* adjustment */
+	if (fns == 1024) {
+		oct++;
+		fns = 0;
+	} else {
+		if ((rate > base*fns/1024) &&
+		    (fns < 1023) &&
+		    (rate == base*(fns+1)/1024)) {
+			fns++;
+		} else if ((rate < base*fns/1024) &&
+		           (fns > 0) &&
+		           (rate == base*(fns-1)/1024)) {
+			fns--;
+		}
+	}
+
+	return ((oct<<11)&0xf800)+fns;
+}
+
+
+
+#ifdef DEBUG
+#include "debug_sound1.h"
+#include "debug_sound2.h"
+void
+debugbeep(int no)
+{
+	unsigned char *pcmdata;
+	unsigned int pcmlen;
+
+	if (no) {
+		pcmdata = (unsigned char *)debug_sound1;
+		pcmlen = sizeof(debug_sound1);
+	} else {
+		pcmdata = (unsigned char *)debug_sound2;
+		pcmlen = sizeof(debug_sound2);
+	}
+
+	CH_WRITE_4(2,0x00,0x8000);	/* Key off */
+
+	/* setup left */
+	CH_WRITE_4(2,0x08,0);			/* loop start */
+	CH_WRITE_4(2,0x0c,pcmlen/2);		/* loop end */
+	CH_WRITE_4(2,0x18,rate2reg(44100));	/* SamplingRate */
+	CH_WRITE_1(2,0x24,0x1f);		/* left pan */
+	CH_WRITE_1(2,0x25,0x0f);		/* volume MAX */
+	CH_WRITE_1(2,0x28,0x24);		/* LPF=off */
+	CH_WRITE_1(2,0x29,0x00);		/* volume MAX */
+	CH_WRITE_4(2,0x10,0x1f);		/* AR=0ms */
+	CH_WRITE_4(2,0x14,0x1f);		/* RR=0ms */
+	CH_WRITE_1(2,0x24,0);			/* middle balance */
+
+	CH_WRITE_4(2,0x04,(unsigned int)pcmdata & 0xffff);
+	CH_WRITE_4(2,0x00,0xc000/*PLAY*/|((unsigned int)pcmdata>>16));
+}
+#endif
+
+
+void
+aica_stop()
+{
+	CH_WRITE_4(0,0x00,0x8000);
+	CH_WRITE_4(1,0x00,0x8000);
+	bzero_4((void*)AICA_DMABUF_LEFT, AICA_DMABUF_SIZE);
+	bzero_4((void*)AICA_DMABUF_RIGHT,AICA_DMABUF_SIZE);
+}
+
+
+void
+aica_main()
+{
+	volatile aica_cmd_t *aicacmd = (volatile aica_cmd_t *)AICA_ARM_CMD;
+	int play_state;
+	unsigned int loopend=0,loophalf=0;
+	unsigned int blksize=0,ratepitch;
+	unsigned int cmd,serial;
+
+	aica_init();
+
+	REG_WRITE_4(0x28b4,0x0020);	/* INT Enable to SH4 */
+
+	bzero_4((void*)AICA_DMABUF_LEFT, AICA_DMABUF_SIZE);
+	bzero_4((void*)AICA_DMABUF_RIGHT,AICA_DMABUF_SIZE);
+
+	play_state = 0;
+	serial = aicacmd->serial = 0;
+
+	while (1) {
+		if (serial != aicacmd->serial) {
+			serial = aicacmd->serial;
+			cmd = aicacmd->command;
+			aicacmd->command = AICA_COMMAND_NOP;
+#ifdef DEBUG
+			debugbeep(0);
+#endif
+		} else {
+			cmd = AICA_COMMAND_NOP;
+		}
+
+		switch (cmd) {
+		case AICA_COMMAND_NOP:
+			/*
+			 * AICA_COMMAND_NOP - Idle process
+			 */
+			switch (play_state) {
+			case 0: /* not playing */
+				break;
+			case 1: /* first half */
+				if (in_second_half(loophalf)) {
+					REG_WRITE_4(0x28b8, 0x0020);	/* Send INT to SH4 */
+					play_state = 2;
+				}
+				break;
+			case 2: /* second halt */
+				if (in_first_half(loophalf)) {
+					REG_WRITE_4(0x28b8, 0x0020);	/* Send INT to SH4 */
+					play_state = 1;
+				}
+				break;
+			case 3:
+				if (in_second_half(loophalf)) {
+					aica_stop();
+					play_state = 0;
+				}
+				break;
+			case 4:
+				if (in_first_half(loophalf)) {
+					aica_stop();
+					play_state = 0;
+				}
+				break;
+			}
+			break;
+
+		case AICA_COMMAND_PLAY:
+			blksize = aicacmd->blocksize;
+
+			CH_WRITE_4(0,0x00, 0x8000);
+			CH_WRITE_4(1,0x00, 0x8000);
+
+			switch (aicacmd->precision) {
+			case 16:
+				loopend = blksize;
+				break;
+			case 8:
+				loopend = blksize * 2;
+				break;
+			case 4:
+				loopend = blksize * 4;
+				break;
+			}
+			loophalf = loopend/2;
+
+			ratepitch = rate2reg(aicacmd->rate);
+
+			/* setup left */
+			CH_WRITE_4(0,0x08,0);			/* loop start */
+			CH_WRITE_4(0,0x0c,loopend);		/* loop end */
+			CH_WRITE_4(0,0x18,ratepitch);		/* SamplingRate */
+			CH_WRITE_4(0,0x24,0x0f1f);		/* volume MAX, right PAN */
+
+			/* setup right */
+			CH_WRITE_4(1,0x08,0);			/* loop start */
+			CH_WRITE_4(1,0x0c,loopend);		/* loop end */
+			CH_WRITE_4(1,0x18,ratepitch);		/* SamplingRate */
+			CH_WRITE_4(1,0x24,0x0f0f);		/* volume MAX, right PAN */
+
+			{
+				unsigned int mode;
+
+				if (aicacmd->precision == 4)
+					mode = 3<<7;	/* 4bit ADPCM */
+				else if (aicacmd->precision == 8)
+					mode = 1<<7;	/* 8bit */
+				else
+					mode = 0;	/* 16bit */
+
+				switch (aicacmd->channel) {
+				case 2:
+					CH_WRITE_4(0,0x04, (unsigned int)AICA_DMABUF_LEFT  & 0xffff);
+					CH_WRITE_4(1,0x04, (unsigned int)AICA_DMABUF_RIGHT & 0xffff);
+					{
+						unsigned int lparam,rparam;
+						lparam = 0xc000/*PLAY*/|0x0200/*LOOP*/|mode|((unsigned int)AICA_DMABUF_LEFT>>16);
+						rparam = 0xc000/*PLAY*/|0x0200/*LOOP*/|mode|((unsigned int)AICA_DMABUF_RIGHT>>16);
+						CH_WRITE_4(0,0x00,lparam);
+						CH_WRITE_4(1,0x00,rparam);
+					}
+					break;
+				case 1:
+					CH_WRITE_1(0,0x24, 0);	/* middle balance */
+					CH_WRITE_4(0,0x04, ((unsigned int)AICA_DMABUF_LEFT  & 0xffff));
+					CH_WRITE_4(0,0x00, 0xc000/*PLAY*/|0x0200/*LOOP*/|mode|((unsigned int)AICA_DMABUF_LEFT>>16));
+					break;
+				}
+			}
+			play_state = 1;
+			break;
+
+		case AICA_COMMAND_STOP:
+			switch (play_state) {
+			case 1:
+				bzero_4((void*)(AICA_DMABUF_LEFT+blksize),blksize);
+				bzero_4((void*)(AICA_DMABUF_RIGHT+blksize),blksize);
+				play_state = 3;
+				break;
+			case 2:
+				bzero_4((void*)AICA_DMABUF_LEFT,blksize);
+				bzero_4((void*)AICA_DMABUF_RIGHT,blksize);
+				play_state = 4;
+				break;
+			default:
+				aica_stop();
+				play_state = 0;
+				break;
+			}
+			break;
+
+		case AICA_COMMAND_INIT:
+			aica_stop();
+			play_state = 0;
+			break;
+
+		case AICA_COMMAND_MVOL:
+			REG_WRITE_4(0x2800,L256TO16(aicacmd->l_param));
+			break;
+
+		case AICA_COMMAND_VOL:
+			CH_WRITE_1(0,0x29,255-(aicacmd->l_param & 0xff));
+			CH_WRITE_1(1,0x29,255-(aicacmd->r_param & 0xff));
+			break;
+
+		}
+	}
+}
Binary files src.orig/sys/arch/dreamcast/dev/g2/microcode/aica_arm.o and src/sys/arch/dreamcast/dev/g2/microcode/aica_arm.o differ
diff -ruN src.orig/sys/arch/dreamcast/dev/g2/microcode/aica_arm_locore.S src/sys/arch/dreamcast/dev/g2/microcode/aica_arm_locore.S
--- src.orig/sys/arch/dreamcast/dev/g2/microcode/aica_arm_locore.S	1970-01-01 09:00:00.000000000 +0900
+++ src/sys/arch/dreamcast/dev/g2/microcode/aica_arm_locore.S	2003-08-17 05:44:41.000000000 +0900
@@ -0,0 +1,74 @@
+/*	$NetBSD$	*/
+
+/*
+ * Copyright (c) 2003 SHIMIZU Ryo <ryo@misakimix.org>
+ * All rights reserved.
+ *
+ * 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.
+ * 3. The name of the author may not be used to endorse or promote products
+ *    derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 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 <arm/include/asm.h>
+
+	.text
+	.globl
+
+	b	exp_reset
+	b	exp_undef
+	b	exp_swi
+	b	exp_pabort
+	b	exp_dabort
+	b	exp_reserved
+	b	exp_irq
+/*	b	exp_fiq	*/
+exp_fiq:
+	sub	pc,r14,#4
+
+exp_reset:
+	mov	sp,#0xff00	/* setup stack */
+
+	mrs	r0,CPSR		/* disable interrupt */
+	bic	r0,r0,#0x80
+	bic	r0,r0,#0x40
+	msr	CPSR_all,r0
+
+	bl	_C_LABEL(aica_main)
+
+exp_reserved:
+	b	exp_reserved
+
+exp_irq:
+	sub	pc,r14,#4
+
+exp_dabort:
+	sub	pc,r14,#8
+
+exp_pabort:
+	sub	pc,r14,#4
+
+exp_swi:
+	mov	pc,r14
+
+exp_undef:
+	mov	pc,r14
+
diff -ruN src.orig/sys/arch/dreamcast/dev/g2/microcode/aica_armcode.h src/sys/arch/dreamcast/dev/g2/microcode/aica_armcode.h
--- src.orig/sys/arch/dreamcast/dev/g2/microcode/aica_armcode.h	1970-01-01 09:00:00.000000000 +0900
+++ src/sys/arch/dreamcast/dev/g2/microcode/aica_armcode.h	2003-08-17 16:34:36.000000000 +0900
@@ -0,0 +1,813 @@
+static u_int8_t aica_armcode[] = {
+ /* 0000 */	0x06, 0x00, 0x00, 0xea,
+ /* 0004 */	0x10, 0x00, 0x00, 0xea,
+ /* 0008 */	0x0e, 0x00, 0x00, 0xea,
+ /* 000c */	0x0c, 0x00, 0x00, 0xea,
+ /* 0010 */	0x0a, 0x00, 0x00, 0xea,
+ /* 0014 */	0x07, 0x00, 0x00, 0xea,
+ /* 0018 */	0x07, 0x00, 0x00, 0xea,
+ /* 001c */	0x04, 0xf0, 0x4e, 0xe2,
+ /* 0020 */	0xff, 0xdc, 0xa0, 0xe3,
+ /* 0024 */	0x00, 0x00, 0x0f, 0xe1,
+ /* 0028 */	0x80, 0x00, 0xc0, 0xe3,
+ /* 002c */	0x40, 0x00, 0xc0, 0xe3,
+ /* 0030 */	0x00, 0xf0, 0x29, 0xe1,
+ /* 0034 */	0xaa, 0x00, 0x00, 0xeb,
+ /* 0038 */	0xfe, 0xff, 0xff, 0xea,
+ /* 003c */	0x04, 0xf0, 0x4e, 0xe2,
+ /* 0040 */	0x08, 0xf0, 0x4e, 0xe2,
+ /* 0044 */	0x04, 0xf0, 0x4e, 0xe2,
+ /* 0048 */	0x0e, 0xf0, 0xa0, 0xe1,
+ /* 004c */	0x0e, 0xf0, 0xa0, 0xe1,
+ /* 0050 */	0x70, 0x40, 0x2d, 0xe9,
+ /* 0054 */	0x02, 0x15, 0xa0, 0xe3,
+ /* 0058 */	0x0a, 0x2b, 0x81, 0xe2,
+ /* 005c */	0x00, 0x30, 0xa0, 0xe3,
+ /* 0060 */	0x00, 0x30, 0x82, 0xe5,
+ /* 0064 */	0x03, 0xc0, 0xa0, 0xe1,
+ /* 0068 */	0x01, 0xe0, 0xa0, 0xe1,
+ /* 006c */	0x04, 0x50, 0xa0, 0xe3,
+ /* 0070 */	0x01, 0x50, 0x85, 0xe0,
+ /* 0074 */	0x0c, 0x00, 0xa0, 0xe1,
+ /* 0078 */	0x10, 0x40, 0xa0, 0xe3,
+ /* 007c */	0x01, 0x40, 0x84, 0xe0,
+ /* 0080 */	0x24, 0x60, 0xa0, 0xe3,
+ /* 0084 */	0x02, 0x39, 0xa0, 0xe3,
+ /* 0088 */	0x8c, 0x33, 0x8e, 0xe7,
+ /* 008c */	0x8c, 0x03, 0x85, 0xe7,
+ /* 0090 */	0x08, 0x30, 0xa0, 0xe3,
+ /* 0094 */	0x02, 0x35, 0x83, 0xe2,
+ /* 0098 */	0x8c, 0x03, 0x83, 0xe7,
+ /* 009c */	0x0c, 0x20, 0xa0, 0xe3,
+ /* 00a0 */	0x02, 0x25, 0x82, 0xe2,
+ /* 00a4 */	0x8c, 0x03, 0x82, 0xe7,
+ /* 00a8 */	0x1f, 0x10, 0xa0, 0xe3,
+ /* 00ac */	0x8c, 0x13, 0x84, 0xe7,
+ /* 00b0 */	0x14, 0x30, 0xa0, 0xe3,
+ /* 00b4 */	0x02, 0x35, 0x83, 0xe2,
+ /* 00b8 */	0x8c, 0x13, 0x83, 0xe7,
+ /* 00bc */	0x18, 0x20, 0xa0, 0xe3,
+ /* 00c0 */	0x02, 0x25, 0x82, 0xe2,
+ /* 00c4 */	0x8c, 0x03, 0x82, 0xe7,
+ /* 00c8 */	0x1c, 0x30, 0xa0, 0xe3,
+ /* 00cc */	0x02, 0x35, 0x83, 0xe2,
+ /* 00d0 */	0x8c, 0x03, 0x83, 0xe7,
+ /* 00d4 */	0x20, 0x20, 0xa0, 0xe3,
+ /* 00d8 */	0x02, 0x25, 0x82, 0xe2,
+ /* 00dc */	0x8c, 0x03, 0x82, 0xe7,
+ /* 00e0 */	0x02, 0x15, 0x86, 0xe2,
+ /* 00e4 */	0x8c, 0x03, 0x81, 0xe7,
+ /* 00e8 */	0x28, 0x30, 0xa0, 0xe3,
+ /* 00ec */	0x02, 0x35, 0x83, 0xe2,
+ /* 00f0 */	0x8c, 0x63, 0x83, 0xe7,
+ /* 00f4 */	0x2c, 0x20, 0xa0, 0xe3,
+ /* 00f8 */	0x02, 0x25, 0x82, 0xe2,
+ /* 00fc */	0x8c, 0x03, 0x82, 0xe7,
+ /* 0100 */	0x30, 0x30, 0xa0, 0xe3,
+ /* 0104 */	0x02, 0x35, 0x83, 0xe2,
+ /* 0108 */	0x8c, 0x03, 0x83, 0xe7,
+ /* 010c */	0x34, 0x20, 0xa0, 0xe3,
+ /* 0110 */	0x02, 0x25, 0x82, 0xe2,
+ /* 0114 */	0x8c, 0x03, 0x82, 0xe7,
+ /* 0118 */	0x38, 0x30, 0xa0, 0xe3,
+ /* 011c */	0x02, 0x35, 0x83, 0xe2,
+ /* 0120 */	0x8c, 0x03, 0x83, 0xe7,
+ /* 0124 */	0x3c, 0x20, 0xa0, 0xe3,
+ /* 0128 */	0x02, 0x25, 0x82, 0xe2,
+ /* 012c */	0x8c, 0x03, 0x82, 0xe7,
+ /* 0130 */	0x40, 0x30, 0xa0, 0xe3,
+ /* 0134 */	0x02, 0x35, 0x83, 0xe2,
+ /* 0138 */	0x8c, 0x03, 0x83, 0xe7,
+ /* 013c */	0x44, 0x20, 0xa0, 0xe3,
+ /* 0140 */	0x02, 0x25, 0x82, 0xe2,
+ /* 0144 */	0x8c, 0x03, 0x82, 0xe7,
+ /* 0148 */	0x8c, 0x13, 0xa0, 0xe1,
+ /* 014c */	0x48, 0x30, 0x81, 0xe3,
+ /* 0150 */	0x0e, 0x00, 0x83, 0xe7,
+ /* 0154 */	0x4c, 0x20, 0x81, 0xe3,
+ /* 0158 */	0x0e, 0x00, 0x82, 0xe7,
+ /* 015c */	0x50, 0x30, 0x81, 0xe3,
+ /* 0160 */	0x0e, 0x00, 0x83, 0xe7,
+ /* 0164 */	0x54, 0x20, 0x81, 0xe3,
+ /* 0168 */	0x0e, 0x00, 0x82, 0xe7,
+ /* 016c */	0x58, 0x30, 0x81, 0xe3,
+ /* 0170 */	0x0e, 0x00, 0x83, 0xe7,
+ /* 0174 */	0x5c, 0x20, 0x81, 0xe3,
+ /* 0178 */	0x0e, 0x00, 0x82, 0xe7,
+ /* 017c */	0x60, 0x30, 0x81, 0xe3,
+ /* 0180 */	0x0e, 0x00, 0x83, 0xe7,
+ /* 0184 */	0x64, 0x20, 0x81, 0xe3,
+ /* 0188 */	0x0e, 0x00, 0x82, 0xe7,
+ /* 018c */	0x68, 0x30, 0x81, 0xe3,
+ /* 0190 */	0x0e, 0x00, 0x83, 0xe7,
+ /* 0194 */	0x6c, 0x20, 0x81, 0xe3,
+ /* 0198 */	0x0e, 0x00, 0x82, 0xe7,
+ /* 019c */	0x70, 0x30, 0x81, 0xe3,
+ /* 01a0 */	0x0e, 0x00, 0x83, 0xe7,
+ /* 01a4 */	0x74, 0x20, 0x81, 0xe3,
+ /* 01a8 */	0x0e, 0x00, 0x82, 0xe7,
+ /* 01ac */	0x78, 0x30, 0x81, 0xe3,
+ /* 01b0 */	0x0e, 0x00, 0x83, 0xe7,
+ /* 01b4 */	0x7c, 0x10, 0x81, 0xe3,
+ /* 01b8 */	0x0e, 0x00, 0x81, 0xe7,
+ /* 01bc */	0x01, 0xc0, 0x8c, 0xe2,
+ /* 01c0 */	0x3f, 0x00, 0x5c, 0xe3,
+ /* 01c4 */	0xae, 0xff, 0xff, 0xda,
+ /* 01c8 */	0x02, 0x35, 0xa0, 0xe3,
+ /* 01cc */	0x0a, 0x3b, 0x83, 0xe2,
+ /* 01d0 */	0x0f, 0x20, 0xa0, 0xe3,
+ /* 01d4 */	0x00, 0x20, 0x83, 0xe5,
+ /* 01d8 */	0x70, 0x80, 0xbd, 0xe8,
+ /* 01dc */	0x10, 0x40, 0x2d, 0xe9,
+ /* 01e0 */	0x56, 0xc8, 0xa0, 0xe3,
+ /* 01e4 */	0x22, 0xcc, 0x8c, 0xe2,
+ /* 01e8 */	0x07, 0x40, 0xa0, 0xe3,
+ /* 01ec */	0x0c, 0x00, 0x50, 0xe1,
+ /* 01f0 */	0x09, 0x00, 0x00, 0x2a,
+ /* 01f4 */	0xac, 0xc0, 0xa0, 0xe1,
+ /* 01f8 */	0x01, 0x40, 0x44, 0xe2,
+ /* 01fc */	0x08, 0x00, 0x74, 0xe3,
+ /* 0200 */	0x00, 0x30, 0xa0, 0xb3,
+ /* 0204 */	0x01, 0x30, 0xa0, 0xa3,
+ /* 0208 */	0x0c, 0x00, 0x50, 0xe1,
+ /* 020c */	0x00, 0x30, 0xa0, 0x23,
+ /* 0210 */	0x01, 0x30, 0x03, 0x32,
+ /* 0214 */	0x00, 0x00, 0x53, 0xe3,
+ /* 0218 */	0xf5, 0xff, 0xff, 0x1a,
+ /* 021c */	0x0c, 0x00, 0x50, 0xe1,
+ /* 0220 */	0x84, 0x05, 0xa0, 0x31,
+ /* 0224 */	0x3e, 0x0b, 0x00, 0x32,
+ /* 0228 */	0x10, 0x80, 0xbd, 0x38,
+ /* 022c */	0x00, 0x00, 0x6c, 0xe0,
+ /* 0230 */	0xac, 0x30, 0xa0, 0xe1,
+ /* 0234 */	0x00, 0x35, 0x83, 0xe0,
+ /* 0238 */	0x00, 0xe0, 0xa0, 0xe3,
+ /* 023c */	0x0c, 0x00, 0x53, 0xe1,
+ /* 0240 */	0x03, 0x00, 0x00, 0x3a,
+ /* 0244 */	0x03, 0x30, 0x6c, 0xe0,
+ /* 0248 */	0x01, 0xe0, 0x8e, 0xe2,
+ /* 024c */	0x0c, 0x00, 0x53, 0xe1,
+ /* 0250 */	0xfb, 0xff, 0xff, 0x2a,
+ /* 0254 */	0x01, 0x0b, 0x5e, 0xe3,
+ /* 0258 */	0x01, 0x40, 0x84, 0x02,
+ /* 025c */	0x00, 0xe0, 0xa0, 0x03,
+ /* 0260 */	0x1b, 0x00, 0x00, 0x0a,
+ /* 0264 */	0x9e, 0x0c, 0x01, 0xe0,
+ /* 0268 */	0xff, 0x2f, 0xa0, 0xe3,
+ /* 026c */	0x02, 0x20, 0x82, 0xe2,
+ /* 0270 */	0x21, 0x05, 0x50, 0xe1,
+ /* 0274 */	0x00, 0x30, 0xa0, 0x93,
+ /* 0278 */	0x01, 0x30, 0xa0, 0x83,
+ /* 027c */	0x02, 0x00, 0x5e, 0xe1,
+ /* 0280 */	0x00, 0x30, 0xa0, 0x83,
+ /* 0284 */	0x01, 0x30, 0x03, 0x92,
+ /* 0288 */	0x00, 0x00, 0x53, 0xe3,
+ /* 028c */	0x04, 0x00, 0x00, 0x0a,
+ /* 0290 */	0x01, 0x20, 0x8e, 0xe2,
+ /* 0294 */	0x92, 0x0c, 0x03, 0xe0,
+ /* 0298 */	0x23, 0x05, 0x50, 0xe1,
+ /* 029c */	0x02, 0xe0, 0xa0, 0x01,
+ /* 02a0 */	0x0b, 0x00, 0x00, 0x0a,
+ /* 02a4 */	0x21, 0x05, 0x50, 0xe1,
+ /* 02a8 */	0x00, 0x30, 0xa0, 0x23,
+ /* 02ac */	0x01, 0x30, 0xa0, 0x33,
+ /* 02b0 */	0x00, 0x00, 0x5e, 0xe3,
+ /* 02b4 */	0x00, 0x30, 0xa0, 0x03,
+ /* 02b8 */	0x01, 0x30, 0x03, 0x12,
+ /* 02bc */	0x00, 0x00, 0x53, 0xe3,
+ /* 02c0 */	0x03, 0x00, 0x00, 0x0a,
+ /* 02c4 */	0x01, 0x20, 0x4e, 0xe2,
+ /* 02c8 */	0x92, 0x0c, 0x03, 0xe0,
+ /* 02cc */	0x23, 0x05, 0x50, 0xe1,
+ /* 02d0 */	0x02, 0xe0, 0xa0, 0x01,
+ /* 02d4 */	0x84, 0x05, 0xa0, 0xe1,
+ /* 02d8 */	0x3e, 0x0b, 0x00, 0xe2,
+ /* 02dc */	0x0e, 0x00, 0x80, 0xe0,
+ /* 02e0 */	0x10, 0x80, 0xbd, 0xe8,
+ /* 02e4 */	0x0d, 0xc0, 0xa0, 0xe1,
+ /* 02e8 */	0xf0, 0xdf, 0x2d, 0xe9,
+ /* 02ec */	0x04, 0xb0, 0x4c, 0xe2,
+ /* 02f0 */	0x0c, 0xd0, 0x4d, 0xe2,
+ /* 02f4 */	0x55, 0xff, 0xff, 0xeb,
+ /* 02f8 */	0xa2, 0x3d, 0xa0, 0xe3,
+ /* 02fc */	0x34, 0x30, 0x83, 0xe2,
+ /* 0300 */	0x02, 0x35, 0x83, 0xe2,
+ /* 0304 */	0x20, 0x20, 0xa0, 0xe3,
+ /* 0308 */	0x00, 0x20, 0x83, 0xe5,
+ /* 030c */	0x00, 0xa0, 0xa0, 0xe3,
+ /* 0310 */	0x0a, 0x80, 0xa0, 0xe1,
+ /* 0314 */	0x01, 0x38, 0xa0, 0xe3,
+ /* 0318 */	0xff, 0x4c, 0xa0, 0xe3,
+ /* 031c */	0xc0, 0x10, 0x84, 0xe3,
+ /* 0320 */	0x08, 0x20, 0xa0, 0xe1,
+ /* 0324 */	0x2c, 0xa0, 0x0b, 0xe5,
+ /* 0328 */	0x00, 0x20, 0x83, 0xe5,
+ /* 032c */	0x01, 0x20, 0x83, 0xe5,
+ /* 0330 */	0x02, 0x20, 0x83, 0xe5,
+ /* 0334 */	0x03, 0x20, 0x83, 0xe5,
+ /* 0338 */	0x04, 0x30, 0x83, 0xe2,
+ /* 033c */	0x10, 0x10, 0x51, 0xe2,
+ /* 0340 */	0xf8, 0xff, 0xff, 0x1a,
+ /* 0344 */	0x02, 0x28, 0xa0, 0xe3,
+ /* 0348 */	0xff, 0x3c, 0xa0, 0xe3,
+ /* 034c */	0xc0, 0x30, 0x83, 0xe2,
+ /* 0350 */	0x00, 0x10, 0xa0, 0xe3,
+ /* 0354 */	0x00, 0x10, 0x82, 0xe5,
+ /* 0358 */	0x01, 0x10, 0x82, 0xe5,
+ /* 035c */	0x02, 0x10, 0x82, 0xe5,
+ /* 0360 */	0x03, 0x10, 0x82, 0xe5,
+ /* 0364 */	0x04, 0x20, 0x82, 0xe2,
+ /* 0368 */	0x10, 0x30, 0x53, 0xe2,
+ /* 036c */	0xf8, 0xff, 0xff, 0x1a,
+ /* 0370 */	0x00, 0x00, 0xa0, 0xe3,
+ /* 0374 */	0x00, 0x00, 0x84, 0xe5,
+ /* 0378 */	0x00, 0x20, 0x94, 0xe5,
+ /* 037c */	0x00, 0x50, 0xa0, 0xe1,
+ /* 0380 */	0x0a, 0x7b, 0xa0, 0xe3,
+ /* 0384 */	0x0d, 0x70, 0x87, 0xe2,
+ /* 0388 */	0x02, 0x75, 0x87, 0xe2,
+ /* 038c */	0x02, 0x95, 0xa0, 0xe3,
+ /* 0390 */	0x02, 0x69, 0xa0, 0xe3,
+ /* 0394 */	0x30, 0x20, 0x0b, 0xe5,
+ /* 0398 */	0x00, 0x30, 0x94, 0xe5,
+ /* 039c */	0x30, 0x20, 0x1b, 0xe5,
+ /* 03a0 */	0x03, 0x00, 0x52, 0xe1,
+ /* 03a4 */	0x04, 0x00, 0x00, 0x0a,
+ /* 03a8 */	0x00, 0x30, 0x94, 0xe5,
+ /* 03ac */	0x30, 0x30, 0x0b, 0xe5,
+ /* 03b0 */	0x04, 0x30, 0x94, 0xe5,
+ /* 03b4 */	0x04, 0x50, 0x84, 0xe5,
+ /* 03b8 */	0x00, 0x00, 0x00, 0xea,
+ /* 03bc */	0x00, 0x30, 0xa0, 0xe3,
+ /* 03c0 */	0x05, 0x00, 0x53, 0xe3,
+ /* 03c4 */	0x03, 0xf1, 0x9f, 0x97,
+ /* 03c8 */	0xcd, 0x01, 0x00, 0xea,
+ /* 03cc */	0xe4, 0x03, 0x00, 0x00,
+ /* 03d0 */	0x1c, 0x06, 0x00, 0x00,
+ /* 03d4 */	0x78, 0x07, 0x00, 0x00,
+ /* 03d8 */	0x10, 0x0a, 0x00, 0x00,
+ /* 03dc */	0xc0, 0x0a, 0x00, 0x00,
+ /* 03e0 */	0xdc, 0x0a, 0x00, 0x00,
+ /* 03e4 */	0x04, 0x00, 0x50, 0xe3,
+ /* 03e8 */	0x00, 0xf1, 0x9f, 0x97,
+ /* 03ec */	0x89, 0x00, 0x00, 0xea,
+ /* 03f0 */	0x98, 0x03, 0x00, 0x00,
+ /* 03f4 */	0x04, 0x04, 0x00, 0x00,
+ /* 03f8 */	0x40, 0x04, 0x00, 0x00,
+ /* 03fc */	0x7c, 0x04, 0x00, 0x00,
+ /* 0400 */	0x4c, 0x05, 0x00, 0x00,
+ /* 0404 */	0x00, 0x50, 0xc7, 0xe5,
+ /* 0408 */	0x0a, 0x3b, 0xa0, 0xe3,
+ /* 040c */	0x14, 0x30, 0x83, 0xe2,
+ /* 0410 */	0x02, 0x35, 0x83, 0xe2,
+ /* 0414 */	0x00, 0x20, 0x93, 0xe5,
+ /* 0418 */	0x2c, 0x30, 0x1b, 0xe5,
+ /* 041c */	0x03, 0x00, 0x52, 0xe1,
+ /* 0420 */	0xdc, 0xff, 0xff, 0x3a,
+ /* 0424 */	0xa2, 0x3d, 0xa0, 0xe3,
+ /* 0428 */	0x38, 0x30, 0x83, 0xe2,
+ /* 042c */	0x02, 0x35, 0x83, 0xe2,
+ /* 0430 */	0x20, 0x20, 0xa0, 0xe3,
+ /* 0434 */	0x00, 0x20, 0x83, 0xe5,
+ /* 0438 */	0x02, 0x00, 0xa0, 0xe3,
+ /* 043c */	0xd5, 0xff, 0xff, 0xea,
+ /* 0440 */	0x00, 0x50, 0xc7, 0xe5,
+ /* 0444 */	0x0a, 0x3b, 0xa0, 0xe3,
+ /* 0448 */	0x14, 0x30, 0x83, 0xe2,
+ /* 044c */	0x02, 0x35, 0x83, 0xe2,
+ /* 0450 */	0x00, 0x20, 0x93, 0xe5,
+ /* 0454 */	0x2c, 0x30, 0x1b, 0xe5,
+ /* 0458 */	0x03, 0x00, 0x52, 0xe1,
+ /* 045c */	0xcd, 0xff, 0xff, 0x2a,
+ /* 0460 */	0xa2, 0x3d, 0xa0, 0xe3,
+ /* 0464 */	0x38, 0x30, 0x83, 0xe2,
+ /* 0468 */	0x02, 0x35, 0x83, 0xe2,
+ /* 046c */	0x20, 0x20, 0xa0, 0xe3,
+ /* 0470 */	0x00, 0x20, 0x83, 0xe5,
+ /* 0474 */	0x01, 0x00, 0xa0, 0xe3,
+ /* 0478 */	0xc6, 0xff, 0xff, 0xea,
+ /* 047c */	0x00, 0x50, 0xc7, 0xe5,
+ /* 0480 */	0x0a, 0x3b, 0xa0, 0xe3,
+ /* 0484 */	0x14, 0x30, 0x83, 0xe2,
+ /* 0488 */	0x02, 0x35, 0x83, 0xe2,
+ /* 048c */	0x00, 0x20, 0x93, 0xe5,
+ /* 0490 */	0x2c, 0x30, 0x1b, 0xe5,
+ /* 0494 */	0x03, 0x00, 0x52, 0xe1,
+ /* 0498 */	0xbe, 0xff, 0xff, 0x3a,
+ /* 049c */	0x00, 0x60, 0x89, 0xe5,
+ /* 04a0 */	0x80, 0x30, 0xa0, 0xe3,
+ /* 04a4 */	0x02, 0x35, 0x83, 0xe2,
+ /* 04a8 */	0x00, 0x60, 0x83, 0xe5,
+ /* 04ac */	0x01, 0x28, 0xa0, 0xe3,
+ /* 04b0 */	0xff, 0x0c, 0xa0, 0xe3,
+ /* 04b4 */	0xc0, 0x00, 0x80, 0xe2,
+ /* 04b8 */	0x00, 0x30, 0xa0, 0xe3,
+ /* 04bc */	0x00, 0x30, 0x82, 0xe5,
+ /* 04c0 */	0x01, 0x30, 0x82, 0xe5,
+ /* 04c4 */	0x02, 0x30, 0x82, 0xe5,
+ /* 04c8 */	0x03, 0x30, 0x82, 0xe5,
+ /* 04cc */	0x04, 0x30, 0x82, 0xe5,
+ /* 04d0 */	0x05, 0x30, 0x82, 0xe5,
+ /* 04d4 */	0x06, 0x30, 0x82, 0xe5,
+ /* 04d8 */	0x07, 0x30, 0x82, 0xe5,
+ /* 04dc */	0x08, 0x30, 0x82, 0xe5,
+ /* 04e0 */	0x09, 0x30, 0x82, 0xe5,
+ /* 04e4 */	0x0a, 0x30, 0x82, 0xe5,
+ /* 04e8 */	0x0b, 0x30, 0x82, 0xe5,
+ /* 04ec */	0x0c, 0x20, 0x82, 0xe2,
+ /* 04f0 */	0x30, 0x00, 0x50, 0xe2,
+ /* 04f4 */	0xf0, 0xff, 0xff, 0x1a,
+ /* 04f8 */	0x02, 0x28, 0xa0, 0xe3,
+ /* 04fc */	0xff, 0x1c, 0xa0, 0xe3,
+ /* 0500 */	0xc0, 0x10, 0x81, 0xe2,
+ /* 0504 */	0x00, 0x30, 0xa0, 0xe1,
+ /* 0508 */	0x00, 0x30, 0x82, 0xe5,
+ /* 050c */	0x01, 0x30, 0x82, 0xe5,
+ /* 0510 */	0x02, 0x30, 0x82, 0xe5,
+ /* 0514 */	0x03, 0x30, 0x82, 0xe5,
+ /* 0518 */	0x04, 0x30, 0x82, 0xe5,
+ /* 051c */	0x05, 0x30, 0x82, 0xe5,
+ /* 0520 */	0x06, 0x30, 0x82, 0xe5,
+ /* 0524 */	0x07, 0x30, 0x82, 0xe5,
+ /* 0528 */	0x08, 0x30, 0x82, 0xe5,
+ /* 052c */	0x09, 0x30, 0x82, 0xe5,
+ /* 0530 */	0x0a, 0x30, 0x82, 0xe5,
+ /* 0534 */	0x0b, 0x30, 0x82, 0xe5,
+ /* 0538 */	0x0c, 0x20, 0x82, 0xe2,
+ /* 053c */	0x30, 0x10, 0x51, 0xe2,
+ /* 0540 */	0xf0, 0xff, 0xff, 0x1a,
+ /* 0544 */	0x01, 0x00, 0xa0, 0xe1,
+ /* 0548 */	0x92, 0xff, 0xff, 0xea,
+ /* 054c */	0x00, 0x50, 0xc7, 0xe5,
+ /* 0550 */	0x0a, 0x3b, 0xa0, 0xe3,
+ /* 0554 */	0x14, 0x30, 0x83, 0xe2,
+ /* 0558 */	0x02, 0x35, 0x83, 0xe2,
+ /* 055c */	0x00, 0x20, 0x93, 0xe5,
+ /* 0560 */	0x2c, 0x30, 0x1b, 0xe5,
+ /* 0564 */	0x03, 0x00, 0x52, 0xe1,
+ /* 0568 */	0x8a, 0xff, 0xff, 0x2a,
+ /* 056c */	0x00, 0x60, 0x89, 0xe5,
+ /* 0570 */	0x80, 0x30, 0xa0, 0xe3,
+ /* 0574 */	0x02, 0x35, 0x83, 0xe2,
+ /* 0578 */	0x00, 0x60, 0x83, 0xe5,
+ /* 057c */	0x01, 0x28, 0xa0, 0xe3,
+ /* 0580 */	0xff, 0x0c, 0xa0, 0xe3,
+ /* 0584 */	0xc0, 0x00, 0x80, 0xe2,
+ /* 0588 */	0x00, 0x30, 0xa0, 0xe3,
+ /* 058c */	0x00, 0x30, 0x82, 0xe5,
+ /* 0590 */	0x01, 0x30, 0x82, 0xe5,
+ /* 0594 */	0x02, 0x30, 0x82, 0xe5,
+ /* 0598 */	0x03, 0x30, 0x82, 0xe5,
+ /* 059c */	0x04, 0x30, 0x82, 0xe5,
+ /* 05a0 */	0x05, 0x30, 0x82, 0xe5,
+ /* 05a4 */	0x06, 0x30, 0x82, 0xe5,
+ /* 05a8 */	0x07, 0x30, 0x82, 0xe5,
+ /* 05ac */	0x08, 0x30, 0x82, 0xe5,
+ /* 05b0 */	0x09, 0x30, 0x82, 0xe5,
+ /* 05b4 */	0x0a, 0x30, 0x82, 0xe5,
+ /* 05b8 */	0x0b, 0x30, 0x82, 0xe5,
+ /* 05bc */	0x0c, 0x20, 0x82, 0xe2,
+ /* 05c0 */	0x30, 0x00, 0x50, 0xe2,
+ /* 05c4 */	0xf0, 0xff, 0xff, 0x1a,
+ /* 05c8 */	0x02, 0x28, 0xa0, 0xe3,
+ /* 05cc */	0xff, 0x1c, 0xa0, 0xe3,
+ /* 05d0 */	0xc0, 0x10, 0x81, 0xe2,
+ /* 05d4 */	0x00, 0x30, 0xa0, 0xe1,
+ /* 05d8 */	0x00, 0x30, 0x82, 0xe5,
+ /* 05dc */	0x01, 0x30, 0x82, 0xe5,
+ /* 05e0 */	0x02, 0x30, 0x82, 0xe5,
+ /* 05e4 */	0x03, 0x30, 0x82, 0xe5,
+ /* 05e8 */	0x04, 0x30, 0x82, 0xe5,
+ /* 05ec */	0x05, 0x30, 0x82, 0xe5,
+ /* 05f0 */	0x06, 0x30, 0x82, 0xe5,
+ /* 05f4 */	0x07, 0x30, 0x82, 0xe5,
+ /* 05f8 */	0x08, 0x30, 0x82, 0xe5,
+ /* 05fc */	0x09, 0x30, 0x82, 0xe5,
+ /* 0600 */	0x0a, 0x30, 0x82, 0xe5,
+ /* 0604 */	0x0b, 0x30, 0x82, 0xe5,
+ /* 0608 */	0x0c, 0x20, 0x82, 0xe2,
+ /* 060c */	0x30, 0x10, 0x51, 0xe2,
+ /* 0610 */	0xf0, 0xff, 0xff, 0x1a,
+ /* 0614 */	0x01, 0x00, 0xa0, 0xe1,
+ /* 0618 */	0x5e, 0xff, 0xff, 0xea,
+ /* 061c */	0x08, 0x80, 0x94, 0xe5,
+ /* 0620 */	0x00, 0x60, 0x89, 0xe5,
+ /* 0624 */	0x80, 0x30, 0xa0, 0xe3,
+ /* 0628 */	0x02, 0x35, 0x83, 0xe2,
+ /* 062c */	0x00, 0x60, 0x83, 0xe5,
+ /* 0630 */	0x14, 0x30, 0x94, 0xe5,
+ /* 0634 */	0x08, 0x00, 0x53, 0xe3,
+ /* 0638 */	0x06, 0x00, 0x00, 0x0a,
+ /* 063c */	0x02, 0x00, 0x00, 0x8a,
+ /* 0640 */	0x04, 0x00, 0x53, 0xe3,
+ /* 0644 */	0x05, 0x00, 0x00, 0x0a,
+ /* 0648 */	0x05, 0x00, 0x00, 0xea,
+ /* 064c */	0x10, 0x00, 0x53, 0xe3,
+ /* 0650 */	0x08, 0xa0, 0xa0, 0x01,
+ /* 0654 */	0x02, 0x00, 0x00, 0xea,
+ /* 0658 */	0x88, 0xa0, 0xa0, 0xe1,
+ /* 065c */	0x00, 0x00, 0x00, 0xea,
+ /* 0660 */	0x08, 0xa1, 0xa0, 0xe1,
+ /* 0664 */	0x10, 0x00, 0x94, 0xe5,
+ /* 0668 */	0xdb, 0xfe, 0xff, 0xeb,
+ /* 066c */	0x08, 0x30, 0xa0, 0xe3,
+ /* 0670 */	0x02, 0x35, 0x83, 0xe2,
+ /* 0674 */	0x00, 0x50, 0x83, 0xe5,
+ /* 0678 */	0x0c, 0x20, 0xa0, 0xe3,
+ /* 067c */	0x02, 0x25, 0x82, 0xe2,
+ /* 0680 */	0x00, 0xa0, 0x82, 0xe5,
+ /* 0684 */	0x18, 0x30, 0xa0, 0xe3,
+ /* 0688 */	0x02, 0x35, 0x83, 0xe2,
+ /* 068c */	0x00, 0x00, 0x83, 0xe5,
+ /* 0690 */	0x24, 0x10, 0xa0, 0xe3,
+ /* 0694 */	0x02, 0x15, 0x81, 0xe2,
+ /* 0698 */	0xf1, 0x3e, 0xa0, 0xe3,
+ /* 069c */	0x0f, 0x30, 0x83, 0xe2,
+ /* 06a0 */	0x00, 0x30, 0x81, 0xe5,
+ /* 06a4 */	0x88, 0x20, 0xa0, 0xe3,
+ /* 06a8 */	0x02, 0x25, 0x82, 0xe2,
+ /* 06ac */	0x00, 0x50, 0x82, 0xe5,
+ /* 06b0 */	0x8c, 0x30, 0xa0, 0xe3,
+ /* 06b4 */	0x02, 0x35, 0x83, 0xe2,
+ /* 06b8 */	0x00, 0xa0, 0x83, 0xe5,
+ /* 06bc */	0x98, 0x20, 0xa0, 0xe3,
+ /* 06c0 */	0x02, 0x25, 0x82, 0xe2,
+ /* 06c4 */	0x00, 0x00, 0x82, 0xe5,
+ /* 06c8 */	0xa4, 0x10, 0xa0, 0xe3,
+ /* 06cc */	0x02, 0x15, 0x81, 0xe2,
+ /* 06d0 */	0x0f, 0x3c, 0xa0, 0xe3,
+ /* 06d4 */	0x0f, 0x30, 0x83, 0xe2,
+ /* 06d8 */	0x00, 0x30, 0x81, 0xe5,
+ /* 06dc */	0x14, 0x20, 0x94, 0xe5,
+ /* 06e0 */	0xaa, 0x30, 0xa0, 0xe1,
+ /* 06e4 */	0x2c, 0x30, 0x0b, 0xe5,
+ /* 06e8 */	0x04, 0x00, 0x52, 0xe3,
+ /* 06ec */	0x06, 0x1d, 0xa0, 0x03,
+ /* 06f0 */	0x03, 0x00, 0x00, 0x0a,
+ /* 06f4 */	0x14, 0x30, 0x94, 0xe5,
+ /* 06f8 */	0x08, 0x00, 0x53, 0xe3,
+ /* 06fc */	0x80, 0x10, 0xa0, 0x03,
+ /* 0700 */	0x00, 0x10, 0xa0, 0x13,
+ /* 0704 */	0x0c, 0x30, 0x94, 0xe5,
+ /* 0708 */	0x01, 0x00, 0x53, 0xe3,
+ /* 070c */	0x0f, 0x00, 0x00, 0x0a,
+ /* 0710 */	0x02, 0x00, 0x53, 0xe3,
+ /* 0714 */	0x56, 0xff, 0xff, 0x1a,
+ /* 0718 */	0x04, 0x30, 0xa0, 0xe3,
+ /* 071c */	0x02, 0x35, 0x83, 0xe2,
+ /* 0720 */	0x00, 0x50, 0x83, 0xe5,
+ /* 0724 */	0x84, 0x20, 0xa0, 0xe3,
+ /* 0728 */	0x02, 0x25, 0x82, 0xe2,
+ /* 072c */	0x00, 0x50, 0x82, 0xe5,
+ /* 0730 */	0xc2, 0x3c, 0x81, 0xe3,
+ /* 0734 */	0x01, 0x30, 0x83, 0xe3,
+ /* 0738 */	0x00, 0x30, 0x89, 0xe5,
+ /* 073c */	0xc2, 0x2c, 0x81, 0xe3,
+ /* 0740 */	0x02, 0x20, 0x82, 0xe3,
+ /* 0744 */	0x80, 0x30, 0xa0, 0xe3,
+ /* 0748 */	0x02, 0x35, 0x83, 0xe2,
+ /* 074c */	0x47, 0xff, 0xff, 0xea,
+ /* 0750 */	0x24, 0x30, 0xa0, 0xe3,
+ /* 0754 */	0x02, 0x35, 0x83, 0xe2,
+ /* 0758 */	0x00, 0x50, 0xc3, 0xe5,
+ /* 075c */	0x04, 0x20, 0xa0, 0xe3,
+ /* 0760 */	0x02, 0x25, 0x82, 0xe2,
+ /* 0764 */	0x00, 0x50, 0x82, 0xe5,
+ /* 0768 */	0xc2, 0x3c, 0x81, 0xe3,
+ /* 076c */	0x01, 0x30, 0x83, 0xe3,
+ /* 0770 */	0x00, 0x30, 0x89, 0xe5,
+ /* 0774 */	0x3e, 0xff, 0xff, 0xea,
+ /* 0778 */	0x01, 0x00, 0x50, 0xe3,
+ /* 077c */	0x02, 0x00, 0x00, 0x0a,
+ /* 0780 */	0x02, 0x00, 0x50, 0xe3,
+ /* 0784 */	0x3b, 0x00, 0x00, 0x0a,
+ /* 0788 */	0x74, 0x00, 0x00, 0xea,
+ /* 078c */	0x01, 0x28, 0x88, 0xe2,
+ /* 0790 */	0x03, 0x30, 0x88, 0xe2,
+ /* 0794 */	0x03, 0x10, 0xd3, 0xe3,
+ /* 0798 */	0x03, 0xc0, 0xa0, 0xe1,
+ /* 079c */	0x02, 0xe8, 0x88, 0xe2,
+ /* 07a0 */	0x17, 0x00, 0x00, 0x0a,
+ /* 07a4 */	0x00, 0x00, 0xa0, 0xe3,
+ /* 07a8 */	0x00, 0x30, 0x61, 0xe2,
+ /* 07ac */	0x0f, 0x30, 0x13, 0xe2,
+ /* 07b0 */	0x0c, 0x00, 0x00, 0x0a,
+ /* 07b4 */	0x0c, 0x00, 0x53, 0xe3,
+ /* 07b8 */	0x07, 0x00, 0x00, 0xaa,
+ /* 07bc */	0x08, 0x00, 0x53, 0xe3,
+ /* 07c0 */	0x03, 0x00, 0x00, 0xaa,
+ /* 07c4 */	0x03, 0x00, 0x53, 0xe3,
+ /* 07c8 */	0x06, 0x00, 0x00, 0xda,
+ /* 07cc */	0x01, 0x00, 0x82, 0xe4,
+ /* 07d0 */	0x04, 0x10, 0x41, 0xe2,
+ /* 07d4 */	0x01, 0x00, 0x82, 0xe4,
+ /* 07d8 */	0x04, 0x10, 0x41, 0xe2,
+ /* 07dc */	0x01, 0x00, 0x82, 0xe4,
+ /* 07e0 */	0x04, 0x10, 0x51, 0xe2,
+ /* 07e4 */	0x06, 0x00, 0x00, 0x0a,
+ /* 07e8 */	0x00, 0x00, 0x82, 0xe5,
+ /* 07ec */	0x01, 0x00, 0x82, 0xe5,
+ /* 07f0 */	0x02, 0x00, 0x82, 0xe5,
+ /* 07f4 */	0x03, 0x00, 0x82, 0xe5,
+ /* 07f8 */	0x04, 0x20, 0x82, 0xe2,
+ /* 07fc */	0x10, 0x10, 0x51, 0xe2,
+ /* 0800 */	0xf8, 0xff, 0xff, 0x1a,
+ /* 0804 */	0x0e, 0x20, 0xa0, 0xe1,
+ /* 0808 */	0x03, 0x10, 0xdc, 0xe3,
+ /* 080c */	0x17, 0x00, 0x00, 0x0a,
+ /* 0810 */	0x00, 0x00, 0xa0, 0xe3,
+ /* 0814 */	0x00, 0x30, 0x61, 0xe2,
+ /* 0818 */	0x0f, 0x30, 0x13, 0xe2,
+ /* 081c */	0x0c, 0x00, 0x00, 0x0a,
+ /* 0820 */	0x0c, 0x00, 0x53, 0xe3,
+ /* 0824 */	0x07, 0x00, 0x00, 0xaa,
+ /* 0828 */	0x08, 0x00, 0x53, 0xe3,
+ /* 082c */	0x03, 0x00, 0x00, 0xaa,
+ /* 0830 */	0x03, 0x00, 0x53, 0xe3,
+ /* 0834 */	0x06, 0x00, 0x00, 0xda,
+ /* 0838 */	0x01, 0x00, 0x82, 0xe4,
+ /* 083c */	0x04, 0x10, 0x41, 0xe2,
+ /* 0840 */	0x01, 0x00, 0x82, 0xe4,
+ /* 0844 */	0x04, 0x10, 0x41, 0xe2,
+ /* 0848 */	0x01, 0x00, 0x82, 0xe4,
+ /* 084c */	0x04, 0x10, 0x51, 0xe2,
+ /* 0850 */	0x06, 0x00, 0x00, 0x0a,
+ /* 0854 */	0x00, 0x00, 0x82, 0xe5,
+ /* 0858 */	0x01, 0x00, 0x82, 0xe5,
+ /* 085c */	0x02, 0x00, 0x82, 0xe5,
+ /* 0860 */	0x03, 0x00, 0x82, 0xe5,
+ /* 0864 */	0x04, 0x20, 0x82, 0xe2,
+ /* 0868 */	0x10, 0x10, 0x51, 0xe2,
+ /* 086c */	0xf8, 0xff, 0xff, 0x1a,
+ /* 0870 */	0x03, 0x00, 0xa0, 0xe3,
+ /* 0874 */	0xc7, 0xfe, 0xff, 0xea,
+ /* 0878 */	0x01, 0x18, 0xa0, 0xe3,
+ /* 087c */	0x03, 0x30, 0x88, 0xe2,
+ /* 0880 */	0x03, 0x20, 0xd3, 0xe3,
+ /* 0884 */	0x17, 0x00, 0x00, 0x0a,
+ /* 0888 */	0x00, 0x00, 0xa0, 0xe3,
+ /* 088c */	0x00, 0x30, 0x62, 0xe2,
+ /* 0890 */	0x0f, 0x30, 0x13, 0xe2,
+ /* 0894 */	0x0c, 0x00, 0x00, 0x0a,
+ /* 0898 */	0x0c, 0x00, 0x53, 0xe3,
+ /* 089c */	0x07, 0x00, 0x00, 0xaa,
+ /* 08a0 */	0x08, 0x00, 0x53, 0xe3,
+ /* 08a4 */	0x03, 0x00, 0x00, 0xaa,
+ /* 08a8 */	0x03, 0x00, 0x53, 0xe3,
+ /* 08ac */	0x06, 0x00, 0x00, 0xda,
+ /* 08b0 */	0x01, 0x00, 0x81, 0xe4,
+ /* 08b4 */	0x04, 0x20, 0x42, 0xe2,
+ /* 08b8 */	0x01, 0x00, 0x81, 0xe4,
+ /* 08bc */	0x04, 0x20, 0x42, 0xe2,
+ /* 08c0 */	0x01, 0x00, 0x81, 0xe4,
+ /* 08c4 */	0x04, 0x20, 0x52, 0xe2,
+ /* 08c8 */	0x06, 0x00, 0x00, 0x0a,
+ /* 08cc */	0x00, 0x00, 0x81, 0xe5,
+ /* 08d0 */	0x01, 0x00, 0x81, 0xe5,
+ /* 08d4 */	0x02, 0x00, 0x81, 0xe5,
+ /* 08d8 */	0x03, 0x00, 0x81, 0xe5,
+ /* 08dc */	0x04, 0x10, 0x81, 0xe2,
+ /* 08e0 */	0x10, 0x20, 0x52, 0xe2,
+ /* 08e4 */	0xf8, 0xff, 0xff, 0x1a,
+ /* 08e8 */	0x02, 0x18, 0xa0, 0xe3,
+ /* 08ec */	0x03, 0x30, 0x88, 0xe2,
+ /* 08f0 */	0x03, 0x20, 0xd3, 0xe3,
+ /* 08f4 */	0x17, 0x00, 0x00, 0x0a,
+ /* 08f8 */	0x00, 0x00, 0xa0, 0xe3,
+ /* 08fc */	0x00, 0x30, 0x62, 0xe2,
+ /* 0900 */	0x0f, 0x30, 0x13, 0xe2,
+ /* 0904 */	0x0c, 0x00, 0x00, 0x0a,
+ /* 0908 */	0x0c, 0x00, 0x53, 0xe3,
+ /* 090c */	0x07, 0x00, 0x00, 0xaa,
+ /* 0910 */	0x08, 0x00, 0x53, 0xe3,
+ /* 0914 */	0x03, 0x00, 0x00, 0xaa,
+ /* 0918 */	0x03, 0x00, 0x53, 0xe3,
+ /* 091c */	0x06, 0x00, 0x00, 0xda,
+ /* 0920 */	0x01, 0x00, 0x81, 0xe4,
+ /* 0924 */	0x04, 0x20, 0x42, 0xe2,
+ /* 0928 */	0x01, 0x00, 0x81, 0xe4,
+ /* 092c */	0x04, 0x20, 0x42, 0xe2,
+ /* 0930 */	0x01, 0x00, 0x81, 0xe4,
+ /* 0934 */	0x04, 0x20, 0x52, 0xe2,
+ /* 0938 */	0x06, 0x00, 0x00, 0x0a,
+ /* 093c */	0x00, 0x00, 0x81, 0xe5,
+ /* 0940 */	0x01, 0x00, 0x81, 0xe5,
+ /* 0944 */	0x02, 0x00, 0x81, 0xe5,
+ /* 0948 */	0x03, 0x00, 0x81, 0xe5,
+ /* 094c */	0x04, 0x10, 0x81, 0xe2,
+ /* 0950 */	0x10, 0x20, 0x52, 0xe2,
+ /* 0954 */	0xf8, 0xff, 0xff, 0x1a,
+ /* 0958 */	0x04, 0x00, 0xa0, 0xe3,
+ /* 095c */	0x8d, 0xfe, 0xff, 0xea,
+ /* 0960 */	0x00, 0x60, 0x89, 0xe5,
+ /* 0964 */	0x80, 0x30, 0xa0, 0xe3,
+ /* 0968 */	0x02, 0x35, 0x83, 0xe2,
+ /* 096c */	0x00, 0x60, 0x83, 0xe5,
+ /* 0970 */	0x01, 0x28, 0xa0, 0xe3,
+ /* 0974 */	0xff, 0x0c, 0xa0, 0xe3,
+ /* 0978 */	0xc0, 0x00, 0x80, 0xe2,
+ /* 097c */	0x00, 0x30, 0xa0, 0xe3,
+ /* 0980 */	0x00, 0x30, 0x82, 0xe5,
+ /* 0984 */	0x01, 0x30, 0x82, 0xe5,
+ /* 0988 */	0x02, 0x30, 0x82, 0xe5,
+ /* 098c */	0x03, 0x30, 0x82, 0xe5,
+ /* 0990 */	0x04, 0x30, 0x82, 0xe5,
+ /* 0994 */	0x05, 0x30, 0x82, 0xe5,
+ /* 0998 */	0x06, 0x30, 0x82, 0xe5,
+ /* 099c */	0x07, 0x30, 0x82, 0xe5,
+ /* 09a0 */	0x08, 0x30, 0x82, 0xe5,
+ /* 09a4 */	0x09, 0x30, 0x82, 0xe5,
+ /* 09a8 */	0x0a, 0x30, 0x82, 0xe5,
+ /* 09ac */	0x0b, 0x30, 0x82, 0xe5,
+ /* 09b0 */	0x0c, 0x20, 0x82, 0xe2,
+ /* 09b4 */	0x30, 0x00, 0x50, 0xe2,
+ /* 09b8 */	0xf0, 0xff, 0xff, 0x1a,
+ /* 09bc */	0x02, 0x28, 0xa0, 0xe3,
+ /* 09c0 */	0xff, 0x1c, 0xa0, 0xe3,
+ /* 09c4 */	0xc0, 0x10, 0x81, 0xe2,
+ /* 09c8 */	0x00, 0x30, 0xa0, 0xe1,
+ /* 09cc */	0x00, 0x30, 0x82, 0xe5,
+ /* 09d0 */	0x01, 0x30, 0x82, 0xe5,
+ /* 09d4 */	0x02, 0x30, 0x82, 0xe5,
+ /* 09d8 */	0x03, 0x30, 0x82, 0xe5,
+ /* 09dc */	0x04, 0x30, 0x82, 0xe5,
+ /* 09e0 */	0x05, 0x30, 0x82, 0xe5,
+ /* 09e4 */	0x06, 0x30, 0x82, 0xe5,
+ /* 09e8 */	0x07, 0x30, 0x82, 0xe5,
+ /* 09ec */	0x08, 0x30, 0x82, 0xe5,
+ /* 09f0 */	0x09, 0x30, 0x82, 0xe5,
+ /* 09f4 */	0x0a, 0x30, 0x82, 0xe5,
+ /* 09f8 */	0x0b, 0x30, 0x82, 0xe5,
+ /* 09fc */	0x0c, 0x20, 0x82, 0xe2,
+ /* 0a00 */	0x30, 0x10, 0x51, 0xe2,
+ /* 0a04 */	0xf0, 0xff, 0xff, 0x1a,
+ /* 0a08 */	0x01, 0x00, 0xa0, 0xe1,
+ /* 0a0c */	0x61, 0xfe, 0xff, 0xea,
+ /* 0a10 */	0x00, 0x60, 0x89, 0xe5,
+ /* 0a14 */	0x80, 0x30, 0xa0, 0xe3,
+ /* 0a18 */	0x02, 0x35, 0x83, 0xe2,
+ /* 0a1c */	0x00, 0x60, 0x83, 0xe5,
+ /* 0a20 */	0x01, 0x28, 0xa0, 0xe3,
+ /* 0a24 */	0xff, 0x0c, 0xa0, 0xe3,
+ /* 0a28 */	0xc0, 0x00, 0x80, 0xe2,
+ /* 0a2c */	0x00, 0x30, 0xa0, 0xe3,
+ /* 0a30 */	0x00, 0x30, 0x82, 0xe5,
+ /* 0a34 */	0x01, 0x30, 0x82, 0xe5,
+ /* 0a38 */	0x02, 0x30, 0x82, 0xe5,
+ /* 0a3c */	0x03, 0x30, 0x82, 0xe5,
+ /* 0a40 */	0x04, 0x30, 0x82, 0xe5,
+ /* 0a44 */	0x05, 0x30, 0x82, 0xe5,
+ /* 0a48 */	0x06, 0x30, 0x82, 0xe5,
+ /* 0a4c */	0x07, 0x30, 0x82, 0xe5,
+ /* 0a50 */	0x08, 0x30, 0x82, 0xe5,
+ /* 0a54 */	0x09, 0x30, 0x82, 0xe5,
+ /* 0a58 */	0x0a, 0x30, 0x82, 0xe5,
+ /* 0a5c */	0x0b, 0x30, 0x82, 0xe5,
+ /* 0a60 */	0x0c, 0x20, 0x82, 0xe2,
+ /* 0a64 */	0x30, 0x00, 0x50, 0xe2,
+ /* 0a68 */	0xf0, 0xff, 0xff, 0x1a,
+ /* 0a6c */	0x02, 0x28, 0xa0, 0xe3,
+ /* 0a70 */	0xff, 0x1c, 0xa0, 0xe3,
+ /* 0a74 */	0xc0, 0x10, 0x81, 0xe2,
+ /* 0a78 */	0x00, 0x30, 0xa0, 0xe1,
+ /* 0a7c */	0x00, 0x30, 0x82, 0xe5,
+ /* 0a80 */	0x01, 0x30, 0x82, 0xe5,
+ /* 0a84 */	0x02, 0x30, 0x82, 0xe5,
+ /* 0a88 */	0x03, 0x30, 0x82, 0xe5,
+ /* 0a8c */	0x04, 0x30, 0x82, 0xe5,
+ /* 0a90 */	0x05, 0x30, 0x82, 0xe5,
+ /* 0a94 */	0x06, 0x30, 0x82, 0xe5,
+ /* 0a98 */	0x07, 0x30, 0x82, 0xe5,
+ /* 0a9c */	0x08, 0x30, 0x82, 0xe5,
+ /* 0aa0 */	0x09, 0x30, 0x82, 0xe5,
+ /* 0aa4 */	0x0a, 0x30, 0x82, 0xe5,
+ /* 0aa8 */	0x0b, 0x30, 0x82, 0xe5,
+ /* 0aac */	0x0c, 0x20, 0x82, 0xe2,
+ /* 0ab0 */	0x30, 0x10, 0x51, 0xe2,
+ /* 0ab4 */	0xf0, 0xff, 0xff, 0x1a,
+ /* 0ab8 */	0x01, 0x00, 0xa0, 0xe1,
+ /* 0abc */	0x35, 0xfe, 0xff, 0xea,
+ /* 0ac0 */	0x18, 0x30, 0x94, 0xe5,
+ /* 0ac4 */	0x02, 0x25, 0xa0, 0xe3,
+ /* 0ac8 */	0x0a, 0x2b, 0x82, 0xe2,
+ /* 0acc */	0x23, 0x32, 0xa0, 0xe1,
+ /* 0ad0 */	0x0f, 0x30, 0x03, 0xe2,
+ /* 0ad4 */	0x00, 0x30, 0x82, 0xe5,
+ /* 0ad8 */	0x2e, 0xfe, 0xff, 0xea,
+ /* 0adc */	0x18, 0x20, 0x94, 0xe5,
+ /* 0ae0 */	0x29, 0x30, 0xa0, 0xe3,
+ /* 0ae4 */	0x02, 0x35, 0x83, 0xe2,
+ /* 0ae8 */	0xff, 0x20, 0x62, 0xe2,
+ /* 0aec */	0x00, 0x20, 0xc3, 0xe5,
+ /* 0af0 */	0x1c, 0x10, 0x94, 0xe5,
+ /* 0af4 */	0xa9, 0x30, 0xa0, 0xe3,
+ /* 0af8 */	0x02, 0x35, 0x83, 0xe2,
+ /* 0afc */	0xff, 0x10, 0x61, 0xe2,
+ /* 0b00 */	0x00, 0x10, 0xc3, 0xe5,
+ /* 0b04 */	0x23, 0xfe, 0xff, 0xea,
+ /* 0b08 */	0xf0, 0xaf, 0x1b, 0xe9,
+ /* 0b0c */	0x0a, 0x2b, 0xa0, 0xe3,
+ /* 0b10 */	0x0d, 0x30, 0x82, 0xe3,
+ /* 0b14 */	0x02, 0x35, 0x83, 0xe3,
+ /* 0b18 */	0x00, 0x10, 0xa0, 0xe3,
+ /* 0b1c */	0x00, 0x10, 0xc3, 0xe5,
+ /* 0b20 */	0x14, 0x20, 0x82, 0xe3,
+ /* 0b24 */	0x02, 0x25, 0x82, 0xe3,
+ /* 0b28 */	0x00, 0x30, 0x92, 0xe5,
+ /* 0b2c */	0x00, 0x00, 0x53, 0xe1,
+ /* 0b30 */	0x00, 0x00, 0xa0, 0x23,
+ /* 0b34 */	0x01, 0x00, 0xa0, 0x33,
+ /* 0b38 */	0x0e, 0xf0, 0xa0, 0xe1,
+ /* 0b3c */	0x0a, 0x2b, 0xa0, 0xe3,
+ /* 0b40 */	0x0d, 0x30, 0x82, 0xe3,
+ /* 0b44 */	0x02, 0x35, 0x83, 0xe3,
+ /* 0b48 */	0x00, 0x10, 0xa0, 0xe3,
+ /* 0b4c */	0x00, 0x10, 0xc3, 0xe5,
+ /* 0b50 */	0x14, 0x20, 0x82, 0xe3,
+ /* 0b54 */	0x02, 0x25, 0x82, 0xe3,
+ /* 0b58 */	0x00, 0x30, 0x92, 0xe5,
+ /* 0b5c */	0x00, 0x00, 0x53, 0xe1,
+ /* 0b60 */	0x00, 0x00, 0xa0, 0x33,
+ /* 0b64 */	0x01, 0x00, 0xa0, 0x23,
+ /* 0b68 */	0x0e, 0xf0, 0xa0, 0xe1,
+ /* 0b6c */	0x03, 0x10, 0x81, 0xe2,
+ /* 0b70 */	0x03, 0x10, 0xd1, 0xe3,
+ /* 0b74 */	0x0e, 0xf0, 0xa0, 0x01,
+ /* 0b78 */	0x00, 0x20, 0xa0, 0xe3,
+ /* 0b7c */	0x00, 0x30, 0x61, 0xe2,
+ /* 0b80 */	0x0f, 0x30, 0x13, 0xe2,
+ /* 0b84 */	0x0c, 0x00, 0x00, 0x0a,
+ /* 0b88 */	0x0c, 0x00, 0x53, 0xe3,
+ /* 0b8c */	0x07, 0x00, 0x00, 0xaa,
+ /* 0b90 */	0x08, 0x00, 0x53, 0xe3,
+ /* 0b94 */	0x03, 0x00, 0x00, 0xaa,
+ /* 0b98 */	0x03, 0x00, 0x53, 0xe3,
+ /* 0b9c */	0x06, 0x00, 0x00, 0xda,
+ /* 0ba0 */	0x01, 0x20, 0x80, 0xe4,
+ /* 0ba4 */	0x04, 0x10, 0x41, 0xe2,
+ /* 0ba8 */	0x01, 0x20, 0x80, 0xe4,
+ /* 0bac */	0x04, 0x10, 0x41, 0xe2,
+ /* 0bb0 */	0x01, 0x20, 0x80, 0xe4,
+ /* 0bb4 */	0x04, 0x10, 0x51, 0xe2,
+ /* 0bb8 */	0x0e, 0xf0, 0xa0, 0x01,
+ /* 0bbc */	0x00, 0x20, 0x80, 0xe5,
+ /* 0bc0 */	0x01, 0x20, 0x80, 0xe5,
+ /* 0bc4 */	0x02, 0x20, 0x80, 0xe5,
+ /* 0bc8 */	0x03, 0x20, 0x80, 0xe5,
+ /* 0bcc */	0x04, 0x00, 0x80, 0xe2,
+ /* 0bd0 */	0x10, 0x10, 0x51, 0xe2,
+ /* 0bd4 */	0xf8, 0xff, 0xff, 0x1a,
+ /* 0bd8 */	0x0e, 0xf0, 0xa0, 0xe1,
+ /* 0bdc */	0x00, 0x30, 0x51, 0xe2,
+ /* 0be0 */	0x0e, 0xf0, 0xa0, 0x01,
+ /* 0be4 */	0x00, 0x20, 0xa0, 0xe3,
+ /* 0be8 */	0x00, 0x10, 0x61, 0xe2,
+ /* 0bec */	0x03, 0x10, 0x11, 0xe2,
+ /* 0bf0 */	0x09, 0x00, 0x00, 0x0a,
+ /* 0bf4 */	0x03, 0x00, 0x51, 0xe3,
+ /* 0bf8 */	0x04, 0x00, 0x00, 0xaa,
+ /* 0bfc */	0x02, 0x00, 0x51, 0xe3,
+ /* 0c00 */	0x01, 0x20, 0xc0, 0xb4,
+ /* 0c04 */	0x01, 0x30, 0x43, 0xb2,
+ /* 0c08 */	0x01, 0x20, 0xc0, 0xe4,
+ /* 0c0c */	0x01, 0x30, 0x43, 0xe2,
+ /* 0c10 */	0x01, 0x20, 0xc0, 0xe4,
+ /* 0c14 */	0x01, 0x30, 0x53, 0xe2,
+ /* 0c18 */	0x0e, 0xf0, 0xa0, 0x01,
+ /* 0c1c */	0x00, 0x20, 0xc0, 0xe5,
+ /* 0c20 */	0x01, 0x20, 0xc0, 0xe5,
+ /* 0c24 */	0x02, 0x20, 0xc0, 0xe5,
+ /* 0c28 */	0x03, 0x20, 0xc0, 0xe5,
+ /* 0c2c */	0x04, 0x00, 0x80, 0xe2,
+ /* 0c30 */	0x04, 0x30, 0x53, 0xe2,
+ /* 0c34 */	0xf8, 0xff, 0xff, 0x1a,
+ /* 0c38 */	0x0e, 0xf0, 0xa0, 0xe1,
+ /* 0c3c */	0x02, 0x35, 0xa0, 0xe3,
+ /* 0c40 */	0x02, 0x19, 0xa0, 0xe3,
+ /* 0c44 */	0x00, 0x10, 0x83, 0xe5,
+ /* 0c48 */	0x80, 0x20, 0xa0, 0xe3,
+ /* 0c4c */	0x03, 0x10, 0x82, 0xe7,
+ /* 0c50 */	0x01, 0x28, 0xa0, 0xe3,
+ /* 0c54 */	0xff, 0x3c, 0xa0, 0xe3,
+ /* 0c58 */	0xc0, 0x30, 0x83, 0xe2,
+ /* 0c5c */	0x02, 0x19, 0x41, 0xe2,
+ /* 0c60 */	0x00, 0x10, 0x82, 0xe5,
+ /* 0c64 */	0x01, 0x10, 0x82, 0xe5,
+ /* 0c68 */	0x02, 0x10, 0x82, 0xe5,
+ /* 0c6c */	0x03, 0x10, 0x82, 0xe5,
+ /* 0c70 */	0x04, 0x20, 0x82, 0xe2,
+ /* 0c74 */	0x10, 0x30, 0x53, 0xe2,
+ /* 0c78 */	0xf8, 0xff, 0xff, 0x1a,
+ /* 0c7c */	0x02, 0x28, 0xa0, 0xe3,
+ /* 0c80 */	0xff, 0x3c, 0xa0, 0xe3,
+ /* 0c84 */	0xc0, 0x30, 0x83, 0xe2,
+ /* 0c88 */	0x00, 0x10, 0xa0, 0xe3,
+ /* 0c8c */	0x00, 0x10, 0x82, 0xe5,
+ /* 0c90 */	0x01, 0x10, 0x82, 0xe5,
+ /* 0c94 */	0x02, 0x10, 0x82, 0xe5,
+ /* 0c98 */	0x03, 0x10, 0x82, 0xe5,
+ /* 0c9c */	0x04, 0x20, 0x82, 0xe2,
+ /* 0ca0 */	0x10, 0x30, 0x53, 0xe2,
+ /* 0ca4 */	0xf8, 0xff, 0xff, 0x1a,
+ /* 0ca8 */	0x0e, 0xf0, 0xa0, 0xe1,
+0 };
diff -ruN src.orig/sys/arch/dreamcast/dev/g2/microcode/ldscript src/sys/arch/dreamcast/dev/g2/microcode/ldscript
--- src.orig/sys/arch/dreamcast/dev/g2/microcode/ldscript	1970-01-01 09:00:00.000000000 +0900
+++ src/sys/arch/dreamcast/dev/g2/microcode/ldscript	2003-08-10 04:40:33.000000000 +0900
@@ -0,0 +1,23 @@
+OUTPUT_ARCH(arm)
+SECTIONS
+{
+	.text :
+	{
+		*(.text)
+		*(.text.*)
+		*(.glue_7t) *(.glue_7)
+	}
+	. = ALIGN(16);
+	.data :
+	{
+	}
+	. = ALIGN(16);
+	.sbss :
+	{
+	}
+	. = ALIGN(16);
+	.bss :
+	{
+	}
+}
+
>Release-Note:
>Audit-Trail:
>Unformatted: