/
xavix.cpp
2211 lines (1758 loc) · 130 KB
/
xavix.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:David Haywood, Angelo Salese
/***************************************************************************
Preliminary driver for XaviX TV PNP console and childs (Let's! Play TV Classic)
CPU is an M6502 derivative with added opcodes for far-call handling
Notes from http://www.videogameconsolelibrary.com/pg00-xavix.htm#page=reviews (thanks Guru!)
(** this isn't entirely accurate, XaviX Tennis appears to be Super Xavix, see other notes in driver)
XaviXPORT arrived on the scene with 3 game titles (XaviX Tennis, XaviX Bowling and XaviX Baseball) using their
original XaviX Multiprocessor. This proprietary chip is reported to contain an 8-bit high speed central processing
unit (6502) at 21 MHz, picture processor, sound processor, DMA controller, 1K bytes high speed RAM, universal timer,
AD/Converter and I/O device control. Each cartridge comes with a wireless peripheral to be used with the game (Baseball Bat,
Tennis Racquet, etc.) that requires "AA" batteries. The XaviXPORT system retailed for $79.99 USD with the cartridges
retailing for $49.99 USD.
The following year at CES 2005, SSD COMPANY LIMITED introduced two new XaviXPORT titles (XaviX Golf and XaviX Bass Fishing) each
containing the upgraded "Super XaviX". This new chip is said to sport a 16-bit high central processing unit (65816) at 43 MHz.
SSD COMPANY LIMITED is already working on their next chip called "XaviX II" that is said to be a 32-bit RISC processor
with 3D capabilities.
Notes:
To access service mode in Monster Truck hold Horn and Nitro on startup
There are multiple revisions of the CPU hardware, the SSD 2000 / SSD 2002 chips definitely add more opcodes
(thanks to Sean Riddle for this table)
preliminary list of XaviX software based on various sources (some likely still missing)
year name PCB ID ROM width TSOP pads ROM size SEEPROM die markings extra components / notes
2011 anpan-man kazoku de ikunou mat DX /JoyPalette/Japan - - - - - - -
2009 anpan-man pyon-pyon ikunou mat /JoyPalette/Japan - - - - - - -
2008 kyuukyoku! kinniku grand slam! SASUKE kanzen seiha /EPOCH/Japan - - - - - - -
2007 Tokyo Friend park? perfect! mezase! grand slam! /EPOCH/Japan - - - - - - -
2006 1 Let's TV Play series "Kamen Rider Kabuto" /EPOCH/Japan - - - - - - -
2 Let's TV Play series "Bo-kenger" /EPOCH/Japan - - - - - - -
3 Challenge Ai-chan! Exciting Ping-pong /TAKARATOMY/Japan - - - - - - dumped
4 Sasuke & Sportsman Tournament /BANDAI/Japan - - - - - - -
5 Hyper resque, I am a resque team /BANDAI/Japan - - - - - - -
6 Let's TV Play series "Ultraman" /BANDAI/Japan - - - - - - -
7 Let's TV Play Classic series "Namco Nostalgia 1" /BANDAI/Japan CGSJ x8 48 1M 24LC04 dumped non destructively
8 Let's TV Play Classic series "Namco Nostalgia 2" /BANDAI/Japan CGSJ x8 48 1M 24LC04 SSD 98 PL7351-181 dumped
9 Let's TV Play Classic series "Taito Nostalgia 1" /BANDAI/Japan CGSJ x8 48 2M 24LC04 flash, dumped non destructively
10 Let's TV Play Classic series "Taito Nostalgia 2" /BANDAI/Japan CGSJ x8 48 2M 24LC04 flash, dumped non destructively
11 Let's play and study! Doraemon Hiragana book /BANDAI/Japan - - - - - - -
12 Scan card! Exciting Stage Soccer. /EPOCH/Japan - - - - - - -
13 Hello Kitty Super TV computer /EPOCH/Japan - - - - - - -
14 Doraemon Super TV computer /EPOCH/Japan - - - - - - -
2005 1 Let's TV Play series "Dragon Ball Z" /BANDAI/Japan - - - - - - -
2 Let's TV Play series "Purikyua" /BANDAI/Japan - - - - - - -
3 Idaten Jump /TOMY/Japan - - - - - - -
4 Tokyo Friend Park 2 Special /EPOCH/Japan - - - - - - -
5 Masked Rider HIBIKI /BANDAI/Japan - - - - - - -
6 Magic Ranger Battle /BANDAI/Japan - - - - - - dumped
7 Accessory cartridge for Super TV computer "ECC Junior" /EPOCH/Japan - - - - - - -
8 Wild Adventure Mini Golf Game /Hasbro/USA MGFA x8 48 4M 24C04 SSD 98 PL7351-181 dumped
9 MX DIRT REBEL Game /Hasbro/USA MTXA x8 48 8M 24C04 SSD 2000 NEC 85605-621 dumped
10 Dokodemo Doraemon Japan Travel Game DX /EPOCH/Japan - - - - - - -
11 Tomas Plarail /TOMY/Japan - - - - - - - dumped?
12 Thomas TV Personal Computer /EPOCH/Japan - - - - - - -
13 STAR WARS Light Saber Battle /TOMY/Japan - - - - - - -
14 Jala Jaland /atlus/Japan - - - - - - - (is this the arcade release of Jara-Ja Land /TAKARA/Japan below?, Atlas are an arcade distributor and arcade version is confirmed)
15 Star Wars Lightsaber Battle Game /Hasbro/USA SWSA x8 48 8M 24C02 SSD 2000 NEC 85605-621 dumped
16 Gururin World /EPOCH/Japan - x8 - - - SSD 98 PL7351-181 dumped
17 Toinohgi Onmyo-daisenki /BANDAI/Japan - - - - - - -
2004 1 Accessory cartridge for Super TV computer "Double mouse party" /EPOCH/Japan - - - - - - -
2 Printer for TV computer /EPOCH/Japan - - - - - - -
3 Virtual punching battle of "One Piece" /BANDAI/Japan - - - - - - dumped
4 Accessory cartridge for Super TV computer "Doraemon" /EPOCH/Japan - - - - - - -
5 Accessory cartridge for Super TV computer "Hamutaro" /EPOCH/Japan - - - - - - -
6 Super TV computer /EPOCH/Japan - - - - - - -
7 Super Dash ball /EPOCH/Japan - x8 - - - SSD 2000 NEC 85605-621 dumped
8 Exciting sports Tennis X Fitness /EPOCH/Japan - - - - - - -
9 Accessory memory mascot for TV mail Pc mail cot 2 characters (Putchi, Petchi) /EPOCH/Japan - - - - - - -
10 Accessory memory mascot for TV mail Pc mail cot 2 characters (Charuru, Kurau) /EPOCH/Japan - - - - - - -
11 The Lord of the Rings Warrior of Middle Earth /Hasbro/USA LORA x8 48 8M 24C02 SSD 2000 NEC 85605-621 dumped
12 Beyblade Arcade Challenge 5-in-1 /Hasbro/USA - - - - - - have
13 All star Festival Quize /EPOCH/Japan - - - - - - -
14 e-kara mix /TAKARA/Japan - - - - - - -
15 Jumping Popira /TAKARA/Japan - - - - - - -
16 Tour around Japan. I'm a Prarail motorman /TOMY/Japan - - - - - - dumped
17 TV mail PC "Mercot /EPOCH/Japan - - - - - - -
18 Play TV Monster Truck /RADICA/USA 74026 x8 48 4M none SSD 98 PL7351-181 dumped
19 Play TV Madden Football /RADICA/USA 74021 x8 48 4M none SSD 98 PL7351-181 dumped
20 Play TV SSX Snowboarder (and Snowboarder white?) /RADICA/USA 74023 none dumped
21 Disney Princess "Kira-Kira magical lesson" /TOMY/Japan - - - - - - -
22 Mermaid Melody "pichi-pichi Pitch" e-pitch microcomputer pure starter set /TAKARA/Japan - - - - - - dumped (same as e-kara Japan)
23 Hello Kitty TV computer /EPOCH/Japan - - - - - - -
24 Gan-Gan Revoultion /TAKARA/Japan - - - - - - -
2003 1 Tokyo Friend Park II /EPOCH/Japan - - - - - - -
2 TV mah-jongg /EPOCH/Japan - - - - - - -
3 e-kara Web /TAKARA/Japan (e-kara web unit is a PC attachment, e-kara web carts can have songs flashed into them)
4 Doraemon TV computer /EPOCH/Japan - - - - - - -
5 Exciting stadium DX, Hansin Tigers version /EPOCH/Japan - - - - - - -
6 Dragon Quest /SQUARE ENIX/Japan - - - 8M - SSD 2000? dumped
7 Croquette! Win a medal! /EPOCH/Japan - - - - - - -
8 Taiko Popira /TAKARA/Japan - - - - - - dumped
9 Together Minimoni, Dancing' Stage! plus /EPOCH/Japan - - - - - - -
10 Evio /TOMY/Japan - - - - - - dumped (some carts not dumped tho)
11 Together Minimoni,Jumping Party! /EPOCH/Japan - - - - - - -
12 Hamutaro TV computer /EPOCH/Japan - - - - - - -
13 Jara-Ja Land /TAKARA/Japan - - - - - - dumped (is this the home release of Jala Jaland /atlus/Japan above?)
14 Tomika, Draiving by Car navigation system /TOMY/Japan - - - - - - dumped
15 PLAY TV Rescue Heroes /RADICA/USA 73036 x8 48 2M none SSD 98 PL7351-181 dumped
16 PLAY TV Huntin' 2 /RADICA/USA 73030 x8 none none SSD 98 PL7351-181 dumped
17 Let's play Ping-pong. Exciting pingpong2 /EPOCH/Japan - - - - - - -
18 Cartridge for Slot machine TV "King of wild animal" /TAKARA/Japan - - - - - - *** maybe dumped? ** Is this one dumped, or the Jr version below**
19 ChyoroQ "Burning up Racer /TAKARA/Japan - - - - - - -
20 Super shot! Exciting golf /EPOCH/Japan - - - - - - -
21 PichiPichi Pitchi /TAKARA/Japan - - - - - - dumped (same as e-kara Japan)
22 Dual Station /TAKARA/Japan - - - - - - -
23 Gei-Geki GoGo! Shooting /TAKARA/Japan - - - - - - dumped
24 Let's fish a big one. Exciting fishing! /EPOCH/Japan - - - - - - -
25 Champion Pinball /TOMY/Japan - - - - - - dumped
26 Excite Fishing DX EF2J x8 48 4M 24C08 SSD 98 PL7351-181 dumped
2002 1 Accessory cartridge for Slot machine "Gin-gin maru TV" /TAKARA/Japan - - - - - - dumped
2 Wildest computer robot "Daigander" (Korean version) /TAKARA/Korea - - - - - - -
3 Hamutaro's circus /EPOCH/Japan - - - - - - -
4 Doraemon Wakuwaku Kuukihou /EPOCH/Japan - x8 - - - - dumped
5 Strike! Exciting bowling /EPOCH/Japan - - - - - - dumped
6 e-kara /Hasbro/Spain - - - - - - dumped (has 3 Spanish songs)
7 Starter set for e-kara H.S," Morning sisters" /TAKARA/Japan - - - - - - -
8 e-kara H.S.(headphones set) /TAKARA/Japan - - - - - - -
9 Accessory cartridge for Slot machine TV "Aladdin TV" /TAKARA/Japan - - - - - - dumped (cart)
10 Accessory cartridge for Slot machine TV "Businessman Kintaro /TAKARA/Japan - - - - - - dumped (cart)
11 Poko-poko Hammers /TAKARA/Japan - - - - - - -
12 e-kara N Angel blue special set /TAKARA/Japan - - - - - - -
13 Together Minimoni,Dancing Stage! /EPOCH/Japan - - - - - - -
14 King of shooting /TOMY/Japan - - - - - - -
15 Knock them out! Exciting boxing /EPOCH/Japan - - - - - - dumped
16 Popira2 /TAKARA/Japan - - - - - - dumped
17 Zuba-Zuba Blade /TAKARA/Japan - - - - - - -
18 Starter set for e-kara N "Morning sisters" /TAKARA/Japan - - - - - - -
19 e-kara /Hasbro/England - - - - - - dumped? (if same as one of the 'US' sets?)
20 e-kara /Takara USA/USA - - - - - - dumped? (or #10 below, this might be ekaraa set with improved text)
21 PLAY TV Soccer /RADICA/USA 76088500 x8 none none SSD 98 PA7351-107 dumped
22 PLAY TV Jr. Construction /RADICA/USA - - - - - - -
23 PLAY TV Boxing /RADICA/Japan 72039 x8 48 2M none SSD 98 PA7351-107 dumped
24 PLAY TV Baseball 2 /RADICA/USA 72042 x8 48 2M none SSD 98 PL7351-181 dumped
25 Barbie Dance Party /RADICA/USA,EU - x8 none - - - dumped
26 Compete! Exciting stadium DX /EPOCH/Japan - - - - - - dumped
27 e-kara N /EPOCH/Japan - - - - - - -
28 Who's the ace? Excite Tennis /EPOCH/Japan - - - - - - -
29 Wildest computer robot, "Daigander" /TAKARA/Japan - - - - - - -
30 Cartridge for Slot machine TV "King of wild animal Jr." /TAKARA/Japan - - - - - - *** maybe dumped? ** Is this one dumped, or the non-Jr version above**
31 Gachinko Contest! Slot machine TV /DCT/Japan - - - - - - dumped
32 Beyblade Ultimate shooter /TAKARA/Japan - - - - - - -
2001 1 Ping-pong(Chinese version) /Tenpon/China - - - - - - -
2 TV hockey /TOMY/Japan - - - - - - -
3 e-kara Morning sisters /TAKARA/Japan - - - - - - -
4 e-kara Duet microphone plus /TAKARA/Japan - - - - - - -
5 e-kara plus /TAKARA/Japan - - - - - - -
6 Hamutaro, Dancing', Running /EPOCH/Japan - - - - - - -
7 Gin-gin Snowboarders /TAKARA/Japan - - - - - - -
8 Shoot! Exciting striker /EPOCH/Japan - - - - - - -
9 e-kara US version /TAKARA USA, Hasbro/USA,EU 71076 x8 none 1M SSD 98 PA7351-107 this one or #20 above? dumped
10 Popira Korea version /SONOKONG/Korea - - - - - - -
11 I singer: e-kara Korean version /SONOKONG/Korea - - - - - - -
12 Ms.Comett, Lovely baton /TAKARA/Japan< - - - - - - -
13 Dance Dance revolution family mat /KONAMI,KONAMI Sports/Japan - - - - - - dumped
14 PLAY TV Card Night /RADICA/USA 71063 x8 40 1M none SSD 98 PA7351-107 dumped
15 PLAY TV Bass Fishin' /RADICA/USA 71008 x8 40 1M none SSD 98 PA7351-107 dumped
16 PLAY TV Snowboarder (blue) /RADICA/USA 71023 x8 40 1M none SSD 98 PL7351-181 dumped
17 Bistro Kids /SEGA Toys/Japan - - - - - - -
18 Let's construct the town! /TAKARA/Japan - - - - - - -
19 Let's fish black bass! Exciting Fishing /EPOCH/Japan - - - - - - -
20 Baseball Korean version /SONOKONG/Korea - - - - - - -
21 Ping-pong Korean version /SONOKONG/Korea - - - - - - dumped ('Reeal Ping Pong')
22 e-kara Hello Kitty /TAKARA/Japan - - - - - - -
23 Special box "Morning sisters" /TAKARA/Japan - - - - - - -
24 Gan-Gan Adventure /TAKARA/Japan - - - - - - -
25 e-kara wireless unit /TAKARA/Japan - - - - - - -
26 Webdiver Gradion /TAKARA/Japan - - - - - - -
27 black bass tsurouze! Excite Fishing /EPOCH/Japan - - - - - - -
28 Hamu-chan's Daishuugou dance surunoda! hasirunoda! /EPOCH/Japan - - - - - - -
2000 1 Popira /TAKARA/Japan - - - - - - dumped
2 e-kara Duet microphone /TAKARA/Japan - - - - - - -
3 e-kara /TAKARA/Japan - - - - - - dumped
4 Let's play ping-pong. Exciting ping-pong /EPOCH/Japan - - - - - - dumped
5 PLAY TV Huntin' Buckmasters /RADICA/USA 8074 x8 none none SSD 98 PA7351-107 dumped
6 PLAY TV Ping Pong /RADICA/USA,HK,EU 8028 x8 48 1M none SSD 97 PA7270-107 dumped
7 PLAY TV OPUS /RADICA/USA,EU - - - - - - dumped (US version, PAL version appears to use different ROM)
8 PLAY TV Baseball 2 /EPOCH/Japan, HK - - - - - - -
9 Let's hit a homerun! Exciting baseball /EPOCH/Japan - - - - - -
Play TV Baseball /RADICA/USA,EU 8017 x8 none none SSD 98 PA7351-107 dumped
1999 1 ABC Jungle Fun Hippo /VTech/HK, USA, France - - - - - - -
Unknown 1 PLAY TV Football /RADICA/USA 74021 x8 48 4M none SSD 98 PL7351-181 dumped
XaviXTennis SGM6446 x16 48 8M 24C08 SSD 2002 NEC 85054-611 dumped
XaviXBowling SGM644C x16 48 dumped
TODO: put into above table (XaviXPORT cartridges)
XaviX Tennis and XaviX Baseball are the simplest: just the CPU, x16 ROM and 24C08 SEEPROM. Bowling and Boxing also have 4 IR LEDs and a 32x32 sensor.
XaviX Fishing has ROM, 24C08 and a 24-pin daughterboard with a Nordic nRF24E1 2.4GHz 8051-based SoC.
All the rest of the carts include an S35390 I2C clock chip with crystal and battery backup, and have two x16 ROM chips, using a 5-pin single-gate inverter to create complementary /OE signals.
J-MAT, Fitness Exercise, Fitness Challenge and Bike Concept have a 24CS64 SEEPROM. Bike Concept also has two 74HC14s.
Fitness Dance has an Atmel H93864C (maybe SEEPROM?) a Microchip DSPIC 33FJ12GP202 and two JRC 2740 dual op amps.
Music and Circuit has a 24CS64, two UTC324 quad op amps, a 74HC14, a 74HCT04, and an 8-pin SOIC labeled 61545, which is likely an M61545 dual electronic volume control.
It looks like the sensors (cameras) are from ETOMS
They are all 32x32 arrays except Fitness Play, which is 64x64. Most of the PCBs are marked CIS.
Bowling and Boxing look identical.
LOTR and SW look identical
DQ looks similar to LOTR
Real Swing Golf (different driver) and Fitness Play look different from all the others.
The sensor dies for Bowling, Boxing, Star Wars and DQ are labeled CU5501A.
LOTR is CU5501
Real Swing Golf is CU5502
Fitness Play is S-5300A SLH2039H and does not have ETOMS on it.
The Fitness Play main PCB has an extra glob next to the ribbon cable to the camera.
Most of the camera PCBs connect to the main PCB with an 18-20 wire ribbon cable.
Real Swing Golf just has 6 wires, Its camera PCB is the only one with a ceramic resonator
Maybe the CU5502 chip offloads some processing from the CPU?
NOTES:
Play TV Monster Truck runs off an entirely different codebase to everything else, presumably coded by the developer from scratch rather than using code supplied by SSD Company LTD
Play TV Rescue Heroes fails to display any kind of XaviX logo or SSD Copyright, it is the only XaviX based game so far to not show these details anywhere in the game.
***************************************************************************/
#include "emu.h"
#include "xavix.h"
#include "softlist_dev.h"
/* rad_madf has callf #$8f3f21 in various places, and expects to jump to code in ROM, it is unclear how things map in this case, as presumably
the CPU 0 page memory and stack are still at 0 but ROM must be in the 3xxx range (game hasn't got far enough to call this yet to help either)
the maximum romsize appears to be 0x800000 so presumably the high bit being set has some additional meaning
for now treat it as a swapped arrangement vs. the reads from the lower range, except where page 0 ram would map, it's also possible that
vram etc. is completely unavailable if executing from these addresses, there isn't much evidence at the moment
note, many DMA operations and tile bank redirects etc. have the high bit set too, so that could be significant if it defines how it accesses
memory in those cases too
this can't be correct, it breaks monster truck which expects ROM at 8000 even in the >0x800000 region, maybe code + data mappings need
to be kept separate, with >0x800000 showing both ROM banks for code, but still having the zero page area etc. for data?
The code at 00EA84 in Ping Pong stores 8e to the data bank, reads 16 bit pointer from from 0000 + y (expecting it to come from zero page ram - value 3081)
then reads data from 3081, pushes it to stack (which is expected to work) then sets data bank back to 00 (writes to ff, expecting it to work) then pulls
the value written and puts it in RAM. Is stack actually still memory mapped at this point, or do stack operations always go to stack regardless?
Do reads return databank/codebank/stack, or only zero page? is zero page visibility maybe even conditional on how it gets used?
in namcons1 the code at 00F3F2 has data bank set to 0x84 and expects to read from ROM using lda ($0a), y where the content of 0x0a is 0000
this means that 0a and 0b must be read as zero page, but the actual pointer read from is ROM, bypassing zero page entirely, I currently have a separate
address space called by that single opcode to handle this, it might need expanding to any other opcodes that aren't using zero page directly tho
possible stack is similar?
*/
// this is only used for opcode / oprand reads, data memory addressing is handled in core, doing the opcode / oprand addressing in core causes disassembly issues when running from lowbus space (ram, interrupts on most games)
void xavix_state::xavix_map(address_map &map)
{
map(0x000000, 0x7fffff).r(FUNC(xavix_state::opcodes_000000_r));
map(0x800000, 0xffffff).r(FUNC(xavix_state::opcodes_800000_r));
map(0x000000, 0x003fff).w(FUNC(xavix_state::debug_mem_w));
}
// this is used by data reads / writes after some processing in the core to decide if data reads can see lowbus, zeropage, stack, bank registers etc. and only falls through to here on a true external bus access
void xavix_state::xavix_extbus_map(address_map &map)
{
map(0x000000, 0xffffff).rw(FUNC(xavix_state::extbus_r), FUNC(xavix_state::extbus_w));
}
void xavix_state::xavix_lowbus_map(address_map &map)
{
map(0x0000, 0x3fff).ram().share("mainram");
// Memory Emulator / Text Array
map(0x4000, 0x4fff).rw(FUNC(xavix_state::xavix_memoryemu_txarray_r), FUNC(xavix_state::xavix_memoryemu_txarray_w));
// Sprite RAM (aka Fragment RAM)
map(0x6000, 0x67ff).ram().w(FUNC(xavix_state::spriteram_w)).share("fragment_sprite");
// Palette RAM
map(0x6800, 0x68ff).ram().w(FUNC(xavix_state::palram_sh_w)).share("palram_sh");
map(0x6900, 0x69ff).ram().w(FUNC(xavix_state::palram_l_w)).share("palram_l");
// Segment RAM
map(0x6a00, 0x6a1f).ram().share("segment_regs"); // test mode, pass flag 0x20
// Tilemap 1 Registers
map(0x6fc8, 0x6fcf).rw(FUNC(xavix_state::tmap1_regs_r), FUNC(xavix_state::tmap1_regs_w));
// Tilemap 2 Registers
map(0x6fd0, 0x6fd7).rw(FUNC(xavix_state::tmap2_regs_r), FUNC(xavix_state::tmap2_regs_w));
// Sprite Registers
map(0x6fd8, 0x6fd8).w(FUNC(xavix_state::spriteregs_w));
// Sprite DMA
map(0x6fe0, 0x6fe0).rw(FUNC(xavix_state::spritefragment_dma_status_r), FUNC(xavix_state::spritefragment_dma_trg_w)); // after writing to 6fe1/6fe2 and 6fe5/6fe6 rad_mtrk writes 0x43/0x44 here then polls on 0x40 (see function call at c273) write values are hardcoded, similar code at 18401
map(0x6fe1, 0x6fe2).w(FUNC(xavix_state::spritefragment_dma_params_1_w));
map(0x6fe5, 0x6fe6).w(FUNC(xavix_state::spritefragment_dma_params_2_w));
// Arena Registers (controls visible window + more?)
map(0x6fe8, 0x6fe8).rw(FUNC(xavix_state::arena_start_r), FUNC(xavix_state::arena_start_w)); // r/w tested
map(0x6fe9, 0x6fe9).rw(FUNC(xavix_state::arena_end_r), FUNC(xavix_state::arena_end_w)); // r/w tested
map(0x6fea, 0x6fea).rw(FUNC(xavix_state::arena_control_r), FUNC(xavix_state::arena_control_w));
// Colour Mixing / Enabling Registers
map(0x6ff0, 0x6ff0).ram().w(FUNC(xavix_state::colmix_sh_w)).share("colmix_sh"); // effect colour?
map(0x6ff1, 0x6ff1).ram().w(FUNC(xavix_state::colmix_l_w)).share("colmix_l");
map(0x6ff2, 0x6ff2).ram().w(FUNC(xavix_state::colmix_6ff2_w)).share("colmix_ctrl"); // set to 07 after clearing above things in interrupt 0
// Display Control Register / Status Flags
map(0x6ff8, 0x6ff8).rw(FUNC(xavix_state::dispctrl_6ff8_r), FUNC(xavix_state::dispctrl_6ff8_w)); // always seems to be a read/store or read/modify/store
map(0x6ff9, 0x6ff9).r(FUNC(xavix_state::pal_ntsc_r));
map(0x6ffa, 0x6ffa).ram().w(FUNC(xavix_state::dispctrl_posirq_x_w)).share("posirq_x");
map(0x6ffb, 0x6ffb).ram().w(FUNC(xavix_state::dispctrl_posirq_y_w)).share("posirq_y"); // increases / decreases when you jump in snowboard (snowboard, used to blank ground)
// Lightgun / pen 1 control
// map(0x6ffc, 0x6fff)
// Sound RAM
// map(0x7400, 0x757f)
// Sound Control
map(0x75f0, 0x75f1).rw(FUNC(xavix_state::sound_startstop_r), FUNC(xavix_state::sound_startstop_w)); // r/w tested read/written 8 times in a row
map(0x75f2, 0x75f3).rw(FUNC(xavix_state::sound_updateenv_r), FUNC(xavix_state::sound_updateenv_w));
map(0x75f4, 0x75f5).r(FUNC(xavix_state::sound_sta16_r)); // related to 75f0 / 75f1 (read after writing there - rad_mtrk)
map(0x75f6, 0x75f6).rw(FUNC(xavix_state::sound_volume_r), FUNC(xavix_state::sound_volume_w)); // r/w tested
map(0x75f7, 0x75f7).w(FUNC(xavix_state::sound_regbase_w));
map(0x75f8, 0x75f8).rw(FUNC(xavix_state::sound_75f8_r), FUNC(xavix_state::sound_75f8_w)); // r/w tested
map(0x75f9, 0x75f9).rw(FUNC(xavix_state::sound_75f9_r), FUNC(xavix_state::sound_75f9_w));
map(0x75fa, 0x75fa).rw(FUNC(xavix_state::sound_timer0_r), FUNC(xavix_state::sound_timer0_w)); // r/w tested
map(0x75fb, 0x75fb).rw(FUNC(xavix_state::sound_timer1_r), FUNC(xavix_state::sound_timer1_w)); // r/w tested
map(0x75fc, 0x75fc).rw(FUNC(xavix_state::sound_timer2_r), FUNC(xavix_state::sound_timer2_w)); // r/w tested
map(0x75fd, 0x75fd).rw(FUNC(xavix_state::sound_timer3_r), FUNC(xavix_state::sound_timer3_w)); // r/w tested
map(0x75fe, 0x75fe).rw(FUNC(xavix_state::sound_irqstatus_r), FUNC(xavix_state::sound_irqstatus_w));
map(0x75ff, 0x75ff).w(FUNC(xavix_state::sound_75ff_w));
// Slot Registers
map(0x7810, 0x7810).w(FUNC(xavix_state::slotreg_7810_w)); // startup
// External Bus Interface control
map(0x7900, 0x7902).rw(FUNC(xavix_state::extintrf_790x_r), FUNC(xavix_state::extintrf_790x_w));
// DMA Controller
map(0x7980, 0x7980).rw(FUNC(xavix_state::rom_dmastat_r), FUNC(xavix_state::rom_dmatrg_w));
map(0x7981, 0x7983).ram().w(FUNC(xavix_state::rom_dmasrc_w)).share("rom_dma_src");
map(0x7984, 0x7985).ram().w(FUNC(xavix_state::rom_dmadst_w)).share("rom_dma_dst");
map(0x7986, 0x7987).ram().w(FUNC(xavix_state::rom_dmalen_w)).share("rom_dma_len");
// IO Ports
map(0x7a00, 0x7a00).rw(FUNC(xavix_state::io0_data_r), FUNC(xavix_state::io0_data_w));
map(0x7a01, 0x7a01).rw(FUNC(xavix_state::io1_data_r), FUNC(xavix_state::io1_data_w));
map(0x7a02, 0x7a02).rw(FUNC(xavix_state::io0_direction_r), FUNC(xavix_state::io0_direction_w));
map(0x7a03, 0x7a03).rw(FUNC(xavix_state::io1_direction_r), FUNC(xavix_state::io1_direction_w));
// IO Event Interrupt control
map(0x7a80, 0x7a80).rw(FUNC(xavix_state::ioevent_enable_r), FUNC(xavix_state::ioevent_enable_w));
map(0x7a81, 0x7a81).rw(FUNC(xavix_state::ioevent_irqstate_r), FUNC(xavix_state::ioevent_irqack_w));
// Mouse / Trackball?
map(0x7b00, 0x7b00).rw("anport", FUNC(xavix_anport_device::mouse_7b00_r), FUNC(xavix_anport_device::mouse_7b00_w));
map(0x7b01, 0x7b01).rw("anport", FUNC(xavix_anport_device::mouse_7b01_r), FUNC(xavix_anport_device::mouse_7b01_w));
map(0x7b10, 0x7b10).rw("anport", FUNC(xavix_anport_device::mouse_7b10_r), FUNC(xavix_anport_device::mouse_7b10_w));
map(0x7b11, 0x7b11).rw("anport", FUNC(xavix_anport_device::mouse_7b11_r), FUNC(xavix_anport_device::mouse_7b11_w));
// Lightgun / pen 2 control
//map(0x7b18, 0x7b1b)
// ADC registers
map(0x7b80, 0x7b80).rw("adc", FUNC(xavix_adc_device::adc_7b80_r), FUNC(xavix_adc_device::adc_7b80_w)); // rad_snow (not often)
map(0x7b81, 0x7b81).rw("adc", FUNC(xavix_adc_device::adc_7b81_r), FUNC(xavix_adc_device::adc_7b81_w)); // written (often, m_trck, analog related?)
// Sleep control
//map(0x7b82, 0x7b83)
// Timer control
map(0x7c00, 0x7c00).rw(FUNC(xavix_state::timer_status_r), FUNC(xavix_state::timer_control_w));
map(0x7c01, 0x7c01).rw(FUNC(xavix_state::timer_baseval_r), FUNC(xavix_state::timer_baseval_w)); // r/w tested
map(0x7c02, 0x7c02).rw(FUNC(xavix_state::timer_freq_r), FUNC(xavix_state::timer_freq_w));
map(0x7c03, 0x7c03).r(FUNC(xavix_state::timer_curval_r));
// Barrel Shifter registers
map(0x7ff0, 0x7ff1).rw("math", FUNC(xavix_math_device::barrel_r), FUNC(xavix_math_device::barrel_w));
// Multiply / Divide registers
map(0x7ff2, 0x7ff4).rw("math", FUNC(xavix_math_device::mult_param_r), FUNC(xavix_math_device::mult_param_w));
map(0x7ff5, 0x7ff6).rw("math", FUNC(xavix_math_device::mult_r), FUNC(xavix_math_device::mult_w));
// CPU Vector registers
map(0x7ff9, 0x7ff9).w(FUNC(xavix_state::vector_enable_w)); // enables / disables the custom vectors
map(0x7ffa, 0x7ffa).rw(FUNC(xavix_state::nmi_vector_lo_r), FUNC(xavix_state::nmi_vector_lo_w)); // an IRQ vector (nmi?) - popira needs to read it back if you pause on one of the seeprom carts
map(0x7ffb, 0x7ffb).rw(FUNC(xavix_state::nmi_vector_hi_r), FUNC(xavix_state::nmi_vector_hi_w));
map(0x7ffc, 0x7ffc).rw(FUNC(xavix_state::irq_source_r), FUNC(xavix_state::irq_source_w));
// map(0x7ffd, 0x7ffd) some of the Nostalgia games read here, why?
map(0x7ffe, 0x7ffe).rw(FUNC(xavix_state::irq_vector_lo_r),FUNC(xavix_state::irq_vector_lo_w)); // an IRQ vector (irq?) - rad_opus needs to read this back!
map(0x7fff, 0x7fff).rw(FUNC(xavix_state::irq_vector_hi_r),FUNC(xavix_state::irq_vector_hi_w));
}
void xavix_state::superxavix_lowbus_map(address_map &map)
{
xavix_lowbus_map(map);
// bitmap layer palette
map(0x6c00, 0x6cff).ram().w(FUNC(xavix_state::bmp_palram_sh_w)).share("bmp_palram_sh");
map(0x6d00, 0x6dff).ram().w(FUNC(xavix_state::bmp_palram_l_w)).share("bmp_palram_l");
// extended external bus stuff (possible banking control?)
map(0x7909, 0x7909).w(FUNC(xavix_state::extended_extbus_reg0_w));
map(0x790b, 0x790b).w(FUNC(xavix_state::extended_extbus_reg1_w));
map(0x790d, 0x790d).w(FUNC(xavix_state::extended_extbus_reg2_w));
map(0x7a10, 0x7a12).rw("xavix2002io", FUNC(xavix2002_io_device::pio_dir_r), FUNC(xavix2002_io_device::pio_dir_w));
map(0x7a20, 0x7a22).rw("xavix2002io", FUNC(xavix2002_io_device::pio_out_r), FUNC(xavix2002_io_device::pio_out_w));
map(0x7a30, 0x7a32).r("xavix2002io", FUNC(xavix2002_io_device::pio_in_r));
map(0x6fb0, 0x6fc7).ram().share("bmp_base");
map(0x7ffd, 0x7ffd).nopw(); // looks like a watchdog?
}
static INPUT_PORTS_START( xavix )
PORT_START("IN0")
PORT_DIPNAME( 0x01, 0x00, "IN0" )
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
PORT_DIPSETTING( 0x01, DEF_STR( On ) )
PORT_DIPNAME( 0x02, 0x00, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
PORT_DIPSETTING( 0x02, DEF_STR( On ) )
PORT_DIPNAME( 0x04, 0x00, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
PORT_DIPSETTING( 0x04, DEF_STR( On ) )
PORT_DIPNAME( 0x08, 0x00, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
PORT_DIPSETTING( 0x08, DEF_STR( On ) )
PORT_DIPNAME( 0x10, 0x00, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
PORT_DIPSETTING( 0x10, DEF_STR( On ) )
PORT_DIPNAME( 0x20, 0x00, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
PORT_DIPSETTING( 0x20, DEF_STR( On ) )
PORT_DIPNAME( 0x40, 0x00, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
PORT_DIPSETTING( 0x40, DEF_STR( On ) )
PORT_DIPNAME( 0x80, 0x00, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
PORT_DIPSETTING( 0x80, DEF_STR( On ) )
PORT_START("IN1")
PORT_DIPNAME( 0x01, 0x00, "IN1" )
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
PORT_DIPSETTING( 0x01, DEF_STR( On ) )
PORT_DIPNAME( 0x02, 0x00, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
PORT_DIPSETTING( 0x02, DEF_STR( On ) )
PORT_DIPNAME( 0x04, 0x00, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
PORT_DIPSETTING( 0x04, DEF_STR( On ) )
PORT_DIPNAME( 0x08, 0x00, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
PORT_DIPSETTING( 0x08, DEF_STR( On ) )
PORT_DIPNAME( 0x10, 0x00, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
PORT_DIPSETTING( 0x10, DEF_STR( On ) )
PORT_DIPNAME( 0x20, 0x00, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
PORT_DIPSETTING( 0x20, DEF_STR( On ) )
PORT_DIPNAME( 0x40, 0x00, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
PORT_DIPSETTING( 0x40, DEF_STR( On ) )
PORT_DIPNAME( 0x80, 0x00, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
PORT_DIPSETTING( 0x80, DEF_STR( On ) )
PORT_START("AN0")
PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_START("AN1")
PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_START("AN2")
PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_START("AN3")
PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_START("AN4")
PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_START("AN5")
PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_START("AN6")
PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_START("AN7")
PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_START("MOUSE0X")
PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_START("MOUSE0Y")
PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_START("MOUSE1X")
PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_START("MOUSE1Y")
PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_START("REGION") // PAL/NTSC flag
PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_CUSTOM )
INPUT_PORTS_END
static INPUT_PORTS_START( xavix_an )
PORT_INCLUDE(xavix)
// test inputs, not real!
PORT_MODIFY("AN0") // 00
PORT_BIT( 0xff, 0x00, IPT_PEDAL ) PORT_SENSITIVITY(100) PORT_KEYDELTA(20)
PORT_MODIFY("AN1") // 01
PORT_BIT( 0xff, 0x00, IPT_PEDAL2 ) PORT_SENSITIVITY(100) PORT_KEYDELTA(20)
PORT_MODIFY("AN2") // 02
PORT_BIT( 0xff, 0x00, IPT_PEDAL3 ) PORT_SENSITIVITY(100) PORT_KEYDELTA(20)
PORT_MODIFY("AN3") // 03
PORT_BIT( 0xff, 0x00, IPT_PEDAL ) PORT_SENSITIVITY(100) PORT_KEYDELTA(20)
PORT_MODIFY("AN4") // 10
PORT_BIT( 0xff, 0x00, IPT_PEDAL2 ) PORT_SENSITIVITY(100) PORT_KEYDELTA(20)
PORT_MODIFY("AN5") // 11
PORT_BIT( 0xff, 0x00, IPT_PEDAL3 ) PORT_SENSITIVITY(100) PORT_KEYDELTA(20)
PORT_MODIFY("AN6") // 12
PORT_BIT( 0xff, 0x00, IPT_PEDAL ) PORT_SENSITIVITY(100) PORT_KEYDELTA(20)
PORT_MODIFY("AN7") // 13
PORT_BIT( 0xff, 0x00, IPT_PEDAL2 ) PORT_SENSITIVITY(100) PORT_KEYDELTA(20)
INPUT_PORTS_END
static INPUT_PORTS_START( xavix_i2c )
PORT_INCLUDE(xavix)
PORT_MODIFY("IN1")
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("i2cmem", i2cmem_device, read_sda)
INPUT_PORTS_END
static INPUT_PORTS_START( tomcpin )
PORT_INCLUDE(xavix_i2c)
PORT_MODIFY("IN0")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(1) PORT_NAME("P1 Right Flipper")
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_PLAYER(1) PORT_NAME("P1 Left Flipper")
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_PLAYER(1) PORT_NAME("P1 Launch Ball")
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON4 ) PORT_PLAYER(1) PORT_NAME("P1 Nudge")
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(2) PORT_NAME("P2 Right Flipper")
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_PLAYER(2) PORT_NAME("P2 Left Flipper")
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_PLAYER(2) PORT_NAME("P2 Launch Ball")
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_BUTTON4 ) PORT_PLAYER(2) PORT_NAME("P2 Nudge")
PORT_MODIFY("IN1")
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_POWER_OFF ) PORT_NAME("Power Switch") // pressing this will turn the game off.
INPUT_PORTS_END
static INPUT_PORTS_START( tomplc )
PORT_INCLUDE(xavix_i2c)
PORT_MODIFY("IN0")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON4 ) PORT_NAME("Doors / Right")
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_NAME("Wipers / Back")
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("Headlights / Left")
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("Horn / Select")
// this is the up/down handle on the left (pull towards player to increase power)
PORT_BIT( 0x30, 0x00, IPT_POSITIONAL_V ) PORT_POSITIONS(3) PORT_SENSITIVITY(10) PORT_KEYDELTA(1) PORT_CENTERDELTA(0) PORT_FULL_TURN_COUNT(3) PORT_NAME("Power")
PORT_MODIFY("IN1")
// this is the rotary lever (move anti-clockwise to the right to apply brakes)
PORT_BIT( 0x03, 0x00, IPT_POSITIONAL ) PORT_POSITIONS(3) PORT_SENSITIVITY(10) PORT_KEYDELTA(1) PORT_CENTERDELTA(0) PORT_FULL_TURN_COUNT(3) PORT_NAME("Brake")
// are you expected to say something when this is held? game makes a crackle and doesn't act like you said anything
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON5 ) PORT_NAME("Speak")
INPUT_PORTS_END
static INPUT_PORTS_START( ltv_tam )
PORT_INCLUDE(xavix_i2c)
PORT_MODIFY("MOUSE0X")
PORT_BIT( 0xff, 0x00, IPT_AD_STICK_X ) PORT_SENSITIVITY(25) PORT_KEYDELTA(32) PORT_REVERSE PORT_PLAYER(1)
PORT_MODIFY("MOUSE0Y")
PORT_BIT( 0xff, 0x00, IPT_AD_STICK_Y ) PORT_SENSITIVITY(25) PORT_KEYDELTA(32) PORT_PLAYER(1)
PORT_MODIFY("MOUSE1X")
PORT_BIT( 0xff, 0x00, IPT_AD_STICK_X ) PORT_SENSITIVITY(25) PORT_KEYDELTA(32) PORT_REVERSE PORT_PLAYER(2)
PORT_MODIFY("MOUSE1Y")
PORT_BIT( 0xff, 0x00, IPT_AD_STICK_Y ) PORT_SENSITIVITY(25) PORT_KEYDELTA(32) PORT_PLAYER(2)
PORT_MODIFY("IN0")
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(2)
PORT_MODIFY("IN1")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(1)
INPUT_PORTS_END
// left + right drums together = select / forward (needed on initial screen). left drum = left in menus right drum = right in menus
// analog reading depends heavily on timers, they're too fast right now so drum hits are too hard and register multiple times
static INPUT_PORTS_START( taikodp )
PORT_INCLUDE(xavix_an)
PORT_MODIFY("AN0") // 00 (read by one type of function, handled in timer interrupt at 0x1d92 in RAM)
#if 0 // should be more correct, but causes multiple hits to register
PORT_BIT( 0xff, 0x00, IPT_PEDAL ) PORT_SENSITIVITY(100) PORT_KEYDELTA(20)
#else
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_IMPULSE(1)
PORT_BIT( 0x7f, IP_ACTIVE_HIGH, IPT_UNUSED )
#endif
PORT_MODIFY("AN1") // 01 (read by identical function to 00 but with different addresses, handled in timer interrupt at 0x1dbd in RAM)
#if 0 // should be more correct, but causes multiple hits to register
PORT_BIT( 0xff, 0x00, IPT_PEDAL2 ) PORT_SENSITIVITY(100) PORT_KEYDELTA(20)
#else
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_IMPULSE(1)
PORT_BIT( 0x7f, IP_ACTIVE_HIGH, IPT_UNUSED )
#endif
PORT_MODIFY("AN5") // 11 (read by different function, handled in timer interrupt at 0x1de8) (battery status related?)
PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_MODIFY("AN7") // 13 (read by identical function to 11 but with different addresses, handled in timer interrupt at 0x1e09 in RAM) (battery status related?)
PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_UNUSED )
// not read
PORT_MODIFY("AN2") // 02
PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_MODIFY("AN3") // 03
PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_MODIFY("AN4") // 10
PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_MODIFY("AN6") // 12
PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_MODIFY("IN1")
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("i2cmem", i2cmem_device, read_sda)
INPUT_PORTS_END
static INPUT_PORTS_START( jpopira )
PORT_INCLUDE(xavix)
PORT_MODIFY("IN0")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("Pad 1")
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("Pad 2")
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_NAME("Pad 3")
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON4 ) PORT_NAME("Pad 4")
PORT_MODIFY("IN1")
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("i2cmem", i2cmem_device, read_sda)
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_POWER_OFF ) PORT_NAME("Power Switch") // pressing this will turn the game off.
INPUT_PORTS_END
/* Test mode lists the following
LED (on power button?)
Throttle Low
Throttle High
Reverse
NO2
Steering Left (4 positions)
Steering Right (4 positions)
Horn
*/
int xavix_mtrk_state::mtrk_wheel_r()
{
return m_wheel->read_direction();
}
static INPUT_PORTS_START( rad_mtrk )
PORT_INCLUDE(xavix)
PORT_MODIFY("IN0")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON5 ) PORT_NAME("Nitro")
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON4 ) PORT_NAME("Throttle High")
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_NAME("Throttle Low")
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("Reverse / Back")
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(xavix_mtrk_state, mtrk_wheel_r)
PORT_MODIFY("IN1")
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("Horn")
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_POWER_OFF ) PORT_NAME("Power Switch") // pressing this will turn the game off.
INPUT_PORTS_END
static INPUT_PORTS_START( rad_mtrkp )
PORT_INCLUDE(rad_mtrk)
PORT_MODIFY("REGION") // PAL/NTSC flag
PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_CUSTOM )
INPUT_PORTS_END
static INPUT_PORTS_START( rad_opus )
PORT_INCLUDE(xavix)
PORT_MODIFY("IN0") // comments show how inputs labeled on PCB
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("Pad 1 <") // PI00
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("Pad 2") // PI01
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_NAME("Pad 3") // PI02
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON4 ) PORT_NAME("Pad 4 >") // PI03
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON6 ) PORT_NAME("Pause") // PI05
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_BUTTON5 ) PORT_NAME("Menu Select") // PI06
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_START1 ) PORT_NAME("Start / Bomb") // PI07
INPUT_PORTS_END
static INPUT_PORTS_START( rad_hnt )
PORT_INCLUDE(xavix)
PORT_MODIFY("IN0")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("Menu Next")
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("Menu Previous")
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_NAME("Menu Select")
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON4 ) PORT_NAME("Pause / Menu")
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP )
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN )
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT )
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT )
PORT_MODIFY("IN1")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON5 ) PORT_NAME("Fire Gun")
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON6 ) PORT_NAME("Safety") PORT_TOGGLE
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_POWER_OFF ) PORT_NAME("Power Switch") // pressing this will turn the game off.
INPUT_PORTS_END
static INPUT_PORTS_START( rad_crdn )
PORT_INCLUDE(xavix)
PORT_MODIFY("IN0")
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON1 )
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_BUTTON2 )
PORT_MODIFY("IN1")
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP )
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN )
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT )
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT )
INPUT_PORTS_END
static INPUT_PORTS_START( rad_crdnp )
PORT_INCLUDE(rad_crdn)
PORT_MODIFY("REGION") // PAL/NTSC flag
PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_CUSTOM )
INPUT_PORTS_END
static INPUT_PORTS_START( rad_box )
PORT_INCLUDE(xavix)
PORT_MODIFY("IN0")
// 6 types of punch and some navigation controls?
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("Left Jan")
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("Left Hook")
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_NAME("Left Uppercut")
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON4 ) PORT_NAME("Left Jab")
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON5 ) PORT_NAME("Left Hook")
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON6 ) PORT_NAME("Left Uppercut")
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT )
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT )
PORT_MODIFY("IN1")
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON7 ) PORT_NAME("Block")
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) // needs to be high to pass warning screen?
INPUT_PORTS_END
static INPUT_PORTS_START( rad_boxp )
PORT_INCLUDE(rad_box)
PORT_MODIFY("REGION") // PAL/NTSC flag
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_CUSTOM )
INPUT_PORTS_END
static INPUT_PORTS_START( rad_bass ) // also an analog reel
PORT_INCLUDE(xavix)
PORT_MODIFY("IN0")
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON4 ) PORT_NAME("Menu") // pressing this ingame currently crashes it if read from sound_irqstatus_r is incorrect?
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("Select")
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("Forward") // used to navigate menus
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_NAME("Back")
PORT_MODIFY("IN1")
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) // definitely the dpad, see map screen
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN )
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT )
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT )
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_POWER_OFF ) PORT_NAME("Power Switch") // pressing this will turn the game off.
INPUT_PORTS_END
static INPUT_PORTS_START( ekara )
PORT_INCLUDE(xavix)
PORT_MODIFY("IN1")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(xavix_ekara_state, ekara_multi0_r)
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(xavix_ekara_state, ekara_multi1_r)
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_POWER_OFF ) PORT_NAME("Power Switch") // pressing this will turn the game off.
PORT_START("EXTRA0")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_NAME("Echo")
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON4 ) PORT_NAME("Effects")
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_NAME("Key Down")
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_NAME("Key Up")
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON5 ) PORT_NAME("BGM Down")
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON6 ) PORT_NAME("BGM Up")
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_BUTTON7 ) PORT_NAME("Tempo Down")
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_BUTTON8 ) PORT_NAME("Tempo Up")
PORT_START("EXTRA1")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("Select")
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("Cancel")
PORT_BIT( 0x3c, IP_ACTIVE_HIGH, IPT_UNUSED )
// no 40/80 due to multiplexer code
INPUT_PORTS_END
static INPUT_PORTS_START( hikara )
PORT_INCLUDE(xavix)
PORT_MODIFY("IN0")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(xavix_hikara_state, ekara_multi0_r)
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(xavix_hikara_state, ekara_multi1_r)
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(xavix_hikara_state, ekara_multi2_r)
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(xavix_hikara_state, ekara_multi3_r)
PORT_START("EXTRA0")
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("Select")
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_NAME("Key Down")
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_NAME("Key Up")
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON10 ) PORT_NAME("Brightness Up")
PORT_START("EXTRA1")
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON5 ) PORT_NAME("BGM Down")
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON9 ) PORT_NAME("Brightness Down")
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON6 ) PORT_NAME("BGM Up")
PORT_START("EXTRA2")
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("Cancel")
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON8 ) PORT_NAME("Tempo Up")
PORT_START("EXTRA3")
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON7 ) PORT_NAME("Tempo Down")
INPUT_PORTS_END
static INPUT_PORTS_START( ddrfammt )
PORT_INCLUDE(xavix)
PORT_MODIFY("IN0")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("P1 Up Arrow") PORT_PLAYER(1) // these can't be treated as a joystick as opposing directions are often required
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("P1 Down Arrow") PORT_PLAYER(1)
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_NAME("P1 Left Arrow") PORT_PLAYER(1)
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON4 ) PORT_NAME("P1 Right Arrow") PORT_PLAYER(1)
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("P2 Up Arrow") PORT_PLAYER(2)
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("P2 Down Arrow") PORT_PLAYER(2)
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_NAME("P2 Left Arrow") PORT_PLAYER(2)
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_BUTTON4 ) PORT_NAME("P2 Right Arrow") PORT_PLAYER(2)
PORT_MODIFY("IN1") // once connected the game won't see it as disconnected until you turn off. I'm guessing this is a signal, not a button?
PORT_CONFNAME( 0x02, 0x00, "2nd Mat Connected" )
PORT_CONFSETTING( 0x00, DEF_STR( No ) )
PORT_CONFSETTING( 0x02, DEF_STR( Yes ) )
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_POWER_OFF ) PORT_NAME("Power Switch") // pressing this will turn the game off.
INPUT_PORTS_END
static INPUT_PORTS_START( popira )
PORT_INCLUDE(xavix)
PORT_MODIFY("IN0")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("Pad 1") PORT_PLAYER(1)
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("Pad 2") PORT_PLAYER(1)
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_NAME("Pad 3") PORT_PLAYER(1)
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON4 ) PORT_NAME("Pad 4") PORT_PLAYER(1)
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON6 ) PORT_NAME("Select Previous") PORT_PLAYER(1)
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_BUTTON5 ) PORT_NAME("Select Next") PORT_PLAYER(1)
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_START1 ) PORT_NAME("Start") PORT_PLAYER(1)
PORT_MODIFY("IN1")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNUSED ) // halts execution and enables a memory viewer if used with cartridge gc0001 (debug leftover?)
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_POWER_OFF ) PORT_NAME("Power Switch") // pressing this will turn the game off.
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNUSED )
INPUT_PORTS_END
static INPUT_PORTS_START( popira2 ) // player 2 buttons have heavy latency, probably due to incorrect timer emulation, hence NOT WORKING flag right now
PORT_INCLUDE(xavix)
PORT_MODIFY("IN0")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("P1 Pad 1") PORT_PLAYER(1)
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("P1 Pad 2") PORT_PLAYER(1)
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_NAME("P1 Pad 3") PORT_PLAYER(1)
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON4 ) PORT_NAME("P1 Pad 4") PORT_PLAYER(1)
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON6 ) PORT_NAME("Select Previous") PORT_PLAYER(1)
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_BUTTON5 ) PORT_NAME("Select Next") PORT_PLAYER(1)
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_START1 ) PORT_NAME("Start") PORT_PLAYER(1)
PORT_MODIFY("IN1")
PORT_BIT( 0x07, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(xavix_popira2_cart_state, i2c_r)
PORT_BIT( 0x30, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_POWER_OFF ) PORT_NAME("Power Switch") // pressing this will turn the game off.
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNUSED )
// main input processing code is at 028059, which ends with setting a timer (028079) to read analog ports and get these buttons that way. main timer handler is at 00eb77, which reads ports via the ADC. $c3 where ports are stored is also checked at 00e6f4
PORT_START("P2")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("P2 Pad 1") PORT_PLAYER(2)
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("P2 Pad 2") PORT_PLAYER(2)
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_NAME("P2 Pad 3") PORT_PLAYER(2)
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON4 ) PORT_NAME("P2 Pad 4") PORT_PLAYER(2)
INPUT_PORTS_END
static INPUT_PORTS_START( rad_bassp )
PORT_INCLUDE(rad_bass)
PORT_MODIFY("REGION") // PAL/NTSC flag
PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_CUSTOM )
INPUT_PORTS_END
static INPUT_PORTS_START( rad_snow )
PORT_INCLUDE(xavix)
PORT_MODIFY("IN0")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_NAME("Foward / Go")
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_NAME("Enter / Select")
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT )
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT )
PORT_MODIFY("IN1")
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_POWER_OFF ) PORT_NAME("Power Switch") // pressing this will turn the game off.
INPUT_PORTS_END
static INPUT_PORTS_START( rad_snowp )
PORT_INCLUDE(rad_snow)
PORT_MODIFY("REGION") // PAL/NTSC flag
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_CUSTOM )
INPUT_PORTS_END
static INPUT_PORTS_START( rad_bdp )
PORT_INCLUDE(xavix)
PORT_MODIFY("IN0")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("Purple / Up")
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("Red / Down")
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_NAME("Blue / Back")
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON4 ) PORT_NAME("Pink / Select")
PORT_MODIFY("IN1")
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_POWER_OFF ) PORT_NAME("Power Switch") // pressing this will turn the game off.
INPUT_PORTS_END
static INPUT_PORTS_START( rad_ping )
PORT_INCLUDE(xavix)
PORT_MODIFY("IN0")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("Select?")
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("Pause?")
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP )
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN )
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SERVICE ) // resets? not a real button?
PORT_MODIFY("IN1") // are these for the 2nd player?
//PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("Pause?")
//PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP )
//PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN )
//PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_SERVICE ) // resets? not a real button?
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_POWER_OFF ) PORT_NAME("Power Switch") // pressing this will turn the game off.
INPUT_PORTS_END
static INPUT_PORTS_START( rad_pingp )
PORT_INCLUDE(rad_ping)