1 // license:BSD-3-Clause
2 // copyright-holders: Roberto Fresca, Mirko Buffoni
3 /********************************************************************
4 
5   Super Motor (prototype)
6   19??, Duintronic.
7 
8   Driver by Roberto Fresca and Mirko Buffoni.
9 
10 
11 *********************************************************************
12 
13   Seems to be a prototype, since there are some issues.
14   You can choose motorcycle <-> car game through a DIP switch.
15 
16   Also there are four difficult modes:
17 
18   - Easy: You only have slow trucks in the game, and gas cans on
19           the road that extend 10 seconds the game time.
20 
21   - Normal: You have trucks and cars on the street. Also gas cans.
22 
23   - Medium: You have trucks and cars on the street, but no gas cans.
24           Trucks and cars can stop.
25 
26   - Hard: You have trucks and cars on the street, but no gas cans.
27           Trucks and cars can stop. Seems a bit harder.
28 
29   Maybe the easy option was meant for kids cabs.
30 
31 
32   Duintronic, the manufacturer, is a Spanish company from Barcelona,
33   created by someone from Ampetronic, and finally acquired by one of
34   the Tecfri CEOs. The only arcade game known released by them was
35   Buccaneers, running on IREM M75 Vigilante hardware.
36 
37 
38 *********************************************************************
39 
40   Hardware specs...
41 
42   It's a dedicated PCB that has etched the Duintronic logo.
43 
44 
45   1x Zilog Z0840006PSC (Z80) @ 5MHz.  (stickered: S.P.V. -BR  BRI  NC)
46   1x Yamaha YM2413 @ 2.5 MHz.
47 
48   1x NEC D446C-2, 2K x 8 SRAM.        (work RAM)
49   1x NEC D4016C–2 SRAM 32K x 8 SRAM.  (VRAM)
50 
51   4x 27C512 ROM.
52   3x N82S129N bipolar PROMs.
53 
54   1x LM324N low-power quad op amp.  (audio amp)
55 
56   3x GAL16V8-20.  (marked 1, 2, 3)
57 
58   1x 5.000 MHz. crystal.
59   1x 20.00 MHz. crystal.
60 
61   2x 8 DIP switches banks.
62 
63   1x (2x28) JAMMA edge connector.
64 
65 
66   PCB layout...
67 
68   .---------------------------------------------------------------------------------------------------------------------------.
69   |         1                  2                     3               4                    5               6                   |
70   |                  .--------------------.                                          .---------------------------.            |
71   |   .------------. | AM27C512-255DC     | .---------------.  .------------.        | Zilog Z0840006PSC (Z80)   |            |
72   | A |  74LS377N  | |                    | | 3  GAL16V8-20 |  |  74LS245N  |        |                           |            |
73   |   '------------' |       - 1 -        | '---------------'  '------------'        |    S.P.V. -BR  BRI  NC    |            |
74   |                  '--------------------'                                          '---------------------------'            |
75   |   .------------.                           .------------.  .------------.         .-----------. .---------.          .----'
76   | B |  74LS377N  | .----------------.        |  74LS273N  |  |  74HC245P  |         | 74LS367AN | | 74LS04N |          |
77   |   '------------' | NEC            |        '------------'  '------------'         '-----------' '---------'          |
78   |                  |    D4016C-2    |                                                                                  |
79   |   .------------. |                |          .----------.  .--------------------.                  .-------.         |
80   | C |  74LS377N  | '----------------'          | 74LS157N |  | TMS 27C512JL       |  .-----------.   | XTAL  |         |
81   |   '------------'                             '----------'  |                    |  |  74HC04N  |   | 5 MHZ.|         '----.
82   |                                                            |       - 2 -        |  '-----------'   '-------'          ----|
83   |   .------------. .----------. .----------.   .----------.  '--------------------'                                     ----|
84   | D | 74HC245N   | | 74LS04N  | | 74LS00N  |   | 74LS157N |                        .-----------.  .------------.        ----|
85   |   '------------' '----------' '----------'   '----------'  .----------------.    | 74LS74AN  |  |  74LS244N  |        ----|
86   |                                                            | NEC            |    '-----------'  '------------'        ----|
87   |   .------------. .-----------.               .----------.  |    D446C-2     |                                         ----|
88   | E | 74LS273N   | | 74LS283B1 |               | 74LS157N |  |                |   .------------.  .------------.        ----|
89   |   '------------' '-----------'               '----------'  '----------------'   | DSW #1     |  |  74LS244N  |        ----|
90   |                                                                                 |  ||||||||  |  '------------'        ----|
91   |   .------------. .-----------. .----------.  .----------.                       '------------'                      J ----|
92   | F | 74LS273N   | | 74LS283B1 | | 74LS139N |  | 74LS157N |                       .------------.                        ----|
93   |   '------------' '-----------' '----------'  '----------'  .------------.       | DSW #2     |  .------------.      A ----|
94   |                                                            |  74LS245N  |       |  ||||||||  |  |  74LS244N  |        ----|
95   |   .-----------.  .----------.      .--------------------.  '------------'       '------------'  '------------'      M ----|
96   | G | 74LS283B1 |  | 74LS157N |      | AM27C512-200DC     |                                                             ----|
97   |   '-----------'  '----------'      |                    |  .------------.       .------------.           ++++       M ----|
98   |                                    |       - 3 -        |  |  74LS244N  |       |  74LS273N  |   RESNET  ||||         ----|
99   |   .-----------.  .----------.      '--------------------'  '------------'       '------------'           ++++       A ----|
100   | H | 74LS283B1 |  | 74HC273N |                                                                                         ----|
101   |   '-----------'  '----------'              .------------.  .------------.       .------------.                        ----|
102   |                           .------------.   | 74LS273N   |  |  74LS244N  |       |  74HC273N  |                        ----|
103   | I .--------------------.  | 74LS377N   |   '------------'  '------------'       '------------'                        ----|
104   |   | TMS 27C512-20JL    |  '------------'                                                                              ----|
105   |   |                    |  .------------.   .------------.  .------------.       .------------.  .------------.        ----|
106   | J |       - 4 -        |  | 74HC273N   |   | 74LS273N   |  | 1 N82S129N |       |   YM2413   |  |  75LS38    |        ----|
107   |   '--------------------'  '------------'   '------------'  '------------'       '------------'  '------------'        ----|
108   |                                                                                                                       ----|
109   |   .-----------.  .-----------.          .---------------.  .------------.       ++++++++++++++                       .----'
110   | K | 74LS163AN |  | 74LS163AN |   LOGO   | 2  GAL16V8-20 |  | 2 N82S129N |       ||| RESNET |||                       |
111   |   '-----------'  '-----------'          '---------------'  '------------'       ++++++++++++++                       |
112   |                                                                                                                      |
113   |   .-----------.  .---------------.         .------------.  .------------.        .----------.                        |
114   | L |  74LS08N  |  | 3  GAL16V8-20 |         | 74LS163AN  |  | 3 N82S129N |        |  LM324N  |                        '----.
115   |   '-----------'  '---------------'         '------------'  '------------'        '----------'                             |
116   |                                   .----.                                                                                  |
117   |   .----------.   .-----------.    |XTAL|   .------------.  .------------.                               ---               |
118   | M | 74LS74AN |   |  74LS04N  |    | 20 |   | 74LS163AN  |  |  74S112AN  |                             / POT \             |
119   |   '----------'   '-----------'    |MHZ.|   '------------'  '------------'                             \     /             |
120   |                                   '----'                                                                ---               |
121   '---------------------------------------------------------------------------------------------------------------------------'
122 
123 
124 *********************************************************************/
125 
126 
127 #include "emu.h"
128 #include "cpu/z80/z80.h"
129 #include "video/resnet.h"
130 #include "sound/ym2413.h"
131 #include "emupal.h"
132 #include "screen.h"
133 #include "speaker.h"
134 #include "tilemap.h"
135 
136 #define FIRST_CLOCK     XTAL(5'000'000)
137 #define SECOND_CLOCK    XTAL(20'000'000)
138 #define CPU_CLOCK       (FIRST_CLOCK)       // verified 5 MHz.
139 #define SND_CLOCK       (SECOND_CLOCK / 8)  // verified 2.5 MHz.
140 
141 
142 class smotor_state : public driver_device
143 {
144 public:
smotor_state(const machine_config & mconfig,device_type type,const char * tag)145 	smotor_state(const machine_config &mconfig, device_type type, const char *tag) :
146 		driver_device(mconfig, type, tag),
147 		m_maincpu(*this, "maincpu"),
148 		m_ym2413(*this, "ymsnd"),
149 		m_gfxdecode(*this, "gfxdecode"),
150 		m_palette(*this, "palette"),
151 		m_videoreg(*this, "videoreg"),
152 		m_videoram(*this, "videoram")
153 	{ }
154 
155 	void smotor(machine_config &config);
156 
157 protected:
158 	virtual void machine_start() override;
159 	virtual void video_start() override;
160 
161 private:
162 	required_device<cpu_device> m_maincpu;
163 	required_device<ym2413_device> m_ym2413;
164 	required_device<gfxdecode_device> m_gfxdecode;
165 	required_device<palette_device> m_palette;
166 
167 	required_shared_ptr<uint8_t> m_videoreg;
168 	required_shared_ptr<uint8_t> m_videoram;
169 
170 	tilemap_t *m_bg_tilemap;
171 	tilemap_t *m_fg_tilemap;
172 
173 	void videoram_w(offs_t offset, uint8_t data);
174 	void cpu_io_videoreg_w(offs_t offset, uint8_t data);
175 
176 	TILE_GET_INFO_MEMBER(get_fg_tile_info);
177 	TILE_GET_INFO_MEMBER(get_bg_tile_info);
178 
179 	void smotor_palette(palette_device &palette) const;
180 	uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
181 	void smotor_cpu_map(address_map &map);
182 	void smotor_cpu_io(address_map &map);
183 };
184 
185 
186 /*********************************************
187 *               Video Hardware               *
188 *********************************************/
189 
videoram_w(offs_t offset,uint8_t data)190 void smotor_state::videoram_w(offs_t offset, uint8_t data)
191 {
192 	m_videoram[offset] = data;
193 	m_fg_tilemap->mark_tile_dirty(offset/2);
194 }
195 
196 
TILE_GET_INFO_MEMBER(smotor_state::get_fg_tile_info)197 TILE_GET_INFO_MEMBER(smotor_state::get_fg_tile_info)
198 {
199 	tile_index *= 2;
200 
201 	int attr = m_videoram[tile_index + 1];
202 	int code = m_videoram[tile_index] | ((attr & 0x0f) << 8);
203 	int color = (attr) >> 4;
204 	tileinfo.set(0, code, color, 0);
205 }
206 
207 
TILE_GET_INFO_MEMBER(smotor_state::get_bg_tile_info)208 TILE_GET_INFO_MEMBER(smotor_state::get_bg_tile_info)
209 {
210 	uint8_t *tilerom = memregion("bgmap")->base();
211 
212 	tile_index *= 2;
213 
214 	int data = tilerom[tile_index];
215 	int attr = tilerom[tile_index + 1];
216 	int code = (data | ((attr & 0x07) << 8)) + 0x800;
217 	int color = attr >> 4;
218 
219 	tileinfo.set(0, code, color, 0);
220 }
221 
video_start()222 void smotor_state::video_start()
223 {
224 	m_fg_tilemap = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(*this, FUNC(smotor_state::get_fg_tile_info)), TILEMAP_SCAN_ROWS, 8, 8, 32, 32);
225 	m_bg_tilemap = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(*this, FUNC(smotor_state::get_bg_tile_info)), TILEMAP_SCAN_ROWS, 8, 8, 32, 1024);
226 	m_bg_tilemap->set_scroll_rows(32);
227 	m_fg_tilemap->set_transparent_pen(0);
228 }
229 
screen_update(screen_device & screen,bitmap_ind16 & bitmap,const rectangle & cliprect)230 uint32_t smotor_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
231 {
232 	if (BIT(m_videoreg[0],0)) {
233 		m_bg_tilemap->set_scrolly((m_videoreg[3] + (m_videoreg[5] << 8)));
234 		m_bg_tilemap->draw(screen, bitmap, cliprect, 0, 0);
235 	} else {
236 		bitmap.fill(0, cliprect);
237 	}
238 
239 	m_fg_tilemap->draw(screen, bitmap, cliprect, 0, 0);
240 	return 0;
241 }
242 
243 /***************************************************************************
244 
245   Convert the color PROMs into a more useable format.
246 
247   There are three 256x4 palette PROMs (one per gun).
248   The palette PROMs are connected to the RGB output this way:
249 
250   bit 3 -- 220 ohm resistor  -- RED/GREEN/BLUE
251         -- 680 ohm resistor  -- RED/GREEN/BLUE
252         -- 1.0kohm resistor  -- RED/GREEN/BLUE
253   bit 0 -- 2.2kohm resistor  -- RED/GREEN/BLUE
254 
255 ***************************************************************************/
256 
smotor_palette(palette_device & palette) const257 void smotor_state::smotor_palette(palette_device &palette) const
258 {
259 	uint8_t const *const color_prom = memregion("proms")->base();
260 	static constexpr int resistances[4] = { 2200, 1000, 680, 220 };
261 
262 	// compute the color output resistor weights
263 	double rweights[4], gweights[4], bweights[4];
264 	compute_resistor_weights(0, 255, -1.0,
265 			4,  &resistances[0], rweights, 330, 0,
266 			4,  &resistances[0], gweights, 330, 0,
267 			4,  &resistances[0], bweights, 330, 0);
268 
269 	// initialize the palette with these colors
270 	for (int i = 0; i < palette.entries(); i++)
271 	{
272 		int bit0, bit1, bit2, bit3;
273 
274 		// red component
275 		bit0 = BIT(color_prom[i], 0);
276 		bit1 = BIT(color_prom[i], 1);
277 		bit2 = BIT(color_prom[i], 2);
278 		bit3 = BIT(color_prom[i], 3);
279 		int const r = combine_weights(rweights, bit0, bit1, bit2, bit3);
280 
281 		// green component
282 		bit0 = BIT(color_prom[i+0x100], 0);
283 		bit1 = BIT(color_prom[i+0x100], 1);
284 		bit2 = BIT(color_prom[i+0x100], 2);
285 		bit3 = BIT(color_prom[i+0x100], 3);
286 		int const g = combine_weights(gweights, bit0, bit1, bit2, bit3);
287 
288 		// blue component
289 		bit0 = BIT(color_prom[i+0x200], 0);
290 		bit1 = BIT(color_prom[i+0x200], 1);
291 		bit2 = BIT(color_prom[i+0x200], 2);
292 		bit3 = BIT(color_prom[i+0x200], 3);
293 		int const b = combine_weights(bweights, bit0, bit1, bit2, bit3);
294 
295 		palette.set_pen_color(i, rgb_t(r, g, b));
296 	}
297 }
298 
299 
300 /*********************************************
301 *           Memory Map Information           *
302 *********************************************/
303 
smotor_cpu_map(address_map & map)304 void smotor_state::smotor_cpu_map(address_map &map)
305 {
306 	map(0x0000, 0xbfff).rom();
307 	map(0xf000, 0xf7ff).ram().w(FUNC(smotor_state::videoram_w)).share("videoram");
308 	map(0xf800, 0xffff).ram();
309 }
310 
smotor_cpu_io(address_map & map)311 void smotor_state::smotor_cpu_io(address_map &map)
312 {
313 	map.global_mask(0xff);
314 	map(0x00, 0x00).portr("IN0");
315 	map(0x01, 0x01).portr("DSW1");
316 
317 	map(0x00, 0x01).w("ymsnd", FUNC(ym2413_device::write));
318 
319 	map(0x02, 0x02).portr("DSW2");
320 
321 	map(0x02, 0x07).w(FUNC(smotor_state::cpu_io_videoreg_w)).share("videoreg");
322 
323 /*
324   00:  RW  ; port_r / ym2413_w #1
325   01:  RW  ; dsw1_r / ym2413_w #2
326   02:  RW  ; dsw2_r / bg_enable_w, coin counters  (values written: 0x30 [boot], 0x20 [attract], 0x11 [ingame])
327   04:   W  ;        / ???         (values written: 0x00)
328   05:   W  ;        / LSB Scrolly
329   06:   W  ;        / BG offset reset  (values written: 0xff)
330   07:   W  ;        / MSB Scrolly
331 */
332 
333 }
334 
cpu_io_videoreg_w(offs_t offset,uint8_t data)335 void smotor_state::cpu_io_videoreg_w(offs_t offset, uint8_t data)
336 {
337 	switch (offset) {
338 
339 		case 0x00:
340 			m_videoreg[offset] = data;
341 			m_ym2413->set_output_gain(ALL_OUTPUTS, BIT(data, 4) ? 1.0f : 0.0f);
342 			if ((BIT(data, 0)) & (BIT(data, 2)))    // coin lock + coin a, used for init.
343 				break;
344 			machine().bookkeeping().coin_lockout_global_w(BIT(data, 0));  // coin lock.
345 			machine().bookkeeping().coin_counter_w(1, BIT(data, 1));  // coin b counter.
346 			machine().bookkeeping().coin_counter_w(0, BIT(data, 2));  // coin a counter.
347 			break;
348 
349 		case 0x02:
350 		case 0x03:
351 			m_videoreg[3] = data;
352 			break;
353 		case 0x04:
354 		case 0x05:
355 			m_videoreg[5] = data;
356 			break;
357 		default:
358 			logerror("OUT[%02x] = %02X\n", offset + 2, data);
359 	}
360 }
361 
362 
363 /*********************************************
364 *                Input Ports                 *
365 *********************************************/
366 
367 static INPUT_PORTS_START( smotor )
368 	PORT_START("IN0")
369 	PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
370 	PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 )
371 	PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_START1 )
372 	PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START2 )
373 	PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_2WAY
374 	PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_2WAY
375 	PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON1 )
376 	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON2 )
377 
378 	PORT_START("DSW1")
379 	PORT_DIPNAME( 0x0f, 0x0f, DEF_STR( Coin_A ) )   PORT_DIPLOCATION("SW1:1,2,3,4")
380 	PORT_DIPSETTING(    0x0f, DEF_STR( 1C_1C ) )
381 	PORT_DIPSETTING(    0x0e, DEF_STR( 1C_2C ) )
382 	PORT_DIPSETTING(    0x0d, DEF_STR( 1C_3C ) )
383 	PORT_DIPSETTING(    0x0c, DEF_STR( 1C_4C ) )
384 	PORT_DIPSETTING(    0x0b, DEF_STR( 1C_5C ) )
385 	PORT_DIPSETTING(    0x0a, DEF_STR( 2C_1C ) )
386 	PORT_DIPSETTING(    0x09, DEF_STR( 2C_3C ) )
387 	PORT_DIPSETTING(    0x08, DEF_STR( 2C_5C ) )
388 	PORT_DIPSETTING(    0x07, DEF_STR( 3C_1C ) )
389 	PORT_DIPSETTING(    0x06, DEF_STR( 3C_2C ) )
390 	PORT_DIPSETTING(    0x05, DEF_STR( 3C_5C ) )
391 	PORT_DIPSETTING(    0x04, DEF_STR( 4C_1C ) )
392 	PORT_DIPSETTING(    0x03, DEF_STR( 4C_3C ) )
393 	PORT_DIPSETTING(    0x02, DEF_STR( 4C_5C ) )
394 	PORT_DIPSETTING(    0x01, DEF_STR( 5C_1C ) )
395 	PORT_DIPSETTING(    0x00, DEF_STR( 5C_2C ) )
396 	PORT_DIPNAME( 0xf0, 0xf0, DEF_STR( Coin_B ) )   PORT_DIPLOCATION("SW1:5,6,7,8")
397 	PORT_DIPSETTING(    0xf0, DEF_STR( 1C_1C ) )
398 	PORT_DIPSETTING(    0xe0, DEF_STR( 1C_2C ) )
399 	PORT_DIPSETTING(    0xd0, DEF_STR( 1C_3C ) )
400 	PORT_DIPSETTING(    0xc0, DEF_STR( 1C_4C ) )
401 	PORT_DIPSETTING(    0xb0, DEF_STR( 1C_5C ) )
402 	PORT_DIPSETTING(    0xa0, DEF_STR( 2C_1C ) )
403 	PORT_DIPSETTING(    0x90, DEF_STR( 2C_3C ) )
404 	PORT_DIPSETTING(    0x80, DEF_STR( 2C_5C ) )
405 	PORT_DIPSETTING(    0x70, DEF_STR( 3C_1C ) )
406 	PORT_DIPSETTING(    0x60, DEF_STR( 3C_2C ) )
407 	PORT_DIPSETTING(    0x50, DEF_STR( 3C_5C ) )
408 	PORT_DIPSETTING(    0x40, DEF_STR( 4C_1C ) )
409 	PORT_DIPSETTING(    0x30, DEF_STR( 4C_3C ) )
410 	PORT_DIPSETTING(    0x20, DEF_STR( 4C_5C ) )
411 	PORT_DIPSETTING(    0x10, DEF_STR( 5C_1C ) )
412 	PORT_DIPSETTING(    0x00, DEF_STR( 5C_2C ) )
413 
414 	PORT_START("DSW2")
415 	PORT_DIPNAME( 0x01, 0x00, DEF_STR( Demo_Sounds ) )  PORT_DIPLOCATION("SW2:1")
416 	PORT_DIPSETTING(    0x01, DEF_STR( Off ) )
417 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
418 	PORT_DIPNAME( 0x06, 0x04, DEF_STR( Difficult ) )    PORT_DIPLOCATION("SW2:2,3")
419 	PORT_DIPSETTING(    0x06, "Easy (with gas cans, only trucks)" )
420 	PORT_DIPSETTING(    0x04, "Normal (with gas cans, trucks and cars)" )
421 	PORT_DIPSETTING(    0x02, "Medium (no gas cans, both trucks and cars)" )
422 	PORT_DIPSETTING(    0x00, "Hard (no gas cans, both trucks and cars)" )
423 	PORT_DIPNAME( 0x18, 0x18, DEF_STR( Game_Time ) )    PORT_DIPLOCATION("SW2:4,5")
424 	PORT_DIPSETTING(    0x18, "1:00" )
425 	PORT_DIPSETTING(    0x10, "1:20" )
426 	PORT_DIPSETTING(    0x08, "1:40" )
427 	PORT_DIPSETTING(    0x00, "2:00" )
428 	PORT_DIPNAME( 0x20, 0x20, "Cycle / Car" )           PORT_DIPLOCATION("SW2:6")
429 	PORT_DIPSETTING(    0x20, "Cycle" )
430 	PORT_DIPSETTING(    0x00, "Car" )
431 	PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unused ) )       PORT_DIPLOCATION("SW2:7")
432 	PORT_DIPSETTING(    0x40, DEF_STR( Off ) )
433 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
434 	PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unused ) )       PORT_DIPLOCATION("SW2:8")
435 	PORT_DIPSETTING(    0x80, DEF_STR( Off ) )
436 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
437 INPUT_PORTS_END
438 
439 
440 /*********************************************
441 *              Graphics Layouts              *
442 *********************************************/
443 
444 static const gfx_layout tiles8x8_layout =
445 {
446 	8, 8,
447 	0x1000,
448 	4,
449 	{ 0, 2, 4, 6 },
450 	{ 1, 0, 9, 8, 17, 16, 25, 24 },
451 	{ 0*32, 1*32, 2*32, 3*32, 4*32, 5*32, 6*32, 7*32 },
452 	32 * 8
453 };
454 
455 
456 /**************************************************
457 *           Graphics Decode Information           *
458 **************************************************/
459 
460 static GFXDECODE_START( gfx_smotor )
461 	GFXDECODE_ENTRY( "gfx1", 0, tiles8x8_layout, 0, 16 )
462 GFXDECODE_END
463 
464 
465 
466 /*********************************************
467 *           Machine Start & Reset            *
468 *********************************************/
469 
machine_start()470 void smotor_state::machine_start()
471 {
472 }
473 
474 
475 /*********************************************
476 *              Machine Config                *
477 *********************************************/
478 
smotor(machine_config & config)479 void smotor_state::smotor(machine_config &config)
480 {
481 	// basic machine hardware
482 	Z80(config, m_maincpu, CPU_CLOCK);
483 	m_maincpu->set_addrmap(AS_PROGRAM, &smotor_state::smotor_cpu_map);
484 	m_maincpu->set_addrmap(AS_IO, &smotor_state::smotor_cpu_io);
485 	m_maincpu->set_vblank_int("screen", FUNC(smotor_state::irq0_line_hold));
486 
487 	// video hardware
488 	screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
489 	screen.set_refresh_hz(60);
490 	screen.set_vblank_time(ATTOSECONDS_IN_USEC(0));
491 	screen.set_size(256, 256);
492 	screen.set_visarea(0*8, 32*8-1, 0*8, 32*8-1);
493 	screen.set_screen_update(FUNC(smotor_state::screen_update));
494 	screen.set_palette(m_palette);
495 
496 	GFXDECODE(config, m_gfxdecode, m_palette, gfx_smotor);
497 	PALETTE(config, m_palette, FUNC(smotor_state::smotor_palette), 256);  // 256 static colors
498 
499 	// sound hardware
500 	SPEAKER(config, "speaker").front_center();
501 	YM2413(config, "ymsnd", SND_CLOCK).add_route(ALL_OUTPUTS, "speaker", 2.0);
502 }
503 
504 
505 /*********************************************
506 *                  ROM Load                  *
507 *********************************************/
508 
509 ROM_START( smotor )
510 	ROM_REGION( 0x10000, "maincpu", 0 )
511 	ROM_LOAD( "2_27c512.d4", 0x00000, 0x10000, CRC(82ca877d) SHA1(fc11c793c25865ebd3d5199c61ce14c535e0d2a8) )
512 
513 	ROM_REGION( 0x20000, "gfx1", 0 )
514 	ROM_LOAD( "1_27c512.a2", 0x00000, 0x10000, CRC(f12cb8bb) SHA1(0aaa7040b3bdba01e823212550cc0f990eee02e8) )
515 	ROM_LOAD( "4_27c512.i1", 0x10000, 0x10000, CRC(4c82a10b) SHA1(215354f37f6c13378aca85c96c209610f774711a) )
516 
517 	ROM_REGION( 0x10000, "bgmap", 0 )
518 	ROM_LOAD( "3_27c512.g3", 0x00000, 0x10000, CRC(0f67d74b) SHA1(90bb8884f95c883fa3d95e97fba2c0420668dab3) )
519 
520 	ROM_REGION( 0x300, "proms", 0 )
521 	ROM_LOAD( "82s129.l4", 0x000, 0x100, CRC(cd06515a) SHA1(589961f0438b889d20223d8139992dc8bf35b935) )  // R
522 	ROM_LOAD( "82s129.j4", 0x100, 0x100, CRC(26472e34) SHA1(c08f61911135cf1fe847a109f25de7f32646f5ec) )  // G
523 	ROM_LOAD( "82s129.k4", 0x200, 0x100, CRC(b4cffc3b) SHA1(1536ea938f1dc8e506ad98ae6810279e83fe9192) )  // B
524 
525 	ROM_REGION( 0x0600, "plds", 0 )
526 	ROM_LOAD( "1_gal16v8.a3", 0x0000, 0x0117, NO_DUMP )  // device is dead
527 	ROM_LOAD( "2_gal16v8.k3", 0x0000, 0x0117, NO_DUMP )  // device is dead
528 	ROM_LOAD( "3_gal16v8.l2", 0x0000, 0x0117, NO_DUMP )  // device is dead
529 ROM_END
530 
531 
532 /*********************************************
533 *                Game Drivers                *
534 *********************************************/
535 
536 //    YEAR  NAME     PARENT  MACHINE  INPUT    CLASS         INIT        ROT    COMPANY       FULLNAME                  FLAGS
537 GAME( 19??, smotor,  0,      smotor,  smotor,  smotor_state, empty_init, ROT0, "Duintronic", "Super Motor (prototype)", MACHINE_SUPPORTS_SAVE )
538