@@ -213,12 +213,7 @@ void m62_state::battroad_map(address_map &map)
213
213
214
214
void m62_state::battroad_io_map (address_map &map)
215
215
{
216
- map.global_mask (0xff );
217
- map (0x00 , 0x00 ).portr (" SYSTEM" ).w (m_audio, FUNC (irem_audio_device::cmd_w));
218
- map (0x01 , 0x01 ).portr (" P1" ).w (FUNC (m62_state::m62_flipscreen_w)); /* + coin counters */
219
- map (0x02 , 0x02 ).portr (" P2" );
220
- map (0x03 , 0x03 ).portr (" DSW1" );
221
- map (0x04 , 0x04 ).portr (" DSW2" );
216
+ kungfum_io_map (map);
222
217
map (0x80 , 0x80 ).w (FUNC (m62_state::m62_vscroll_low_w));
223
218
map (0x81 , 0x81 ).w (FUNC (m62_state::m62_hscroll_high_w));
224
219
map (0x82 , 0x82 ).w (FUNC (m62_state::m62_hscroll_low_w));
@@ -244,12 +239,7 @@ void m62_state::ldrun2_map(address_map &map)
244
239
245
240
void m62_state::ldrun2_io_map (address_map &map)
246
241
{
247
- map.global_mask (0xff );
248
- map (0x00 , 0x00 ).portr (" SYSTEM" ).w (m_audio, FUNC (irem_audio_device::cmd_w));
249
- map (0x01 , 0x01 ).portr (" P1" ).w (FUNC (m62_state::m62_flipscreen_w)); /* + coin counters */
250
- map (0x02 , 0x02 ).portr (" P2" );
251
- map (0x03 , 0x03 ).portr (" DSW1" );
252
- map (0x04 , 0x04 ).portr (" DSW2" );
242
+ kungfum_io_map (map);
253
243
map (0x80 , 0x80 ).r (FUNC (m62_state::ldrun2_bankswitch_r));
254
244
map (0x80 , 0x81 ).w (FUNC (m62_state::ldrun2_bankswitch_w));
255
245
}
@@ -267,12 +257,7 @@ void m62_state::ldrun3_map(address_map &map)
267
257
268
258
void m62_state::ldrun3_io_map (address_map &map)
269
259
{
270
- map.global_mask (0xff );
271
- map (0x00 , 0x00 ).portr (" SYSTEM" ).w (m_audio, FUNC (irem_audio_device::cmd_w));
272
- map (0x01 , 0x01 ).portr (" P1" ).w (FUNC (m62_state::m62_flipscreen_w)); /* + coin counters */
273
- map (0x02 , 0x02 ).portr (" P2" );
274
- map (0x03 , 0x03 ).portr (" DSW1" );
275
- map (0x04 , 0x04 ).portr (" DSW2" );
260
+ kungfum_io_map (map);
276
261
map (0x80 , 0x80 ).w (FUNC (m62_state::m62_vscroll_low_w));
277
262
map (0x81 , 0x81 ).w (FUNC (m62_state::ldrun3_topbottom_mask_w));
278
263
}
@@ -289,12 +274,7 @@ void m62_state::ldrun4_map(address_map &map)
289
274
290
275
void m62_state::ldrun4_io_map (address_map &map)
291
276
{
292
- map.global_mask (0xff );
293
- map (0x00 , 0x00 ).portr (" SYSTEM" ).w (m_audio, FUNC (irem_audio_device::cmd_w));
294
- map (0x01 , 0x01 ).portr (" P1" ).w (FUNC (m62_state::m62_flipscreen_w)); /* + coin counters */
295
- map (0x02 , 0x02 ).portr (" P2" );
296
- map (0x03 , 0x03 ).portr (" DSW1" );
297
- map (0x04 , 0x04 ).portr (" DSW2" );
277
+ kungfum_io_map (map);
298
278
map (0x82 , 0x82 ).w (FUNC (m62_state::m62_hscroll_high_w));
299
279
map (0x83 , 0x83 ).w (FUNC (m62_state::m62_hscroll_low_w));
300
280
}
@@ -320,12 +300,7 @@ void m62_state::kidniki_map(address_map &map)
320
300
321
301
void m62_state::kidniki_io_map (address_map &map)
322
302
{
323
- map.global_mask (0xff );
324
- map (0x00 , 0x00 ).portr (" SYSTEM" ).w (m_audio, FUNC (irem_audio_device::cmd_w));
325
- map (0x01 , 0x01 ).portr (" P1" ).w (FUNC (m62_state::m62_flipscreen_w)); /* + coin counters */
326
- map (0x02 , 0x02 ).portr (" P2" );
327
- map (0x03 , 0x03 ).portr (" DSW1" );
328
- map (0x04 , 0x04 ).portr (" DSW2" );
303
+ kungfum_io_map (map);
329
304
map (0x80 , 0x80 ).w (FUNC (m62_state::m62_hscroll_low_w));
330
305
map (0x81 , 0x81 ).w (FUNC (m62_state::m62_hscroll_high_w));
331
306
map (0x82 , 0x82 ).w (FUNC (m62_state::kidniki_text_vscroll_low_w));
@@ -377,12 +352,7 @@ void m62_state::youjyudn_map(address_map &map)
377
352
378
353
void m62_state::youjyudn_io_map (address_map &map)
379
354
{
380
- map.global_mask (0xff );
381
- map (0x00 , 0x00 ).portr (" SYSTEM" ).w (m_audio, FUNC (irem_audio_device::cmd_w));
382
- map (0x01 , 0x01 ).portr (" P1" ).w (FUNC (m62_state::m62_flipscreen_w)); /* + coin counters */
383
- map (0x02 , 0x02 ).portr (" P2" );
384
- map (0x03 , 0x03 ).portr (" DSW1" );
385
- map (0x04 , 0x04 ).portr (" DSW2" );
355
+ kungfum_io_map (map);
386
356
map (0x80 , 0x80 ).w (FUNC (m62_state::m62_hscroll_high_w));
387
357
map (0x81 , 0x81 ).w (FUNC (m62_state::m62_hscroll_low_w));
388
358
map (0x83 , 0x83 ).w (FUNC (m62_state::youjyudn_bankswitch_w));
@@ -398,7 +368,7 @@ void m62_state::horizon_map(address_map &map)
398
368
}
399
369
400
370
401
- static INPUT_PORTS_START ( common )
371
+ INPUT_PORTS_START ( m62_common )
402
372
PORT_START(" SYSTEM" )
403
373
/* Start 1 & 2 also restarts and freezes the game with stop mode on
404
374
and are used in test mode to enter and esc the various tests */
@@ -448,8 +418,8 @@ static INPUT_PORTS_START( common )
448
418
INPUT_PORTS_END
449
419
450
420
451
- static INPUT_PORTS_START( kungfum )
452
- PORT_INCLUDE( common )
421
+ INPUT_PORTS_START( kungfum )
422
+ PORT_INCLUDE( m62_common )
453
423
454
424
PORT_MODIFY(" DSW2" )
455
425
/* In slowmo mode, press 2 to slow game speed */
@@ -483,7 +453,7 @@ static INPUT_PORTS_START( kungfum )
483
453
INPUT_PORTS_END
484
454
485
455
static INPUT_PORTS_START( battroad )
486
- PORT_INCLUDE( common )
456
+ PORT_INCLUDE( m62_common )
487
457
488
458
PORT_MODIFY(" DSW2" )
489
459
PORT_DIPUNKNOWN_DIPLOC( 0x08 , 0x08 , " SW2:4" )
@@ -509,7 +479,7 @@ static INPUT_PORTS_START( battroad )
509
479
INPUT_PORTS_END
510
480
511
481
static INPUT_PORTS_START( ldrun )
512
- PORT_INCLUDE( common )
482
+ PORT_INCLUDE( m62_common )
513
483
514
484
PORT_MODIFY(" DSW2" )
515
485
PORT_DIPUNKNOWN_DIPLOC( 0x08 , 0x08 , " SW2:4" )
@@ -537,7 +507,7 @@ static INPUT_PORTS_START( ldrun )
537
507
INPUT_PORTS_END
538
508
539
509
static INPUT_PORTS_START( ldrun2 )
540
- PORT_INCLUDE( common )
510
+ PORT_INCLUDE( m62_common )
541
511
542
512
PORT_MODIFY(" DSW2" )
543
513
PORT_DIPUNKNOWN_DIPLOC( 0x08 , 0x08 , " SW2:4" )
@@ -566,7 +536,7 @@ static INPUT_PORTS_START( ldrun2 )
566
536
INPUT_PORTS_END
567
537
568
538
static INPUT_PORTS_START( ldrun3 )
569
- PORT_INCLUDE( common )
539
+ PORT_INCLUDE( m62_common )
570
540
571
541
PORT_MODIFY(" DSW2" )
572
542
PORT_DIPUNKNOWN_DIPLOC( 0x08 , 0x08 , " SW2:4" )
@@ -595,7 +565,7 @@ static INPUT_PORTS_START( ldrun3 )
595
565
INPUT_PORTS_END
596
566
597
567
static INPUT_PORTS_START( ldrun4 )
598
- PORT_INCLUDE( common )
568
+ PORT_INCLUDE( m62_common )
599
569
600
570
PORT_MODIFY(" DSW2" )
601
571
PORT_DIPNAME( 0x02 , 0x02 , " 2 Players Lives" ) PORT_DIPLOCATION(" SW2:2" )
@@ -629,7 +599,7 @@ static INPUT_PORTS_START( ldrun4 )
629
599
INPUT_PORTS_END
630
600
631
601
static INPUT_PORTS_START( lotlot )
632
- PORT_INCLUDE( common )
602
+ PORT_INCLUDE( m62_common )
633
603
634
604
PORT_MODIFY(" DSW2" )
635
605
PORT_DIPNAME( 0x08 , 0x00 , DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION(" SW2:4" )
@@ -656,7 +626,7 @@ static INPUT_PORTS_START( lotlot )
656
626
INPUT_PORTS_END
657
627
658
628
static INPUT_PORTS_START( kidniki )
659
- PORT_INCLUDE( common )
629
+ PORT_INCLUDE( m62_common )
660
630
661
631
PORT_MODIFY(" DSW2" )
662
632
PORT_DIPNAME( 0x08 , 0x08 , " Game Repeats" ) PORT_DIPLOCATION(" SW2:4" )
@@ -686,7 +656,7 @@ static INPUT_PORTS_START( kidniki )
686
656
INPUT_PORTS_END
687
657
688
658
static INPUT_PORTS_START( spelunkr )
689
- PORT_INCLUDE( common )
659
+ PORT_INCLUDE( m62_common )
690
660
691
661
PORT_MODIFY(" DSW2" )
692
662
PORT_DIPNAME( 0x08 , 0x00 , DEF_STR( Allow_Continue ) ) PORT_DIPLOCATION(" SW2:4" )
@@ -716,7 +686,7 @@ static INPUT_PORTS_START( spelunkr )
716
686
INPUT_PORTS_END
717
687
718
688
static INPUT_PORTS_START( spelunk2 )
719
- PORT_INCLUDE( common )
689
+ PORT_INCLUDE( m62_common )
720
690
721
691
/* Factory shipment setting is all OFF */
722
692
PORT_MODIFY(" DSW2" )
@@ -746,7 +716,7 @@ static INPUT_PORTS_START( spelunk2 )
746
716
INPUT_PORTS_END
747
717
748
718
static INPUT_PORTS_START( youjyudn )
749
- PORT_INCLUDE( common )
719
+ PORT_INCLUDE( m62_common )
750
720
751
721
PORT_MODIFY(" DSW2" )
752
722
PORT_DIPNAME( 0x08 , 0x08 , DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION(" SW2:4" )
@@ -772,7 +742,7 @@ static INPUT_PORTS_START( youjyudn )
772
742
INPUT_PORTS_END
773
743
774
744
static INPUT_PORTS_START( horizon )
775
- PORT_INCLUDE( common )
745
+ PORT_INCLUDE( m62_common )
776
746
777
747
PORT_MODIFY(" DSW2" )
778
748
/* In freeze mode, press 2 to stop and 1 to restart */
0 commit comments