diff --git a/hash/gamegear.xml b/hash/gamegear.xml index 79d5831854e..9965fe8e5a4 100644 --- a/hash/gamegear.xml +++ b/hash/gamegear.xml @@ -9122,7 +9122,7 @@ a certain item) --> - Super Tetris (Kor, SMS mode?) + Super Tetris (Korea, SMS mode?) 199? <unknown> diff --git a/hash/megadriv.xml b/hash/megadriv.xml index b90918c14d8..92c4a24cc99 100644 --- a/hash/megadriv.xml +++ b/hash/megadriv.xml @@ -16950,7 +16950,7 @@ https://segaretro.org/Elitserien_96 - F1 - World Championship Edition (US, prototype) + F1 - World Championship Edition (USA, prototype) 1994 Domark diff --git a/hash/msx2_flop.xml b/hash/msx2_flop.xml index d381fca5387..4efd5ef4599 100644 --- a/hash/msx2_flop.xml +++ b/hash/msx2_flop.xml @@ -23345,6 +23345,19 @@ HOMEBREW + + SG1000 (v0.96) + 2020 + GDX + Disk image created from the released zip. + + + + + + + + SH#1 (Japan) 1991 @@ -23504,6 +23517,19 @@ HOMEBREW + + SofaSMS (v1.1) + 2024 + Louthrax + Disk image created from the released zip. + + + + + + + + Soko (Spain?) 1995 diff --git a/hash/msx2p_flop.xml b/hash/msx2p_flop.xml index bfcb217d67a..18082cab27b 100644 --- a/hash/msx2p_flop.xml +++ b/hash/msx2p_flop.xml @@ -525,11 +525,10 @@ Known undumped: - Tetris II Special Edition - 1996 + Tetris II Special Edition (re-release) + 1999 R.A.M. - Copy protection dongle not supported. - + diff --git a/hash/msxr_cart.xml b/hash/msxr_cart.xml new file mode 100644 index 00000000000..50306b83d46 --- /dev/null +++ b/hash/msxr_cart.xml @@ -0,0 +1,106 @@ + + + + + + + Losaben Akel (demo) + 201? + ASM + MSX Turbo-R is not supported. Requires V9990. + + + + + + + + + + MSX View (Japan, v1.21) + 1992 + ASCII + MSX Turbo-R is not supported. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + MSX View (Japan, v1.00) + 1990 + ASCII + MSX Turbo-R is not supported. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Zone Terra (demo) + 1994 + Quadrivium + MSX Turbo-R is not supported. During gameplay, the status bar at the top of the screen is cut off. + + + + + + + + + diff --git a/hash/tutor.xml b/hash/tutor.xml index a1e169a1aca..bd9f6f4045c 100644 --- a/hash/tutor.xml +++ b/hash/tutor.xml @@ -82,7 +82,7 @@ Battlefighter (Original) (Unreleased - Prototype Stage) - 4-nin Mahjan (Jpn, set 1) + 4-nin Mahjan (Japan, set 1) 1984 Tomy @@ -95,7 +95,7 @@ Battlefighter (Original) (Unreleased - Prototype Stage) - 4-nin Mahjan (Jpn, set 2) + 4-nin Mahjan (Japan, set 2) 1984 Tomy @@ -108,7 +108,7 @@ Battlefighter (Original) (Unreleased - Prototype Stage) - Baseball [3D] (Jpn) + Baseball [3D] (Japan) 1984 Tomy @@ -121,7 +121,7 @@ Battlefighter (Original) (Unreleased - Prototype Stage) - Battle Fighter [3D] (Jpn) + Battle Fighter [3D] (Japan) 1985 Tomy @@ -134,7 +134,7 @@ Battlefighter (Original) (Unreleased - Prototype Stage) - Bombman (Jpn) + Bombman (Japan) 1982 Tomy @@ -161,7 +161,7 @@ Battlefighter (Original) (Unreleased - Prototype Stage) - Cave Crawlers (USA) / Maze Patrol (Jpn) + Cave Crawlers (USA) / Maze Patrol (Japan) 1983 Tomy @@ -186,7 +186,7 @@ Battlefighter (Original) (Unreleased - Prototype Stage) - DonPan (Jpn) + DonPan (Japan) 1982 Tomy @@ -199,7 +199,7 @@ Battlefighter (Original) (Unreleased - Prototype Stage) - Frogger (Jpn) + Frogger (Japan) 1983 Tomy @@ -224,7 +224,7 @@ Battlefighter (Original) (Unreleased - Prototype Stage) - Tron (Jpn) + Tron (Japan) 1983 Tomy / Walt Disney Productions @@ -248,7 +248,7 @@ Battlefighter (Original) (Unreleased - Prototype Stage) - Loco-motion (USA) / Guttang Gottong (Jpn) + Loco-motion (USA) / Guttang Gottong (Japan) 1983 Tomy @@ -260,7 +260,7 @@ Battlefighter (Original) (Unreleased - Prototype Stage) - Marine Adventure (Jpn) + Marine Adventure (Japan) 1982 Tomy @@ -273,7 +273,7 @@ Battlefighter (Original) (Unreleased - Prototype Stage) - Mickey Athletic Land (Jpn) + Mickey Athletic Land (Japan) 198? Tomy @@ -286,7 +286,7 @@ Battlefighter (Original) (Unreleased - Prototype Stage) - Mission Attack (Jpn) + Mission Attack (Japan) 1982 Tomy @@ -299,7 +299,7 @@ Battlefighter (Original) (Unreleased - Prototype Stage) - Monster Inn (Jpn) + Monster Inn (Japan) 1983 Tomy @@ -312,7 +312,7 @@ Battlefighter (Original) (Unreleased - Prototype Stage) - Mystery Gold (Jpn) + Mystery Gold (Japan) 1983 Tomy @@ -325,7 +325,7 @@ Battlefighter (Original) (Unreleased - Prototype Stage) - Mr. Do! (Jpn) + Mr. Do! (Japan) 1983 Tomy @@ -338,7 +338,7 @@ Battlefighter (Original) (Unreleased - Prototype Stage) - Night Flight (Jpn) + Night Flight (Japan) 1982 Tomy @@ -363,7 +363,7 @@ Battlefighter (Original) (Unreleased - Prototype Stage) - Rescue Copter [3D] (Jpn) + Rescue Copter [3D] (Japan) 1984 Tomy @@ -376,7 +376,7 @@ Battlefighter (Original) (Unreleased - Prototype Stage) - Saurusland (Jpn) + Saurusland (Japan) 1983 Tomy @@ -401,7 +401,7 @@ Battlefighter (Original) (Unreleased - Prototype Stage) - Scramble (Jpn) + Scramble (Japan) 1981 Tomy @@ -414,7 +414,7 @@ Battlefighter (Original) (Unreleased - Prototype Stage) - Super Bike (Jpn) + Super Bike (Japan) 1984 Tomy @@ -429,7 +429,7 @@ Battlefighter (Original) (Unreleased - Prototype Stage) - Torpedo Terror (USA) / Bermuda Triangle (Jpn) + Torpedo Terror (USA) / Bermuda Triangle (Japan) 1983 Tomy @@ -443,7 +443,7 @@ Battlefighter (Original) (Unreleased - Prototype Stage) - Traffic Jam (Jpn) + Traffic Jam (Japan) 1982 Tomy @@ -466,7 +466,7 @@ Battlefighter (Original) (Unreleased - Prototype Stage) - Triple Command (Jpn) + Triple Command (Japan) 1983 Tomy @@ -479,7 +479,7 @@ Battlefighter (Original) (Unreleased - Prototype Stage) - Turpin (Jpn) + Turpin (Japan) 1983 Tomy diff --git a/plugins/hiscore/hiscore.dat b/plugins/hiscore/hiscore.dat index 655dd7656ec..765cc0a83cf 100644 --- a/plugins/hiscore/hiscore.dat +++ b/plugins/hiscore/hiscore.dat @@ -8091,7 +8091,7 @@ yosakdona: ballbomb: lupin3: @:maincpu,program,20dc,03,00,00 - +@delay=0.25 invrvnge: invrvngea: diff --git a/src/devices/imagedev/floppy.cpp b/src/devices/imagedev/floppy.cpp index cc51835bf4c..85ded0d934b 100644 --- a/src/devices/imagedev/floppy.cpp +++ b/src/devices/imagedev/floppy.cpp @@ -1639,6 +1639,9 @@ void floppy_sound_device::step(int zone) } } } + + // Start the new seek sound from the beginning. + m_seek_samplepos = 0; } // Changing the pitch does not always sound convincing diff --git a/src/emu/emupal.cpp b/src/emu/emupal.cpp index 9e1370a24ed..479b0069891 100644 --- a/src/emu/emupal.cpp +++ b/src/emu/emupal.cpp @@ -198,6 +198,12 @@ palette_device &palette_device::set_format(rgbx_444_t, u32 entries) return *this; } +palette_device &palette_device::set_format(grbx_444_t, u32 entries) +{ + set_format(2, &raw_to_rgb_converter::standard_rgb_decoder<4,4,4, 8,12,4>, entries); + return *this; +} + palette_device &palette_device::set_format(gbrx_444_t, u32 entries) { set_format(2, &raw_to_rgb_converter::standard_rgb_decoder<4,4,4, 4,12,8>, entries); diff --git a/src/emu/emupal.h b/src/emu/emupal.h index cb4884a72fb..c10a449fda7 100644 --- a/src/emu/emupal.h +++ b/src/emu/emupal.h @@ -215,6 +215,7 @@ class palette_device : public device_t, public device_palette_interface enum xbrg_444_t { xBRG_444, xxxxBBBBRRRRGGGG }; enum xbgr_444_t { xBGR_444, xxxxBBBBGGGGRRRR }; enum rgbx_444_t { RGBx_444, RRRRGGGGBBBBxxxx }; + enum grbx_444_t { GRBx_444, GGGGRRRRBBBBxxxx }; enum gbrx_444_t { GBRx_444, GGGGBBBBRRRRxxxx }; enum irgb_4444_t { IRGB_4444, IIIIRRRRGGGGBBBB }; enum rgbi_4444_t { RGBI_4444, RRRRGGGGBBBBIIII }; @@ -301,6 +302,7 @@ class palette_device : public device_t, public device_palette_interface palette_device &set_format(xbrg_444_t, u32 entries); palette_device &set_format(xbgr_444_t, u32 entries); palette_device &set_format(rgbx_444_t, u32 entries); + palette_device &set_format(grbx_444_t, u32 entries); palette_device &set_format(gbrx_444_t, u32 entries); palette_device &set_format(irgb_4444_t, u32 entries); palette_device &set_format(rgbi_4444_t, u32 entries); diff --git a/src/frontend/mame/luaengine.cpp b/src/frontend/mame/luaengine.cpp index 6aa2d3840ec..6a6c42773cc 100644 --- a/src/frontend/mame/luaengine.cpp +++ b/src/frontend/mame/luaengine.cpp @@ -445,8 +445,8 @@ int sol_lua_push(sol::types, lua_State *L, screen_type_enum && case SCREEN_TYPE_INVALID: return sol::stack::push(L, "invalid"); case SCREEN_TYPE_RASTER: return sol::stack::push(L, "raster"); case SCREEN_TYPE_VECTOR: return sol::stack::push(L, "vector"); - case SCREEN_TYPE_LCD: return sol::stack::push(L, "svg"); - case SCREEN_TYPE_SVG: return sol::stack::push(L, "none"); + case SCREEN_TYPE_LCD: return sol::stack::push(L, "lcd"); + case SCREEN_TYPE_SVG: return sol::stack::push(L, "svg"); } return sol::stack::push(L, "unknown"); } diff --git a/src/mame/apple/adbmodem.cpp b/src/mame/apple/adbmodem.cpp index 0f3424c8b43..1e310864a34 100644 --- a/src/mame/apple/adbmodem.cpp +++ b/src/mame/apple/adbmodem.cpp @@ -47,7 +47,7 @@ void adbmodem_device::adbmodem_map(address_map &map) void adbmodem_device::device_add_mconfig(machine_config &config) { - PIC1654S(config, m_maincpu, 15.6672_MHz_XTAL/4); + PIC1654S(config, m_maincpu, 3.6864_MHz_XTAL); m_maincpu->set_addrmap(AS_PROGRAM, &adbmodem_device::adbmodem_map); m_maincpu->read_a().set(FUNC(adbmodem_device::porta_r)); m_maincpu->write_a().set(FUNC(adbmodem_device::porta_w)); diff --git a/src/mame/apple/apple2gs.cpp b/src/mame/apple/apple2gs.cpp index 9895d9dd301..a2bad0d7f25 100644 --- a/src/mame/apple/apple2gs.cpp +++ b/src/mame/apple/apple2gs.cpp @@ -1047,7 +1047,6 @@ TIMER_DEVICE_CALLBACK_MEMBER(apple2gs_state::apple2_interrupt) if (scanline == (192+BORDER_TOP)) { - m_macadb->adb_vblank(); m_vbl = true; // VBL interrupt @@ -3794,7 +3793,6 @@ void apple2gs_state::apple2gs(machine_config &config) m_adbmicro->write_p<3>().set(FUNC(apple2gs_state::adbmicro_p3_out)); MACADB(config, m_macadb, A2GS_MASTER_CLOCK/8); - m_macadb->set_mcu_mode(true); m_macadb->adb_data_callback().set(FUNC(apple2gs_state::set_adb_line)); RTC3430042(config, m_rtc, XTAL(32'768)); diff --git a/src/mame/apple/macii.cpp b/src/mame/apple/macii.cpp index 78a79e5ab2a..e8b8071129f 100644 --- a/src/mame/apple/macii.cpp +++ b/src/mame/apple/macii.cpp @@ -60,8 +60,6 @@ namespace { #define MAC_H_TOTAL (704) // (512+192) #define MAC_V_TOTAL (370) // (342+28) -#define MACII_USE_ADBMODEM (0) - // Mac driver data class mac_state:public driver_device @@ -212,7 +210,6 @@ class mac_state:public driver_device TIMER_CALLBACK_MEMBER(mac_adbrefresh_tick); TIMER_CALLBACK_MEMBER(mac_scanline_tick); - void mac_adb_via_out_cb2(int state); uint8_t mac_via_in_a(); uint8_t mac_via_in_b(); void mac_via_out_a(uint8_t data); @@ -537,17 +534,6 @@ void mac_state::mac_iwm_w(offs_t offset, uint16_t data, uint16_t mem_mask) m_maincpu->adjust_icount(-5); } -void mac_state::mac_adb_via_out_cb2(int state) -{ - // printf("VIA OUT CB2 = %x\n", state); -#if !MACII_USE_ADBMODEM - if (m_macadb) - { - m_macadb->adb_data_w(state); - } -#endif -} - /* ************************************************************************* * VIA * ************************************************************************* @@ -610,10 +596,6 @@ uint8_t mac_state::mac_via_in_b() { int val = 0; -#if !MACII_USE_ADBMODEM - val |= m_macadb->get_adb_state() << 4; -#endif - if (!m_adb_irq_pending) { val |= 0x08; @@ -651,11 +633,7 @@ void mac_state::mac_via_out_b(uint8_t data) } } -#if MACII_USE_ADBMODEM m_adbmodem->set_via_state((data & 0x30) >> 4); -#else - m_macadb->mac_adb_newaction((data & 0x30) >> 4); -#endif m_rtc->ce_w((data & 0x04) >> 2); m_rtc->data_w(data & 0x01); @@ -1113,7 +1091,6 @@ void mac_state::macii(machine_config &config) m_via1->readpb_handler().set(FUNC(mac_state::mac_via_in_b)); m_via1->writepa_handler().set(FUNC(mac_state::mac_via_out_a)); m_via1->writepb_handler().set(FUNC(mac_state::mac_via_out_b)); - m_via1->cb2_handler().set(FUNC(mac_state::mac_adb_via_out_cb2)); m_via1->irq_handler().set(FUNC(mac_state::mac_via_irq)); R65NC22(config, m_via2, C7M/10); @@ -1123,7 +1100,6 @@ void mac_state::macii(machine_config &config) m_via2->writepb_handler().set(FUNC(mac_state::mac_via2_out_b)); m_via2->irq_handler().set(FUNC(mac_state::mac_via2_irq)); -#if MACII_USE_ADBMODEM ADBMODEM(config, m_adbmodem, C7M); m_adbmodem->via_clock_callback().set(m_via1, FUNC(via6522_device::write_cb1)); m_adbmodem->via_data_callback().set(m_via1, FUNC(via6522_device::write_cb2)); @@ -1131,17 +1107,9 @@ void mac_state::macii(machine_config &config) m_adbmodem->irq_callback().set(FUNC(mac_state::adb_irq_w)); m_via1->cb2_handler().set(m_adbmodem, FUNC(adbmodem_device::set_via_data)); config.set_perfect_quantum(m_maincpu); -#endif MACADB(config, m_macadb, C15M); -#if !MACII_USE_ADBMODEM - m_macadb->set_mcu_mode(false); - m_macadb->via_clock_callback().set(m_via1, FUNC(via6522_device::write_cb1)); - m_macadb->via_data_callback().set(m_via1, FUNC(via6522_device::write_cb2)); - m_macadb->adb_irq_callback().set(FUNC(mac_state::adb_irq_w)); -#else m_macadb->adb_data_callback().set(m_adbmodem, FUNC(adbmodem_device::set_adb_line)); -#endif RAM(config, m_ram); m_ram->set_default_size("2M"); diff --git a/src/mame/apple/maciici.cpp b/src/mame/apple/maciici.cpp index 68b1fb832b5..97ed6946bff 100644 --- a/src/mame/apple/maciici.cpp +++ b/src/mame/apple/maciici.cpp @@ -17,6 +17,7 @@ #include "emu.h" +#include "adbmodem.h" #include "egret.h" #include "macadb.h" #include "macrtc.h" @@ -58,6 +59,7 @@ class maciici_state : public driver_device m_rbv(*this, "rbv"), m_macadb(*this, "macadb"), m_ram(*this, RAM_TAG), + m_adbmodem(*this, "adbmodem"), m_asc(*this, "asc"), m_scsibus1(*this, "scsi"), m_ncr5380(*this, "scsi:7:ncr5380"), @@ -70,6 +72,7 @@ class maciici_state : public driver_device { } + void maciixi_base(machine_config &config); void maciici(machine_config &config); void maciisi(machine_config &config); @@ -83,6 +86,7 @@ class maciici_state : public driver_device required_device m_rbv; required_device m_macadb; required_device m_ram; + optional_device m_adbmodem; required_device m_asc; required_device m_scsibus1; required_device m_ncr5380; @@ -340,15 +344,13 @@ uint8_t maciici_state::via_in_a_iisi() uint8_t maciici_state::via_in_b() { - u8 val = m_macadb->get_adb_state() << 4; + u8 val = m_rtc->data_r(); if (!m_adb_irq_pending) { val |= 0x08; } - val |= m_rtc->data_r(); - return val; } @@ -373,9 +375,9 @@ void maciici_state::via_out_a(uint8_t data) void maciici_state::via_out_b(uint8_t data) { // printf("%s VIA1 OUT B: %02x\n", machine().describe_context().c_str(), data); - m_macadb->mac_adb_newaction((data & 0x30) >> 4); + m_adbmodem->set_via_state((data & 0x30) >> 4); - m_rtc->ce_w(BIT(data, 2)); +m_rtc->ce_w(BIT(data, 2)); m_rtc->data_w(BIT(data, 0)); m_rtc->clk_w(BIT(data, 1)); } @@ -388,7 +390,7 @@ void maciici_state::via_out_b_iisi(uint8_t data) void maciici_state::via_out_cb2(int state) { - m_macadb->adb_data_w(state); +// m_macadb->adb_data_w(state); } void maciici_state::via_out_cb2_iisi(int state) @@ -503,7 +505,7 @@ INPUT_PORTS_END /*************************************************************************** MACHINE DRIVERS ***************************************************************************/ -void maciici_state::maciici(machine_config &config) +void maciici_state::maciixi_base(machine_config &config) { M68030(config, m_maincpu, 25000000); m_maincpu->set_addrmap(AS_PROGRAM, &maciici_state::maciici_map); @@ -610,29 +612,39 @@ void maciici_state::maciici(machine_config &config) NUBUS_SLOT(config, "nbc", "nubus", mac_nubus_cards, nullptr); NUBUS_SLOT(config, "nbd", "nubus", mac_nubus_cards, nullptr); NUBUS_SLOT(config, "nbe", "nubus", mac_nubus_cards, nullptr); +} + +void maciici_state::maciici(machine_config &config) +{ + maciixi_base(config); + + ADBMODEM(config, m_adbmodem, C7M); + m_adbmodem->via_clock_callback().set(m_via1, FUNC(via6522_device::write_cb1)); + m_adbmodem->via_data_callback().set(m_via1, FUNC(via6522_device::write_cb2)); + m_adbmodem->linechange_callback().set(m_macadb, FUNC(macadb_device::adb_linechange_w)); + m_adbmodem->irq_callback().set(FUNC(maciici_state::adb_irq_w)); + m_via1->cb2_handler().set(m_adbmodem, FUNC(adbmodem_device::set_via_data)); + config.set_perfect_quantum(m_maincpu); MACADB(config, m_macadb, C15M); - m_macadb->set_mcu_mode(false); - m_macadb->via_clock_callback().set(m_via1, FUNC(via6522_device::write_cb1)); - m_macadb->via_data_callback().set(m_via1, FUNC(via6522_device::write_cb2)); - m_macadb->adb_irq_callback().set(FUNC(maciici_state::adb_irq_w)); + m_macadb->adb_data_callback().set(m_adbmodem, FUNC(adbmodem_device::set_adb_line)); } void maciici_state::maciisi(machine_config &config) { - maciici(config); + maciixi_base(config); M68030(config.replace(), m_maincpu, 20000000); m_maincpu->set_addrmap(AS_PROGRAM, &maciici_state::maciici_map); m_maincpu->set_dasm_override(std::function(&mac68k_dasm_override), "mac68k_dasm_override"); - MACADB(config.replace(), m_macadb, C15M); - m_via1->readpa_handler().set(FUNC(maciici_state::via_in_a_iisi)); m_via1->readpb_handler().set(FUNC(maciici_state::via_in_b_iisi)); m_via1->writepb_handler().set(FUNC(maciici_state::via_out_b_iisi)); m_via1->cb2_handler().set(FUNC(maciici_state::via_out_cb2_iisi)); + MACADB(config, m_macadb, C15M); + EGRET(config, m_egret, XTAL(32'768)); m_egret->set_default_bios_tag("344s0100"); m_egret->reset_callback().set(FUNC(maciici_state::egret_reset_w)); diff --git a/src/mame/apple/maciifx.cpp b/src/mame/apple/maciifx.cpp index efe38cece47..ac1aa7fe4df 100644 --- a/src/mame/apple/maciifx.cpp +++ b/src/mame/apple/maciifx.cpp @@ -580,7 +580,7 @@ void maciifx_state::maciifx(machine_config &config) swimpic.prd_callback().set(m_fdc, FUNC(applefdintf_device::read)); swimpic.pwr_callback().set(m_fdc, FUNC(applefdintf_device::write)); swimpic.hint_callback().set(FUNC(maciifx_state::oss_interrupt<6>)); - swimpic.gpout0_callback().set(m_macadb, FUNC(macadb_device::adb_data_w)); + swimpic.gpout0_callback().set(m_macadb, FUNC(macadb_device::adb_linechange_w)).invert(); swimpic.gpin_callback().set(FUNC(maciifx_state::adbin_r)); m_fdc->dat1byte_cb().set("swimpic", FUNC(applepic_device::reqa_w)); diff --git a/src/mame/chess/krypton_regency.cpp b/src/mame/chess/krypton_regency.cpp index d767a5d427b..cc8d5e7e424 100644 --- a/src/mame/chess/krypton_regency.cpp +++ b/src/mame/chess/krypton_regency.cpp @@ -18,6 +18,7 @@ Hardware notes (Systema Challenge fitted with Regency MCU): A26 MCU was used in: - Krypton Regency (with or without LEDs) +- Excalibur Avenger (suspected, Excalibur brand Comet, with newer MCU) - Excalibur Legend III (suspected, Excalibur brand Regency) - Systema Challenge (1996 version) diff --git a/src/mame/gaelco/gaelco2.cpp b/src/mame/gaelco/gaelco2.cpp index 315dc79351b..66a3e2b652e 100644 --- a/src/mame/gaelco/gaelco2.cpp +++ b/src/mame/gaelco/gaelco2.cpp @@ -51,9 +51,9 @@ static const gfx_layout tilelayout16 = { - 16,16, /* 16x16 tiles */ - RGN_FRAC(1,5), /* number of tiles */ - 5, /* 5 bpp */ + 16,16, // 16x16 tiles + RGN_FRAC(1,5), // number of tiles + 5, // 5 bpp { RGN_FRAC(4,5), RGN_FRAC(3,5), RGN_FRAC(2,5), RGN_FRAC(1,5), 0 }, { STEP8(0,1), STEP8(16*8,1) }, { STEP16(0,8) }, @@ -61,7 +61,7 @@ static const gfx_layout tilelayout16 = }; static GFXDECODE_START( gfx_gaelco2 ) - GFXDECODE_ENTRY( "gfx1", 0, tilelayout16, 0, 128 ) + GFXDECODE_ENTRY( "gfx", 0, tilelayout16, 0, 128 ) GFXDECODE_END @@ -82,18 +82,18 @@ void gaelco2_state::mcu_hostmem_map(address_map &map) void gaelco2_state::maniacsq_map(address_map &map) { - map(0x000000, 0x03ffff).rom(); /* ROM */ - map(0x200000, 0x20ffff).ram().w(FUNC(gaelco2_state::vram_w)).share("spriteram"); /* Video RAM */ - map(0x202890, 0x2028ff).rw("gaelco", FUNC(gaelco_gae1_device::gaelcosnd_r), FUNC(gaelco_gae1_device::gaelcosnd_w)); /* Sound Registers */ - map(0x210000, 0x211fff).ram().w(FUNC(gaelco2_state::palette_w)).share("paletteram"); /* Palette */ - map(0x218004, 0x218009).ram().w(FUNC(gaelco2_state::vregs_w)).share("vregs"); /* Video Registers */ - map(0x300000, 0x300001).portr("IN0"); /* DSW #1 + Input 1P */ - map(0x300002, 0x300003).portr("IN1"); /* DSW #2 + Input 2P */ - map(0x30004a, 0x30004b).nopw(); /* Sound muting? */ - map(0x320000, 0x320001).portr("COIN"); /* COINSW + SERVICESW */ - map(0x500000, 0x500001).w(FUNC(gaelco2_state::alighunt_coin_w)); /* Coin lockout + counters */ - map(0xfe0000, 0xfe7fff).ram(); /* Work RAM */ - map(0xfe8000, 0xfeffff).ram().share("shareram"); /* Work RAM */ + map(0x000000, 0x03ffff).rom(); // ROM + map(0x200000, 0x20ffff).ram().w(FUNC(gaelco2_state::vram_w)).share("spriteram"); // Video RAM + map(0x202890, 0x2028ff).rw("gaelco", FUNC(gaelco_gae1_device::gaelcosnd_r), FUNC(gaelco_gae1_device::gaelcosnd_w)); // Sound Registers + map(0x210000, 0x211fff).ram().w(FUNC(gaelco2_state::palette_w)).share(m_paletteram); // Palette + map(0x218004, 0x218009).ram().w(FUNC(gaelco2_state::vregs_w)).share(m_vregs); // Video Registers + map(0x300000, 0x300001).portr("IN0"); // DSW #1 + Input 1P + map(0x300002, 0x300003).portr("IN1"); // DSW #2 + Input 2P + map(0x30004a, 0x30004b).nopw(); // Sound muting? + map(0x320000, 0x320001).portr("COIN"); // COINSW + SERVICESW + map(0x500000, 0x500001).w(FUNC(gaelco2_state::alighunt_coin_w)); // Coin lockout + counters + map(0xfe0000, 0xfe7fff).ram(); // Work RAM + map(0xfe8000, 0xfeffff).ram().share(m_shareram); // Work RAM } @@ -170,24 +170,24 @@ static INPUT_PORTS_START( maniacsq ) PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_SERVICE2 ) PORT_IMPULSE(1) /* go to service mode NOW */ + PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_SERVICE2 ) PORT_IMPULSE(1) // go to service mode NOW PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_BIT( 0xffc0, IP_ACTIVE_LOW, IPT_UNKNOWN ) INPUT_PORTS_END void gaelco2_state::maniacsq(machine_config &config) { - /* basic machine hardware */ - M68000(config, m_maincpu, XTAL(24'000'000) / 2); /* 12 MHz */ + // basic machine hardware + M68000(config, m_maincpu, XTAL(24'000'000) / 2); // 12 MHz m_maincpu->set_addrmap(AS_PROGRAM, &gaelco2_state::maniacsq_map); m_maincpu->set_vblank_int("screen", FUNC(gaelco2_state::irq6_line_hold)); - /* video hardware */ + // video hardware BUFFERED_SPRITERAM16(config, m_spriteram); screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); screen.set_refresh_hz(59.1); - screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500)); /* not accurate */ + screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500)); // not accurate screen.set_size(64*16, 32*16); screen.set_visarea(0, 320-1, 16, 256-1); screen.set_screen_update(FUNC(gaelco2_state::screen_update)); @@ -199,12 +199,12 @@ void gaelco2_state::maniacsq(machine_config &config) MCFG_VIDEO_START_OVERRIDE(gaelco2_state,gaelco2) - /* sound hardware */ + // sound hardware SPEAKER(config, "lspeaker").front_left(); SPEAKER(config, "rspeaker").front_right(); gaelco_gae1_device &gaelco(GAELCO_GAE1(config, "gaelco", XTAL(30'000'000) / 30)); - gaelco.set_device_rom_tag("gfx1"); + gaelco.set_device_rom_tag("gfx"); gaelco.set_bank_offsets(0 * 0x0080000, 1 * 0x0080000, 0, 0); gaelco.add_route(0, "lspeaker", 1.0); gaelco.add_route(1, "rspeaker", 1.0); @@ -219,28 +219,28 @@ void gaelco2_state::maniacsq_d5002fp(machine_config &config) ROM_START( maniacsq ) // REF 940411 - ROM_REGION( 0x040000, "maincpu", 0 ) /* 68000 code */ + ROM_REGION( 0x040000, "maincpu", 0 ) // 68000 code ROM_LOAD16_BYTE( "tms27c010a.msu45", 0x000000, 0x020000, CRC(fa44c907) SHA1(4d9b3a6cf044395cc4e04f6dd8d1109e8ee4d52d) ) ROM_LOAD16_BYTE( "tms27c010a.msu44", 0x000001, 0x020000, CRC(42e20121) SHA1(6662fa8ec5756bf5c4ebaaa9aa2e0e241cf582a4) ) - ROM_REGION( 0x8000, "gaelco_ds5002fp:sram", 0 ) /* DS5002FP code */ + ROM_REGION( 0x8000, "gaelco_ds5002fp:sram", 0 ) // DS5002FP code ROM_LOAD( "maniacsq_ds5002fp_sram.bin", 0x00000, 0x8000, CRC(afe9703d) SHA1(e737bf154bcb268b8f0764879b513489b163e462) ) ROM_REGION( 0x100, "gaelco_ds5002fp:mcu:internal", ROMREGION_ERASE00 ) - /* these are the default states stored in NVRAM */ + // these are the default states stored in NVRAM DS5002FP_SET_MON( 0x19 ) DS5002FP_SET_RPCTL( 0x00 ) DS5002FP_SET_CRCR( 0x80 ) - ROM_REGION( 0x0280000, "gfx1", 0 ) /* GFX + Sound */ + ROM_REGION( 0x0280000, "gfx", 0 ) // GFX + Sound // all 4 roms on a sub-board, no IC positions marked - ROM_LOAD( "ms1", 0x0000000, 0x0080000, CRC(d8551b2f) SHA1(78b5b07112bd89fed18055180e7cc64f8e0bd0b1) ) /* GFX + Sound */ - ROM_LOAD( "ms2", 0x0080000, 0x0080000, CRC(b269c427) SHA1(b7f9501529fbb7ee82700cff82740ba5770cf3c5) ) /* GFX + Sound */ - ROM_LOAD( "ms3", 0x0100000, 0x0020000, CRC(af4ea5e7) SHA1(ffaf09dc2588e32c124e7dd2f86ba009f1b8b176) ) /* GFX only */ - ROM_FILL( 0x0120000, 0x0060000, 0x00 ) /* Empty */ - ROM_LOAD( "ms4", 0x0180000, 0x0020000, CRC(578c3588) SHA1(c2e1fba29f21d6822677886fb2d26e050b336c14) ) /* GFX only */ - ROM_FILL( 0x01a0000, 0x0060000, 0x00 ) /* Empty */ - ROM_FILL( 0x0200000, 0x0080000, 0x00 ) /* to decode GFX as 5bpp */ + ROM_LOAD( "ms1", 0x0000000, 0x0080000, CRC(d8551b2f) SHA1(78b5b07112bd89fed18055180e7cc64f8e0bd0b1) ) // GFX + Sound + ROM_LOAD( "ms2", 0x0080000, 0x0080000, CRC(b269c427) SHA1(b7f9501529fbb7ee82700cff82740ba5770cf3c5) ) // GFX + Sound + ROM_LOAD( "ms3", 0x0100000, 0x0020000, CRC(af4ea5e7) SHA1(ffaf09dc2588e32c124e7dd2f86ba009f1b8b176) ) // GFX only + ROM_FILL( 0x0120000, 0x0060000, 0x00 ) // Empty + ROM_LOAD( "ms4", 0x0180000, 0x0020000, CRC(578c3588) SHA1(c2e1fba29f21d6822677886fb2d26e050b336c14) ) // GFX only + ROM_FILL( 0x01a0000, 0x0060000, 0x00 ) // Empty + ROM_FILL( 0x0200000, 0x0080000, 0x00 ) // to decode GFX as 5bpp ROM_END /* @@ -279,43 +279,43 @@ REF: 940411 -----------------------------------------------------------------------------| */ ROM_START( maniacsqa ) // REF 940411 - ROM_REGION( 0x040000, "maincpu", 0 ) /* 68000 code */ + ROM_REGION( 0x040000, "maincpu", 0 ) // 68000 code ROM_LOAD16_BYTE( "ms_u_45.u45", 0x000000, 0x020000, CRC(98f4fdc0) SHA1(1e4d5b0a8a432de885c96319c21280d304b38db0) ) ROM_LOAD16_BYTE( "ms_u_44.u44", 0x000001, 0x020000, CRC(1785dd41) SHA1(5c6a65c00248971ce54c8185858393f2c52cc583) ) - ROM_REGION( 0x8000, "gaelco_ds5002fp:sram", 0 ) /* DS5002FP code */ + ROM_REGION( 0x8000, "gaelco_ds5002fp:sram", 0 ) // DS5002FP code ROM_LOAD( "maniacsq_ds5002fp_sram.bin", 0x00000, 0x8000, CRC(afe9703d) SHA1(e737bf154bcb268b8f0764879b513489b163e462) ) ROM_REGION( 0x100, "gaelco_ds5002fp:mcu:internal", ROMREGION_ERASE00 ) - /* these are the default states stored in NVRAM */ + // these are the default states stored in NVRAM DS5002FP_SET_MON( 0x19 ) DS5002FP_SET_RPCTL( 0x00 ) DS5002FP_SET_CRCR( 0x80 ) - ROM_REGION( 0x0280000, "gfx1", 0 ) /* GFX + Sound */ + ROM_REGION( 0x0280000, "gfx", 0 ) // GFX + Sound // all 4 roms on a sub-board, no IC positions marked - ROM_LOAD( "ms1", 0x0000000, 0x0080000, CRC(d8551b2f) SHA1(78b5b07112bd89fed18055180e7cc64f8e0bd0b1) ) /* GFX + Sound */ - ROM_LOAD( "ms2", 0x0080000, 0x0080000, CRC(b269c427) SHA1(b7f9501529fbb7ee82700cff82740ba5770cf3c5) ) /* GFX + Sound */ - ROM_LOAD( "ms3", 0x0100000, 0x0020000, CRC(af4ea5e7) SHA1(ffaf09dc2588e32c124e7dd2f86ba009f1b8b176) ) /* GFX only */ - ROM_FILL( 0x0120000, 0x0060000, 0x00 ) /* Empty */ - ROM_LOAD( "ms4", 0x0180000, 0x0020000, CRC(578c3588) SHA1(c2e1fba29f21d6822677886fb2d26e050b336c14) ) /* GFX only */ - ROM_FILL( 0x01a0000, 0x0060000, 0x00 ) /* Empty */ - ROM_FILL( 0x0200000, 0x0080000, 0x00 ) /* to decode GFX as 5bpp */ + ROM_LOAD( "ms1", 0x0000000, 0x0080000, CRC(d8551b2f) SHA1(78b5b07112bd89fed18055180e7cc64f8e0bd0b1) ) // GFX + Sound + ROM_LOAD( "ms2", 0x0080000, 0x0080000, CRC(b269c427) SHA1(b7f9501529fbb7ee82700cff82740ba5770cf3c5) ) // GFX + Sound + ROM_LOAD( "ms3", 0x0100000, 0x0020000, CRC(af4ea5e7) SHA1(ffaf09dc2588e32c124e7dd2f86ba009f1b8b176) ) // GFX only + ROM_FILL( 0x0120000, 0x0060000, 0x00 ) // Empty + ROM_LOAD( "ms4", 0x0180000, 0x0020000, CRC(578c3588) SHA1(c2e1fba29f21d6822677886fb2d26e050b336c14) ) // GFX only + ROM_FILL( 0x01a0000, 0x0060000, 0x00 ) // Empty + ROM_FILL( 0x0200000, 0x0080000, 0x00 ) // to decode GFX as 5bpp ROM_END ROM_START( maniacsqu ) // REF 940411 - ROM_REGION( 0x040000, "maincpu", 0 ) /* 68000 code */ + ROM_REGION( 0x040000, "maincpu", 0 ) // 68000 code ROM_LOAD16_BYTE( "d8-d15.1m", 0x000000, 0x020000, CRC(9121d1b6) SHA1(ad8f0d996b6d42fc0c6645466608e82ca96e0b66) ) ROM_LOAD16_BYTE( "d0-d7.1m", 0x000001, 0x020000, CRC(a95cfd2a) SHA1(b5bad76f12d2a1f6bf6b35482f2f933ceb00e552) ) - ROM_REGION( 0x0280000, "gfx1", 0 ) /* GFX + Sound */ - ROM_LOAD( "d0-d7.4m", 0x0000000, 0x0080000, CRC(d8551b2f) SHA1(78b5b07112bd89fed18055180e7cc64f8e0bd0b1) ) /* GFX + Sound */ - ROM_LOAD( "d8-d15.4m", 0x0080000, 0x0080000, CRC(b269c427) SHA1(b7f9501529fbb7ee82700cff82740ba5770cf3c5) ) /* GFX + Sound */ - ROM_LOAD( "d16-d23.1m", 0x0100000, 0x0020000, CRC(af4ea5e7) SHA1(ffaf09dc2588e32c124e7dd2f86ba009f1b8b176) ) /* GFX only */ - ROM_FILL( 0x0120000, 0x0060000, 0x00 ) /* Empty */ - ROM_LOAD( "d24-d31.1m", 0x0180000, 0x0020000, CRC(578c3588) SHA1(c2e1fba29f21d6822677886fb2d26e050b336c14) ) /* GFX only */ - ROM_FILL( 0x01a0000, 0x0060000, 0x00 ) /* Empty */ - ROM_FILL( 0x0200000, 0x0080000, 0x00 ) /* to decode GFX as 5bpp */ + ROM_REGION( 0x0280000, "gfx", 0 ) // GFX + Sound + ROM_LOAD( "d0-d7.4m", 0x0000000, 0x0080000, CRC(d8551b2f) SHA1(78b5b07112bd89fed18055180e7cc64f8e0bd0b1) ) // GFX + Sound + ROM_LOAD( "d8-d15.4m", 0x0080000, 0x0080000, CRC(b269c427) SHA1(b7f9501529fbb7ee82700cff82740ba5770cf3c5) ) // GFX + Sound + ROM_LOAD( "d16-d23.1m", 0x0100000, 0x0020000, CRC(af4ea5e7) SHA1(ffaf09dc2588e32c124e7dd2f86ba009f1b8b176) ) // GFX only + ROM_FILL( 0x0120000, 0x0060000, 0x00 ) // Empty + ROM_LOAD( "d24-d31.1m", 0x0180000, 0x0020000, CRC(578c3588) SHA1(c2e1fba29f21d6822677886fb2d26e050b336c14) ) // GFX only + ROM_FILL( 0x01a0000, 0x0060000, 0x00 ) // Empty + ROM_FILL( 0x0200000, 0x0080000, 0x00 ) // to decode GFX as 5bpp ROM_END /* @@ -392,18 +392,18 @@ digital and analog inputs not required by Maniac Square or Snow Board Championsh */ ROM_START( maniacsqs ) // REF 960419/1 - ROM_REGION( 0x100000, "maincpu", 0 ) /* 68000 code */ + ROM_REGION( 0x100000, "maincpu", 0 ) // 68000 code ROM_LOAD16_BYTE( "ms1.ic53", 0x000000, 0x020000, CRC(911fb089) SHA1(62bebf5072331421d4beedf0bde0cffc362b0514) ) ROM_LOAD16_BYTE( "ms2.ic55", 0x000001, 0x020000, CRC(e77a5537) SHA1(e7e1c7b794515238c4b5e5b8ef050eb945c96a3f) ) - ROM_REGION( 0x0280000, "gfx1", 0 ) /* GFX + Sound - same data as other sets */ - ROM_LOAD( "f0.bin", 0x0000000, 0x0080000, CRC(d8551b2f) SHA1(78b5b07112bd89fed18055180e7cc64f8e0bd0b1) ) /* GFX + Sound */ - ROM_LOAD( "f1.bin", 0x0080000, 0x0080000, CRC(b269c427) SHA1(b7f9501529fbb7ee82700cff82740ba5770cf3c5) ) /* GFX + Sound */ - ROM_LOAD( "f2.bin", 0x0100000, 0x0020000, CRC(af4ea5e7) SHA1(ffaf09dc2588e32c124e7dd2f86ba009f1b8b176) ) /* GFX only */ - ROM_FILL( 0x0120000, 0x0060000, 0x00 ) /* Empty */ - ROM_LOAD( "f3.bin", 0x0180000, 0x0020000, CRC(578c3588) SHA1(c2e1fba29f21d6822677886fb2d26e050b336c14) ) /* GFX only */ - ROM_FILL( 0x01a0000, 0x0060000, 0x00 ) /* Empty */ - ROM_FILL( 0x0200000, 0x0080000, 0x00 ) /* to decode GFX as 5bpp */ + ROM_REGION( 0x0280000, "gfx", 0 ) // GFX + Sound - same data as other sets + ROM_LOAD( "f0.bin", 0x0000000, 0x0080000, CRC(d8551b2f) SHA1(78b5b07112bd89fed18055180e7cc64f8e0bd0b1) ) // GFX + Sound + ROM_LOAD( "f1.bin", 0x0080000, 0x0080000, CRC(b269c427) SHA1(b7f9501529fbb7ee82700cff82740ba5770cf3c5) ) // GFX + Sound + ROM_LOAD( "f2.bin", 0x0100000, 0x0020000, CRC(af4ea5e7) SHA1(ffaf09dc2588e32c124e7dd2f86ba009f1b8b176) ) // GFX only + ROM_FILL( 0x0120000, 0x0060000, 0x00 ) // Empty + ROM_LOAD( "f3.bin", 0x0180000, 0x0020000, CRC(578c3588) SHA1(c2e1fba29f21d6822677886fb2d26e050b336c14) ) // GFX only + ROM_FILL( 0x01a0000, 0x0060000, 0x00 ) // Empty + ROM_FILL( 0x0200000, 0x0080000, 0x00 ) // to decode GFX as 5bpp ROM_END /*============================================================================ @@ -449,29 +449,29 @@ void gaelco2_state::saltcrdi_map(address_map &map) map(0x000000, 0x03ffff).rom(); map(0x200000, 0x20ffff).ram().w(FUNC(gaelco2_state::vram_w)).share("spriteram"); map(0x202890, 0x2028ff).rw("gaelco", FUNC(gaelco_gae1_device::gaelcosnd_r), FUNC(gaelco_gae1_device::gaelcosnd_w)); - map(0x210000, 0x211fff).ram().w(FUNC(gaelco2_state::palette_w)).share("paletteram"); - map(0x218004, 0x218009).ram().w(FUNC(gaelco2_state::vregs_w)).share("vregs"); + map(0x210000, 0x211fff).ram().w(FUNC(gaelco2_state::palette_w)).share(m_paletteram); + map(0x218004, 0x218009).ram().w(FUNC(gaelco2_state::vregs_w)).share(m_vregs); map(0x300000, 0x300001).portr("IN0"); map(0x310000, 0x310001).portr("DSW"); map(0x320000, 0x320001).portr("COIN"); map(0xfe0000, 0xfe7fff).ram(); - map(0xfe8000, 0xfeffff).ram().share("shareram"); + map(0xfe8000, 0xfeffff).ram().share(m_shareram); } // 34'000'000 XTAL for the video? void gaelco2_state::saltcrdi(machine_config &config) { - /* basic machine hardware */ - M68000(config, m_maincpu, XTAL(24'000'000) / 2); /* 12 MHz */ + // basic machine hardware + M68000(config, m_maincpu, XTAL(24'000'000) / 2); // 12 MHz m_maincpu->set_addrmap(AS_PROGRAM, &gaelco2_state::saltcrdi_map); m_maincpu->set_vblank_int("screen", FUNC(gaelco2_state::irq6_line_hold)); - /* video hardware */ + // video hardware BUFFERED_SPRITERAM16(config, m_spriteram); screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); screen.set_refresh_hz(59.1); - screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500)); /* not accurate */ + screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500)); // not accurate screen.set_size(64*16, 32*16); screen.set_visarea(0, 384-1, 16, 256-1); screen.set_screen_update(FUNC(gaelco2_state::screen_update)); @@ -483,13 +483,13 @@ void gaelco2_state::saltcrdi(machine_config &config) MCFG_VIDEO_START_OVERRIDE(gaelco2_state,gaelco2) - /* sound hardware */ + // sound hardware SPEAKER(config, "lspeaker").front_left(); SPEAKER(config, "rspeaker").front_right(); - /* unused? ROMs contain no sound data */ + // unused? ROMs contain no sound data gaelco_gae1_device &gaelco(GAELCO_GAE1(config, "gaelco", XTAL(24'000'000) / 24)); // TODO : Correct OSC? - gaelco.set_device_rom_tag("gfx1"); + gaelco.set_device_rom_tag("gfx"); gaelco.set_bank_offsets(0 * 0x0080000, 1 * 0x0080000, 0, 0); gaelco.add_route(0, "lspeaker", 1.0); gaelco.add_route(1, "rspeaker", 1.0); @@ -537,21 +537,21 @@ void gaelco2_state::saltcrdi(machine_config &config) The I/O PCB layout is slightly different than the one found on the Pro Stepper machine. */ ROM_START( sltpcycl ) // REF 970410 - ROM_REGION( 0x040000, "maincpu", 0 ) /* 68000 code */ + ROM_REGION( 0x040000, "maincpu", 0 ) // 68000 code ROM_LOAD16_BYTE( "bi-n-21-27c512.u21", 0x000000, 0x010000, CRC(1d2e9a68) SHA1(b9bb4eeefe90850b648dc45689a08f3c28147856) ) ROM_LOAD16_BYTE( "bi-n-23-27c512.u23", 0x000001, 0x010000, CRC(5865351d) SHA1(a62b8ec88ef41d96b65a03ccaeadbec21803df34) ) - ROM_REGION( 0x0280000, "gfx1", ROMREGION_ERASEFF ) /* GFX, no sound, machine has none? */ + ROM_REGION( 0x0280000, "gfx", ROMREGION_ERASEFF ) // GFX, no sound, machine has none? ROM_LOAD( "bi-40-bank0-27c1001.u40", 0x0000000, 0x0020000, CRC(56822524) SHA1(aae133e9fb85ba8995c095cc540aa35b65c27777) ) ROM_LOAD( "bi-39-bank0-27c1001.u39", 0x0080000, 0x0020000, CRC(30dfcde1) SHA1(caf4429d0e1185c157eca436e9bb3a8513781a97) ) ROM_LOAD( "bi-38-bank0-27c1001.u38", 0x0100000, 0x0020000, CRC(84ec4b34) SHA1(01376f2534c4bc51d0a357d80db28b24c3fd71f6) ) ROM_LOAD( "bi-37-bank0-27c1001.u37", 0x0180000, 0x0020000, CRC(779fca47) SHA1(fce95893a5bcf0c6f26c223491c95154f072c92b) ) - ROM_FILL( 0x0200000, 0x0020000, 0x00 ) /* to decode GFX as 5bpp */ + ROM_FILL( 0x0200000, 0x0020000, 0x00 ) // to decode GFX as 5bpp ROM_LOAD( "bi-44-bank1-27c1001.u44", 0x0020000, 0x0020000, CRC(171d2f88) SHA1(e2b406dad78e3ab5bebb673ed03db5d27879283e) ) ROM_LOAD( "bi-43-bank1-27c1001.u43", 0x00a0000, 0x0020000, CRC(69b35d81) SHA1(d9657e3d592079071df019cd75d676fa4b1bcba9) ) ROM_LOAD( "bi-42-bank1-27c1001.u42", 0x0120000, 0x0020000, CRC(eaef0565) SHA1(4214b05f1df3062eaeea91505b61816725556ed5) ) ROM_LOAD( "bi-41-bank1-27c1001.u41", 0x01a0000, 0x0020000, CRC(c4d24254) SHA1(e6ff7624e628dc6ace11a50b6ff89812844b52c5) ) - ROM_FILL( 0x0220000, 0x0020000, 0x00 ) /* to decode GFX as 5bpp */ + ROM_FILL( 0x0220000, 0x0020000, 0x00 ) // to decode GFX as 5bpp ROM_REGION( 0x0800, "iomcu", 0 ) // on IO board ROM_LOAD( "2-st62t15c6", 0x0000, 0x0800, NO_DUMP ) // 2KBytes internal ROM @@ -625,16 +625,16 @@ ROM_END MCU-1 = ST62T15B6-HWD labeled as "1" */ ROM_START( sltpstep ) - ROM_REGION( 0x040000, "maincpu", 0 ) /* 68000 code */ + ROM_REGION( 0x040000, "maincpu", 0 ) // 68000 code ROM_LOAD16_BYTE( "st_u_21.u21", 0x000000, 0x010000, CRC(2274f931) SHA1(c7b32bbb46e349769376bfaffe663170873bd083) ) // 27C512 ROM_LOAD16_BYTE( "st_u_23.u23", 0x000001, 0x010000, CRC(07c69f55) SHA1(886bef76b2aff046fd1c9a4837f359cb59095125) ) // 27C512 - ROM_REGION( 0x0280000, "gfx1", ROMREGION_ERASEFF ) /* GFX, no sound, machine has none? */ + ROM_REGION( 0x0280000, "gfx", ROMREGION_ERASEFF ) // GFX, no sound, machine has none? ROM_LOAD( "st_u_40.u40", 0x0000000, 0x0080000, CRC(813270de) SHA1(9a6ce7679bd5c6ecf0c3328d6ff9dc2240a95328) ) // 27C4000DC ROM_LOAD( "st_u_39.u39", 0x0080000, 0x0080000, CRC(1d42e124) SHA1(add866310511f4f406b80ed0d3983b79b80c701c) ) // 27C4000DC ROM_LOAD( "st_u_38.u38", 0x0100000, 0x0080000, CRC(9d0d795c) SHA1(ef7cf61f8c687ecc68678a634f65386cc25d8a8f) ) // 27C4000DC ROM_LOAD( "st_u_37.u37", 0x0180000, 0x0080000, CRC(5543d4d1) SHA1(1f9f358dfb252412468ddd68331bda5acbe99329) ) // 27C4000DC - ROM_FILL( 0x0200000, 0x0080000, 0x00 ) /* to decode GFX as 5bpp */ + ROM_FILL( 0x0200000, 0x0080000, 0x00 ) // to decode GFX as 5bpp ROM_REGION( 0x0800, "iomcu", 0 ) // on IO board ROM_LOAD( "cpu_6022-1-st62t15b6.ic4", 0x0000, 0x0800, NO_DUMP ) // 2KBytes internal ROM @@ -681,24 +681,24 @@ Note 1x 28x2 edge connector void gaelco2_state::play2000_map(address_map &map) { - map(0x000000, 0x03ffff).rom(); /* ROM */ - map(0x100000, 0x100001).portr("IN0"); /* Coins + other buttons? */ + map(0x000000, 0x03ffff).rom(); // ROM + map(0x100000, 0x100001).portr("IN0"); // Coins + other buttons? map(0x110000, 0x110001).portr("IN1"); - map(0x200000, 0x20ffff).ram().w(FUNC(gaelco2_state::vram_w)).share("spriteram"); /* Video RAM */ - map(0x202890, 0x2028ff).rw("gaelco", FUNC(gaelco_gae1_device::gaelcosnd_r), FUNC(gaelco_gae1_device::gaelcosnd_w)); /* Sound Registers */ - map(0x214000, 0x214fff).ram().w(FUNC(gaelco2_state::palette_w)).share("paletteram"); /* Palette */ - map(0x215000, 0x217fff).ram(); /* Written to, but unused? */ - map(0x218000, 0x218003).ram(); /* Written to, but unused? */ - map(0x218004, 0x218009).ram().w(FUNC(gaelco2_state::vregs_w)).share("vregs"); /* Video Registers */ - map(0x21800a, 0x218fff).ram(); /* Written to, but unused? */ + map(0x200000, 0x20ffff).ram().w(FUNC(gaelco2_state::vram_w)).share("spriteram"); // Video RAM + map(0x202890, 0x2028ff).rw("gaelco", FUNC(gaelco_gae1_device::gaelcosnd_r), FUNC(gaelco_gae1_device::gaelcosnd_w)); // Sound Registers + map(0x214000, 0x214fff).ram().w(FUNC(gaelco2_state::palette_w)).share(m_paletteram); // Palette + map(0x215000, 0x217fff).ram(); // Written to, but unused? + map(0x218000, 0x218003).ram(); // Written to, but unused? + map(0x218004, 0x218009).ram().w(FUNC(gaelco2_state::vregs_w)).share(m_vregs); // Video Registers + map(0x21800a, 0x218fff).ram(); // Written to, but unused? // map(0x843100, 0x84315e) ? - map(0xfe0000, 0xfe7fff).ram(); /* Work RAM */ - map(0xfe8000, 0xfeffff).ram().share("shareram"); /* Work RAM */ + map(0xfe0000, 0xfe7fff).ram(); // Work RAM + map(0xfe8000, 0xfeffff).ram().share(m_shareram); // Work RAM } u16 gaelco2_state::srollnd_share_sim_r(offs_t offset, u16 mem_mask) { - uint16_t ret = m_shareram[offset]; + u16 ret = m_shareram[offset]; if (m_maincpu->pc() == 0x0083d0) ret = 0x0000; @@ -758,7 +758,7 @@ void gaelco2_state::srollnd_map(address_map& map) { play2000_map(map); - map(0xfe8000, 0xfeffff).ram().rw(FUNC(gaelco2_state::srollnd_share_sim_r), FUNC(gaelco2_state::srollnd_share_sim_w)).share("shareram"); + map(0xfe8000, 0xfeffff).ram().rw(FUNC(gaelco2_state::srollnd_share_sim_r), FUNC(gaelco2_state::srollnd_share_sim_w)).share(m_shareram); } @@ -793,11 +793,11 @@ void gaelco2_state::init_play2000() } ROM_START( play2000 ) - ROM_REGION( 0x100000, "maincpu", 0 ) /* 68000 code */ + ROM_REGION( 0x100000, "maincpu", 0 ) // 68000 code ROM_LOAD16_BYTE( "tms27c010a.2", 0x000000, 0x020000, CRC(598102f9) SHA1(66fb6d321c886099b99d048d1f9f13cf016b9c43) ) ROM_LOAD16_BYTE( "tms27c010a.1", 0x000001, 0x020000, CRC(e2b5d79a) SHA1(f004352ddb9bc92aab126627689b45b2ef8583b1) ) - ROM_REGION( 0x8000, "gaelco_ds5002fp:sram", 0 ) /* DS5002FP code - had 7.0 sticker on too */ + ROM_REGION( 0x8000, "gaelco_ds5002fp:sram", 0 ) // DS5002FP code - had 7.0 sticker on too // This has only been dumped from a single MCU, so there is potential for bad bits as there is risk in the dumping process. The majority of the ROM is data and thus difficult to verify. ROM_LOAD( "ds5002fp_70i.mcu", 0x00000, 0x8000, BAD_DUMP CRC(b51ad3da) SHA1(4a730238b4b875c74dd2e4df6e7880d03659b7d5) ) @@ -806,24 +806,24 @@ ROM_START( play2000 ) DS5002FP_SET_RPCTL( 0x00 ) DS5002FP_SET_CRCR( 0x80 ) - ROM_REGION( 0x0a00000, "gfx1", 0 ) /* GFX + Sound */ - ROM_LOAD( "6.u51", 0x0000000, 0x0100000, CRC(6dafc11c) SHA1(2aa3d6318418578433b3060bda6e27adf794dea4) ) /* GFX + Sound*/ - ROM_LOAD( "4.u53", 0x0200000, 0x0080000, CRC(94dc37a7) SHA1(28f9832b61541b292682a6e2d2264abccd138a2e) ) /* GFX only */ - ROM_LOAD( "7.u50", 0x0400000, 0x0080000, CRC(e80c6d39) SHA1(b3ae5d66c48c2ba6665a181e311b0c834384258a) ) /* GFX only */ - ROM_LOAD( "5.u52", 0x0600000, 0x0080000, CRC(19b939f4) SHA1(7281709aa3ab1decb84bf7ab10492fb6ec197c80) ) /* GFX only */ - ROM_LOAD( "3.u54", 0x0800000, 0x0080000, CRC(085008ed) SHA1(06eb4f972d79eab13b1b3b6829ef280e079abdb6) ) /* GFX only */ + ROM_REGION( 0x0a00000, "gfx", 0 ) // GFX + Sound + ROM_LOAD( "6.u51", 0x0000000, 0x0100000, CRC(6dafc11c) SHA1(2aa3d6318418578433b3060bda6e27adf794dea4) ) // GFX + Sound*/ + ROM_LOAD( "4.u53", 0x0200000, 0x0080000, CRC(94dc37a7) SHA1(28f9832b61541b292682a6e2d2264abccd138a2e) ) // GFX only + ROM_LOAD( "7.u50", 0x0400000, 0x0080000, CRC(e80c6d39) SHA1(b3ae5d66c48c2ba6665a181e311b0c834384258a) ) // GFX only + ROM_LOAD( "5.u52", 0x0600000, 0x0080000, CRC(19b939f4) SHA1(7281709aa3ab1decb84bf7ab10492fb6ec197c80) ) // GFX only + ROM_LOAD( "3.u54", 0x0800000, 0x0080000, CRC(085008ed) SHA1(06eb4f972d79eab13b1b3b6829ef280e079abdb6) ) // GFX only ROM_REGION( 0x0600, "plds", 0 ) ROM_LOAD( "palce16v8h.u29", 0x0000, 0x0117, BAD_DUMP CRC(4a0a6f39) SHA1(57351e471649391c9abf110828fe2f128fe84eee) ) ROM_END -ROM_START( play2000_40i ) /* there are version 4.0 and version 1.0 strings in this, go with the higher one */ - ROM_REGION( 0x100000, "maincpu", 0 ) /* 68000 code */ +ROM_START( play2000_40i ) // there are version 4.0 and version 1.0 strings in this, go with the higher one + ROM_REGION( 0x100000, "maincpu", 0 ) // 68000 code ROM_LOAD16_BYTE( "2.u39_v4", 0x000000, 0x020000, CRC(fff16141) SHA1(8493c3e58a231c03b152b336f43422a9a2d2618c) ) ROM_LOAD16_BYTE( "1.u40_v4", 0x000001, 0x020000, CRC(39f9d58e) SHA1(1cbdae2adc570f2a2e10a707075312ef717e2643) ) - ROM_REGION( 0x8000, "gaelco_ds5002fp:sram", 0 ) /* DS5002FP code */ + ROM_REGION( 0x8000, "gaelco_ds5002fp:sram", 0 ) // DS5002FP code // this is the same dump as from the play7000 MCU but with valid default data for this set ROM_LOAD( "ds5002fp_40i.mcu", 0x00000, 0x8000, BAD_DUMP CRC(7c45cdf2) SHA1(64aee4d77e0715342634e6eadb83dae4a2db9dfd) ) @@ -832,12 +832,12 @@ ROM_START( play2000_40i ) /* there are version 4.0 and version 1.0 strings in th DS5002FP_SET_RPCTL( 0x00 ) DS5002FP_SET_CRCR( 0x80 ) - ROM_REGION( 0x0a00000, "gfx1", 0 ) /* GFX + Sound */ - ROM_LOAD( "6.u51", 0x0000000, 0x0100000, CRC(6dafc11c) SHA1(2aa3d6318418578433b3060bda6e27adf794dea4) ) /* GFX + Sound*/ - ROM_LOAD( "4.u53", 0x0200000, 0x0080000, CRC(94dc37a7) SHA1(28f9832b61541b292682a6e2d2264abccd138a2e) ) /* GFX only */ - ROM_LOAD( "7.u50", 0x0400000, 0x0080000, CRC(e80c6d39) SHA1(b3ae5d66c48c2ba6665a181e311b0c834384258a) ) /* GFX only */ - ROM_LOAD( "5.u52", 0x0600000, 0x0080000, CRC(19b939f4) SHA1(7281709aa3ab1decb84bf7ab10492fb6ec197c80) ) /* GFX only */ - ROM_LOAD( "3.u54", 0x0800000, 0x0080000, CRC(085008ed) SHA1(06eb4f972d79eab13b1b3b6829ef280e079abdb6) ) /* GFX only */ + ROM_REGION( 0x0a00000, "gfx", 0 ) // GFX + Sound + ROM_LOAD( "6.u51", 0x0000000, 0x0100000, CRC(6dafc11c) SHA1(2aa3d6318418578433b3060bda6e27adf794dea4) ) // GFX + Sound*/ + ROM_LOAD( "4.u53", 0x0200000, 0x0080000, CRC(94dc37a7) SHA1(28f9832b61541b292682a6e2d2264abccd138a2e) ) // GFX only + ROM_LOAD( "7.u50", 0x0400000, 0x0080000, CRC(e80c6d39) SHA1(b3ae5d66c48c2ba6665a181e311b0c834384258a) ) // GFX only + ROM_LOAD( "5.u52", 0x0600000, 0x0080000, CRC(19b939f4) SHA1(7281709aa3ab1decb84bf7ab10492fb6ec197c80) ) // GFX only + ROM_LOAD( "3.u54", 0x0800000, 0x0080000, CRC(085008ed) SHA1(06eb4f972d79eab13b1b3b6829ef280e079abdb6) ) // GFX only ROM_REGION( 0x0600, "plds", 0 ) ROM_LOAD( "palce16v8h.u29", 0x0000, 0x0117, BAD_DUMP CRC(4a0a6f39) SHA1(57351e471649391c9abf110828fe2f128fe84eee) ) @@ -880,11 +880,11 @@ REF: 990315 */ ROM_START( play2000_50i ) /*at least 1.u40 is bad, on every 0x40 bytes the first four are always 0xff.*/ - ROM_REGION( 0x100000, "maincpu", 0 ) /* 68000 code */ + ROM_REGION( 0x100000, "maincpu", 0 ) // 68000 code ROM_LOAD16_BYTE( "2.u39", 0x000000, 0x020000, BAD_DUMP CRC(9939299e) SHA1(55303a2adf199f4b5a60f57be7480b0e119f8624) ) ROM_LOAD16_BYTE( "1.u40", 0x000001, 0x020000, BAD_DUMP CRC(311c2f94) SHA1(963d6b5f479598145146fcb8b7c6ce77fbc92b07) ) - ROM_REGION( 0x8000, "gaelco_ds5002fp:sram", 0 ) /* DS5002FP code */ + ROM_REGION( 0x8000, "gaelco_ds5002fp:sram", 0 ) // DS5002FP code // can't create an initialized default for this one as the main program is bad ROM_LOAD( "ds5002fp_50i.mcu", 0x00000, 0x8000, NO_DUMP ) @@ -893,12 +893,12 @@ ROM_START( play2000_50i ) DS5002FP_SET_RPCTL( 0x00 ) DS5002FP_SET_CRCR( 0x80 ) - ROM_REGION( 0x0a00000, "gfx1", 0 ) /* GFX + Sound */ - ROM_LOAD( "6.u51", 0x0000000, 0x0100000, CRC(6dafc11c) SHA1(2aa3d6318418578433b3060bda6e27adf794dea4) ) /* GFX + Sound*/ - ROM_LOAD( "4.u53", 0x0200000, 0x0080000, CRC(94dc37a7) SHA1(28f9832b61541b292682a6e2d2264abccd138a2e) ) /* GFX only */ - ROM_LOAD( "7.u50", 0x0400000, 0x0080000, CRC(e80c6d39) SHA1(b3ae5d66c48c2ba6665a181e311b0c834384258a) ) /* GFX only */ - ROM_LOAD( "5.u52", 0x0600000, 0x0080000, CRC(19b939f4) SHA1(7281709aa3ab1decb84bf7ab10492fb6ec197c80) ) /* GFX only */ - ROM_LOAD( "3.u54", 0x0800000, 0x0080000, CRC(085008ed) SHA1(06eb4f972d79eab13b1b3b6829ef280e079abdb6) ) /* GFX only */ + ROM_REGION( 0x0a00000, "gfx", 0 ) // GFX + Sound + ROM_LOAD( "6.u51", 0x0000000, 0x0100000, CRC(6dafc11c) SHA1(2aa3d6318418578433b3060bda6e27adf794dea4) ) // GFX + Sound*/ + ROM_LOAD( "4.u53", 0x0200000, 0x0080000, CRC(94dc37a7) SHA1(28f9832b61541b292682a6e2d2264abccd138a2e) ) // GFX only + ROM_LOAD( "7.u50", 0x0400000, 0x0080000, CRC(e80c6d39) SHA1(b3ae5d66c48c2ba6665a181e311b0c834384258a) ) // GFX only + ROM_LOAD( "5.u52", 0x0600000, 0x0080000, CRC(19b939f4) SHA1(7281709aa3ab1decb84bf7ab10492fb6ec197c80) ) // GFX only + ROM_LOAD( "3.u54", 0x0800000, 0x0080000, CRC(085008ed) SHA1(06eb4f972d79eab13b1b3b6829ef280e079abdb6) ) // GFX only ROM_REGION( 0x0600, "plds", 0 ) ROM_LOAD( "palce16v8h.u29", 0x0000, 0x0117, BAD_DUMP CRC(4a0a6f39) SHA1(57351e471649391c9abf110828fe2f128fe84eee) ) @@ -913,7 +913,7 @@ ROM_END |___ |XTAL| |___________||___________| _________________ | | 34.000MHz | U48-6-27C010A || ___| _________ _____________ |________________|| - |___ |74F32PC_| | GC-1V | _________________ | + |___ |74F32PC_| | CG-1V | _________________ | |___ ___________ _____________ | 218 | | U49-5-27C4001 || |___ MC74HCT273N |AS7C164-20PC| | | |________________|| ___| ___________ _____________ | | _________________ | @@ -941,11 +941,11 @@ ROM_END |__________________________________________________________________________________________| */ ROM_START( srollnd ) - ROM_REGION( 0x100000, "maincpu", 0 ) /* 68000 code */ + ROM_REGION( 0x100000, "maincpu", 0 ) // 68000 code ROM_LOAD16_BYTE( "nd2.u44", 0x000001, 0x010000, CRC(ee3ec213) SHA1(80a08839327bf8215abfad1fececac64da6fbcb2) ) ROM_LOAD16_BYTE( "nd1.u45", 0x000000, 0x010000, CRC(4bf20c7b) SHA1(b483f74fed25139e92359b178f6548b867c999e4) ) - ROM_REGION( 0x8000, "gaelco_ds5002fp:sram", 0 ) /* DS5002FP code */ + ROM_REGION( 0x8000, "gaelco_ds5002fp:sram", 0 ) // DS5002FP code ROM_LOAD( "srollnd.ds5002fp", 0x00000, 0x8000, NO_DUMP ) ROM_REGION( 0x100, "gaelco_ds5002fp:mcu:internal", ROMREGION_ERASE00 ) @@ -953,7 +953,7 @@ ROM_START( srollnd ) DS5002FP_SET_RPCTL( 0x00 ) DS5002FP_SET_CRCR( 0x80 ) - ROM_REGION( 0x0a00000, "gfx1", ROMREGION_ERASE00 ) /* GFX + Sound */ + ROM_REGION( 0x0a00000, "gfx", ROMREGION_ERASE00 ) // GFX + Sound ROM_LOAD( "nd5.u49", 0x0000000, 0x080000, CRC(5ec78408) SHA1(1a5b3a0bdbd36bf6607e47dedf31f4b9a7b89667) ) ROM_LOAD( "nd3.u51", 0x0200000, 0x020000, CRC(e19ac5b8) SHA1(980a3b339f6958e5e04ea624f26dabd2e06f0c68) ) ROM_LOAD( "nd6.u48", 0x0400000, 0x020000, CRC(81cd4097) SHA1(94c7f0d3c21070039dbef9fc43d0f5f2619dad5a) ) @@ -977,7 +977,7 @@ ROM_START( chmppool ) DS5002FP_SET_RPCTL( 0x00 ) DS5002FP_SET_CRCR( 0x80 ) - ROM_REGION( 0x0a00000, "gfx1", ROMREGION_ERASE00 ) // GFX + Sound + ROM_REGION( 0x0a00000, "gfx", ROMREGION_ERASE00 ) // GFX + Sound ROM_LOAD( "nd5.u49", 0x0000000, 0x080000, CRC(a71c1ee7) SHA1(f7d90537a007291bf1739b57a6dd06e05e243cf8) ) ROM_LOAD( "nd3.u51", 0x0200000, 0x020000, CRC(926ca7d5) SHA1(9129f4738a46b829f73b50f53641e60acb1ce2ba) ) ROM_LOAD( "nd6.u48", 0x0400000, 0x020000, CRC(a5c25b87) SHA1(593418f15d593206f8fe3dde35571496aae71500) ) @@ -999,7 +999,7 @@ ROM_START( jungleani ) ROM_REGION( 0x100, "gaelco_ds5002fp:mcu:internal", ROMREGION_ERASE00 ) - ROM_REGION( 0x0a00000, "gfx1", ROMREGION_ERASE00 ) // GFX + Sound + ROM_REGION( 0x0a00000, "gfx", ROMREGION_ERASE00 ) // GFX + Sound ROM_LOAD( "5.u49", 0x0000000, 0x040000, CRC(50ed5f50) SHA1(4dbfb6fb6a1737bd625f929a8da23e16e11269a7) ) ROM_LOAD( "3.u51", 0x0200000, 0x020000, CRC(d19613d8) SHA1(e07614cc5c81ea3da45b2807aa0954d785e53ed3) ) ROM_LOAD( "6.u48", 0x0400000, 0x020000, CRC(0c10fca9) SHA1(c730491862362d954c9c82e0ddcf8937ccfff10a) ) @@ -1012,20 +1012,20 @@ ROM_END void gaelco2_state::play2000(machine_config &config) { - /* basic machine hardware */ - M68000(config, m_maincpu, XTAL(11'059'200)); /* or from the 34MHz? (34MHz drives the CG-1V-149 PLD?) */ + // basic machine hardware + M68000(config, m_maincpu, XTAL(11'059'200)); // or from the 34MHz? (34MHz drives the CG-1V-149 PLD?) m_maincpu->set_addrmap(AS_PROGRAM, &gaelco2_state::play2000_map); m_maincpu->set_vblank_int("screen", FUNC(gaelco2_state::irq6_line_hold)); - GAELCO_DS5002FP(config, "gaelco_ds5002fp", XTAL(32'000'000) / 2).set_addrmap(0, &gaelco2_state::mcu_hostmem_map); /* 16 MHz */ + GAELCO_DS5002FP(config, "gaelco_ds5002fp", XTAL(32'000'000) / 2).set_addrmap(0, &gaelco2_state::mcu_hostmem_map); // 16 MHz config.set_perfect_quantum("gaelco_ds5002fp:mcu"); - /* video hardware */ + // video hardware BUFFERED_SPRITERAM16(config, m_spriteram); screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); screen.set_refresh_hz(59.1); - screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500)); /* not accurate */ + screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500)); // not accurate screen.set_size(64*16, 32*16); screen.set_visarea(0, 384-1, 16, 256-1); screen.set_screen_update(FUNC(gaelco2_state::screen_update)); @@ -1037,12 +1037,12 @@ void gaelco2_state::play2000(machine_config &config) MCFG_VIDEO_START_OVERRIDE(gaelco2_state,gaelco2) - /* sound hardware */ + // sound hardware SPEAKER(config, "lspeaker").front_left(); SPEAKER(config, "rspeaker").front_right(); gaelco_gae1_device &gaelco(GAELCO_GAE1(config, "gaelco", XTAL(34'000'000) / 34)); - gaelco.set_device_rom_tag("gfx1"); + gaelco.set_device_rom_tag("gfx"); gaelco.set_bank_offsets(0 * 0x080000, 0 * 0x080000, 0 * 0x080000, 0 * 0x080000); gaelco.add_route(0, "lspeaker", 1.0); gaelco.add_route(1, "rspeaker", 1.0); @@ -1050,21 +1050,21 @@ void gaelco2_state::play2000(machine_config &config) void gaelco2_state::srollnd(machine_config& config) { - /* basic machine hardware */ + // basic machine hardware M68000(config, m_maincpu, XTAL(20'000'000 / 2)); m_maincpu->set_addrmap(AS_PROGRAM, &gaelco2_state::srollnd_map); m_maincpu->set_vblank_int("screen", FUNC(gaelco2_state::irq6_line_hold)); // not dumped - //GAELCO_DS5002FP(config, "gaelco_ds5002fp", XTAL(32'000'000) / 2).set_addrmap(0, &gaelco2_state::mcu_hostmem_map); /* ? MHz */ + //GAELCO_DS5002FP(config, "gaelco_ds5002fp", XTAL(32'000'000) / 2).set_addrmap(0, &gaelco2_state::mcu_hostmem_map); // ? MHz //config.set_perfect_quantum("gaelco_ds5002fp:mcu"); - /* video hardware */ + // video hardware BUFFERED_SPRITERAM16(config, m_spriteram); screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); screen.set_refresh_hz(59.1); - screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500)); /* not accurate */ + screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500)); // not accurate screen.set_size(64*16, 32*16); screen.set_visarea(0, 384-1, 16, 256-1); screen.set_screen_update(FUNC(gaelco2_state::screen_update)); @@ -1076,12 +1076,12 @@ void gaelco2_state::srollnd(machine_config& config) MCFG_VIDEO_START_OVERRIDE(gaelco2_state,gaelco2) - /* sound hardware */ + // sound hardware SPEAKER(config, "lspeaker").front_left(); SPEAKER(config, "rspeaker").front_right(); gaelco_gae1_device &gaelco(GAELCO_GAE1(config, "gaelco", XTAL(34'000'000) / 34)); - gaelco.set_device_rom_tag("gfx1"); + gaelco.set_device_rom_tag("gfx"); gaelco.set_bank_offsets(0 * 0x080000, 0 * 0x080000, 0 * 0x080000, 0 * 0x080000); gaelco.add_route(0, "lspeaker", 1.0); gaelco.add_route(1, "rspeaker", 1.0); @@ -1092,29 +1092,27 @@ void gaelco2_state::srollnd(machine_config& config) BANG ============================================================================*/ -u16 bang_state::p1_gun_x(){return (m_light0_x->read() * 320 / 0x100) + 1;} -u16 bang_state::p1_gun_y(){return (m_light0_y->read() * 240 / 0x100) - 4;} -u16 bang_state::p2_gun_x(){return (m_light1_x->read() * 320 / 0x100) + 1;} -u16 bang_state::p2_gun_y(){return (m_light1_y->read() * 240 / 0x100) - 4;} +template u16 bang_state::gun_x(){ return (m_light_x[Which]->read() * 320 / 0x100) + 1; } +template u16 bang_state::gun_y(){ return (m_light_y[Which]->read() * 240 / 0x100) - 4; } void bang_state::bang_map(address_map &map) { - map(0x000000, 0x0fffff).rom(); /* ROM */ - map(0x200000, 0x20ffff).ram().w(FUNC(bang_state::vram_w)).share("spriteram"); /* Video RAM */ - map(0x202890, 0x2028ff).rw("gaelco", FUNC(gaelco_cg1v_device::gaelcosnd_r), FUNC(gaelco_cg1v_device::gaelcosnd_w)); /* Sound Registers */ - map(0x210000, 0x211fff).ram().w(FUNC(bang_state::palette_w)).share("paletteram"); /* Palette */ - map(0x218004, 0x218007).ram().w(FUNC(bang_state::vregs_w)).share("vregs"); /* Video Registers */ - map(0x218008, 0x218009).noprw(); /* CLR INT Video */ + map(0x000000, 0x0fffff).rom(); // ROM + map(0x200000, 0x20ffff).ram().w(FUNC(bang_state::vram_w)).share("spriteram"); // Video RAM + map(0x202890, 0x2028ff).rw("gaelco", FUNC(gaelco_cg1v_device::gaelcosnd_r), FUNC(gaelco_cg1v_device::gaelcosnd_w)); // Sound Registers + map(0x210000, 0x211fff).ram().w(FUNC(bang_state::palette_w)).share(m_paletteram); // Palette + map(0x218004, 0x218007).ram().w(FUNC(bang_state::vregs_w)).share(m_vregs); // Video Registers + map(0x218008, 0x218009).noprw(); // CLR INT Video map(0x300000, 0x300001).portr("P1"); - map(0x300002, 0x300003).nopr(); /* Random number generator? */ - map(0x300000, 0x30000f).w(m_mainlatch, FUNC(ls259_device::write_d0)).umask16(0x00ff); /* Coin Counters & serial EEPROM */ + map(0x300002, 0x300003).nopr(); // Random number generator? + map(0x300000, 0x30000f).w(m_mainlatch, FUNC(ls259_device::write_d0)).umask16(0x00ff); // Coin Counters & serial EEPROM map(0x300010, 0x300011).portr("P2"); map(0x300020, 0x300021).portr("COIN"); - map(0x310000, 0x310001).r(FUNC(bang_state::p1_gun_x)).w(FUNC(bang_state::bang_clr_gun_int_w)); /* Gun 1P X */ /* CLR INT Gun */ - map(0x310002, 0x310003).r(FUNC(bang_state::p2_gun_x)); /* Gun 2P X */ - map(0x310004, 0x310005).r(FUNC(bang_state::p1_gun_y)); /* Gun 1P Y */ - map(0x310006, 0x310007).r(FUNC(bang_state::p2_gun_y)); /* Gun 2P Y */ - map(0xfe0000, 0xfeffff).ram(); /* Work RAM */ + map(0x310000, 0x310001).r(FUNC(bang_state::gun_x<0>)).w(FUNC(bang_state::bang_clr_gun_int_w)); // Gun 1P X // CLR INT Gun + map(0x310002, 0x310003).r(FUNC(bang_state::gun_x<1>)); // Gun 2P X + map(0x310004, 0x310005).r(FUNC(bang_state::gun_y<0>)); // Gun 1P Y + map(0x310006, 0x310007).r(FUNC(bang_state::gun_y<1>)); // Gun 2P Y + map(0xfe0000, 0xfeffff).ram(); // Work RAM } @@ -1128,12 +1126,12 @@ static INPUT_PORTS_START( bang ) PORT_START("COIN") PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 ) - PORT_SERVICE_NO_TOGGLE( 0x0004, IP_ACTIVE_LOW ) /* go to service mode NOW */ + PORT_SERVICE_NO_TOGGLE( 0x0004, IP_ACTIVE_LOW ) // go to service mode NOW PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_START1 ) PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_START2 ) - PORT_BIT( 0x0040, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("eeprom", eeprom_serial_93cxx_device, do_read) /* bit 6 is EEPROM data (DOUT) */ - PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_CUSTOM ) /* bit 7 is EEPROM ready */ + PORT_BIT( 0x0040, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("eeprom", eeprom_serial_93cxx_device, do_read) // bit 6 is EEPROM data (DOUT) + PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_CUSTOM ) // bit 7 is EEPROM ready PORT_START("LIGHT0_X") PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_X ) PORT_CROSSHAIR(X, 1.0, 0.0, 0) PORT_SENSITIVITY(35) PORT_KEYDELTA(15) PORT_PLAYER(1) @@ -1160,33 +1158,33 @@ void bang_state::bang(machine_config &config) LS259(config, m_mainlatch); m_mainlatch->q_out_cb<0>().set(FUNC(gaelco2_state::coin1_counter_w)); m_mainlatch->q_out_cb<1>().set(FUNC(gaelco2_state::coin2_counter_w)); - m_mainlatch->q_out_cb<4>().set("eeprom", FUNC(eeprom_serial_93cxx_device::di_write)); /* EEPROM data */ - m_mainlatch->q_out_cb<5>().set("eeprom", FUNC(eeprom_serial_93cxx_device::clk_write)); /* EEPROM serial clock */ - m_mainlatch->q_out_cb<6>().set("eeprom", FUNC(eeprom_serial_93cxx_device::cs_write)); /* EEPROM chip select */ + m_mainlatch->q_out_cb<4>().set("eeprom", FUNC(eeprom_serial_93cxx_device::di_write)); // EEPROM data + m_mainlatch->q_out_cb<5>().set("eeprom", FUNC(eeprom_serial_93cxx_device::clk_write)); // EEPROM serial clock + m_mainlatch->q_out_cb<6>().set("eeprom", FUNC(eeprom_serial_93cxx_device::cs_write)); // EEPROM chip select // Video hardware BUFFERED_SPRITERAM16(config, m_spriteram); screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); screen.set_refresh_hz(59.1); - screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500)); /* not accurate */ + screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500)); // not accurate screen.set_size(64*16, 32*16); screen.set_visarea(0, 320-1, 16, 256-1); - screen.set_screen_update(FUNC(gaelco2_state::screen_update)); + screen.set_screen_update(FUNC(bang_state::screen_update)); screen.screen_vblank().set("spriteram", FUNC(buffered_spriteram16_device::vblank_copy_rising)); screen.set_palette(m_palette); GFXDECODE(config, m_gfxdecode, m_palette, gfx_gaelco2); PALETTE(config, m_palette).set_entries(0x10000); - MCFG_VIDEO_START_OVERRIDE(gaelco2_state,gaelco2) + MCFG_VIDEO_START_OVERRIDE(bang_state,gaelco2) - /* sound hardware */ + // sound hardware SPEAKER(config, "lspeaker").front_left(); SPEAKER(config, "rspeaker").front_right(); gaelco_cg1v_device &gaelco(GAELCO_CG1V(config, "gaelco", XTAL(30'000'000) / 30)); - gaelco.set_device_rom_tag("gfx1"); + gaelco.set_device_rom_tag("gfx"); gaelco.set_bank_offsets(0 * 0x0200000, 1 * 0x0200000, 2 * 0x0200000, 3 * 0x0200000); gaelco.add_route(0, "lspeaker", 1.0); gaelco.add_route(1, "rspeaker", 1.0); @@ -1247,7 +1245,7 @@ ROM_START( bang ) ROM_LOAD16_BYTE( "bang53.ic53", 0x000000, 0x080000, CRC(014bb939) SHA1(bb245acf7a3bd4a56b3559518bcb8d0ae39dbaf4) ) ROM_LOAD16_BYTE( "bang55.ic55", 0x000001, 0x080000, CRC(582f8b1e) SHA1(c9b0d4c1dee71cdb2c01d49f20ffde32eddc9583) ) - ROM_REGION( 0x0a00000, "gfx1", 0 ) // GFX + Sound + ROM_REGION( 0x0a00000, "gfx", 0 ) // GFX + Sound ROM_LOAD( "bang16.ic16", 0x0000000, 0x0080000, CRC(6ee4b878) SHA1(f646380d95650a60b5a17973bdfd3b80450a4d3b) ) // GFX only ROM_LOAD( "bang17.ic17", 0x0080000, 0x0080000, CRC(0c35aa6f) SHA1(df0474b1b9466d3c199e5aade39b7233f0cb45ee) ) // GFX only ROM_LOAD( "bang18.ic18", 0x0100000, 0x0080000, CRC(2056b1ad) SHA1(b796f92eef4bbb0efa12c53580e429b8a0aa394c) ) // Sound only @@ -1277,7 +1275,7 @@ ROM_START( bangj ) ROM_LOAD16_BYTE( "bang-a.ic53", 0x000000, 0x080000, CRC(5ee514e9) SHA1(b78b507d18de41be58049f5c597acd107ec1273f) ) ROM_LOAD16_BYTE( "bang-a.ic55", 0x000001, 0x080000, CRC(b90223ab) SHA1(7c097754a710169f41c574c3cc1a6346824853c4) ) - ROM_REGION( 0x0a00000, "gfx1", 0 ) // GFX + Sound + ROM_REGION( 0x0a00000, "gfx", 0 ) // GFX + Sound ROM_LOAD( "bang-a.ic16", 0x0000000, 0x0080000, CRC(3b63acfc) SHA1(48f5598cdbc70f342d6b75909166571271920a8f) ) // GFX only ROM_LOAD( "bang-a.ic17", 0x0080000, 0x0080000, CRC(72865b80) SHA1(ec7753ea7961015149b9e6386fdeb9bd59aa962a) ) // GFX only ROM_LOAD( "bang18.ic18", 0x0100000, 0x0080000, CRC(2056b1ad) SHA1(b796f92eef4bbb0efa12c53580e429b8a0aa394c) ) // Sound only @@ -1310,18 +1308,18 @@ ROM_END void gaelco2_state::alighunt_map(address_map &map) { - map(0x000000, 0x0fffff).rom(); /* ROM */ - map(0x200000, 0x20ffff).ram().w(FUNC(gaelco2_state::vram_w)).share("spriteram"); /* Video RAM */ - map(0x202890, 0x2028ff).rw("gaelco", FUNC(gaelco_gae1_device::gaelcosnd_r), FUNC(gaelco_gae1_device::gaelcosnd_w)); /* Sound Registers */ - map(0x210000, 0x211fff).ram().w(FUNC(gaelco2_state::palette_w)).share("paletteram"); /* Palette */ - map(0x218004, 0x218009).ram().w(FUNC(gaelco2_state::vregs_w)).share("vregs"); /* Video Registers */ - map(0x300000, 0x300001).portr("IN0"); /* DSW #1 + Input 1P */ - map(0x300002, 0x300003).portr("IN1"); /* DSW #2 + Input 2P */ - map(0x320000, 0x320001).portr("COIN"); /* COINSW + SERVICESW */ - map(0x500000, 0x500001).w(FUNC(gaelco2_state::alighunt_coin_w)); /* Coin lockout + counters */ - map(0x500006, 0x500007).nopw(); /* ??? */ - map(0xfe0000, 0xfe7fff).ram(); /* Work RAM */ - map(0xfe8000, 0xfeffff).ram().share("shareram"); /* Work RAM (shared with D5002FP) */ + map(0x000000, 0x0fffff).rom(); // ROM + map(0x200000, 0x20ffff).ram().w(FUNC(gaelco2_state::vram_w)).share("spriteram"); // Video RAM + map(0x202890, 0x2028ff).rw("gaelco", FUNC(gaelco_gae1_device::gaelcosnd_r), FUNC(gaelco_gae1_device::gaelcosnd_w)); // Sound Registers + map(0x210000, 0x211fff).ram().w(FUNC(gaelco2_state::palette_w)).share(m_paletteram); // Palette + map(0x218004, 0x218009).ram().w(FUNC(gaelco2_state::vregs_w)).share(m_vregs); // Video Registers + map(0x300000, 0x300001).portr("IN0"); // DSW #1 + Input 1P + map(0x300002, 0x300003).portr("IN1"); // DSW #2 + Input 2P + map(0x320000, 0x320001).portr("COIN"); // COINSW + SERVICESW + map(0x500000, 0x500001).w(FUNC(gaelco2_state::alighunt_coin_w)); // Coin lockout + counters + map(0x500006, 0x500007).nopw(); // ??? + map(0xfe0000, 0xfe7fff).ram(); // Work RAM + map(0xfe8000, 0xfeffff).ram().share(m_shareram); // Work RAM (shared with D5002FP) } @@ -1388,7 +1386,7 @@ static INPUT_PORTS_START( alighunt ) PORT_DIPSETTING( 0x0000, DEF_STR( Off ) ) PORT_DIPSETTING( 0x2000, DEF_STR( On ) ) PORT_DIPNAME( 0x4000, 0x4000, DEF_STR( Joystick ) ) PORT_DIPLOCATION("SW2:7") - PORT_DIPSETTING( 0x0000, "Analog" ) /* TO-DO */ + PORT_DIPSETTING( 0x0000, "Analog" ) // TO-DO PORT_DIPSETTING( 0x4000, DEF_STR( Standard ) ) PORT_SERVICE_DIPLOC( 0x8000, IP_ACTIVE_LOW, "SW2:8" ) @@ -1397,24 +1395,24 @@ static INPUT_PORTS_START( alighunt ) PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_SERVICE2 ) /* go to test mode NOW */ + PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_SERVICE2 ) // go to test mode NOW PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_BIT( 0xffc0, IP_ACTIVE_LOW, IPT_UNKNOWN ) INPUT_PORTS_END void gaelco2_state::alighunt(machine_config &config) { - /* basic machine hardware */ - M68000(config, m_maincpu, XTAL(24'000'000) / 2); /* 12 MHz */ + // basic machine hardware + M68000(config, m_maincpu, XTAL(24'000'000) / 2); // 12 MHz m_maincpu->set_addrmap(AS_PROGRAM, &gaelco2_state::alighunt_map); m_maincpu->set_vblank_int("screen", FUNC(gaelco2_state::irq6_line_hold)); - /* video hardware */ + // video hardware BUFFERED_SPRITERAM16(config, m_spriteram); screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); screen.set_refresh_hz(59.1); - screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500)); /* not accurate */ + screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500)); // not accurate screen.set_size(64*16, 32*16); screen.set_visarea(0, 320-1, 16, 256-1); screen.set_screen_update(FUNC(gaelco2_state::screen_update)); @@ -1426,12 +1424,12 @@ void gaelco2_state::alighunt(machine_config &config) MCFG_VIDEO_START_OVERRIDE(gaelco2_state,gaelco2) - /* sound hardware */ + // sound hardware SPEAKER(config, "lspeaker").front_left(); SPEAKER(config, "rspeaker").front_right(); gaelco_gae1_device &gaelco(GAELCO_GAE1(config, "gaelco", XTAL(30'000'000) / 30)); - gaelco.set_device_rom_tag("gfx1"); + gaelco.set_device_rom_tag("gfx"); gaelco.set_bank_offsets(0 * 0x0400000, 1 * 0x0400000, 2 * 0x0400000, 3 * 0x0400000); gaelco.add_route(0, "lspeaker", 1.0); gaelco.add_route(1, "rspeaker", 1.0); @@ -1440,7 +1438,7 @@ void gaelco2_state::alighunt(machine_config &config) void gaelco2_state::alighunt_d5002fp(machine_config &config) { alighunt(config); - GAELCO_DS5002FP(config, "gaelco_ds5002fp", XTAL(24'000'000) / 2).set_addrmap(0, &gaelco2_state::mcu_hostmem_map); /* 12 MHz */ + GAELCO_DS5002FP(config, "gaelco_ds5002fp", XTAL(24'000'000) / 2).set_addrmap(0, &gaelco2_state::mcu_hostmem_map); // 12 MHz config.set_perfect_quantum("gaelco_ds5002fp:mcu"); } @@ -1493,47 +1491,47 @@ REF: 940411 */ ROM_START( aligator ) - ROM_REGION( 0x100000, "maincpu", 0 ) /* 68000 code */ + ROM_REGION( 0x100000, "maincpu", 0 ) // 68000 code ROM_LOAD16_BYTE( "1.u45", 0x000000, 0x080000, CRC(61c47c56) SHA1(6dd3fc6fdab252e0fb43c0793eef70203c888d7f) ) ROM_LOAD16_BYTE( "2.u44", 0x000001, 0x080000, CRC(96bc77c2) SHA1(72975fa188598d8ed595cbba097b60efe14bd190) ) - ROM_REGION( 0x8000, "gaelco_ds5002fp:sram", 0 ) /* DS5002FP code */ + ROM_REGION( 0x8000, "gaelco_ds5002fp:sram", 0 ) // DS5002FP code ROM_LOAD( "aligator_ds5002fp_sram.bin", 0x00000, 0x8000, CRC(6558f215) SHA1(c961a9c81aa6b746294baf83ea5d1fcf7acab9db) ) ROM_REGION( 0x100, "gaelco_ds5002fp:mcu:internal", ROMREGION_ERASE00 ) - /* these are the default states stored in NVRAM */ + // these are the default states stored in NVRAM DS5002FP_SET_MON( 0x19 ) DS5002FP_SET_RPCTL( 0x00 ) DS5002FP_SET_CRCR( 0x80 ) - ROM_REGION( 0x1400000, "gfx1", 0 ) /* GFX + Sound */ - /* 0x0000000-0x0ffffff filled in in the DRIVER_INIT */ - ROM_FILL( 0x1000000, 0x0400000, 0x00 ) /* to decode GFX as 5 bpp */ + ROM_REGION( 0x1400000, "gfx", 0 ) // GFX + Sound + // 0x0000000-0x0ffffff filled in in the DRIVER_INIT + ROM_FILL( 0x1000000, 0x0400000, 0x00 ) // to decode GFX as 5 bpp - ROM_REGION( 0x1000000, "gfx2", 0 ) /* Temporary storage */ - ROM_LOAD( "u48", 0x0000000, 0x0400000, CRC(19e03bf1) SHA1(2b3a4bb438b0aebf4f6a9fd26b071e5c9dd222b8) ) /* GFX only */ - ROM_LOAD( "u47", 0x0400000, 0x0400000, CRC(74a5a29f) SHA1(8ea2aa1f8a80c5b88ca9222c5ecc3c4794e0a160) ) /* GFX + Sound */ - ROM_LOAD( "u50", 0x0800000, 0x0400000, CRC(85daecf9) SHA1(824f6d2491075b1ef96ecd6667c5510409338a2f) ) /* GFX only */ - ROM_LOAD( "u49", 0x0c00000, 0x0400000, CRC(70a4ee0b) SHA1(07b09916f0366d0c6eed94a905ec0b9d6ac9e7e1) ) /* GFX + Sound */ + ROM_REGION( 0x1000000, "gfx_temp", 0 ) // Temporary storage + ROM_LOAD( "u48", 0x0000000, 0x0400000, CRC(19e03bf1) SHA1(2b3a4bb438b0aebf4f6a9fd26b071e5c9dd222b8) ) // GFX only + ROM_LOAD( "u47", 0x0400000, 0x0400000, CRC(74a5a29f) SHA1(8ea2aa1f8a80c5b88ca9222c5ecc3c4794e0a160) ) // GFX + Sound + ROM_LOAD( "u50", 0x0800000, 0x0400000, CRC(85daecf9) SHA1(824f6d2491075b1ef96ecd6667c5510409338a2f) ) // GFX only + ROM_LOAD( "u49", 0x0c00000, 0x0400000, CRC(70a4ee0b) SHA1(07b09916f0366d0c6eed94a905ec0b9d6ac9e7e1) ) // GFX + Sound ROM_END /* PCB without Gaelco logos. Gfx and sound on a subboard with 32 EPROMs connected to the main PCB mask ROMs sockets. Checksum = B975CB0B */ ROM_START( aligatorp ) - ROM_REGION( 0x100000, "maincpu", 0 ) /* 68000 code */ + ROM_REGION( 0x100000, "maincpu", 0 ) // 68000 code ROM_LOAD16_BYTE( "all_27-10_notext.u45", 0x000000, 0x080000, CRC(da2798df) SHA1(528ef26aca57b8cfaa6f82bbf74e6368741d01ea) ) ROM_LOAD16_BYTE( "all_27-10_notext.u44", 0x000001, 0x080000, CRC(b2b6cdeb) SHA1(0ce8982711c16e85da4f7b6756c541d3445a8745) ) - ROM_REGION( 0x8000, "gaelco_ds5002fp:sram", 0 ) /* DS5002FP code */ + ROM_REGION( 0x8000, "gaelco_ds5002fp:sram", 0 ) // DS5002FP code ROM_LOAD( "aligator_ds5002fp_sram_all_27-10_notext.bin", 0x00000, 0x8000, NO_DUMP ) // doesn't work with release version ROM_REGION( 0x100, "gaelco_ds5002fp:mcu:internal", ROMREGION_ERASE00 ) - /* these are the default states stored in NVRAM */ + // these are the default states stored in NVRAM DS5002FP_SET_MON( 0x19 ) DS5002FP_SET_RPCTL( 0x00 ) DS5002FP_SET_CRCR( 0x80 ) - ROM_REGION( 0x1400000, "gfx1", 0 ) /* GFX + Sound */ + ROM_REGION( 0x1400000, "gfx", 0 ) // GFX + Sound // data 100% matches final version, just different arrangement ROM_LOAD( "a0.bin", 0x0000000, 0x0080000, CRC(f6780a0e) SHA1(3dc850744c2129b5b0fe8ab9eb2afda224cff83a) ) ROM_LOAD( "a1.bin", 0x0080000, 0x0080000, CRC(a59c32a9) SHA1(c50b9252b1be10ee1e48eff4f72d381e543a62c5) ) @@ -1567,64 +1565,64 @@ ROM_START( aligatorp ) ROM_LOAD( "d5.bin", 0x0e80000, 0x0080000, CRC(f4151d83) SHA1(08dafbc2b9e8e89a1bb76778afdae711bf07b431) ) ROM_LOAD( "d6.bin", 0x0f00000, 0x0080000, CRC(75660aac) SHA1(6a521e1d2a632c26e53b83d2cc4b0edecfc1e68c) ) // blank ROM (but correct) ROM_LOAD( "d7.bin", 0x0f80000, 0x0080000, CRC(67ae054e) SHA1(96210a4ee472abf58b4af9f35db849268e0a5c87) ) - ROM_FILL( 0x1000000, 0x0400000, 0x00 ) /* to decode GFX as 5 bpp */ + ROM_FILL( 0x1000000, 0x0400000, 0x00 ) // to decode GFX as 5 bpp ROM_END ROM_START( aligators ) - ROM_REGION( 0x100000, "maincpu", 0 ) /* 68000 code */ + ROM_REGION( 0x100000, "maincpu", 0 ) // 68000 code ROM_LOAD16_BYTE( "u45", 0x000000, 0x080000, CRC(61c47c56) SHA1(6dd3fc6fdab252e0fb43c0793eef70203c888d7f) ) - ROM_LOAD16_BYTE( "u44", 0x000001, 0x080000, CRC(f0be007a) SHA1(2112b2e5f020028b50c8f2c72c83c9fee7a78224) ) /* differs by 1 byte from above set, see note */ + ROM_LOAD16_BYTE( "u44", 0x000001, 0x080000, CRC(f0be007a) SHA1(2112b2e5f020028b50c8f2c72c83c9fee7a78224) ) // differs by 1 byte from above set, see note - ROM_REGION( 0x8000, "gaelco_ds5002fp:sram", 0 ) /* DS5002FP code */ + ROM_REGION( 0x8000, "gaelco_ds5002fp:sram", 0 ) // DS5002FP code ROM_LOAD( "aligator_ds5002fp_sram.bin", 0x00000, 0x8000, CRC(6558f215) SHA1(c961a9c81aa6b746294baf83ea5d1fcf7acab9db) ) ROM_REGION( 0x100, "gaelco_ds5002fp:mcu:internal", ROMREGION_ERASE00 ) - /* these are the default states stored in NVRAM */ + // these are the default states stored in NVRAM DS5002FP_SET_MON( 0x19 ) DS5002FP_SET_RPCTL( 0x00 ) DS5002FP_SET_CRCR( 0x80 ) - ROM_REGION( 0x1400000, "gfx1", 0 ) /* GFX + Sound */ - /* 0x0000000-0x0ffffff filled in in the DRIVER_INIT */ - ROM_FILL( 0x1000000, 0x0400000, 0x00 ) /* to decode GFX as 5 bpp */ + ROM_REGION( 0x1400000, "gfx", 0 ) // GFX + Sound + // 0x0000000-0x0ffffff filled in in the DRIVER_INIT + ROM_FILL( 0x1000000, 0x0400000, 0x00 ) // to decode GFX as 5 bpp - ROM_REGION( 0x1000000, "gfx2", 0 ) /* Temporary storage */ - ROM_LOAD( "u48", 0x0000000, 0x0400000, CRC(19e03bf1) SHA1(2b3a4bb438b0aebf4f6a9fd26b071e5c9dd222b8) ) /* GFX only */ - ROM_LOAD( "u47", 0x0400000, 0x0400000, CRC(74a5a29f) SHA1(8ea2aa1f8a80c5b88ca9222c5ecc3c4794e0a160) ) /* GFX + Sound */ - ROM_LOAD( "u50", 0x0800000, 0x0400000, CRC(85daecf9) SHA1(824f6d2491075b1ef96ecd6667c5510409338a2f) ) /* GFX only */ - ROM_LOAD( "u49", 0x0c00000, 0x0400000, CRC(70a4ee0b) SHA1(07b09916f0366d0c6eed94a905ec0b9d6ac9e7e1) ) /* GFX + Sound */ + ROM_REGION( 0x1000000, "gfx_temp", 0 ) // Temporary storage + ROM_LOAD( "u48", 0x0000000, 0x0400000, CRC(19e03bf1) SHA1(2b3a4bb438b0aebf4f6a9fd26b071e5c9dd222b8) ) // GFX only + ROM_LOAD( "u47", 0x0400000, 0x0400000, CRC(74a5a29f) SHA1(8ea2aa1f8a80c5b88ca9222c5ecc3c4794e0a160) ) // GFX + Sound + ROM_LOAD( "u50", 0x0800000, 0x0400000, CRC(85daecf9) SHA1(824f6d2491075b1ef96ecd6667c5510409338a2f) ) // GFX only + ROM_LOAD( "u49", 0x0c00000, 0x0400000, CRC(70a4ee0b) SHA1(07b09916f0366d0c6eed94a905ec0b9d6ac9e7e1) ) // GFX + Sound ROM_END ROM_START( aligatorun ) - ROM_REGION( 0x100000, "maincpu", 0 ) /* 68000 code */ + ROM_REGION( 0x100000, "maincpu", 0 ) // 68000 code ROM_LOAD16_BYTE( "ahntu45n.040", 0x000000, 0x080000, CRC(fc02cb2d) SHA1(700aa60ec0d2bb705b1335de63daae678dcb8570) ) ROM_LOAD16_BYTE( "ahntu44n.040", 0x000001, 0x080000, CRC(7fbea3a3) SHA1(89efa5b7908c2f010a3097954dbccd9cb7adc50c) ) - ROM_REGION( 0x1400000, "gfx1", 0 ) /* GFX + Sound */ - /* 0x0000000-0x0ffffff filled in in the DRIVER_INIT */ - ROM_FILL( 0x1000000, 0x0400000, 0x00 ) /* to decode GFX as 5 bpp */ + ROM_REGION( 0x1400000, "gfx", 0 ) // GFX + Sound + // 0x0000000-0x0ffffff filled in in the DRIVER_INIT + ROM_FILL( 0x1000000, 0x0400000, 0x00 ) // to decode GFX as 5 bpp - ROM_REGION( 0x1000000, "gfx2", 0 ) /* Temporary storage */ - ROM_LOAD( "u48", 0x0000000, 0x0400000, CRC(19e03bf1) SHA1(2b3a4bb438b0aebf4f6a9fd26b071e5c9dd222b8) ) /* GFX only */ - ROM_LOAD( "u47", 0x0400000, 0x0400000, CRC(74a5a29f) SHA1(8ea2aa1f8a80c5b88ca9222c5ecc3c4794e0a160) ) /* GFX + Sound */ - ROM_LOAD( "u50", 0x0800000, 0x0400000, CRC(85daecf9) SHA1(824f6d2491075b1ef96ecd6667c5510409338a2f) ) /* GFX only */ - ROM_LOAD( "u49", 0x0c00000, 0x0400000, CRC(70a4ee0b) SHA1(07b09916f0366d0c6eed94a905ec0b9d6ac9e7e1) ) /* GFX + Sound */ + ROM_REGION( 0x1000000, "gfx_temp", 0 ) // Temporary storage + ROM_LOAD( "u48", 0x0000000, 0x0400000, CRC(19e03bf1) SHA1(2b3a4bb438b0aebf4f6a9fd26b071e5c9dd222b8) ) // GFX only + ROM_LOAD( "u47", 0x0400000, 0x0400000, CRC(74a5a29f) SHA1(8ea2aa1f8a80c5b88ca9222c5ecc3c4794e0a160) ) // GFX + Sound + ROM_LOAD( "u50", 0x0800000, 0x0400000, CRC(85daecf9) SHA1(824f6d2491075b1ef96ecd6667c5510409338a2f) ) // GFX only + ROM_LOAD( "u49", 0x0c00000, 0x0400000, CRC(70a4ee0b) SHA1(07b09916f0366d0c6eed94a905ec0b9d6ac9e7e1) ) // GFX + Sound ROM_END ROM_START( aligatoruna ) - ROM_REGION( 0x100000, "maincpu", 0 ) /* 68000 code */ + ROM_REGION( 0x100000, "maincpu", 0 ) // 68000 code ROM_LOAD16_BYTE( "stm27c4001.45", 0x000000, 0x080000, CRC(a70301b8) SHA1(b6ffb7339a42ec81c3ec7a0681dfea878f11a538) ) ROM_LOAD16_BYTE( "am27c040.44", 0x000001, 0x080000, CRC(d45a26ed) SHA1(bb261e7061aba35aa6af6567a8386d9704a9db83) ) - ROM_REGION( 0x1400000, "gfx1", 0 ) /* GFX + Sound */ - /* 0x0000000-0x0ffffff filled in in the DRIVER_INIT */ - ROM_FILL( 0x1000000, 0x0400000, 0x00 ) /* to decode GFX as 5 bpp */ + ROM_REGION( 0x1400000, "gfx", 0 ) // GFX + Sound + // 0x0000000-0x0ffffff filled in in the DRIVER_INIT + ROM_FILL( 0x1000000, 0x0400000, 0x00 ) // to decode GFX as 5 bpp - ROM_REGION( 0x1000000, "gfx2", 0 ) /* Temporary storage */ - ROM_LOAD( "u48", 0x0000000, 0x0400000, CRC(19e03bf1) SHA1(2b3a4bb438b0aebf4f6a9fd26b071e5c9dd222b8) ) /* GFX only */ - ROM_LOAD( "u47", 0x0400000, 0x0400000, CRC(74a5a29f) SHA1(8ea2aa1f8a80c5b88ca9222c5ecc3c4794e0a160) ) /* GFX + Sound */ - ROM_LOAD( "u50", 0x0800000, 0x0400000, CRC(85daecf9) SHA1(824f6d2491075b1ef96ecd6667c5510409338a2f) ) /* GFX only */ - ROM_LOAD( "u49", 0x0c00000, 0x0400000, CRC(70a4ee0b) SHA1(07b09916f0366d0c6eed94a905ec0b9d6ac9e7e1) ) /* GFX + Sound */ + ROM_REGION( 0x1000000, "gfx_temp", 0 ) // Temporary storage + ROM_LOAD( "u48", 0x0000000, 0x0400000, CRC(19e03bf1) SHA1(2b3a4bb438b0aebf4f6a9fd26b071e5c9dd222b8) ) // GFX only + ROM_LOAD( "u47", 0x0400000, 0x0400000, CRC(74a5a29f) SHA1(8ea2aa1f8a80c5b88ca9222c5ecc3c4794e0a160) ) // GFX + Sound + ROM_LOAD( "u50", 0x0800000, 0x0400000, CRC(85daecf9) SHA1(824f6d2491075b1ef96ecd6667c5510409338a2f) ) // GFX only + ROM_LOAD( "u49", 0x0c00000, 0x0400000, CRC(70a4ee0b) SHA1(07b09916f0366d0c6eed94a905ec0b9d6ac9e7e1) ) // GFX + Sound ROM_END @@ -1635,18 +1633,18 @@ ROM_END void gaelco2_state::touchgo_map(address_map &map) { - map(0x000000, 0x0fffff).rom(); /* ROM */ - map(0x200000, 0x20ffff).ram().w(FUNC(gaelco2_state::vram_w)).share("spriteram"); /* Video RAM */ - map(0x202890, 0x2028ff).rw("gaelco", FUNC(gaelco_gae1_device::gaelcosnd_r), FUNC(gaelco_gae1_device::gaelcosnd_w)); /* Sound Registers */ - map(0x210000, 0x211fff).ram().w(FUNC(gaelco2_state::palette_w)).share("paletteram"); /* Palette */ - map(0x218004, 0x218009).ram().w(FUNC(gaelco2_state::vregs_w)).share("vregs"); /* Video Registers */ - map(0x300000, 0x300001).portr("IN0"); /* DSW #1 + Input 1P */ - map(0x300002, 0x300003).portr("IN1"); /* DSW #2 + Input 2P */ - map(0x300004, 0x300005).portr("IN2"); /* COINSW + Input 3P */ - map(0x300006, 0x300007).portr("IN3"); /* SERVICESW + Input 4P */ - map(0x500000, 0x500001).select(0x0038).w(FUNC(gaelco2_state::wrally2_latch_w)); /* Coin counters */ - map(0xfe0000, 0xfe7fff).ram(); /* Work RAM */ - map(0xfe8000, 0xfeffff).ram().share("shareram"); /* Work RAM (shared with D5002FP) */ + map(0x000000, 0x0fffff).rom(); // ROM + map(0x200000, 0x20ffff).ram().w(FUNC(gaelco2_state::vram_w)).share("spriteram"); // Video RAM + map(0x202890, 0x2028ff).rw("gaelco", FUNC(gaelco_gae1_device::gaelcosnd_r), FUNC(gaelco_gae1_device::gaelcosnd_w)); // Sound Registers + map(0x210000, 0x211fff).ram().w(FUNC(gaelco2_state::palette_w)).share(m_paletteram); // Palette + map(0x218004, 0x218009).ram().w(FUNC(gaelco2_state::vregs_w)).share(m_vregs); // Video Registers + map(0x300000, 0x300001).portr("IN0"); // DSW #1 + Input 1P + map(0x300002, 0x300003).portr("IN1"); // DSW #2 + Input 2P + map(0x300004, 0x300005).portr("IN2"); // COINSW + Input 3P + map(0x300006, 0x300007).portr("IN3"); // SERVICESW + Input 4P + map(0x500000, 0x500001).select(0x0038).w(FUNC(gaelco2_state::wrally2_latch_w)); // Coin counters + map(0xfe0000, 0xfe7fff).ram(); // Work RAM + map(0xfe8000, 0xfeffff).ram().share(m_shareram); // Work RAM (shared with D5002FP) } @@ -1749,18 +1747,18 @@ static INPUT_PORTS_START( touchgo ) PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(4) PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_START4 ) PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_SERVICE1 ) - PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_SERVICE3 ) /* go to test mode NOW */ + PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_SERVICE3 ) // go to test mode NOW PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_SERVICE2 ) PORT_BIT( 0xf800, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_START("FAKE") /* To switch between monitors at run time */ + PORT_START("FAKE") // To switch between monitors at run time PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SERVICE4 ) PORT_TOGGLE INPUT_PORTS_END void gaelco2_state::touchgo(machine_config &config) { - /* basic machine hardware */ - M68000(config, m_maincpu, XTAL(32'000'000) / 2); /* 16 MHz */ + // basic machine hardware + M68000(config, m_maincpu, XTAL(32'000'000) / 2); // 16 MHz m_maincpu->set_addrmap(AS_PROGRAM, &gaelco2_state::touchgo_map); m_maincpu->set_vblank_int("lscreen", FUNC(gaelco2_state::irq6_line_hold)); @@ -1770,7 +1768,7 @@ void gaelco2_state::touchgo(machine_config &config) m_mainlatch->q_out_cb<2>().set(FUNC(gaelco2_state::coin3_counter_w)); m_mainlatch->q_out_cb<3>().set(FUNC(gaelco2_state::coin4_counter_w)); - /* video hardware */ + // video hardware BUFFERED_SPRITERAM16(config, m_spriteram); GFXDECODE(config, m_gfxdecode, m_palette, gfx_gaelco2); PALETTE(config, m_palette).set_entries(0x10000); @@ -1778,7 +1776,7 @@ void gaelco2_state::touchgo(machine_config &config) screen_device &lscreen(SCREEN(config, "lscreen", SCREEN_TYPE_RASTER)); lscreen.set_refresh_hz(59.1); - lscreen.set_vblank_time(ATTOSECONDS_IN_USEC(2500)); /* not accurate */ + lscreen.set_vblank_time(ATTOSECONDS_IN_USEC(2500)); // not accurate lscreen.set_size(64*16, 32*16); lscreen.set_visarea(0, 480-1, 16, 256-1); lscreen.set_screen_update(FUNC(gaelco2_state::screen_update_left)); @@ -1786,7 +1784,7 @@ void gaelco2_state::touchgo(machine_config &config) screen_device &rscreen(SCREEN(config, "rscreen", SCREEN_TYPE_RASTER)); rscreen.set_refresh_hz(59.1); - rscreen.set_vblank_time(ATTOSECONDS_IN_USEC(2500)); /* not accurate */ + rscreen.set_vblank_time(ATTOSECONDS_IN_USEC(2500)); // not accurate rscreen.set_size(64*16, 32*16); rscreen.set_visarea(0, 480-1, 16, 256-1); rscreen.set_screen_update(FUNC(gaelco2_state::screen_update_right)); @@ -1795,14 +1793,14 @@ void gaelco2_state::touchgo(machine_config &config) MCFG_VIDEO_START_OVERRIDE(gaelco2_state,gaelco2_dual) - /* sound hardware */ + // sound hardware /* the chip is stereo, but the game sound is mono because the right channel output is for cabinet 1 and the left channel output is for cabinet 2 */ SPEAKER(config, "lspeaker").front_left(); SPEAKER(config, "rspeaker").front_right(); gaelco_gae1_device &gaelco(GAELCO_GAE1(config, "gaelco", XTAL(40'000'000) / 40)); - gaelco.set_device_rom_tag("gfx1"); + gaelco.set_device_rom_tag("gfx"); gaelco.set_bank_offsets(0 * 0x0400000, 1 * 0x0400000, 0, 0); gaelco.add_route(0, "rspeaker", 1.0); gaelco.add_route(1, "lspeaker", 1.0); @@ -1811,7 +1809,7 @@ void gaelco2_state::touchgo(machine_config &config) void gaelco2_state::touchgo_d5002fp(machine_config &config) { touchgo(config); - GAELCO_DS5002FP(config, "gaelco_ds5002fp", XTAL(32'000'000) / 2).set_addrmap(0, &gaelco2_state::mcu_hostmem_map); /* 16 MHz */ + GAELCO_DS5002FP(config, "gaelco_ds5002fp", XTAL(32'000'000) / 2).set_addrmap(0, &gaelco2_state::mcu_hostmem_map); // 16 MHz config.set_perfect_quantum("gaelco_ds5002fp:mcu"); } @@ -1913,121 +1911,121 @@ Wires run to male JAMMA board with corresponding JP1, JP2, JP3 & JP4 connectors */ -ROM_START( touchgo ) /* REF: 950906 */ - ROM_REGION( 0x100000, "maincpu", 0 ) /* 68000 code */ +ROM_START( touchgo ) // REF: 950906 + ROM_REGION( 0x100000, "maincpu", 0 ) // 68000 code ROM_LOAD16_BYTE( "tg_56.ic56", 0x000000, 0x080000, CRC(8ab065f3) SHA1(7664abd7e5f66ffca4a2865bba56ac36bd04f4e9) ) ROM_LOAD16_BYTE( "tg_57.ic57", 0x000001, 0x080000, CRC(0dfd3f65) SHA1(afb2ce8988c84f211ac71b84928ce4c421de7fee) ) - ROM_REGION( 0x8000, "gaelco_ds5002fp:sram", 0 ) /* DS5002FP code */ + ROM_REGION( 0x8000, "gaelco_ds5002fp:sram", 0 ) // DS5002FP code ROM_LOAD( "touchgo_ds5002fp_sram.bin", 0x00000, 0x8000, CRC(6a238adb) SHA1(4ac5ff8e3d90454f764477146a0b8dc8c8062420) ) ROM_REGION( 0x100, "gaelco_ds5002fp:mcu:internal", ROMREGION_ERASE00 ) - /* touchgo requires some values in scratchram to be initialized or it won't copy the high score table when it boots */ + // touchgo requires some values in scratchram to be initialized or it won't copy the high score table when it boots ROM_LOAD( "touchgo_scratch", 0x00, 0x80, CRC(f9ca54ff) SHA1(416f7bd89442dc1f736efe457b0f9a7f4f9f0bd5) ) - /* these are the default states stored in NVRAM */ + // these are the default states stored in NVRAM DS5002FP_SET_MON( 0x19 ) DS5002FP_SET_RPCTL( 0x00 ) DS5002FP_SET_CRCR( 0x80 ) - ROM_REGION( 0x1400000, "gfx1", 0 ) /* GFX + Sound */ - /* 0x0000000-0x0ffffff filled in in the DRIVER_INIT */ - ROM_LOAD( "tg_ic69.ic69", 0x1000000, 0x0200000, CRC(18bb12d4) SHA1(ee6e7a63b86c56d71e62db0ae5892ab3ab94b0a0) ) /* GFX only */ + ROM_REGION( 0x1400000, "gfx", 0 ) // GFX + Sound + // 0x0000000-0x0ffffff filled in in the DRIVER_INIT + ROM_LOAD( "tg_ic69.ic69", 0x1000000, 0x0200000, CRC(18bb12d4) SHA1(ee6e7a63b86c56d71e62db0ae5892ab3ab94b0a0) ) // GFX only - ROM_REGION( 0x0c00000, "gfx2", 0 ) /* Temporary storage */ - ROM_LOAD( "tg_ic65.ic65", 0x0000000, 0x0400000, CRC(91b89c7c) SHA1(1c24b494b56845b0f21be40ab737f251d7683c7d) ) /* GFX only */ - ROM_LOAD( "tg_ic66.ic66", 0x0400000, 0x0200000, CRC(52682953) SHA1(82cde061bdd827ed4a47a9a4256cd0e887ebc29d) ) /* Sound only */ - ROM_FILL( 0x0600000, 0x0200000, 0x00 ) /* Empty */ - ROM_LOAD( "tg_ic67.ic67", 0x0800000, 0x0400000, CRC(c0a2ce5b) SHA1(94b024373c7c546c0f4fe9737639f02e9c7ebbdb) ) /* GFX only */ + ROM_REGION( 0x0c00000, "gfx_temp", 0 ) // Temporary storage + ROM_LOAD( "tg_ic65.ic65", 0x0000000, 0x0400000, CRC(91b89c7c) SHA1(1c24b494b56845b0f21be40ab737f251d7683c7d) ) // GFX only + ROM_LOAD( "tg_ic66.ic66", 0x0400000, 0x0200000, CRC(52682953) SHA1(82cde061bdd827ed4a47a9a4256cd0e887ebc29d) ) // Sound only + ROM_FILL( 0x0600000, 0x0200000, 0x00 ) // Empty + ROM_LOAD( "tg_ic67.ic67", 0x0800000, 0x0400000, CRC(c0a2ce5b) SHA1(94b024373c7c546c0f4fe9737639f02e9c7ebbdb) ) // GFX only ROM_END -ROM_START( touchgon ) /* REF 950906, no plug-in daughterboard, Non North America Notice, also found on REF: 950510-1 with daughterboard */ - ROM_REGION( 0x100000, "maincpu", 0 ) /* 68000 code */ - ROM_LOAD16_BYTE( "1.ic63", 0x000000, 0x080000, CRC(fd3b4642) SHA1(3cab42aecad5ee641711763c6047b56784c2bcf3) ) /* IC63 for REF: 950510-1, IC56 for REF: 950906 */ - ROM_LOAD16_BYTE( "2.ic64", 0x000001, 0x080000, CRC(ee891835) SHA1(9f8c60e5e3696b70f756c3521e10313005053cc7) ) /* IC64 for REF: 950510-1, IC57 for REF: 950906 */ +ROM_START( touchgon ) // REF 950906, no plug-in daughterboard, Non North America Notice, also found on REF: 950510-1 with daughterboard + ROM_REGION( 0x100000, "maincpu", 0 ) // 68000 code + ROM_LOAD16_BYTE( "1.ic63", 0x000000, 0x080000, CRC(fd3b4642) SHA1(3cab42aecad5ee641711763c6047b56784c2bcf3) ) // IC63 for REF: 950510-1, IC56 for REF: 950906 + ROM_LOAD16_BYTE( "2.ic64", 0x000001, 0x080000, CRC(ee891835) SHA1(9f8c60e5e3696b70f756c3521e10313005053cc7) ) // IC64 for REF: 950510-1, IC57 for REF: 950906 - ROM_REGION( 0x8000, "gaelco_ds5002fp:sram", 0 ) /* DS5002FP code */ + ROM_REGION( 0x8000, "gaelco_ds5002fp:sram", 0 ) // DS5002FP code ROM_LOAD( "touchgo_ds5002fp_sram.bin", 0x00000, 0x8000, CRC(6a238adb) SHA1(4ac5ff8e3d90454f764477146a0b8dc8c8062420) ) ROM_REGION( 0x100, "gaelco_ds5002fp:mcu:internal", ROMREGION_ERASE00 ) - /* touchgo requires some values in scratchram to be initialized or it won't copy the high score table when it boots */ + // touchgo requires some values in scratchram to be initialized or it won't copy the high score table when it boots ROM_LOAD( "touchgo_scratch", 0x00, 0x80, CRC(f9ca54ff) SHA1(416f7bd89442dc1f736efe457b0f9a7f4f9f0bd5) ) - /* these are the default states stored in NVRAM */ + // these are the default states stored in NVRAM DS5002FP_SET_MON( 0x19 ) DS5002FP_SET_RPCTL( 0x00 ) DS5002FP_SET_CRCR( 0x80 ) - ROM_REGION( 0x1400000, "gfx1", 0 ) /* GFX + Sound */ - /* 0x0000000-0x0ffffff filled in in the DRIVER_INIT */ - ROM_LOAD( "tg_ic69.ic69", 0x1000000, 0x0200000, CRC(18bb12d4) SHA1(ee6e7a63b86c56d71e62db0ae5892ab3ab94b0a0) ) /* GFX only */ + ROM_REGION( 0x1400000, "gfx", 0 ) // GFX + Sound + // 0x0000000-0x0ffffff filled in in the DRIVER_INIT + ROM_LOAD( "tg_ic69.ic69", 0x1000000, 0x0200000, CRC(18bb12d4) SHA1(ee6e7a63b86c56d71e62db0ae5892ab3ab94b0a0) ) // GFX only - ROM_REGION( 0x0c00000, "gfx2", 0 ) /* Temporary storage */ - ROM_LOAD( "tg_ic65.ic65", 0x0000000, 0x0400000, CRC(91b89c7c) SHA1(1c24b494b56845b0f21be40ab737f251d7683c7d) ) /* GFX only */ - ROM_LOAD( "tg_ic66.ic66", 0x0400000, 0x0200000, CRC(52682953) SHA1(82cde061bdd827ed4a47a9a4256cd0e887ebc29d) ) /* Sound only */ - ROM_FILL( 0x0600000, 0x0200000, 0x00 ) /* Empty */ - ROM_LOAD( "tg_ic67.ic67", 0x0800000, 0x0400000, CRC(c0a2ce5b) SHA1(94b024373c7c546c0f4fe9737639f02e9c7ebbdb) ) /* GFX only */ + ROM_REGION( 0x0c00000, "gfx_temp", 0 ) // Temporary storage + ROM_LOAD( "tg_ic65.ic65", 0x0000000, 0x0400000, CRC(91b89c7c) SHA1(1c24b494b56845b0f21be40ab737f251d7683c7d) ) // GFX only + ROM_LOAD( "tg_ic66.ic66", 0x0400000, 0x0200000, CRC(52682953) SHA1(82cde061bdd827ed4a47a9a4256cd0e887ebc29d) ) // Sound only + ROM_FILL( 0x0600000, 0x0200000, 0x00 ) // Empty + ROM_LOAD( "tg_ic67.ic67", 0x0800000, 0x0400000, CRC(c0a2ce5b) SHA1(94b024373c7c546c0f4fe9737639f02e9c7ebbdb) ) // GFX only ROM_END -ROM_START( touchgoe ) /* REF: 950510-1 */ - ROM_REGION( 0x100000, "maincpu", 0 ) /* 68000 code */ - ROM_LOAD16_BYTE( "tg56.ic63", 0x000000, 0x080000, CRC(6d0f5c65) SHA1(00db7a7da3ec1676169aa78fe4f08a7746c3accf) ) /* IC63 for REF: 950510-1, IC56 for REF: 950906 */ - ROM_LOAD16_BYTE( "tg57.ic64", 0x000001, 0x080000, CRC(845787b5) SHA1(27c9910cd9f38328326ecb5cd093dfeb6d4f6244) ) /* IC64 for REF: 950510-1, IC57 for REF: 950906 */ +ROM_START( touchgoe ) // REF: 950510-1 + ROM_REGION( 0x100000, "maincpu", 0 ) // 68000 code + ROM_LOAD16_BYTE( "tg56.ic63", 0x000000, 0x080000, CRC(6d0f5c65) SHA1(00db7a7da3ec1676169aa78fe4f08a7746c3accf) ) // IC63 for REF: 950510-1, IC56 for REF: 950906 + ROM_LOAD16_BYTE( "tg57.ic64", 0x000001, 0x080000, CRC(845787b5) SHA1(27c9910cd9f38328326ecb5cd093dfeb6d4f6244) ) // IC64 for REF: 950510-1, IC57 for REF: 950906 - ROM_REGION( 0x8000, "gaelco_ds5002fp:sram", 0 ) /* DS5002FP code */ + ROM_REGION( 0x8000, "gaelco_ds5002fp:sram", 0 ) // DS5002FP code ROM_LOAD( "touchgo_ds5002fp_sram.bin", 0x00000, 0x8000, CRC(6a238adb) SHA1(4ac5ff8e3d90454f764477146a0b8dc8c8062420) ) ROM_REGION( 0x100, "gaelco_ds5002fp:mcu:internal", ROMREGION_ERASE00 ) - /* touchgo requires some values in scratchram to be initialized or it won't copy the high score table when it boots */ + // touchgo requires some values in scratchram to be initialized or it won't copy the high score table when it boots ROM_LOAD( "touchgo_scratch", 0x00, 0x80, CRC(f9ca54ff) SHA1(416f7bd89442dc1f736efe457b0f9a7f4f9f0bd5) ) - /* these are the default states stored in NVRAM */ + // these are the default states stored in NVRAM DS5002FP_SET_MON( 0x19 ) DS5002FP_SET_RPCTL( 0x00 ) DS5002FP_SET_CRCR( 0x80 ) - ROM_REGION( 0x1400000, "gfx1", 0 ) /* GFX + Sound */ - /* 0x0000000-0x0ffffff filled in in the DRIVER_INIT */ - ROM_LOAD( "tg_ic69.ic69", 0x1000000, 0x0200000, CRC(18bb12d4) SHA1(ee6e7a63b86c56d71e62db0ae5892ab3ab94b0a0) ) /* GFX only */ + ROM_REGION( 0x1400000, "gfx", 0 ) // GFX + Sound + // 0x0000000-0x0ffffff filled in in the DRIVER_INIT + ROM_LOAD( "tg_ic69.ic69", 0x1000000, 0x0200000, CRC(18bb12d4) SHA1(ee6e7a63b86c56d71e62db0ae5892ab3ab94b0a0) ) // GFX only - ROM_REGION( 0x0c00000, "gfx2", 0 ) /* Temporary storage */ - ROM_LOAD( "tg_ic65.ic65", 0x0000000, 0x0400000, CRC(91b89c7c) SHA1(1c24b494b56845b0f21be40ab737f251d7683c7d) ) /* GFX only */ - ROM_LOAD( "tg_ic66.ic66", 0x0400000, 0x0200000, CRC(52682953) SHA1(82cde061bdd827ed4a47a9a4256cd0e887ebc29d) ) /* Sound only */ - ROM_FILL( 0x0600000, 0x0200000, 0x00 ) /* Empty */ - ROM_LOAD( "tg_ic67.ic67", 0x0800000, 0x0400000, CRC(c0a2ce5b) SHA1(94b024373c7c546c0f4fe9737639f02e9c7ebbdb) ) /* GFX only */ + ROM_REGION( 0x0c00000, "gfx_temp", 0 ) // Temporary storage + ROM_LOAD( "tg_ic65.ic65", 0x0000000, 0x0400000, CRC(91b89c7c) SHA1(1c24b494b56845b0f21be40ab737f251d7683c7d) ) // GFX only + ROM_LOAD( "tg_ic66.ic66", 0x0400000, 0x0200000, CRC(52682953) SHA1(82cde061bdd827ed4a47a9a4256cd0e887ebc29d) ) // Sound only + ROM_FILL( 0x0600000, 0x0200000, 0x00 ) // Empty + ROM_LOAD( "tg_ic67.ic67", 0x0800000, 0x0400000, CRC(c0a2ce5b) SHA1(94b024373c7c546c0f4fe9737639f02e9c7ebbdb) ) // GFX only ROM_END -ROM_START( touchgok ) /* REF: 950510-1 - ds5002fp unpopulated, game is unprotected */ - ROM_REGION( 0x100000, "maincpu", 0 ) /* 68000 code */ - ROM_LOAD16_BYTE( "56.ic56", 0x000000, 0x080000, CRC(cbb87505) SHA1(f19832af60fb6273c3263ebdd93bb7705ab61e20) ) /* IC63 for REF: 950510-1, IC56 for REF: 950906 */ - ROM_LOAD16_BYTE( "57.ic57", 0x000001, 0x080000, CRC(36bcc7e7) SHA1(2fff881ba0a99ebcfe3c03fdc61f4bf40e152c7f) ) /* IC64 for REF: 950510-1, IC57 for REF: 950906 */ - - ROM_REGION( 0x1400000, "gfx1", 0 ) /* GFX + Sound */ - /* 0x0000000-0x0ffffff filled in in the DRIVER_INIT */ - ROM_LOAD( "tg_ic69.ic69", 0x1000000, 0x0200000, CRC(18bb12d4) SHA1(ee6e7a63b86c56d71e62db0ae5892ab3ab94b0a0) ) /* GFX only */ - - ROM_REGION( 0x0c00000, "gfx2", 0 ) /* Temporary storage */ - ROM_LOAD( "tg_ic65.ic65", 0x0000000, 0x0400000, CRC(91b89c7c) SHA1(1c24b494b56845b0f21be40ab737f251d7683c7d) ) /* GFX only */ - ROM_LOAD( "tg_ic66.ic66", 0x0400000, 0x0200000, CRC(52682953) SHA1(82cde061bdd827ed4a47a9a4256cd0e887ebc29d) ) /* Sound only */ - ROM_FILL( 0x0600000, 0x0200000, 0x00 ) /* Empty */ - ROM_LOAD( "tg_ic67.ic67", 0x0800000, 0x0400000, CRC(c0a2ce5b) SHA1(94b024373c7c546c0f4fe9737639f02e9c7ebbdb) ) /* GFX only */ +ROM_START( touchgok ) // REF: 950510-1 - ds5002fp unpopulated, game is unprotected + ROM_REGION( 0x100000, "maincpu", 0 ) // 68000 code + ROM_LOAD16_BYTE( "56.ic56", 0x000000, 0x080000, CRC(cbb87505) SHA1(f19832af60fb6273c3263ebdd93bb7705ab61e20) ) // IC63 for REF: 950510-1, IC56 for REF: 950906 + ROM_LOAD16_BYTE( "57.ic57", 0x000001, 0x080000, CRC(36bcc7e7) SHA1(2fff881ba0a99ebcfe3c03fdc61f4bf40e152c7f) ) // IC64 for REF: 950510-1, IC57 for REF: 950906 + + ROM_REGION( 0x1400000, "gfx", 0 ) // GFX + Sound + // 0x0000000-0x0ffffff filled in in the DRIVER_INIT + ROM_LOAD( "tg_ic69.ic69", 0x1000000, 0x0200000, CRC(18bb12d4) SHA1(ee6e7a63b86c56d71e62db0ae5892ab3ab94b0a0) ) // GFX only + + ROM_REGION( 0x0c00000, "gfx_temp", 0 ) // Temporary storage + ROM_LOAD( "tg_ic65.ic65", 0x0000000, 0x0400000, CRC(91b89c7c) SHA1(1c24b494b56845b0f21be40ab737f251d7683c7d) ) // GFX only + ROM_LOAD( "tg_ic66.ic66", 0x0400000, 0x0200000, CRC(52682953) SHA1(82cde061bdd827ed4a47a9a4256cd0e887ebc29d) ) // Sound only + ROM_FILL( 0x0600000, 0x0200000, 0x00 ) // Empty + ROM_LOAD( "tg_ic67.ic67", 0x0800000, 0x0400000, CRC(c0a2ce5b) SHA1(94b024373c7c546c0f4fe9737639f02e9c7ebbdb) ) // GFX only ROM_END /*============================================================================ SNOW BOARD ============================================================================*/ -void gaelco2_state::snowboar_map(address_map &map) +void snowboar_state::snowboar_map(address_map &map) { - map(0x000000, 0x0fffff).rom(); /* ROM */ - map(0x200000, 0x20ffff).ram().w(FUNC(gaelco2_state::vram_w)).share("spriteram"); /* Video RAM */ - map(0x202890, 0x2028ff).rw("gaelco", FUNC(gaelco_cg1v_device::gaelcosnd_r), FUNC(gaelco_cg1v_device::gaelcosnd_w)); /* Sound Registers */ - map(0x210000, 0x211fff).ram().w(FUNC(gaelco2_state::palette_w)).share("paletteram"); /* Palette */ - map(0x212000, 0x213fff).ram(); /* Extra RAM */ - map(0x218004, 0x218009).ram().w(FUNC(gaelco2_state::vregs_w)).share("vregs"); /* Video Registers */ + map(0x000000, 0x0fffff).rom(); // ROM + map(0x200000, 0x20ffff).ram().w(FUNC(snowboar_state::vram_w)).share("spriteram"); // Video RAM + map(0x202890, 0x2028ff).rw("gaelco", FUNC(gaelco_cg1v_device::gaelcosnd_r), FUNC(gaelco_cg1v_device::gaelcosnd_w)); // Sound Registers + map(0x210000, 0x211fff).ram().w(FUNC(snowboar_state::palette_w)).share(m_paletteram); // Palette + map(0x212000, 0x213fff).ram(); // Extra RAM + map(0x218004, 0x218009).ram().w(FUNC(snowboar_state::vregs_w)).share(m_vregs); // Video Registers map(0x300000, 0x300001).portr("P1"); - map(0x300000, 0x30000f).w(m_mainlatch, FUNC(ls259_device::write_d0)).umask16(0x00ff); /* Coin Counters & serial EEPROM */ + map(0x300000, 0x30000f).w(m_mainlatch, FUNC(ls259_device::write_d0)).umask16(0x00ff); // Coin Counters & serial EEPROM map(0x300010, 0x300011).portr("P2"); map(0x300020, 0x300021).portr("COIN"); - map(0x310000, 0x31ffff).rw(FUNC(gaelco2_state::snowboar_protection_r), FUNC(gaelco2_state::snowboar_protection_w)).share("snowboar_prot"); /* Protection */ - map(0xfe0000, 0xfeffff).ram(); /* Work RAM */ + map(0x310000, 0x31ffff).rw(FUNC(snowboar_state::snowboar_protection_r), FUNC(snowboar_state::snowboar_protection_w)).share(m_snowboar_protection); // Protection + map(0xfe0000, 0xfeffff).ram(); // Work RAM } @@ -2055,97 +2053,97 @@ static INPUT_PORTS_START( snowboar ) PORT_START("COIN") PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) - PORT_SERVICE_NO_TOGGLE( 0x04, IP_ACTIVE_LOW ) /* go to service mode NOW */ + PORT_SERVICE_NO_TOGGLE( 0x04, IP_ACTIVE_LOW ) // go to service mode NOW PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START1 ) PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START2 ) - PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("eeprom", eeprom_serial_93cxx_device, do_read) /* bit 6 is EEPROM data (DOUT) */ + PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("eeprom", eeprom_serial_93cxx_device, do_read) // bit 6 is EEPROM data (DOUT) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_CUSTOM ) INPUT_PORTS_END -void gaelco2_state::snowboar(machine_config &config) +void snowboar_state::snowboar(machine_config &config) { - /* basic machine hardware */ - M68000(config, m_maincpu, XTAL(30'000'000) / 2); /* 15 MHz */ - m_maincpu->set_addrmap(AS_PROGRAM, &gaelco2_state::snowboar_map); - m_maincpu->set_vblank_int("screen", FUNC(gaelco2_state::irq6_line_hold)); + // basic machine hardware + M68000(config, m_maincpu, XTAL(30'000'000) / 2); // 15 MHz + m_maincpu->set_addrmap(AS_PROGRAM, &snowboar_state::snowboar_map); + m_maincpu->set_vblank_int("screen", FUNC(snowboar_state::irq6_line_hold)); EEPROM_93C66_16BIT(config, m_eeprom); LS259(config, m_mainlatch); - m_mainlatch->q_out_cb<0>().set(FUNC(gaelco2_state::coin1_counter_w)); - m_mainlatch->q_out_cb<1>().set(FUNC(gaelco2_state::coin2_counter_w)); - m_mainlatch->q_out_cb<4>().set("eeprom", FUNC(eeprom_serial_93cxx_device::di_write)); /* EEPROM data */ - m_mainlatch->q_out_cb<5>().set("eeprom", FUNC(eeprom_serial_93cxx_device::clk_write)); /* EEPROM serial clock */ - m_mainlatch->q_out_cb<6>().set("eeprom", FUNC(eeprom_serial_93cxx_device::cs_write)); /* EEPROM chip select */ + m_mainlatch->q_out_cb<0>().set(FUNC(snowboar_state::coin1_counter_w)); + m_mainlatch->q_out_cb<1>().set(FUNC(snowboar_state::coin2_counter_w)); + m_mainlatch->q_out_cb<4>().set("eeprom", FUNC(eeprom_serial_93cxx_device::di_write)); // EEPROM data + m_mainlatch->q_out_cb<5>().set("eeprom", FUNC(eeprom_serial_93cxx_device::clk_write)); // EEPROM serial clock + m_mainlatch->q_out_cb<6>().set("eeprom", FUNC(eeprom_serial_93cxx_device::cs_write)); // EEPROM chip select - /* video hardware */ + // video hardware BUFFERED_SPRITERAM16(config, m_spriteram); screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); screen.set_refresh_hz(59.1); - screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500)); /* not accurate */ + screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500)); // not accurate screen.set_size(64*16, 32*16); screen.set_visarea(0, 384-1, 16, 256-1); - screen.set_screen_update(FUNC(gaelco2_state::screen_update)); + screen.set_screen_update(FUNC(snowboar_state::screen_update)); screen.screen_vblank().set(m_spriteram, FUNC(buffered_spriteram16_device::vblank_copy_rising)); screen.set_palette(m_palette); GFXDECODE(config, m_gfxdecode, m_palette, gfx_gaelco2); PALETTE(config, m_palette).set_entries(0x10000); - MCFG_VIDEO_START_OVERRIDE(gaelco2_state,gaelco2) + MCFG_VIDEO_START_OVERRIDE(snowboar_state,gaelco2) - /* sound hardware */ + // sound hardware SPEAKER(config, "lspeaker").front_left(); SPEAKER(config, "rspeaker").front_right(); gaelco_cg1v_device &gaelco(GAELCO_CG1V(config, "gaelco", XTAL(34'000'000) / 34)); - gaelco.set_device_rom_tag("gfx1"); + gaelco.set_device_rom_tag("gfx"); gaelco.set_bank_offsets(0 * 0x0400000, 1 * 0x0400000, 0, 0); gaelco.add_route(0, "lspeaker", 1.0); gaelco.add_route(1, "rspeaker", 1.0); } -void gaelco2_state::maniacsqs(machine_config &config) +void snowboar_state::maniacsqs(machine_config &config) { - /* basic machine hardware */ - M68000(config, m_maincpu, XTAL(24'000'000) / 2); /* 12 MHz - see PCB layout above with ROM set */ - m_maincpu->set_addrmap(AS_PROGRAM, &gaelco2_state::snowboar_map); - m_maincpu->set_vblank_int("screen", FUNC(gaelco2_state::irq6_line_hold)); + // basic machine hardware + M68000(config, m_maincpu, XTAL(24'000'000) / 2); // 12 MHz - see PCB layout above with ROM set + m_maincpu->set_addrmap(AS_PROGRAM, &snowboar_state::snowboar_map); + m_maincpu->set_vblank_int("screen", FUNC(snowboar_state::irq6_line_hold)); EEPROM_93C66_16BIT(config, m_eeprom); LS259(config, m_mainlatch); - m_mainlatch->q_out_cb<0>().set(FUNC(gaelco2_state::coin1_counter_w)); - m_mainlatch->q_out_cb<1>().set(FUNC(gaelco2_state::coin2_counter_w)); - m_mainlatch->q_out_cb<4>().set("eeprom", FUNC(eeprom_serial_93cxx_device::di_write)); /* EEPROM data */ - m_mainlatch->q_out_cb<5>().set("eeprom", FUNC(eeprom_serial_93cxx_device::clk_write)); /* EEPROM serial clock */ - m_mainlatch->q_out_cb<6>().set("eeprom", FUNC(eeprom_serial_93cxx_device::cs_write)); /* EEPROM chip select */ + m_mainlatch->q_out_cb<0>().set(FUNC(snowboar_state::coin1_counter_w)); + m_mainlatch->q_out_cb<1>().set(FUNC(snowboar_state::coin2_counter_w)); + m_mainlatch->q_out_cb<4>().set("eeprom", FUNC(eeprom_serial_93cxx_device::di_write)); // EEPROM data + m_mainlatch->q_out_cb<5>().set("eeprom", FUNC(eeprom_serial_93cxx_device::clk_write)); // EEPROM serial clock + m_mainlatch->q_out_cb<6>().set("eeprom", FUNC(eeprom_serial_93cxx_device::cs_write)); // EEPROM chip select - /* video hardware */ + // video hardware BUFFERED_SPRITERAM16(config, m_spriteram); screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); screen.set_refresh_hz(59.1); - screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500)); /* not accurate */ + screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500)); // not accurate screen.set_size(64*16, 32*16); screen.set_visarea(0, 320-1, 16, 256-1); - screen.set_screen_update(FUNC(gaelco2_state::screen_update)); + screen.set_screen_update(FUNC(snowboar_state::screen_update)); screen.screen_vblank().set(m_spriteram, FUNC(buffered_spriteram16_device::vblank_copy_rising)); screen.set_palette(m_palette); GFXDECODE(config, m_gfxdecode, m_palette, gfx_gaelco2); PALETTE(config, m_palette).set_entries(0x10000); - MCFG_VIDEO_START_OVERRIDE(gaelco2_state,gaelco2) + MCFG_VIDEO_START_OVERRIDE(snowboar_state,gaelco2) - /* sound hardware */ + // sound hardware SPEAKER(config, "lspeaker").front_left(); SPEAKER(config, "rspeaker").front_right(); gaelco_gae1_device &gaelco(GAELCO_GAE1(config, "gaelco", XTAL(30'000'000) / 30)); - gaelco.set_device_rom_tag("gfx1"); + gaelco.set_device_rom_tag("gfx"); gaelco.set_bank_offsets(0 * 0x0080000, 1 * 0x0080000, 0, 0); gaelco.add_route(0, "lspeaker", 1.0); gaelco.add_route(1, "rspeaker", 1.0); @@ -2191,56 +2189,56 @@ PCB sets with rom board attached to the underside of the main PCB use CG-1V 0797 */ ROM_START( snowboara ) // REF 960419/1 - ROM_REGION( 0x100000, "maincpu", 0 ) /* 68000 code */ - ROM_LOAD16_BYTE( "sb_53.ic53", 0x000000, 0x080000, CRC(e4eaefd4) SHA1(c7de2ae3a4a919fbe16d4997e3f9e2303b8c96b1) ) /* Version 2.0 program roms */ - ROM_LOAD16_BYTE( "sb_55.ic55", 0x000001, 0x080000, CRC(e2476994) SHA1(2ad18652a1fc6ac058c8399373fb77e7a81d5bbd) ) /* Version 2.0 program roms */ - - ROM_REGION( 0x1400000, "gfx1", 0 ) /* GFX + Sound */ - /* 0x0000000-0x0ffffff filled in in the DRIVER_INIT */ - ROM_LOAD( "sb_ic43.ic43", 0x1000000, 0x0200000, CRC(afce54ed) SHA1(1d2933d64790612918adbaabcd2a82dad79953c9) ) /* GFX only */ - ROM_FILL( 0x1200000, 0x0200000, 0x00 ) /* Empty */ - - ROM_REGION( 0x0c00000, "gfx2", 0 ) /* Temporary storage */ - ROM_LOAD( "sb_ic44.ic44", 0x0000000, 0x0400000, CRC(1bbe88bc) SHA1(15bce9ada2b742ba4d537fa8efc0f29f661bff00) ) /* GFX only */ - ROM_LOAD( "sb_ic45.ic45", 0x0400000, 0x0400000, CRC(373983d9) SHA1(05e35a8b27cab469885f0ec2a5df200a366b50a1) ) /* Sound only */ - ROM_LOAD( "sb_ic46.ic46", 0x0800000, 0x0400000, CRC(22e7c648) SHA1(baddb9bc13accd83bea61533d7286cf61cd89279) ) /* GFX only */ + ROM_REGION( 0x100000, "maincpu", 0 ) // 68000 code + ROM_LOAD16_BYTE( "sb_53.ic53", 0x000000, 0x080000, CRC(e4eaefd4) SHA1(c7de2ae3a4a919fbe16d4997e3f9e2303b8c96b1) ) // Version 2.0 program roms + ROM_LOAD16_BYTE( "sb_55.ic55", 0x000001, 0x080000, CRC(e2476994) SHA1(2ad18652a1fc6ac058c8399373fb77e7a81d5bbd) ) // Version 2.0 program roms + + ROM_REGION( 0x1400000, "gfx", 0 ) // GFX + Sound + // 0x0000000-0x0ffffff filled in in the DRIVER_INIT + ROM_LOAD( "sb_ic43.ic43", 0x1000000, 0x0200000, CRC(afce54ed) SHA1(1d2933d64790612918adbaabcd2a82dad79953c9) ) // GFX only + ROM_FILL( 0x1200000, 0x0200000, 0x00 ) // Empty + + ROM_REGION( 0x0c00000, "gfx_temp", 0 ) // Temporary storage + ROM_LOAD( "sb_ic44.ic44", 0x0000000, 0x0400000, CRC(1bbe88bc) SHA1(15bce9ada2b742ba4d537fa8efc0f29f661bff00) ) // GFX only + ROM_LOAD( "sb_ic45.ic45", 0x0400000, 0x0400000, CRC(373983d9) SHA1(05e35a8b27cab469885f0ec2a5df200a366b50a1) ) // Sound only + ROM_LOAD( "sb_ic46.ic46", 0x0800000, 0x0400000, CRC(22e7c648) SHA1(baddb9bc13accd83bea61533d7286cf61cd89279) ) // GFX only ROM_END ROM_START( snowboar ) - ROM_REGION( 0x100000, "maincpu", 0 ) /* 68000 code */ - ROM_LOAD16_BYTE( "sb.53", 0x000000, 0x080000, CRC(4742749e) SHA1(933e39893ab74895ae4a99a932f8245a03ea0b5d) ) /* Version 2.1 program roms */ - ROM_LOAD16_BYTE( "sb.55", 0x000001, 0x080000, CRC(6ddc431f) SHA1(8801c0cf1711bb956447ba1e631db28bd075caea) ) /* Version 2.1 program roms */ - - ROM_REGION( 0x1400000, "gfx1", 0 ) /* GFX + Sound */ - ROM_LOAD( "sb.a0", 0x0000000, 0x0080000, CRC(aa476e44) SHA1(2b87689489b9619e9e5ca32c3e3d2aec8ef31c88) ) /* GFX only */ - ROM_LOAD( "sb.a1", 0x0080000, 0x0080000, CRC(6bc99195) SHA1(276e9383fac9cb5141b23ffdf381b0d7e60a6861) ) /* GFX only */ - ROM_LOAD( "sb.a2", 0x0100000, 0x0080000, CRC(fae2ebba) SHA1(653a12846abe4de36f5565c3bf849fce7c2893b6) ) /* GFX only */ - ROM_LOAD( "sb.a3", 0x0180000, 0x0080000, CRC(17ed9cf8) SHA1(c6cab61bbba3b2b1d06b64a68313946299205cc5) ) /* GFX only */ - ROM_LOAD( "sb.a4", 0x0200000, 0x0080000, CRC(2ba3a5c8) SHA1(93de0382cbb41806ae3349ce7cfecdc1404bfb88) ) /* Sound only */ - ROM_LOAD( "sb.a5", 0x0280000, 0x0080000, CRC(ae011eb3) SHA1(17223404640c55637364fa6e51cf07d8e64df085) ) /* Sound only */ - ROM_FILL( 0x0300000, 0x0100000, 0x00 ) /* Empty */ - ROM_LOAD( "sb.b0", 0x0400000, 0x0080000, CRC(96c714cd) SHA1(c6225c43b88531a70436cc8a631b8ba401903e45) ) /* GFX only */ - ROM_LOAD( "sb.b1", 0x0480000, 0x0080000, CRC(39a4c30c) SHA1(4598a68ef41483ba372aa3a40383de8eb70d706e) ) /* GFX only */ - ROM_LOAD( "sb.b2", 0x0500000, 0x0080000, CRC(b58fcdd6) SHA1(21a8c00778be77165f89421fb2e3123244cf02c6) ) /* GFX only */ - ROM_LOAD( "sb.b3", 0x0580000, 0x0080000, CRC(96afdebf) SHA1(880cfb365efa93bbee882aeb483ad6d75d8b7430) ) /* GFX only */ - ROM_LOAD( "sb.b4", 0x0600000, 0x0080000, CRC(e62cf8df) SHA1(8df8df45d99967e52dcec5b589246799f7a39601) ) /* Sound only */ - ROM_LOAD( "sb.b5", 0x0680000, 0x0080000, CRC(caa90856) SHA1(a8f18a878b211366faaf66911c09d0452770cc3f) ) /* Sound only */ - ROM_FILL( 0x0700000, 0x0100000, 0x00 ) /* Empty */ - ROM_LOAD( "sb.c0", 0x0800000, 0x0080000, CRC(c9d57a71) SHA1(4e8b7d821e31afc0750db283470f9c76bceb54da) ) /* GFX only */ - ROM_LOAD( "sb.c1", 0x0880000, 0x0080000, CRC(1d14a3d4) SHA1(eb89cadfe331f77dbc0463151574ba801c248238) ) /* GFX only */ - ROM_LOAD( "sb.c2", 0x0900000, 0x0080000, CRC(55026352) SHA1(7b92f45624dbd122c29e44f82c3c2ffded190efa) ) /* GFX only */ - ROM_LOAD( "sb.c3", 0x0980000, 0x0080000, CRC(d9b62dee) SHA1(409ab4d9a6f9341cf59510c130c705d1ec42d1b3) ) /* GFX only */ - ROM_FILL( 0x0a00000, 0x0200000, 0x00 ) /* Empty */ - ROM_LOAD( "sb.d0", 0x0c00000, 0x0080000, CRC(7434c1ae) SHA1(8e0e6567a461c694a8ba2de5d4cf9ad73e0c83c8) ) /* GFX only */ - ROM_LOAD( "sb.d1", 0x0c80000, 0x0080000, CRC(f00cc6c8) SHA1(b4835e2187e1a985993471d09495cbc1f5cd9417) ) /* GFX only */ - ROM_LOAD( "sb.d2", 0x0d00000, 0x0080000, CRC(019f9aec) SHA1(1a97b84ebbf57e860792ef7a7dc6f51553ae3e26) ) /* GFX only */ - ROM_LOAD( "sb.d3", 0x0d80000, 0x0080000, CRC(d05bd286) SHA1(9eff6f5a4755375b7a16b9d4967a0df933e1b9c4) ) /* GFX only */ - ROM_FILL( 0x0e00000, 0x0200000, 0x00 ) /* Empty */ - ROM_LOAD( "sb.e0", 0x1000000, 0x0080000, CRC(e6195323) SHA1(5ba1cb750dd8cfd0721905174bda6cfbf8c8e694) ) /* GFX only */ - ROM_LOAD( "sb.e1", 0x1080000, 0x0080000, CRC(9f38910b) SHA1(0243c19c7b1bdd3361fc6e177c64528bacafcc33) ) /* GFX only */ - ROM_LOAD( "sb.e2", 0x1100000, 0x0080000, CRC(f5948c6c) SHA1(91bba817ced194b02885ce84b7a8132ef5ca631a) ) /* GFX only */ - ROM_LOAD( "sb.e3", 0x1180000, 0x0080000, CRC(4baa678f) SHA1(a7fbbd687e2d8d7e96207c8ace0799a3cc9c3272) ) /* GFX only */ - ROM_FILL( 0x1200000, 0x0200000, 0x00 ) /* Empty */ + ROM_REGION( 0x100000, "maincpu", 0 ) // 68000 code + ROM_LOAD16_BYTE( "sb.53", 0x000000, 0x080000, CRC(4742749e) SHA1(933e39893ab74895ae4a99a932f8245a03ea0b5d) ) // Version 2.1 program roms + ROM_LOAD16_BYTE( "sb.55", 0x000001, 0x080000, CRC(6ddc431f) SHA1(8801c0cf1711bb956447ba1e631db28bd075caea) ) // Version 2.1 program roms + + ROM_REGION( 0x1400000, "gfx", 0 ) // GFX + Sound + ROM_LOAD( "sb.a0", 0x0000000, 0x0080000, CRC(aa476e44) SHA1(2b87689489b9619e9e5ca32c3e3d2aec8ef31c88) ) // GFX only + ROM_LOAD( "sb.a1", 0x0080000, 0x0080000, CRC(6bc99195) SHA1(276e9383fac9cb5141b23ffdf381b0d7e60a6861) ) // GFX only + ROM_LOAD( "sb.a2", 0x0100000, 0x0080000, CRC(fae2ebba) SHA1(653a12846abe4de36f5565c3bf849fce7c2893b6) ) // GFX only + ROM_LOAD( "sb.a3", 0x0180000, 0x0080000, CRC(17ed9cf8) SHA1(c6cab61bbba3b2b1d06b64a68313946299205cc5) ) // GFX only + ROM_LOAD( "sb.a4", 0x0200000, 0x0080000, CRC(2ba3a5c8) SHA1(93de0382cbb41806ae3349ce7cfecdc1404bfb88) ) // Sound only + ROM_LOAD( "sb.a5", 0x0280000, 0x0080000, CRC(ae011eb3) SHA1(17223404640c55637364fa6e51cf07d8e64df085) ) // Sound only + ROM_FILL( 0x0300000, 0x0100000, 0x00 ) // Empty + ROM_LOAD( "sb.b0", 0x0400000, 0x0080000, CRC(96c714cd) SHA1(c6225c43b88531a70436cc8a631b8ba401903e45) ) // GFX only + ROM_LOAD( "sb.b1", 0x0480000, 0x0080000, CRC(39a4c30c) SHA1(4598a68ef41483ba372aa3a40383de8eb70d706e) ) // GFX only + ROM_LOAD( "sb.b2", 0x0500000, 0x0080000, CRC(b58fcdd6) SHA1(21a8c00778be77165f89421fb2e3123244cf02c6) ) // GFX only + ROM_LOAD( "sb.b3", 0x0580000, 0x0080000, CRC(96afdebf) SHA1(880cfb365efa93bbee882aeb483ad6d75d8b7430) ) // GFX only + ROM_LOAD( "sb.b4", 0x0600000, 0x0080000, CRC(e62cf8df) SHA1(8df8df45d99967e52dcec5b589246799f7a39601) ) // Sound only + ROM_LOAD( "sb.b5", 0x0680000, 0x0080000, CRC(caa90856) SHA1(a8f18a878b211366faaf66911c09d0452770cc3f) ) // Sound only + ROM_FILL( 0x0700000, 0x0100000, 0x00 ) // Empty + ROM_LOAD( "sb.c0", 0x0800000, 0x0080000, CRC(c9d57a71) SHA1(4e8b7d821e31afc0750db283470f9c76bceb54da) ) // GFX only + ROM_LOAD( "sb.c1", 0x0880000, 0x0080000, CRC(1d14a3d4) SHA1(eb89cadfe331f77dbc0463151574ba801c248238) ) // GFX only + ROM_LOAD( "sb.c2", 0x0900000, 0x0080000, CRC(55026352) SHA1(7b92f45624dbd122c29e44f82c3c2ffded190efa) ) // GFX only + ROM_LOAD( "sb.c3", 0x0980000, 0x0080000, CRC(d9b62dee) SHA1(409ab4d9a6f9341cf59510c130c705d1ec42d1b3) ) // GFX only + ROM_FILL( 0x0a00000, 0x0200000, 0x00 ) // Empty + ROM_LOAD( "sb.d0", 0x0c00000, 0x0080000, CRC(7434c1ae) SHA1(8e0e6567a461c694a8ba2de5d4cf9ad73e0c83c8) ) // GFX only + ROM_LOAD( "sb.d1", 0x0c80000, 0x0080000, CRC(f00cc6c8) SHA1(b4835e2187e1a985993471d09495cbc1f5cd9417) ) // GFX only + ROM_LOAD( "sb.d2", 0x0d00000, 0x0080000, CRC(019f9aec) SHA1(1a97b84ebbf57e860792ef7a7dc6f51553ae3e26) ) // GFX only + ROM_LOAD( "sb.d3", 0x0d80000, 0x0080000, CRC(d05bd286) SHA1(9eff6f5a4755375b7a16b9d4967a0df933e1b9c4) ) // GFX only + ROM_FILL( 0x0e00000, 0x0200000, 0x00 ) // Empty + ROM_LOAD( "sb.e0", 0x1000000, 0x0080000, CRC(e6195323) SHA1(5ba1cb750dd8cfd0721905174bda6cfbf8c8e694) ) // GFX only + ROM_LOAD( "sb.e1", 0x1080000, 0x0080000, CRC(9f38910b) SHA1(0243c19c7b1bdd3361fc6e177c64528bacafcc33) ) // GFX only + ROM_LOAD( "sb.e2", 0x1100000, 0x0080000, CRC(f5948c6c) SHA1(91bba817ced194b02885ce84b7a8132ef5ca631a) ) // GFX only + ROM_LOAD( "sb.e3", 0x1180000, 0x0080000, CRC(4baa678f) SHA1(a7fbbd687e2d8d7e96207c8ace0799a3cc9c3272) ) // GFX only + ROM_FILL( 0x1200000, 0x0200000, 0x00 ) // Empty ROM_END /*============================================================================ @@ -2266,13 +2264,13 @@ ROM_END template int wrally2_state::wrally2_analog_bit_r() { - return (m_analog_ports[N] >> 7) & 0x01; + return BIT(m_analog_ports[N], 7); } void wrally2_state::wrally2_adc_clk(int state) { - /* a zero/one combo is written here to clock the next analog port bit */ + // a zero/one combo is written here to clock the next analog port bit if (!state) { m_analog_ports[0] <<= 1; @@ -2283,29 +2281,29 @@ void wrally2_state::wrally2_adc_clk(int state) void wrally2_state::wrally2_adc_cs(int state) { - /* a zero is written here to read the analog ports, and a one is written when finished */ + // a zero is written here to read the analog ports, and a one is written when finished if (!state) { - m_analog_ports[0] = m_analog0->read(); - m_analog_ports[1] = m_analog1->read(); + m_analog_ports[0] = m_analog[0]->read(); + m_analog_ports[1] = m_analog[1]->read(); } } void wrally2_state::wrally2_map(address_map &map) { - map(0x000000, 0x0fffff).rom(); /* ROM */ - map(0x200000, 0x20ffff).ram().w(FUNC(wrally2_state::vram_w)).share("spriteram"); /* Video RAM */ - map(0x202890, 0x2028ff).rw("gaelco", FUNC(gaelco_gae1_device::gaelcosnd_r), FUNC(gaelco_gae1_device::gaelcosnd_w)); /* Sound Registers */ - map(0x210000, 0x211fff).ram().w(FUNC(wrally2_state::palette_w)).share("paletteram"); /* Palette */ - map(0x212000, 0x213fff).ram(); /* Extra RAM */ - map(0x218004, 0x218009).ram().w(FUNC(wrally2_state::vregs_w)).share("vregs"); /* Video Registers */ - map(0x300000, 0x300001).portr("IN0"); /* DIPSW #2 + Inputs 1P */ - map(0x300002, 0x300003).portr("IN1"); /* DIPSW #1 */ - map(0x300004, 0x300005).portr("IN2"); /* Inputs 2P + COINSW */ - map(0x300006, 0x300007).portr("IN3"); /* SERVICESW */ - map(0x400000, 0x400001).select(0x0038).w(FUNC(wrally2_state::wrally2_latch_w)); /* Coin counters, etc. */ - map(0xfe0000, 0xfe7fff).ram(); /* Work RAM */ - map(0xfe8000, 0xfeffff).ram().share("shareram"); /* Work RAM (shared with D5002FP) */ + map(0x000000, 0x0fffff).rom(); // ROM + map(0x200000, 0x20ffff).ram().w(FUNC(wrally2_state::vram_w)).share("spriteram"); // Video RAM + map(0x202890, 0x2028ff).rw("gaelco", FUNC(gaelco_gae1_device::gaelcosnd_r), FUNC(gaelco_gae1_device::gaelcosnd_w)); // Sound Registers + map(0x210000, 0x211fff).ram().w(FUNC(wrally2_state::palette_w)).share(m_paletteram); // Palette + map(0x212000, 0x213fff).ram(); // Extra RAM + map(0x218004, 0x218009).ram().w(FUNC(wrally2_state::vregs_w)).share(m_vregs); // Video Registers + map(0x300000, 0x300001).portr("IN0"); // DIPSW #2 + Inputs 1P + map(0x300002, 0x300003).portr("IN1"); // DIPSW #1 + map(0x300004, 0x300005).portr("IN2"); // Inputs 2P + COINSW + map(0x300006, 0x300007).portr("IN3"); // SERVICESW + map(0x400000, 0x400001).select(0x0038).w(FUNC(wrally2_state::wrally2_latch_w)); // Coin counters, etc. + map(0xfe0000, 0xfe7fff).ram(); // Work RAM + map(0xfe8000, 0xfeffff).ram().share(m_shareram); // Work RAM (shared with D5002FP) } @@ -2317,7 +2315,7 @@ static INPUT_PORTS_START( wrally2 ) PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1) PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) PORT_NAME("P1 Acc.") PORT_BIT( 0x0020, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_PLAYER(1) PORT_NAME("P1 Gear") PORT_TOGGLE - PORT_BIT( 0x0040, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_READ_LINE_MEMBER(wrally2_state, wrally2_analog_bit_r<0>) /* ADC_1 serial input */ + PORT_BIT( 0x0040, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_READ_LINE_MEMBER(wrally2_state, wrally2_analog_bit_r<0>) // ADC_1 serial input PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_START1 ) PORT_SERVICE_DIPLOC( 0x0100, IP_ACTIVE_LOW, "SW2:1" ) PORT_DIPNAME( 0x0200, 0x0000, "Coin mechanism" ) PORT_DIPLOCATION("SW2:2") @@ -2375,7 +2373,7 @@ static INPUT_PORTS_START( wrally2 ) PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2) PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) PORT_NAME("P2 Acc.") PORT_BIT( 0x0020, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_PLAYER(2) PORT_NAME("P2 Gear") PORT_TOGGLE - PORT_BIT( 0x0040, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_READ_LINE_MEMBER(wrally2_state, wrally2_analog_bit_r<1>) /* ADC_2 serial input */ + PORT_BIT( 0x0040, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_READ_LINE_MEMBER(wrally2_state, wrally2_analog_bit_r<1>) // ADC_2 serial input PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_START2 ) PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_COIN2 ) @@ -2384,37 +2382,37 @@ static INPUT_PORTS_START( wrally2 ) PORT_START("IN3") PORT_BIT( 0x00ff, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_SERVICE1 ) - PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_SERVICE3 ) /* go to test mode NOW */ + PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_SERVICE3 ) // go to test mode NOW PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_SERVICE2 ) PORT_BIT( 0xf800, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_START("FAKE") /* Fake: To switch between monitors at run time */ + PORT_START("FAKE") // Fake: To switch between monitors at run time PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_SERVICE4 ) PORT_TOGGLE - PORT_START("ANALOG0") /* steering wheel player 1 */ + PORT_START("ANALOG0") // steering wheel player 1 PORT_BIT( 0xff, 0x8A, IPT_PADDLE ) PORT_MINMAX(0x00,0xff) PORT_SENSITIVITY(25) PORT_KEYDELTA(25) PORT_REVERSE PORT_NAME("P1 Wheel") - PORT_START("ANALOG1") /* steering wheel player 2 */ + PORT_START("ANALOG1") // steering wheel player 2 PORT_BIT( 0xff, 0x8A, IPT_PADDLE_V ) PORT_MINMAX(0x00,0xff) PORT_SENSITIVITY(25) PORT_KEYDELTA(25) PORT_REVERSE PORT_NAME("P2 Wheel") INPUT_PORTS_END void wrally2_state::wrally2(machine_config &config) { - /* basic machine hardware */ - M68000(config, m_maincpu, XTAL(26'000'000) / 2); /* 13 MHz */ + // basic machine hardware + M68000(config, m_maincpu, XTAL(26'000'000) / 2); // 13 MHz m_maincpu->set_addrmap(AS_PROGRAM, &wrally2_state::wrally2_map); m_maincpu->set_vblank_int("lscreen", FUNC(gaelco2_state::irq6_line_hold)); - GAELCO_DS5002FP(config, "gaelco_ds5002fp", XTAL(26'000'000) / 2).set_addrmap(0, &wrally2_state::mcu_hostmem_map); /* 13 MHz */ + GAELCO_DS5002FP(config, "gaelco_ds5002fp", XTAL(26'000'000) / 2).set_addrmap(0, &wrally2_state::mcu_hostmem_map); // 13 MHz config.set_perfect_quantum("gaelco_ds5002fp:mcu"); LS259(config, m_mainlatch); // IC6 m_mainlatch->q_out_cb<0>().set(FUNC(gaelco2_state::coin1_counter_w)); m_mainlatch->q_out_cb<1>().set(FUNC(gaelco2_state::coin2_counter_w)); - m_mainlatch->q_out_cb<5>().set(FUNC(wrally2_state::wrally2_adc_clk)); /* ADCs clock-in line */ - m_mainlatch->q_out_cb<6>().set(FUNC(wrally2_state::wrally2_adc_cs)); /* ADCs chip select line */ + m_mainlatch->q_out_cb<5>().set(FUNC(wrally2_state::wrally2_adc_clk)); // ADCs clock-in line + m_mainlatch->q_out_cb<6>().set(FUNC(wrally2_state::wrally2_adc_cs)); // ADCs chip select line - /* video hardware */ + // video hardware BUFFERED_SPRITERAM16(config, m_spriteram); GFXDECODE(config, m_gfxdecode, m_palette, gfx_gaelco2); PALETTE(config, m_palette).set_entries(0x10000); @@ -2422,31 +2420,31 @@ void wrally2_state::wrally2(machine_config &config) screen_device &lscreen(SCREEN(config, "lscreen", SCREEN_TYPE_RASTER)); lscreen.set_refresh_hz(59.1); - lscreen.set_vblank_time(ATTOSECONDS_IN_USEC(2500)); /* not accurate */ + lscreen.set_vblank_time(ATTOSECONDS_IN_USEC(2500)); // not accurate lscreen.set_size(384, 32*16); lscreen.set_visarea(0, 384-1, 16, 256-1); - lscreen.set_screen_update(FUNC(gaelco2_state::screen_update_left)); + lscreen.set_screen_update(FUNC(wrally2_state::screen_update_left)); lscreen.set_palette(m_palette); screen_device &rscreen(SCREEN(config, "rscreen", SCREEN_TYPE_RASTER)); rscreen.set_refresh_hz(59.1); - rscreen.set_vblank_time(ATTOSECONDS_IN_USEC(2500)); /* not accurate */ + rscreen.set_vblank_time(ATTOSECONDS_IN_USEC(2500)); // not accurate rscreen.set_size(384, 32*16); rscreen.set_visarea(0, 384-1, 16, 256-1); - rscreen.set_screen_update(FUNC(gaelco2_state::screen_update_right)); + rscreen.set_screen_update(FUNC(wrally2_state::screen_update_right)); rscreen.screen_vblank().set(m_spriteram, FUNC(buffered_spriteram16_device::vblank_copy_rising)); rscreen.set_palette(m_palette); - MCFG_VIDEO_START_OVERRIDE(gaelco2_state,gaelco2_dual) + MCFG_VIDEO_START_OVERRIDE(wrally2_state,gaelco2_dual) - /* sound hardware */ + // sound hardware /* the chip is stereo, but the game sound is mono because the right channel output is for cabinet 1 and the left channel output is for cabinet 2 */ SPEAKER(config, "lspeaker").front_left(); SPEAKER(config, "rspeaker").front_right(); gaelco_gae1_device &gaelco(GAELCO_GAE1(config, "gaelco", XTAL(34'000'000) / 34)); - gaelco.set_device_rom_tag("gfx1"); + gaelco.set_device_rom_tag("gfx"); gaelco.set_bank_offsets(0 * 0x0200000, 1 * 0x0200000, 0, 0); gaelco.add_route(0, "rspeaker", 1.0); gaelco.add_route(1, "lspeaker", 1.0); @@ -2668,11 +2666,11 @@ ROM_START( wrally2 ) // REF: 950510-1 DS5002FP_SET_RPCTL( 0x00 ) DS5002FP_SET_CRCR( 0x80 ) - ROM_REGION( 0x0a00000, "gfx1", 0 ) // GFX + Sound + ROM_REGION( 0x0a00000, "gfx", 0 ) // GFX + Sound // 0x0000000-0x06fffff filled in in the DRIVER_INIT ROM_LOAD( "wr2_ic68.ic68", 0x0800000, 0x0100000, CRC(4a75ffaa) SHA1(ffae561ad4fa100398ab6b94d8dcb13e9fae4272) ) // GFX only - read as 27C801 - ROM_REGION( 0x0600000, "gfx2", 0 ) // Temporary storage + ROM_REGION( 0x0600000, "gfx_temp", 0 ) // Temporary storage ROM_LOAD( "wr2_ic69.ic69", 0x0000000, 0x0400000, CRC(a174d196) SHA1(4a7da1cd288e73518143a027782f3140e6582cf4) ) // GFX & Sound - read as 27C332 ROM_LOAD( "wr2_ic70.ic70", 0x0400000, 0x0200000, CRC(8d1e43ba) SHA1(79eed51788c6c55a4347be70a3be4eb14a0d1747) ) // GFX only - read as 27C160 ROM_END @@ -2717,7 +2715,7 @@ ROM_START( wrally2a ) // REF: 950510 DS5002FP_SET_RPCTL( 0x00 ) DS5002FP_SET_CRCR( 0x80 ) - ROM_REGION( 0x0a00000, "gfx1", 0 ) // GFX + Sound + ROM_REGION( 0x0a00000, "gfx", 0 ) // GFX + Sound ROM_LOAD( "wr2.16d", 0x0000000, 0x0080000, CRC(ad26086b) SHA1(487ffaaca57c9d030fc486b8cae6735ee40a0ac3) ) // GFX only ROM_LOAD( "wr2.17d", 0x0080000, 0x0080000, CRC(c1ec0745) SHA1(a6c3ce9c889e6a53f4155f54d6655825af34a35b) ) // GFX only ROM_LOAD( "wr2.18d", 0x0100000, 0x0080000, CRC(e3617814) SHA1(9f9514052bb07d7e243f33b11bae409a444b7d9f) ) // Sound only @@ -2739,46 +2737,46 @@ ROM_END -GAME( 1994, aligator, 0, alighunt_d5002fp, alighunt, gaelco2_state, init_alighunt, ROT0, "Gaelco", "Alligator Hunt (World, protected)", 0 ) -GAME( 1994, aligators, aligator, alighunt_d5002fp, alighunt, gaelco2_state, init_alighunt, ROT0, "Gaelco", "Alligator Hunt (Spain, protected)", 0 ) -GAME( 1994, aligatorun, aligator, alighunt, alighunt, gaelco2_state, init_alighunt, ROT0, "Gaelco", "Alligator Hunt (unprotected, set 1)", 0 ) -GAME( 1994, aligatoruna, aligator, alighunt, alighunt, gaelco2_state, init_alighunt, ROT0, "Gaelco", "Alligator Hunt (unprotected, set 2)", 0 ) // strange version, starts on space stages, but clearly a recompile not a trivial hack of the above, show version maybe? -GAME( 1994, aligatorp, aligator, alighunt_d5002fp, alighunt, gaelco2_state, empty_init, ROT0, "Gaelco", "Alligator Hunt (protected, prototype?)", MACHINE_NOT_WORKING ) // requires different protection program / data +GAME( 1994, aligator, 0, alighunt_d5002fp, alighunt, gaelco2_state, init_alighunt, ROT0, "Gaelco", "Alligator Hunt (World, protected)", 0 ) +GAME( 1994, aligators, aligator, alighunt_d5002fp, alighunt, gaelco2_state, init_alighunt, ROT0, "Gaelco", "Alligator Hunt (Spain, protected)", 0 ) +GAME( 1994, aligatorun, aligator, alighunt, alighunt, gaelco2_state, init_alighunt, ROT0, "Gaelco", "Alligator Hunt (unprotected, set 1)", 0 ) +GAME( 1994, aligatoruna, aligator, alighunt, alighunt, gaelco2_state, init_alighunt, ROT0, "Gaelco", "Alligator Hunt (unprotected, set 2)", 0 ) // strange version, starts on space stages, but clearly a recompile not a trivial hack of the above, show version maybe? +GAME( 1994, aligatorp, aligator, alighunt_d5002fp, alighunt, gaelco2_state, empty_init, ROT0, "Gaelco", "Alligator Hunt (protected, prototype?)", MACHINE_NOT_WORKING ) // requires different protection program / data -GAME( 1995, touchgo, 0, touchgo_d5002fp, touchgo, gaelco2_state, init_touchgo, ROT0, "Gaelco", "Touch and Go (World)", 0 ) -GAME( 1995, touchgon, touchgo, touchgo_d5002fp, touchgo, gaelco2_state, init_touchgo, ROT0, "Gaelco", "Touch and Go (Non North America)", 0 ) -GAME( 1995, touchgoe, touchgo, touchgo_d5002fp, touchgo, gaelco2_state, init_touchgo, ROT0, "Gaelco", "Touch and Go (earlier revision)", 0 ) -GAME( 1995, touchgok, touchgo, touchgo, touchgo, gaelco2_state, init_touchgo, ROT0, "Gaelco", "Touch and Go (Korea, unprotected)", 0 ) // doesn't say 'Korea' but was sourced there, shows 2 copyright lines like the 'earlier revision' +GAME( 1995, touchgo, 0, touchgo_d5002fp, touchgo, gaelco2_state, init_touchgo, ROT0, "Gaelco", "Touch and Go (World)", 0 ) +GAME( 1995, touchgon, touchgo, touchgo_d5002fp, touchgo, gaelco2_state, init_touchgo, ROT0, "Gaelco", "Touch and Go (Non North America)", 0 ) +GAME( 1995, touchgoe, touchgo, touchgo_d5002fp, touchgo, gaelco2_state, init_touchgo, ROT0, "Gaelco", "Touch and Go (earlier revision)", 0 ) +GAME( 1995, touchgok, touchgo, touchgo, touchgo, gaelco2_state, init_touchgo, ROT0, "Gaelco", "Touch and Go (Korea, unprotected)", 0 ) // doesn't say 'Korea' but was sourced there, shows 2 copyright lines like the 'earlier revision' -GAME( 1995, wrally2, 0, wrally2, wrally2, wrally2_state, init_wrally2, ROT0, "Gaelco", "World Rally 2: Twin Racing (mask ROM version)", 0 ) -GAME( 1995, wrally2a, wrally2, wrally2, wrally2, wrally2_state, empty_init, ROT0, "Gaelco", "World Rally 2: Twin Racing (EPROM version)", 0 ) +GAME( 1995, wrally2, 0, wrally2, wrally2, wrally2_state, init_wrally2, ROT0, "Gaelco", "World Rally 2: Twin Racing (mask ROM version)", 0 ) +GAME( 1995, wrally2a, wrally2, wrally2, wrally2, wrally2_state, empty_init, ROT0, "Gaelco", "World Rally 2: Twin Racing (EPROM version)", 0 ) // All sets identify as Version 1.0, but are clearly different revisions -GAME( 1996, maniacsq, 0, maniacsq_d5002fp, maniacsq, gaelco2_state, empty_init, ROT0, "Gaelco", "Maniac Square (protected, Version 1.0, Checksum DEEE)", 0 ) -GAME( 1996, maniacsqa, maniacsq, maniacsq_d5002fp, maniacsq, gaelco2_state, empty_init, ROT0, "Gaelco", "Maniac Square (protected, Version 1.0, Checksum CF2D)", 0 ) -GAME( 1996, maniacsqu, maniacsq, maniacsq, maniacsq, gaelco2_state, empty_init, ROT0, "Gaelco", "Maniac Square (unprotected, Version 1.0, Checksum BB73)", 0 ) -GAME( 1996, maniacsqs, maniacsq, maniacsqs, snowboar, gaelco2_state, empty_init, ROT0, "Gaelco", "Maniac Square (unprotected, Version 1.0, Checksum 66B1, 960419/1 PCB)", 0 ) // Official version on Snow Board Championship PCB, doesn't use the protection +GAME( 1996, maniacsq, 0, maniacsq_d5002fp, maniacsq, gaelco2_state, empty_init, ROT0, "Gaelco", "Maniac Square (protected, Version 1.0, Checksum DEEE)", 0 ) +GAME( 1996, maniacsqa, maniacsq, maniacsq_d5002fp, maniacsq, gaelco2_state, empty_init, ROT0, "Gaelco", "Maniac Square (protected, Version 1.0, Checksum CF2D)", 0 ) +GAME( 1996, maniacsqu, maniacsq, maniacsq, maniacsq, gaelco2_state, empty_init, ROT0, "Gaelco", "Maniac Square (unprotected, Version 1.0, Checksum BB73)", 0 ) +GAME( 1996, maniacsqs, maniacsq, maniacsqs, snowboar, snowboar_state, empty_init, ROT0, "Gaelco", "Maniac Square (unprotected, Version 1.0, Checksum 66B1, 960419/1 PCB)", 0 ) // Official version on Snow Board Championship PCB, doesn't use the protection -GAME( 1996, snowboar, 0, snowboar, snowboar, gaelco2_state, init_snowboar, ROT0, "Gaelco", "Snow Board Championship (Version 2.1)", 0 ) -GAME( 1996, snowboara, snowboar, snowboar, snowboar, gaelco2_state, init_snowboara, ROT0, "Gaelco", "Snow Board Championship (Version 2.0)", 0 ) +GAME( 1997, snowboar, 0, snowboar, snowboar, snowboar_state, empty_init, ROT0, "Gaelco / OMK", "Snow Board Championship (Version 2.1)", 0 ) +GAME( 1996, snowboara, snowboar, snowboar, snowboar, snowboar_state, init_snowboara, ROT0, "Gaelco / OMK", "Snow Board Championship (Version 2.0)", 0 ) -GAME( 1998, bang, 0, bang, bang, bang_state, init_bang, ROT0, "Gaelco", "Bang!", 0 ) -GAME( 1998, bangj, bang, bang, bang, bang_state, init_bang, ROT0, "Gaelco", "Gun Gabacho (Japan)", 0 ) +GAME( 1998, bang, 0, bang, bang, bang_state, empty_init, ROT0, "Gaelco / Bit Managers", "Bang!", 0 ) +GAME( 1999, bangj, bang, bang, bang, bang_state, empty_init, ROT0, "Gaelco / Bit Managers (GM Shoji license)", "Gun Gabacho (Japan)", 0 ) // Hardware manufactured by Gaelco for Nova Desitec but without any Gaelco branding. // 2-in-1 gambling game, these are Italian versions, English versions also exist -GAME( 1999, play2000, 0, play2000, play2000, gaelco2_state, init_play2000, ROT0, "Nova Desitec", "Play 2000 (Super Slot & Gran Tesoro) (v7.0i) (Italy)", 0 ) -GAME( 1999, play2000_50i,play2000, play2000, play2000, gaelco2_state, empty_init, ROT0, "Nova Desitec", "Play 2000 (Super Slot & Gran Tesoro) (v5.0i) (Italy)", MACHINE_NOT_WORKING ) // bad dump -GAME( 1999, play2000_40i,play2000, play2000, play2000, gaelco2_state, init_play2000, ROT0, "Nova Desitec", "Play 2000 (Super Slot & Gran Tesoro) (v4.0i) (Italy)", 0 ) +GAME( 1999, play2000, 0, play2000, play2000, gaelco2_state, init_play2000, ROT0, "Nova Desitec", "Play 2000 (Super Slot & Gran Tesoro) (v7.0i) (Italy)", 0 ) +GAME( 1999, play2000_50i,play2000, play2000, play2000, gaelco2_state, empty_init, ROT0, "Nova Desitec", "Play 2000 (Super Slot & Gran Tesoro) (v5.0i) (Italy)", MACHINE_NOT_WORKING ) // bad dump +GAME( 1999, play2000_40i,play2000, play2000, play2000, gaelco2_state, init_play2000, ROT0, "Nova Desitec", "Play 2000 (Super Slot & Gran Tesoro) (v4.0i) (Italy)", 0 ) -GAME( 1998, srollnd, 0, srollnd, play2000, gaelco2_state, init_play2000, ROT0, "Nova Desitec", "Super Roller (v7.0)", MACHINE_NOT_WORKING ) // missing ds5002fp dump +GAME( 1998, srollnd, 0, srollnd, play2000, gaelco2_state, init_play2000, ROT0, "Nova Desitec", "Super Roller (v7.0)", MACHINE_NOT_WORKING ) // missing ds5002fp dump -GAME( 1999, chmppool, 0, srollnd, play2000, gaelco2_state, init_play2000, ROT0, "Nova Desitec", "Champion Pool (v1.0)", MACHINE_NOT_WORKING ) // missing ds5002fp dump +GAME( 1999, chmppool, 0, srollnd, play2000, gaelco2_state, init_play2000, ROT0, "Nova Desitec", "Champion Pool (v1.0)", MACHINE_NOT_WORKING ) // missing ds5002fp dump -GAME( 1999, jungleani, 0, srollnd, play2000, gaelco2_state, init_play2000, ROT0, "New Impeuropex Corp. / New Chitarrina", "Jungle's Animals (v3.0)", MACHINE_NOT_WORKING ) // Developed by Nova Desitec, missing ds5002fp dump +GAME( 1999, jungleani, 0, srollnd, play2000, gaelco2_state, init_play2000, ROT0, "New Impeuropex Corp. / New Chitarrina", "Jungle's Animals (v3.0)", MACHINE_NOT_WORKING ) // Developed by Nova Desitec, missing ds5002fp dump // Gym equipment -GAME( 1997, sltpcycl, 0, saltcrdi, saltcrdi, gaelco2_state, init_play2000, ROT0, "Salter Fitness / Gaelco", "Pro Cycle Tele Cardioline (Salter Fitness Bike V.1.0, Checksum 02AB)", 0 ) // Same board and ROM as Pro Reclimber -GAME( 1997, sltpstep, 0, saltcrdi, saltcrdi, gaelco2_state, init_play2000, ROT0, "Salter Fitness / Gaelco", "Pro Stepper Tele Cardioline (Salter Fitness Stepper V.1.0, Checksum F208)", 0 ) +GAME( 1997, sltpcycl, 0, saltcrdi, saltcrdi, gaelco2_state, init_play2000, ROT0, "Salter Fitness / Gaelco", "Pro Cycle Tele Cardioline (Salter Fitness Bike V.1.0, Checksum 02AB)", 0 ) // Same board and ROM as Pro Reclimber +GAME( 1997, sltpstep, 0, saltcrdi, saltcrdi, gaelco2_state, init_play2000, ROT0, "Salter Fitness / Gaelco", "Pro Stepper Tele Cardioline (Salter Fitness Stepper V.1.0, Checksum F208)", 0 ) // there are other devices in Cardioline series but they don't use displays and aren't on Gaelco hardware diff --git a/src/mame/gaelco/gaelco2.h b/src/mame/gaelco/gaelco2.h index 15fedb09ff4..ed03d41ebe1 100644 --- a/src/mame/gaelco/gaelco2.h +++ b/src/mame/gaelco/gaelco2.h @@ -19,11 +19,10 @@ class gaelco2_state : public driver_device m_eeprom(*this, "eeprom"), m_gfxdecode(*this, "gfxdecode"), m_palette(*this, "palette"), - m_global_spritexoff(0), m_vregs(*this, "vregs"), - m_snowboar_protection(*this, "snowboar_prot"), m_paletteram(*this, "paletteram"), - m_shareram(*this, "shareram") + m_shareram(*this, "shareram"), + m_global_spritexoff(0) { } void maniacsq_d5002fp(machine_config &config); @@ -32,22 +31,26 @@ class gaelco2_state : public driver_device void alighunt(machine_config &config); void touchgo(machine_config &config); void alighunt_d5002fp(machine_config &config); - void snowboar(machine_config &config); void maniacsq(machine_config &config); - void maniacsqs(machine_config &config); void touchgo_d5002fp(machine_config &config); void saltcrdi(machine_config &config); void init_touchgo(); - void init_snowboar(); - void init_snowboara(); void init_alighunt(); - void init_wrally2(); void init_play2000(); void coin1_counter_w(int state); void coin2_counter_w(int state); +protected: + void vram_w(offs_t offset, u16 data, u16 mem_mask = ~0); + void vregs_w(offs_t offset, u16 data, u16 mem_mask = ~0); + void palette_w(offs_t offset, u16 data, u16 mem_mask = ~0); + + void wrally2_latch_w(offs_t offset, u16 data); + + void ROM16_split_gfx(const char *src_reg, const char *dst_reg, int start, int length, int dest1, int dest2); + DECLARE_VIDEO_START(gaelco2); DECLARE_VIDEO_START(gaelco2_dual); @@ -55,7 +58,8 @@ class gaelco2_state : public driver_device u32 screen_update_left(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); u32 screen_update_right(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); -protected: + void mcu_hostmem_map(address_map &map); + required_device m_maincpu; optional_device m_mainlatch; required_device m_spriteram; @@ -63,13 +67,9 @@ class gaelco2_state : public driver_device required_device m_gfxdecode; required_device m_palette; - void vram_w(offs_t offset, u16 data, u16 mem_mask = ~0); - void vregs_w(offs_t offset, u16 data, u16 mem_mask = ~0); - void palette_w(offs_t offset, u16 data, u16 mem_mask = ~0); - - void wrally2_latch_w(offs_t offset, u16 data); - - void mcu_hostmem_map(address_map &map); + required_shared_ptr m_vregs; + required_shared_ptr m_paletteram; + optional_shared_ptr m_shareram; private: void shareram_w(offs_t offset, u8 data); @@ -77,19 +77,15 @@ class gaelco2_state : public driver_device void alighunt_coin_w(u16 data); void coin3_counter_w(int state); void coin4_counter_w(int state); - u16 snowboar_protection_r(); - void snowboar_protection_w(offs_t offset, u16 data, u16 mem_mask = ~0); template TILE_GET_INFO_MEMBER(get_tile_info); template TILE_GET_INFO_MEMBER(get_tile_info_dual); int get_rowscrollmode_yscroll(bool first_screen); void draw_sprites(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int mask); u32 dual_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int index); - void ROM16_split_gfx(const char *src_reg, const char *dst_reg, int start, int length, int dest1, int dest2); void alighunt_map(address_map &map); void maniacsq_map(address_map &map); void play2000_map(address_map &map); - void snowboar_map(address_map &map); void touchgo_map(address_map &map); void saltcrdi_map(address_map &map); void srollnd_map(address_map &map); @@ -98,17 +94,38 @@ class gaelco2_state : public driver_device u16 srollnd_share_sim_r(offs_t offset, u16 mem_mask = ~0); void srollnd_share_sim_w(offs_t offset, u16 data, u16 mem_mask = ~0); - u32 m_snowboard_latch = 0U; - u16 *m_videoram = nullptr; tilemap_t *m_pant[2]{}; - int m_dual_monitor = 0; - int m_global_spritexoff = 0; + bool m_dual_monitor = false; + int m_global_spritexoff; +}; - required_shared_ptr m_vregs; - optional_shared_ptr m_snowboar_protection; - required_shared_ptr m_paletteram; - optional_shared_ptr m_shareram; + +class snowboar_state : public gaelco2_state +{ +public: + snowboar_state(const machine_config &mconfig, device_type type, const char *tag) : + gaelco2_state(mconfig, type, tag), + m_snowboar_protection(*this, "snowboar_prot") + { } + + void maniacsqs(machine_config &config); + void snowboar(machine_config &config); + + void init_snowboara(); + +protected: + virtual void machine_start() override; + +private: + u16 snowboar_protection_r(); + void snowboar_protection_w(offs_t offset, u16 data, u16 mem_mask = ~0); + + void snowboar_map(address_map &map); + + required_shared_ptr m_snowboar_protection; + + u32 m_snowboard_latch = 0U; }; @@ -117,31 +134,26 @@ class bang_state : public gaelco2_state public: bang_state(const machine_config &mconfig, device_type type, const char *tag) : gaelco2_state(mconfig, type, tag) - , m_light0_x(*this, "LIGHT0_X") - , m_light0_y(*this, "LIGHT0_Y") - , m_light1_x(*this, "LIGHT1_X") - , m_light1_y(*this, "LIGHT1_Y") + , m_light_x(*this, "LIGHT%u_X", 0U) + , m_light_y(*this, "LIGHT%u_Y", 0U) {} void bang(machine_config &config); - void init_bang(); +protected: + virtual void machine_start() override; private: - required_ioport m_light0_x; - required_ioport m_light0_y; - required_ioport m_light1_x; - required_ioport m_light1_y; - - int m_clr_gun_int = 0; - - u16 p1_gun_x(); - u16 p1_gun_y(); - u16 p2_gun_x(); - u16 p2_gun_y(); + template u16 gun_x(); + template u16 gun_y(); void bang_clr_gun_int_w(u16 data); TIMER_DEVICE_CALLBACK_MEMBER(bang_irq); void bang_map(address_map &map); + + required_ioport_array<2> m_light_x; + required_ioport_array<2> m_light_y; + + bool m_clr_gun_int = false; }; @@ -150,21 +162,21 @@ class wrally2_state : public gaelco2_state public: wrally2_state(const machine_config &mconfig, device_type type, const char *tag) : gaelco2_state(mconfig, type, tag) - , m_analog0(*this, "ANALOG0") - , m_analog1(*this, "ANALOG1") + , m_analog(*this, "ANALOG%u", 0U) {} void wrally2(machine_config &config); + void init_wrally2(); + template int wrally2_analog_bit_r(); private: - required_ioport m_analog0; - required_ioport m_analog1; - - uint8_t m_analog_ports[2]{}; - void wrally2_adc_clk(int state); void wrally2_adc_cs(int state); void wrally2_map(address_map &map); + + required_ioport_array<2> m_analog; + + u8 m_analog_ports[2]{}; }; diff --git a/src/mame/gaelco/gaelco2_m.cpp b/src/mame/gaelco/gaelco2_m.cpp index 4d753049b9b..081f789069e 100644 --- a/src/mame/gaelco/gaelco2_m.cpp +++ b/src/mame/gaelco/gaelco2_m.cpp @@ -24,16 +24,14 @@ void gaelco2_state::ROM16_split_gfx(const char *src_reg, const char *dst_reg, int start, int length, int dest1, int dest2) { - int i; - /* get a pointer to the source data */ - uint8_t *src = (uint8_t *)memregion(src_reg)->base(); + u8 *src = (u8 *)memregion(src_reg)->base(); /* get a pointer to the destination data */ - uint8_t *dst = (uint8_t *)memregion(dst_reg)->base(); + u8 *dst = (u8 *)memregion(dst_reg)->base(); /* fill destination areas with the proper data */ - for (i = 0; i < length/2; i++){ + for (int i = 0; i < length/2; i++){ dst[dest1 + i] = src[start + i*2 + 0]; dst[dest2 + i] = src[start + i*2 + 1]; } @@ -49,13 +47,13 @@ void gaelco2_state::ROM16_split_gfx(const char *src_reg, const char *dst_reg, in void gaelco2_state::init_alighunt() { /* - For "gfx2" we have this memory map: + For "gfx_temp" we have this memory map: 0x0000000-0x03fffff ROM u48 0x0400000-0x07fffff ROM u47 0x0800000-0x0bfffff ROM u50 0x0c00000-0x0ffffff ROM u49 - and we are going to construct this one for "gfx1": + and we are going to construct this one for "gfx": 0x0000000-0x01fffff ROM u48 even bytes 0x0200000-0x03fffff ROM u47 even bytes 0x0400000-0x05fffff ROM u48 odd bytes @@ -67,28 +65,28 @@ void gaelco2_state::init_alighunt() */ /* split ROM u48 */ - ROM16_split_gfx("gfx2", "gfx1", 0x0000000, 0x0400000, 0x0000000, 0x0400000); + ROM16_split_gfx("gfx_temp", "gfx", 0x0000000, 0x0400000, 0x0000000, 0x0400000); /* split ROM u47 */ - ROM16_split_gfx("gfx2", "gfx1", 0x0400000, 0x0400000, 0x0200000, 0x0600000); + ROM16_split_gfx("gfx_temp", "gfx", 0x0400000, 0x0400000, 0x0200000, 0x0600000); /* split ROM u50 */ - ROM16_split_gfx("gfx2", "gfx1", 0x0800000, 0x0400000, 0x0800000, 0x0c00000); + ROM16_split_gfx("gfx_temp", "gfx", 0x0800000, 0x0400000, 0x0800000, 0x0c00000); /* split ROM u49 */ - ROM16_split_gfx("gfx2", "gfx1", 0x0c00000, 0x0400000, 0x0a00000, 0x0e00000); + ROM16_split_gfx("gfx_temp", "gfx", 0x0c00000, 0x0400000, 0x0a00000, 0x0e00000); } void gaelco2_state::init_touchgo() { /* - For "gfx2" we have this memory map: + For "gfx_temp" we have this memory map: 0x0000000-0x03fffff ROM ic65 0x0400000-0x05fffff ROM ic66 0x0800000-0x0bfffff ROM ic67 - and we are going to construct this one for "gfx1": + and we are going to construct this one for "gfx": 0x0000000-0x01fffff ROM ic65 even bytes 0x0200000-0x02fffff ROM ic66 even bytes 0x0400000-0x05fffff ROM ic65 odd bytes @@ -98,25 +96,25 @@ void gaelco2_state::init_touchgo() */ /* split ROM ic65 */ - ROM16_split_gfx("gfx2", "gfx1", 0x0000000, 0x0400000, 0x0000000, 0x0400000); + ROM16_split_gfx("gfx_temp", "gfx", 0x0000000, 0x0400000, 0x0000000, 0x0400000); /* split ROM ic66 */ - ROM16_split_gfx("gfx2", "gfx1", 0x0400000, 0x0200000, 0x0200000, 0x0600000); + ROM16_split_gfx("gfx_temp", "gfx", 0x0400000, 0x0200000, 0x0200000, 0x0600000); /* split ROM ic67 */ - ROM16_split_gfx("gfx2", "gfx1", 0x0800000, 0x0400000, 0x0800000, 0x0c00000); + ROM16_split_gfx("gfx_temp", "gfx", 0x0800000, 0x0400000, 0x0800000, 0x0c00000); } -void gaelco2_state::init_snowboara() +void snowboar_state::init_snowboara() { /* - For "gfx2" we have this memory map: + For "gfx_temp" we have this memory map: 0x0000000-0x03fffff ROM sb44 0x0400000-0x07fffff ROM sb45 0x0800000-0x0bfffff ROM sb46 - and we are going to construct this one for "gfx1": + and we are going to construct this one for "gfx": 0x0000000-0x01fffff ROM sb44 even bytes 0x0200000-0x03fffff ROM sb45 even bytes 0x0400000-0x05fffff ROM sb44 odd bytes @@ -126,25 +124,24 @@ void gaelco2_state::init_snowboara() */ /* split ROM sb44 */ - ROM16_split_gfx("gfx2", "gfx1", 0x0000000, 0x0400000, 0x0000000, 0x0400000); + ROM16_split_gfx("gfx_temp", "gfx", 0x0000000, 0x0400000, 0x0000000, 0x0400000); /* split ROM sb45 */ - ROM16_split_gfx("gfx2", "gfx1", 0x0400000, 0x0400000, 0x0200000, 0x0600000); + ROM16_split_gfx("gfx_temp", "gfx", 0x0400000, 0x0400000, 0x0200000, 0x0600000); /* split ROM sb46 */ - ROM16_split_gfx("gfx2", "gfx1", 0x0800000, 0x0400000, 0x0800000, 0x0c00000); - init_snowboar(); + ROM16_split_gfx("gfx_temp", "gfx", 0x0800000, 0x0400000, 0x0800000, 0x0c00000); } -void gaelco2_state::init_wrally2() +void wrally2_state::init_wrally2() { /* - For "gfx2" we have this memory map: + For "gfx_temp" we have this memory map: 0x0000000-0x03fffff ROM wr2_ic69.ic69 0x0400000-0x05fffff ROM wr2_ic70.ic70 - and we are going to construct this one for "gfx1": + and we are going to construct this one for "gfx": 0x0000000-0x01fffff ROM wr2_ic69.ic69 even bytes 0x0200000-0x03fffff ROM wr2_ic69.ic69 odd bytes 0x0400000-0x04fffff ROM wr2_ic70.ic70 even bytes @@ -152,10 +149,10 @@ void gaelco2_state::init_wrally2() */ /* split ROM wr2_ic69.ic69 */ - ROM16_split_gfx("gfx2", "gfx1", 0x0000000, 0x0400000, 0x0000000, 0x0200000); + ROM16_split_gfx("gfx_temp", "gfx", 0x0000000, 0x0400000, 0x0000000, 0x0200000); /* split ROM wr2_ic70.ic70 */ - ROM16_split_gfx("gfx2", "gfx1", 0x0400000, 0x0200000, 0x0400000, 0x0600000); + ROM16_split_gfx("gfx_temp", "gfx", 0x0400000, 0x0200000, 0x0400000, 0x0600000); } @@ -212,12 +209,12 @@ void gaelco2_state::coin4_counter_w(int state) void gaelco2_state::alighunt_coin_w(u16 data) { /* Coin Lockouts */ - machine().bookkeeping().coin_lockout_w(0, ~data & 0x01); - machine().bookkeeping().coin_lockout_w(1, ~data & 0x02); + machine().bookkeeping().coin_lockout_w(0, BIT(~data, 0)); + machine().bookkeeping().coin_lockout_w(1, BIT(~data, 1)); /* Coin Counters */ - machine().bookkeeping().coin_counter_w(0, data & 0x04); - machine().bookkeeping().coin_counter_w(1, data & 0x08); + machine().bookkeeping().coin_counter_w(0, BIT(data, 2)); + machine().bookkeeping().coin_counter_w(1, BIT(data, 3)); } /*************************************************************************** @@ -226,27 +223,29 @@ void gaelco2_state::alighunt_coin_w(u16 data) ***************************************************************************/ - -void bang_state::init_bang() +void bang_state::machine_start() { - m_clr_gun_int = 0; + gaelco2_state::machine_start(); + + save_item(NAME(m_clr_gun_int)); } void bang_state::bang_clr_gun_int_w(u16 data) { - m_clr_gun_int = 1; + m_clr_gun_int = true; } TIMER_DEVICE_CALLBACK_MEMBER(bang_state::bang_irq) { int scanline = param; - if (scanline == 256){ + if (scanline == 256) + { m_maincpu->set_input_line(2, HOLD_LINE); - m_clr_gun_int = 0; + m_clr_gun_int = false; } - if ((scanline % 64) == 0 && m_clr_gun_int) + if (((scanline % 64) == 0) && m_clr_gun_int) m_maincpu->set_input_line(4, HOLD_LINE); } @@ -256,8 +255,10 @@ TIMER_DEVICE_CALLBACK_MEMBER(bang_state::bang_irq) ***************************************************************************/ -void gaelco2_state::init_snowboar() +void snowboar_state::machine_start() { + gaelco2_state::machine_start(); + save_item(NAME(m_snowboard_latch)); } @@ -320,14 +321,14 @@ u16 mangle(u32 x) return get_out(((a ^ 0x0010) - (b ^ 0x0024)) ^ 0x5496); } -u16 gaelco2_state::snowboar_protection_r() +u16 snowboar_state::snowboar_protection_r() { u16 ret = mangle(m_snowboard_latch); ret = ((ret & 0xff00) >> 8) | ((ret & 0x00ff) << 8); return ret; } -void gaelco2_state::snowboar_protection_w(offs_t offset, u16 data, u16 mem_mask) +void snowboar_state::snowboar_protection_w(offs_t offset, u16 data, u16 mem_mask) { COMBINE_DATA(&m_snowboar_protection[offset]); diff --git a/src/mame/gaelco/gaelco2_v.cpp b/src/mame/gaelco/gaelco2_v.cpp index e98d47bccac..860dc4b3540 100644 --- a/src/mame/gaelco/gaelco2_v.cpp +++ b/src/mame/gaelco/gaelco2_v.cpp @@ -61,7 +61,7 @@ Notes: (1) See sprite format in the sprite section (2) x scroll register is not taken into account when doing line scroll - (3) See sound/gaelco.c for the sound register layout + (3) See devices/sound/gaelco.cpp for the sound register layout (4) tilemaps use the memory [0x2000*bank .. 0x2000*bank + 0x1fff] (5) See tile format in the tilemap section @@ -163,11 +163,11 @@ void gaelco2_state::vram_w(offs_t offset, u16 data, u16 mem_mask) COMBINE_DATA(&m_videoram[offset]); - /* tilemap 0 writes */ + // tilemap 0 writes if ((offset >= pant0_start) && (offset < pant0_end)) m_pant[0]->mark_tile_dirty(((offset << 1) & 0x1fff) >> 2); - /* tilemap 1 writes */ + // tilemap 1 writes if ((offset >= pant1_start) && (offset < pant1_end)) m_pant[1]->mark_tile_dirty(((offset << 1) & 0x1fff) >> 2); @@ -212,7 +212,7 @@ void gaelco2_state::vregs_w(offs_t offset, u16 data, u16 mem_mask) static constexpr u8 RGB_CHG = 0x08; static inline const u8 ADJUST_COLOR(s16 c) { return (c < 0) ? 0 : ((c > 255) ? 255 : c); } -/* table used for color adjustment */ +// table used for color adjustment static const s8 pen_color_adjust[16] = { +RGB_CHG * 0, -RGB_CHG * 1, -RGB_CHG * 2, -RGB_CHG * 3, -RGB_CHG * 4, -RGB_CHG * 5, -RGB_CHG * 6, -RGB_CHG * 7, +RGB_CHG * 8, +RGB_CHG * 7, +RGB_CHG * 6, +RGB_CHG * 5, +RGB_CHG * 4, +RGB_CHG * 3, +RGB_CHG * 2, +RGB_CHG * 1 @@ -224,15 +224,15 @@ void gaelco2_state::palette_w(offs_t offset, u16 data, u16 mem_mask) COMBINE_DATA(&m_paletteram[offset]); const u16 color = m_paletteram[offset]; - /* extract RGB components */ + // extract RGB components const u8 r = pal5bit(color >> 10); const u8 g = pal5bit(color >> 5); const u8 b = pal5bit(color & 0x1f); - /* update game palette */ + // update game palette m_palette->set_pen_color(4096*0 + offset, rgb_t(r, g, b)); - /* update shadow/highlight palettes */ + // update shadow/highlight palettes for (int i = 1; i < 16; i++) { const u8 auxr = ADJUST_COLOR(r + pen_color_adjust[i]); @@ -253,11 +253,11 @@ VIDEO_START_MEMBER(gaelco2_state,gaelco2) { m_videoram = m_spriteram->live(); - /* create tilemaps */ + // create tilemaps m_pant[0] = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(*this, FUNC(gaelco2_state::get_tile_info<0>)), TILEMAP_SCAN_ROWS, 16,16, 64,32); m_pant[1] = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(*this, FUNC(gaelco2_state::get_tile_info<1>)), TILEMAP_SCAN_ROWS, 16,16, 64,32); - /* set tilemap properties */ + // set tilemap properties m_pant[0]->set_transparent_pen(0); m_pant[1]->set_transparent_pen(0); @@ -266,18 +266,18 @@ VIDEO_START_MEMBER(gaelco2_state,gaelco2) m_pant[1]->set_scroll_rows(512); m_pant[1]->set_scroll_cols(1); - m_dual_monitor = 0; + m_dual_monitor = false; } VIDEO_START_MEMBER(gaelco2_state,gaelco2_dual) { m_videoram = m_spriteram->live(); - /* create tilemaps */ + // create tilemaps m_pant[0] = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(*this, FUNC(gaelco2_state::get_tile_info_dual<0>)), TILEMAP_SCAN_ROWS, 16,16, 64,32); m_pant[1] = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(*this, FUNC(gaelco2_state::get_tile_info_dual<1>)), TILEMAP_SCAN_ROWS, 16,16, 64,32); - /* set tilemap properties */ + // set tilemap properties m_pant[0]->set_transparent_pen(0); m_pant[1]->set_transparent_pen(0); @@ -286,7 +286,7 @@ VIDEO_START_MEMBER(gaelco2_state,gaelco2_dual) m_pant[1]->set_scroll_rows(512); m_pant[1]->set_scroll_cols(1); - m_dual_monitor = 1; + m_dual_monitor = true; } /*************************************************************************** @@ -327,14 +327,14 @@ VIDEO_START_MEMBER(gaelco2_state,gaelco2_dual) void gaelco2_state::draw_sprites(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int mask) { - u16 *buffered_spriteram16 = m_spriteram->buffer(); + u16 const *const buffered_spriteram16 = m_spriteram->buffer(); gfx_element *gfx = m_gfxdecode->gfx(0); - /* get sprite ram start and end offsets */ + // get sprite ram start and end offsets const u32 start_offset = (m_vregs[1] & 0x10) * 0x100; const u32 end_offset = start_offset + 0x1000; - /* sprite offset is based on the visible area - this seems very kludgy */ + // sprite offset is based on the visible area - this seems very kludgy const int spr_x_adjust = (screen.visible_area().max_x - 320 + 1) - (511 - 320 - 1) - ((m_vregs[0] >> 4) & 0x01) + m_global_spritexoff; for (int j = start_offset; j < end_offset; j += 8) @@ -347,23 +347,23 @@ void gaelco2_state::draw_sprites(screen_device &screen, bitmap_ind16 &bitmap, co const int sx = data3 & 0x3ff; const int sy = data2 & 0x1ff; - const bool xflip = data2 & 0x800; - const bool yflip = data2 & 0x400; + const bool xflip = BIT(data2, 11); + const bool yflip = BIT(data2, 10); const int xsize = ((data3 >> 12) & 0x0f) + 1; const int ysize = ((data2 >> 12) & 0x0f) + 1; if (m_dual_monitor && ((data & 0x8000) != mask)) continue; - /* if it's enabled, draw it */ - if ((data2 & 0x0200) != 0) + // if it's enabled, draw it + if (BIT(data2, 9)) { for (int y = 0; y < ysize; y++) { for (int x = 0; x < xsize; x++) { - /* for each x,y of the sprite, fetch the sprite data */ - const u16 data5 = buffered_spriteram16[((data4 / 2) + (y*xsize + x)) & 0x7fff]; + // for each x,y of the sprite, fetch the sprite data + const u16 data5 = buffered_spriteram16[((data4 / 2) + (y * xsize + x)) & 0x7fff]; const u32 number = ((data & 0x1ff) << 10) + (data5 & 0x0fff); const u32 color = ((data >> 9) & 0x7f) + ((data5 >> 12) & 0x0f); const bool color_effect = m_dual_monitor ? ((color & 0x3f) == 0x3f) : (color == 0x7f); @@ -371,23 +371,22 @@ void gaelco2_state::draw_sprites(screen_device &screen, bitmap_ind16 &bitmap, co const int ex = xflip ? (xsize - 1 - x) : x; const int ey = yflip ? (ysize - 1 - y) : y; - /* normal sprite, pen 0 transparent */ if (!color_effect) - { + { // normal sprite, pen 0 transparent gfx->transpen(bitmap,cliprect, number, - color, xflip, yflip, - ((sx + ex * 16) & 0x3ff) + spr_x_adjust, - ((sy + ey * 16) & 0x1ff), 0); + color, xflip, yflip, + ((sx + ex * 16) & 0x3ff) + spr_x_adjust, + ((sy + ey * 16) & 0x1ff), 0); } else - { /* last palette entry is reserved for shadows and highlights */ + { // last palette entry is reserved for shadows and highlights - /* get a pointer to the current sprite's gfx data */ - const uint8_t *gfx_src = gfx->get_data(number % gfx->elements()); + // get a pointer to the current sprite's gfx data + u8 const *const gfx_src = gfx->get_data(number % gfx->elements()); for (int py = 0; py < gfx->height(); py++) { - /* get a pointer to the current line in the screen bitmap */ + // get a pointer to the current line in the screen bitmap const int ypos = ((sy + ey * 16 + py) & 0x1ff); if ((ypos < cliprect.min_y) || (ypos > cliprect.max_y)) continue; @@ -397,13 +396,14 @@ void gaelco2_state::draw_sprites(screen_device &screen, bitmap_ind16 &bitmap, co for (int px = 0; px < gfx->width(); px++) { - /* get current pixel */ + // get current pixel const int xpos = (((sx + ex * 16 + px) & 0x3ff) + spr_x_adjust) & 0x3ff; - if ((xpos < cliprect.min_x) || (xpos > cliprect.max_x)) continue; + if ((xpos < cliprect.min_x) || (xpos > cliprect.max_x)) + continue; const int gfx_px = xflip ? (gfx->width() - 1 - px) : px; - /* get asociated pen for the current sprite pixel */ + // get asociated pen for the current sprite pixel const u8 gfx_pen = gfx_src[gfx->rowbytes() * gfx_py + gfx_px]; if ((gfx_pen == 0) || (gfx_pen >= 16)) continue; @@ -411,8 +411,8 @@ void gaelco2_state::draw_sprites(screen_device &screen, bitmap_ind16 &bitmap, co u16 *const pixel = srcy + xpos; const u16 src_color = *pixel; - /* make background color darker or brighter */ - *pixel = (src_color & 0xfff) | 0x1000*gfx_pen; + // make background color darker or brighter + *pixel = (src_color & 0xfff) | (0x1000 * gfx_pen); } } } @@ -430,30 +430,29 @@ void gaelco2_state::draw_sprites(screen_device &screen, bitmap_ind16 &bitmap, co u32 gaelco2_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { - int xoff0 = 0x14; - int xoff1 = xoff0 - 4; - int yoff0 = 0x01; - int yoff1 = 0x01; - - /* read scroll values */ - int scroll0x = m_videoram[0x2802 / 2] + xoff0; - int scroll1x = m_videoram[0x2806 / 2] + xoff1; - int scroll0y = m_videoram[0x2800 / 2] + yoff0; - int scroll1y = m_videoram[0x2804 / 2] + yoff1; - - /* set y scroll registers */ + const int xoff0 = 0x14; + const int xoff1 = xoff0 - 4; + const int yoff0 = 0x01; + const int yoff1 = 0x01; + + // read scroll values + const int scroll0x = m_videoram[0x2802 / 2] + xoff0; + const int scroll1x = m_videoram[0x2806 / 2] + xoff1; + const int scroll0y = m_videoram[0x2800 / 2] + yoff0; + const int scroll1y = m_videoram[0x2804 / 2] + yoff1; + + // set y scroll registers m_pant[0]->set_scrolly(0, scroll0y & 0x1ff); m_pant[1]->set_scrolly(0, scroll1y & 0x1ff); - - /* set x linescroll registers */ + // set x linescroll registers for (int i = 0; i < 512; i++) { - m_pant[0]->set_scrollx(i & 0x1ff, (m_vregs[0] & 0x8000) ? (m_videoram[(0x2000 / 2) + i] + xoff0) & 0x3ff : scroll0x & 0x3ff); - m_pant[1]->set_scrollx(i & 0x1ff, (m_vregs[1] & 0x8000) ? (m_videoram[(0x2400 / 2) + i] + xoff1) & 0x3ff : scroll1x & 0x3ff); + m_pant[0]->set_scrollx(i & 0x1ff, (BIT(m_vregs[0], 15) ? (m_videoram[(0x2000 / 2) + i] + xoff0) : scroll0x) & 0x3ff); + m_pant[1]->set_scrollx(i & 0x1ff, (BIT(m_vregs[1], 15) ? (m_videoram[(0x2400 / 2) + i] + xoff1) : scroll1x) & 0x3ff); } - /* draw screen */ + // draw screen bitmap.fill(0, cliprect); m_pant[1]->draw(screen, bitmap, cliprect, 0, 0); @@ -566,9 +565,9 @@ u32 gaelco2_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, co int gaelco2_state::get_rowscrollmode_yscroll(bool first_screen) { - uint16_t base = first_screen ? 0x2000 / 2 : 0x2400 / 2; + const u16 base = first_screen ? 0x2000 / 2 : 0x2400 / 2; - uint8_t checkoffsets[32] = { + const u8 checkoffsets[32] = { 0x02, 0x0e, 0x0a, 0x1b, 0x15, 0x13, 0x04, 0x19, 0x0c, 0x1f, 0x08, 0x1d, 0x11, 0x06, 0x17, 0x10, 0x01, 0x0d, 0x16, 0x09, 0x1a, 0x05, 0x1e, 0x00, @@ -577,9 +576,9 @@ int gaelco2_state::get_rowscrollmode_yscroll(bool first_screen) int usescroll = 0; for (int i = 31; i >= 0; i--) { - int checkoffset = (0x80 / 2) + ((checkoffsets[i] * 3) + 1); + const int checkoffset = (0x80 / 2) + ((checkoffsets[i] * 3) + 1); - if (m_videoram[(base)+checkoffset] & 0x1000) + if (BIT(m_videoram[base + checkoffset], 12)) { usescroll = 31 - i; } @@ -590,43 +589,43 @@ int gaelco2_state::get_rowscrollmode_yscroll(bool first_screen) u32 gaelco2_state::dual_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int index) { - int xoff0 = 0x14; // intro scenes align better with 0x13, but test screen is definitely 0x14 - int xoff1 = xoff0 - 4; - int yoff0 = 0x01; - int yoff1 = 0x01; - - /* read scroll values */ - int scroll0x = m_videoram[0x2802 / 2] + xoff0; - int scroll1x = m_videoram[0x2806 / 2] + xoff1; + const int xoff0 = 0x14; // intro scenes align better with 0x13, but test screen is definitely 0x14 + const int xoff1 = xoff0 - 4; + const int yoff0 = 0x01; + const int yoff1 = 0x01; + + // read scroll values + const int scroll0x = m_videoram[0x2802 / 2] + xoff0; + const int scroll1x = m_videoram[0x2806 / 2] + xoff1; int scroll0y = m_videoram[0x2800 / 2] + yoff0; int scroll1y = m_videoram[0x2804 / 2] + yoff1; - if (m_vregs[0] & 0x8000) + if (BIT(m_vregs[0], 15)) { scroll0y += get_rowscrollmode_yscroll(true); } - if (m_vregs[1] & 0x8000) + if (BIT(m_vregs[1], 15)) { scroll1y += get_rowscrollmode_yscroll(false); } - /* set y scroll registers */ + // set y scroll registers m_pant[0]->set_scrolly(0, scroll0y & 0x1ff); m_pant[1]->set_scrolly(0, scroll1y & 0x1ff); - /* set x linescroll registers */ + // set x linescroll registers for (int i = 0; i < 512; i++) { - m_pant[0]->set_scrollx(i & 0x1ff, (m_vregs[0] & 0x8000) ? (m_videoram[(0x2000 / 2) + i] + xoff0) & 0x3ff : scroll0x & 0x3ff); - m_pant[1]->set_scrollx(i & 0x1ff, (m_vregs[1] & 0x8000) ? (m_videoram[(0x2400 / 2) + i] + xoff1) & 0x3ff : scroll1x & 0x3ff); + m_pant[0]->set_scrollx(i & 0x1ff, (BIT(m_vregs[0], 15) ? (m_videoram[(0x2000 / 2) + i] + xoff0) : scroll0x) & 0x3ff); + m_pant[1]->set_scrollx(i & 0x1ff, (BIT(m_vregs[1], 15) ? (m_videoram[(0x2400 / 2) + i] + xoff1) : scroll1x) & 0x3ff); } - /* draw screen */ + // draw screen bitmap.fill(0, cliprect); m_pant[index]->draw(screen, bitmap, cliprect, 0, 0); - draw_sprites(screen,bitmap,cliprect, 0x8000 * index); + draw_sprites(screen, bitmap, cliprect, 0x8000 * index); return 0; } diff --git a/src/mame/gaelco/mastboy.cpp b/src/mame/gaelco/mastboy.cpp index 587c0fa03d7..3ed1fd85277 100644 --- a/src/mame/gaelco/mastboy.cpp +++ b/src/mame/gaelco/mastboy.cpp @@ -439,15 +439,20 @@ */ #include "emu.h" + #include "cpu/z180/hd647180x.h" + #include "sound/saa1099.h" #include "sound/msm5205.h" + #include "machine/74259.h" #include "machine/bankdev.h" #include "machine/eeprompar.h" + #include "emupal.h" #include "screen.h" #include "speaker.h" +#include "tilemap.h" #include @@ -467,7 +472,6 @@ class mastboy_state : public driver_device , m_bank_c000(*this, "bank_c000") , m_workram(*this, "workram") , m_tileram(*this, "tileram") - , m_colram(*this, "colram") , m_vram(*this, "vram") { } @@ -479,25 +483,9 @@ class mastboy_state : public driver_device virtual void video_start() override; private: - required_device m_maincpu; - required_device m_msm; - required_device m_outlatch; - required_device m_gfxdecode; - required_device m_palette; - required_device m_earom; - required_device m_bank_c000; - - required_shared_ptr m_workram; - required_shared_ptr m_tileram; - required_shared_ptr m_colram; - required_shared_ptr m_vram; - - int m_irq0_ack = 0; - int m_m5205_next = 0; - int m_m5205_part = 0; - uint8_t vram_r(offs_t offset); void vram_w(offs_t offset, uint8_t data); + void tileram_w(offs_t offset, uint8_t data); void bank_w(uint8_t data); void msm5205_data_w(uint8_t data); void irq0_ack_w(int state); @@ -505,61 +493,55 @@ class mastboy_state : public driver_device uint8_t nmi_read(); void adpcm_int(int state); + TILE_GET_INFO_MEMBER(get_tile_info); + uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); void vblank_irq(int state); void bank_c000_map(address_map &map); void mastboy_io_map(address_map &map); void mastboy_map(address_map &map); + + required_device m_maincpu; + required_device m_msm; + required_device m_outlatch; + required_device m_gfxdecode; + required_device m_palette; + required_device m_earom; + required_device m_bank_c000; + + required_shared_ptr m_workram; + required_shared_ptr m_tileram; + required_shared_ptr m_vram; + + // video related + tilemap_t *m_tilemap = nullptr; + + //int m_irq0_ack = 0; + uint8_t m_m5205_next = 0; + bool m_m5205_part = false; }; // VIDEO EMULATION +TILE_GET_INFO_MEMBER(mastboy_state::get_tile_info) +{ + // bytes 0 and 3 seem to be unused for rendering , they appear to contain data the game uses internally + uint32_t const tileno = (m_tileram[(tile_index << 2) | 1] | (m_tileram[(tile_index << 2) | 2] << 8)) & 0xfff; + uint32_t const attr = (m_tileram[(tile_index << 2) | 2] & 0xf0) >> 4; + + tileinfo.set((tileno & 0x800) ? 1 : 0, tileno & 0x7ff, attr, 0); +} + void mastboy_state::video_start() { + m_tilemap = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(*this, FUNC(mastboy_state::get_tile_info)), TILEMAP_SCAN_ROWS, 8, 8, 32, 32); } uint32_t mastboy_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { - int y,x,i; - int count = 0x000; - - for (i=0;i<0x200;i+=2) - { - int coldat = m_colram[i+1] | (m_colram[i+0]<<8); - - m_palette->set_pen_color(i/2,pal4bit(coldat>>8),pal4bit(coldat>>12),pal4bit(coldat>>4)); - } - - for (y=0;y<32;y++) - { - for (x=0;x<32;x++) - { - // bytes 0 and 3 seem to be unused for rendering , they appear to contain data the game uses internally - int tileno = (m_tileram[count+1]|(m_tileram[count+2]<<8))&0xfff; - int attr = (m_tileram[count+2]&0xf0)>>4; - gfx_element *gfx; - - if (tileno&0x800) - { - gfx = m_gfxdecode->gfx(1); - tileno &=0x7ff; - } - else - { - gfx = m_gfxdecode->gfx(0); - } - - - gfx->opaque(bitmap,cliprect,tileno,attr,0,0,x*8,y*8); - - count+=4; - - } - - } - + m_tilemap->draw(screen, bitmap, cliprect, 0, 0); return 0; } @@ -569,18 +551,25 @@ uint32_t mastboy_state::screen_update(screen_device &screen, bitmap_ind16 &bitma uint8_t mastboy_state::vram_r(offs_t offset) { // we have to invert the data for the GFX decode - return m_vram[offset]^0xff; + return m_vram[offset] ^ 0xff; } void mastboy_state::vram_w(offs_t offset, uint8_t data) { // we have to invert the data for the GFX decode - m_vram[offset] = data^0xff; + m_vram[offset] = data ^ 0xff; // Decode the new tile m_gfxdecode->gfx(0)->mark_dirty(offset/32); } +void mastboy_state::tileram_w(offs_t offset, uint8_t data) +{ + m_tileram[offset] = data; + if (((offset & 3) == 1) || ((offset & 3) == 2)) // see above + m_tilemap->mark_tile_dirty(offset >> 2); +} + void mastboy_state::bank_w(uint8_t data) { // controls access to banked ram / rom @@ -591,7 +580,7 @@ void mastboy_state::bank_w(uint8_t data) void mastboy_state::msm5205_data_w(uint8_t data) { - m_m5205_part = 0; + m_m5205_part = false; m_m5205_next = data; } @@ -600,7 +589,7 @@ void mastboy_state::adpcm_int(int state) m_msm->data_w(m_m5205_next); m_m5205_next >>= 4; - m_m5205_part ^= 1; + m_m5205_part = !m_m5205_part; if(!m_m5205_part) m_maincpu->pulse_input_line(INPUT_LINE_NMI, attotime::zero); } @@ -626,11 +615,11 @@ void mastboy_state::mastboy_map(address_map &map) { map(0x4000, 0x7fff).rom(); // External ROM - map(0x8000, 0x8fff).ram().share("workram"); // Work RAM - map(0x9000, 0x9fff).ram().share("tileram"); // Tilemap RAM - map(0xa000, 0xa1ff).ram().share("colram").mirror(0x0e00); // Colour RAM + map(0x8000, 0x8fff).ram().share(m_workram); // Work RAM + map(0x9000, 0x9fff).ram().w(FUNC(mastboy_state::tileram_w)).share(m_tileram); // Tilemap RAM + map(0xa000, 0xa1ff).ram().w(m_palette, FUNC(palette_device::write8)).share("palette").mirror(0x0e00); // Colour RAM - map(0xc000, 0xffff).m("bank_c000", FUNC(address_map_bank_device::amap8)); + map(0xc000, 0xffff).m(m_bank_c000, FUNC(address_map_bank_device::amap8)); map(0xff000, 0xff7ff).rw(m_earom, FUNC(eeprom_parallel_28xx_device::read), FUNC(eeprom_parallel_28xx_device::write)); @@ -648,7 +637,7 @@ void mastboy_state::mastboy_map(address_map &map) // TODO : banked map is mirrored? void mastboy_state::bank_c000_map(address_map &map) { - map(0x000000, 0x00ffff).mirror(0x1e0000).rw(FUNC(mastboy_state::vram_r), FUNC(mastboy_state::vram_w)).share("vram"); + map(0x000000, 0x00ffff).mirror(0x1e0000).rw(FUNC(mastboy_state::vram_r), FUNC(mastboy_state::vram_w)).share(m_vram); map(0x010000, 0x01ffff).mirror(0x1e0000).rom().region("vrom", 0); map(0x200000, 0x3fffff).rom().region("bankedrom", 0); } @@ -763,9 +752,9 @@ static const gfx_layout tiles8x8_layout = 8,8, RGN_FRAC(1,1), 4, - { 0, 1, 2, 3 }, + { STEP4(0, 1) }, { 24,28,16,20,8,12,0,4 }, - { 0*32, 1*32, 2*32, 3*32, 4*32, 5*32, 6*32, 7*32 }, + { STEP8(0, 32) }, 32*8 }; @@ -779,7 +768,7 @@ GFXDECODE_END void mastboy_state::machine_start() { - save_item(NAME(m_irq0_ack)); + //save_item(NAME(m_irq0_ack)); save_item(NAME(m_m5205_next)); save_item(NAME(m_m5205_part)); } @@ -789,7 +778,6 @@ void mastboy_state::machine_reset() // clear some RAM std::fill(&m_workram[0], &m_workram[m_workram.bytes()], 0); std::fill(&m_tileram[0], &m_tileram[m_tileram.bytes()], 0); - std::fill(&m_colram[0], &m_colram[m_colram.bytes()], 0); std::fill(&m_vram[0], &m_vram[m_vram.bytes()], 0); } @@ -808,7 +796,7 @@ void mastboy_state::mastboy(machine_config &config) m_outlatch->q_out_cb<3>().set("msm", FUNC(msm5205_device::reset_w)); m_outlatch->q_out_cb<4>().set("earom", FUNC(eeprom_parallel_28xx_device::oe_w)); - ADDRESS_MAP_BANK(config, "bank_c000").set_map(&mastboy_state::bank_c000_map).set_options(ENDIANNESS_LITTLE, 8, 22, 0x4000); + ADDRESS_MAP_BANK(config, m_bank_c000).set_map(&mastboy_state::bank_c000_map).set_options(ENDIANNESS_LITTLE, 8, 22, 0x4000); // video hardware screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); @@ -821,7 +809,8 @@ void mastboy_state::mastboy(machine_config &config) screen.screen_vblank().set(FUNC(mastboy_state::vblank_irq)); GFXDECODE(config, m_gfxdecode, m_palette, gfx_mastboy); - PALETTE(config, m_palette).set_entries(0x100); + PALETTE(config, m_palette).set_format(palette_device::GRBx_444, 0x100); + m_palette->set_endianness(ENDIANNESS_BIG); // sound hardware SPEAKER(config, "mono").front_center(); diff --git a/src/mame/handheld/hh_sm510.cpp b/src/mame/handheld/hh_sm510.cpp index abbea8ca30c..091cb622102 100644 --- a/src/mame/handheld/hh_sm510.cpp +++ b/src/mame/handheld/hh_sm510.cpp @@ -11848,7 +11848,7 @@ SYST( 1993, tsddragon, 0, 0, tsddragon, tsddragon, tsddr SYST( 1993, tdennis, 0, 0, tdennis, tdennis, tdennis_state, empty_init, "Tiger Electronics", "Dennis the Menace (Tiger)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) SYST( 1993, tnmarebc, 0, 0, tnmarebc, tnmarebc, tnmarebc_state, empty_init, "Tiger Electronics", "Nightmare Before Christmas (Tiger)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) // note: title has no "The" SYST( 1993, ttransf2, 0, 0, ttransf2, ttransf2, ttransf2_state, empty_init, "Tiger Electronics", "Transformers: Generation 2 (Tiger)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) -SYST( 1993, topaliens, 0, 0, topaliens, topaliens, topaliens_state, empty_init, "Tiger Electronics", "Operation: Aliens (Tiger)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) +SYST( 1994, topaliens, 0, 0, topaliens, topaliens, topaliens_state, empty_init, "Tiger Electronics", "Operation: Aliens (Tiger)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) SYST( 1993, tmkombat, 0, 0, tmkombat, tmkombat, tmkombat_state, empty_init, "Tiger Electronics", "Mortal Kombat (Tiger)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) SYST( 1994, tshadow, 0, 0, tshadow, tshadow, tshadow_state, empty_init, "Tiger Electronics", "The Shadow (Tiger)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) SYST( 1994, tskelwarr, 0, 0, tskelwarr, tskelwarr, tskelwarr_state, empty_init, "Tiger Electronics", "Skeleton Warriors: The Dark Crusade (Tiger)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) diff --git a/src/mame/kaneko/djboy.cpp b/src/mame/kaneko/djboy.cpp index 8f17181182b..9b89f00c4ca 100644 --- a/src/mame/kaneko/djboy.cpp +++ b/src/mame/kaneko/djboy.cpp @@ -163,13 +163,6 @@ class djboy_state : public driver_device public: djboy_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag) - , m_videoram(*this, "videoram") - , m_paletteram(*this, "paletteram") - , m_masterbank(*this, "master_bank%u", 0U) - , m_slavebank(*this, "slave_bank") - , m_soundbank(*this, "sound_bank") - , m_port_in(*this, "IN%u", 0) - , m_port_dsw(*this, "DSW%u", 1) , m_mastercpu(*this, "mastercpu") , m_slavecpu(*this, "slavecpu") , m_soundcpu(*this, "soundcpu") @@ -180,6 +173,12 @@ class djboy_state : public driver_device , m_soundlatch(*this, "soundlatch") , m_slavelatch(*this, "slavelatch") , m_beastlatch(*this, "beastlatch") + , m_videoram(*this, "videoram") + , m_masterbank(*this, "master_bank%u", 0U) + , m_slavebank(*this, "slave_bank") + , m_soundbank(*this, "sound_bank") + , m_port_in(*this, "IN%u", 0) + , m_port_dsw(*this, "DSW%u", 1) { } @@ -194,42 +193,7 @@ class djboy_state : public driver_device virtual void video_start() override; private: - static constexpr unsigned PROT_OUTPUT_BUFFER_SIZE = 8; - - // memory pointers - required_shared_ptr m_videoram; - required_shared_ptr m_paletteram; - - // ROM banking - uint8_t m_bankxor; - - required_memory_bank_array<2> m_masterbank; - required_memory_bank m_slavebank; - required_memory_bank m_soundbank; - - required_ioport_array<3> m_port_in; - required_ioport_array<2> m_port_dsw; - - // video-related - tilemap_t *m_background = nullptr; - uint8_t m_videoreg = 0; - uint8_t m_scrollx = 0; - uint8_t m_scrolly = 0; - - // Kaneko BEAST state - uint8_t m_beast_p[4]{}; - - // devices - required_device m_mastercpu; - required_device m_slavecpu; - required_device m_soundcpu; - required_device m_beast; - required_device m_pandora; - required_device m_gfxdecode; - required_device m_palette; - required_device m_soundlatch; - required_device m_slavelatch; - required_device m_beastlatch; + //static constexpr unsigned PROT_OUTPUT_BUFFER_SIZE = 8; uint8_t beast_status_r(); void trigger_nmi_on_mastercpu(uint8_t data); @@ -248,7 +212,6 @@ class djboy_state : public driver_device void scrollx_w(uint8_t data); void scrolly_w(uint8_t data); void videoram_w(offs_t offset, uint8_t data); - void paletteram_w(offs_t offset, uint8_t data); TILE_GET_INFO_MEMBER(get_bg_tile_info); uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); void screen_vblank(int state); @@ -259,6 +222,40 @@ class djboy_state : public driver_device void slavecpu_port_am(address_map &map); void soundcpu_am(address_map &map); void soundcpu_port_am(address_map &map); + + // devices + required_device m_mastercpu; + required_device m_slavecpu; + required_device m_soundcpu; + required_device m_beast; + required_device m_pandora; + required_device m_gfxdecode; + required_device m_palette; + required_device m_soundlatch; + required_device m_slavelatch; + required_device m_beastlatch; + + // memory pointers + required_shared_ptr m_videoram; + + // ROM banking + required_memory_bank_array<2> m_masterbank; + required_memory_bank m_slavebank; + required_memory_bank m_soundbank; + + required_ioport_array<3> m_port_in; + required_ioport_array<2> m_port_dsw; + + uint8_t m_bankxor; + + // video-related + tilemap_t *m_background = nullptr; + uint8_t m_videoreg = 0; + uint8_t m_scrollx = 0; + uint8_t m_scrolly = 0; + + // Kaneko BEAST state + uint8_t m_beast_p[4]{}; }; @@ -295,15 +292,6 @@ void djboy_state::video_start() m_background = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(*this, FUNC(djboy_state::get_bg_tile_info)), TILEMAP_SCAN_ROWS, 16, 16, 64, 32); } -void djboy_state::paletteram_w(offs_t offset, uint8_t data) -{ - m_paletteram[offset] = data; - offset &= ~1; - int const val = (m_paletteram[offset] << 8) | m_paletteram[offset + 1]; - - m_palette->set_pen_color(offset / 2, pal4bit(val >> 8), pal4bit(val >> 4), pal4bit(val >> 0)); -} - uint32_t djboy_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { /** @@ -409,7 +397,7 @@ void djboy_state::slavecpu_am(address_map &map) map(0x0000, 0x7fff).rom(); map(0x8000, 0xbfff).bankr(m_slavebank); map(0xc000, 0xcfff).ram().w(FUNC(djboy_state::videoram_w)).share(m_videoram); - map(0xd000, 0xd3ff).ram().w(FUNC(djboy_state::paletteram_w)).share(m_paletteram); + map(0xd000, 0xd3ff).ram().w(m_palette, FUNC(palette_device::write8)).share("palette"); map(0xd400, 0xd8ff).ram(); map(0xe000, 0xffff).ram().share("master_slave"); } @@ -461,7 +449,7 @@ void djboy_state::beast_p0_w(uint8_t data) m_slavelatch->write(m_beast_p[1]); } - if (BIT(data, 0) == 0) + if (BIT(~data, 0)) m_beastlatch->acknowledge_w(); m_beast_p[0] = data; @@ -469,7 +457,7 @@ void djboy_state::beast_p0_w(uint8_t data) uint8_t djboy_state::beast_p1_r() { - if (BIT(m_beast_p[0], 0) == 0) + if (BIT(~m_beast_p[0], 0)) return m_beastlatch->read(); else return 0; // ? @@ -499,8 +487,8 @@ void djboy_state::beast_p2_w(uint8_t data) uint8_t djboy_state::beast_p3_r() { uint8_t dsw = 0; - uint8_t dsw1 = ~m_port_dsw[0]->read(); - uint8_t dsw2 = ~m_port_dsw[1]->read(); + uint8_t const dsw1 = ~m_port_dsw[0]->read(); + uint8_t const dsw2 = ~m_port_dsw[1]->read(); switch ((m_beast_p[0] >> 5) & 3) { @@ -515,7 +503,7 @@ uint8_t djboy_state::beast_p3_r() void djboy_state::beast_p3_w(uint8_t data) { m_beast_p[3] = data; - m_slavecpu->set_input_line(INPUT_LINE_RESET, data & 2 ? CLEAR_LINE : ASSERT_LINE); + m_slavecpu->set_input_line(INPUT_LINE_RESET, BIT(data, 1) ? CLEAR_LINE : ASSERT_LINE); } // Program / data maps are defined in the 8051 core @@ -696,7 +684,8 @@ void djboy_state::djboy(machine_config &config) screen.set_palette(m_palette); GFXDECODE(config, m_gfxdecode, m_palette, gfx_djboy); - PALETTE(config, m_palette).set_entries(0x200); + PALETTE(config, m_palette).set_format(palette_device::xRGB_444, 0x200); + m_palette->set_endianness(ENDIANNESS_BIG); KANEKO_PANDORA(config, m_pandora, 0, m_palette, gfx_djboy_spr); diff --git a/src/mame/kaneko/hvyunit.cpp b/src/mame/kaneko/hvyunit.cpp index d80bb9946e8..f4f5404504d 100644 --- a/src/mame/kaneko/hvyunit.cpp +++ b/src/mame/kaneko/hvyunit.cpp @@ -98,44 +98,19 @@ class hvyunit_state : public driver_device , m_soundlatch(*this, "soundlatch") , m_mermaidlatch(*this, "mermaidlatch") , m_slavelatch(*this, "slavelatch") + , m_videoram(*this, "videoram") + , m_colorram(*this, "colorram") , m_masterbank(*this, "master_bank") , m_slavebank(*this, "slave_bank") , m_soundbank(*this, "sound_bank") - , m_videoram(*this, "videoram") - , m_colorram(*this, "colorram") + , m_port_in(*this, "IN%u", 0U) + , m_port_dsw(*this, "DSW%u", 1U) { } void hvyunit(machine_config &config); private: - /* Devices */ - required_device m_mastercpu; - required_device m_slavecpu; - required_device m_mermaid; - required_device m_soundcpu; - required_device m_pandora; - required_device m_gfxdecode; - required_device m_palette; - required_device m_soundlatch; - required_device m_mermaidlatch; - required_device m_slavelatch; - - required_memory_bank m_masterbank; - required_memory_bank m_slavebank; - required_memory_bank m_soundbank; - - /* Video */ - required_shared_ptr m_videoram; - required_shared_ptr m_colorram; - tilemap_t *m_bg_tilemap; - uint16_t m_scrollx; - uint16_t m_scrolly; - uint16_t m_port0_data; - - /* Mermaid */ - uint8_t m_mermaid_p[4]; - void trigger_nmi_on_slave_cpu(uint8_t data); void master_bankswitch_w(uint8_t data); uint8_t mermaid_status_r(); @@ -170,6 +145,40 @@ class hvyunit_state : public driver_device void slave_memory(address_map &map); void sound_io(address_map &map); void sound_memory(address_map &map); + + // Devices + required_device m_mastercpu; + required_device m_slavecpu; + required_device m_mermaid; + required_device m_soundcpu; + required_device m_pandora; + required_device m_gfxdecode; + required_device m_palette; + required_device m_soundlatch; + required_device m_mermaidlatch; + required_device m_slavelatch; + + // Memory pointers + required_shared_ptr m_videoram; + required_shared_ptr m_colorram; + + required_memory_bank m_masterbank; + required_memory_bank m_slavebank; + required_memory_bank m_soundbank; + + // Ports + required_ioport_array<3> m_port_in; + required_ioport_array<2> m_port_dsw; + + // Video + tilemap_t *m_bg_tilemap = nullptr; + uint16_t m_scrollx = 0; + uint16_t m_scrolly = 0; + uint16_t m_port0_data = 0; + + // Mermaid + uint8_t m_mermaid_p[4]{}; + }; @@ -202,9 +211,9 @@ void hvyunit_state::machine_reset() TILE_GET_INFO_MEMBER(hvyunit_state::get_bg_tile_info) { - int attr = m_colorram[tile_index]; - int code = m_videoram[tile_index] + ((attr & 0x0f) << 8); - int color = (attr >> 4); + uint32_t const attr = m_colorram[tile_index]; + uint32_t const code = m_videoram[tile_index] + ((attr & 0x0f) << 8); + uint32_t const color = (attr >> 4); tileinfo.set(0, code, color, 0); } @@ -355,9 +364,9 @@ uint8_t hvyunit_state::mermaid_p2_r() { switch ((m_mermaid_p[0] >> 2) & 3) { - case 0: return ioport("IN1")->read(); - case 1: return ioport("IN2")->read(); - case 2: return ioport("IN0")->read(); + case 0: return m_port_in[1]->read(); + case 1: return m_port_in[2]->read(); + case 2: return m_port_in[0]->read(); default: return 0xff; } } @@ -370,8 +379,8 @@ void hvyunit_state::mermaid_p2_w(uint8_t data) uint8_t hvyunit_state::mermaid_p3_r() { uint8_t dsw = 0; - uint8_t dsw1 = ioport("DSW1")->read(); - uint8_t dsw2 = ioport("DSW2")->read(); + uint8_t const dsw1 = m_port_dsw[0]->read(); + uint8_t const dsw2 = m_port_dsw[1]->read(); switch ((m_mermaid_p[0] >> 5) & 3) { @@ -387,7 +396,7 @@ uint8_t hvyunit_state::mermaid_p3_r() void hvyunit_state::mermaid_p3_w(uint8_t data) { m_mermaid_p[3] = data; - m_slavecpu->set_input_line(INPUT_LINE_RESET, data & 2 ? CLEAR_LINE : ASSERT_LINE); + m_slavecpu->set_input_line(INPUT_LINE_RESET, BIT(data, 1) ? CLEAR_LINE : ASSERT_LINE); } @@ -400,10 +409,10 @@ void hvyunit_state::mermaid_p3_w(uint8_t data) void hvyunit_state::master_memory(address_map &map) { map(0x0000, 0x7fff).rom(); - map(0x8000, 0xbfff).bankr("master_bank"); + map(0x8000, 0xbfff).bankr(m_masterbank); map(0xc000, 0xcfff).rw(m_pandora, FUNC(kaneko_pandora_device::spriteram_r), FUNC(kaneko_pandora_device::spriteram_w)); map(0xd000, 0xdfff).ram(); - map(0xe000, 0xffff).ram().share("share1"); + map(0xe000, 0xffff).ram().share("sharedram"); } void hvyunit_state::master_io(address_map &map) @@ -418,14 +427,14 @@ void hvyunit_state::master_io(address_map &map) void hvyunit_state::slave_memory(address_map &map) { map(0x0000, 0x7fff).rom(); - map(0x8000, 0xbfff).bankr("slave_bank"); - map(0xc000, 0xc3ff).ram().w(FUNC(hvyunit_state::videoram_w)).share("videoram"); - map(0xc400, 0xc7ff).ram().w(FUNC(hvyunit_state::colorram_w)).share("colorram"); + map(0x8000, 0xbfff).bankr(m_slavebank); + map(0xc000, 0xc3ff).ram().w(FUNC(hvyunit_state::videoram_w)).share(m_videoram); + map(0xc400, 0xc7ff).ram().w(FUNC(hvyunit_state::colorram_w)).share(m_colorram); map(0xd000, 0xd1ff).ram().w(m_palette, FUNC(palette_device::write8_ext)).share("palette_ext"); map(0xd200, 0xd7ff).ram(); map(0xd800, 0xd9ff).ram().w(m_palette, FUNC(palette_device::write8)).share("palette"); map(0xda00, 0xdfff).ram(); - map(0xe000, 0xffff).ram().share("share1"); + map(0xe000, 0xffff).ram().share("sharedram"); } void hvyunit_state::slave_io(address_map &map) @@ -448,7 +457,7 @@ void hvyunit_state::slave_io(address_map &map) void hvyunit_state::sound_memory(address_map &map) { map(0x0000, 0x7fff).rom(); - map(0x8000, 0xbfff).bankr("sound_bank"); + map(0x8000, 0xbfff).bankr(m_soundbank); map(0xc000, 0xc7ff).ram(); } @@ -578,11 +587,11 @@ INPUT_PORTS_END *************************************/ static GFXDECODE_START( gfx_hvyunit ) - GFXDECODE_ENTRY( "gfx2", 0, gfx_8x8x4_row_2x2_group_packed_msb, 0x000, 16 ) /* background tiles */ + GFXDECODE_ENTRY( "tiles", 0, gfx_8x8x4_row_2x2_group_packed_msb, 0x000, 16 ) // background tiles GFXDECODE_END static GFXDECODE_START( gfx_hvyunit_spr ) - GFXDECODE_ENTRY( "gfx1", 0, gfx_8x8x4_row_2x2_group_packed_msb, 0x100, 16 ) /* sprite bank */ + GFXDECODE_ENTRY( "sprites", 0, gfx_8x8x4_row_2x2_group_packed_msb, 0x100, 16 ) // sprite bank GFXDECODE_END @@ -592,7 +601,7 @@ GFXDECODE_END * *************************************/ -/* Main Z80 uses IM2 */ +// Main Z80 uses IM2 TIMER_DEVICE_CALLBACK_MEMBER(hvyunit_state::scanline) { int scanline = param; @@ -600,7 +609,7 @@ TIMER_DEVICE_CALLBACK_MEMBER(hvyunit_state::scanline) if(scanline == 240) // vblank-out irq m_mastercpu->set_input_line_and_vector(0, HOLD_LINE, 0xfd); // Z80 - /* Pandora "sprite end dma" irq? TODO: timing is likely off */ + // Pandora "sprite end dma" irq? TODO: timing is likely off if(scanline == 64) m_mastercpu->set_input_line_and_vector(0, HOLD_LINE, 0xff); // Z80 } @@ -613,21 +622,21 @@ TIMER_DEVICE_CALLBACK_MEMBER(hvyunit_state::scanline) void hvyunit_state::hvyunit(machine_config &config) { - Z80(config, m_mastercpu, XTAL(12'000'000)/2); /* 6MHz verified on PCB */ + Z80(config, m_mastercpu, XTAL(12'000'000)/2); // 6MHz verified on PCB m_mastercpu->set_addrmap(AS_PROGRAM, &hvyunit_state::master_memory); m_mastercpu->set_addrmap(AS_IO, &hvyunit_state::master_io); TIMER(config, "scantimer").configure_scanline(FUNC(hvyunit_state::scanline), "screen", 0, 1); - Z80(config, m_slavecpu, XTAL(12'000'000)/2); /* 6MHz verified on PCB */ + Z80(config, m_slavecpu, XTAL(12'000'000)/2); // 6MHz verified on PCB m_slavecpu->set_addrmap(AS_PROGRAM, &hvyunit_state::slave_memory); m_slavecpu->set_addrmap(AS_IO, &hvyunit_state::slave_io); m_slavecpu->set_vblank_int("screen", FUNC(hvyunit_state::irq0_line_assert)); - Z80(config, m_soundcpu, XTAL(12'000'000)/2); /* 6MHz verified on PCB */ + Z80(config, m_soundcpu, XTAL(12'000'000)/2); // 6MHz verified on PCB m_soundcpu->set_addrmap(AS_PROGRAM, &hvyunit_state::sound_memory); m_soundcpu->set_addrmap(AS_IO, &hvyunit_state::sound_io); - I80C51(config, m_mermaid, XTAL(12'000'000)/2); /* 6MHz verified on PCB */ + I80C51(config, m_mermaid, XTAL(12'000'000)/2); // 6MHz verified on PCB m_mermaid->port_out_cb<0>().set(FUNC(hvyunit_state::mermaid_p0_w)); m_mermaid->port_in_cb<1>().set(FUNC(hvyunit_state::mermaid_p1_r)); m_mermaid->port_out_cb<1>().set(FUNC(hvyunit_state::mermaid_p1_w)); @@ -657,7 +666,7 @@ void hvyunit_state::hvyunit(machine_config &config) KANEKO_PANDORA(config, m_pandora, 0, m_palette, gfx_hvyunit_spr); - /* sound hardware */ + // sound hardware SPEAKER(config, "mono").front_center(); GENERIC_LATCH_8(config, m_soundlatch); @@ -676,7 +685,7 @@ void hvyunit_state::hvyunit(machine_config &config) * *************************************/ -/* There is likely a World version using the newer (B73_25 - B73_28) graphics ROMs with a program ROM labeled B73_29 */ +// There is likely a World version using the newer (B73_25 - B73_28) graphics ROMs with a program ROM labeled B73_29 ROM_START( hvyunit ) ROM_REGION( 0x20000, "master", 0 ) @@ -691,19 +700,19 @@ ROM_START( hvyunit ) ROM_REGION( 0x1000, "mermaid", 0 ) ROM_LOAD( "mermaid.bin", 0x0000, 0x0e00, CRC(88c5dd27) SHA1(5043fed7fd192891be7e4096f2c5daaae1538bc4) ) - ROM_REGION( 0x200000, "gfx1", 0 ) + ROM_REGION( 0x200000, "sprites", 0 ) ROM_LOAD( "b73_08.2f", 0x000000, 0x080000, CRC(f83dd808) SHA1(09d5f1e86fad3a0d2d3ac1845103d3f2833c6793) ) ROM_LOAD( "b73_07.2c", 0x100000, 0x010000, CRC(5cffa42c) SHA1(687e047345039479b35d5099e56dbc1d57284ed9) ) ROM_LOAD( "b73_06.2b", 0x120000, 0x010000, CRC(a98e4aea) SHA1(560fef03ad818894c9c7578c6282d55b646e8129) ) ROM_LOAD( "b73_01.1b", 0x140000, 0x010000, CRC(3a8a4489) SHA1(a01d7300015f90ce6dd571ad93e7a58270a99e47) ) ROM_LOAD( "b73_02.1c", 0x160000, 0x010000, CRC(025c536c) SHA1(075e95cc39e792049ae656404e7f7440df064391) ) ROM_LOAD( "b73_03.1d", 0x180000, 0x010000, CRC(ec6020cf) SHA1(2973aa2dc3deb2f27c9f1bad07a7664bad95b3f2) ) - /* 0x190000, 0x010000 no data */ + // 0x190000, 0x010000 no data ROM_LOAD( "b73_04.1f", 0x1a0000, 0x010000, CRC(f7badbb2) SHA1(d824ab4aba94d7ca02401f4f6f34213143c282ec) ) - /* 0x1b0000, 0x010000 no data */ + // 0x1b0000, 0x010000 no data ROM_LOAD( "b73_05.1h", 0x1c0000, 0x010000, CRC(b8e829d2) SHA1(31102358500d7b58173d4f18647decf5db744416) ) - ROM_REGION( 0x80000, "gfx2", 0 ) + ROM_REGION( 0x80000, "tiles", 0 ) ROM_LOAD( "b73_09.2p", 0x000000, 0x080000, CRC(537c647f) SHA1(941c0f4e251bc68e53d62e70b033a3a6c145bb7e) ) ROM_END @@ -720,14 +729,14 @@ ROM_START( hvyunitj ) ROM_REGION( 0x1000, "mermaid", 0 ) ROM_LOAD( "mermaid.bin", 0x0000, 0x0e00, CRC(88c5dd27) SHA1(5043fed7fd192891be7e4096f2c5daaae1538bc4) ) - ROM_REGION( 0x200000, "gfx1", 0 ) + ROM_REGION( 0x200000, "sprites", 0 ) ROM_LOAD( "b73_08.2f", 0x000000, 0x080000, CRC(f83dd808) SHA1(09d5f1e86fad3a0d2d3ac1845103d3f2833c6793) ) - ROM_LOAD( "b73_28.2c", 0x100000, 0x020000, CRC(a02e08d6) SHA1(72764d4e8474aaac0674fd1c20278a706da7ade2) ) /* == b73_22.2c, despite the different label */ - ROM_LOAD( "b73_27.2b", 0x120000, 0x020000, CRC(8708f97c) SHA1(ccddc7f2fa53c5e35345c2db0520f515c512b723) ) /* == b73_21.2b, despite the different label */ - ROM_LOAD( "b73_25.0b", 0x140000, 0x020000, CRC(2f13f81e) SHA1(9d9c1869bf582a0bc0581cdf5b65237124b9e456) ) /* == b73_15.0b, despite the different label */ - ROM_LOAD( "b73_26.0c", 0x160000, 0x010000, CRC(b8e829d2) SHA1(31102358500d7b58173d4f18647decf5db744416) ) /* == b73_16.0c, despite the different label */ + ROM_LOAD( "b73_28.2c", 0x100000, 0x020000, CRC(a02e08d6) SHA1(72764d4e8474aaac0674fd1c20278a706da7ade2) ) // == b73_22.2c, despite the different label + ROM_LOAD( "b73_27.2b", 0x120000, 0x020000, CRC(8708f97c) SHA1(ccddc7f2fa53c5e35345c2db0520f515c512b723) ) // == b73_21.2b, despite the different label + ROM_LOAD( "b73_25.0b", 0x140000, 0x020000, CRC(2f13f81e) SHA1(9d9c1869bf582a0bc0581cdf5b65237124b9e456) ) // == b73_15.0b, despite the different label + ROM_LOAD( "b73_26.0c", 0x160000, 0x010000, CRC(b8e829d2) SHA1(31102358500d7b58173d4f18647decf5db744416) ) // == b73_16.0c, despite the different label - ROM_REGION( 0x80000, "gfx2", 0 ) + ROM_REGION( 0x80000, "tiles", 0 ) ROM_LOAD( "b73_09.2p", 0x000000, 0x080000, CRC(537c647f) SHA1(941c0f4e251bc68e53d62e70b033a3a6c145bb7e) ) ROM_END @@ -744,18 +753,18 @@ ROM_START( hvyunitja ) ROM_REGION( 0x1000, "mermaid", 0 ) ROM_LOAD( "mermaid.bin", 0x0000, 0x0e00, CRC(88c5dd27) SHA1(5043fed7fd192891be7e4096f2c5daaae1538bc4) ) - ROM_REGION( 0x200000, "gfx1", 0 ) /* The data in first half of b73_15.0b actually differs slightly to the other sets, a 0x22 fill is replaced by 0xff on empty tiles */ + ROM_REGION( 0x200000, "sprites", 0 ) // The data in first half of b73_15.0b actually differs slightly to the other sets, a 0x22 fill is replaced by 0xff on empty tiles ROM_LOAD( "b73_22.2c", 0x100000, 0x020000, CRC(a02e08d6) SHA1(72764d4e8474aaac0674fd1c20278a706da7ade2) ) // == b73_28.2c, despite the different label - M5M27C101P mask ROM ROM_LOAD( "b73_21.2b", 0x120000, 0x020000, CRC(8708f97c) SHA1(ccddc7f2fa53c5e35345c2db0520f515c512b723) ) // == b73_27.2b, despite the different label - M5M27C101P mask ROM ROM_LOAD( "b73_15.0b", 0x140000, 0x020000, CRC(2f13f81e) SHA1(9d9c1869bf582a0bc0581cdf5b65237124b9e456) ) // == b73_25.0b, despite the different label - M5M27C101P mask ROM ROM_LOAD( "b73_16.0c", 0x160000, 0x010000, CRC(b8e829d2) SHA1(31102358500d7b58173d4f18647decf5db744416) ) // == b73_26.0c, despite the different label - HN27512P mask ROM - /* The data below is moved from 0x000000-0x080000 to 0x180000-0x200000 compared to other sets */ + // The data below is moved from 0x000000-0x080000 to 0x180000-0x200000 compared to other sets ROM_LOAD( "b73_17.0d", 0x180000, 0x020000, CRC(a8ec5309) SHA1(55418711fd9ca38f1c41c8c7dd7984920702c5e9) ) // == 1/4 b73_08.2f - M5M27C101P mask ROM ROM_LOAD( "b73_18.0f", 0x1a0000, 0x020000, CRC(dc955a69) SHA1(f476f449c1a6b1d0212e16827c121713451c1918) ) // == 2/4 b73_08.2f - M5M27C101P mask ROM ROM_LOAD( "b73_19.0h", 0x1c0000, 0x020000, CRC(2fb1b3e3) SHA1(f25e8a432721a772b62eff52a0b97e89f56d79af) ) // == 3/4 b73_08.2f - M5M27C101P mask ROM ROM_LOAD( "b73_20.0k", 0x1e0000, 0x020000, CRC(0662d0dd) SHA1(323b3f1d8fc034e22e8ac8dcc17b080ecaeaf3ed) ) // == 4/4 b73_08.2f - M5M27C101P mask ROM - ROM_REGION( 0x80000, "gfx2", 0 ) + ROM_REGION( 0x80000, "tiles", 0 ) ROM_LOAD( "b73_23.2p", 0x000000, 0x080000, NO_DUMP ) ROM_LOAD( "b73_09.2p", 0x000000, 0x080000, CRC(537c647f) SHA1(941c0f4e251bc68e53d62e70b033a3a6c145bb7e) ) ROM_END @@ -773,19 +782,19 @@ ROM_START( hvyunitjo ) ROM_REGION( 0x1000, "mermaid", 0 ) ROM_LOAD( "mermaid.bin", 0x0000, 0x0e00, CRC(88c5dd27) SHA1(5043fed7fd192891be7e4096f2c5daaae1538bc4) ) - ROM_REGION( 0x200000, "gfx1", 0 ) + ROM_REGION( 0x200000, "sprites", 0 ) ROM_LOAD( "b73_08.2f", 0x000000, 0x080000, CRC(f83dd808) SHA1(09d5f1e86fad3a0d2d3ac1845103d3f2833c6793) ) ROM_LOAD( "b73_07.2c", 0x100000, 0x010000, CRC(5cffa42c) SHA1(687e047345039479b35d5099e56dbc1d57284ed9) ) ROM_LOAD( "b73_06.2b", 0x120000, 0x010000, CRC(a98e4aea) SHA1(560fef03ad818894c9c7578c6282d55b646e8129) ) ROM_LOAD( "b73_01.1b", 0x140000, 0x010000, CRC(3a8a4489) SHA1(a01d7300015f90ce6dd571ad93e7a58270a99e47) ) ROM_LOAD( "b73_02.1c", 0x160000, 0x010000, CRC(025c536c) SHA1(075e95cc39e792049ae656404e7f7440df064391) ) ROM_LOAD( "b73_03.1d", 0x180000, 0x010000, CRC(ec6020cf) SHA1(2973aa2dc3deb2f27c9f1bad07a7664bad95b3f2) ) - /* 0x190000, 0x010000 no data */ + // 0x190000, 0x010000 no data ROM_LOAD( "b73_04.1f", 0x1a0000, 0x010000, CRC(f7badbb2) SHA1(d824ab4aba94d7ca02401f4f6f34213143c282ec) ) - /* 0x1b0000, 0x010000 no data */ + // 0x1b0000, 0x010000 no data ROM_LOAD( "b73_05.1h", 0x1c0000, 0x010000, CRC(b8e829d2) SHA1(31102358500d7b58173d4f18647decf5db744416) ) - ROM_REGION( 0x80000, "gfx2", 0 ) + ROM_REGION( 0x80000, "tiles", 0 ) ROM_LOAD( "b73_09.2p", 0x000000, 0x080000, CRC(537c647f) SHA1(941c0f4e251bc68e53d62e70b033a3a6c145bb7e) ) ROM_END @@ -802,14 +811,14 @@ ROM_START( hvyunitu ) ROM_REGION( 0x1000, "mermaid", 0 ) ROM_LOAD( "mermaid.bin", 0x0000, 0x0e00, CRC(88c5dd27) SHA1(5043fed7fd192891be7e4096f2c5daaae1538bc4) ) - ROM_REGION( 0x200000, "gfx1", 0 ) + ROM_REGION( 0x200000, "sprites", 0 ) ROM_LOAD( "b73_08.2f", 0x000000, 0x080000, CRC(f83dd808) SHA1(09d5f1e86fad3a0d2d3ac1845103d3f2833c6793) ) - ROM_LOAD( "b73_28.2c", 0x100000, 0x020000, CRC(a02e08d6) SHA1(72764d4e8474aaac0674fd1c20278a706da7ade2) ) /* == b73_22.2c, despite the different label */ - ROM_LOAD( "b73_27.2b", 0x120000, 0x020000, CRC(8708f97c) SHA1(ccddc7f2fa53c5e35345c2db0520f515c512b723) ) /* == b73_21.2b, despite the different label */ - ROM_LOAD( "b73_25.0b", 0x140000, 0x020000, CRC(2f13f81e) SHA1(9d9c1869bf582a0bc0581cdf5b65237124b9e456) ) /* == b73_15.0b, despite the different label */ - ROM_LOAD( "b73_26.0c", 0x160000, 0x010000, CRC(b8e829d2) SHA1(31102358500d7b58173d4f18647decf5db744416) ) /* == b73_16.0c, despite the different label */ + ROM_LOAD( "b73_28.2c", 0x100000, 0x020000, CRC(a02e08d6) SHA1(72764d4e8474aaac0674fd1c20278a706da7ade2) ) // == b73_22.2c, despite the different label + ROM_LOAD( "b73_27.2b", 0x120000, 0x020000, CRC(8708f97c) SHA1(ccddc7f2fa53c5e35345c2db0520f515c512b723) ) // == b73_21.2b, despite the different label + ROM_LOAD( "b73_25.0b", 0x140000, 0x020000, CRC(2f13f81e) SHA1(9d9c1869bf582a0bc0581cdf5b65237124b9e456) ) // == b73_15.0b, despite the different label + ROM_LOAD( "b73_26.0c", 0x160000, 0x010000, CRC(b8e829d2) SHA1(31102358500d7b58173d4f18647decf5db744416) ) // == b73_16.0c, despite the different label - ROM_REGION( 0x80000, "gfx2", 0 ) + ROM_REGION( 0x80000, "tiles", 0 ) ROM_LOAD( "b73_09.2p", 0x000000, 0x080000, CRC(537c647f) SHA1(941c0f4e251bc68e53d62e70b033a3a6c145bb7e) ) ROM_END diff --git a/src/mame/mame.lst b/src/mame/mame.lst index 12a9df60c3f..da01d80dda5 100644 --- a/src/mame/mame.lst +++ b/src/mame/mame.lst @@ -30617,9 +30617,6 @@ jackpota @source:misc/jaminator.cpp jaminator // 1990 Noise Toys Inc. -@source:misc/jankenmn.cpp -jankenmn // (c) 1985 Sunwise - @source:misc/jokrwild.cpp jokrwild // (c) 1988 Sigma @@ -34907,6 +34904,7 @@ hpierrot // NTC / NMK omatsuri // NMK pldoraemon // NMK plpittashi // NMK +sluster2 // NMK sweethrt // NMK trocana // NTC / NMK @@ -35309,6 +35307,8 @@ mspacmanbi // bootleg mspacmanblt // bootleg mspacmanblt2 // bootleg mspacmancr // bootleg on Crush Roller board +mspacmane // bootleg +mspacmane2 // bootleg mspacmanhnc // hack mspacmanlai // bootleg mspacmat // hack @@ -35333,6 +35333,7 @@ pacman // (c) 1980 Midway pacmanf // hack pacmanfm // bootleg (FAMARE S.A.) pacmanjpm // bootleg +pacmanmr // bootleg pacmanpe // pacmanso // pacmansp // hack (Video Game SA) @@ -42264,9 +42265,6 @@ squale // @source:skeleton/sterz80.cpp tongzi -@source:skeleton/swunktarot.cpp -unktarot - @source:skeleton/swyft.cpp swyft // @@ -43013,6 +43011,12 @@ shanghaij // (c) 1988 Sunsoft (Sun Electronics) @source:sunelectronics/tonton.cpp tonton // (c) 199? Success / Taiyo Jidoki. +@source:sunwise/anoworld.cpp +anoworld + +@source:sunwise/jankenmn.cpp +jankenmn // (c) 1985 Sunwise + @source:svi/svi318.cpp svi318 // SVI-318 (PAL) svi318n // SVI-318 (NTSC) diff --git a/src/mame/misc/ettrivia.cpp b/src/mame/misc/ettrivia.cpp index f7fd491fdc8..b4086d12d32 100644 --- a/src/mame/misc/ettrivia.cpp +++ b/src/mame/misc/ettrivia.cpp @@ -1,12 +1,13 @@ // license:BSD-3-Clause -// copyright-holders:Pierpaolo Prazzoli +// copyright-holders: Pierpaolo Prazzoli + /* Enerdyne Technologies Inc. (El Cajon, CA 92020) hardware CPU: Z80 Sound: AY-3-8912 (x3) - Other: Dallas DS1220Y NVRAM, N8T245N (x2), PAL16L8A-2CN (x2,protected) + Other: Dallas DS1220Y NVRAM, N8T245N (x2), PAL16L8A-2CN (x2, protected) XTAL = 12 MHz @@ -27,10 +28,12 @@ Supported games: */ #include "emu.h" + #include "cpu/z80/z80.h" #include "machine/nvram.h" #include "sound/ay8910.h" #include "video/resnet.h" + #include "emupal.h" #include "screen.h" #include "speaker.h" @@ -44,83 +47,86 @@ class ettrivia_state : public driver_device public: ettrivia_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag) - , m_fg_videoram(*this, "fg_videoram") - , m_bg_videoram(*this, "bg_videoram") , m_maincpu(*this, "maincpu") , m_gfxdecode(*this, "gfxdecode") , m_ay(*this, "ay%u", 1) + , m_fg_videoram(*this, "fg_videoram") + , m_bg_videoram(*this, "bg_videoram") + , m_questions_bank(*this, "questions_bank") + , m_coin(*this, "COIN") { } void ettrivia(machine_config &config); protected: + virtual void machine_start() override; virtual void video_start() override; private: - int m_palreg = 0; - int m_gfx_bank = 0; - int m_question_bank = 0; - int m_b000_val = 0; - int m_b000_ret = 0; - int m_b800_prev = 0; + required_device m_maincpu; + required_device m_gfxdecode; + required_device_array m_ay; + required_shared_ptr m_fg_videoram; required_shared_ptr m_bg_videoram; + required_memory_bank m_questions_bank; + + required_ioport m_coin; + + uint8_t m_palreg = 0; + uint8_t m_gfx_bank = 0; + uint8_t m_b000_val = 0; + uint8_t m_b000_ret = 0; + uint8_t m_b800_prev = 0; + tilemap_t *m_bg_tilemap = nullptr; tilemap_t *m_fg_tilemap = nullptr; - void ettrivia_fg_w(offs_t offset, uint8_t data); - void ettrivia_bg_w(offs_t offset, uint8_t data); - void ettrivia_control_w(uint8_t data); - uint8_t ettrivia_question_r(offs_t offset); + + void fg_w(offs_t offset, uint8_t data); + void bg_w(offs_t offset, uint8_t data); + void control_w(uint8_t data); + uint8_t question_r(offs_t offset); void b000_w(uint8_t data); uint8_t b000_r(); void b800_w(uint8_t data); TILE_GET_INFO_MEMBER(get_tile_info_bg); TILE_GET_INFO_MEMBER(get_tile_info_fg); - void ettrivia_palette(palette_device &palette) const; - uint32_t screen_update_ettrivia(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - INTERRUPT_GEN_MEMBER(ettrivia_interrupt); + void palette(palette_device &palette) const; + uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(interrupt); inline void get_tile_info(tile_data &tileinfo, int tile_index, uint8_t *vidram, int gfx_code); - required_device m_maincpu; - required_device m_gfxdecode; - required_device_array m_ay; - void cpu_map(address_map &map); + void program_map(address_map &map); void io_map(address_map &map); }; -void ettrivia_state::ettrivia_fg_w(offs_t offset, uint8_t data) +void ettrivia_state::fg_w(offs_t offset, uint8_t data) { m_fg_videoram[offset] = data; m_fg_tilemap->mark_tile_dirty(offset); } -void ettrivia_state::ettrivia_bg_w(offs_t offset, uint8_t data) +void ettrivia_state::bg_w(offs_t offset, uint8_t data) { m_bg_videoram[offset] = data; m_bg_tilemap->mark_tile_dirty(offset); } -void ettrivia_state::ettrivia_control_w(uint8_t data) +void ettrivia_state::control_w(uint8_t data) { machine().tilemap().mark_all_dirty(); m_palreg = (data >> 1) & 3; m_gfx_bank = (data >> 2) & 1; - m_question_bank = (data >> 3) & 3; + m_questions_bank->set_entry((data >> 3) & 3); machine().bookkeeping().coin_counter_w(0, data & 0x80); flip_screen_set(data & 1); } -uint8_t ettrivia_state::ettrivia_question_r(offs_t offset) -{ - uint8_t *QUESTIONS = memregion("user1")->base(); - return QUESTIONS[offset + 0x10000 * m_question_bank]; -} - void ettrivia_state::b000_w(uint8_t data) { m_b000_val = data; @@ -128,7 +134,7 @@ void ettrivia_state::b000_w(uint8_t data) uint8_t ettrivia_state::b000_r() { - if(m_b800_prev) + if (m_b800_prev) return m_b000_ret; else return m_b000_val; @@ -136,17 +142,17 @@ uint8_t ettrivia_state::b000_r() void ettrivia_state::b800_w(uint8_t data) { - switch(data) + switch (data) { - /* special case to return the value written to 0xb000 */ - /* does it reset the chips too ? */ + /* special case to return the value written to 0xb000 + does it reset the chips too ? */ case 0: break; case 0xc4: m_b000_ret = m_ay[0]->data_r(); break; case 0x94: m_b000_ret = m_ay[1]->data_r(); break; case 0x86: m_b000_ret = m_ay[2]->data_r(); break; case 0x80: - switch(m_b800_prev) + switch (m_b800_prev) { case 0xe0: m_ay[0]->address_w(m_b000_val); break; case 0x98: m_ay[1]->address_w(m_b000_val); break; @@ -163,22 +169,33 @@ void ettrivia_state::b800_w(uint8_t data) m_b800_prev = data; } -void ettrivia_state::cpu_map(address_map &map) +void ettrivia_state::machine_start() +{ + m_questions_bank->configure_entries(0, 4, memregion("questions")->base(), 0x10000); + + save_item(NAME(m_palreg)); + save_item(NAME(m_gfx_bank)); + save_item(NAME(m_b000_val)); + save_item(NAME(m_b000_ret)); + save_item(NAME(m_b800_prev)); +} + +void ettrivia_state::program_map(address_map &map) { map(0x0000, 0x7fff).rom(); map(0x8000, 0x87ff).ram().share("nvram"); - map(0x9000, 0x9000).w(FUNC(ettrivia_state::ettrivia_control_w)); + map(0x9000, 0x9000).w(FUNC(ettrivia_state::control_w)); map(0x9800, 0x9800).nopw(); map(0xa000, 0xa000).nopw(); map(0xb000, 0xb000).r(FUNC(ettrivia_state::b000_r)).w(FUNC(ettrivia_state::b000_w)); map(0xb800, 0xb800).w(FUNC(ettrivia_state::b800_w)); - map(0xc000, 0xc7ff).ram().w(FUNC(ettrivia_state::ettrivia_fg_w)).share("fg_videoram"); - map(0xe000, 0xe7ff).ram().w(FUNC(ettrivia_state::ettrivia_bg_w)).share("bg_videoram"); + map(0xc000, 0xc7ff).ram().w(FUNC(ettrivia_state::fg_w)).share(m_fg_videoram); + map(0xe000, 0xe7ff).ram().w(FUNC(ettrivia_state::bg_w)).share(m_bg_videoram); } void ettrivia_state::io_map(address_map &map) { - map(0x0000, 0xffff).r(FUNC(ettrivia_state::ettrivia_question_r)); + map(0x0000, 0xffff).bankr(m_questions_bank); } static INPUT_PORTS_START( ettrivia ) @@ -212,24 +229,24 @@ static const gfx_layout charlayout = RGN_FRAC(1,2), 2, { RGN_FRAC(1,2), RGN_FRAC(0,2) }, - { 7, 6, 5, 4, 3, 2, 1, 0 }, - { 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8 }, + { STEP8(7,-1) }, + { STEP8(0,8) }, 8*8 }; static GFXDECODE_START( gfx_ettrivia ) - GFXDECODE_ENTRY( "gfx1", 0, charlayout, 0, 32 ) - GFXDECODE_ENTRY( "gfx2", 0, charlayout, 32*4, 32 ) + GFXDECODE_ENTRY( "bgchars", 0, charlayout, 0, 32 ) + GFXDECODE_ENTRY( "fgchars", 0, charlayout, 32*4, 32 ) GFXDECODE_END void ettrivia_state::get_tile_info(tile_data &tileinfo, int tile_index, uint8_t *vidram, int gfx_code) { int code = vidram[tile_index]; - int color = (code >> 5) + 8 * m_palreg; + int const color = (code >> 5) + 8 * m_palreg; code += m_gfx_bank * 0x100; - tileinfo.set(gfx_code,code,color,0); + tileinfo.set(gfx_code, code, color, 0); } TILE_GET_INFO_MEMBER(ettrivia_state::get_tile_info_bg) @@ -242,7 +259,7 @@ TILE_GET_INFO_MEMBER(ettrivia_state::get_tile_info_fg) get_tile_info(tileinfo, tile_index, m_fg_videoram, 1); } -void ettrivia_state::ettrivia_palette(palette_device &palette) const +void ettrivia_state::palette(palette_device &palette) const { uint8_t const *const color_prom = memregion("proms")->base(); static constexpr int resistances[2] = { 270, 130 }; @@ -260,41 +277,41 @@ void ettrivia_state::ettrivia_palette(palette_device &palette) const // red component bit0 = BIT(color_prom[i], 0); - bit1 = BIT(color_prom[i+0x100], 0); + bit1 = BIT(color_prom[i + 0x100], 0); int const r = combine_weights(weights, bit0, bit1); // green component bit0 = BIT(color_prom[i], 2); - bit1 = BIT(color_prom[i+0x100], 2); + bit1 = BIT(color_prom[i + 0x100], 2); int const g = combine_weights(weights, bit0, bit1); // blue component bit0 = BIT(color_prom[i], 1); - bit1 = BIT(color_prom[i+0x100], 1); + bit1 = BIT(color_prom[i + 0x100], 1); int const b = combine_weights(weights, bit0, bit1); - palette.set_pen_color(bitswap<8>(i,5,7,6,2,1,0,4,3), rgb_t(r, g, b)); + palette.set_pen_color(bitswap<8>(i, 5, 7, 6, 2, 1, 0, 4, 3), rgb_t(r, g, b)); } } void ettrivia_state::video_start() { - m_bg_tilemap = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(*this, FUNC(ettrivia_state::get_tile_info_bg)), TILEMAP_SCAN_ROWS, 8,8,64,32); - m_fg_tilemap = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(*this, FUNC(ettrivia_state::get_tile_info_fg)), TILEMAP_SCAN_ROWS, 8,8,64,32); + m_bg_tilemap = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(*this, FUNC(ettrivia_state::get_tile_info_bg)), TILEMAP_SCAN_ROWS, 8, 8, 64, 32); + m_fg_tilemap = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(*this, FUNC(ettrivia_state::get_tile_info_fg)), TILEMAP_SCAN_ROWS, 8, 8, 64, 32); m_fg_tilemap->set_transparent_pen(0); } -uint32_t ettrivia_state::screen_update_ettrivia(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) +uint32_t ettrivia_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { - m_bg_tilemap->draw(screen, bitmap, cliprect, 0,0); - m_fg_tilemap->draw(screen, bitmap, cliprect, 0,0); + m_bg_tilemap->draw(screen, bitmap, cliprect, 0, 0); + m_fg_tilemap->draw(screen, bitmap, cliprect, 0, 0); return 0; } -INTERRUPT_GEN_MEMBER(ettrivia_state::ettrivia_interrupt) +INTERRUPT_GEN_MEMBER(ettrivia_state::interrupt) { - if( ioport("COIN")->read() & 0x01 ) + if (m_coin->read() & 0x01) device.execute().pulse_input_line(INPUT_LINE_NMI, attotime::zero); else device.execute().set_input_line(0, HOLD_LINE); @@ -302,26 +319,26 @@ INTERRUPT_GEN_MEMBER(ettrivia_state::ettrivia_interrupt) void ettrivia_state::ettrivia(machine_config &config) { - Z80(config, m_maincpu, 12000000/4-48000); //should be ok, it gives the 300 interrupts expected - m_maincpu->set_addrmap(AS_PROGRAM, &ettrivia_state::cpu_map); + Z80(config, m_maincpu, 12'000'000 / 4 - 48'000); //should be ok, it gives the 300 interrupts expected + m_maincpu->set_addrmap(AS_PROGRAM, &ettrivia_state::program_map); m_maincpu->set_addrmap(AS_IO, &ettrivia_state::io_map); - m_maincpu->set_vblank_int("screen", FUNC(ettrivia_state::ettrivia_interrupt)); + m_maincpu->set_vblank_int("screen", FUNC(ettrivia_state::interrupt)); NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); - /* video hardware */ + // video hardware screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); screen.set_refresh_hz(60); screen.set_vblank_time(ATTOSECONDS_IN_USEC(0)); screen.set_size(256, 256); screen.set_visarea(0*8, 32*8-1, 0*8, 28*8-1); - screen.set_screen_update(FUNC(ettrivia_state::screen_update_ettrivia)); + screen.set_screen_update(FUNC(ettrivia_state::screen_update)); screen.set_palette("palette"); GFXDECODE(config, m_gfxdecode, "palette", gfx_ettrivia); - PALETTE(config, "palette", FUNC(ettrivia_state::ettrivia_palette), 256); + PALETTE(config, "palette", FUNC(ettrivia_state::palette), 256); - /* sound hardware */ + // sound hardware SPEAKER(config, "mono").front_center(); AY8912(config, m_ay[0], 1500000).add_route(ALL_OUTPUTS, "mono", 0.25); @@ -339,19 +356,19 @@ ROM_START( promutrv ) ROM_REGION( 0x10000, "maincpu", 0 ) ROM_LOAD( "u16.u16", 0x0000, 0x8000, CRC(e37d48be) SHA1(1d700cff0c28e50fa2851e0c46de21aa47a23416) ) - ROM_REGION( 0x2000, "gfx1", 0 ) + ROM_REGION( 0x2000, "bgchars", 0 ) ROM_LOAD( "mt44ic.44", 0x0000, 0x1000, CRC(8d543ea4) SHA1(86ab848a45851540d5d3315e15b92f7b2ac0b77c) ) ROM_LOAD( "mt46ic.46", 0x1000, 0x1000, CRC(6d6e1f68) SHA1(e8196ecd915a2528122407d31a7078f177be0beb) ) - ROM_REGION( 0x2000, "gfx2", 0 ) + ROM_REGION( 0x2000, "fgchars", 0 ) ROM_LOAD( "mt48ic.48", 0x0000, 0x1000, CRC(f2efe300) SHA1(419e889b2f4d038ae64e3ccf4e2498add80b4c9f) ) ROM_LOAD( "mt50ic.50", 0x1000, 0x1000, CRC(ee89d24e) SHA1(e3536df549278040255657201433ab23e0386533) ) ROM_REGION( 0x0200, "proms", 0 ) - ROM_LOAD( "ic64.prm", 0x0000, 0x0100, CRC(1cf9c914) SHA1(4c39b10c1be889d6ef4313b2112f4216d34f7327) ) /* palette low bits */ - ROM_LOAD( "ic63.prm", 0x0100, 0x0100, CRC(749da5a8) SHA1(8e30f5b014bc8ff2dc4986ef35a979e525681cb9) ) /* palette high bits */ + ROM_LOAD( "ic64.prm", 0x0000, 0x0100, CRC(1cf9c914) SHA1(4c39b10c1be889d6ef4313b2112f4216d34f7327) ) // palette low bits + ROM_LOAD( "ic63.prm", 0x0100, 0x0100, CRC(749da5a8) SHA1(8e30f5b014bc8ff2dc4986ef35a979e525681cb9) ) // palette high bits - ROM_REGION( 0x40000, "user1", 0 ) /* Question roms */ + ROM_REGION( 0x40000, "questions", 0 ) ROM_LOAD( "movie-tv.lo0", 0x00000, 0x8000, CRC(dbf03e62) SHA1(0210442ff80cce8fe39ba5e373bca0f47bb389c4) ) ROM_LOAD( "movie-tv.hi0", 0x08000, 0x8000, CRC(77f09aab) SHA1(007ae0ec1f37b575412fa71c92d1891a62069089) ) ROM_LOAD( "scifi.lo1", 0x10000, 0x8000, CRC(b5595f81) SHA1(5e7fa334f6541860a5c04e5f345673ea12efafb4) ) @@ -366,19 +383,19 @@ ROM_START( promutrva ) ROM_REGION( 0x10000, "maincpu", 0 ) ROM_LOAD( "u16.u16", 0x0000, 0x8000, CRC(e37d48be) SHA1(1d700cff0c28e50fa2851e0c46de21aa47a23416) ) - ROM_REGION( 0x2000, "gfx1", 0 ) + ROM_REGION( 0x2000, "bgchars", 0 ) ROM_LOAD( "mt44ic.44", 0x0000, 0x1000, CRC(8d543ea4) SHA1(86ab848a45851540d5d3315e15b92f7b2ac0b77c) ) ROM_LOAD( "mt46ic.46", 0x1000, 0x1000, CRC(6d6e1f68) SHA1(e8196ecd915a2528122407d31a7078f177be0beb) ) - ROM_REGION( 0x2000, "gfx2", 0 ) + ROM_REGION( 0x2000, "fgchars", 0 ) ROM_LOAD( "mt48ic.48", 0x0000, 0x1000, CRC(f2efe300) SHA1(419e889b2f4d038ae64e3ccf4e2498add80b4c9f) ) ROM_LOAD( "mt50ic.50", 0x1000, 0x1000, CRC(ee89d24e) SHA1(e3536df549278040255657201433ab23e0386533) ) ROM_REGION( 0x0200, "proms", 0 ) - ROM_LOAD( "ic64.prm", 0x0000, 0x0100, CRC(1cf9c914) SHA1(4c39b10c1be889d6ef4313b2112f4216d34f7327) ) /* palette low bits */ - ROM_LOAD( "ic63.prm", 0x0100, 0x0100, CRC(749da5a8) SHA1(8e30f5b014bc8ff2dc4986ef35a979e525681cb9) ) /* palette high bits */ + ROM_LOAD( "ic64.prm", 0x0000, 0x0100, CRC(1cf9c914) SHA1(4c39b10c1be889d6ef4313b2112f4216d34f7327) ) // palette low bits + ROM_LOAD( "ic63.prm", 0x0100, 0x0100, CRC(749da5a8) SHA1(8e30f5b014bc8ff2dc4986ef35a979e525681cb9) ) // palette high bits - ROM_REGION( 0x40000, "user1", 0 ) /* Question roms */ + ROM_REGION( 0x40000, "questions", 0 ) ROM_LOAD( "movie-tv.lo0", 0x00000, 0x8000, CRC(dbf03e62) SHA1(0210442ff80cce8fe39ba5e373bca0f47bb389c4) ) ROM_LOAD( "movie-tv.hi0", 0x08000, 0x8000, CRC(77f09aab) SHA1(007ae0ec1f37b575412fa71c92d1891a62069089) ) ROM_LOAD( "rock-pop.lo1", 0x10000, 0x8000, CRC(4252bc23) SHA1(d6c5b3c5f227b043f298cea585bcb934538b8880) ) @@ -393,19 +410,19 @@ ROM_START( promutrvb ) ROM_REGION( 0x10000, "maincpu", 0 ) ROM_LOAD( "u16.u16", 0x0000, 0x8000, CRC(e37d48be) SHA1(1d700cff0c28e50fa2851e0c46de21aa47a23416) ) - ROM_REGION( 0x2000, "gfx1", 0 ) + ROM_REGION( 0x2000, "bgchars", 0 ) ROM_LOAD( "mt44.ic44", 0x0000, 0x1000, CRC(8d543ea4) SHA1(86ab848a45851540d5d3315e15b92f7b2ac0b77c) ) ROM_LOAD( "mt46.ic46", 0x1000, 0x1000, CRC(6d6e1f68) SHA1(e8196ecd915a2528122407d31a7078f177be0beb) ) - ROM_REGION( 0x2000, "gfx2", 0 ) + ROM_REGION( 0x2000, "fgchars", 0 ) ROM_LOAD( "mt48.ic48", 0x0000, 0x1000, CRC(f2efe300) SHA1(419e889b2f4d038ae64e3ccf4e2498add80b4c9f) ) ROM_LOAD( "mt50.ic50", 0x1000, 0x1000, CRC(ee89d24e) SHA1(e3536df549278040255657201433ab23e0386533) ) ROM_REGION( 0x0200, "proms", 0 ) - ROM_LOAD( "dm74s287n.ic64", 0x0000, 0x0100, CRC(1cf9c914) SHA1(4c39b10c1be889d6ef4313b2112f4216d34f7327) ) /* palette low bits */ - ROM_LOAD( "dm74s287n.ic63", 0x0100, 0x0100, CRC(749da5a8) SHA1(8e30f5b014bc8ff2dc4986ef35a979e525681cb9) ) /* palette high bits */ + ROM_LOAD( "dm74s287n.ic64", 0x0000, 0x0100, CRC(1cf9c914) SHA1(4c39b10c1be889d6ef4313b2112f4216d34f7327) ) // palette low bits + ROM_LOAD( "dm74s287n.ic63", 0x0100, 0x0100, CRC(749da5a8) SHA1(8e30f5b014bc8ff2dc4986ef35a979e525681cb9) ) // palette high bits - ROM_REGION( 0x40000, "user1", 0 ) /* Question roms */ + ROM_REGION( 0x40000, "questions", 0 ) ROM_LOAD( "movie-tv.lo0.u8", 0x00000, 0x8000, CRC(dbf03e62) SHA1(0210442ff80cce8fe39ba5e373bca0f47bb389c4) ) ROM_LOAD( "movie-tv.hi0.u7", 0x08000, 0x8000, CRC(77f09aab) SHA1(007ae0ec1f37b575412fa71c92d1891a62069089) ) ROM_LOAD( "rock-pop.lo1.u6", 0x10000, 0x8000, CRC(4252bc23) SHA1(d6c5b3c5f227b043f298cea585bcb934538b8880) ) @@ -424,19 +441,19 @@ ROM_START( promutrvc ) ROM_REGION( 0x10000, "maincpu", 0 ) ROM_LOAD( "u16.u16", 0x0000, 0x8000, CRC(e37d48be) SHA1(1d700cff0c28e50fa2851e0c46de21aa47a23416) ) - ROM_REGION( 0x2000, "gfx1", 0 ) + ROM_REGION( 0x2000, "bgchars", 0 ) ROM_LOAD( "mt44.ic44", 0x0000, 0x1000, CRC(8d543ea4) SHA1(86ab848a45851540d5d3315e15b92f7b2ac0b77c) ) ROM_LOAD( "mt46.ic46", 0x1000, 0x1000, CRC(6d6e1f68) SHA1(e8196ecd915a2528122407d31a7078f177be0beb) ) - ROM_REGION( 0x2000, "gfx2", 0 ) + ROM_REGION( 0x2000, "fgchars", 0 ) ROM_LOAD( "mt48.ic48", 0x0000, 0x1000, CRC(f2efe300) SHA1(419e889b2f4d038ae64e3ccf4e2498add80b4c9f) ) ROM_LOAD( "mt50.ic50", 0x1000, 0x1000, CRC(ee89d24e) SHA1(e3536df549278040255657201433ab23e0386533) ) ROM_REGION( 0x0200, "proms", 0 ) - ROM_LOAD( "dm74s287n.ic64", 0x0000, 0x0100, CRC(1cf9c914) SHA1(4c39b10c1be889d6ef4313b2112f4216d34f7327) ) /* palette low bits */ - ROM_LOAD( "dm74s287n.ic63", 0x0100, 0x0100, CRC(749da5a8) SHA1(8e30f5b014bc8ff2dc4986ef35a979e525681cb9) ) /* palette high bits */ + ROM_LOAD( "dm74s287n.ic64", 0x0000, 0x0100, CRC(1cf9c914) SHA1(4c39b10c1be889d6ef4313b2112f4216d34f7327) ) // palette low bits + ROM_LOAD( "dm74s287n.ic63", 0x0100, 0x0100, CRC(749da5a8) SHA1(8e30f5b014bc8ff2dc4986ef35a979e525681cb9) ) // palette high bits - ROM_REGION( 0x40000, "user1", 0 ) /* Question roms */ + ROM_REGION( 0x40000, "questions", 0 ) ROM_LOAD( "sports.lo0.u8", 0x00000, 0x8000, CRC(bb28fa92) SHA1(a3c4c67be0e31793d68b0b048f3a73e9ce1d5859) ) ROM_LOAD( "sports2.hi0.u7", 0x08000, 0x8000, CRC(4d0107d7) SHA1(4cbef1bc5faaca52ce6bb490560f213d60a96191) ) ROM_LOAD( "expert.lo1.u6", 0x10000, 0x8000, CRC(19153d1a) SHA1(a2f2bbabbd1c68aae58ff29a43cb02b0e8867f5a) ) @@ -455,19 +472,19 @@ ROM_START( strvmstr ) ROM_REGION( 0x10000, "maincpu", 0 ) ROM_LOAD( "stm16.u16", 0x0000, 0x8000, CRC(ae734db9) SHA1(1bacdfdebaa1f250bfbd49053c3910f1396afe11) ) - ROM_REGION( 0x2000, "gfx1", 0 ) + ROM_REGION( 0x2000, "bgchars", 0 ) ROM_LOAD( "stm44.rom", 0x0000, 0x1000, CRC(e69da710) SHA1(218a9d7600d67858d1f21282a0cebec0ae93e0ff) ) ROM_LOAD( "stm46.rom", 0x1000, 0x1000, CRC(d927a1f1) SHA1(63a49a61107deaf7a9f28b9653c310c5331f5143) ) - ROM_REGION( 0x2000, "gfx2", 0 ) + ROM_REGION( 0x2000, "fgchars", 0 ) ROM_LOAD( "stm48.rom", 0x0000, 0x1000, CRC(51719714) SHA1(fdecbd22ea65eec7b4b5138f89ddc5876b05def6) ) ROM_LOAD( "stm50.rom", 0x1000, 0x1000, CRC(cfc1a1d1) SHA1(9ef38f12360dd946651e67770742ca72fa6846f1) ) ROM_REGION( 0x0200, "proms", 0 ) - ROM_LOAD( "stm64.prm", 0x0000, 0x0100, BAD_DUMP CRC(69ebc0b8) SHA1(de2b936e3246e3bfc7e2ff9546c1854ec3504cc2) ) /* palette low bits */ - ROM_LOAD( "stm63.prm", 0x0100, 0x0100, BAD_DUMP CRC(305271cf) SHA1(6fd5fe085d79ca7aa57010cffbdb2a85b9c24701) ) /* palette high bits */ + ROM_LOAD( "stm64.prm", 0x0000, 0x0100, BAD_DUMP CRC(69ebc0b8) SHA1(de2b936e3246e3bfc7e2ff9546c1854ec3504cc2) ) // palette low bits + ROM_LOAD( "stm63.prm", 0x0100, 0x0100, BAD_DUMP CRC(305271cf) SHA1(6fd5fe085d79ca7aa57010cffbdb2a85b9c24701) ) // palette high bits - ROM_REGION( 0x40000, "user1", 0 ) /* Question roms */ + ROM_REGION( 0x40000, "questions", 0 ) ROM_LOAD( "sex2.lo0", 0x00000, 0x8000, CRC(9c68b277) SHA1(34bc9d7b973fe482abd5e34a058b72eb5ec8db64) ) ROM_LOAD( "sports.hi0", 0x08000, 0x8000, CRC(3678fb79) SHA1(4e40cc20707195c0e88e595f752a2982b531b57e) ) ROM_LOAD( "movies.lo1", 0x10000, 0x8000, CRC(16cba1b7) SHA1(8aa3eff72d1ec8dac906f2e803a88578a9fe763c) ) @@ -481,8 +498,8 @@ ROM_END } // anonymous namespace -GAME( 1985, promutrv, 0, ettrivia, ettrivia, ettrivia_state, empty_init, ROT270, "Enerdyne Technologies Inc.", "Progressive Music Trivia (Question set 1)", 0 ) -GAME( 1985, promutrva, promutrv, ettrivia, ettrivia, ettrivia_state, empty_init, ROT270, "Enerdyne Technologies Inc.", "Progressive Music Trivia (Question set 2)", 0 ) -GAME( 1985, promutrvb, promutrv, ettrivia, ettrivia, ettrivia_state, empty_init, ROT270, "Enerdyne Technologies Inc.", "Progressive Music Trivia (Question set 3)", 0 ) -GAME( 1985, promutrvc, promutrv, ettrivia, ettrivia, ettrivia_state, empty_init, ROT270, "Enerdyne Technologies Inc.", "Progressive Music Trivia (Question set 4)", 0 ) -GAME( 1986, strvmstr, 0, ettrivia, ettrivia, ettrivia_state, empty_init, ROT270, "Enerdyne Technologies Inc.", "Super Trivia Master", MACHINE_WRONG_COLORS ) +GAME( 1985, promutrv, 0, ettrivia, ettrivia, ettrivia_state, empty_init, ROT270, "Enerdyne Technologies Inc.", "Progressive Music Trivia (Question set 1)", MACHINE_SUPPORTS_SAVE ) +GAME( 1985, promutrva, promutrv, ettrivia, ettrivia, ettrivia_state, empty_init, ROT270, "Enerdyne Technologies Inc.", "Progressive Music Trivia (Question set 2)", MACHINE_SUPPORTS_SAVE ) +GAME( 1985, promutrvb, promutrv, ettrivia, ettrivia, ettrivia_state, empty_init, ROT270, "Enerdyne Technologies Inc.", "Progressive Music Trivia (Question set 3)", MACHINE_SUPPORTS_SAVE ) +GAME( 1985, promutrvc, promutrv, ettrivia, ettrivia, ettrivia_state, empty_init, ROT270, "Enerdyne Technologies Inc.", "Progressive Music Trivia (Question set 4)", MACHINE_SUPPORTS_SAVE ) +GAME( 1986, strvmstr, 0, ettrivia, ettrivia, ettrivia_state, empty_init, ROT270, "Enerdyne Technologies Inc.", "Super Trivia Master", MACHINE_WRONG_COLORS | MACHINE_SUPPORTS_SAVE ) diff --git a/src/mame/nmk/nmkmedal.cpp b/src/mame/nmk/nmkmedal.cpp index 0e8cecf059c..06b885aad7c 100644 --- a/src/mame/nmk/nmkmedal.cpp +++ b/src/mame/nmk/nmkmedal.cpp @@ -383,13 +383,23 @@ void omatsuri_state::omatsuri(machine_config &config) ROM_START( drail ) // handwritten labels ROM_REGION( 0x10000, "maincpu", 0 ) - ROM_LOAD( "1_dream rail v08c 2c0c v957220.u4", 0x00000, 0x10000, CRC(c14fae88) SHA1(f0478b563ac851372bc0b93772d89ab70ad61877) ) // 通ドリームレール V08C 2C0C V957220, 1xxxxxxxxxxxxxxx = 0xFF + ROM_LOAD( "1_dream rail v08c 2c0c v987275.u1", 0x00000, 0x10000, CRC(c14fae88) SHA1(f0478b563ac851372bc0b93772d89ab70ad61877) ) // 通ドリームレール V08C 2C0C V957220, 1xxxxxxxxxxxxxxx = 0xFF ROM_REGION( 0xc0000, "oki", 0 ) // NMK112 device expects the first 0x40000 bytes to be left empty. ROM_LOAD( "2_dream rail pcm.u11", 0x40000, 0x80000, CRC(efdc1eea) SHA1(c39fed6f97b71556b468e0872a8240fe7b6495e6) ) // ドリームレールPCM // empty socket 3.u10 ROM_END +ROM_START( sluster2 ) // same PCB as drail + ROM_REGION( 0x10000, "maincpu", 0 ) + ROM_LOAD( "slusterii_v987275.u1", 0x00000, 0x10000, CRC(5139ac8f) SHA1(90739006e8f76cda460ef59b9a9cca40800bb44f) ) // SラスターII V987275, 11xxxxxxxxxxxxxx = 0xFF + + + ROM_REGION( 0xc0000, "oki", 0 ) // NMK112 device expects the first 0x40000 bytes to be left empty. + ROM_LOAD( "sluster2_2.u11", 0x40000, 0x80000, CRC(d8aa034c) SHA1(0082eec841c7278698a4a1ef4be3b2bb605d3582) ) // Sラスター2 ADPCM 2 + // empty socket 3.u10 +ROM_END + ROM_START( trocana ) ROM_REGION( 0x10000, "maincpu", 0 ) ROM_LOAD( "tro1e.u12", 0x00000, 0x10000, CRC(f285043f) SHA1(6691091c1ecdab10c390db1d82c9d1d1dd0ded1f) ) // 1xxxxxxxxxxxxxxx = 0xFF @@ -465,5 +475,6 @@ GAME( 1996, hpierrot, 0, hpierrot, trocana, hpierrot_state, empty_init, ROT0, GAME( 1996, sweethrt, 0, sweethrt, trocana, hpierrot_state, empty_init, ROT0, "NMK", "Sweetheart", MACHINE_IS_SKELETON_MECHANICAL ) // NMK LTD, V96B29° strings GAME( 1998, draillov, 0, omatsuri, trocana, omatsuri_state, empty_init, ROT0, "NTC / NMK", "Dream Rail Lovely", MACHINE_IS_SKELETON_MECHANICAL ) // LOVELY D_RAIL LOVELY NMK LTD DR_LOLÙ MT155 \T2\V0° V98B27° UPRIGHT_PCB223_150CAP strings GAME( 1998, plpittashi, 0, omatsuri, trocana, omatsuri_state, empty_init, ROT0, "NMK", "Love Pi Chan (Power Link)", MACHINE_IS_SKELETON_MECHANICAL ) // NMK LTD, V98622°, LOVE PI, CHAN strings (title taken from string, very probably wrong) +GAME( 1998, sluster2, 0, drail, trocana, hpierrot_state, empty_init, ROT0, "NMK", "Super Luster II", MACHINE_IS_SKELETON_MECHANICAL ) // NMK LTD, H10072,·V040P, V98727 strings GAME( 1999, omatsuri, 0, omatsuri, trocana, omatsuri_state, empty_init, ROT0, "NMK / Sega", "Shimura Ken no Bakatono-sama Ooedomatsuri", MACHINE_IS_SKELETON_MECHANICAL ) // NMK LTD, V99422 strings. Cabinet has NMK logo, manual has Sega logo GAME( 1999, pldoraemon, 0, omatsuri, trocana, omatsuri_state, empty_init, ROT0, "NMK", "Doraemon (Power Link)", MACHINE_IS_SKELETON_MECHANICAL ) // NMK LTD, V99204°, DORAMON (sic), STEPPING_PCB200_CAP75 strings diff --git a/src/mame/pacman/pacman.cpp b/src/mame/pacman/pacman.cpp index 28bf6ee400e..4aeb49f63d6 100644 --- a/src/mame/pacman/pacman.cpp +++ b/src/mame/pacman/pacman.cpp @@ -5554,6 +5554,32 @@ ROM_START( pacmanjpm ) ROM_LOAD( "82s126.3m", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used ROM_END +ROM_START( pacmanmr ) // PCB is marked "PAC/M" on component side + ROM_REGION( 0x10000, "maincpu", 0 ) + ROM_LOAD( "pacm.7f", 0x0000, 0x0800, CRC(2c0fa0ab) SHA1(37680e4502771ae69d51d07ce43f65b9b2dd2a49) ) + ROM_LOAD( "pacm.7l", 0x0800, 0x0800, CRC(afeca2f1) SHA1(1e6d6c75eeb3a354ce2dc88da62caf9e7d53d0cb) ) + ROM_LOAD( "pacm.7h", 0x1000, 0x0800, CRC(7d177853) SHA1(9b5ddaaa8b564654f97af193dbcc29f81f230a25) ) + ROM_LOAD( "pacm.7m", 0x1800, 0x0800, CRC(d3e8914c) SHA1(c2f00e1773c6864435f29c8b7f44f2ef85d227d3) ) + ROM_LOAD( "pacm.7j", 0x2000, 0x0800, CRC(9045a44c) SHA1(a97d7016effbd2ace9a7d92ceb04a6ce18fb42f9) ) + ROM_LOAD( "pacm.7n-1", 0x2800, 0x0800, CRC(93f344c5) SHA1(987c7fa18a774a47c045fa1dc7dff37457cb8983) ) + ROM_LOAD( "pacm.7k", 0x3000, 0x0800, CRC(cd9f1fa7) SHA1(d8c5bbd488ad193bdb32e745d9e8164c45f33bce) ) + ROM_LOAD( "pacm.7p", 0x3800, 0x0800, CRC(124d8ddf) SHA1(0a661bab79482c35c3fa4edb3b9376f49c3f3c87) ) + + ROM_REGION( 0x2000, "gfx1", 0 ) + ROM_LOAD( "pacm-0.5e", 0x0000, 0x0800, CRC(3ed40275) SHA1(bf56f9a21bc1dacee438d88eb5bc59f20906b00c) ) + ROM_LOAD( "pacm-1.5h", 0x0800, 0x0800, CRC(3591b89d) SHA1(79bb456be6c39c1ccd7d077fbe181523131fb300) ) + ROM_LOAD( "pacm-0.5f", 0x1000, 0x0800, CRC(9e39323a) SHA1(be933e691df4dbe7d12123913c3b7b7b585b7a35) ) + ROM_LOAD( "pacm-1.5j", 0x1800, 0x0800, CRC(1b1d9096) SHA1(53771c573051db43e7185b1d188533056290a620) ) + + ROM_REGION( 0x0120, "proms", 0 ) + ROM_LOAD( "pacm.8h", 0x0000, 0x0020, CRC(2c3cc909) SHA1(32d68d4cfdf9f3e7351353428d268c763e809c63) ) + ROM_LOAD( "pacm.4a", 0x0020, 0x0100, CRC(4c8e83a4) SHA1(e522cbc6c14bc481f2e97f1a7224c66bb283f553) ) + + ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs + ROM_LOAD( "pacm.1m", 0x0000, 0x0100, CRC(4e8b3b74) SHA1(aa427aa45373e9a1e6a1155b4bc7bbd97f74f3d8) ) + ROM_LOAD( "pacm.3m", 0x0100, 0x0100, CRC(05197026) SHA1(9b71fb175331bbc12e43441ecfad75b633e2f953) ) // Timing - not used +ROM_END + // this bootleg on Pacman hardware has half as many tiles as the original and some gfx / animations // have been reduced / removed to fit ROM_START( pengojpm ) @@ -6389,6 +6415,54 @@ ROM_START( mspacmanlai ) ROM_LOAD( "82s129-vid.3m", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used ROM_END +ROM_START( mspacmane ) + ROM_REGION( 0x10000, "maincpu", 0 ) + ROM_LOAD( "7f", 0x0000, 0x1000, CRC(d16b31b7) SHA1(bc2247ec946b639dd1f00bfc603fa157d0baaa97) ) + ROM_LOAD( "7h", 0x1000, 0x1000, CRC(0d32de5e) SHA1(13ea0c343de072508908be885e6a2a217bbb3047) ) + ROM_LOAD( "7j", 0x2000, 0x1000, CRC(1821ee0b) SHA1(5ea4d907dbb2690698db72c4e0b5be4d3e9a7786) ) + ROM_LOAD( "7k", 0x3000, 0x1000, CRC(629c4399) SHA1(cd469a5ab04d4f21237bb5c04e469f250f94e9a2) ) + ROM_LOAD( "7m", 0x8000, 0x1000, CRC(8c3e6de6) SHA1(fed6e9a2b210b07e7189a18574f6b8c4ec5bb49b) ) + ROM_LOAD( "7n", 0x9000, 0x0800, CRC(286041cf) SHA1(5a5fc97ea66a59895b3403b2982940b755076667) ) + + ROM_REGION( 0x2000, "gfx1", 0 ) + ROM_LOAD( "5e", 0x0000, 0x0800, BAD_DUMP CRC(93933d1d) SHA1(fa38d2cb87e872bb9a3158a4df98f38360dc85ec) ) // broken ROM, couldn't be read + ROM_LOAD( "5h", 0x0800, 0x0800, CRC(7409fbec) SHA1(f440f08ba026ae6172666e1bdc0894ce33bba420) ) + ROM_LOAD( "5f", 0x1000, 0x0800, CRC(22b0188a) SHA1(a9ed9ca8b36a60081fd364abc9bc23963932cc0b) ) + ROM_LOAD( "5l", 0x1800, 0x0800, CRC(50c7477d) SHA1(c04ec282a8cb528df5e38ad750d12ee71612695d) ) + + ROM_REGION( 0x0120, "proms", 0 ) + ROM_LOAD( "8h", 0x0000, 0x0020, CRC(2c3cc909) SHA1(32d68d4cfdf9f3e7351353428d268c763e809c63) ) + ROM_LOAD( "4a", 0x0020, 0x0100, CRC(4c8e83a4) SHA1(e522cbc6c14bc481f2e97f1a7224c66bb283f553) ) + + ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs + ROM_LOAD( "1m", 0x0000, 0x0100, CRC(7b1f9b71) SHA1(5ef72bbdfb72db3eb1175fed652a761938eeb6cd) ) + ROM_LOAD( "3m", 0x0100, 0x0100, CRC(05197026) SHA1(9b71fb175331bbc12e43441ecfad75b633e2f953) ) // Timing - not used +ROM_END + +ROM_START( mspacmane2 ) // G-GA-2 + G-GB-2 PCBs + ROM_REGION( 0x10000, "maincpu", 0 ) + ROM_LOAD( "mpe1.6e", 0x0000, 0x1000, CRC(3ad0ae2f) SHA1(8431a2f4a89935a9f9898bef48f92f456d316aeb) ) + ROM_LOAD( "mpe2.6f", 0x1000, 0x1000, CRC(0d32de5e) SHA1(13ea0c343de072508908be885e6a2a217bbb3047) ) + ROM_LOAD( "mpe3.6h", 0x2000, 0x1000, CRC(1821ee0b) SHA1(5ea4d907dbb2690698db72c4e0b5be4d3e9a7786) ) + ROM_LOAD( "mpe4.6j", 0x3000, 0x1000, CRC(d5e5d2aa) SHA1(ffb0d701d6143e9a7c431e13bbe15db6b51eb49c) ) + ROM_LOAD( "mpe5.6l", 0x8000, 0x1000, CRC(8c3e6de6) SHA1(fed6e9a2b210b07e7189a18574f6b8c4ec5bb49b) ) + ROM_LOAD( "mpe6.6m", 0x9000, 0x1000, CRC(375f0693) SHA1(8ad53c966289e9cd402c7df6b3c04ec07aa89717) ) // 1xxxxxxxxxxx = 0xFF + + ROM_REGION( 0x2000, "gfx1", 0 ) + ROM_LOAD( "mpe7.5e", 0x0000, 0x0800, CRC(93933d1d) SHA1(fa38d2cb87e872bb9a3158a4df98f38360dc85ec) ) + ROM_LOAD( "mpe9.5h", 0x0800, 0x0800, BAD_DUMP CRC(7409fbec) SHA1(f440f08ba026ae6172666e1bdc0894ce33bba420) ) // dump was bitrot, taken from other sets with same other ROMs + ROM_LOAD( "mpe8.5f", 0x1000, 0x0800, CRC(22b0188a) SHA1(a9ed9ca8b36a60081fd364abc9bc23963932cc0b) ) + ROM_LOAD( "mpe10.5j", 0x1800, 0x0800, CRC(50c7477d) SHA1(c04ec282a8cb528df5e38ad750d12ee71612695d) ) + + ROM_REGION( 0x0120, "proms", 0 ) // not provided for this set + ROM_LOAD( "8h", 0x0000, 0x0020, BAD_DUMP CRC(2c3cc909) SHA1(32d68d4cfdf9f3e7351353428d268c763e809c63) ) + ROM_LOAD( "4a", 0x0020, 0x0100, BAD_DUMP CRC(4c8e83a4) SHA1(e522cbc6c14bc481f2e97f1a7224c66bb283f553) ) + + ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs, not provided for this set + ROM_LOAD( "1m", 0x0000, 0x0100, BAD_DUMP CRC(7b1f9b71) SHA1(5ef72bbdfb72db3eb1175fed652a761938eeb6cd) ) + ROM_LOAD( "3m", 0x0100, 0x0100, BAD_DUMP CRC(05197026) SHA1(9b71fb175331bbc12e43441ecfad75b633e2f953) ) // Timing - not used +ROM_END + ROM_START( pacgal ) ROM_REGION( 0x10000, "maincpu", 0 ) ROM_LOAD( "boot1", 0x0000, 0x1000, CRC(d16b31b7) SHA1(bc2247ec946b639dd1f00bfc603fa157d0baaa97) ) @@ -8621,6 +8695,7 @@ GAME( 1980, pacmanf, puckman, pacman, pacman, pacman_state, empty_init, GAME( 1981, puckmod, puckman, pacman, pacman, pacman_state, empty_init, ROT90, "Namco", "Puck Man (Japan set 2)", MACHINE_SUPPORTS_SAVE ) GAME( 1981, pacmod, puckman, pacman, pacman, pacman_state, empty_init, ROT90, "Namco (Midway license)", "Pac-Man (Midway, harder)", MACHINE_SUPPORTS_SAVE ) GAME( 1981, pacmanjpm,puckman, pacman, pacman, pacman_state, empty_init, ROT90, "bootleg (JPM)", "Pac-Man (JPM bootleg)", MACHINE_SUPPORTS_SAVE ) // aka 'Muncher', UK bootleg, JPM later made fruit machines etc. +GAME( 1981, pacmanmr, puckman, pacman, pacman, pacman_state, empty_init, ROT90, "bootleg (Model Racing)", "Pac-Man (Model Racing bootleg)", MACHINE_SUPPORTS_SAVE ) GAME( 1980, pacmanpe, puckman, pacman, pacmanpe, pacman_state, empty_init, ROT90, "bootleg (Petaco SA)", "Come Come (Petaco SA bootleg of Puck Man)", MACHINE_SUPPORTS_SAVE ) // might have a speed-up button, check GAME( 1980, newpuc2, puckman, pacman, pacman, pacman_state, empty_init, ROT90, "hack", "Newpuc2 (set 1)", MACHINE_SUPPORTS_SAVE ) GAME( 1980, newpuc2b, puckman, pacman, pacman, pacman_state, empty_init, ROT90, "hack", "Newpuc2 (set 2)", MACHINE_SUPPORTS_SAVE ) @@ -8663,6 +8738,8 @@ GAME( 1981, mspacmbe, mspacman, woodpek, mspacman, pacman_state, init_mspac GAME( 1982, mspacmbmc, mspacman, woodpek, mspacman, pacman_state, empty_init, ROT90, "bootleg (Marti Colls)", "Ms. Pac-Man (Marti Colls bootleg)", MACHINE_SUPPORTS_SAVE ) GAME( 1981, mspacmbn, mspacman, woodpek, mspacman, pacman_state, init_pengomc1, ROT90, "bootleg (Novatronic)", "Ms. Pac-Man (Novatronic bootleg)", MACHINE_SUPPORTS_SAVE ) GAME( 1982, mspacmanlai, mspacman, woodpek, mspacman, pacman_state, empty_init, ROT90, "bootleg (Leisure and Allied)", "Ms. Pac-Man (Leisure and Allied bootleg)", MACHINE_SUPPORTS_SAVE ) +GAME( 1983, mspacmane, mspacman, woodpek, mspacman, pacman_state, empty_init, ROT90, "bootleg (Elmac)", "Ms. Pac-Man (Elmac bootleg, earlier)", MACHINE_SUPPORTS_SAVE ) +GAME( 1984, mspacmane2, mspacman, woodpek, mspacman, pacman_state, empty_init, ROT90, "bootleg (Elmac)", "Ms. Pac-Man (Elmac bootleg, later)", MACHINE_SUPPORTS_SAVE ) GAME( 1981, mspacii, mspacman, mspacii, mspacman, pacman_state, init_mspacii, ROT90, "bootleg (Orca)", "Ms. Pac-Man II (Orca bootleg set 1)", MACHINE_SUPPORTS_SAVE ) GAME( 1981, mspacii2, mspacman, mspacii, mspacman, pacman_state, init_mspacii, ROT90, "bootleg (Orca)", "Ms. Pac-Man II (Orca bootleg set 2)", MACHINE_SUPPORTS_SAVE ) GAME( 1981, pacgal, mspacman, woodpek, mspacman, pacman_state, empty_init, ROT90, "hack", "Pac-Gal (set 1)", MACHINE_SUPPORTS_SAVE ) diff --git a/src/mame/phoenix/phoenix.cpp b/src/mame/phoenix/phoenix.cpp index 4862599041d..78307a8c4d0 100644 --- a/src/mame/phoenix/phoenix.cpp +++ b/src/mame/phoenix/phoenix.cpp @@ -1786,7 +1786,7 @@ GAME( 1981, pleiads, 0, pleiads, pleiads, phoenix_state, empty_init, GAME( 1981, pleiadsb2, pleiads, pleiads, pleiads, phoenix_state, empty_init, ROT90, "bootleg (ESG)", "Pleiads (bootleg set 2)", MACHINE_SUPPORTS_SAVE ) GAME( 1981, pleiadbl, pleiads, pleiads, pleiadbl, phoenix_state, empty_init, ROT90, "bootleg", "Pleiads (bootleg set 1)", MACHINE_IMPERFECT_COLORS | MACHINE_SUPPORTS_SAVE ) GAME( 1981, pleiadce, pleiads, pleiads, pleiadce, phoenix_state, empty_init, ROT90, "Tehkan (Centuri license)", "Pleiads (Centuri)", MACHINE_IMPERFECT_COLORS | MACHINE_SUPPORTS_SAVE ) -GAME( 1981, pleiadsgmp, pleiads, phoenix, pleiadce, phoenix_state, empty_init, ROT90, "bootleg (GMP Games)", "Pleiads (GMP Games)", MACHINE_IMPERFECT_COLORS | MACHINE_SUPPORTS_SAVE ) +GAME( 1981, pleiadsgmp, pleiads, phoenix, pleiadce, phoenix_state, empty_init, ROT90, "bootleg (GMP Games)", "Pleiads (GMP Games)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_COLORS | MACHINE_SUPPORTS_SAVE ) GAME( 1981, pleiadsi, pleiads, pleiads, pleiadce, phoenix_state, empty_init, ROT90, "bootleg (Irecsa)", "Pleiads (Irecsa, set 1)", MACHINE_IMPERFECT_COLORS | MACHINE_SUPPORTS_SAVE ) GAME( 1981, pleiadsia, pleiads, pleiads, pleiadce, phoenix_state, empty_init, ROT90, "bootleg (Irecsa)", "Pleiads (Irecsa, set 2)", MACHINE_IMPERFECT_COLORS | MACHINE_SUPPORTS_SAVE ) GAME( 1981, pleiadsn, pleiads, phoenix, pleiadce, phoenix_state, empty_init, ROT90, "bootleg (Niemer S.A.)", "Pleiads (Niemer S.A.)", MACHINE_IMPERFECT_COLORS | MACHINE_SUPPORTS_SAVE ) diff --git a/src/mame/skeleton/ganbaremo.cpp b/src/mame/skeleton/ganbaremo.cpp index 7aa1e16895e..d5c65557605 100644 --- a/src/mame/skeleton/ganbaremo.cpp +++ b/src/mame/skeleton/ganbaremo.cpp @@ -262,4 +262,4 @@ ROM_END } // anonymous namespace -GAME(19??, ganbaremo, 0, ganbaremo, ganbaremo, ganbaremo_state, empty_init, ROT0, "Shoken", "Ganbare Momotarou Oni Taiji", MACHINE_IS_SKELETON_MECHANICAL) +GAME( 1992?, ganbaremo, 0, ganbaremo, ganbaremo, ganbaremo_state, empty_init, ROT0, "Shoken", "Ganbare Momotarou Oni Taiji", MACHINE_IS_SKELETON_MECHANICAL ) // was advertised in 1992 diff --git a/src/mame/subsino/lastfght.cpp b/src/mame/subsino/lastfght.cpp index e51bace4c21..1964d50d626 100644 --- a/src/mame/subsino/lastfght.cpp +++ b/src/mame/subsino/lastfght.cpp @@ -96,8 +96,6 @@ class lastfght_state : public driver_device void lastfght(machine_config &config); - void init_lastfght(); - protected: virtual void machine_start() override; virtual void machine_reset() override; @@ -416,8 +414,8 @@ void lastfght_state::lastfght_map(address_map &map) { map.global_mask(0xffffff); - map(0x000000, 0x07ffff).rom().region("maincpu", 0); - map(0x080000, 0x0fffff).rom().region("maincpu", 0); + map(0x000000, 0x007fff).rom(); + map(0x080000, 0x0fffff).rom(); map(0x200000, 0x20ffff).ram().share("nvram"); // battery @@ -580,31 +578,24 @@ void lastfght_state::lastfght(machine_config &config) ***************************************************************************/ ROM_START( lastfght ) - ROM_REGION( 0x100000, "maincpu", 0 ) // H8/3044 program - ROM_LOAD( "v106.u16", 0x000000, 0x080000, CRC(7aec89f4) SHA1(7cff00844ad82a0f8d19b1bd07ba3a2bced69d66) ) + ROM_REGION( 0x100000, "maincpu", 0 ) // H8/3044 program + ROM_LOAD( "ss9689_6433044a22f.u12", 0x000000, 0x008000, CRC(ece09075) SHA1(a8bc3aa44f30a6f919f4151c6093fb52e5da2f40) ) + ROM_LOAD( "v106.u16", 0x080000, 0x080000, CRC(7aec89f4) SHA1(7cff00844ad82a0f8d19b1bd07ba3a2bced69d66) ) - ROM_REGION( 0x800000, "gfx1", 0 ) // Blitter data + ROM_REGION( 0x800000, "gfx1", 0 ) // Blitter data ROM_LOAD( "1.b1", 0x000000, 0x200000, CRC(6c438136) SHA1(138934e948bbd6bd80f354f037badedef6cd8cb1) ) ROM_LOAD( "2.b2", 0x200000, 0x200000, CRC(9710bcff) SHA1(0291385489a065ed895c99ae7197fdeac0a0e2a0) ) ROM_LOAD( "3.b3", 0x400000, 0x200000, CRC(4236c79a) SHA1(94f093d12c096d38d1e7278796f6d58e4ba14e2e) ) ROM_LOAD( "4.b4", 0x600000, 0x200000, CRC(68153b0f) SHA1(46ddf37d5885f411e0e6de9c7e8969ba3a00f17f) ) - ROM_REGION( 0x100000, "samples", 0 ) // Samples + ROM_REGION( 0x100000, "samples", 0 ) // Samples ROM_LOAD( "v100.u7", 0x000000, 0x100000, CRC(c134378c) SHA1(999c75f3a7890421cfd904a926ca377ee43a6825) ) ROM_REGION( 0x28, "eeprom", 0 ) ROM_LOAD( "ds2430a.q3", 0x00, 0x28, CRC(af461d83) SHA1(bb8d25e9bb60e00e460e4b7e1855c735becaaa6d) ) ROM_END -void lastfght_state::init_lastfght() -{ - uint16_t *rom = (uint16_t*)memregion("maincpu")->base(); - - // rts -> rte - rom[0x01b86 / 2] = 0x5670; -} - } // anonymous namespace -GAME( 2000, lastfght, 0, lastfght, lastfght, lastfght_state, init_lastfght, ROT0, "Subsino", "Last Fighting", MACHINE_NOT_WORKING | MACHINE_NO_SOUND | MACHINE_IMPERFECT_TIMING | MACHINE_SUPPORTS_SAVE ) +GAME( 2000, lastfght, 0, lastfght, lastfght, lastfght_state, empty_init, ROT0, "Subsino", "Last Fighting", MACHINE_NOT_WORKING | MACHINE_NO_SOUND | MACHINE_IMPERFECT_TIMING | MACHINE_SUPPORTS_SAVE ) diff --git a/src/mame/subsino/subsino2.cpp b/src/mame/subsino/subsino2.cpp index d8d8635bd53..e052e496cbb 100644 --- a/src/mame/subsino/subsino2.cpp +++ b/src/mame/subsino/subsino2.cpp @@ -139,17 +139,6 @@ class subsino2_state : public driver_device void xtrain(machine_config &config); void ptrain(machine_config &config); - void init_bishjan(); - void init_xiaoao(); - void init_new2001(); - void init_queenbee(); - void init_queenbeeb(); - void init_queenbeei(); - void init_humlan(); - void init_xreel(); - void init_squeenb(); - void init_qbeebing(); - void init_treamary(); void init_wtrnymph(); void init_mtrain(); void init_tbonusal(); @@ -1005,8 +994,8 @@ void subsino2_state::bishjan_map(address_map &map) { map.global_mask(0xffffff); - map(0x000000, 0x07ffff).rom().region("maincpu", 0); - map(0x080000, 0x0fffff).rom().region("maincpu", 0); + map(0x000000, 0x007fff).rom(); + map(0x080000, 0x0fffff).rom(); map(0x200000, 0x207fff).ram().share("nvram"); // battery @@ -3115,8 +3104,9 @@ PCB Layout ***************************************************************************/ ROM_START( bishjan ) - ROM_REGION( 0x80000, "maincpu", 0 ) // H8/3044 - ROM_LOAD( "1-v203.u21", 0x000000, 0x080000, CRC(1f891d48) SHA1(0b6a5aa8b781ba8fc133289790419aa8ea21c400) ) + ROM_REGION( 0x100000, "maincpu", 0 ) // H8/3044 + ROM_LOAD( "ss9689_6433044a22f.u16", 0x000000, 0x008000, CRC(ece09075) SHA1(a8bc3aa44f30a6f919f4151c6093fb52e5da2f40) ) + ROM_LOAD( "1-v203.u21", 0x080000, 0x080000, CRC(1f891d48) SHA1(0b6a5aa8b781ba8fc133289790419aa8ea21c400) ) ROM_REGION( 0x400000, "tilemap", 0 ) ROM_LOAD32_BYTE( "3-v201.u25", 0x000000, 0x100000, CRC(e013e647) SHA1(a5b0f82f3454393c1ea5e635b0d37735a25e2ea5) ) @@ -3131,19 +3121,11 @@ ROM_START( bishjan ) ROM_LOAD( "bishoujan-ds2430a.q3", 0x00, 0x28, CRC(7366d9d5) SHA1(1b276015f70bdc8cc7ba8380be19a821e728b617) ) ROM_END -void subsino2_state::init_bishjan() -{ - uint16_t *rom = (uint16_t*)memregion("maincpu")->base(); - - // rts -> rte - rom[0x33386/2] = 0x5670; // IRQ 0 - rom[0x0cc5c/2] = 0x5670; // IRQ 8 -} - // Uses newer PCB type, same as Humlan's Lyckohjul ROM_START( xiaoao ) - ROM_REGION( 0x80000, "maincpu", 0 ) - ROM_LOAD( "1-v100.u21", 0x00000, 0x80000, CRC(728b4597) SHA1(97f92b9a6c455d2d906d55482166fd9704253615) ) + ROM_REGION( 0x100000, "maincpu", 0 ) + ROM_LOAD( "ss9689_6433044a22f.u16", 0x000000, 0x008000, CRC(ece09075) SHA1(a8bc3aa44f30a6f919f4151c6093fb52e5da2f40) ) + ROM_LOAD( "1-v100.u21", 0x080000, 0x080000, CRC(728b4597) SHA1(97f92b9a6c455d2d906d55482166fd9704253615) ) ROM_REGION( 0x400000, "tilemap", 0 ) ROM_LOAD( "mj-gc1.u24", 0x000000, 0x400000, CRC(ed3eaaea) SHA1(941ef99dfb2ba0e26112dcd992f7690a1dba8d9c) ) @@ -3155,15 +3137,6 @@ ROM_START( xiaoao ) ROM_LOAD( "xiaoaojianghu-ds2430a.q3", 0x00, 0x28, CRC(518e4ba3) SHA1(704fb6f8ff9966d1b90af849b2b7c6df06d3e4a0) ) ROM_END -void subsino2_state::init_xiaoao() -{ - uint16_t *rom = (uint16_t*)memregion("maincpu")->base(); - - // rts -> rte - rom[0x35238/2] = 0x5670; // IRQ 0 - rom[0x0d550/2] = 0x5670; // IRQ 8 -} - /*************************************************************************** @@ -3209,9 +3182,10 @@ New 2001 (Italy, V200N) ***************************************************************************/ ROM_START( new2001 ) - ROM_REGION( 0x80000, "maincpu", 0 ) // H8/3044 - ROM_LOAD( "new_2001_italy_1_v200n.u21", 0x00000, 0x40000, CRC(bacc8c01) SHA1(e820bc53fa297c3f543a1d65d47eb7b5ee85a6e2) ) - ROM_RELOAD( 0x40000, 0x40000 ) + ROM_REGION( 0x100000, "maincpu", 0 ) // H8/3044 + ROM_LOAD( "ss9689_6433044a22f.u16", 0x000000, 0x008000, CRC(ece09075) SHA1(a8bc3aa44f30a6f919f4151c6093fb52e5da2f40) ) + ROM_LOAD( "new_2001_italy_1_v200n.u21", 0x080000, 0x040000, CRC(bacc8c01) SHA1(e820bc53fa297c3f543a1d65d47eb7b5ee85a6e2) ) + ROM_RELOAD( 0x0c0000, 0x040000 ) ROM_REGION( 0x100000, "tilemap", 0 ) ROM_LOAD32_BYTE( "new_2001_italy_3_v200.0.u25", 0x00000, 0x40000, CRC(621452d6) SHA1(a9654bb98df16b13e8bbc6dd4dada2e63ee05dc9) ) @@ -3226,15 +3200,6 @@ ROM_START( new2001 ) ROM_LOAD( "ds2430a.bin", 0x00, 0x28, CRC(71281d72) SHA1(1661181a5a5331083d649b10a7d3a36062e617c0) BAD_DUMP ) // handcrafted to pass protection check ROM_END -void subsino2_state::init_new2001() -{ - uint16_t *rom = (uint16_t*)memregion("maincpu")->base(); - - // rts -> rte - rom[0x45e8/2] = 0x5670; // IRQ 8 - rom[0x471c/2] = 0x5670; // IRQ 0 -} - /*************************************************************************** @@ -3246,9 +3211,10 @@ no ROM labels available ***************************************************************************/ ROM_START( queenbee ) - ROM_REGION( 0x80000, "maincpu", 0 ) // H8/3044 - ROM_LOAD( "27c020 u21.bin", 0x00000, 0x40000, CRC(baec0241) SHA1(345cfee7bdb4f4c61caa828372a121f3917bb4eb) ) - ROM_FILL( 0x40000, 0x40000, 0xff ) + ROM_REGION( 0x100000, "maincpu", 0 ) // H8/3044 + ROM_LOAD( "ss9689_6433044a22f.u16", 0x000000, 0x008000, CRC(ece09075) SHA1(a8bc3aa44f30a6f919f4151c6093fb52e5da2f40) ) + ROM_LOAD( "27c020 u21.bin", 0x080000, 0x040000, CRC(baec0241) SHA1(345cfee7bdb4f4c61caa828372a121f3917bb4eb) ) + ROM_FILL( 0x0c0000, 0x040000, 0xff ) ROM_REGION( 0x200000, "tilemap", 0 ) ROM_LOAD32_BYTE( "27c4001 u25.bin", 0x000000, 0x80000, CRC(628ed650) SHA1(dadbc5f73f6a5773303d834a44d2eab836874cfe) ) @@ -3263,19 +3229,11 @@ ROM_START( queenbee ) ROM_LOAD( "ds2430a.bin", 0x00, 0x28, CRC(f64b92e5) SHA1(fbef61b1046c6559d5ac71e665e822f9a6704461) BAD_DUMP ) // handcrafted to pass protection check ROM_END -void subsino2_state::init_queenbee() -{ - uint16_t *rom = (uint16_t*)memregion("maincpu")->base(); - - // rts -> rte - rom[0x3e6a/2] = 0x5670; // IRQ 8 - rom[0x3fbe/2] = 0x5670; // IRQ 0 -} - ROM_START( queenbeeb ) - ROM_REGION( 0x80000, "maincpu", 0 ) // H8/3044 - ROM_LOAD( "u21", 0x00000, 0x40000, CRC(23e0ad8f) SHA1(d913ebd249c471ab36aabe515a8b36bb3590c1ca) ) - ROM_FILL( 0x40000, 0x40000, 0xff ) + ROM_REGION( 0x100000, "maincpu", 0 ) // H8/3044 + ROM_LOAD( "ss9689_6433044a22f.u16", 0x000000, 0x008000, CRC(ece09075) SHA1(a8bc3aa44f30a6f919f4151c6093fb52e5da2f40) ) + ROM_LOAD( "u21", 0x080000, 0x040000, CRC(23e0ad8f) SHA1(d913ebd249c471ab36aabe515a8b36bb3590c1ca) ) + ROM_FILL( 0x0c0000, 0x040000, 0xff ) ROM_REGION( 0x200000, "tilemap", 0 ) // this PCB has a single surface mounted ROM, which hasn't been dumped. ROM_LOAD( "gfx", 0x000000, 0x200000, NO_DUMP ) @@ -3292,20 +3250,12 @@ ROM_START( queenbeeb ) ROM_LOAD( "ds2430a.bin", 0x00, 0x28, CRC(b6d57e98) SHA1(6bbed2613c667369e74c417917c1c36d36f03739) BAD_DUMP ) // handcrafted to pass protection check ROM_END -void subsino2_state::init_queenbeeb() -{ - uint16_t *rom = (uint16_t*)memregion("maincpu")->base(); - - // rts -> rte - rom[0x3902/2] = 0x5670; // IRQ 8 - rom[0x3a56/2] = 0x5670; // IRQ 0 -} - // make sure these are really queenbee ROM_START( queenbeei ) - ROM_REGION( 0x80000, "maincpu", 0 ) // H8/3044 - ROM_LOAD( "u21 9ac9 v100", 0x00000, 0x40000, CRC(061b406f) SHA1(2a5433817e41610e9ba90302a6b9608f769176a0) ) - ROM_FILL( 0x40000, 0x40000, 0xff ) + ROM_REGION( 0x100000, "maincpu", 0 ) // H8/3044 + ROM_LOAD( "ss9689_6433044a22f.u16", 0x000000, 0x008000, CRC(ece09075) SHA1(a8bc3aa44f30a6f919f4151c6093fb52e5da2f40) ) + ROM_LOAD( "u21 9ac9 v100", 0x080000, 0x040000, CRC(061b406f) SHA1(2a5433817e41610e9ba90302a6b9608f769176a0) ) + ROM_FILL( 0x0c0000, 0x040000, 0xff ) ROM_REGION( 0x200000, "tilemap", 0 ) ROM_LOAD( "gfx", 0x000000, 0x200000, NO_DUMP ) @@ -3317,19 +3267,11 @@ ROM_START( queenbeei ) ROM_LOAD( "ds2430a.bin", 0x00, 0x28, CRC(25d37d36) SHA1(9d7130328be80c1b9376ac6923300122ee1b9399) BAD_DUMP ) // handcrafted to pass protection check ROM_END -void subsino2_state::init_queenbeei() -{ - uint16_t *rom = (uint16_t*)memregion("maincpu")->base(); - - // rts -> rte - rom[0x3abc/2] = 0x5670; // IRQ 8 - rom[0x3bca/2] = 0x5670; // IRQ 0 -} - ROM_START( queenbeesa ) - ROM_REGION( 0x80000, "maincpu", 0 ) // H8/3044 - ROM_LOAD( "00b0 u21 1v101", 0x00000, 0x40000, CRC(19e31fd7) SHA1(01cf507958b0411d21dd660280f45668d7c5b9d9) ) - ROM_FILL( 0x40000, 0x40000, 0xff ) + ROM_REGION( 0x100000, "maincpu", 0 ) // H8/3044 + ROM_LOAD( "ss9689_6433044a22f.u16", 0x000000, 0x008000, CRC(ece09075) SHA1(a8bc3aa44f30a6f919f4151c6093fb52e5da2f40) ) + ROM_LOAD( "00b0 u21 1v101", 0x080000, 0x040000, CRC(19e31fd7) SHA1(01cf507958b0411d21dd660280f45668d7c5b9d9) ) + ROM_FILL( 0x0c0000, 0x040000, 0xff ) ROM_REGION( 0x200000, "tilemap", 0 ) ROM_LOAD( "gfx", 0x000000, 0x200000, NO_DUMP ) @@ -3355,9 +3297,10 @@ and a 9804 (instead of 9904) for sound. ***************************************************************************/ ROM_START( humlan ) - ROM_REGION( 0x80000, "maincpu", 0 ) // H8/3044 - ROM_LOAD( "hlj__truemax_1_v402.u21", 0x00000, 0x40000, CRC(5b4a7113) SHA1(9a9511aa79a6e90e8ac1b267e058c8696d13d84f) ) - ROM_FILL( 0x40000, 0x40000, 0xff ) + ROM_REGION( 0x100000, "maincpu", 0 ) // H8/3044 + ROM_LOAD( "ss9689_6433044a22f.u16", 0x000000, 0x008000, CRC(ece09075) SHA1(a8bc3aa44f30a6f919f4151c6093fb52e5da2f40) ) + ROM_LOAD( "hlj__truemax_1_v402.u21", 0x080000, 0x040000, CRC(5b4a7113) SHA1(9a9511aa79a6e90e8ac1b267e058c8696d13d84f) ) + ROM_FILL( 0x0c0000, 0x040000, 0xff ) ROM_REGION( 0x200000, "tilemap", 0 ) ROM_LOAD32_BYTE( "hlj__truemax_3_v402.u25", 0x000000, 0x80000, CRC(dfc8d795) SHA1(93e0fe271c7390596f73092720befe11d8354838) ) @@ -3373,15 +3316,6 @@ ROM_START( humlan ) ROM_LOAD( "ds2430a.bin", 0x00, 0x28, CRC(281eb16b) SHA1(db62a7004e2bc9a052d6f154cb4c6d645d00f768) BAD_DUMP ) // handcrafted to pass protection check ROM_END -void subsino2_state::init_humlan() -{ - uint16_t *rom = (uint16_t*)memregion("maincpu")->base(); - - // rts -> rte - rom[0x38b4/2] = 0x5670; // IRQ 8 - rom[0x3a08/2] = 0x5670; // IRQ 0 -} - /*************************************************************************** @@ -3392,9 +3326,10 @@ Same PCB as bishjan and new2001, but with a 48MHz crystal ***************************************************************************/ ROM_START( xreel ) - ROM_REGION( 0x80000, "maincpu", 0 ) // H8/3044 - ROM_LOAD( "x-reel_ecm_1_v105.u21", 0x00000, 0x40000, CRC(f9307deb) SHA1(dff5e47d7bbf4ec96aba479f350c7891d97b86c8) ) - ROM_FILL( 0x40000, 0x40000, 0xff ) + ROM_REGION( 0x100000, "maincpu", 0 ) // H8/3044 + ROM_LOAD( "ss9689_6433044a22f.u16", 0x000000, 0x008000, CRC(ece09075) SHA1(a8bc3aa44f30a6f919f4151c6093fb52e5da2f40) ) + ROM_LOAD( "x-reel_ecm_1_v105.u21", 0x080000, 0x040000, CRC(f9307deb) SHA1(dff5e47d7bbf4ec96aba479f350c7891d97b86c8) ) + ROM_FILL( 0x0c0000, 0x040000, 0xff ) ROM_REGION( 0x200000, "tilemap", 0 ) ROM_LOAD32_BYTE( "x-reel_ecm_3_v103.u25", 0x000000, 0x80000, CRC(00dda66e) SHA1(f87e60cbe6b328fa285f118eee3652873ef4a45f) ) @@ -3409,15 +3344,6 @@ ROM_START( xreel ) ROM_LOAD( "ds2430a.q3", 0x00, 0x28, CRC(39bbd2c5) SHA1(52eb2fa124e176650015389e7b04eddc49ce6e8e) ) ROM_END -void subsino2_state::init_xreel() -{ - uint16_t *rom = (uint16_t*)memregion("maincpu")->base(); - - // rts -> rte - rom[0x39b6/2] = 0x5670; // IRQ 8 - rom[0x3ac4/2] = 0x5670; // IRQ 0 -} - /*************************************************************************** @@ -3429,9 +3355,10 @@ no ROM labels available ***************************************************************************/ ROM_START( squeenb ) - ROM_REGION( 0x80000, "maincpu", 0 ) // H8/3044 - ROM_LOAD( "u21", 0x00000, 0x40000, CRC(9edc4062) SHA1(515c8e648f839c99905fd5a861688fc62a45c4ed) ) - ROM_FILL( 0x40000, 0x40000, 0xff ) + ROM_REGION( 0x100000, "maincpu", 0 ) // H8/3044 + ROM_LOAD( "ss9689_6433044a22f.u16", 0x000000, 0x008000, CRC(ece09075) SHA1(a8bc3aa44f30a6f919f4151c6093fb52e5da2f40) ) + ROM_LOAD( "u21", 0x080000, 0x040000, CRC(9edc4062) SHA1(515c8e648f839c99905fd5a861688fc62a45c4ed) ) + ROM_FILL( 0x0c0000, 0x040000, 0xff ) ROM_REGION( 0x200000, "tilemap", 0 ) ROM_LOAD32_BYTE( "u25", 0x000000, 0x80000, CRC(842c0a33) SHA1(defb79c158d5091ca8830e9f03dda382d03d51ef) ) @@ -3446,22 +3373,14 @@ ROM_START( squeenb ) ROM_LOAD( "ds2430a.bin", 0x00, 0x28, CRC(c861db4a) SHA1(3109031239328a167f80082ec70b62630f8316ab) BAD_DUMP ) // handcrafted to pass protection check ROM_END -void subsino2_state::init_squeenb() -{ - uint16_t *rom = (uint16_t*)memregion("maincpu")->base(); - - // rts -> rte - rom[0x399a/2] = 0x5670; // IRQ 8 - rom[0x3aa8/2] = 0x5670; // IRQ 0 -} - ROM_START( qbeebing ) - ROM_REGION( 0x80000, "maincpu", 0 ) // H8/3044 - ROM_LOAD( "rom 2 27c040", 0x00000, 0x80000, CRC(03ea15cd) SHA1(19d3c3dd9e0c57066a6bd854964fd6a9f43c989f) ) + ROM_REGION( 0x100000, "maincpu", 0 ) // H8/3044 + ROM_LOAD( "ss9689_6433044a22f.u16", 0x000000, 0x008000, CRC(ece09075) SHA1(a8bc3aa44f30a6f919f4151c6093fb52e5da2f40) ) + ROM_LOAD( "rom 2 27c040", 0x080000, 0x080000, CRC(03ea15cd) SHA1(19d3c3dd9e0c57066a6bd854964fd6a9f43c989f) ) ROM_REGION( 0x400000, "tilemap", 0 ) - ROM_LOAD16_BYTE( "rom 4 27c160 3374h", 0x000001, 0x200000, CRC(a01527a0) SHA1(41ea384dd9c15c58246856f104b7dce68be1737c) ) - ROM_LOAD16_BYTE( "rom 3 27c160 08d7h", 0x000000, 0x200000, CRC(1fdf0fcb) SHA1(ed54172521f8d05bad37b670548106e4c4deb8af) ) + ROM_LOAD16_BYTE( "rom 4 27c160 3374h", 0x000001, 0x200000, CRC(a01527a0) SHA1(41ea384dd9c15c58246856f104b7dce68be1737c) ) + ROM_LOAD16_BYTE( "rom 3 27c160 08d7h", 0x000000, 0x200000, CRC(1fdf0fcb) SHA1(ed54172521f8d05bad37b670548106e4c4deb8af) ) ROM_REGION( 0x80000, "samples", ROMREGION_ERASE00 ) // no samples, missing? @@ -3469,18 +3388,10 @@ ROM_START( qbeebing ) ROM_LOAD( "ds2430a.bin", 0x00, 0x28, CRC(0d8db9ef) SHA1(eef0c8debbb2cb20af180c5c6a8ba998104fa24e) BAD_DUMP ) // handcrafted to pass protection check ROM_END -void subsino2_state::init_qbeebing() -{ - uint16_t *rom = (uint16_t*)memregion("maincpu")->base(); - - // rts -> rte - rom[0x4714/2] = 0x5670; // IRQ 8 - rom[0x49a0/2] = 0x5670; // IRQ 0 -} - ROM_START( treamary ) - ROM_REGION( 0x80000, "maincpu", 0 ) // H8/3044 - ROM_LOAD( "27c040_u21.bin", 0x00000, 0x80000, CRC(b9163830) SHA1(853ccba636c4ee806602ca92a61d4c53ee3108b7) ) + ROM_REGION( 0x100000, "maincpu", 0 ) // H8/3044 + ROM_LOAD( "ss9689_6433044a22f.u16", 0x000000, 0x008000, CRC(ece09075) SHA1(a8bc3aa44f30a6f919f4151c6093fb52e5da2f40) ) + ROM_LOAD( "27c040_u21.bin", 0x080000, 0x080000, CRC(b9163830) SHA1(853ccba636c4ee806602ca92a61d4c53ee3108b7) ) ROM_REGION( 0x200000, "tilemap", 0 ) ROM_LOAD32_BYTE( "27c040_u25.bin", 0x000000, 0x80000, CRC(d17e5286) SHA1(a538a3b010eb0c7b5c16a4188f32f340fc890850) ) @@ -3496,17 +3407,6 @@ ROM_START( treamary ) ROM_END -void subsino2_state::init_treamary() -{ - uint16_t *rom = (uint16_t*)memregion("maincpu")->base(); - - // rts -> rte - rom[0x5804/2] = 0x5670; // IRQ 0 - - // other patches? -} - - /*************************************************************************** Express Card / Top Card @@ -4073,45 +3973,45 @@ void subsino2_state::init_wtrnymph() } -GAME( 1997, mtrain, 0, mtrain, mtrain, subsino2_state, init_mtrain, ROT0, "Subsino", "Magic Train (Ver. 1.4)", 0 ) // inside the program ROM says 1997, but on screen shows 1996 -GAME( 1996, mtraina, mtrain, mtrain, mtrain, subsino2_state, init_mtrain, ROT0, "Subsino", "Magic Train (Ver. 1.31)", 0 ) +GAME( 1997, mtrain, 0, mtrain, mtrain, subsino2_state, init_mtrain, ROT0, "Subsino", "Magic Train (Ver. 1.4)", 0 ) // inside the program ROM says 1997, but on screen shows 1996 +GAME( 1996, mtraina, mtrain, mtrain, mtrain, subsino2_state, init_mtrain, ROT0, "Subsino", "Magic Train (Ver. 1.31)", 0 ) -GAME( 1996, strain, 0, mtrain, strain, subsino2_state, init_mtrain, ROT0, "Subsino", "Super Train (Ver. 1.9)", MACHINE_NOT_WORKING ) +GAME( 1996, strain, 0, mtrain, strain, subsino2_state, init_mtrain, ROT0, "Subsino", "Super Train (Ver. 1.9)", MACHINE_NOT_WORKING ) -GAME( 1995, tbonusal, 0, tbonusal, tbonusal, subsino2_state, init_tbonusal, ROT0, "Subsino (American Alpha license)", "Treasure Bonus (American Alpha, Ver. 1.6)", MACHINE_NOT_WORKING ) +GAME( 1995, tbonusal, 0, tbonusal, tbonusal, subsino2_state, init_tbonusal, ROT0, "Subsino (American Alpha license)", "Treasure Bonus (American Alpha, Ver. 1.6)", MACHINE_NOT_WORKING ) -GAME( 1996, wtrnymph, 0, mtrain, wtrnymph, subsino2_state, init_wtrnymph, ROT0, "Subsino", "Water-Nymph (Ver. 1.4)", 0 ) +GAME( 1996, wtrnymph, 0, mtrain, wtrnymph, subsino2_state, init_wtrnymph, ROT0, "Subsino", "Water-Nymph (Ver. 1.4)", 0 ) -GAME( 1998, expcard, 0, expcard, expcard, subsino2_state, empty_init, ROT0, "Subsino (American Alpha license)", "Express Card / Top Card (Ver. 1.5)", 0 ) +GAME( 1998, expcard, 0, expcard, expcard, subsino2_state, empty_init, ROT0, "Subsino (American Alpha license)", "Express Card / Top Card (Ver. 1.5)", 0 ) -GAME( 1998, saklove, 0, saklove, saklove, subsino2_state, empty_init, ROT0, "Subsino", "Ying Hua Lian 2.0 (China, Ver. 1.02)", 0 ) +GAME( 1998, saklove, 0, saklove, saklove, subsino2_state, empty_init, ROT0, "Subsino", "Ying Hua Lian 2.0 (China, Ver. 1.02)", 0 ) -GAME( 1999, xtrain, 0, xtrain, xtrain, subsino2_state, empty_init, ROT0, "Subsino", "X-Train (Ver. 1.3)", 0 ) +GAME( 1999, xtrain, 0, xtrain, xtrain, subsino2_state, empty_init, ROT0, "Subsino", "X-Train (Ver. 1.3)", 0 ) -GAME( 1999, ptrain, 0, ptrain, ptrain, subsino2_state, empty_init, ROT0, "Subsino", "Panda Train (Novamatic 1.7)", MACHINE_IMPERFECT_GRAPHICS ) -GAME( 1999, ptraina, ptrain, ptrain, ptrain, subsino2_state, empty_init, ROT0, "Subsino", "Panda Train (Ver. 1.3)", MACHINE_IMPERFECT_GRAPHICS ) +GAME( 1999, ptrain, 0, ptrain, ptrain, subsino2_state, empty_init, ROT0, "Subsino", "Panda Train (Novamatic 1.7)", MACHINE_IMPERFECT_GRAPHICS ) +GAME( 1999, ptraina, ptrain, ptrain, ptrain, subsino2_state, empty_init, ROT0, "Subsino", "Panda Train (Ver. 1.3)", MACHINE_IMPERFECT_GRAPHICS ) -GAME( 1997, treacity, 0, saklove, treacity, subsino2_state, empty_init, ROT0, "Subsino (American Alpha license)", "Treasure City (Ver. 208)", MACHINE_NOT_WORKING ) -GAME( 1997, treacity202, treacity, saklove, treacity, subsino2_state, empty_init, ROT0, "Subsino (American Alpha license)", "Treasure City (Ver. 202)", MACHINE_NOT_WORKING ) +GAME( 1997, treacity, 0, saklove, treacity, subsino2_state, empty_init, ROT0, "Subsino (American Alpha license)", "Treasure City (Ver. 208)", MACHINE_NOT_WORKING ) +GAME( 1997, treacity202, treacity, saklove, treacity, subsino2_state, empty_init, ROT0, "Subsino (American Alpha license)", "Treasure City (Ver. 202)", MACHINE_NOT_WORKING ) -GAME( 1999, bishjan, 0, bishjan, bishjan, subsino2_state, init_bishjan, ROT0, "Subsino", "Bishou Jan (Japan, Ver. 203)", MACHINE_NO_SOUND ) -GAME( 1999, xiaoao, bishjan, xiaoao, bishjan, subsino2_state, init_xiaoao, ROT0, "Subsino", "Xiao Ao Jiang Hu (China, Ver. 1.00)", MACHINE_NO_SOUND ) +GAME( 1999, bishjan, 0, bishjan, bishjan, subsino2_state, empty_init, ROT0, "Subsino", "Bishou Jan (Japan, Ver. 203)", MACHINE_NO_SOUND ) +GAME( 1999, xiaoao, bishjan, xiaoao, bishjan, subsino2_state, empty_init, ROT0, "Subsino", "Xiao Ao Jiang Hu (China, Ver. 1.00)", MACHINE_NO_SOUND ) -GAME( 2000, new2001, 0, new2001, new2001, subsino2_state, init_new2001, ROT0, "Subsino", "New 2001 (Italy, Ver. 200N)", MACHINE_NO_SOUND ) +GAME( 2000, new2001, 0, new2001, new2001, subsino2_state, empty_init, ROT0, "Subsino", "New 2001 (Italy, Ver. 200N)", MACHINE_NO_SOUND ) -GAME( 2006, xplan, 0, xplan, xplan, subsino2_state, empty_init, ROT0, "Subsino", "X-Plan (Ver. 101)", MACHINE_NOT_WORKING ) +GAME( 2006, xplan, 0, xplan, xplan, subsino2_state, empty_init, ROT0, "Subsino", "X-Plan (Ver. 101)", MACHINE_NOT_WORKING ) -GAME( 2001, queenbee, 0, humlan, queenbee, subsino2_state, init_queenbee, ROT0, "Subsino (American Alpha license)", "Queen Bee (Ver. 114)", MACHINE_NOT_WORKING | MACHINE_NO_SOUND | MACHINE_IMPERFECT_GRAPHICS ) // severe timing issues -GAME( 2001, queenbeeb, queenbee, humlan, queenbee, subsino2_state, init_queenbeeb, ROT0, "Subsino", "Queen Bee (Brazil, Ver. 202)", MACHINE_NOT_WORKING | MACHINE_NO_SOUND | MACHINE_IMPERFECT_GRAPHICS ) // severe timing issues, only program ROM available -GAME( 2001, queenbeei, queenbee, humlan, queenbee, subsino2_state, init_queenbeei, ROT0, "Subsino", "Queen Bee (Israel, Ver. 100)", MACHINE_NOT_WORKING | MACHINE_NO_SOUND | MACHINE_IMPERFECT_GRAPHICS ) // severe timing issues, only program ROM available -GAME( 2001, queenbeesa, queenbee, humlan, queenbee, subsino2_state, init_queenbeeb, ROT0, "Subsino", "Queen Bee (SA-101-HARD)", MACHINE_NOT_WORKING | MACHINE_NO_SOUND | MACHINE_IMPERFECT_GRAPHICS ) // severe timing issues, only program ROM available +GAME( 2001, queenbee, 0, humlan, queenbee, subsino2_state, empty_init, ROT0, "Subsino (American Alpha license)", "Queen Bee (Ver. 114)", MACHINE_NOT_WORKING | MACHINE_NO_SOUND | MACHINE_IMPERFECT_GRAPHICS ) // severe timing issues +GAME( 2001, queenbeeb, queenbee, humlan, queenbee, subsino2_state, empty_init, ROT0, "Subsino", "Queen Bee (Brazil, Ver. 202)", MACHINE_NOT_WORKING | MACHINE_NO_SOUND | MACHINE_IMPERFECT_GRAPHICS ) // severe timing issues, only program ROM available +GAME( 2001, queenbeei, queenbee, humlan, queenbee, subsino2_state, empty_init, ROT0, "Subsino", "Queen Bee (Israel, Ver. 100)", MACHINE_NOT_WORKING | MACHINE_NO_SOUND | MACHINE_IMPERFECT_GRAPHICS ) // severe timing issues, only program ROM available +GAME( 2001, queenbeesa, queenbee, humlan, queenbee, subsino2_state, empty_init, ROT0, "Subsino", "Queen Bee (SA-101-HARD)", MACHINE_NOT_WORKING | MACHINE_NO_SOUND | MACHINE_IMPERFECT_GRAPHICS ) // severe timing issues, only program ROM available -GAME( 2001, humlan, queenbee, humlan, humlan, subsino2_state, init_humlan, ROT0, "Subsino (Truemax license)", "Humlan's Lyckohjul (Sweden, Ver. 402)", MACHINE_NOT_WORKING | MACHINE_NO_SOUND | MACHINE_IMPERFECT_GRAPHICS ) // severe timing issues +GAME( 2001, humlan, queenbee, humlan, humlan, subsino2_state, empty_init, ROT0, "Subsino (Truemax license)", "Humlan's Lyckohjul (Sweden, Ver. 402)", MACHINE_NOT_WORKING | MACHINE_NO_SOUND | MACHINE_IMPERFECT_GRAPHICS ) // severe timing issues -GAME( 2002, xreel, queenbee, humlan, humlan, subsino2_state, init_xreel, ROT0, "Subsino (ECM license)", "X-Reel", MACHINE_NOT_WORKING | MACHINE_NO_SOUND | MACHINE_IMPERFECT_GRAPHICS ) // severe timing issues +GAME( 2002, xreel, queenbee, humlan, humlan, subsino2_state, empty_init, ROT0, "Subsino (ECM license)", "X-Reel", MACHINE_NOT_WORKING | MACHINE_NO_SOUND | MACHINE_IMPERFECT_GRAPHICS ) // severe timing issues -GAME( 2002, squeenb, 0, humlan, humlan, subsino2_state, init_squeenb, ROT0, "Subsino", "Super Queen Bee (Ver. 101)", MACHINE_NOT_WORKING | MACHINE_NO_SOUND | MACHINE_IMPERFECT_GRAPHICS ) // severe timing issues +GAME( 2002, squeenb, 0, humlan, humlan, subsino2_state, empty_init, ROT0, "Subsino", "Super Queen Bee (Ver. 101)", MACHINE_NOT_WORKING | MACHINE_NO_SOUND | MACHINE_IMPERFECT_GRAPHICS ) // severe timing issues -GAME( 2003, qbeebing, 0, humlan, humlan, subsino2_state, init_qbeebing, ROT0, "Subsino", "Queen Bee Bingo", MACHINE_NOT_WORKING | MACHINE_NO_SOUND | MACHINE_IMPERFECT_GRAPHICS ) +GAME( 2003, qbeebing, 0, humlan, humlan, subsino2_state, empty_init, ROT0, "Subsino", "Queen Bee Bingo", MACHINE_NOT_WORKING | MACHINE_NO_SOUND | MACHINE_IMPERFECT_GRAPHICS ) -GAME( 200?, treamary, 0, bishjan, bishjan, subsino2_state, init_treamary, ROT0, "Subsino", "Treasure Mary", MACHINE_NOT_WORKING | MACHINE_NO_SOUND | MACHINE_IMPERFECT_GRAPHICS ) +GAME( 200?, treamary, 0, bishjan, bishjan, subsino2_state, empty_init, ROT0, "Subsino", "Treasure Mary", MACHINE_NOT_WORKING | MACHINE_NO_SOUND | MACHINE_IMPERFECT_GRAPHICS ) diff --git a/src/mame/skeleton/swunktarot.cpp b/src/mame/sunwise/anoworld.cpp similarity index 70% rename from src/mame/skeleton/swunktarot.cpp rename to src/mame/sunwise/anoworld.cpp index e1ffc25248f..9b734d27406 100644 --- a/src/mame/skeleton/swunktarot.cpp +++ b/src/mame/sunwise/anoworld.cpp @@ -1,8 +1,16 @@ -// license:BSD-3-Clause -// copyright-holders: +// license: BSD-3-Clause +// copyright-holders: Angelo Salese, AJR +/*************************************************************************************************** -/* -unknown Sunwise tarot card game +Another World (c) 1989 Sunwise + +TODO: +- Identify irq sources ($24 timer, $26 VBLANK?, $20 or $22 quadrature encoder); +- Z80DMA never sends a ready signal, workaround by forcing is_ready fn to 1; +- Verify data ROM bank; +- Sound; + +==================================================================================================== TOP BOARD (S-8808A) ========= @@ -32,11 +40,7 @@ video output 5x 5816 RAM 18 MHz osc -TODO: -- Identify irq sources ($24 timer, $26 VBLANK?, $20 or $22 quadrature encoder); -- Data ROM bank; - -*/ +***************************************************************************************************/ #include "emu.h" @@ -58,7 +62,7 @@ video output #define LOG_DMA (1U << 2) //#define VERBOSE (LOG_GENERAL | LOG_PORTS | LOG_DMA) -#define VERBOSE (LOG_GENERAL) +#define VERBOSE (LOG_GENERAL | LOG_PORTS) #include "logmacro.h" @@ -78,15 +82,19 @@ class anoworld_state : public driver_device , m_dma(*this, "dma") , m_palette(*this, "palette") , m_gfxdecode(*this, "gfxdecode") + , m_video_view(*this, "video_view") , m_databank(*this, "databank") , m_audiobank(*this, "audiobank") + , m_videoram(*this, "videoram") { } - void unktarot(machine_config &config) ATTR_COLD; + void anoworld(machine_config &config) ATTR_COLD; protected: virtual void machine_start() override ATTR_COLD; + virtual void machine_reset() override ATTR_COLD; + virtual void video_start() override ATTR_COLD; private: required_device m_maincpu; @@ -95,8 +103,10 @@ class anoworld_state : public driver_device required_device m_palette; required_device m_gfxdecode; + memory_view m_video_view; required_memory_bank m_databank; required_memory_bank m_audiobank; + required_shared_ptr m_videoram; std::unique_ptr m_paletteram; void main_program_map(address_map &map) ATTR_COLD; @@ -105,6 +115,7 @@ class anoworld_state : public driver_device void audio_io_map(address_map &map) ATTR_COLD; void data_bank_w(offs_t offset, u8 data); + void video_bank_w(offs_t offset, u8 data); void dma_busreq_w(int state); u8 dma_memory_r(offs_t offset); @@ -115,11 +126,41 @@ class anoworld_state : public driver_device uint32_t screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); }; +void anoworld_state::video_start() +{ + // TODO: conversion to tilemap +} uint32_t anoworld_state::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) { + u16 tile, color; bitmap.fill(rgb_t::black(), cliprect); + for (int offs = 0; offs < m_videoram.bytes(); offs += 4) + { + int const sx = ((offs >> 2) % 32); + int const sy = (offs >> 2) / 32; + + if (0) + { + tile = (m_videoram[offs + 2] | (m_videoram[offs + 3] << 8)) & 0x3fff; + // TODO: not enough bits for the full color banking, more view select? + color = (m_videoram[offs + 3] >> 6) & 0x3; + m_gfxdecode->gfx(1)->opaque(bitmap, cliprect, + tile, color, + 0, 0, + 8 * sx, 8 * sy); + } + + tile = (m_videoram[offs] | (m_videoram[offs + 1] << 8)) & 0xfff; + // TODO: definitely requires a 1bpp conversion (native RGB?) + color = (m_videoram[offs + 1] >> 4) & 0xf; + m_gfxdecode->gfx(0)->transpen(bitmap, cliprect, + tile, color, + 0, 0, + 8 * sx, 8 * sy, 0); + } + return 0; } @@ -127,7 +168,15 @@ void anoworld_state::data_bank_w(offs_t offset, u8 data) { // guess, also bit 6 actively used m_databank->set_entry(data & 0x3f); - LOG("data_bank_w: %02x\n", data); + LOG("PPI port A data_bank_w: %02x\n", data); +} + +void anoworld_state::video_bank_w(offs_t offset, u8 data) +{ + m_video_view.select(BIT(data, 4)); + // bit 2 used, video enable? + if (data != 0x14) + LOG("PPI port C video_bank_w: %02x\n", data); } void anoworld_state::dma_busreq_w(int state) @@ -167,8 +216,8 @@ void anoworld_state::main_program_map(address_map &map) map(0x0000, 0x7fff).rom(); map(0x8000, 0x9fff).ram(); map(0xa000, 0xafff).ram(); -// map(0xb000, 0xbfff).ram(); // interleaved video tilemap + palette words (RGB444)? Or banked thru port $42 bit 4? - map(0xb000, 0xbfff).lrw8( + map(0xb000, 0xbfff).view(m_video_view); + m_video_view[0](0xb000, 0xbfff).lrw8( NAME([this] (offs_t offset) { return m_paletteram[bitswap<12>(offset ^ 2, 1, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 0)]; }), @@ -183,6 +232,7 @@ void anoworld_state::main_program_map(address_map &map) m_palette->set_pen_color(pal_offset >> 1, pal4bit(r), pal4bit(g), pal4bit(b)); }) ); + m_video_view[1](0xb000, 0xbfff).ram().share("videoram"); map(0xc000, 0xffff).bankr(m_databank); } @@ -197,8 +247,9 @@ void anoworld_state::main_io_map(address_map &map) map(0x20, 0x2f).rw("rtc", FUNC(msm6242_device::read), FUNC(msm6242_device::write)); map(0x30, 0x33).rw("ppi0", FUNC(i8255_device::read), FUNC(i8255_device::write)); map(0x40, 0x43).rw("ppi1", FUNC(i8255_device::read), FUNC(i8255_device::write)); - map(0x50, 0x50).noprw(); // ? (bits 4 and 5 checked in service routines $20 and $22) - map(0x60, 0x60).noprw(); // ? + // writes goes to outputs, cfr. second item in Test Mode + map(0x50, 0x50).portr("IN0").nopw(); + map(0x60, 0x60).portr("IN1").nopw(); } static const z80_daisy_config main_daisy_chain[] = @@ -226,36 +277,43 @@ void anoworld_state::audio_io_map(address_map &map) } -static INPUT_PORTS_START( unktarot ) +// TODO: Test Mode shows abbreviated forms, identify them all +static INPUT_PORTS_START( anoworld ) PORT_START("IN0") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(1) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_PLAYER(1) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_PLAYER(1) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON7 ) PORT_PLAYER(1) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON8 ) PORT_PLAYER(1) + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) // C0? + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_COIN2 ) // C1? + PORT_DIPNAME( 0x0004, 0x0000, "IN0" ) + PORT_DIPSETTING( 0x0000, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x0004, DEF_STR( On ) ) + PORT_DIPNAME( 0x0008, 0x0000, DEF_STR( Unknown ) ) + PORT_DIPSETTING( 0x0000, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x0008, DEF_STR( On ) ) + PORT_DIPNAME( 0x0010, 0x0000, DEF_STR( Unknown ) ) + PORT_DIPSETTING( 0x0000, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x0010, DEF_STR( On ) ) + PORT_DIPNAME( 0x0020, 0x0000, DEF_STR( Unknown ) ) + PORT_DIPSETTING( 0x0000, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x0020, DEF_STR( On ) ) + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("PE?") // Paper Empty? + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("PB?") // Paper Busy? PORT_START("IN1") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(2) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_PLAYER(2) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_PLAYER(2) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON7 ) PORT_PLAYER(2) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON8 ) PORT_PLAYER(2) - - PORT_START("DSW") - PORT_DIPUNKNOWN_DIPLOC(0x01, 0x01, "SW:1") - PORT_DIPUNKNOWN_DIPLOC(0x02, 0x02, "SW:2") - PORT_DIPUNKNOWN_DIPLOC(0x04, 0x04, "SW:3") - PORT_DIPUNKNOWN_DIPLOC(0x08, 0x08, "SW:4") - PORT_DIPUNKNOWN_DIPLOC(0x10, 0x10, "SW:5") - PORT_DIPUNKNOWN_DIPLOC(0x20, 0x20, "SW:6") - PORT_DIPUNKNOWN_DIPLOC(0x40, 0x40, "SW:7") - PORT_DIPUNKNOWN_DIPLOC(0x80, 0x80, "SW:8") + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SERVICE1 ) // SS = Service Switch, hold to enter test mode + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) // SU = Service Up? + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) // SD = Service Down? + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("PS?") // Paper Strobe? + PORT_DIPNAME( 0x0010, 0x0000, "IN1" ) + PORT_DIPSETTING( 0x0000, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x0010, DEF_STR( On ) ) + PORT_DIPNAME( 0x0020, 0x0000, DEF_STR( Unknown ) ) + PORT_DIPSETTING( 0x0000, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x0020, DEF_STR( On ) ) + PORT_DIPNAME( 0x0040, 0x0000, DEF_STR( Unknown ) ) + PORT_DIPSETTING( 0x0000, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x0040, DEF_STR( On ) ) + PORT_DIPNAME( 0x0080, 0x0000, DEF_STR( Unknown ) ) + PORT_DIPSETTING( 0x0000, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x0080, DEF_STR( On ) ) INPUT_PORTS_END @@ -281,7 +339,7 @@ const gfx_layout gfx_8x8x4 = 8*8 }; -static GFXDECODE_START( gfx_unktarot ) +static GFXDECODE_START( gfx_anoworld ) GFXDECODE_ENTRY( "chars", 0, gfx_8x8x1, 0, 16 ) // TODO: identify how it gathers palette GFXDECODE_ENTRY( "tiles", 0, gfx_8x8x4, 0, 16 * 8 ) GFXDECODE_END @@ -296,6 +354,11 @@ void anoworld_state::machine_start() m_audiobank->set_entry(1); } +void anoworld_state::machine_reset() +{ + m_video_view.select(0); +} + /* * Irq table: * $+10 (DMA) writes to $9e61 @@ -306,7 +369,7 @@ void anoworld_state::machine_start() */ -void anoworld_state::unktarot(machine_config &config) +void anoworld_state::anoworld(machine_config &config) { Z80(config, m_maincpu, 4_MHz_XTAL); m_maincpu->set_addrmap(AS_PROGRAM, &anoworld_state::main_program_map); @@ -335,9 +398,16 @@ void anoworld_state::unktarot(machine_config &config) ctc1.zc_callback<2>().set([this] (int state) { LOGPORTS("%s: CTC1 ZC2 handler %d\n", machine().describe_context(), state); }); i8255_device &ppi0(I8255A(config, "ppi0")); // NEC D8255AC-2 + // PA (input) / PB (output): sound latches ppi0.in_pa_callback().set([this] () { LOGPORTS("%s: PPI0 port A in\n", machine().describe_context()); return uint8_t(0); }); ppi0.in_pb_callback().set([this] () { LOGPORTS("%s: PPI0 port B in\n", machine().describe_context()); return uint8_t(0); }); - ppi0.in_pc_callback().set([this] () { LOGPORTS("%s: PPI0 port C in\n", machine().describe_context()); return uint8_t(0); }); + ppi0.in_pc_callback().set([this] () { + // punts to an insert coin screen if this is 0xff, + // reacts to D0-D7 signals in test mode. + //LOGPORTS("%s: PPI0 port C in\n", machine().describe_context()); + (void)this; + return uint8_t(0); + }); ppi0.out_pa_callback().set([this] (uint8_t data) { LOGPORTS("%s: PPI0 port A out %02x\n", machine().describe_context(), data); }); ppi0.out_pb_callback().set([this] (uint8_t data) { LOGPORTS("%s: PPI0 port B out %02x\n", machine().describe_context(), data); }); ppi0.out_pc_callback().set([this] (uint8_t data) { LOGPORTS("%s: PPI0 port C out %02x\n", machine().describe_context(), data); }); @@ -345,7 +415,7 @@ void anoworld_state::unktarot(machine_config &config) i8255_device &ppi1(I8255A(config, "ppi1")); // NEC D8255AC-2 ppi1.out_pa_callback().set(FUNC(anoworld_state::data_bank_w)); ppi1.out_pb_callback().set([this] (uint8_t data) { LOGPORTS("%s: PPI1 port B out %02x\n", machine().describe_context(), data); }); - ppi1.out_pc_callback().set([this] (uint8_t data) { LOGPORTS("%s: PPI1 port C out %02x\n", machine().describe_context(), data); }); + ppi1.out_pc_callback().set(FUNC(anoworld_state::video_bank_w)); msm6242_device &rtc(MSM6242(config, "rtc", 32.768_kHz_XTAL)); rtc.out_int_handler().set("ctc0", FUNC(z80ctc_device::trg3)); // source guessed @@ -353,11 +423,11 @@ void anoworld_state::unktarot(machine_config &config) screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); // TODO: everything screen.set_refresh_hz(60); screen.set_vblank_time(ATTOSECONDS_IN_USEC(0)); - screen.set_size(64*8, 32*8); - screen.set_visarea(0*8, 64*8-1, 2*8, 30*8-1); + screen.set_size(32*8, 32*8); + screen.set_visarea(0*8, 32*8-1, 0*8, 32*8-1); screen.set_screen_update(FUNC(anoworld_state::screen_update)); - GFXDECODE(config, m_gfxdecode, m_palette, gfx_unktarot); + GFXDECODE(config, m_gfxdecode, m_palette, gfx_anoworld); PALETTE(config, m_palette).set_entries(0x800); //.set_format(palette_device::xRGB_444, 0x800); @@ -369,7 +439,7 @@ void anoworld_state::unktarot(machine_config &config) } -ROM_START( unktarot ) +ROM_START( anoworld ) ROM_REGION( 0x08000, "maincpu", 0 ) ROM_LOAD( "1.u5", 0x00000, 0x08000, CRC(eaf339d1) SHA1(8325046d2059ad890204e0373bcfbe1221e12bdf) ) @@ -404,4 +474,4 @@ ROM_END } // anonymous namespace -GAME( 1989, unktarot, 0, unktarot, unktarot, anoworld_state, empty_init, ROT0, "Sunwise", "Another World (Japan)", MACHINE_IS_SKELETON ) // title screen GFXs in region 1 at 0x3051 onward +GAME( 1989, anoworld, 0, anoworld, anoworld, anoworld_state, empty_init, ROT0, "Sunwise", "Another World (Japan, V1.8)", MACHINE_NOT_WORKING | MACHINE_NO_SOUND ) // title screen GFXs in region 1 at 0x3051 onward diff --git a/src/mame/misc/jankenmn.cpp b/src/mame/sunwise/jankenmn.cpp similarity index 100% rename from src/mame/misc/jankenmn.cpp rename to src/mame/sunwise/jankenmn.cpp diff --git a/src/mame/yamaha/tg100.cpp b/src/mame/yamaha/tg100.cpp index c9ac46b00e3..192dc77322e 100644 --- a/src/mame/yamaha/tg100.cpp +++ b/src/mame/yamaha/tg100.cpp @@ -59,6 +59,7 @@ class tg100_state : public driver_device void tg100_state::tg100_map(address_map &map) { map(0x00000000, 0x0007ffff).ram(); /* gate array stuff */ + map(0x00000000, 0x000000ff).rom().region("prgrom", 0x00000); map(0x00080000, 0x0009ffff).rom().region("prgrom", 0x00000); } @@ -90,7 +91,6 @@ ROM_START( tg100 ) ROM_LOAD( "xk731c0.ic4", 0x00000, 0x20000, CRC(8fb6139c) SHA1(483103a2ffc63a90a2086c597baa2b2745c3a1c2) ) ROM_REGION(0x4000, "maincpu", 0) - ROM_LOAD( "hd6435208a00p.bin", 0x0000, 0x4000, NO_DUMP ) ROM_COPY( "prgrom", 0x0000, 0x0000, 0x4000 ) ROM_REGION(0x200000, "ymw258", 0) diff --git a/src/mame/yunsung/paradise.cpp b/src/mame/yunsung/paradise.cpp index 8e08574eb30..b1cdc8e8d38 100644 --- a/src/mame/yunsung/paradise.cpp +++ b/src/mame/yunsung/paradise.cpp @@ -1823,9 +1823,9 @@ GAME( 199?, paradlx, 0, paradise, paradise, paradise_state, init_parad GAME( 199?, para2dx, 0, paradise, para2dx, paradise_state, init_paradise, ROT90, "Yun Sung", "Paradise 2 Deluxe", MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE ) // year not shown, but should be >=1994 GAME( 1996, tgtbal96, 0, tgtball, tgtball, paradise_state, init_tgtball, ROT0, "Yun Sung", "Target Ball '96", MACHINE_SUPPORTS_SAVE ) // With nudity GAME( 1995, tgtball, tgtbal96, tgtball, tgtball, paradise_state, init_tgtball, ROT0, "Yun Sung", "Target Ball", MACHINE_SUPPORTS_SAVE ) -GAME( 1995, tgtballn, tgtbal96, tgtball, tgtball, paradise_state, init_tgtball, ROT0, "Yun Sung", "Target Ball (With Nudity)", MACHINE_SUPPORTS_SAVE ) +GAME( 1995, tgtballn, tgtbal96, tgtball, tgtball, paradise_state, init_tgtball, ROT0, "Yun Sung", "Target Ball (with nudity)", MACHINE_SUPPORTS_SAVE ) GAME( 1996, penky, 0, penky, penky, paradise_state, init_tgtball, ROT0, "Yun Sung", "Penky", MACHINE_SUPPORTS_SAVE ) GAME( 1996, penkyi, penky, penkyi, penkyi, paradise_state, init_tgtball, ROT0, "Yun Sung (Impeuropex license)", "Penky (Italian)", MACHINE_SUPPORTS_SAVE ) GAME( 1996, torus, 0, torus, torus, paradise_state, init_torus, ROT90, "Yun Sung", "Torus", MACHINE_SUPPORTS_SAVE ) -GAME( 1998, madball, 0, madball, madball, paradise_state, init_tgtball, ROT0, "Yun Sung", "Mad Ball V2.0", MACHINE_SUPPORTS_SAVE ) -GAME( 1997, madballn, madball, madball, madball, paradise_state, init_tgtball, ROT0, "Yun Sung", "Mad Ball V2.0 (With Nudity)", MACHINE_SUPPORTS_SAVE ) +GAME( 1998, madball, 0, madball, madball, paradise_state, init_tgtball, ROT0, "Yun Sung", "Mad Ball (V2.0)", MACHINE_SUPPORTS_SAVE ) +GAME( 1997, madballn, madball, madball, madball, paradise_state, init_tgtball, ROT0, "Yun Sung", "Mad Ball (V2.0, with nudity)", MACHINE_SUPPORTS_SAVE ) diff --git a/src/osd/modules/input/input_sdl.cpp b/src/osd/modules/input/input_sdl.cpp index 1be07a3a429..e1ec2509d5e 100644 --- a/src/osd/modules/input/input_sdl.cpp +++ b/src/osd/modules/input/input_sdl.cpp @@ -33,6 +33,7 @@ #include #include #include +#include #include #include #include