summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/drivers/gamemasters.cpp
blob: fe2d1df251abe866b1f809e79de590dfa3999961 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
// license:BSD-3-Clause
// copyright-holders:AJR
/****************************************************************************

    Skeleton driver for redemption games by GameMasters, Inc.

    Not much is known about this Atlanta-based company and its games, aside
    from a number of flyers.

****************************************************************************/

#include "emu.h"

#include "cpu/m6502/r65c02.h"
#include "machine/nvram.h"
//#include "machine/ticket.h"
#include "sound/ay8910.h"
#include "speaker.h"


class gamemasters_state : public driver_device
{
public:
	gamemasters_state(const machine_config &mconfig, device_type type, const char *tag)
		: driver_device(mconfig, type, tag)
		, m_maincpu(*this, "maincpu")
	{
	}

	void gmsshoot(machine_config &config);
private:
	DECLARE_WRITE8_MEMBER(output_1100);
	DECLARE_WRITE8_MEMBER(output_1300);
	DECLARE_WRITE8_MEMBER(output_1520);
	DECLARE_WRITE8_MEMBER(output_1540);

	void mem_map(address_map &map);

	required_device<cpu_device> m_maincpu;
};


WRITE8_MEMBER(gamemasters_state::output_1100)
{
	// IRQ ack?
	logerror("%s: Writing %02X to 1100\n", machine().describe_context(), data);
}

WRITE8_MEMBER(gamemasters_state::output_1300)
{
	logerror("%s: Writing %02X to 1300\n", machine().describe_context(), data);
}

WRITE8_MEMBER(gamemasters_state::output_1520)
{
	logerror("%s: Writing %02X to 1520\n", machine().describe_context(), data);
}

WRITE8_MEMBER(gamemasters_state::output_1540)
{
	logerror("%s: Writing %02X to 1540 + %X\n", machine().describe_context(), data, offset);
}

void gamemasters_state::mem_map(address_map &map)
{
	map(0x0000, 0x07ff).ram().share("nvram");
	map(0x1100, 0x1100).w(this, FUNC(gamemasters_state::output_1100));
	map(0x1300, 0x1300).w(this, FUNC(gamemasters_state::output_1300));
	map(0x1400, 0x1400).portr("IN0");
	map(0x1500, 0x1500).portr("IN1");
	map(0x1520, 0x1520).w(this, FUNC(gamemasters_state::output_1520));
	map(0x1540, 0x1540).select(0x20).w(this, FUNC(gamemasters_state::output_1540));
	map(0x1600, 0x1601).w("aysnd", FUNC(ay8910_device::data_address_w));
	map(0x1601, 0x1601).r("aysnd", FUNC(ay8910_device::data_r));
	map(0xe000, 0xffff).rom().region("maincpu", 0);
}


MACHINE_CONFIG_START(gamemasters_state::gmsshoot)
	MCFG_DEVICE_ADD("maincpu", R65C02, 4_MHz_XTAL / 4) // divider not verified
	MCFG_DEVICE_PROGRAM_MAP(mem_map)

	MCFG_NVRAM_ADD_0FILL("nvram") // MK48Z02B-25

	// LCD video?

	SPEAKER(config, "mono").front_center();
	MCFG_DEVICE_ADD("aysnd", AY8912, 4_MHz_XTAL / 4)
	MCFG_AY8910_PORT_A_READ_CB(IOPORT("DSW"))
	MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.30)
MACHINE_CONFIG_END


static INPUT_PORTS_START(gmsshoot)
	// Flyer: "Sharpshooter can be set to have quarters or tokens in, and/or quarters or tokens out."
	// "Ticket Dispenser" and "Optional Dollar Bill Acceptor" are also mentioned as features.
	PORT_START("DSW")
	PORT_DIPNAME(0x01, 0x00, DEF_STR(Unknown)) PORT_DIPLOCATION("SW2:1")
	PORT_DIPSETTING(0x01, DEF_STR(Off))
	PORT_DIPSETTING(0x00, DEF_STR(On))
	PORT_DIPNAME(0x02, 0x00, DEF_STR(Unknown)) PORT_DIPLOCATION("SW2:2")
	PORT_DIPSETTING(0x02, DEF_STR(Off))
	PORT_DIPSETTING(0x00, DEF_STR(On))
	PORT_DIPNAME(0x04, 0x00, DEF_STR(Unknown)) PORT_DIPLOCATION("SW2:3")
	PORT_DIPSETTING(0x04, DEF_STR(Off))
	PORT_DIPSETTING(0x00, DEF_STR(On))
	PORT_DIPNAME(0x08, 0x08, DEF_STR(Unknown)) PORT_DIPLOCATION("SW2:4")
	PORT_DIPSETTING(0x08, DEF_STR(Off))
	PORT_DIPSETTING(0x00, DEF_STR(On))
	PORT_DIPNAME(0x10, 0x10, DEF_STR(Unknown)) PORT_DIPLOCATION("SW2:5")
	PORT_DIPSETTING(0x10, DEF_STR(Off))
	PORT_DIPSETTING(0x00, DEF_STR(On))
	PORT_DIPNAME(0x20, 0x00, DEF_STR(Unknown)) PORT_DIPLOCATION("SW2:6")
	PORT_DIPSETTING(0x20, DEF_STR(Off))
	PORT_DIPSETTING(0x00, DEF_STR(On))
	PORT_DIPNAME(0x40, 0x00, DEF_STR(Unknown)) PORT_DIPLOCATION("SW2:7")
	PORT_DIPSETTING(0x40, DEF_STR(Off))
	PORT_DIPSETTING(0x00, DEF_STR(On))
	PORT_DIPNAME(0x80, 0x00, DEF_STR(Unknown)) PORT_DIPLOCATION("SW2:8")
	PORT_DIPSETTING(0x80, DEF_STR(Off))
	PORT_DIPSETTING(0x00, DEF_STR(On))

	PORT_START("IN0")
	PORT_BIT(0x01, 0x01, IPT_UNKNOWN)
	PORT_BIT(0x02, 0x02, IPT_UNKNOWN)
	PORT_BIT(0x04, 0x04, IPT_UNKNOWN)
	PORT_BIT(0x08, 0x08, IPT_UNKNOWN)
	PORT_BIT(0x10, 0x10, IPT_UNKNOWN)
	PORT_BIT(0x20, 0x20, IPT_UNKNOWN)
	PORT_BIT(0x40, 0x40, IPT_UNKNOWN)
	PORT_BIT(0x80, 0x80, IPT_UNUSED)

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


ROM_START(gmsshoot)
	ROM_REGION(0x2000, "maincpu", 0)
	ROM_LOAD("sharp_shooter__u20_2764.bin", 0x0000, 0x2000, CRC(902bd63b) SHA1(606e9d1083677d7eb90ad3626a6340238a260253)) // M2764AFI
ROM_END


GAME(1989, gmsshoot, 0, gmsshoot, gmsshoot, gamemasters_state, empty_init, ROT0, "GameMasters", "Sharpshooter (coin pusher)", MACHINE_IS_SKELETON_MECHANICAL) // flyer and PCB dated 1988, but program strings claim 1989 copyright