Search
lxdream.org :: lxdream/src/aica/aica.h :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/aica/aica.h
changeset 66:2ec5b6eb75e5
prev62:a1cb6dfefec1
next86:f151e63f9754
author nkeynes
date Mon Jan 16 11:23:28 2006 +0000 (18 years ago)
permissions -rw-r--r--
last change Tweaks to timer to make sure it's actually a one-shot
file annotate diff log raw
1.1 --- a/src/aica/aica.h Mon Jan 02 23:06:37 2006 +0000
1.2 +++ b/src/aica/aica.h Mon Jan 16 11:23:28 2006 +0000
1.3 @@ -1,5 +1,5 @@
1.4 /**
1.5 - * $Id: aica.h,v 1.6 2006-01-02 23:06:37 nkeynes Exp $
1.6 + * $Id: aica.h,v 1.7 2006-01-10 13:56:54 nkeynes Exp $
1.7 *
1.8 * MMIO definitions for the AICA sound chip. Note that the regions defined
1.9 * here are relative to the SH4 memory map (0x00700000 based), rather than
1.10 @@ -33,14 +33,14 @@
1.11 LONG_PORT( 0x044, CDDA_VOL_R, PORT_MRW, 0, "CDDA Volume right" )
1.12 LONG_PORT( 0x800, VOL_MASTER, PORT_MRW, UNDEFINED, "Master volume" )
1.13 LONG_PORT( 0x808, AICA_UNK7, PORT_MRW, 0, "AICA ??? 7" )
1.14 -LONG_PORT( 0x880, AICA_TIMER1, PORT_MRW, 0, "AICA Timer 1" )
1.15 -LONG_PORT( 0x890, AICA_TIMER2, PORT_MRW, 0, "AICA Timer 2" )
1.16 +LONG_PORT( 0x880, AICA_UNK6, PORT_MRW, 0, "AICA ??? 6" )
1.17 +LONG_PORT( 0x890, AICA_TIMER, PORT_MRW, 0, "AICA Timer" )
1.18 LONG_PORT( 0x89C, AICA_UNK1, PORT_MRW, 0, "AICA ??? 1" )
1.19 -LONG_PORT( 0x8A4, AICA_UNK2, PORT_MRW, 0, "AICA ??? 2" )
1.20 +LONG_PORT( 0x8A4, AICA_TCR, PORT_MRW, 0, "AICA Timer Control?" )
1.21 BYTE_PORT( 0x8A8, AICA_UNK3, PORT_MRW, 0, "AICA ??? 3" )
1.22 BYTE_PORT( 0x8AC, AICA_UNK4, PORT_MRW, 0, "AICA ??? 4" )
1.23 BYTE_PORT( 0x8B0, AICA_UNK5, PORT_MRW, 0, "AICA ??? 5" )
1.24 -LONG_PORT( 0xC00, AICA_RESET,PORT_MRW, 1, "AICA reset" )
1.25 +LONG_PORT( 0xC00, AICA_RESET,PORT_MRW, 0, "AICA reset" )
1.26 LONG_PORT( 0xD00, AICA_IRQ, PORT_MR, 0, "AICA IRQ Pending" )
1.27 LONG_PORT( 0xD04, AICA_IRQCLEAR, PORT_MRW, 0, "AICA IRQ Clear" )
1.28 MMIO_REGION_END
1.29 @@ -58,3 +58,16 @@
1.30 #define AICA_EVENT_OTHER 5
1.31
1.32 void aica_event( int event );
1.33 +void aica_write_channel( int channel, uint32_t addr, uint32_t val );
1.34 +
1.35 +/**
1.36 + * The AICA core runs at 44100 samples/second, regardless of what we're
1.37 + * actually outputing.
1.38 + */
1.39 +#define AICA_SAMPLE_RATE 44100
1.40 +
1.41 +/**
1.42 + * This is only used to determine number of instructions to execute
1.43 + * per sample, which isn't cycle accurate at the moment.
1.44 + */
1.45 +#define AICA_SAMPLE_PERIOD (1000000000 / 44100)
.