Search
lxdream.org :: lxdream/src/test/testsh4x86.c :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/test/testsh4x86.c
changeset 586:2a3ba82cf243
prev550:a27e31340147
next602:a3aae8cbd1d7
author nkeynes
date Tue Jan 15 20:50:23 2008 +0000 (12 years ago)
permissions -rw-r--r--
last change Merged lxdream-mmu r570:596 to trunk
file annotate diff log raw
1.1 --- a/src/test/testsh4x86.c Thu Dec 06 10:43:30 2007 +0000
1.2 +++ b/src/test/testsh4x86.c Tue Jan 15 20:50:23 2008 +0000
1.3 @@ -1,5 +1,5 @@
1.4 /**
1.5 - * $Id: testsh4x86.c,v 1.6 2007-11-08 10:49:16 nkeynes Exp $
1.6 + * $Id$
1.7 *
1.8 * Test cases for the SH4 => x86 translator core. Takes as
1.9 * input a binary SH4 object (and VMA), generates the
1.10 @@ -25,6 +25,11 @@
1.11 #include "x86dasm/x86dasm.h"
1.12 #include "sh4/sh4trans.h"
1.13 #include "sh4/sh4core.h"
1.14 +#include "sh4/sh4mmio.h"
1.15 +
1.16 +struct mmio_region mmio_region_MMU;
1.17 +struct breakpoint_struct sh4_breakpoints[MAX_BREAKPOINTS];
1.18 +int sh4_breakpoint_count = 0;
1.19
1.20 #define MAX_INS_SIZE 32
1.21
1.22 @@ -36,6 +41,7 @@
1.23 char *output_file = NULL;
1.24 uint32_t start_addr = 0x8C010000;
1.25 uint32_t sh4_cpu_period = 5;
1.26 +sh4ptr_t sh4_main_ram;
1.27 FILE *in;
1.28
1.29 char *inbuf;
1.30 @@ -64,30 +70,32 @@
1.31 // Stubs
1.32 gboolean sh4_execute_instruction( ) { }
1.33 void sh4_accept_interrupt() {}
1.34 -void sh4_set_breakpoint( uint32_t pc, int type ) { }
1.35 -gboolean sh4_clear_breakpoint( uint32_t pc, int type ) { }
1.36 +void sh4_set_breakpoint( uint32_t pc, breakpoint_type_t type ) { }
1.37 +gboolean sh4_clear_breakpoint( uint32_t pc, breakpoint_type_t type ) { }
1.38 +gboolean sh4_is_using_xlat() { return TRUE; }
1.39 int sh4_get_breakpoint( uint32_t pc ) { }
1.40 void event_execute() {}
1.41 void TMU_run_slice( uint32_t nanos ) {}
1.42 void SCIF_run_slice( uint32_t nanos ) {}
1.43 -void MMU_ldtlb(void) {}
1.44 void sh4_write_byte( uint32_t addr, uint32_t val ) {}
1.45 void sh4_write_word( uint32_t addr, uint32_t val ) {}
1.46 void sh4_write_long( uint32_t addr, uint32_t val ) {}
1.47 -void sh4_flush_store_queue( uint32_t addr ) {}
1.48 +void mem_copy_to_sh4( sh4addr_t addr, sh4ptr_t src, size_t size ) { }
1.49 void sh4_write_sr( uint32_t val ) { }
1.50 void syscall_invoke( uint32_t val ) { }
1.51 +void dreamcast_stop() {}
1.52 +void dreamcast_reset() {}
1.53 uint32_t sh4_read_sr( void ) { }
1.54 +gboolean sh4_raise_reset( int exc ) {}
1.55 gboolean sh4_raise_exception( int exc ) {}
1.56 +gboolean sh4_raise_tlb_exception( int exc ) {}
1.57 gboolean sh4_raise_trap( int exc ) {}
1.58 void sh4_sleep() { }
1.59 void sh4_fsca( uint32_t angle, float *fr ) { }
1.60 void sh4_ftrv( float *fv, float *xmtrx ) { }
1.61 void signsat48(void) { }
1.62 -uint16_t *sh4_icache = NULL;
1.63 -uint32_t sh4_icache_addr = 0;
1.64 gboolean gui_error_dialog( const char *fmt, ... ) { }
1.65 -
1.66 +struct sh4_icache_struct sh4_icache;
1.67
1.68 void usage()
1.69 {
.