Search
lxdream.org :: lxdream/src/sh4/sh4core.c :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/sh4/sh4core.c
changeset 10:c898b37506e0
prev9:2784c7660165
next15:5194dd0fdb60
author nkeynes
date Sun Dec 11 05:15:36 2005 +0000 (14 years ago)
permissions -rw-r--r--
last change Add CPU disasembly options to mode dropdown
Split sh4/mem.c into core mem.c and sh4/mem.c
Start adding copyright comments to file headers
file annotate diff log raw
1.1 --- a/src/sh4/sh4core.c Thu Dec 08 13:38:00 2005 +0000
1.2 +++ b/src/sh4/sh4core.c Sun Dec 11 05:15:36 2005 +0000
1.3 @@ -12,6 +12,7 @@
1.4 void sh4_init(void)
1.5 {
1.6 register_io_regions( mmio_list_sh4mmio );
1.7 + mmu_init();
1.8 }
1.9
1.10 void sh4_reset(void)
1.11 @@ -95,22 +96,22 @@
1.12 } \
1.13 return; } while(0)
1.14
1.15 -#define MEM_READ_BYTE( addr ) mem_read_byte(addr)
1.16 -#define MEM_READ_WORD( addr ) mem_read_word(addr)
1.17 -#define MEM_READ_LONG( addr ) mem_read_long(addr)
1.18 -#define MEM_WRITE_BYTE( addr, val ) mem_write_byte(addr, val)
1.19 -#define MEM_WRITE_WORD( addr, val ) mem_write_word(addr, val)
1.20 -#define MEM_WRITE_LONG( addr, val ) mem_write_long(addr, val)
1.21 +#define MEM_READ_BYTE( addr ) sh4_read_byte(addr)
1.22 +#define MEM_READ_WORD( addr ) sh4_read_word(addr)
1.23 +#define MEM_READ_LONG( addr ) sh4_read_long(addr)
1.24 +#define MEM_WRITE_BYTE( addr, val ) sh4_write_byte(addr, val)
1.25 +#define MEM_WRITE_WORD( addr, val ) sh4_write_word(addr, val)
1.26 +#define MEM_WRITE_LONG( addr, val ) sh4_write_long(addr, val)
1.27
1.28 #define MEM_FP_READ( addr, reg ) if( IS_FPU_DOUBLESIZE() ) { \
1.29 - ((uint32_t *)FR)[(reg)&0xE0] = mem_read_long(addr); \
1.30 - ((uint32_t *)FR)[(reg)|1] = mem_read_long(addr+4); \
1.31 -} else ((uint32_t *)FR)[reg] = mem_read_long(addr)
1.32 + ((uint32_t *)FR)[(reg)&0xE0] = sh4_read_long(addr); \
1.33 + ((uint32_t *)FR)[(reg)|1] = sh4_read_long(addr+4); \
1.34 +} else ((uint32_t *)FR)[reg] = sh4_read_long(addr)
1.35
1.36 #define MEM_FP_WRITE( addr, reg ) if( IS_FPU_DOUBLESIZE() ) { \
1.37 - mem_write_long( addr, ((uint32_t *)FR)[(reg)&0xE0] ); \
1.38 - mem_write_long( addr+4, ((uint32_t *)FR)[(reg)|1] ); \
1.39 -} else mem_write_long( addr, ((uint32_t *)FR)[reg] )
1.40 + sh4_write_long( addr, ((uint32_t *)FR)[(reg)&0xE0] ); \
1.41 + sh4_write_long( addr+4, ((uint32_t *)FR)[(reg)|1] ); \
1.42 +} else sh4_write_long( addr, ((uint32_t *)FR)[reg] )
1.43
1.44 #define FP_WIDTH (IS_FPU_DOUBLESIZE() ? 8 : 4)
1.45
.