1.1 --- a/src/aica/armmem.c Sun Dec 12 07:44:09 2004 +0000
1.2 +++ b/src/aica/armmem.c Sun Dec 11 12:00:28 2005 +0000
1.8 +char *arm_mem = NULL;
1.10 void arm_mem_init() {
1.12 + arm_mem = mem_get_region_by_name( MEM_REGION_AUDIO );
1.16 -uint32_t arm_mem_read_long( uint32_t addr ) {
1.17 +int32_t arm_read_long( uint32_t addr ) {
1.18 + if( addr < 0x00200000 ) {
1.19 + return *(int32_t *)(arm_mem + addr);
1.20 + /* Main sound ram */
1.21 + } else if( addr >= 0x00800000 && addr <= 0x00803000 ) {
1.22 + /* Sound registers / scratch ram */
1.24 + /* Undefined memory */
1.25 + ERROR( "Attempted long read to undefined page: %08X",
1.31 -uint32_t arm_mem_read_byte( uint32_t addr ) {
1.32 +int16_t arm_read_word( uint32_t addr ) {
1.33 + if( addr < 0x00200000 ) {
1.34 + return *(int16_t *)(arm_mem + addr);
1.35 + /* Main sound ram */
1.37 + /* Undefined memory */
1.38 + ERROR( "Attempted word read to undefined page: %08X",
1.45 -uint32_t arm_mem_read_long_user( uint32_t addr ) {
1.46 +int8_t arm_read_byte( uint32_t addr ) {
1.47 + if( addr < 0x00200000 ) {
1.48 + return *(int8_t *)(arm_mem + addr);
1.49 + /* Main sound ram */
1.51 + /* Undefined memory */
1.52 + ERROR( "Attempted byte read to undefined page: %08X",
1.58 -uint32_t arm_mem_read_byte_user( uint32_t addr ) {
1.59 +uint32_t arm_read_long_user( uint32_t addr ) {
1.63 +uint32_t arm_read_byte_user( uint32_t addr ) {