summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/drivers/stvinit.c
blob: 034fd570426b525e733a30f49520f7633cfe9e87 (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
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
/* ST-V Inits and SpeedUp Hacks */
/* stvinit.c */

/*
to be honest i think some of these cause more problems than they're worth ...
*/

#include "driver.h"
#include "machine/eeprom.h"
#include "cpu/sh2/sh2.h"
#include "machine/stvprot.h"
#include "includes/stv.h"

#define FIRST_SPEEDUP_SLOT	(2)			// in case we remove/alter the BIOS speedups later



/*
EEPROM write 0000 to address 2d
EEPROM write 0000 to address 2e
EEPROM write 0000 to address 2f
EEPROM write 0000 to address 30
EEPROM write ffff to address 31
EEPROM write ffff to address 32
EEPROM write ffff to address 33
EEPROM write ffff to address 34
EEPROM write ffff to address 35
EEPROM write ffff to address 36
EEPROM write ffff to address 37
EEPROM write ffff to address 38
EEPROM write ffff to address 39
EEPROM write ffff to address 3a
EEPROM write ffff to address 3b
EEPROM write ffff to address 3c
EEPROM write ffff to address 3d
EEPROM write ffff to address 3e
EEPROM write ffff to address 3f
*/
#if 0
static const UINT8 stv_default_eeprom[128] = {
    0x53,0x45,0xff,0xff,0xff,0xff,0x3b,0xe2,
    0x00,0x00,0x00,0x00,0x00,0x02,0x01,0x00,
    0x01,0x01,0x00,0x00,0x00,0x00,0x00,0x08,
    0x08,0xfd,0x10,0x04,0x23,0x2a,0x00,0x00,
    0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,
    0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
    0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
    0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
    0xff,0xff,0x3b,0xe2,0xff,0xff,0x00,0x00,
    0x00,0x01,0x01,0x00,0x01,0x01,0x00,0x00,
    0x00,0x00,0x00,0x08,0x08,0xfd,0x10,0x04,
    0x23,0x2a,0x00,0x00,0x00,0x00,0x00,0x00,
    0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
    0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
    0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
    0xff,0xff,0xff,0xff
};
#endif

static const UINT8 shienryu_default_eeprom[128] = {
	0x53,0x45,0x47,0x41,0x3b,0xe2,0x5e,0x09,
	0x5e,0x09,0x00,0x00,0x00,0x00,0x00,0x02,
	0x01,0x00,0x01,0x01,0x00,0x00,0x00,0x00,
	0x00,0x08,0x18,0xfd,0x18,0x01,0x00,0x00,
	0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,
	0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
	0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
	0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
	0xff,0xff,0xff,0xff,0x5e,0x09,0x00,0x00,
	0x00,0x00,0x00,0x02,0x01,0x00,0x01,0x01,
	0x00,0x00,0x00,0x00,0x00,0x08,0x18,0xfd,
	0x18,0x01,0x00,0x00,0x00,0x00,0x00,0x00,
	0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,
	0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
	0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
	0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff
};

static const UINT8 *stv_default_eeprom;
static int stv_default_eeprom_length;

NVRAM_HANDLER( stv )
{
	if (read_or_write)
		eeprom_save(file);
	else
	{
		eeprom_init(machine, &eeprom_interface_93C46);

		if (file) eeprom_load(file);
		else
		{
			if (stv_default_eeprom)	/* Set the EEPROM to Factory Defaults */
				eeprom_set_data(stv_default_eeprom,stv_default_eeprom_length);
		}
	}
}

/*

06013AE8: MOV.L   @($D4,PC),R5
06013AEA: MOV.L   @($D8,PC),R0
06013AEC: MOV.W   @R5,R5
06013AEE: MOV.L   @R0,R0
06013AF0: AND     R10,R5
06013AF2: TST     R0,R0
06013AF4: BTS     $06013B00
06013AF6: EXTS.W  R5,R5
06013B00: EXTS.W  R5,R5
06013B02: TST     R5,R5
06013B04: BF      $06013B0A
06013B06: TST     R4,R4
06013B08: BT      $06013AE8

   (loops for 375868 instructions)

*/

void install_stvbios_speedups(running_machine *machine)
{
	// flushes 0 & 1 on both CPUs are for the BIOS speedups
	sh2drc_add_pcflush(machine->cpu[0], 0x60154b2);
	sh2drc_add_pcflush(machine->cpu[0], 0x6013aee);

	sh2drc_add_pcflush(machine->cpu[1], 0x60154b2);
	sh2drc_add_pcflush(machine->cpu[1], 0x6013aee);
}

DRIVER_INIT(shienryu)
{
	stv_default_eeprom = shienryu_default_eeprom;
	stv_default_eeprom_length = sizeof(shienryu_default_eeprom);

	// master
	sh2drc_add_pcflush(machine->cpu[0], 0x60041c6);
	// slave
	sh2drc_add_pcflush(machine->cpu[1], 0x600440e);

	DRIVER_INIT_CALL(stv);
}

DRIVER_INIT(prikura)
{
/*
 06018640: MOV.B   @R14,R0  // 60b9228
 06018642: TST     R0,R0
 06018644: BF      $06018640

    (loops for 263473 instructions)
*/
	// master
	sh2drc_add_pcflush(machine->cpu[0], 0x6018640);
	// slave
	sh2drc_add_pcflush(machine->cpu[1], 0x6018c6e);

	DRIVER_INIT_CALL(stv);

	minit_boost = sinit_boost = 0;
	minit_boost_timeslice = sinit_boost_timeslice = ATTOTIME_IN_USEC(50);

}

DRIVER_INIT(hanagumi)
{
/*
    06013E1E: NOP
    0601015E: MOV.L   @($6C,PC),R3
    06010160: MOV.L   @R3,R0  (6094188)
    06010162: TST     R0,R0
    06010164: BT      $0601015A
    0601015A: JSR     R14
    0601015C: NOP
    06013E20: MOV.L   @($34,PC),R3
    06013E22: MOV.B   @($00,R3),R0
    06013E24: TST     R0,R0
    06013E26: BT      $06013E1C
    06013E1C: RTS
    06013E1E: NOP

   (loops for 288688 instructions)
*/
	sh2drc_add_pcflush(machine->cpu[0], 0x6010160);

	DRIVER_INIT_CALL(stv);
}




/* these idle loops might change if the interrupts change / are fixed because i don't really think these are vblank waits... */

/* puyosun

CPU0: Aids Screen

06021CF0: MOV.B   @($13,GBR),R0 (60ffc13)
06021CF2: CMP/PZ  R0
06021CF4: BT      $06021CF0
   (loops for xxx instructions)

   this is still very slow .. but i don't think it can be sped up further


*/

DRIVER_INIT(puyosun)
{
	sh2drc_add_pcflush(machine->cpu[0], 0x6021cf0);

	sh2drc_add_pcflush(machine->cpu[1], 0x60236fe);

	DRIVER_INIT_CALL(stv);

	minit_boost = sinit_boost = 0;
	minit_boost_timeslice = sinit_boost_timeslice = ATTOTIME_IN_USEC(50);
}

/* mausuke

CPU0 Data East Logo:
060461A0: MOV.B   @($13,GBR),R0  (60ffc13)
060461A2: CMP/PZ  R0
060461A4: BT      $060461A0
   (loops for 232602 instructions)

*/

DRIVER_INIT(mausuke)
{
	sh2drc_add_pcflush(machine->cpu[0], 0x60461A0);

	DRIVER_INIT_CALL(stv);

	minit_boost = sinit_boost = 0;
	minit_boost_timeslice = sinit_boost_timeslice = ATTOTIME_IN_USEC(50);
}

DRIVER_INIT(cottonbm)
{
//  sh2drc_add_pcflush(machine->cpu[0], 0x6030ee2);
//  sh2drc_add_pcflush(machine->cpu[1], 0x6032b52);

	DRIVER_INIT_CALL(stv);

	minit_boost_timeslice = sinit_boost_timeslice = ATTOTIME_IN_USEC(10);
}

DRIVER_INIT(cotton2)
{
	sh2drc_add_pcflush(machine->cpu[0], 0x6031c7a);
	sh2drc_add_pcflush(machine->cpu[1], 0x60338ea);

	DRIVER_INIT_CALL(stv);

	minit_boost_timeslice = sinit_boost_timeslice = ATTOTIME_IN_USEC(50);
}

DRIVER_INIT(dnmtdeka)
{
	// install all 3 speedups on both master and slave
	sh2drc_add_pcflush(machine->cpu[0], 0x6027c90);
	sh2drc_add_pcflush(machine->cpu[0], 0xd04);
	sh2drc_add_pcflush(machine->cpu[0], 0x60051f2);

	sh2drc_add_pcflush(machine->cpu[1], 0x6027c90);
	sh2drc_add_pcflush(machine->cpu[1], 0xd04);
	sh2drc_add_pcflush(machine->cpu[1], 0x60051f2);

	DRIVER_INIT_CALL(stv);
}

DRIVER_INIT(diehard)
{
	// install all 3 speedups on both master and slave
	sh2drc_add_pcflush(machine->cpu[0], 0x6027c98);
	sh2drc_add_pcflush(machine->cpu[0], 0xd04);
	sh2drc_add_pcflush(machine->cpu[0], 0x60051f2);

	sh2drc_add_pcflush(machine->cpu[1], 0x6027c98);
	sh2drc_add_pcflush(machine->cpu[1], 0xd04);
	sh2drc_add_pcflush(machine->cpu[1], 0x60051f2);

	DRIVER_INIT_CALL(stv);
}

DRIVER_INIT(fhboxers)
{
	sh2drc_add_pcflush(machine->cpu[0], 0x60041c2);
	sh2drc_add_pcflush(machine->cpu[0], 0x600bb0a);
	sh2drc_add_pcflush(machine->cpu[0], 0x600b31e);

	DRIVER_INIT_CALL(stv);
}




static READ32_HANDLER( groovef_hack1_r )
{
	if(cpu_get_pc(space->cpu) == 0x6005e7c) stv_workram_h[0x0fffcc/4] = 0x00000000;
//  popmessage("1 %08x",cpu_get_pc(space->cpu));
	return stv_workram_h[0x0fffcc/4];
}

static READ32_HANDLER( groovef_hack2_r )
{
	if(cpu_get_pc(space->cpu) == 0x6005e86) stv_workram_h[0x0ca6cc/4] = 0x00000000;
//  popmessage("2 %08x",cpu_get_pc(space->cpu));
	return stv_workram_h[0x0ca6cc/4];
}

DRIVER_INIT( groovef )
{
	sh2drc_add_pcflush(machine->cpu[0], 0x6005e7c);
	sh2drc_add_pcflush(machine->cpu[0], 0x6005e86);
	sh2drc_add_pcflush(machine->cpu[0], 0x60a4970);

	sh2drc_add_pcflush(machine->cpu[1], 0x60060c2);

	/* prevent game from hanging on startup -- todo: remove these hacks */
	memory_install_read32_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x60ca6cc, 0x60ca6cf, 0, 0, groovef_hack2_r );
	memory_install_read32_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x60fffcc, 0x60fffcf, 0, 0, groovef_hack1_r );

	DRIVER_INIT_CALL(stv);

	minit_boost = sinit_boost = 0;
	minit_boost_timeslice = sinit_boost_timeslice = ATTOTIME_IN_USEC(50);
}

