Search
lxdream.org :: lxdream/src/mem.h :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/mem.h
changeset 146:f91fa34ab219
prev101:5a22f3699b67
next156:3b93648a3b07
author nkeynes
date Tue May 23 13:10:28 2006 +0000 (17 years ago)
permissions -rw-r--r--
last change Add texcache invalidates on direct writes to 64-bit vram.
Technically we should do it on direct writes to 32-bit vram as well, but
noone (sane) is going to try to write a texture there...
file annotate diff log raw
1.1 --- a/src/mem.h Mon Mar 13 12:37:06 2006 +0000
1.2 +++ b/src/mem.h Tue May 23 13:10:28 2006 +0000
1.3 @@ -1,5 +1,5 @@
1.4 /**
1.5 - * $Id: mem.h,v 1.7 2006-03-13 12:37:06 nkeynes Exp $
1.6 + * $Id: mem.h,v 1.8 2006-05-20 02:38:58 nkeynes Exp $
1.7 *
1.8 * mem is responsible for creating and maintaining the overall system memory
1.9 * map, as visible from the SH4 processor. (Note the ARM has a different map)
1.10 @@ -21,6 +21,7 @@
1.11 #define dream_mem_H
1.12
1.13 #include <stdint.h>
1.14 +#include "dream.h"
1.15
1.16 #ifdef __cplusplus
1.17 extern "C" {
1.18 @@ -41,17 +42,22 @@
1.19 #define MEM_REGION_VIDEO "Video RAM"
1.20 #define MEM_REGION_AUDIO "Audio RAM"
1.21 #define MEM_REGION_AUDIO_SCRATCH "Audio Scratch RAM"
1.22 +#define MEM_REGION_FLASH "System Flash"
1.23
1.24 #define MB * (1024 * 1024)
1.25 #define KB * 1024
1.26
1.27 void *mem_create_ram_region( uint32_t base, uint32_t size, char *name );
1.28 +void *mem_create_repeating_ram_region( uint32_t base, uint32_t size, char *name,
1.29 + uint32_t repeat_offset, uint32_t last_repeat );
1.30 void *mem_load_rom( char *name, uint32_t base, uint32_t size, uint32_t crc );
1.31 void *mem_alloc_pages( int n );
1.32 char *mem_get_region( uint32_t addr );
1.33 char *mem_get_region_by_name( char *name );
1.34 int mem_has_page( uint32_t addr );
1.35 char *mem_get_page( uint32_t addr );
1.36 +int mem_load_block( const gchar *filename, uint32_t base, uint32_t size );
1.37 +int mem_save_block( const gchar *filename, uint32_t base, uint32_t size );
1.38
1.39 void mem_init( void );
1.40 void mem_reset( void );
.