/
zaxxon.cpp
1635 lines (1310 loc) · 72.5 KB
/
zaxxon.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:Nicola Salmoria
/***************************************************************************
Sega Zaxxon hardware
Games supported:
* Zaxxon
* Super Zaxxon
* Future Spy
* Razmatazz
* Ixion
* Congo Bongo
DIP locations verified from manual for:
* Zaxxon
* Congo Bongo
Known bugs:
* discrete sound emulation
****************************************************************************
Zaxxon memory map (preliminary)
0000-1fff ROM 3
2000-3fff ROM 2
4000-4fff ROM 1
6000-67ff RAM 1
6800-6fff RAM 2
8000-83ff Video RAM
a000-a0ff sprites
read:
c000 IN0
c001 IN1
c002 DSW0
c003 DSW1
c100 IN2
see the input_ports definition below for details on the input bits
write:
c000 coin A enable
c001 coin B enable
c002 coin aux enable
c003-c004 coin counters
c006 flip screen
ff3c-ff3f sound (see below)
fff0 interrupt enable
fff1 character color bank (not used during the game, but used in test mode)
fff8-fff9 background playfield position (11 bits)
fffa background color bank (0 = standard 1 = reddish)
fffb background enable
interrupts:
VBlank triggers IRQ, handled with interrupt mode 1
NMI enters the test mode.
Changes:
25 Jan 98 LBO
* Added crude support for samples based on Frank's info. As of yet, I don't have
a set that matches the names - I need a way to edit the .wav files I have.
Hopefully I'll be able to create a good set shortly. I also don't know which
sounds "loop".
26 Jan 98 LBO
* Fixed the sound support. I lack explosion samples and the base missile sample so
these are untested. I'm also unsure about the background noise. It seems to have
a variable volume so I've tried to reproduce that via just 1 sample.
12 Mar 98 ATJ
* For the moment replaced Brad's version of the samples with mine from the Mame/P
release. As yet, no variable volume, but I will be combining the features from
Brad's driver into mine ASAP.
****************************************************************************
Ixion Board Info
Ixion
Sega(prototype) 7/1/1983
Board set is a modified Super Zaxxon, similar to Razzmatazz
[G80 Sound board]
U51
U50
[834-0214 ZAXXON-SOUNDII]
315-5013 U27 U28 U29
U68 U69 U72
U98
[ ZAXXON-VIDEOII]
U77 U78 U79 U90 U91 U92 U93
U111 U112 U113
****************************************************************************
Congo Bongo memory map (preliminary)
0000-1fff ROM 1
2000-3fff ROM 2
4000-5fff ROM 3
6000-7fff ROM 4
8000-87ff RAM 1
8800-8fff RAM 2
a000-a3ff Video RAM
a400-a7ff Color RAM
8400-8fff sprites
read:
c000 IN0
c001 IN1
c002 DSW1
c003 DSW2
c008 IN2
write:
c000-c002 ?
c006 ?
c018 coinAen, used to enable input on coin slot A
c019 coinBen, used to enable input on coin slot B
c01a serven, used to enable input on service sw
c01b counterA,coin counter for slot A
c01c counterB,coin counter for slot B
c01d background enable
c01e flip screen
c01f interrupt enable
c028-c029 background playfield position
c031 sprite enable ?
c032 sprite start
c033 sprite count
interrupts:
VBlank triggers IRQ, handled with interrupt mode 1
NMI causes a ROM/RAM test.
----------------------------------------------------------------------
There are two different Congo Bongo boardsets. One is a 3-stack (which I have)
and the other is a 2-stack.
The smaller third board is just a dedicated sound board, then later they started
making 2-stack boardset versions with merged sound circuits built into the control
board.
The schematic name for the control board on the two-stack set is "Control Board II"
my boardset uses control board 1.
The ROMs that are dumped for MAME are from the 3-stack boardset.
The ROMs on control board II are in different socket assignments than the ROMs
found on control board 1.
For example:
MAME congo1.bin = ROM 1 at location U35 on the 3-stack control board 1
MAME congo1.bin = ROM 1 at location U21 on the 2-stack control board II
So the locations are different between the two boardsets but they appear to use
the same ROM.
The Video boards are exactly the same between the two boardset versions (bottom
board) nothing changed with the video boards.
Both the 2-stack control board and 3-stack control board use a PROM that's contents
are identical between the two. Apparently the 3-Stack Control Board prom was
dumped as a TBP28L22, because that is how the 2-Stack Control board prom was dumped.
Board Location Label PROM Type
--------------------- -------- --------------- ---------
3-Stack Control Board U68 MR020 (PR-5308) TBP28S42?
2-Stack Control Board U87 MR019 (PR-5315) TBP28L22?
For the 3-stack control board PROM sheet 2 of 6 for the 834-5212 board lists the pinouts
and they match the physical board. The PROM also has the TI logo and a date code? of J810A.
ROM locations are different with ROMs 1-5 on control board II and a different
numbered ROM in U87.
----ROM--NAMES-------------------------------------
THREE STACK BOARDSET
control board = 834-5166
video board = 834-5167
sound board = 834-5168
Current MAME Schematic Board
Names Names Location (3-stack)
------------ --------- -------------------
congo.u68 = MR020 U68 control board
congo1.bin = ROM 1 U35 control board
congo2.bin = ROM 2 U34 control board
congo3.bin = ROM 3 U33 control board
congo4.bin = ROM 4 U32 control board
congo5.bin = ROM 5 U76 control board
congo6.bin = ROM 6 U57 video board
congo7.bin = ROM 7 U58 video board
congo8.bin = ROM 8 U93 video board
congo9.bin = ROM 9 U94 video board
congo10.bin = ROM 10 U95 video board
congo11.bin = ROM 11 U77 video board
congo12.bin = ROM 12 U78 video board
congo13.bin = ROM 13 U79 video board
congo14.bin = ROM 14 U104 video board
congo15.bin = ROM 15 U105 video board
congo16.bin = ROM 16 U106 video board
congo17.bin = ROM 17 U11 sound board
TWO STACK BOARDSET
control board II = 834-5212
video board = 834-5167
Current MAME Schematic Board
Names Names Location (2-stack)
------------ --------- -------------------
congo.u68 = MR019 U87 control board
congo1.bin = ROM 1 U21 control board
congo2.bin = ROM 2 U22 control board
congo3.bin = ROM 3 U23 control board
congo4.bin = ROM 4 U24 control board
congo5.bin = ROM 5 U77 control board
congo6.bin = ROM 6 U57 video board
congo7.bin = ROM 7 U58 video board
congo8.bin = ROM 8 U93 video board
congo9.bin = ROM 9 U94 video board
congo10.bin = ROM 10 U95 video board
congo11.bin = ROM 11 U77 video board
congo12.bin = ROM 12 U78 video board
congo13.bin = ROM 13 U79 video board
congo14.bin = ROM 14 U104 video board
congo15.bin = ROM 15 U105 video board
congo16.bin = ROM 16 U106 video board
congo17.bin = ROM 17 U19 control board
***************************************************************************/
#include "emu.h"
#include "zaxxon.h"
#include "segausb.h"
#include "cpu/z80/z80.h"
#include "machine/segacrpt_device.h"
#include "machine/gen_latch.h"
#include "machine/i8255.h"
#include "sound/samples.h"
#include "sound/sn76496.h"
#include "screen.h"
#include "speaker.h"
/*************************************
*
* Constants
*
*************************************/
static constexpr XTAL MASTER_CLOCK = 48.66_MHz_XTAL;
static constexpr XTAL SOUND_CLOCK = 4_MHz_XTAL;
static constexpr XTAL PIXEL_CLOCK = MASTER_CLOCK/8;
#define HTOTAL (384)
#define HBEND (0)
#define HBSTART (256)
#define VTOTAL (264)
#define VBEND (16)
#define VBSTART (240)
/*************************************
*
* Interrupt generation
*
*************************************/
INPUT_CHANGED_MEMBER(zaxxon_state::service_switch)
{
/* pressing the service switch sends an NMI */
if (newval)
m_maincpu->pulse_input_line(INPUT_LINE_NMI, attotime::zero);
}
void zaxxon_state::vblank_int(int state)
{
if (state && m_int_enabled)
m_maincpu->set_input_line(0, ASSERT_LINE);
}
void zaxxon_state::int_enable_w(int state)
{
m_int_enabled = state;
if (!m_int_enabled)
m_maincpu->set_input_line(0, CLEAR_LINE);
}
/*************************************
*
* Machine setup
*
*************************************/
void zaxxon_state::machine_start()
{
/* register for save states */
save_item(NAME(m_int_enabled));
save_item(NAME(m_coin_status));
}
/*************************************
*
* Input handlers
*
*************************************/
uint8_t zaxxon_state::razmataz_counter_r()
{
/* this behavior is really unknown; however, the code is using this */
/* counter as a sort of timeout when talking to the sound board */
/* it needs to be increasing at a reasonable rate but not too fast */
/* or else the sound will mess up */
return m_razmataz_counter++ >> 8;
}
template <int Num>
CUSTOM_INPUT_MEMBER(zaxxon_state::razmataz_dial_r)
{
int res;
int delta = m_dials[Num]->read();
if (delta < 0x80)
{
// right
m_razmataz_dial_pos[Num] -= delta;
res = (m_razmataz_dial_pos[Num] << 1) | 1;
}
else
{
// left
m_razmataz_dial_pos[Num] += delta;
res = (m_razmataz_dial_pos[Num] << 1);
}
return res;
}
/*************************************
*
* Output handlers
*
*************************************/
void zaxxon_state::zaxxon_control_w(offs_t offset, uint8_t data)
{
// address decode for E0F8/E0F9 (74LS138 @ U57) has its G2B enable input in common with this latch
bool a3 = BIT(offset, 3);
m_mainlatch[1]->write_bit((a3 ? 4 : 0) | (offset & 3), BIT(data, 0));
if (a3 && !BIT(offset, 1))
bg_position_w(offset & 1, data);
}
void zaxxon_state::coin_counter_a_w(int state)
{
machine().bookkeeping().coin_counter_w(0, state);
}
void zaxxon_state::coin_counter_b_w(int state)
{
machine().bookkeeping().coin_counter_w(1, state);
}
// There is no external coin lockout circuitry; instead, the pcb simply latches
// each coin input, which then needs to be explicitly cleared by the game.
// Each coin input first passes through a debounce circuit consisting of a
// LS175 quad flip-flop and LS10 3-input NAND gate, which is not emulated.
void zaxxon_state::coin_enable_w(int state)
{
for (int n = 0; n < 3; n++)
if (!BIT(m_mainlatch[0]->output_state(), n))
m_coin_status[n] = 0;
}
INPUT_CHANGED_MEMBER(zaxxon_state::zaxxon_coin_inserted)
{
if (newval && BIT(m_mainlatch[0]->output_state(), param))
m_coin_status[param] = 1;
}
template <int Num>
int zaxxon_state::zaxxon_coin_r()
{
return m_coin_status[Num];
}
/*************************************
*
* Main CPU memory handlers
*
*************************************/
/* complete memory map derived from schematics */
void zaxxon_state::zaxxon_map(address_map &map)
{
map(0x0000, 0x5fff).rom();
map(0x6000, 0x6fff).ram();
map(0x8000, 0x83ff).mirror(0x1c00).ram().w(FUNC(zaxxon_state::zaxxon_videoram_w)).share("videoram");
map(0xa000, 0xa0ff).mirror(0x1f00).ram().share("spriteram");
map(0xc000, 0xc000).mirror(0x18fc).portr("SW00");
map(0xc001, 0xc001).mirror(0x18fc).portr("SW01");
map(0xc002, 0xc002).mirror(0x18fc).portr("DSW02");
map(0xc003, 0xc003).mirror(0x18fc).portr("DSW03");
map(0xc100, 0xc100).mirror(0x18ff).portr("SW100");
map(0xc000, 0xc007).mirror(0x18f8).w("mainlatch1", FUNC(ls259_device::write_d0));
map(0xe03c, 0xe03f).mirror(0x1f00).rw("ppi8255", FUNC(i8255_device::read), FUNC(i8255_device::write));
map(0xe0f0, 0xe0f3).mirror(0x1f00).select(0x0008).w(FUNC(zaxxon_state::zaxxon_control_w));
}
void zaxxon_state::decrypted_opcodes_map(address_map &map)
{
map(0x0000, 0x5fff).rom().share("decrypted_opcodes");
}
/* derived from Zaxxon, different sound hardware */
void zaxxon_state::ixion_map(address_map &map)
{
map(0x0000, 0x5fff).rom();
map(0x6000, 0x6fff).ram();
map(0x8000, 0x83ff).mirror(0x1c00).ram().w(FUNC(zaxxon_state::zaxxon_videoram_w)).share("videoram");
map(0xa000, 0xa0ff).mirror(0x1f00).ram().share("spriteram");
map(0xc000, 0xc000).mirror(0x18fc).portr("SW00");
map(0xc001, 0xc001).mirror(0x18fc).portr("SW01");
map(0xc002, 0xc002).mirror(0x18fc).portr("DSW02");
map(0xc003, 0xc003).mirror(0x18fc).portr("DSW03");
map(0xc100, 0xc100).mirror(0x18ff).portr("SW100");
map(0xc000, 0xc007).mirror(0x18f8).w("mainlatch1", FUNC(ls259_device::write_d0));
map(0xe03c, 0xe03c).mirror(0x1f00).rw("usbsnd", FUNC(usb_sound_device::status_r), FUNC(usb_sound_device::data_w));
map(0xe0f0, 0xe0f3).mirror(0x1f00).select(0x0008).w(FUNC(zaxxon_state::zaxxon_control_w));
}
/* complete memory map derived from schematics */
void zaxxon_state::congo_map(address_map &map)
{
map(0x0000, 0x7fff).rom();
map(0x8000, 0x8fff).ram();
map(0xa000, 0xa3ff).mirror(0x1800).ram().w(FUNC(zaxxon_state::zaxxon_videoram_w)).share("videoram");
map(0xa400, 0xa7ff).mirror(0x1800).ram().w(FUNC(zaxxon_state::congo_colorram_w)).share("colorram");
map(0xc000, 0xc000).mirror(0x1fc4).portr("SW00");
map(0xc001, 0xc001).mirror(0x1fc4).portr("SW01");
map(0xc002, 0xc002).mirror(0x1fc4).portr("DSW02");
map(0xc003, 0xc003).mirror(0x1fc4).portr("DSW03");
map(0xc008, 0xc008).mirror(0x1fc7).portr("SW100");
map(0xc018, 0xc01f).mirror(0x1fc0).w("mainlatch1", FUNC(ls259_device::write_d0));
map(0xc020, 0xc027).mirror(0x1fc0).w("mainlatch2", FUNC(ls259_device::write_d0));
map(0xc028, 0xc029).mirror(0x1fc4).w(FUNC(zaxxon_state::bg_position_w));
map(0xc030, 0xc033).mirror(0x1fc4).w(FUNC(zaxxon_state::congo_sprite_custom_w));
map(0xc038, 0xc03f).mirror(0x1fc0).w("soundlatch", FUNC(generic_latch_8_device::write));
}
/* complete memory map derived from schematics */
void zaxxon_state::congo_sound_map(address_map &map)
{
map(0x0000, 0x1fff).rom();
map(0x4000, 0x47ff).mirror(0x1800).ram();
map(0x6000, 0x6000).mirror(0x1fff).w("sn1", FUNC(sn76489a_device::write));
map(0x8000, 0x8003).mirror(0x1ffc).rw("ppi8255", FUNC(i8255_device::read), FUNC(i8255_device::write));
map(0xa000, 0xa000).mirror(0x1fff).w("sn2", FUNC(sn76489a_device::write));
}
/*************************************
*
* Port definitions
*
*************************************/
static INPUT_PORTS_START( zaxxon )
PORT_START("SW00")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_8WAY
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_8WAY
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_8WAY
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_8WAY
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 )
PORT_BIT( 0xe0, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_START("SW01")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_COCKTAIL
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_COCKTAIL
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_8WAY PORT_COCKTAIL
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_COCKTAIL
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_COCKTAIL
PORT_BIT( 0xe0, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_START("SW100")
PORT_BIT( 0x03, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_START1 )
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_START2 )
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(zaxxon_state, zaxxon_coin_r<0>)
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(zaxxon_state, zaxxon_coin_r<1>)
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(zaxxon_state, zaxxon_coin_r<2>)
PORT_START("COIN")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, zaxxon_state,zaxxon_coin_inserted, 0)
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_COIN2 ) PORT_CHANGED_MEMBER(DEVICE_SELF, zaxxon_state,zaxxon_coin_inserted, 1)
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SERVICE1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, zaxxon_state,zaxxon_coin_inserted, 2)
PORT_START("SERVICESW")
PORT_SERVICE_NO_TOGGLE( 0x01, IP_ACTIVE_HIGH ) PORT_CHANGED_MEMBER(DEVICE_SELF, zaxxon_state,service_switch, 0)
PORT_START("DSW02")
PORT_DIPNAME( 0x03, 0x03, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION("SW1:!1,!2")
PORT_DIPSETTING( 0x03, "10000" )
PORT_DIPSETTING( 0x01, "20000" )
PORT_DIPSETTING( 0x02, "30000" )
PORT_DIPSETTING( 0x00, "40000" )
PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unused ) ) PORT_DIPLOCATION("SW1:!3")
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
PORT_DIPSETTING( 0x04, DEF_STR( On ) )
PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unused ) ) PORT_DIPLOCATION("SW1:!4")
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
PORT_DIPSETTING( 0x08, DEF_STR( On ) )
PORT_DIPNAME( 0x30, 0x30, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW1:!5,!6")
PORT_DIPSETTING( 0x30, "3" )
PORT_DIPSETTING( 0x10, "4" )
PORT_DIPSETTING( 0x20, "5" )
PORT_DIPSETTING( 0x00, DEF_STR( Free_Play ) )
PORT_DIPNAME( 0x40, 0x40, "Sound" ) PORT_DIPLOCATION("SW1:!7")
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
PORT_DIPSETTING( 0x40, DEF_STR( On ) )
PORT_DIPNAME( 0x80, 0x00, DEF_STR( Cabinet ) ) PORT_DIPLOCATION("SW1:!8")
PORT_DIPSETTING( 0x00, DEF_STR( Upright ) )
PORT_DIPSETTING( 0x80, DEF_STR( Cocktail ) )
PORT_START("DSW03")
PORT_DIPNAME( 0x0f, 0x03, DEF_STR ( Coin_B ) ) PORT_DIPLOCATION("SW2:!1,!2,!3,!4")
PORT_DIPSETTING( 0x0f, DEF_STR ( 4C_1C ) )
PORT_DIPSETTING( 0x07, DEF_STR ( 3C_1C ) )
PORT_DIPSETTING( 0x0b, DEF_STR ( 2C_1C ) )
PORT_DIPSETTING( 0x06, "2C/1C 5C/3C 6C/4C" )
PORT_DIPSETTING( 0x0a, "2C/1C 3C/2C 4C/3C" )
PORT_DIPSETTING( 0x03, DEF_STR ( 1C_1C ) )
PORT_DIPSETTING( 0x02, "1C/1C 5C/6C" )
PORT_DIPSETTING( 0x0c, "1C/1C 4C/5C" )
PORT_DIPSETTING( 0x04, "1C/1C 2C/3C" )
PORT_DIPSETTING( 0x0d, DEF_STR ( 1C_2C ) )
PORT_DIPSETTING( 0x08, "1C/2C 5C/11C" )
PORT_DIPSETTING( 0x00, "1C/2C 4C/9C" )
PORT_DIPSETTING( 0x05, DEF_STR ( 1C_3C ) )
PORT_DIPSETTING( 0x09, DEF_STR ( 1C_4C ) )
PORT_DIPSETTING( 0x01, DEF_STR ( 1C_5C ) )
PORT_DIPSETTING( 0x0e, DEF_STR ( 1C_6C ) )
PORT_DIPNAME( 0xf0, 0x30, DEF_STR ( Coin_A ) ) PORT_DIPLOCATION("SW2:!5,!6,!7,!8")
PORT_DIPSETTING( 0xf0, DEF_STR ( 4C_1C ) )
PORT_DIPSETTING( 0x70, DEF_STR ( 3C_1C ) )
PORT_DIPSETTING( 0xb0, DEF_STR ( 2C_1C ) )
PORT_DIPSETTING( 0x60, "2C/1C 5C/3C 6C/4C" )
PORT_DIPSETTING( 0xa0, "2C/1C 3C/2C 4C/3C" )
PORT_DIPSETTING( 0x30, DEF_STR ( 1C_1C ) )
PORT_DIPSETTING( 0x20, "1C/1C 5C/6C" )
PORT_DIPSETTING( 0xc0, "1C/1C 4C/5C" )
PORT_DIPSETTING( 0x40, "1C/1C 2C/3C" )
PORT_DIPSETTING( 0xd0, DEF_STR ( 1C_2C ) )
PORT_DIPSETTING( 0x80, "1C/2C 5C/11C" )
PORT_DIPSETTING( 0x00, "1C/2C 4C/9C" )
PORT_DIPSETTING( 0x50, DEF_STR ( 1C_3C ) )
PORT_DIPSETTING( 0x90, DEF_STR ( 1C_4C ) )
PORT_DIPSETTING( 0x10, DEF_STR ( 1C_5C ) )
PORT_DIPSETTING( 0xe0, DEF_STR ( 1C_6C ) )
INPUT_PORTS_END
static INPUT_PORTS_START( szaxxon )
PORT_INCLUDE(zaxxon)
PORT_MODIFY("DSW02")
PORT_DIPNAME( 0x04, 0x04, DEF_STR( Difficulty ) )
PORT_DIPSETTING( 0x04, DEF_STR( Normal ) )
PORT_DIPSETTING( 0x00, DEF_STR( Hard ) )
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNUSED )
INPUT_PORTS_END
static INPUT_PORTS_START( futspy )
PORT_INCLUDE(zaxxon)
PORT_MODIFY("SW00")
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_8WAY
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_8WAY
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON2 )
PORT_BIT( 0xc0, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_MODIFY("SW01")
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_COCKTAIL
PORT_BIT( 0xc0, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_MODIFY("DSW02")
PORT_DIPNAME( 0x0f, 0x00, DEF_STR ( Coin_A ) ) PORT_DIPLOCATION("SW1:1,2,3,4")
PORT_DIPSETTING( 0x08, DEF_STR ( 4C_1C ) )
PORT_DIPSETTING( 0x07, DEF_STR ( 3C_1C ) )
PORT_DIPSETTING( 0x06, DEF_STR ( 2C_1C ) )
PORT_DIPSETTING( 0x0a, "2C/1C 5C/3C 6C/4C" )
PORT_DIPSETTING( 0x0b, "2C/1C 4C/3C" )
PORT_DIPSETTING( 0x00, DEF_STR ( 1C_1C ) )
PORT_DIPSETTING( 0x0e, "1C/1C 2C/3C" )
PORT_DIPSETTING( 0x0d, "1C/1C 4C/5C" )
PORT_DIPSETTING( 0x0c, "1C/1C 5C/6C" )
PORT_DIPSETTING( 0x09, DEF_STR ( 2C_3C ) )
PORT_DIPSETTING( 0x01, DEF_STR ( 1C_2C ) )
PORT_DIPSETTING( 0x0f, "1C/2C 5C/11C" )
PORT_DIPSETTING( 0x02, DEF_STR ( 1C_3C ) )
PORT_DIPSETTING( 0x03, DEF_STR ( 1C_4C ) )
PORT_DIPSETTING( 0x04, DEF_STR ( 1C_5C ) )
PORT_DIPSETTING( 0x05, DEF_STR ( 1C_6C ) )
PORT_DIPNAME( 0xf0, 0x00, DEF_STR ( Coin_B ) ) PORT_DIPLOCATION("SW1:5,6,7,8")
PORT_DIPSETTING( 0x80, DEF_STR ( 4C_1C ) )
PORT_DIPSETTING( 0x70, DEF_STR ( 3C_1C ) )
PORT_DIPSETTING( 0x60, DEF_STR ( 2C_1C ) )
PORT_DIPSETTING( 0xa0, "2C/1C 5C/3C 6C/4C" )
PORT_DIPSETTING( 0xb0, "2C/1C 4C/3C" )
PORT_DIPSETTING( 0x00, DEF_STR ( 1C_1C ) )
PORT_DIPSETTING( 0xe0, "1C/1C 2C/3C" )
PORT_DIPSETTING( 0xd0, "1C/1C 4C/5C" )
PORT_DIPSETTING( 0xc0, "1C/1C 5C/6C" )
PORT_DIPSETTING( 0x90, DEF_STR ( 2C_3C ) )
PORT_DIPSETTING( 0x10, DEF_STR ( 1C_2C ) )
PORT_DIPSETTING( 0xf0, "1C/2C 5C/11C" )
PORT_DIPSETTING( 0x20, DEF_STR ( 1C_3C ) )
PORT_DIPSETTING( 0x30, DEF_STR ( 1C_4C ) )
PORT_DIPSETTING( 0x40, DEF_STR ( 1C_5C ) )
PORT_DIPSETTING( 0x50, DEF_STR ( 1C_6C ) )
PORT_MODIFY("DSW03")
PORT_DIPNAME( 0x01, 0x01, DEF_STR( Cabinet ) ) PORT_DIPLOCATION("SW2:1")
PORT_DIPSETTING( 0x01, DEF_STR( Upright ) )
PORT_DIPSETTING( 0x00, DEF_STR( Cocktail ) )
PORT_DIPNAME( 0x02, 0x02, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW2:2")
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
PORT_DIPSETTING( 0x02, DEF_STR( On ) )
PORT_DIPNAME( 0x0c, 0x00, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW2:3,4")
PORT_DIPSETTING( 0x00, "3" )
PORT_DIPSETTING( 0x04, "4" )
PORT_DIPSETTING( 0x08, "5" )
PORT_DIPSETTING( 0x0c, DEF_STR( Free_Play ) )
PORT_DIPNAME( 0x30, 0x00, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION("SW2:5,6")
PORT_DIPSETTING( 0x00, "20K 40K 60K" )
PORT_DIPSETTING( 0x10, "30K 60K 90K" )
PORT_DIPSETTING( 0x20, "40K 70K 100K" )
PORT_DIPSETTING( 0x30, "40K 80K 120K" )
PORT_DIPNAME( 0xc0, 0x40, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SW2:7,8")
PORT_DIPSETTING( 0x00, DEF_STR( Easy ) )
PORT_DIPSETTING( 0x40, DEF_STR( Medium ) )
PORT_DIPSETTING( 0x80, DEF_STR( Hard ) )
PORT_DIPSETTING( 0xc0, DEF_STR( Hardest ) )
INPUT_PORTS_END
static INPUT_PORTS_START( razmataz )
PORT_START("SW00")
PORT_BIT( 0xff, 0x00, IPT_CUSTOM) PORT_CUSTOM_MEMBER(zaxxon_state, razmataz_dial_r<0>)
PORT_START("DIAL.0")
PORT_BIT( 0xff, 0x00, IPT_DIAL ) PORT_SENSITIVITY(30) PORT_KEYDELTA(15) PORT_RESET PORT_PLAYER(1)
PORT_START("SW01")
PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_START("SW04")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(1)
PORT_BIT( 0x1e, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_START1 )
PORT_BIT( 0xc0, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_START("SW08")
PORT_BIT( 0xff, 0x00, IPT_CUSTOM) PORT_CUSTOM_MEMBER(zaxxon_state, razmataz_dial_r<1>)
PORT_START("DIAL.1")
PORT_BIT( 0xff, 0x00, IPT_DIAL ) PORT_SENSITIVITY(30) PORT_KEYDELTA(15) PORT_RESET PORT_PLAYER(2)
PORT_START("SW0C")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(2)
PORT_BIT( 0x1e, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_START2 )
PORT_BIT( 0xc0, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_START("SW100")
PORT_BIT( 0x1f, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(zaxxon_state, zaxxon_coin_r<0>)
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(zaxxon_state, zaxxon_coin_r<1>)
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(zaxxon_state, zaxxon_coin_r<2>)
PORT_START("COIN")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, zaxxon_state,zaxxon_coin_inserted, 0)
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_COIN2 ) PORT_CHANGED_MEMBER(DEVICE_SELF, zaxxon_state,zaxxon_coin_inserted, 1)
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SERVICE1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, zaxxon_state,zaxxon_coin_inserted, 2)
PORT_START("SERVICESW")
PORT_SERVICE_NO_TOGGLE( 0x01, IP_ACTIVE_HIGH ) PORT_CHANGED_MEMBER(DEVICE_SELF, zaxxon_state,service_switch, 0)
PORT_START("DSW02")
PORT_DIPNAME( 0x03, 0x00, DEF_STR( Bonus_Life ) )
PORT_DIPSETTING( 0x00, "50000" )
PORT_DIPSETTING( 0x01, "100000" )
PORT_DIPSETTING( 0x02, "150000" )
PORT_DIPSETTING( 0x03, "200000" )
PORT_DIPNAME( 0x0c, 0x04, DEF_STR( Difficulty ) )
PORT_DIPSETTING( 0x00, DEF_STR( Easy ) )
PORT_DIPSETTING( 0x04, DEF_STR( Normal ) )
PORT_DIPSETTING( 0x08, DEF_STR( Hard ) )
PORT_DIPSETTING( 0x0c, DEF_STR( Very_Hard ) )
PORT_DIPNAME( 0x30, 0x00, DEF_STR( Lives ) )
PORT_DIPSETTING( 0x00, "3" )
PORT_DIPSETTING( 0x10, "4" )
PORT_DIPSETTING( 0x20, "5" )
PORT_DIPSETTING( 0x30, "6" )
PORT_DIPNAME( 0x40, 0x00, DEF_STR( Demo_Sounds ) )
PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_START("DSW03")
PORT_DIPNAME( 0x07, 0x03, DEF_STR( Coin_B ) )
PORT_DIPSETTING( 0x00, DEF_STR ( 4C_1C ) )
PORT_DIPSETTING( 0x01, DEF_STR ( 3C_1C ) )
PORT_DIPSETTING( 0x02, DEF_STR ( 2C_1C ) )
PORT_DIPSETTING( 0x03, DEF_STR ( 1C_1C ) )
PORT_DIPSETTING( 0x04, DEF_STR ( 1C_2C ) )
PORT_DIPSETTING( 0x05, DEF_STR ( 1C_3C ) )
PORT_DIPSETTING( 0x06, DEF_STR ( 1C_4C ) )
PORT_DIPSETTING( 0x07, DEF_STR ( 1C_5C ) )
PORT_DIPNAME( 0x38, 0x18, DEF_STR( Coin_A ) )
PORT_DIPSETTING( 0x00, DEF_STR ( 4C_1C ) )
PORT_DIPSETTING( 0x08, DEF_STR ( 3C_1C ) )
PORT_DIPSETTING( 0x10, DEF_STR ( 2C_1C ) )
PORT_DIPSETTING( 0x18, DEF_STR ( 1C_1C ) )
PORT_DIPSETTING( 0x20, DEF_STR ( 1C_2C ) )
PORT_DIPSETTING( 0x28, DEF_STR ( 1C_3C ) )
PORT_DIPSETTING( 0x30, DEF_STR ( 1C_4C ) )
PORT_DIPSETTING( 0x38, DEF_STR ( 1C_5C ) )
PORT_DIPNAME( 0x40, 0x40, "Test Flip Screen" )
PORT_DIPSETTING( 0x00, DEF_STR( No ) )
PORT_DIPSETTING( 0x40, DEF_STR( Yes ) )
PORT_DIPNAME( 0x80, 0x00, DEF_STR( Free_Play ) )
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
PORT_DIPSETTING( 0x80, DEF_STR( On ) )
INPUT_PORTS_END
static INPUT_PORTS_START( ixion )
PORT_INCLUDE(zaxxon)
PORT_MODIFY("SW00")
PORT_BIT( 0xff, 0x00, IPT_CUSTOM) PORT_CUSTOM_MEMBER(zaxxon_state, razmataz_dial_r<0>)
PORT_START("DIAL.0")
PORT_BIT( 0xff, 0x00, IPT_DIAL ) PORT_SENSITIVITY(30) PORT_KEYDELTA(15) PORT_CODE_DEC(KEYCODE_Z) PORT_CODE_INC(KEYCODE_X) PORT_RESET
PORT_MODIFY("SW01")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_8WAY
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_8WAY
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_8WAY
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_8WAY
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 )
PORT_BIT( 0xe0, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_MODIFY("DSW02")
PORT_DIPNAME( 0x03, 0x00, DEF_STR( Bonus_Life ) )
PORT_DIPSETTING( 0x00, "40000" )
PORT_DIPSETTING( 0x01, "60000" )
PORT_DIPSETTING( 0x02, "80000" )
PORT_DIPSETTING( 0x03, "100000" )
PORT_DIPNAME( 0x0c, 0x04, DEF_STR( Lives ) )
PORT_DIPSETTING( 0x00, "2" )
PORT_DIPSETTING( 0x04, "3" )
PORT_DIPSETTING( 0x08, "4" )
PORT_DIPSETTING( 0x0c, "5" )
PORT_DIPNAME( 0x70, 0x30, DEF_STR( Difficulty ) )
PORT_DIPSETTING( 0x00, DEF_STR( Easiest ) )
PORT_DIPSETTING( 0x10, DEF_STR( Easier ) )
PORT_DIPSETTING( 0x20, DEF_STR( Easy ) )
PORT_DIPSETTING( 0x30, DEF_STR( Normal ) )
PORT_DIPSETTING( 0x40, DEF_STR( Medium ) )
PORT_DIPSETTING( 0x50, DEF_STR( Hard ) )
PORT_DIPSETTING( 0x60, DEF_STR( Harder ) )
PORT_DIPSETTING( 0x70, DEF_STR( Hardest ) )
PORT_DIPNAME( 0x80, 0x80, DEF_STR( Demo_Sounds ) )
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
PORT_DIPSETTING( 0x80, DEF_STR( On ) )
PORT_MODIFY("DSW03")
PORT_DIPNAME( 0x07, 0x03, DEF_STR( Coin_B ) )
PORT_DIPSETTING( 0x00, DEF_STR ( 4C_1C ) )
PORT_DIPSETTING( 0x01, DEF_STR ( 3C_1C ) )
PORT_DIPSETTING( 0x02, DEF_STR ( 2C_1C ) )
PORT_DIPSETTING( 0x03, DEF_STR ( 1C_1C ) )
PORT_DIPSETTING( 0x04, DEF_STR ( 1C_2C ) )
PORT_DIPSETTING( 0x05, DEF_STR ( 1C_3C ) )
PORT_DIPSETTING( 0x06, DEF_STR ( 1C_4C ) )
PORT_DIPSETTING( 0x07, DEF_STR ( 1C_5C ) )
PORT_DIPNAME( 0x38, 0x18, DEF_STR( Coin_A ) )
PORT_DIPSETTING( 0x00, DEF_STR ( 4C_1C ) )
PORT_DIPSETTING( 0x08, DEF_STR ( 3C_1C ) )
PORT_DIPSETTING( 0x10, DEF_STR ( 2C_1C ) )
PORT_DIPSETTING( 0x18, DEF_STR ( 1C_1C ) )
PORT_DIPSETTING( 0x20, DEF_STR ( 1C_2C ) )
PORT_DIPSETTING( 0x28, DEF_STR ( 1C_3C ) )
PORT_DIPSETTING( 0x30, DEF_STR ( 1C_4C ) )
PORT_DIPSETTING( 0x38, DEF_STR ( 1C_5C ) )
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_DIPNAME( 0x80, 0x00, DEF_STR( Free_Play ) )
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
PORT_DIPSETTING( 0x80, DEF_STR( On ) )
INPUT_PORTS_END
static INPUT_PORTS_START( congo )
PORT_INCLUDE(zaxxon)
PORT_MODIFY("SW00")
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_8WAY
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_8WAY
PORT_DIPNAME( 0x20, 0x00, "Test Back and Target" )
PORT_DIPSETTING( 0x20, DEF_STR( No ) )
PORT_DIPSETTING( 0x00, DEF_STR( Yes ) )
PORT_BIT( 0xc0, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_MODIFY("SW01")
PORT_DIPNAME( 0x20, 0x00, "Test I/O and Dip SW" )
PORT_DIPSETTING( 0x20, DEF_STR( No ) )
PORT_DIPSETTING( 0x00, DEF_STR( Yes ) )
PORT_BIT( 0xc0, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_MODIFY("DSW02")
PORT_DIPNAME( 0x0c, 0x04, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SW1:!3,!4")
PORT_DIPSETTING( 0x0c, DEF_STR( Easy ) )
PORT_DIPSETTING( 0x04, DEF_STR( Medium ) )
PORT_DIPSETTING( 0x08, DEF_STR( Hard ) )
PORT_DIPSETTING( 0x00, DEF_STR( Hardest ) )
INPUT_PORTS_END
/*************************************
*
* Graphics definitions
*
*************************************/
static const gfx_layout zaxxon_spritelayout =
{
32,32,
RGN_FRAC(1,3),
3,
{ RGN_FRAC(2,3), RGN_FRAC(1,3), RGN_FRAC(0,3) },
{ 0, 1, 2, 3, 4, 5, 6, 7,
8*8+0, 8*8+1, 8*8+2, 8*8+3, 8*8+4, 8*8+5, 8*8+6, 8*8+7,
16*8+0, 16*8+1, 16*8+2, 16*8+3, 16*8+4, 16*8+5, 16*8+6, 16*8+7,
24*8+0, 24*8+1, 24*8+2, 24*8+3, 24*8+4, 24*8+5, 24*8+6, 24*8+7 },
{ 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8,
32*8, 33*8, 34*8, 35*8, 36*8, 37*8, 38*8, 39*8,
64*8, 65*8, 66*8, 67*8, 68*8, 69*8, 70*8, 71*8,
96*8, 97*8, 98*8, 99*8, 100*8, 101*8, 102*8, 103*8 },
128*8
};
static GFXDECODE_START( gfx_zaxxon )
GFXDECODE_ENTRY( "gfx_tx", 0, gfx_8x8x2_planar, 0, 64*2 ) /* characters */
GFXDECODE_ENTRY( "gfx_bg", 0, gfx_8x8x3_planar, 0, 32*2 ) /* background tiles */
GFXDECODE_ENTRY( "gfx_spr", 0, zaxxon_spritelayout, 0, 32*2 ) /* sprites */
GFXDECODE_END
/*************************************
*
* Machine driver
*
*************************************/
void zaxxon_state::root(machine_config &config)
{
/* basic machine hardware */
Z80(config, m_maincpu, MASTER_CLOCK/16);
m_maincpu->set_addrmap(AS_PROGRAM, &zaxxon_state::zaxxon_map);
I8255A(config, m_ppi);
m_ppi->out_pa_callback().set(FUNC(zaxxon_state::zaxxon_sound_a_w));
m_ppi->out_pb_callback().set(FUNC(zaxxon_state::zaxxon_sound_b_w));
m_ppi->out_pc_callback().set(FUNC(zaxxon_state::zaxxon_sound_c_w));
m_ppi->tri_pa_callback().set_constant(0);
m_ppi->tri_pb_callback().set_constant(0);
m_ppi->tri_pc_callback().set_constant(0);
LS259(config, m_mainlatch[0]); // U55 on Zaxxon IC Board A
m_mainlatch[0]->q_out_cb<0>().set(FUNC(zaxxon_state::coin_enable_w)); // COIN EN A
m_mainlatch[0]->q_out_cb<1>().set(FUNC(zaxxon_state::coin_enable_w)); // COIN EN B
m_mainlatch[0]->q_out_cb<2>().set(FUNC(zaxxon_state::coin_enable_w)); // SERV EN
m_mainlatch[0]->q_out_cb<3>().set(FUNC(zaxxon_state::coin_counter_a_w)); // COUNT A
m_mainlatch[0]->q_out_cb<4>().set(FUNC(zaxxon_state::coin_counter_b_w)); // COUNT B
m_mainlatch[0]->q_out_cb<6>().set(FUNC(zaxxon_state::flipscreen_w)); // FLIP
LS259(config, m_mainlatch[1]); // U56 on Zaxxon IC Board A
m_mainlatch[1]->q_out_cb<0>().set(FUNC(zaxxon_state::int_enable_w)); // INTON
m_mainlatch[1]->q_out_cb<1>().set(FUNC(zaxxon_state::fg_color_w)); // CREF 1
m_mainlatch[1]->q_out_cb<6>().set(FUNC(zaxxon_state::bg_color_w)); // CREF 3
m_mainlatch[1]->q_out_cb<7>().set(FUNC(zaxxon_state::bg_enable_w)); // BEN
/* video hardware */
GFXDECODE(config, m_gfxdecode, m_palette, gfx_zaxxon);
PALETTE(config, m_palette, FUNC(zaxxon_state::zaxxon_palette), 256);
screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
screen.set_raw(PIXEL_CLOCK, HTOTAL, HBEND, HBSTART, VTOTAL, VBEND, VBSTART);
screen.set_screen_update(FUNC(zaxxon_state::screen_update_zaxxon));
screen.set_palette(m_palette);
screen.screen_vblank().set(FUNC(zaxxon_state::vblank_int));
}
void zaxxon_state::zaxxon(machine_config &config)
{
root(config);
/* sound hardware */
SPEAKER(config, "speaker").front_center();
zaxxon_samples(config);
}
void zaxxon_state::szaxxon(machine_config &config)
{
zaxxon(config);
m_maincpu->set_addrmap(AS_OPCODES, &zaxxon_state::decrypted_opcodes_map);
}
void zaxxon_state::szaxxone(machine_config &config)
{
zaxxon(config);
sega_315_5013_device &maincpu(SEGA_315_5013(config.replace(), m_maincpu, MASTER_CLOCK/16));
maincpu.set_addrmap(AS_PROGRAM, &zaxxon_state::zaxxon_map);
maincpu.set_addrmap(AS_OPCODES, &zaxxon_state::decrypted_opcodes_map);
maincpu.set_decrypted_tag(":decrypted_opcodes");
maincpu.set_size(0x6000);
}
void zaxxon_state::futspye(machine_config &config)
{
root(config);
sega_315_5061_device &maincpu(SEGA_315_5061(config.replace(), m_maincpu, MASTER_CLOCK/16));
maincpu.set_addrmap(AS_PROGRAM, &zaxxon_state::zaxxon_map);
maincpu.set_addrmap(AS_OPCODES, &zaxxon_state::decrypted_opcodes_map);
maincpu.set_decrypted_tag(":decrypted_opcodes");
maincpu.set_size(0x6000);
/* video hardware */
subdevice<screen_device>("screen")->set_screen_update(FUNC(zaxxon_state::screen_update_futspy));
/* sound hardware */
SPEAKER(config, "speaker").front_center();