Search
lxdream.org :: lxdream/src/sh4/sh4mem.c :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/sh4/sh4mem.c
changeset 130:279acbacc298
prev103:9b9cfc5855e0
next137:41907543d890
author nkeynes
date Thu Mar 30 11:26:45 2006 +0000 (14 years ago)
permissions -rw-r--r--
last change Treat the 0x11000000 region as write-only texture ram (appears to be correct)
file annotate diff log raw
1.1 --- a/src/sh4/sh4mem.c Mon Mar 13 12:39:07 2006 +0000
1.2 +++ b/src/sh4/sh4mem.c Thu Mar 30 11:26:45 2006 +0000
1.3 @@ -1,5 +1,5 @@
1.4 /**
1.5 - * $Id: sh4mem.c,v 1.8 2006-03-13 12:39:07 nkeynes Exp $
1.6 + * $Id: sh4mem.c,v 1.9 2006-03-30 11:26:45 nkeynes Exp $
1.7 * sh4mem.c is responsible for the SH4's access to memory (including memory
1.8 * mapped I/O), using the page maps created in mem.c
1.9 *
1.10 @@ -219,7 +219,8 @@
1.11 sh4_write_p4( addr, val );
1.12 return;
1.13 }
1.14 - if( (addr&0x1F800000) == 0x04000000 ) {
1.15 + if( (addr&0x1F800000) == 0x04000000 ||
1.16 + (addr&0x1F800000) == 0x11000000 ) {
1.17 addr = TRANSLATE_VIDEO_64BIT_ADDRESS(addr);
1.18 }
1.19
1.20 @@ -256,7 +257,8 @@
1.21 sh4_write_p4( addr, (int16_t)val );
1.22 return;
1.23 }
1.24 - if( (addr&0x1F800000) == 0x04000000 ) {
1.25 + if( (addr&0x1F800000) == 0x04000000 ||
1.26 + (addr&0x1F800000) == 0x11000000 ) {
1.27 addr = TRANSLATE_VIDEO_64BIT_ADDRESS(addr);
1.28 }
1.29 if( IS_MMU_ENABLED() ) {
1.30 @@ -287,7 +289,8 @@
1.31 sh4_write_p4( addr, (int8_t)val );
1.32 return;
1.33 }
1.34 - if( (addr&0x1F800000) == 0x04000000 ) {
1.35 + if( (addr&0x1F800000) == 0x04000000 ||
1.36 + (addr&0x1F800000) == 0x11000000 ) {
1.37 addr = TRANSLATE_VIDEO_64BIT_ADDRESS(addr);
1.38 }
1.39
1.40 @@ -328,9 +331,10 @@
1.41 }
1.42
1.43 void mem_copy_to_sh4( uint32_t destaddr, char *src, size_t count ) {
1.44 - if( destaddr >= 0x10000000 && destaddr < 0x20000000 ) {
1.45 + if( destaddr >= 0x10000000 && destaddr < 0x11000000 ) {
1.46 pvr2_ta_write( src, count );
1.47 - } else if( destaddr >= 0x04000000 && destaddr < 0x05000000 ) {
1.48 + } else if( destaddr >= 0x04000000 && destaddr < 0x05000000 ||
1.49 + destaddr >= 0x11000000 && destaddr < 0x12000000 ) {
1.50 pvr2_vram64_write( destaddr, src, count );
1.51 } else {
1.52 char *dest = mem_get_region(destaddr);
.