--- hatari/src/uae-cpu/newcpu.c 2019/04/01 07:12:20 1.1.1.10 +++ hatari/src/uae-cpu/newcpu.c 2019/04/01 07:13:13 1.1.1.11 @@ -10,7 +10,7 @@ * This file is distributed under the GNU Public License, version 2 or at * your option any later version. Read the file gpl.txt for details. */ -char NewCpu_rcsid[] = "Hatari $Id: newcpu.c,v 1.1.1.10 2019/04/01 07:12:20 root Exp $"; +const char NewCpu_rcsid[] = "Hatari $Id: newcpu.c,v 1.1.1.11 2019/04/01 07:13:13 root Exp $"; #include "sysdeps.h" #include "hatari-glue.h" @@ -38,8 +38,8 @@ uaecptr last_addr_for_exception_3; /* Address that generated the exception */ uaecptr last_fault_for_exception_3; -int areg_byteinc[] = { 1,1,1,1,1,1,1,2 }; -int imm8_table[] = { 8,1,2,3,4,5,6,7 }; +const int areg_byteinc[] = { 1,1,1,1,1,1,1,2 }; +const int imm8_table[] = { 8,1,2,3,4,5,6,7 }; int movem_index1[256]; int movem_index2[256]; @@ -118,12 +118,12 @@ void build_cpufunctbl(void) { int i; unsigned long opcode; - struct cputbl *tbl = (cpu_level == 4 ? op_smalltbl_0_ff - : cpu_level == 3 ? op_smalltbl_1_ff - : cpu_level == 2 ? op_smalltbl_2_ff - : cpu_level == 1 ? op_smalltbl_3_ff - : ! cpu_compatible ? op_smalltbl_4_ff - : op_smalltbl_5_ff); + const struct cputbl *tbl = (cpu_level == 4 ? op_smalltbl_0_ff + : cpu_level == 3 ? op_smalltbl_1_ff + : cpu_level == 2 ? op_smalltbl_2_ff + : cpu_level == 1 ? op_smalltbl_3_ff + : ! cpu_compatible ? op_smalltbl_4_ff + : op_smalltbl_5_ff); Log_Printf(LOG_DEBUG, "Building CPU function table (%d %d %d).\n", cpu_level, cpu_compatible, address_space_24); @@ -1299,7 +1299,7 @@ static int do_specialties (void) if(regs.spcflags & SPCFLAG_EXTRA_CYCLES) { /* Add some extra cycles to simulate a wait state */ unset_special(SPCFLAG_EXTRA_CYCLES); - M68000_AddCycles(4); + M68000_AddCycles(nWaitStateCycles); } if (regs.spcflags & SPCFLAG_DOTRACE) { @@ -1504,7 +1504,7 @@ static void m68k_verify (uaecptr addr, u void m68k_disasm (FILE *f, uaecptr addr, uaecptr *nextpc, int cnt) { - static const char* ccnames[] = + static const char * const ccnames[] = { "T ","F ","HI","LS","CC","CS","NE","EQ", "VC","VS","PL","MI","GE","LT","GT","LE" }; @@ -1514,7 +1514,7 @@ void m68k_disasm (FILE *f, uaecptr addr, char instrname[20],*ccpt; int opwords; uae_u32 opcode; - struct mnemolookup *lookup; + const struct mnemolookup *lookup; struct instr *dp; fprintf (f, "%08lx: ", m68k_getpc () + m68kpc_offset); for (opwords = 0; opwords < 5; opwords++){