1 /***************************************************************************
2 
3 Sauro
4 -----
5 
6 driver by Zsolt Vasvari
7 
8 Main CPU
9 --------
10 
11 Memory mapped:
12 
13 0000-dfff	ROM
14 e000-e7ff	RAM
15 e800-ebff	Sprite RAM
16 f000-fbff	Background Video RAM
17 f400-ffff	Background Color RAM
18 f800-fbff	Foreground Video RAM
19 fc00-ffff	Foreground Color RAM
20 
21 Ports:
22 
23 00		R	DSW #1
24 20		R	DSW #2
25 40		R	Input Ports Player 1
26 60		R   Input Ports Player 2
27 80		 W  Sound Commnand
28 c0		 W  Flip Screen
29 c1		 W  ???
30 c2-c4	 W  ???
31 c6-c7	 W  ??? (Loads the sound latch?)
32 c8		 W	???
33 c9		 W	???
34 ca-cd	 W  ???
35 ce		 W  ???
36 e0		 W	Watchdog
37 
38 
39 Sound CPU
40 ---------
41 
42 Memory mapped:
43 
44 0000-7fff		ROM
45 8000-87ff		RAM
46 a000	     W  ADPCM trigger
47 c000-c001	 W	YM3812
48 e000		R   Sound latch
49 e000-e006	 W  ???
50 e00e-e00f	 W  ???
51 
52 
53 TODO
54 ----
55 
56 - The readme claims there is a GI-SP0256A-AL ADPCM on the PCB. Needs to be
57   emulated.
58 
59 - Verify all clock speeds
60 
61 - I'm only using colors 0-15. The other 3 banks are mostly the same, but,
62   for example, the color that's used to paint the gradients of the sky (color 2)
63   is different, so there might be a palette select. I don't see anything
64   obviously wrong the way it is right now. It matches the screen shots found
65   on the Spanish Dump site.
66 
67 - What do the rest of the ports in the range c0-ce do?
68 
69 Tricky Doc
70 ----------
71 
72 Addition by Reip
73 
74 ***************************************************************************/
75 
76 #include "driver.h"
77 #include "vidhrdw/generic.h"
78 #include "cpu/z80/z80.h"
79 
80 extern UINT8 *tecfri_videoram;
81 extern UINT8 *tecfri_colorram;
82 extern UINT8 *tecfri_videoram2;
83 extern UINT8 *tecfri_colorram2;
84 
85 extern WRITE_HANDLER( tecfri_videoram_w );
86 extern WRITE_HANDLER( tecfri_colorram_w );
87 extern WRITE_HANDLER( tecfri_videoram2_w );
88 extern WRITE_HANDLER( tecfri_colorram2_w );
89 extern WRITE_HANDLER( tecfri_scroll_bg_w );
90 extern WRITE_HANDLER( flip_screen_w );
91 extern WRITE_HANDLER( sauro_scroll_fg_w );
92 extern WRITE_HANDLER( trckydoc_spriteram_mirror_w );
93 
94 extern VIDEO_START( sauro );
95 extern VIDEO_START( trckydoc );
96 
97 extern VIDEO_UPDATE( sauro );
98 extern VIDEO_UPDATE( trckydoc );
99 
100 
WRITE_HANDLER(sauro_sound_command_w)101 static WRITE_HANDLER( sauro_sound_command_w )
102 {
103 	data |= 0x80;
104 	soundlatch_w(offset, data);
105 }
106 
READ_HANDLER(sauro_sound_command_r)107 static READ_HANDLER( sauro_sound_command_r )
108 {
109 	int ret	= soundlatch_r(offset);
110 	soundlatch_clear_w(offset, 0);
111 	return ret;
112 }
113 
WRITE_HANDLER(sauro_coin1_w)114 static WRITE_HANDLER( sauro_coin1_w )
115 {
116 	coin_counter_w(0, data);
117 	coin_counter_w(0, 0); /* to get the coin counter working in sauro, as it doesn't write 0*/
118 }
119 
WRITE_HANDLER(sauro_coin2_w)120 static WRITE_HANDLER( sauro_coin2_w )
121 {
122 	coin_counter_w(1, data);
123 	coin_counter_w(1, 0); /* to get the coin counter working in sauro, as it doesn't write 0*/
124 }
125 
MEMORY_READ_START(sauro_readmem)126 static MEMORY_READ_START( sauro_readmem )
127 	{ 0x0000, 0xdfff, MRA_ROM },
128 	{ 0xe000, 0xebff, MRA_RAM },
129 	{ 0xf000, 0xffff, MRA_RAM },
130 MEMORY_END
131 
132 static MEMORY_WRITE_START( sauro_writemem )
133 	{ 0x0000, 0xdfff, MWA_ROM },
134 	{ 0xe000, 0xe7ff, MWA_RAM },
135 	{ 0xe800, 0xebff, MWA_RAM, &spriteram, &spriteram_size },
136 	{ 0xf000, 0xf3ff, tecfri_videoram_w, &tecfri_videoram },
137 	{ 0xf400, 0xf7ff, tecfri_colorram_w, &tecfri_colorram },
138 	{ 0xf800, 0xfbff, tecfri_videoram2_w, &tecfri_videoram2 },
139 	{ 0xfc00, 0xffff, tecfri_colorram2_w, &tecfri_colorram2 },
140 MEMORY_END
141 
142 static PORT_READ_START( sauro_readport )
143 	{ 0x00, 0x00, input_port_2_r },
144 	{ 0x20, 0x20, input_port_3_r },
145 	{ 0x40, 0x40, input_port_0_r },
146 	{ 0x60, 0x60, input_port_1_r },
147 PORT_END
148 
149 static PORT_WRITE_START( sauro_writeport )
150 	{ 0xa0, 0xa0, tecfri_scroll_bg_w, },
151 	{ 0xa1, 0xa1, sauro_scroll_fg_w, },
152 	{ 0x80, 0x80, sauro_sound_command_w, },
153 	{ 0xc0, 0xc0, flip_screen_w, },
154 	{ 0xc1, 0xc2, MWA_NOP },
155 	{ 0xc3, 0xc3, sauro_coin1_w },
156 	{ 0xc4, 0xc4, MWA_NOP },
157 	{ 0xc5, 0xc5, sauro_coin2_w },
158 	{ 0xc6, 0xce, MWA_NOP },
159 	{ 0xe0, 0xe0, watchdog_reset_w },
160 PORT_END
161 
162 static MEMORY_READ_START( sauro_sound_readmem )
163 	{ 0x0000, 0x7fff, MRA_ROM },
164 	{ 0x8000, 0x87ff, MRA_RAM },
165 	{ 0xe000, 0xe000, sauro_sound_command_r },
166 MEMORY_END
167 
168 static MEMORY_WRITE_START( sauro_sound_writemem )
169 	{ 0x8000, 0x87ff, MWA_RAM },
170 	{ 0xc000, 0xc000, YM3812_control_port_0_w },
171 	{ 0xc001, 0xc001, YM3812_write_port_0_w },
172 /*	{ 0xa000, 0xa000, ADPCM_trigger },*/
173 	{ 0xe000, 0xe006, MWA_NOP },
174 	{ 0xe00e, 0xe00f, MWA_NOP },
175 MEMORY_END
176 
177 static MEMORY_READ_START( trckydoc_readmem )
178 	{ 0x0000, 0xdfff, MRA_ROM },
179 	{ 0xe000, 0xe7ff, MRA_RAM },
180 	{ 0xf800, 0xf800, input_port_2_r },
181 	{ 0xf808, 0xf808, input_port_3_r },
182 	{ 0xf810, 0xf810, input_port_0_r },
183 	{ 0xf818, 0xf818, input_port_1_r },
184 	{ 0xf828, 0xf828, watchdog_reset_r },
185 MEMORY_END
186 
187 static MEMORY_WRITE_START( trckydoc_writemem )
188 	{ 0x0000, 0xdfff, MWA_ROM },
189 	{ 0xe000, 0xe7ff, MWA_RAM },
190 	{ 0xe800, 0xebff, MWA_RAM, &spriteram, &spriteram_size },
191 	{ 0xec00, 0xefff, trckydoc_spriteram_mirror_w }, /* it clears sprites from the screen by writing here to set some of the attributes*/
192 	{ 0xf000, 0xf3ff, tecfri_videoram_w, &tecfri_videoram },
193 	{ 0xf400, 0xf7ff, tecfri_colorram_w, &tecfri_colorram },
194 	{ 0xf820, 0xf820, YM3812_control_port_0_w },
195 	{ 0xf821, 0xf821, YM3812_write_port_0_w },
196 	{ 0xf830, 0xf830, tecfri_scroll_bg_w },
197 	{ 0xf838, 0xf838, MWA_NOP },
198 	{ 0xf839, 0xf839, flip_screen_w },
199 	{ 0xf83a, 0xf83a, sauro_coin1_w },
200 	{ 0xf83b, 0xf83b, sauro_coin2_w },
201 	{ 0xf83c, 0xf83c, watchdog_reset_w },
202 	{ 0xf83f, 0xf83f, MWA_NOP },
203 MEMORY_END
204 
205 INPUT_PORTS_START( tecfri )
206 	PORT_START      /* IN0 */
207 	PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 )
208 	PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON2 )
209 	PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_COIN1 )
210 	PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_COIN2 )
211 	PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT  | IPF_8WAY )
212 	PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT | IPF_8WAY )
213 	PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP    | IPF_8WAY )
214 	PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN  | IPF_8WAY )
215 
216 	PORT_START      /* IN1 */
217 	PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 | IPF_COCKTAIL )
218 	PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON2 | IPF_COCKTAIL )
219 	PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_START1 )
220 	PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_START2 )
221 	PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT  | IPF_COCKTAIL | IPF_8WAY )
222 	PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT | IPF_COCKTAIL | IPF_8WAY )
223 	PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP    | IPF_COCKTAIL | IPF_8WAY )
224 	PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN  | IPF_COCKTAIL | IPF_8WAY )
225 
226 	PORT_START
227 	PORT_SERVICE( 0x01, IP_ACTIVE_HIGH )
228 	PORT_DIPNAME( 0x02, 0x02, DEF_STR( Demo_Sounds ) )
229 	PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
230 	PORT_DIPSETTING(    0x02, DEF_STR( On ) )
231 	PORT_DIPNAME( 0x04, 0x04, DEF_STR( Cabinet ) )
232 	PORT_DIPSETTING(    0x04, DEF_STR( Upright ) )
233 	PORT_DIPSETTING(    0x00, DEF_STR( Cocktail ) )
234 	PORT_DIPNAME( 0x08, 0x00, DEF_STR( Free_Play ) )
235 	PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
236 	PORT_DIPSETTING(    0x08, DEF_STR( On ) )
237 	PORT_DIPNAME( 0x30, 0x20, DEF_STR( Difficulty ) )
238 	PORT_DIPSETTING(    0x30, "Very Easy" )
239 	PORT_DIPSETTING(    0x20, "Easy" )
240 	PORT_DIPSETTING(    0x10, "Hard" )	                      /* This crashes test mode!!! */
241 	PORT_DIPSETTING(    0x00, "Very Hard" )
242 	PORT_DIPNAME( 0x40, 0x40, "Allow Continue" )
243 	PORT_DIPSETTING(    0x00, DEF_STR( No ) )
244 	PORT_DIPSETTING(    0x40, DEF_STR( Yes ) )
245 	PORT_DIPNAME( 0x80, 0x00, "Freeze" )
246 	PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
247 	PORT_DIPSETTING(    0x80, DEF_STR( On ) )
248 
249 	PORT_START
250 	PORT_DIPNAME( 0x03, 0x03, DEF_STR( Coin_A ) )
251 	PORT_DIPSETTING(    0x00, DEF_STR( 4C_1C ) )
252 	PORT_DIPSETTING(    0x01, DEF_STR( 3C_1C ) )
253 	PORT_DIPSETTING(    0x02, DEF_STR( 2C_1C ) )
254 	PORT_DIPSETTING(    0x03, DEF_STR( 1C_1C ) )
255 	PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Coin_B ) )
256 	PORT_DIPSETTING(    0x0c, DEF_STR( 1C_2C ) )
257 	PORT_DIPSETTING(    0x08, DEF_STR( 1C_3C ) )
258 	PORT_DIPSETTING(    0x04, DEF_STR( 1C_4C ) )
259 	PORT_DIPSETTING(    0x00, DEF_STR( 1C_5C ) )
260 	PORT_DIPNAME( 0x30, 0x20, DEF_STR( Lives ) )
261 	PORT_DIPSETTING(    0x30, "2" )
262 	PORT_DIPSETTING(    0x20, "3" )
263 	PORT_DIPSETTING(    0x10, "4" )
264 	PORT_DIPSETTING(    0x00, "5" )
265 	PORT_DIPNAME( 0x40, 0x00, DEF_STR( Unknown ) )
266 	PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
267 	PORT_DIPSETTING(    0x40, DEF_STR( On ) )
268 	PORT_DIPNAME( 0x80, 0x00, DEF_STR( Unknown ) )
269 	PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
270 	PORT_DIPSETTING(    0x80, DEF_STR( On ) )
271 INPUT_PORTS_END
272 
273 
274 static struct GfxLayout charlayout =
275 {
276 	8,8,	/* 8*8 chars */
277     2048,   /* 2048 characters */
278     4,      /* 4 bits per pixel */
279     { 0,1,2,3 },  /* The 4 planes are packed together */
280     { 0*4, 1*4, 2*4, 3*4, 4*4, 5*4, 6*4, 7*4},
281     { 0*4*8, 1*4*8, 2*4*8, 3*4*8, 4*4*8, 5*4*8, 6*4*8, 7*4*8},
282     8*8*4     /* every char takes 32 consecutive bytes */
283 };
284 
285 static struct GfxLayout trckydoc_spritelayout =
286 {
287 	16,16,	/* 16*16 sprites */
288     512,	/* 512 sprites */
289     4,      /* 4 bits per pixel */
290     { 0,1,2,3 },  /* The 4 planes are packed together */
291     { 1*4, 0*4, 3*4, 2*4, 5*4, 4*4, 7*4, 6*4, 9*4, 8*4, 11*4, 10*4, 13*4, 12*4, 15*4, 14*4},
292     { RGN_FRAC(3,4)+0*4*16, RGN_FRAC(2,4)+0*4*16, RGN_FRAC(1,4)+0*4*16, RGN_FRAC(0,4)+0*4*16,
293       RGN_FRAC(3,4)+1*4*16, RGN_FRAC(2,4)+1*4*16, RGN_FRAC(1,4)+1*4*16, RGN_FRAC(0,4)+1*4*16,
294       RGN_FRAC(3,4)+2*4*16, RGN_FRAC(2,4)+2*4*16, RGN_FRAC(1,4)+2*4*16, RGN_FRAC(0,4)+2*4*16,
295       RGN_FRAC(3,4)+3*4*16, RGN_FRAC(2,4)+3*4*16, RGN_FRAC(1,4)+3*4*16, RGN_FRAC(0,4)+3*4*16, },
296     16*16     /* every sprite takes 32 consecutive bytes */
297 };
298 
299 static struct GfxLayout sauro_spritelayout =
300 {
301 	16,16,	/* 16*16 sprites */
302     1024,	/* 1024 sprites */
303     4,      /* 4 bits per pixel */
304     { 0,1,2,3 },  /* The 4 planes are packed together */
305     { 1*4, 0*4, 3*4, 2*4, 5*4, 4*4, 7*4, 6*4, 9*4, 8*4, 11*4, 10*4, 13*4, 12*4, 15*4, 14*4},
306     { RGN_FRAC(3,4)+0*4*16, RGN_FRAC(2,4)+0*4*16, RGN_FRAC(1,4)+0*4*16, RGN_FRAC(0,4)+0*4*16,
307       RGN_FRAC(3,4)+1*4*16, RGN_FRAC(2,4)+1*4*16, RGN_FRAC(1,4)+1*4*16, RGN_FRAC(0,4)+1*4*16,
308       RGN_FRAC(3,4)+2*4*16, RGN_FRAC(2,4)+2*4*16, RGN_FRAC(1,4)+2*4*16, RGN_FRAC(0,4)+2*4*16,
309       RGN_FRAC(3,4)+3*4*16, RGN_FRAC(2,4)+3*4*16, RGN_FRAC(1,4)+3*4*16, RGN_FRAC(0,4)+3*4*16, },
310     16*16     /* every sprite takes 32 consecutive bytes */
311 };
312 
313 static struct GfxDecodeInfo sauro_gfxdecodeinfo[] =
314 {
315 	{ REGION_GFX1, 0, &charlayout, 0, 64 },
316 	{ REGION_GFX2, 0, &charlayout, 0, 64 },
317 	{ REGION_GFX3, 0, &sauro_spritelayout, 0, 64 },
318 	{ -1 } /* end of array */
319 };
320 
321 static struct GfxDecodeInfo trckydoc_gfxdecodeinfo[] =
322 {
323 	{ REGION_GFX1, 0, &charlayout, 0, 64 },
324 	{ REGION_GFX2, 0, &trckydoc_spritelayout, 0, 64 },
325 	{ -1 } /* end of array */
326 };
327 
INTERRUPT_GEN(sauro_interrupt)328 static INTERRUPT_GEN( sauro_interrupt )
329 {
330 	cpu_set_irq_line(1, IRQ_LINE_NMI, PULSE_LINE);
331 	cpu_set_irq_line(1, 0, HOLD_LINE);
332 }
333 
334 static struct YM3526interface ym3812_interface =
335 {
336 	1,			/* 1 chip (no more supported) */
337 	3600000,	/* 3.600000 MHz ? */
338 	{ 100 } 	/* volume */
339 };
340 
341 static MACHINE_DRIVER_START( tecfri )
342 	/* basic machine hardware */
343 	MDRV_CPU_ADD_TAG("main", Z80, 4000000)        /* 4 MHz???*/
344 	MDRV_CPU_VBLANK_INT(irq0_line_hold, 1)
345 
346 	MDRV_FRAMES_PER_SECOND(60)
347 	MDRV_VBLANK_DURATION(5000)  /* frames per second, vblank duration (otherwise sprites lag)*/
348 
349 	/* video hardware */
MDRV_VIDEO_ATTRIBUTES(VIDEO_TYPE_RASTER)350 	MDRV_VIDEO_ATTRIBUTES(VIDEO_TYPE_RASTER)
351 	MDRV_SCREEN_SIZE(32 * 8, 32 * 8)
352 	MDRV_VISIBLE_AREA(1 * 8, 31 * 8 - 1, 2 * 8, 30 * 8 - 1)
353 	MDRV_PALETTE_LENGTH(1024)
354 	MDRV_PALETTE_INIT(RRRR_GGGG_BBBB)
355 
356 	/* sound hardware */
357 	MDRV_SOUND_ADD(YM3812, ym3812_interface)
358 MACHINE_DRIVER_END
359 
360 static MACHINE_DRIVER_START( trckydoc )
361 	MDRV_IMPORT_FROM(tecfri)
362 
363 	MDRV_CPU_MODIFY("main")
364 	MDRV_CPU_MEMORY(trckydoc_readmem, trckydoc_writemem )
365 
366 	MDRV_GFXDECODE(trckydoc_gfxdecodeinfo)
367 
368 	MDRV_VIDEO_START(trckydoc)
369 	MDRV_VIDEO_UPDATE(trckydoc)
370 MACHINE_DRIVER_END
371 
372 static MACHINE_DRIVER_START( sauro )
373 	MDRV_IMPORT_FROM(tecfri)
374 
375 	MDRV_CPU_MODIFY("main")
376 	MDRV_CPU_MEMORY(sauro_readmem, sauro_writemem)
377 	MDRV_CPU_PORTS(sauro_readport, sauro_writeport)
378 
379 	MDRV_CPU_ADD(Z80, 4000000)	/* 4 MHz?*/
380 	MDRV_CPU_FLAGS(CPU_AUDIO_CPU)
381 	MDRV_CPU_MEMORY(sauro_sound_readmem, sauro_sound_writemem)
382 	MDRV_CPU_VBLANK_INT(sauro_interrupt, 8) /* ?*/
383 
384 	MDRV_GFXDECODE(sauro_gfxdecodeinfo)
385 
386 	MDRV_VIDEO_START(sauro)
387 	MDRV_VIDEO_UPDATE(sauro)
388 MACHINE_DRIVER_END
389 
390 /***************************************************************************
391 
392   Game driver(s)
393 
394 ***************************************************************************/
395 
396 ROM_START( sauro )
397 	ROM_REGION( 0x10000, REGION_CPU1, 0 )          /* 64k for code */
398 	ROM_LOAD( "sauro-2.bin",     0x00000, 0x8000, CRC(19f8de25) SHA1(52eea7c0416ab0a8dbb3d1664b2f57ab7a405a67) )
399 	ROM_LOAD( "sauro-1.bin",     0x08000, 0x8000, CRC(0f8b876f) SHA1(6e61a8934a2cc3c80c1f47dd59aa43aaeec12f75) )
400 
401 	ROM_REGION( 0x10000, REGION_CPU2, 0 )          /* 64k for sound CPU */
402 	ROM_LOAD( "sauro-3.bin",     0x00000, 0x8000, CRC(0d501e1b) SHA1(20a56ff30d4fa5d2f483a449703b49153839f6bc) )
403 
404 	ROM_REGION( 0x10000, REGION_GFX1, ROMREGION_DISPOSE )
405 	ROM_LOAD( "sauro-6.bin",     0x00000, 0x8000, CRC(4b77cb0f) SHA1(7b9cb2dca561d81390106c1a5c0533dcecaf6f1a) )
406 	ROM_LOAD( "sauro-7.bin",     0x08000, 0x8000, CRC(187da060) SHA1(1df156e58379bb39acade02aabab6ff1cb7cc288) )
407 
408 	ROM_REGION( 0x10000, REGION_GFX2, ROMREGION_DISPOSE )
409 	ROM_LOAD( "sauro-4.bin",     0x00000, 0x8000, CRC(9b617cda) SHA1(ce26b84ad5ecd6185ae218520e9972645bbf09ad) )
410 	ROM_LOAD( "sauro-5.bin",     0x08000, 0x8000, CRC(a6e2640d) SHA1(346ffcf62e27ce8134f4e5e0dbcf11f110e19e04) )
411 
412 	ROM_REGION( 0x20000, REGION_GFX3, ROMREGION_DISPOSE )
413 	ROM_LOAD( "sauro-8.bin",     0x00000, 0x8000, CRC(e08b5d5e) SHA1(eaaeaa08b19c034ab2a2140f887edffca5f441b9) )
414 	ROM_LOAD( "sauro-9.bin",     0x08000, 0x8000, CRC(7c707195) SHA1(0529f6808b0cec3e12ca51bee189841d21577786) )
415 	ROM_LOAD( "sauro-10.bin",    0x10000, 0x8000, CRC(c93380d1) SHA1(fc9655cc94c2d2058f83eb341be7e7856a08194f) )
416 	ROM_LOAD( "sauro-11.bin",    0x18000, 0x8000, CRC(f47982a8) SHA1(cbaeac272c015d9439f151cfb3449082f11a57a1) )
417 
418 	ROM_REGION( 0x0c00, REGION_PROMS, 0 )
419 	ROM_LOAD( "82s137-3.bin",    0x0000, 0x0400, CRC(d52c4cd0) SHA1(27d6126b46616c06b55d8018c97f6c3d7805ae9e) )  /* Red component */
420 	ROM_LOAD( "82s137-2.bin",    0x0400, 0x0400, CRC(c3e96d5d) SHA1(3f6f21526a4357e4a9a9d56a6f4ef5911af2d120) )  /* Green component */
421 	ROM_LOAD( "82s137-1.bin",    0x0800, 0x0400, CRC(bdfcf00c) SHA1(9faf4d7f8959b64faa535c9945eec59c774a3760) )  /* Blue component */
422 ROM_END
423 
424 ROM_START( trckydoc )
425 	ROM_REGION( 0x10000, REGION_CPU1, 0 )          /* 64k for code */
426 	ROM_LOAD( "trckydoc.d9",  0x0000,  0x8000, CRC(c6242fc3) SHA1(c8a6f6abe8b51061a113ed75fead0479df68ec40) )
427 	ROM_LOAD( "trckydoc.b9",  0x8000,  0x8000, CRC(8645c840) SHA1(79c2acfc1aeafbe94afd9d230200bd7cdd7bcd1b) )
428 
429 	ROM_REGION( 0x10000, REGION_GFX1, ROMREGION_DISPOSE )
430 	ROM_LOAD( "trckydoc.e6",     0x00000, 0x8000, CRC(ec326392) SHA1(e6954fecc501a821caa21e67597914519fbbe58f) )
431 	ROM_LOAD( "trckydoc.g6",     0x08000, 0x8000, CRC(6a65c088) SHA1(4a70c104809d86b4eef6cc0df9452966fe7c9859) )
432 
433 	ROM_REGION( 0x10000, REGION_GFX2, ROMREGION_DISPOSE )
434 	ROM_LOAD( "trckydoc.h1",    0x00000, 0x4000, CRC(8b73cbf3) SHA1(d10f79a38c1596c90bac9cf4c64ba38ae6ecd8cb) )
435 	ROM_LOAD( "trckydoc.e1",    0x04000, 0x4000, CRC(841be98e) SHA1(82da07490b73edcbffc3b9247205aab3a1f7d7ad) )
436 	ROM_LOAD( "trckydoc.c1",    0x08000, 0x4000, CRC(1d25574b) SHA1(924e4376a7fe6cdfff0fa6045aaa3f7c0633d275) )
437 	ROM_LOAD( "trckydoc.a1",    0x0c000, 0x4000, CRC(436c59ba) SHA1(2aa9c155c432a3c81420520c53bb944dcc613a94) )
438 
439 	ROM_REGION( 0x0c00, REGION_PROMS, 0 ) /* colour proms*/
440 	ROM_LOAD( "tdclr3.prm",    0x0000, 0x0100, CRC(671d0140) SHA1(7d5fcd9589c46590b0a240cac428f993201bec2a) )
441 	ROM_LOAD( "tdclr2.prm",    0x0400, 0x0100, CRC(874f9050) SHA1(db40d68f5166657fce0eadcd82143112b0388894) )
442 	ROM_LOAD( "tdclr1.prm",    0x0800, 0x0100, CRC(57f127b0) SHA1(3d2b18a7a31933579f06d92fa0cc3f0e1fe8b98a) )
443 
444 	ROM_REGION( 0x0200, REGION_USER1, 0 ) /* unknown*/
445 	ROM_LOAD( "tdprm.prm",    0x0000, 0x0200,  CRC(5261bc11) SHA1(1cc7a9a7376e65f4587b75ef9382049458656372) )
446 ROM_END
447 
448 static DRIVER_INIT( tecfri )
449 {
450 	/* This game doesn't like all memory to be initialized to zero, it won't
451 	   initialize the high scores */
452 
453 	UINT8 *RAM = memory_region(REGION_CPU1);
454 
455 	memset(&RAM[0xe000], 0, 0x100);
456 	RAM[0xe000] = 1;
457 }
458 
459 GAMEX( 1987, sauro,    0, sauro,    tecfri, tecfri, ROT0, "Tecfri", "Sauro", GAME_IMPERFECT_SOUND )
460 GAME ( 1987, trckydoc, 0, trckydoc, tecfri, tecfri, ROT0, "Tecfri", "Tricky Doc" )
461