/
ksys573.c
5704 lines (4611 loc) · 225 KB
/
ksys573.c
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
/***************************************************************************
Konami System 573
===========================================================
Driver by R. Belmont & smf
NOTE: The first time you run each game, it will go through a special initialization
procedure. This can be quite lengthy (in the case of Dark Horse Legend). Let it
complete all the way before exiting MAME and you will not have to do it again!
NOTE 2: The first time you run Konami 80's Gallery, it will dump you on a clock
setting screen. Press DOWN to select "SAVE AND EXIT" then press player 1 START
to continue.
Note 3: If you are asked to insert a different cartridge then use the fake dip
switch to change it.
Note 4: Some games require you to press f2 to skip the rtc cleared note.
TODO:
* integrate ATAPI code with Aaron's ATA/IDE code
* emulate memory card board GE885-PWB(A)A ( contains Toshiba tmpr3904af, ram, rom, tranceiver and glue ).
-----------------------------------------------------------------------------------------
System 573 Hardware Overview
Konami, 1998-2001
This system uses Konami PSX-based hardware with an ATAPI CDROM drive.
Gun Mania (and probably Gun Mania Zone Plus) has no CDROM drive.
There is a slot for a security cart (cart is installed in CN14) and also a PCMCIA card slot.
The main board and CDROM drive are housed in a black metal box. Gun Mania doesn't have that box.
The games can be swapped by exchanging the CDROM disc and the security cart, whereby the main-board
FlashROMs are re-programmed after a small wait. On subsequent power-ups, there is a check to test if the
contents of the FlashROMs matches the CDROM, then the game boots up immediately.
PCMCIA card slot is used by Dance Dance Revolution (2ndMIX link ver. and later),
GUITARFREAKS (2ndMIX link ver. and later), drummania (7thMIX and later), and Gun Mania.
DDR and GF: 32M flash card is used to store edit data (players can edit data by PlayStation
console, and send data to arcade machine via PS memory card).
DM and GF: network PCB unit (for e-AMUSEMENT) is connected via PCMCIA slot.
GM: unknown (program data is stored in flash card?)
The games that run on this system include...
Game Year Hardware Code CD Code
---------------------------------------------------------------------------------
P *Anime Champ 2000.12
P Bass Angler 1998.03 GE765 JA 765 JA A02
P Bass Angler 2 1998.07 GC865 JA 865 JA A02
P *DAM-DDR Dance Dance Revolution for DAM 1999.11
P *DAM-DDR Dance Dance Revolution for DAM 2nd 2000.07
A Dance Dance Revolution 1998.09 GC845 JA 845 JA(missing)/UA A01 / 845 JA A02
A Dance Dance Revolution Internet Ranking ver. 1998.11 GC845 JB 845 JB A01 / 845 JA/UA A02
A Dance Dance Revolution 2ndMIX 1999.01 GC895 JA 895 JA A02
A Dance Dance Revolution 2ndMIX LINK version 1999.04 GE885 JA 885 JA A02
A DDR 2ndMIX with bmIIDX CLUB ver. 1999.05 GN896 JA 896 JA A01
A DDR 2ndMIX AND bmIIDX substream CLUB ver. 2 1999.05 GE984 JA 984 JA A01
D Dance Dance Revolution Solo BASS MIX 1999.08 GQ894 JA 894 JA A02
D Dance Dance Revolution 3rdMIX 1999.10 GN887 AA/JA/KA 887 AA/JA/KA A02
D Dance Dance Revolution Solo 2000 1999.12 GC905 AA/JA 905 AA/JA A02
D Dance Dance Revolution 3rdMIX PLUS 2000.06 GCA22 JA A22 JA A02
D Dance Dance Revolution 4thMIX 2000.08 GCA33 JA A33 JA A02
D Dance Dance Revolution 4thMIX PLUS 2000.12 GCA34 JA A34 JA A02
? *Dance Dance Revolution Kids 2000.12
D Dance Dance Revolution 5thMIX 2001.03 GCA27 JA A27 JA A02
D DDRMAX Dance Dance Revolution 6thMIX 2001.10 GCB19 JA B19 JA A02
D DDRMAX2 Dance Dance Revolution 7thMIX 2002.03 GCB20 JA B20 JA A02
D Dance Dance Revolution EXTREME 2002.12 GCC36 JA C36 JA A02
D Dance Maniax 2000.06 GE874 JA 874 JA A(needs redump)
D Dance Maniax 2ndMIX 2000.12 GCA39 JA A39 JA A02
D *Dance Maniax 2ndMIX APPEND J PARADISE 2001.04
A Dancing Stage 1999.08 GN845 EA 845 EA(needs redump)
D Dancing Stage Euro Mix 2000 GE936 EA 936 EA A(needs redump)
D Dancing Stage Euro Mix 2 2000 G*C23 EA C23 EA A02
D Dancing Stage featuring Disney's Rave 2000.11 GCA37 JA A37 JA A02
D Dancing Stage featuring DREAMS COME TRUE 1999.12 GC910 JA 910 JA/JC A02
A Dancing Stage featuring TRUE KiSS DESTiNATiON 1999.07 G*884 JA 884 JA A02
P Dark Horse Legend 1998.03 GX706 JA 706 JA A02
A drummania 1999.07 GQ881 JA 881 JA D01 / 881 JA A02(missing, audio CD)
D drummania 2ndMIX 2000.03 GE912 JA 912 JA B02
D drummania 3rdMIX 2000.09 GCA23 JA A23 JA A02
D drummania 4thMIX 2001.03 GEA25 JA A25 JA A02
D drummania 5thMIX 2001.09 GCB05 JA B05 JA A02
D drummania 6thMIX 2002.02 GCB16 JA B16 JA A02
N drummania 7thMIX 2002.08 GCC07 JA C07 JA A02
N drummania 7thMIX power-up ver. 2002.08 GEC07 JB C07 JC A02
N drummania 8thMIX 2003.04 GCC38 JA C38 JA A02
N drummania 9thMIX 2003.10 GCD09 JA D09 JA A02
N *drummania 10thMIX 2004.04
? *Fighting Mania 2000
P Fisherman's Bait 1998.06 GE765 UA 765 UA B02
P Fisherman's Bait 2 1998 GC865 UA 865 UA B02
P Fisherman's Bait Marlin Challenge 1999 GX889 889 AA/EA/JA/UA(needs redump)
P Gachagachamp 1999.01 GQ877 JA GE877-JA(PCMCIA card)
A GUITARFREAKS 1999.02 GQ886 EA/JA/UA 886 ** C02
A GUITARFREAKS 2ndMIX 1999.07 GQ883 JA 929 JB B02(needs redump)
A *GUITARFREAKS 2ndMIX Link ver. 1999.09
D GUITARFREAKS 3rdMIX 2000.04 GE949 JA 949 JA C01 / 949 JA C02
D GUITARFREAKS 4thMIX 2000.08 GEA24 JA A24 JA A02
D GUITARFREAKS 5thMIX 2001.03 GCA26 JA A26 JA A02
D GUITARFREAKS 6thMIX 2001.09 GCB06 JA B06 JA A02
D GUITARFREAKS 7thMIX 2002.02 GCB17 JA B17 JA A02
N GUITARFREAKS 8thMIX 2002.08 GCC08 JA C08 JA A02
N GUITARFREAKS 8thMIX power-up ver. 2002.11 GEC08 JB C08 JB A02
N GUITARFREAKS 9thMIX 2003.04 GCC39 JA C39 JA A02
N GUITARFREAKS 10thMIX 2003.10 GCD10 JA D10 JA A02
N *GUITARFREAKS 11thMIX 2004.04
G *Gun Mania 2000.07 G?906 JA (no CD)
? *Gun Mania Zone Plus 2000.10
P Handle Champ 1997.12 GQ710 JA (no CD)
P Hyper Bishi Bashi Champ 1998.07 GC876 EA (no CD)
P Hyper Bishi Bashi Champ - 2 Player 1999.08 GC908 JA 908 A02
P Jikkyou Powerful Pro Yakyuu EX 1998.04 GX802 JA 802 JA B02
P *Jikkyou Powerful Pro Yakyuu EX 98 1998.08
? *Kick & Kick 2001
P Konami 80's Arcade Gallery 1998.11 GC826 JA 826 JA A01
P Konami 80's AC Special 1998 GC826 UA 826 UA A01
D *Mambo a GoGo 2001.06
D Punchmania Hokuto no Ken 2000.03 918 JA B02
D Punchmania Hokuto no Ken 2 2000.12 A09 JA A02
P Salary Man Champ 2001.02 GCA18 JA A18 JA(needs redump)
P *Step Champ 1999.12
P: plain System573
A: uses ext. analog I/O board
D: uses ext. digital sound and I/O board
N: uses network PCB unit + ext. digital sound and I/O board
G: gun mania only, drives air soft gun (this game uses real BB bullet)
Note:
Not all games listed above are confirmed to run on System 573.
* - denotes not dumped yet. If you can help with the remaining undumped System 573 games,
please contact http://guru.mameworld.info/
Main PCB Layout
---------------
External controls port
GX700-PWB(A)B ||
(C)1997 KONAMI CO. LTD. \/
|-----------------------------------------------------==============-------|
| CN15 CNA CN10 |
| CN16 |
| |------------------------|
| PQ30RV21 | |
| |-------| | |
| KM416V256 |SONY | | PCMCIA SLOT |
| |CXD2925| | |
| |-------| | |
| | |
| |------------------------|
| |-----| CN21 |
| |32M | |---------| |---------| |
| |-----| |SONY | |SONY | |
| |CXD8561Q | |CXD8530CQ| 29F016 29F016 |--| |
| |-----| | | | | | | |
| |32M | | | | | | | |
| |-----| |---------| |---------| 29F016 29F016 | | |
| 53.693175MHz 67.7376MHz | | |
| |-----| | |CN14|
| KM48V514 KM48V514 |9536 | 29F016 29F016 | | |
| KM48V514 KM48V514 | | | | |
| KM48V514 KM48V514 |-----| | | |
| KM48V514 KM48V514 29F016 29F016 |--| |
| MC44200FT M48T58Y-70PC1 |
| CN12|
| 700A01.22 |
| 14.7456MHz |
| |-------| |
| |KONAMI | |----| LA4705|
| 058232 |056879 | |3644| SM5877 |
| | | |----| ADC0834 LM358|
| |-------| ADM485 CN4 |
| CN5 CN3 CN17 |
| TEST_SW DIP4 USB CN8 RCA-L/R CN9 |
|--| JAMMA |-------------------------------------------|
|---------------------------|
Notes:
CNA - 40-pin IDE cable connector
CN3 - 10-pin connector labelled 'ANALOG', connected to a 9-pin DSUB connector mounted in the
front face of the housing, labelled 'OPTION1'
CN4 - 12-pin connector labelled 'EXT-OUT'
CN5 - 10-pin connector labelled 'EXT-IN', connected to a 9-pin DSUB connector mounted in the
front face of the housing, labelled 'OPTION2'
CN8 - 15-pin DSUB plug labelled 'VGA-DSUB15' extending from the front face of the housing
labelled 'RGB'. Use of this connector is optional because the video is output via the
standard JAMMA connector
CN9 - 4-pin connector for amplified stereo sound output to 2 speakers
CN10 - Custom 80-pin connector (for mounting an additional plug-in board for extra controls,
possibly with CN21 also)
CN12 - 4-pin CD-DA input connector (for Red-Book audio from CDROM drive to main board)
CN14 - 44-pin security cartridge connector. The cartridge only contains a small PCB labelled
'GX700-PWB(D) (C)1997 KONAMI' and has locations for 2 ICs only
IC1 - Small SOIC8 chip, identified as a XICOR X76F041 security supervisor containing 4X
128 x8 secureFLASH arrays, stamped '0038323 E9750'
IC2 - Solder pads for mounting of a PLCC68 or QFP68 packaged IC (not populated)
CN15 - 4-pin CDROM power connector
CN16 - 2-pin fan connector
CN17 - 6-pin power connector, connected to an 8-pin power plug mounted in the front face
of the housing. This can be left unused because the JAMMA connector supplies all power
requirements to the PCB
CN21 - Custom 30-pin connector (purpose unknown, but probably for mounting an additional
plug-in board with CN10 also)
TEST_SW - Push-button test switch
DIP4 - 4-position DIP switch
USB - USB connector extended from the front face of the housing labelled 'I/O'
RCA-L/R - RCA connectors for left/right audio output
PQ30RV21 - Sharp PQ30RV21 low-power voltage regulator (5 Volt to 3 Volt)
LA4705 - Sanyo LA4705 15W 2-channel power amplifier (SIP18)
LM358 - National Semiconductor LM358 low power dual operational amplifier (SOIC8, @ 33C)
CXD2925Q - Sony CXD2925Q SPU (QFP100, @ 15Q)
CXD8561Q - Sony CXD8561Q GPU (QFP208, @ 10M) Also found CXD8561BQ in some units
CXD8530CQ - Sony CXD8530CQ R3000-based CPU (QFP208, @ 17M)
9536 - Xilinx XC9536 in-system-programmable CPLD (PLCC44, @ 22J)
3644 - Hitachi H8/3644 HD6473644H microcontroller with 32k ROM & 1k RAM (QFP64, @ 18E,
labelled '700 02 38920')
056879 - Konami 056879 custom IC (QFP120, @ 13E)
MC44200FT - Motorola MC44200FT Triple 8-bit Video DAC (QFP44)
058232 - Konami 058232 custom ceramic IC (SIP14, @ 6C)
SM5877 - Nippon Precision Circuits SM5877 2-channel D/A convertor (SSOP24, @32D)
ADM485 - Analog Devices ADM485 low power EIA RS-485 transceiver (SOIC8, @ 20C)
ADC0834 - National Semiconductor ADC0834 8-Bit Serial I/O A/D Converter with Multiplexer
Option (SOIC14, @ 24D)
M48T58Y-70- STMicroelectronics M48T58Y-70PC1 8k x8 Timekeeper RAM (DIP32, @ 22H)
Note that this is not used for protection. If you put in a new blank Timekeeper RAM
it will be programmed with some data on power-up. If you swap games, the Timekeeper
is updated with the new game data
29F016 Fujitsu 29F016A-90PFTN 2M x8 FlashROM (TSOP48, @ 27H/J/L/M & 31H/J/L/M)
Also found Sharp LH28F016S (2M x8 TSOP40) in some units
KM416V256 - Samsung Electronics KM416V256BT-7 256k x 16 DRAM (TSOP44/40, @ 11Q labelled 'SPUDR4M')
KM48V514 - Samsung Electronics KM48V514BJ-6 512k x 8 EDO DRAM (SOJ28, @ 16G/H, 14G/H, 12G/H, 9G/H labelled 'HDR4M8SJ')
Also found NEC 424805AL-A60 in some units
32M - NEC D481850GF-A12 128k x 32Bit x 2 Banks SGRAM (QFP100, @ 4P & 4L)
Also found Samsung KM4132G271Q-12 in some units
Software -
- 700A01.22G 4M MaskROM (DIP32, @ 22G). AMD 27C040 is also used
- SONY ATAPI CDROM drive, with CDROM disc containing program + graphics + sound
Some System 573 units contain a CR-583 drive dated October 1997, some contain a
CR-587 drive dated March 1998. Note that the CR-587 will not read CDR discs ;-)
Auxillary Controls PCB
----------------------
GE765-PWB(B)A (C)1998 KONAMI CO. LTD.
|-----------------------------|
| CN33 C2242 |
| C2242 |
| NRPS11-G1A |
| CN35|
| D4701 |
| 74LS14 PC817 |-----------------|
| |
| PAL PAL |
| (E765B1) (E765B2) LCX245 |
| |
| 74LS174 PAL |
| (E765B1) |
| |
| 74LS174 CN31 |
|-----------------------------------------------|
Notes: (all IC's shown)
This PCB is known to be used for the fishing reel controls on all of the fishing games (at least).
CN31 - Connector joining this PCB to the MAIN PCB
CN33 - Connector used to join the external controls connector mounted on the outside of the
metal case to this PCB.
CN35 - Power connector
NRPS11-G1A - Relay?
D4701 - NEC uPD4701 Encoder (SOP24)
C2242 - 2SC2242 Transistor
PC817 - Sharp PC817 Photo-coupler IC (DIP4)
PAL - AMD PALCE16V8Q, stamped 'E765Bx' (DIP20)
GE877-PWB(C) (C)1998 KONAMI
|----------------------|
|-- JAMMA OUT --|
| |
| CN6 |
| CN5 CN4 CN3 CN2 |
| |
| |
| JAMMA IN |
|--------------------------|
Notes: This PCB is used for Gachagachamp. No ICs.
CN5 - To control lever unit (1P). uses 9 pins out of 15 pins of B15P-SHF-1AA
CN6 - To control lever unit (2P). uses 9 pins out of 14 pins of B14P-SHF-1AA
(CN4, CN3, CN2 is printed pattern only, no actual connector)
Digital I/O PCB
---------------
GX894-PWB(B)A (C)1999 KONAMI CO. LTD.
|-------------|
| CN12 |
| |
| PC847 PC847 |
| |
| CN11 |
| |
| PC847 PC847 |
| |
| DS2401 CN10 |
| |
| PC847 PC847 |
| |
| CN14 CN13 |
|----------| |----------|
| PC847 |
| ADM232 CN17 XC9536 |
| |
| 19.6608MHz |-----------|
| ADM232 CN15 CY7C109 |
| HY51V65164A HY51V65164A |
| HY51V65164A |
| CN16 XCS40XL |
| |
| AK4309B CN18 29.450MHz MAS3507D |
| |
| CN3 |
| HYC24855 RCA-L/R |
|-----------------------------------------------|
Notes:
PC847 - High Density Mounting Type Photocoupler
CN12 - 13 pin connector with 8 wires to external connectors
CN11 - 12 pin connector with 8 wires to external connectors
DS2401 - DS2401 911C2 Silicon serial number
CN10 - 10 pin connector with 8 wires to external connectors
CN14 - 7 pin connector
CN13 - 5 pin connector with 2 wires to external connectors
ADM232 - ADM232AARN 9933 H48475 High Speed, 5 V, 0.1 uF CMOS RS-232 Drivers/Receivers
CN17 - 3 pin connector
XC9536 - XILINX XC9536 PC44AEM9933 F1096429A 15C
CN15 - 8 pin connector
CY7C109 - CY7C109-25VC 931 H 04 404825 128k x 8 Static RAM
HY51V65164A - 64M bit dynamic EDO RAM
CN16 - 4 pin connector joining this PCB to the CD-DA IN on the MAIN PCB.
XCS40XL - XILINX XCS40XL PQ208AKP9929 A2033251A 4C
AK4309B - AKM AK4309B 3N932N 16bit SCF DAC
CN18 - 6 pin connector
MAS3507D - IM MAS3507D D8 9173 51 HM U 072953.000 ES MPEG 1/2 Layer 2/3 Audio Decoder
CN3 - Connector joining this PCB to the MAIN PCB
HYC24855 - ?
RCA-L/R - RCA connectors for left/right audio output
Drummania 10th Mix Multisession
-------------------------------
This box is used with multi-session System 573 games.
Main board is standard GX700 PCB with CDROM (Drummania 10th Mix Multisession)
and Digital I/O Board GX894-PWB(B)A
BIOS is on a small plug-in daughterboard.
Daughterboard contains one EPROM, one PAL22V10, 2 logic chips and a PIC16F84.
The dumps provided are the EPROM dumped separately and a dump of the 'board'
with it plugged in (reading may be affected by the PIC)
PCB Layout of External Multisession Box
---------------------------------------
GXA25-PWB(A)(C)2000 KONAMI
|--------------------------------------------------------------------------|
|CN9 ADM232 LS273 PC16552 PC16552 XC9536(1) CN13|
|DSW(8) LS245 LS273 18.432MHz DS2401 |
| |-------| |-------| |-------| |-------| |
| MB3793 |TOSHIBA| |TOSHIBA| |TOSHIBA| |TOSHIBA|M48T58Y.6T|
| |TC9446F| |TC9446F| |TC9446F| |TC9446F| |
| |-016 | |-016 | |-016 | |-016 | CN12|
| |-------| |-------| |-------| |-------| |
| LV14 XC9572XL |
| CN16 CN17 CN18 CN19 XC9536(2)|
|PQ30RV21 LCX245 LCX245 CN11|
| 33.8688MHz PQ30RV21 |
| 8.25MHz HY57V641620 |
| |------------| HY57V641620 XC2S200 |
| |TOSHIBA | FLASH.20T |
| |TMPR3927AF | CN10|
| | | |
| | | LS245 F245 F245 |
| | |HY57V641620 LCX245 DIP40 |
| |------------| HY57V641620 LCX245 ATAPI44 |
| LCX245 LED(HDD) ATAPI40 |
| CN7 LCX245 CN14 LED(CD) CN5 |
|--------------------------------------------------------------------------|
Notes: (all IC's shown)
TMPR3927 - Toshiba TMPR3927AF Risc Microprocessor (QFP240)
FLASH.20T - Fujitsu 29F400TC Flash ROM (TSOP48)
ATAPI44 - IDE44 44-pin laptop type HDD connector (not used)
ATAPI40 - IDE40 40-pin flat cable HDD connector used for connection of CDROM drive
XC9572XL - XILINX XC9572XL In-system Programmable CPLD stamped 'XA25A1' (TQFP100)
XC9536(1) - XILINX CPLD stamped 'XA25A3' (PLCC44)
XC9536(2) - XILINX CPLD stamped 'XA25A2' (PLCC44)
XC2S200 - XILINX XC2S200 SPARTAN FPGA (QFP208)
DS2401 - MAXIM Dallas DS2401 Silicon Serial Number (SOIC6)
M48T58Y - ST M48T58Y Timekeeper NVRAM 8k bytes x8-bit (DIP28). Chip appears empty (0x04 fill) or unused
MB3793 - Fujitsu MB3793 Power-Voltage Monitoring IC with Watchdog Timer (SOIC8)
DIP40 - Empty DIP40 socket
HY57V641620 - Hyundai/Hynix HY57V641620 4 Banks x 1M x 16Bit Synchronous DRAM
PC16552D - National PC16552D Dual Universal Asynchronous Receiver/Transmitter with FIFO's
TC9446F - Toshiba TC9446F-016 Audio Digital Processor for Decode of Dolby Digital (AC-3) MPEG2 Audio
CN16-CN19 - Connector for sub board (3 of them are present). One board connects via a thin cable from
CN1 to the main board to a connector on the security board labelled 'AMP BOX'.
Sub Board Layout
----------------
GXA25-PWB(B) (C) 2000 KONAMI
|---------------------------------|
| TLP2630 LV14 ADM232 |
|CN2 CN1|
|A2430 AK5330 |
| |
| RCA L/R|
|ZUS1R50505 6379A |
| LM358 |
|---------------------------------|
PCMCIA Flash Card
-----------------
Front
|----PCMCIA CONNECTOR-----|
| |
| HT04A MB624018 MB624019 |
| AT28C16 |
| |
| 29F017A.1L 29F017A.1U |
| 90PFTR 90PFTN |
| |
| 29F017A.2L 29F017A.2U |
| 90PFTN 90PFTR |
| |
| 29F017A.3L 29F017A.3U |
| 90PFTR 90PFTN |
| |
| 29F017A.4L 29F017A.4U |
| 90PFTN 90PFTR |
| |
|------------------SWITCH-|
Back
|----PCMCIA CONNECTOR-----|
| |
| |
| |
| |
| 29F017A.5U 29F017A.5L |
| 90PFTR 90PFTN |
| |
| 29F017A.6U 29F017A.6L |
| 90PFTN 90PFTR |
| |
| 29F017A.7U 29F017A.7L |
| 90PFTR 90PFTN |
| |
| 29F017A.8U 29F017A.8L |
| 90PFTN 90PFTR |
| |
|-SWITCH------------------|
Texas Instruments HT04A
Fujitsu MB624018 CMOS GATE ARRAY
Fujitsu MB624019 CMOS GATE ARRAY
Atmel AT28C16 16K (2K x 8) Parallel EEPROM
Fujitsu 29F017A-90PFTR 16M (2M x 8) BIT Flash Memory Reverse Pinout (Gachaga Champ card used 29F017-12PFTR instead)
Fujitsu 29F017A-90PFTN 16M (2M x 8) BIT Flash Memory Standard Pinout
*/
#include "emu.h"
#include "cdrom.h"
#include "cpu/psx/psx.h"
#include "video/psx.h"
#include "machine/intelfsh.h"
#include "machine/cr589.h"
#include "machine/timekpr.h"
#include "machine/adc083x.h"
#include "machine/ds2401.h"
#include "machine/upd4701.h"
#include "machine/x76f041.h"
#include "machine/x76f100.h"
#include "machine/zs01.h"
#include "sound/spu.h"
#include "sound/cdda.h"
#include "sound/mas3507d.h"
#include "cdrom.h"
#include "machine/k573cass.h"
#define VERBOSE_LEVEL ( 0 )
#define ATAPI_CYCLES_PER_SECTOR (5000) // plenty of time to allow DMA setup etc. BIOS requires this be at least 2000, individual games may vary.
#define ATAPI_STAT_BSY 0x80
#define ATAPI_STAT_DRDY 0x40
#define ATAPI_STAT_DMARDDF 0x20
#define ATAPI_STAT_SERVDSC 0x10
#define ATAPI_STAT_DRQ 0x08
#define ATAPI_STAT_CORR 0x04
#define ATAPI_STAT_CHECK 0x01
#define ATAPI_INTREASON_COMMAND 0x01
#define ATAPI_INTREASON_IO 0x02
#define ATAPI_INTREASON_RELEASE 0x04
#define ATAPI_REG_DATA 0
#define ATAPI_REG_ERRFEAT 1
#define ATAPI_REG_INTREASON 2
#define ATAPI_REG_SAMTAG 3
#define ATAPI_REG_COUNTLOW 4
#define ATAPI_REG_COUNTHIGH 5
#define ATAPI_REG_DRIVESEL 6
#define ATAPI_REG_CMDSTATUS 7
#define ATAPI_REG_MAX 16
#define ATAPI_DATA_SIZE ( 64 * 1024 )
#define MAX_TRANSFER_SIZE ( 63488 )
class ksys573_state : public driver_device
{
public:
ksys573_state(const machine_config &mconfig, device_type type, const char *tag) :
driver_device(mconfig, type, tag),
m_psxirq(*this, ":maincpu:irq"),
m_cr589(*this, ":cdrom")
{
}
required_device<psxirq_device> m_psxirq;
int m_flash_bank;
fujitsu_29f016a_device *m_flash_device[5][16];
int m_security_cart_number;
UINT32 m_control;
emu_timer *m_atapi_timer;
required_device<scsihle_device> m_cr589;
cdrom_file *m_available_cdroms[ 2 ];
int m_atapi_data_ptr;
int m_atapi_data_len;
int m_atapi_xferlen;
int m_atapi_xferbase;
int m_atapi_cdata_wait;
int m_atapi_xfermod;
UINT32 m_n_security_control;
void (*m_security_callback)( running_machine &machine, int data );
UINT8 m_gx700pwbf_output_data[ 4 ];
void (*m_gx700pwfbf_output_callback)( running_machine &machine, int offset, int data );
UINT16 m_gx894pwbba_output_data[ 8 ];
void (*m_gx894pwbba_output_callback)( running_machine &machine, int offset, int data );
UINT32 m_stage_mask;
struct
{
int DO;
int clk;
int shift;
int state;
int bit;
} m_stage[ 2 ];
UINT32 m_gx894_ram_write_offset;
UINT32 m_gx894_ram_read_offset;
UINT16 *m_gx894_ram;
int m_f;
int m_o;
int m_s;
UINT32 m_a;
UINT32 m_b;
UINT32 m_c;
UINT32 m_d;
int m_salarymc_lamp_bits;
int m_salarymc_lamp_shift;
int m_salarymc_lamp_clk;
int m_hyperbbc_lamp_strobe1;
int m_hyperbbc_lamp_strobe2;
UINT32 *m_p_n_psxram;
/* memory */
UINT8 m_atapi_regs[ATAPI_REG_MAX];
UINT8 m_atapi_data[ATAPI_DATA_SIZE];
int m_tank_shutter_position;
int m_cable_holder_release;
double m_pad_position[ 6 ];
DECLARE_CUSTOM_INPUT_MEMBER(gn845pwbb_read);
DECLARE_CUSTOM_INPUT_MEMBER(gunmania_tank_shutter_sensor);
DECLARE_CUSTOM_INPUT_MEMBER(gunmania_cable_holder_sensor);
DECLARE_WRITE32_MEMBER(mb89371_w);
DECLARE_READ32_MEMBER(mb89371_r);
DECLARE_READ32_MEMBER(jamma_r);
DECLARE_READ32_MEMBER(control_r);
DECLARE_WRITE32_MEMBER(control_w);
DECLARE_READ32_MEMBER(atapi_r);
DECLARE_WRITE32_MEMBER(atapi_w);
DECLARE_WRITE32_MEMBER(atapi_reset_w);
DECLARE_WRITE32_MEMBER(security_w);
DECLARE_READ32_MEMBER(security_r);
DECLARE_READ16_MEMBER(flash_r);
DECLARE_WRITE16_MEMBER(flash_w);
DECLARE_READ32_MEMBER(ge765pwbba_r);
DECLARE_WRITE32_MEMBER(ge765pwbba_w);
DECLARE_READ32_MEMBER(gx700pwbf_io_r);
DECLARE_WRITE32_MEMBER(gx700pwbf_io_w);
DECLARE_READ32_MEMBER(gtrfrks_io_r);
DECLARE_WRITE32_MEMBER(gtrfrks_io_w);
DECLARE_READ32_MEMBER(gx894pwbba_r);
DECLARE_WRITE32_MEMBER(gx894pwbba_w);
DECLARE_WRITE32_MEMBER(dmx_io_w);
DECLARE_WRITE32_MEMBER(mamboagg_io_w);
DECLARE_WRITE32_MEMBER(gunmania_w);
DECLARE_READ32_MEMBER(gunmania_r);
DECLARE_DRIVER_INIT(gtrfrkdigital);
DECLARE_DRIVER_INIT(salarymc);
DECLARE_DRIVER_INIT(dmx);
DECLARE_DRIVER_INIT(gtrfrks);
DECLARE_DRIVER_INIT(drmndigital);
DECLARE_DRIVER_INIT(punchmania);
DECLARE_DRIVER_INIT(ddr);
DECLARE_DRIVER_INIT(mamboagg);
DECLARE_DRIVER_INIT(ge765pwbba);
DECLARE_DRIVER_INIT(gunmania);
DECLARE_DRIVER_INIT(hyperbbc);
DECLARE_DRIVER_INIT(drmn);
DECLARE_DRIVER_INIT(ddrsolo);
DECLARE_DRIVER_INIT(ddrdigital);
DECLARE_DRIVER_INIT(konami573);
DECLARE_MACHINE_RESET(konami573);
TIMER_CALLBACK_MEMBER(atapi_xfer_end);
};
INLINE void ATTR_PRINTF(3,4) verboselog( running_machine &machine, int n_level, const char *s_fmt, ... )
{
if( VERBOSE_LEVEL >= n_level )
{
va_list v;
char buf[ 32768 ];
va_start( v, s_fmt );
vsprintf( buf, s_fmt, v );
va_end( v );
logerror( "%s: %s", machine.describe_context(), buf );
}
}
WRITE32_MEMBER(ksys573_state::mb89371_w)
{
verboselog( machine(), 2, "mb89371_w %08x %08x %08x\n", offset, mem_mask, data );
}
READ32_MEMBER(ksys573_state::mb89371_r)
{
UINT32 data = 0xffffffff;
verboselog( machine(), 2, "mb89371_r %08x %08x %08x\n", offset, mem_mask, data );
return data;
}
READ32_MEMBER(ksys573_state::jamma_r)
{
int security_cart_number = m_security_cart_number;
UINT32 data = ioport("IN1")->read();
data |= 0x000000c0;
ds2401_device *ds2401 = machine().device<ds2401_device>(security_cart_number ? "game_id" : "install_id");
device_secure_serial_flash *secflash = machine().device<device_secure_serial_flash>(security_cart_number ? "game_eeprom" : "install_eeprom");
if( ds2401 )
{
data |= ds2401->read() << 14;
}
if( secflash )
data |= secflash->sda_r() << 18;
if( m_flash_device[1][0] == NULL )
{
data |= ( 1 << 26 );
}
if( m_flash_device[2][0] == NULL )
{
data |= ( 1 << 27 );
}
verboselog( machine(), 2, "jamma_r( %08x, %08x ) %08x\n", offset, mem_mask, data );
return data;
}
READ32_MEMBER(ksys573_state::control_r)
{
verboselog( machine(), 2, "control_r( %08x, %08x ) %08x\n", offset, mem_mask, m_control );
return m_control;
}
WRITE32_MEMBER(ksys573_state::control_w)
{
UINT32 control;
int old_bank = m_flash_bank;
COMBINE_DATA(&m_control);
control = m_control;
verboselog( machine(), 2, "control_w( %08x, %08x, %08x )\n", offset, mem_mask, data );
m_flash_bank = -1;
// zs01 only, others are reached through security_w
device_secure_serial_flash *secflash = machine().device<device_secure_serial_flash>(m_security_cart_number ? "game_eeprom" : "install_eeprom");
if( dynamic_cast<zs01_device *>(secflash) )
secflash->sda_w( !( ( control >> 6 ) & 1 ) ); /* 0x40 */
if( m_flash_device[0][0] != NULL && ( control & ~0x43 ) == 0x00 )
{
m_flash_bank = (0 << 8) + ( ( control & 3 ) * 2 );
if( m_flash_bank != old_bank ) verboselog( machine(), 1, "onboard %d\n", control & 3 );
}
else if( m_flash_device[1][0] != NULL && ( control & ~0x47 ) == 0x10 )
{
m_flash_bank = (1 << 8) + ( ( control & 7 ) * 2 );
if( m_flash_bank != old_bank ) verboselog( machine(), 1, "pccard1 %d\n", control & 7 );
}
else if( m_flash_device[2][0] != NULL && ( control & ~0x47 ) == 0x20 )
{
m_flash_bank = (2 << 8) + ( ( control & 7 ) * 2 );
if( m_flash_bank != old_bank ) verboselog( machine(), 1, "pccard2 %d\n", control & 7 );
}
else if( m_flash_device[3][0] != NULL && ( control & ~0x47 ) == 0x20 )
{
m_flash_bank = (3 << 8) + ( ( control & 7 ) * 2 );
if( m_flash_bank != old_bank ) verboselog( machine(), 1, "pccard3 %d\n", control & 7 );
}
else if( m_flash_device[4][0] != NULL && ( control & ~0x47 ) == 0x28 )
{
m_flash_bank = (4 << 8) + ( ( control & 7 ) * 2 );
if( m_flash_bank != old_bank ) verboselog( machine(), 1, "pccard4 %d\n", control & 7 );
}
}
TIMER_CALLBACK_MEMBER(ksys573_state::atapi_xfer_end)
{
UINT32 *p_n_psxram = m_p_n_psxram;
UINT8 *atapi_regs = m_atapi_regs;
int i, n_state;
UINT8 sector_buffer[ 4096 ];
m_atapi_timer->adjust(attotime::never);
// verboselog( machine(), 2, "atapi_xfer_end( %d ) atapi_xferlen = %d, atapi_xfermod=%d\n", x, atapi_xfermod, atapi_xferlen );
// mame_printf_debug("ATAPI: xfer_end. xferlen = %d, atapi_xfermod = %d\n", atapi_xferlen, atapi_xfermod);
while( m_atapi_xferlen > 0 )
{
// get a sector from the SCSI device
m_cr589->ReadData( sector_buffer, 2048 );
m_atapi_xferlen -= 2048;
i = 0;
n_state = 2048 / 4;
while( n_state > 0 )
{
p_n_psxram[ m_atapi_xferbase / 4 ] =
( sector_buffer[ i + 0 ] << 0 ) |
( sector_buffer[ i + 1 ] << 8 ) |
( sector_buffer[ i + 2 ] << 16 ) |
( sector_buffer[ i + 3 ] << 24 );
m_atapi_xferbase += 4;
i += 4;
n_state--;
}
}
if (m_atapi_xfermod > MAX_TRANSFER_SIZE)
{
m_atapi_xferlen = MAX_TRANSFER_SIZE;
m_atapi_xfermod = m_atapi_xfermod - MAX_TRANSFER_SIZE;
}
else
{
m_atapi_xferlen = m_atapi_xfermod;
m_atapi_xfermod = 0;
}
if (m_atapi_xferlen > 0)
{
//mame_printf_debug("ATAPI: starting next piece of multi-part transfer\n");
atapi_regs[ATAPI_REG_COUNTLOW] = m_atapi_xferlen & 0xff;
atapi_regs[ATAPI_REG_COUNTHIGH] = (m_atapi_xferlen>>8)&0xff;
m_atapi_timer->adjust(machine().device<cpu_device>("maincpu")->cycles_to_attotime((ATAPI_CYCLES_PER_SECTOR * (m_atapi_xferlen/2048))));
}
else
{
//mame_printf_debug("ATAPI: Transfer completed, dropping DRQ\n");
atapi_regs[ATAPI_REG_CMDSTATUS] = ATAPI_STAT_DRDY;
atapi_regs[ATAPI_REG_INTREASON] = ATAPI_INTREASON_IO | ATAPI_INTREASON_COMMAND;
}
m_psxirq->intin10(1);
verboselog( machine(), 2, "atapi_xfer_end: %d %d\n", m_atapi_xferlen, m_atapi_xfermod );
}
READ32_MEMBER(ksys573_state::atapi_r)
{
UINT8 *atapi_regs = m_atapi_regs;
int reg, data;
if (mem_mask == 0x0000ffff) // word-wide command read
{
// mame_printf_debug("ATAPI: packet read = %04x\n", atapi_data[atapi_data_ptr]);
// assert IRQ and drop DRQ
if (m_atapi_data_ptr == 0 && m_atapi_data_len == 0)
{
// get the data from the device
if( m_atapi_xferlen > 0 )
{
m_cr589->ReadData( m_atapi_data, m_atapi_xferlen );
m_atapi_data_len = m_atapi_xferlen;
}
if (m_atapi_xfermod > MAX_TRANSFER_SIZE)
{
m_atapi_xferlen = MAX_TRANSFER_SIZE;
m_atapi_xfermod = m_atapi_xfermod - MAX_TRANSFER_SIZE;
}
else
{
m_atapi_xferlen = m_atapi_xfermod;
m_atapi_xfermod = 0;
}
verboselog( machine(), 2, "atapi_r: atapi_xferlen=%d\n", m_atapi_xferlen );
if( m_atapi_xferlen != 0 )
{
atapi_regs[ATAPI_REG_CMDSTATUS] = ATAPI_STAT_DRQ | ATAPI_STAT_SERVDSC;
atapi_regs[ATAPI_REG_INTREASON] = ATAPI_INTREASON_IO;
}
else
{
//mame_printf_debug("ATAPI: dropping DRQ\n");
atapi_regs[ATAPI_REG_CMDSTATUS] = 0;
atapi_regs[ATAPI_REG_INTREASON] = ATAPI_INTREASON_IO;
}
atapi_regs[ATAPI_REG_COUNTLOW] = m_atapi_xferlen & 0xff;
atapi_regs[ATAPI_REG_COUNTHIGH] = (m_atapi_xferlen>>8)&0xff;
m_psxirq->intin10(1);
}
if( m_atapi_data_ptr < m_atapi_data_len )
{
data = m_atapi_data[m_atapi_data_ptr++];
data |= ( m_atapi_data[m_atapi_data_ptr++] << 8 );
if( m_atapi_data_ptr >= m_atapi_data_len )
{
// verboselog( machine(), 2, "atapi_r: read all bytes\n" );
m_atapi_data_ptr = 0;
m_atapi_data_len = 0;
if( m_atapi_xferlen == 0 )
{
atapi_regs[ATAPI_REG_CMDSTATUS] = 0;
atapi_regs[ATAPI_REG_INTREASON] = ATAPI_INTREASON_IO;
m_psxirq->intin10(1);
}
}
}
else
{
data = 0;
}
}
else
{
int shift;
reg = offset<<1;
shift = 0;
if (mem_mask == 0x00ff0000)
{
reg += 1;
shift = 16;
}
data = atapi_regs[reg];
switch( reg )
{
case ATAPI_REG_DATA:
verboselog( machine(), 1, "atapi_r: data=%02x\n", data );
break;
case ATAPI_REG_ERRFEAT:
verboselog( machine(), 1, "atapi_r: errfeat=%02x\n", data );
break;
case ATAPI_REG_INTREASON:
verboselog( machine(), 1, "atapi_r: intreason=%02x\n", data );
break;
case ATAPI_REG_SAMTAG:
verboselog( machine(), 1, "atapi_r: samtag=%02x\n", data );
break;
case ATAPI_REG_COUNTLOW:
verboselog( machine(), 1, "atapi_r: countlow=%02x\n", data );
break;
case ATAPI_REG_COUNTHIGH:
verboselog( machine(), 1, "atapi_r: counthigh=%02x\n", data );
break;
case ATAPI_REG_DRIVESEL:
verboselog( machine(), 1, "atapi_r: drivesel=%02x\n", data );
break;
case ATAPI_REG_CMDSTATUS:
verboselog( machine(), 1, "atapi_r: cmdstatus=%02x\n", data );
break;
}
// mame_printf_debug("ATAPI: read reg %d = %x (PC=%x)\n", reg, data, space.device().safe_pc());
data <<= shift;
}
verboselog( machine(), 2, "atapi_r( %08x, %08x ) %08x\n", offset, mem_mask, data );
return data;
}
WRITE32_MEMBER(ksys573_state::atapi_w)
{
UINT8 *atapi_regs = m_atapi_regs;
UINT8 *atapi_data = m_atapi_data;
int reg;
verboselog( machine(), 2, "atapi_w( %08x, %08x, %08x )\n", offset, mem_mask, data );
if (mem_mask == 0x0000ffff) // word-wide command write
{
verboselog( machine(), 2, "atapi_w: data=%04x\n", data );
// mame_printf_debug("ATAPI: packet write %04x\n", data);
atapi_data[m_atapi_data_ptr++] = data & 0xff;
atapi_data[m_atapi_data_ptr++] = data >> 8;
if (m_atapi_cdata_wait)
{
// mame_printf_debug("ATAPI: waiting, ptr %d wait %d\n", m_atapi_data_ptr, m_atapi_cdata_wait);
if (m_atapi_data_ptr == m_atapi_cdata_wait)
{
// send it to the device
m_cr589->WriteData( atapi_data, m_atapi_cdata_wait );
// assert IRQ
m_psxirq->intin10(1);
// not sure here, but clear DRQ at least?
atapi_regs[ATAPI_REG_CMDSTATUS] = 0;
}
}
else if ( m_atapi_data_ptr == 12 )
{
int phase;
verboselog( machine(), 2, "atapi_w: command %02x\n", atapi_data[0]&0xff );
// reset data pointer for reading SCSI results
m_atapi_data_ptr = 0;
m_atapi_data_len = 0;
// send it to the SCSI device
m_cr589->SetCommand( m_atapi_data, 12 );
m_cr589->ExecCommand( &m_atapi_xferlen );
m_cr589->GetPhase( &phase );
if (m_atapi_xferlen != -1)
{
// mame_printf_debug("ATAPI: SCSI command %02x returned %d bytes from the device\n", atapi_data[0]&0xff, m_atapi_xferlen);
// store the returned command length in the ATAPI regs, splitting into
// multiple transfers if necessary
m_atapi_xfermod = 0;