1 // license:BSD-3-Clause
2 // copyright-holders:Roberto Fresca
3 /***************************************************************************
4 
5   MANN, OH-MANN
6   199? - MERKUR
7 
8   Preliminary driver by Roberto Fresca.
9 
10 
11   German board game similar to Ludo, derived from the Indian game Parchisi.
12   Coin-operated machine for 1-4 players. No screen, just artwork and lamps.
13   The machine was designed for pubs, etc...
14 
15   Field: 93 cm.
16   High:  105 cm.
17 
18   1x keylock.
19   Accept DM and Euro.
20 
21 
22   It's all a challenge. Even once emulated, the game will need a lot of
23   artwork and lamps work...
24 
25   Currently sits in a loop between 0x100000 and 0x600006 addresses r/w,
26   the snippet is there:
27 
28   001BB8: move.b  (A2), D0
29   001BBA: jsr     $6dc0.l
30   001BC0: tst.b   D0
31   001BC2: bne     $1bb8
32 
33   Passing this loop it checks the i/o stuff, including the sound addresses
34 
35 ****************************************************************************
36 
37   Hardware Notes...
38 
39   - XTAL1 = 8.000 MHz.
40   - XTAL2 = 3.6864 MHz.
41 
42   1x MC68000P8        ; Motorola, 16-bits CPU.
43   1x SAA1099P         ; Philips, 6-Voice Sound Generator.
44   2x LC3664BL-10      ; Sanyo, 64K Static RAM.
45   1x M62X42B          : OKI, Real Time Clock with built in crystal.
46   1x MC68230P8        ; Motorola, Parallel Interface / Timer.
47   1x SCN68681C1N40    ; Philips, Dual Asynchronous Receiver/Transmitter (DUART).
48   1x MAX696CP         ; Maxim, Microprocessor Supervisory Circuits.
49 
50 
51   PCB Layout:
52   .------------------------------------------------------.
53   | .-------------.    .-----.    .---------.            |
54   | |:::::::::::::|    |:::::|    |:::::::::|            |
55   | '-------------'    '-----'    '---------'            |
56   |         .------------------------.  .-------.        |
57   | .-.     |       MC68230P8        |  | L4962 |        |
58   | |.|     |         1C10R          |  '-------'        |
59   | |.|     |         WC9336         |                   |
60   |R|.|     '------------------------'                   |
61   |E|.|                                                  |
62   |S|.|                                                  |
63   |E|.| .---------.      .-----------.                   |
64   |R|.| |74HC245N |      | POWER     |                   |
65   |V|.| '---------'      |  MODULE   |                   |
66   |E|.|                  |           |                   |
67   | |.| .---------.      |  3 VOLTS  |    .--------.     |
68   | |.| |74HC273B1|      |           |    |MAX696CP|     |
69   | '-' '---------'      |           |    '--------'     |
70   |                      |           |                   |
71   |     .--------.       '-----------'                   |
72   |     |74HC4094|                                       |
73   |     '--------' .-------------.   .-------------.     |
74   |                |    SANYO    |   |    SANYO    |     |
75   |  .--------.    | LC3664BL-10 |   | LC3664BL-10 |     |
76   |  |74HC04B1|    |             |   |             |     |
77   |  '--------'    '-------------'   '-------------'     |
78   |  .--------.                                          |
79   |  |74HC164B|                                          |
80   |  '--------'    .-------------.   .-------------.     |
81   |                |Mann,oh-Mann |   |Mann,oh-Mann |     |
82   |                |Austria      |   |Austria      |     |
83   |   .---. XTAL1  |Vorserie II  |   |Vorserie I   |     |
84   |                '-------------'   '-------------'     |
85   |  .--------.      .---------.       .---------.       |
86   |  |74HC04B1|      |74HC245N |       |74HC245N |       |
87   |  '--------'      '---------'       '---------'       |
88   |                   .........         .........        |
89   |                    8x10K             8x10K           |
90   |  .--------.                                          |
91   |  |74HC139N|    .--------------------------------.    |
92   |  '--------'    |                                |    |
93   |                |           MC68000P8            |    |
94   |                |                                |    |
95   |  .--------.    |                                |    |
96   |  |74HC30B1|    '--------------------------------'    |
97   |  '--------'          .........  .........            |
98   |                        8x10K      8x10K              |
99   |  .--------.        .--------.  .----------.          |
100   |  |74HC32N |        |74HC138B|  | 74HC245N |          |
101   |  '--------'        '--------'  '----------'          |
102   |  .--------.       .---------.                        |
103   |  |74HC00B1|       | M62X42B |                        |
104   |  '--------'       '---------'                        |
105   |  .--------.       .---------.                        |
106   |  |74HC74B1|       |SAA1099P |                        |
107   |  '--------'       '---------'                        |
108   |           .---. XTAL2                                |
109   | . .------------------------.                         |
110   |8. |                        |                         |
111   |x. |     SCN68681C1N40      |                         |
112   |1. |                        |                         |
113   |0. '------------------------'                         |
114   |K.     .........                                      |
115   | .       8x10K                                        |
116   |  .--------.  .--------.  .--------.  .----.  .--.    |
117   |  |::::::::|  |::::::::|  |::::::::|  |::::|  |::|    |
118   |  '--------'  '--------'  '--------'  '----'  '--'    |
119   |   SERVICE                 SERIAL1   SERIAL2 SPEAKER  |
120   '------------------------------------------------------'
121 
122 
123 ****************************************************************************
124 
125   Memory Map:
126   -----------
127 
128   000000-01FFFF   ROM Space.
129   500000-503FFF   RAM.
130 
131 
132 ***************************************************************************/
133 
134 #include "emu.h"
135 #include "cpu/m68000/m68000.h"
136 #include "machine/68230pit.h"
137 #include "machine/mc68681.h"
138 #include "machine/msm6242.h"
139 #include "machine/nvram.h"
140 #include "sound/saa1099.h"
141 #include "speaker.h"
142 
143 
144 class manohman_state : public driver_device
145 {
146 public:
manohman_state(const machine_config & mconfig,device_type type,const char * tag)147 	manohman_state(const machine_config &mconfig, device_type type, const char *tag) :
148 		driver_device(mconfig, type, tag),
149 		m_maincpu(*this, "maincpu"),
150 		m_duart(*this, "duart"),
151 		m_pit(*this, "pit")
152 	{ }
153 
154 	void manohman(machine_config &config);
155 
156 private:
157 	virtual void machine_start() override;
158 	void mem_map(address_map &map);
159 	void cpu_space_map(address_map &map);
160 
161 	required_device<cpu_device> m_maincpu;
162 	required_device<mc68681_device> m_duart;
163 	required_device<pit68230_device> m_pit;
164 };
165 
166 
machine_start()167 void manohman_state::machine_start()
168 {
169 }
170 
171 
172 /*********************************************
173 *           Memory Map Definition            *
174 *********************************************/
175 
mem_map(address_map & map)176 void manohman_state::mem_map(address_map &map)
177 {
178 	map(0x000000, 0x01ffff).rom();
179 	map(0x100000, 0x10003f).rw(m_pit, FUNC(pit68230_device::read), FUNC(pit68230_device::write)).umask16(0x00ff);
180 	map(0x200000, 0x20001f).rw(m_duart, FUNC(mc68681_device::read), FUNC(mc68681_device::write)).umask16(0x00ff);
181 	map(0x300000, 0x300003).w("saa", FUNC(saa1099_device::write)).umask16(0x00ff).nopr();
182 	map(0x400000, 0x40001f).rw("rtc", FUNC(msm6242_device::read), FUNC(msm6242_device::write)).umask16(0x00ff);
183 	map(0x500000, 0x503fff).ram().share("nvram"); //work RAM
184 	map(0x600002, 0x600003).nopw(); // output through shift register?
185 	map(0x600004, 0x600005).nopr();
186 	map(0x600006, 0x600007).noprw(); //(r) is discarded (watchdog?)
187 }
188 
cpu_space_map(address_map & map)189 void manohman_state::cpu_space_map(address_map &map)
190 {
191 	map(0xfffff0, 0xffffff).m(m_maincpu, FUNC(m68000_base_device::autovectors_map));
192 	map(0xfffff4, 0xfffff5).r(m_pit, FUNC(pit68230_device::irq_tiack));
193 	map(0xfffff8, 0xfffff9).r(m_duart, FUNC(mc68681_device::get_irq_vector));
194 }
195 
196 /*
197 
198   RW
199 
200   100000 ; R      \
201   100000 ; W 0000  | Constant after RAM test... Seems for the MAX696's watchdog.
202   100000 ; W 00FF /
203 
204   500000-503FF9 ; R
205   500000-503FF9 ; W FFFF \
206   500000-503FF9 ; W AAAA  | Seems bit patterns for testing RAM...
207   500000-503FF9 ; W 5555  |
208   500000-503FF9 ; W 0000 /
209 
210   503FFA - 503FFF RW
211 
212   500300 ; R
213   500302 ; R
214 
215   600006 ; R
216   600006 ; W FFFF \
217   600006 ; W AAAA  | These bit patterns are for 500000-503ff8 comparison.
218   600006 ; W 5555  |
219   600006 ; W 0000 /
220 
221 
222   BP at 0x1880 to point to the end of RAM test.
223 
224 */
225 
226 /*********************************************
227 *          Input Ports Definitions           *
228 *********************************************/
229 
INPUT_PORTS_START(manohman)230 static INPUT_PORTS_START( manohman )
231 
232 INPUT_PORTS_END
233 
234 
235 
236 /*********************************************
237 *               Machine Config               *
238 *********************************************/
239 
240 void manohman_state::manohman(machine_config &config)
241 {
242 	M68000(config, m_maincpu, XTAL(8'000'000)); // MC68000P8
243 	m_maincpu->set_addrmap(AS_PROGRAM, &manohman_state::mem_map);
244 	m_maincpu->set_addrmap(m68000_base_device::AS_CPU_SPACE, &manohman_state::cpu_space_map);
245 
246 	PIT68230(config, m_pit, XTAL(8'000'000)); // MC68230P8
247 	m_pit->timer_irq_callback().set_inputline("maincpu", M68K_IRQ_2);
248 
249 	MC68681(config, m_duart, XTAL(3'686'400));
250 	m_duart->irq_cb().set_inputline(m_maincpu, M68K_IRQ_4);
251 
252 	MSM6242(config, "rtc", XTAL(32'768)); // M62X42B
253 
254 	NVRAM(config, "nvram", nvram_device::DEFAULT_NONE); // KM6264BL-10 x2 + MAX696CFL + battery
255 
256 	SPEAKER(config, "mono").front_center();
257 	SAA1099(config, "saa", XTAL(8'000'000) / 2).add_route(ALL_OUTPUTS, "mono", 0.10); // clock not verified
258 }
259 
260 
261 /*********************************************
262 *                  Rom Load                  *
263 *********************************************/
264 
265 ROM_START( manohman )
266 	ROM_REGION( 0x20000, "maincpu", 0 )
267 	ROM_LOAD16_BYTE( "mom_austria_vorserie_ii.bin", 0x00000, 0x10000, CRC(4b57409c) SHA1(0438f5d52f4de2ece8fb684cf2d82bdea0eacf0b) )
268 	ROM_LOAD16_BYTE( "mom_austria_vorserie_i.bin",  0x00001, 0x10000, CRC(3c9507f9) SHA1(489a6aadfb7d61be0873bf48d428e9d915268f95) )
269 ROM_END
270 
271 ROM_START( backgamn )
272 	ROM_REGION( 0x20000, "maincpu", 0 )
273 	ROM_LOAD16_BYTE( "b_f2_i.bin",  0x00000, 0x10000, CRC(9e42937c) SHA1(85d462a560b85b03ee9d341e18815b7c396118ac) )
274 	ROM_LOAD16_BYTE( "b_f2_ii.bin", 0x00001, 0x10000, CRC(8e0ee50c) SHA1(2a05c337db1131b873646aa4109593636ebaa356) )
275 ROM_END
276 
277 
278 /*********************************************
279 *                Game Drivers                *
280 *********************************************/
281 
282 //    YEAR  NAME      PARENT  MACHINE   INPUT     STATE           INIT        ROT   COMPANY   FULLNAME         FLAGS
283 GAME( 199?, manohman, 0,      manohman, manohman, manohman_state, empty_init, ROT0, "Merkur", "Mann, oh-Mann", MACHINE_NOT_WORKING | MACHINE_NO_SOUND | MACHINE_REQUIRES_ARTWORK )
284 GAME( 1990, backgamn, 0,      manohman, manohman, manohman_state, empty_init, ROT0, "Merkur", "Backgammon",    MACHINE_NOT_WORKING | MACHINE_NO_SOUND | MACHINE_REQUIRES_ARTWORK )
285