diff options
Diffstat (limited to 'src/mame/drivers/40love.cpp')
-rw-r--r-- | src/mame/drivers/40love.cpp | 60 |
1 files changed, 8 insertions, 52 deletions
diff --git a/src/mame/drivers/40love.cpp b/src/mame/drivers/40love.cpp index 6e45a0ff1d5..0d322f938b7 100644 --- a/src/mame/drivers/40love.cpp +++ b/src/mame/drivers/40love.cpp @@ -227,6 +227,7 @@ Notes - Has jumper setting for 122HZ or 61HZ) #include "cpu/m6805/m6805.h" #include "cpu/z80/z80.h" #include "machine/input_merger.h" +#include "machine/mb14241.h" #include "sound/dac.h" #include "sound/volt_reg.h" #include "screen.h" @@ -252,14 +253,6 @@ void fortyl_state::bank_select_w(uint8_t data) membank("bank1")->set_entry(data & 1); } -void fortyl_state::pix1_w(uint8_t data) -{ -// if (data > 7) -// logerror("pix1 = %2x\n", data); - - m_pix1 = data; -} - uint8_t fortyl_state::fortyl_mcu_status_r() { // bit 0 = when 1, MCU is ready to receive data from main CPU @@ -269,40 +262,6 @@ uint8_t fortyl_state::fortyl_mcu_status_r() ((CLEAR_LINE != m_bmcu->mcu_semaphore_r()) ? 0x02 : 0x00); } -void fortyl_state::pix1_mcu_w(uint8_t data) -{ -// if (data > 7) -// logerror("pix1 = %2x\n", data); - - m_pix1 = data; -} - -void fortyl_state::pix2_w(uint8_t data) -{ -// if ((data!=0x00) && (data != 0xff)) -// logerror("pix2 = %2x\n", data); - - m_pix2[0] = m_pix2[1]; - m_pix2[1] = data; -} - -#if 0 -uint8_t fortyl_state::pix1_r() -{ - return m_pix1; -} -#endif - -uint8_t fortyl_state::pix2_r() -{ - int res; - int d1 = m_pix1 & 7; - - res = (((m_pix2[1] << (d1 + 8)) | (m_pix2[0] << d1)) & 0xff00) >> 8; - - return res; -} - /***************************************************************************/ @@ -331,9 +290,9 @@ void fortyl_state::_40love_map(address_map &map) map(0x0000, 0x7fff).rom(); map(0x8000, 0x87ff).ram(); /* M5517P on main board */ map(0x8800, 0x8800).rw(m_bmcu, FUNC(taito68705_mcu_device::data_r), FUNC(taito68705_mcu_device::data_w)); - map(0x8801, 0x8801).rw(FUNC(fortyl_state::fortyl_mcu_status_r), FUNC(fortyl_state::pix1_mcu_w)); //pixel layer related + map(0x8801, 0x8801).r(FUNC(fortyl_state::fortyl_mcu_status_r)).w("mb14241", FUNC(mb14241_device::shift_count_w)); //pixel layer related map(0x8802, 0x8802).w(FUNC(fortyl_state::bank_select_w)); - map(0x8803, 0x8803).rw(FUNC(fortyl_state::pix2_r), FUNC(fortyl_state::pix2_w)); //pixel layer related + map(0x8803, 0x8803).r("mb14241", FUNC(mb14241_device::shift_result_r)).w("mb14241", FUNC(mb14241_device::shift_data_w)); //pixel layer related map(0x8804, 0x8804).r(m_soundlatch2, FUNC(generic_latch_8_device::read)); map(0x8804, 0x8804).w("soundlatch", FUNC(generic_latch_8_device::write)); map(0x8805, 0x8805).r(FUNC(fortyl_state::snd_flag_r)).nopw(); /*sound_reset*/ //???? @@ -360,9 +319,9 @@ void fortyl_state::undoukai_map(address_map &map) map(0x8000, 0x9fff).bankr("bank1"); map(0xa000, 0xa7ff).ram().share("mcu_ram"); /* M5517P on main board */ map(0xa800, 0xa800).rw(m_bmcu, FUNC(taito68705_mcu_device::data_r), FUNC(taito68705_mcu_device::data_w)); - map(0xa801, 0xa801).rw(FUNC(fortyl_state::fortyl_mcu_status_r), FUNC(fortyl_state::pix1_w)); //pixel layer related + map(0xa801, 0xa801).r(FUNC(fortyl_state::fortyl_mcu_status_r)).w("mb14241", FUNC(mb14241_device::shift_count_w)); //pixel layer related map(0xa802, 0xa802).w(FUNC(fortyl_state::bank_select_w)); - map(0xa803, 0xa803).rw(FUNC(fortyl_state::pix2_r), FUNC(fortyl_state::pix2_w)); //pixel layer related + map(0xa803, 0xa803).r("mb14241", FUNC(mb14241_device::shift_result_r)).w("mb14241", FUNC(mb14241_device::shift_data_w)); //pixel layer related map(0xa804, 0xa804).r(m_soundlatch2, FUNC(generic_latch_8_device::read)); map(0xa804, 0xa804).w("soundlatch", FUNC(generic_latch_8_device::write)); map(0xa805, 0xa805).r(FUNC(fortyl_state::snd_flag_r)).nopw(); /*sound_reset*/ //???? @@ -644,10 +603,9 @@ GFXDECODE_END void fortyl_state::machine_start() { /* video */ - save_item(NAME(m_pix1)); - save_item(NAME(m_pix2)); save_item(NAME(m_color_bank)); save_item(NAME(m_screen_disable)); + /* sound */ save_item(NAME(m_vol_ctrl)); save_item(NAME(m_snd_ctrl0)); @@ -660,9 +618,6 @@ void fortyl_state::machine_start() void fortyl_state::machine_reset() { /* video */ - m_pix1 = 0; - m_pix2[0] = 0; - m_pix2[1] = 0; m_color_bank = false; /* sound */ @@ -683,7 +638,6 @@ void fortyl_state::common(machine_config &config) m_audiocpu->set_periodic_int(FUNC(fortyl_state::irq0_line_hold), attotime::from_hz(2*60)); /* source/number of IRQs is unknown */ GENERIC_LATCH_8(config, "soundlatch").data_pending_callback().set("soundnmi", FUNC(input_merger_device::in_w<0>)); - GENERIC_LATCH_8(config, m_soundlatch2); INPUT_MERGER_ALL_HIGH(config, "soundnmi").output_handler().set_inputline("audiocpu", INPUT_LINE_NMI); @@ -692,6 +646,8 @@ void fortyl_state::common(machine_config &config) config.set_maximum_quantum(attotime::from_hz(6000)); /* high interleave to ensure proper synchronization of CPUs */ + MB14241(config, "mb14241"); + /* video hardware */ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); screen.set_refresh_hz(60); |