Skip to content

Commit

Permalink
gameplan: possible fix for piratetr lockup
Browse files Browse the repository at this point in the history
  • Loading branch information
happppp committed Jul 22, 2023
1 parent 797be22 commit 55c1c18
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
22 changes: 21 additions & 1 deletion src/mame/gameplan/gameplan.cpp
Expand Up @@ -64,13 +64,21 @@ Address Dir Data Name Description
Megattack
Pot Of Gold (Leprechaun)
- Leprechaun and Pirate Treasure were made for the Moppet Video arcade series
(Enter-Tech arcade cabs aimed at younger children). That's why the games are
so easy.
TODO:
- The board has, instead of a watchdog, a timed reset that has to be disabled
on startup. The disable line is tied to CA2 of VIA2, but I don't see writes
to that pin in the log. Missing support in machine/6522via.cpp?
- Investigate and document the 8910 dip switches
- Fix the input ports of Kaos
- Some of the games do unmapped reads all over the place, probably just bad
programming. One of these is piratetr, and it will lock up eventually when
reading from VIA1. It's possible to fix with a simple wire mod/pcb cut trace,
like done with piratetr_main_map. Let's assume they did something like that.
****************************************************************************/

Expand Down Expand Up @@ -349,6 +357,12 @@ void gameplan_state::gameplan_main_map(address_map &map)
map(0x8000, 0xffff).rom();
}

void gameplan_state::piratetr_main_map(address_map &map)
{
gameplan_main_map(map);
map(0x2010, 0x201f).mirror(0x07e0).unmaprw(); // A4, see TODO
}



/*************************************
Expand Down Expand Up @@ -1174,6 +1188,12 @@ void gameplan_state::leprechn(machine_config &config)
m_via[0]->writepb_handler().set(FUNC(gameplan_state::video_command_w)).rshift(3);
}

void gameplan_state::piratetr(machine_config &config)
{
leprechn(config);
m_maincpu->set_addrmap(AS_PROGRAM, &gameplan_state::piratetr_main_map);
}



/*************************************
Expand Down Expand Up @@ -1336,4 +1356,4 @@ GAME( 1981, kaos, 0, gameplan, kaos, gameplan_state, empty_init
GAME( 1982, leprechn, 0, leprechn, leprechn, gameplan_state, empty_init, ROT0, "Pacific Polytechnical Corp.", "Leprechaun (set 1)", MACHINE_SUPPORTS_SAVE )
GAME( 1982, leprechna, leprechn, leprechn, leprechna, gameplan_state, empty_init, ROT0, "Pacific Polytechnical Corp. (Tong Electronic license)", "Leprechaun (set 2)", MACHINE_SUPPORTS_SAVE )
GAME( 1982, potogold, leprechn, leprechn, leprechn, gameplan_state, empty_init, ROT0, "Pacific Polytechnical Corp. (Game Plan license)", "Pot of Gold", MACHINE_SUPPORTS_SAVE )
GAME( 1982, piratetr, 0, leprechn, piratetr, gameplan_state, empty_init, ROT0, "Pacific Polytechnical Corp. (Tong Electronic license)", "Pirate Treasure", MACHINE_SUPPORTS_SAVE )
GAME( 1982, piratetr, 0, piratetr, piratetr, gameplan_state, empty_init, ROT0, "Pacific Polytechnical Corp. (Tong Electronic license)", "Pirate Treasure", MACHINE_SUPPORTS_SAVE )
2 changes: 2 additions & 0 deletions src/mame/gameplan/gameplan.h
Expand Up @@ -35,6 +35,7 @@ class gameplan_state : public driver_device
void gameplan(machine_config &config);
void gameplan_video(machine_config &config);
void leprechn(machine_config &config);
void piratetr(machine_config &config);

protected:
virtual void machine_start() override;
Expand Down Expand Up @@ -91,4 +92,5 @@ class gameplan_state : public driver_device
void gameplan_main_map(address_map &map);
void gameplan_audio_map(address_map &map);
void leprechn_audio_map(address_map &map);
void piratetr_main_map(address_map &map);
};

0 comments on commit 55c1c18

Please sign in to comment.