From 2993e850bbe44f8e7992877bd1e5a767f762b1ac Mon Sep 17 00:00:00 2001 From: Vas Crabb Date: Thu, 20 Sep 2018 11:42:37 +1000 Subject: (nw) fix lots of inadverently mutable static pointers --- src/devices/bus/hexbus/hx5102.cpp | 2 +- src/devices/cpu/alto2/a2disk.cpp | 4 ++-- src/devices/cpu/alto2/a2emu.cpp | 4 ++-- src/devices/cpu/arc/arcdasm.cpp | 8 ++++---- src/devices/cpu/arc/arcdasm.h | 8 ++++---- src/devices/cpu/arm/arm.cpp | 2 +- src/devices/cpu/m37710/m37710.cpp | 6 +++--- src/devices/cpu/m37710/m37710.h | 6 +++--- src/devices/cpu/m68000/m68kdasm.cpp | 4 ++-- src/devices/cpu/mb86233/mb86233d.cpp | 8 ++++---- src/devices/cpu/mb86235/mb86235d.cpp | 22 +++++++++++----------- src/devices/cpu/mb86235/mb86235d.h | 22 +++++++++++----------- src/devices/cpu/mips/vudasm.cpp | 12 ++++++------ src/devices/cpu/mips/vudasm.h | 12 ++++++------ src/devices/cpu/pps4/pps4dasm.cpp | 4 ++-- src/devices/cpu/pps4/pps4dasm.h | 4 ++-- src/devices/cpu/st62xx/st62xx_dasm.cpp | 2 +- src/devices/cpu/tms32082/dis_mp.cpp | 14 +++++++------- src/devices/cpu/tms32082/dis_mp.h | 14 +++++++------- src/devices/cpu/tms32082/dis_pp.cpp | 6 +++--- src/devices/cpu/tms32082/dis_pp.h | 6 +++--- src/devices/cpu/tms9900/tms9900.cpp | 4 ++-- src/devices/cpu/tms9900/tms9900.h | 2 +- src/devices/cpu/tms9900/tms9995.cpp | 4 ++-- src/devices/cpu/tms9900/tms9995.h | 2 +- src/devices/cpu/unsp/unspdasm.cpp | 6 +++--- src/devices/cpu/unsp/unspdasm.h | 6 +++--- src/devices/cpu/z80/tmpz84c015.cpp | 4 ++-- src/devices/imagedev/cassette.cpp | 2 +- src/devices/imagedev/diablo.cpp | 2 +- src/devices/imagedev/harddriv.cpp | 2 +- src/devices/machine/53c7xx.cpp | 6 +++--- src/devices/machine/amigafdc.cpp | 10 +++++----- src/devices/machine/ioptimer.cpp | 2 +- src/devices/machine/ncr539x.cpp | 4 ++-- src/devices/machine/nscsi_bus.cpp | 2 +- src/devices/machine/ps2dma.cpp | 2 +- src/devices/machine/ps2timer.cpp | 4 ++-- src/devices/machine/rtc4543.cpp | 4 ++-- src/devices/machine/rtc4543.h | 2 +- src/devices/sound/spu.cpp | 6 +++--- src/devices/video/gba_lcd.cpp | 8 ++++---- src/devices/video/ps2gs.cpp | 10 +++++----- src/devices/video/ps2gs.h | 6 +++--- src/emu/softlist.cpp | 14 +++++++------- src/emu/validity.cpp | 2 +- src/frontend/mame/ui/ui.cpp | 6 +++--- src/lib/formats/cbm_crt.cpp | 5 +++-- src/lib/netlist/plib/ptypes.h | 4 ++-- src/mame/drivers/geneve.cpp | 2 +- src/mame/drivers/indy_indigo2.cpp | 16 ++++++++-------- src/mame/drivers/next.cpp | 8 ++++---- src/mame/drivers/ps2sony.cpp | 2 +- src/mame/drivers/stratos.cpp | 2 +- src/mame/drivers/ti990_4.cpp | 2 +- src/mame/drivers/ti99_4p.cpp | 2 +- src/mame/drivers/ti99_4x.cpp | 2 +- src/mame/drivers/ti99_8.cpp | 2 +- src/mame/includes/next.h | 8 ++++---- src/mame/includes/xbox_nv2a.h | 14 +++++++------- src/mame/machine/apollo_dbg.cpp | 16 ++++++++-------- src/mame/machine/esqpanel.h | 4 ---- src/mame/machine/ioc2.cpp | 12 ++++++------ src/mame/machine/ioc2.h | 12 ++++++------ src/mame/machine/macadb.cpp | 4 ++-- src/mame/machine/psion_pack.cpp | 2 +- src/mame/video/apollo.cpp | 6 +++--- src/mame/video/k053250_ps.cpp | 2 +- src/mame/video/n64.cpp | 12 ++++++------ src/mame/video/n64.h | 16 ++++++++-------- src/mame/video/xbox_nv2a.cpp | 14 +++++++------- src/osd/modules/opengl/gl_shader_mgr.cpp | 10 +++++----- src/osd/modules/render/drawbgfx.cpp | 8 ++++---- src/osd/modules/render/drawbgfx.h | 2 +- 74 files changed, 239 insertions(+), 242 deletions(-) diff --git a/src/devices/bus/hexbus/hx5102.cpp b/src/devices/bus/hexbus/hx5102.cpp index 580fad0e55e..cb715ec51fe 100644 --- a/src/devices/bus/hexbus/hx5102.cpp +++ b/src/devices/bus/hexbus/hx5102.cpp @@ -151,7 +151,7 @@ hx5102_device::hx5102_device(const machine_config &mconfig, const char *tag, dev WRITE8_MEMBER( hx5102_device::external_operation ) { - static const char* extop[8] = { "inv1", "inv2", "IDLE", "RSET", "inv3", "CKON", "CKOF", "LREX" }; + static char const *const extop[8] = { "inv1", "inv2", "IDLE", "RSET", "inv3", "CKON", "CKOF", "LREX" }; if (offset != IDLE_OP) LOGMASKED(LOG_WARN, "External operation %s not implemented on HX5102 board\n", extop[offset]); } diff --git a/src/devices/cpu/alto2/a2disk.cpp b/src/devices/cpu/alto2/a2disk.cpp index b9d44dacc9f..fa9392695dc 100644 --- a/src/devices/cpu/alto2/a2disk.cpp +++ b/src/devices/cpu/alto2/a2disk.cpp @@ -89,8 +89,8 @@ enum { #if ALTO2_DEBUG /** @brief human readable names for the KADR<- modes */ -static const char *rwc_name[4] = {"read", "check", "write", "write2"}; -static const char* raise_lower[2] = {"/","\\"}; +static char const *const rwc_name[4] = {"read", "check", "write", "write2"}; +static char const *const raise_lower[2] = {"/","\\"}; #endif /** diff --git a/src/devices/cpu/alto2/a2emu.cpp b/src/devices/cpu/alto2/a2emu.cpp index c5a4caccb76..a7ea40a6aca 100644 --- a/src/devices/cpu/alto2/a2emu.cpp +++ b/src/devices/cpu/alto2/a2emu.cpp @@ -489,8 +489,8 @@ void alto2_cpu_device::f2_early_acdest() #if ALTO2_DEBUG void alto2_cpu_device::bitblt_info() { - static const char *type_name[4] = {"bitmap","complement","and gray","gray"}; - static const char *oper_name[4] = {"replace","paint","invert","erase"}; + static char const *const type_name[4] = {"bitmap","complement","and gray","gray"}; + static char const *const oper_name[4] = {"replace","paint","invert","erase"}; int bbt = m_r[rsel_ac2]; int val = debug_read_mem(bbt); diff --git a/src/devices/cpu/arc/arcdasm.cpp b/src/devices/cpu/arc/arcdasm.cpp index fa7b6f2028e..218352cd56c 100644 --- a/src/devices/cpu/arc/arcdasm.cpp +++ b/src/devices/cpu/arc/arcdasm.cpp @@ -15,7 +15,7 @@ /*****************************************************************************/ -const char *const arc_disassembler::basic[0x20] = +char const *const arc_disassembler::basic[0x20] = { /* 00 */ "LD r+r", /* 01 */ "LD r+o", @@ -51,7 +51,7 @@ const char *const arc_disassembler::basic[0x20] = /* 1f */ "MIN" }; -const char *arc_disassembler::conditions[0x20] = +char const *const arc_disassembler::conditions[0x20] = { /* 00 */ "AL", // (aka RA - Always) /* 01 */ "EQ", // (aka Z - Zero @@ -87,7 +87,7 @@ const char *arc_disassembler::conditions[0x20] = /* 1f */ "0x1f Reserved" }; -const char *arc_disassembler::delaytype[0x4] = +char const *const arc_disassembler::delaytype[0x4] = { "ND", // NO DELAY - execute next instruction only when NOT jumping "D", // always execute next instruction @@ -95,7 +95,7 @@ const char *arc_disassembler::delaytype[0x4] = "Res!", // reserved / invalid }; -const char *arc_disassembler::regnames[0x40] = +char const *const arc_disassembler::regnames[0x40] = { /* 0x00 */ "r00", /* 0x01 */ "r01", diff --git a/src/devices/cpu/arc/arcdasm.h b/src/devices/cpu/arc/arcdasm.h index a6bfe559f25..19d774fab05 100644 --- a/src/devices/cpu/arc/arcdasm.h +++ b/src/devices/cpu/arc/arcdasm.h @@ -21,10 +21,10 @@ public: virtual offs_t disassemble(std::ostream &stream, offs_t pc, const data_buffer &opcodes, const data_buffer ¶ms) override; private: - static const char *const basic[0x20]; - static const char *conditions[0x20]; - static const char *delaytype[0x4]; - static const char *regnames[0x40]; + static char const *const basic[0x20]; + static char const *const conditions[0x20]; + static char const *const delaytype[0x4]; + static char const *const regnames[0x40]; }; diff --git a/src/devices/cpu/arm/arm.cpp b/src/devices/cpu/arm/arm.cpp index c2036ab166d..1ad73f69684 100644 --- a/src/devices/cpu/arm/arm.cpp +++ b/src/devices/cpu/arm/arm.cpp @@ -563,7 +563,7 @@ void arm_cpu_device::device_start() void arm_cpu_device::state_string_export(const device_state_entry &entry, std::string &str) const { - static const char *s[4] = { "USER", "FIRQ", "IRQ ", "SVC " }; + static char const *const s[4] = { "USER", "FIRQ", "IRQ ", "SVC " }; switch (entry.index()) { diff --git a/src/devices/cpu/m37710/m37710.cpp b/src/devices/cpu/m37710/m37710.cpp index 93a14524452..e7640c92d20 100644 --- a/src/devices/cpu/m37710/m37710.cpp +++ b/src/devices/cpu/m37710/m37710.cpp @@ -692,7 +692,7 @@ WRITE8_MEMBER(m37710_cpu_device::m37710_internal_w) } } -const m37710_cpu_device::opcode_func *m37710_cpu_device::m37710i_opcodes[4] = +const m37710_cpu_device::opcode_func *const m37710_cpu_device::m37710i_opcodes[4] = { m37710i_opcodes_M0X0, m37710i_opcodes_M0X1, @@ -700,7 +700,7 @@ const m37710_cpu_device::opcode_func *m37710_cpu_device::m37710i_opcodes[4] = m37710i_opcodes_M1X1, }; -const m37710_cpu_device::opcode_func *m37710_cpu_device::m37710i_opcodes2[4] = +const m37710_cpu_device::opcode_func *const m37710_cpu_device::m37710i_opcodes2[4] = { m37710i_opcodes42_M0X0, m37710i_opcodes42_M0X1, @@ -708,7 +708,7 @@ const m37710_cpu_device::opcode_func *m37710_cpu_device::m37710i_opcodes2[4] = m37710i_opcodes42_M1X1, }; -const m37710_cpu_device::opcode_func *m37710_cpu_device::m37710i_opcodes3[4] = +const m37710_cpu_device::opcode_func *const m37710_cpu_device::m37710i_opcodes3[4] = { m37710i_opcodes89_M0X0, m37710i_opcodes89_M0X1, diff --git a/src/devices/cpu/m37710/m37710.h b/src/devices/cpu/m37710/m37710.h index d1750b8e2f6..c96301013b6 100644 --- a/src/devices/cpu/m37710/m37710.h +++ b/src/devices/cpu/m37710/m37710.h @@ -202,9 +202,9 @@ private: static const int m37710_irq_vectors[M37710_LINE_MAX]; static const char *const m37710_rnames[128]; static const char *const m37710_tnames[8]; - static const opcode_func *m37710i_opcodes[4]; - static const opcode_func *m37710i_opcodes2[4]; - static const opcode_func *m37710i_opcodes3[4]; + static const opcode_func *const m37710i_opcodes[4]; + static const opcode_func *const m37710i_opcodes2[4]; + static const opcode_func *const m37710i_opcodes3[4]; static const get_reg_func m37710i_get_reg[4]; static const set_reg_func m37710i_set_reg[4]; static const set_line_func m37710i_set_line[4]; diff --git a/src/devices/cpu/m68000/m68kdasm.cpp b/src/devices/cpu/m68000/m68kdasm.cpp index 7a0163c93e7..86c97eee7b1 100644 --- a/src/devices/cpu/m68000/m68kdasm.cpp +++ b/src/devices/cpu/m68000/m68kdasm.cpp @@ -977,7 +977,7 @@ std::string m68k_disassembler::d68040_cinv() if(limit.first) return limit.second; - static const char *cachetype[4] = { "nop", "data", "inst", "both" }; + static char const *const cachetype[4] = { "nop", "data", "inst", "both" }; switch((m_cpu_ir>>3)&3) { @@ -1241,7 +1241,7 @@ std::string m68k_disassembler::d68040_cpush() if(limit.first) return limit.second; - static const char *cachetype[4] = { "nop", "data", "inst", "both" }; + static char const *const cachetype[4] = { "nop", "data", "inst", "both" }; switch((m_cpu_ir>>3)&3) { diff --git a/src/devices/cpu/mb86233/mb86233d.cpp b/src/devices/cpu/mb86233/mb86233d.cpp index 4530783515d..e4b82cf5484 100644 --- a/src/devices/cpu/mb86233/mb86233d.cpp +++ b/src/devices/cpu/mb86233/mb86233d.cpp @@ -87,7 +87,7 @@ -const char *const mb86233_disassembler::regnames[0x40] = { +char const *const mb86233_disassembler::regnames[0x40] = { "b0", "b1", "x0", "x1", "x2", "i0", "i1", "i2", "sp", "pag", "vsm", "dmc", "c0", "c1", "pc", "-", "a", "ah", "al", "b", "bh", "bl", "c", "ch", "cl", "d", "dh", "dl", "p", "ph", "pl", "sft", "rf0", "rf1", "rf2", "rf3", "rf4", "rf5", "rf6", "rf7", "rf8", "rf9", "rfa", "rfb", "rfc", "rfd", "rfe", "rff", @@ -384,7 +384,7 @@ offs_t mb86233_disassembler::disassemble(std::ostream &stream, offs_t pc, const util::stream_format(stream, "stmh"); if(opcode & 0x0001) util::stream_format(stream, " fp"); - static const char *const round_mode[4] = { "rn", "rp", "rm", "rz" }; + static char const *const round_mode[4] = { "rn", "rp", "rm", "rz" }; util::stream_format(stream, " %s", round_mode[(opcode >> 1) & 3]); break; } @@ -397,7 +397,7 @@ offs_t mb86233_disassembler::disassemble(std::ostream &stream, offs_t pc, const } case 0x0e: { // Load 24 bit val - static const char *const inst[4] = { "lipl", "lia", "lib", "lid" }; + static char const *const inst[4] = { "lipl", "lia", "lib", "lid" }; util::stream_format(stream, "%s #0x%x", inst[(opcode >> 24) & 0x3], opcode&0xffffff); break; } @@ -411,7 +411,7 @@ offs_t mb86233_disassembler::disassemble(std::ostream &stream, offs_t pc, const switch(sub2) { case 0: { - static const char *rl2[16] = { + static char const *const rl2[16] = { "?0", "?1", "a", "b", "d", "?5", "?6", "?7", "?8", "?9", "?a", "?b", "?c", "?d", "?e", "?f" }; util::stream_format(stream, "clr0"); diff --git a/src/devices/cpu/mb86235/mb86235d.cpp b/src/devices/cpu/mb86235/mb86235d.cpp index ca31dbca720..7c361b44b1f 100644 --- a/src/devices/cpu/mb86235/mb86235d.cpp +++ b/src/devices/cpu/mb86235/mb86235d.cpp @@ -3,7 +3,7 @@ #include "emu.h" #include "mb86235d.h" -const char *mb86235_disassembler::regname[128] = +char const *const mb86235_disassembler::regname[128] = { "MA0", "MA1", "MA2", "MA3", "MA4", "MA5", "MA6", "MA7", "AA0", "AA1", "AA2", "AA3", "AA4", "AA5", "AA6", "AA7", @@ -15,7 +15,7 @@ const char *mb86235_disassembler::regname[128] = "???", "???", "???", "???", "???", "???", "???", "???" }; -const char *mb86235_disassembler::db_mnemonic[64] = +char const *const mb86235_disassembler::db_mnemonic[64] = { "DBMN", "DBMZ", "DBMV", "DBMU", "DBZD", "DBNR", "DBIL", "DBZC", "DBAN", "DBAZ", "DBAV", "DBAU", "DBMD", "DBAD", "???", "???", @@ -27,7 +27,7 @@ const char *mb86235_disassembler::db_mnemonic[64] = "???", "???", "???", "???", "???", "???", "???", "???" }; -const char *mb86235_disassembler::dbn_mnemonic[64] = +char const *const mb86235_disassembler::dbn_mnemonic[64] = { "DBNMN", "DBNMZ", "DBNMV", "DBNMU", "DBNZD", "DBNNR", "DBNIL", "DBNZC", "DBNAN", "DBNAZ", "DBNAV", "DBNAU", "DBNMD", "DBNAD", "???", "???", @@ -39,7 +39,7 @@ const char *mb86235_disassembler::dbn_mnemonic[64] = "???", "???", "???", "???", "???", "???", "???", "???" }; -const char *mb86235_disassembler::dc_mnemonic[64] = +char const *const mb86235_disassembler::dc_mnemonic[64] = { "DCMN", "DCMZ", "DCMV", "DCMU", "DCZD", "DCNR", "DCIL", "DCZC", "DCAN", "DCAZ", "DCAV", "DCAU", "DCMD", "DCAD", "???", "???", @@ -51,7 +51,7 @@ const char *mb86235_disassembler::dc_mnemonic[64] = "???", "???", "???", "???", "???", "???", "???", "???" }; -const char *mb86235_disassembler::dcn_mnemonic[64] = +char const *const mb86235_disassembler::dcn_mnemonic[64] = { "DCNMN", "DCNMZ", "DCNMV", "DCNMU", "DCNZD", "DCNNR", "DCNIL", "DCNZC", "DCNAN", "DCNAZ", "DCNAV", "DCNAU", "DCNMD", "DCNAD", "???", "???", @@ -63,25 +63,25 @@ const char *mb86235_disassembler::dcn_mnemonic[64] = "???", "???", "???", "???", "???", "???", "???", "???" }; -const char *mb86235_disassembler::mi1_field[16] = +char const *const mb86235_disassembler::mi1_field[16] = { "MA0", "MA1", "MA2", "MA3", "MA4", "MA5", "MA6", "MA7", "MB0", "MB1", "MB2", "MB3", "MB4", "MB5", "MB6", "MB7" }; -const char *mb86235_disassembler::mi2_field[32] = +char const *const mb86235_disassembler::mi2_field[32] = { "MA0", "MA1", "MA2", "MA3", "MA4", "MA5", "MA6", "MA7", "MB0", "MB1", "MB2", "MB3", "MB4", "MB5", "MB6", "MB7", "PR", "PR++", "PR--", "PR#0", "???", "???", "???", "???", "-1.0E+0", "0.0E+0", "0.5E+0", "1.0E+0", "1.5E+0", "2.0E+0", "3.0E+0", "5.0E+0" }; -const char *mb86235_disassembler::mo_field[32] = +char const *const mb86235_disassembler::mo_field[32] = { "MA0", "MA1", "MA2", "MA3", "MA4", "MA5", "MA6", "MA7", "MB0", "MB1", "MB2", "MB3", "MB4", "MB5", "MB6", "MB7", "AA0", "AA1", "AA2", "AA3", "AA4", "AA5", "AA6", "AA7", "AB0", "AB1", "AB2", "AB3", "AB4", "AB5", "AB6", "AB7" }; -const char *mb86235_disassembler::ai1_field[16] = +char const *const mb86235_disassembler::ai1_field[16] = { "AA0", "AA1", "AA2", "AA3", "AA4", "AA5", "AA6", "AA7", "AB0", "AB1", "AB2", "AB3", "AB4", "AB5", "AB6", "AB7" }; -const char *mb86235_disassembler::ai2_field[32] = +char const *const mb86235_disassembler::ai2_field[32] = { "AA0", "AA1", "AA2", "AA3", "AA4", "AA5", "AA6", "AA7", "AB0", "AB1", "AB2", "AB3", "AB4", "AB5", "AB6", "AB7", "PR", "PR++", "PR--", "PR#0", "???", "???", "???", "???", "0", "1", "-1", "???", "???", "???", "???", "???" }; -const char *mb86235_disassembler::ai2f_field[32] = +char const *const mb86235_disassembler::ai2f_field[32] = { "AA0", "AA1", "AA2", "AA3", "AA4", "AA5", "AA6", "AA7", "AB0", "AB1", "AB2", "AB3", "AB4", "AB5", "AB6", "AB7", "PR", "PR++", "PR--", "PR#0", "???", "???", "???", "???", "-1.0E+0", "0.0E+0", "0.5E+0", "1.0E+0", "1.5E+0", "2.0E+0", "3.0E+0", "5.0E+0" }; diff --git a/src/devices/cpu/mb86235/mb86235d.h b/src/devices/cpu/mb86235/mb86235d.h index 4f9a3c1ed2d..d3f8d2150e9 100644 --- a/src/devices/cpu/mb86235/mb86235d.h +++ b/src/devices/cpu/mb86235/mb86235d.h @@ -15,17 +15,17 @@ public: virtual offs_t disassemble(std::ostream &stream, offs_t pc, const data_buffer &opcodes, const data_buffer ¶ms) override; private: - static const char *regname[128]; - static const char *db_mnemonic[64]; - static const char *dbn_mnemonic[64]; - static const char *dc_mnemonic[64]; - static const char *dcn_mnemonic[64]; - static const char *mi1_field[16]; - static const char *mi2_field[32]; - static const char *mo_field[32]; - static const char *ai1_field[16]; - static const char *ai2_field[32]; - static const char *ai2f_field[32]; + static char const *const regname[128]; + static char const *const db_mnemonic[64]; + static char const *const dbn_mnemonic[64]; + static char const *const dc_mnemonic[64]; + static char const *const dcn_mnemonic[64]; + static char const *const mi1_field[16]; + static char const *const mi2_field[32]; + static char const *const mo_field[32]; + static char const *const ai1_field[16]; + static char const *const ai2_field[32]; + static char const *const ai2f_field[32]; void dasm_ea(std::ostream &stream, int md, int arx, int ary, int disp); void dasm_alu_mul(std::ostream &stream, uint64_t opcode, bool twoop); diff --git a/src/devices/cpu/mips/vudasm.cpp b/src/devices/cpu/mips/vudasm.cpp index cb207498d1d..4b4cbd4247a 100644 --- a/src/devices/cpu/mips/vudasm.cpp +++ b/src/devices/cpu/mips/vudasm.cpp @@ -9,22 +9,22 @@ #include "emu.h" #include "vudasm.h" -/*static*/ const char* sonyvu_disassembler::DEST_STR[] = +/*static*/ char const *const sonyvu_disassembler::DEST_STR[] = { " ", "w ", "z ", "zw ", "y ", "yw ", "yz ", "yzw ", "x ", "xw ", "xz ", "xzw ", "xy ", "xyw ", "xyz ", "xyzw" }; -/*static*/ const char* sonyvu_disassembler::DEST_COMMA_STR[] = +/*static*/ char const *const sonyvu_disassembler::DEST_COMMA_STR[] = { ",", "w,", "z,", "zw,", "y,", "yw,", "yz,", "yzw,", "x,", "xw,", "xz,", "xzw,", "xy,", "xyw,", "xyz,", "xyzw," }; -/*static*/ const char* sonyvu_disassembler::BC_STR[] = { "x", "y", "z", "w" }; -/*static*/ const char* sonyvu_disassembler::BC_COMMA_STR[] = { "x,", "y,", "z,", "w," }; +/*static*/ char const *const sonyvu_disassembler::BC_STR[] = { "x", "y", "z", "w" }; +/*static*/ char const *const sonyvu_disassembler::BC_COMMA_STR[] = { "x,", "y,", "z,", "w," }; -/*static*/ const char* sonyvu_disassembler::VFREG[] = +/*static*/ char const *const sonyvu_disassembler::VFREG[] = { "$vf00", "$vf01", "$vf02", "$vf03", "$vf04", "$vf05", "$vf06", "$vf07", "$vf08", "$vf09", "$vf10", "$vf11", "$vf12", "$vf13", "$vf14", "$vf15", @@ -32,7 +32,7 @@ "$vf24", "$vf25", "$vf26", "$vf27", "$vf28", "$vf29", "$vf30", "$vf31" }; -/*static*/ const char* sonyvu_disassembler::VIREG[] = +/*static*/ char const *const sonyvu_disassembler::VIREG[] = { "$vi00", "$vi01", "$vi02", "$vi03", "$vi04", "$vi05", "$vi06", "$vi07", "$vi08", "$vi09", "$vi10", "$vi11", "$vi12", "$vi13", "$vi14", "$vi15", diff --git a/src/devices/cpu/mips/vudasm.h b/src/devices/cpu/mips/vudasm.h index abd67ed89aa..fff498404ee 100644 --- a/src/devices/cpu/mips/vudasm.h +++ b/src/devices/cpu/mips/vudasm.h @@ -30,12 +30,12 @@ private: std::string signed_11bit_x8(uint16_t val); std::string signed_15bit(uint16_t val); - static const char * DEST_STR[16]; - static const char * DEST_COMMA_STR[16]; - static const char * BC_STR[16]; - static const char * BC_COMMA_STR[16]; - static const char * VFREG[32]; - static const char * VIREG[32]; + static char const *const DEST_STR[16]; + static char const *const DEST_COMMA_STR[16]; + static char const *const BC_STR[16]; + static char const *const BC_COMMA_STR[16]; + static char const *const VFREG[32]; + static char const *const VIREG[32]; }; #endif // MAME_CPU_MIPS_VUDASM_H diff --git a/src/devices/cpu/pps4/pps4dasm.cpp b/src/devices/cpu/pps4/pps4dasm.cpp index edb15db12b3..d14912385c8 100644 --- a/src/devices/cpu/pps4/pps4dasm.cpp +++ b/src/devices/cpu/pps4/pps4dasm.cpp @@ -13,7 +13,7 @@ #include "emu.h" #include "pps4dasm.h" -const char *pps4_disassembler::token_str[t_COUNT] = { +char const *const pps4_disassembler::token_str[t_COUNT] = { "ad", /* add */ "adc", /* add with carry-in */ "adsk", /* add and skip on carry-out */ @@ -66,7 +66,7 @@ const char *pps4_disassembler::token_str[t_COUNT] = { "sag" /* special address generation */ }; -const uint16_t pps4_disassembler::table[] = { +uint16_t const pps4_disassembler::table[] = { /* 00 */ t_LBL | t_I8c, /* 01 */ t_TML | t_I4 | t_I8, /* 02 */ t_TML | t_I4 | t_I8, diff --git a/src/devices/cpu/pps4/pps4dasm.h b/src/devices/cpu/pps4/pps4dasm.h index 7e0f0ab9b91..04bfa732144 100644 --- a/src/devices/cpu/pps4/pps4dasm.h +++ b/src/devices/cpu/pps4/pps4dasm.h @@ -51,8 +51,8 @@ private: t_OUT = 1 << 15 /* Debugger step out (RETURN) */ } pps4_token_e; - static const char *token_str[t_COUNT]; - static const uint16_t table[]; + static char const *const token_str[t_COUNT]; + static uint16_t const table[]; }; diff --git a/src/devices/cpu/st62xx/st62xx_dasm.cpp b/src/devices/cpu/st62xx/st62xx_dasm.cpp index 7328cc32a7c..6905a918611 100644 --- a/src/devices/cpu/st62xx/st62xx_dasm.cpp +++ b/src/devices/cpu/st62xx/st62xx_dasm.cpp @@ -19,7 +19,7 @@ uint32_t st62xx_disassembler::opcode_alignment() const std::string st62xx_disassembler::reg_name(const uint8_t reg) { - static const char* REG_NAMES[256] = + static char const *const REG_NAMES[256] = { nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, diff --git a/src/devices/cpu/tms32082/dis_mp.cpp b/src/devices/cpu/tms32082/dis_mp.cpp index 75c63543256..be0f9d92074 100644 --- a/src/devices/cpu/tms32082/dis_mp.cpp +++ b/src/devices/cpu/tms32082/dis_mp.cpp @@ -8,7 +8,7 @@ #define SIMM15(v) (int32_t)((v & 0x4000) ? (v | 0xffffe000) : (v)) #define UIMM15(v) (v) -const char *tms32082_mp_disassembler::BCND_CONDITION[32] = +char const *const tms32082_mp_disassembler::BCND_CONDITION[32] = { "nev.b", "gt0.b", "eq0.b", "ge0.b", "lt0.b", "ne0.b", "le0.b", "alw.b", "nev.h", "gt0.h", "eq0.h", "ge0.h", "lt0.h", "ne0.h", "le0.h", "alw.h", @@ -16,7 +16,7 @@ const char *tms32082_mp_disassembler::BCND_CONDITION[32] = "nev.d", "gt0.d", "eq0.d", "ge0.d", "lt0.d", "ne0.d", "le0.d", "alw.d", }; -const char *tms32082_mp_disassembler::BITNUM_CONDITION[32] = +char const *const tms32082_mp_disassembler::BITNUM_CONDITION[32] = { "eq.b", "ne.b", "gt.b", "le.b", "lt.b", "ge.b", "hi.b", "ls.b", "lo.b", "hs.b", "eq.h", "ne.h", "gt.h", "le.h", "lt.h", "ge.h", @@ -24,27 +24,27 @@ const char *tms32082_mp_disassembler::BITNUM_CONDITION[32] = "lt.w", "ge.w", "hi.w", "ls.w", "lo.w", "hs.w", "?", "?", }; -const char *tms32082_mp_disassembler::MEMOP_S[2] = +char const *const tms32082_mp_disassembler::MEMOP_S[2] = { ":s", "" }; -const char *tms32082_mp_disassembler::MEMOP_M[2] = +char const *const tms32082_mp_disassembler::MEMOP_M[2] = { ":m", "" }; -const char *tms32082_mp_disassembler::FLOATOP_PRECISION[4] = +char const *const tms32082_mp_disassembler::FLOATOP_PRECISION[4] = { "s", "d", "i", "u" }; -const char *tms32082_mp_disassembler::ACC_SEL[4] = +char const *const tms32082_mp_disassembler::ACC_SEL[4] = { "A0", "A1", "A2", "A3" }; -const char *tms32082_mp_disassembler::FLOATOP_ROUND[4] = +char const *const tms32082_mp_disassembler::FLOATOP_ROUND[4] = { "n", "z", "p", "m" }; diff --git a/src/devices/cpu/tms32082/dis_mp.h b/src/devices/cpu/tms32082/dis_mp.h index 8c3a0721c1a..d04383cf05d 100644 --- a/src/devices/cpu/tms32082/dis_mp.h +++ b/src/devices/cpu/tms32082/dis_mp.h @@ -17,13 +17,13 @@ public: virtual offs_t disassemble(std::ostream &stream, offs_t pc, const data_buffer &opcodes, const data_buffer ¶ms) override; private: - static const char *BCND_CONDITION[32]; - static const char *BITNUM_CONDITION[32]; - static const char *MEMOP_S[2]; - static const char *MEMOP_M[2]; - static const char *FLOATOP_PRECISION[4]; - static const char *ACC_SEL[4]; - static const char *FLOATOP_ROUND[4]; + static char const *const BCND_CONDITION[32]; + static char const *const BITNUM_CONDITION[32]; + static char const *const MEMOP_S[2]; + static char const *const MEMOP_M[2]; + static char const *const FLOATOP_PRECISION[4]; + static char const *const ACC_SEL[4]; + static char const *const FLOATOP_ROUND[4]; std::ostream *output; diff --git a/src/devices/cpu/tms32082/dis_pp.cpp b/src/devices/cpu/tms32082/dis_pp.cpp index 8a3a6475ba0..8d15555b610 100644 --- a/src/devices/cpu/tms32082/dis_pp.cpp +++ b/src/devices/cpu/tms32082/dis_pp.cpp @@ -5,7 +5,7 @@ #include "emu.h" #include "dis_pp.h" -const char *tms32082_pp_disassembler::REG_NAMES[128] = +char const *const tms32082_pp_disassembler::REG_NAMES[128] = { // 0 - 15 "a0", "a1", "a2", "a3", "a4", "???", "a6", "a7", @@ -33,7 +33,7 @@ const char *tms32082_pp_disassembler::REG_NAMES[128] = "???", "???", "???", "???", "tag0", "tag1", "tag2", "tag3" }; -const char *tms32082_pp_disassembler::CONDITION_CODES[16] = +char const *const tms32082_pp_disassembler::CONDITION_CODES[16] = { "", "[p] ", "[ls] ", "[hi] ", "[lt] ", "[le] ", "[ge] ", "[gt] ", @@ -41,7 +41,7 @@ const char *tms32082_pp_disassembler::CONDITION_CODES[16] = "[v] ", "[nv] ", "[n] ", "[nn] " }; -const char *tms32082_pp_disassembler::TRANSFER_SIZE[4] = +char const *const tms32082_pp_disassembler::TRANSFER_SIZE[4] = { "b:", "h:", "w:", "" }; diff --git a/src/devices/cpu/tms32082/dis_pp.h b/src/devices/cpu/tms32082/dis_pp.h index 6541eeccb70..a2f37ea26c8 100644 --- a/src/devices/cpu/tms32082/dis_pp.h +++ b/src/devices/cpu/tms32082/dis_pp.h @@ -17,9 +17,9 @@ public: virtual offs_t disassemble(std::ostream &stream, offs_t pc, const data_buffer &opcodes, const data_buffer ¶ms) override; private: - static const char *REG_NAMES[128]; - static const char *CONDITION_CODES[16]; - static const char *TRANSFER_SIZE[4]; + static char const *const REG_NAMES[128]; + static char const *const CONDITION_CODES[16]; + static char const *const TRANSFER_SIZE[4]; std::ostream *output; diff --git a/src/devices/cpu/tms9900/tms9900.cpp b/src/devices/cpu/tms9900/tms9900.cpp index 61ee5644d7f..8f092a3159d 100644 --- a/src/devices/cpu/tms9900/tms9900.cpp +++ b/src/devices/cpu/tms9900/tms9900.cpp @@ -328,7 +328,7 @@ void tms99xx_device::device_reset() m_irq_state = false; } -const char* tms99xx_device::s_statename[20] = +char const *const tms99xx_device::s_statename[20] = { "PC", "WP", "ST", "IR", "R0", "R1", "R2", "R3", @@ -405,7 +405,7 @@ void tms99xx_device::state_export(const device_state_entry &entry) */ void tms99xx_device::state_string_export(const device_state_entry &entry, std::string &str) const { - static const char *statestr = "LAECOPX-----IIII"; + static char const statestr[] = "LAECOPX-----IIII"; char flags[17]; for (auto &flag : flags) flag = 0x00; uint16_t val = 0x8000; diff --git a/src/devices/cpu/tms9900/tms9900.h b/src/devices/cpu/tms9900/tms9900.h index c223e093432..0c9084579c5 100644 --- a/src/devices/cpu/tms9900/tms9900.h +++ b/src/devices/cpu/tms9900/tms9900.h @@ -223,7 +223,7 @@ private: // State / debug management uint16_t m_state_any; - static const char* s_statename[]; + static char const *const s_statename[]; virtual void state_import(const device_state_entry &entry) override; virtual void state_export(const device_state_entry &entry) override; virtual void state_string_export(const device_state_entry &entry, std::string &str) const override; diff --git a/src/devices/cpu/tms9900/tms9995.cpp b/src/devices/cpu/tms9900/tms9995.cpp index 8458b2f656d..c83f74ac073 100644 --- a/src/devices/cpu/tms9900/tms9995.cpp +++ b/src/devices/cpu/tms9900/tms9995.cpp @@ -305,7 +305,7 @@ void tms9995_device::device_start() // save_item(NAME(m_first_cycle)); // only for log output } -const char* tms9995_device::s_statename[20] = +char const *const tms9995_device::s_statename[20] = { "PC", "WP", "ST", "IR", "R0", "R1", "R2", "R3", @@ -384,7 +384,7 @@ void tms9995_device::state_export(const device_state_entry &entry) */ void tms9995_device::state_string_export(const device_state_entry &entry, std::string &str) const { - static const char *statestr = "LAECOPX-----IIII"; + static char const statestr[] = "LAECOPX-----IIII"; char flags[17]; memset(flags, 0x00, ARRAY_LENGTH(flags)); uint16_t val = 0x8000; diff --git a/src/devices/cpu/tms9900/tms9995.h b/src/devices/cpu/tms9900/tms9995.h index dbabb79f5d1..72dfc2960a1 100644 --- a/src/devices/cpu/tms9900/tms9995.h +++ b/src/devices/cpu/tms9900/tms9995.h @@ -88,7 +88,7 @@ protected: private: // State / debug management uint16_t m_state_any; - static const char* s_statename[]; + static char const *const s_statename[]; void state_import(const device_state_entry &entry) override; void state_export(const device_state_entry &entry) override; void state_string_export(const device_state_entry &entry, std::string &str) const override; diff --git a/src/devices/cpu/unsp/unspdasm.cpp b/src/devices/cpu/unsp/unspdasm.cpp index bdea7a729a5..b814c168853 100644 --- a/src/devices/cpu/unsp/unspdasm.cpp +++ b/src/devices/cpu/unsp/unspdasm.cpp @@ -13,18 +13,18 @@ /*****************************************************************************/ -const char *unsp_disassembler::reg[] = +char const *const unsp_disassembler::reg[] = { "sp", "r1", "r2", "r3", "r4", "bp", "sr", "pc" }; -const char *unsp_disassembler::jmp[] = +char const *const unsp_disassembler::jmp[] = { "jb", "jae", "jge", "jl", "jne", "je", "jpl", "jmi", "jbe", "ja", "jle", "jg", "jvc", "jvs", "jmp", "" }; -const char *unsp_disassembler::alu[] = +char const *const unsp_disassembler::alu[] = { "add", "adc", "sub", "sbc", "cmp", "", "neg", "", diff --git a/src/devices/cpu/unsp/unspdasm.h b/src/devices/cpu/unsp/unspdasm.h index ef25b2a433b..303cc369a8f 100644 --- a/src/devices/cpu/unsp/unspdasm.h +++ b/src/devices/cpu/unsp/unspdasm.h @@ -24,9 +24,9 @@ public: virtual offs_t disassemble(std::ostream &stream, offs_t pc, const data_buffer &opcodes, const data_buffer ¶ms) override; private: - static const char *reg[]; - static const char *jmp[]; - static const char *alu[]; + static char const *const reg[]; + static char const *const jmp[]; + static char const *const alu[]; }; #endif diff --git a/src/devices/cpu/z80/tmpz84c015.cpp b/src/devices/cpu/z80/tmpz84c015.cpp index 80dc417e171..9186c3af491 100644 --- a/src/devices/cpu/z80/tmpz84c015.cpp +++ b/src/devices/cpu/z80/tmpz84c015.cpp @@ -150,8 +150,8 @@ WRITE8_MEMBER(tmpz84c015_device::irq_priority_w) if (m_irq_priority != data) { - static const char *dev[3] = { "tmpz84c015_ctc", "tmpz84c015_sio", "tmpz84c015_pio" }; - static const int prio[6][3] = + static char const *const dev[3] = { "tmpz84c015_ctc", "tmpz84c015_sio", "tmpz84c015_pio" }; + static int const prio[6][3] = { { 0, 1, 2 }, // 0: ctc -> sio -> pio -> ext { 1, 0, 2 }, // 1: sio -> ctc -> pio -> ext diff --git a/src/devices/imagedev/cassette.cpp b/src/devices/imagedev/cassette.cpp index c68a6546316..d94812ba860 100644 --- a/src/devices/imagedev/cassette.cpp +++ b/src/devices/imagedev/cassette.cpp @@ -379,7 +379,7 @@ std::string cassette_image_device::call_display() int n; double position, length; cassette_state uistate; - static const char *shapes[] = { u8"\u2500", u8"\u2572", u8"\u2502", u8"\u2571" }; + static char const *const shapes[] = { u8"\u2500", u8"\u2572", u8"\u2502", u8"\u2571" }; // figure out where we are in the cassette position = get_position(); diff --git a/src/devices/imagedev/diablo.cpp b/src/devices/imagedev/diablo.cpp index 82da0a417ab..56c90e0c66f 100644 --- a/src/devices/imagedev/diablo.cpp +++ b/src/devices/imagedev/diablo.cpp @@ -20,7 +20,7 @@ OPTION_GUIDE_START(dsk_option_guide) OPTION_INT('K', "hunksize", "Hunk Bytes") OPTION_GUIDE_END -static const char *dsk_option_spec = +static char const *const dsk_option_spec = "C1-[203]-1024;H1/[2]/4/8;S1-[12]-64;L267;K6408"; diff --git a/src/devices/imagedev/harddriv.cpp b/src/devices/imagedev/harddriv.cpp index a3d567de33f..c3d2e9ca50c 100644 --- a/src/devices/imagedev/harddriv.cpp +++ b/src/devices/imagedev/harddriv.cpp @@ -29,7 +29,7 @@ OPTION_GUIDE_START(hd_option_guide) OPTION_INT('K', "hunksize", "Hunk Bytes") OPTION_GUIDE_END -static const char *hd_option_spec = +static char const *const hd_option_spec = "C1-[512]-1024;H1/2/[4]/8;S1-[16]-64;L128/256/[512]/1024;K512/1024/2048/[4096]"; diff --git a/src/devices/machine/53c7xx.cpp b/src/devices/machine/53c7xx.cpp index 4373aba1206..a3466da81f1 100644 --- a/src/devices/machine/53c7xx.cpp +++ b/src/devices/machine/53c7xx.cpp @@ -1736,7 +1736,7 @@ void ncr53c7xx_device::tc_int() const char* ncr53c7xx_device::disassemble_scripts() { - static const char* phases[] = + static char const *const phases[] = { "Data Out", "Data In", @@ -1760,7 +1760,7 @@ const char* ncr53c7xx_device::disassemble_scripts() } case 1: { - static const char* ops[] = + static char const *const ops[] = { "SELECT", "DISCONNECT", @@ -1777,7 +1777,7 @@ const char* ncr53c7xx_device::disassemble_scripts() } case 2: { - static const char* ops[] = + static char const *const ops[] = { "JUMP", "CALL", diff --git a/src/devices/machine/amigafdc.cpp b/src/devices/machine/amigafdc.cpp index 4217040bd5a..69ec9066f87 100644 --- a/src/devices/machine/amigafdc.cpp +++ b/src/devices/machine/amigafdc.cpp @@ -38,7 +38,7 @@ void amiga_fdc_device::device_start() m_write_dsksyn.resolve_safe(); m_leds.resolve(); - static const char *names[] = { "0", "1", "2", "3" }; + static char const *const names[] = { "0", "1", "2", "3" }; for(int i=0; i != 4; i++) { floppy_connector *con = subdevice(names[i]); if(con) @@ -567,15 +567,15 @@ int amiga_fdc_device::pll_t::get_next_bit(attotime &tm, floppy_image_device *flo int bit = transition_time != 0xffff; if(transition_time != 0xffff) { - static const uint8_t pha[8] = { 0xf, 0x7, 0x3, 0x1, 0, 0, 0, 0 }; - static const uint8_t phs[8] = { 0, 0, 0, 0, 0x1, 0x3, 0x7, 0xf }; - static const uint8_t freqa[4][8] = { + static uint8_t const pha[8] = { 0xf, 0x7, 0x3, 0x1, 0, 0, 0, 0 }; + static uint8_t const phs[8] = { 0, 0, 0, 0, 0x1, 0x3, 0x7, 0xf }; + static uint8_t const freqa[4][8] = { { 0xf, 0x7, 0x3, 0x1, 0, 0, 0, 0 }, { 0x7, 0x3, 0x1, 0, 0, 0, 0, 0 }, { 0x7, 0x3, 0x1, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 0, 0 } }; - static const uint8_t freqs[4][8] = { + static uint8_t const freqs[4][8] = { { 0, 0, 0, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0x1, 0x3, 0x7 }, { 0, 0, 0, 0, 0, 0x1, 0x3, 0x7 }, diff --git a/src/devices/machine/ioptimer.cpp b/src/devices/machine/ioptimer.cpp index a02f6c88ea5..0340c0a2ff3 100644 --- a/src/devices/machine/ioptimer.cpp +++ b/src/devices/machine/ioptimer.cpp @@ -130,7 +130,7 @@ void iop_timer_device::update_count() void iop_timer_device::set_ctrl(uint32_t data) { - static const char *gatm_names[4] = { "low?", "reset+rising?", "reset+falling?", "reset+both?" }; + static char const *const gatm_names[4] = { "low?", "reset+rising?", "reset+falling?", "reset+both?" }; logerror("%s: set_ctrl: GATE=%d, GATM=%s, ZRET=%d\n", machine().describe_context(), data & CTRL_GATE, gatm_names[(data & CTRL_GATM) >> 1], (data & CTRL_ZRET) >> 3); logerror("%s: CMPE=%d, OVFE=%d, REP_INT=%d, TOG_INT=%d\n", machine().describe_context(), (data & CTRL_CMPE) >> 4, (data & CTRL_OVFE) >> 5, (data & CTRL_REPI) >> 6, (data & CTRL_TOGI) >> 7); diff --git a/src/devices/machine/ncr539x.cpp b/src/devices/machine/ncr539x.cpp index 3e9853a784f..58c69a16ad1 100644 --- a/src/devices/machine/ncr539x.cpp +++ b/src/devices/machine/ncr539x.cpp @@ -56,7 +56,7 @@ enum #define CR2_GENERATE_REGISTER_PARITY 0x02 #define CR2_GENERATE_DATA_PARITY 0x01 -static const char *rdregs[16] = { +static char const *const rdregs[16] = { "Transfer count LSB", // 0 "Transfer count MSB", // 1 "FIFO", // 2 @@ -75,7 +75,7 @@ static const char *rdregs[16] = { "0xF" }; -static const char *wrregs[16] = { +static char const *const wrregs[16] = { "Start Transfer count LSB", "Start Transfer count MSB", "FIFO", diff --git a/src/devices/machine/nscsi_bus.cpp b/src/devices/machine/nscsi_bus.cpp index b8e2e878a52..1e348044572 100644 --- a/src/devices/machine/nscsi_bus.cpp +++ b/src/devices/machine/nscsi_bus.cpp @@ -50,7 +50,7 @@ void nscsi_bus_device::regen_data() void nscsi_bus_device::regen_ctrl(int refid) { - static const char *phase[8] = { + static char const *const phase[8] = { "dout", "din ", "cmd ", "stat", "4 ", "5 ", "mout", "min " }; diff --git a/src/devices/machine/ps2dma.cpp b/src/devices/machine/ps2dma.cpp index 678f106025e..d0779ca7686 100644 --- a/src/devices/machine/ps2dma.cpp +++ b/src/devices/machine/ps2dma.cpp @@ -604,7 +604,7 @@ READ32_MEMBER(ps2_dmac_device::channel_r) WRITE32_MEMBER(ps2_dmac_device::channel_w) { - static const char* mode_strings[4] = { "Normal", "Chain", "Interleave", "Undefined" }; + static char const *const mode_strings[4] = { "Normal", "Chain", "Interleave", "Undefined" }; switch (offset + 0x8000/8) { diff --git a/src/devices/machine/ps2timer.cpp b/src/devices/machine/ps2timer.cpp index 263060b98a5..1ceb1a6257b 100644 --- a/src/devices/machine/ps2timer.cpp +++ b/src/devices/machine/ps2timer.cpp @@ -142,8 +142,8 @@ void ps2_timer_device::update_hold() void ps2_timer_device::set_mode(uint32_t data) { - static const char *clks_names[4] = { "BUSCLK", "BUSCLK/16", "BUSCLK/256", "HBLNK" }; - static const char *gatm_names[4] = { "low", "reset+rising", "reset+falling", "reset+both" }; + static char const *const clks_names[4] = { "BUSCLK", "BUSCLK/16", "BUSCLK/256", "HBLNK" }; + static char const *const gatm_names[4] = { "low", "reset+rising", "reset+falling", "reset+both" }; logerror("%s: CLKS=%s, GATE=%d, GATS=%cBLNK\n", machine().describe_context(), clks_names[data & 3], BIT(data, 2), BIT(data, 3) ? 'V' : 'H'); logerror("%s: GATM=%s, ZRET=%d, CUE=%d\n", machine().describe_context(), gatm_names[(data >> 4) & 3], BIT(data, 6), BIT(data, 7)); logerror("%s: CMPE=%d, OVFE=%d, %s, %s\n", machine().describe_context(), BIT(data, 8), BIT(data, 9), BIT(data, 10) ? "Clear Equal" : "", BIT(data, 11) ? "Clear Overflow" : ""); diff --git a/src/devices/machine/rtc4543.cpp b/src/devices/machine/rtc4543.cpp index ed3b0ee1bcd..9e883ab7fab 100644 --- a/src/devices/machine/rtc4543.cpp +++ b/src/devices/machine/rtc4543.cpp @@ -25,7 +25,7 @@ // MACROS / CONSTANTS //************************************************************************** -const char *rtc4543_device::s_reg_names[7] = +char const *const rtc4543_device::s_reg_names[7] = { "second", "minute", @@ -116,7 +116,7 @@ void rtc4543_device::device_timer(emu_timer &timer, device_timer_id id, int para void rtc4543_device::rtc_clock_updated(int year, int month, int day, int day_of_week, int hour, int minute, int second) { - static const int weekday[7] = { 7, 1, 2, 3, 4, 5, 6 }; + static int const weekday[7] = { 7, 1, 2, 3, 4, 5, 6 }; m_regs[0] = convert_to_bcd(second); // seconds (BCD, 0-59) in bits 0-6, bit 7 = battery low m_regs[1] = convert_to_bcd(minute); // minutes (BCD, 0-59) diff --git a/src/devices/machine/rtc4543.h b/src/devices/machine/rtc4543.h index da51b7cf440..534c6f7fc43 100644 --- a/src/devices/machine/rtc4543.h +++ b/src/devices/machine/rtc4543.h @@ -40,7 +40,7 @@ class rtc4543_device : public device_t, public device_rtc_interface { - static const char *s_reg_names[7]; + static char const *const s_reg_names[7]; public: // construction/destruction diff --git a/src/devices/sound/spu.cpp b/src/devices/sound/spu.cpp index 383287b9114..90d8504b439 100644 --- a/src/devices/sound/spu.cpp +++ b/src/devices/sound/spu.cpp @@ -108,7 +108,7 @@ enum srrr_flags srrr_rr_mask=0x1f }; -static const unsigned int /*sound_buffer_size=65536*4,*/ +static unsigned int const /*sound_buffer_size=65536*4,*/ xa_sector_size=(18*28*8)<<1, xa_buffer_sectors=16, cdda_sector_size=2352, @@ -132,7 +132,7 @@ static const unsigned int /*sound_buffer_size=65536*4,*/ // // -static const int filter_coef[5][2]= +static int const filter_coef[5][2]= { { 0,0 }, { 60,0 }, @@ -160,7 +160,7 @@ static const int filter_coef[5][2]= _name##"0-15", \ _name##"16-23" - static const char *spu_register_names[256]= + static char const *const spu_register_names[256]= { _voice_registers(0), _voice_registers(1), diff --git a/src/devices/video/gba_lcd.cpp b/src/devices/video/gba_lcd.cpp index 98957a3353a..af7b42115bc 100644 --- a/src/devices/video/gba_lcd.cpp +++ b/src/devices/video/gba_lcd.cpp @@ -113,7 +113,7 @@ public: void size(int &width, int &height) { - static const int size_table[4][4][2] = + static int const size_table[4][4][2] = { { { 8, 8 }, { 16, 16 }, { 32, 32 }, { 64, 64 } }, // square { { 16, 8 }, { 32, 8 }, { 32, 16 }, { 64, 32 } }, // horizontal rect @@ -207,7 +207,7 @@ inline uint32_t gba_lcd_device::bg_screen_base(uint16_t bgxcnt) inline void gba_lcd_device::bg_screen_size(uint16_t bgxcnt, bool text, int &width, int &height) { - static const int size_table[2][4][2] = + static int const size_table[2][4][2] = { { { 256, 256 }, { 512, 256 }, { 256, 512 }, { 512, 512 } }, // text mode { { 128, 128 }, { 256, 256 }, { 512, 512 }, { 1024, 1024 } } // rotation/scaling (roz) mode @@ -1466,7 +1466,7 @@ inline bool gba_lcd_device::is_in_window_v(int y, int window) return false; } -static const int coeff[32] = { +static int const coeff[32] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16 }; @@ -1536,7 +1536,7 @@ inline uint32_t gba_lcd_device::decrease_brightness(uint32_t color) return (color & 0xffff0000) | (b << 10) | (g << 5) | r; } -static const char *reg_names[] = { +static char const *const reg_names[] = { /* LCD I/O Registers */ "DISPCNT", "GRNSWAP", "DISPSTAT", "VCOUNT", "BG0CNT", "BG1CNT", "BG2CNT", "BG3CNT", diff --git a/src/devices/video/ps2gs.cpp b/src/devices/video/ps2gs.cpp index 79a7653dafa..79ba24339d2 100644 --- a/src/devices/video/ps2gs.cpp +++ b/src/devices/video/ps2gs.cpp @@ -14,7 +14,7 @@ DEFINE_DEVICE_TYPE(SONYPS2_GS, ps2_gs_device, "ps2gs", "Playstation 2 GS") -/*static*/ const size_t ps2_gs_device::FORMAT_PIXEL_WIDTHS[] = { +/*static*/ size_t const ps2_gs_device::FORMAT_PIXEL_WIDTHS[] = { 32, 24, 16, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 8, 4, 0, 0, 0, @@ -25,7 +25,7 @@ DEFINE_DEVICE_TYPE(SONYPS2_GS, ps2_gs_device, "ps2gs", "Playstation 2 GS") 0, 0, 16, 0, 0, 0, 0, 0 }; -/*static*/ const char* ps2_gs_device::FORMAT_NAMES[] = { +/*static*/ char const *const ps2_gs_device::FORMAT_NAMES[] = { "PSMCT32", "PSMCT24", "PSMCT16", "Unknown", "Unknown", "Unknown", "Unknown", "Unknown", "Unknown", "Unknown", "PCMCT16S", "Unknown", "Unknown", "Unknown", "Unknown", "Unknown", "Unknown", "Unknown", "Unknown", "PSMT8", "PSMT4", "Unknown", "Unknown", "Unknown", @@ -36,7 +36,7 @@ DEFINE_DEVICE_TYPE(SONYPS2_GS, ps2_gs_device, "ps2gs", "Playstation 2 GS") "Unknown", "Unknown", "PSMZ16S", "Unknown", "Unknown", "Unknown", "Unknown", "Unknown" }; -/*static*/ const uint32_t ps2_gs_device::KICK_COUNTS[] = { +/*static*/ uint32_t const ps2_gs_device::KICK_COUNTS[] = { 1, 2, 2, 3, 3, 3, 2, 1 }; @@ -442,10 +442,10 @@ void ps2_gs_device::write_packed(const uint8_t reg, const uint64_t hi, const uin WRITE64_MEMBER(ps2_gs_device::regs_w) { - static const char* dir_strs[4] = { + static char const *const dir_strs[4] = { "Host->Local", "Local->Host", "Local->Local", "None" }; - static const char* prim_strs[8] = { + static char const *const prim_strs[8] = { "Point", "Line", "Line Strip", "Tri", "Tri Strip", "Tri Fan", "Sprite", "Invalid" }; diff --git a/src/devices/video/ps2gs.h b/src/devices/video/ps2gs.h index a68ae9913df..28db82d1945 100644 --- a/src/devices/video/ps2gs.h +++ b/src/devices/video/ps2gs.h @@ -307,9 +307,9 @@ protected: uint8_t m_curr_field; - static const size_t FORMAT_PIXEL_WIDTHS[0x40]; - static const char* FORMAT_NAMES[0x40]; - static const uint32_t KICK_COUNTS[8]; + static size_t const FORMAT_PIXEL_WIDTHS[0x40]; + static char const *const FORMAT_NAMES[0x40]; + static uint32_t const KICK_COUNTS[8]; }; DECLARE_DEVICE_TYPE(SONYPS2_GS, ps2_gs_device) diff --git a/src/emu/softlist.cpp b/src/emu/softlist.cpp index 40b0013490b..1db2879fcda 100644 --- a/src/emu/softlist.cpp +++ b/src/emu/softlist.cpp @@ -475,7 +475,7 @@ void softlist_parser::parse_root_start(const char *tagname, const char **attribu // if (strcmp(tagname, "softwarelist") == 0) { - static const char *attrnames[] = { "name", "description" }; + static char const *const attrnames[] = { "name", "description" }; const auto attrvalues = parse_attributes(attributes, attrnames); if (!attrvalues[1].empty()) @@ -496,7 +496,7 @@ void softlist_parser::parse_main_start(const char *tagname, const char **attribu // if (strcmp(tagname, "software") == 0) { - static const char *attrnames[] = { "name", "cloneof", "supported" }; + static char const *const attrnames[] = { "name", "cloneof", "supported" }; auto attrvalues = parse_attributes(attributes, attrnames); if (!attrvalues[0].empty()) @@ -563,7 +563,7 @@ void softlist_parser::parse_soft_start(const char *tagname, const char **attribu // else if (strcmp(tagname, "part" ) == 0) { - static const char *attrnames[] = { "name", "interface" }; + static char const *const attrnames[] = { "name", "interface" }; auto attrvalues = parse_attributes(attributes, attrnames); if (!attrvalues[0].empty() && !attrvalues[1].empty()) @@ -596,7 +596,7 @@ void softlist_parser::parse_part_start(const char *tagname, const char **attribu // if (strcmp(tagname, "dataarea") == 0) { - static const char *attrnames[] = { "name", "size", "width", "endianness" }; + static char const *const attrnames[] = { "name", "size", "width", "endianness" }; auto attrvalues = parse_attributes(attributes, attrnames); if (!attrvalues[0].empty() && !attrvalues[1].empty()) @@ -638,7 +638,7 @@ void softlist_parser::parse_part_start(const char *tagname, const char **attribu // else if (strcmp(tagname, "diskarea") == 0) { - static const char *attrnames[] = { "name" }; + static char const *const attrnames[] = { "name" }; auto attrvalues = parse_attributes(attributes, attrnames); if (!attrvalues[0].empty()) @@ -683,7 +683,7 @@ void softlist_parser::parse_data_start(const char *tagname, const char **attribu // if (strcmp(tagname, "rom") == 0) { - static const char *attrnames[] = { "name", "size", "crc", "sha1", "offset", "value", "status", "loadflag" }; + static char const *const attrnames[] = { "name", "size", "crc", "sha1", "offset", "value", "status", "loadflag" }; auto attrvalues = parse_attributes(attributes, attrnames); std::string &name = attrvalues[0]; @@ -757,7 +757,7 @@ void softlist_parser::parse_data_start(const char *tagname, const char **attribu // else if (strcmp(tagname, "disk") == 0) { - static const char *attrnames[] = { "name", "sha1", "status", "writeable" }; + static char const *const attrnames[] = { "name", "sha1", "status", "writeable" }; auto attrvalues = parse_attributes(attributes, attrnames); std::string &name = attrvalues[0]; diff --git a/src/emu/validity.cpp b/src/emu/validity.cpp index 03530727721..93c06eff52d 100644 --- a/src/emu/validity.cpp +++ b/src/emu/validity.cpp @@ -81,7 +81,7 @@ void validity_checker::validate_tag(const char *tag) osd_printf_error("Invalid generic tag '%s' used\n", tag); // scan for invalid characters - static const char *validchars = "abcdefghijklmnopqrstuvwxyz0123456789_.:^$"; + static char const *const validchars = "abcdefghijklmnopqrstuvwxyz0123456789_.:^$"; for (const char *p = tag; *p != 0; p++) { // only lower-case permitted diff --git a/src/frontend/mame/ui/ui.cpp b/src/frontend/mame/ui/ui.cpp index 9fe360d3891..94eea829b4c 100644 --- a/src/frontend/mame/ui/ui.cpp +++ b/src/frontend/mame/ui/ui.cpp @@ -49,7 +49,7 @@ enum ***************************************************************************/ // list of natural keyboard keys that are not associated with UI_EVENT_CHARs -static const input_item_id non_char_keys[] = +static input_item_id const non_char_keys[] = { ITEM_ID_ESC, ITEM_ID_F1, @@ -92,7 +92,7 @@ static const input_item_id non_char_keys[] = ITEM_ID_CANCEL }; -static const char *s_color_list[] = { +static char const *const s_color_list[] = { OPTION_UI_BORDER_COLOR, OPTION_UI_BACKGROUND_COLOR, OPTION_UI_GFXVIEWER_BG_COLOR, @@ -129,7 +129,7 @@ slider_state *mame_ui_manager::slider_current; CORE IMPLEMENTATION ***************************************************************************/ -static const uint32_t mouse_bitmap[32*32] = +static uint32_t const mouse_bitmap[32*32] = { 0x00ffffff,0x00ffffff,0x00ffffff,0x00ffffff,0x00ffffff,0x00ffffff,0x00ffffff,0x00ffffff,0x00ffffff,0x00ffffff,0x00ffffff,0x00ffffff,0x00ffffff,0x00ffffff,0x00ffffff,0x00ffffff,0x00ffffff,0x00ffffff,0x00ffffff,0x00ffffff,0x00ffffff,0x00ffffff,0x00ffffff,0x00ffffff,0x00ffffff,0x00ffffff,0x00ffffff,0x00ffffff,0x00ffffff,0x00ffffff,0x00ffffff,0x00ffffff, 0x09a46f30,0x81ac7c43,0x24af8049,0x00ad7d45,0x00a8753a,0x00a46f30,0x009f6725,0x009b611c,0x00985b14,0x0095560d,0x00935308,0x00915004,0x00904e02,0x008f4e01,0x008f4d00,0x008f4d00,0x00ffffff,0x00ffffff,0x00ffffff,0x00ffffff,0x00ffffff,0x00ffffff,0x00ffffff,0x00ffffff,0x00ffffff,0x00ffffff,0x00ffffff,0x00ffffff,0x00ffffff,0x00ffffff,0x00ffffff,0x00ffffff, diff --git a/src/lib/formats/cbm_crt.cpp b/src/lib/formats/cbm_crt.cpp index 0da119c006f..05bd56d5c38 100644 --- a/src/lib/formats/cbm_crt.cpp +++ b/src/lib/formats/cbm_crt.cpp @@ -40,9 +40,10 @@ *********************************************************************/ #include "emu.h" // fatalerror -#include "corefile.h" #include "cbm_crt.h" +#include "corefile.h" + //************************************************************************** // MACROS/CONSTANTS @@ -52,7 +53,7 @@ // slot names for the C64 cartridge types -static const char * CRT_C64_SLOT_NAMES[_CRT_C64_COUNT] = +static char const *const CRT_C64_SLOT_NAMES[_CRT_C64_COUNT] = { "standard", // 0 - Normal cartridge UNSUPPORTED, // 1 - Action Replay diff --git a/src/lib/netlist/plib/ptypes.h b/src/lib/netlist/plib/ptypes.h index c40cd283787..0934a86fdf2 100644 --- a/src/lib/netlist/plib/ptypes.h +++ b/src/lib/netlist/plib/ptypes.h @@ -83,7 +83,7 @@ namespace plib enum E { __VA_ARGS__ }; \ ename (E v) : m_v(v) { } \ bool set_from_string (const pstring &s) { \ - static const char *strings = # __VA_ARGS__; \ + static char const *const strings = # __VA_ARGS__; \ int f = from_string_int(strings, s.c_str()); \ if (f>=0) { m_v = static_cast(f); return true; } else { return false; } \ } \ @@ -91,7 +91,7 @@ namespace plib bool operator==(const ename &rhs) const {return m_v == rhs.m_v;} \ bool operator==(const E &rhs) const {return m_v == rhs;} \ const pstring name() const { \ - static const char *strings = # __VA_ARGS__; \ + static char const *const strings = # __VA_ARGS__; \ return nthstr(static_cast(m_v), strings); \ } \ private: E m_v; }; diff --git a/src/mame/drivers/geneve.cpp b/src/mame/drivers/geneve.cpp index 287a1d14059..d0849d802be 100644 --- a/src/mame/drivers/geneve.cpp +++ b/src/mame/drivers/geneve.cpp @@ -637,7 +637,7 @@ WRITE_LINE_MEMBER( geneve_state::keyboard_interrupt ) WRITE8_MEMBER( geneve_state::external_operation ) { - static const char* extop[8] = { "inv1", "inv2", "IDLE", "RSET", "inv3", "CKON", "CKOF", "LREX" }; + static char const *const extop[8] = { "inv1", "inv2", "IDLE", "RSET", "inv3", "CKON", "CKOF", "LREX" }; if (offset != IDLE_OP) LOGMASKED(LOG_WARN, "External operation %s not implemented on Geneve board\n", extop[offset]); } diff --git a/src/mame/drivers/indy_indigo2.cpp b/src/mame/drivers/indy_indigo2.cpp index b020cc494d7..5294ef68b9b 100644 --- a/src/mame/drivers/indy_indigo2.cpp +++ b/src/mame/drivers/indy_indigo2.cpp @@ -96,10 +96,10 @@ private: static void cdrom_config(device_t *device); - static const char* HAL2_TAG; - static const char* HPC3_TAG; - static const char* IOC2_TAG; - static const char* RTC_TAG; + static char const *const HAL2_TAG; + static char const *const HPC3_TAG; + static char const *const IOC2_TAG; + static char const *const RTC_TAG; required_device m_maincpu; required_shared_ptr m_mainram; @@ -114,10 +114,10 @@ private: inline void ATTR_PRINTF(3,4) verboselog(int n_level, const char *s_fmt, ... ); }; -/*static*/ const char* ip22_state::HAL2_TAG = "hal2"; -/*static*/ const char* ip22_state::HPC3_TAG = "hpc3"; -/*static*/ const char* ip22_state::IOC2_TAG = "ioc2"; -/*static*/ const char* ip22_state::RTC_TAG = "rtc"; +/*static*/ char const *const ip22_state::HAL2_TAG = "hal2"; +/*static*/ char const *const ip22_state::HPC3_TAG = "hpc3"; +/*static*/ char const *const ip22_state::IOC2_TAG = "ioc2"; +/*static*/ char const *const ip22_state::RTC_TAG = "rtc"; #define VERBOSE_LEVEL ( 0 ) diff --git a/src/mame/drivers/next.cpp b/src/mame/drivers/next.cpp index d4c134c9f3a..a9c834fc83b 100644 --- a/src/mame/drivers/next.cpp +++ b/src/mame/drivers/next.cpp @@ -258,19 +258,19 @@ void next_state::irq_check() } } -const char *next_state::dma_targets[0x20] = { +char const *const next_state::dma_targets[0x20] = { nullptr, "scsi", nullptr, nullptr, "soundout", "disk", nullptr, nullptr, "soundin", "printer", nullptr, nullptr, "scc", "dsp", nullptr, nullptr, "s-enetx", "enetx", nullptr, nullptr, "s-enetr", "enetr", nullptr, nullptr, "video", nullptr, nullptr, nullptr, "r2m", "m2r", nullptr, nullptr }; -const int next_state::dma_irqs[0x20] = { +int const next_state::dma_irqs[0x20] = { -1, 26, -1, -1, 23, 25, -1, -1, 22, 24, -1, -1, 21, 20, -1, -1, -1, 28, -1, -1, -1, 27, -1, -1, 5, -1, -1, -1, 18, 19, -1, -1 }; -const bool next_state::dma_has_saved[0x20] = { +bool const next_state::dma_has_saved[0x20] = { false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, true, false, false, false, true, false, false, @@ -557,7 +557,7 @@ void next_state::dma_do_ctrl_w(int slot, uint8_t data) } } -const int next_state::scsi_clocks[4] = { 10000000, 12000000, 20000000, 16000000 }; +int const next_state::scsi_clocks[4] = { 10000000, 12000000, 20000000, 16000000 }; READ32_MEMBER( next_state::scsictrl_r ) { diff --git a/src/mame/drivers/ps2sony.cpp b/src/mame/drivers/ps2sony.cpp index dd137f097fb..1708f52cc57 100644 --- a/src/mame/drivers/ps2sony.cpp +++ b/src/mame/drivers/ps2sony.cpp @@ -400,7 +400,7 @@ WRITE32_MEMBER(ps2sony_state::ipu_w) break; case 0x03: /* VDEC */ { - static const char *vlc[4] = + static char const *const vlc[4] = { "Macroblock Address Increment", "Macroblock Type", diff --git a/src/mame/drivers/stratos.cpp b/src/mame/drivers/stratos.cpp index 90d40d42567..1c4cb161ce3 100644 --- a/src/mame/drivers/stratos.cpp +++ b/src/mame/drivers/stratos.cpp @@ -83,7 +83,7 @@ void stratos_state::machine_reset() void stratos_state::show_leds() { - static const char *led_pos[18] = { + static char const *const led_pos[18] = { nullptr, nullptr, "gPawn", "gKnight", "gBishop", "gRook", "gQueen", "gKing", nullptr, nullptr, "rPawn", "rKnight", "rBishop", "rRook", "rQueen", "rKing", nullptr, nullptr }; char str_red[64]; diff --git a/src/mame/drivers/ti990_4.cpp b/src/mame/drivers/ti990_4.cpp index f816bd3156c..1592b1ab93a 100644 --- a/src/mame/drivers/ti990_4.cpp +++ b/src/mame/drivers/ti990_4.cpp @@ -180,7 +180,7 @@ WRITE_LINE_MEMBER(ti990_4_state::asrkey_interrupt) WRITE8_MEMBER( ti990_4_state::external_operation ) { - static const char* extop[8] = { "inv1", "inv2", "IDLE", "RSET", "inv3", "CKON", "CKOF", "LREX" }; + static char const *const extop[8] = { "inv1", "inv2", "IDLE", "RSET", "inv3", "CKON", "CKOF", "LREX" }; switch (offset) { case IDLE_OP: diff --git a/src/mame/drivers/ti99_4p.cpp b/src/mame/drivers/ti99_4p.cpp index 19d3b1b8d98..00774139e37 100644 --- a/src/mame/drivers/ti99_4p.cpp +++ b/src/mame/drivers/ti99_4p.cpp @@ -940,7 +940,7 @@ READ8_MEMBER( ti99_4p_state::interrupt_level ) WRITE8_MEMBER( ti99_4p_state::external_operation ) { - static const char* extop[8] = { "inv1", "inv2", "IDLE", "RSET", "inv3", "CKON", "CKOF", "LREX" }; + static char const *const extop[8] = { "inv1", "inv2", "IDLE", "RSET", "inv3", "CKON", "CKOF", "LREX" }; if (offset != IDLE_OP) logerror("External operation %s not implemented on the SGCPU board\n", extop[offset]); } diff --git a/src/mame/drivers/ti99_4x.cpp b/src/mame/drivers/ti99_4x.cpp index 3de24ce20b4..2e0028ee537 100644 --- a/src/mame/drivers/ti99_4x.cpp +++ b/src/mame/drivers/ti99_4x.cpp @@ -442,7 +442,7 @@ WRITE8_MEMBER( ti99_4x_state::cruwrite ) WRITE8_MEMBER( ti99_4x_state::external_operation ) { - static const char* extop[8] = { "inv1", "inv2", "IDLE", "RSET", "inv3", "CKON", "CKOF", "LREX" }; + static char const *const extop[8] = { "inv1", "inv2", "IDLE", "RSET", "inv3", "CKON", "CKOF", "LREX" }; // Some games (e.g. Slymoids) actually use IDLE for synchronization if (offset == IDLE_OP) return; else diff --git a/src/mame/drivers/ti99_8.cpp b/src/mame/drivers/ti99_8.cpp index 7c40a137f28..619d54a3931 100644 --- a/src/mame/drivers/ti99_8.cpp +++ b/src/mame/drivers/ti99_8.cpp @@ -680,7 +680,7 @@ WRITE_LINE_MEMBER( ti99_8_state::notconnected ) WRITE8_MEMBER( ti99_8_state::external_operation ) { - static const char* extop[8] = { "inv1", "inv2", "IDLE", "RSET", "inv3", "CKON", "CKOF", "LREX" }; + static char const *const extop[8] = { "inv1", "inv2", "IDLE", "RSET", "inv3", "CKON", "CKOF", "LREX" }; if (offset == IDLE_OP) return; else LOGMASKED(LOG_WARN, "External operation %s not implemented on TI-99/8 board\n", extop[offset]); diff --git a/src/mame/includes/next.h b/src/mame/includes/next.h index 7e96ce0b044..3002d3a2935 100644 --- a/src/mame/includes/next.h +++ b/src/mame/includes/next.h @@ -170,10 +170,10 @@ private: DMA_BUSEXC = 0x10 }; - static const char *dma_targets[0x20]; - static const int dma_irqs[0x20]; - static const bool dma_has_saved[0x20]; - static const int scsi_clocks[4]; + static char const *const dma_targets[0x20]; + static int const dma_irqs[0x20]; + static bool const dma_has_saved[0x20]; + static int const scsi_clocks[4]; dma_slot dma_slots[0x20]; uint32_t esp; diff --git a/src/mame/includes/xbox_nv2a.h b/src/mame/includes/xbox_nv2a.h index 970db40f534..51b4944a9b1 100644 --- a/src/mame/includes/xbox_nv2a.h +++ b/src/mame/includes/xbox_nv2a.h @@ -14,13 +14,13 @@ #include class vertex_program_disassembler { - static const char *srctypes[]; - static const char *scaops[]; - static const int scapar2[]; - static const char *vecops[]; - static const int vecpar2[]; - static const char *vecouts[]; - static const char compchar[]; + static char const *const srctypes[]; + static char const *const scaops[]; + static int const scapar2[]; + static char const *const vecops[]; + static int const vecpar2[]; + static char const *const vecouts[]; + static char const compchar[]; int o[6]; int state; diff --git a/src/mame/machine/apollo_dbg.cpp b/src/mame/machine/apollo_dbg.cpp index 32a86b9a272..e1181864453 100644 --- a/src/mame/machine/apollo_dbg.cpp +++ b/src/mame/machine/apollo_dbg.cpp @@ -21,7 +21,7 @@ // TRAP 0 //------------------------------------------------------ -static const char* trap0[] = { +static char const *const trap0[] = { /* 0x00 */nullptr, nullptr, /* 0x01 */"FIM_$GET_FIM_ADDR", "", /* 0x02 */nullptr, nullptr, @@ -66,7 +66,7 @@ static const char* trap0[] = { // TRAP1 //------------------------------------------------------ -static const char* trap1[] = { +static char const *const trap1[] = { /* 0x00 */nullptr, nullptr, /* 0x01 */nullptr, nullptr, /* 0x02 */"FIM_$INSTALL", "x", @@ -142,7 +142,7 @@ static const char* trap1[] = { // TRAP2 //------------------------------------------------------ -static const char* trap2[] = { +static char const *const trap2[] = { /* 0x00 */nullptr, nullptr, /* 0x01 */nullptr, nullptr, /* 0x02 */"FILE_$DELETE", "x,x", @@ -294,7 +294,7 @@ static const char* trap2[] = { // TRAP3 //------------------------------------------------------ -static const char* trap3[] = { +static char const *const trap3[] = { /* 0x00 */"PBU2_$DMA_STOP", "x,x,x", /* 0x01 */nullptr, nullptr, /* 0x02 */"FILE_$CREATE", "x,x,x", @@ -474,7 +474,7 @@ static const char* trap3[] = { // TRAP4 //------------------------------------------------------ -static const char* trap4[] = { +static char const *const trap4[] = { /* 0x00 */nullptr, nullptr, /* 0x01 */"MST_$SET_GUARD", "u,x,x,x", /* 0x02 */"MST_$UNMAP_GLOBAL", "u,x,x,x", @@ -621,7 +621,7 @@ static const char* trap4[] = { // TRAP5 //------------------------------------------------------ -static const char* trap5[] = { +static char const *const trap5[] = { /* 0x00 */nullptr, nullptr, /* 0x01 */"MST_$MAP_AREA", "x,x,x,u,x", /* 0x02 */nullptr, nullptr, @@ -732,7 +732,7 @@ static const char* trap5[] = { // TRAP7 //------------------------------------------------------ -static const char* trap7[] = { +static char const *const trap7[] = { /* 0x00 */"FILE_$LOCK", "u,x,x,x,x,x,x", /* 0x01 */"VFMT_$WRITE", "s,x,x,x,x,x,x", /* 0x02 */"MST_$MAP_AREA_AT", "x,x,x,x,x,x,x", @@ -799,7 +799,7 @@ static const char* trap7[] = { // TRAP8 //------------------------------------------------------ -static const char* trap8[] = { +static char const *const trap8[] = { /* 0x00 - 0x07 */"MST_$MAP", "u,x,x,x,x,x,x", /* 0x01 - 0x08 */"MST_$MAP_AT", "x,u,x,x,x,x,x,x", /* 0x02 - 0x07 */"MST_$MAP_GLOBAL", "u,x,x,x,x,x,x", diff --git a/src/mame/machine/esqpanel.h b/src/mame/machine/esqpanel.h index b440180331a..41307847832 100644 --- a/src/mame/machine/esqpanel.h +++ b/src/mame/machine/esqpanel.h @@ -114,10 +114,6 @@ protected: virtual bool write_contents(std::ostream &o) override; required_device m_vfd; - -private: - static const char *html; - static const char *js; }; class esqpanel2x40_sq1_device : public esqpanel_device { diff --git a/src/mame/machine/ioc2.cpp b/src/mame/machine/ioc2.cpp index a3366cfac65..952a4ddf968 100644 --- a/src/mame/machine/ioc2.cpp +++ b/src/mame/machine/ioc2.cpp @@ -10,12 +10,12 @@ #include "bus/rs232/rs232.h" #include "machine/ioc2.h" -/*static*/ const char *ioc2_device::SCC_TAG = "scc"; -/*static*/ const char *ioc2_device::PI1_TAG = "pi1"; -/*static*/ const char *ioc2_device::KBDC_TAG = "kbdc"; -/*static*/ const char *ioc2_device::PIT_TAG = "pit"; -/*static*/ const char *ioc2_device::RS232A_TAG = "rs232a"; -/*static*/ const char *ioc2_device::RS232B_TAG = "rs232b"; +/*static*/ char const *const ioc2_device::SCC_TAG = "scc"; +/*static*/ char const *const ioc2_device::PI1_TAG = "pi1"; +/*static*/ char const *const ioc2_device::KBDC_TAG = "kbdc"; +/*static*/ char const *const ioc2_device::PIT_TAG = "pit"; +/*static*/ char const *const ioc2_device::RS232A_TAG = "rs232a"; +/*static*/ char const *const ioc2_device::RS232B_TAG = "rs232b"; /*static*/ const XTAL ioc2_device::SCC_PCLK = 10_MHz_XTAL; /*static*/ const XTAL ioc2_device::SCC_RXA_CLK = 3.6864_MHz_XTAL; // Needs verification diff --git a/src/mame/machine/ioc2.h b/src/mame/machine/ioc2.h index f4f2531f010..bfe637f206a 100644 --- a/src/mame/machine/ioc2.h +++ b/src/mame/machine/ioc2.h @@ -167,12 +167,12 @@ protected: uint32_t m_par_cntl; uint8_t m_system_id; - static const char *SCC_TAG; - static const char *PI1_TAG; - static const char *KBDC_TAG; - static const char *PIT_TAG; - static const char *RS232A_TAG; - static const char *RS232B_TAG; + static char const *const SCC_TAG; + static char const *const PI1_TAG; + static char const *const KBDC_TAG; + static char const *const PIT_TAG; + static char const *const RS232A_TAG; + static char const *const RS232B_TAG; static const XTAL SCC_PCLK; static const XTAL SCC_RXA_CLK; diff --git a/src/mame/machine/macadb.cpp b/src/mame/machine/macadb.cpp index 6eabc071851..0e4d33e76fc 100644 --- a/src/mame/machine/macadb.cpp +++ b/src/mame/machine/macadb.cpp @@ -72,7 +72,7 @@ enum * *************************************************************************/ #if LOG_ADB -static const char *const adb_statenames[4] = { "NEW", "EVEN", "ODD", "IDLE" }; +static char const *const adb_statenames[4] = { "NEW", "EVEN", "ODD", "IDLE" }; #endif int mac_state::adb_pollkbd(int update) @@ -1223,7 +1223,7 @@ void mac_state::adb_reset() WRITE_LINE_MEMBER(mac_state::adb_linechange_w) { int dtime = 0; -/* static const char *states[] = +/* static char const *const states[] = { "idle", "attention", diff --git a/src/mame/machine/psion_pack.cpp b/src/mame/machine/psion_pack.cpp index 498ceeaf85c..9953a711a5a 100644 --- a/src/mame/machine/psion_pack.cpp +++ b/src/mame/machine/psion_pack.cpp @@ -49,7 +49,7 @@ OPTION_GUIDE_START( datapack_option_guide ) OPTION_INT('C', "copy", "Copyable" ) OPTION_GUIDE_END -static const char *datapack_option_spec = +static char const *const datapack_option_spec = "S1/2/4/[8]/16;R0/[1];P[0]/1;W[0]/1;B[0]/1;C0/[1]"; diff --git a/src/mame/video/apollo.cpp b/src/mame/video/apollo.cpp index 981b2048f0d..08cae067368 100644 --- a/src/mame/video/apollo.cpp +++ b/src/mame/video/apollo.cpp @@ -285,17 +285,17 @@ uint32_t apollo_graphics_15i::bt458::get_rgb(uint8_t index) const char *apollo_graphics_15i::cr_text(offs_t offset, uint8_t data, uint8_t rw) { - static const char *cr0[8] = + static char const *const cr0[8] = { "cr0 mode=0 CPU dest BLT", "cr0 mode=1 Alternating BLT", "cr0 mode=2 Vector mode", "cr0 mode=3 CPU Source BLT", "cr0 mode=4 Double access BLT ", "cr0 mode=5 ???", "cr0 mode=6 ???", "cr0 mode=7 Normal" }; - static const char *cr2[4] = + static char const *const cr2[4] = { "cr2 Constant access", "cr2 Pixel access", "cr2 ???", "cr2 Plane access" }; - static const char *cr2b[4] = + static char const *const cr2b[4] = { "cr2b Constant access", "cr2b Pixel access", "cr2b ???", "cr2b Plane access" }; diff --git a/src/mame/video/k053250_ps.cpp b/src/mame/video/k053250_ps.cpp index 3c4fce4022d..871a0e14522 100644 --- a/src/mame/video/k053250_ps.cpp +++ b/src/mame/video/k053250_ps.cpp @@ -556,7 +556,7 @@ READ_LINE_MEMBER(k053250ps_device::dmairq_r) WRITE16_MEMBER(k053250ps_device::reg_w) { #if 0 - static const char * regnames[] = + static char const *const regnames[] = { "SCROLL_X_L", "SCROLL_X_H", diff --git a/src/mame/video/n64.cpp b/src/mame/video/n64.cpp index 453592ac63e..2a1ba864bff 100644 --- a/src/mame/video/n64.cpp +++ b/src/mame/video/n64.cpp @@ -600,7 +600,7 @@ void n64_rdp::set_blender_input(int32_t cycle, int32_t which, color_t** input_rg } } -const uint8_t n64_rdp::s_bayer_matrix[16] = +uint8_t const n64_rdp::s_bayer_matrix[16] = { /* Bayer matrix */ 0, 4, 1, 5, 6, 2, 7, 3, @@ -608,7 +608,7 @@ const uint8_t n64_rdp::s_bayer_matrix[16] = 7, 3, 6, 2 }; -const uint8_t n64_rdp::s_magic_matrix[16] = +uint8_t const n64_rdp::s_magic_matrix[16] = { /* Magic square matrix */ 0, 6, 1, 7, 4, 2, 5, 3, @@ -616,7 +616,7 @@ const uint8_t n64_rdp::s_magic_matrix[16] = 7, 1, 6, 0 }; -const z_decompress_entry_t n64_rdp::m_z_dec_table[8] = +z_decompress_entry_t const n64_rdp::m_z_dec_table[8] = { { 6, 0x00000 }, { 5, 0x20000 }, @@ -1109,10 +1109,10 @@ uint64_t n64_rdp::read_data(uint32_t address) } } -const char* n64_rdp::s_image_format[] = { "RGBA", "YUV", "CI", "IA", "I", "???", "???", "???" }; -const char* n64_rdp::s_image_size[] = { "4-bit", "8-bit", "16-bit", "32-bit" }; +char const *const n64_rdp::s_image_format[] = { "RGBA", "YUV", "CI", "IA", "I", "???", "???", "???" }; +char const *const n64_rdp::s_image_size[] = { "4-bit", "8-bit", "16-bit", "32-bit" }; -const int32_t n64_rdp::s_rdp_command_length[64] = +int32_t const n64_rdp::s_rdp_command_length[64] = { 8, // 0x00, No Op 8, // 0x01, ??? diff --git a/src/mame/video/n64.h b/src/mame/video/n64.h index 2310ec8eb6d..d8ab0fa9eb7 100644 --- a/src/mame/video/n64.h +++ b/src/mame/video/n64.h @@ -374,14 +374,14 @@ private: pin64_t m_capture; static uint32_t s_special_9bit_clamptable[512]; - static const z_decompress_entry_t m_z_dec_table[8]; - - static const uint8_t s_bayer_matrix[16]; - static const uint8_t s_magic_matrix[16]; - static const rdp_command_t m_commands[0x40]; - static const int32_t s_rdp_command_length[]; - static const char* s_image_format[]; - static const char* s_image_size[]; + static z_decompress_entry_t const m_z_dec_table[8]; + + static uint8_t const s_bayer_matrix[16]; + static uint8_t const s_magic_matrix[16]; + static rdp_command_t const m_commands[0x40]; + static int32_t const s_rdp_command_length[]; + static char const *const s_image_format[]; + static char const *const s_image_size[]; public: bool ignore; diff --git a/src/mame/video/xbox_nv2a.cpp b/src/mame/video/xbox_nv2a.cpp index 3052cad0644..0623e4e3759 100644 --- a/src/mame/video/xbox_nv2a.cpp +++ b/src/mame/video/xbox_nv2a.cpp @@ -10,13 +10,13 @@ //#define LOG_NV2A #define DEBUG_CHECKS // enable for debugging -const char *vertex_program_disassembler::srctypes[] = { "??", "Rn", "Vn", "Cn" }; -const char *vertex_program_disassembler::scaops[] = { "NOP", "IMV", "RCP", "RCC", "RSQ", "EXP", "LOG", "LIT", "???", "???", "???", "???", "???", "???", "???", "???", "???" }; -const int vertex_program_disassembler::scapar2[] = { 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; -const char *vertex_program_disassembler::vecops[] = { "NOP", "MOV", "MUL", "ADD", "MAD", "DP3", "DPH", "DP4", "DST", "MIN", "MAX", "SLT", "SGE", "ARL", "???", "???", "???" }; -const int vertex_program_disassembler::vecpar2[] = { 0, 4, 6, 5, 7, 6, 6, 6, 6, 6, 6, 6, 6, 4, 0, 0, 0 }; -const char *vertex_program_disassembler::vecouts[] = { "oPos", "???", "???", "oD0", "oD1", "oFog", "oPts", "oB0", "oB1", "oT0", "oT1", "oT2", "oT3" }; -const char vertex_program_disassembler::compchar[] = { 'x', 'y', 'z', 'w' }; +char const *const vertex_program_disassembler::srctypes[] = { "??", "Rn", "Vn", "Cn" }; +char const *const vertex_program_disassembler::scaops[] = { "NOP", "IMV", "RCP", "RCC", "RSQ", "EXP", "LOG", "LIT", "???", "???", "???", "???", "???", "???", "???", "???", "???" }; +int const vertex_program_disassembler::scapar2[] = { 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; +char const *const vertex_program_disassembler::vecops[] = { "NOP", "MOV", "MUL", "ADD", "MAD", "DP3", "DPH", "DP4", "DST", "MIN", "MAX", "SLT", "SGE", "ARL", "???", "???", "???" }; +int const vertex_program_disassembler::vecpar2[] = { 0, 4, 6, 5, 7, 6, 6, 6, 6, 6, 6, 6, 6, 4, 0, 0, 0 }; +char const *const vertex_program_disassembler::vecouts[] = { "oPos", "???", "???", "oD0", "oD1", "oFog", "oPts", "oB0", "oB1", "oT0", "oT1", "oT2", "oT3" }; +char const vertex_program_disassembler::compchar[] = { 'x', 'y', 'z', 'w' }; /* Each vertex program instruction is a 128 bit word made of the fields: diff --git a/src/osd/modules/opengl/gl_shader_mgr.cpp b/src/osd/modules/opengl/gl_shader_mgr.cpp index de36240ab3e..0cf3f9b6617 100644 --- a/src/osd/modules/opengl/gl_shader_mgr.cpp +++ b/src/osd/modules/opengl/gl_shader_mgr.cpp @@ -15,12 +15,12 @@ #ifdef GLSL_SOURCE_ON_DISK -static const char * glsl_mamebm_vsh_files [GLSL_VERTEX_SHADER_INT_NUMBER] = +static char const *const glsl_mamebm_vsh_files [GLSL_VERTEX_SHADER_INT_NUMBER] = { "/tmp/glsl_general.vsh" // general }; -static const char * glsl_mamebm_fsh_files [GLSL_SHADER_FEAT_INT_NUMBER] = +static char const *const glsl_mamebm_fsh_files [GLSL_SHADER_FEAT_INT_NUMBER] = { "/tmp/glsl_plain_rgb32_dir.fsh", // rgb32 dir plain "/tmp/glsl_bilinear_rgb32_dir.fsh", // rgb32 dir bilinear @@ -35,12 +35,12 @@ static const char * glsl_mamebm_fsh_files [GLSL_SHADER_FEAT_INT_NUMBER] = #include "shader/glsl_bilinear_rgb32_dir.fsh.c" #include "shader/glsl_bicubic_rgb32_dir.fsh.c" -static const char * glsl_mamebm_vsh_sources [GLSL_VERTEX_SHADER_INT_NUMBER] = +static char const *const glsl_mamebm_vsh_sources [GLSL_VERTEX_SHADER_INT_NUMBER] = { glsl_general_vsh_src // general }; -static const char * glsl_mamebm_fsh_sources [GLSL_SHADER_FEAT_INT_NUMBER] = +static char const *const glsl_mamebm_fsh_sources [GLSL_SHADER_FEAT_INT_NUMBER] = { glsl_plain_rgb32_dir_fsh_src, // rgb32 dir plain glsl_bilinear_rgb32_dir_fsh_src, // rgb32 dir bilinear @@ -49,7 +49,7 @@ static const char * glsl_mamebm_fsh_sources [GLSL_SHADER_FEAT_INT_NUMBER] = #endif // GLSL_SOURCE_ON_DISK -static const char * glsl_mamebm_filter_names [GLSL_SHADER_FEAT_MAX_NUMBER] = +static char const *const glsl_mamebm_filter_names [GLSL_SHADER_FEAT_MAX_NUMBER] = { "plain", "bilinear", diff --git a/src/osd/modules/render/drawbgfx.cpp b/src/osd/modules/render/drawbgfx.cpp index 792c292e23e..47863324ab3 100644 --- a/src/osd/modules/render/drawbgfx.cpp +++ b/src/osd/modules/render/drawbgfx.cpp @@ -55,10 +55,10 @@ // CONSTANTS //============================================================ -const uint16_t renderer_bgfx::CACHE_SIZE = 1024; -const uint32_t renderer_bgfx::PACKABLE_SIZE = 128; -const uint32_t renderer_bgfx::WHITE_HASH = 0x87654321; -const char* renderer_bgfx::WINDOW_PREFIX = "Window 0, "; +uint16_t const renderer_bgfx::CACHE_SIZE = 1024; +uint32_t const renderer_bgfx::PACKABLE_SIZE = 128; +uint32_t const renderer_bgfx::WHITE_HASH = 0x87654321; +char const *const renderer_bgfx::WINDOW_PREFIX = "Window 0, "; //============================================================ // MACROS diff --git a/src/osd/modules/render/drawbgfx.h b/src/osd/modules/render/drawbgfx.h index fadbabf7c13..7994a20246f 100644 --- a/src/osd/modules/render/drawbgfx.h +++ b/src/osd/modules/render/drawbgfx.h @@ -80,7 +80,7 @@ public: return &win->target()->get_primitives(); } - static const char* WINDOW_PREFIX; + static char const *const WINDOW_PREFIX; private: void vertex(ScreenVertex* vertex, float x, float y, float z, uint32_t rgba, float u, float v); -- cgit v1.2.3