/
snowbros.cpp
3144 lines (2622 loc) · 144 KB
/
snowbros.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, Mike Coates
/***************************************************************************
Snow Brothers (Toaplan) / SemiCom Hardware
uses Kaneko's Pandora sprite chip (also used in DJ Boy, Air Buster ..)
Snow Bros Nick & Tom
Toaplan, 1990
PCB Layout
----------
MIN16-02
|------------------------------------------|
| VOL YM3812 6116 4464 4464 |
| LA4460 YM3014 4464 4464 |
| 458 SBROS-4.29 SBROS1.40 |
| 2003 Z80B PANDORA |
|J D41101C-1 LS07 LS32 |
|A SBROS-3A.5 SBROS-2A.6 LS139 LS174|
|M LS245 LS74 LS04 16MHz|
|M 6264 6264 F32 LS74 LS74 |
|A 68000 LS20 F138 LS04 12MHz|
| LS04 LS148 LS251 LS00 |
| LS273 LS245 LS245 LS158 LS257 LS257 LS32 |
| |
| LS273 6116 6116 LS157 DSW2 DSW1 |
|------------------------------------------|
Notes:
68k clock: 8.000MHz
Z80B clock: 6.000MHz
YM3812 clock: 3.000MHz
VSync: 57.5Hz
HSync: 15.68kHz
driver by Mike Coates
Hyper Pacman addition by David Haywood
+ some bits by Nicola Salmoria
!!DO NOT TRUST THE SERVICE MODES FOR DIPSWITCH SETTINGS!!
Stephh's notes (hyperpac):
- According to the "Language" Dip Switch, this game is a Korean game.
(although the Language Dipswitch doesn't affect language, but yes
I believe SemiCom to be a Korean Company)
- There is no "cocktail mode", nor way to flip the screen.
Notes:
Cookie & Bibi 3
This game is quite buggy. The test mode is incomplete and displays garbage
on the 'Dipswitch settings' screens, and during some of the attract mode
scenes the credit counter is not updated when you insert coins until the next
scene. Both these bugs are verified as occurring on the original hardware.
Honey Doll / Twin Adventure
These appear to have clipping problems on the left / right edges, but this
may be correct, the sprites which should be drawn there are simply blanked
out of the sprite list at that point.. (verify on real hw)
Ma Cheon Ru
The electrified maze + ball minigame appears unresponsive to controls, this
is because it actually requires you to move the joysticks in a circular
motion through all 8 directions at a very even speed, a task which is
practically impossible to perform on keyboard, and not even that easy with
a joystick. This is not an emulation bug.
***************************************************************************/
#include "emu.h"
#include "snowbros.h"
#include "cpu/m68000/m68000.h"
#include "cpu/mcs51/mcs51.h" // for semicom mcu
#include "cpu/z80/z80.h"
#include "machine/watchdog.h"
#include "sound/ymopm.h"
#include "sound/ymopl.h"
#include "speaker.h"
void snowbros_state::snowbros_flipscreen_w(uint8_t data)
{
m_pandora->flip_screen_set(!BIT(data, 7));
}
void snowbros_state::bootleg_flipscreen_w(uint8_t data)
{
flip_screen_set(~data & 0x80);
}
uint32_t snowbros_state::screen_update_snowbros(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
/* This clears & redraws the entire screen each pass */
bitmap.fill(0xf0, cliprect);
m_pandora->update(bitmap, cliprect);
return 0;
}
void snowbros_state::screen_vblank_snowbros(int state)
{
// rising edge
if (state)
{
m_pandora->eof();
}
}
void snowbros_state::snowbros_irq4_ack_w(uint16_t data)
{
m_maincpu->set_input_line(4, CLEAR_LINE);
}
void snowbros_state::snowbros_irq3_ack_w(uint16_t data)
{
m_maincpu->set_input_line(3, CLEAR_LINE);
}
void snowbros_state::snowbros_irq2_ack_w(uint16_t data)
{
m_maincpu->set_input_line(2, CLEAR_LINE);
}
TIMER_DEVICE_CALLBACK_MEMBER(snowbros_state::snowbros_irq)
{
int scanline = param;
if(scanline == 240)
m_maincpu->set_input_line(2, ASSERT_LINE);
if(scanline == 128)
m_maincpu->set_input_line(3, ASSERT_LINE);
if(scanline == 32)
m_maincpu->set_input_line(4, ASSERT_LINE);
}
TIMER_DEVICE_CALLBACK_MEMBER(snowbros_state::snowbros3_irq)
{
int status = m_oki->read();
int scanline = param;
if(scanline == 240)
m_maincpu->set_input_line(2, ASSERT_LINE);
if(scanline == 128)
m_maincpu->set_input_line(3, ASSERT_LINE);
if(scanline == 32)
m_maincpu->set_input_line(4, ASSERT_LINE);
if (m_sb3_music_is_playing)
{
if ((status&0x08)==0x00)
{
m_oki->write(0x80|m_sb3_music);
m_oki->write(0x00|0x82);
}
}
else
{
if ((status&0x08)==0x08)
{
m_oki->write(0x40); /* Stop playing music */
}
}
}
uint16_t snowbros_state::toto_read(offs_t offset, uint16_t mem_mask)
{
int pc = m_maincpu->pc();
if ((pc!= 0x3f010) && (pc!= 0x38008)) printf("toto prot %08x %04x\n", pc, mem_mask);
return 0x0700;
}
/* Snow Bros Memory Map */
void snowbros_state::snowbros_map(address_map &map)
{
map(0x000000, 0x03ffff).rom();
map(0x100000, 0x103fff).ram();
map(0x200000, 0x200001).w("watchdog", FUNC(watchdog_timer_device::reset16_w));
map(0x300001, 0x300001).r("soundlatch2", FUNC(generic_latch_8_device::read));
map(0x300001, 0x300001).w(m_soundlatch, FUNC(generic_latch_8_device::write));
map(0x400000, 0x400000).w(FUNC(snowbros_state::snowbros_flipscreen_w));
map(0x500000, 0x500001).portr("DSW1");
map(0x500002, 0x500003).portr("DSW2");
map(0x500004, 0x500005).portr("SYSTEM");
map(0x600000, 0x6001ff).ram().w(m_palette, FUNC(palette_device::write16)).share("palette");
map(0x700000, 0x701fff).rw(m_pandora, FUNC(kaneko_pandora_device::spriteram_LSB_r), FUNC(kaneko_pandora_device::spriteram_LSB_w));
map(0x800000, 0x800001).w(FUNC(snowbros_state::snowbros_irq4_ack_w)); /* IRQ 4 acknowledge */
map(0x900000, 0x900001).w(FUNC(snowbros_state::snowbros_irq3_ack_w)); /* IRQ 3 acknowledge */
map(0xa00000, 0xa00001).w(FUNC(snowbros_state::snowbros_irq2_ack_w)); /* IRQ 2 acknowledge */
}
void snowbros_state::sound_map(address_map &map)
{
map(0x0000, 0x7fff).rom();
map(0x8000, 0x87ff).ram();
}
void snowbros_state::sound_io_map(address_map &map)
{
map.global_mask(0xff);
map(0x02, 0x03).rw("ymsnd", FUNC(ym3812_device::read), FUNC(ym3812_device::write));
map(0x04, 0x04).r(m_soundlatch, FUNC(generic_latch_8_device::read));
map(0x04, 0x04).w("soundlatch2", FUNC(generic_latch_8_device::write)); // goes back to the main CPU, checked during boot
}
/* Semicom AT89C52 MCU */
// probably not endian safe
void snowbros_state::prot_p0_w(uint8_t data)
{
uint16_t word = m_hyperpac_ram[m_semicom_prot_base + m_semicom_prot_offset];
word = (word & 0xff00) | (data << 0);
m_hyperpac_ram[m_semicom_prot_base + m_semicom_prot_offset] = word;
}
// probably not endian safe
void snowbros_state::prot_p1_w(uint8_t data)
{
uint16_t word = m_hyperpac_ram[m_semicom_prot_base + m_semicom_prot_offset];
word = (word & 0x00ff) | (data << 8);
m_hyperpac_ram[m_semicom_prot_base + m_semicom_prot_offset] = word;
}
void snowbros_state::prot_p2_w(uint8_t data)
{
// offset
m_semicom_prot_offset = data;
}
/* Winter Bobble - bootleg GFX chip */
void snowbros_state::wintbob_map(address_map &map)
{
map(0x000000, 0x03ffff).rom();
map(0x100000, 0x103fff).ram();
map(0x200000, 0x200001).w("watchdog", FUNC(watchdog_timer_device::reset16_w));
map(0x300001, 0x300001).r("soundlatch2", FUNC(generic_latch_8_device::read));
map(0x300001, 0x300001).w(m_soundlatch, FUNC(generic_latch_8_device::write));
map(0x400000, 0x400000).w(FUNC(snowbros_state::bootleg_flipscreen_w));
map(0x500000, 0x500001).portr("DSW1");
map(0x500002, 0x500003).portr("DSW2");
map(0x500004, 0x500005).portr("SYSTEM");
map(0x600000, 0x6001ff).ram().w(m_palette, FUNC(palette_device::write16)).share("palette");
map(0x700000, 0x701fff).ram().share("spriteram16b");
map(0x800000, 0x800001).w(FUNC(snowbros_state::snowbros_irq4_ack_w)); /* IRQ 4 acknowledge */
map(0x900000, 0x900001).w(FUNC(snowbros_state::snowbros_irq3_ack_w)); /* IRQ 3 acknowledge */
map(0xa00000, 0xa00001).w(FUNC(snowbros_state::snowbros_irq2_ack_w)); /* IRQ 2 acknowledge */
}
/* Honey Doll */
void snowbros_state::honeydol_map(address_map &map)
{
map(0x000000, 0x03ffff).rom();
map(0x100000, 0x10ffff).ram().share("hyperpac_ram");
map(0x200000, 0x200001).nopw(); /* ? */
map(0x300001, 0x300001).w(m_soundlatch, FUNC(generic_latch_8_device::write));
map(0x400000, 0x400001).w(FUNC(snowbros_state::snowbros_irq4_ack_w)); /* IRQ 4 acknowledge */
map(0x500000, 0x500001).w(FUNC(snowbros_state::snowbros_irq3_ack_w)); /* IRQ 3 acknowledge */
map(0x600000, 0x600001).w(FUNC(snowbros_state::snowbros_irq2_ack_w)); /* IRQ 2 acknowledge */
map(0x800000, 0x800001).nopw(); /* ? */
map(0x900000, 0x900001).portr("DSW1");
map(0x900002, 0x900003).portr("DSW2");
map(0x900004, 0x900005).portr("SYSTEM");
map(0xa00000, 0xa007ff).ram().w(m_palette, FUNC(palette_device::write16)).share("palette");
map(0xb00000, 0xb01fff).ram().share("spriteram16b");
}
void snowbros_state::honeydol_sound_map(address_map &map)
{
map(0x0000, 0x7fff).rom();
map(0x8000, 0x87ff).ram();
map(0xe010, 0xe010).rw(m_oki, FUNC(okim6295_device::read), FUNC(okim6295_device::write));
}
void snowbros_state::honeydol_sound_io_map(address_map &map)
{
map.global_mask(0xff);
map(0x02, 0x03).rw("ymsnd", FUNC(ym3812_device::read), FUNC(ym3812_device::write)); // not connected?
map(0x04, 0x04).r(m_soundlatch, FUNC(generic_latch_8_device::read));
map(0x04, 0x04).nopw(); // still written but never actually read by the main CPU
}
/* Twin Adventure */
void snowbros_state::twinadv_map(address_map &map)
{
map(0x000000, 0x03ffff).rom();
map(0x100000, 0x10ffff).ram();
map(0x200000, 0x200001).w("watchdog", FUNC(watchdog_timer_device::reset16_w));
map(0x300001, 0x300001).r("soundlatch2", FUNC(generic_latch_8_device::read));
map(0x300001, 0x300001).w(m_soundlatch, FUNC(generic_latch_8_device::write));
map(0x400000, 0x400000).w(FUNC(snowbros_state::bootleg_flipscreen_w));
map(0x500000, 0x500001).portr("DSW1");
map(0x500002, 0x500003).portr("DSW2");
map(0x500004, 0x500005).portr("SYSTEM");
map(0x600000, 0x6001ff).ram().w(m_palette, FUNC(palette_device::write16)).share("palette");
map(0x700000, 0x701fff).ram().share("spriteram16b");
map(0x800000, 0x800001).w(FUNC(snowbros_state::snowbros_irq4_ack_w)); /* IRQ 4 acknowledge */
map(0x900000, 0x900001).w(FUNC(snowbros_state::snowbros_irq3_ack_w)); /* IRQ 3 acknowledge */
map(0xa00000, 0xa00001).w(FUNC(snowbros_state::snowbros_irq2_ack_w)); /* IRQ 2 acknowledge */
}
void snowbros_state::twinadv_oki_bank_w(uint8_t data)
{
int bank = (data &0x02)>>1;
if (data&0xfd) logerror ("Unused bank bits! %02x\n",data);
m_oki->set_rom_bank(bank);
}
void snowbros_state::twinadv_sound_io_map(address_map &map)
{
map.global_mask(0xff);
map(0x02, 0x02).r(m_soundlatch, FUNC(generic_latch_8_device::read));
map(0x02, 0x02).w("soundlatch2", FUNC(generic_latch_8_device::write)); // back to 68k?
map(0x04, 0x04).w(FUNC(snowbros_state::twinadv_oki_bank_w)); // oki bank?
map(0x06, 0x06).rw(m_oki, FUNC(okim6295_device::read), FUNC(okim6295_device::write));
}
/* SemiCom Memory Map
the SemiCom games have slightly more ram and are protected
sound hardware is also different
*/
void snowbros_state::hyperpac_map(address_map &map)
{
map(0x000000, 0x0fffff).rom();
map(0x100000, 0x10ffff).ram().share("hyperpac_ram");
map(0x300001, 0x300001).w(m_soundlatch, FUNC(generic_latch_8_device::write));
// map(0x400000, 0x400001) ???
map(0x500000, 0x500001).portr("DSW1");
map(0x500002, 0x500003).portr("DSW2");
map(0x500004, 0x500005).portr("SYSTEM");
map(0x600000, 0x6001ff).ram().w(m_palette, FUNC(palette_device::write16)).share("palette");
map(0x700000, 0x701fff).rw(m_pandora, FUNC(kaneko_pandora_device::spriteram_LSB_r), FUNC(kaneko_pandora_device::spriteram_LSB_w));
map(0x800000, 0x800001).w(FUNC(snowbros_state::snowbros_irq4_ack_w)); /* IRQ 4 acknowledge */
map(0x900000, 0x900001).w(FUNC(snowbros_state::snowbros_irq3_ack_w)); /* IRQ 3 acknowledge */
map(0xa00000, 0xa00001).w(FUNC(snowbros_state::snowbros_irq2_ack_w)); /* IRQ 2 acknowledge */
}
void snowbros_state::hyperpac_sound_map(address_map &map)
{
map(0x0000, 0xcfff).rom();
map(0xd000, 0xd7ff).ram();
map(0xf000, 0xf001).rw("ymsnd", FUNC(ym2151_device::read), FUNC(ym2151_device::write));
map(0xf002, 0xf002).rw(m_oki, FUNC(okim6295_device::read), FUNC(okim6295_device::write));
map(0xf008, 0xf008).r(m_soundlatch, FUNC(generic_latch_8_device::read));
}
/* Same volume used for all samples at the Moment, could be right, we have no
way of knowing .. */
uint16_t snowbros_state::sb3_sound_r()
{
return 0x0003;
}
void snowbros_state::sb3_play_music(int data)
{
uint8_t *snd;
/* sample is actually played in interrupt function so it loops */
m_sb3_music = data;
switch (data)
{
case 0x23:
case 0x26:
snd = memregion("oki")->base();
memcpy(snd+0x20000, snd+0x80000+0x00000, 0x20000);
m_sb3_music_is_playing = 1;
break;
case 0x24:
snd = memregion("oki")->base();
memcpy(snd+0x20000, snd+0x80000+0x20000, 0x20000);
m_sb3_music_is_playing = 1;
break;
case 0x25:
case 0x27:
case 0x28:
case 0x29:
case 0x2a:
case 0x2b:
case 0x2c:
case 0x2d:
snd = memregion("oki")->base();
memcpy(snd+0x20000, snd+0x80000+0x40000, 0x20000);
m_sb3_music_is_playing = 1;
break;
case 0x2e:
m_sb3_music_is_playing = 0;
break;
}
}
void snowbros_state::sb3_play_sound (int data)
{
int status = m_oki->read();
if ((status&0x01)==0x00)
{
m_oki->write(0x80|data);
m_oki->write(0x00|0x12);
}
else if ((status&0x02)==0x00)
{
m_oki->write(0x80|data);
m_oki->write(0x00|0x22);
}
else if ((status&0x04)==0x00)
{
m_oki->write(0x80|data);
m_oki->write(0x00|0x42);
}
}
void snowbros_state::sb3_sound_w(uint16_t data)
{
if (data == 0x00fe)
{
m_sb3_music_is_playing = 0;
m_oki->write(0x78); /* Stop sounds */
}
else /* the alternating 0x00-0x2f or 0x30-0x5f might be something to do with the channels */
{
data = data>>8;
if (data <= 0x21)
{
sb3_play_sound(data);
}
if (data>=0x22 && data<=0x31)
{
sb3_play_music(data);
}
if ((data>=0x30) && (data<=0x51))
{
sb3_play_sound(data-0x30);
}
if (data>=0x52 && data<=0x5f)
{
sb3_play_music(data-0x30);
}
}
}
void snowbros_state::snowbros3_map(address_map &map)
{
map(0x000000, 0x03ffff).rom();
map(0x100000, 0x103fff).ram();
map(0x200000, 0x200001).w("watchdog", FUNC(watchdog_timer_device::reset16_w));
map(0x300000, 0x300001).r(FUNC(snowbros_state::sb3_sound_r)); // ?
map(0x300000, 0x300001).w(FUNC(snowbros_state::sb3_sound_w)); // ?
map(0x400000, 0x400000).w(FUNC(snowbros_state::bootleg_flipscreen_w));
map(0x500000, 0x500001).portr("DSW1");
map(0x500002, 0x500003).portr("DSW2");
map(0x500004, 0x500005).portr("SYSTEM");
map(0x600000, 0x6003ff).ram().w(m_palette, FUNC(palette_device::write16)).share("palette");
map(0x700000, 0x7021ff).ram().share("spriteram16b");
map(0x800000, 0x800001).w(FUNC(snowbros_state::snowbros_irq4_ack_w)); /* IRQ 4 acknowledge */
map(0x900000, 0x900001).w(FUNC(snowbros_state::snowbros_irq3_ack_w)); /* IRQ 3 acknowledge */
map(0xa00000, 0xa00001).w(FUNC(snowbros_state::snowbros_irq2_ack_w)); /* IRQ 2 acknowledge */
}
/* Final Tetris */
void snowbros_state::finalttr_map(address_map &map)
{
map(0x000000, 0x0fffff).rom();
map(0x100000, 0x103fff).ram().share("hyperpac_ram");
map(0x300001, 0x300001).w(m_soundlatch, FUNC(generic_latch_8_device::write));
// map(0x400000, 0x400001) ???
map(0x500000, 0x500001).portr("DSW1");
map(0x500002, 0x500003).portr("DSW2");
map(0x500004, 0x500005).portr("SYSTEM");
map(0x600000, 0x6001ff).ram().w(m_palette, FUNC(palette_device::write16)).share("palette");
map(0x700000, 0x701fff).rw(m_pandora, FUNC(kaneko_pandora_device::spriteram_LSB_r), FUNC(kaneko_pandora_device::spriteram_LSB_w));
map(0x800000, 0x800001).w(FUNC(snowbros_state::snowbros_irq4_ack_w)); /* IRQ 4 acknowledge */
map(0x900000, 0x900001).w(FUNC(snowbros_state::snowbros_irq3_ack_w)); /* IRQ 3 acknowledge */
map(0xa00000, 0xa00001).w(FUNC(snowbros_state::snowbros_irq2_ack_w)); /* IRQ 2 acknowledge */
}
// Yutnori protection.
// The sequence MEN is sent to the protection device, followed by the code request (4 bytes in all).
// After each byte, a number of NOPs are executed to give the device time to catch up.
// After the 4th byte, the code reads the device to get its response.
uint16_t snowbros_state::yutnori_prot_r()
{
switch(m_yutnori_prot_val) // the 4th byte
{
case 0x33: // C3B6
return 0xcc;
case 0x60: // 4878
return 0xf9;
case 0xb8: // D820
return 0x74;
}
logerror("%s: Unhandled protection sequence found: %02X\n", machine().describe_context(), m_yutnori_prot_val);
return 0;
}
void snowbros_state::yutnori_prot_w(uint16_t data)
{
m_yutnori_prot_val = data;
}
void snowbros_state::yutnori_map(address_map &map)
{
map(0x000000, 0x03ffff).rom();
// 0x100000 clr.w on startup
map(0x200000, 0x200001).rw(FUNC(snowbros_state::yutnori_prot_r),FUNC(snowbros_state::yutnori_prot_w)); // protection
map(0x300000, 0x300001).portr("DSW1");
map(0x300002, 0x300003).portr("DSW2");
map(0x300004, 0x300005).portr("SYSTEM");
// could be one of the OKIs? but gets value to write from RAM, always seems to be 0?
map(0x30000c, 0x30000d).nopw();
map(0x30000e, 0x30000f).nopr(); //.r(FUNC(snowbros_state::yutnori_unk_r)); // ??
// map(0x400000, 0x400001).w("watchdog", FUNC(watchdog_timer_device::reset16_w)); // maybe?
map(0x400000, 0x400001).noprw();
map(0x500000, 0x5001ff).ram().w(m_palette, FUNC(palette_device::write16)).share("palette");
map(0x600000, 0x601fff).rw(m_pandora, FUNC(kaneko_pandora_device::spriteram_LSB_r), FUNC(kaneko_pandora_device::spriteram_LSB_w));
map(0x700000, 0x70ffff).ram();
map(0x800000, 0x800001).nopr().w(FUNC(snowbros_state::snowbros_irq4_ack_w)); /* IRQ 4 acknowledge */
map(0x900000, 0x900001).nopr().w(FUNC(snowbros_state::snowbros_irq3_ack_w)); /* IRQ 3 acknowledge */
map(0xa00000, 0xa00001).nopr().w(FUNC(snowbros_state::snowbros_irq2_ack_w)); /* IRQ 2 acknowledge */
}
static INPUT_PORTS_START( snowbros )
PORT_START("DSW1") /* 500001 */
PORT_DIPNAME( 0x01, 0x00, DEF_STR( Region ) ) PORT_DIPLOCATION("SW1:1") /* Listed as "NOT USE" in the manual */
PORT_DIPSETTING( 0x00, DEF_STR( Europe ) )
PORT_DIPSETTING( 0x01, "America (Romstar license)" )
PORT_DIPNAME( 0x02, 0x02, DEF_STR( Flip_Screen ) ) PORT_DIPLOCATION("SW1:2")
PORT_DIPSETTING( 0x02, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_SERVICE_DIPLOC( 0x04, IP_ACTIVE_LOW, "SW1:3" )
PORT_DIPNAME( 0x08, 0x08, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW1:4")
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
PORT_DIPSETTING( 0x08, DEF_STR( On ) )
PORT_DIPNAME( 0x30, 0x30, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SW1:5,6")
PORT_DIPSETTING( 0x00, DEF_STR( 4C_1C ) ) PORT_CONDITION("DSW1", 0x01, EQUALS, 0x00)
PORT_DIPSETTING( 0x10, DEF_STR( 3C_1C ) ) PORT_CONDITION("DSW1", 0x01, EQUALS, 0x00)
PORT_DIPSETTING( 0x20, DEF_STR( 2C_1C ) ) PORT_CONDITION("DSW1", 0x01, EQUALS, 0x00)
PORT_DIPSETTING( 0x10, DEF_STR( 2C_1C ) ) PORT_CONDITION("DSW1", 0x01, EQUALS, 0x01)
PORT_DIPSETTING( 0x30, DEF_STR( 1C_1C ) )
PORT_DIPSETTING( 0x00, DEF_STR( 2C_3C ) ) PORT_CONDITION("DSW1", 0x01, EQUALS, 0x01)
PORT_DIPSETTING( 0x20, DEF_STR( 1C_2C ) ) PORT_CONDITION("DSW1", 0x01, EQUALS, 0x01)
PORT_DIPNAME( 0xc0, 0xc0, DEF_STR( Coin_B ) ) PORT_DIPLOCATION("SW1:7,8")
PORT_DIPSETTING( 0x40, DEF_STR( 2C_1C ) ) PORT_CONDITION("DSW1", 0x01, EQUALS, 0x01)
PORT_DIPSETTING( 0xc0, DEF_STR( 1C_1C ) ) PORT_CONDITION("DSW1", 0x01, EQUALS, 0x01)
PORT_DIPSETTING( 0x00, DEF_STR( 2C_3C ) ) PORT_CONDITION("DSW1", 0x01, EQUALS, 0x01)
PORT_DIPSETTING( 0x80, DEF_STR( 1C_2C ) ) PORT_CONDITION("DSW1", 0x01, EQUALS, 0x01)
PORT_DIPSETTING( 0xc0, DEF_STR( 1C_2C ) ) PORT_CONDITION("DSW1", 0x01, EQUALS, 0x00)
PORT_DIPSETTING( 0x80, DEF_STR( 1C_3C ) ) PORT_CONDITION("DSW1", 0x01, EQUALS, 0x00)
PORT_DIPSETTING( 0x40, DEF_STR( 1C_4C ) ) PORT_CONDITION("DSW1", 0x01, EQUALS, 0x00)
PORT_DIPSETTING( 0x00, DEF_STR( 1C_6C ) ) PORT_CONDITION("DSW1", 0x01, EQUALS, 0x00)
PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY
PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY
PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY
PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY
PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON1 )
PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON2 )
PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON3 )
PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_UNKNOWN ) /* Must be low or game stops! */
/* probably VBlank */
PORT_START("DSW2") /* 500003 */
PORT_DIPNAME( 0x03, 0x03, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SW2:1,2")
PORT_DIPSETTING( 0x02, DEF_STR( Easy ) )
PORT_DIPSETTING( 0x03, DEF_STR( Normal ) )
PORT_DIPSETTING( 0x01, DEF_STR( Hard ) )
PORT_DIPSETTING( 0x00, DEF_STR( Hardest ) )
PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION("SW2:3,4")
PORT_DIPSETTING( 0x04, "100k and every 200k" )
PORT_DIPSETTING( 0x0c, "100k Only" )
PORT_DIPSETTING( 0x08, "200k Only" )
PORT_DIPSETTING( 0x00, DEF_STR( None ) )
PORT_DIPNAME( 0x30, 0x30, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW2:5,6")
PORT_DIPSETTING( 0x20, "1" )
PORT_DIPSETTING( 0x00, "2" )
PORT_DIPSETTING( 0x30, "3" )
PORT_DIPSETTING( 0x10, "4" )
PORT_DIPNAME( 0x40, 0x40, "Invulnerability" ) PORT_DIPLOCATION("SW2:7")
PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x80, 0x80, DEF_STR( Allow_Continue ) ) PORT_DIPLOCATION("SW2:8") /* Listed as "NOT USE" in the manual */
PORT_DIPSETTING( 0x00, DEF_STR( No ) )
PORT_DIPSETTING( 0x80, DEF_STR( Yes ) )
PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2)
PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2)
PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2)
PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2)
PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2)
PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2)
PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2)
PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_UNKNOWN )
PORT_START("SYSTEM") /* 500005 */
PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_START1 )
PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_START2 )
PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_COIN2 )
PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_TILT )
PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_COIN3 )
PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN )
INPUT_PORTS_END
static INPUT_PORTS_START( snowbroj )
PORT_INCLUDE(snowbros)
PORT_MODIFY("DSW1")
PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:1") /* Listed as "NOT USE" in the manual */
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
PORT_DIPSETTING( 0x01, DEF_STR( On ) )
INPUT_PORTS_END
static INPUT_PORTS_START( ballboy3p )
PORT_INCLUDE(snowbros)
PORT_MODIFY("DSW1") // on the PCB in place of the dips there's the plug for the controls of the 3rd player
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(3)
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(3)
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(3)
PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(3)
PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(3)
PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(3)
PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(3)
PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_UNKNOWN )
PORT_MODIFY("SYSTEM")
PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_START3 )
INPUT_PORTS_END
static INPUT_PORTS_START( honeydol )
PORT_START("DSW1")
PORT_DIPNAME( 0x0003, 0x0003, DEF_STR( Coinage ) )
PORT_DIPSETTING( 0x0000, DEF_STR( 3C_1C ) )
PORT_DIPSETTING( 0x0001, DEF_STR( 2C_1C ) )
PORT_DIPSETTING( 0x0003, DEF_STR( 1C_1C ) )
PORT_DIPSETTING( 0x0002, DEF_STR( 1C_2C ) )
PORT_DIPNAME( 0x0004, 0x0004, "Show Girls" )
PORT_DIPSETTING( 0x0000, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0004, DEF_STR( On ) )
PORT_DIPNAME( 0x0008, 0x0008, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x0008, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
PORT_DIPNAME( 0x0010, 0x0010, DEF_STR( Demo_Sounds ) )
PORT_DIPSETTING( 0x0000, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0010, DEF_STR( On ) )
PORT_DIPNAME( 0x0020, 0x0020, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x0020, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
PORT_DIPNAME( 0x0040, 0x0040, DEF_STR( Level_Select ) ) /* Up & Down to set level, then punch to start */
PORT_DIPSETTING( 0x0040, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
PORT_DIPNAME( 0x0080, 0x0080, "Slide Show On Boot-up" ) /* Joystick to scroll. Seems to happen once at boot up, then the game auto starts */
PORT_DIPSETTING( 0x0080, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY
PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY
PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY
PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY
PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON1 )
PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON2 )
PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON3 )
PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") /* Must be low or game stops! */
PORT_START("DSW2")
PORT_DIPNAME( 0x0003, 0x0003, DEF_STR( Difficulty ) )
PORT_DIPSETTING( 0x0003, DEF_STR( Normal ) )
PORT_DIPSETTING( 0x0002, DEF_STR( Hard ) )
PORT_DIPSETTING( 0x0001, DEF_STR( Harder ) )
PORT_DIPSETTING( 0x0000, DEF_STR( Hardest ) )
PORT_DIPNAME( 0x000c, 0x000c, "Timer Speed" ) /* Based on Normal Difficulty, Stage 1-1 first try */
PORT_DIPSETTING( 0x000c, DEF_STR( Normal ) ) /* About 40 Seconds */
PORT_DIPSETTING( 0x0008, "Fast" ) /* About 35 Seconds */
PORT_DIPSETTING( 0x0004, "Faster" ) /* About 30 Seconds */
PORT_DIPSETTING( 0x0000, "Fastest" ) /* About 20 Seconds */
PORT_DIPNAME( 0x0030, 0x0020, DEF_STR( Lives ) )
PORT_DIPSETTING( 0x0000, "1" )
PORT_DIPSETTING( 0x0010, "2" )
PORT_DIPSETTING( 0x0020, "3" )
PORT_DIPSETTING( 0x0030, "5" )
PORT_DIPNAME( 0x0040, 0x0040, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x0040, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
PORT_DIPNAME( 0x0080, 0x0080, "Max Vs Round" )
PORT_DIPSETTING( 0x0080, "3" ) /* 44 Seconds each */
PORT_DIPSETTING( 0x0000, "1" ) /* 89 Seconds */
PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2)
PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2)
PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2)
PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2)
PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2)
PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2)
PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2)
PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_UNKNOWN )
PORT_START("SYSTEM")
PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_START1 )
PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_START2 )
PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_COIN2 )
PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_TILT )
PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_COIN3 )
PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN )
INPUT_PORTS_END
static INPUT_PORTS_START( twinadv )
PORT_START("DSW1")
PORT_DIPNAME( 0x0003, 0x0003, DEF_STR( Coinage ) )
PORT_DIPSETTING( 0x0000, DEF_STR( 3C_1C ) )
PORT_DIPSETTING( 0x0001, DEF_STR( 2C_1C ) )
PORT_DIPSETTING( 0x0003, DEF_STR( 1C_1C ) )
PORT_DIPSETTING( 0x0002, DEF_STR( 1C_2C ) )
PORT_DIPNAME( 0x0004, 0x0004, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x0004, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
PORT_DIPNAME( 0x0008, 0x0008, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x0008, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
PORT_DIPNAME( 0x0010, 0x0010, DEF_STR( Demo_Sounds ) )
PORT_DIPSETTING( 0x0000, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0010, DEF_STR( On ) )
PORT_DIPNAME( 0x0020, 0x0020, DEF_STR( Flip_Screen ) )
PORT_DIPSETTING( 0x0020, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
PORT_DIPNAME( 0x0040, 0x0040, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x0040, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
PORT_DIPNAME( 0x0080, 0x0080, DEF_STR( Level_Select ) ) /* P1 Button 2 to advance, P1 Button 1 to start, starts game with 10 credits */
PORT_DIPSETTING( 0x0080, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY
PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY
PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY
PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY
PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON1 )
PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON2 )
PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON3 )
PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") /* Must be low or game stops! */
PORT_START("DSW2")
PORT_DIPNAME( 0x0003, 0x0003, DEF_STR( Difficulty ) )
PORT_DIPSETTING( 0x0003, DEF_STR( Normal ) )
PORT_DIPSETTING( 0x0002, DEF_STR( Hard ) )
PORT_DIPSETTING( 0x0001, DEF_STR( Harder ) )
PORT_DIPSETTING( 0x0000, DEF_STR( Hardest ) )
PORT_DIPNAME( 0x0004, 0x0004, DEF_STR( Lives ) )
PORT_DIPSETTING( 0x0004, "3" )
PORT_DIPSETTING( 0x0000, "5" )
PORT_DIPNAME( 0x0008, 0x0008, "Ticket Mode #1" ) /* Shows on title screen "EVERY 4 GAMES = 1 TICKET" same as 0x0040 below? */
PORT_DIPSETTING( 0x0008, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
PORT_DIPNAME( 0x0010, 0x0010, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x0010, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
PORT_DIPNAME( 0x0020, 0x0020, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x0020, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
PORT_DIPNAME( 0x0040, 0x0040, "Ticket Mode #2" ) /* Shows on title screen "EVERY 4 GAMES = 1 TICKET" same as 0x0008 above? */
PORT_DIPSETTING( 0x0040, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
PORT_DIPNAME( 0x80, 0x0080, DEF_STR( Free_Play ) ) /* Always shows 24 credits */
PORT_DIPSETTING( 0x0080, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2)
PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2)
PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2)
PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2)
PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2)
PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2)
PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2)
PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_UNKNOWN )
PORT_START("SYSTEM")
PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_START1 )
PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_START2 )
PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_COIN2 )
PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_TILT )
PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_COIN3 )
PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN )
INPUT_PORTS_END
static INPUT_PORTS_START( 4in1boot )
PORT_START("DSW1") /* 500001 */
PORT_DIPNAME( 0x01, 0x00, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW1:1")
PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x06, 0x06, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SW1:2,3")
PORT_DIPSETTING( 0x04, DEF_STR( Easy ) )
PORT_DIPSETTING( 0x06, DEF_STR( Normal ) )
PORT_DIPSETTING( 0x02, DEF_STR( Hard ) )
PORT_DIPSETTING( 0x00, DEF_STR( Hardest ) )
PORT_DIPNAME( 0x78, 0x78, DEF_STR( Coinage ) ) PORT_DIPLOCATION("SW1:4,5,6,7")
PORT_DIPSETTING( 0x18, DEF_STR( 4C_1C ) )
PORT_DIPSETTING( 0x38, DEF_STR( 3C_1C ) )
PORT_DIPSETTING( 0x10, DEF_STR( 4C_2C ) )
PORT_DIPSETTING( 0x58, DEF_STR( 2C_1C ) )
PORT_DIPSETTING( 0x30, DEF_STR( 3C_2C ) )
PORT_DIPSETTING( 0x08, DEF_STR( 4C_3C ) )
PORT_DIPSETTING( 0x00, DEF_STR( 4C_4C ) )
PORT_DIPSETTING( 0x28, DEF_STR( 3C_3C ) )
PORT_DIPSETTING( 0x50, DEF_STR( 2C_2C ) )
PORT_DIPSETTING( 0x78, DEF_STR( 1C_1C ) )
PORT_DIPSETTING( 0x20, DEF_STR( 3C_4C ) )
PORT_DIPSETTING( 0x48, DEF_STR( 2C_3C ) )
PORT_DIPSETTING( 0x40, DEF_STR( 2C_4C ) )
PORT_DIPSETTING( 0x70, DEF_STR( 1C_2C ) )
PORT_DIPSETTING( 0x68, DEF_STR( 1C_3C ) )
PORT_DIPSETTING( 0x60, DEF_STR( 1C_4C ) )
PORT_DIPNAME( 0x80, 0x80, DEF_STR( Free_Play ) ) PORT_DIPLOCATION("SW1:8")
PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY
PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY
PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY
PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY
PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON1 )
PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON2 )
PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON3 )
PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_UNKNOWN ) /* Must be low or game stops! */
/* probably VBlank */
PORT_START("DSW2") /* 500003 */
PORT_DIPNAME( 0x03, 0x03, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW2:1,2")
PORT_DIPSETTING( 0x02, "1" )
PORT_DIPSETTING( 0x00, "2" )
PORT_DIPSETTING( 0x03, "3" )
PORT_DIPSETTING( 0x01, "4" )
PORT_DIPUNUSED_DIPLOC( 0x0004, 0x0000, "SW2:3" )
PORT_DIPUNUSED_DIPLOC( 0x0008, 0x0000, "SW2:4" )
PORT_DIPUNUSED_DIPLOC( 0x0010, 0x0000, "SW2:5" )
PORT_DIPUNUSED_DIPLOC( 0x0020, 0x0000, "SW2:6" )
PORT_DIPUNUSED_DIPLOC( 0x0040, 0x0000, "SW2:7" )
PORT_SERVICE_DIPLOC( 0x0080, IP_ACTIVE_LOW, "SW2:8" )
PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2)
PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2)
PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2)
PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2)
PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2)
PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2)
PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2)
PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_UNKNOWN )
PORT_START("SYSTEM") /* 500005 */
PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_START1 )
PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_START2 )
PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_COIN2 )
PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_TILT )
PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_COIN3 )
PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN )
INPUT_PORTS_END
static INPUT_PORTS_START( hyperpac )
PORT_START("DSW1") /* 500000.w */
PORT_DIPNAME( 0x0001, 0x0000, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW1:1")
PORT_DIPSETTING( 0x0001, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
PORT_DIPNAME( 0x0002, 0x0002, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW1:2") // "Language" in the "test mode"
PORT_DIPSETTING( 0x0002, "3" ) // "Korean"
PORT_DIPSETTING( 0x0000, "5" ) // "English"
PORT_DIPNAME( 0x001c, 0x001c, DEF_STR( Coinage ) ) PORT_DIPLOCATION("SW1:3,4,5")
PORT_DIPSETTING( 0x0000, DEF_STR( 5C_1C ) )
PORT_DIPSETTING( 0x0004, DEF_STR( 4C_1C ) )
PORT_DIPSETTING( 0x0008, DEF_STR( 3C_1C ) )
PORT_DIPSETTING( 0x000c, DEF_STR( 2C_1C ) )
PORT_DIPSETTING( 0x001c, DEF_STR( 1C_1C ) )
PORT_DIPSETTING( 0x0014, DEF_STR( 2C_3C ) )
PORT_DIPSETTING( 0x0018, DEF_STR( 1C_2C ) )
PORT_DIPSETTING( 0x0010, DEF_STR( 1C_3C ) )
PORT_DIPNAME( 0x0060, 0x0060, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SW1:6,7")
PORT_DIPSETTING( 0x0000, DEF_STR( Easy ) )
PORT_DIPSETTING( 0x0060, DEF_STR( Normal ) )
PORT_DIPSETTING( 0x0040, DEF_STR( Hard ) )
PORT_DIPSETTING( 0x0020, DEF_STR( Hardest ) ) // DEF_STR( Very_Hard )
PORT_SERVICE_DIPLOC( 0x0080, IP_ACTIVE_LOW, "SW1:8" )
PORT_BIT( 0x0100, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1)
PORT_BIT( 0x0200, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1)
PORT_BIT( 0x0400, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1)
PORT_BIT( 0x0800, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1)
PORT_BIT( 0x1000, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(1) // jump
PORT_BIT( 0x2000, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_PLAYER(1) // fire
PORT_BIT( 0x4000, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_PLAYER(1) // test mode only?
PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_UNKNOWN )
PORT_START("DSW2") /* 500002.w */
PORT_DIPUNUSED_DIPLOC( 0x0001, 0x0000, "SW2:1" )
PORT_DIPUNUSED_DIPLOC( 0x0002, 0x0000, "SW2:2" )
PORT_DIPUNUSED_DIPLOC( 0x0004, 0x0000, "SW2:3" )
PORT_DIPUNUSED_DIPLOC( 0x0008, 0x0000, "SW2:4" )
PORT_DIPUNUSED_DIPLOC( 0x0010, 0x0000, "SW2:5" )
PORT_DIPUNUSED_DIPLOC( 0x0020, 0x0000, "SW2:6" )
PORT_DIPUNUSED_DIPLOC( 0x0040, 0x0000, "SW2:7" )
PORT_DIPUNUSED_DIPLOC( 0x0080, 0x0000, "SW2:8" )
PORT_BIT( 0x0100, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2)
PORT_BIT( 0x0200, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2)
PORT_BIT( 0x0400, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2)
PORT_BIT( 0x0800, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2)
PORT_BIT( 0x1000, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(2) // jump
PORT_BIT( 0x2000, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_PLAYER(2) // fire
PORT_BIT( 0x4000, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_PLAYER(2) // test mode only?
PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_UNKNOWN )
PORT_START("SYSTEM") /* 500004.w */
PORT_BIT( 0x0100, IP_ACTIVE_HIGH, IPT_START1 )
PORT_BIT( 0x0200, IP_ACTIVE_HIGH, IPT_START2 )
PORT_BIT( 0x0400, IP_ACTIVE_HIGH, IPT_COIN1 )
PORT_BIT( 0x0800, IP_ACTIVE_HIGH, IPT_COIN2 )
PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN )
INPUT_PORTS_END
static INPUT_PORTS_START( cookbib2 )
PORT_START("DSW1") /* 500000.w */
PORT_DIPNAME( 0x0001, 0x0000, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW1:1")
PORT_DIPSETTING( 0x0001, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
PORT_DIPNAME( 0x0002, 0x0002, "Max Vs Round" ) PORT_DIPLOCATION("SW1:2") // "Language" in the "test mode"
PORT_DIPSETTING( 0x0002, "3" )
PORT_DIPSETTING( 0x0000, "1" )
PORT_DIPNAME( 0x001c, 0x001c, DEF_STR( Coinage ) ) PORT_DIPLOCATION("SW1:3,4,5")
PORT_DIPSETTING( 0x0000, DEF_STR( 5C_1C ) )
PORT_DIPSETTING( 0x0004, DEF_STR( 4C_1C ) )
PORT_DIPSETTING( 0x0008, DEF_STR( 3C_1C ) )
PORT_DIPSETTING( 0x000c, DEF_STR( 2C_1C ) )
PORT_DIPSETTING( 0x001c, DEF_STR( 1C_1C ) )
PORT_DIPSETTING( 0x0014, DEF_STR( 2C_3C ) )
PORT_DIPSETTING( 0x0018, DEF_STR( 1C_2C ) )
PORT_DIPSETTING( 0x0010, DEF_STR( 1C_3C ) )
PORT_DIPNAME( 0x0060, 0x0060, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SW1:6,7")
PORT_DIPSETTING( 0x0000, DEF_STR( Easy ) )
PORT_DIPSETTING( 0x0060, DEF_STR( Normal ) )
PORT_DIPSETTING( 0x0040, DEF_STR( Hard ) )
PORT_DIPSETTING( 0x0020, DEF_STR( Hardest ) ) // DEF_STR( Very_Hard )
PORT_SERVICE_DIPLOC( 0x0080, IP_ACTIVE_LOW, "SW1:8" )
PORT_BIT( 0x0100, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1)
PORT_BIT( 0x0200, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1)
PORT_BIT( 0x0400, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1)
PORT_BIT( 0x0800, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1)
PORT_BIT( 0x1000, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(1) // jump
PORT_BIT( 0x2000, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_PLAYER(1) // fire
PORT_BIT( 0x4000, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_PLAYER(1) // test mode only?