/* danchih hangs on the title screen without this hack .. */

/*  info from Saturnin Author

> seems to be fully playable, can you be more specific about the scu level 2
> dma stuff? i'd prefer a real solution than this hack, it could affect
other
> games too for all i know.

Unfortunalely I don't know much more about it : I got this info from a
person
who ran the SGL object files through objdump ...

0x060ffcbc _DMASt_SCU1
0x060ffcbd _DMASt_SCU2

But when I got games looping on thoses locations, the problem was related to
a
SCU interrupt (in indirect mode) which was registered but never triggered, a
bug in my SH2 core prevented the SR bits to be correctly filled in some
cases ...
When the interrupt is correctly triggered, I don't have these loops anymore,
and Hanafuda works without hack now (unless the sound ram one)


*/

static READ32_HANDLER( danchih_hack_r )
{
	logerror( "DMASt_SCU1: Read at PC=%08x, value = %08x\n", cpu_get_pc(space->cpu), stv_workram_h[0x0ffcbc/4] );
	if (cpu_get_pc(space->cpu)==0x06028b28) return 0x0e0c0000;

	return stv_workram_h[0x0ffcbc/4];
}

DRIVER_INIT( danchih )
{
	sh2drc_add_pcflush(machine->cpu[0], 0x6028b28);
	sh2drc_add_pcflush(machine->cpu[0], 0x6028c8e);
	sh2drc_add_pcflush(machine->cpu[1], 0x602ae26);

	/* prevent game from hanging on title screen -- todo: remove these hacks */
	memory_install_read32_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x60ffcbc, 0x60ffcbf, 0, 0, danchih_hack_r );

	DRIVER_INIT_CALL(stv);

	minit_boost_timeslice = sinit_boost_timeslice = ATTOTIME_IN_USEC(5);

}

