@@ -512,6 +512,7 @@ class cmaster_state : public goldstar_state
512
512
void coincount_w(uint8_t data);
513
513
void pkm_out0_w(uint8_t data);
514
514
void jkm_vid_reg_w(uint8_t data);
515
+ void ll3_vid_reg_w(uint8_t data);
515
516
516
517
uint32_t screen_update_amcoe1a(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
517
518
uint32_t screen_update_cmast91(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
@@ -539,6 +540,7 @@ class cmaster_state : public goldstar_state
539
540
void jkrmast_map(address_map &map) ATTR_COLD;
540
541
void jkrmast_portmap(address_map &map) ATTR_COLD;
541
542
void ll3_map(address_map &map) ATTR_COLD;
543
+ void ll3_portmap(address_map &map) ATTR_COLD;
542
544
void nfm_map(address_map &map) ATTR_COLD;
543
545
void nfm_portmap(address_map &map) ATTR_COLD;
544
546
void pkrmast_portmap(address_map &map) ATTR_COLD;
@@ -2559,6 +2561,29 @@ void cmaster_state::pkm_out0_w(uint8_t data)
2559
2561
void cmaster_state::jkm_vid_reg_w(uint8_t data)
2560
2562
{
2561
2563
m_enable_reg = bitswap<8>(data, 7, 6, 5, 4, 2, 3, 1, 0);
2564
+ // popmessage("outport data:%02x", m_enable_reg );
2565
+
2566
+ }
2567
+
2568
+ void cmaster_state::ll3_vid_reg_w(uint8_t data)
2569
+ {
2570
+ /*
2571
+ ---- ---x global enable
2572
+ ---- --x- fg enable
2573
+ ---- -x-- girl enable
2574
+ ---- x--- reels enable
2575
+ ---x --- bg enable
2576
+ xxx- ---- unused
2577
+
2578
+ All the writes have masked the register, getting
2579
+ the video totally disabled. Surely for protection.
2580
+
2581
+ */
2582
+ if(data > 0)
2583
+ data = data + 0x01;
2584
+ m_enable_reg = data;
2585
+
2586
+ // popmessage("outport data:%02x", m_enable_reg );
2562
2587
}
2563
2588
2564
2589
@@ -2751,6 +2776,20 @@ void cmaster_state::jkrmast_portmap(address_map &map)
2751
2776
map(0x18, 0x18).w(FUNC(cmaster_state::jkm_vid_reg_w)); // enable reg?
2752
2777
}
2753
2778
2779
+ void cmaster_state::ll3_portmap(address_map &map)
2780
+ {
2781
+ map.global_mask(0xff);
2782
+ map(0x01, 0x01).r("aysnd", FUNC(ay8910_device::data_r));
2783
+ map(0x02, 0x03).w("aysnd", FUNC(ay8910_device::data_address_w));
2784
+ map(0x04, 0x07).rw("ppi8255_0", FUNC(i8255_device::read), FUNC(i8255_device::write)); // Inputs
2785
+ map(0x08, 0x0b).rw("ppi8255_1", FUNC(i8255_device::read), FUNC(i8255_device::write)); // DIP switches
2786
+ map(0x10, 0x10).w(FUNC(cmaster_state::ll3_vid_reg_w));
2787
+ map(0x11, 0x11).w(FUNC(cmaster_state::coincount_w));
2788
+ map(0x12, 0x12).w(FUNC(cmaster_state::p1_lamps_w));
2789
+ map(0x13, 0x13).w(FUNC(cmaster_state::background_col_w));
2790
+ map(0x14, 0x14).w(FUNC(cmaster_state::girl_scroll_w));
2791
+ }
2792
+
2754
2793
void cmaster_state::eldoraddoa_portmap(address_map &map) // TODO: incomplete!
2755
2794
{
2756
2795
map.global_mask(0xff);
@@ -4027,17 +4066,17 @@ static INPUT_PORTS_START( ll3 )
4027
4066
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_GAMBLE_HIGH ) PORT_CODE(KEYCODE_B) PORT_NAME("Big")
4028
4067
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
4029
4068
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_GAMBLE_TAKE ) PORT_CODE(KEYCODE_X) PORT_NAME("Take")
4030
- PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_GAMBLE_BET ) PORT_CODE(KEYCODE_Z) PORT_CODE(KEYCODE_C) PORT_NAME("Bet / D-UP")
4069
+ PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_GAMBLE_BET ) PORT_CODE(KEYCODE_Z) PORT_CODE(KEYCODE_C) PORT_NAME("Bet / D-UP") // mapped also in C for compatibility
4031
4070
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_GAMBLE_LOW ) PORT_CODE(KEYCODE_V) PORT_NAME("Small / Info")
4032
4071
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START1 ) PORT_CODE(KEYCODE_N) PORT_NAME("Start")
4033
4072
4034
4073
PORT_START("IN1")
4035
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SLOT_STOP2 ) PORT_CODE(KEYCODE_K) PORT_CODE(KEYCODE_2_PAD) // Stop B
4036
- PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SLOT_STOP1 ) PORT_CODE(KEYCODE_J) PORT_CODE(KEYCODE_1_PAD) // Stop A
4037
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_IMPULSE(2 ) PORT_NAME("Coin B")
4038
- PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SLOT_STOP3 ) PORT_CODE(KEYCODE_L) PORT_CODE(KEYCODE_3_PAD) // Stop C
4039
- PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_COIN4 ) PORT_IMPULSE(2) PORT_NAME("Coin D")
4040
- PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN3 ) PORT_IMPULSE(2) PORT_NAME("Coin C")
4074
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SLOT_STOP2 ) PORT_CODE(KEYCODE_K) PORT_CODE(KEYCODE_2_PAD) PORT_NAME("Stop B / D-UP") // Stop B & D-UP
4075
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SLOT_STOP1 ) PORT_CODE(KEYCODE_J) PORT_CODE(KEYCODE_1_PAD) PORT_NAME("Stop A") // Stop A
4076
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SLOT_STOP_ALL ) PORT_CODE(KEYCODE_M) PORT_CODE(KEYCODE_0_PAD ) PORT_NAME("Stop All") // Stop All
4077
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SLOT_STOP3 ) PORT_CODE(KEYCODE_L) PORT_CODE(KEYCODE_3_PAD) PORT_NAME("Stop C") // Stop C
4078
+ PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_COIN4 ) PORT_IMPULSE(2) PORT_NAME("Coin D")
4079
+ PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN3 ) PORT_IMPULSE(2) PORT_NAME("Coin C")
4041
4080
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_GAMBLE_KEYIN )
4042
4081
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(2) PORT_NAME("Coin A")
4043
4082
@@ -12274,6 +12313,7 @@ void cmaster_state::ll3(machine_config &config)
12274
12313
cm(config);
12275
12314
12276
12315
m_maincpu->set_addrmap(AS_PROGRAM, &cmaster_state::ll3_map);
12316
+ m_maincpu->set_addrmap(AS_IO, &cmaster_state::ll3_portmap);
12277
12317
}
12278
12318
12279
12319
@@ -25441,18 +25481,6 @@ void cmaster_state::init_ll3() // verified with ICE dump
25441
25481
rom[0x8a] = 0;
25442
25482
rom[0x8b] = 0;
25443
25483
rom[0x8c] = 0;
25444
-
25445
- /*
25446
- NOP'ing the writes to port 10h (video register)
25447
- all the writes have masked the bit1 ON, getting
25448
- the video totally disabled. Surely for protection.
25449
-
25450
- The most probably thing is that bit1 are inverted.
25451
- Need to be checked...
25452
-
25453
- */
25454
- rom[0x0b2c] = 0x00;
25455
- rom[0x0b2d] = 0x00;
25456
25484
}
25457
25485
25458
25486
void cmaster_state::init_ll3b() // verified with ICE dump
@@ -25468,18 +25496,6 @@ void cmaster_state::init_ll3b() // verified with ICE dump
25468
25496
rom[0x8a] = 0;
25469
25497
rom[0x8b] = 0;
25470
25498
rom[0x8c] = 0;
25471
-
25472
- /*
25473
- NOP'ing the writes to port 10h (video register)
25474
- all the writes have masked the bit1 ON, getting
25475
- the video totally disabled. Surely for protection.
25476
-
25477
- The most probably thing is that bit1 are inverted.
25478
- Need to be checked...
25479
-
25480
- */
25481
- rom[0x0b2c] = 0x00;
25482
- rom[0x0b2d] = 0x00;
25483
25499
}
25484
25500
25485
25501
0 commit comments