Search
lxdream.org :: lxdream/src/aica/armmem.c :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/aica/armmem.c
changeset 811:7ff871670e58
prev736:a02d1475ccfd
next931:430048ea8b71
next953:f4a156508ad1
author nkeynes
date Fri Oct 10 00:10:26 2008 +0000 (15 years ago)
permissions -rw-r--r--
last change Tidy up texcache render-buffer allocation slightly
file annotate diff log raw
1.1 --- a/src/aica/armmem.c Mon Jul 14 07:44:42 2008 +0000
1.2 +++ b/src/aica/armmem.c Fri Oct 10 00:10:26 2008 +0000
1.3 @@ -20,6 +20,7 @@
1.4 #include "dream.h"
1.5 #include "mem.h"
1.6 #include "aica.h"
1.7 +#include "armcore.h"
1.8
1.9 unsigned char *arm_mem = NULL;
1.10 unsigned char *arm_mem_scratch = NULL;
1.11 @@ -58,8 +59,8 @@
1.12 return *(int32_t *)(arm_mem_scratch + addr - 0x00803000);
1.13 }
1.14 }
1.15 - ERROR( "Attempted long read to undefined page: %08X",
1.16 - addr );
1.17 + ERROR( "Attempted long read to undefined page: %08X at %08X",
1.18 + addr, armr.r[15] );
1.19 /* Undefined memory */
1.20 return 0;
1.21 }
1.22 @@ -119,7 +120,14 @@
1.23 return val; // Can't happen, but make gcc happy
1.24 }
1.25 }
1.26 -
1.27 +void arm_write_word( uint32_t addr, uint32_t value )
1.28 +{
1.29 + if( addr < 0x00200000 ) {
1.30 + *(uint16_t *)(arm_mem + addr) = (uint16_t)value;
1.31 + } else {
1.32 +
1.33 + }
1.34 +}
1.35 void arm_write_byte( uint32_t addr, uint32_t value )
1.36 {
1.37 if( addr < 0x00200000 ) {
.