diff options
author | David Haywood <28625134+DavidHaywood@users.noreply.github.com> | 2019-10-28 21:23:46 +0000 |
---|---|---|
committer | ajrhacker <ajrhacker@users.noreply.github.com> | 2019-10-28 17:23:46 -0400 |
commit | d660d1d5b3e7b9a39042bf6eb925294fd8a3bda1 (patch) | |
tree | 896d90a8bf50d769752b46e6d2b5e7ef563c640e | |
parent | bc1aba36e0b00f97d159e42ede1ab58603894338 (diff) |
promoted to WORKING (pvmil - SunPlus) (#5818)
* pvmil - map inputs, promote to working
* put SunPlus RNG on a timer, so that the pvmil questions are actually in a random order (nw)
-rw-r--r-- | src/devices/machine/spg2xx_io.cpp | 28 | ||||
-rw-r--r-- | src/devices/machine/spg2xx_io.h | 5 | ||||
-rw-r--r-- | src/mame/drivers/vii.cpp | 280 | ||||
-rw-r--r-- | src/mame/layout/pvmil.lay | 72 |
4 files changed, 268 insertions, 117 deletions
diff --git a/src/devices/machine/spg2xx_io.cpp b/src/devices/machine/spg2xx_io.cpp index f396567307a..37768895396 100644 --- a/src/devices/machine/spg2xx_io.cpp +++ b/src/devices/machine/spg2xx_io.cpp @@ -113,6 +113,9 @@ void spg2xx_io_device::device_start() m_timer_src_c = timer_alloc(TIMER_SRC_C); m_timer_src_c->adjust(attotime::never); + m_rng_timer = timer_alloc(TIMER_RNG); + m_rng_timer->adjust(attotime::never); + save_item(NAME(m_timer_a_preload)); save_item(NAME(m_timer_b_preload)); save_item(NAME(m_timer_b_divisor)); @@ -155,6 +158,9 @@ void spg2xx_io_device::device_reset() m_4khz_timer->adjust(attotime::from_hz(4096), 0, attotime::from_hz(4096)); + m_rng_timer->adjust(attotime::from_hz(1234), 0, attotime::from_hz(1234)); // timer value is arbitrary, maybe should match system clock, but that would result in heavy switching + + m_2khz_divider = 0; m_1khz_divider = 0; m_4hz_divider = 0; @@ -177,6 +183,15 @@ void spg2xx_io_device::uart_rx(uint8_t data) } } +uint16_t spg2xx_io_device::clock_rng(int which) +{ + const uint16_t value = m_io_regs[0x2c + which]; + m_io_regs[0x2c + which] = ((value << 1) | (BIT(value, 14) ^ BIT(value, 13))) & 0x7fff; + return value; +} + + + READ16_MEMBER(spg2xx_io_device::io_r) { static const char *const gpioregs[] = { "GPIO Data Port", "GPIO Buffer Port", "GPIO Direction Port", "GPIO Attribute Port", "GPIO IRQ/Latch Port" }; @@ -256,16 +271,12 @@ READ16_MEMBER(spg2xx_io_device::io_r) case 0x2c: // PRNG 0 { - const uint16_t value = m_io_regs[0x2c]; - m_io_regs[0x2c] = ((value << 1) | (BIT(value, 14) ^ BIT(value, 13))) & 0x7fff; - return value; + return clock_rng(0); } case 0x2d: // PRNG 1 { - const uint16_t value = m_io_regs[0x2d]; - m_io_regs[0x2d] = ((value << 1) | (BIT(value, 14) ^ BIT(value, 13))) & 0x7fff; - return value; + return clock_rng(1); } case 0x2e: // FIQ Source Select @@ -1099,6 +1110,11 @@ void spg2xx_io_device::device_timer(emu_timer &timer, device_timer_id id, int pa case TIMER_SRC_C: update_timer_c_src(); break; + + case TIMER_RNG: + clock_rng(0); + clock_rng(1); + break; } } diff --git a/src/devices/machine/spg2xx_io.h b/src/devices/machine/spg2xx_io.h index a077d8554be..d1ddd573283 100644 --- a/src/devices/machine/spg2xx_io.h +++ b/src/devices/machine/spg2xx_io.h @@ -66,11 +66,14 @@ protected: static const device_timer_id TIMER_4KHZ = 6; static const device_timer_id TIMER_SRC_AB = 7; static const device_timer_id TIMER_SRC_C = 8; + static const device_timer_id TIMER_RNG = 9; virtual void device_start() override; virtual void device_reset() override; virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override; + uint16_t clock_rng(int which); + void update_porta_special_modes(); void update_portb_special_modes(); void do_gpio(uint32_t offset, bool write); @@ -135,6 +138,8 @@ protected: emu_timer *m_uart_tx_timer; emu_timer *m_uart_rx_timer; + emu_timer *m_rng_timer; + required_device<unsp_device> m_cpu; required_device<screen_device> m_screen; diff --git a/src/mame/drivers/vii.cpp b/src/mame/drivers/vii.cpp index 216289a4138..1f3f7ab8ea8 100644 --- a/src/mame/drivers/vii.cpp +++ b/src/mame/drivers/vii.cpp @@ -109,6 +109,8 @@ lexizeus: Some corrupt sound effects and a few corrupt ground tiles a few minutes in. (checksum is good, and a video recorded from one of these doesn't exhibit these problems, so either emulation issue or alt revision?) + pvmil: + Question order depends on SoC RNG, only reads when it wants a new value, so unless RNG runs on a timer question order ends up the same vii: When loading a cart from file manager, sometimes MAME will crash. @@ -162,6 +164,8 @@ #include "softlist.h" #include "speaker.h" +#include "pvmil.lh" + class spg2xx_game_state : public driver_device { public: @@ -188,7 +192,6 @@ public: void rad_crik(machine_config &config); void non_spg_base(machine_config &config); void lexizeus(machine_config &config); - void pvmil(machine_config &config); void taikeegr(machine_config &config); void init_crc(); @@ -217,10 +220,6 @@ protected: DECLARE_WRITE16_MEMBER(jakks_porta_w); DECLARE_WRITE16_MEMBER(jakks_portb_w); - DECLARE_WRITE16_MEMBER(pvmil_porta_w); - DECLARE_WRITE16_MEMBER(pvmil_portb_w); - DECLARE_WRITE16_MEMBER(pvmil_portc_w); - required_device<spg2xx_device> m_maincpu; required_device<screen_device> m_screen; optional_memory_bank m_bank; @@ -247,6 +246,39 @@ protected: optional_device<nvram_device> m_nvram; }; +class pvmil_state : public spg2xx_game_state +{ +public: + pvmil_state(const machine_config &mconfig, device_type type, const char *tag) + : spg2xx_game_state(mconfig, type, tag) + , m_portcdata(0x0000) + , m_latchcount(0) + , m_latchbit(0) + , m_outdat(0) + , m_p4inputs(*this, "EXTRA") + , m_leds(*this, "led%u", 0U) + { } + + void pvmil(machine_config &config); + + DECLARE_READ_LINE_MEMBER(pvmil_p4buttons_r); + +protected: + virtual void machine_start() override; + + DECLARE_WRITE16_MEMBER(pvmil_porta_w); + DECLARE_WRITE16_MEMBER(pvmil_portb_w); + DECLARE_WRITE16_MEMBER(pvmil_portc_w); + +private: + uint16_t m_portcdata; + int m_latchcount; + int m_latchbit; + uint16_t m_outdat; + required_ioport m_p4inputs; + output_finder<4> m_leds; +}; + class jakks_gkr_state : public spg2xx_game_state { public: @@ -610,23 +642,126 @@ READ16_MEMBER(spg2xx_game_state::rad_portc_r) return data; } -WRITE16_MEMBER(spg2xx_game_state::pvmil_porta_w) +void pvmil_state::machine_start() +{ + spg2xx_game_state::machine_start(); + + m_leds.resolve(); + save_item(NAME(m_portcdata)); + save_item(NAME(m_latchcount)); + save_item(NAME(m_latchbit)); + save_item(NAME(m_outdat)); +} + + +WRITE16_MEMBER(pvmil_state::pvmil_porta_w) { logerror("%s: pvmil_porta_w %04x\n", machine().describe_context(), data); } -WRITE16_MEMBER(spg2xx_game_state::pvmil_portb_w) +WRITE16_MEMBER(pvmil_state::pvmil_portb_w) { logerror("%s: pvmil_portb_w %04x\n", machine().describe_context(), data); } -WRITE16_MEMBER(spg2xx_game_state::pvmil_portc_w) + +READ_LINE_MEMBER(pvmil_state::pvmil_p4buttons_r) { - // related to P4 inputs? - logerror("%s: pvmil_portc_w %04x\n", machine().describe_context(), data); + return m_latchbit; } +WRITE16_MEMBER(pvmil_state::pvmil_portc_w) +{ + // ---- -432 1--- r-?c + // 4,3,2,1 = player controller LEDs + // r = reset input multiplexer + // ? = unknown + // m = input multiplexer clock + + // p4 input reading + // the code to read them is interesting tho, it even includes loops that poll port a 16 times before/after, why? + logerror("%s: pvmil_portc_w %04x\n", machine().describe_context(), data); + + uint16_t bit; + + // for logging bits changed on the port + if (0) + { + for (int i = 0; i < 16; i++) + { + bit = 1 << i; + if ((m_portcdata & bit) != (data & bit)) + { + if (data & bit) + { + logerror("port c %04x low to high\n", bit); + } + else + { + logerror("port c %04x high to low\n", bit); + } + } + + if ((m_portcdata & 0x0400) != (data & 0x0400)) + { + logerror("-------------------------------------------------\n"); + } + } + } + + // happens on startup, before it starts reading inputs for the first time, assume 'reset counter' + bit = 0x0008; + if ((m_portcdata & bit) != (data & bit)) + { + if (data & bit) + { + logerror("reset read counter\n"); + m_latchcount = 0; + } + } + + bit = 0x0001; + if ((m_portcdata & bit) != (data & bit)) + { + if (!(data & bit)) + { + //logerror("latch with count of %d (outbit is %d)\n", m_latchcount, (m_portcdata & 0x0002)>>1 ); + // what is bit 0x0002? it gets flipped in the same code as the inputs are read. + // it doesn't follow any obvious pattern + m_outdat &= ~(1 << m_latchcount); + m_outdat |= ((data & 0x0002) >> 1) << m_latchcount; + if (0) + popmessage("%d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d", + (m_outdat & 0x8000) ? 1 : 0, (m_outdat & 0x4000) ? 1 : 0, (m_outdat & 0x2000) ? 1 : 0, (m_outdat & 0x1000) ? 1 : 0, + (m_outdat & 0x0800) ? 1 : 0, (m_outdat & 0x0400) ? 1 : 0, (m_outdat & 0x0200) ? 1 : 0, (m_outdat & 0x0100) ? 1 : 0, + (m_outdat & 0x0080) ? 1 : 0, (m_outdat & 0x0040) ? 1 : 0, (m_outdat & 0x0020) ? 1 : 0, (m_outdat & 0x0010) ? 1 : 0, + (m_outdat & 0x0008) ? 1 : 0, (m_outdat & 0x0004) ? 1 : 0, (m_outdat & 0x0002) ? 1 : 0, (m_outdat & 0x0001) ? 1 : 0); + + + m_latchbit = (((m_p4inputs->read()) << m_latchcount) & 0x8000) ? 1 : 0; + + m_latchcount++; + if (m_latchcount == 16) + m_latchcount = 0; + } + } + + m_portcdata = data; + + if (0) + popmessage("%d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d", + (m_portcdata & 0x8000) ? 1 : 0, (m_portcdata & 0x4000) ? 1 : 0, (m_portcdata & 0x2000) ? 1 : 0, (m_portcdata & 0x1000) ? 1 : 0, + (m_portcdata & 0x0800) ? 1 : 0, (m_portcdata & 0x0400) ? 1 : 0, (m_portcdata & 0x0200) ? 1 : 0, (m_portcdata & 0x0100) ? 1 : 0, + (m_portcdata & 0x0080) ? 1 : 0, (m_portcdata & 0x0040) ? 1 : 0, (m_portcdata & 0x0020) ? 1 : 0, (m_portcdata & 0x0010) ? 1 : 0, + (m_portcdata & 0x0008) ? 1 : 0, (m_portcdata & 0x0004) ? 1 : 0, (m_portcdata & 0x0002) ? 1 : 0, (m_portcdata & 0x0001) ? 1 : 0); + + m_leds[0] = (m_portcdata & 0x0080) ? 0 : 1; + m_leds[1] = (m_portcdata & 0x0100) ? 0 : 1; + m_leds[2] = (m_portcdata & 0x0200) ? 0 : 1; + m_leds[3] = (m_portcdata & 0x0400) ? 0 : 1; +} + void spg2xx_game_state::mem_map_4m(address_map &map) { @@ -1708,108 +1843,29 @@ static INPUT_PORTS_START( pvmil ) // hold "console start" + "console select" on PORT_BIT( 0x0800, IP_ACTIVE_HIGH, IPT_BUTTON4 ) PORT_PLAYER(3) PORT_NAME("Player 3 D") PORT_BIT( 0x1000, IP_ACTIVE_HIGH, IPT_BUTTON5 ) PORT_PLAYER(1) PORT_NAME("Player 1 Lifeline") PORT_BIT( 0x2000, IP_ACTIVE_HIGH, IPT_START ) PORT_CODE(KEYCODE_1) PORT_NAME("Console Start") - PORT_DIPNAME( 0x4000, 0x4000, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x4000, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) - PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_START ) PORT_CODE(KEYCODE_5) PORT_NAME("Console Select") + PORT_BIT( 0x4000, IP_ACTIVE_HIGH, IPT_UNUSED ) + PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_SELECT ) PORT_CODE(KEYCODE_5) PORT_NAME("Console Select") PORT_START("P2") - PORT_DIPNAME( 0x0001, 0x0001, "P2" ) - PORT_DIPSETTING( 0x0001, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) - PORT_DIPNAME( 0x0002, 0x0002, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x0002, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) - PORT_DIPNAME( 0x0004, 0x0004, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x0004, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) - PORT_DIPNAME( 0x0008, 0x0008, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x0008, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) - PORT_DIPNAME( 0x0010, 0x0010, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x0010, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) - PORT_DIPNAME( 0x0020, 0x0020, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x0020, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) - PORT_DIPNAME( 0x0040, 0x0040, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x0040, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) - PORT_DIPNAME( 0x0080, 0x0080, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x0080, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) - PORT_DIPNAME( 0x0100, 0x0100, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x0100, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) - PORT_DIPNAME( 0x0200, 0x0200, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x0200, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) - PORT_DIPNAME( 0x0400, 0x0400, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x0400, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) - PORT_DIPNAME( 0x0800, 0x0800, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x0800, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) - PORT_DIPNAME( 0x1000, 0x1000, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x1000, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) - PORT_DIPNAME( 0x2000, 0x2000, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x2000, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) - PORT_DIPNAME( 0x4000, 0x4000, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x4000, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) - PORT_DIPNAME( 0x8000, 0x8000, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x8000, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) + PORT_BIT( 0xffff, IP_ACTIVE_HIGH, IPT_UNUSED ) - PORT_START("P3") // Player 4 buttons are read with some kind of serial / multiplexing protocol? - PORT_DIPNAME( 0x0001, 0x0001, "P3" ) - PORT_DIPSETTING( 0x0001, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) - PORT_DIPNAME( 0x0002, 0x0002, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x0002, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) - PORT_DIPNAME( 0x0004, 0x0004, DEF_STR( Unknown ) ) // this triggers all P4 buttons, must be some multiplexing (or a core bug) - PORT_DIPSETTING( 0x0004, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) - PORT_DIPNAME( 0x0008, 0x0008, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x0008, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) + PORT_START("P3") + PORT_BIT( 0x0003, IP_ACTIVE_HIGH, IPT_UNUSED ) + PORT_BIT( 0x0004, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(pvmil_state, pvmil_p4buttons_r) // Player 4 buttons read through here + PORT_BIT( 0x0008, IP_ACTIVE_HIGH, IPT_UNUSED ) PORT_BIT( 0x0010, IP_ACTIVE_HIGH, IPT_BUTTON5 ) PORT_PLAYER(2) PORT_NAME("Player 2 Lifeline") PORT_BIT( 0x0020, IP_ACTIVE_HIGH, IPT_BUTTON5 ) PORT_PLAYER(3) PORT_NAME("Player 3 Lifeline") PORT_BIT( 0x0040, IP_ACTIVE_HIGH, IPT_BUTTON5 ) PORT_PLAYER(4) PORT_NAME("Player 4 Lifeline") - PORT_DIPNAME( 0x0080, 0x0080, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x0080, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) - PORT_DIPNAME( 0x0100, 0x0100, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x0100, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) - PORT_DIPNAME( 0x0200, 0x0200, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x0200, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) - PORT_DIPNAME( 0x0400, 0x0400, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x0400, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) - PORT_DIPNAME( 0x0800, 0x0800, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x0800, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) - PORT_DIPNAME( 0x1000, 0x1000, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x1000, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) - PORT_DIPNAME( 0x2000, 0x2000, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x2000, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) - PORT_DIPNAME( 0x4000, 0x4000, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x4000, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) - PORT_DIPNAME( 0x8000, 0x8000, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x8000, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) + PORT_BIT( 0xff80, IP_ACTIVE_HIGH, IPT_UNUSED ) + + PORT_START("EXTRA") + PORT_BIT( 0x0fff, IP_ACTIVE_HIGH, IPT_UNUSED ) + PORT_BIT( 0x1000, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(4) PORT_NAME("Player 4 A") + PORT_BIT( 0x2000, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_PLAYER(4) PORT_NAME("Player 4 B") + PORT_BIT( 0x4000, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_PLAYER(4) PORT_NAME("Player 4 C") + PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_BUTTON4 ) PORT_PLAYER(4) PORT_NAME("Player 4 D") INPUT_PORTS_END - - static INPUT_PORTS_START( taikeegr ) PORT_START("P1") PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_NAME("Strum Bar Down") @@ -2526,10 +2582,10 @@ void spg2xx_game_state::rad_crik(machine_config &config) NVRAM(config, m_nvram, nvram_device::DEFAULT_ALL_1); } -void spg2xx_game_state::pvmil(machine_config &config) +void pvmil_state::pvmil(machine_config &config) { SPG24X(config, m_maincpu, XTAL(27'000'000), m_screen); - m_maincpu->set_addrmap(AS_PROGRAM, &spg2xx_game_state::mem_map_4m); + m_maincpu->set_addrmap(AS_PROGRAM, &pvmil_state::mem_map_4m); m_maincpu->set_pal(true); spg2xx_base(config); @@ -2540,11 +2596,13 @@ void spg2xx_game_state::pvmil(machine_config &config) m_maincpu->porta_in().set_ioport("P1"); m_maincpu->portb_in().set_ioport("P2"); m_maincpu->portc_in().set_ioport("P3"); - m_maincpu->porta_out().set(FUNC(spg2xx_game_state::pvmil_porta_w)); - m_maincpu->portb_out().set(FUNC(spg2xx_game_state::pvmil_portb_w)); - m_maincpu->portc_out().set(FUNC(spg2xx_game_state::pvmil_portc_w)); + m_maincpu->porta_out().set(FUNC(pvmil_state::pvmil_porta_w)); + m_maincpu->portb_out().set(FUNC(pvmil_state::pvmil_portb_w)); + m_maincpu->portc_out().set(FUNC(pvmil_state::pvmil_portc_w)); - NVRAM(config, m_nvram, nvram_device::DEFAULT_ALL_1); +// NVRAM(config, m_nvram, nvram_device::DEFAULT_ALL_1); + + config.set_default_layout(layout_pvmil); } void spg2xx_game_state::taikeegr(machine_config &config) @@ -2935,7 +2993,7 @@ CONS( 2009, zone40, 0, 0, non_spg_base, wirels60, spg2xx_game_st CONS( 200?, lexizeus, 0, 0, lexizeus, lexizeus, spg2xx_game_state, init_zeus, "Lexibook", "Zeus IG900 20-in-1 (US?)", MACHINE_NO_SOUND | MACHINE_NOT_WORKING ) // there are other regions of this, including a Finnish version "Haluatko miljonääriksi?" (see https://millionaire.fandom.com/wiki/Haluatko_miljon%C3%A4%C3%A4riksi%3F_(Play_Vision_game) ) -CONS( 2006, pvmil, 0, 0, pvmil, pvmil, spg2xx_game_state, empty_init, "Play Vision", "Who Wants to Be a Millionaire (Play Vision, Plug and Play, UK)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) // p4 inputs need mapping +CONS( 2006, pvmil, 0, 0, pvmil, pvmil, pvmil_state, empty_init, "Play Vision", "Who Wants to Be a Millionaire? (Play Vision, Plug and Play, UK)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) // there are multiple versions of this with different songs, was also sold by dreamGEAR as 'Shredmaster Jr.' (different title screen) // for the UK version the title screen always shows "Guitar Rock", however there are multiple boxes with different titles and song selections. diff --git a/src/mame/layout/pvmil.lay b/src/mame/layout/pvmil.lay new file mode 100644 index 00000000000..fca2cf88503 --- /dev/null +++ b/src/mame/layout/pvmil.lay @@ -0,0 +1,72 @@ +<?xml version="1.0"?> +<mamelayout version="2"> + <element name="red_led_p1" defstate="0"> + <disk state="1"> + <color red="1.0" green="0.0" blue="0.0" /> + </disk> + <disk state="0"> + <color red="0.2" green="0.0" blue="0.0" /> + </disk> + <text string="P1"> + <color red="0.0" green="0.0" blue="0.0" /> + <bounds x="0" y="0.0" width="1" height="1" /> + </text> + </element> + + <element name="red_led_p2" defstate="0"> + <disk state="1"> + <color red="1.0" green="0.0" blue="0.0" /> + </disk> + <disk state="0"> + <color red="0.2" green="0.0" blue="0.0" /> + </disk> + <text string="P2"> + <color red="0.0" green="0.0" blue="0.0" /> + <bounds x="0" y="0.0" width="1" height="1" /> + </text> + </element> + + <element name="red_led_p3" defstate="0"> + <disk state="1"> + <color red="1.0" green="0.0" blue="0.0" /> + </disk> + <disk state="0"> + <color red="0.2" green="0.0" blue="0.0" /> + </disk> + <text string="P3"> + <color red="0.0" green="0.0" blue="0.0" /> + <bounds x="0" y="0.0" width="1" height="1" /> + </text> + </element> + + <element name="red_led_p4" defstate="0"> + <disk state="1"> + <color red="1.0" green="0.0" blue="0.0" /> + </disk> + <disk state="0"> + <color red="0.2" green="0.0" blue="0.0" /> + </disk> + <text string="P4"> + <color red="0.0" green="0.0" blue="0.0" /> + <bounds x="0" y="0.0" width="1" height="1" /> + </text> + </element> + + <view name="Player LEDs"> + <screen index="0"> + <bounds left="0" top="0" right="4" bottom="3" /> + </screen> + <bezel name="led0" element="red_led_p1"> + <bounds x="0.45" y="3.00" width="0.10" height="0.10" /> + </bezel> + <bezel name="led1" element="red_led_p2"> + <bounds x="1.45" y="3.00" width="0.10" height="0.10" /> + </bezel> + <bezel name="led2" element="red_led_p3"> + <bounds x="2.45" y="3.00" width="0.10" height="0.10" /> + </bezel> + <bezel name="led3" element="red_led_p4"> + <bounds x="3.45" y="3.00" width="0.10" height="0.10" /> + </bezel> + </view> +</mamelayout> |