/
turbo.cpp
1956 lines (1661 loc) · 98.9 KB
/
turbo.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:Alex Pasadyn, Howie Cohen, Frank Palazzolo, Ernesto Corvi, Aaron Giles
/*************************************************************************
Sega Z80-3D system
driver by Alex Pasadyn, Howie Cohen, Frank Palazzolo, Ernesto Corvi,
and Aaron Giles
Games supported:
- Turbo
- Subroc 3D
- Buck Rogers: Planet of Zoom
BTANB:
- subroc3d 'seafoam' appears as black spots on top of some sprites
**************************************************************************
TURBO
**************************************************************************
Memory Map: ( * not complete * )
Address Range: R/W: Function:
--------------------------------------------------------------------------
0000 - 5fff R Program ROM
a000 - a0ff W Sprite RAM
a800 - a803 W Lamps / Coin Meters
b000 - b1ff R/W Collision RAM
e000 - e7ff R/W character RAM
f000 - f7ff R/W RAM
f202 coinage 2
f205 coinage 1
f800 - f803 R/W road drawing
f900 - f903 R/W road drawing
fa00 - fa03 R/W sound
fb00 - fb03 R/W x,DS2,x,x
fc00 - fc01 R DS1,x
fc00 - fc01 W score
fd00 R Coin Inputs, etc.
fe00 R DS3,x
Switch settings:
Notes:
1) Facing the CPU board, with the two large IDC connectors at
the top of the board, and the large and small IDC
connectors at the bottom, DIP switch #1 is upper right DIP
switch, DIP switch #2 is the DIP switch to the right of it.
2) Facing the Sound board, with the IDC connector at the
bottom of the board, DIP switch #3 (4 bank) can be seen.
----------------------------------------------------------------------------
Option (DIP Switch #1) | SW1 | SW2 | SW3 | SW4 | SW5 | SW6 | SW7 | SW8 |
--------------------------|-----|-----|-----|-----|-----|-----|-----|-----|
1 Car On Extended Play | ON | ON | | | | | | |
2 Car On Extended Play | OFF | ON | | | | | | |
3 Car On Extended Play | ON | OFF | | | | | | |
4 Car On Extended Play | OFF | OFF | | | | | | |
--------------------------|-----|-----|-----|-----|-----|-----|-----|-----|
Game Time Adjustable | | | ON | | | | | |
Game Time Fixed (55 Sec.) | | | OFF | | | | | |
--------------------------|-----|-----|-----|-----|-----|-----|-----|-----|
Hard Game Difficulty | | | | ON | | | | |
Easy Game Difficulty | | | | OFF | | | | |
--------------------------|-----|-----|-----|-----|-----|-----|-----|-----|
Normal Game Mode | | | | | ON | | | |
No Collisions (cheat) | | | | | OFF | | | |
--------------------------|-----|-----|-----|-----|-----|-----|-----|-----|
Initial Entry Off (?) | | | | | | ON | | |
Initial Entry On (?) | | | | | | OFF | | |
--------------------------|-----|-----|-----|-----|-----|-----|-----|-----|
Not Used | | | | | | | X | X |
---------------------------------------------------------------------------
Option (DIP Switch #2) | SW1 | SW2 | SW3 | SW4 | SW5 | SW6 | SW7 | SW8 |
--------------------------|-----|-----|-----|-----|-----|-----|-----|-----|
60 Seconds Game Time | ON | ON | | | | | | |
70 Seconds Game Time | OFF | ON | | | | | | |
80 Seconds Game Time | ON | OFF | | | | | | |
90 Seconds Game Time | OFF | OFF | | | | | | |
--------------------------|-----|-----|-----|-----|-----|-----|-----|-----|
Slot 1 1 Coin 1 Credit | | | ON | ON | ON | | | |
Slot 1 1 Coin 2 Credits | | | OFF | ON | ON | | | |
Slot 1 1 Coin 3 Credits | | | ON | OFF | ON | | | |
Slot 1 1 Coin 6 Credits | | | OFF | OFF | ON | | | |
Slot 1 2 Coins 1 Credit | | | ON | ON | OFF | | | |
Slot 1 3 Coins 1 Credit | | | OFF | ON | OFF | | | |
Slot 1 4 Coins 1 Credit | | | ON | OFF | OFF | | | |
Slot 1 1 Coin 1 Credit | | | OFF | OFF | OFF | | | |
--------------------------|-----|-----|-----|-----|-----|-----|-----|-----|
Slot 2 1 Coin 1 Credit | | | | | | ON | ON | ON |
Slot 2 1 Coin 2 Credits | | | | | | OFF | ON | ON |
Slot 2 1 Coin 3 Credits | | | | | | ON | OFF | ON |
Slot 2 1 Coin 6 Credits | | | | | | OFF | OFF | ON |
Slot 2 2 Coins 1 Credit | | | | | | ON | ON | OFF |
Slot 2 3 Coins 1 Credit | | | | | | OFF | ON | OFF |
Slot 2 4 Coins 1 Credit | | | | | | ON | OFF | OFF |
Slot 2 1 Coins 1 Credit | | | | | | OFF | OFF | OFF |
---------------------------------------------------------------------------
Option (DIP Switch #3) | SW1 | SW2 | SW3 | SW4 |
--------------------------|-----|-----|-----|-----|
Not Used | X | X | | |
--------------------------|-----|-----|-----|-----|
Digital (LED) Tachometer | | | ON | |
Analog (Meter) Tachometer | | | OFF | |
--------------------------|-----|-----|-----|-----|
Cockpit Sound System | | | | ON |
Upright Sound System | | | | OFF |
---------------------------------------------------
Here is a complete list of the ROMs:
Turbo ROMLIST - Frank Palazzolo
Name Loc Function
-----------------------------------------------------------------------------
Images Acquired:
EPR1262,3,4 IC76, IC89, IC103
EPR1363,4,5
EPR15xx Program ROMS
EPR1244 Character Data 1
EPR1245 Character Data 2
EPR-1125 Road ROMS
EPR-1126
EPR-1127
EPR-1238
EPR-1239
EPR-1240
EPR-1241
EPR-1242
EPR-1243
EPR1246-1258 Sprite ROMS
EPR1288-1300
PR-1114 IC13 Color 1 (road, etc.)
PR-1115 IC18 Road gfx
PR-1116 IC20 Crash (collision detection?)
PR-1117 IC21 Color 2 (road, etc.)
PR-1118 IC99 256x4 Character Color PROM
PR-1119 IC50 512x8 Vertical Timing PROM
PR-1120 IC62 Horizontal Timing PROM
PR-1121 IC29 Color PROM
PR-1122 IC11 Pattern 1
PR-1123 IC21 Pattern 2
PA-06R IC22 Mathbox Timing PAL
PA-06L IC90 Address Decode PAL
**************************************************************************/
#include "emu.h"
#include "turbo.h"
#include "machine/segacrpt_device.h"
#include "machine/74259.h"
#include "machine/i8279.h"
#include "turbo.lh"
#include "subroc3d.lh"
#include "buckrog.lh"
/*************************************
*
* Constants
*
*************************************/
#define MASTER_CLOCK (XTAL(19'968'000))
#define PIXEL_CLOCK (MASTER_CLOCK/4*TURBO_X_SCALE)
#define HTOTAL (320*TURBO_X_SCALE)
#define HBEND (0)
#define HBSTART (256*TURBO_X_SCALE)
#define VTOTAL (264)
#define VBEND (0)
#define VBSTART (224)
/*************************************
*
* Machine init
*
*************************************/
void turbo_base_state::machine_start()
{
m_digits.resolve();
m_lamp.resolve();
save_item(NAME(m_i8279_scanlines));
save_item(NAME(m_sound_state));
}
void buckrog_state::machine_start()
{
turbo_base_state::machine_start();
save_item(NAME(m_fchg));
save_item(NAME(m_mov));
save_item(NAME(m_obch));
save_item(NAME(m_command));
save_item(NAME(m_myship));
save_item(NAME(m_last_sound_a));
}
void buckrog_state::machine_reset()
{
m_command = 0x00;
}
void subroc3d_state::machine_start()
{
turbo_base_state::machine_start();
m_shutter.resolve();
save_item(NAME(m_col));
save_item(NAME(m_ply));
save_item(NAME(m_flip));
save_item(NAME(m_mdis));
save_item(NAME(m_mdir));
save_item(NAME(m_tdis));
save_item(NAME(m_tdir));
save_item(NAME(m_fdis));
save_item(NAME(m_fdir));
save_item(NAME(m_hdis));
save_item(NAME(m_hdir));
}
void turbo_state::machine_start()
{
turbo_base_state::machine_start();
m_tachometer.resolve();
m_speed.resolve();
save_item(NAME(m_osel));
save_item(NAME(m_bsel));
save_item(NAME(m_opa));
save_item(NAME(m_opb));
save_item(NAME(m_opc));
save_item(NAME(m_ipa));
save_item(NAME(m_ipb));
save_item(NAME(m_ipc));
save_item(NAME(m_fbpla));
save_item(NAME(m_fbcol));
save_item(NAME(m_collision));
save_item(NAME(m_last_analog));
save_item(NAME(m_accel));
}
/*************************************
*
* Turbo 8255 PPI handling
*
*************************************/
/*
chip index:
0 = IC75 - CPU Board, Sheet 6, D7
1 = IC32 - CPU Board, Sheet 6, D6
2 = IC123 - CPU Board, Sheet 6, D4
3 = IC6 - CPU Board, Sheet 5, D7
*/
void turbo_state::ppi0a_w(uint8_t data)
{
// bit0-7 = 0PA0-7
m_opa = data;
}
void turbo_state::ppi0b_w(uint8_t data)
{
// bit0-7 = 0PB0-7
m_opb = data;
}
void turbo_state::ppi0c_w(uint8_t data)
{
// bit0-7 = 0PC0-7
m_opc = data;
}
void turbo_state::ppi1a_w(uint8_t data)
{
// bit0-7 = 1PA0-7
m_ipa = data;
}
void turbo_state::ppi1b_w(uint8_t data)
{
// bit0-7 = 1PB0-7
m_ipb = data;
}
void turbo_state::ppi1c_w(uint8_t data)
{
// bit0-7 = 1PC0-7
m_ipc = data;
}
void turbo_state::ppi3c_w(uint8_t data)
{
// bit 0-3 = PLA0-3
// bit 4-6 = COL0-2
// bit 7 = n/c
m_fbpla = data & 0x0f;
m_fbcol = (data >> 4) & 0x07;
}
/*************************************
*
* Subroc 3D PPI handling
*
*************************************/
/*
chip index:
0 = IC117 - CPU Board, Sheet 3, A6
1 = IC119 - CPU Board, Sheet 3, A5
*/
void subroc3d_state::ppi0a_w(uint8_t data)
{
// bit 0-3 = PLY0-3
// bit 4-7 = n/c
m_ply = data & 0x0f;
}
void subroc3d_state::ppi0c_w(uint8_t data)
{
// bit 0-3 = COL0-3
m_col = data & 0x0f;
}
void subroc3d_state::ppi0b_w(uint8_t data)
{
// bit 0 = COM1 (COIN METER 1)
// bit 1 = COM2 (COIN METER 2)
// bit 2 = STLA (START LAMP)
// bit 3 = NOUSE (n/c)
// bit 4 = FLIP (not really flip, just offset)
machine().bookkeeping().coin_counter_w(0, data & 0x01);
machine().bookkeeping().coin_counter_w(1, data & 0x02);
m_lamp = BIT(data, 2);
m_flip = BIT(data, 4);
// flip also goes to 3D scope shutter sync
// (it's a motor to 2 rotating discs, half painted black)
m_shutter = BIT(data, 4);
}
/*************************************
*
* Buck Rogers PPI handling
*
*************************************/
void buckrog_state::ppi0a_w(uint8_t data)
{
// bit 0-7 = data to be read on the /IOREQ
m_command = data;
}
void buckrog_state::ppi0b_w(uint8_t data)
{
// bit 0-5 = MOV0-5
// bit 6-7 = n/c
m_mov = data & 0x3f;
}
void buckrog_state::ppi0c_w(uint8_t data)
{
// bit 0-2 = FCHG0
// bit 3-5 = n/c
// bit 6 = /IOREQ on the 2nd CPU
// bit 7 = /INT on the 2nd CPU
m_fchg = data & 0x07;
m_subcpu->set_input_line(0, (data & 0x80) ? CLEAR_LINE : ASSERT_LINE);
}
void buckrog_state::ppi1c_w(uint8_t data)
{
// bit 0-2 = OBCH0-2
// bit 3 = n/c
// bit 4 = COM1 (COIN METER 1)
// bit 5 = COM2 (COIN METER 2)
// bit 6 = STLA (START LAMP)
// bit 7 = NOUSE (BODY SONIC)
m_obch = data & 0x07;
machine().bookkeeping().coin_counter_w(0, data & 0x10);
machine().bookkeeping().coin_counter_w(1, data & 0x20);
m_lamp = BIT(data, 6);
}
/*************************************
*
* 8279 display/keyboard driver
*
*************************************/
void turbo_base_state::scanlines_w(uint8_t data)
{
m_i8279_scanlines = data;
}
void turbo_base_state::digit_w(uint8_t data)
{
static const uint8_t ls48_map[16] =
{ 0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7c,0x07,0x7f,0x67,0x58,0x4c,0x62,0x69,0x78,0x00 };
m_digits[m_i8279_scanlines * 2] = ls48_map[data & 0x0f];
m_digits[m_i8279_scanlines * 2 + 1] = ls48_map[data >> 4];
}
/*************************************
*
* Shared pedal reading
*
*************************************/
CUSTOM_INPUT_MEMBER(turbo_base_state::pedal_r)
{
// inverted 2-bit Gray code from a pair of optos in mechanical pedal
uint8_t pedal = m_pedal->read();
return (pedal >> 6) ^ (pedal >> 7) ^ 0x03;
}
/*************************************
*
* Misc Turbo inputs/outputs
*
*************************************/
uint8_t turbo_state::collision_r()
{
m_screen->update_partial(m_screen->vpos());
return (m_dsw[2]->read() & 0xf0) | (m_collision & 0xf);
}
void turbo_state::collision_clear_w(uint8_t data)
{
m_screen->update_partial(m_screen->vpos());
m_collision = 0;
}
uint8_t turbo_state::analog_r()
{
return m_dial->read() - m_last_analog;
}
void turbo_state::analog_reset_w(uint8_t data)
{
m_last_analog = m_dial->read();
}
void turbo_state::coin_meter_1_w(int state)
{
machine().bookkeeping().coin_counter_w(0, state);
}
void turbo_state::coin_meter_2_w(int state)
{
machine().bookkeeping().coin_counter_w(1, state);
}
void turbo_state::start_lamp_w(int state)
{
m_lamp = state ? 1 : 0;
}
/*************************************
*
* Misc Buck Rogers inputs/outputs
*
*************************************/
uint8_t buckrog_state::subcpu_command_r()
{
// assert ACK
if (!machine().side_effects_disabled())
m_i8255[0]->pc6_w(CLEAR_LINE);
return m_command;
}
uint8_t buckrog_state::port_2_r()
{
uint8_t inp1 = bitswap<4>(m_dsw[0]->read(), 6, 4, 3, 0);
uint8_t inp2 = bitswap<4>(m_dsw[1]->read(), 6, 4, 3, 0);
return inp1 | inp2 << 4;
}
uint8_t buckrog_state::port_3_r()
{
uint8_t inp1 = bitswap<4>(m_dsw[0]->read(), 7, 5, 2, 1);
uint8_t inp2 = bitswap<4>(m_dsw[1]->read(), 7, 5, 2, 1);
return inp1 | inp2 << 4;
}
TIMER_CALLBACK_MEMBER(buckrog_state::delayed_i8255_w)
{
m_i8255[0]->write(param >> 8, param & 0xff);
}
void buckrog_state::i8255_0_w(offs_t offset, uint8_t data)
{
// the port C handshaking signals control the sub CPU IRQ, so we have to sync whenever we access this PPI
machine().scheduler().synchronize(timer_expired_delegate(FUNC(buckrog_state::delayed_i8255_w),this), ((offset & 3) << 8) | (data & 0xff));
}
uint8_t turbo_state::spriteram_r(offs_t offset)
{
offset = (offset & 0x07) | ((offset & 0xf0) >> 1);
return m_spriteram[offset];
}
void turbo_state::spriteram_w(offs_t offset, uint8_t data)
{
offset = (offset & 0x07) | ((offset & 0xf0) >> 1);
m_spriteram[offset] = data;
}
/*************************************
*
* Turbo CPU memory handlers
*
*************************************/
void turbo_state::prg_map(address_map &map)
{
map(0x0000, 0x5fff).rom();
map(0xa000, 0xa0ff).mirror(0x0700).rw(FUNC(turbo_state::spriteram_r), FUNC(turbo_state::spriteram_w));
map(0xa800, 0xa807).mirror(0x07f8).w("outlatch", FUNC(ls259_device::write_d0));
map(0xb000, 0xb3ff).mirror(0x0400).ram().share(m_sprite_position);
map(0xb800, 0xbfff).w(FUNC(turbo_state::analog_reset_w));
map(0xe000, 0xe7ff).ram().w(FUNC(turbo_state::videoram_w)).share(m_videoram);
map(0xe800, 0xefff).w(FUNC(turbo_state::collision_clear_w));
map(0xf000, 0xf7ff).ram();
map(0xf800, 0xf803).mirror(0x00fc).rw(m_i8255[0], FUNC(i8255_device::read), FUNC(i8255_device::write));
map(0xf900, 0xf903).mirror(0x00fc).rw(m_i8255[1], FUNC(i8255_device::read), FUNC(i8255_device::write));
map(0xfa00, 0xfa03).mirror(0x00fc).rw(m_i8255[2], FUNC(i8255_device::read), FUNC(i8255_device::write));
map(0xfb00, 0xfb03).mirror(0x00fc).rw(m_i8255[3], FUNC(i8255_device::read), FUNC(i8255_device::write));
map(0xfc00, 0xfc01).mirror(0x00fe).rw("i8279", FUNC(i8279_device::read), FUNC(i8279_device::write));
map(0xfd00, 0xfdff).portr("IN0");
map(0xfe00, 0xfeff).r(FUNC(turbo_state::collision_r));
}
/*************************************
*
* Subroc3D CPU memory handlers
*
*************************************/
void subroc3d_state::prg_map(address_map &map)
{
map(0x0000, 0x9fff).rom();
map(0xa000, 0xa3ff).ram().share(m_sprite_position); // CONT RAM
map(0xa400, 0xa7ff).ram().share(m_spriteram); // CONT RAM
map(0xa800, 0xa800).mirror(0x07fc).portr("IN0"); // INPUT 253
map(0xa801, 0xa801).mirror(0x07fc).portr("IN1"); // INPUT 253
map(0xa802, 0xa802).mirror(0x07fc).portr("DSW2"); // INPUT 253
map(0xa803, 0xa803).mirror(0x07fc).portr("DSW3"); // INPUT 253
map(0xb000, 0xb7ff).ram(); // SCRATCH
map(0xb800, 0xbfff); // HANDLE CL
map(0xe000, 0xe7ff).ram().w(FUNC(subroc3d_state::videoram_w)).share(m_videoram); // FIX PAGE
map(0xe800, 0xe803).mirror(0x07fc).rw(m_i8255[0], FUNC(i8255_device::read), FUNC(i8255_device::write));
map(0xf000, 0xf003).mirror(0x07fc).rw(m_i8255[1], FUNC(i8255_device::read), FUNC(i8255_device::write));
map(0xf800, 0xf801).mirror(0x07fe).rw("i8279", FUNC(i8279_device::read), FUNC(i8279_device::write));
}
/*************************************
*
* Buck Rogers CPU memory handlers
*
*************************************/
void buckrog_state::main_prg_map(address_map &map)
{
map(0x0000, 0x7fff).rom();
map(0xc000, 0xc7ff).ram().w(FUNC(buckrog_state::videoram_w)).share(m_videoram); // FIX PAGE
map(0xc800, 0xc803).mirror(0x07fc).r(m_i8255[0], FUNC(i8255_device::read)).w(FUNC(buckrog_state::i8255_0_w));
map(0xd000, 0xd003).mirror(0x07fc).rw(m_i8255[1], FUNC(i8255_device::read), FUNC(i8255_device::write));
map(0xd800, 0xd801).mirror(0x07fe).rw("i8279", FUNC(i8279_device::read), FUNC(i8279_device::write));
map(0xe000, 0xe3ff).ram().share(m_sprite_position); // CONT RAM
map(0xe400, 0xe7ff).ram().share(m_spriteram); // CONT RAM
map(0xe800, 0xe800).mirror(0x07fc).portr("IN0"); // INPUT
map(0xe801, 0xe801).mirror(0x07fc).portr("IN1");
map(0xe802, 0xe802).mirror(0x07fc).r(FUNC(buckrog_state::port_2_r));
map(0xe803, 0xe803).mirror(0x07fc).r(FUNC(buckrog_state::port_3_r));
map(0xf000, 0xf000);
map(0xf800, 0xffff).ram(); // SCRATCH
}
void buckrog_state::decrypted_opcodes_map(address_map &map)
{
map(0x0000, 0x7fff).rom().share(m_decrypted_opcodes);
}
void buckrog_state::sub_prg_map(address_map &map)
{
map(0x0000, 0x1fff).rom();
map(0x0000, 0xdfff).w(FUNC(buckrog_state::bitmap_w));
map(0xe000, 0xe7ff).mirror(0x1800).ram();
}
void buckrog_state::sub_portmap(address_map &map)
{
map.global_mask(0xff);
map(0x00, 0xff).r(FUNC(buckrog_state::subcpu_command_r));
}
/*************************************
*
* Port definitions
*
*************************************/
static INPUT_PORTS_START( turbo )
PORT_START("IN0") // IN0
PORT_BIT( 0x03, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(turbo_base_state, pedal_r)
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_NAME("Gear Shift") PORT_TOGGLE
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START1 )
PORT_SERVICE_NO_TOGGLE( 0x10, IP_ACTIVE_LOW )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_SERVICE1 )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN2 )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_START("DSW1") // DSW1
PORT_DIPNAME( 0x03, 0x03, "Max Lives During Extended Play" ) PORT_DIPLOCATION("SW1:1,2")
PORT_DIPSETTING( 0x00, "2" )
PORT_DIPSETTING( 0x01, "3" )
PORT_DIPSETTING( 0x02, "4" )
PORT_DIPSETTING( 0x03, "5" )
PORT_DIPNAME( 0x04, 0x00, DEF_STR( Game_Time ) ) PORT_DIPLOCATION("SW1:3")
PORT_DIPSETTING( 0x04, "Fixed (55 sec)" )
PORT_DIPSETTING( 0x00, "Adjustable" )
PORT_DIPNAME( 0x08, 0x08, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SW1:4")
PORT_DIPSETTING( 0x08, DEF_STR( Easy ))
PORT_DIPSETTING( 0x00, DEF_STR( Hard ))
PORT_DIPNAME( 0x10, 0x10, "Collisions" ) PORT_DIPLOCATION("SW1:5")
PORT_DIPSETTING( 0x00, "Off (Cheat)" )
PORT_DIPSETTING( 0x10, DEF_STR( On ) )
PORT_DIPNAME( 0x20, 0x20, "Initial Entry" ) PORT_DIPLOCATION("SW1:6")
PORT_DIPSETTING( 0x00, DEF_STR( Off ))
PORT_DIPSETTING( 0x20, DEF_STR( On ))
PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:7")
PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:8")
PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_START("DSW2") // DSW2
PORT_DIPNAME( 0x03, 0x03, DEF_STR( Game_Time ) ) PORT_DIPLOCATION("SW2:1,2")
PORT_DIPSETTING( 0x00, "60 seconds" )
PORT_DIPSETTING( 0x01, "70 seconds" )
PORT_DIPSETTING( 0x02, "80 seconds" )
PORT_DIPSETTING( 0x03, "90 seconds" )
PORT_DIPNAME( 0x1c, 0x1c, DEF_STR( Coin_B )) PORT_DIPLOCATION("SW2:3,4,5")
PORT_DIPSETTING( 0x18, DEF_STR( 4C_1C ))
PORT_DIPSETTING( 0x14, DEF_STR( 3C_1C ))
PORT_DIPSETTING( 0x10, DEF_STR( 2C_1C ))
PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ))
PORT_DIPSETTING( 0x1c, DEF_STR( 1C_1C ))
PORT_DIPSETTING( 0x04, DEF_STR( 1C_2C ))
PORT_DIPSETTING( 0x08, DEF_STR( 1C_3C ))
PORT_DIPSETTING( 0x0c, DEF_STR( 1C_6C ))
PORT_DIPNAME( 0xe0, 0xe0, DEF_STR( Coin_A )) PORT_DIPLOCATION("SW2:6,7,8")
PORT_DIPSETTING( 0xc0, DEF_STR( 4C_1C ))
PORT_DIPSETTING( 0xa0, DEF_STR( 3C_1C ))
PORT_DIPSETTING( 0x80, DEF_STR( 2C_1C ))
PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ))
PORT_DIPSETTING( 0xe0, DEF_STR( 1C_1C ))
PORT_DIPSETTING( 0x20, DEF_STR( 1C_2C ))
PORT_DIPSETTING( 0x40, DEF_STR( 1C_3C ))
PORT_DIPSETTING( 0x60, DEF_STR( 1C_6C ))
PORT_START("DSW3") // Collision and DSW 3
PORT_BIT( 0x0f, 0x00, IPT_CUSTOM ) // Merged with collision bits
PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW3:1")
PORT_DIPSETTING( 0x10, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW3:2")
PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x40, 0x00, "Tachometer" ) PORT_DIPLOCATION("SW3:3")
PORT_DIPSETTING( 0x40, "Analog (Meter)")
PORT_DIPSETTING( 0x00, "Digital (LED)")
PORT_DIPNAME( 0x80, 0x00, "Sound System" ) PORT_DIPLOCATION("SW3:4")
PORT_DIPSETTING( 0x80, DEF_STR( Upright ) )
PORT_DIPSETTING( 0x00, "Cockpit")
PORT_START("DIAL")
PORT_BIT( 0xff, 0, IPT_DIAL ) PORT_SENSITIVITY(50) PORT_KEYDELTA(10)
PORT_START("PEDAL")
PORT_BIT( 0xff, 0, IPT_PEDAL ) PORT_SENSITIVITY(100) PORT_KEYDELTA(20)
// this is actually a variable resistor
PORT_START("VR1")
PORT_ADJUSTER(31, "Sprite scale offset")
// this is actually a variable resistor
PORT_START("VR2")
PORT_ADJUSTER(91, "Sprite scale gain")
INPUT_PORTS_END
static INPUT_PORTS_START( subroc3d )
PORT_START("IN0")
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_16WAY // buttons on right side of periscope
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_16WAY // "
PORT_START("IN1")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) // pull handle on left side of periscope
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) // push "
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON1 )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START1 )
PORT_SERVICE_NO_TOGGLE( 0x10, 0x10 )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_SERVICE1 )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN2 )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_START("DSW1") // DSW1 // Unused
PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_START("DSW2") // DSW2
PORT_DIPNAME( 0x07, 0x00, DEF_STR( Coin_A )) PORT_DIPLOCATION("SW2:1,2,3")
PORT_DIPSETTING( 0x07, DEF_STR( 5C_1C ) )
PORT_DIPSETTING( 0x06, DEF_STR( 4C_1C ) )
PORT_DIPSETTING( 0x05, DEF_STR( 3C_1C ) )
PORT_DIPSETTING( 0x04, DEF_STR( 2C_1C ) )
PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) )
PORT_DIPSETTING( 0x01, DEF_STR( 1C_2C ) )
PORT_DIPSETTING( 0x02, DEF_STR( 1C_3C ) )
PORT_DIPSETTING( 0x03, DEF_STR( 1C_6C ) )
PORT_DIPNAME( 0x38, 0x00, DEF_STR( Coin_B ) ) PORT_DIPLOCATION("SW2:4,5,6")
PORT_DIPSETTING( 0x38, DEF_STR( 5C_1C ) )
PORT_DIPSETTING( 0x30, DEF_STR( 4C_1C ) )
PORT_DIPSETTING( 0x28, DEF_STR( 3C_1C ) )
PORT_DIPSETTING( 0x20, DEF_STR( 2C_1C ) )
PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) )
PORT_DIPSETTING( 0x08, DEF_STR( 1C_2C ) )
PORT_DIPSETTING( 0x10, DEF_STR( 1C_3C ) )
PORT_DIPSETTING( 0x18, DEF_STR( 1C_6C ) )
PORT_DIPNAME( 0xc0, 0x40, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW2:7,8")
PORT_DIPSETTING( 0x00, "2" )
PORT_DIPSETTING( 0x40, "3" )
PORT_DIPSETTING( 0x80, "4" )
PORT_DIPSETTING( 0xc0, "5" )
PORT_START("DSW3") // DSW 3
PORT_DIPNAME( 0x03, 0x03, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION("SW3:1,2")
PORT_DIPSETTING( 0x00, "20000" )
PORT_DIPSETTING( 0x01, "40000" )
PORT_DIPSETTING( 0x02, "60000" )
PORT_DIPSETTING( 0x03, "80000" )
PORT_DIPNAME( 0x04, 0x04, "Initial Entry" ) PORT_DIPLOCATION("SW3:3")
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
PORT_DIPSETTING( 0x04, DEF_STR( On ) )
PORT_DIPNAME( 0x08, 0x08, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SW3:4")
PORT_DIPSETTING( 0x08, DEF_STR( Normal ) )
PORT_DIPSETTING( 0x00, DEF_STR( Hard ) )
PORT_DIPNAME( 0x10, 0x10, DEF_STR( Free_Play ) ) PORT_DIPLOCATION("SW3:5")
PORT_DIPSETTING( 0x10, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x20, 0x20, "Motion" ) PORT_DIPLOCATION("SW3:6")
PORT_DIPSETTING( 0x00, "Stop" )
PORT_DIPSETTING( 0x20, DEF_STR( Normal ) )
PORT_DIPNAME( 0x40, 0x00, "Screen" ) PORT_DIPLOCATION("SW3:7")
PORT_DIPSETTING( 0x00, DEF_STR( Mono ) )
PORT_DIPSETTING( 0x40, DEF_STR( Stereo ) )
PORT_DIPNAME( 0x80, 0x80, "Game" ) PORT_DIPLOCATION("SW3:8")
PORT_DIPSETTING( 0x00, "Endless" )
PORT_DIPSETTING( 0x80, DEF_STR( Normal ) )
INPUT_PORTS_END
static INPUT_PORTS_START( buckrog )
PORT_START("IN0")
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("DSW2", 0x80, EQUALS, 0x00) // cockpit
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START2 ) PORT_CONDITION("DSW2", 0x80, EQUALS, 0x80) // upright
PORT_BIT( 0x30, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CONDITION("DSW2", 0x02, EQUALS, 0x00) PORT_CUSTOM_MEMBER(turbo_base_state, pedal_r)
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_CONDITION("DSW2", 0x02, EQUALS, 0x02) // fast
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_CONDITION("DSW2", 0x02, EQUALS, 0x02) // slow
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_UP )
PORT_START("IN1") // Inputs
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON1 )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START1 )
PORT_SERVICE_NO_TOGGLE( 0x10, 0x10 )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_SERVICE1 )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN2 )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_START("DSW1") // DSW1
PORT_DIPNAME( 0x07, 0x00, DEF_STR( Coin_A )) PORT_DIPLOCATION("SW1:1,2,3")
PORT_DIPSETTING( 0x07, DEF_STR( 5C_1C ) )
PORT_DIPSETTING( 0x06, DEF_STR( 4C_1C ) )
PORT_DIPSETTING( 0x05, DEF_STR( 3C_1C ) )
PORT_DIPSETTING( 0x04, DEF_STR( 2C_1C ) )
PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) )
PORT_DIPSETTING( 0x01, DEF_STR( 1C_2C ) )
PORT_DIPSETTING( 0x02, DEF_STR( 1C_3C ) )
PORT_DIPSETTING( 0x03, DEF_STR( 1C_6C ) )
PORT_DIPNAME( 0x38, 0x00, DEF_STR( Coin_B ) ) PORT_DIPLOCATION("SW1:4,5,6")
PORT_DIPSETTING( 0x38, DEF_STR( 5C_1C ) )
PORT_DIPSETTING( 0x30, DEF_STR( 4C_1C ) )
PORT_DIPSETTING( 0x28, DEF_STR( 3C_1C ) )
PORT_DIPSETTING( 0x20, DEF_STR( 2C_1C ) )
PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) )
PORT_DIPSETTING( 0x08, DEF_STR( 1C_2C ) )
PORT_DIPSETTING( 0x10, DEF_STR( 1C_3C ) )
PORT_DIPSETTING( 0x18, DEF_STR( 1C_6C ) )
PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:7")
PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:8")
PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_START("DSW2") // DSW2
PORT_DIPNAME( 0x01, 0x00, "Collisions" ) PORT_DIPLOCATION("SW2:1") // manual calls it collisions, but actually it's infinite lives
PORT_DIPSETTING( 0x01, "Off (Cheat)" )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x02, 0x02, "Accel by" ) PORT_DIPLOCATION("SW2:2")
PORT_DIPSETTING( 0x00, "Pedal" )
PORT_DIPSETTING( 0x02, "Button" )
PORT_DIPNAME( 0x04, 0x00, "Best 5 Scores" ) PORT_DIPLOCATION("SW2:3")
PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x08, 0x00, "Score Display" ) PORT_DIPLOCATION("SW2:4")
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
PORT_DIPSETTING( 0x08, DEF_STR( On ) )
PORT_DIPNAME( 0x10, 0x10, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SW2:5")
PORT_DIPSETTING( 0x10, DEF_STR( Normal ) )
PORT_DIPSETTING( 0x00, DEF_STR( Hard ) )
PORT_DIPNAME( 0x60, 0x00, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW2:6,7")
PORT_DIPSETTING( 0x00, "3" )
PORT_DIPSETTING( 0x20, "4" )
PORT_DIPSETTING( 0x40, "5" )
PORT_DIPSETTING( 0x60, "6" )
PORT_DIPNAME( 0x80, 0x80, DEF_STR( Cabinet ) ) PORT_DIPLOCATION("SW2:8")
PORT_DIPSETTING( 0x80, DEF_STR( Upright ) )
PORT_DIPSETTING( 0x00, "Cockpit" )
PORT_START("PEDAL")
PORT_BIT( 0xff, 0, IPT_PEDAL ) PORT_SENSITIVITY(100) PORT_KEYDELTA(20) PORT_CONDITION("DSW2", 0x02, EQUALS, 0x00)
INPUT_PORTS_END
/*************************************
*
* Graphics definitions
*
*************************************/
static GFXDECODE_START( gfx_turbo )
GFXDECODE_ENTRY( "fgtiles", 0, gfx_8x8x2_planar, 0, 64 )
GFXDECODE_END
/*************************************
*
* Machine drivers
*
*************************************/
void turbo_state::turbo(machine_config &config)
{
// basic machine hardware
Z80(config, m_maincpu, MASTER_CLOCK/4);
m_maincpu->set_addrmap(AS_PROGRAM, &turbo_state::prg_map);
m_maincpu->set_vblank_int("screen", FUNC(turbo_state::irq0_line_hold));
I8255(config, m_i8255[0]);
m_i8255[0]->out_pa_callback().set(FUNC(turbo_state::ppi0a_w));
m_i8255[0]->out_pb_callback().set(FUNC(turbo_state::ppi0b_w));
m_i8255[0]->out_pc_callback().set(FUNC(turbo_state::ppi0c_w));
I8255(config, m_i8255[1]);
m_i8255[1]->out_pa_callback().set(FUNC(turbo_state::ppi1a_w));
m_i8255[1]->out_pb_callback().set(FUNC(turbo_state::ppi1b_w));
m_i8255[1]->out_pc_callback().set(FUNC(turbo_state::ppi1c_w));
I8255(config, m_i8255[2]);
m_i8255[2]->out_pa_callback().set(FUNC(turbo_state::sound_a_w));
m_i8255[2]->out_pb_callback().set(FUNC(turbo_state::sound_b_w));
m_i8255[2]->out_pc_callback().set(FUNC(turbo_state::sound_c_w));
I8255(config, m_i8255[3]);
m_i8255[3]->in_pa_callback().set(FUNC(turbo_state::analog_r));
m_i8255[3]->in_pb_callback().set_ioport("DSW2");
m_i8255[3]->out_pc_callback().set(FUNC(turbo_state::ppi3c_w));
for (int i = 0; i < 4; i++)
{
m_i8255[i]->tri_pa_callback().set_constant(0);
m_i8255[i]->tri_pb_callback().set_constant(0);
m_i8255[i]->tri_pc_callback().set_constant(0);
}
i8279_device &kbdc(I8279(config, "i8279", MASTER_CLOCK/16)); // clock = H1
kbdc.out_sl_callback().set(FUNC(turbo_state::scanlines_w)); // scan SL lines
kbdc.out_disp_callback().set(FUNC(turbo_state::digit_w)); // display A&B
kbdc.in_rl_callback().set_ioport("DSW1"); // kbd RL lines
ls259_device &outlatch(LS259(config, "outlatch")); // IC125 - outputs passed through CN5
outlatch.q_out_cb<0>().set(FUNC(turbo_state::coin_meter_1_w));
outlatch.q_out_cb<1>().set(FUNC(turbo_state::coin_meter_2_w));
outlatch.q_out_cb<3>().set(FUNC(turbo_state::start_lamp_w));
// video hardware
GFXDECODE(config, m_gfxdecode, "palette", gfx_turbo);
PALETTE(config, "palette", FUNC(turbo_state::palette), 256);
SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
m_screen->set_video_attributes(VIDEO_ALWAYS_UPDATE);
m_screen->set_raw(PIXEL_CLOCK, HTOTAL, HBEND, HBSTART, VTOTAL, VBEND, VBSTART);
m_screen->set_screen_update(FUNC(turbo_state::screen_update));
m_screen->set_palette("palette");
// sound hardware
turbo_samples(config);
}
void subroc3d_state::subroc3d(machine_config &config)
{
// basic machine hardware
Z80(config, m_maincpu, MASTER_CLOCK/4);
m_maincpu->set_addrmap(AS_PROGRAM, &subroc3d_state::prg_map);
m_maincpu->set_vblank_int("screen", FUNC(subroc3d_state::irq0_line_hold));
I8255(config, m_i8255[0]);
m_i8255[0]->out_pa_callback().set(FUNC(subroc3d_state::ppi0a_w));
m_i8255[0]->out_pb_callback().set(FUNC(subroc3d_state::ppi0b_w));
m_i8255[0]->out_pc_callback().set(FUNC(subroc3d_state::ppi0c_w));
I8255(config, m_i8255[1]);
m_i8255[1]->out_pa_callback().set(FUNC(subroc3d_state::sound_a_w));
m_i8255[1]->out_pb_callback().set(FUNC(subroc3d_state::sound_b_w));
m_i8255[1]->out_pc_callback().set(FUNC(subroc3d_state::sound_c_w));
for (int i = 0; i < 2; i++)
{
m_i8255[i]->tri_pa_callback().set_constant(0);
m_i8255[i]->tri_pb_callback().set_constant(0);
m_i8255[i]->tri_pc_callback().set_constant(0);
}
i8279_device &kbdc(I8279(config, "i8279", MASTER_CLOCK/16)); // unknown clock