Search
lxdream.org :: lxdream/src/mem.h :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/mem.h
changeset 422:61a0598e07ff
prev234:8759d0067e9d
next430:467519b050f4
author nkeynes
date Sat Oct 06 09:03:24 2007 +0000 (13 years ago)
permissions -rw-r--r--
last change Fix compilation warnings
file annotate diff log raw
1.1 --- a/src/mem.h Tue Dec 12 09:18:47 2006 +0000
1.2 +++ b/src/mem.h Sat Oct 06 09:03:24 2007 +0000
1.3 @@ -1,5 +1,5 @@
1.4 /**
1.5 - * $Id: mem.h,v 1.11 2006-12-12 09:18:44 nkeynes Exp $
1.6 + * $Id: mem.h,v 1.12 2007-10-06 08:59:42 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 @@ -30,7 +30,7 @@
1.11 typedef struct mem_region {
1.12 uint32_t base;
1.13 uint32_t size;
1.14 - char *name;
1.15 + const char *name;
1.16 char *mem;
1.17 int flags;
1.18 } *mem_region_t;
1.19 @@ -45,16 +45,13 @@
1.20 #define MEM_REGION_AUDIO_SCRATCH "Audio Scratch RAM"
1.21 #define MEM_REGION_FLASH "System Flash"
1.22
1.23 -#define MB * (1024 * 1024)
1.24 -#define KB * 1024
1.25 -
1.26 -void *mem_create_ram_region( uint32_t base, uint32_t size, char *name );
1.27 -void *mem_create_repeating_ram_region( uint32_t base, uint32_t size, char *name,
1.28 +void *mem_create_ram_region( uint32_t base, uint32_t size, const char *name );
1.29 +void *mem_create_repeating_ram_region( uint32_t base, uint32_t size, const char *name,
1.30 uint32_t repeat_offset, uint32_t last_repeat );
1.31 -void *mem_load_rom( char *name, uint32_t base, uint32_t size, uint32_t crc );
1.32 +void *mem_load_rom( const gchar *name, uint32_t base, uint32_t size, uint32_t crc );
1.33 void *mem_alloc_pages( int n );
1.34 char *mem_get_region( uint32_t addr );
1.35 -char *mem_get_region_by_name( char *name );
1.36 +char *mem_get_region_by_name( const char *name );
1.37 int mem_has_page( uint32_t addr );
1.38 char *mem_get_page( uint32_t addr );
1.39 int mem_load_block( const gchar *filename, uint32_t base, uint32_t size );
1.40 @@ -62,6 +59,8 @@
1.41 void mem_set_trace( uint32_t addr, int flag );
1.42 void mem_init( void );
1.43 void mem_reset( void );
1.44 +void mem_copy_from_sh4( char *dest, sh4addr_t src, size_t count );
1.45 +void mem_copy_to_sh4( sh4addr_t dest, char *src, size_t count );
1.46
1.47 #define ENABLE_DEBUG_MODE 1
1.48
1.49 @@ -90,8 +89,6 @@
1.50 void mem_delete_watch( watch_point_t watch );
1.51 watch_point_t mem_is_watched( uint32_t addr, int size, int op );
1.52
1.53 -typedef uint32_t sh4addr_t;
1.54 -
1.55 extern char **page_map;
1.56 #ifdef __cplusplus
1.57 }
.