Search
lxdream.org :: lxdream/src/mem.h :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/mem.h
changeset 502:c4ecae2b1b5e
prev477:9a373f2ff009
next510:41ce7a074f4e
author nkeynes
date Thu Nov 08 11:54:16 2007 +0000 (12 years ago)
permissions -rw-r--r--
last change Add sh4ptr_t type, start converting bare pointer refs to it
file annotate diff log raw
1.1 --- a/src/mem.h Wed Oct 31 09:10:23 2007 +0000
1.2 +++ b/src/mem.h Thu Nov 08 11:54:16 2007 +0000
1.3 @@ -1,5 +1,5 @@
1.4 /**
1.5 - * $Id: mem.h,v 1.15 2007-10-31 09:10:23 nkeynes Exp $
1.6 + * $Id: mem.h,v 1.16 2007-11-08 11:54:16 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 @@ -31,7 +31,7 @@
1.11 uint32_t base;
1.12 uint32_t size;
1.13 const char *name;
1.14 - char *mem;
1.15 + sh4ptr_t mem;
1.16 int flags;
1.17 } *mem_region_t;
1.18
1.19 @@ -51,17 +51,17 @@
1.20 void *mem_load_rom( const gchar *name, uint32_t base, uint32_t size, uint32_t crc,
1.21 const gchar *region_name );
1.22 void *mem_alloc_pages( int n );
1.23 -char *mem_get_region( uint32_t addr );
1.24 -char *mem_get_region_by_name( const char *name );
1.25 +sh4ptr_t mem_get_region( uint32_t addr );
1.26 +sh4ptr_t mem_get_region_by_name( const char *name );
1.27 int mem_has_page( uint32_t addr );
1.28 -char *mem_get_page( uint32_t addr );
1.29 +sh4ptr_t mem_get_page( uint32_t addr );
1.30 int mem_load_block( const gchar *filename, uint32_t base, uint32_t size );
1.31 int mem_save_block( const gchar *filename, uint32_t base, uint32_t size );
1.32 void mem_set_trace( uint32_t addr, int flag );
1.33 void mem_init( void );
1.34 void mem_reset( void );
1.35 -void mem_copy_from_sh4( unsigned char *dest, sh4addr_t src, size_t count );
1.36 -void mem_copy_to_sh4( sh4addr_t dest, unsigned char *src, size_t count );
1.37 +void mem_copy_from_sh4( sh4ptr_t dest, sh4addr_t src, size_t count );
1.38 +void mem_copy_to_sh4( sh4addr_t dest, sh4ptr_t src, size_t count );
1.39
1.40 #define ENABLE_DEBUG_MODE 1
1.41
1.42 @@ -90,7 +90,7 @@
1.43 void mem_delete_watch( watch_point_t watch );
1.44 watch_point_t mem_is_watched( uint32_t addr, int size, int op );
1.45
1.46 -extern char **page_map;
1.47 +extern sh4ptr_t *page_map;
1.48 #ifdef __cplusplus
1.49 }
1.50 #endif
.