/*
060011AE: AND     #$0F,R0
060011B0: MOV     #$5E,R1
060011B2: ADD     R5,R1
060011B4: MOV.B   R0,@R1
060011B6: MOV     R5,R0
060011B8: ADD     #$70,R0

060011BA: MOV.B   @(R0,R4),R0 <- reads 0x02020000,cause of the crash
060011BC: RTS
060011BE: NOP
060131AA: CMP/EQ  #$01,R0
060131AC: BT      $0601321C
060131AE: CMP/EQ  #$02,R0
060131B0: BT      $0601324A

TODO: understand where it gets 0x02020000,it must be 0x0000000

*/

static READ32_HANDLER( astrass_hack_r )
{
	/*PC reads at 0x60011ba if -debug is active?*/
	if(cpu_get_pc(space->cpu)==0x60011b8 || cpu_get_pc(space->cpu) == 0x60011ba) return 0x00000000;

	return stv_workram_h[0x000770/4];
}

DRIVER_INIT( astrass )
{
	sh2drc_add_pcflush(machine->cpu[0], 0x60011b8);
	sh2drc_add_pcflush(machine->cpu[0], 0x605b9da);

	memory_install_read32_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x06000770, 0x06000773, 0, 0, astrass_hack_r );

	install_astrass_protection(machine);

	DRIVER_INIT_CALL(stv);
}

