Search
lxdream.org :: lxdream/src/sh4/sh4dasm.c :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/sh4/sh4dasm.c
changeset 54:d8b73031289c
prev43:0cf3e339cc59
next302:96b5cc24309c
author nkeynes
date Wed Jan 03 09:00:17 2007 +0000 (17 years ago)
permissions -rw-r--r--
last change Adjust timers when they're read rather than waiting until the next time
slice. Also temporarily cut the CPU time by 4.
Initialize the FRQCR register to 0x0E0A for convenience
file annotate diff log raw
1.1 --- a/src/sh4/sh4dasm.c Mon Dec 26 11:47:15 2005 +0000
1.2 +++ b/src/sh4/sh4dasm.c Wed Jan 03 09:00:17 2007 +0000
1.3 @@ -1,5 +1,5 @@
1.4 /**
1.5 - * $Id: sh4dasm.c,v 1.8 2005-12-26 11:47:15 nkeynes Exp $
1.6 + * $Id: sh4dasm.c,v 1.9 2006-01-01 08:08:40 nkeynes Exp $
1.7 *
1.8 * SH4 CPU definition and disassembly functions
1.9 *
1.10 @@ -380,16 +380,19 @@
1.11 }
1.12
1.13
1.14 -void sh4_disasm_region( FILE *f, int from, int to, int load_addr )
1.15 +void sh4_disasm_region( const gchar *filename, int from, int to )
1.16 {
1.17 int pc;
1.18 char buf[80];
1.19 char opcode[16];
1.20 + FILE *f;
1.21
1.22 + f = fopen( filename, "w" );
1.23 for( pc = from; pc < to; pc+=2 ) {
1.24 buf[0] = '\0';
1.25 sh4_disasm_instruction( pc,
1.26 buf, sizeof(buf), opcode );
1.27 - fprintf( f, " %08x: %s %s\n", pc + load_addr, opcode, buf );
1.28 + fprintf( f, " %08x: %s %s\n", pc, opcode, buf );
1.29 }
1.30 + fclose(f);
1.31 }
.