summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/drivers/spg2xx_pdc.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/drivers/spg2xx_pdc.cpp')
-rw-r--r--src/mame/drivers/spg2xx_pdc.cpp38
1 files changed, 27 insertions, 11 deletions
diff --git a/src/mame/drivers/spg2xx_pdc.cpp b/src/mame/drivers/spg2xx_pdc.cpp
index 52cd17de569..37bd32d212d 100644
--- a/src/mame/drivers/spg2xx_pdc.cpp
+++ b/src/mame/drivers/spg2xx_pdc.cpp
@@ -7,16 +7,20 @@ class spg2xx_pdc100_game_state : public spg2xx_game_state
{
public:
spg2xx_pdc100_game_state(const machine_config &mconfig, device_type type, const char *tag) :
- spg2xx_game_state(mconfig, type, tag)
+ spg2xx_game_state(mconfig, type, tag),
+ m_numbanks(-1)
{ }
void pdc100(machine_config& config);
protected:
- //virtual void machine_start() override;
+ virtual void machine_start() override;
virtual void machine_reset() override;
virtual DECLARE_WRITE16_MEMBER(porta_w) override;
+
+private:
+ int m_numbanks;
};
@@ -43,20 +47,25 @@ static INPUT_PORTS_START( pdc100 )
PORT_BIT( 0xffff, IP_ACTIVE_HIGH, IPT_UNKNOWN )
INPUT_PORTS_END
+
+void spg2xx_pdc100_game_state::machine_start()
+{
+ spg2xx_game_state::machine_start();
+ m_numbanks = memregion("maincpu")->bytes() / 0x800000;
+}
+
void spg2xx_pdc100_game_state::machine_reset()
{
m_current_bank = -1;
- switch_bank(7); // must boot from upper bank
+ switch_bank(m_numbanks - 1); // pdc100 must boot from upper bank
m_maincpu->reset();
}
WRITE16_MEMBER(spg2xx_pdc100_game_state::porta_w)
{
- //logerror("%s: porta_w %04x\n", machine().describe_context(), data);
-
- // simply writes 0000 at times during bootup while initializing stuff, which causes an invalid bankswitch mid-code execution
+ // pdc100 simply writes 0000 at times during bootup while initializing stuff, which causes an invalid bankswitch mid-code execution
if (data & 0xff00)
- switch_bank(data & 0x0007);
+ switch_bank(data & (m_numbanks - 1));
}
@@ -70,10 +79,16 @@ void spg2xx_pdc100_game_state::pdc100(machine_config &config)
}
ROM_START( pdc100 )
- ROM_REGION( 0x8000000, "maincpu", ROMREGION_ERASE00 )
+ ROM_REGION( 0x4000000, "maincpu", ROMREGION_ERASE00 )
// only 1st half of this is used "Jumper resistor (0 ohm) that short A25 to ground"
// 2nd half just contains what seems to be random garbage
- ROM_LOAD16_WORD_SWAP( "pdc100.bin", 0x000000, 0x8000000, CRC(57285b49) SHA1(cfb4be7877ec263d24063a004c56985db5c0f4e2) )
+ ROM_LOAD16_WORD_SWAP( "pdc100.bin", 0x000000, 0x4000000, CRC(57285b49) SHA1(cfb4be7877ec263d24063a004c56985db5c0f4e2) )
+ ROM_IGNORE(0x4000000)
+ROM_END
+
+ROM_START( tmntpdc )
+ ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 )
+ ROM_LOAD16_WORD_SWAP( "pdc_turtles.bin", 0x000000, 0x800000, CRC(ee9e70a3) SHA1(7620f1b7aeaec8032faa8eb7552f775e8d6d14ba) )
ROM_END
@@ -81,11 +96,12 @@ ROM_END
// "Jo Ma 2" shows "Licensed by Mitchell Corporation" (Mitchell made the original Puzzloop on which this style of game is based) Videos of the original Jo Ma show it lacking this text.
// Other known units
-// PDC Teenage Mutant Ninja Turtles
// PDC Dora the Explorer
// PDC 30
// PDC 40
// PDC 200
// This was dumped from an Anncia branded unit, although there's no ingame branding, so ROM is probably the same for all PDC100 units
-CONS( 2008, pdc100, 0, 0, pdc100, pdc100, spg2xx_pdc100_game_state, empty_init, "Conny", "PDC100 - Pocket Dream Console", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS )
+CONS( 2008, pdc100, 0, 0, pdc100, pdc100, spg2xx_pdc100_game_state, empty_init, "Conny", "PDC100 - Pocket Dream Console", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS )
+
+CONS( 2013, tmntpdc, 0, 0, pdc100, pdc100, spg2xx_pdc100_game_state, empty_init, "Conny / VideoJet", "Teenage Mutant Ninja Turtles - Pocket Dream Console (France)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS )