2 * $Id: aica.c,v 1.5 2005-12-25 05:57:00 nkeynes Exp $
4 * This is the core sound system (ie the bit which does the actual work)
6 * Copyright (c) 2005 Nathan Keynes.
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
26 MMIO_REGION_READ_DEFFN( AICA0 )
27 MMIO_REGION_READ_DEFFN( AICA1 )
28 MMIO_REGION_READ_DEFFN( AICA2 )
30 void aica_init( void );
31 void aica_reset( void );
32 void aica_start( void );
33 void aica_stop( void );
34 uint32_t aica_run_slice( uint32_t );
37 struct dreamcast_module aica_module = { "AICA", aica_init, aica_reset,
38 aica_start, aica_run_slice, aica_stop,
42 * Initialize the AICA subsystem. Note requires that
44 void aica_init( void )
46 register_io_regions( mmio_list_spu );
52 void aica_reset( void )
57 void aica_start( void )
62 uint32_t aica_run_slice( uint32_t nanosecs )
64 /* Run arm instructions */
65 /* Generate audio buffer */
68 void aica_stop( void )
73 /** Channel register structure:
76 * 08 4 Loop start address
77 * 0C 4 Loop end address
78 * 10 4 Volume envelope
80 * 18 4 Frequency (floating point
93 /* Write to channels 0-31 */
94 void mmio_region_AICA0_write( uint32_t reg, uint32_t val )
96 // aica_write_channel( reg >> 7, reg % 128, val );
100 /* Write to channels 32-64 */
101 void mmio_region_AICA1_write( uint32_t reg, uint32_t val )
103 // aica_write_channel( (reg >> 7) + 32, reg % 128, val );
107 /* General registers */
108 void mmio_region_AICA2_write( uint32_t reg, uint32_t val )
.