Changes for MAME 0.121u4.

This commit is contained in:
Aaron Giles 2007-12-17 16:41:39 +00:00
parent df34329a47
commit 507ca2d275
851 changed files with 3304 additions and 3309 deletions

View File

@ -877,6 +877,13 @@ Debugging options
reporting bugs, please run with mame -verbose and include the
resulting information. The default is OFF (-noverbose).
-[no]update_in_pause
Enables updating of the main screen bitmap while the game is paused.
This means that the VIDEO_UPDATE callback will be called repeatedly
during pause, which can be useful for debugging. The default is OFF
(-noupdate_in_pause).
-[no]debug
Activates the integrated debugger. This is available only if the

View File

@ -495,12 +495,16 @@ $(sort $(OBJDIRS)):
# executable targets and dependencies
#-------------------------------------------------
ifndef EXECUTABLE_DEFINED
$(EMULATOR): $(VERSIONOBJ) $(DRVLIBS) $(LIBOSD) $(LIBEMU) $(LIBCPU) $(LIBSOUND) $(LIBUTIL) $(EXPAT) $(ZLIB) $(LIBOCORE) $(RESFILE)
# always recompile the version string
$(CC) $(CDEFS) $(CFLAGS) -c $(SRC)/version.c -o $(VERSIONOBJ)
@echo Linking $@...
$(LD) $(LDFLAGS) $(LDFLAGSEMULATOR) $^ $(LIBS) -o $@
endif
#-------------------------------------------------

View File

