From 49156ba42ec95c753f7ed2161a521324eb2ec254 Mon Sep 17 00:00:00 2001 From: James Wallace Date: Thu, 17 Nov 2022 16:43:09 +0000 Subject: barcrest/mpu4.cpp: Add IC4 port B shadowing of serial and 50Hz signals. (#10426) Also Fixed AY8913 chip select routine that relied on the wrong PIA and improved save state support. Clones promoted to working -------------------------- The Crystal Maze (v1.3, Datapak) (MPU4 Video) The New Crystal Maze Featuring Ocean Zone (v2.2, Datapak) (MPU4 Video) The Crystal Maze Team Challenge (v0.9, Datapak) (MPU4 Video) --- src/mame/barcrest/mpu4.cpp | 223 ++++++++++++++++++--------- src/mame/barcrest/mpu4.h | 88 ++++++----- src/mame/barcrest/mpu4_characteriser_pal.cpp | 2 +- src/mame/barcrest/mpu4_characteriser_pal.h | 2 +- src/mame/barcrest/mpu4bwb.cpp | 1 + src/mame/barcrest/mpu4crystal.cpp | 1 + src/mame/barcrest/mpu4mod4yam.cpp | 1 + src/mame/barcrest/mpu4redpoint.cpp | 1 + src/mame/barcrest/mpu4vid.cpp | 24 ++- 9 files changed, 219 insertions(+), 124 deletions(-) diff --git a/src/mame/barcrest/mpu4.cpp b/src/mame/barcrest/mpu4.cpp index 93b52eacad5..5223d29b5e4 100644 --- a/src/mame/barcrest/mpu4.cpp +++ b/src/mame/barcrest/mpu4.cpp @@ -245,9 +245,9 @@ with settings like this in the majority of cases. 8 display enables (pins 10 - 17) */ -void mpu4_state::lamp_extend_small(int data) +void mpu4_state::lamp_extend_small(uint8_t data) { - int lamp_ext_data,column,i; + uint8_t lamp_ext_data,column,i; column = data & 0x07; lamp_ext_data = 0x1f - ((data & 0xf8) >> 3);//remove the mux lines from the data @@ -269,18 +269,18 @@ void mpu4_state::lamp_extend_small(int data) } } -void mpu4_state::lamp_extend_large(int data,int column,int active) +void mpu4_state::lamp_extend_large(uint8_t data,uint8_t column,bool active) { - m_lamp_sense = 0; - int bit7 = BIT(data, 7); + m_lamp_sense = false; + uint8_t bit7 = BIT(data, 7); if ( bit7 != m_last_b7 ) { - m_card_live = 1; + m_card_live = true; //depending on bit 7, we can access one of two 'blocks' of 64 lamps - int lampbase = bit7 ? 0 : 64; + uint8_t lampbase = bit7 ? 0 : 64; if ( data & 0x3f ) { - m_lamp_sense = 1; + m_lamp_sense = true; } if ( active ) { @@ -298,13 +298,13 @@ void mpu4_state::lamp_extend_large(int data,int column,int active) } else { - m_card_live = 0; + m_card_live = false; } } -void mpu4_state::led_write_extender(int latch, int data, int starting_column) +void mpu4_state::led_write_extender(uint8_t latch, uint8_t data, uint8_t starting_column) { - int diff,i,j, ext_strobe; + uint8_t diff,i,j, ext_strobe; diff = (latch ^ m_last_latch) & latch; ext_strobe = (7 - starting_column) * 8; @@ -328,8 +328,8 @@ void mpu4_state::led_write_extender(int latch, int data, int starting_column) void mpu4_state::update_meters() { - int meter; - int data = ((m_mmtr_data & 0x7f) | m_remote_meter); + uint8_t meter; + uint8_t data = ((m_mmtr_data & 0x7f) | m_remote_meter); switch (m_reel_mux) { case STANDARD_REEL: @@ -434,7 +434,7 @@ MACHINE_RESET_MEMBER(mpu4_state,mpu4) WRITE_LINE_MEMBER(mpu4_state::cpu0_irq) { /* The PIA and PTM IRQ lines are all connected to a common PCB track, leading directly to the 6809 IRQ line. */ - int combined_state = m_pia3->irq_a_state() | m_pia3->irq_b_state() | + uint8_t combined_state = m_pia3->irq_a_state() | m_pia3->irq_b_state() | m_pia4->irq_a_state() | m_pia4->irq_b_state() | m_pia5->irq_a_state() | m_pia5->irq_b_state() | m_pia6->irq_a_state() | m_pia6->irq_b_state() | @@ -442,15 +442,23 @@ WRITE_LINE_MEMBER(mpu4_state::cpu0_irq) m_pia8->irq_a_state() | m_pia8->irq_b_state() | m_6840ptm->irq_state(); - if (!m_link7a_connected) //7B = IRQ, 7A = FIRQ, both = NMI + if (m_link7b_connected) //7B = IRQ, 7A = FIRQ, both = NMI { - m_maincpu->set_input_line(M6809_IRQ_LINE, combined_state ? ASSERT_LINE : CLEAR_LINE); - LOG(("6809 int%d \n", combined_state)); + if (!m_link7a_connected) + { + m_maincpu->set_input_line(M6809_IRQ_LINE, combined_state ? ASSERT_LINE : CLEAR_LINE); + LOG(("6809 IRQ %d \n", combined_state)); + } + else + { + m_maincpu->set_input_line(INPUT_LINE_NMI, combined_state ? ASSERT_LINE : CLEAR_LINE); + LOG(("6809 NMI %d \n", combined_state)); + } } else { m_maincpu->set_input_line(M6809_FIRQ_LINE, combined_state ? ASSERT_LINE : CLEAR_LINE); - LOG(("6809 fint%d \n", combined_state)); + LOG(("6809 FIRQ %d \n", combined_state)); } } @@ -479,8 +487,6 @@ uint8_t mpu4_state::bankswitch_r() void mpu4_state::bankset_w(uint8_t data) { - //logerror("bankset_w %02x\n", data); - m_pageval = (data - 2);//writes 2 and 3, to represent 0 and 1 - a hangover from the half page design? m_bank1->set_entry((m_pageval + (m_pageset ? 4 : 0)) & m_numbanks); } @@ -516,7 +522,7 @@ WRITE_LINE_MEMBER(mpu4_state::ic2_o3_callback) /* IC3, lamp data lines + alpha numeric display */ void mpu4_state::pia_ic3_porta_w(uint8_t data) { - int i; + uint8_t i; LOG_IC3(("%s: IC3 PIA Port A Set to %2x (lamp strobes 1 - 9)\n", machine().describe_context(),data)); if(m_ic23_active) @@ -527,15 +533,9 @@ void mpu4_state::pia_ic3_porta_w(uint8_t data) // As a consequence, the lamp column data can change before the input strobe without // causing the relevant lamps to black out. - if (m_overcurrent_detect) - { - m_overcurrent = true; - } + if (m_overcurrent_detect) m_overcurrent = true; - if (m_undercurrent_detect) - { - m_undercurrent = true; - } + if (m_undercurrent_detect) m_undercurrent = true; for (i = 0; i < 8; i++) { @@ -548,22 +548,16 @@ void mpu4_state::pia_ic3_porta_w(uint8_t data) void mpu4_state::pia_ic3_portb_w(uint8_t data) { - int i; + uint8_t i; LOG_IC3(("%s: IC3 PIA Port B Set to %2x (lamp strobes 10 - 17)\n", machine().describe_context(),data)); if(m_ic23_active) { if (m_lamp_strobe2 != m_input_strobe) { - if (m_overcurrent_detect) - { - m_overcurrent = true; - } + if (m_overcurrent_detect) m_overcurrent = true; - if (m_undercurrent_detect) - { - m_undercurrent = true; - } + if (m_undercurrent_detect) m_undercurrent = true; for (i = 0; i < 8; i++) { @@ -632,7 +626,7 @@ IC24 is a 74LS122 pulse generator CLEAR and B2 are tied high and A1 and A2 tied low, meaning any pulse on B1 will give a low pulse on the output pin. */ -void mpu4_state::ic24_output(int data) +void mpu4_state::ic24_output(uint8_t data) { m_IC23G2A = data; ic23_update(); @@ -663,6 +657,7 @@ TIMER_CALLBACK_MEMBER(mpu4_state::update_ic24) WRITE_LINE_MEMBER(mpu4_state::dataport_rxd) { m_pia4->cb1_w(state); + m_serial_output=state; LOG_IC3(("Dataport RX %x\n",state)); } @@ -708,10 +703,7 @@ uint8_t mpu4_state::pia_ic4_portb_r() { m_ic4_input_b = 0x00; - if (m_pia5->ca2_output()) - { - m_ic4_input_b |= 0x80; - } + if (m_serial_output) m_ic4_input_b |= 0x80; if (!m_reel_mux) { @@ -728,15 +720,14 @@ uint8_t mpu4_state::pia_ic4_portb_r() if (m_optic_pattern & (1<(device); - if (!pia->cb2_output()) + if (!m_pia5->cb2_output()) { switch (m_ay8913_address) { @@ -1007,7 +1000,7 @@ void mpu4_state::update_ay(device_t *device) WRITE_LINE_MEMBER(mpu4_state::pia_ic5_cb2_w) { - update_ay(m_pia5); + update_ay(); } @@ -1039,7 +1032,7 @@ void mpu4_state::pia_ic6_porta_w(uint8_t data) if (m_ay8913.found()) { m_ay_data = data; - update_ay(m_pia6); + update_ay();// } } @@ -1051,7 +1044,7 @@ WRITE_LINE_MEMBER(mpu4_state::pia_ic6_ca2_w) { if ( state ) m_ay8913_address |= 0x01; else m_ay8913_address &= ~0x01; - update_ay(m_pia6); + update_ay();// } } @@ -1063,7 +1056,7 @@ WRITE_LINE_MEMBER(mpu4_state::pia_ic6_cb2_w) { if ( state ) m_ay8913_address |= 0x02; else m_ay8913_address &= ~0x02; - update_ay(m_pia5); // using m_pia5 here allows m4fourmr to have sound + update_ay(); // using m_pia5 here allows m4fourmr to have sound } } @@ -1110,19 +1103,19 @@ void mpu4_state::pia_ic7_portb_w(uint8_t data) uint8_t mpu4_state::pia_ic7_portb_r() { -/* The meters are connected to a voltage drop sensor, where current -flowing through them also passes through pin B7, meaning that when -any meter is activated, pin B7 goes high. -As for why they connected this to an output port rather than using -CB1, no idea, although it proved of benefit when the reel multiplexer was designed -as it allows a separate meter to be used when the rest of the port is blocked. -This appears to have confounded the schematic drawer, who has assumed that -all eight meters are driven from this port, giving the 8 line driver chip -9 connections in total. */ + /* The meters are connected to a voltage drop sensor, where current + flowing through them also passes through pin B7, meaning that when + any meter is activated, pin B7 goes high. + As for why they connected this to an output port rather than using + CB1, no idea, although it proved of benefit when the reel multiplexer was designed + as it allows a separate meter to be used when the rest of the port is blocked. + This appears to have confounded the schematic drawer, who has assumed that + all eight meters are driven from this port, giving the 8 line driver chip + 9 connections in total. */ //This may be overkill, but the meter sensing is VERY picky - int combined_meter = m_meters->get_activity(0) | m_meters->get_activity(1) | + uint8_t combined_meter = m_meters->get_activity(0) | m_meters->get_activity(1) | m_meters->get_activity(2) | m_meters->get_activity(3) | m_meters->get_activity(4) | m_meters->get_activity(5) | m_meters->get_activity(6) | m_meters->get_activity(7); @@ -1183,7 +1176,7 @@ void mpu4_state::pia_ic8_portb_w(uint8_t data) data &= ~0x07; //remove Triacs from use } LOG_IC8(("%s: IC8 PIA Port B Set to %2x (OUTPUT PORT, TRIACS)\n", machine().describe_context(),data)); - for (int i = 0; i < 8; i++) + for (uint8_t i = 0; i < 8; i++) { m_triacs[i] = BIT(data, i); } @@ -1217,7 +1210,7 @@ void mpu4_state::pia_gb_porta_w(uint8_t data) void mpu4_state::pia_gb_portb_w(uint8_t data) { - int changed = m_expansion_latch^data; + uint8_t changed = m_expansion_latch^data; LOG_SS(("%s: GAMEBOARD: PIA Port B Set to %2x\n", machine().describe_context(),data)); @@ -1248,7 +1241,7 @@ void mpu4_state::pia_gb_portb_w(uint8_t data) uint8_t mpu4_state::pia_gb_portb_r() { LOG_SS(("%s: GAMEBOARD: PIA Read of Port B\n",machine().describe_context())); - int data=0; + uint8_t data=0; // b7 NAR - we can load another address into Channel 1 // b6, 1 = OKI ready, 0 = OKI busy // b5, vol clock @@ -1319,8 +1312,8 @@ void mpu4_state::ic3ss_w(offs_t offset, uint8_t data) float num = (1720000/((m_t3l + 1)*(m_t3h + 1))); float denom1 = ((m_t3h *(m_t3l + 1)+ 1)/(2*(m_t1 + 1))); - int denom2 = denom1 + 0.5f;//need to round up, this gives same precision as chip - int freq=num*denom2; + uint8_t denom2 = denom1 + 0.5f;//need to round up, this gives same precision as chip + uint8_t freq=num*denom2; if (freq) { @@ -1997,7 +1990,85 @@ void mpu4_state::mpu4_config_common() m_triacs.resolve(); m_ic24_timer = timer_alloc(FUNC(mpu4_state::update_ic24), this); + + + save_item(NAME( m_mmtr_data )); + save_item(NAME( m_ay8913_address )); + save_item(NAME( m_signal_50hz )); + save_item(NAME( m_ic4_input_b )); + save_item(NAME( m_aux1_input )); + save_item(NAME( m_aux2_input )); + save_item(NAME( m_IC23G1 )); + save_item(NAME( m_IC23G2A )); + save_item(NAME( m_IC23G2B )); + save_item(NAME( m_IC23GC )); + save_item(NAME( m_IC23GB )); + save_item(NAME( m_IC23GA )); + + save_item(NAME( m_reel_flag )); + save_item(NAME( m_ic23_active )); + save_item(NAME( m_expansion_latch )); + save_item(NAME( m_global_volume )); + save_item(NAME( m_input_strobe )); + save_item(NAME( m_lamp_strobe )); + save_item(NAME( m_lamp_strobe2 )); + save_item(NAME( m_lamp_strobe_ext_persistence )); + save_item(NAME( m_led_strobe )); + save_item(NAME( m_ay_data )); + save_item(NAME( m_optic_pattern )); + + save_item(NAME( m_active_reel )); + save_item(NAME( m_remote_meter )); + save_item(NAME( m_reel_mux )); + save_item(NAME( m_lamp_extender )); + save_item(NAME( m_last_b7 )); + save_item(NAME( m_last_latch )); + save_item(NAME( m_lamp_sense )); + save_item(NAME( m_card_live )); + save_item(NAME( m_led_extender )); + save_item(NAME( m_bwb_bank )); + save_item(NAME( m_default_to_low_bank )); + + save_item(NAME( m_use_pia4_porta_leds )); + save_item(NAME( m_pia4_porta_leds_base )); + save_item(NAME( m_pia4_porta_leds_strobe )); + + save_item(NAME( m_use_simplecard_leds )); + save_item(NAME( m_simplecard_leds_base )); + save_item(NAME( m_simplecard_leds_strobe )); + + save_item(NAME( m_pageval )); + save_item(NAME( m_pageset )); + save_item(NAME( m_hopper_type )); + save_item(NAME( m_reels )); + save_item(NAME( m_chrdata )); + save_item(NAME( m_t1 )); + save_item(NAME( m_t3l )); + save_item(NAME( m_t3h )); + save_item(NAME( m_serial_output )); + + save_item(NAME( m_numbanks )); + + save_item(NAME( m_link7a_connected )); + save_item(NAME( m_link7b_connected )); + + save_item(NAME( m_overcurrent )); + save_item(NAME( m_undercurrent )); + + save_item(NAME( m_overcurrent_detect )); + save_item(NAME( m_undercurrent_detect )); + + save_item(NAME( m_low_volt_detect )); + + save_item(NAME( m_use_coinlocks )); + + save_item(NAME( m_hack_duart_fixed_low )); + + save_item(NAME( m_hopper1_opto )); + save_item(NAME( m_hopper2_opto )); + m_lamp_strobe_ext_persistence = 0; + } MACHINE_START_MEMBER(mpu4_state,mod2) @@ -2005,6 +2076,7 @@ MACHINE_START_MEMBER(mpu4_state,mod2) mpu4_config_common(); m_link7a_connected=false; + m_link7b_connected=true; } MACHINE_START_MEMBER(mpu4_state,mpu4oki) @@ -2013,12 +2085,13 @@ MACHINE_START_MEMBER(mpu4_state,mpu4oki) mpu4_config_common(); m_link7a_connected=false; + m_link7b_connected=true; mpu4_install_mod4oki_space(space); } void mpu4_state::init_m4() { - m_bwb_bank = 0; + m_bwb_bank = false; setup_rom_banks(); } @@ -2032,7 +2105,7 @@ void mpu4_state::init_m4big() address_space &space = m_maincpu->space(AS_PROGRAM); - m_bwb_bank = 1; + m_bwb_bank = true; space.install_write_handler(0x0858, 0x0858, write8smo_delegate(*this, FUNC(mpu4_state::bankswitch_w))); space.install_write_handler(0x0878, 0x0878, write8smo_delegate(*this, FUNC(mpu4_state::bankset_w))); uint8_t *rom = memregion("maincpu")->base(); @@ -2421,7 +2494,7 @@ void mpu4_state::mod2_no_bacta_f(machine_config &config) { mod2_f(config); config.device_remove("dataport"); - m_pia5->ca2_handler().set(m_pia4, FUNC(pia6821_device::cb1_w)); + m_pia5->ca2_handler().set(FUNC(mpu4_state::dataport_rxd)); } void mpu4_state::mod2_cheatchr_f(machine_config &config) @@ -2462,7 +2535,7 @@ void mpu4_state::mod4oki_no_bacta_f(machine_config &config) { mod4oki_f(config); config.device_remove("dataport"); - m_pia5->ca2_handler().set(m_pia4, FUNC(pia6821_device::cb1_w)); + m_pia5->ca2_handler().set(FUNC(mpu4_state::dataport_rxd)); } void mpu4_state::mod4oki_cheatchr_f(machine_config &config) diff --git a/src/mame/barcrest/mpu4.h b/src/mame/barcrest/mpu4.h index 58eb7a79e91..ae2acf8c1c6 100644 --- a/src/mame/barcrest/mpu4.h +++ b/src/mame/barcrest/mpu4.h @@ -359,14 +359,14 @@ protected: void mpu4_memmap_bootleg_characteriser(address_map &map); void mpu4_memmap_bl_characteriser_blastbank(address_map &map); - void lamp_extend_small(int data); - void lamp_extend_large(int data,int column,int active); - void led_write_extender(int latch, int data, int column); + void lamp_extend_small(uint8_t data); + void lamp_extend_large(uint8_t data,uint8_t column,bool active); + void led_write_extender(uint8_t latch, uint8_t data, uint8_t column); void update_meters(); void ic23_update(); - void ic24_output(int data); + void ic24_output(uint8_t data); void ic24_setup(); - void update_ay(device_t *device); + void update_ay(); void mpu4_install_mod4oki_space(address_space &space); void mpu4_config_common(); @@ -476,43 +476,43 @@ protected: output_finder<8> m_triacs; - int m_mmtr_data = 0; - int m_ay8913_address = 0; - int m_signal_50hz = 0; - int m_ic4_input_b = 0; - int m_aux1_input = 0; - int m_aux2_input = 0; - int m_IC23G1 = 0; - int m_IC23G2A = 0; - int m_IC23G2B = 0; - int m_IC23GC = 0; - int m_IC23GB = 0; - int m_IC23GA = 0; - - int m_reel_flag = 0; + uint8_t m_mmtr_data = 0; + uint8_t m_ay8913_address = 0; + uint8_t m_signal_50hz = 0; + uint8_t m_ic4_input_b = 0; + uint8_t m_aux1_input = 0; + uint8_t m_aux2_input = 0; + uint8_t m_IC23G1 = 0; + uint8_t m_IC23G2A = 0; + uint8_t m_IC23G2B = 0; + uint8_t m_IC23GC = 0; + uint8_t m_IC23GB = 0; + uint8_t m_IC23GA = 0; + + uint8_t m_reel_flag = 0; bool m_ic23_active = false; emu_timer *m_ic24_timer = nullptr; - int m_expansion_latch = 0; - int m_global_volume = 0; - int m_input_strobe = 0; + uint8_t m_expansion_latch = 0; + uint8_t m_global_volume = 0; + uint8_t m_input_strobe = 0; uint8_t m_lamp_strobe = 0; uint8_t m_lamp_strobe2 = 0; uint8_t m_lamp_strobe_ext[2] = { 0, 0 }; uint8_t m_lamp_strobe_ext_persistence = 0; uint8_t m_led_strobe = 0; uint8_t m_ay_data = 0; - int m_optic_pattern = 0; - - int m_active_reel = 0; - int m_remote_meter = 0; - int m_reel_mux = 0; - int m_lamp_extender = 0; - int m_last_b7 = 0; - int m_last_latch = 0; - int m_lamp_sense = 0; - int m_card_live = 0; - int m_led_extender = 0; - int m_bwb_bank = 0; + uint8_t m_optic_pattern = 0; + + uint8_t m_active_reel = 0; + uint8_t m_remote_meter = 0; + uint8_t m_reel_mux = 0; + uint8_t m_lamp_extender = 0; + uint8_t m_last_b7 = 0; + uint8_t m_last_latch = 0; + bool m_lamp_sense = false; + bool m_card_live = false; + uint8_t m_led_extender = 0; + bool m_bwb_bank = false; bool m_default_to_low_bank = false; bool m_use_pia4_porta_leds = true; @@ -523,17 +523,20 @@ protected: uint8_t m_simplecard_leds_base = 0; uint8_t m_simplecard_leds_strobe = 0; - int m_pageval = 0; - int m_pageset = 0; - int m_hopper_type = 0; - int m_reels = 0; - int m_chrdata = 0; - int m_t1 = 0; - int m_t3l = 0; - int m_t3h = 0; + uint8_t m_pageval = 0; + uint8_t m_pageset = 0; + uint8_t m_hopper_type = 0; + uint8_t m_reels = 0; + uint8_t m_chrdata = 0; + uint8_t m_t1 = 0; + uint8_t m_t3l = 0; + uint8_t m_t3h = 0; + uint8_t m_serial_output = 0; + uint8_t m_numbanks = 0; bool m_link7a_connected = false; + bool m_link7b_connected = true; bool m_overcurrent = false; bool m_undercurrent = false; @@ -555,6 +558,7 @@ protected: }; + template void mpu4_state::mod4oki_cheatchr_pal_f(machine_config &config) { mod4oki_f(config); diff --git a/src/mame/barcrest/mpu4_characteriser_pal.cpp b/src/mame/barcrest/mpu4_characteriser_pal.cpp index 197f5da46d5..f2cbe5cb0ae 100644 --- a/src/mame/barcrest/mpu4_characteriser_pal.cpp +++ b/src/mame/barcrest/mpu4_characteriser_pal.cpp @@ -201,7 +201,7 @@ uint8_t mpu4_characteriser_pal::protection_r() } else if (m_allow_68k_cheat) { - // MPU4 Video (question decrambling where used not handled) + // MPU4 Video (question descrambling where used not handled) ret = m_cpu->state_int(M68K_D0) & 0xff; logerror("%s: Characteriser protection_r WITH 68000 CHEAT (col is %02x returning %02x)\n", machine().describe_context(), m_prot_col, ret); } diff --git a/src/mame/barcrest/mpu4_characteriser_pal.h b/src/mame/barcrest/mpu4_characteriser_pal.h index ea9e3b5a816..c2291c6d174 100644 --- a/src/mame/barcrest/mpu4_characteriser_pal.h +++ b/src/mame/barcrest/mpu4_characteriser_pal.h @@ -56,7 +56,7 @@ public: virtual uint8_t read(offs_t offset); virtual void write(offs_t offset, uint8_t data); - /* While some games use unique keys and lamp scrambles, several do write the same sequencesand expect the + /* While some games use unique keys and lamp scrambles, several do write the same sequences and expect the same responses. It is possible PALs were reused. Sometimes the lamp tables are masked subsets, as they were handcrafted when the layouts were made, they could also be incorrect in places. diff --git a/src/mame/barcrest/mpu4bwb.cpp b/src/mame/barcrest/mpu4bwb.cpp index 2eb735ff55f..765222c8925 100644 --- a/src/mame/barcrest/mpu4bwb.cpp +++ b/src/mame/barcrest/mpu4bwb.cpp @@ -120,6 +120,7 @@ MACHINE_START_MEMBER(mpu4bwb_machines_state,mpu4bwb) mpu4_config_common(); m_link7a_connected=false; + m_link7b_connected=true; mpu4_install_mod4bwb_space(space); } diff --git a/src/mame/barcrest/mpu4crystal.cpp b/src/mame/barcrest/mpu4crystal.cpp index e27dcc40153..6001d67057f 100644 --- a/src/mame/barcrest/mpu4crystal.cpp +++ b/src/mame/barcrest/mpu4crystal.cpp @@ -44,6 +44,7 @@ MACHINE_START_MEMBER(mpu4crystal_machines_state,mpu4cry) mpu4_config_common(); m_link7a_connected=false; + m_link7b_connected=true; } void mpu4crystal_machines_state::crystal_f(machine_config &config) diff --git a/src/mame/barcrest/mpu4mod4yam.cpp b/src/mame/barcrest/mpu4mod4yam.cpp index a41b0261848..a5c3b0eb8fa 100644 --- a/src/mame/barcrest/mpu4mod4yam.cpp +++ b/src/mame/barcrest/mpu4mod4yam.cpp @@ -139,6 +139,7 @@ MACHINE_START_MEMBER(mpu4mod4yam_machines_state,mpu4yam) mpu4_config_common(); m_link7a_connected=false; + m_link7b_connected=true; } void mpu4mod4yam_machines_state::memmap_ym2413(address_map &map) diff --git a/src/mame/barcrest/mpu4redpoint.cpp b/src/mame/barcrest/mpu4redpoint.cpp index 86be8c59161..40dbd04a102 100644 --- a/src/mame/barcrest/mpu4redpoint.cpp +++ b/src/mame/barcrest/mpu4redpoint.cpp @@ -63,6 +63,7 @@ MACHINE_START_MEMBER(mpu4redpoint_state,mpu4redpoint) mpu4_config_common(); m_link7a_connected=false; + m_link7b_connected=true; } } // anonymous namespace diff --git a/src/mame/barcrest/mpu4vid.cpp b/src/mame/barcrest/mpu4vid.cpp index 0015baf24c8..4b2d491be2d 100644 --- a/src/mame/barcrest/mpu4vid.cpp +++ b/src/mame/barcrest/mpu4vid.cpp @@ -295,7 +295,7 @@ private: //Video uint8_t m_m6840_irq_state; uint8_t m_m6850_irq_state; - int m_gfx_index; + uint16_t m_gfx_index; int8_t m_cur[2]; SCN2674_DRAW_CHARACTER_MEMBER(display_pixels); @@ -691,7 +691,7 @@ static INPUT_PORTS_START( crmaze ) PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_BUTTON3) PORT_NAME("Left Red") PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_BUTTON4) PORT_NAME("Left Yellow") PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("Getout Yellow") - PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_BUTTON5) PORT_NAME("Escape/Getout Red")/* Labelled Escape on cabinet */ + PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_BUTTON5) PORT_NAME("Escape/Getout Red")/* Labelled Escape on cabinet, Getout in test */ PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_UNUSED) PORT_MODIFY("AUX1") @@ -1871,6 +1871,20 @@ void mpu4vid_state::machine_start() /* setup communications */ m_link7a_connected = true; + m_link7b_connected = false; + + + save_item(NAME( m_m6840_irq_state )); + save_item(NAME( m_m6850_irq_state )); + save_item(NAME( m_gfx_index )); + save_item(NAME( m_cur )); + + save_item(NAME( m_bt_palbase )); + save_item(NAME( m_bt_which )); + save_item(NAME( m_btpal_r )); + save_item(NAME( m_btpal_g )); + save_item(NAME( m_btpal_b )); + } void mpu4vid_state::machine_reset() @@ -8716,7 +8730,7 @@ GAME( 199?, v4bios, 0, mod2(), mpu4vid, mpu4_state, init_ #define GAME_FLAGS_OK (MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND) GAMEL( 1993, v4cmaze, v4bios, crmaze, crmaze, mpu4vid_state, init_crmaze, ROT0, "Barcrest","The Crystal Maze (v1.3) (MPU4 Video)",GAME_FLAGS_OK,layout_crmaze2p )//SWP 0.9 -GAMEL( 1993, v4cmazedat, v4cmaze, crmaze, crmaze, mpu4vid_state, init_crmaze, ROT0, "Barcrest","The Crystal Maze (v1.3, Datapak) (MPU4 Video)",GAME_FLAGS,layout_crmaze2p )//SWP 0.9D +GAMEL( 1993, v4cmazedat, v4cmaze, crmaze, crmaze, mpu4vid_state, init_crmaze, ROT0, "Barcrest","The Crystal Maze (v1.3, Datapak) (MPU4 Video)",GAME_FLAGS_OK,layout_crmaze2p )//SWP 0.9D GAMEL( 1993, v4cmazeb, v4cmaze, crmaze, crmaze, mpu4vid_state, init_crmaze, ROT0, "Barcrest","The Crystal Maze (v1.2) (MPU4 Video)",GAME_FLAGS_OK,layout_crmaze2p )//SWP 0.9 GAMEL( 1993, v4cmazec, v4cmaze, crmaze, crmaze, mpu4vid_state, init_crmaze, ROT0, "Barcrest","The Crystal Maze (v1.3 alt) (MPU4 Video)",GAME_FLAGS_OK,layout_crmaze2p )//SWP 0.9 GAMEL( 1993, v4cmazed, v4cmaze, crmaze, crmaze, mpu4vid_state, init_crmaze, ROT0, "Barcrest","The Crystal Maze (v1.1) (MPU4 Video)",GAME_FLAGS_OK,layout_crmaze2p )//SWP 0.6 @@ -8724,14 +8738,14 @@ GAMEL( 1993, v4cmazed, v4cmaze, crmaze, crmaze, mpu4vid_state, init_crm GAMEL( 1993, v4cmaze_amld, v4cmaze, crmaze, crmaze, mpu4vid_state, init_crmaze, ROT0, "Barcrest","The Crystal Maze (v0.1, AMLD) (MPU4 Video)",GAME_FLAGS_OK,layout_crmaze2p )//SWP 0.9 (actually newer than the 1.1 set then??) GAMEL( 1993, v4cmaze2, v4bios, crmaze, crmaze, mpu4vid_state, init_crmaze, ROT0, "Barcrest","The New Crystal Maze Featuring Ocean Zone (v2.2) (MPU4 Video)",GAME_FLAGS_OK,layout_crmaze4p )//SWP 1.0 -GAMEL( 1993, v4cmaze2d, v4cmaze2, crmaze, crmaze, mpu4vid_state, init_crmaze, ROT0, "Barcrest","The New Crystal Maze Featuring Ocean Zone (v2.2, Datapak) (MPU4 Video)",GAME_FLAGS,layout_crmaze4p )//SWP 1.0D +GAMEL( 1993, v4cmaze2d, v4cmaze2, crmaze, crmaze, mpu4vid_state, init_crmaze, ROT0, "Barcrest","The New Crystal Maze Featuring Ocean Zone (v2.2, Datapak) (MPU4 Video)",GAME_FLAGS_OK,layout_crmaze4p )//SWP 1.0D GAMEL( 1993, v4cmaze2b, v4cmaze2, crmaze, crmaze, mpu4vid_state, init_crmaze, ROT0, "Barcrest","The New Crystal Maze Featuring Ocean Zone (v2.0) (MPU4 Video)",GAME_FLAGS_OK,layout_crmaze4p )//SWP 1.0 GAMEL( 1993, v4cmaze2c, v4cmaze2, crmaze, crmaze, mpu4vid_state, init_crmaze, ROT0, "Barcrest","The New Crystal Maze Featuring Ocean Zone (v?.?) (MPU4 Video)",GAME_FLAGS,layout_crmaze4p )// bad rom? GAMEL( 1993, v4cmaze2_amld, v4cmaze2, crmaze, crmaze, mpu4vid_state, init_crmaze, ROT0, "Barcrest","The New Crystal Maze Featuring Ocean Zone (v0.1, AMLD) (MPU4 Video)",GAME_FLAGS_OK,layout_crmaze4p )//SWP 1.0 /* unprotected? proto? */ GAMEL( 1994, v4cmaze3, v4bios, crmaze, crmaze, mpu4vid_state, init_crmaze_flutter, ROT0, "Barcrest","The Crystal Maze Team Challenge (v0.9) (MPU4 Video)",GAME_FLAGS_OK,layout_crmaze4p )//SWP 0.7 -GAMEL( 1994, v4cmaze3d, v4cmaze3, crmaze, crmaze, mpu4vid_state, init_crmaze_flutter, ROT0, "Barcrest","The Crystal Maze Team Challenge (v0.9, Datapak) (MPU4 Video)",GAME_FLAGS,layout_crmaze4p )//SWP 0.7D +GAMEL( 1994, v4cmaze3d, v4cmaze3, crmaze, crmaze, mpu4vid_state, init_crmaze_flutter, ROT0, "Barcrest","The Crystal Maze Team Challenge (v0.9, Datapak) (MPU4 Video)",GAME_FLAGS_OK,layout_crmaze4p )//SWP 0.7D GAMEL( 1994, v4cmaze3b, v4cmaze3, crmaze, crmaze, mpu4vid_state, init_crmaze_flutter, ROT0, "Barcrest","The Crystal Maze Team Challenge (v0.8) (MPU4 Video)",GAME_FLAGS_OK,layout_crmaze4p )//SWP 0.7 GAMEL( 1994, v4cmaze3c, v4cmaze3, crmaze, crmaze, mpu4vid_state, init_crmaze_flutter, ROT0, "Barcrest","The Crystal Maze Team Challenge (v0.6) (MPU4 Video)",GAME_FLAGS,layout_crmaze4p )// missing one program rom -- cgit v1.2.3