Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a Skeleton driver For Unknown 6 Ball Pinball Gambling #12648

Draft
wants to merge 22 commits into
base: master
Choose a base branch
from
Draft
Changes from 3 commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
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
135 changes: 135 additions & 0 deletions src/mame/misc/pearlorient.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,135 @@
// license:GPL-2.0+
// copyright-holders:flama12333
/*************************************************************************
there are second mcu. if is not present will marked error 10.

Notes:
src: Chang yu website
Pearl in the East 6 ball version

New feature: buy a 6th ball toup the odds.

src: for reference https://youtu.be/GszrVAWQ7d0

5 ball Version. Oriental Pearl
src for reference: https://youtu.be/XEaOan6NWKQ?t=18

*/
#include "emu.h"
#include "cpu/mcs51/mcs51.h"
#include "machine/i8279.h"
#include "machine/i8255.h"
#include "sound/ay8910.h"
#include "sound/ymopl.h"
#include "sound/okim6295.h"
#include "speaker.h"

namespace {

class pearlorient_state : public driver_device
{
public:
pearlorient_state(const machine_config &mconfig, device_type type, const char *tag)
: driver_device(mconfig, type, tag)
{ }

void pearlorient(machine_config &config);

private:
void io_map(address_map &map);
void program_map(address_map &map);
virtual void machine_start() override;


};

static INPUT_PORTS_START( pearlorient )
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 )

PORT_START("DSW0")
PORT_DIPUNKNOWN_DIPLOC(0x01, 0x01, "SW0:1")
PORT_DIPUNKNOWN_DIPLOC(0x02, 0x02, "SW0:2")
PORT_DIPUNKNOWN_DIPLOC(0x04, 0x04, "SW0:3")
PORT_DIPUNKNOWN_DIPLOC(0x08, 0x08, "SW0:4")
PORT_DIPUNKNOWN_DIPLOC(0x10, 0x10, "SW0:5")
PORT_DIPUNKNOWN_DIPLOC(0x20, 0x20, "SW0:6")
PORT_DIPUNKNOWN_DIPLOC(0x40, 0x40, "SW0:7")
PORT_DIPUNKNOWN_DIPLOC(0x80, 0x80, "SW0:8")

PORT_START("DSW1")
PORT_DIPUNKNOWN_DIPLOC(0x01, 0x01, "SW1:1")
PORT_DIPUNKNOWN_DIPLOC(0x02, 0x02, "SW1:2")
PORT_DIPUNKNOWN_DIPLOC(0x04, 0x04, "SW1:3")
PORT_DIPUNKNOWN_DIPLOC(0x08, 0x08, "SW1:4")
PORT_DIPUNKNOWN_DIPLOC(0x10, 0x10, "SW1:5")
PORT_DIPUNKNOWN_DIPLOC(0x20, 0x20, "SW1:6")
PORT_DIPUNKNOWN_DIPLOC(0x40, 0x40, "SW1:7")
PORT_DIPUNKNOWN_DIPLOC(0x80, 0x80, "SW1:8")

INPUT_PORTS_END


void pearlorient_state::program_map(address_map &map)
{
map(0x0000, 0xffff).rom();
}
// todo Where opll and adpcm are mapped?
void pearlorient_state::io_map(address_map &map)
{
map(0xfa00, 0xfa01).rw("kdc", FUNC(i8279_device::read), FUNC(i8279_device::write));
map(0xfb02, 0xfb03).w("psg", FUNC(ay8910_device::address_data_w));

}
void pearlorient_state::machine_start()
{
}

void pearlorient_state::pearlorient(machine_config &config)
{
/* basic machine hardware */
i8052_device &maincpu(I8052(config, "maincpu", XTAL(10'738'000)));
maincpu.set_addrmap(AS_PROGRAM, &pearlorient_state::program_map);
maincpu.set_addrmap(AS_IO, &pearlorient_state::io_map);
/* Keyboard & display interface */
I8279(config, "kdc", XTAL(10'738'000) / 6);
/* sound hardware */
SPEAKER(config, "mono").front_center();
ay8910_device &psg(AY8910(config, "psg", XTAL(10'738'000) / 6)); // Divider not verified
psg.add_route(ALL_OUTPUTS, "mono", 1.0);
ym2413_device &opll(YM2413(config, "opll", 3.579545_MHz_XTAL));
opll.add_route(ALL_OUTPUTS, "mono", 1.0);
OKIM6295(config, "oki", XTAL(10'738'000) / 6, okim6295_device::PIN7_HIGH).add_route(ALL_OUTPUTS, "mono", 1.0); // Clock frequency & pin 7 not verified
}

ROM_START( pearlorient )
ROM_REGION( 0x10000, "maincpu", 0 )
ROM_LOAD( "w27c512.bin", 0x00000, 0x10000, CRC(8D3D1E91) SHA1(b80907df0878057a1ded8b56225059e06382b9d6) ) // main program
ROM_REGION( 0x1000, "mcu", 0 )
ROM_LOAD( "at89s51.bin", 0x0000, 0x1000, NO_DUMP ) // mcu. protection
ROM_REGION( 0x40000, "oki", 0 )
ROM_LOAD( "w27c020.bin", 0x00000, 0x40000, NO_DUMP ) // oki rom voice
ROM_END

} // anonymous namespace


// YEAR NAME PARENT MACHINE INPUT STATE INIT ROT COMPANY FULLNAME FLAGS
GAME( 199?, pearlorient, 0, pearlorient, pearlorient, pearlorient_state, empty_init, ROT0, "Chang Yu Electronic", "Unknown 6 Ball Pinball Gambling", MACHINE_IS_SKELETON_MECHANICAL ) // EAST8 v1.05 string . this was dumped from soccer santiago II 6 ball pinball