Search
lxdream.org :: lxdream/src/sh4/sh4mem.c :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/sh4/sh4mem.c
changeset 165:126794f2ea6d
prev156:3b93648a3b07
next172:59cf18b4cfb2
author nkeynes
date Sun Jun 18 12:01:06 2006 +0000 (14 years ago)
permissions -rw-r--r--
last change Invalidate render buffers on writes to vram
file annotate diff log raw
1.1 --- a/src/sh4/sh4mem.c Thu Jun 15 10:25:45 2006 +0000
1.2 +++ b/src/sh4/sh4mem.c Sun Jun 18 12:01:06 2006 +0000
1.3 @@ -1,5 +1,5 @@
1.4 /**
1.5 - * $Id: sh4mem.c,v 1.12 2006-06-15 10:25:45 nkeynes Exp $
1.6 + * $Id: sh4mem.c,v 1.13 2006-06-18 12:01:06 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 @@ -230,6 +230,9 @@
1.11 (addr&0x1F800000) == 0x11000000 ) {
1.12 texcache_invalidate_page(addr& 0x7FFFFF);
1.13 addr = TRANSLATE_VIDEO_64BIT_ADDRESS(addr);
1.14 + pvr2_render_invalidate(addr);
1.15 + } else if( (addr&0x1F800000) == 0x05000000 ) {
1.16 + pvr2_render_invalidate(addr);
1.17 }
1.18
1.19 if( IS_MMU_ENABLED() ) {
1.20 @@ -275,6 +278,9 @@
1.21 (addr&0x1F800000) == 0x11000000 ) {
1.22 texcache_invalidate_page(addr& 0x7FFFFF);
1.23 addr = TRANSLATE_VIDEO_64BIT_ADDRESS(addr);
1.24 + pvr2_render_invalidate(addr);
1.25 + } else if( (addr&0x1F800000) == 0x05000000 ) {
1.26 + pvr2_render_invalidate(addr);
1.27 }
1.28 if( IS_MMU_ENABLED() ) {
1.29 ERROR( "user-mode & mmu translation not implemented, aborting", NULL );
1.30 @@ -308,6 +314,9 @@
1.31 (addr&0x1F800000) == 0x11000000 ) {
1.32 texcache_invalidate_page(addr& 0x7FFFFF);
1.33 addr = TRANSLATE_VIDEO_64BIT_ADDRESS(addr);
1.34 + pvr2_render_invalidate(addr);
1.35 + } else if( (addr&0x1F800000) == 0x05000000 ) {
1.36 + pvr2_render_invalidate(addr);
1.37 }
1.38
1.39 if( IS_MMU_ENABLED() ) {
1.40 @@ -353,6 +362,8 @@
1.41 destaddr >= 0x11000000 && destaddr < 0x12000000 ) {
1.42 pvr2_vram64_write( destaddr, src, count );
1.43 } else {
1.44 + if( (destaddr & 0x1F800000) == 0x05000000 )
1.45 + pvr2_render_invalidate( destaddr );
1.46 char *dest = mem_get_region(destaddr);
1.47 if( dest == NULL )
1.48 ERROR( "Attempted block write to unknown address %08X", destaddr );
.