filename | src/aica/aica.c |
changeset | 301:1ace395139c3 |
prev | 241:776e46e58d6d |
next | 431:248dd77a9e44 |
author | nkeynes |
date | Sun Feb 11 10:09:32 2007 +0000 (17 years ago) |
permissions | -rw-r--r-- |
last change | Bug 27: Implement opengl framebuffer objects Rewrite much of the final video output stage. Now uses generic "render buffers", implemented on GL using framebuffer objects + textures. |
file | annotate | diff | log | raw |
1.1 --- a/src/aica/aica.c Fri Dec 15 10:19:06 2006 +00001.2 +++ b/src/aica/aica.c Sun Feb 11 10:09:32 2007 +00001.3 @@ -1,5 +1,5 @@1.4 /**1.5 - * $Id: aica.c,v 1.20 2006-12-15 10:19:06 nkeynes Exp $1.6 + * $Id: aica.c,v 1.21 2007-01-17 09:37:22 nkeynes Exp $1.7 *1.8 * This is the core sound system (ie the bit which does the actual work)1.9 *1.10 @@ -247,8 +247,27 @@1.11 return rv;1.12 }1.14 -MMIO_REGION_WRITE_STUBFN( AICARTC )1.16 +void mmio_region_AICARTC_write( uint32_t reg, uint32_t val )1.17 +{1.18 + switch( reg ) {1.19 + case AICA_RTCEN:1.20 + MMIO_WRITE( AICARTC, reg, val&0x01 );1.21 + break;1.22 + case AICA_RTCLO:1.23 + if( MMIO_READ( AICARTC, AICA_RTCEN ) & 0x01 ) {1.24 + aica_time_of_day = (aica_time_of_day & 0xFFFF0000) | (val & 0xFFFF);1.25 + }1.26 + break;1.27 + case AICA_RTCHI:1.28 + if( MMIO_READ( AICARTC, AICA_RTCEN ) & 0x01 ) {1.29 + aica_time_of_day = (aica_time_of_day & 0xFFFF) | (val<<16);1.30 + MMIO_WRITE( AICARTC, AICA_RTCEN, 0 );1.31 + }1.32 + break;1.33 + }1.34 +}1.35 +1.36 /**1.37 * Translate the channel frequency to a sample rate. The frequency is a1.38 * 14-bit floating point number, where bits 0..9 is the mantissa,
.