@ -563,7 +563,7 @@ static INT32 menuItemInfoLength = 0;
static UINT32 cheatOptions = 2;
static const char * kCheatNameTemplates[] =
static const char *const kCheatNameTemplates[] =
{
"Infinite Credits",
"Infinite Time",
@ -724,14 +724,14 @@ static const UINT32 kPrefillValueTable[] =
0x01
};
static const char * kWatchLabelStringList[] =
static const char *const kWatchLabelStringList[] =
{
"None",
"Address",
"String"
};
static const char * kWatchDisplayTypeStringList[] =
static const char *const kWatchDisplayTypeStringList[] =
{
"Hex",
"Decimal",
@ -2827,7 +2827,7 @@ static int AddEditCheatMenu(int selection)
static int EditCheatMenu(CheatEntry * entry, int index, int selection)
{
static const char * kTypeNames[] =
static const char *const kTypeNames[] =
{
"Normal/Delay",
"Wait",
@ -2837,7 +2837,7 @@ static int EditCheatMenu(CheatEntry * entry, int index, int selection)
"Select"
};
static const char * kNumbersTable[] =
static const char *const kNumbersTable[] =
{
"0", "1", "2", "3", "4", "5", "6", "7",
"8", "9", "10", "11", "12", "13", "14", "15",
@ -2845,7 +2845,7 @@ static int EditCheatMenu(CheatEntry * entry, int index, int selection)
"24", "25", "26", "27", "28", "29", "30", "31"
};
static const char * kOperationNames[] =
static const char *const kOperationNames[] =
{
"Write",
"Add/Subtract",
@ -2857,19 +2857,19 @@ static int EditCheatMenu(CheatEntry * entry, int index, int selection)
"Null"
};
static const char * kAddSubtractNames[] =
static const char *const kAddSubtractNames[] =
{
"Add",
"Subtract"
};
static const char * kSetClearNames[] =
static const char *const kSetClearNames[] =
{
"Set",
"Clear"
};
static const char * kPrefillNames[] =
static const char *const kPrefillNames[] =
{
"None",
"FF",
@ -2877,13 +2877,13 @@ static int EditCheatMenu(CheatEntry * entry, int index, int selection)
"01"
};
static const char * kEndiannessNames[] =
static const char *const kEndiannessNames[] =
{
"Normal",
"Swap"
};
static const char * kRegionNames[] =
static const char *const kRegionNames[] =
{
"CPU1", "CPU2", "CPU3", "CPU4", "CPU5", "CPU6", "CPU7", "CPU8",
"GFX1", "GFX2", "GFX3", "GFX4", "GFX5", "GFX6", "GFX7", "GFX8",
@ -2892,7 +2892,7 @@ static int EditCheatMenu(CheatEntry * entry, int index, int selection)
"USER1", "USER2", "USER3", "USER4", "USER5", "USER6", "USER7", "USER8"
};
static const char * kLocationNames[] =
static const char *const kLocationNames[] =
{
"Normal",
"Region",
@ -2904,7 +2904,7 @@ static int EditCheatMenu(CheatEntry * entry, int index, int selection)
"Unused (7)"
};
static const char * kCustomLocationNames[] =
static const char *const kCustomLocationNames[] =
{
"Comment",
"EEPROM",
@ -2917,7 +2917,7 @@ static int EditCheatMenu(CheatEntry * entry, int index, int selection)
"Unused (28)", "Unused (29)", "Unused (30)", "Unused (31)"
};
static const char * kSizeNames[] =
static const char *const kSizeNames[] =
{
"8 Bit",
"16 Bit",
@ -5270,7 +5270,7 @@ static int DoSearchMenuMinimum(int selection)
static int DoSearchMenuClassic(int selection)
{
static const char * energyStrings[] =
static const char *const energyStrings[] =
{
"Less",
"Greater",
@ -5278,13 +5278,13 @@ static int DoSearchMenuClassic(int selection)
"Greater or Equal",
};
static const char * equalOrNotStrings[] =
static const char *const equalOrNotStrings[] =
{
"Equal",
"Not Equal",
};
static const char * operandStrings[] =
static const char *const operandStrings[] =
{
"Previous Data",
"First Data",
@ -5800,7 +5800,7 @@ static int DoSearchMenuClassic(int selection)
static int DoSearchMenu(int selection)
{
/* menu stirngs */
static const char * kOperandNameTable[] =
static const char *const kOperandNameTable[] =
{
"Current Data",
"Previous Data",
@ -5808,7 +5808,7 @@ static int DoSearchMenu(int selection)
"Value"
};
static const char * kComparisonNameTable[] =
static const char *const kComparisonNameTable[] =
{
"Less",
"Greater",
@ -5820,7 +5820,7 @@ static int DoSearchMenu(int selection)
"Near To"
};
static const char * kSearchByteNameTable[] =
static const char *const kSearchByteNameTable[] =
{
"1",
"2",
@ -6289,7 +6289,7 @@ static int DoSearchMenu(int selection)
static int SelectSearchRegions(int selection, SearchInfo * search)
{
static const char * kSearchSpeedList[] =
static const char *const kSearchSpeedList[] =
{
"Fast",
"Medium",
@ -7066,7 +7066,7 @@ static int EditWatch(WatchInfo * entry, int selection)
kMenu_Return
};
static const char * kWatchSizeStringList[] =
static const char *const kWatchSizeStringList[] =
{
"8 Bit",
"16 Bit",
@ -9246,7 +9246,7 @@ static int ConvertOldCode(int code, int cpu, int * data, int * extendData)
UINT8 customField;
};
static struct ConversionTable kConversionTable[] =
static const struct ConversionTable kConversionTable[] =
{
{ 0, 0x00000000, kCustomField_None },
{ 1, 0x00000001, kCustomField_None },
@ -9313,7 +9313,7 @@ static int ConvertOldCode(int code, int cpu, int * data, int * extendData)
{ -1, 0x00000000, kCustomField_End }
};
struct ConversionTable * traverse = kConversionTable;
const struct ConversionTable * traverse = kConversionTable;
UINT32 newCode;
UINT8 linkCheat = 0;

View File

@ -420,7 +420,7 @@ static void wr_topstack(INT32 val) { pc_stack_push_val(val & 0x3fff); }
#define WRITE_REG(grp,reg,val) ((*wr_reg[grp][reg])(val))
static void (*wr_reg[4][16])(INT32) =
static void (*const wr_reg[4][16])(INT32) =
{
{
wr_ax0, wr_ax1, wr_mx0, wr_mx1, wr_ay0, wr_ay1, wr_my0, wr_my1,
@ -681,7 +681,7 @@ INLINE UINT32 pgm_read_dag2(UINT32 op)
#define ALU_GETYREG_UNSIGNED(y) (*(UINT16 *)alu_yregs[y])
#define ALU_GETYREG_SIGNED(y) (*( INT16 *)alu_yregs[y])
static const void *alu_xregs[8] =
static const void *const alu_xregs[8] =
{
&adsp2100.core.ax0,
&adsp2100.core.ax1,
@ -693,7 +693,7 @@ static const void *alu_xregs[8] =
&adsp2100.core.sr.srx.sr1
};
static const void *alu_yregs[4] =
static const void *const alu_yregs[4] =
{
&adsp2100.core.ay0,
&adsp2100.core.ay1,
@ -712,7 +712,7 @@ static const void *alu_yregs[4] =
#define MAC_GETYREG_UNSIGNED(y) (*(UINT16 *)mac_yregs[y])
#define MAC_GETYREG_SIGNED(y) (*( INT16 *)mac_yregs[y])
static const void *mac_xregs[8] =
static const void *const mac_xregs[8] =
{
&adsp2100.core.mx0,
&adsp2100.core.mx1,
@ -724,7 +724,7 @@ static const void *mac_xregs[8] =
&adsp2100.core.sr.srx.sr1
};
static const void *mac_yregs[4] =
static const void *const mac_yregs[4] =
{
&adsp2100.core.my0,
&adsp2100.core.my1,
@ -741,7 +741,7 @@ static const void *mac_yregs[4] =
#define SHIFT_GETXREG_UNSIGNED(x) (*(UINT16 *)shift_xregs[x])
#define SHIFT_GETXREG_SIGNED(x) (*( INT16 *)shift_xregs[x])
static const void *shift_xregs[8] =
static const void *const shift_xregs[8] =
{
&adsp2100.core.si,
&adsp2100.core.si,

View File

@ -217,7 +217,7 @@ static void jsr_c(void);
static void jsr_c0(void);
static void trapf(void);
static void (*opcodetable[32][4])(void) =
static void (*const opcodetable[32][4])(void) =
{
{ trap0, trap0, trap0, trap0 },
{ NULL, NULL, NULL, NULL },
@ -253,7 +253,7 @@ static void (*opcodetable[32][4])(void) =
{ trapf, trapf, trapf, trapf }
};
static void (*conditiontable[16])(void) =
static void (*const conditiontable[16])(void) =
{
bsp, bmz, bgt, ble, bge, blt, bhi, bls,
bcc, bcs, bpl, bmi, bne, beq, bvc, bvs

View File

@ -308,7 +308,7 @@ OP(_0bf) { int tmp; H6280_CYCLES(4); RD_ZPG; BBS(3); } // 6/8 BBS3 ZPG,REL
OP(_0df) { int tmp; H6280_CYCLES(4); RD_ZPG; BBS(5); } // 6/8 BBS5 ZPG,REL
OP(_0ff) { int tmp; H6280_CYCLES(4); RD_ZPG; BBS(7); } // 6/8 BBS7 ZPG,REL
static void (*insnh6280[0x100])(void) = {
static void (*const insnh6280[0x100])(void) = {
h6280_000,h6280_001,h6280_002,h6280_003,h6280_004,h6280_005,h6280_006,h6280_007,
h6280_008,h6280_009,h6280_00a,h6280_00b,h6280_00c,h6280_00d,h6280_00e,h6280_00f,
h6280_010,h6280_011,h6280_012,h6280_013,h6280_014,h6280_015,h6280_016,h6280_017,

View File

@ -574,7 +574,7 @@ static const opcodeinfo hd6309_pg2opcodes[] =
{ 0xFB, 4, "ADDF", EXT }
};
static const opcodeinfo *hd6309_pgpointers[3] =
static const opcodeinfo *const hd6309_pgpointers[3] =
{
hd6309_pg0opcodes, hd6309_pg1opcodes, hd6309_pg2opcodes
};

View File

@ -1344,7 +1344,7 @@ INLINE void swi( void )
#define decodePB_dst(n) (((n) >> 0) & 0x07)
static UINT8 dummy_byte;
static unsigned char *regTable[4] = { &(CC), &(A), &(B), &dummy_byte };
static unsigned char *const regTable[4] = { &(CC), &(A), &(B), &dummy_byte };
static const UINT8 bitTable[] = { 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80 };

View File

@ -28,7 +28,7 @@ static unsigned EA_205(void) { i8086_ICount-=9; EO=FETCHOP; EO+=FETCHOP<<8; EO+=
static unsigned EA_206(void) { i8086_ICount-=9; EO=FETCHOP; EO+=FETCHOP<<8; EO+=I.regs.w[BP]; EA=DefaultBase(SS)+(WORD)EO; return EA; }
static unsigned EA_207(void) { i8086_ICount-=9; EO=FETCHOP; EO+=FETCHOP<<8; EO+=I.regs.w[BX]; EA=DefaultBase(DS)+(WORD)EO; return EA; }
static unsigned (*GetEA[192])(void)={
static unsigned (*const GetEA[192])(void)={
EA_000, EA_001, EA_002, EA_003, EA_004, EA_005, EA_006, EA_007,
EA_000, EA_001, EA_002, EA_003, EA_004, EA_005, EA_006, EA_007,
EA_000, EA_001, EA_002, EA_003, EA_004, EA_005, EA_006, EA_007,

View File

@ -350,7 +350,7 @@ INLINE void absd( void );
INLINE void opcode2( void );
static void (*konami_main[0x100])(void) = {
static void (*const konami_main[0x100])(void) = {
illegal,illegal,illegal,illegal,illegal,illegal,illegal,illegal, /* 00 */
opcode2,opcode2,opcode2,opcode2,pshs ,pshu ,puls ,pulu ,
lda_im ,ldb_im ,opcode2,opcode2,adda_im,addb_im,opcode2,opcode2, /* 10 */
@ -385,7 +385,7 @@ static void (*konami_main[0x100])(void) = {
illegal,illegal,illegal,illegal,illegal,illegal,illegal,illegal
};
static void (*konami_indexed[0x100])(void) = {
static void (*const konami_indexed[0x100])(void) = {
illegal,illegal,illegal,illegal,illegal,illegal,illegal,illegal, /* 00 */
leax ,leay ,leau ,leas ,illegal,illegal,illegal,illegal,
illegal,illegal,lda_ix ,ldb_ix ,illegal,illegal,adda_ix,addb_ix, /* 10 */
@ -420,7 +420,7 @@ static void (*konami_indexed[0x100])(void) = {
illegal,illegal,illegal,illegal,illegal,illegal,illegal,illegal
};
static void (*konami_direct[0x100])(void) = {
static void (*const konami_direct[0x100])(void) = {
illegal,illegal,illegal,illegal,illegal,illegal,illegal,illegal, /* 00 */
illegal,illegal,illegal,illegal,illegal,illegal,illegal,illegal,
illegal,illegal,lda_di ,ldb_di ,illegal,illegal,adda_di,addb_di, /* 10 */
@ -455,7 +455,7 @@ static void (*konami_direct[0x100])(void) = {
illegal,illegal,illegal,illegal,illegal,illegal,illegal,illegal
};
static void (*konami_extended[0x100])(void) = {
static void (*const konami_extended[0x100])(void) = {
illegal,illegal,illegal,illegal,illegal,illegal,illegal,illegal, /* 00 */
illegal,illegal,illegal,illegal,illegal,illegal,illegal,illegal,
illegal,illegal,lda_ex ,ldb_ex ,illegal,illegal,adda_ex,addb_ex, /* 10 */

View File

@ -426,7 +426,7 @@ static void m37710_recalc_timer(int timer)
switch (m37710i_cpu.m37710_regs[0x56+timer] & 0x3)
{
case 0: // timer mode
time = attotime_mul(ATTOTIME_IN_HZ(16000000), tscales[m37710i_cpu.m37710_regs[tcr[timer]]>>6]);
time = attotime_mul(ATTOTIME_IN_HZ(cpunum_get_clock(cpu_getactivecpu())), tscales[m37710i_cpu.m37710_regs[tcr[timer]]>>6]);
time = attotime_mul(time, tval + 1);
#if M37710_DEBUG
@ -461,7 +461,7 @@ static void m37710_recalc_timer(int timer)
switch (m37710i_cpu.m37710_regs[0x56+timer] & 0x3)
{
case 0: // timer mode
time = attotime_mul(ATTOTIME_IN_HZ(16000000), tscales[m37710i_cpu.m37710_regs[tcr[timer]]>>6]);
time = attotime_mul(ATTOTIME_IN_HZ(cpunum_get_clock(cpu_getactivecpu())), tscales[m37710i_cpu.m37710_regs[tcr[timer]]>>6]);
time = attotime_mul(time, tval + 1);
#if M37710_DEBUG

View File

@ -371,7 +371,7 @@ OP(7e_wdc) { int tmp; RD_ABX_P; RD_EA; ROR; WB_EA; } /* 6 ROR ABX page pena
OP(de_wdc) { int tmp; RD_ABX_P; RD_EA; DEC; WB_EA; } /* 6 DEC ABX page penalty */
OP(fe_wdc) { int tmp; RD_ABX_P; RD_EA; INC; WB_EA; } /* 6 INC ABX page penalty */
static void (*insnwdc65c02[0x100])(void) = {
static void (*const insnwdc65c02[0x100])(void) = {
m65c02_00,m65c02_01,m65c02_02,m65c02_03,m65c02_04,m65c02_05,m65c02_06,m65c02_07,
m65c02_08,m65c02_09,m65c02_0a,m65c02_0b,m65c02_0c,m65c02_0d,m65c02_0e,m65c02_0f,
m65c02_10,m65c02_11,m65c02_12,m65c02_13,m65c02_14,m65c02_15,m65c02_16,m65c02_17,

View File

@ -995,8 +995,8 @@ static void m68k_post_load(void)
void m68k_state_register(const char *type, int index)
{
/* Note, D covers A because the dar array is common, REG_A=REG_D+8 */
state_save_register_item_array(type, index, REG_D);
state_save_register_item_array(type, index, REG_A);
state_save_register_item(type, index, REG_PPC);
state_save_register_item(type, index, REG_PC);
state_save_register_item(type, index, REG_USP);

View File

@ -178,10 +178,6 @@ static const struct m68k_memory_interface interface_d32 =
};
/* global access */
struct m68k_memory_interface m68k_memory_intf;
static void set_irq_line(int irqline, int state)
{
if (irqline == INPUT_LINE_NMI)
@ -298,7 +294,7 @@ static offs_t m68008_dasm(char *buffer, offs_t pc, const UINT8 *oprom, const UIN
}
#endif /* MAME_DEBUG */
#endif
#endif /* HAS_M68008 */
/****************************************************************************
* M68010 section
@ -814,7 +810,7 @@ void m68008_get_info(UINT32 state, cpuinfo *info)
}
}
#endif
#endif /* HAS_M68008 */
/**************************************************************************
* CPU-specific set_info
@ -859,7 +855,7 @@ void m68010_get_info(UINT32 state, cpuinfo *info)
}
}
#endif
#endif /* HAS_M68010 */
/**************************************************************************
* CPU-specific set_info
@ -1099,7 +1095,7 @@ void m68ec020_get_info(UINT32 state, cpuinfo *info)
}
}
#endif
#endif /* HAS_M68EC020 */
/**************************************************************************
* CPU-specific set_info
@ -1301,5 +1297,5 @@ void m68040_get_info(UINT32 state, cpuinfo *info)
}
}
#endif
#endif /* HAS_M68040 */

View File

@ -199,7 +199,7 @@ static const UINT8 flags8d[256]= /* decrement */
#define BRANCH(f) { UINT8 t; IMMBYTE(t); if(f) { PC+=SIGNED(t); change_pc(PC); if (t==0xfe) { /* speed up busy loops */ if(m6805_ICount > 0) m6805_ICount = 0; } } }
/* what they say it is ... */
static unsigned char cycles1[] =
static const unsigned char cycles1[] =
{
/* 0 1 2 3 4 5 6 7 8 9 A B C D E F */
/*0*/ 10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,

View File

@ -342,7 +342,7 @@ static const opcodeinfo m6809_pg2opcodes[] =
{ 0xBC, 4, "CMPS", EXT }
};
static const opcodeinfo *m6809_pgpointers[3] =
static const opcodeinfo *const m6809_pgpointers[3] =
{
m6809_pg0opcodes, m6809_pg1opcodes, m6809_pg2opcodes
};

View File

@ -279,7 +279,7 @@ INLINE void pref10(void);
INLINE void pref11(void);
#if (BIG_SWITCH==0)
static void (*m6809_main[0x100])(void) = {
static void (*const m6809_main[0x100])(void) = {
neg_di, neg_di, illegal,com_di, lsr_di, illegal,ror_di, asr_di, /* 00 */
asl_di, rol_di, dec_di, illegal,inc_di, tst_di, jmp_di, clr_di,
pref10, pref11, nop, sync, illegal,illegal,lbra, lbsr, /* 10 */

View File

@ -2524,12 +2524,12 @@ static void docop2( int gteop )
static const UINT16 *const p_n_lm[] = { &L11, &L12, &L13, &L21, &L22, &L23, &L31, &L32, &L33 };
static const UINT16 *const p_n_cm[] = { &LR1, &LR2, &LR3, &LG1, &LG2, &LG3, &LB1, &LB2, &LB3 };
static const UINT16 *const p_n_zm[] = { &n_zm, &n_zm, &n_zm, &n_zm, &n_zm, &n_zm, &n_zm, &n_zm, &n_zm };
static const UINT16 *const *p_p_n_mx[] = { p_n_rm, p_n_lm, p_n_cm, p_n_zm };
static const UINT16 *const *const p_p_n_mx[] = { p_n_rm, p_n_lm, p_n_cm, p_n_zm };
static const UINT32 *const p_n_tr[] = { &TRX, &TRY, &TRZ };
static const UINT32 *const p_n_bk[] = { &RBK, &GBK, &BBK };
static const UINT32 *const p_n_fc[] = { &RFC, &GFC, &BFC };
static const UINT32 *const p_n_zc[] = { &n_zc, &n_zc, &n_zc };
static const UINT32 *const *p_p_n_cv[] = { p_n_tr, p_n_bk, p_n_fc, p_n_zc };
static const UINT32 *const *const p_p_n_cv[] = { p_n_tr, p_n_bk, p_n_fc, p_n_zc };
switch( GTE_FUNCT( gteop ) )
{
@ -2788,7 +2788,7 @@ static void docop2( int gteop )
}
break;
case 0x1b:
if( gteop == 0x108041b )
if( gteop == 0x108041b || gteop == 0x118041b )
{
GTELOG( "NCCS" );
FLAG = 0;

View File

@ -30,7 +30,7 @@ static unsigned EA_205(void) { E16=FETCH; E16+=FETCH<<8; EO=I.regs.w[IY]+(INT16)
static unsigned EA_206(void) { E16=FETCH; E16+=FETCH<<8; EO=I.regs.w[BP]+(INT16)E16; EA=DefaultBase(SS)+EO; return EA; }
static unsigned EA_207(void) { E16=FETCH; E16+=FETCH<<8; EO=I.regs.w[BW]+(INT16)E16; EA=DefaultBase(DS0)+EO; return EA; }
static unsigned (*GetEA[192])(void)={
static unsigned (*const GetEA[192])(void)={
EA_000, EA_001, EA_002, EA_003, EA_004, EA_005, EA_006, EA_007,
EA_000, EA_001, EA_002, EA_003, EA_004, EA_005, EA_006, EA_007,
EA_000, EA_001, EA_002, EA_003, EA_004, EA_005, EA_006, EA_007,

View File

@ -246,7 +246,7 @@ static void i_ffpre(void);
static void i_wait(void);
static void (*nec_instruction[256])(void) =
static void (*const nec_instruction[256])(void) =
{
i_add_br8, /* 0x00 */
i_add_wr16, /* 0x01 */

View File

@ -107,7 +107,7 @@ static int picmodel;
static int pic16C5x_reset_vector;
static int pic16C5x_icount;
typedef void (*opcode_fn) (void);
static unsigned cycles_000_other[16];
static const unsigned cycles_000_other[16];
#define TMR0 internalram[1]
@ -174,8 +174,8 @@ static unsigned cycles_000_other[16];
/* Easy bit position selectors */
#define POS ((R.opcode.b.l >> 5) & 7)
static unsigned int bit_clr[8] = { 0xfe, 0xfd, 0xfb, 0xf7, 0xef, 0xdf, 0xbf, 0x7f };
static unsigned int bit_set[8] = { 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80 };
static const unsigned int bit_clr[8] = { 0xfe, 0xfd, 0xfb, 0xf7, 0xef, 0xdf, 0xbf, 0x7f };
static const unsigned int bit_set[8] = { 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80 };
INLINE void CLR(UINT16 flag) { R.STATUS &= ~flag; }
@ -615,7 +615,7 @@ static void xorwf(void)
* Cycle Timings
***********************************************************************/
static unsigned cycles_main[256]=
static const unsigned cycles_main[256]=
{
/*00*/ 1*CLK, 0*CLK, 1*CLK, 1*CLK, 1*CLK, 0*CLK, 1*CLK, 1*CLK, 1*CLK, 1*CLK, 1*CLK, 1*CLK, 1*CLK, 1*CLK, 1*CLK, 1*CLK,
/*10*/ 1*CLK, 1*CLK, 1*CLK, 1*CLK, 1*CLK, 1*CLK, 1*CLK, 1*CLK, 1*CLK, 1*CLK, 1*CLK, 1*CLK, 1*CLK, 1*CLK, 1*CLK, 1*CLK,
@ -635,7 +635,7 @@ static unsigned cycles_main[256]=
/*F0*/ 1*CLK, 1*CLK, 1*CLK, 1*CLK, 1*CLK, 1*CLK, 1*CLK, 1*CLK, 1*CLK, 1*CLK, 1*CLK, 1*CLK, 1*CLK, 1*CLK, 1*CLK, 1*CLK
};
static opcode_fn opcode_main[256]=
static const opcode_fn opcode_main[256]=
{
/*00*/ nop, illegal,movwf, movwf, clrw, illegal,clrf, clrf,
/*08*/ subwf, subwf, subwf, subwf, decf, decf, decf, decf,
@ -672,12 +672,12 @@ static opcode_fn opcode_main[256]=
};
static unsigned cycles_000_other[16]=
static const unsigned cycles_000_other[16]=
{
/*00*/ 1*CLK, 0*CLK, 1*CLK, 1*CLK, 1*CLK, 1*CLK, 1*CLK, 1*CLK, 0*CLK, 0*CLK, 0*CLK, 0*CLK, 0*CLK, 0*CLK, 0*CLK, 0*CLK
};
static opcode_fn opcode_000_other[16]=
static const opcode_fn opcode_000_other[16]=
{
/*00*/ nop, illegal,option, sleepic,clrwdt, tris, tris, tris,
/*08*/ illegal,illegal,illegal,illegal,illegal,illegal,illegal,illegal

View File

@ -1280,7 +1280,9 @@ static void ppcdrc603_init(int index, int clock, const void *_config, int (*irqc
ppc.optable59[i * 32 | 30] = recompile_fnmsubsx;
}
#if (HAS_PPC602 || HAS_MPC8240)
ppc.optable31[978] = recompile_tlbld;
#endif /* (HAS_PPC602 || HAS_MPC8240) */
for(i = 0; i < 256; i++)
{

View File

@ -191,7 +191,7 @@ typedef enum {
} MNEMONICS;
static struct {
static const struct {
const char *name[2];
} mnemonics[]={
{ { "rtn", "RET" } },

View File

@ -1052,7 +1052,7 @@ static UINT32 dasm_invalid(UINT32 pc, UINT64 opcode)
return 0;
}
static SHARC_DASM_OP sharc_dasm_ops[] =
static const SHARC_DASM_OP sharc_dasm_ops[] =
{
// |0 0 1|
{ 0xe000, 0x2000, dasm_compute_dreg_dmpm },

View File

@ -5,7 +5,7 @@ typedef struct
void (* handler)(void);
} SHARC_OP;
static SHARC_OP sharc_opcode_table[] =
static const SHARC_OP sharc_opcode_table[] =
{
// |0 0 1|
{ 0xe000, 0x2000, sharcop_compute_dreg_dm_dreg_pm },

View File

@ -634,7 +634,7 @@ static void zals(void)
* Cycle Timings
***********************************************************************/
static unsigned cycles_main[256]=
static const unsigned cycles_main[256]=
{
/*00*/ 1*CLK, 1*CLK, 1*CLK, 1*CLK, 1*CLK, 1*CLK, 1*CLK, 1*CLK, 1*CLK, 1*CLK, 1*CLK, 1*CLK, 1*CLK, 1*CLK, 1*CLK, 1*CLK,
/*10*/ 1*CLK, 1*CLK, 1*CLK, 1*CLK, 1*CLK, 1*CLK, 1*CLK, 1*CLK, 1*CLK, 1*CLK, 1*CLK, 1*CLK, 1*CLK, 1*CLK, 1*CLK, 1*CLK,
@ -654,7 +654,7 @@ static unsigned cycles_main[256]=
/*F0*/ 0*CLK, 0*CLK, 0*CLK, 0*CLK, 2*CLK, 2*CLK, 2*CLK, 0*CLK, 2*CLK, 2*CLK, 2*CLK, 2*CLK, 2*CLK, 2*CLK, 2*CLK, 2*CLK
};
static unsigned cycles_7F_other[32]=
static const unsigned cycles_7F_other[32]=
{
/*80*/ 1*CLK, 1*CLK, 1*CLK, 0*CLK, 0*CLK, 0*CLK, 0*CLK, 0*CLK, 1*CLK, 1*CLK, 1*CLK, 1*CLK, 2*CLK, 2*CLK, 1*CLK, 1*CLK,
/*90*/ 1*CLK, 0*CLK, 0*CLK, 0*CLK, 0*CLK, 0*CLK, 0*CLK, 0*CLK, 0*CLK, 0*CLK, 0*CLK, 0*CLK, 2*CLK, 2*CLK, 0*CLK, 0*CLK

View File

@ -1561,7 +1561,7 @@ static void zals(void)
* Cycle Timings
***********************************************************************/
static unsigned cycles_main[256]=
static const unsigned cycles_main[256]=
{
/*00*/ 1*CLK, 1*CLK, 1*CLK, 1*CLK, 1*CLK, 1*CLK, 1*CLK, 1*CLK,
/*08*/ 1*CLK, 1*CLK, 1*CLK, 1*CLK, 1*CLK, 1*CLK, 1*CLK, 1*CLK,
@ -1597,12 +1597,12 @@ static unsigned cycles_main[256]=
/*F8*/ 2*CLK, 2*CLK, 2*CLK, 2*CLK, 2*CLK, 2*CLK, 2*CLK, 2*CLK
};
static unsigned cycles_DX_subset[8]=
static const unsigned cycles_DX_subset[8]=
{
/*00*/ 2*CLK, 2*CLK, 2*CLK, 2*CLK, 2*CLK, 2*CLK, 2*CLK, 0
};
static unsigned cycles_CE_subset[256]=
static const unsigned cycles_CE_subset[256]=
{
/*00*/ 1*CLK, 1*CLK, 1*CLK, 1*CLK, 1*CLK, 1*CLK, 1*CLK, 1*CLK,
/*08*/ 1*CLK, 1*CLK, 1*CLK, 1*CLK, 1*CLK, 1*CLK, 1*CLK, 1*CLK,

View File

@ -98,7 +98,7 @@ static UINT8 screen_to_cpu[MAX_SCREENS];
static UINT8 executing_cpu = 0xff;
/* default configuration */
static tms34010_config default_config =
static const tms34010_config default_config =
{
0
};

View File

@ -17,7 +17,7 @@
*
*****************************************************************************/
static void (*opfn[0x100])(void) = {
static void (*const opfn[0x100])(void) = {
/* 0xX0, 0xX1, 0xX2, 0xX3, 0xX4, 0xX5, 0xX6, 0xX7,
0xX8, 0xX9, 0xXA, 0xXB, 0xXC, 0xXD, 0xXE, 0xXF */
@ -70,7 +70,7 @@ static void (*opfn[0x100])(void) = {
trap_7, trap_6, trap_5, trap_4, trap_3, trap_2, trap_1, trap_0
};
static void (*opfn_exl[0x100])(void) = {
static void (*const opfn_exl[0x100])(void) = {
/* 0xX0, 0xX1, 0xX2, 0xX3, 0xX4, 0xX5, 0xX6, 0xX7,
0xX8, 0xX9, 0xXA, 0xXB, 0xXC, 0xXD, 0xXE, 0xXF */

View File

@ -30,7 +30,7 @@ static unsigned EA_205(void) { E16=FETCH; E16+=FETCH<<8; EO=I.regs.w[IY]+(INT16)
static unsigned EA_206(void) { E16=FETCH; E16+=FETCH<<8; EO=I.regs.w[BP]+(INT16)E16; EA=DefaultBase(SS)+EO; return EA; }
static unsigned EA_207(void) { E16=FETCH; E16+=FETCH<<8; EO=I.regs.w[BW]+(INT16)E16; EA=DefaultBase(DS)+EO; return EA; }
static unsigned (*GetEA[192])(void)={
static unsigned (*const GetEA[192])(void)={
EA_000, EA_001, EA_002, EA_003, EA_004, EA_005, EA_006, EA_007,
EA_000, EA_001, EA_002, EA_003, EA_004, EA_005, EA_006, EA_007,
EA_000, EA_001, EA_002, EA_003, EA_004, EA_005, EA_006, EA_007,

View File

@ -246,7 +246,7 @@ static void i_ffpre(void);
static void i_wait(void);
static void (*nec_instruction[256])(void) =
static void (*const nec_instruction[256])(void) =
{
i_add_br8, /* 0x00 */
i_add_wr16, /* 0x01 */

View File

@ -337,7 +337,7 @@ static void ChangePC_32(offs_t pc)
/* Structures pointing to various I/O functions */
/************************************************/
static struct cpu_info v60_i =
static const struct cpu_info v60_i =
{
MemRead8_16, MemWrite8_16, MemRead16_16, MemWrite16_16, MemRead32_16, MemWrite32_16,
PortRead8_16, PortWrite8_16, PortRead16_16, PortWrite16_16, PortRead32_16, PortWrite32_16,
@ -346,7 +346,7 @@ static struct cpu_info v60_i =
0xfffff0
};
static struct cpu_info v70_i =
static const struct cpu_info v70_i =
{
MemRead8_32, MemWrite8_32, MemRead16_32, MemWrite16_32, MemRead32_32, MemWrite32_32,
PortRead8_32, PortWrite8_32, PortRead16_32, PortWrite16_32, PortRead32_32, PortWrite32_32,

View File

@ -125,7 +125,7 @@ static UINT8 z8000_zsp[256];
**************************************************************************/
#ifdef LSB_FIRST
/* pointers to byte (8bit) registers */
static UINT8 *pRB[16] =
static UINT8 *const pRB[16] =
{
&Z.regs.B[ 7],&Z.regs.B[ 5],&Z.regs.B[ 3],&Z.regs.B[ 1],
&Z.regs.B[15],&Z.regs.B[13],&Z.regs.B[11],&Z.regs.B[ 9],
@ -133,7 +133,7 @@ static UINT8 z8000_zsp[256];
&Z.regs.B[14],&Z.regs.B[12],&Z.regs.B[10],&Z.regs.B[ 8]
};
static UINT16 *pRW[16] =
static UINT16 *const pRW[16] =
{
&Z.regs.W[ 3],&Z.regs.W[ 2],&Z.regs.W[ 1],&Z.regs.W[ 0],
&Z.regs.W[ 7],&Z.regs.W[ 6],&Z.regs.W[ 5],&Z.regs.W[ 4],
@ -142,7 +142,7 @@ static UINT8 z8000_zsp[256];
};
/* pointers to long (32bit) registers */
static UINT32 *pRL[16] =
static UINT32 *const pRL[16] =
{
&Z.regs.L[ 1],&Z.regs.L[ 1],&Z.regs.L[ 0],&Z.regs.L[ 0],
&Z.regs.L[ 3],&Z.regs.L[ 3],&Z.regs.L[ 2],&Z.regs.L[ 2],
@ -153,7 +153,7 @@ static UINT8 z8000_zsp[256];
#else /* MSB_FIRST */
/* pointers to byte (8bit) registers */
static UINT8 *pRB[16] =
static UINT8 *const pRB[16] =
{
&Z.regs.B[ 0],&Z.regs.B[ 2],&Z.regs.B[ 4],&Z.regs.B[ 6],
&Z.regs.B[ 8],&Z.regs.B[10],&Z.regs.B[12],&Z.regs.B[14],
@ -162,7 +162,7 @@ static UINT8 z8000_zsp[256];
};
/* pointers to word (16bit) registers */
static UINT16 *pRW[16] =
static UINT16 *const pRW[16] =
{
&Z.regs.W[ 0],&Z.regs.W[ 1],&Z.regs.W[ 2],&Z.regs.W[ 3],
&Z.regs.W[ 4],&Z.regs.W[ 5],&Z.regs.W[ 6],&Z.regs.W[ 7],
@ -171,7 +171,7 @@ static UINT8 z8000_zsp[256];
};
/* pointers to long (32bit) registers */
static UINT32 *pRL[16] =
static UINT32 *const pRL[16] =
{
&Z.regs.L[ 0],&Z.regs.L[ 0],&Z.regs.L[ 1],&Z.regs.L[ 1],
&Z.regs.L[ 2],&Z.regs.L[ 2],&Z.regs.L[ 3],&Z.regs.L[ 3],
@ -182,7 +182,7 @@ static UINT8 z8000_zsp[256];
#endif
/* pointers to quad word (64bit) registers */
static UINT64 *pRQ[16] = {
static UINT64 *const pRQ[16] = {
&Z.regs.Q[ 0],&Z.regs.Q[ 0],&Z.regs.Q[ 0],&Z.regs.Q[ 0],
&Z.regs.Q[ 1],&Z.regs.Q[ 1],&Z.regs.Q[ 1],&Z.regs.Q[ 1],
&Z.regs.Q[ 2],&Z.regs.Q[ 2],&Z.regs.Q[ 2],&Z.regs.Q[ 2],

View File

@ -227,7 +227,7 @@ struct _cpu_config
int vblank_interrupts_per_frame;/* usually 1 */
void (*timed_interrupt)(void); /* for interrupts not tied to VBLANK */
attoseconds_t timed_interrupt_period; /* period for periodic interrupts */
void * reset_param; /* parameter for cpu_reset */
const void *reset_param; /* parameter for cpu_reset */
const char *tag;
};

View File

@ -83,7 +83,7 @@ static int cpu_5_irq_callback(int line);
static int cpu_6_irq_callback(int line);
static int cpu_7_irq_callback(int line);
int (*cpu_irq_callbacks[MAX_CPU])(int) =
int (*const cpu_irq_callbacks[MAX_CPU])(int) =
{
cpu_0_irq_callback,
cpu_1_irq_callback,

View File

@ -30,7 +30,7 @@ void cpuint_init(running_machine *machine);
void cpuint_reset(void);
extern int (*cpu_irq_callbacks[])(int);
extern int (*const cpu_irq_callbacks[])(int);

View File

@ -1275,7 +1275,7 @@ static void execute_wpdisenable(int ref, int params, const char *param[])
static void execute_wplist(int ref, int params, const char *param[])
{
static const char *spacenames[ADDRESS_SPACES] = { "program", "data", "I/O" };
static const char *const spacenames[ADDRESS_SPACES] = { "program", "data", "I/O" };
int cpunum, printed = 0;
char buffer[256];
@ -1292,7 +1292,7 @@ static void execute_wplist(int ref, int params, const char *param[])
{
if (cpuinfo->space[spacenum].first_wp)
{
static const char *types[] = { "unkn ", "read ", "write", "r/w " };
static const char *const types[] = { "unkn ", "read ", "write", "r/w " };
debug_cpu_watchpoint *wp;
debug_console_printf("CPU %d %s space watchpoints:\n", cpunum, spacenames[spacenum]);

View File

@ -42,7 +42,7 @@
FILE *debug_source_file;
symbol_table *global_symtable;
static const char *address_space_name[] = { "program", "data", "I/O" };
static const char *const address_space_name[] = { "program", "data", "I/O" };
static UINT64 wpdata;
static UINT64 wpaddr;
@ -1317,7 +1317,7 @@ static void check_watchpoints(int cpunum, int spacenum, int type, offs_t address
/* if we do, evaluate the condition */
if (wp->condition == NULL || (expression_execute(wp->condition, &result) == EXPRERR_NONE && result))
{
static const char *sizes[] =
static const char *const sizes[] =
{
"0bytes", "byte", "word", "3bytes", "dword", "5bytes", "6bytes", "7bytes", "qword"
};

View File

@ -53,7 +53,7 @@ struct _help_item
TABLE OF HELP
***************************************************************************/
static help_item static_help_list[] =
static const help_item static_help_list[] =
{
{
"",
@ -1035,7 +1035,7 @@ static help_item static_help_list[] =
const char *debug_get_help(const char *tag)
{
static char ambig_message[1024];
help_item *found = NULL;
const help_item *found = NULL;
int i, msglen, foundcount = 0;
int taglen = (int)strlen(tag);
char tagcopy[256];

View File

@ -1158,6 +1158,12 @@ static EXPRERR execute_tokens(parsed_expression *expr, UINT64 *result)
/* reset the token stack */
init_token_stack(expr);
/* Initialize t1, t2 to keep gcc's warnings-as-errors happy */
t1.type = TOK_INVALID;
t1.offset = 0;
t2.type = TOK_INVALID;
t2.offset = 0;
/* create a temporary token for holding intermediate number and memory values */
tempnum.type = TOK_NUMBER;
tempnum.offset = 0;

View File

@ -82,7 +82,7 @@ INLINE void write_dword(void *address, UINT32 data)
offset
-------------------------------------------------*/
INLINE int readbit(const UINT8 *src, int bitnum)
INLINE int readbit(const UINT8 *src, unsigned int bitnum)
{
return src[bitnum / 8] & (0x80 >> (bitnum % 8));
}

View File

@ -119,16 +119,17 @@
/* ----- flags for video_attributes ----- */
/* is the video hardware raser or vector base? */
#define VIDEO_TYPE_RASTER 0x0000
#define VIDEO_TYPE_VECTOR 0x0001
/* is the video hardware raster or vector based? */
#define VIDEO_TYPE_NONE 0x0000
#define VIDEO_TYPE_RASTER 0x0001
#define VIDEO_TYPE_VECTOR 0x0002
/* should VIDEO_UPDATE by called at the start of VBLANK or at the end? */
#define VIDEO_UPDATE_BEFORE_VBLANK 0x0000
#define VIDEO_UPDATE_AFTER_VBLANK 0x0002
#define VIDEO_UPDATE_AFTER_VBLANK 0x0004
/* indicates VIDEO_UPDATE will add container bits its */
#define VIDEO_SELF_RENDER 0x0004
#define VIDEO_SELF_RENDER 0x0008
/* automatically extend the palette creating a darker copy for shadows */
#define VIDEO_HAS_SHADOWS 0x0010

View File

@ -143,6 +143,7 @@ const options_entry mame_core_options[] =
{ NULL, NULL, OPTION_HEADER, "CORE DEBUGGING OPTIONS" },
{ "log", "0", OPTION_BOOLEAN, "generate an error.log file" },
{ "verbose;v", "0", OPTION_BOOLEAN, "display additional diagnostic information" },
{ "update_in_pause", "0", OPTION_BOOLEAN, "keep calling video updates while in pause" },
#ifdef MAME_DEBUG
{ "debug;d", "1", OPTION_BOOLEAN, "enable/disable debugger" },
{ "debugscript", NULL, 0, "script for debugger" },

View File

@ -133,6 +133,7 @@
#define OPTION_LOG "log"
#define OPTION_DEBUG "debug"
#define OPTION_DEBUGSCRIPT "debugscript"
#define OPTION_UPDATEINPAUSE "update_in_pause"
/* core misc options */
#define OPTION_BIOS "bios"

View File

@ -185,7 +185,7 @@ static const hash_function_desc hash_descs[HASH_NUM_FUNCTIONS] =
},
};
static const char* info_strings[] =
static const char *const info_strings[] =
{
"$ND$", // No dump
"$BD$" // Bad dump

View File

@ -264,7 +264,7 @@ static digital_joystick_info joystick_info[MAX_PLAYERS][DIGITAL_JOYSTICKS_PER_PL
static UINT8 ui_memory[__ipt_max];
/* XML attributes for the different types */
static const char *seqtypestrings[] = { "standard", "decrement", "increment" };
static const char *const seqtypestrings[] = { "standard", "decrement", "increment" };
/* original input_ports without modifications */
static input_port_entry *input_ports_default;
@ -2598,9 +2598,9 @@ const char *input_port_name(const input_port_entry *port)
}
input_seq *input_port_seq(input_port_entry *port, int seqtype)
const input_seq *input_port_seq(input_port_entry *port, int seqtype)
{
static input_seq ip_none = SEQ_DEF_0;
static const input_seq ip_none = SEQ_DEF_0;
input_seq *portseq;
/* if port is disabled, return no key */
@ -2639,9 +2639,9 @@ input_seq *input_port_seq(input_port_entry *port, int seqtype)
}
input_seq *input_port_default_seq(int type, int player, int seqtype)
const input_seq *input_port_default_seq(int type, int player, int seqtype)
{
static input_seq ip_none = SEQ_DEF_0;
static const input_seq ip_none = SEQ_DEF_0;
/* find the default setting */
int defindex = default_ports_lookup[type][player];

View File

@ -876,8 +876,8 @@ read16_handler port_tag_to_handler16(const char *tag);
read32_handler port_tag_to_handler32(const char *tag);
read64_handler port_tag_to_handler64(const char *tag);
const char *input_port_name(const input_port_entry *in);
input_seq *input_port_seq(input_port_entry *in, int seqtype);
input_seq *input_port_default_seq(int type, int player, int seqtype);
const input_seq *input_port_seq(input_port_entry *in, int seqtype);
const input_seq *input_port_default_seq(int type, int player, int seqtype);
int input_port_condition(const input_port_entry *in);
void input_port_set_changed_callback(int port, UINT32 mask, void (*callback)(void *, UINT32, UINT32), void *param);

View File

@ -337,9 +337,9 @@ static INT32 joystick_deadzone;
static INT32 joystick_saturation;
/* standard joystick mappings */
const char * joystick_map_8way = "7778...4445";
const char * joystick_map_4way_sticky = "s8.4s8.44s8.4445";
const char * joystick_map_4way_diagonal = "4444s8888..444458888.444555888.ss5.222555666.222256666.2222s6666.2222s6666";
const char joystick_map_8way[] = "7778...4445";
const char joystick_map_4way_sticky[] = "s8.4s8.44s8.4445";
const char joystick_map_4way_diagonal[] = "4444s8888..444458888.444555888.ss5.222555666.222256666.2222s6666.2222s6666";
@ -1549,7 +1549,7 @@ static int joystick_map_parse(const char *mapstring, joystick_map *map)
JOYSTICK_MAP_DOWN | JOYSTICK_MAP_RIGHT,
JOYSTICK_MAP_STICKY
};
static const char *validchars = "789456123s";
static const char validchars[] = "789456123s";
const char *ptr = strchr(validchars, *mapstring++);
/* invalid characters exit immediately */

View File

@ -485,9 +485,9 @@ typedef struct _input_device input_device;
***************************************************************************/
/* joystick maps */
extern const char * joystick_map_8way;
extern const char * joystick_map_4way_sticky;
extern const char * joystick_map_4way_diagonal;
extern const char joystick_map_8way[];
extern const char joystick_map_4way_sticky[];
extern const char joystick_map_4way_diagonal[];

View File

@ -7,7 +7,7 @@
#define DASM_OPCODES 0
static SCSIInstance *devices[8]; /* SCSI IDs 0-7 */
static struct LSI53C810interface *intf;
static const struct LSI53C810interface *intf;
static UINT8 last_id;
static struct {
@ -659,7 +659,7 @@ static void add_opcode(UINT8 op, UINT8 mask, void (* handler)(void))
}
}
extern void lsi53c810_init(struct LSI53C810interface *interface)
extern void lsi53c810_init(const struct LSI53C810interface *interface)
{
int i;
@ -756,7 +756,7 @@ unsigned lsi53c810_dasm(char *buf, UINT32 pc)
UINT32 dest;
int i;
static const char *phases[] =
static const char *const phases[] =
{
"DATA_OUT", "DATA_IN", "CMD", "STATUS",
"RESERVED_OUT??", "RESERVED_IN??", "MSG_OUT", "MSG_IN"
@ -777,7 +777,7 @@ unsigned lsi53c810_dasm(char *buf, UINT32 pc)
else if (((op & 0xF8000000) == 0x58000000)
| ((op & 0xF8000000) == 0x60000000))
{
static struct
static const struct
{
UINT32 flag;
const char *text;

View File

@ -5,13 +5,13 @@
struct LSI53C810interface
{
SCSIConfigTable *scsidevs; /* SCSI devices */
const SCSIConfigTable *scsidevs; /* SCSI devices */
void (*irq_callback)(void); /* IRQ callback */
void (*dma_callback)(UINT32, UINT32, int, int); /* DMA callback */
UINT32 (*fetch)(UINT32 dsp);
};
extern void lsi53c810_init(struct LSI53C810interface *interface);
extern void lsi53c810_init(const struct LSI53C810interface *interface);
extern void lsi53c810_read_data(int bytes, UINT8 *pData);
extern void lsi53c810_write_data(int bytes, UINT8 *pData);

View File

@ -97,7 +97,7 @@ static TIMER_CALLBACK( ptm6840_t3_timeout );
static ptm6840 ptm[PTM_6840_MAX];
#if PTMVERBOSE
static const char *opmode[] =
static const char *const opmode[] =
{
"000 continous mode",
"001 freq comparison mode",

View File

@ -13,7 +13,7 @@
#include "am53cf96.h"
static UINT8 scsi_regs[32], fifo[16], fptr = 0, xfer_state, last_id;
static struct AM53CF96interface *intf;
static const struct AM53CF96interface *intf;
static SCSIInstance *devices[8]; // SCSI IDs 0-7
@ -208,7 +208,7 @@ WRITE32_HANDLER( am53cf96_w )
}
}
void am53cf96_init( struct AM53CF96interface *interface )
void am53cf96_init( const struct AM53CF96interface *interface )
{
int i;

View File

@ -10,11 +10,11 @@
struct AM53CF96interface
{
SCSIConfigTable *scsidevs; /* SCSI devices */
const SCSIConfigTable *scsidevs; /* SCSI devices */
void (*irq_callback)(void); /* irq callback */
};
extern void am53cf96_init( struct AM53CF96interface *interface );
extern void am53cf96_init( const struct AM53CF96interface *interface );
extern void am53cf96_read_data(int bytes, UINT8 *pData);
void am53cf96_write_data(int bytes, UINT8 *pData);
void *am53cf96_get_device(int id);

View File

@ -14,7 +14,7 @@ typedef struct
} SCSICr589;
static const int identity_offset = 0x3ab;
static const char *download_identity = "MATSHITA CD98Q4 DOWNLOADGS0N";
static const char download_identity[] = "MATSHITA CD98Q4 DOWNLOADGS0N";
static int cr589_exec_command( SCSIInstance *scsiInstance, UINT8 *statusCode )
{
@ -144,7 +144,7 @@ static int cr589_dispatch( int operation, void *file, INT64 intparm, void *ptrpa
return SCSIBase( &SCSIClassCr589, operation, file, intparm, ptrparm );
}
SCSIClass SCSIClassCr589 =
const SCSIClass SCSIClassCr589 =
{
&SCSIClassCDROM,
cr589_dispatch,

View File

@ -1,3 +1,3 @@
#include "scsi.h"
extern SCSIClass SCSIClassCr589;
extern const SCSIClass SCSIClassCr589;

View File

@ -41,7 +41,7 @@ struct ds2401_chip
int shift;
int rx;
int tx;
UINT8 *data;
const UINT8 *data;
emu_timer *timer;
emu_timer *reset_timer;
attotime t_samp;
@ -138,15 +138,10 @@ static TIMER_CALLBACK( ds2401_tick )
}
}
void ds2401_init( int which, UINT8 *data )
void ds2401_init( int which, const UINT8 *data )
{
struct ds2401_chip *c = &ds2401[ which ];
if( data == NULL )
{
data = auto_malloc( SIZE_DATA );
}
c->state = STATE_IDLE;
c->bit = 0;
c->byte = 0;
@ -166,7 +161,7 @@ void ds2401_init( int which, UINT8 *data )
state_save_register_item( "ds2401", which, c->shift );
state_save_register_item( "ds2401", which, c->rx );
state_save_register_item( "ds2401", which, c->tx );
state_save_register_item_pointer( "ds2401", which, data, SIZE_DATA );
state_save_register_generic( "ds2401", which, "data", (UINT8 *)&data[0], data[0], SIZE_DATA );
c->timer = timer_alloc( ds2401_tick , NULL);
c->reset_timer = timer_alloc( ds2401_reset , NULL);

View File

@ -11,7 +11,7 @@
#define DS2401_MAXCHIP ( 3 )
extern void ds2401_init( int which, UINT8 *data );
extern void ds2401_init( int which, const UINT8 *data );
extern void ds2401_write( int which, int data );
extern int ds2401_read( int which );

View File

@ -157,15 +157,15 @@ struct ide_state
UINT8 config_register[IDE_CONFIG_REGISTERS];
UINT8 config_register_num;
struct ide_interface *intf;
const struct ide_interface *intf;
hard_disk_file * disk;
emu_timer * last_status_timer;
emu_timer * reset_timer;
UINT8 master_password_enable;
UINT8 user_password_enable;
UINT8 * master_password;
UINT8 * user_password;
const UINT8 * master_password;
const UINT8 * user_password;
};
@ -289,7 +289,7 @@ static void ide_controller_exit(running_machine *machine)
}
int ide_controller_init_custom(int which, struct ide_interface *intf, chd_file *diskhandle)
int ide_controller_init_custom(int which, const struct ide_interface *intf, chd_file *diskhandle)
{
struct ide_state *ide = &idestate[which];
const hard_disk_info *hdinfo;
@ -380,7 +380,7 @@ int ide_controller_init_custom(int which, struct ide_interface *intf, chd_file *
return 0;
}
int ide_controller_init(int which, struct ide_interface *intf)
int ide_controller_init(int which, const struct ide_interface *intf)
{
/* we only support one hard disk right now; get a handle to it */
return ide_controller_init_custom(which, intf, get_disk_handle(0));
@ -414,7 +414,7 @@ UINT8 *ide_get_features(int which)
}
void ide_set_master_password(int which, UINT8 *password)
void ide_set_master_password(int which, const UINT8 *password)
{
struct ide_state *ide = &idestate[which];
@ -423,7 +423,7 @@ void ide_set_master_password(int which, UINT8 *password)
}
void ide_set_user_password(int which, UINT8 *password)
void ide_set_user_password(int which, const UINT8 *password)
{
struct ide_state *ide = &idestate[which];

View File

@ -14,13 +14,13 @@ struct ide_interface
void (*interrupt)(int state);
};
int ide_controller_init(int which, struct ide_interface *intf);
int ide_controller_init_custom(int which, struct ide_interface *intf, chd_file *diskhandle);
int ide_controller_init(int which, const struct ide_interface *intf);
int ide_controller_init_custom(int which, const struct ide_interface *intf, chd_file *diskhandle);
void ide_controller_reset(int which);
UINT8 *ide_get_features(int which);
void ide_set_master_password(int which, UINT8 *password);
void ide_set_user_password(int which, UINT8 *password);
void ide_set_master_password(int which, const UINT8 *password);
void ide_set_user_password(int which, const UINT8 *password);
int ide_bus_0_r(int select, int offset);
void ide_bus_0_w(int select, int offset, int data);

View File

@ -363,7 +363,7 @@ static void vp932_state_changed(laserdisc_info *info, UINT8 oldstate);
GLOBAL VARIABLES
***************************************************************************/
struct CustomSound_interface laserdisc_custom_interface =
const struct CustomSound_interface laserdisc_custom_interface =
{
custom_start
};

View File

@ -60,7 +60,7 @@ typedef struct _laserdisc_info laserdisc_info;
GLOBAL VARIABLES
***************************************************************************/
extern struct CustomSound_interface laserdisc_custom_interface;
extern const struct CustomSound_interface laserdisc_custom_interface;

View File

@ -19,7 +19,7 @@ struct MB87078 {
static struct MB87078 chip[MAX_MB87078];
static float MB87078_gain_decibel[66]={
static const float MB87078_gain_decibel[66]={
0.0, -0.5, -1.0, -1.5, -2.0, -2.5, -3.0, -3.5,
-4.0, -4.5, -5.0, -5.5, -6.0, -6.5, -7.0, -7.5,
-8.0, -8.5, -9.0, -9.5,-10.0,-10.5,-11.0,-11.5,
@ -31,7 +31,7 @@ static float MB87078_gain_decibel[66]={
-32.0, -256.0
};
static int MB87078_gain_percent[66]={
static const int MB87078_gain_percent[66]={
100,94,89,84,79,74,70,66,
63,59,56,53,50,47,44,42,
39,37,35,33,31,29,28,26,

View File

@ -65,7 +65,7 @@ we actually have 18 segments, including the semicolon portions.
This means our segment maths needs to be more than 16-bit to work!
*/
static UINT32 roc10937charset[]=
static const UINT32 roc10937charset[]=
{ // 11 10 FEDC BA98 7654 3210
0x0507F, // 0 0 0101 0000 0111 1111 @.
0x044CF, // 0 0 0100 0100 1100 1111 A.

View File

@ -4,7 +4,7 @@
/****************************************************************************/
/* local copy of the interface pointer */
static struct RP5H01_interface *intf;
static const struct RP5H01_interface *intf;
/* these also work as the address masks */
enum {
@ -25,7 +25,7 @@ static RP5H01 RP5H01_state[MAX_RP5H01];
/****************************************************************************/
int RP5H01_init( struct RP5H01_interface *interface ) {
int RP5H01_init( const struct RP5H01_interface *interface ) {
int i;
/* setup our local copy of the interface */

View File

@ -10,7 +10,7 @@ struct RP5H01_interface {
int offset[MAX_RP5H01]; /* memory offset within the above region where data resides */
};
int RP5H01_init( struct RP5H01_interface *interface );
int RP5H01_init( const struct RP5H01_interface *interface );
void RP5H01_enable_w( int which, int data ); /* /CE */
void RP5H01_reset_w( int which, int data ); /* RESET */
void RP5H01_clock_w( int which, int data ); /* DATA CLOCK (active low) */

View File

@ -1,8 +1,8 @@
#include "scsi.h"
void SCSIAllocInstance( SCSIClass *scsiClass, SCSIInstance **instance, int diskId )
void SCSIAllocInstance( const SCSIClass *scsiClass, SCSIInstance **instance, int diskId )
{
scsiClass->dispatch( SCSIOP_ALLOC_INSTANCE, scsiClass, diskId, instance );
scsiClass->dispatch( SCSIOP_ALLOC_INSTANCE, (void *)scsiClass, diskId, instance );
}
void SCSIDeleteInstance( SCSIInstance *instance )
@ -60,19 +60,19 @@ void SCSIGetPhase( SCSIInstance *instance, int *phase )
*phase = instance->scsiClass->dispatch( SCSIOP_GET_PHASE, instance, 0, NULL );
}
int SCSIBase( SCSIClass *scsiClass, int operation, void *file, INT64 intparm, UINT8 *ptrparm )
int SCSIBase( const SCSIClass *scsiClass, int operation, void *file, INT64 intparm, UINT8 *ptrparm )
{
return scsiClass->baseClass->dispatch( operation, file, intparm, ptrparm );
}
SCSIInstance *SCSIMalloc( SCSIClass *scsiClass )
SCSIInstance *SCSIMalloc( const SCSIClass *scsiClass )
{
SCSIInstance *scsiInstance = (SCSIInstance *) malloc_or_die( SCSISizeof( scsiClass ) );
scsiInstance->scsiClass = scsiClass;
return scsiInstance;
}
void *SCSIThis( SCSIClass *scsiClass, SCSIInstance *instance )
void *SCSIThis( const SCSIClass *scsiClass, SCSIInstance *instance )
{
if( instance != NULL )
{
@ -90,7 +90,7 @@ void *SCSIThis( SCSIClass *scsiClass, SCSIInstance *instance )
return NULL;
}
int SCSISizeof( SCSIClass *scsiClass )
int SCSISizeof( const SCSIClass *scsiClass )
{
int sizeofData = sizeof( SCSIInstance );

View File

@ -14,14 +14,14 @@ typedef int (*pSCSIDispatch)( int operation, void *file, INT64 intparm, void *pt
typedef struct _SCSIClass
{
struct _SCSIClass *baseClass;
const struct _SCSIClass *baseClass;
pSCSIDispatch dispatch;
int sizeofData;
} SCSIClass;
typedef struct
{
SCSIClass *scsiClass;
const SCSIClass *scsiClass;
} SCSIInstance;
// commands accepted by a SCSI device's dispatch handler
@ -45,7 +45,7 @@ typedef struct scsiconfigitem
{
int scsiID;
int diskID;
SCSIClass *scsiClass;
const SCSIClass *scsiClass;
} SCSIConfigItem;
#define SCSI_MAX_DEVICES (16)
@ -53,7 +53,7 @@ typedef struct scsiconfigitem
typedef struct scsiconfigtable
{
int devs_present;
SCSIConfigItem devices[SCSI_MAX_DEVICES];
const SCSIConfigItem devices[SCSI_MAX_DEVICES];
} SCSIConfigTable;
// SCSI IDs
@ -77,7 +77,7 @@ enum
#define SCSI_PHASE_MESSAGE_OUT ( 6 )
#define SCSI_PHASE_MESSAGE_IN ( 7 )
extern void SCSIAllocInstance( SCSIClass *scsiClass, SCSIInstance **instance, int diskId );
extern void SCSIAllocInstance( const SCSIClass *scsiClass, SCSIInstance **instance, int diskId );
extern void SCSIDeleteInstance( SCSIInstance *instance );
extern void SCSISetDevice( SCSIInstance *instance, void *device );
extern void SCSIGetDevice( SCSIInstance *instance, void **device );
@ -90,10 +90,10 @@ extern void SCSIReadData( SCSIInstance *instance, void *data, int dataLength );
extern void SCSISetPhase( SCSIInstance *instance, int phase );
extern void SCSIGetPhase( SCSIInstance *instance, int *phase );
extern SCSIInstance *SCSIMalloc( SCSIClass *scsiClass );
extern int SCSIBase( SCSIClass *scsiClass, int operation, void *file, INT64 intparm, UINT8 *ptrparm );
extern void *SCSIThis( SCSIClass *scsiClass, SCSIInstance *instance );
extern int SCSISizeof( SCSIClass *scsiClass );
extern SCSIInstance *SCSIMalloc( const SCSIClass *scsiClass );
extern int SCSIBase( const SCSIClass *scsiClass, int operation, void *file, INT64 intparm, UINT8 *ptrparm );
extern void *SCSIThis( const SCSIClass *scsiClass, SCSIInstance *instance );
extern int SCSISizeof( const SCSIClass *scsiClass );
extern int SCSILengthFromUINT8( UINT8 *length );
extern int SCSILengthFromUINT16( UINT8 *length );

View File

@ -760,7 +760,7 @@ static int scsicd_dispatch(int operation, void *file, INT64 intparm, void *ptrpa
return SCSIBase( &SCSIClassCDROM, operation, file, intparm, ptrparm );
}
SCSIClass SCSIClassCDROM =
const SCSIClass SCSIClassCDROM =
{
&SCSIClassDevice,
scsicd_dispatch,

View File

@ -10,7 +10,7 @@
#include "machine/scsi.h"
// CD-ROM handler
extern SCSIClass SCSIClassCDROM;
extern const SCSIClass SCSIClassCDROM;
#define SCSI_DEVICE_CDROM &SCSIClassCDROM
#endif

View File

@ -147,7 +147,7 @@ static int scsidev_dispatch( int operation, void *file, INT64 intparm, void *ptr
return 0;
}
SCSIClass SCSIClassDevice =
const SCSIClass SCSIClassDevice =
{
NULL,
scsidev_dispatch,

View File

@ -10,6 +10,6 @@
#include "machine/scsi.h"
// base handler
extern SCSIClass SCSIClassDevice;
extern const SCSIClass SCSIClassDevice;
#endif

View File

@ -303,7 +303,7 @@ static int scsihd_dispatch(int operation, void *file, INT64 intparm, void *ptrpa
return SCSIBase( &SCSIClassHARDDISK, operation, file, intparm, ptrparm );
}
SCSIClass SCSIClassHARDDISK =
const SCSIClass SCSIClassHARDDISK =
{
&SCSIClassDevice,
scsihd_dispatch,

View File

@ -10,7 +10,7 @@
#include "machine/scsi.h"
// CD-ROM handler
extern SCSIClass SCSIClassHARDDISK;
extern const SCSIClass SCSIClassHARDDISK;
#define SCSI_DEVICE_HARDDISK &SCSIClassHARDDISK
#endif

View File

@ -92,7 +92,7 @@
#define EINT_ERCV 0x40
/* Ethernet register names */
static const char *ethernet_regname[64] =
static const char *const ethernet_regname[64] =
{
"TCR", "EPH STATUS", "RCR", "COUNTER", "MIR", "MCR", "(0.6)", "BANK",
"CONFIG", "BASE", "IA0-1", "IA2-3", "IA4-5", "GENERAL PURPOSE", "CONTROL", "BANK",
@ -164,7 +164,7 @@ static void update_ethernet_irq(void);
*
*************************************/
void smc91c94_init(struct smc91c9x_interface *config)
void smc91c94_init(const struct smc91c9x_interface *config)
{
ethernet.irq_handler = config->irq_handler;
}

View File

@ -14,7 +14,7 @@ struct smc91c9x_interface
void (*irq_handler)(int state);
};
void smc91c94_init(struct smc91c9x_interface *config);
void smc91c94_init(const struct smc91c9x_interface *config);
void smc91c94_reset(void);
READ16_HANDLER( smc91c94_r );
WRITE16_HANDLER( smc91c94_w );

View File

@ -18,7 +18,7 @@
#define VERBOSE 0
static SCSIInstance *devices[8]; // SCSI IDs 0-7
static struct WD33C93interface *intf;
static const struct WD33C93interface *intf;
/* wd register names */
#define WD_OWN_ID 0x00
@ -457,7 +457,7 @@ static void wd33c93_xferinfo_cmd( void )
}
/* Command handlers */
static cmd_handler wd33c93_cmds[0x22] =
static const cmd_handler wd33c93_cmds[0x22] =
{
&wd33c93_reset_cmd, /* 0x00 - WD_CMD_RESET */
&wd33c93_abort_cmd, /* 0x01 - WD_CMD_ABORT */
@ -785,7 +785,7 @@ READ8_HANDLER(wd33c93_r)
return 0;
}
extern void wd33c93_init( struct WD33C93interface *interface )
extern void wd33c93_init( const struct WD33C93interface *interface )
{
int i;

View File

@ -10,11 +10,11 @@
struct WD33C93interface
{
SCSIConfigTable *scsidevs; /* SCSI devices */
const SCSIConfigTable *scsidevs; /* SCSI devices */
void (*irq_callback)(int state); /* irq callback */
};
extern void wd33c93_init( struct WD33C93interface *interface );
extern void wd33c93_init( const struct WD33C93interface *interface );
extern void wd33c93_get_dma_data(int bytes, UINT8 *pData);
extern void wd33c93_write_data(int bytes, UINT8 *pData);
extern void *wd33c93_get_device(int id);

View File

@ -167,7 +167,7 @@ static void update_irq_state(z80pio *pio, int ch)
INITIALIZATION/CONFIGURATION
***************************************************************************/
void z80pio_init(int which, z80pio_interface *intf)
void z80pio_init(int which, const z80pio_interface *intf)
{
z80pio *pio = pios + which;

View File

@ -33,7 +33,7 @@ typedef struct _z80pio_interface z80pio_interface;
INITIALIZATION/CONFIGURATION
***************************************************************************/
void z80pio_init(int which, z80pio_interface *intf);
void z80pio_init(int which, const z80pio_interface *intf);
void z80pio_reset(int which);

View File

@ -190,7 +190,7 @@ static output_callback output_cb[OUTPUT_CHANNEL_COUNT];
static void *output_cb_param[OUTPUT_CHANNEL_COUNT];
/* the "disclaimer" that should be printed when run with no parameters */
const char *mame_disclaimer =
const char mame_disclaimer[] =
"MAME is an emulator: it reproduces, more or less faithfully, the behaviour of\n"
"several arcade machines. But hardware is useless without software, so an image\n"
"of the ROMs which run on that hardware is required. Such ROMs, like any other\n"
@ -200,7 +200,7 @@ const char *mame_disclaimer =
"images is a violation of copyright law and should be promptly reported to the\n"
"authors so that appropriate legal action can be taken.\n";
const char *memory_region_names[REGION_MAX] =
const char *const memory_region_names[REGION_MAX] =
{
"REGION_INVALID",
"REGION_CPU1",

View File

@ -148,7 +148,7 @@ enum
REGION_MAX
};
extern const char *memory_region_names[REGION_MAX];
extern const char *const memory_region_names[REGION_MAX];
@ -249,7 +249,7 @@ struct _mame_system_time
***************************************************************************/
extern running_machine *Machine;
extern const char *mame_disclaimer;
extern const char mame_disclaimer[];
extern char giant_string_buffer[];
extern char build_version[];

View File

@ -14,4 +14,4 @@
#include <ctype.h>
/* a giant string buffer for temporary strings */
char giant_string_buffer[GIANT_STRING_BUFFER_SIZE];
char giant_string_buffer[GIANT_STRING_BUFFER_SIZE] = { 0 };

View File

@ -243,7 +243,7 @@ struct _addrspace_data
UINT64 unmap; /* unmapped value */
table_data read; /* memory read lookup table */
table_data write; /* memory write lookup table */
data_accessors * accessors; /* pointer to the memory accessors */
const data_accessors * accessors; /* pointer to the memory accessors */
address_map * map; /* original memory map */
address_map * adjmap; /* adjusted memory map */
};
@ -300,7 +300,7 @@ static debug_hook_read_ptr debug_hook_read; /* pointer to debugger callback f
static debug_hook_write_ptr debug_hook_write; /* pointer to debugger callback for memory writes */
#endif
static data_accessors memory_accessors[ADDRESS_SPACES][4][2] =
static const data_accessors memory_accessors[ADDRESS_SPACES][4][2] =
{
/* program accessors */
{
@ -363,7 +363,7 @@ static data_accessors memory_accessors[ADDRESS_SPACES][4][2] =
},
};
const char *address_space_names[ADDRESS_SPACES] = { "program", "data", "I/O" };
const char *const address_space_names[ADDRESS_SPACES] = { "program", "data", "I/O" };
/*-------------------------------------------------
@ -3254,7 +3254,7 @@ static genf *get_static_handler(int databits, int readorwrite, int spacenum, int
static const char *handler_to_string(const table_data *table, UINT8 entry)
{
static const char *strings[] =
static const char *const strings[] =
{
"invalid", "bank 1", "bank 2", "bank 3",
"bank 4", "bank 5", "bank 6", "bank 7",

View File

@ -591,7 +591,7 @@ struct _address_space
UINT8 * writelookup; /* write table lookup */
handler_data * readhandlers; /* read handlers */
handler_data * writehandlers; /* write handlers */
data_accessors * accessors; /* pointers to the data access handlers */
const data_accessors * accessors; /* pointers to the data access handlers */
};
@ -728,7 +728,7 @@ enum
ADDRESS_SPACES /* maximum number of address spaces */
};
extern const char *address_space_names[ADDRESS_SPACES];
extern const char *const address_space_names[ADDRESS_SPACES];
/* ----- address map lookup table definitions ----- */
#define SUBTABLE_COUNT 64 /* number of slots reserved for subtables */

View File

@ -102,7 +102,7 @@ const char *profiler_get_text(void)
int i,j;
UINT64 total,normalize;
UINT64 computed;
static const char *names[PROFILER_TOTAL] =
static const char *const names[PROFILER_TOTAL] =
{
"CPU 1 ",
"CPU 2 ",

View File

@ -1772,7 +1772,7 @@ static layout_view *load_layout_view(xml_data_node *viewnode, layout_element *el
/* loop over all the layer types we support */
for (layer = 0; layer < ITEM_LAYER_MAX; layer++)
{
static const char *layer_node_name[ITEM_LAYER_MAX] = { "backdrop", "screen", "overlay", "bezel" };
static const char *const layer_node_name[ITEM_LAYER_MAX] = { "backdrop", "screen", "overlay", "bezel" };
xml_data_node *itemnode;
/* initialize the list */

View File

@ -138,7 +138,7 @@ static long find_sample(struct c140_info *info, long adrs, long bank, int voice)
{
long newadr = 0;
static INT16 asic219banks[4] = { 0x1f7, 0x1f1, 0x1f3, 0x1f5 };
static const INT16 asic219banks[4] = { 0x1f7, 0x1f1, 0x1f3, 0x1f5 };
adrs=(bank<<16)+adrs;

View File

@ -214,7 +214,7 @@ static void c6280_write(c6280_t *p, int offset, int data)
static void c6280_update(void *param, stream_sample_t **inputs, stream_sample_t **buffer, int length)
{
static int scale_tab[] = {
static const int scale_tab[] = {
0x00, 0x03, 0x05, 0x07, 0x09, 0x0B, 0x0D, 0x0F,
0x10, 0x13, 0x15, 0x17, 0x19, 0x1B, 0x1D, 0x1F
};

View File

@ -162,7 +162,7 @@ static void CLIB_DECL discrete_log(const char *text, ...)
*
*************************************/
static discrete_module module_list[] =
static const discrete_module module_list[] =
{
{ DSO_OUTPUT ,"DSO_OUTPUT" ,0 ,NULL ,NULL },
{ DSO_CSVLOG ,"DSO_CSVLOG" ,0 ,NULL ,NULL },

View File

@ -79,10 +79,10 @@ typedef struct
UINT32 output_rate;
} ES5503Chip;
static UINT16 wavesizes[8] = { 256, 512, 1024, 2048, 4096, 8192, 16384, 32768 };
static UINT32 wavemasks[8] = { 0x1ff00, 0x1fe00, 0x1fc00, 0x1f800, 0x1f000, 0x1e000, 0x1c000, 0x18000 };
static UINT32 accmasks[8] = { 0xff, 0x1ff, 0x3ff, 0x7ff, 0xfff, 0x1fff, 0x3fff, 0x7fff };
static int resshifts[8] = { 9, 10, 11, 12, 13, 14, 15, 16 };
static const UINT16 wavesizes[8] = { 256, 512, 1024, 2048, 4096, 8192, 16384, 32768 };
static const UINT32 wavemasks[8] = { 0x1ff00, 0x1fe00, 0x1fc00, 0x1f800, 0x1f000, 0x1e000, 0x1c000, 0x18000 };
static const UINT32 accmasks[8] = { 0xff, 0x1ff, 0x3ff, 0x7ff, 0xfff, 0x1fff, 0x3fff, 0x7fff };
static const int resshifts[8] = { 9, 10, 11, 12, 13, 14, 15, 16 };
enum
{

View File

@ -11,7 +11,7 @@ struct filter_rc_info
int type;
};
flt_rc_config flt_rc_ac_default = {FLT_RC_AC, 10000, 0, 0, CAP_U(1)};
const flt_rc_config flt_rc_ac_default = {FLT_RC_AC, 10000, 0, 0, CAP_U(1)};
static void filter_rc_update(void *param, stream_sample_t **inputs, stream_sample_t **outputs, int samples)

View File

@ -52,7 +52,7 @@ struct _flt_rc_config
double C;
};
extern flt_rc_config flt_rc_ac_default;
extern const flt_rc_config flt_rc_ac_default;
void filter_rc_set_RC(int num, int type, double R1, double R2, double R3, double C);

View File

@ -2333,7 +2333,7 @@ typedef struct
UINT8 addr_A1; /* address line A1 */
/* ADPCM-A unit */
UINT8 *pcmbuf; /* pcm rom buffer */
const UINT8 *pcmbuf; /* pcm rom buffer */
UINT32 pcm_size; /* size of pcm rom */
UINT8 adpcmTL; /* adpcmA total level */
ADPCM_CH adpcm[6]; /* adpcm channels */
@ -2353,14 +2353,14 @@ typedef YM2610 YM2608;
#define ADPCM_SHIFT (16) /* frequency step rate */
#define ADPCMA_ADDRESS_SHIFT 8 /* adpcm A address shift */
static UINT8 *pcmbufA;
static const UINT8 *pcmbufA;
static UINT32 pcmsizeA;
/* Algorithm and tables verified on real YM2608 and YM2610 */
/* usual ADPCM table (16 * 1.1^N) */
static int steps[49] =
static const int steps[49] =
{
16, 17, 19, 21, 23, 25, 28,
31, 34, 37, 41, 45, 50, 55,
@ -2372,7 +2372,7 @@ static int steps[49] =
};
/* different from the usual ADPCM table */
static int step_inc[8] = { -1*16, -1*16, -1*16, -1*16, 2*16, 5*16, 7*16, 9*16 };
static const int step_inc[8] = { -1*16, -1*16, -1*16, -1*16, 2*16, 5*16, 7*16, 9*16 };
/* speedup purposes only */
static int jedi_table[ 49*16 ];
@ -2599,7 +2599,7 @@ static void FMsave_state_adpcma(const char *name,int num,ADPCM_CH *adpcm)
static unsigned int YM2608_ADPCM_ROM_addr[2*6] = {
static const unsigned int YM2608_ADPCM_ROM_addr[2*6] = {
0x0000, 0x01bf, /* bass drum */
0x01c0, 0x043f, /* snare drum */
0x0440, 0x1b7f, /* top cymbal */
@ -2614,7 +2614,7 @@ static unsigned int YM2608_ADPCM_ROM_addr[2*6] = {
It was verified, using real YM2608, that this ADPCM stream produces 100% correct output signal.
*/
static unsigned char YM2608_ADPCM_ROM[0x2000] = {
static const unsigned char YM2608_ADPCM_ROM[0x2000] = {
/* Source: 01BD.ROM */
/* Length: 448 / 0x000001C0 */
@ -4119,7 +4119,7 @@ void *YM2610Init(void *param, int index, int clock, int rate,
F2610->OPN.ST.IRQ_Handler = IRQHandler;
F2610->OPN.ST.SSG = ssg;
/* ADPCM */
F2610->pcmbuf = (UINT8 *)pcmroma;
F2610->pcmbuf = (const UINT8 *)pcmroma;
F2610->pcm_size = pcmsizea;
/* DELTA-T */
F2610->deltaT.memory = (UINT8 *)pcmromb;

View File

@ -58,7 +58,7 @@ typedef struct kdacApcm
#if 0
static int kdac_note[] = {
static const int kdac_note[] = {
261.63/8, 277.18/8,
293.67/8, 311.13/8,
329.63/8,
@ -70,7 +70,7 @@ static int kdac_note[] = {
523.25/8,
};
static float kdaca_fn[][2] = {
static const float kdaca_fn[][2] = {
/* B */
{ 0x03f, 493.88/8 }, /* ?? */
{ 0x11f, 493.88/4 }, /* ?? */

View File

@ -95,7 +95,7 @@ INLINE int limit( int val, int max, int min ) {
#define MINOUT -0x8000
static void K053260_update( void * param, stream_sample_t **inputs, stream_sample_t **buffer, int length ) {
static long dpcmcnv[] = { 0,1,2,4,8,16,32,64, -128, -64, -32, -16, -8, -4, -2, -1};
static const long dpcmcnv[] = { 0,1,2,4,8,16,32,64, -128, -64, -32, -16, -8, -4, -2, -1};
int i, j, lvol[4], rvol[4], play[4], loop[4], ppcm_data[4], ppcm[4];
unsigned char *rom[4];

View File

@ -123,7 +123,7 @@ static void K054539_update(void *param, stream_sample_t **inputs, stream_sample_
struct k054539_info *info = param;
#define VOL_CAP 1.80
static INT16 dpcm[16] = {
static const INT16 dpcm[16] = {
0<<8, 1<<8, 4<<8, 9<<8, 16<<8, 25<<8, 36<<8, 49<<8,
-64<<8, -49<<8, -36<<8, -25<<8, -16<<8, -9<<8, -4<<8, -1<<8
};
@ -368,7 +368,7 @@ else
#if CHANNEL_DEBUG
{
static char gc_msg[32] = "chip : ";
static const char gc_msg[32] = "chip : ";
static int gc_active=0, gc_chip=0, gc_pos[2]={0,0};
double *gc_fptr;
char *gc_cptr;

View File

@ -179,8 +179,8 @@ static void msm5232_init_tables( MSM5232 *chip )
#if 0
{
/* rate tables (in miliseconds) */
static int ATBL[8] = { 2,4,8,16, 32,64, 32,64};
static int DTBL[16]= { 40,80,160,320, 640,1280, 640,1280,
static const int ATBL[8] = { 2,4,8,16, 32,64, 32,64};
static const int DTBL[16]= { 40,80,160,320, 640,1280, 640,1280,
333,500,1000,2000, 4000,8000, 4000,8000};
for (i=0; i<8; i++)
{

View File

@ -35,7 +35,7 @@
#define MULTIPCM_CLOCKDIV (360.0)
#define MULTIPCM_ONE (18)
static int ctbl[] =
static const int ctbl[] =
{
0, 1, 2, 3, 4, 5, 6 , -1, // voice number mapping
7, 8, 9, 10,11,12,13, -1,
@ -43,7 +43,7 @@ static int ctbl[] =
21,22,23,24,25,26,27, -1,
};
static int decaytbl[16] = // decay times
static const int decaytbl[16] = // decay times
{
0, 300, 800, 1400,
2100, 3000, 4000, 5200,

View File

@ -86,7 +86,7 @@ const struct OKIM6295interface okim6295_interface_region_4_pin7low = { REGION_SO
static void compute_tables(void)
{
/* nibble to bit map */
static int nbl2bit[16][4] =
static const int nbl2bit[16][4] =
{
{ 1, 0, 0, 0}, { 1, 0, 0, 1}, { 1, 0, 1, 0}, { 1, 0, 1, 1},
{ 1, 1, 0, 0}, { 1, 1, 0, 1}, { 1, 1, 1, 0}, { 1, 1, 1, 1},

Some files were not shown because too many files have changed in this diff Show More