From 90d7b40e62b695a8f74158a64c69db15dcc94d37 Mon Sep 17 00:00:00 2001 From: Vas Crabb Date: Sun, 24 Jun 2018 19:04:53 +1000 Subject: srcclean and other cleanup (nw) --- hash/ibm5170_cdrom.xml | 2 +- hash/neogeo.xml | 10 +- plugins/discord/init.lua | 2 +- src/devices/bus/a2bus/a2echoii.cpp | 2 +- src/devices/bus/hp_dio/hp98543.cpp | 8 +- src/devices/bus/hp_dio/hp98544.cpp | 3 +- src/devices/bus/ieee488/hp9122c.h | 16 +-- src/devices/bus/isa/xsu_cards.cpp | 2 +- src/devices/bus/neogeo/prot_sma.cpp | 2 +- src/devices/bus/vcs/rom.cpp | 0 src/devices/bus/vcs/rom.h | 0 src/devices/bus/vcs/vcs_slot.h | 0 src/devices/bus/z88/z88.h | 6 +- src/devices/cpu/mips/mips3.cpp | 46 ++++---- src/devices/cpu/mips/mips3.h | 104 ++++++++--------- src/devices/cpu/mips/mips3dsm.cpp | 30 ++--- src/devices/machine/8042kbdc.cpp | 2 +- src/devices/machine/8042kbdc.h | 6 +- src/devices/machine/busmouse.cpp | 26 ++--- src/devices/machine/busmouse.h | 2 +- src/devices/machine/ncr5390.cpp | 6 +- src/devices/machine/pxa255.cpp | 2 +- src/devices/machine/pxa255.h | 2 +- src/devices/machine/pxa255defs.h | 2 +- src/devices/video/nereid.cpp | 2 +- src/devices/video/topcat.cpp | 65 +++++------ src/devices/video/topcat.h | 8 +- src/lib/netlist/plib/palloc.cpp | 0 src/lib/netlist/plib/pconfig.h | 0 src/lib/netlist/plib/pfmtlog.cpp | 0 src/lib/netlist/plib/pfmtlog.h | 0 src/lib/netlist/plib/putil.h | 0 src/lib/netlist/prg/nltool.cpp | 0 src/lib/netlist/solver/nld_ms_gcr.h | 0 src/lib/netlist/solver/vector_base.h | 0 src/mame/audio/segag80r.h | 2 +- src/mame/drivers/20pacgal.cpp | 2 +- src/mame/drivers/3do.cpp | 8 +- src/mame/drivers/abc80x.cpp | 2 +- src/mame/drivers/apexc.cpp | 4 +- src/mame/drivers/by17.cpp | 4 +- src/mame/drivers/by35.cpp | 4 +- src/mame/drivers/cischeat.cpp | 10 +- src/mame/drivers/ddealer.cpp | 12 +- src/mame/drivers/dynax.cpp | 2 +- src/mame/drivers/efdt.cpp | 36 +++--- src/mame/drivers/gaplus.cpp | 106 ++++++++--------- src/mame/drivers/hp9k_3xx.cpp | 2 +- src/mame/drivers/istrebiteli.cpp | 4 +- src/mame/drivers/jalmah.cpp | 140 +++++++++++------------ src/mame/drivers/lwings.cpp | 2 +- src/mame/drivers/neogeo.cpp | 24 ++-- src/mame/drivers/nichild.cpp | 56 ++++----- src/mame/drivers/ninjakd2.cpp | 10 +- src/mame/drivers/olytext.cpp | 38 +++--- src/mame/drivers/pacman.cpp | 6 +- src/mame/drivers/palmz22.cpp | 2 +- src/mame/drivers/peplus.cpp | 2 +- src/mame/drivers/portrait.cpp | 4 +- src/mame/drivers/taitosj.cpp | 2 +- src/mame/drivers/tatsumi.cpp | 58 +++++----- src/mame/drivers/trucocl.cpp | 6 +- src/mame/drivers/vgmplay.cpp | 10 +- src/mame/drivers/vicdual.cpp | 12 +- src/mame/etc/jalmah.x68 | 216 +++++++++++++++++------------------ src/mame/includes/4enraya.h | 2 +- src/mame/includes/apexc.h | 2 +- src/mame/includes/cischeat.h | 2 +- src/mame/includes/cps3.h | 12 +- src/mame/includes/dkong.h | 4 +- src/mame/includes/efdt.h | 2 +- src/mame/includes/gaplus.h | 32 +++--- src/mame/includes/ninjakd2.h | 8 +- src/mame/includes/redalert.h | 6 +- src/mame/includes/tatsumi.h | 10 +- src/mame/includes/vicdual.h | 2 +- src/mame/includes/xevious.h | 2 +- src/mame/includes/z88.h | 6 +- src/mame/machine/6883sam.h | 12 +- src/mame/machine/apexc.h | 2 +- src/mame/machine/hec2hrp.cpp | 32 +++--- src/mame/machine/tatsumi.cpp | 26 ++--- src/mame/video/1942.cpp | 2 +- src/mame/video/apexc.cpp | 8 +- src/mame/video/cischeat.cpp | 2 +- src/mame/video/gaplus.cpp | 72 ++++++------ src/mame/video/gime.cpp | 22 ++-- src/mame/video/gime.h | 10 +- src/mame/video/ms1_tmap.cpp | 4 +- src/mame/video/ninjakd2.cpp | 2 +- src/mame/video/powerins.cpp | 2 +- src/mame/video/sega16sp.h | 2 +- src/mame/video/seta.cpp | 2 +- src/mame/video/tatsumi.cpp | 122 ++++++++++---------- 94 files changed, 774 insertions(+), 780 deletions(-) mode change 100755 => 100644 plugins/discord/init.lua mode change 100755 => 100644 src/devices/bus/vcs/rom.cpp mode change 100755 => 100644 src/devices/bus/vcs/rom.h mode change 100755 => 100644 src/devices/bus/vcs/vcs_slot.h mode change 100755 => 100644 src/lib/netlist/plib/palloc.cpp mode change 100755 => 100644 src/lib/netlist/plib/pconfig.h mode change 100755 => 100644 src/lib/netlist/plib/pfmtlog.cpp mode change 100755 => 100644 src/lib/netlist/plib/pfmtlog.h mode change 100755 => 100644 src/lib/netlist/plib/putil.h mode change 100755 => 100644 src/lib/netlist/prg/nltool.cpp mode change 100755 => 100644 src/lib/netlist/solver/nld_ms_gcr.h mode change 100755 => 100644 src/lib/netlist/solver/vector_base.h diff --git a/hash/ibm5170_cdrom.xml b/hash/ibm5170_cdrom.xml index d7c5fc71ec6..ab34e53fac9 100644 --- a/hash/ibm5170_cdrom.xml +++ b/hash/ibm5170_cdrom.xml @@ -2141,7 +2141,7 @@ - + diff --git a/hash/neogeo.xml b/hash/neogeo.xml index 12708a7c6f1..dd0676f3269 100644 --- a/hash/neogeo.xml +++ b/hash/neogeo.xml @@ -1205,7 +1205,7 @@ - + @@ -1219,7 +1219,7 @@ - + Metal Slug 3 (NGM-2560, earlier) 2000 @@ -8342,7 +8342,7 @@ - + Metal Slug 3 (NGH-2560) diff --git a/plugins/discord/init.lua b/plugins/discord/init.lua old mode 100755 new mode 100644 index 2b534b98377..21ec88ec79a --- a/plugins/discord/init.lua +++ b/plugins/discord/init.lua @@ -80,7 +80,7 @@ function discord.startplugin() until #res == 0 and #data > 0 or time + 1 < os.time() --print(data) end - + do local stat, err = pcall(init) if not stat then diff --git a/src/devices/bus/a2bus/a2echoii.cpp b/src/devices/bus/a2bus/a2echoii.cpp index bba340d1cd8..bfd5be37545 100644 --- a/src/devices/bus/a2bus/a2echoii.cpp +++ b/src/devices/bus/a2bus/a2echoii.cpp @@ -106,7 +106,7 @@ void a2bus_echoii_device::device_reset() /* WRITE_LINE_MEMBER(a2bus_echoii_device::tms_irq_callback) { - update_irq_to_maincpu(); + update_irq_to_maincpu(); } */ diff --git a/src/devices/bus/hp_dio/hp98543.cpp b/src/devices/bus/hp_dio/hp98543.cpp index b43a4734e0b..ae887080686 100644 --- a/src/devices/bus/hp_dio/hp98543.cpp +++ b/src/devices/bus/hp_dio/hp98543.cpp @@ -65,9 +65,9 @@ void dio16_98543_device::map(address_map& map) device_memory_interface::space_config_vector dio16_98543_device::memory_space_config() const { - return space_config_vector { - std::make_pair(0, &m_space_config) - }; + return space_config_vector { + std::make_pair(0, &m_space_config) + }; } dio16_98543_device::dio16_98543_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : @@ -158,7 +158,7 @@ uint32_t dio16_98543_device::screen_update(screen_device &screen, bitmap_rgb32 & int endx[TOPCAT_COUNT], endy[TOPCAT_COUNT]; for (int i = 0; i < TOPCAT_COUNT; i++) - m_topcat[i]->get_cursor_pos(&startx[i], &starty[i], &endx[i], &endy[i]); + m_topcat[i]->get_cursor_pos(startx[i], starty[i], endx[i], endy[i]); for (int y = 0; y < m_v_pix; y++) { uint32_t *scanline = &bitmap.pix32(y); diff --git a/src/devices/bus/hp_dio/hp98544.cpp b/src/devices/bus/hp_dio/hp98544.cpp index 5112ace8781..37761eb8973 100644 --- a/src/devices/bus/hp_dio/hp98544.cpp +++ b/src/devices/bus/hp_dio/hp98544.cpp @@ -129,8 +129,7 @@ WRITE16_MEMBER(dio16_98544_device::rom_w) uint32_t dio16_98544_device::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) { int startx, starty, endx, endy; - - m_topcat->get_cursor_pos(&startx, &starty, &endx, &endy); + m_topcat->get_cursor_pos(startx, starty, endx, endy); for (int y = 0; y < m_v_pix; y++) { uint32_t *scanline = &bitmap.pix32(y); diff --git a/src/devices/bus/ieee488/hp9122c.h b/src/devices/bus/ieee488/hp9122c.h index 3ff815f697f..8b51af38e28 100644 --- a/src/devices/bus/ieee488/hp9122c.h +++ b/src/devices/bus/ieee488/hp9122c.h @@ -76,14 +76,14 @@ private: constexpr static int REG_CNTL_INTSEL0 = 1 << 7; /* Status register bits: - * 0 - Addr0 - * 1 - Addr1 - * 2 - Addr2 - * 3 - Dual(H)/Single(L) - * 4 - T(L) - * 5 - Diskchg# - * 6 - Addr3 - * 7 - density indicatior: H - DD, L - HD + * 0 - Addr0 + * 1 - Addr1 + * 2 - Addr2 + * 3 - Dual(H)/Single(L) + * 4 - T(L) + * 5 - Diskchg# + * 6 - Addr3 + * 7 - density indicatior: H - DD, L - HD */ constexpr static int REG_STATUS_DUAL = 1 << 3; diff --git a/src/devices/bus/isa/xsu_cards.cpp b/src/devices/bus/isa/xsu_cards.cpp index 708c6b0ea86..6a1e09bf8f9 100644 --- a/src/devices/bus/isa/xsu_cards.cpp +++ b/src/devices/bus/isa/xsu_cards.cpp @@ -66,7 +66,7 @@ void ec184x_isa8_cards(device_slot_interface &device) device.option_add("ec1840.0002", ISA8_EC1840_0002); // MDA with downloadable font device.option_add("ec1840.0003", ISA8_FDC_XT); device.option_add("ec1841.0002", ISA8_EC1841_0002); // CGA with downloadable font - device.option_add("ec1841.0003", ISA8_EC1841_0003); // FDC + mouse port + device.option_add("ec1841.0003", ISA8_EC1841_0003); // FDC + mouse port device.option_add("ec1841.0004", ISA8_LPT); /* device.option_add("ec1841.0004", ISA8_EC1841_0004); // BSC-like serial ports + parallel port diff --git a/src/devices/bus/neogeo/prot_sma.cpp b/src/devices/bus/neogeo/prot_sma.cpp index 0b81939d957..99ed2269d2a 100644 --- a/src/devices/bus/neogeo/prot_sma.cpp +++ b/src/devices/bus/neogeo/prot_sma.cpp @@ -527,7 +527,7 @@ void sma_prot_device::mslug3a_decrypt_68k(uint8_t* base) rom = (uint16_t *)base; for (int i = 0; i < 0x0c0000/2; i++) rom[i] = rom[0x5d0000/2 + bitswap<24>(i,23,22,21,20,19,18,1,16,14,7,17,5,8,4,15,6,3,2,0,13,10,12,9,11)]; - + rom = (uint16_t *)(base + 0x100000); /* swap address lines for the banked part */ for (int i = 0;i < 0x800000/2; i += 0x10000/2) diff --git a/src/devices/bus/vcs/rom.cpp b/src/devices/bus/vcs/rom.cpp old mode 100755 new mode 100644 diff --git a/src/devices/bus/vcs/rom.h b/src/devices/bus/vcs/rom.h old mode 100755 new mode 100644 diff --git a/src/devices/bus/vcs/vcs_slot.h b/src/devices/bus/vcs/vcs_slot.h old mode 100755 new mode 100644 diff --git a/src/devices/bus/z88/z88.h b/src/devices/bus/z88/z88.h index c1337cab5cf..f5b63fcbfd0 100644 --- a/src/devices/bus/z88/z88.h +++ b/src/devices/bus/z88/z88.h @@ -124,9 +124,9 @@ protected: private: static constexpr device_timer_id TIMER_FLP_CLEAR = 0; - devcb_write_line m_out_flp_cb; - device_z88cart_interface* m_cart; - emu_timer * m_flp_timer; + devcb_write_line m_out_flp_cb; + device_z88cart_interface* m_cart; + emu_timer * m_flp_timer; }; diff --git a/src/devices/cpu/mips/mips3.cpp b/src/devices/cpu/mips/mips3.cpp index e78fc478a33..f48682fd20a 100644 --- a/src/devices/cpu/mips/mips3.cpp +++ b/src/devices/cpu/mips/mips3.cpp @@ -2516,20 +2516,20 @@ void mips3_device::handle_cop2(uint32_t op) switch (RSREG) { - case 0x00: /* MFCz */ if (RTREG) RTVAL64 = (int32_t)get_cop2_reg(RDREG); break; - case 0x01: /* DMFCz */ if (RTREG) RTVAL64 = get_cop2_reg(RDREG); break; - case 0x02: /* CFCz */ if (RTREG) RTVAL64 = (int32_t)get_cop2_creg(RDREG); break; - case 0x04: /* MTCz */ set_cop2_reg(RDREG, RTVAL32); break; - case 0x05: /* DMTCz */ set_cop2_reg(RDREG, RTVAL64); break; - case 0x06: /* CTCz */ set_cop2_creg(RDREG, RTVAL32); break; + case 0x00: /* MFCz */ if (RTREG) RTVAL64 = (int32_t)get_cop2_reg(RDREG); break; + case 0x01: /* DMFCz */ if (RTREG) RTVAL64 = get_cop2_reg(RDREG); break; + case 0x02: /* CFCz */ if (RTREG) RTVAL64 = (int32_t)get_cop2_creg(RDREG); break; + case 0x04: /* MTCz */ set_cop2_reg(RDREG, RTVAL32); break; + case 0x05: /* DMTCz */ set_cop2_reg(RDREG, RTVAL64); break; + case 0x06: /* CTCz */ set_cop2_creg(RDREG, RTVAL32); break; case 0x08: /* BC */ switch (RTREG) { - case 0x00: /* BCzF */ if (!m_cf[2]) ADDPC(SIMMVAL); break; - case 0x01: /* BCzF */ if (m_cf[2]) ADDPC(SIMMVAL); break; - case 0x02: /* BCzFL */ invalid_instruction(op); break; - case 0x03: /* BCzTL */ invalid_instruction(op); break; - default: invalid_instruction(op); break; + case 0x00: /* BCzF */ if (!m_cf[2]) ADDPC(SIMMVAL); break; + case 0x01: /* BCzF */ if (m_cf[2]) ADDPC(SIMMVAL); break; + case 0x02: /* BCzFL */ invalid_instruction(op); break; + case 0x03: /* BCzTL */ invalid_instruction(op); break; + default: invalid_instruction(op); break; } break; default: handle_extra_cop2(op); break; @@ -2559,21 +2559,21 @@ void mips3_device::handle_regimm(uint32_t op) { switch (RTREG) { - case 0x00: /* BLTZ */ if ((int64_t)RSVAL64 < 0) ADDPC(SIMMVAL); break; - case 0x01: /* BGEZ */ if ((int64_t)RSVAL64 >= 0) ADDPC(SIMMVAL); break; - case 0x02: /* BLTZL */ if ((int64_t)RSVAL64 < 0) ADDPC(SIMMVAL); else m_core->pc += 4; break; - case 0x03: /* BGEZL */ if ((int64_t)RSVAL64 >= 0) ADDPC(SIMMVAL); else m_core->pc += 4; break; - case 0x08: /* TGEI */ if ((int64_t)RSVAL64 >= SIMMVAL) generate_exception(EXCEPTION_TRAP, 1); break; - case 0x09: /* TGEIU */ if (RSVAL64 >= UIMMVAL) generate_exception(EXCEPTION_TRAP, 1); break; - case 0x0a: /* TLTI */ if ((int64_t)RSVAL64 < SIMMVAL) generate_exception(EXCEPTION_TRAP, 1); break; - case 0x0b: /* TLTIU */ if (RSVAL64 >= UIMMVAL) generate_exception(EXCEPTION_TRAP, 1); break; - case 0x0c: /* TEQI */ if (RSVAL64 == UIMMVAL) generate_exception(EXCEPTION_TRAP, 1); break; - case 0x0e: /* TNEI */ if (RSVAL64 != UIMMVAL) generate_exception(EXCEPTION_TRAP, 1); break; + case 0x00: /* BLTZ */ if ((int64_t)RSVAL64 < 0) ADDPC(SIMMVAL); break; + case 0x01: /* BGEZ */ if ((int64_t)RSVAL64 >= 0) ADDPC(SIMMVAL); break; + case 0x02: /* BLTZL */ if ((int64_t)RSVAL64 < 0) ADDPC(SIMMVAL); else m_core->pc += 4; break; + case 0x03: /* BGEZL */ if ((int64_t)RSVAL64 >= 0) ADDPC(SIMMVAL); else m_core->pc += 4; break; + case 0x08: /* TGEI */ if ((int64_t)RSVAL64 >= SIMMVAL) generate_exception(EXCEPTION_TRAP, 1); break; + case 0x09: /* TGEIU */ if (RSVAL64 >= UIMMVAL) generate_exception(EXCEPTION_TRAP, 1); break; + case 0x0a: /* TLTI */ if ((int64_t)RSVAL64 < SIMMVAL) generate_exception(EXCEPTION_TRAP, 1); break; + case 0x0b: /* TLTIU */ if (RSVAL64 >= UIMMVAL) generate_exception(EXCEPTION_TRAP, 1); break; + case 0x0c: /* TEQI */ if (RSVAL64 == UIMMVAL) generate_exception(EXCEPTION_TRAP, 1); break; + case 0x0e: /* TNEI */ if (RSVAL64 != UIMMVAL) generate_exception(EXCEPTION_TRAP, 1); break; case 0x10: /* BLTZAL */ m_core->r[31] = (int32_t)(m_core->pc + 4); if ((int64_t)RSVAL64 < 0) ADDPC(SIMMVAL); break; case 0x11: /* BGEZAL */ m_core->r[31] = (int32_t)(m_core->pc + 4); if ((int64_t)RSVAL64 >= 0) ADDPC(SIMMVAL); break; case 0x12: /* BLTZALL */ m_core->r[31] = (int32_t)(m_core->pc + 4); if ((int64_t)RSVAL64 < 0) ADDPC(SIMMVAL); else m_core->pc += 4; break; case 0x13: /* BGEZALL */ m_core->r[31] = (int32_t)(m_core->pc + 4); if ((int64_t)RSVAL64 >= 0) ADDPC(SIMMVAL); else m_core->pc += 4; break; - default: /* ??? */ handle_extra_regimm(op); break; + default: /* ??? */ handle_extra_regimm(op); break; } } @@ -2696,7 +2696,7 @@ void mips3_device::handle_special(uint32_t op) case 0x25: /* OR */ if (RDREG) RDVAL64 = RSVAL64 | RTVAL64; break; case 0x26: /* XOR */ if (RDREG) RDVAL64 = RSVAL64 ^ RTVAL64; break; case 0x27: /* NOR */ if (RDREG) RDVAL64 = ~(RSVAL64 | RTVAL64); break; - case 0x2a: /* SLT */ if (RDREG) RDVAL64 = (int64_t)RSVAL64 < (int64_t)RTVAL64; break; + case 0x2a: /* SLT */ if (RDREG) RDVAL64 = (int64_t)RSVAL64 < (int64_t)RTVAL64; break; case 0x2b: /* SLTU */ if (RDREG) RDVAL64 = (uint64_t)RSVAL64 < (uint64_t)RTVAL64; break; case 0x2c: /* DADD */ if (ENABLE_OVERFLOWS && RSVAL64 > ~RTVAL64) generate_exception(EXCEPTION_OVERFLOW, 1); diff --git a/src/devices/cpu/mips/mips3.h b/src/devices/cpu/mips/mips3.h index c0251c31890..1e55cd81478 100644 --- a/src/devices/cpu/mips/mips3.h +++ b/src/devices/cpu/mips/mips3.h @@ -312,77 +312,77 @@ private: struct internal_mips3_state { /* core registers */ - uint32_t pc; - int icount; - uint64_t r[35]; + uint32_t pc; + int icount; + uint64_t r[35]; /* upper 64 bits of 128-bit GPRs (R5900 only) */ - uint64_t rh[35]; + uint64_t rh[35]; /* COP registers */ - uint64_t cpr[3][32]; - uint64_t ccr[3][32]; - uint32_t llbit; + uint64_t cpr[3][32]; + uint64_t ccr[3][32]; + uint32_t llbit; /* VU0 registers (R5900 only) */ - float vfr[32][4]; - uint32_t vcr[32]; + float vfr[32][4]; + uint32_t vcr[32]; - uint32_t mode; /* current global mode */ + uint32_t mode; /* current global mode */ /* parameters for subroutines */ - uint64_t numcycles; /* return value from gettotalcycles */ - const char * format; /* format string for print_debug */ - uint32_t arg0; /* print_debug argument 1 */ - uint32_t arg1; /* print_debug argument 2 */ - - uint64_t count_zero_time; - uint32_t compare_armed; - uint32_t jmpdest; /* destination jump target */ + uint64_t numcycles; /* return value from gettotalcycles */ + const char * format; /* format string for print_debug */ + uint32_t arg0; /* print_debug argument 1 */ + uint32_t arg1; /* print_debug argument 2 */ + + uint64_t count_zero_time; + uint32_t compare_armed; + uint32_t jmpdest; /* destination jump target */ }; address_space_config m_program_config; - mips3_flavor m_flavor; + mips3_flavor m_flavor; /* core state */ internal_mips3_state *m_core; /* internal stuff */ - uint32_t m_ppc; - uint32_t m_nextpc; - uint32_t m_pcbase; - uint8_t m_cf[4][8]; - bool m_delayslot; - int m_op; - int m_interrupt_cycles; - uint32_t m_ll_value; - uint64_t m_lld_value; - uint32_t m_badcop_value; + uint32_t m_ppc; + uint32_t m_nextpc; + uint32_t m_pcbase; + uint8_t m_cf[4][8]; + bool m_delayslot; + int m_op; + int m_interrupt_cycles; + uint32_t m_ll_value; + uint64_t m_lld_value; + uint32_t m_badcop_value; /* endian-dependent load/store */ typedef void (mips3_device::*loadstore_func)(uint32_t op); - loadstore_func m_lwl; - loadstore_func m_lwr; - loadstore_func m_swl; - loadstore_func m_swr; - loadstore_func m_ldl; - loadstore_func m_ldr; - loadstore_func m_sdl; - loadstore_func m_sdr; - - address_space * m_program; + loadstore_func m_lwl; + loadstore_func m_lwr; + loadstore_func m_swl; + loadstore_func m_swr; + loadstore_func m_ldl; + loadstore_func m_ldr; + loadstore_func m_sdl; + loadstore_func m_sdr; + + address_space * m_program; std::function m_pr32; std::function m_prptr; - uint32_t c_system_clock; - uint32_t m_cpu_clock; + uint32_t c_system_clock; + uint32_t m_cpu_clock; emu_timer * m_compare_int_timer; /* derived info based on flavor */ - uint32_t m_pfnmask; - uint8_t m_tlbentries; + uint32_t m_pfnmask; + uint8_t m_tlbentries; /* memory accesses */ - bool m_bigendian; + bool m_bigendian; uint32_t m_byte_xor; uint32_t m_word_xor; data_accessors m_memory; @@ -398,16 +398,16 @@ private: uint32_t m_fastram_select; struct { - offs_t start; /* start of the RAM block */ - offs_t end; /* end of the RAM block */ - bool readonly; /* true if read-only */ - void * base; /* base in memory where the RAM lives */ - uint8_t * offset_base8; /* base in memory where the RAM lives, 8-bit pointer, with the start offset pre-applied */ - uint16_t * offset_base16; /* base in memory where the RAM lives, 16-bit pointer, with the start offset pre-applied */ - uint32_t * offset_base32; /* base in memory where the RAM lives, 32-bit pointer, with the start offset pre-applied */ + offs_t start; /* start of the RAM block */ + offs_t end; /* end of the RAM block */ + bool readonly; /* true if read-only */ + void * base; /* base in memory where the RAM lives */ + uint8_t * offset_base8; /* base in memory where the RAM lives, 8-bit pointer, with the start offset pre-applied */ + uint16_t * offset_base16; /* base in memory where the RAM lives, 16-bit pointer, with the start offset pre-applied */ + uint32_t * offset_base32; /* base in memory where the RAM lives, 32-bit pointer, with the start offset pre-applied */ } m_fastram[MIPS3_MAX_FASTRAM]; - uint32_t m_debugger_temp; + uint32_t m_debugger_temp; /* core state */ drc_cache m_cache; /* pointer to the DRC code cache */ diff --git a/src/devices/cpu/mips/mips3dsm.cpp b/src/devices/cpu/mips/mips3dsm.cpp index eba85fa25ad..0ee0bd36058 100644 --- a/src/devices/cpu/mips/mips3dsm.cpp +++ b/src/devices/cpu/mips/mips3dsm.cpp @@ -428,19 +428,19 @@ uint32_t ee_disassembler::dasm_extra_cop2(uint32_t pc, uint32_t op, std::ostream " ", "w ", "z ", "zw ", "y ", "yw ", "yz ", "yzw ", "x ", "xw ", "xz ", "xzw ", "xy ", "xyw ", "xyz ", "xyzw" }; - const char* dest_strings_with_comma[16] = - { - ",", "w,", "z,", "zw,", "y,", "yw,", "yz,", "yzw,", - "x,", "xw,", "xz,", "xzw,", "xy,", "xyw,", "xyz,", "xyzw," - }; - const char* bc_strings[4] = { "x", "y", "z", "w" }; - const char* bc_strings_with_comma[4] = { "x,", "y,", "z,", "w," }; + const char* dest_strings_with_comma[16] = + { + ",", "w,", "z,", "zw,", "y,", "yw,", "yz,", "yzw,", + "x,", "xw,", "xz,", "xzw,", "xy,", "xyw,", "xyz,", "xyzw," + }; + const char* bc_strings[4] = { "x", "y", "z", "w" }; + const char* bc_strings_with_comma[4] = { "x,", "y,", "z,", "w," }; const char* dest = dest_strings[(op >> 21) & 15]; - const char* destc = dest_strings_with_comma[(op >> 21) & 15]; + const char* destc = dest_strings_with_comma[(op >> 21) & 15]; const char* bc = bc_strings[op & 3]; const char* ftf = bc_strings[(op >> 23) & 3]; const char* fsf = bc_strings[(op >> 21) & 3]; - const char* fsfc = bc_strings_with_comma[(op >> 21) & 3]; + const char* fsfc = bc_strings_with_comma[(op >> 21) & 3]; switch (op & 0x3f) { @@ -790,7 +790,7 @@ uint32_t ee_disassembler::dasm_extra_base(uint32_t pc, uint32_t op, std::ostream { case 0x1e: util::stream_format(stream, "lq %s,%s(%s)", reg[rt], signed_16bit(op), reg[rs]); break; case 0x1f: util::stream_format(stream, "sq %s,%s(%s)", reg[rt], signed_16bit(op), reg[rs]); break; - default: util::stream_format(stream, "dc.l $%08x [invalid]", op); break; + default: util::stream_format(stream, "dc.l $%08x [invalid]", op); break; } return 0; @@ -802,8 +802,8 @@ uint32_t ee_disassembler::dasm_extra_special(uint32_t pc, uint32_t op, std::ostr switch (op & 63) { - case 0x29: util::stream_format(stream, "mtsa %s", reg[rs]); break; - default: util::stream_format(stream, "dc.l $%08x [invalid]", op); break; + case 0x29: util::stream_format(stream, "mtsa %s", reg[rs]); break; + default: util::stream_format(stream, "dc.l $%08x [invalid]", op); break; } return 0; } @@ -903,7 +903,7 @@ offs_t mips3_disassembler::dasm_one(std::ostream &stream, offs_t pc, u32 op) case 0x3c: util::stream_format(stream, "dsll %s,%s,%d", reg[rd], reg[rt], shift+32); break; case 0x3e: util::stream_format(stream, "dsrl %s,%s,%d", reg[rd], reg[rt], shift+32); break; case 0x3f: util::stream_format(stream, "dsra %s,%s,%d", reg[rd], reg[rt], shift+32); break; - default: flags = dasm_extra_special(pc, op, stream); break; + default: flags = dasm_extra_special(pc, op, stream); break; } break; @@ -958,7 +958,7 @@ offs_t mips3_disassembler::dasm_one(std::ostream &stream, offs_t pc, u32 op) case 0x19: util::stream_format(stream, "daddiu %s,%s,%s", reg[rt], reg[rs], signed_16bit(op)); break; case 0x1a: util::stream_format(stream, "ldl %s,%s(%s)", reg[rt], signed_16bit(op), reg[rs]); break; case 0x1b: util::stream_format(stream, "ldr %s,%s(%s)", reg[rt], signed_16bit(op), reg[rs]); break; - case 0x1c: flags = dasm_idt(pc, op, stream); break; + case 0x1c: flags = dasm_idt(pc, op, stream); break; case 0x20: util::stream_format(stream, "lb %s,%s(%s)", reg[rt], signed_16bit(op), reg[rs]); break; case 0x21: util::stream_format(stream, "lh %s,%s(%s)", reg[rt], signed_16bit(op), reg[rs]); break; case 0x22: util::stream_format(stream, "lwl %s,%s(%s)", reg[rt], signed_16bit(op), reg[rs]); break; @@ -990,7 +990,7 @@ offs_t mips3_disassembler::dasm_one(std::ostream &stream, offs_t pc, u32 op) case 0x3d: util::stream_format(stream, "sdc1 %s,%s(%s)", cpreg[1][rt], signed_16bit(op), reg[rs]); break; case 0x3e: util::stream_format(stream, "sdc2 %s,%s(%s)", cpreg[2][rt], signed_16bit(op), reg[rs]); break; case 0x3f: util::stream_format(stream, "sd %s,%s(%s)", reg[rt], signed_16bit(op), reg[rs]); break; - default: flags = dasm_extra_base(pc, op, stream); break; + default: flags = dasm_extra_base(pc, op, stream); break; } return 4 | flags | SUPPORTED; } diff --git a/src/devices/machine/8042kbdc.cpp b/src/devices/machine/8042kbdc.cpp index 649be5f2529..602435369ab 100644 --- a/src/devices/machine/8042kbdc.cpp +++ b/src/devices/machine/8042kbdc.cpp @@ -4,7 +4,7 @@ 8042kbdc.cpp - 8042-based keyboard/mouse controller simulation + 8042-based keyboard/mouse controller simulation *********************************************************************/ diff --git a/src/devices/machine/8042kbdc.h b/src/devices/machine/8042kbdc.h index 398cd1127e4..b7f1610497e 100644 --- a/src/devices/machine/8042kbdc.h +++ b/src/devices/machine/8042kbdc.h @@ -130,9 +130,9 @@ private: devcb_write8 m_speaker_cb; - uint16_t m_mouse_x; - uint16_t m_mouse_y; - uint8_t m_mouse_btn; + uint16_t m_mouse_x; + uint16_t m_mouse_y; + uint8_t m_mouse_btn; DECLARE_WRITE_LINE_MEMBER( keyboard_w ); }; diff --git a/src/devices/machine/busmouse.cpp b/src/devices/machine/busmouse.cpp index 2b2d3dd8e33..f8c62069b50 100644 --- a/src/devices/machine/busmouse.cpp +++ b/src/devices/machine/busmouse.cpp @@ -2,19 +2,19 @@ // copyright-holders:Sergey Svishchev /********************************************************************** - Logitech bus mouse interface emulation - - References: - - ec1841 technical manual - - https://github.com/OBattler/86Box/blob/master/src/mouse_bus.c - - https://communities.intel.com/docs/DOC-22714 - - http://toastytech.com/guis/msmouse.html - - To do: - - selectable IRQ level - - Microsoft protocol - - ec1841.0003 clone: diag mode - - ec1841.0003 clone: fix detection by m86v32 driver + Logitech bus mouse interface emulation + + References: + - ec1841 technical manual + - https://github.com/OBattler/86Box/blob/master/src/mouse_bus.c + - https://communities.intel.com/docs/DOC-22714 + - http://toastytech.com/guis/msmouse.html + + To do: + - selectable IRQ level + - Microsoft protocol + - ec1841.0003 clone: diag mode + - ec1841.0003 clone: fix detection by m86v32 driver **********************************************************************/ diff --git a/src/devices/machine/busmouse.h b/src/devices/machine/busmouse.h index 8c30fd34d54..07860904e89 100644 --- a/src/devices/machine/busmouse.h +++ b/src/devices/machine/busmouse.h @@ -2,7 +2,7 @@ // copyright-holders:Sergey Svishchev /********************************************************************** - Logitech bus mouse interface emulation + Logitech bus mouse interface emulation **********************************************************************/ diff --git a/src/devices/machine/ncr5390.cpp b/src/devices/machine/ncr5390.cpp index 696fa4edcf2..914a87e4dec 100644 --- a/src/devices/machine/ncr5390.cpp +++ b/src/devices/machine/ncr5390.cpp @@ -794,9 +794,9 @@ void ncr5390_device::start_command() case CD_SELECT: case CD_SELECT_ATN: case CD_SELECT_ATN_STOP: - LOGMASKED(LOG_COMMAND, - (c == CD_SELECT) ? "Select without ATN sequence\n" : - (c == CD_SELECT_ATN) ? "Select with ATN sequence\n" : + LOGMASKED(LOG_COMMAND, + (c == CD_SELECT) ? "Select without ATN sequence\n" : + (c == CD_SELECT_ATN) ? "Select with ATN sequence\n" : "Select with ATN and stop sequence\n"); seq = 0; state = DISC_SEL_ARBITRATION_INIT; diff --git a/src/devices/machine/pxa255.cpp b/src/devices/machine/pxa255.cpp index b4e8b3bcf8f..6bfb7276673 100644 --- a/src/devices/machine/pxa255.cpp +++ b/src/devices/machine/pxa255.cpp @@ -1237,4 +1237,4 @@ MACHINE_CONFIG_START(pxa255_periphs_device::device_add_mconfig) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 1.0) MCFG_DEVICE_ADD(m_dmadac[1], DMADAC) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.0) -MACHINE_CONFIG_END \ No newline at end of file +MACHINE_CONFIG_END diff --git a/src/devices/machine/pxa255.h b/src/devices/machine/pxa255.h index b06235a29ba..45fd1f25cb6 100644 --- a/src/devices/machine/pxa255.h +++ b/src/devices/machine/pxa255.h @@ -232,4 +232,4 @@ protected: DECLARE_DEVICE_TYPE(PXA255_PERIPHERALS, pxa255_periphs_device) -#endif // DEVICES_MACHINE_PXA255 \ No newline at end of file +#endif // DEVICES_MACHINE_PXA255 diff --git a/src/devices/machine/pxa255defs.h b/src/devices/machine/pxa255defs.h index 89e3aedef7d..6f861d9d9a0 100644 --- a/src/devices/machine/pxa255defs.h +++ b/src/devices/machine/pxa255defs.h @@ -376,4 +376,4 @@ #define PXA255_FIDR1 (PXA255_LCD_BASE_ADDR + 0x00000218) #define PXA255_LDCMD1 (PXA255_LCD_BASE_ADDR + 0x0000021c) -#endif // DEVICES_MACHINE_PXA255DEFS \ No newline at end of file +#endif // DEVICES_MACHINE_PXA255DEFS diff --git a/src/devices/video/nereid.cpp b/src/devices/video/nereid.cpp index c1c51c8ddbb..1ecb49399be 100644 --- a/src/devices/video/nereid.cpp +++ b/src/devices/video/nereid.cpp @@ -82,7 +82,7 @@ WRITE16_MEMBER(nereid_device::ctrl_w) break; case NEREID_STROBE: LOG("NEREID: set color index %u: rgb_t(%u,%u,%u)\n", - m_index, m_red, m_green, m_blue); + m_index, m_red, m_green, m_blue); m_palette[m_index] = rgb_t(m_red, m_green, m_blue); break; case NEREID_PLANE_MASK: diff --git a/src/devices/video/topcat.cpp b/src/devices/video/topcat.cpp index f1e9f6c5399..959640dd09c 100644 --- a/src/devices/video/topcat.cpp +++ b/src/devices/video/topcat.cpp @@ -11,6 +11,7 @@ DEFINE_DEVICE_TYPE(TOPCAT, topcat_device, "topcat", "HP Topcat ASIC") topcat_device::topcat_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, type, tag, owner, clock), + m_cursor_timer(nullptr), m_vram(*this, "^vram") { } @@ -22,7 +23,7 @@ topcat_device::topcat_device(const machine_config &mconfig, const char *tag, dev void topcat_device::device_start() { - m_cursor_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(topcat_device::cursor_callback),this)); + m_cursor_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(topcat_device::cursor_callback), this)); m_cursor_timer->adjust(attotime::from_hz(3)); save_item(NAME(m_vblank)); @@ -77,25 +78,24 @@ READ16_MEMBER(topcat_device::vram_r) WRITE16_MEMBER(topcat_device::vram_w) { if (mem_mask & m_plane_mask) - modify_vram_offset(offset * 2+1, (data & m_plane_mask)); + modify_vram_offset(offset * 2 + 1, (data & m_plane_mask)); if (mem_mask & m_plane_mask << 8) modify_vram_offset(offset * 2, (data & m_plane_mask << 8)); } -void topcat_device::get_cursor_pos(int *startx, int *starty, int *endx, int *endy) +void topcat_device::get_cursor_pos(int &startx, int &starty, int &endx, int &endy) { if (m_cursor_state && ((m_cursor_plane_enable >> 8) & m_plane_mask)) { - *startx = m_cursor_x_pos; - *starty = m_cursor_y_pos; - *endx = m_cursor_x_pos + m_cursor_width; - *endy = m_cursor_y_pos; - + startx = m_cursor_x_pos; + starty = m_cursor_y_pos; + endx = m_cursor_x_pos + m_cursor_width; + endy = m_cursor_y_pos; } else { - *startx = 0; - *starty = 0; - *endx = 0; - *endy = 0; + startx = 0; + starty = 0; + endx = 0; + endy = 0; } } @@ -115,7 +115,7 @@ void topcat_device::update_cursor(int x, int y, uint16_t ctrl, uint8_t width) void topcat_device::execute_rule(bool src, replacement_rule_t rule, bool &dst) { - switch(rule & 0x0f) { + switch (rule & 0x0f) { case TOPCAT_REPLACE_RULE_CLEAR: dst = false; break; @@ -167,23 +167,21 @@ void topcat_device::execute_rule(bool src, replacement_rule_t rule, bool &dst) } } -void topcat_device::window_move(void) +void topcat_device::window_move() { - int line, endline, lineincr; - int startcolumn, endcolumn, columnincr; - if (!((m_fb_write_enable >> 8) & m_plane_mask)) return; LOG("WINDOWMOVE: %3ux%3u -> %3ux%3u / %3ux%3u rule %x\n", - m_source_x_pixel, - m_source_y_pixel, - m_dst_x_pixel, - m_dst_y_pixel, - m_block_mover_pixel_width, - m_block_mover_pixel_height, - m_move_replacement_rule); + m_source_x_pixel, + m_source_y_pixel, + m_dst_x_pixel, + m_dst_y_pixel, + m_block_mover_pixel_width, + m_block_mover_pixel_height, + m_move_replacement_rule); + int line, endline, lineincr; if (m_dst_y_pixel > m_source_y_pixel) { /* move down */ line = m_block_mover_pixel_height-1; @@ -196,6 +194,7 @@ void topcat_device::window_move(void) lineincr = 1; } + int startcolumn, endcolumn, columnincr; if (m_dst_x_pixel > m_source_x_pixel) { /* move right */ startcolumn = m_block_mover_pixel_width-1; @@ -209,12 +208,10 @@ void topcat_device::window_move(void) } - for(;line != endline; line += lineincr) { - for(int column = startcolumn; column != endcolumn; column += columnincr) { - bool src = get_vram_pixel(m_source_x_pixel + column, - m_source_y_pixel + line); - bool dst = get_vram_pixel(m_dst_x_pixel + column, - m_dst_y_pixel + line); + for ( ; line != endline; line += lineincr) { + for (int column = startcolumn; column != endcolumn; column += columnincr) { + bool const src = get_vram_pixel(m_source_x_pixel + column, m_source_y_pixel + line); + bool dst = get_vram_pixel(m_dst_x_pixel + column, m_dst_y_pixel + line); execute_rule(src, (replacement_rule_t)(m_move_replacement_rule & 0x0f), dst); modify_vram(m_dst_x_pixel + column, m_dst_y_pixel + line, dst); } @@ -223,12 +220,11 @@ void topcat_device::window_move(void) READ16_MEMBER(topcat_device::ctrl_r) { - uint16_t ret = 0xffff; - if (!m_read_enable) return 0; - switch(offset) { + uint16_t ret = 0xffff; + switch (offset) { case TOPCAT_REG_VBLANK: ret = m_vblank; break; @@ -298,7 +294,6 @@ READ16_MEMBER(topcat_device::ctrl_r) WRITE16_MEMBER(topcat_device::ctrl_w) { - data &= mem_mask; if (offset == TOPCAT_REG_WRITE_ENABLE_PLANE) { @@ -314,7 +309,7 @@ WRITE16_MEMBER(topcat_device::ctrl_w) if (!m_write_enable) return; - switch(offset) { + switch (offset) { case TOPCAT_REG_VBLANK: m_vblank = data & 0xff; break; diff --git a/src/devices/video/topcat.h b/src/devices/video/topcat.h index 114d4bc208a..6fcbc46b04f 100644 --- a/src/devices/video/topcat.h +++ b/src/devices/video/topcat.h @@ -22,9 +22,7 @@ public: void set_fb_width(int _pixels) { m_fb_width = _pixels; } void set_fb_height(int _pixels) { m_fb_height = _pixels; } void set_planemask(int _mask) { m_plane_mask = _mask; } - void get_cursor_pos(int *startx, int *starty, int *endx, int *endy); - - TIMER_CALLBACK_MEMBER(cursor_callback); + void get_cursor_pos(int &startx, int &starty, int &endx, int &endy); DECLARE_READ16_MEMBER(vram_r); DECLARE_WRITE16_MEMBER(vram_w); @@ -39,6 +37,8 @@ protected: virtual void device_start() override; virtual void device_reset() override; + TIMER_CALLBACK_MEMBER(cursor_callback); + private: typedef enum { @@ -86,7 +86,7 @@ private: TOPCAT_REG_CURSOR_WIDTH=0x89, }; - void window_move(void); + void window_move(); void execute_rule(bool src, replacement_rule_t rule, bool &dst); void update_cursor(int x, int y, uint16_t ctrl, uint8_t width); diff --git a/src/lib/netlist/plib/palloc.cpp b/src/lib/netlist/plib/palloc.cpp old mode 100755 new mode 100644 diff --git a/src/lib/netlist/plib/pconfig.h b/src/lib/netlist/plib/pconfig.h old mode 100755 new mode 100644 diff --git a/src/lib/netlist/plib/pfmtlog.cpp b/src/lib/netlist/plib/pfmtlog.cpp old mode 100755 new mode 100644 diff --git a/src/lib/netlist/plib/pfmtlog.h b/src/lib/netlist/plib/pfmtlog.h old mode 100755 new mode 100644 diff --git a/src/lib/netlist/plib/putil.h b/src/lib/netlist/plib/putil.h old mode 100755 new mode 100644 diff --git a/src/lib/netlist/prg/nltool.cpp b/src/lib/netlist/prg/nltool.cpp old mode 100755 new mode 100644 diff --git a/src/lib/netlist/solver/nld_ms_gcr.h b/src/lib/netlist/solver/nld_ms_gcr.h old mode 100755 new mode 100644 diff --git a/src/lib/netlist/solver/vector_base.h b/src/lib/netlist/solver/vector_base.h old mode 100755 new mode 100644 diff --git a/src/mame/audio/segag80r.h b/src/mame/audio/segag80r.h index 0c1b62593ea..6338984dadc 100644 --- a/src/mame/audio/segag80r.h +++ b/src/mame/audio/segag80r.h @@ -65,4 +65,4 @@ protected: DECLARE_DEVICE_TYPE(MONSTERB_SOUND, monsterb_sound_device) -#endif // MAME_AUDIO_SEGAG80R \ No newline at end of file +#endif // MAME_AUDIO_SEGAG80R diff --git a/src/mame/drivers/20pacgal.cpp b/src/mame/drivers/20pacgal.cpp index 20216baf926..368cbd06099 100644 --- a/src/mame/drivers/20pacgal.cpp +++ b/src/mame/drivers/20pacgal.cpp @@ -45,7 +45,7 @@ * The timed interrupt is a kludge; it is supposed to be generated internally by the Z180, but the cpu core doesn't support that yet. * Is the clock divide 3 or 4? - * Galaga attract mode isn't correct; referenct : https://youtu.be/OQyWaN9fTgw?t=2m33s + * Galaga attract mode isn't correct; referenct : https://youtu.be/OQyWaN9fTgw?t=2m33s +-------------------------------------------------------+ | +-------------+ | diff --git a/src/mame/drivers/3do.cpp b/src/mame/drivers/3do.cpp index 132503b4774..cfea047eb9f 100644 --- a/src/mame/drivers/3do.cpp +++ b/src/mame/drivers/3do.cpp @@ -233,14 +233,14 @@ ROM_START(3do_pal) ROMX_LOAD( "goldstar.bin", 0x000000, 0x100000, CRC(b6f5028b) SHA1(c4a2e5336f77fb5f743de1eea2cda43675ee2de7), ROM_BIOS(1) ) ROM_SYSTEM_BIOS( 2, "panafz1", "Panasonic FZ-1 R.E.A.L. 3DO Interactive Multiplayer" ) ROMX_LOAD( "panafz1.bin", 0x000000, 0x100000, CRC(c8c8ff89) SHA1(34bf189111295f74d7b7dfc1f304d98b8d36325a), ROM_BIOS(2) ) - + ROM_REGION32_BE( 0x200000, "overlay", 0 ) ROM_COPY( "bios", 0, 0, 0x200000 ) ROM_END ROM_START(orbatak) NTSC_BIOS - + DISK_REGION( "cdrom" ) DISK_IMAGE_READONLY( "orbatak", 0, SHA1(25cb3b889cf09dbe5faf2b0ca4aae5e03453da00) ) ROM_END @@ -260,14 +260,14 @@ ROM_END ROM_START(md23do) ALG_BIOS - + DISK_REGION( "cdrom" ) DISK_IMAGE_READONLY( "mad dog ii", 0, SHA1(0117c1fd279f42e942648ca55fa75dd45da37a4f) ) ROM_END ROM_START(sht3do) ALG_BIOS - + DISK_REGION( "cdrom" ) DISK_IMAGE_READONLY( "shootout at old tucson", 0, SHA1(bd42213c6b460b5b6153a8b2b41d0a114171e86e) ) ROM_END diff --git a/src/mame/drivers/abc80x.cpp b/src/mame/drivers/abc80x.cpp index 2d3a17aca28..e07fa3a445f 100644 --- a/src/mame/drivers/abc80x.cpp +++ b/src/mame/drivers/abc80x.cpp @@ -603,7 +603,7 @@ void abc806_state::abc806_mem(address_map &map) void abc806_state::abc806_io(address_map &map) { abc800m_io(map); - + map(0x06, 0x06).mirror(0xff18).w(FUNC(abc806_state::hrs_w)); map(0x07, 0x07).mirror(0xff18).w(FUNC(abc806_state::hrc_w)); map(0x34, 0x34).select(0xff00).rw(FUNC(abc806_state::mai_r), FUNC(abc806_state::mao_w)); diff --git a/src/mame/drivers/apexc.cpp b/src/mame/drivers/apexc.cpp index d66722167e5..d039f50277e 100644 --- a/src/mame/drivers/apexc.cpp +++ b/src/mame/drivers/apexc.cpp @@ -217,9 +217,9 @@ void apexc_state::check_inputs() if (control_transitions & panel_mem) { /* read/write memory */ - if (control_keys & panel_write) /* write memory */ + if (control_keys & panel_write) /* write memory */ m_maincpu->space(AS_PROGRAM).write_dword(m_maincpu->pc(), m_panel_data_reg); - else /* read memory */ + else /* read memory */ m_panel_data_reg = m_maincpu->space(AS_PROGRAM).read_dword(m_maincpu->pc()); } diff --git a/src/mame/drivers/by17.cpp b/src/mame/drivers/by17.cpp index aee123f9b68..335d027452b 100644 --- a/src/mame/drivers/by17.cpp +++ b/src/mame/drivers/by17.cpp @@ -1019,7 +1019,7 @@ MACHINE_CONFIG_START(by17_state::by17) MCFG_PIA_IRQA_HANDLER(INPUTLINE("maincpu", M6800_IRQ_LINE)) MCFG_PIA_IRQB_HANDLER(INPUTLINE("maincpu", M6800_IRQ_LINE)) MCFG_TIMER_DRIVER_ADD_PERIODIC("timer_z_freq", by17_state, timer_z_freq, attotime::from_hz(100)) // Mains Line Frequency * 2 - MCFG_TIMER_DRIVER_ADD(m_zero_crossing_active_timer, by17_state, timer_z_pulse) // Active pulse length from Zero Crossing detector + MCFG_TIMER_DRIVER_ADD(m_zero_crossing_active_timer, by17_state, timer_z_pulse) // Active pulse length from Zero Crossing detector MCFG_DEVICE_ADD("pia_u11", PIA6821, 0) MCFG_PIA_READPA_HANDLER(READ8(*this, by17_state, u11_a_r)) @@ -1032,7 +1032,7 @@ MACHINE_CONFIG_START(by17_state::by17) MCFG_PIA_IRQA_HANDLER(INPUTLINE("maincpu", M6800_IRQ_LINE)) MCFG_PIA_IRQB_HANDLER(INPUTLINE("maincpu", M6800_IRQ_LINE)) MCFG_TIMER_DRIVER_ADD_PERIODIC("timer_d_freq", by17_state, u11_timer, attotime::from_hz(317)) // 555 timer - MCFG_TIMER_DRIVER_ADD(m_display_refresh_timer, by17_state, timer_d_pulse) // 555 Active pulse length + MCFG_TIMER_DRIVER_ADD(m_display_refresh_timer, by17_state, timer_d_pulse) // 555 Active pulse length MACHINE_CONFIG_END diff --git a/src/mame/drivers/by35.cpp b/src/mame/drivers/by35.cpp index 5de13145ffd..37ddc966691 100644 --- a/src/mame/drivers/by35.cpp +++ b/src/mame/drivers/by35.cpp @@ -1118,7 +1118,7 @@ MACHINE_CONFIG_START(by35_state::by35) MCFG_PIA_IRQA_HANDLER(INPUTLINE("maincpu", M6800_IRQ_LINE)) MCFG_PIA_IRQB_HANDLER(INPUTLINE("maincpu", M6800_IRQ_LINE)) MCFG_TIMER_DRIVER_ADD_PERIODIC("timer_z_freq", by35_state, timer_z_freq, attotime::from_hz(100)) // Mains Line Frequency * 2 - MCFG_TIMER_DRIVER_ADD(m_zero_crossing_active_timer, by35_state, timer_z_pulse) // Active pulse length from Zero Crossing detector + MCFG_TIMER_DRIVER_ADD(m_zero_crossing_active_timer, by35_state, timer_z_pulse) // Active pulse length from Zero Crossing detector MCFG_DEVICE_ADD("pia_u11", PIA6821, 0) MCFG_PIA_READPA_HANDLER(READ8(*this, by35_state, u11_a_r)) @@ -1131,7 +1131,7 @@ MACHINE_CONFIG_START(by35_state::by35) MCFG_PIA_IRQA_HANDLER(INPUTLINE("maincpu", M6800_IRQ_LINE)) MCFG_PIA_IRQB_HANDLER(INPUTLINE("maincpu", M6800_IRQ_LINE)) MCFG_TIMER_DRIVER_ADD_PERIODIC("timer_d_freq", by35_state, u11_timer, attotime::from_hz(317)) // 555 timer - MCFG_TIMER_DRIVER_ADD(m_display_refresh_timer, by35_state, timer_d_pulse) // 555 Active pulse length + MCFG_TIMER_DRIVER_ADD(m_display_refresh_timer, by35_state, timer_d_pulse) // 555 Active pulse length MACHINE_CONFIG_END MACHINE_CONFIG_START(as2888_state::as2888_audio) diff --git a/src/mame/drivers/cischeat.cpp b/src/mame/drivers/cischeat.cpp index 3e6f8728a7c..314c0e757c9 100644 --- a/src/mame/drivers/cischeat.cpp +++ b/src/mame/drivers/cischeat.cpp @@ -155,11 +155,11 @@ To Do: - Use the Tilemap Manager for the road layers (when this kind of layers will be supported) for performance and better priority support. A line based zooming is additionally needed for f1gpstar. -- Wild Pilot road needs some serious work (empty gaps, ship "floating" +- Wild Pilot road needs some serious work (empty gaps, ship "floating" in stage 6 etc.); - Force feedback :) - Major cleanups needed, especially in video file; -- Split the non-road games into own driver, merge them with Alien Command, +- Split the non-road games into own driver, merge them with Alien Command, device-ify the sprite chip; BTANBs: @@ -168,7 +168,7 @@ BTANBs: are correct in a few places (e.g. in the attract mode, where cars move horizontally, the wheels don't follow for this reason, I think) Update: this happens on real HW as well (at least for Big Run); -- Some serious sprite popups happening in Big Run, again this happens on +- Some serious sprite popups happening in Big Run, again this happens on the reference video too so not a bug. 2008-08 @@ -1958,7 +1958,7 @@ MACHINE_CONFIG_START(cischeat_state::bigrun) MCFG_DEVICE_ADD("soundcpu", M68000, 6000000) MCFG_DEVICE_PROGRAM_MAP(bigrun_sound_map) // timing set by the YM irqhandler -// MCFG_DEVICE_PERIODIC_INT_DRIVER(cischeat_state, irq4_line_hold, 16*30) +// MCFG_DEVICE_PERIODIC_INT_DRIVER(cischeat_state, irq4_line_hold, 16*30) MCFG_QUANTUM_TIME(attotime::from_hz(1200)) @@ -2226,7 +2226,7 @@ MACHINE_CONFIG_START(cischeat_state::captflag) MCFG_WATCHDOG_ADD("watchdog") MCFG_NVRAM_ADD_0FILL("nvram") - + /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) // MCFG_SCREEN_VIDEO_ATTRIBUTES(VIDEO_UPDATE_AFTER_VBLANK) diff --git a/src/mame/drivers/ddealer.cpp b/src/mame/drivers/ddealer.cpp index f427fa42b41..1f13e420831 100644 --- a/src/mame/drivers/ddealer.cpp +++ b/src/mame/drivers/ddealer.cpp @@ -11,7 +11,7 @@ TODO: - Fix MCU simulation for credit subtractions & add coinage settings (currently set to free play for convenience); - Understand better the video emulation and convert it to tilemaps; - - 2 players mode gameplay is way too slow (protection related?) + - 2 players mode gameplay is way too slow (protection related?) - Decap + emulate MCU, required if the random number generation is going to be accurate; ========================================================================================================== @@ -146,9 +146,9 @@ public: TILE_GET_INFO_MEMBER(get_back_tile_info); void draw_video_layer(uint16_t* vreg_base, uint16_t* top, uint16_t* bottom, bitmap_ind16 &bitmap, const rectangle &cliprect, int flipy); uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - + TIMER_DEVICE_CALLBACK_MEMBER(mcu_sim); - + void ddealer(machine_config &config); void ddealer_map(address_map &map); void init_ddealer(); @@ -335,7 +335,7 @@ TIMER_DEVICE_CALLBACK_MEMBER(ddealer_state::mcu_sim) { /*coin/credit simulation*/ /*$fe002 is used,might be for multiple coins for one credit settings.*/ - // TODO: I'm not bothering with coin/credit settings until this actually work properly + // TODO: I'm not bothering with coin/credit settings until this actually work properly // (game is currently hardwired to free play) m_coin_input = (~(ioport("IN0")->read())); @@ -429,7 +429,7 @@ Protection handling, identical to Hacha Mecha Fighter / Thunder Dragon with diff WRITE16_MEMBER(ddealer_state::mcu_shared_w) { COMBINE_DATA(&m_mcu_shared_ram[offset]); - + switch(offset) { case 0x086/2: PROT_INPUT(0x086/2,0x1234,0x100/2,0x80000); break; @@ -500,7 +500,7 @@ void ddealer_state::ddealer_map(address_map &map) map(0x091000, 0x091fff).ram().share("right_fg_vratop"); map(0x092000, 0x092fff).ram().share("left_fg_vrabot"); map(0x093000, 0x093fff).ram().share("right_fg_vrabot"); -// map(0x094000, 0x094001).noprw(); // Set at POST via clr.w, unused afterwards +// map(0x094000, 0x094001).noprw(); // Set at POST via clr.w, unused afterwards map(0x098000, 0x098001).w(FUNC(ddealer_state::flipscreen_w)); map(0x09c000, 0x09cfff).ram().w(FUNC(ddealer_state::back_vram_w)).share("back_vram"); // bg tilemap map(0x0f0000, 0x0fdfff).ram().share("work_ram"); diff --git a/src/mame/drivers/dynax.cpp b/src/mame/drivers/dynax.cpp index bf797417e03..245ccd85752 100644 --- a/src/mame/drivers/dynax.cpp +++ b/src/mame/drivers/dynax.cpp @@ -485,7 +485,7 @@ void dynax_state::mjangels_banked_map(address_map &map) void dynax_state::hanamai_io_map(address_map &map) { map.global_mask(0xff); - map(0x00, 0x00).w(FUNC(dynax_state::dynax_extra_scrollx_w)); // screen scroll X + map(0x00, 0x00).w(FUNC(dynax_state::dynax_extra_scrollx_w)); // screen scroll X map(0x20, 0x20).w(FUNC(dynax_state::dynax_extra_scrolly_w)); // screen scroll Y map(0x41, 0x47).w("blitter", FUNC(dynax_blitter_rev2_device::regs_w)); // Blitter map(0x50, 0x50).w(FUNC(dynax_state::dynax_rombank_w)); // BANK ROM Select hnkochou only diff --git a/src/mame/drivers/efdt.cpp b/src/mame/drivers/efdt.cpp index 9ed569fe796..78c113c60cc 100644 --- a/src/mame/drivers/efdt.cpp +++ b/src/mame/drivers/efdt.cpp @@ -61,8 +61,8 @@ There are 2 tilemaps: - A 32x32 3BPP one with tile column scroll. - A 32x32 1BPP one fixed. + A 32x32 3BPP one with tile column scroll. + A 32x32 1BPP one fixed. 1BPP tilemap is always shown under the main tilemap (maybe some video register controls this). @@ -80,18 +80,18 @@ A000-A3FF - 3bpp Tile layer tile code A400-A7FF - ?? doesn't seem used - A800-A83F - Tile column scroll on even bytes. Tile column palette on odd bytes. + A800-A83F - Tile column scroll on even bytes. Tile column palette on odd bytes. A840-A85F - 8 sprites. 4 bytes per sprite: - 76543210 - 0 YYYYYYYY Y position of the sprite - 1 yxCCCCCC x: xflip y: yflip C: sprite code (of a 4 sprites block) - 2 -----PPP P: Palette - 3 XXXXXXXX X position of the sprite + 76543210 + 0 YYYYYYYY Y position of the sprite + 1 yxCCCCCC x: xflip y: yflip C: sprite code (of a 4 sprites block) + 2 -----PPP P: Palette + 3 XXXXXXXX X position of the sprite A860-A87F - Bullets. 4 bytes per bullet - 0 -------- Unknown (X pos high byte?) - 1 XXXXXXXX X position of the bullet - 2 -------- Unknown (Y pos high byte?) - 3 YYYYYYYY Y position of the bullet + 0 -------- Unknown (X pos high byte?) + 1 XXXXXXXX X position of the bullet + 2 -------- Unknown (Y pos high byte?) + 3 YYYYYYYY Y position of the bullet AC00-AFFF - 1bpp Tile layer tile code @@ -110,7 +110,7 @@ B800 -\-- these 2 values contain ror(Tilebank,1), ror(Tilebank,2). Sprites bank? always set to the same than Tile bank reg B801 -/ - B802 -\ these 3 registers usually contain x, ror(x,1), ror(x,2) and are related to the 1bpp bitmap palette color. 2 is red, used for the "galaxian" level lines + B802 -\ these 3 registers usually contain x, ror(x,1), ror(x,2) and are related to the 1bpp bitmap palette color. 2 is red, used for the "galaxian" level lines B803 -|-- during the initial scene of the attract, when the bomb explodes, they cycle 1,2,3,3,3,3,4,5,6 to cycle several colors, yellow, blue and red B804 -/ in the logo screen, when it says "Fin del tiempo", the "Niemer" letters must be orange/brown, these are set to 3. Set to 7 in the survival stage (red laser) B805 - Always 00 @@ -233,7 +233,7 @@ uint32_t efdt_state::screen_update_efdt(screen_device &screen, bitmap_ind16 &bit { int bank = m_vregs1[7]; - if (m_vregs1[4] != 0xff) //startup tests require tile bank 1, but 0 is set to the vregs (reset sets it to 1?) + if (m_vregs1[4] != 0xff) //startup tests require tile bank 1, but 0 is set to the vregs (reset sets it to 1?) bank = 1; m_tilebank = bank << 8; @@ -264,7 +264,7 @@ uint32_t efdt_state::screen_update_efdt(screen_device &screen, bitmap_ind16 &bit uint8_t pal = *sprram++; uint8_t x = *sprram++; - int xtra = code & 0xc0; //flip + int xtra = code & 0xc0; //flip if (y == 0 && x == 0/* && code == 0 && pal == 0 */) continue; @@ -340,7 +340,7 @@ void efdt_state::efdt_map(address_map &map) map(0x8000, 0x87ff).ram(); map(0x8800, 0x8803).rw(FUNC(efdt_state::main_soundlatch_r), FUNC(efdt_state::main_soundlatch_w)); -// map(0x8800, 0x8803).rw("soundlatch", FUNC(generic_latch_8_device::read), FUNC(generic_latch_8_device::write)); // TODO... +// map(0x8800, 0x8803).rw("soundlatch", FUNC(generic_latch_8_device::read), FUNC(generic_latch_8_device::write)); // TODO... map(0x9000, 0x93ff).portr("P1"); map(0x9400, 0x97ff).portr("P2"); @@ -460,14 +460,14 @@ WRITE8_MEMBER(efdt_state::soundlatch_1_w) { if (!(data == 0xfd || data == 0xf5)) { -// int a = 1; +// int a = 1; } if(data & 4) m_soundControl &= ~2; //if (data & 8) - // m_soundControl &= ~1; + // m_soundControl &= ~1; } READ8_MEMBER(efdt_state::soundlatch_2_r) diff --git a/src/mame/drivers/gaplus.cpp b/src/mame/drivers/gaplus.cpp index 998f806706d..b003000e91d 100644 --- a/src/mame/drivers/gaplus.cpp +++ b/src/mame/drivers/gaplus.cpp @@ -509,65 +509,65 @@ void gaplus_base_state::machine_start() void gaplus_state::machine_start() { - gaplus_base_state::machine_start(); + gaplus_base_state::machine_start(); - m_lamps.resolve(); + m_lamps.resolve(); } MACHINE_CONFIG_START(gaplus_base_state::gaplus_base) - /* basic machine hardware */ - MCFG_DEVICE_ADD(m_maincpu, MC6809E, XTAL(24'576'000) / 16) /* 1.536 MHz */ - MCFG_DEVICE_PROGRAM_MAP(cpu1_map) - - MCFG_DEVICE_ADD("sub", MC6809E, XTAL(24'576'000) / 16) /* 1.536 MHz */ - MCFG_DEVICE_PROGRAM_MAP(cpu2_map) - - MCFG_DEVICE_ADD("sub2", MC6809E, XTAL(24'576'000) / 16) /* 1.536 MHz */ - MCFG_DEVICE_PROGRAM_MAP(cpu3_map) - - MCFG_QUANTUM_TIME(attotime::from_hz(6000)) /* a high value to ensure proper synchronization of the CPUs */ - - MCFG_WATCHDOG_ADD("watchdog") - - MCFG_NAMCO_62XX_ADD("62xx", 24576000 / 6 / 2) /* totally made up - TODO: fix */ - //MCFG_NAMCO_62XX_INPUT_0_CB(IOPORT("IN0L")) - //MCFG_NAMCO_62XX_INPUT_1_CB(IOPORT("IN0H")) - //MCFG_NAMCO_62XX_INPUT_2_CB(IOPORT("IN1L")) - //MCFG_NAMCO_62XX_INPUT_3_CB(IOPORT("IN1H")) - //MCFG_NAMCO_62XX_OUTPUT_0_CB(WRITE8(*this, gaplus_base_state,out_0)) - //MCFG_NAMCO_62XX_OUTPUT_1_CB(WRITE8(*this, gaplus_base_state,out_1)) - - /* video hardware */ - MCFG_SCREEN_ADD("screen", RASTER) - MCFG_SCREEN_REFRESH_RATE(60.606060) - MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0)) - MCFG_SCREEN_SIZE(36 * 8, 28 * 8) - MCFG_SCREEN_VISIBLE_AREA(0 * 8, 36 * 8 - 1, 0 * 8, 28 * 8 - 1) - MCFG_SCREEN_UPDATE_DRIVER(gaplus_base_state, screen_update) - MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(*this, gaplus_base_state, screen_vblank)) - MCFG_DEVCB_CHAIN_OUTPUT(WRITELINE(*this, gaplus_base_state, vblank_irq)) - MCFG_SCREEN_PALETTE("palette") - - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_gaplus) - MCFG_PALETTE_ADD("palette", 64 * 4 + 64 * 8) - MCFG_PALETTE_INDIRECT_ENTRIES(256) - MCFG_PALETTE_INIT_OWNER(gaplus_base_state, gaplus) - - /* sound hardware */ - SPEAKER(config, "mono").front_center(); - - MCFG_DEVICE_ADD("namco", NAMCO_15XX, XTAL(24'576'000) / 1024) - MCFG_NAMCO_AUDIO_VOICES(8) - MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) - - MCFG_DEVICE_ADD("samples", SAMPLES) - MCFG_SAMPLES_CHANNELS(1) - MCFG_SAMPLES_NAMES(gaplus_sample_names) - MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.80) + /* basic machine hardware */ + MCFG_DEVICE_ADD(m_maincpu, MC6809E, XTAL(24'576'000) / 16) /* 1.536 MHz */ + MCFG_DEVICE_PROGRAM_MAP(cpu1_map) + + MCFG_DEVICE_ADD("sub", MC6809E, XTAL(24'576'000) / 16) /* 1.536 MHz */ + MCFG_DEVICE_PROGRAM_MAP(cpu2_map) + + MCFG_DEVICE_ADD("sub2", MC6809E, XTAL(24'576'000) / 16) /* 1.536 MHz */ + MCFG_DEVICE_PROGRAM_MAP(cpu3_map) + + MCFG_QUANTUM_TIME(attotime::from_hz(6000)) /* a high value to ensure proper synchronization of the CPUs */ + + MCFG_WATCHDOG_ADD("watchdog") + + MCFG_NAMCO_62XX_ADD("62xx", 24576000 / 6 / 2) /* totally made up - TODO: fix */ + //MCFG_NAMCO_62XX_INPUT_0_CB(IOPORT("IN0L")) + //MCFG_NAMCO_62XX_INPUT_1_CB(IOPORT("IN0H")) + //MCFG_NAMCO_62XX_INPUT_2_CB(IOPORT("IN1L")) + //MCFG_NAMCO_62XX_INPUT_3_CB(IOPORT("IN1H")) + //MCFG_NAMCO_62XX_OUTPUT_0_CB(WRITE8(*this, gaplus_base_state,out_0)) + //MCFG_NAMCO_62XX_OUTPUT_1_CB(WRITE8(*this, gaplus_base_state,out_1)) + + /* video hardware */ + MCFG_SCREEN_ADD("screen", RASTER) + MCFG_SCREEN_REFRESH_RATE(60.606060) + MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0)) + MCFG_SCREEN_SIZE(36 * 8, 28 * 8) + MCFG_SCREEN_VISIBLE_AREA(0 * 8, 36 * 8 - 1, 0 * 8, 28 * 8 - 1) + MCFG_SCREEN_UPDATE_DRIVER(gaplus_base_state, screen_update) + MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(*this, gaplus_base_state, screen_vblank)) + MCFG_DEVCB_CHAIN_OUTPUT(WRITELINE(*this, gaplus_base_state, vblank_irq)) + MCFG_SCREEN_PALETTE("palette") + + MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_gaplus) + MCFG_PALETTE_ADD("palette", 64 * 4 + 64 * 8) + MCFG_PALETTE_INDIRECT_ENTRIES(256) + MCFG_PALETTE_INIT_OWNER(gaplus_base_state, gaplus) + + /* sound hardware */ + SPEAKER(config, "mono").front_center(); + + MCFG_DEVICE_ADD("namco", NAMCO_15XX, XTAL(24'576'000) / 1024) + MCFG_NAMCO_AUDIO_VOICES(8) + MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) + + MCFG_DEVICE_ADD("samples", SAMPLES) + MCFG_SAMPLES_CHANNELS(1) + MCFG_SAMPLES_NAMES(gaplus_sample_names) + MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.80) MACHINE_CONFIG_END MACHINE_CONFIG_START(gaplus_state::gaplus) - gaplus_base(config); + gaplus_base(config); MCFG_DEVICE_ADD("namcoio_1", NAMCO_56XX, 0) MCFG_NAMCO56XX_IN_0_CB(IOPORT("COINS")) @@ -613,7 +613,7 @@ MACHINE_CONFIG_START(gapluso_state::gapluso) MCFG_NAMCO56XX_IN_1_CB(IOPORT("P1")) MCFG_NAMCO56XX_IN_2_CB(IOPORT("P2")) MCFG_NAMCO56XX_IN_3_CB(IOPORT("BUTTONS")) - + MCFG_DEVICE_ADD("namcoio_2", NAMCO_58XX, 0) MCFG_NAMCO58XX_IN_0_CB(IOPORT("DSWA_HIGH")) MCFG_NAMCO58XX_IN_1_CB(IOPORT("DSWB_LOW")) diff --git a/src/mame/drivers/hp9k_3xx.cpp b/src/mame/drivers/hp9k_3xx.cpp index ed6f57521a0..1be8237d1f8 100644 --- a/src/mame/drivers/hp9k_3xx.cpp +++ b/src/mame/drivers/hp9k_3xx.cpp @@ -323,7 +323,7 @@ INPUT_PORTS_END WRITE_LINE_MEMBER(hp9k3xx_state::cpu_reset) { - m_iocpu->reset(); + m_iocpu->reset(); } diff --git a/src/mame/drivers/istrebiteli.cpp b/src/mame/drivers/istrebiteli.cpp index f6ecbacd4da..658592f0609 100644 --- a/src/mame/drivers/istrebiteli.cpp +++ b/src/mame/drivers/istrebiteli.cpp @@ -509,12 +509,12 @@ static INPUT_PORTS_START( moto ) PORT_START("IN0") PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT) // handle left PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT) // handle right - PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP) // speed 30 + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP) // speed 30 PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN) // speed 80 PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_BUTTON1) // speed 120, 3 above bits encode 0 30 50 80 100 120 speeds PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_BUTTON2) // skip RAM test PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_BUTTON3) // handle full left/right - PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_BUTTON4) // brake + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_BUTTON4) // brake PORT_START("IN1") PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_START1) // coin, TODO check why it is locked diff --git a/src/mame/drivers/jalmah.cpp b/src/mame/drivers/jalmah.cpp index ac4086c6991..d5257c102ec 100644 --- a/src/mame/drivers/jalmah.cpp +++ b/src/mame/drivers/jalmah.cpp @@ -31,7 +31,7 @@ TODO: - There could be timing issues caused by MCU simulation at $80004; - Imperfect sound banking for 1st MCU version (especially noticeable for daireika); - suchiesp: I need a side-by-side to understand if the PAL shuffling is correct with the OKI BGM ROM. -- urashima: doesn't use the mega system 1 tilemap devices, MCU might actually be responsible +- urashima: doesn't use the mega system 1 tilemap devices, MCU might actually be responsible for that too (cfr. notes). Notes (1st MCU ver.): @@ -129,7 +129,7 @@ public: m_maincpu(*this, "maincpu"), m_prirom(*this, "prirom"), m_p1_key_io(*this, "P1_KEY%u", 0U), - m_p2_key_io(*this, "P2_KEY%u", 0U), + m_p2_key_io(*this, "P2_KEY%u", 0U), m_okibank(*this, "okibank"), m_system_io(*this, "SYSTEM"), m_dsw_io(*this, "DSW") @@ -164,12 +164,12 @@ public: void jalmahv1(machine_config &config); void jalmah_map(address_map &map); void jalmahv1_map(address_map &map); - void oki_map(address_map &map); + void oki_map(address_map &map); protected: virtual void machine_start() override; virtual void machine_reset() override; virtual void video_start() override; - + required_device m_palette; optional_device_array m_tmap; @@ -187,8 +187,8 @@ private: required_ioport m_system_io; required_ioport m_dsw_io; uint8_t m_layer_prin[4]; - void mcu_fetch_input_polling(required_ioport_array <3> port, uint16_t workram_offset); - + void mcu_fetch_input_polling(required_ioport_array<3> &port, uint16_t workram_offset); + uint8_t m_mcu_prg; int m_respcount; uint8_t m_test_mode; @@ -196,7 +196,7 @@ private: uint8_t m_oki_rom; uint8_t m_oki_bank; uint8_t m_oki_za; - + // arbitrary numbering scheme for the MCU sims enum { URASHIMA_MCU = 0x11, @@ -206,7 +206,7 @@ private: KAKUMEI2_MCU = 0x22, SUCHIESP_MCU = 0x23 }; - + // base values for the MCU code snippets (arbitrary) enum { SNIPPET_PALETTE1 = 0x0000, @@ -227,7 +227,7 @@ public: : jalmah_state(mconfig, type, tag), m_videoram(*this, "videoram%u", 0U), m_vreg(*this, "vreg%u", 0U), - m_gfxdecode(*this, "gfxdecode") + m_gfxdecode(*this, "gfxdecode") {} template DECLARE_READ16_MEMBER(urashima_vregs_r); @@ -255,9 +255,9 @@ private: required_shared_ptr_array m_videoram; required_shared_ptr_array m_vreg; required_device m_gfxdecode; - + tilemap_t *m_layer[2]; - + TILEMAP_MAPPER_MEMBER(range0_16x16); TILEMAP_MAPPER_MEMBER(range3_8x8); }; @@ -300,7 +300,7 @@ TILEMAP_MAPPER_MEMBER(urashima_state::range3_8x8) void urashima_state::video_start() { jalmah_state::video_start(); - + m_layer[0] = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(FUNC(urashima_state::get_tile_info_urashima<0>),this),tilemap_mapper_delegate(FUNC(urashima_state::range0_16x16),this),16,16,256,32); // range confirmed with title screen transition in attract mode // also it's confirmed to be 64 x 64 with 2nd tier girls stripping @@ -348,14 +348,14 @@ uint32_t jalmah_state::screen_update_jalmah(screen_device &screen, bitmap_ind16 { uint8_t cur_prin; int layer_num; - + bitmap.fill(m_palette->pen(0xff), cliprect); //selectable by a ram address? for(cur_prin=1; cur_prin<=0x8; cur_prin<<=1) { for(layer_num=0; layer_num<4; layer_num++) { - if(cur_prin == m_layer_prin[layer_num]) + if(cur_prin == m_layer_prin[layer_num]) m_tmap[layer_num]->draw(screen,bitmap,cliprect,0,0); } } @@ -370,16 +370,16 @@ uint32_t urashima_state::screen_update_urashima(screen_device &screen, bitmap_in // reset scroll latches sx[0] = sx[1] = sy[0] = sy[1] = 0; - + clip.min_x = cliprect.min_x; clip.max_x = cliprect.max_x; - + bitmap.fill(m_palette->pen(0x1ff), cliprect); //selectable by a ram address? - + for(int y = cliprect.min_y; y < cliprect.max_y+1; y++) { clip.min_y = clip.max_y = y; - + // Urashima tilemaps interrogate the video register area to make row and column scrolling // for every scanline the format is: // ---- ---- ---- ---- [0] unused? @@ -391,14 +391,14 @@ uint32_t urashima_state::screen_update_urashima(screen_device &screen, bitmap_in { // latches fetch go in reverse order when flip screen is enabled int y_base = flip_screen() ? 0x3fc-(y*4) : y*4; - + // is there a new latch? if(m_vreg[layer_num][1+y_base] & 1) { sx[layer_num] = m_vreg[layer_num][2+y_base]; sy[layer_num] = m_vreg[layer_num][3+y_base]; } - + // set scroll values for this layer m_layer[layer_num]->set_scrollx(0,sx[layer_num]); m_layer[layer_num]->set_scrolly(0,sy[layer_num]); @@ -407,7 +407,7 @@ uint32_t urashima_state::screen_update_urashima(screen_device &screen, bitmap_in if(m_pri & 1) { m_layer[0]->draw(screen,bitmap,clip,0,0); - m_layer[1]->draw(screen,bitmap,clip,0,0); + m_layer[1]->draw(screen,bitmap,clip,0,0); } else { @@ -443,7 +443,7 @@ WRITE8_MEMBER(urashima_state::urashima_bank_w) { m_tile_bank = (data & 0x03); m_layer[0]->mark_all_dirty(); - + if(m_tile_bank == 3) popmessage("layer 0 bank == 3, contact MAMEdev"); } @@ -470,7 +470,7 @@ READ16_MEMBER(urashima_state::urashima_vregs_r) template WRITE16_MEMBER(urashima_state::urashima_vregs_w) -{ +{ COMBINE_DATA(&m_vreg[TileChip][offset]); } @@ -503,34 +503,34 @@ Protection file start // TODO: urashima (at least) reads upper byte of the workram buffer, perhaps for checking previous frame input // TODO: RBSDTL in 1st version MCU stands for Bet/Big/Small/Double Up/Take Score/Last Chance // (not hooked up cause none of the dumped games actually uses it) -void jalmah_state::mcu_fetch_input_polling(required_ioport_array <3> port, uint16_t workram_offset) +void jalmah_state::mcu_fetch_input_polling(required_ioport_array<3> &port, uint16_t workram_offset) { - MCU_READ(1, 0x0001, workram_offset, 0x00); /*FF (correct?) */ - MCU_READ(2, 0x0400, workram_offset, 0x01); /*A*/ - MCU_READ(2, 0x1000, workram_offset, 0x02); /*B*/ - MCU_READ(2, 0x0200, workram_offset, 0x03); /*C*/ - MCU_READ(2, 0x0800, workram_offset, 0x04); /*D*/ - MCU_READ(2, 0x0004, workram_offset, 0x05); /*E*/ - MCU_READ(2, 0x0010, workram_offset, 0x06); /*F*/ - MCU_READ(2, 0x0002, workram_offset, 0x07); /*G*/ - MCU_READ(2, 0x0008, workram_offset, 0x08); /*H*/ - MCU_READ(1, 0x0400, workram_offset, 0x09); /*I*/ - MCU_READ(1, 0x1000, workram_offset, 0x0a); /*J*/ - MCU_READ(1, 0x0200, workram_offset, 0x0b); /*K*/ - MCU_READ(1, 0x0800, workram_offset, 0x0c); /*L*/ - MCU_READ(1, 0x0004, workram_offset, 0x0d); /*M*/ - MCU_READ(1, 0x0010, workram_offset, 0x0e); /*N*/ - MCU_READ(0, 0x0200, workram_offset, 0x0f); /*RON */ - MCU_READ(0, 0x1000, workram_offset, 0x10); /*REACH */ - MCU_READ(0, 0x0400, workram_offset, 0x11); /*KAN */ - MCU_READ(1, 0x0008, workram_offset, 0x12); /*PON */ - MCU_READ(1, 0x0002, workram_offset, 0x13); /*CHI */ - MCU_READ(0, 0x0004, workram_offset, 0x14); /*START1 */ + MCU_READ(1, 0x0001, workram_offset, 0x00); // FF (correct?) + MCU_READ(2, 0x0400, workram_offset, 0x01); // A + MCU_READ(2, 0x1000, workram_offset, 0x02); // B + MCU_READ(2, 0x0200, workram_offset, 0x03); // C + MCU_READ(2, 0x0800, workram_offset, 0x04); // D + MCU_READ(2, 0x0004, workram_offset, 0x05); // E + MCU_READ(2, 0x0010, workram_offset, 0x06); // F + MCU_READ(2, 0x0002, workram_offset, 0x07); // G + MCU_READ(2, 0x0008, workram_offset, 0x08); // H + MCU_READ(1, 0x0400, workram_offset, 0x09); // I + MCU_READ(1, 0x1000, workram_offset, 0x0a); // J + MCU_READ(1, 0x0200, workram_offset, 0x0b); // K + MCU_READ(1, 0x0800, workram_offset, 0x0c); // L + MCU_READ(1, 0x0004, workram_offset, 0x0d); // M + MCU_READ(1, 0x0010, workram_offset, 0x0e); // N + MCU_READ(0, 0x0200, workram_offset, 0x0f); // RON + MCU_READ(0, 0x1000, workram_offset, 0x10); // REACH + MCU_READ(0, 0x0400, workram_offset, 0x11); // KAN + MCU_READ(1, 0x0008, workram_offset, 0x12); // PON + MCU_READ(1, 0x0002, workram_offset, 0x13); // CHI + MCU_READ(0, 0x0004, workram_offset, 0x14); // START1 } void jalmah_state::daireika_mcu_run() -{ +{ if(m_test_mode) //service_mode { for(int keynum = 0; keynum < 3; keynum++) @@ -637,17 +637,17 @@ WRITE8_MEMBER(jalmah_state::okirom_w) //memcpy(&oki[0x20000], &oki[(m_oki_rom * 0x80000) + ((m_oki_bank+m_oki_za) * 0x20000) + 0x40000], 0x20000); m_okibank->set_entry((m_oki_rom << 2) + (m_oki_bank+m_oki_za)); - + //popmessage("PC=%06x %02x %02x %02x %08x",m_maincpu->pc(),m_oki_rom,m_oki_za,m_oki_bank,(m_oki_rom * 0x80000) + ((m_oki_bank+m_oki_za) * 0x20000) + 0x40000); } WRITE8_MEMBER(jalmah_state::okibank_w) -{ +{ m_oki_bank = data & 3; - + //memcpy(&oki[0x20000], &oki[(m_oki_rom * 0x80000) + ((m_oki_bank+m_oki_za) * 0x20000) + 0x40000], 0x20000); - m_okibank->set_entry((m_oki_rom << 2) + (m_oki_bank+m_oki_za)); - + m_okibank->set_entry((m_oki_rom << 2) + (m_oki_bank+m_oki_za)); + //popmessage("PC=%06x %02x %02x %02x %08x",m_maincpu->pc(),m_oki_rom,m_oki_za,m_oki_bank,(m_oki_rom * 0x80000) + ((m_oki_bank+m_oki_za) * 0x20000) + 0x40000); } @@ -1068,21 +1068,21 @@ void jalmah_state::machine_reset() { m_pri = 0; refresh_priority_system(); - + mcu_check_test_mode(); } void urashima_state::machine_reset() { -// m_pri = 0; - +// m_pri = 0; + // initialize tilemap vram to sane defaults (test mode cares) for(int i=0;i<0x4000/2;i++) m_videoram[0][i] = 0xffff; for(int i=0;i<0x2000/2;i++) m_videoram[1][i] = 0xffff; - + mcu_check_test_mode(); } @@ -1097,12 +1097,12 @@ MACHINE_CONFIG_START(jalmah_state::jalmah) MCFG_MEGASYS1_TILEMAP_ADD("scroll1", "palette", 0x0100) MCFG_MEGASYS1_TILEMAP_ADD("scroll2", "palette", 0x0200) MCFG_MEGASYS1_TILEMAP_ADD("scroll3", "palette", 0x0300) - + MCFG_SCREEN_ADD("screen", RASTER) MCFG_SCREEN_RAW_PARAMS(12000000/2,406,0,256,263,16,240) // assume same as nmk16 & mega system 1 MCFG_SCREEN_UPDATE_DRIVER(jalmah_state, screen_update_jalmah) MCFG_SCREEN_PALETTE("palette") - + MCFG_PALETTE_ADD("palette", 0x400) MCFG_PALETTE_FORMAT(RRRRGGGGBBBBRGBx) @@ -1154,19 +1154,19 @@ MACHINE_CONFIG_END MACHINE_CONFIG_START(urashima_state::urashima) jalmah(config); - + MCFG_DEVICE_MODIFY("maincpu") MCFG_DEVICE_PROGRAM_MAP(urashima_map) - + // Urashima seems to use an earlier version of the Jaleco tilemaps (without range etc.) // and with per-scanline video registers MCFG_DEVICE_REMOVE("scroll0") MCFG_DEVICE_REMOVE("scroll1") - MCFG_DEVICE_REMOVE("scroll2") + MCFG_DEVICE_REMOVE("scroll2") MCFG_DEVICE_REMOVE("scroll3") MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_urashima) - + MCFG_SCREEN_MODIFY("screen") MCFG_SCREEN_UPDATE_DRIVER(urashima_state, screen_update_urashima) MACHINE_CONFIG_END @@ -1251,7 +1251,7 @@ ROM_START( daireika ) ROM_LOAD( "m50747", 0x0000, 0x1000, NO_DUMP ) LOAD_FAKE_MCU_ROM - + ROM_REGION( 0x140000, "oki", ROMREGION_ERASEFF ) /* Samples */ ROM_LOAD( "mj3.bin", 0x40000, 0x80000, CRC(65bb350c) SHA1(e77866f2d612a0973adc616717e7c89a37d6c48e) ) ROM_COPY( "oki" , 0x40000, 0x00000, 0x40000 ) @@ -1297,7 +1297,7 @@ ROM_START( mjzoomin ) ROM_LOAD( "m50747", 0x0000, 0x1000, NO_DUMP ) LOAD_FAKE_MCU_ROM - + ROM_REGION( 0x140000, "oki", ROMREGION_ERASEFF ) /* Samples */ ROM_LOAD( "zoomin-3.bin", 0x40000, 0x80000, CRC(07d7b8cd) SHA1(e05ce80ffb945b04f93f8c49d0c840b0bff6310b) ) ROM_COPY( "oki" , 0x40000, 0x00000, 0x40000 ) @@ -1316,7 +1316,7 @@ ROM_START( mjzoomin ) ROM_REGION( 0x100, "prirom", 0 ) /* Priority PROM */ ROM_LOAD( "mj15.bpr", 0x000, 0x100, CRC(ebac41f9) SHA1(9d1629d977849663392cbf03a3ddf76665f88608) ) - + ROM_REGION( 0x120, "proms", 0 ) /* Misc PROMs (unknown) */ ROM_LOAD( "mj16.bpr", 0x000, 0x100, CRC(8d5dc1f6) SHA1(9f723e7cd44f8c09ec30b04725644346484ec753) ) ROM_LOAD( "mj17.bpr", 0x100, 0x020, CRC(a17c3e8a) SHA1(d7969fad7cec9c792c53aa457f4ad764a727e0a5) ) @@ -1358,7 +1358,7 @@ ROM_START( kakumei ) ROM_REGION( 0x100, "prirom", 0 ) /* Priority PROM */ ROM_LOAD( "mj15.bpr", 0x000, 0x100, CRC(ebac41f9) SHA1(9d1629d977849663392cbf03a3ddf76665f88608) ) - + ROM_REGION( 0x120, "proms", 0 ) /* Misc PROMs (unknown) */ ROM_LOAD( "mj16.bpr", 0x000, 0x100, CRC(8d5dc1f6) SHA1(9f723e7cd44f8c09ec30b04725644346484ec753) ) ROM_LOAD( "mj17.bpr", 0x100, 0x020, CRC(a17c3e8a) SHA1(d7969fad7cec9c792c53aa457f4ad764a727e0a5) ) @@ -1397,7 +1397,7 @@ ROM_START( kakumei2 ) ROM_REGION( 0x100, "prirom", 0 ) /* Priority PROM */ ROM_LOAD( "mj15.bpr", 0x000, 0x100, CRC(ebac41f9) SHA1(9d1629d977849663392cbf03a3ddf76665f88608) ) - + ROM_REGION( 0x120, "proms", 0 ) /* Misc PROMs (unknown) */ ROM_LOAD( "mj16.bpr", 0x000, 0x100, CRC(8d5dc1f6) SHA1(9f723e7cd44f8c09ec30b04725644346484ec753) ) ROM_LOAD( "mj17.bpr", 0x100, 0x020, CRC(a17c3e8a) SHA1(d7969fad7cec9c792c53aa457f4ad764a727e0a5) ) @@ -1487,7 +1487,7 @@ ROM_START( suchiesp ) ROM_REGION( 0x100, "prirom", 0 ) /* Priority PROM */ ROM_LOAD( "mj15.bpr", 0x000, 0x100, CRC(ebac41f9) SHA1(9d1629d977849663392cbf03a3ddf76665f88608) ) - + ROM_REGION( 0x120, "proms", 0 ) /* Misc PROMs (unknown) */ ROM_LOAD( "mj16.bpr", 0x000, 0x100, CRC(8d5dc1f6) SHA1(9f723e7cd44f8c09ec30b04725644346484ec753) ) ROM_LOAD( "pr93035.17", 0x100, 0x020, CRC(ab28ae42) SHA1(e05652c4bd5db4c7d7a1bfdeb63841e8b019f24c) ) @@ -1595,7 +1595,7 @@ WRITE16_MEMBER(jalmah_state::daireika_mcu_w) 2nd M68k code uploaded by the MCU. (sound playback) *******************************************************/ MCU_JMP(0x0020/2,SNIPPET_SOUND); - + /******************************************************* 3rd M68k code uploaded by the MCU. see mjzoomin_mcu_w @@ -1610,7 +1610,7 @@ WRITE16_MEMBER(jalmah_state::daireika_mcu_w) MCU_JMP(0x100/2,SNIPPET_CLR_LAYER0); MCU_JMP(0x108/2,SNIPPET_CLR_LAYER1); MCU_JMP(0x110/2,SNIPPET_CLR_LAYER2); - + /* layer 3 clear function is already in 68k ROM program???*/ m_sharedram[0x0126/2] = 0x4ef9; m_sharedram[0x0128/2] = 0x0000; @@ -1667,7 +1667,7 @@ WRITE16_MEMBER(jalmah_state::mjzoomin_mcu_w) address. ******************************************************/ MCU_JMP(0x00c6/2,SNIPPET_PALETTE1); - + /******************************************************* 2nd M68k code uploaded by the MCU (Sound read/write) (Note:copied from suchiesp,check here the sound banking) diff --git a/src/mame/drivers/lwings.cpp b/src/mame/drivers/lwings.cpp index f386b83023b..9bed8a568b0 100644 --- a/src/mame/drivers/lwings.cpp +++ b/src/mame/drivers/lwings.cpp @@ -51,7 +51,7 @@ Notes: which do no jive with actual emulation. One can only assume this means the manual is incorrect and software was adjusted later but the game could use some PCB comparisons of DIP selections to be certain. - + ***************************************************************************/ #include "emu.h" diff --git a/src/mame/drivers/neogeo.cpp b/src/mame/drivers/neogeo.cpp index da0bacb743d..49067ee0c27 100644 --- a/src/mame/drivers/neogeo.cpp +++ b/src/mame/drivers/neogeo.cpp @@ -8872,21 +8872,21 @@ ROM_START( mslug3 ) /* Original Version - Encrypted Code & GFX */ /* revision 20 ROM_END /* - The Program roms for the set below are actually 4 ROMs contained on a recycled NeoGeo Pocket card and marked + The Program roms for the set below are actually 4 ROMs contained on a recycled NeoGeo Pocket card and marked - SNK48249Q - JAPAN9948HAK - T8V12A - (two of these) + SNK48249Q + JAPAN9948HAK + T8V12A + (two of these) - SNK48327V - JAPAN9948HAK - T8V12A - (two of these) + SNK48327V + JAPAN9948HAK + T8V12A + (two of these) - KOF2000 and Garou boards have been found with the same setup (data verified to match existing sets) - The roms were dumped via the NGPC cartridge edge connector, so the exact way they should be split into 4 is unknown. - As a result the ROM has been split to match the usual configuration as it likely exists like this too anyway. + KOF2000 and Garou boards have been found with the same setup (data verified to match existing sets) + The roms were dumped via the NGPC cartridge edge connector, so the exact way they should be split into 4 is unknown. + As a result the ROM has been split to match the usual configuration as it likely exists like this too anyway. */ ROM_START( mslug3a ) /* Original Version - Encrypted Code & GFX */ /* MVS VERSION */ diff --git a/src/mame/drivers/nichild.cpp b/src/mame/drivers/nichild.cpp index 4d2f81b7c92..a8b8cc62180 100644 --- a/src/mame/drivers/nichild.cpp +++ b/src/mame/drivers/nichild.cpp @@ -4,28 +4,28 @@ 'Nichibutsu LD' HW (c) 199? Nichibutsu - TODO: - - Understand how MMU works (both games jumps to invalid areas, probably - port A remaps memory for the whole space!); - - (if ld check patched) memory error printed by ldquiz4, most likely - related to above; - - Unknown LaserDisc type; - - Verify irq vector for vblank irq, and make it work with daisy chain; - - Unknown irq vector for LaserDisc strobe (ldquiz4 sets a flag at $f014, - the only place it clears it is at snippet 0x0ED6); - - hookup audio CPU (same as niyanpai HW?) + TODO: + - Understand how MMU works (both games jumps to invalid areas, probably + port A remaps memory for the whole space!); + - (if ld check patched) memory error printed by ldquiz4, most likely + related to above; + - Unknown LaserDisc type; + - Verify irq vector for vblank irq, and make it work with daisy chain; + - Unknown irq vector for LaserDisc strobe (ldquiz4 sets a flag at $f014, + the only place it clears it is at snippet 0x0ED6); + - hookup audio CPU (same as niyanpai HW?) ============================================================================= - - 1 x TMPZ84C011AF-6 main CPU - 1 x 21.47727MHz OSC - 1 x Z0840004PSC audio CPU - 1 x 4.000MHz OSC - 1 x Yamaha V9938 - 1 x uPC1352C - 1 x Yamaha YM3812 - 2 x 8 dip switch banks - + + 1 x TMPZ84C011AF-6 main CPU + 1 x 21.47727MHz OSC + 1 x Z0840004PSC audio CPU + 1 x 4.000MHz OSC + 1 x Yamaha V9938 + 1 x uPC1352C + 1 x Yamaha YM3812 + 2 x 8 dip switch banks + ***************************************************************************/ @@ -79,13 +79,13 @@ private: READ8_MEMBER(nichild_state::gfx_r) { uint32_t gfx_offset; - + gfx_offset = ((offset & 0x007f) << 8); gfx_offset |= ((offset & 0xff00) >> 8); gfx_offset |= m_gfx_bank; - + //printf("%08x %02x\n",gfx_offset,m_gfx_bank); - + return m_gfxrom[gfx_offset]; } @@ -94,7 +94,7 @@ READ8_MEMBER(nichild_state::gfx_r) WRITE8_MEMBER(nichild_state::porta_w) { printf("PORTA %02x\n",data); -// machine().debug_break(); +// machine().debug_break(); } WRITE8_MEMBER(nichild_state::portb_w) @@ -143,7 +143,7 @@ void nichild_state::nichild_map(address_map &map) void nichild_state::nichild_io(address_map &map) { -// map.global_mask(0xff); +// map.global_mask(0xff); map(0x60, 0x60).mirror(0xff00).w(FUNC(nichild_state::mux_w)); // shabdama accesses 0x70-0x73, ldquiz4 0x7c-0x7f map(0x70, 0x73).mirror(0xff0c).rw(m_v9938, FUNC(v9938_device::read), FUNC(v9938_device::write)); @@ -234,7 +234,7 @@ MACHINE_CONFIG_START(nichild_state::nichild) /* basic machine hardware */ MCFG_DEVICE_ADD("maincpu",TMPZ84C011,MAIN_CLOCK/4) -// MCFG_Z80_DAISY_CHAIN(daisy_chain_main) +// MCFG_Z80_DAISY_CHAIN(daisy_chain_main) MCFG_DEVICE_PROGRAM_MAP(nichild_map) MCFG_DEVICE_IO_MAP(nichild_io) MCFG_DEVICE_VBLANK_INT_DRIVER("screen", nichild_state, vdp_irq) @@ -247,8 +247,8 @@ MACHINE_CONFIG_START(nichild_state::nichild) /* video hardware */ MCFG_V9938_ADD("v9938", "screen", 0x40000, MAIN_CLOCK) -// MCFG_V99X8_INTERRUPT_CALLBACK(INPUTLINE("maincpu", 0)) -// MCFG_V99X8_INTERRUPT_CALLBACK(WRITELINE(*this, nichild_state, vdp_irq)) +// MCFG_V99X8_INTERRUPT_CALLBACK(INPUTLINE("maincpu", 0)) +// MCFG_V99X8_INTERRUPT_CALLBACK(WRITELINE(*this, nichild_state, vdp_irq)) MCFG_V99X8_SCREEN_ADD_NTSC("screen", "v9938", MAIN_CLOCK) /* sound hardware */ diff --git a/src/mame/drivers/ninjakd2.cpp b/src/mame/drivers/ninjakd2.cpp index a1620836c68..30253cb6471 100644 --- a/src/mame/drivers/ninjakd2.cpp +++ b/src/mame/drivers/ninjakd2.cpp @@ -313,7 +313,7 @@ READ8_MEMBER(omegaf_state::io_protection_r) case 1: // dip switches switch (offset) { - case 0: + case 0: case 1: result = m_dsw_io[offset & 1]->read(); break; case 2: result = 0x02; break; } @@ -322,7 +322,7 @@ READ8_MEMBER(omegaf_state::io_protection_r) case 2: // player inputs switch (offset) { - case 0: + case 0: case 1: result = m_pad_io[offset & 1]->read(); break; case 2: result = 0x01; break; } @@ -960,7 +960,7 @@ void omegaf_state::machine_start() void omegaf_state::machine_reset() { io_protection_reset(); - + ninjakd2_state::machine_reset(); } @@ -1085,8 +1085,8 @@ MACHINE_CONFIG_START(omegaf_state::omegaf) MCFG_DEVICE_MODIFY("soundcpu") MCFG_DEVICE_PROGRAM_MAP(ninjakid_nopcm_sound_cpu) -// MCFG_MACHINE_START_OVERRIDE(ninjakd2_state,omegaf) -// MCFG_MACHINE_RESET_OVERRIDE(ninjakd2_state,omegaf) +// MCFG_MACHINE_START_OVERRIDE(ninjakd2_state,omegaf) +// MCFG_MACHINE_RESET_OVERRIDE(ninjakd2_state,omegaf) /* video hardware */ MCFG_VIDEO_START_OVERRIDE(omegaf_state,omegaf) diff --git a/src/mame/drivers/olytext.cpp b/src/mame/drivers/olytext.cpp index 71d99d5ff4c..7fa329897c3 100644 --- a/src/mame/drivers/olytext.cpp +++ b/src/mame/drivers/olytext.cpp @@ -39,18 +39,18 @@ public: olytext_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag) , m_maincpu(*this, "maincpu") -// , m_fdd0(*this, "fdc:0"), -// , m_fdd1(*this, "fdc:1"), -// , m_rom(*this, "mainrom"), -// , m_lowram(*this, "lowram"), - { } +// , m_fdd0(*this, "fdc:0"), +// , m_fdd1(*this, "fdc:1"), +// , m_rom(*this, "mainrom"), +// , m_lowram(*this, "lowram"), + { } void olytext(machine_config &config); protected: virtual void machine_start() override; virtual void machine_reset() override; -// virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override; +// virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override; private: uint32_t screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); @@ -60,10 +60,10 @@ private: void io_map(address_map &map); required_device m_maincpu; -// required_device m_fdd0; -// optional_device m_fdd1; -// required_memory_region m_rom; -// required_shared_ptr m_lowram; +// required_device m_fdd0; +// optional_device m_fdd1; +// required_memory_region m_rom; +// required_shared_ptr m_lowram; }; void olytext_state::machine_reset() @@ -122,19 +122,19 @@ void olytext_state::machine_start() void olytext_state::keyboard_put(u8 data) { -// if (data) -// { -// m_keystroke=data; -// } +// if (data) +// { +// m_keystroke=data; +// } } //WRITE8_MEMBER( olytext_state::fdcctrl_w ) //{ -// m_fdcctrl = data; -// m_romen = (m_fdcctrl & 1) ? false : true; -// m_fdd0->get_device()->mon_w(!(data & 2)); -// if(m_fdd1) -// m_fdd1->get_device()->mon_w(!(data & 4)); +// m_fdcctrl = data; +// m_romen = (m_fdcctrl & 1) ? false : true; +// m_fdd0->get_device()->mon_w(!(data & 2)); +// if(m_fdd1) +// m_fdd1->get_device()->mon_w(!(data & 4)); //} static void olytext_floppies(device_slot_interface &device) diff --git a/src/mame/drivers/pacman.cpp b/src/mame/drivers/pacman.cpp index a481316e0e6..207868f8383 100644 --- a/src/mame/drivers/pacman.cpp +++ b/src/mame/drivers/pacman.cpp @@ -4852,11 +4852,11 @@ ROM_START( titanpac ) /* GDP-01 main PCB with GDP-02 auxiliary card (same as Pir ROM_LOAD( "t103.7h", 0x2000, 0x0800, CRC(060e514e) SHA1(9ed1bd9430fc7c70a52f14cbd5429887f8c6c11b) ) ROM_LOAD( "t107.6h", 0x2800, 0x0800, CRC(9209882a) SHA1(db71d68ce9ff059e0d4a2d10cf8882fef637b38b) ) ROM_LOAD( "t104.7j", 0x3000, 0x0800, CRC(2c8c7299) SHA1(b3c904869842bcf29434b1554b646e2018d9a5a3) ) - ROM_LOAD( "t108.6j", 0x3800, 0x0800, CRC(ff943d70) SHA1(7d080f0645227a2f61b2e5c95cad03ff1347aff3) ) + ROM_LOAD( "t108.6j", 0x3800, 0x0800, CRC(ff943d70) SHA1(7d080f0645227a2f61b2e5c95cad03ff1347aff3) ) ROM_REGION( 0x2000, "gfx1" , 0) - ROM_LOAD( "t109.5e", 0x0000, 0x0800, CRC(412e723e) SHA1(ecadc3cc179e0ccb875f693d2f7cbadcca0a3c86) ) - ROM_LOAD( "t111.5h", 0x0800, 0x0800, CRC(87d28931) SHA1(6b10cd76a88b81d96cf1a8a69cb8ee0cc0289a93) ) + ROM_LOAD( "t109.5e", 0x0000, 0x0800, CRC(412e723e) SHA1(ecadc3cc179e0ccb875f693d2f7cbadcca0a3c86) ) + ROM_LOAD( "t111.5h", 0x0800, 0x0800, CRC(87d28931) SHA1(6b10cd76a88b81d96cf1a8a69cb8ee0cc0289a93) ) ROM_LOAD( "t110.5f", 0x1000, 0x0800, CRC(3be1601b) SHA1(4a4ad4b6794d8e5d0cdd0d48b832a147d5f17eda) ) ROM_LOAD( "t112.5j", 0x1800, 0x0800, CRC(f773cb8b) SHA1(eae5bf3da8d89452c53e4d73657d63201ebe1e65) ) diff --git a/src/mame/drivers/palmz22.cpp b/src/mame/drivers/palmz22.cpp index a4dd5f84437..a5b1b62cc84 100644 --- a/src/mame/drivers/palmz22.cpp +++ b/src/mame/drivers/palmz22.cpp @@ -110,7 +110,7 @@ private: DECLARE_WRITE32_MEMBER(s3c2410_gpio_port_w); DECLARE_READ32_MEMBER(s3c2410_core_pin_r); DECLARE_READ32_MEMBER(s3c2410_adc_data_r ); - + void map(address_map &map); }; diff --git a/src/mame/drivers/peplus.cpp b/src/mame/drivers/peplus.cpp index 89e291468e9..ac77dc2e427 100644 --- a/src/mame/drivers/peplus.cpp +++ b/src/mame/drivers/peplus.cpp @@ -6227,7 +6227,7 @@ ROM_END ROM_START( pepp0472 ) /* Normal board : Deuces Wild Poker (PP0472) - PSR Verified */ /* - w/D w/oD + w/D w/oD PayTable 3K STR FL FH 4K SF 5K RF 4D RF (Bonus) ------------------------------------------------------------ ???? 1 2 2 3 4 10 15 25 400 250 800 diff --git a/src/mame/drivers/portrait.cpp b/src/mame/drivers/portrait.cpp index c1a048fffa3..a799eb8830f 100644 --- a/src/mame/drivers/portrait.cpp +++ b/src/mame/drivers/portrait.cpp @@ -30,8 +30,8 @@ TODO: - offset background scrolling positions (i.e. monkey climbing on trees); - camera device (type?); - misc unknown input/outputs; - - + + RAM Location 9240: Controls what level you are on: 0-3 (for each scene) ------------------------------------------------------------------------- diff --git a/src/mame/drivers/taitosj.cpp b/src/mame/drivers/taitosj.cpp index 74d6fb3a153..9fcdf538b22 100644 --- a/src/mame/drivers/taitosj.cpp +++ b/src/mame/drivers/taitosj.cpp @@ -1625,7 +1625,7 @@ static INPUT_PORTS_START( kikstart ) PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_CONDITION("DSW3", 0x08, EQUALS, 0x00) PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNKNOWN ) - + PORT_START("IN1") PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_2WAY PORT_COCKTAIL PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_2WAY PORT_COCKTAIL diff --git a/src/mame/drivers/tatsumi.cpp b/src/mame/drivers/tatsumi.cpp index da6417d3ec7..c6b51b8305a 100644 --- a/src/mame/drivers/tatsumi.cpp +++ b/src/mame/drivers/tatsumi.cpp @@ -14,31 +14,31 @@ TODO: - Sprite rotation - Round Up 5: Finish road layer. - Tunnel sections are borderline unplayable, plus slopes are ugly to watch. + Tunnel sections are borderline unplayable, plus slopes are ugly to watch. - Apache 3: road layer, has twelve rotation registers! - (fixed) Cycle Warriors: transparent road layer on sidelines, wrong mask_data? - (fixed) Missing BG layer (Round Up 5) - banked VRAM data from somewhere!? - - Round Up 5: always boots with a coin inserted - $5152 is the coin counter, gets an explicit 1 at boot. - There are other two buffers read from 68k before that, written to $5156 and $515a - If these are 0xffff by then game boots normally ... - - (fixed) Round Up 5 doesn't survive a reset - - (fixed?) Cycle Warriors: test mode text does not appear as it needs a -256 Y - scroll offset from somewhere. - - (fixed) Cycle Warriors: sometimes it draws garbage on character select or even hangs - depending on where player coins up, most likely caused by miscommunication with sub CPU? - - (fixed) Cycle Warriors: ranking screen is completely wrong; + - Round Up 5: always boots with a coin inserted + $5152 is the coin counter, gets an explicit 1 at boot. + There are other two buffers read from 68k before that, written to $5156 and $515a + If these are 0xffff by then game boots normally ... + - (fixed) Round Up 5 doesn't survive a reset + - (fixed?) Cycle Warriors: test mode text does not appear as it needs a -256 Y + scroll offset from somewhere. + - (fixed) Cycle Warriors: sometimes it draws garbage on character select or even hangs + depending on where player coins up, most likely caused by miscommunication with sub CPU? + - (fixed) Cycle Warriors: ranking screen is completely wrong; - (fixed) Cycle Warriors: ugly orange color on character select and briefing screens, layer disable? - Combine Big Fight & CycleWarriors video routines - currently each game uses different sized tilemaps - these are probably software controlled rather than hardwired, but I don't think either game changes the size at runtime. - - Split these games into individual drivers, write new devices for video routines. + - Split these games into individual drivers, write new devices for video routines. - Dip switches - - Deviceify HD6445 (superset of 6845) + - Deviceify HD6445 (superset of 6845) - Various other things.. - + reference of bigfight : https://youtu.be/aUUoUCr6yhk Emulation by Bryan McPhail, mish@tendril.co.uk @@ -218,13 +218,13 @@ WRITE16_MEMBER(cyclwarr_state::output_w) } WRITE8_MEMBER(roundup5_state::output_w) -{ +{ /* - ---- x--- depending on Output Mode dipswitch: - A Mode: enables when police siren is on - B Mode: enables when player collides with objects or go offroad - ---- -x-- start button light - ---- --xx coin counters + ---- x--- depending on Output Mode dipswitch: + A Mode: enables when police siren is on + B Mode: enables when player collides with objects or go offroad + ---- -x-- start button light + ---- --xx coin counters */ // avoid spurious write to coin counters if(data == 0xff) @@ -346,7 +346,7 @@ void cyclwarr_state::common_map(address_map &map) map(0x0c0000, 0x0c3fff).rw(FUNC(cyclwarr_state::cyclwarr_sprite_r), FUNC(cyclwarr_state::cyclwarr_sprite_w)).share("spriteram"); map(0x0ca000, 0x0ca1ff).rw(FUNC(cyclwarr_state::tatsumi_sprite_control_r), FUNC(cyclwarr_state::tatsumi_sprite_control_w)).share("obj_ctrl_ram"); map(0x0d0000, 0x0d3fff).ram().w(m_palette, FUNC(palette_device::write16)).share("palette"); - + // games accesses these ranges differently, we do mirroring in rom loading to make them match. // address bit A19 controls if access routes to upper or lower roms // TODO: it's unknown what Big Fight is supposed to return for the lower roms, let's assume mirror for the time being. @@ -944,7 +944,7 @@ MACHINE_CONFIG_START(roundup5_state::roundup5) MCFG_DEVICE_PROGRAM_MAP(roundup5_z80_map) MCFG_QUANTUM_TIME(attotime::from_hz(6000)) - + MCFG_DEVICE_ADD("ppi", I8255, 0) MCFG_I8255_IN_PORTA_CB(IOPORT("IN0")) MCFG_I8255_IN_PORTB_CB(IOPORT("IN1")) @@ -980,13 +980,13 @@ MACHINE_CONFIG_END void cyclwarr_state::machine_reset() { uint16_t *src; - + // transfer data from rom to initial vector table src = (uint16_t *)memregion("master_rom")->base(); - + for(int i=0;i<0x100/2;i++) m_master_ram[i] = src[i]; - + src = (uint16_t *)memregion("slave_rom")->base(); for(int i=0;i<0x100/2;i++) @@ -996,10 +996,10 @@ void cyclwarr_state::machine_reset() // TODO: better way? m_maincpu->pulse_input_line(INPUT_LINE_RESET, attotime::zero); m_subcpu->pulse_input_line(INPUT_LINE_RESET, attotime::zero); - + m_last_control = 0; m_control_word = 0; - + m_road_color_bank = m_prev_road_bank = 0; } @@ -1065,8 +1065,8 @@ MACHINE_CONFIG_START(cyclwarr_state::bigfight) cyclwarr(config); // TODO: it's same video HW, we don't know how/where video registers are mapped -// MCFG_SCREEN_MODIFY("screen") -// MCFG_SCREEN_UPDATE_DRIVER(cyclwarr_state, screen_update_bigfight) +// MCFG_SCREEN_MODIFY("screen") +// MCFG_SCREEN_UPDATE_DRIVER(cyclwarr_state, screen_update_bigfight) MCFG_VIDEO_START_OVERRIDE(cyclwarr_state, bigfight) diff --git a/src/mame/drivers/trucocl.cpp b/src/mame/drivers/trucocl.cpp index 6a921694a75..c88e681638b 100644 --- a/src/mame/drivers/trucocl.cpp +++ b/src/mame/drivers/trucocl.cpp @@ -69,7 +69,7 @@ WRITE8_MEMBER(trucocl_state::audio_dac_w) uint8_t *rom = memregion("maincpu")->base(); int dac_address = ( data & 0xf0 ) << 8; int sel = ( ( (~data) >> 1 ) & 2 ) | ( data & 1 ); - + if ( m_cur_dac_address != dac_address ) { m_cur_dac_address_index = 0; @@ -121,7 +121,7 @@ static INPUT_PORTS_START( trucocl ) PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN1 ) //PORT_IMPULSE(60) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_IMPULSE(2) - + PORT_START("DSW") PORT_DIPNAME( 0x01, 0x01, "Enable BGM fanfare" ) // enables extra BGMs on attract mode PORT_DIPSETTING( 0x00, DEF_STR( No ) ) @@ -176,7 +176,7 @@ void trucocl_state::machine_reset() INTERRUPT_GEN_MEMBER(trucocl_state::trucocl_interrupt) { -// if(m_irq_mask) +// if(m_irq_mask) device.execute().set_input_line(0, HOLD_LINE); } diff --git a/src/mame/drivers/vgmplay.cpp b/src/mame/drivers/vgmplay.cpp index dfcd736dabb..fa58d367d19 100644 --- a/src/mame/drivers/vgmplay.cpp +++ b/src/mame/drivers/vgmplay.cpp @@ -1691,11 +1691,11 @@ INPUT_CHANGED_MEMBER(vgmplay_state::key_pressed) static INPUT_PORTS_START( vgmplay ) PORT_START("CONTROLS") - PORT_BIT(0x0001, IP_ACTIVE_HIGH, IPT_BUTTON1) PORT_CHANGED_MEMBER(DEVICE_SELF, vgmplay_state, key_pressed, VGMPLAY_STOP) PORT_NAME("Stop") - PORT_BIT(0x0002, IP_ACTIVE_HIGH, IPT_BUTTON2) PORT_CHANGED_MEMBER(DEVICE_SELF, vgmplay_state, key_pressed, VGMPLAY_PAUSE) PORT_NAME("Pause") - PORT_BIT(0x0004, IP_ACTIVE_HIGH, IPT_BUTTON3) PORT_CHANGED_MEMBER(DEVICE_SELF, vgmplay_state, key_pressed, VGMPLAY_PLAY) PORT_NAME("Play") - PORT_BIT(0x0008, IP_ACTIVE_HIGH, IPT_BUTTON4) PORT_CHANGED_MEMBER(DEVICE_SELF, vgmplay_state, key_pressed, VGMPLAY_RESTART) PORT_NAME("Restart") - PORT_BIT(0x0010, IP_ACTIVE_HIGH, IPT_BUTTON5) PORT_CHANGED_MEMBER(DEVICE_SELF, vgmplay_state, key_pressed, VGMPLAY_LOOP) PORT_NAME("Loop") + PORT_BIT(0x0001, IP_ACTIVE_HIGH, IPT_BUTTON1) PORT_CHANGED_MEMBER(DEVICE_SELF, vgmplay_state, key_pressed, VGMPLAY_STOP) PORT_NAME("Stop") + PORT_BIT(0x0002, IP_ACTIVE_HIGH, IPT_BUTTON2) PORT_CHANGED_MEMBER(DEVICE_SELF, vgmplay_state, key_pressed, VGMPLAY_PAUSE) PORT_NAME("Pause") + PORT_BIT(0x0004, IP_ACTIVE_HIGH, IPT_BUTTON3) PORT_CHANGED_MEMBER(DEVICE_SELF, vgmplay_state, key_pressed, VGMPLAY_PLAY) PORT_NAME("Play") + PORT_BIT(0x0008, IP_ACTIVE_HIGH, IPT_BUTTON4) PORT_CHANGED_MEMBER(DEVICE_SELF, vgmplay_state, key_pressed, VGMPLAY_RESTART) PORT_NAME("Restart") + PORT_BIT(0x0010, IP_ACTIVE_HIGH, IPT_BUTTON5) PORT_CHANGED_MEMBER(DEVICE_SELF, vgmplay_state, key_pressed, VGMPLAY_LOOP) PORT_NAME("Loop") INPUT_PORTS_END void vgmplay_state::file_map(address_map &map) diff --git a/src/mame/drivers/vicdual.cpp b/src/mame/drivers/vicdual.cpp index f5a24140a1d..539ccd3e326 100644 --- a/src/mame/drivers/vicdual.cpp +++ b/src/mame/drivers/vicdual.cpp @@ -124,13 +124,13 @@ INPUT_CHANGED_MEMBER(vicdual_state::coin_changed) } INPUT_CHANGED_MEMBER( headonsa_state::headonsa_coin_inserted ) -{ +{ if (newval) { /* increment the coin counter */ machine().bookkeeping().coin_counter_w(0, 1); machine().bookkeeping().coin_counter_w(0, 0); - + // hooked up to NMI instead of RESET line m_maincpu->pulse_input_line(INPUT_LINE_NMI, attotime::zero); @@ -704,7 +704,7 @@ static INPUT_PORTS_START( headonsa ) PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_4WAY PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_4WAY PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_4WAY - + PORT_MODIFY("IN1") PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_DIPNAME( 0x02, 0x00, DEF_STR( Coinage ) ) @@ -941,7 +941,7 @@ static INPUT_PORTS_START( headon2 ) PORT_DIPNAME(0x18, 0x18, DEF_STR( Lives ) ) PORT_DIPSETTING( 0x18, "4" ) PORT_DIPSETTING( 0x10, "5" ) -// PORT_DIPSETTING( 0x08, "5" ) +// PORT_DIPSETTING( 0x08, "5" ) PORT_DIPSETTING( 0x00, "6" ) PORT_BIT(0xe0, IP_ACTIVE_LOW, IPT_UNUSED ) @@ -972,7 +972,7 @@ static INPUT_PORTS_START( car2 ) PORT_START("IN1") // seems to ignore lives dip-switches (hardcoded to 3 lives) PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_UNKNOWN ) /* probably unused */ - + PORT_START("IN2") PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, get_timer_value, nullptr) PORT_DIPNAME( 0x02, 0x00, DEF_STR( Coinage ) ) @@ -990,7 +990,7 @@ static INPUT_PORTS_START( headon2s ) PORT_MODIFY("IN0") PORT_BIT( 0x03, IP_ACTIVE_HIGH, IPT_UNUSED ) PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_START1 ) - + PORT_MODIFY("IN2") PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, read_coin_status, nullptr) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) diff --git a/src/mame/etc/jalmah.x68 b/src/mame/etc/jalmah.x68 index 3615bf9bbf8..18ee8be6488 100644 --- a/src/mame/etc/jalmah.x68 +++ b/src/mame/etc/jalmah.x68 @@ -1,6 +1,6 @@ ; license:LGPL-2.1+ ; copyright-holders:Angelo Salese - ;***************************************************************** + ;***************************************************************** ; Jaleco Mahjong code simulation snippets for 1st MCU games ; ; Games using this: @@ -12,133 +12,133 @@ ; ; START: - ORG $0 ; palette code snippet (test mode & gameplay) - move.w #$1, $80016.l ; set priority number (for urashima) - move.w #$f, D0 ; set loop 1 + ORG $0 ; palette code snippet (test mode & gameplay) + move.w #$1, $80016.l ; set priority number (for urashima) + move.w #$f, D0 ; set loop 1 FetchNewPalette: - move.l A0, $100400.l ; save address to our local buffer (address currently points to an index of actual palette to transfer) - movea.l (A0), A0 ; read ROM location for the actual palette source - move.w #$f, D1 ; set loop 2 variable - bsr UploadPaletteChunk ; jump to uploading routine - movea.l $100400.l, A0 ; restore address index, increment by next address - adda.w #$4, A0 - dbra D0, FetchNewPalette - rts + move.l A0, $100400.l ; save address to our local buffer (address currently points to an index of actual palette to transfer) + movea.l (A0), A0 ; read ROM location for the actual palette source + move.w #$f, D1 ; set loop 2 variable + bsr UploadPaletteChunk ; jump to uploading routine + movea.l $100400.l, A0 ; restore address index, increment by next address + adda.w #$4, A0 + dbra D0, FetchNewPalette + rts UploadPaletteChunk: - move.w (A0)+, (A1)+ ; copy palette source in ROM to palette RAM - dbra D1, UploadPaletteChunk - rts + move.w (A0)+, (A1)+ ; copy palette source in ROM to palette RAM + dbra D1, UploadPaletteChunk + rts - ORG $0800 ; sound code snippet - movem.l D1, -(A7) - move.w D0, D1 ; D0 is raw sound command, low byte is command number, everything else is banking and probably voice channel (unhandled) - ror.w #$8, D1 - and.w #$f, D1 ; take D1 as raw banking number - bsr CheckSoundZA - bsr CheckSoundBank - move.w #$8, $80040.l ; clear channel - bsr SoundStatus - andi.w #$3f, D0 ; take command number and write it to OKI port - ori.w #$80, D0 - move.w D0, $80040.l - bsr SoundStatus - move.w #$10, $80040.l ; play channel - movem.l (A7)+, D1 - rts + ORG $0800 ; sound code snippet + movem.l D1, -(A7) + move.w D0, D1 ; D0 is raw sound command, low byte is command number, everything else is banking and probably voice channel (unhandled) + ror.w #$8, D1 + and.w #$f, D1 ; take D1 as raw banking number + bsr CheckSoundZA + bsr CheckSoundBank + move.w #$8, $80040.l ; clear channel + bsr SoundStatus + andi.w #$3f, D0 ; take command number and write it to OKI port + ori.w #$80, D0 + move.w D0, $80040.l + bsr SoundStatus + move.w #$10, $80040.l ; play channel + movem.l (A7)+, D1 + rts SoundStatus: - movem.l D0, -(A7) + movem.l D0, -(A7) ReadStatus: - move.w $80040.l, D0 ; check OKI voice status - andi.w #$1,D0 - bne ReadStatus - movem.l (A7)+, D0 - rts + move.w $80040.l, D0 ; check OKI voice status + andi.w #$1,D0 + bne ReadStatus + movem.l (A7)+, D0 + rts ; guess: special bits set in register D0 affect banking (oki can play up to 64 samples so bits 6 and 7 cannot be used) ; we simulate "ZA" writing but use the other bank register (jalmah can do both, cfr. ports $80018 and $8001a CheckSoundZA: - btst #$6, D0 ; urashima BGM at start of game - beq NoZA1 - ror.w #$1, D1 ; shift one down - rts + btst #$6, D0 ; urashima BGM at start of game + beq NoZA1 + ror.w #$1, D1 ; shift one down + rts NoZA1: - btst #$07, D0 ; mjzoomin BGM at start of game - beq NoZA2 - move.w #$8, D1 ; hardcode to bank 3 + btst #$07, D0 ; mjzoomin BGM at start of game + beq NoZA2 + move.w #$8, D1 ; hardcode to bank 3 NoZA2: - rts + rts CheckSoundBank: - cmpi.w #$1, D1 ; verify our raw D1 and set base bank accordingly - beq SetBank0 - cmpi.w #$2, D1 - beq SetBank1 - cmpi.w #$4, D1 - beq SetBank2 - move.w #$3, $80018.l - rts + cmpi.w #$1, D1 ; verify our raw D1 and set base bank accordingly + beq SetBank0 + cmpi.w #$2, D1 + beq SetBank1 + cmpi.w #$4, D1 + beq SetBank2 + move.w #$3, $80018.l + rts SetBank0: - move.w #$0, $80018.l - rts + move.w #$0, $80018.l + rts SetBank1: - move.w #$1, $80018.l - rts + move.w #$1, $80018.l + rts SetBank2: - move.w #$2, $80018.l - rts + move.w #$2, $80018.l + rts - ORG $1000 ; tile upload snippet + ORG $1000 ; tile upload snippet TileUploadStart: - move.w (A2)+, (A1)+ ; just take A2 source (tiles) to A1 destination VRAM - dbra D0, TileUploadStart - rts + move.w (A2)+, (A1)+ ; just take A2 source (tiles) to A1 destination VRAM + dbra D0, TileUploadStart + rts - ORG $1800 ; (another) palette code snippet - movem.l D0-D7/A1-A6, -(A7) ; save stack (A0 intentionally updated by this snippet) - move.w #$f, D0 ; what's the difference here? Same as above but no hardcoded priority? - bsr FetchNewPalette - movem.l (A7)+, D0-D7/A1-A6 - rts + ORG $1800 ; (another) palette code snippet + movem.l D0-D7/A1-A6, -(A7) ; save stack (A0 intentionally updated by this snippet) + move.w #$f, D0 ; what's the difference here? Same as above but no hardcoded priority? + bsr FetchNewPalette + movem.l (A7)+, D0-D7/A1-A6 + rts - ORG $2000 ; daireikai RNG snippet (guess) - move.w D5, $100400.l - move.w $f000c.l, D5 ; take current RNG number - add.l D6, D5 ; add D6 - andi.w #$3f, D5 - move.w D5, $f000c.l ; round it - move.w $100400.l, D5 - rts - ORG $2800 ; daireikai layer clearances - movem.l D0-D7/A0-A6, -(A7) - lea $90000.l, A6 ; layer 0 - move.w #$1fff, D1 - move.w #$00ff, D0 - bsr ClearLayer - movem.l (A7)+, D0-D7/A0-A6 - rts + ORG $2000 ; daireikai RNG snippet (guess) + move.w D5, $100400.l + move.w $f000c.l, D5 ; take current RNG number + add.l D6, D5 ; add D6 + andi.w #$3f, D5 + move.w D5, $f000c.l ; round it + move.w $100400.l, D5 + rts + ORG $2800 ; daireikai layer clearances + movem.l D0-D7/A0-A6, -(A7) + lea $90000.l, A6 ; layer 0 + move.w #$1fff, D1 + move.w #$00ff, D0 + bsr ClearLayer + movem.l (A7)+, D0-D7/A0-A6 + rts ClearLayer: - move.w D0, (A6)+ - dbra D1, ClearLayer - rts - ORG $2880 - movem.l D0-D7/A0-A6, -(A7) - lea $94000.l, A6 ; layer 1 - move.w #$1fff, D1 - move.w #$00ff, D0 - bsr ClearLayer - movem.l (A7)+, D0-D7/A0-A6 - rts - ORG $2900 - movem.l D0-D7/A0-A6, -(A7) - lea $98000.l, A6 ; layer 2 - move.w #$1fff, D1 - move.w #$f0ff, D0 - bsr ClearLayer - movem.l (A7)+, D0-D7/A0-A6 - rts - - ORG $fffe ; extend binary ROM to 0x10000 in size - dc.w $ffff - END START + move.w D0, (A6)+ + dbra D1, ClearLayer + rts + ORG $2880 + movem.l D0-D7/A0-A6, -(A7) + lea $94000.l, A6 ; layer 1 + move.w #$1fff, D1 + move.w #$00ff, D0 + bsr ClearLayer + movem.l (A7)+, D0-D7/A0-A6 + rts + ORG $2900 + movem.l D0-D7/A0-A6, -(A7) + lea $98000.l, A6 ; layer 2 + move.w #$1fff, D1 + move.w #$f0ff, D0 + bsr ClearLayer + movem.l (A7)+, D0-D7/A0-A6 + rts + + ORG $fffe ; extend binary ROM to 0x10000 in size + dc.w $ffff + END START *~Font name~Courier New~ diff --git a/src/mame/includes/4enraya.h b/src/mame/includes/4enraya.h index 3778260c751..6b833d282c0 100644 --- a/src/mame/includes/4enraya.h +++ b/src/mame/includes/4enraya.h @@ -80,4 +80,4 @@ protected: void driver_init() override; }; -#endif // MAME_INCLUDES_4ENRAYA_H \ No newline at end of file +#endif // MAME_INCLUDES_4ENRAYA_H diff --git a/src/mame/includes/apexc.h b/src/mame/includes/apexc.h index e7667a1e462..b7af1e75294 100644 --- a/src/mame/includes/apexc.h +++ b/src/mame/includes/apexc.h @@ -85,4 +85,4 @@ private: static const rgb_t palette_table[4]; }; -#endif // MAME_INCLUDES_APEXC \ No newline at end of file +#endif // MAME_INCLUDES_APEXC diff --git a/src/mame/includes/cischeat.h b/src/mame/includes/cischeat.h index 18189e1b2d1..2f5717bac31 100644 --- a/src/mame/includes/cischeat.h +++ b/src/mame/includes/cischeat.h @@ -212,7 +212,7 @@ public: protected: virtual void video_start() override; - + private: uint16_t m_sprite_dma_reg; }; diff --git a/src/mame/includes/cps3.h b/src/mame/includes/cps3.h index cad11f5be50..8ca781cddc3 100644 --- a/src/mame/includes/cps3.h +++ b/src/mame/includes/cps3.h @@ -22,12 +22,12 @@ public: , m_palette(*this, "palette") , m_cps3sound(*this, "cps3sound") , m_simm{{*this, "simm1.%u", 0U}, - {*this, "simm2.%u", 0U}, - {*this, "simm3.%u", 0U}, - {*this, "simm4.%u", 0U}, - {*this, "simm5.%u", 0U}, - {*this, "simm6.%u", 0U}, - {*this, "simm7.%u", 0U}} + {*this, "simm2.%u", 0U}, + {*this, "simm3.%u", 0U}, + {*this, "simm4.%u", 0U}, + {*this, "simm5.%u", 0U}, + {*this, "simm6.%u", 0U}, + {*this, "simm7.%u", 0U}} , m_mainram(*this, "mainram") , m_spriteram(*this, "spriteram") , m_colourram(*this, "colourram") diff --git a/src/mame/includes/dkong.h b/src/mame/includes/dkong.h index b7a40493943..cc7a2098def 100644 --- a/src/mame/includes/dkong.h +++ b/src/mame/includes/dkong.h @@ -139,9 +139,9 @@ public: optional_device m_dev_n2a03b; /* dkong3 */ optional_device m_dev_vp2; /* dkong2, virtual port 2 */ optional_device m_dev_6h; /* dkong2 */ - optional_device m_ls175_3d; /* dkong2b_audio */ + optional_device m_ls175_3d; /* dkong2b_audio */ optional_device m_discrete; - optional_device m_m58817; /* radarscp1 */ + optional_device m_m58817; /* radarscp1 */ optional_device m_watchdog; /* memory pointers */ diff --git a/src/mame/includes/efdt.h b/src/mame/includes/efdt.h index ff37b46363a..347944feb1d 100644 --- a/src/mame/includes/efdt.h +++ b/src/mame/includes/efdt.h @@ -37,7 +37,7 @@ public: /* video-related */ tilemap_t *m_tilemap[2]; - int m_tilebank; + int m_tilebank; DECLARE_WRITE8_MEMBER(efdt_videoram_w); DECLARE_WRITE8_MEMBER(efdt_vregs1_w); diff --git a/src/mame/includes/gaplus.h b/src/mame/includes/gaplus.h index a8a1542d0af..b62798c4cdb 100644 --- a/src/mame/includes/gaplus.h +++ b/src/mame/includes/gaplus.h @@ -35,7 +35,7 @@ public: , m_gfxdecode(*this, "gfxdecode") , m_screen(*this, "screen") , m_palette(*this, "palette") - , m_proms_region(*this, "proms") + , m_proms_region(*this, "proms") , m_customio_3(*this, "customio_3") , m_videoram(*this, "videoram") , m_spriteram(*this, "spriteram") @@ -125,31 +125,31 @@ public: class gapluso_state : public gaplus_base_state { public: - gapluso_state(const machine_config &mconfig, device_type type, const char *tag) - : gaplus_base_state(mconfig, type, tag, "namcoio_1", "namcoio_2") { - } + gapluso_state(const machine_config &mconfig, device_type type, const char *tag) + : gaplus_base_state(mconfig, type, tag, "namcoio_1", "namcoio_2") { + } - void gapluso(machine_config &config); + void gapluso(machine_config &config); protected: - DECLARE_WRITE_LINE_MEMBER(vblank_irq); + DECLARE_WRITE_LINE_MEMBER(vblank_irq); }; class gaplus_state : public gaplus_base_state { public: - gaplus_state(const machine_config &mconfig, device_type type, const char *tag) - : gaplus_base_state(mconfig, type, tag, "namcoio_1", "namcoio_2") - , m_lamps(*this, "lamp%u", 0U) - { - } + gaplus_state(const machine_config &mconfig, device_type type, const char *tag) + : gaplus_base_state(mconfig, type, tag, "namcoio_1", "namcoio_2") + , m_lamps(*this, "lamp%u", 0U) + { + } - void gaplus(machine_config &config); + void gaplus(machine_config &config); protected: - virtual void machine_start() override; + virtual void machine_start() override; - DECLARE_WRITE8_MEMBER(out_lamps0); - DECLARE_WRITE8_MEMBER(out_lamps1); + DECLARE_WRITE8_MEMBER(out_lamps0); + DECLARE_WRITE8_MEMBER(out_lamps1); - output_finder<2> m_lamps; + output_finder<2> m_lamps; }; diff --git a/src/mame/includes/ninjakd2.h b/src/mame/includes/ninjakd2.h index f82eebc6277..4378cde15e3 100644 --- a/src/mame/includes/ninjakd2.h +++ b/src/mame/includes/ninjakd2.h @@ -104,7 +104,7 @@ public: void mnight(machine_config &config); void mnight_main_cpu(address_map &map); - + void init_mnight(); TILE_GET_INFO_MEMBER(mnight_get_bg_tile_info); DECLARE_VIDEO_START(mnight); @@ -123,7 +123,7 @@ public: void robokid_main_cpu(address_map &map); DECLARE_READ8_MEMBER(motion_error_verbose_r); - + template DECLARE_READ8_MEMBER(robokid_bg_videoram_r); template DECLARE_WRITE8_MEMBER(robokid_bg_videoram_w); template DECLARE_WRITE8_MEMBER(robokid_bg_ctrl_w); @@ -155,14 +155,14 @@ public: m_dsw_io(*this, "DIPSW%u", 1U), m_pad_io(*this, "PAD%u", 1U) { } - + DECLARE_READ8_MEMBER(unk_r); DECLARE_READ8_MEMBER(io_protection_r); DECLARE_WRITE8_MEMBER(io_protection_w); void omegaf(machine_config &config); void omegaf_main_cpu(address_map &map); - + DECLARE_VIDEO_START(omegaf); TILEMAP_MAPPER_MEMBER(omegaf_bg_scan); uint32_t screen_update_omegaf(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); diff --git a/src/mame/includes/redalert.h b/src/mame/includes/redalert.h index f5f1964b0cf..fd989b5dae8 100644 --- a/src/mame/includes/redalert.h +++ b/src/mame/includes/redalert.h @@ -7,9 +7,9 @@ If you have any questions about how this driver works, don't hesitate to ask. - Mike Balfour (mab22@po.cwru.edu) - To Do: - - Device-ify video and audio hardware to turn optional_devices into - required_devices. + To Do: + - Device-ify video and audio hardware to turn optional_devices into + required_devices. ****************************************************************************/ diff --git a/src/mame/includes/tatsumi.h b/src/mame/includes/tatsumi.h index 07a443435c7..81c727ca18d 100644 --- a/src/mame/includes/tatsumi.h +++ b/src/mame/includes/tatsumi.h @@ -66,7 +66,7 @@ public: gfx_element *gfx, uint32_t code,uint32_t color,int flipx,int flipy,uint32_t ssx,uint32_t ssy, int scalex, int scaley, int rotate, int write_priority_only ); void update_cluts(int fake_palette_offset, int object_base, int length); - + protected: uint8_t m_hd6445_reg[64]; void apply_shadow_bitmap(bitmap_rgb32 &bitmap, const rectangle &cliprect, bitmap_ind8 &shadow_bitmap, uint8_t xor_output); @@ -162,12 +162,12 @@ public: void roundup5_z80_map(address_map &map); protected: -// virtual void machine_reset() override; +// virtual void machine_reset() override; private: void draw_road(bitmap_rgb32 &bitmap, const rectangle &cliprect); void draw_landscape(bitmap_rgb32 &bitmap, const rectangle &cliprect, uint8_t type); - + required_shared_ptr m_vregs; required_shared_ptr m_bg_scrollx; required_shared_ptr m_bg_scrolly; @@ -221,7 +221,7 @@ public: void master_map(address_map &map); void slave_map(address_map &map); void sound_map(address_map &map); - + protected: virtual void machine_reset() override; private: @@ -243,7 +243,7 @@ private: uint16_t m_road_color_bank, m_prev_road_bank; uint16_t m_layer_page_size[4]; bool m_layer1_can_be_road; - + void tile_expand(); void draw_bg(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect, tilemap_t *src, const uint16_t* scrollx, const uint16_t* scrolly, const uint16_t layer_page_size, bool is_road, int hi_priority); void draw_bg_layers(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect, int hi_priority); diff --git a/src/mame/includes/vicdual.h b/src/mame/includes/vicdual.h index b66f6bb2baf..34274a0306b 100644 --- a/src/mame/includes/vicdual.h +++ b/src/mame/includes/vicdual.h @@ -262,6 +262,6 @@ public: headonsa_state(const machine_config &mconfig, device_type type, const char *tag) : vicdual_state(mconfig, type, tag) {} - + DECLARE_INPUT_CHANGED_MEMBER(headonsa_coin_inserted); }; diff --git a/src/mame/includes/xevious.h b/src/mame/includes/xevious.h index 79db4ae98c6..422d6650176 100644 --- a/src/mame/includes/xevious.h +++ b/src/mame/includes/xevious.h @@ -100,4 +100,4 @@ protected: char m_sound_played; }; -#endif // MAME_INCLUDES_XEVIOUS \ No newline at end of file +#endif // MAME_INCLUDES_XEVIOUS diff --git a/src/mame/includes/z88.h b/src/mame/includes/z88.h index ad6b7068b51..d1a38dffc50 100644 --- a/src/mame/includes/z88.h +++ b/src/mame/includes/z88.h @@ -113,9 +113,9 @@ private: uint8_t page; } m_bank[4]; - int m_bank_type[4]; - uint8_t * m_bios; - uint8_t * m_ram_base; + int m_bank_type[4]; + uint8_t * m_bios; + uint8_t * m_ram_base; }; #endif /* MAME_INCLUDES_Z88_H */ diff --git a/src/mame/machine/6883sam.h b/src/mame/machine/6883sam.h index 7675588498e..61e5fd27033 100644 --- a/src/mame/machine/6883sam.h +++ b/src/mame/machine/6883sam.h @@ -86,13 +86,13 @@ class sam6883_device : public device_t, public sam6883_friend_device_interface { public: template - sam6883_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&cpu_tag) - : sam6883_device(mconfig, tag, owner, clock) + sam6883_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&cpu_tag) + : sam6883_device(mconfig, tag, owner, clock) { - m_cpu.set_tag(std::forward(cpu_tag)); - } - - sam6883_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + m_cpu.set_tag(std::forward(cpu_tag)); + } + + sam6883_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); template devcb_base &set_res_rd_callback(Object &&cb) { return m_read_res.set_callback(std::forward(cb)); } diff --git a/src/mame/machine/apexc.h b/src/mame/machine/apexc.h index 83d82ce09f6..7a46c76ad34 100644 --- a/src/mame/machine/apexc.h +++ b/src/mame/machine/apexc.h @@ -158,4 +158,4 @@ DECLARE_DEVICE_TYPE(APEXC_CYLINDER, apexc_cylinder_image_device) DECLARE_DEVICE_TYPE(APEXC_TAPE_PUNCHER, apexc_tape_puncher_image_device) DECLARE_DEVICE_TYPE(APEXC_TAPE_READER, apexc_tape_reader_image_device) -#endif // MAME_MACHINE_APEXC \ No newline at end of file +#endif // MAME_MACHINE_APEXC diff --git a/src/mame/machine/hec2hrp.cpp b/src/mame/machine/hec2hrp.cpp index 80e68739db2..e3ebb222511 100644 --- a/src/mame/machine/hec2hrp.cpp +++ b/src/mame/machine/hec2hrp.cpp @@ -809,12 +809,12 @@ MACHINE_CONFIG_START(hec2hrp_state::hector_audio) MACHINE_CONFIG_END -/* DISK II drive for: - Hector HRX - Hector MX40c - Hector MX80c +/* DISK II drive for: + Hector HRX + Hector MX40c + Hector MX80c - JJStacino jj.stacino@aliceadsl.fr + JJStacino jj.stacino@aliceadsl.fr 15/02/2010 : Start of the disc2 project! JJStacino 26/09/2010 : first sending with bug2 (the first "dir" command terminates in a crash of the Z80 disc II processor) -JJStacino @@ -826,15 +826,15 @@ MACHINE_CONFIG_END /* Callback uPD request */ /* How uPD765 works: - * First we send at uPD the string of command (p.e. 9 bytes for read starting by 0x46) on port 60h - between each byte, check the authorization of the uPD by reading the status register - * When the command is finish, the data arrive with DMA interrupt, then: - If read: in port 70 to retrieve the data, - If write: in port 70 send the data - * When all data had been send the uPD launch an INT - * The Z80 Disc2 writes in FF12 a flag - * if the flag is set, end of DMA function, - * At this point the Z80 can read the RESULT in port 61h + * First we send at uPD the string of command (p.e. 9 bytes for read starting by 0x46) on port 60h + between each byte, check the authorization of the uPD by reading the status register + * When the command is finish, the data arrive with DMA interrupt, then: + If read: in port 70 to retrieve the data, + If write: in port 70 send the data + * When all data had been send the uPD launch an INT + * The Z80 Disc2 writes in FF12 a flag + * if the flag is set, end of DMA function, + * At this point the Z80 can read the RESULT in port 61h */ // Interrupt management @@ -902,13 +902,13 @@ WRITE8_MEMBER( hec2hrp_state::disc2_io30_port_w) { } -READ8_MEMBER( hec2hrp_state::disc2_io40_port_r) /* Read data sent to Hector by Disc2 */ +READ8_MEMBER( hec2hrp_state::disc2_io40_port_r) /* Read data sent to Hector by Disc2 */ { m_hector_disc2_data_r_ready = 0x00; return m_hector_disc2_data_read; } -WRITE8_MEMBER( hec2hrp_state::disc2_io40_port_w) /* Write data sent by Disc2 to Hector */ +WRITE8_MEMBER( hec2hrp_state::disc2_io40_port_w) /* Write data sent by Disc2 to Hector */ { m_hector_disc2_data_write = data; m_hector_disc2_data_w_ready = 0x80; diff --git a/src/mame/machine/tatsumi.cpp b/src/mame/machine/tatsumi.cpp index 5588dd688ee..0966e444998 100644 --- a/src/mame/machine/tatsumi.cpp +++ b/src/mame/machine/tatsumi.cpp @@ -123,11 +123,11 @@ WRITE16_MEMBER(apache3_state::apache3_rotate_w) READ16_MEMBER(roundup5_state::roundup_v30_z80_r) { address_space &targetspace = m_audiocpu->space(AS_PROGRAM); - + /* Each Z80 byte maps to a V30 word */ if (m_control_word & 0x20) offset += 0x8000; /* Upper half */ - + return 0xff00 | targetspace.read_byte(offset); } @@ -147,7 +147,7 @@ WRITE16_MEMBER(roundup5_state::roundup_v30_z80_w) WRITE16_MEMBER(roundup5_state::roundup5_control_w) -{ +{ COMBINE_DATA(&m_control_word); if (m_control_word & 0x10) @@ -173,9 +173,9 @@ WRITE16_MEMBER(roundup5_state::roundup5_control_w) 0x0040 : Z80 rom (lower half) mapped to 0x10000 0x0060 : Z80 rom (upper half) mapped to 0x10000 - - 0x0080 : enabled when showing map screen after a play - (switches video priority between text layer and sprites) + + 0x0080 : enabled when showing map screen after a play + (switches video priority between text layer and sprites) 0x0100 : watchdog. @@ -209,12 +209,12 @@ WRITE16_MEMBER(roundup5_state::roundup5_control_w) WRITE16_MEMBER(roundup5_state::road_vregs_w) { - /* + /* ---- ---x ---- ---- enabled when there's a road slope of any kind, unknown purpose - ---- ---- -xx- ---- enables alternatively in tunnels sometimes, color mods? - ---- ---- ---x ---- road bank select - ---- ---- ---- xxxx various values written during POST while accessing road pixel ram, - otherwise 0xb at the start of irq service + ---- ---- -xx- ---- enables alternatively in tunnels sometimes, color mods? + ---- ---- ---x ---- road bank select + ---- ---- ---- xxxx various values written during POST while accessing road pixel ram, + otherwise 0xb at the start of irq service */ COMBINE_DATA(&m_road_vregs[offset]); @@ -322,13 +322,13 @@ READ8_MEMBER(cyclwarr_state::oki_status_xor_r) // Cycle Warriors and Big Fight access this with reversed activeness. // this is particularly noticeable with the "We got em" sample played in CW at stage clear: - // gets cut too early with the old hack below. + // gets cut too early with the old hack below. // fwiw returning normal oki status doesn't work at all, both games don't make any sound. // TODO: verify with HW return (r ^ 0xff); #ifdef UNUSED_FUNCTION // old hack left for reference - + if (m_audiocpu->pc()==0x2b70 || m_audiocpu->pc()==0x2bb5 || m_audiocpu->pc()==0x2acc || m_audiocpu->pc()==0x1c79 // BigFight diff --git a/src/mame/video/1942.cpp b/src/mame/video/1942.cpp index f161836ee89..f7038baff93 100644 --- a/src/mame/video/1942.cpp +++ b/src/mame/video/1942.cpp @@ -273,7 +273,7 @@ void _1942p_state::draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect) for (int offs = m_spriteram.bytes() - 4; offs >= 0; offs -= 4) { int code = (m_spriteram[offs] & 0x7f) + 4 * (m_spriteram[offs + 3] & 0x20) - + 2 * (m_spriteram[offs] & 0x80); + + 2 * (m_spriteram[offs] & 0x80); int col = m_spriteram[offs + 3] & 0x0f; diff --git a/src/mame/video/apexc.cpp b/src/mame/video/apexc.cpp index 7bec6f114a8..3e14657b9e3 100644 --- a/src/mame/video/apexc.cpp +++ b/src/mame/video/apexc.cpp @@ -198,10 +198,10 @@ void apexc_state::teletyper_putchar(int character) } /* print character */ - buffer[0] = ascii_table[m_letters][character]; /* lookup ASCII equivalent in table */ - buffer[1] = '\0'; /* terminate string */ - draw_string(*m_bitmap, buffer, 8*m_pos, 176, 0); /* print char */ - m_pos++; /* step carriage forward */ + buffer[0] = ascii_table[m_letters][character]; /* lookup ASCII equivalent in table */ + buffer[1] = '\0'; /* terminate string */ + draw_string(*m_bitmap, buffer, 8*m_pos, 176, 0); /* print char */ + m_pos++; /* step carriage forward */ break; } } diff --git a/src/mame/video/cischeat.cpp b/src/mame/video/cischeat.cpp index 189667c3cc0..d686d65220a 100644 --- a/src/mame/video/cischeat.cpp +++ b/src/mame/video/cischeat.cpp @@ -860,7 +860,7 @@ uint32_t cischeat_state::screen_update_bigrun(screen_device &screen, bitmap_ind1 int i; bitmap.fill(0x1000, cliprect); - + for (i = 7; i >= 4; i--) { /* bitmap, cliprect, road, min_priority, max_priority, transparency */ diff --git a/src/mame/video/gaplus.cpp b/src/mame/video/gaplus.cpp index 3ef083b6f79..4f9e6be9fcb 100644 --- a/src/mame/video/gaplus.cpp +++ b/src/mame/video/gaplus.cpp @@ -31,24 +31,24 @@ PALETTE_INIT_MEMBER(gaplus_base_state, gaplus) for (int i = 0; i < 256; i++) { /* red component */ - int bit0 = BIT(color_prom[i], 0); - int bit1 = BIT(color_prom[i], 1); - int bit2 = BIT(color_prom[i], 2); - int bit3 = BIT(color_prom[i], 3); - int r = 0x0e * bit0 + 0x1f * bit1 + 0x43 * bit2 + 0x8f * bit3; - - /* green component */ + int bit0 = BIT(color_prom[i], 0); + int bit1 = BIT(color_prom[i], 1); + int bit2 = BIT(color_prom[i], 2); + int bit3 = BIT(color_prom[i], 3); + int r = 0x0e * bit0 + 0x1f * bit1 + 0x43 * bit2 + 0x8f * bit3; + + /* green component */ bit0 = BIT(color_prom[i + 0x100], 0); bit1 = BIT(color_prom[i + 0x100], 1); bit2 = BIT(color_prom[i + 0x100], 2); bit3 = BIT(color_prom[i + 0x100], 3); - int g = 0x0e * bit0 + 0x1f * bit1 + 0x43 * bit2 + 0x8f * bit3; + int g = 0x0e * bit0 + 0x1f * bit1 + 0x43 * bit2 + 0x8f * bit3; /* blue component */ bit0 = BIT(color_prom[i + 0x200], 0); bit1 = BIT(color_prom[i + 0x200], 1); bit2 = BIT(color_prom[i + 0x200], 2); bit3 = BIT(color_prom[i + 0x200], 3); - int b = 0x0e * bit0 + 0x1f * bit1 + 0x43 * bit2 + 0x8f * bit3; + int b = 0x0e * bit0 + 0x1f * bit1 + 0x43 * bit2 + 0x8f * bit3; palette.set_indirect_color(i, rgb_t(r, g, b)); } @@ -82,13 +82,13 @@ TILEMAP_MAPPER_MEMBER(gaplus_base_state::tilemap_scan) row += 2; col -= 2; if (col & 0x20) - return row + ((col & 0x1f) << 5); - return col + (row << 5); + return row + ((col & 0x1f) << 5); + return col + (row << 5); } TILE_GET_INFO_MEMBER(gaplus_base_state::get_tile_info) { - const uint8_t attr = m_videoram[tile_index + 0x400]; + const uint8_t attr = m_videoram[tile_index + 0x400]; tileinfo.category = (attr & 0x40) >> 6; tileinfo.group = attr & 0x3f; SET_TILE_INFO_MEMBER(0, @@ -120,8 +120,8 @@ void gaplus_base_state::starfield_init() int generator = 0; int set = 0; - const int width = m_screen->width(); - const int height = m_screen->height(); + const int width = m_screen->width(); + const int height = m_screen->height(); m_total_stars = 0; @@ -129,24 +129,24 @@ void gaplus_base_state::starfield_init() /* this comes from the Galaxian hardware, Gaplus is probably different */ for (int y = 0; y < height; y++) - { + { for (int x = width * 2 - 1; x >= 0; x--) - { + { generator <<= 1; - const int bit1 = (~generator >> 17) & 1; - const int bit2 = (generator >> 5) & 1; + const int bit1 = (~generator >> 17) & 1; + const int bit2 = (generator >> 5) & 1; if (bit1 ^ bit2) generator |= 1; if (BIT(~generator, 16) && (generator & 0xff) == 0xff) - { - const int color = ~(generator >> 8) & 0x3f; + { + const int color = ~(generator >> 8) & 0x3f; if (color && m_total_stars < MAX_STARS) - { - m_stars[m_total_stars].x = x; - m_stars[m_total_stars].y = y; - m_stars[m_total_stars].col = color; - m_stars[m_total_stars].set = set++; + { + m_stars[m_total_stars].x = x; + m_stars[m_total_stars].y = y; + m_stars[m_total_stars].col = color; + m_stars[m_total_stars].set = set++; if (set == 3) set = 0; @@ -217,14 +217,14 @@ void gaplus_base_state::starfield_render(bitmap_ind16 &bitmap) if ((m_starfield_control[0] & 1) == 0) return; - const int width = m_screen->width(); - const int height = m_screen->height(); + const int width = m_screen->width(); + const int height = m_screen->height(); - /* draw the starfields */ + /* draw the starfields */ for (int i = 0; i < m_total_stars; i++) { - int x = m_stars[i].x; - int y = m_stars[i].y; + int x = m_stars[i].x; + int y = m_stars[i].y; if (x >= 0 && x < width && y >= 0 && y < height) { @@ -249,15 +249,15 @@ void gaplus_base_state::draw_sprites(bitmap_ind16 &bitmap, const rectangle &clip { 0, 1 }, { 2, 3 } }; - const int sprite = spriteram[offs] | ((spriteram_3[offs] & 0x40) << 2); - const int color = spriteram[offs+1] & 0x3f; - const int sx = spriteram_2[offs+1] + 0x100 * (spriteram_3[offs+1] & 1) - 71; + const int sprite = spriteram[offs] | ((spriteram_3[offs] & 0x40) << 2); + const int color = spriteram[offs+1] & 0x3f; + const int sx = spriteram_2[offs+1] + 0x100 * (spriteram_3[offs+1] & 1) - 71; int sy = 256 - spriteram_2[offs] - 8; int flipx = BIT(spriteram_3[offs], 0); int flipy = BIT(spriteram_3[offs], 1); - const int sizex = BIT(spriteram_3[offs], 3); - const int sizey = BIT(spriteram_3[offs], 5); - const int duplicate = spriteram_3[offs] & 0x80; + const int sizex = BIT(spriteram_3[offs], 3); + const int sizey = BIT(spriteram_3[offs], 5); + const int duplicate = spriteram_3[offs] & 0x80; if (flip_screen()) { diff --git a/src/mame/video/gime.cpp b/src/mame/video/gime.cpp index 473138ce8b3..71086db95c7 100644 --- a/src/mame/video/gime.cpp +++ b/src/mame/video/gime.cpp @@ -117,7 +117,7 @@ gime_device::gime_device(const machine_config &mconfig, device_type type, const , m_maincpu(*this, finder_base::DUMMY_TAG) , m_ram(*this, finder_base::DUMMY_TAG) , m_cart_device(*this, finder_base::DUMMY_TAG) - , m_rom(nullptr) + , m_rom(nullptr) , m_rom_region(*this, finder_base::DUMMY_TAG) { } @@ -130,16 +130,16 @@ gime_device::gime_device(const machine_config &mconfig, device_type type, const void gime_device::device_start(void) { - if (!m_ram->started()) - throw device_missing_dependencies(); + if (!m_ram->started()) + throw device_missing_dependencies(); - if (!m_cart_device->started()) - throw device_missing_dependencies(); + if (!m_cart_device->started()) + throw device_missing_dependencies(); - if (!m_cpu->started()) - throw device_missing_dependencies(); - - // inherited device_start - need to do this after checking dependencies + if (!m_cpu->started()) + throw device_missing_dependencies(); + + // inherited device_start - need to do this after checking dependencies super::device_start(); // initialize variables @@ -168,8 +168,8 @@ void gime_device::device_start(void) m_read_floating_bus.resolve_safe(0); // set up ROM/RAM pointers - m_rom = m_rom_region->base(); - m_cart_rom = m_cart_device->get_cart_base(); + m_rom = m_rom_region->base(); + m_cart_rom = m_cart_device->get_cart_base(); m_cart_size = m_cart_device->get_cart_size(); // populate palettes diff --git a/src/mame/video/gime.h b/src/mame/video/gime.h index a5ae3bebaa1..a8f208ff58c 100644 --- a/src/mame/video/gime.h +++ b/src/mame/video/gime.h @@ -185,7 +185,7 @@ protected: required_device m_cart_device; memory_bank * m_read_banks[9]; memory_bank * m_write_banks[9]; - uint8_t * m_rom; + uint8_t * m_rom; required_memory_region m_rom_region; uint8_t * m_cart_rom; uint32_t m_cart_size; @@ -290,8 +290,8 @@ public: : gime_ntsc_device(mconfig, tag, owner, clock) { m_maincpu.set_tag(std::forward(cpu_tag)); - m_cpu.set_tag(std::forward(cpu_tag)); - m_ram.set_tag(std::forward(ram_tag)); + m_cpu.set_tag(std::forward(cpu_tag)); + m_ram.set_tag(std::forward(ram_tag)); m_cart_device.set_tag(std::forward(ext_tag)); m_rom_region.set_tag(std::forward(region_tag)); } @@ -307,8 +307,8 @@ public: : gime_pal_device(mconfig, tag, owner, clock) { m_maincpu.set_tag(std::forward(cpu_tag)); - m_cpu.set_tag(std::forward(cpu_tag)); - m_ram.set_tag(std::forward(ram_tag)); + m_cpu.set_tag(std::forward(cpu_tag)); + m_ram.set_tag(std::forward(ram_tag)); m_cart_device.set_tag(std::forward(ext_tag)); m_rom_region.set_tag(std::forward(region_tag)); } diff --git a/src/mame/video/ms1_tmap.cpp b/src/mame/video/ms1_tmap.cpp index 36563da3b2d..dd3b0cac990 100644 --- a/src/mame/video/ms1_tmap.cpp +++ b/src/mame/video/ms1_tmap.cpp @@ -137,7 +137,7 @@ void megasys1_tilemap_device::device_reset() // TODO: might be something else (smaller VRAM size?) for(int i=0;i> (16 - m_bits_per_color_code), 0); } diff --git a/src/mame/video/ninjakd2.cpp b/src/mame/video/ninjakd2.cpp index 8ba6d333e92..2029c768487 100644 --- a/src/mame/video/ninjakd2.cpp +++ b/src/mame/video/ninjakd2.cpp @@ -91,7 +91,7 @@ TILE_GET_INFO_MEMBER(robokid_state::robokid_get_bg_tile_info) * Video system start * *************************************/ - + void ninjakd2_state::video_init_common() { m_fg_tilemap = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(FUNC(ninjakd2_state::get_fg_tile_info),this), TILEMAP_SCAN_ROWS, 8, 8, 32, 32); diff --git a/src/mame/video/powerins.cpp b/src/mame/video/powerins.cpp index 8a1fa064301..0b45caf082d 100644 --- a/src/mame/video/powerins.cpp +++ b/src/mame/video/powerins.cpp @@ -313,4 +313,4 @@ WRITE_LINE_MEMBER(powerins_state::screen_vblank) std::copy_n(&m_spriteram[0x8000/2], 0x1000/2, &m_spritebuffer[0][0]); m_maincpu->set_input_line(4, HOLD_LINE); } -} \ No newline at end of file +} diff --git a/src/mame/video/sega16sp.h b/src/mame/video/sega16sp.h index 4297c0484d5..48adeb079e2 100644 --- a/src/mame/video/sega16sp.h +++ b/src/mame/video/sega16sp.h @@ -196,7 +196,7 @@ protected: required_region_ptr m_sprite_region_ptr; // internal state - uint8_t m_addrmap[8]; + uint8_t m_addrmap[8]; }; diff --git a/src/mame/video/seta.cpp b/src/mame/video/seta.cpp index 0273228b439..7bd302266c7 100644 --- a/src/mame/video/seta.cpp +++ b/src/mame/video/seta.cpp @@ -385,7 +385,7 @@ VIDEO_START_MEMBER(seta_state,seta_2_layers) m_tilemap[0] = &machine().tilemap().create( *m_gfxdecode, tilemap_get_info_delegate(FUNC(seta_state::get_tile_info<0>), this), TILEMAP_SCAN_ROWS, 16,16, 64,32 ); - + /* layer 1 */ m_tilemap[1] = &machine().tilemap().create( *m_gfxdecode, tilemap_get_info_delegate(FUNC(seta_state::get_tile_info<1>), this), TILEMAP_SCAN_ROWS, diff --git a/src/mame/video/tatsumi.cpp b/src/mame/video/tatsumi.cpp index 52cfde7c30e..a42aac35d63 100644 --- a/src/mame/video/tatsumi.cpp +++ b/src/mame/video/tatsumi.cpp @@ -16,16 +16,16 @@ WRITE8_MEMBER(tatsumi_state::hd6445_crt_w) { if (offset==0) m_hd6445_address = data & 0x3f; - if (offset==1) + if (offset==1) { m_hd6445_reg[m_hd6445_address] = data; - + static char const *const regnames[40] = - { + { "Horizontal Total Characters", "Horizontal Displayed Characters", "Horizontal Sync Position", "Sync Width", "Vertical Total Rows", "Vertical Total Adjust", "Vertical Displayed Rows", "Vertical Sync Position", "Interlace Mode and Skew", "Max Raster Address", "Cursor 1 Start", "Cursor 1 End", - "Screen 1 Start Address (H)", "Screen 1 Start Address (L)", "Cursor 1 Address (H)", "Cursor 1 Address (L)", + "Screen 1 Start Address (H)", "Screen 1 Start Address (L)", "Cursor 1 Address (H)", "Cursor 1 Address (L)", "Light Pen (H) (RO)", "Light Pen (L) (RO)", "Screen 2 Start Position", "Screen 2 Start Address (H)", "Screen 2 Start Address (L)", "Screen 3 Start Position", "Screen 3 Start Address (H)", "Screen 3 Start Address (L)", "Screen 4 Start Position", "Screen 4 Start Address (H)", "Screen 4 Start Address (L)", "Vertical Sync Position Adjust", @@ -33,7 +33,7 @@ WRITE8_MEMBER(tatsumi_state::hd6445_crt_w) "Control 3", "Memory Width Offset", "Cursor 2 Start", "Cursor 2 End", "Cursor 2 Address (H)", "Cursor 2 Address (L)", "Cursor 1 Width", "Cursor 2 Width" }; - + if(m_hd6445_address < 40) logerror("HD6445: register %s [%02x R%d] set %02x\n",regnames[m_hd6445_address],m_hd6445_address,m_hd6445_address,data); else @@ -65,7 +65,7 @@ void tatsumi_state::apply_shadow_bitmap(bitmap_rgb32 &bitmap, const rectangle &c { uint8_t shadow = shadow_bitmap.pix8(y, x); // xor_output is enabled during Chen boss fight (where shadows have more brightness than everything else) - // TODO: transition before fighting him should also black out all the background tilemaps too!? + // TODO: transition before fighting him should also black out all the background tilemaps too!? // (more evidence that we need to mix with color bank 0x1400 instead of doing true RGB mixing). if(shadow ^ xor_output) { @@ -73,7 +73,7 @@ void tatsumi_state::apply_shadow_bitmap(bitmap_rgb32 &bitmap, const rectangle &c bitmap.pix32(y, x) = rgb_t(shadow_pen.r() >> 1,shadow_pen.g() >> 1, shadow_pen.b() >> 1); } } - } + } } WRITE16_MEMBER(tatsumi_state::text_w) @@ -427,7 +427,7 @@ void tatsumi_state::draw_sprites(_BitmapClass &bitmap, const rectangle &cliprect lines = src1[2]; y_offset = src1[0]&0xf8; - + lines -= y_offset; render_x = x << 16; @@ -542,7 +542,7 @@ void tatsumi_state::draw_sprites(_BitmapClass &bitmap, const rectangle &cliprect } } -/* +/* * Object palettes are build from a series of cluts stored in the object roms. * * We update 'Mame palettes' from the clut here in order to simplify the @@ -554,7 +554,7 @@ void tatsumi_state::update_cluts(int fake_palette_offset, int object_base, int l int i; const uint8_t* bank1 = m_rom_clut[0]; const uint8_t* bank2 = m_rom_clut[1]; - for (i=0; iset_pen_color(fake_palette_offset+i+0,m_palette->pen_color(bank1[1]+object_base)); m_shadow_pen_array[i+0]=(bank1[1]==255); @@ -585,7 +585,7 @@ void tatsumi_state::update_cluts(int fake_palette_offset, int object_base, int l * Apache 3 * *********************************/ - + WRITE16_MEMBER(apache3_state::apache3_road_z_w) { m_apache3_road_z = data & 0xff; @@ -622,7 +622,7 @@ start_offset-=48; /* Draw the sky and ground, applying rotation (eventually). Experimental! */ void apache3_state::draw_ground(bitmap_rgb32 &dst, const rectangle &cliprect) { - if (0) + if (0) { int x, y; @@ -734,8 +734,8 @@ READ8_MEMBER(roundup5_state::gfxdata_r) WRITE8_MEMBER(roundup5_state::gfxdata_w) { if((m_control_word & 0x200) == 0x200) - { - offset += (m_control_word & 0x6000) << 2; + { + offset += (m_control_word & 0x6000) << 2; m_bg_gfxram[offset] = data; return; } @@ -748,7 +748,7 @@ WRITE8_MEMBER(roundup5_state::gfxdata_w) m_tx_gfxram[offset] = data; offset=offset%0x8000; - + m_gfxdecode->gfx(1)->mark_dirty(offset/8); } @@ -758,11 +758,11 @@ VIDEO_START_MEMBER(roundup5_state,roundup5) m_shadow_pen_array = make_unique_clear(8192); m_tx_gfxram = std::make_unique(0x20000); m_bg_gfxram = std::make_unique(0x20000); - + m_tx_layer->set_transparent_pen(0); m_gfxdecode->gfx(1)->set_source(m_tx_gfxram.get()); - + save_pointer(NAME(m_tx_gfxram.get()),0x20000); save_pointer(NAME(m_bg_gfxram.get()),0x20000); } @@ -827,7 +827,7 @@ pos is 11.5 fixed point int y,x; int visible_line=0; const uint16_t *data = m_road_ctrl_ram; - + // Road layer enable (?) if ((m_vregs[0x1]&0x1)==0) return; @@ -835,14 +835,14 @@ pos is 11.5 fixed point // Road data bank select (double buffered) if (m_road_vregs[0]&0x10) data+=0x400; - + // Apply clipping: global screen + local road y offsets y = 256 - ((m_vregs[0xa/2] >> 8) + m_road_yclip[0]); data+=y*4; visible_line=0; - - for (/*y=0*/; ypen(256 + pal*16 + col); } /* If startpos is negative, clip it and adjust the sampling position accordingly */ - if (startPos<0) + if (startPos<0) { samplePos=step*(0-startPos); startPos=0; - } - else + } + else { samplePos=0; } /* Fill in main part of road, then right-hand side edge */ - for (x=startPos; x < (cliprect.max_x + 1) && ((samplePos>>11)<0x80); x++) + for (x=startPos; x < (cliprect.max_x + 1) && ((samplePos>>11)<0x80); x++) { // look up colour int col = linedata[(samplePos>>11)&0x7f]&0xf; @@ -939,7 +939,7 @@ offset is from last pixel of first road segment? endPos=startPos+endPos; /* Fill pixels */ - for (x=startPos; x < (cliprect.max_x+1) && (x < endPos); x++) + for (x=startPos; x < (cliprect.max_x+1) && (x < endPos); x++) { int col = linedata[0x80]&0xf; @@ -950,23 +950,23 @@ offset is from last pixel of first road segment? bitmap.pix32(y, x) = m_palette->pen(256 + pal*16 + col + 32); } - if (endPos<0) + if (endPos<0) { // end of left intersection (taking right turn) samplePos=step*(0-startPos); } - else if (endPos>11)&0x7f) + 0x200]&0xf; @@ -997,13 +997,13 @@ void roundup5_state::draw_landscape(bitmap_rgb32 &bitmap, const rectangle &clipr uint32_t base_offset; uint16_t color_base = type ? 0x100 : 0x110; int ysize = type ? 64 : 128; - + base_offset = 0x10000 + type * 0x8000; if(type) y_scroll += 64; - + //popmessage("%04x %04x %04x",m_vregs[8/2],m_vregs[0xc/2],m_bg_scrollx[0]); - + for(int y = 0; y < ysize; y++) { for(int x = 0; x < 512; x++) @@ -1013,9 +1013,9 @@ void roundup5_state::draw_landscape(bitmap_rgb32 &bitmap, const rectangle &clipr if(res_x & 1) color >>= 4; - + color &= 0xf; - + if(cliprect.contains(x, y+y_scroll) && color) bitmap.pix32(y+y_scroll, x) = m_palette->pen(color+color_base); } @@ -1026,12 +1026,12 @@ void roundup5_state::draw_landscape(bitmap_rgb32 &bitmap, const rectangle &clipr uint32_t roundup5_state::screen_update_roundup5(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) { int tx_start_addr; - + tx_start_addr = (m_hd6445_reg[0xc] << 8) | (m_hd6445_reg[0xd]); tx_start_addr &= 0x3fff; - + update_cluts(1024, 512, 4096); - + m_tx_layer->set_scrollx(0,24); m_tx_layer->set_scrolly(0,(tx_start_addr >> 4) | m_hd6445_reg[0x1d]); @@ -1062,8 +1062,8 @@ uint32_t roundup5_state::screen_update_roundup5(screen_device &screen, bitmap_rg *********************************/ /* - * these video registers never changes - * + * these video registers never changes + * * Big Fight * 72f2 5af2 3af2 22fa * @@ -1073,9 +1073,9 @@ uint32_t roundup5_state::screen_update_roundup5(screen_device &screen, bitmap_rg * Following is complete guesswork (since nothing changes it's very hard to pinpoint what these bits do :/) * Layer order is 3-1-2-0 ? * x--- -x-- ---- ---- one of these might be enable page select - * ---- ---- x--- ---- tilemap size + * ---- ---- x--- ---- tilemap size * ---x ---- ---- x--- one these might be color bank - * + * */ WRITE16_MEMBER(cyclwarr_state::video_config_w) { @@ -1101,7 +1101,7 @@ TILE_GET_INFO_MEMBER(cyclwarr_state::get_tile_info_bigfight) uint8_t color = (tile >> 12) & 0x3; // all layers but 0 wants this palette bank (fade in/out effects) - // a similar result is obtainable with priority bit, but then it's wrong for + // a similar result is obtainable with priority bit, but then it's wrong for // Big Fight CRT test (dark red background) and character name bio in attract mode (reference shows it doesn't fade in like rest of text) // TODO: likely an HW config sets this up if(Bank != 0) @@ -1128,12 +1128,12 @@ TILE_GET_INFO_MEMBER(cyclwarr_state::get_tile_info_cyclwarr_road) int bank = (m_bigfight_a40000[0] >> (((tile&0xc00)>>10)*4))&0xf; uint16_t tileno = (tile&0x3ff)|(bank<<10); uint8_t color = (tile >> 12) & 0x3; -// if(Bank != 0) +// if(Bank != 0) color |= 4; int opaque = ((tile >> 14) & 1) == 1; - + SET_TILE_INFO_MEMBER(1, - tileno, + tileno, color | m_road_color_bank, opaque ? TILE_FORCE_LAYER0 : 0); @@ -1176,7 +1176,7 @@ void cyclwarr_state::tile_expand() c0base += gx0->rowbytes(); } } - + gx0->set_raw_layout(srcdata, gx0->width(), gx0->height(), gx0->elements(), 8 * gx0->width(), 8 * gx0->width() * gx0->height()); gx0->set_granularity(256); } @@ -1189,7 +1189,7 @@ VIDEO_START_MEMBER(cyclwarr_state,cyclwarr) m_layer[1] = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(FUNC(cyclwarr_state::get_tile_info_cyclwarr_road<1>),this),TILEMAP_SCAN_ROWS,8,8,128,256); m_layer[2] = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(FUNC(cyclwarr_state::get_tile_info_bigfight<2>),this),TILEMAP_SCAN_ROWS,8,8,64,512); m_layer[3] = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(FUNC(cyclwarr_state::get_tile_info_bigfight<3>),this),TILEMAP_SCAN_ROWS,8,8,64,512); - + m_shadow_pen_array = make_unique_clear(8192); // set up scroll bases @@ -1198,11 +1198,11 @@ VIDEO_START_MEMBER(cyclwarr_state,cyclwarr) m_layer_page_size[3] = 0x200; m_layer[2]->set_scrolldx(-8,-8); m_layer_page_size[2] = 0x200; - m_layer[1]->set_scrolldx(-8,-8); + m_layer[1]->set_scrolldx(-8,-8); m_layer_page_size[1] = 0x200; m_layer[0]->set_scrolldx(-0x10,-0x10); m_layer_page_size[0] = 0x100; - + m_layer1_can_be_road = true; } @@ -1240,7 +1240,7 @@ void cyclwarr_state::draw_bg(screen_device &screen, bitmap_rgb32 &bitmap, const // this controls wraparound (tilemap can't go above a threshold) // TODO: Actually scrolly registers 0xf0 to 0xff are used (can split the tilemap furthermore?) uint16_t page_select = scrolly[0xff]; - + for (int y=cliprect.min_y; y<=cliprect.max_y; y++) { clip.min_y = clip.max_y = y; @@ -1251,7 +1251,7 @@ void cyclwarr_state::draw_bg(screen_device &screen, bitmap_rgb32 &bitmap, const // apparently if this is on disables wraparound target int page_disable = scrolly[y_base] & 0x800; int cur_page = src_y + y; - + // special handling for cycle warriors road: it reads in scrolly table bits 15-13 an // additional tile color bank and per scanline. if(is_road == true) @@ -1278,7 +1278,7 @@ void cyclwarr_state::draw_bg(screen_device &screen, bitmap_rgb32 &bitmap, const // also Big Fight text garbage in the stage after Mevella joins you (forgot the name) if((cur_page - page_select) >= layer_page_size && page_disable == 0) src_y -= layer_page_size; - + src->set_scrollx(0,src_x); src->set_scrolly(0,src_y); src->draw(screen, bitmap, clip, TILEMAP_DRAW_CATEGORY(hi_priority), 0); @@ -1305,19 +1305,19 @@ uint32_t cyclwarr_state::screen_update_cyclwarr(screen_device &screen, bitmap_rg m_bigfight_last_bank=m_bigfight_bank; } update_cluts(8192, 4096, 8192); - + bitmap.fill(m_palette->pen(0), cliprect); #ifdef UNUSED_FUNCTION popmessage("%04x %04x (%04x)|%04x %04x (%04x)|%04x %04x (%04x)|%04x %04x (%04x)" - ,m_cyclwarr_videoram[1][0x000],m_cyclwarr_videoram[1][0x100],m_cyclwarr_videoram[1][0x1ff] - ,m_cyclwarr_videoram[1][0x200],m_cyclwarr_videoram[1][0x300],m_cyclwarr_videoram[1][0x3ff] + ,m_cyclwarr_videoram[1][0x000],m_cyclwarr_videoram[1][0x100],m_cyclwarr_videoram[1][0x1ff] + ,m_cyclwarr_videoram[1][0x200],m_cyclwarr_videoram[1][0x300],m_cyclwarr_videoram[1][0x3ff] ,m_cyclwarr_videoram[0][0x000],m_cyclwarr_videoram[0][0x100],m_cyclwarr_videoram[0][0x1ff] ,m_cyclwarr_videoram[0][0x200],m_cyclwarr_videoram[0][0x300],m_cyclwarr_videoram[0][0x3ff]); - #endif + #endif + +// popmessage("%04x %04x %04x %04x",m_video_config[0],m_video_config[1],m_video_config[2],m_video_config[3]); -// popmessage("%04x %04x %04x %04x",m_video_config[0],m_video_config[1],m_video_config[2],m_video_config[3]); - screen.priority().fill(0, cliprect); draw_sprites(screen.priority(),cliprect,1,(m_sprite_control_ram[0xe0]&0x1000) ? 0x1000 : 0); // Alpha pass only draw_bg_layers(screen, bitmap, cliprect, 0); -- cgit v1.2.3