Search
lxdream.org :: lxdream/src/test/testsh4x86.c :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/test/testsh4x86.c
changeset 929:fd8cb0c82f5f
prev925:7cbcc51db63d
next930:07e5b11419db
author nkeynes
date Sat Dec 20 03:01:40 2008 +0000 (11 years ago)
branchlxdream-mem
permissions -rw-r--r--
last change First pass experiment using cached decoding.
file annotate diff log raw
1.1 --- a/src/test/testsh4x86.c Sun Dec 14 06:36:49 2008 +0000
1.2 +++ b/src/test/testsh4x86.c Sat Dec 20 03:01:40 2008 +0000
1.3 @@ -85,6 +85,14 @@
1.4 {
1.5 return *(uint32_t *)(inbuf+(addr-start_addr));
1.6 }
1.7 +mem_region_fn_t FASTCALL sh7750_decode_address( sh4addr_t address )
1.8 +{
1.9 + return NULL;
1.10 +}
1.11 +void FASTCALL sh7750_decode_address_copy( sh4addr_t address, mem_region_fn_t out )
1.12 +{
1.13 +}
1.14 +
1.15 // Stubs
1.16 gboolean sh4_execute_instruction( ) { return TRUE; }
1.17 void sh4_accept_interrupt() {}
1.18 @@ -175,6 +183,8 @@
1.19 mmio_region_MMU.mem = malloc(4096);
1.20 memset( mmio_region_MMU.mem, 0, 4096 );
1.21
1.22 + ((uint32_t *)mmio_region_MMU.mem)[4] = 1;
1.23 +
1.24 in = fopen( input_file, "ro" );
1.25 if( in == NULL ) {
1.26 perror( "Unable to open input file" );
1.27 @@ -198,7 +208,7 @@
1.28 char buf[256];
1.29 char op[256];
1.30 uintptr_t pc2 = x86_disasm_instruction( pc, buf, sizeof(buf), op );
1.31 - fprintf( stdout, "%s\n", buf );
1.32 + fprintf( stdout, "%08x: %s\n", pc, buf );
1.33 pc = pc2;
1.34 }
1.35 return 0;
.