DRIVER_INIT(thunt)
{
	sh2drc_add_pcflush(machine->cpu[0], 0x602A024);
	sh2drc_add_pcflush(machine->cpu[0], 0x6013EEA);
	sh2drc_add_pcflush(machine->cpu[1], 0x602AAF8);

	DRIVER_INIT_CALL(stv);

	minit_boost_timeslice = sinit_boost_timeslice = ATTOTIME_IN_USEC(1);
}

DRIVER_INIT(sandor)
{
	sh2drc_add_pcflush(machine->cpu[0], 0x602a0f8);
	sh2drc_add_pcflush(machine->cpu[0], 0x6013fbe);
	sh2drc_add_pcflush(machine->cpu[1], 0x602abcc);

	DRIVER_INIT_CALL(stv);
	minit_boost_timeslice = sinit_boost_timeslice = ATTOTIME_IN_USEC(1);

}

DRIVER_INIT(grdforce)
{
	sh2drc_add_pcflush(machine->cpu[0], 0x6041e32);
	sh2drc_add_pcflush(machine->cpu[1], 0x6043aa2);

	DRIVER_INIT_CALL(stv);

	minit_boost_timeslice = sinit_boost_timeslice = ATTOTIME_IN_USEC(50);
}

DRIVER_INIT(batmanfr)
{
	sh2drc_add_pcflush(machine->cpu[0], 0x60121c0);
	sh2drc_add_pcflush(machine->cpu[1], 0x60125bc);

	DRIVER_INIT_CALL(stv);

	minit_boost = sinit_boost = 0;
	minit_boost_timeslice = sinit_boost_timeslice = ATTOTIME_IN_USEC(50);
}

DRIVER_INIT(colmns97)
{
	sh2drc_add_pcflush(machine->cpu[1], 0x60298a2);

	DRIVER_INIT_CALL(stv);

	minit_boost = sinit_boost = 0;

}

DRIVER_INIT(winterht)
{
	sh2drc_add_pcflush(machine->cpu[0], 0x6098aea);
	sh2drc_add_pcflush(machine->cpu[1], 0x609ae4e);

	DRIVER_INIT_CALL(stv);

	minit_boost_timeslice = sinit_boost_timeslice = ATTOTIME_IN_USEC(2);
}

DRIVER_INIT(seabass)
{
	sh2drc_add_pcflush(machine->cpu[0], 0x602cbfa);
	sh2drc_add_pcflush(machine->cpu[1], 0x60321ee);

	DRIVER_INIT_CALL(stv);

	minit_boost_timeslice = sinit_boost_timeslice = ATTOTIME_IN_USEC(5);
}

DRIVER_INIT(vfremix)
{
	sh2drc_add_pcflush(machine->cpu[0], 0x602c30c);
	sh2drc_add_pcflush(machine->cpu[1], 0x604c332);

	DRIVER_INIT_CALL(stv);

	minit_boost_timeslice = sinit_boost_timeslice = ATTOTIME_IN_USEC(20);
}

DRIVER_INIT(sss)
{
	sh2drc_add_pcflush(machine->cpu[0], 0x6026398);
	sh2drc_add_pcflush(machine->cpu[1], 0x6028cd6);

	install_standard_protection(machine);

	DRIVER_INIT_CALL(stv);

	minit_boost_timeslice = sinit_boost_timeslice = ATTOTIME_IN_USEC(50);
}

