forked from mamedev/mame
-
Notifications
You must be signed in to change notification settings - Fork 0
/
harddriv.cpp
5408 lines (4404 loc) · 337 KB
/
harddriv.cpp
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
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// license:BSD-3-Clause
// copyright-holders:Aaron Giles
/***************************************************************************
Driver for Atari polygon racer games
This collection of games uses many CPUs and many boards in many
different combinations. There are 3 different main boards:
- the "driver" board (A045988) is the original Hard Drivin' PCB
- Hard Drivin'
- Race Drivin' Upgrade
- the "multisync" board (A046901)
- STUN Runner
- Steel Talons
- Hard Drivin' Compact
- Race Drivin' Compact
- Street Drivin'
- the "multisync II" board (A049852)
- Hard Drivin's Airborne
To first order, all of the above boards had the same basic features:
a 68010 @ 8MHz to drive the whole game
a TMS34010 @ 48MHz (GSP) to render the polygons and graphics
a TMS34012 @ 50MHz (PSP, labelled SCX6218UTP) to expand pixels
a TMS34010 @ 50MHz (MSP, optional) to handle in-game calculations
The original "driver" board had 1MB of VRAM. The "multisync" board
reduced that to 512k. The "multisync II" board went back to a full
MB again.
Stacked on top of the main board were two or more additional boards
that were accessible through an expansion bus. Each game had at least
an ADSP board and a sound board. Later games had additional boards for
extra horsepower or for communications between multiple players.
-----------------------------------------------------------------------
The ADSP board is usually the board stacked closest to the main board.
It also comes in four varieties, though these do not match
one-for-one with the main boards listed above. They are:
- the "ADSP" board (A044420)
- early Hard Drivin' revisions
- the "ADSP II" board (A047046)
- later Hard Drivin'
- STUN Runner
- Hard Drivin' Compact
- Race Drivin' Upgrade
- Race Drivin' Compact
- the "DS III" board (A049096)
- Steel Talons
- Street Drivin'
- the "DS IV" board (A051973)
- Hard Drivin's Airborne
These boards are the workhorses of the game. They contain a single
8MHz ADSP-2100 (ADSP and ADSP II) or 12MHz ADSP-2101 (DS III and DS IV)
chip that is responsible for all the polygon transformations, lighting,
and slope computations. Along with the DSP, there are several high-speed
serial-access ROMs and RAMs.
The "ADSP II" board is nearly identical to the original "ADSP" board
except that is has space for extra serial ROM data. The "DS III" is
an advanced design that contains space for a bunch of complex sound
circuitry that was not used on Steel Talons, but was used for the
prototype Street Drivin'. The "DS IV" looks to have the same board
layout as the "DS III", but the sound circuitry is actually populated.
-----------------------------------------------------------------------
Three sound boards were used:
- the "driver sound" board (A046491)
- Hard Drivin'
- Hard Drivin' Compact
- Race Drivin' Upgrade
- Race Drivin' Compact
- the "JSA II" board
- STUN Runner
- the "JSA IIIS" board
- Steel Talons
The "driver sound" board runs with a 68000 master and a TMS32010 slave
driving a DAC. The "JSA" boards are both standard Atari sound boards
with a 6502 driving a YM2151 and an OKI6295 ADPCM chip. Hard Drivin's
Airborne uses the "DS IV" board for its sound.
-----------------------------------------------------------------------
In addition, there were a number of supplemental boards that were
included with certain games:
- the "DSK" board (A047724)
- Race Drivin' Upgrade
- Race Drivin' Compact
- Street Drivin'
- the "DSPCOM" board (A049349)
- Steel Talons
- the "DSK II" board (A051028)
- Hard Drivin' Airborne
-----------------------------------------------------------------------
There are a total of 8 known games (plus variants) on this hardware:
Hard Drivin' Cockpit
- "driver" board (8MHz 68010, 2x50MHz TMS34010, 50MHz TMS34012)
- "ADSP" or "ADSP II" board (8MHz ADSP-2100)
- "driver sound" board (8MHz 68000, 20MHz TMS32010)
Hard Drivin' Compact
- "multisync" board (8MHz 68010, 2x50MHz TMS34010, 50MHz TMS34012)
- "ADSP II" board (8MHz ADSP-2100)
- "driver sound" board (8MHz 68000, 20MHz TMS32010)
S.T.U.N. Runner
- "multisync" board (8MHz 68010, 2x50MHz TMS34010, 50MHz TMS34012)
- "ADSP II" board (8MHz ADSP-2100)
- "JSA II" sound board (1.7MHz 6502, YM2151, OKI6295)
Race Drivin' Cockpit
- "driver" board (8MHz 68010, 50MHz TMS34010, 50MHz TMS34012)
- "ADSP" or "ADSP II" board (8MHz ADSP-2100)
- "DSK" board (40MHz DSP32C, 20MHz TMS32015)
- "driver sound" board (8MHz 68000, 20MHz TMS32010)
Race Drivin' Compact
- "multisync" board (8MHz 68010, 50MHz TMS34010, 50MHz TMS34012)
- "ADSP II" board (8MHz ADSP-2100)
- "DSK" board (40MHz DSP32C, 20MHz TMS32015)
- "driver sound" board (8MHz 68000, 20MHz TMS32010)
Steel Talons
- "multisync" board (8MHz 68010, 2x50MHz TMS34010, 50MHz TMS34012)
- "DS III" board (12MHz ADSP-2101)
- "JSA IIIS" sound board (1.7MHz 6502, YM2151, OKI6295)
- "DSPCOM" I/O board (10MHz ADSP-2105)
Street Drivin'
- "multisync" board (8MHz 68010, 50MHz TMS34010, 50MHz TMS34012)
- "DS III" board (12MHz ADSP-2101, plus 10MHz ADSP-2105 for sound)
- "DSK" board (40MHz DSP32C, 20MHz TMS32015)
Hard Drivin's Airborne (prototype)
- "multisync ii" main board (8MHz 68010, 50MHz TMS34010, 50MHz TMS34012)
- "DS IV" board (12MHz ADSP-2101, plus 2x10MHz ADSP-2105s for sound)
- "DSK II" board (40MHz DSP32C, 20MHz TMS32015)
BMX Heat (prototype)
- unknown boards ???
Police Trainer (prototype)
- unknown boards ???
Metal Maniax (prototype)
- reworked hardware that is similar but not of the same layout
TODO:
- Fix serial communications between the two DS III/IV sound ADSPs
(The auxillary DSP is used to process the output of the sound DSP)
****************************************************************************
Race Drivin' Compact
Atari, 1990
PCB Layouts
-----------
Driver Sound
A046491
|------------------------------------------------------------------------------------------------------|
| |---------------------| J3 |
| |---------------------| SOCKET SOCKET |
| |
| SOCKET SOCKET |
| 6116 |
| |-----| SOCKET 136052-1126.30A
| | | 6116 |
| | | 136077-1033.45N CY7C168 136077-1017.45C 136052-3125.45A
| | 6 | |
| | 8 | 6264 CY7C168 SOCKET 136052-1124.55A
| 16MHz | 0 | |---| |
| | 0 | 136077-1032-70N CY7C168 |TMS| SOCKET 136052-1123.65A
| LED | 0 | | | |
| | | 6264 CY7C168 |320|
| | | |C10| |
| | | LED 20MHz| | |
| |-----| | | 95C 95A |
| |---| GAL16V8 GAL16V8 |
| (136052-1140) (136052-1139)|
| |
| |
| LED |
| J2 J5 TL084 TL084 TL084 |
|------------------------------------------------------------------------------------------------------|
Notes:
68000 clock input - 8.000MHz [16/2]
DSK
A047724-01
|-----------------------------------------------|
| (SLAPSTICK?) |---------------------| |
| DIP20_SOCKET |---------------------| |
| LED|
| 40B 60B |
| GAL20V8A GAL20V8A |
| 136077-1025 136077-1026 |
|MK48Z02B.10C MK48Z02B.30C |
| |
| |
|62256 62256 62256 |
| |
| |
|136078-1031.10E |-----------| 62256 |
| 136078-1030.30E| | |
| |137661-100 | |
|SOCKET SOCKET | | 62256 |
| | | |
| |-------| | | |
| |137665-| |-----------| 62256 |
| |1020 | |
| |LC9040 | 40MHz |
| |-------| |
| LED 20MHz |
|-----------------------------------------------|
ADSP II
A047046-01
|------------------------------------------------------------------------------------------------------|
| |---------------------| |
|CY7C168 CY7C168 |---------------------| CY7C168 6264 6264 |
| |
|CY7C168 CY7C168 LED CY7C168 |
| |
|CY7C168 CY7C168 CY7C168 |
| |
| CY7C168 |
| 32MHz |
|CY7C168 CY7C168 |-------| CY7C168 |
| | ADSP | |
|CY7C168 CY7C168 | 2100 | CY7C168 |
| | | |
|CY7C168 CY7C168 |-------| CY7C168 |
| |
| CY7C168 |
|136077-2022.10H 6264 6264 |
| 136077-2021.9/10H |
| SOCKET |
|136077-2024.10K |
| 136077-2023.9/10K |
| SOCKET |
| LED LED |
|------------------------------------------------------------------------------------------------------|
MULTISYNC
A046901
|------------------------------------------------------------------------------------------------------|
| |---------------------| 136078-4001.210R 136078-4009.210V |
| |---------------------| 136078-4003.210S 136078-1011.210W |
| 136078-4005.210T 136078-1013.210X |
| 68681 6264 6264 MK48Z02B.210E 136078-4007.210U 136078-4015.210Y |
| 3.6864MHz (SLAPSTICK) |
| (DIP20) 136078-4002.200R 136078-4010.200V |
|J2 137412-117 136078-4004.200S 136078-1012.200W |
| 6264 6264 MK48T02B.200E 136078-4006.200T 136078-1014.200X |
| 136078-4008.200U 136078-4016.200Y |
|J3 |
| 136068-1168.195U |
| (82S123 PROM) |
| |----------------------------| J13 |
| | | |
|J6 | 68010 | |
| | | |
| |----------------------------| |
| |-------| 32MHZ |
|J5 32MHz |TMS | |
| 48MHz |34010 | |
| | | LED |
| |-------| |
| |
| |
|J4 DSW(8) |-------| |
| |SCX | |
| LED LED |6218UTP| |
| | | |
| |-------| |-------| |
|J15 | | |
| | | |
| J12 LED | | 42C4064 42C4064 42C4064 42C4064 |
| |-------| |
|J14 (EMPTY PLCC68 SOCKET) 42C4064 42C4064 42C4064 42C4064 |
| |
| 42C4064 42C4064 42C4064 42C4064 |
| ADC0809 |--EMPTY_SOCKETS--| |
|J9 DIP20 DIP20 42C4064 42C4064 42C4064 42C4064 |
| J1 |
| DIP20 DIP20 CY2149 CY2149 CY2149 |
| LED |
| DIP20 DIP20 CY2149 CY2149 CY2149 |
|J8 LED LED |
| LED LED DIP20 DIP20 J10 |
|------------------------------------------------------------------------------------------------------|
Notes:
68010 clock input - 8.000MHz [32/4]
34010 clock input - 48.000MHz
****************************************************************************/
#include "emu.h"
#include "harddriv.h"
#include "machine/timer.h"
#include "machine/watchdog.h"
#include "speaker.h"
#include "racedrivpan.lh"
/*************************************
*
* Driver board memory maps
*
*************************************/
harddriv_state::harddriv_state(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) :
device_t(mconfig, type, tag, owner, clock),
m_maincpu(*this, "maincpu"),
m_gsp(*this, "gsp"),
m_msp(*this, "msp"),
m_adsp(*this, "adsp"),
m_jsacpu(*this, "jsacpu"),
m_dsp32(*this, "dsp32"),
m_ds3sdsp(*this, "ds3sdsp"),
m_ds3xdsp(*this, "ds3xdsp"),
m_ds3sdsp_region(*this, "ds3sdsp"),
m_ds3xdsp_region(*this, "ds3xdsp"),
m_ldac(*this, "ldac"),
m_rdac(*this, "rdac"),
m_harddriv_sound(*this, "harddriv_sound"),
m_jsa(*this, "jsa"),
m_screen(*this, "screen"),
m_duartn68681(*this, "duartn68681"),
m_adc8(*this, "adc8"),
m_lamps(*this, "lamp%u", 1U),
m_sel(*this, "SEL%u", 1U),
m_wheel(*this, "wheel"),
m_hd34010_host_access(0),
m_msp_ram(*this, "msp_ram"),
m_dsk_ram(nullptr),
m_dsk_rom(nullptr),
m_dsk_10c(*this, "dsk_10c"),
m_dsk_30c(*this, "dsk_30c"),
m_dsk_pio_access(0),
m_m68k_sloop_base(nullptr),
m_m68k_sloop_alt_base(nullptr),
m_200e(*this, "200e"),
m_210e(*this, "210e"),
m_adsp_data_memory(*this, "adsp_data"),
m_adsp_pgm_memory(*this, "adsp_pgm_memory"),
m_ds3sdsp_data_memory(*this, "ds3sdsp_data"),
m_ds3sdsp_pgm_memory(*this, "ds3sdsp_pgm"),
m_ds3xdsp_pgm_memory(*this, "ds3xdsp_pgm"),
m_dsp32_ram(*this, "dsp32_ram"),
m_gsp_protection(nullptr),
m_gsp_speedup_pc(0),
m_msp_speedup_addr(nullptr),
m_msp_speedup_pc(0),
m_ds3_speedup_addr(nullptr),
m_ds3_speedup_pc(0),
m_ds3_transfer_pc(0),
m_gsp_multisync(0),
m_gsp_vram(*this, "gsp_vram"),
m_gsp_control_lo(*this, "gsp_control_lo"),
m_gsp_control_hi(*this, "gsp_control_hi"),
m_gsp_paletteram_lo(*this, "gsp_palram_lo", 1024*2, ENDIANNESS_LITTLE),
m_gsp_paletteram_hi(*this, "gsp_palram_hi", 1024*2, ENDIANNESS_LITTLE),
m_in0(*this, "IN0"),
m_sw1(*this, "SW1"),
m_a80000(*this, "a80000"),
m_12badc(*this, "12BADC.%u", 0),
m_irq_state(0),
m_gsp_irq_state(0),
m_msp_irq_state(0),
m_adsp_irq_state(0),
m_ds3sdsp_irq_state(0),
m_duart_irq_state(0),
m_last_gsp_shiftreg(0),
m_m68k_zp1(0),
m_m68k_zp2(0),
m_m68k_adsp_buffer_bank(0),
m_adsp_halt(0),
m_adsp_br(0),
m_adsp_xflag(0),
m_adsp_sim_address(0),
m_adsp_som_address(0),
m_adsp_eprom_base(0),
m_sim_memory(*this, "user1"),
m_adsp_pgm_memory_word(nullptr),
m_ds3_sdata_memory(nullptr),
m_ds3_sdata_memory_size(0),
m_ds3_gcmd(0),
m_ds3_gflag(0),
m_ds3_g68irqs(0),
m_ds3_gfirqs(0),
m_ds3_g68flag(0),
m_ds3_send(0),
m_ds3_reset(0),
m_ds3_gdata(0),
m_ds3_g68data(0),
m_ds3_sim_address(0),
m_ds3_scmd(0),
m_ds3_sflag(0),
m_ds3_s68irqs(0),
m_ds3_sfirqs(0),
m_ds3_s68flag(0),
m_ds3_sreset(0),
m_ds3_sdata(0),
m_ds3_s68data(0),
m_ds3_sdata_address(0),
m_ds3sdsp_timer_en(0),
m_ds3sdsp_sdata(0),
m_ds3sdsp_internal_timer(*this, "ds3sdsp_timer"),
m_ds3xdsp_timer_en(0),
m_ds3xdsp_sdata(0),
m_ds3xdsp_internal_timer(*this, "ds3xdsp_timer"),
m_adc_control(0),
m_adc12_select(0),
m_adc12_byte(0),
m_adc12_data(0),
m_hdc68k_last_wheel(0),
m_hdc68k_last_port1(0),
m_hdc68k_wheel_edge(0),
m_hdc68k_shifter_state(0),
m_st68k_sloop_bank(0),
m_st68k_last_alt_sloop_offset(0),
m_next_msp_sync(0),
m_vram_mask(0),
m_shiftreg_enable(0),
m_gsp_shiftreg_source(nullptr),
m_gfx_finescroll(0),
m_gfx_palettebank(0),
m_duart(*this, "duartn68681"),
m_asic65(*this, "asic65"),
m_sound_int_state(0),
m_video_int_state(0),
m_palette(*this, "palette"),
m_slapstic(*this, "slapstic"),
m_slapstic_bank(*this, "slapstic_bank"),
m_rs232(*this, "rs232")
{
int i;
for (i = 0; i < 2; i++)
{
m_gsp_speedup_addr[i] = nullptr;
m_rddsp32_sync[i] = nullptr;
}
for (i = 0; i < 4; i++)
{
m_gsp_speedup_count[i] = 0;
m_msp_speedup_count[i] = 0;
m_adsp_speedup_count[i] = 0;
}
for (i = 0; i < 32; i++)
{
m_ds3sdsp_regs[i] = 0;
m_ds3xdsp_regs[i] = 0;
}
for (i = 0; i < 0x8000 / 2; i++)
{
m_som_memory[i] = 0;
}
for (i = 0; i < MAX_MSP_SYNC; i++)
{
m_dataptr[i] = nullptr;
m_dataval[i] = 0;
}
for (i = 0; i < 65536 * 4; i++)
{
m_mask_table[i] = 0;
}
}
class harddriv_new_state : public driver_device
{
public:
harddriv_new_state(const machine_config &mconfig, device_type type, const char *tag) :
driver_device(mconfig, type, tag),
m_mainpcb(*this, "mainpcb"),
m_leftpcb(*this, "leftpcb"),
m_rightpcb(*this, "rightpcb")
{ }
void steeltal1_machine(machine_config &config);
void harddriv_machine(machine_config &config);
void hdrivairp_machine(machine_config &config);
void harddrivc_machine(machine_config &config);
void racedrivb1_machine(machine_config &config);
void racedrivc1_machine(machine_config &config);
void steeltal_machine(machine_config &config);
void racedriv_panorama_machine(machine_config &config);
void hdrivair_machine(machine_config &config);
void racedriv_machine(machine_config &config);
void strtdriv_machine(machine_config &config);
void steeltalp_machine(machine_config &config);
void racedrivc_machine(machine_config &config);
void stunrun_machine(machine_config &config);
private:
TIMER_DEVICE_CALLBACK_MEMBER(hack_timer);
void tx_a(int state);
required_device<harddriv_state> m_mainpcb;
optional_device<harddriv_state> m_leftpcb;
optional_device<harddriv_state> m_rightpcb;
};
void harddriv_state::driver_68k_map(address_map &map)
{
map.unmap_value_high();
map(0x000000, 0x0fffff).rom();
map(0x600000, 0x603fff).r(FUNC(harddriv_state::hd68k_port0_r));
map(0x604000, 0x607fff).w(FUNC(harddriv_state::hd68k_nwr_w));
map(0x608000, 0x60bfff).w("watchdog", FUNC(watchdog_timer_device::reset16_w));
map(0x60c000, 0x60ffff).w(FUNC(harddriv_state::hd68k_irq_ack_w));
map(0xa00000, 0xa7ffff).w(FUNC(harddriv_state::hd68k_wr0_write));
map(0xa80000, 0xafffff).r(FUNC(harddriv_state::hd68k_a80000_r)).w(FUNC(harddriv_state::hd68k_wr1_write));
map(0xb00001, 0xb00001).mirror(0x7fffe).r("adc8", FUNC(adc0808_device::data_r));
map(0xb00000, 0xb7ffff).w(FUNC(harddriv_state::hd68k_wr2_write));
map(0xb80000, 0xbfffff).rw(FUNC(harddriv_state::hd68k_adc12_r), FUNC(harddriv_state::hd68k_adc_control_w));
map(0xc00000, 0xc03fff).rw(FUNC(harddriv_state::hd68k_gsp_io_r), FUNC(harddriv_state::hd68k_gsp_io_w));
map(0xc04000, 0xc07fff).rw(FUNC(harddriv_state::hd68k_msp_io_r), FUNC(harddriv_state::hd68k_msp_io_w));
map(0xff0000, 0xff001f).rw("duartn68681", FUNC(mc68681_device::read), FUNC(mc68681_device::write)).umask16(0xff00);
map(0xff4000, 0xff4fff).rw(FUNC(harddriv_state::hd68k_zram_r), FUNC(harddriv_state::hd68k_zram_w));
map(0xff8000, 0xffffff).ram();
}
void harddriv_state::driver_gsp_map(address_map &map)
{
map.unmap_value_high();
map(0x00000000, 0x0000200f).noprw(); /* hit during self-test */
map(0x02000000, 0x0207ffff).rw(FUNC(harddriv_state::hdgsp_vram_2bpp_r), FUNC(harddriv_state::hdgsp_vram_1bpp_w));
map(0xf4000000, 0xf40000ff).rw(FUNC(harddriv_state::hdgsp_control_lo_r), FUNC(harddriv_state::hdgsp_control_lo_w)).share("gsp_control_lo");
map(0xf4800000, 0xf48000ff).rw(FUNC(harddriv_state::hdgsp_control_hi_r), FUNC(harddriv_state::hdgsp_control_hi_w)).share("gsp_control_hi");
map(0xf5000000, 0xf5000fff).rw(FUNC(harddriv_state::hdgsp_paletteram_lo_r), FUNC(harddriv_state::hdgsp_paletteram_lo_w));
map(0xf5800000, 0xf5800fff).rw(FUNC(harddriv_state::hdgsp_paletteram_hi_r), FUNC(harddriv_state::hdgsp_paletteram_hi_w));
map(0xff800000, 0xffffffff).ram().share("gsp_vram");
}
void harddriv_state::driver_msp_map(address_map &map)
{
map.unmap_value_high();
map(0x00000000, 0x000fffff).ram().share("msp_ram");
map(0x00700000, 0x007fffff).ram().share("msp_ram");
map(0xfff00000, 0xffffffff).ram().share("msp_ram");
}
/*************************************
*
* Multisync board memory maps
*
*************************************/
void harddriv_state::multisync_68k_map(address_map &map)
{
map.unmap_value_high();
map(0x000000, 0x0fffff).rom();
map(0x604000, 0x607fff).rw(FUNC(harddriv_state::hd68k_sound_reset_r), FUNC(harddriv_state::hd68k_nwr_w));
map(0x608000, 0x60bfff).w("watchdog", FUNC(watchdog_timer_device::reset16_w));
map(0x60c000, 0x60ffff).rw(FUNC(harddriv_state::hd68k_port0_r), FUNC(harddriv_state::hd68k_irq_ack_w));
map(0xa00000, 0xa7ffff).w(FUNC(harddriv_state::hd68k_wr0_write));
map(0xa80000, 0xafffff).r(FUNC(harddriv_state::hd68k_a80000_r)).w(FUNC(harddriv_state::hd68k_wr1_write));
map(0xb00001, 0xb00001).mirror(0x7fffe).r("adc8", FUNC(adc0808_device::data_r));
map(0xb00000, 0xb7ffff).w(FUNC(harddriv_state::hd68k_wr2_write));
map(0xb80000, 0xbfffff).rw(FUNC(harddriv_state::hd68k_adc12_r), FUNC(harddriv_state::hd68k_adc_control_w));
map(0xc00000, 0xc03fff).rw(FUNC(harddriv_state::hd68k_gsp_io_r), FUNC(harddriv_state::hd68k_gsp_io_w));
map(0xc04000, 0xc07fff).rw(FUNC(harddriv_state::hd68k_msp_io_r), FUNC(harddriv_state::hd68k_msp_io_w));
map(0xff0000, 0xff001f).rw("duartn68681", FUNC(mc68681_device::read), FUNC(mc68681_device::write)).umask16(0xff00);
map(0xff4000, 0xff4fff).rw(FUNC(harddriv_state::hd68k_zram_r), FUNC(harddriv_state::hd68k_zram_w));
map(0xff8000, 0xffffff).ram();
}
void harddriv_state::multisync_gsp_map(address_map &map)
{
map.unmap_value_high();
map(0x00000000, 0x0000200f).noprw(); /* hit during self-test */
map(0x02000000, 0x020fffff).rw(FUNC(harddriv_state::hdgsp_vram_2bpp_r), FUNC(harddriv_state::hdgsp_vram_2bpp_w));
map(0xf4000000, 0xf40000ff).rw(FUNC(harddriv_state::hdgsp_control_lo_r), FUNC(harddriv_state::hdgsp_control_lo_w)).share("gsp_control_lo");
map(0xf4800000, 0xf48000ff).rw(FUNC(harddriv_state::hdgsp_control_hi_r), FUNC(harddriv_state::hdgsp_control_hi_w)).share("gsp_control_hi");
map(0xf5000000, 0xf5000fff).rw(FUNC(harddriv_state::hdgsp_paletteram_lo_r), FUNC(harddriv_state::hdgsp_paletteram_lo_w));
map(0xf5800000, 0xf5800fff).rw(FUNC(harddriv_state::hdgsp_paletteram_hi_r), FUNC(harddriv_state::hdgsp_paletteram_hi_w));
map(0xff800000, 0xffbfffff).mirror(0x0400000).ram().share("gsp_vram");
}
/*************************************
*
* Multisync II board memory maps
*
*************************************/
void harddriv_state::multisync2_68k_map(address_map &map)
{
map.unmap_value_high();
map(0x000000, 0x1fffff).rom();
map(0x604000, 0x607fff).w(FUNC(harddriv_state::hd68k_nwr_w));
map(0x608000, 0x60bfff).w("watchdog", FUNC(watchdog_timer_device::reset16_w));
map(0x60c000, 0x60ffff).rw(FUNC(harddriv_state::hd68k_port0_r), FUNC(harddriv_state::hd68k_irq_ack_w));
map(0xa00000, 0xa7ffff).w(FUNC(harddriv_state::hd68k_wr0_write));
map(0xa80000, 0xafffff).r(FUNC(harddriv_state::hd68k_a80000_r)).w(FUNC(harddriv_state::hd68k_wr1_write));
map(0xb00001, 0xb00001).mirror(0x7fffe).r("adc8", FUNC(adc0808_device::data_r));
map(0xb00000, 0xb7ffff).w(FUNC(harddriv_state::hd68k_wr2_write));
map(0xb80000, 0xbfffff).rw(FUNC(harddriv_state::hd68k_adc12_r), FUNC(harddriv_state::hd68k_adc_control_w));
map(0xc00000, 0xc03fff).rw(FUNC(harddriv_state::hd68k_gsp_io_r), FUNC(harddriv_state::hd68k_gsp_io_w));
map(0xc04000, 0xc07fff).rw(FUNC(harddriv_state::hd68k_msp_io_r), FUNC(harddriv_state::hd68k_msp_io_w));
map(0xfc0000, 0xfc001f).rw("duartn68681", FUNC(mc68681_device::read), FUNC(mc68681_device::write)).umask16(0xff00);
map(0xfd0000, 0xfd0fff).mirror(0x004000).rw(FUNC(harddriv_state::hd68k_zram_r), FUNC(harddriv_state::hd68k_zram_w));
map(0xff0000, 0xffffff).ram();
}
/* GSP is identical to original multisync */
void harddriv_state::multisync2_gsp_map(address_map &map)
{
map.unmap_value_high();
map(0x00000000, 0x0000200f).noprw(); /* hit during self-test */
map(0x02000000, 0x020fffff).rw(FUNC(harddriv_state::hdgsp_vram_2bpp_r), FUNC(harddriv_state::hdgsp_vram_2bpp_w));
map(0xf4000000, 0xf40000ff).rw(FUNC(harddriv_state::hdgsp_control_lo_r), FUNC(harddriv_state::hdgsp_control_lo_w)).share("gsp_control_lo");
map(0xf4800000, 0xf48000ff).rw(FUNC(harddriv_state::hdgsp_control_hi_r), FUNC(harddriv_state::hdgsp_control_hi_w)).share("gsp_control_hi");
map(0xf5000000, 0xf5000fff).rw(FUNC(harddriv_state::hdgsp_paletteram_lo_r), FUNC(harddriv_state::hdgsp_paletteram_lo_w));
map(0xf5800000, 0xf5800fff).rw(FUNC(harddriv_state::hdgsp_paletteram_hi_r), FUNC(harddriv_state::hdgsp_paletteram_hi_w));
map(0xff800000, 0xffffffff).ram().share("gsp_vram");
}
/*************************************
*
* ADSP/ADSP II board memory maps
*
*************************************/
void harddriv_state::adsp_program_map(address_map &map)
{
map.unmap_value_high();
map(0x0000, 0x1fff).ram().share("adsp_pgm_memory");
map(0x2000, 0x3fff).nopr(); // ROM?
}
void harddriv_state::adsp_data_map(address_map &map)
{
map.unmap_value_high();
map(0x0000, 0x1fff).ram().share("adsp_data");
map(0x2000, 0x2fff).rw(FUNC(harddriv_state::hdadsp_special_r), FUNC(harddriv_state::hdadsp_special_w));
}
/*************************************
*
* DS III/IV board memory maps
*
*************************************/
void harddriv_state::ds3_program_map(address_map &map)
{
map.unmap_value_high();
map(0x0000, 0x3fff).ram().share("adsp_pgm_memory");
}
void harddriv_state::ds3_data_map(address_map &map)
{
map.unmap_value_high();
map(0x0000, 0x1fff).ram().share("adsp_data");
map(0x2000, 0x3fff).rw(FUNC(harddriv_state::hdds3_special_r), FUNC(harddriv_state::hdds3_special_w));
map(0x3800, 0x3bff).ram(); /* internal RAM */
map(0x3fe0, 0x3fff).rw(FUNC(harddriv_state::hdds3_control_r), FUNC(harddriv_state::hdds3_control_w)); /* adsp control regs */
}
void harddriv_state::ds3sdsp_program_map(address_map &map)
{
map.unmap_value_high();
map(0x0000, 0x3fff).ram().share("ds3sdsp_pgm");
}
void harddriv_state::ds3sdsp_data_map(address_map &map)
{
map.unmap_value_high();
map(0x2000, 0x3fff).rw(FUNC(harddriv_state::hdds3_sdsp_special_r), FUNC(harddriv_state::hdds3_sdsp_special_w));
map(0x3800, 0x39ff).ram(); /* internal RAM */
map(0x3fe0, 0x3fff).rw(FUNC(harddriv_state::hdds3_sdsp_control_r), FUNC(harddriv_state::hdds3_sdsp_control_w));
}
void harddriv_state::ds3xdsp_program_map(address_map &map)
{
map.unmap_value_high();
map(0x0000, 0x3fff).ram().share("ds3xdsp_pgm");
}
void harddriv_state::ds3xdsp_data_map(address_map &map)
{
map.unmap_value_high();
map(0x0000, 0x1fff).ram(); // TODO
map(0x3800, 0x39ff).ram(); /* internal RAM */
map(0x3fe0, 0x3fff).rw(FUNC(harddriv_state::hdds3_xdsp_control_r), FUNC(harddriv_state::hdds3_xdsp_control_w));
}
/*************************************
*
* DSK board memory maps
*
*************************************/
void harddriv_state::dsk_dsp32_map(address_map &map)
{
map.unmap_value_high();
map(0x000000, 0x001fff).ram();
map(0x600000, 0x63ffff).ram().share("dsp32_ram");
map(0xfff800, 0xffffff).ram();
}
/*************************************
*
* DSK II board memory maps
*
*************************************/
void harddriv_state::dsk2_dsp32_map(address_map &map)
{
map.unmap_value_high();
map(0x000000, 0x001fff).ram();
map(0x200000, 0x23ffff).ram();
map(0x400000, 0x5fffff).rom().region("user4", 0);
map(0xfff800, 0xffffff).ram();
}
/*************************************
*
* Port definitions
*
*************************************/
static INPUT_PORTS_START( harddriv )
PORT_START("mainpcb:IN0") /* 600000 */
PORT_DIPNAME( 0x01, 0x01, "Diagnostic jumper" )
PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_CUSTOM ) /* HBLANK */
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("mainpcb:screen")
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) /* 12-bit EOC */
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("mainpcb:adc8", adc0808_device, eoc_r)
PORT_SERVICE( 0x20, IP_ACTIVE_LOW )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN2 )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_START("mainpcb:SW1") /* 600002 */
PORT_DIPNAME( 0x01, 0x01, "SW1:8" )
PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x02, 0x02, "SW1:7" )
PORT_DIPSETTING( 0x02, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x04, 0x04, "SW1:6" )
PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x08, 0x08, "SW1:5" )
PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x10, 0x10, "SW1:4" )
PORT_DIPSETTING( 0x10, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x20, 0x20, "SW1:3" )
PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x40, 0x40, "SW1:2" )
PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x80, 0x80, "SW1:1" )
PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_START("mainpcb:a80000")
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_START2 ) PORT_NAME("Abort") /* abort */
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_START1 ) PORT_NAME("Key") /* key */
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_COIN3 ) /* aux coin */
PORT_BIT( 0xfff8, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_START("mainpcb:8BADC.0") /* b00000 - 8 bit ADC 0 - gas pedal */
PORT_BIT( 0xff, 0x00, IPT_PEDAL ) PORT_SENSITIVITY(25) PORT_KEYDELTA(20) PORT_NAME("Gas Pedal")
PORT_START("mainpcb:8BADC.1") /* b00000 - 8 bit ADC 1 - clutch pedal */
PORT_BIT( 0xff, 0x00, IPT_PEDAL3 ) PORT_SENSITIVITY(25) PORT_KEYDELTA(100) PORT_NAME("Clutch Pedal")
PORT_START("mainpcb:8BADC.2") /* b00000 - 8 bit ADC 2 - seat */
PORT_BIT( 0xff, 0x80, IPT_CUSTOM )
PORT_START("mainpcb:8BADC.3") /* b00000 - 8 bit ADC 3 - shifter lever Y */
PORT_BIT( 0xff, 0x80, IPT_AD_STICK_Y ) PORT_SENSITIVITY(25) PORT_KEYDELTA(128) PORT_CODE_DEC(KEYCODE_R) PORT_CODE_INC(KEYCODE_F) PORT_NAME("Shifter Lever Y")
PORT_START("mainpcb:8BADC.4") /* b00000 - 8 bit ADC 4 - shifter lever X*/
PORT_BIT( 0xff, 0x80, IPT_AD_STICK_X ) PORT_SENSITIVITY(25) PORT_KEYDELTA(128) PORT_CODE_DEC(KEYCODE_D) PORT_CODE_INC(KEYCODE_G) PORT_NAME("Shifter Lever X")
PORT_START("mainpcb:8BADC.5") /* b00000 - 8 bit ADC 5 - wheel */
PORT_BIT( 0xff, 0x80, IPT_PADDLE ) PORT_MINMAX(0x10,0xf0) PORT_SENSITIVITY(25) PORT_KEYDELTA(5) PORT_NAME("Wheel")
PORT_START("mainpcb:8BADC.6") /* b00000 - 8 bit ADC 6 - line volts */
PORT_BIT( 0xff, 0x80, IPT_CUSTOM )
PORT_START("mainpcb:8BADC.7") /* b00000 - 8 bit ADC 7 - shift force */
PORT_BIT( 0xff, 0x80, IPT_CUSTOM )
PORT_START("mainpcb:12BADC.0") /* b80000 - 12 bit ADC 0 - steering wheel */
PORT_BIT( 0xfff, 0x800, IPT_PADDLE ) PORT_MINMAX(0x010,0xff0) PORT_SENSITIVITY(400) PORT_KEYDELTA(5) PORT_NAME("Steering Wheel")
PORT_START("mainpcb:12BADC.1") /* b80000 - 12 bit ADC 1 - force brake */
PORT_BIT( 0xfff, 0x000, IPT_PEDAL2 ) PORT_SENSITIVITY(400) PORT_KEYDELTA(100) PORT_REVERSE PORT_NAME("Brake Pedal")
PORT_START("mainpcb:12BADC.2") /* b80000 - 12 bit ADC 2 */
PORT_BIT( 0xfff, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_START("mainpcb:12BADC.3") /* b80000 - 12 bit ADC 3 */
PORT_BIT( 0xfff, IP_ACTIVE_LOW, IPT_UNUSED )
INPUT_PORTS_END
static INPUT_PORTS_START( racedriv )
PORT_START("mainpcb:IN0") /* 600000 */
PORT_DIPNAME( 0x01, 0x01, "Diagnostic jumper" )
PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_CUSTOM ) /* HBLANK */
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("mainpcb:screen")
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) /* 12-bit EOC */
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("mainpcb:adc8", adc0808_device, eoc_r)
PORT_SERVICE( 0x20, IP_ACTIVE_LOW )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN2 )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_START("mainpcb:SW1") /* 600002 */
PORT_DIPNAME( 0x01, 0x01, "SW1:8" )
PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x02, 0x02, "SW1:7" )
PORT_DIPSETTING( 0x02, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x04, 0x04, "SW1:6" )
PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x08, 0x08, "SW1:5" )
PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x10, 0x10, "SW1:4" )
PORT_DIPSETTING( 0x10, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x20, 0x20, "SW1:3" )
PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x40, 0x40, "SW1:2" )
PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x80, 0x80, "SW1:1" )
PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_START("mainpcb:a80000")
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_START2 ) PORT_NAME("Abort") /* abort */
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_START1 ) PORT_NAME("Key") /* key */
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_COIN3 ) /* aux coin */
PORT_BIT( 0xfff8, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_START("mainpcb:8BADC.0") /* b00000 - 8 bit ADC 0 - gas pedal */
PORT_BIT( 0xff, 0x00, IPT_PEDAL ) PORT_SENSITIVITY(25) PORT_KEYDELTA(20) PORT_NAME("Gas Pedal")
PORT_START("mainpcb:8BADC.1") /* b00000 - 8 bit ADC 1 - clutch pedal */
PORT_BIT( 0xff, 0x00, IPT_PEDAL3 ) PORT_SENSITIVITY(25) PORT_KEYDELTA(100) PORT_NAME("Clutch Pedal")
PORT_START("mainpcb:8BADC.2") /* b00000 - 8 bit ADC 2 - seat */
PORT_BIT( 0xff, 0x80, IPT_CUSTOM )
PORT_START("mainpcb:8BADC.3") /* b00000 - 8 bit ADC 3 - shifter lever Y */
PORT_BIT( 0xff, 0x80, IPT_AD_STICK_Y ) PORT_SENSITIVITY(25) PORT_KEYDELTA(128) PORT_CODE_DEC(KEYCODE_R) PORT_CODE_INC(KEYCODE_F) PORT_NAME("Shifter Lever Y")
PORT_START("mainpcb:8BADC.4") /* b00000 - 8 bit ADC 4 - shifter lever X*/
PORT_BIT( 0xff, 0x80, IPT_AD_STICK_X ) PORT_SENSITIVITY(25) PORT_KEYDELTA(128) PORT_CODE_DEC(KEYCODE_D) PORT_CODE_INC(KEYCODE_G) PORT_NAME("Shifter Lever X")
PORT_START("mainpcb:8BADC.5") /* b00000 - 8 bit ADC 5 - wheel */
PORT_BIT( 0xff, 0x80, IPT_PADDLE ) PORT_MINMAX(0x10,0xf0) PORT_SENSITIVITY(25) PORT_KEYDELTA(5) PORT_NAME("Wheel")
PORT_START("mainpcb:8BADC.6") /* b00000 - 8 bit ADC 6 - line volts */
PORT_BIT( 0xff, 0x80, IPT_CUSTOM )
PORT_START("mainpcb:8BADC.7") /* b00000 - 8 bit ADC 7 */
PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_START("mainpcb:12BADC.0") /* b80000 - 12 bit ADC 0 - steering wheel */
PORT_BIT( 0xfff, 0x800, IPT_PADDLE ) PORT_MINMAX(0x010,0xff0) PORT_SENSITIVITY(400) PORT_KEYDELTA(5) PORT_NAME("Steering Wheel")
PORT_START("mainpcb:12BADC.1") /* b80000 - 12 bit ADC 1 - force brake */
PORT_BIT( 0xfff, 0x000, IPT_PEDAL2 ) PORT_SENSITIVITY(400) PORT_KEYDELTA(100) PORT_REVERSE PORT_NAME("Brake Pedal")
PORT_START("mainpcb:12BADC.2") /* b80000 - 12 bit ADC 2 */
PORT_BIT( 0xfff, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_START("mainpcb:12BADC.3") /* b80000 - 12 bit ADC 3 */
PORT_BIT( 0xfff, IP_ACTIVE_LOW, IPT_UNUSED )
INPUT_PORTS_END
static INPUT_PORTS_START( racedriv_pan )
PORT_INCLUDE( racedriv )
PORT_START("leftpcb:IN0") /* 600000 */
PORT_DIPNAME( 0x01, 0x01, "Diagnostic jumper (Left)" )
PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_CUSTOM ) /* HBLANK */
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("leftpcb:screen")
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) /* 12-bit EOC */
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("leftpcb:adc8", adc0808_device, eoc_r)
PORT_SERVICE( 0x20, IP_ACTIVE_LOW )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN2 )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_START("rightpcb:IN0") /* 600000 */
PORT_DIPNAME( 0x01, 0x01, "Diagnostic jumper (Right)" )
PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_CUSTOM ) /* HBLANK */
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("rightpcb:screen")
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) /* 12-bit EOC */
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("rightpcb:adc8", adc0808_device, eoc_r)
PORT_SERVICE( 0x20, IP_ACTIVE_LOW )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN2 )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN1 )
#if 1 // needed to navigate sub-screen test menus
PORT_START("leftpcb:a80000")
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_START2 ) PORT_NAME("Abort") /* abort */
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_START1 ) PORT_NAME("Key") /* key */
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_COIN3 ) /* aux coin */
PORT_BIT( 0xfff8, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_START("rightpcb:a80000")
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_START2 ) PORT_NAME("Abort") /* abort */
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_START1 ) PORT_NAME("Key") /* key */
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_COIN3 ) /* aux coin */
PORT_BIT( 0xfff8, IP_ACTIVE_LOW, IPT_UNUSED )
#endif
INPUT_PORTS_END
static INPUT_PORTS_START( racedrivc )
PORT_START("mainpcb:IN0") /* 60c000 */
PORT_DIPNAME( 0x01, 0x01, "Diagnostic jumper" )
PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_CUSTOM ) /* HBLANK */
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("mainpcb:screen")
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) /* 12-bit EOC */
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("mainpcb:adc8", adc0808_device, eoc_r)
PORT_SERVICE( 0x20, IP_ACTIVE_LOW )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN2 )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN1 )