Search
lxdream.org :: lxdream/src/aica/aica.c
lxdream 0.9.1
released Jun 29
Download Now
filename src/aica/aica.c
changeset 11:0a82ef380c45
next15:5194dd0fdb60
author nkeynes
date Sun Dec 11 12:00:09 2005 +0000 (15 years ago)
permissions -rw-r--r--
last change Moved arm material under aica/
Hooked arm disasm up
file annotate diff log raw
nkeynes@11
     1
/**
nkeynes@11
     2
 * $Id: aica.c,v 1.1 2005-12-11 12:00:09 nkeynes Exp $
nkeynes@11
     3
 * 
nkeynes@11
     4
 * This is the core sound system (ie the bit which does the actual work)
nkeynes@11
     5
 *
nkeynes@11
     6
 * Copyright (c) 2005 Nathan Keynes.
nkeynes@11
     7
 *
nkeynes@11
     8
 * This program is free software; you can redistribute it and/or modify
nkeynes@11
     9
 * it under the terms of the GNU General Public License as published by
nkeynes@11
    10
 * the Free Software Foundation; either version 2 of the License, or
nkeynes@11
    11
 * (at your option) any later version.
nkeynes@11
    12
 *
nkeynes@11
    13
 * This program is distributed in the hope that it will be useful,
nkeynes@11
    14
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
nkeynes@11
    15
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
nkeynes@11
    16
 * GNU General Public License for more details.
nkeynes@11
    17
 */
nkeynes@11
    18
nkeynes@11
    19
#include "dream.h"
nkeynes@11
    20
#include "aica.h"
nkeynes@11
    21
#define MMIO_IMPL
nkeynes@11
    22
#include "aica.h"
nkeynes@11
    23
nkeynes@11
    24
MMIO_REGION_READ_DEFFN( AICA0 )
nkeynes@11
    25
MMIO_REGION_READ_DEFFN( AICA1 )
nkeynes@11
    26
MMIO_REGION_READ_DEFFN( AICA2 )
nkeynes@11
    27
nkeynes@11
    28
/**
nkeynes@11
    29
 * Initialize the AICA subsystem. Note requires that 
nkeynes@11
    30
 */
nkeynes@11
    31
void aica_init( void )
nkeynes@11
    32
{
nkeynes@11
    33
    register_io_regions( mmio_list_spu );
nkeynes@11
    34
    MMIO_NOTRACE(AICA0);
nkeynes@11
    35
    MMIO_NOTRACE(AICA1);
nkeynes@11
    36
    arm_mem_init();
nkeynes@11
    37
}
nkeynes@11
    38
nkeynes@11
    39
void aica_reset( void )
nkeynes@11
    40
{
nkeynes@11
    41
nkeynes@11
    42
}
nkeynes@11
    43
nkeynes@11
    44
/** Channel register structure:
nkeynes@11
    45
 * 00
nkeynes@11
    46
 * 04
nkeynes@11
    47
 * 08  4  Loop start address
nkeynes@11
    48
 * 0C  4  Loop end address
nkeynes@11
    49
 * 10  4  Volume envelope
nkeynes@11
    50
 * 14
nkeynes@11
    51
 * 18  4  Frequency (floating point 
nkeynes@11
    52
 * 1C
nkeynes@11
    53
 * 20
nkeynes@11
    54
 * 24  1  Pan
nkeynes@11
    55
 * 25  1  ??
nkeynes@11
    56
 * 26  
nkeynes@11
    57
 * 27  
nkeynes@11
    58
 * 28  1  ??
nkeynes@11
    59
 * 29  1  Volume
nkeynes@11
    60
 * 2C
nkeynes@11
    61
 * 30
nkeynes@11
    62
 * 
nkeynes@11
    63
nkeynes@11
    64
/* Write to channels 0-31 */
nkeynes@11
    65
void mmio_region_AICA0_write( uint32_t reg, uint32_t val )
nkeynes@11
    66
{
nkeynes@11
    67
    //    aica_write_channel( reg >> 7, reg % 128, val );
nkeynes@11
    68
nkeynes@11
    69
}
nkeynes@11
    70
nkeynes@11
    71
/* Write to channels 32-64 */
nkeynes@11
    72
void mmio_region_AICA1_write( uint32_t reg, uint32_t val )
nkeynes@11
    73
{
nkeynes@11
    74
    //    aica_write_channel( (reg >> 7) + 32, reg % 128, val );
nkeynes@11
    75
nkeynes@11
    76
}
nkeynes@11
    77
nkeynes@11
    78
/* General registers */
nkeynes@11
    79
void mmio_region_AICA2_write( uint32_t reg, uint32_t val )
nkeynes@11
    80
{
nkeynes@11
    81
nkeynes@11
    82
}
.