DRIVER_INIT(othellos)
{
	sh2drc_add_pcflush(machine->cpu[0], 0x602bcbe);
	sh2drc_add_pcflush(machine->cpu[1], 0x602d92e);

	DRIVER_INIT_CALL(stv);

	minit_boost_timeslice = sinit_boost_timeslice = ATTOTIME_IN_USEC(50);

}

DRIVER_INIT(sasissu)
{
	sh2drc_add_pcflush(machine->cpu[1], 0x60710be);

	DRIVER_INIT_CALL(stv);

	minit_boost_timeslice = sinit_boost_timeslice = ATTOTIME_IN_USEC(2);
}

DRIVER_INIT(gaxeduel)
{
	sh2drc_add_pcflush(machine->cpu[0], 0x6012ee4);

	DRIVER_INIT_CALL(stv);
}

DRIVER_INIT(suikoenb)
{
	sh2drc_add_pcflush(machine->cpu[0], 0x6013f7a);

	DRIVER_INIT_CALL(stv);
}


DRIVER_INIT(sokyugrt)
{
	DRIVER_INIT_CALL(stv);

	minit_boost_timeslice = sinit_boost_timeslice = ATTOTIME_IN_USEC(50);
}

DRIVER_INIT(znpwfv)
{
	sh2drc_add_pcflush(machine->cpu[0], 0x6012ec2);
	sh2drc_add_pcflush(machine->cpu[1], 0x60175a6);

	DRIVER_INIT_CALL(stv);
	minit_boost_timeslice = sinit_boost_timeslice = ATTOTIME_IN_NSEC(500);
}

DRIVER_INIT(twcup98)
{
	sh2drc_add_pcflush(machine->cpu[0], 0x605edde);
	sh2drc_add_pcflush(machine->cpu[1], 0x6062bca);

	DRIVER_INIT_CALL(stv);
	install_standard_protection(machine);

	minit_boost_timeslice = sinit_boost_timeslice = ATTOTIME_IN_USEC(5);
}

DRIVER_INIT(smleague)
{
	sh2drc_add_pcflush(machine->cpu[0], 0x6063bf4);
	sh2drc_add_pcflush(machine->cpu[1], 0x6062bca);

	DRIVER_INIT_CALL(stv);

	minit_boost_timeslice = sinit_boost_timeslice = ATTOTIME_IN_USEC(50);
}

DRIVER_INIT(finlarch)
{
	sh2drc_add_pcflush(machine->cpu[0], 0x6064d60);

	DRIVER_INIT_CALL(stv);

}

DRIVER_INIT(maruchan)
{
	sh2drc_add_pcflush(machine->cpu[0], 0x601ba46);
	sh2drc_add_pcflush(machine->cpu[1], 0x601ba46);

	DRIVER_INIT_CALL(stv);

	minit_boost_timeslice = sinit_boost_timeslice = ATTOTIME_IN_USEC(50);
}

DRIVER_INIT(pblbeach)
{
	sh2drc_add_pcflush(machine->cpu[0], 0x605eb78);

	DRIVER_INIT_CALL(stv);
}

DRIVER_INIT(shanhigw)
{
	sh2drc_add_pcflush(machine->cpu[0], 0x6020c5c);

	DRIVER_INIT_CALL(stv);
}

DRIVER_INIT(elandore)
{
	sh2drc_add_pcflush(machine->cpu[0], 0x604eac0);
	sh2drc_add_pcflush(machine->cpu[1], 0x605340a);

	install_standard_protection(machine);

	DRIVER_INIT_CALL(stv);
	minit_boost_timeslice = sinit_boost_timeslice = ATTOTIME_IN_USEC(0);

}

DRIVER_INIT(rsgun)
{
	sh2drc_add_pcflush(machine->cpu[0], 0x6034d04);
	sh2drc_add_pcflush(machine->cpu[1], 0x6036152);

	install_standard_protection(machine);

	DRIVER_INIT_CALL(stv);

	minit_boost_timeslice = sinit_boost_timeslice = ATTOTIME_IN_USEC(20);

}

DRIVER_INIT(ffreveng)
{
	install_standard_protection(machine);
	DRIVER_INIT_CALL(stv);
}

DRIVER_INIT(decathlt)
{
	install_decathlt_protection(machine);
	DRIVER_INIT_CALL(stv);
}

DRIVER_INIT(nameclv3)
{
	sh2drc_add_pcflush(machine->cpu[0], 0x601eb4c);
	sh2drc_add_pcflush(machine->cpu[1], 0x602b80e);

	DRIVER_INIT_CALL(stv);
}