mirror of
https://github.com/holub/mame
synced 2025-04-23 00:39:36 +03:00
New working machines
-------------------- Dream Life Superstar (Version 0.3, Mar 16 2007) [Sean Riddle, David Haywood, Ryan Holtz] -spg2xx_io: Added watchdog timer support. [Ryan Holtz] -spg2xx: Removed nodrc flag from tvsprt10 now that the DRC supports JVS/JVC, nw
This commit is contained in:
parent
fe2a7d7607
commit
100117c458
@ -118,6 +118,9 @@ void spg2xx_io_device::device_start()
|
||||
m_rng_timer = timer_alloc(TIMER_RNG);
|
||||
m_rng_timer->adjust(attotime::never);
|
||||
|
||||
m_watchdog_timer = timer_alloc(TIMER_WATCHDOG);
|
||||
m_watchdog_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));
|
||||
@ -765,7 +768,15 @@ WRITE16_MEMBER(spg2xx_io_device::io_w)
|
||||
, data, BIT(data, 15), BIT(data, 14), s_sysclk[(data >> 12) & 3], BIT(data, 11), BIT(data, 9), BIT(data, 8));
|
||||
LOGMASKED(LOG_IO_WRITES, " LVDEn:%d, LVDVoltSel:%s, 32kHzDisable:%d, StrWkMode:%s, VDACDisable:%d, ADACDisable:%d, ADACOutDisable:%d)\n"
|
||||
, BIT(data, 7), s_lvd_voltage[(data >> 5) & 3], BIT(data, 4), s_weak_strong[BIT(data, 3)], BIT(data, 2), BIT(data, 1), BIT(data, 0));
|
||||
const uint16_t old = m_io_regs[offset];
|
||||
m_io_regs[offset] = data;
|
||||
if (BIT(old, 15) != BIT(data, 15))
|
||||
{
|
||||
if (BIT(data, 15))
|
||||
m_watchdog_timer->adjust(attotime::from_msec(750));
|
||||
else
|
||||
m_watchdog_timer->adjust(attotime::never);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
@ -832,6 +843,10 @@ WRITE16_MEMBER(spg2xx_io_device::io_w)
|
||||
|
||||
case 0x24: // Watchdog
|
||||
LOGMASKED(LOG_WATCHDOG, "%s: io_w: Watchdog Pet = %04x\n", machine().describe_context(), data);
|
||||
if (data == 0x55aa && BIT(m_io_regs[0x20], 15))
|
||||
{
|
||||
m_watchdog_timer->adjust(attotime::from_msec(750));
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x25: // ADC Control
|
||||
@ -1164,6 +1179,11 @@ void spg2xx_io_device::device_timer(emu_timer &timer, device_timer_id id, int pa
|
||||
clock_rng(0);
|
||||
clock_rng(1);
|
||||
break;
|
||||
|
||||
case TIMER_WATCHDOG:
|
||||
m_cpu->set_input_line(INPUT_LINE_RESET, ASSERT_LINE);
|
||||
m_cpu->set_input_line(INPUT_LINE_RESET, CLEAR_LINE);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -61,13 +61,13 @@ protected:
|
||||
|
||||
static const device_timer_id TIMER_TMB1 = 0;
|
||||
static const device_timer_id TIMER_TMB2 = 1;
|
||||
|
||||
static const device_timer_id TIMER_UART_TX = 4;
|
||||
static const device_timer_id TIMER_UART_RX = 5;
|
||||
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;
|
||||
static const device_timer_id TIMER_WATCHDOG = 10;
|
||||
|
||||
virtual void device_start() override;
|
||||
virtual void device_reset() override;
|
||||
@ -140,6 +140,7 @@ protected:
|
||||
emu_timer *m_uart_rx_timer;
|
||||
|
||||
emu_timer *m_rng_timer;
|
||||
emu_timer *m_watchdog_timer;
|
||||
|
||||
uint8_t m_sio_bits_remaining;
|
||||
bool m_sio_writing;
|
||||
|
@ -955,127 +955,13 @@ static INPUT_PORTS_START( dreamlss )
|
||||
PORT_BIT( 0x0040, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_NAME("B")
|
||||
PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_BUTTON4 ) PORT_NAME("C")
|
||||
PORT_BIT( 0x0100, IP_ACTIVE_HIGH, IPT_SERVICE ) PORT_NAME("Test (Debug)") // not externally connected on unit
|
||||
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( 0xfe00, IP_ACTIVE_HIGH, IPT_UNUSED )
|
||||
|
||||
PORT_START("P2")
|
||||
PORT_DIPNAME( 0x0001, 0x0000, "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")
|
||||
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 ) )
|
||||
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 )
|
||||
INPUT_PORTS_END
|
||||
|
||||
|
||||
@ -1172,7 +1058,6 @@ void spg2xx_game_state::tvsprt10(machine_config &config)
|
||||
{
|
||||
SPG24X(config, m_maincpu, XTAL(27'000'000), m_screen);
|
||||
m_maincpu->set_addrmap(AS_PROGRAM, &spg2xx_game_state::mem_map_2m);
|
||||
m_maincpu->set_force_no_drc(true); // uses JVS opcode, not implemented in recompiler
|
||||
|
||||
spg2xx_base(config);
|
||||
|
||||
@ -1261,18 +1146,20 @@ WRITE16_MEMBER(spg2xx_game_dreamlss_state::porta_w)
|
||||
READ16_MEMBER(spg2xx_game_dreamlss_state::portb_r)
|
||||
{
|
||||
uint16_t ret = m_portb_data & 0xfffe;
|
||||
//ret |= m_i2cmem->read_sda() ? 0x1: 0x0;
|
||||
ret |= m_i2cmem->read_sda() ? 0x1: 0x0;
|
||||
|
||||
logerror("%s: spg2xx_game_dreamlss_state::portb_r\n", machine().describe_context());
|
||||
//logerror("%s: spg2xx_game_dreamlss_state::portb_r (%04x)\n", machine().describe_context(), ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
WRITE16_MEMBER(spg2xx_game_dreamlss_state::portb_w)
|
||||
{
|
||||
logerror("%s: spg2xx_game_dreamlss_state::portb_w (%04x)\n", machine().describe_context(), data);
|
||||
//logerror("%s: spg2xx_game_dreamlss_state::portb_w (%04x & %04x)\n", machine().describe_context(), data, mem_mask);
|
||||
|
||||
//m_i2cmem->write_scl(!(BIT(data, 1)));
|
||||
//m_i2cmem->write_sda(!(BIT(data, 0)));
|
||||
if (BIT(mem_mask, 1))
|
||||
m_i2cmem->write_scl(BIT(data, 1));
|
||||
if (BIT(mem_mask, 0))
|
||||
m_i2cmem->write_sda(BIT(data, 0));
|
||||
|
||||
m_portb_data = data;
|
||||
}
|
||||
@ -1471,8 +1358,8 @@ void spg2xx_game_state::init_tvsprt10()
|
||||
void spg2xx_game_state::init_dreamlss()
|
||||
{
|
||||
// temp hack! skip I2CMEM loading / test!
|
||||
uint16_t* rom = (uint16_t*)memregion("maincpu")->base();
|
||||
rom[0x4bb37] = 0x9640;
|
||||
//uint16_t* rom = (uint16_t*)memregion("maincpu")->base();
|
||||
//rom[0x4bb37] = 0x9640;
|
||||
}
|
||||
|
||||
|
||||
@ -1503,7 +1390,7 @@ CONS( 2005, tmntmutm, 0, 0, tmntmutm, tmntmutm, spg2xx_gam
|
||||
|
||||
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 )
|
||||
|
||||
CONS( 2007, dreamlss, 0, 0, dreamlss, dreamlss, spg2xx_game_dreamlss_state, init_dreamlss, "Hasbro / Tiger Electronics", "Dream Life Superstar (Version 0.3, Mar 16 2007)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS )
|
||||
CONS( 2007, dreamlss, 0, 0, dreamlss, dreamlss, spg2xx_game_dreamlss_state, init_dreamlss, "Hasbro / Tiger Electronics", "Dream Life Superstar (Version 0.3, Mar 16 2007)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS )
|
||||
|
||||
|
||||
// some garbage sprites (not meant to be displayed at all) seeprom hookup (24LC08), gun fine-tuning etc.
|
||||
|
Loading…
Reference in New Issue
Block a user