Search
lxdream.org :: lxdream/src/mem.c :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/mem.c
changeset 477:9a373f2ff009
prev466:a6935f46ed78
next480:d28c2992f5ee
author nkeynes
date Wed Oct 31 09:10:23 2007 +0000 (13 years ago)
permissions -rw-r--r--
last change Add save/restore of render buffers in save states
Gzip memory blocks in save states
Move front-buffer management back to pvr2
Add screenshot preview when loading save states
Various minor fixes and cleanups
file annotate diff log raw
1.1 --- a/src/mem.c Sat Oct 27 05:47:55 2007 +0000
1.2 +++ b/src/mem.c Wed Oct 31 09:10:23 2007 +0000
1.3 @@ -1,5 +1,5 @@
1.4 /**
1.5 - * $Id: mem.c,v 1.17 2007-10-27 05:47:55 nkeynes Exp $
1.6 + * $Id: mem.c,v 1.18 2007-10-31 09:10:23 nkeynes Exp $
1.7 * mem.c is responsible for creating and maintaining the overall system memory
1.8 * map, as visible from the SH4 processor.
1.9 *
1.10 @@ -99,7 +99,7 @@
1.11 fwrite( &mem_rgn[i].flags, sizeof(int), 1, f );
1.12 fwrite( &mem_rgn[i].size, sizeof(uint32_t), 1, f );
1.13 if( mem_rgn[i].flags != MEM_FLAG_ROM )
1.14 - fwrite( mem_rgn[i].mem, mem_rgn[i].size, 1, f );
1.15 + fwrite_gzip( mem_rgn[i].mem, mem_rgn[i].size, 1, f );
1.16 }
1.17
1.18 /* All MMIO regions */
1.19 @@ -109,7 +109,7 @@
1.20 fwrite( &io_rgn[i]->base, sizeof( uint32_t ), 1, f );
1.21 len = 4096;
1.22 fwrite( &len, sizeof(len), 1, f );
1.23 - fwrite( io_rgn[i]->mem, len, 1, f );
1.24 + fwrite_gzip( io_rgn[i]->mem, len, 1, f );
1.25 }
1.26 }
1.27
1.28 @@ -138,7 +138,7 @@
1.29 return -1;
1.30 }
1.31 if( flags != MEM_FLAG_ROM )
1.32 - fread( mem_rgn[i].mem, size, 1, f );
1.33 + fread_gzip( mem_rgn[i].mem, size, 1, f );
1.34 }
1.35
1.36 /* All MMIO regions */
1.37 @@ -155,7 +155,7 @@
1.38 ERROR( "Bad MMIO region %d %s", i, tmp );
1.39 return -1;
1.40 }
1.41 - fread( io_rgn[i]->mem, size, 1, f );
1.42 + fread_gzip( io_rgn[i]->mem, size, 1, f );
1.43 }
1.44 return 0;
1.45 }
.