diff options
author | David Haywood <28625134+DavidHaywood@users.noreply.github.com> | 2020-02-13 20:02:37 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-13 15:02:37 -0500 |
commit | 0fca074a99aed1d305583f0bef4e3a42d51a928a (patch) | |
tree | b2c0a2cce0260f713daf515919680a26d448bb4f | |
parent | 9f314e2300708b377d804309276d9f84a4fa2124 (diff) |
Plug and Play work (#6304)
* Plug and play work (nw)
* (nw)
* new WORKING machines
---
Mission: Paintball Powered Up [Sean Riddle, David Haywood]
new NOT WORKING machines
----
Star Wars - The Clone Wars [Sean Riddle, David Haywood]
The Oregon Trail [anonymous]
* new NOT WORKING software list entries
mobigo_cart.xml [TeamEurope]
Team Umizoomi - Die grosse Umiauto Rettung (Germany) (80-252504)
Chuggington (Germany) (80-251804)
Toy Story 3 (Germany) (80-250104)
Fur immer Shrek (Germany) (80-250004)
* (nw)
-rw-r--r-- | hash/mobigo_cart.xml | 45 | ||||
-rw-r--r-- | src/devices/machine/spg2xx.cpp | 64 | ||||
-rw-r--r-- | src/devices/machine/spg2xx.h | 8 | ||||
-rw-r--r-- | src/devices/machine/spg2xx_video.cpp | 45 | ||||
-rw-r--r-- | src/devices/machine/spg2xx_video.h | 7 | ||||
-rw-r--r-- | src/mame/drivers/nes_vt.cpp | 12 | ||||
-rw-r--r-- | src/mame/drivers/spg2xx.cpp | 144 | ||||
-rw-r--r-- | src/mame/drivers/spg2xx_jakks.cpp | 8 | ||||
-rw-r--r-- | src/mame/drivers/spg2xx_mysprtch.cpp | 6 | ||||
-rw-r--r-- | src/mame/drivers/spg2xx_shredmjr.cpp | 12 | ||||
-rw-r--r-- | src/mame/includes/spg2xx.h | 33 | ||||
-rw-r--r-- | src/mame/mame.lst | 4 |
12 files changed, 319 insertions, 69 deletions
diff --git a/hash/mobigo_cart.xml b/hash/mobigo_cart.xml index 63eb5e411c0..ca1ab5d33d0 100644 --- a/hash/mobigo_cart.xml +++ b/hash/mobigo_cart.xml @@ -102,6 +102,51 @@ </dataarea> </part> </software> + + <software name="teamumiz" supported="no"> + <description>Team Umizoomi - Die grosse Umiauto Rettung (Germany) (80-252504)</description> + <year>201?</year> + <publisher>VTech</publisher> + <part name="cart" interface="mobigo_cart"> + <dataarea name="rom" size="0x1000000"> + <rom name="80252504 - team umizoomi - die grosse umiauto rettung (ger).bin" size="0x1000000" crc="48a52f91" sha1="c34865bbbd3a0854e3e6876673ad9c721531278c"/> + </dataarea> + </part> + </software> + + <software name="chugg" supported="no"> + <description>Chuggington (Germany) (80-251804)</description> + <year>201?</year> + <publisher>VTech</publisher> + <part name="cart" interface="mobigo_cart"> + <dataarea name="rom" size="0x1000000"> + <rom name="80-251804 - chuggington (ger).bin" size="0x1000000" crc="62bd91aa" sha1="b8e185107f1764d469cca37472a18553fe1e55fa"/> + </dataarea> + </part> + </software> + + <software name="tstory3" supported="no"> + <description>Toy Story 3 (Germany) (80-250104)</description> + <year>201?</year> + <publisher>VTech</publisher> + <part name="cart" interface="mobigo_cart"> + <dataarea name="rom" size="0x1000000"> + <rom name="80-250104 - toy story 3 (ger).bin" size="0x1000000" crc="caafa975" sha1="0dd2b13a05711412493255fcf2b8ac31a3445800"/> + </dataarea> + </part> + </software> + + <software name="fishrek" supported="no"> + <description>Fur immer Shrek (Germany) (80-250004)</description> + <year>201?</year> + <publisher>VTech</publisher> + <part name="cart" interface="mobigo_cart"> + <dataarea name="rom" size="0x1000000"> + <rom name="80-250004 - fur immer shrek (ger).bin" size="0x1000000" crc="812a3f90" sha1="1cbd4728201c76b4fb26a8523b080330515153d5"/> + </dataarea> + </part> + </software> + <!-- this is from a special large scale Kiosk unit, which should also have a unique BIOS. Maybe move into driver as a hardcodd cart once BIOS is dumped rather than having it here? --> <software name="kiosk" supported="no"> diff --git a/src/devices/machine/spg2xx.cpp b/src/devices/machine/spg2xx.cpp index dc38e8b4a85..42b05c7e9a2 100644 --- a/src/devices/machine/spg2xx.cpp +++ b/src/devices/machine/spg2xx.cpp @@ -18,37 +18,39 @@ DEFINE_DEVICE_TYPE(SPG24X, spg24x_device, "spg24x", "SPG240-series System-on-a-C DEFINE_DEVICE_TYPE(SPG28X, spg28x_device, "spg28x", "SPG280-series System-on-a-Chip") -spg2xx_device::spg2xx_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, uint16_t sprite_limit, address_map_constructor internal) - : unsp_device(mconfig, type, tag, owner, clock, internal) - , device_mixer_interface(mconfig, *this, 2) - , m_spg_audio(*this, "spgaudio") - , m_spg_io(*this, "spgio") - , m_spg_sysdma(*this, "spgsysdma") - , m_spg_video(*this, "spgvideo") - , m_sprite_limit(sprite_limit) - , m_rowscrolloffset(15) - , m_porta_out(*this) - , m_portb_out(*this) - , m_portc_out(*this) - , m_porta_in(*this) - , m_portb_in(*this) - , m_portc_in(*this) - , m_adc_in(*this) - , m_i2c_w(*this) - , m_i2c_r(*this) - , m_uart_tx(*this) - , m_chip_sel(*this) - , m_screen(*this, finder_base::DUMMY_TAG) +spg2xx_device::spg2xx_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, uint16_t sprite_limit, address_map_constructor internal) : + unsp_device(mconfig, type, tag, owner, clock, internal), + device_mixer_interface(mconfig, *this, 2), + m_spg_audio(*this, "spgaudio"), + m_spg_io(*this, "spgio"), + m_spg_sysdma(*this, "spgsysdma"), + m_spg_video(*this, "spgvideo"), + m_sprite_limit(sprite_limit), + m_rowscrolloffset(15), + m_porta_out(*this), + m_portb_out(*this), + m_portc_out(*this), + m_porta_in(*this), + m_portb_in(*this), + m_portc_in(*this), + m_adc_in(*this), + m_guny_in(*this), + m_gunx_in(*this), + m_i2c_w(*this), + m_i2c_r(*this), + m_uart_tx(*this), + m_chip_sel(*this), + m_screen(*this, finder_base::DUMMY_TAG) { } -spg24x_device::spg24x_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) - : spg2xx_device(mconfig, SPG24X, tag, owner, clock, 256, address_map_constructor(FUNC(spg24x_device::internal_map), this)) +spg24x_device::spg24x_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : + spg2xx_device(mconfig, SPG24X, tag, owner, clock, 256, address_map_constructor(FUNC(spg24x_device::internal_map), this)) { } -spg28x_device::spg28x_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) - : spg2xx_device(mconfig, SPG28X, tag, owner, clock, 64, address_map_constructor(FUNC(spg28x_device::internal_map), this)) +spg28x_device::spg28x_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : + spg2xx_device(mconfig, SPG28X, tag, owner, clock, 64, address_map_constructor(FUNC(spg28x_device::internal_map), this)) { } @@ -78,6 +80,8 @@ void spg2xx_device::device_start() m_portb_in.resolve_safe(0); m_portc_in.resolve_safe(0); m_adc_in.resolve_all_safe(0x0fff); + m_guny_in.resolve_safe(0); + m_gunx_in.resolve_safe(0); m_i2c_w.resolve_safe(); m_i2c_r.resolve_safe(0); m_uart_tx.resolve_safe(); @@ -175,6 +179,9 @@ void spg2xx_device::configure_spg_io(spg2xx_io_device* io) io->write_ffrq_tmr1_irq_callback().set(FUNC(spg2xx_device::ffreq1_w)); io->write_ffrq_tmr2_irq_callback().set(FUNC(spg2xx_device::ffreq2_w)); io->write_fiq_vector_callback().set(FUNC(spg2xx_device::fiq_vector_w)); + + m_spg_video->guny_in().set(FUNC(spg2xx_device::guny_in_r)); + m_spg_video->gunx_in().set(FUNC(spg2xx_device::gunx_in_r)); } void spg24x_device::device_add_mconfig(machine_config &config) @@ -188,7 +195,6 @@ void spg24x_device::device_add_mconfig(machine_config &config) m_spg_audio->add_route(1, *this, 1.0, AUTO_ALLOC_INPUT, 1); SPG24X_IO(config, m_spg_io, DERIVED_CLOCK(1, 1), DEVICE_SELF, m_screen); - configure_spg_io(m_spg_io); SPG2XX_SYSDMA(config, m_spg_sysdma, DERIVED_CLOCK(1, 1), DEVICE_SELF); @@ -196,6 +202,9 @@ void spg24x_device::device_add_mconfig(machine_config &config) m_spg_video->sprlimit_read_callback().set(FUNC(spg24x_device::get_sprlimit)); m_spg_video->rowscrolloffset_read_callback().set(FUNC(spg24x_device::get_rowscrolloffset)); m_spg_video->write_video_irq_callback().set(FUNC(spg24x_device::videoirq_w)); + + configure_spg_io(m_spg_io); + } void spg28x_device::device_add_mconfig(machine_config &config) @@ -209,7 +218,6 @@ void spg28x_device::device_add_mconfig(machine_config &config) m_spg_audio->add_route(1, *this, 1.0, AUTO_ALLOC_INPUT, 1); SPG28X_IO(config, m_spg_io, DERIVED_CLOCK(1, 1), DEVICE_SELF, m_screen); - configure_spg_io(m_spg_io); SPG2XX_SYSDMA(config, m_spg_sysdma, DERIVED_CLOCK(1, 1), DEVICE_SELF); @@ -217,4 +225,6 @@ void spg28x_device::device_add_mconfig(machine_config &config) m_spg_video->sprlimit_read_callback().set(FUNC(spg28x_device::get_sprlimit)); m_spg_video->rowscrolloffset_read_callback().set(FUNC(spg28x_device::get_rowscrolloffset)); m_spg_video->write_video_irq_callback().set(FUNC(spg28x_device::videoirq_w)); + + configure_spg_io(m_spg_io); } diff --git a/src/devices/machine/spg2xx.h b/src/devices/machine/spg2xx.h index 4927d0d9294..e7f69a79b0c 100644 --- a/src/devices/machine/spg2xx.h +++ b/src/devices/machine/spg2xx.h @@ -55,6 +55,9 @@ public: template <size_t Line> auto adc_in() { return m_adc_in[Line].bind(); } + auto guny_in() { return m_guny_in.bind(); } + auto gunx_in() { return m_gunx_in.bind(); } + auto i2c_w() { return m_i2c_w.bind(); } auto i2c_r() { return m_i2c_r.bind(); } @@ -110,6 +113,9 @@ protected: devcb_read16::array<2> m_adc_in; + devcb_read16 m_guny_in; + devcb_read16 m_gunx_in; + devcb_write8 m_i2c_w; devcb_read8 m_i2c_r; @@ -125,6 +131,8 @@ protected: void configure_spg_io(spg2xx_io_device* io); + DECLARE_READ16_MEMBER(guny_in_r) { return m_guny_in(); } + DECLARE_READ16_MEMBER(gunx_in_r) { return m_gunx_in(); } DECLARE_READ16_MEMBER(porta_r) { return m_porta_in(); } DECLARE_READ16_MEMBER(portb_r) { return m_portb_in(); } DECLARE_READ16_MEMBER(portc_r) { return m_portc_in(); } diff --git a/src/devices/machine/spg2xx_video.cpp b/src/devices/machine/spg2xx_video.cpp index 89739adcb00..b9f6b3633c1 100644 --- a/src/devices/machine/spg2xx_video.cpp +++ b/src/devices/machine/spg2xx_video.cpp @@ -28,21 +28,23 @@ DEFINE_DEVICE_TYPE(SPG24X_VIDEO, spg24x_video_device, "spg24x_video", "SPG240-se #define VIDEO_IRQ_ENABLE m_video_regs[0x62] #define VIDEO_IRQ_STATUS m_video_regs[0x63] -spg2xx_video_device::spg2xx_video_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) - : device_t(mconfig, type, tag, owner, clock) - , m_sprlimit_read_cb(*this) - , m_rowscrolloffset_read_cb(*this) - , m_cpu(*this, finder_base::DUMMY_TAG) - , m_screen(*this, finder_base::DUMMY_TAG) - , m_scrollram(*this, "scrollram") - , m_paletteram(*this, "paletteram") - , m_spriteram(*this, "spriteram") - , m_video_irq_cb(*this) +spg2xx_video_device::spg2xx_video_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : + device_t(mconfig, type, tag, owner, clock), + m_guny_in(*this), + m_gunx_in(*this), + m_sprlimit_read_cb(*this), + m_rowscrolloffset_read_cb(*this), + m_cpu(*this, finder_base::DUMMY_TAG), + m_screen(*this, finder_base::DUMMY_TAG), + m_scrollram(*this, "scrollram"), + m_paletteram(*this, "paletteram"), + m_spriteram(*this, "spriteram"), + m_video_irq_cb(*this) { } -spg24x_video_device::spg24x_video_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) - : spg2xx_video_device(mconfig, SPG24X_VIDEO, tag, owner, clock) +spg24x_video_device::spg24x_video_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : + spg2xx_video_device(mconfig, SPG24X_VIDEO, tag, owner, clock) { } @@ -59,6 +61,9 @@ void spg2xx_video_device::device_start() (m_rgb5_to_rgb8[(i >> 0) & 0x1f] << 0); } + m_guny_in.resolve_safe(0); + m_gunx_in.resolve_safe(0); + m_screenpos_timer = timer_alloc(TIMER_SCREENPOS); m_screenpos_timer->adjust(attotime::never); @@ -635,6 +640,14 @@ READ16_MEMBER(spg2xx_video_device::video_r) LOGMASKED(LOG_VLINES, "video_r: Current Line: %04x\n", m_screen->vpos()); return m_screen->vpos(); + case 0x3e: // Light Pen Y Position + LOGMASKED(LOG_PPU_READS, "video_r: Light Pen Y / Lightgun Y = %04x\n"); + return m_guny_in(); + + case 0x3f: // Light Pen X Position + LOGMASKED(LOG_PPU_READS, "video_r: Light Pen X / Lightgun X = %04x\n"); + return m_gunx_in(); + case 0x62: // Video IRQ Enable LOGMASKED(LOG_IRQS, "video_r: Video IRQ Enable: %04x\n", VIDEO_IRQ_ENABLE); return VIDEO_IRQ_ENABLE; @@ -773,11 +786,11 @@ WRITE16_MEMBER(spg2xx_video_device::video_w) } case 0x3e: // Light Pen Y Position - LOGMASKED(LOG_PPU_WRITES, "video_w: Light Pen Y (read only) = %04x\n", data & 0x01ff); + LOGMASKED(LOG_PPU_WRITES, "video_w: Light Pen Y / Lightgun Y (read only) = %04x\n", data & 0x01ff); break; - case 0x3f: // Light Pen YXPosition - LOGMASKED(LOG_PPU_WRITES, "video_w: Light Pen X (read only) = %04x\n", data & 0x01ff); + case 0x3f: // Light Pen X Position + LOGMASKED(LOG_PPU_WRITES, "video_w: Light Pen X / Lightgun X (read only) = %04x\n", data & 0x01ff); break; case 0x42: // Sprite Control @@ -787,7 +800,7 @@ WRITE16_MEMBER(spg2xx_video_device::video_w) case 0x62: // Video IRQ Enable { - LOGMASKED(LOG_IRQS, "video_w: Video IRQ Enable = %04x (DMA:%d, Timing:%d, Blanking:%d)\n", data & 0x0007, BIT(data, 2), BIT(data, 1), BIT(data, 0)); + LOGMASKED(LOG_IRQS, "video_w: Video IRQ Enable = %04x (DMA:%d, Timing:%d, Blanking:%d)\n", data, BIT(data, 2), BIT(data, 1), BIT(data, 0)); const uint16_t old = VIDEO_IRQ_ENABLE & VIDEO_IRQ_STATUS; VIDEO_IRQ_ENABLE = data & 0x0007; const uint16_t changed = old ^ (VIDEO_IRQ_ENABLE & VIDEO_IRQ_STATUS); diff --git a/src/devices/machine/spg2xx_video.h b/src/devices/machine/spg2xx_video.h index 95bdd22cafe..699f20e6d38 100644 --- a/src/devices/machine/spg2xx_video.h +++ b/src/devices/machine/spg2xx_video.h @@ -19,6 +19,10 @@ class spg2xx_video_device : public device_t public: spg2xx_video_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + auto guny_in() { return m_guny_in.bind(); } + auto gunx_in() { return m_gunx_in.bind(); } + + uint32_t screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); DECLARE_WRITE_LINE_MEMBER(vblank); @@ -32,6 +36,9 @@ public: protected: + devcb_read16 m_guny_in; + devcb_read16 m_gunx_in; + enum { PAGE_ENABLE_MASK = 0x0008, diff --git a/src/mame/drivers/nes_vt.cpp b/src/mame/drivers/nes_vt.cpp index ac4cec921bf..8a895b3acee 100644 --- a/src/mame/drivers/nes_vt.cpp +++ b/src/mame/drivers/nes_vt.cpp @@ -2623,6 +2623,15 @@ ROM_START( zdog ) ROM_LOAD( "zdog.bin", 0x00000, 0x400000, CRC(5ed3485b) SHA1(5ab0e9370d4ed1535205deb0456878c4e400dd81) ) ROM_END +ROM_START( otrail ) + ROM_REGION( 0x2000000, "mainrom", 0 ) + ROM_LOAD( "g25q80cw.bin", 0x00000, 0x100000, CRC(b20a03ba) SHA1(c4ca8e590b07baaebed747537bc8f92e44bdd219) ) // dumped as QD25Q80C + + ROM_REGION( 0x200, "seeprom", 0 ) + ROM_LOAD( "t24c04a.bin", 0x000, 0x200, CRC(ce1fad6f) SHA1(82878996765739edba42042b6336460d5c8f8096) ) +ROM_END + + // earlier version of vdogdemo @@ -2814,3 +2823,6 @@ CONS( 2017, fapocket, 0, 0, nes_vt_fa, nes_vt_fa, nes_vt_dg_state, emp // Plays intro music but then crashes. same hardware as SY-88x but uses more features CONS( 2016, mog_m320, 0, 0, nes_vt_hh, nes_vt, nes_vt_hh_state, empty_init, "MOGIS", "MOGIS M320 246 in 1 Handheld", MACHINE_NOT_WORKING ) +CONS( 2017, otrail, 0, 0, nes_vt_dg, nes_vt, nes_vt_dg_state, empty_init, "Basic Fun", "The Oregon Trail", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_GRAPHICS ) + + diff --git a/src/mame/drivers/spg2xx.cpp b/src/mame/drivers/spg2xx.cpp index 84879259611..4f575458069 100644 --- a/src/mame/drivers/spg2xx.cpp +++ b/src/mame/drivers/spg2xx.cpp @@ -194,27 +194,43 @@ READ8_MEMBER(spg2xx_game_state::i2c_r) return 0x0000; } -READ16_MEMBER(spg2xx_game_state::rad_porta_r) +READ16_MEMBER(spg2xx_game_state::base_porta_r) { uint16_t data = m_io_p1->read(); logerror("%s: Port A Read: %04x\n", machine().describe_context(), data); return data; } -READ16_MEMBER(spg2xx_game_state::rad_portb_r) +READ16_MEMBER(spg2xx_game_state::base_portb_r) { uint16_t data = m_io_p2->read(); logerror("%s: Port B Read: %04x\n", machine().describe_context(), data); return data; } -READ16_MEMBER(spg2xx_game_state::rad_portc_r) +READ16_MEMBER(spg2xx_game_state::base_portc_r) { uint16_t data = m_io_p3->read(); logerror("%s: Port C Read: %04x\n", machine().describe_context(), data); return data; } +READ16_MEMBER(spg2xx_game_state::base_guny_r) +{ + uint16_t data = m_io_guny->read(); + logerror("%s: Gun Y Read: %04x\n", machine().describe_context(), data); + return data; +} + +READ16_MEMBER(spg2xx_game_state::base_gunx_r) +{ + uint16_t data = m_io_gunx->read(); + logerror("%s: Gun X Read: %04x\n", machine().describe_context(), data); + return data; +} + + + void spg2xx_game_state::mem_map_4m(address_map &map) { map(0x000000, 0x3fffff).bankr("cartbank"); @@ -742,11 +758,42 @@ static INPUT_PORTS_START( jjstrip ) PORT_BIT( 0xffff, IP_ACTIVE_HIGH, IPT_UNUSED ) INPUT_PORTS_END +static INPUT_PORTS_START( pballpup ) + PORT_START("GUNY") + PORT_BIT(0x0ff, 0x80, IPT_LIGHTGUN_Y) PORT_CROSSHAIR(Y, 256.0f / 240.0f, 0.0, 0) PORT_MINMAX(0x000, 0x0ff) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_PLAYER(1) + + PORT_START("GUNX") + PORT_BIT(0x1ff, 0x100, IPT_LIGHTGUN_X) PORT_CROSSHAIR(X, 512.0f / 320.0f, -0.03f, 0) PORT_MINMAX(0x000, 0x1ff) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_PLAYER(1) + + PORT_START("P1") + PORT_BIT( 0x003f, IP_ACTIVE_HIGH, IPT_UNUSED ) // lower bits are seeprom + PORT_BIT( 0x0040, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) + PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) + PORT_BIT( 0x0100, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) + PORT_BIT( 0x0200, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) + PORT_BIT( 0xfc00, IP_ACTIVE_HIGH, IPT_UNUSED ) + + PORT_START("P2") + PORT_BIT( 0xffff, IP_ACTIVE_HIGH, IPT_UNUSED ) + + PORT_START("P3") + PORT_BIT( 0x000f, IP_ACTIVE_HIGH, IPT_UNUSED ) + PORT_BIT( 0x0010, IP_ACTIVE_HIGH, IPT_BUTTON4 ) // pause + PORT_BIT( 0x0020, IP_ACTIVE_HIGH, IPT_BUTTON1 ) // trigger + PORT_BIT( 0x0040, IP_ACTIVE_HIGH, IPT_BUTTON2 ) // hide + PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_BUTTON3 ) // reload + PORT_BIT( 0xff00, IP_ACTIVE_HIGH, IPT_UNUSED ) +INPUT_PORTS_END + static INPUT_PORTS_START( tmntmutm ) + PORT_START("GUNY") + PORT_BIT(0x0ff, 0x80, IPT_LIGHTGUN_Y) PORT_CROSSHAIR(Y, 256.0f / 240.0f, 0.0, 0) PORT_MINMAX(0x000, 0x0ff) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_PLAYER(1) + + PORT_START("GUNX") + PORT_BIT(0x1ff, 0x100, IPT_LIGHTGUN_X) PORT_CROSSHAIR(X, 512.0f / 320.0f, -0.03f, 0) PORT_MINMAX(0x000, 0x1ff) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_PLAYER(1) + PORT_START("P1") - PORT_DIPNAME( 0x0001, 0x0001, "P1" ) - PORT_DIPSETTING( 0x0001, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) + PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_BUTTON1 ) // trigger PORT_DIPNAME( 0x0002, 0x0002, DEF_STR( Unknown ) ) PORT_DIPSETTING( 0x0002, DEF_STR( Off ) ) PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) @@ -991,9 +1038,66 @@ void spg2xx_game_state::tvsprt10(machine_config &config) spg2xx_base(config); - m_maincpu->porta_in().set(FUNC(spg2xx_game_state::rad_porta_r)); - m_maincpu->portb_in().set(FUNC(spg2xx_game_state::rad_portb_r)); - m_maincpu->portc_in().set(FUNC(spg2xx_game_state::rad_portc_r)); + m_maincpu->porta_in().set(FUNC(spg2xx_game_state::base_porta_r)); + m_maincpu->portb_in().set(FUNC(spg2xx_game_state::base_portb_r)); + m_maincpu->portc_in().set(FUNC(spg2xx_game_state::base_portc_r)); +} + + +void spg2xx_game_state::tmntmutm(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); + + spg2xx_base(config); + + m_maincpu->porta_in().set(FUNC(spg2xx_game_state::base_porta_r)); + m_maincpu->portb_in().set(FUNC(spg2xx_game_state::base_portb_r)); + m_maincpu->portc_in().set(FUNC(spg2xx_game_state::base_portc_r)); + + m_maincpu->guny_in().set(FUNC(spg2xx_game_state::base_guny_r)); + m_maincpu->gunx_in().set(FUNC(spg2xx_game_state::base_gunx_r)); +} + +READ16_MEMBER(spg2xx_game_pballpup_state::porta_r) +{ + uint16_t ret = m_io_p1->read() & 0xfff7; +// logerror("%s: spg2xx_game_pballpup_state::porta_r\n", machine().describe_context()); + ret |= m_eeprom->do_read() ? 0x8 : 0x0; + return ret; +} + +WRITE16_MEMBER(spg2xx_game_pballpup_state::porta_w) +{ + logerror("%s: spg2xx_game_pballpup_state::porta_w (%04x)\n", machine().describe_context(), data); + m_eeprom->di_write(BIT(data, 2)); + m_eeprom->cs_write(BIT(data, 0) ? ASSERT_LINE : CLEAR_LINE); + m_eeprom->clk_write(BIT(data, 1) ? ASSERT_LINE : CLEAR_LINE); + + // this can actually change bank from running code, because the code part in each bank is almost identical, just the data changes + switch_bank((data & 0x1000) ? 1 : 0); +} + + +void spg2xx_game_pballpup_state::pballpup(machine_config &config) +{ + SPG24X(config, m_maincpu, XTAL(27'000'000), m_screen); + m_maincpu->set_addrmap(AS_PROGRAM, &spg2xx_game_pballpup_state::mem_map_4m); + + spg2xx_base(config); + + m_maincpu->porta_in().set(FUNC(spg2xx_game_pballpup_state::porta_r)); + m_maincpu->portb_in().set(FUNC(spg2xx_game_pballpup_state::base_portb_r)); + m_maincpu->portc_in().set(FUNC(spg2xx_game_pballpup_state::base_portc_r)); + + m_maincpu->porta_out().set(FUNC(spg2xx_game_pballpup_state::porta_w)); + m_maincpu->portb_out().set(FUNC(spg2xx_game_pballpup_state::portb_w)); + m_maincpu->portc_out().set(FUNC(spg2xx_game_pballpup_state::portc_w)); + + m_maincpu->guny_in().set(FUNC(spg2xx_game_pballpup_state::base_guny_r)); + m_maincpu->gunx_in().set(FUNC(spg2xx_game_pballpup_state::base_gunx_r)); + + EEPROM_93C66_16BIT(config, m_eeprom); // type? } @@ -1012,9 +1116,9 @@ void spg2xx_game_state::rad_sktv(machine_config &config) spg2xx_base(config); - m_maincpu->porta_in().set(FUNC(spg2xx_game_state::rad_porta_r)); - m_maincpu->portb_in().set(FUNC(spg2xx_game_state::rad_portb_r)); - m_maincpu->portc_in().set(FUNC(spg2xx_game_state::rad_portc_r)); + m_maincpu->porta_in().set(FUNC(spg2xx_game_state::base_porta_r)); + m_maincpu->portb_in().set(FUNC(spg2xx_game_state::base_portb_r)); + m_maincpu->portc_in().set(FUNC(spg2xx_game_state::base_portc_r)); m_maincpu->i2c_w().set(FUNC(spg2xx_game_state::i2c_w)); m_maincpu->i2c_r().set(FUNC(spg2xx_game_state::i2c_r)); } @@ -1111,6 +1215,16 @@ ROM_START( tmntmutm ) ROM_LOAD16_WORD_SWAP( "tmntmutantsandmonsters_sst39vf3201_00bf235b.bin", 0x000000, 0x400000, CRC(93ab5ff7) SHA1(e78a5d380663d351ad9be5087ec8434d9be16ba7) ) ROM_END +ROM_START( pballpup ) + ROM_REGION( 0x1000000, "maincpu", ROMREGION_ERASE00 ) + ROM_LOAD16_WORD_SWAP( "paintballpoweredup.bin", 0x000000, 0x1000000, CRC(df6b77bf) SHA1(aa3c55025e80c7a943d7cfe313d16b53a574a285) ) +ROM_END + +ROM_START( swclone ) + ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) + ROM_LOAD16_WORD_SWAP( "swclone.bin", 0x000000, 0x800000, CRC(2c983509) SHA1(6138f21fe0b82a7121c4639b6833d4014d5aeb74) ) +ROM_END + void spg2xx_game_state::init_crc() { @@ -1175,8 +1289,12 @@ CONS( 200?, guitarss, 0, 0, abltenni, guitarss, spg2xx_ga CONS( 200?, jjstrip, 0, 0, tvsprt10, jjstrip, spg2xx_game_state, empty_init, "Shiggles Inc.", "Club Jenna Presents: Jenna Jameson's Strip Poker", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) -CONS( 2005, tmntmutm, 0, 0, tvsprt10, tmntmutm, spg2xx_game_state, empty_init, "Tech2Go / WayForward", "Teenage Mutant Ninja Turtles: Mutant and Monster Mayhem", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) +CONS( 2005, tmntmutm, 0, 0, tmntmutm, tmntmutm, spg2xx_game_state, empty_init, "Tech2Go / WayForward", "Teenage Mutant Ninja Turtles: Mutant and Monster Mayhem", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) + +CONS( 2006, pballpup, 0, 0, pballpup, pballpup, spg2xx_game_pballpup_state, empty_init, "Hasbro / Tiger Electronics", "Mission: Paintball Powered Up", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) +// some garbage sprites (not meant to be displayed at all) seeprom hookup (24LC08), gun fine-tuning etc. +CONS( 2008, swclone, 0, 0, pballpup, pballpup, spg2xx_game_pballpup_state, empty_init, "Hasbro / Tiger Electronics", "Star Wars - The Clone Wars", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) // Mattel games CONS( 2005, mattelcs, 0, 0, rad_skat, mattelcs, spg2xx_game_state, empty_init, "Mattel", "Mattel Classic Sports", MACHINE_IMPERFECT_SOUND ) diff --git a/src/mame/drivers/spg2xx_jakks.cpp b/src/mame/drivers/spg2xx_jakks.cpp index 5d8152c8b8e..611f49279c7 100644 --- a/src/mame/drivers/spg2xx_jakks.cpp +++ b/src/mame/drivers/spg2xx_jakks.cpp @@ -791,9 +791,9 @@ void jakks_gkr_state::jakks_tvtouch(machine_config &config) spg2xx_base(config); - m_maincpu->porta_in().set(FUNC(jakks_gkr_state::rad_porta_r)); - m_maincpu->portb_in().set(FUNC(jakks_gkr_state::rad_portb_r)); - m_maincpu->portc_in().set(FUNC(jakks_gkr_state::rad_portc_r)); + m_maincpu->porta_in().set(FUNC(jakks_gkr_state::base_porta_r)); + m_maincpu->portb_in().set(FUNC(jakks_gkr_state::base_portb_r)); + m_maincpu->portc_in().set(FUNC(jakks_gkr_state::base_portc_r)); } ROM_START( tvtchsw ) @@ -944,7 +944,7 @@ CONS( 2005, jak_wof, 0, 0, jakks_gkr_wf_i2c, jak_wf_i2c, jakks_gkr_state, emp // There is a 'Second Edition' version of Wheel of Fortune with a Gold case, GameKey port removed, and a '2' over the usual Game Key Ready logo, internals are different too, not Game-Key Ready CONS( 2004, jak_spdm, 0, 0, jakks_gkr_mv_i2c, jak_gkr_i2c, jakks_gkr_state, empty_init, "JAKKS Pacific Inc / Digital Eclipse", "Spider-Man (JAKKS Pacific TV Game, Game-Key Ready)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) // MV (1 key available) CONS( 2005, jak_pooh, 0, 0, jakks_gkr_wp, jak_pooh, jakks_gkr_state, empty_init, "JAKKS Pacific Inc / Backbone Entertainment", "Winnie the Pooh - Piglet's Special Day (JAKKS Pacific TV Game, Game-Key Ready)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) // WP (no game-keys released) -CONS( 2005, jak_care, 0, 0, jakks_gkr_cb, jak_care, jakks_gkr_state, empty_init, "JAKKS Pacific Inc / Backbone Entertainment", "Care Bears TV Games (JAKKS Pacific TV Game, Game-Key Ready)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) // CB (no game-keys released) +CONS( 2005, jak_care, 0, 0, jakks_gkr_cb, jak_care, jakks_gkr_state, empty_init, "JAKKS Pacific Inc / Backbone Entertainment", "Care Bears TV Games (JAKKS Pacific TV Game, Game-Key Ready)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) // CB (no game-keys released) // Some versions of the Shrek - Over the Hedge unit show the GameKey logo on startup (others don't) there is no evidence to suggest it was ever released with a GameKey port tho, and the internal PCB has no place for one on the versions we've seen (which show the logo) diff --git a/src/mame/drivers/spg2xx_mysprtch.cpp b/src/mame/drivers/spg2xx_mysprtch.cpp index 2560c024156..6505e99363f 100644 --- a/src/mame/drivers/spg2xx_mysprtch.cpp +++ b/src/mame/drivers/spg2xx_mysprtch.cpp @@ -312,9 +312,9 @@ void spg2xx_game_mysprtch_state::mysprtch(machine_config& config) spg2xx_base(config); - m_maincpu->porta_in().set(FUNC(spg2xx_game_mysprtch_state::rad_porta_r)); - m_maincpu->portb_in().set(FUNC(spg2xx_game_mysprtch_state::rad_portb_r)); - m_maincpu->portc_in().set(FUNC(spg2xx_game_mysprtch_state::rad_portc_r)); + m_maincpu->porta_in().set(FUNC(spg2xx_game_mysprtch_state::base_porta_r)); + m_maincpu->portb_in().set(FUNC(spg2xx_game_mysprtch_state::base_portb_r)); + m_maincpu->portc_in().set(FUNC(spg2xx_game_mysprtch_state::base_portc_r)); m_maincpu->porta_out().set(FUNC(spg2xx_game_mysprtch_state::porta_w)); diff --git a/src/mame/drivers/spg2xx_shredmjr.cpp b/src/mame/drivers/spg2xx_shredmjr.cpp index 09cbdfbc101..8c9fa3b7a09 100644 --- a/src/mame/drivers/spg2xx_shredmjr.cpp +++ b/src/mame/drivers/spg2xx_shredmjr.cpp @@ -185,8 +185,16 @@ ROM_START( shredmjr ) ROM_LOAD16_WORD_SWAP( "shredmasterjr.bin", 0x000000, 0x800000, CRC(95a6dcf1) SHA1(44893cd6ebe6b7f33a73817b72ae7be70c3126dc) ) ROM_END +ROM_START( guitarst ) + ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) + ROM_LOAD16_WORD_SWAP( "guitarstar_s29gl064m11tfir4_0001227e.bin", 0x000000, 0x800000, CRC(feaace47) SHA1(dd426bb4f03a16b1b96b63b4e0d79ea75097bf72) ) +ROM_END + + // 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. // ROM is glued on the underside and soldered to the PCB, very difficult to remove without damaging. -CONS( 2007, taikeegr, 0, 0, taikeegr, taikeegr, shredmjr_game_state, init_taikeegr, "TaiKee", "Rockstar Guitar / Guitar Rock (PAL)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) // bad music timings (too slow) -CONS( 2007, shredmjr, taikeegr, 0, shredmjr, taikeegr, shredmjr_game_state, init_taikeegr, "dreamGEAR", "Shredmaster Jr (NTSC)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) // bad music timings (too slow) +CONS( 2007, taikeegr, 0, 0, taikeegr, taikeegr, shredmjr_game_state, init_taikeegr, "TaiKee", "Rockstar Guitar / Guitar Rock (PAL)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) // timing not quite correct yet +CONS( 2007, shredmjr, taikeegr, 0, shredmjr, taikeegr, shredmjr_game_state, init_taikeegr, "dreamGEAR", "Shredmaster Jr (NTSC)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) // ^ + +CONS( 200?, guitarst, 0, 0, taikeegr, taikeegr, shredmjr_game_state, init_taikeegr, "Senario", "Guitar Star", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) // ^ diff --git a/src/mame/includes/spg2xx.h b/src/mame/includes/spg2xx.h index a04b47afa9d..a0190845a40 100644 --- a/src/mame/includes/spg2xx.h +++ b/src/mame/includes/spg2xx.h @@ -13,6 +13,7 @@ #include "screen.h" #include "softlist.h" #include "speaker.h" +#include "machine/eepromser.h" @@ -27,6 +28,8 @@ public: m_io_p1(*this, "P1"), m_io_p2(*this, "P2"), m_io_p3(*this, "P3"), + m_io_guny(*this, "GUNY"), + m_io_gunx(*this, "GUNX"), m_i2cmem(*this, "i2cmem") { } @@ -39,6 +42,8 @@ public: void abltenni(machine_config &config); void tvsprt10(machine_config &config); void guitarfv(machine_config &config); + void pballpup(machine_config &config); + void tmntmutm(machine_config &config); void init_crc(); @@ -58,10 +63,11 @@ protected: virtual DECLARE_WRITE16_MEMBER(portb_w); virtual DECLARE_WRITE16_MEMBER(portc_w); - DECLARE_READ16_MEMBER(rad_porta_r); - DECLARE_READ16_MEMBER(rad_portb_r); - DECLARE_READ16_MEMBER(rad_portc_r); - + DECLARE_READ16_MEMBER(base_porta_r); + DECLARE_READ16_MEMBER(base_portb_r); + DECLARE_READ16_MEMBER(base_portc_r); + DECLARE_READ16_MEMBER(base_guny_r); + DECLARE_READ16_MEMBER(base_gunx_r); required_device<spg2xx_device> m_maincpu; required_device<screen_device> m_screen; @@ -77,10 +83,29 @@ protected: required_ioport m_io_p1; optional_ioport m_io_p2; optional_ioport m_io_p3; + optional_ioport m_io_guny; + optional_ioport m_io_gunx; optional_device<i2cmem_device> m_i2cmem; }; +class spg2xx_game_pballpup_state : public spg2xx_game_state +{ +public: + spg2xx_game_pballpup_state(const machine_config &mconfig, device_type type, const char *tag) : + spg2xx_game_state(mconfig, type, tag), + m_eeprom(*this, "eeprom") + { } + + void pballpup(machine_config &config); + +private: + DECLARE_READ16_MEMBER(porta_r); + virtual DECLARE_WRITE16_MEMBER(porta_w) override; + + required_device<eeprom_serial_93cxx_device> m_eeprom; +}; + #endif // MAME_INCLUDES_SPG2XX_H diff --git a/src/mame/mame.lst b/src/mame/mame.lst index 8e47c64755d..4caba8e3554 100644 --- a/src/mame/mame.lst +++ b/src/mame/mame.lst @@ -31398,6 +31398,7 @@ fcpocket mog_m320 fapocket zdog +otrail @source:vt1682.cpp ii8in1 @@ -37027,6 +37028,8 @@ guitarfv guitarss jjstrip tmntmutm +pballpup +swclone @source:spg2xx_dreamlife.cpp dreamlif // @@ -37093,6 +37096,7 @@ sentx6pd @source:spg2xx_shredmjr.cpp taikeegr // shredmjr // +guitarst @source:spg2xx_smarttv.cpp smartvad |