Search
lxdream.org :: lxdream :: r217:d0b3da720456
lxdream 0.9.1
released Jun 29
Download Now
changeset217:d0b3da720456
parent216:657ce4d3edd9
child218:cbad5a3f8387
authornkeynes
dateTue Aug 29 08:09:51 2006 +0000 (14 years ago)
Flush render buffer back to vram on read as well as write
src/sh4/sh4mem.c
1.1 --- a/src/sh4/sh4mem.c Sat Aug 19 01:51:16 2006 +0000
1.2 +++ b/src/sh4/sh4mem.c Tue Aug 29 08:09:51 2006 +0000
1.3 @@ -1,5 +1,5 @@
1.4 /**
1.5 - * $Id: sh4mem.c,v 1.14 2006-06-27 11:02:48 nkeynes Exp $
1.6 + * $Id: sh4mem.c,v 1.15 2006-08-29 08:09:51 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 @@ -126,6 +126,9 @@
1.11
1.12 if( (addr&0x1F800000) == 0x04000000 ) {
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 @@ -160,7 +163,11 @@
1.21
1.22 if( (addr&0x1F800000) == 0x04000000 ) {
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 +
1.29
1.30 if( IS_MMU_ENABLED() ) {
1.31 ERROR( "user-mode & mmu translation not implemented, aborting", NULL );
1.32 @@ -193,7 +200,11 @@
1.33 return SIGNEXT8(sh4_read_p4( addr ));
1.34 if( (addr&0x1F800000) == 0x04000000 ) {
1.35 addr = TRANSLATE_VIDEO_64BIT_ADDRESS(addr);
1.36 + pvr2_render_invalidate(addr);
1.37 + } else if( (addr&0x1F800000) == 0x05000000 ) {
1.38 + pvr2_render_invalidate(addr);
1.39 }
1.40 +
1.41
1.42 if( IS_MMU_ENABLED() ) {
1.43 ERROR( "user-mode & mmu translation not implemented, aborting", NULL );
.