Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/mame/mame.lst
Original file line number Diff line number Diff line change
Expand Up @@ -44030,6 +44030,7 @@ shine

@source:skeleton/shoken_md06.cpp
petitlot
polarstar2

@source:skeleton/si5500.cpp
si5500
Expand Down
70 changes: 63 additions & 7 deletions src/mame/skeleton/shoken_md06.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,21 @@ push-button (reset?)
unpopulates spaces marked for MSM9810B and ROM

DIP sheets are available

ポーラスター2 (Polar Star 2) by Showa Giken (Shoken)
'MB-01 MAIN-B' PCB:
KL5C80A12CFP CPU
RTC62423 RTC
push-button (reset?)
16.00000 MHz XTAL
*/


#include "emu.h"

#include "cpu/z80/kl5c80a12.h"
#include "machine/msm6242.h"
#include "sound/okim9810.h"

#include "emupal.h"
#include "screen.h"
Expand All @@ -42,27 +50,39 @@ class shoken_md06_state : public driver_device
{ }

void petitlot(machine_config &config) ATTR_COLD;
void polarstar(machine_config &config) ATTR_COLD;

private:
required_device<kl5c80a12_device> m_maincpu;

void program_map(address_map &map) ATTR_COLD;
void io_map(address_map &map) ATTR_COLD;
void sound_io_map(address_map &map) ATTR_COLD;
};


void shoken_md06_state::program_map(address_map &map)
{
map(0x00000, 0x04fff).rom();
map(0x00000, 0x08fff).rom();
map(0x09000, 0x0cfff).ram();
map(0xe0000, 0xe3fff).ram();
map(0xfcc00, 0xfffff).ram();
}

void shoken_md06_state::io_map(address_map &map)
{
map.global_mask(0xff);
map.unmap_value_high();
map(0x40, 0x40).nopw();
map(0x80, 0x80).noprw();
}

void shoken_md06_state::sound_io_map(address_map &map)
{
map.global_mask(0xff);
map(0x3b, 0x3b).rw("oki", FUNC(okim9810_device::read), FUNC(okim9810_device::write));
map(0x40, 0x40).nopw();
map(0x80, 0x80).noprw();
}

static INPUT_PORTS_START( petitlot )
PORT_START("IN0")
Expand Down Expand Up @@ -129,6 +149,28 @@ static INPUT_PORTS_START( petitlot )
// TODO: 5 10-position rotary switches
INPUT_PORTS_END

static INPUT_PORTS_START( polarstar )
PORT_START("IN0")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )

PORT_START("IN1")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
INPUT_PORTS_END


void shoken_md06_state::petitlot(machine_config &config)
{
Expand All @@ -138,20 +180,34 @@ void shoken_md06_state::petitlot(machine_config &config)
m_maincpu->set_addrmap(AS_IO, &shoken_md06_state::io_map);

RTC62423(config, "rtc", 0);
}

void shoken_md06_state::polarstar(machine_config &config)
{
petitlot(config);
m_maincpu->set_addrmap(AS_IO, &shoken_md06_state::sound_io_map);

// sound hardware
SPEAKER(config, "mono").front_center();

// TODO: sound related ICs aren't present?
okim9810_device &oki(OKIM9810(config, "oki", 16_MHz_XTAL / 12));
oki.add_route(ALL_OUTPUTS, "mono", 1.0); //divider guessed
}


ROM_START( petitlot )
ROM_REGION( 0x10000, "maincpu", 0 )
ROM_LOAD( "md06_ver4_1.ic6", 0x00000, 0x10000, CRC(ebc81f10) SHA1(28ac52aeadfbf792da95c01b16fb88f7a5eb1d4e) ) // 1xxxxxxxxxxxxxxx = 0xFF
ROM_LOAD( "md06_ver4_1.ic6", 0x00000, 0x10000, CRC(ebc81f10) SHA1(28ac52aeadfbf792da95c01b16fb88f7a5eb1d4e) ) // 1xxxxxxxxxxxxxxx = 0xff
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is romcmp's output in a comment, it isn't subject to MAME's preference for lowercase hex.

ROM_END

} // anonymous namespace
ROM_START( polarstar2 )
ROM_REGION( 0x20000, "maincpu", 0 )
ROM_LOAD( "polarstar2_mk04_ver.4.5.ic8", 0x00000, 0x20000, CRC(13a7b9dc) SHA1(64aa5591aa676cbb9e00327ac62209b6854c4416) )

ROM_REGION( 0x100000, "oki", 0 )
ROM_LOAD( "polarstar_mb01_sound-b.ic35", 0x00000, 0x100000, CRC(606ae52c) SHA1(6a60f4b1c6ac893cafa373c8af7d2c826304f152) )
ROM_END

} // anonymous namespace

GAME( 2001, petitlot, 0, petitlot, petitlot, shoken_md06_state, empty_init, ROT0, "Shoken", "Petit Lot (ver. 4.1)", MACHINE_NO_SOUND | MACHINE_NOT_WORKING | MACHINE_MECHANICAL )
GAME( 2001, petitlot, 0, petitlot, petitlot, shoken_md06_state, empty_init, ROT0, "Shoken", "Petit Lot (ver. 4.1)", MACHINE_NO_SOUND | MACHINE_NOT_WORKING | MACHINE_MECHANICAL )
GAME( 2004, polarstar2, 0, polarstar, polarstar, shoken_md06_state, empty_init, ROT0, "Shoken", "Polar Star 2 (ver. 4.5)", MACHINE_NO_SOUND | MACHINE_NOT_WORKING | MACHINE_MECHANICAL )
Loading