diff options
Diffstat (limited to 'src/devices/bus/svi3x8/expander/sv603.cpp')
-rw-r--r-- | src/devices/bus/svi3x8/expander/sv603.cpp | 31 |
1 files changed, 20 insertions, 11 deletions
diff --git a/src/devices/bus/svi3x8/expander/sv603.cpp b/src/devices/bus/svi3x8/expander/sv603.cpp index fc8e8c86d96..c52902cc69c 100644 --- a/src/devices/bus/svi3x8/expander/sv603.cpp +++ b/src/devices/bus/svi3x8/expander/sv603.cpp @@ -8,8 +8,7 @@ #include "emu.h" #include "sv603.h" -#include "softlist.h" -#include "speaker.h" +#include "softlist_dev.h" //************************************************************************** @@ -38,8 +37,8 @@ const tiny_rom_entry *sv603_device::device_rom_region() const void sv603_device::device_add_mconfig(machine_config &config) { - SPEAKER(config, "mono").front_center(); - SN76489A(config, m_snd, XTAL(10'738'635) / 3).add_route(ALL_OUTPUTS, "mono", 1.00); + SN76489A(config, m_snd, XTAL(10'738'635) / 3); + m_snd->add_route(ALL_OUTPUTS, DEVICE_SELF_OWNER, 1.0); // controller ports COLECOVISION_CONTROL_PORT(config, m_joy[0], colecovision_control_port_devices, "hand"); @@ -50,6 +49,7 @@ void sv603_device::device_add_mconfig(machine_config &config) // cartridge slot COLECOVISION_CARTRIDGE_SLOT(config, m_cart, colecovision_cartridges, nullptr); SOFTWARE_LIST(config, "cart_list").set_original("coleco"); + SOFTWARE_LIST(config, "homebrew_list").set_original("coleco_homebrew"); } @@ -94,7 +94,7 @@ void sv603_device::device_reset() //************************************************************************** template<int N> -WRITE_LINE_MEMBER( sv603_device::joy_irq_w ) +void sv603_device::joy_irq_w(int state) { m_expander->int_w(state); } @@ -104,17 +104,17 @@ uint8_t sv603_device::mreq_r(offs_t offset) uint8_t data = 0xff; // ls138 (active low) - int ccs1 = ((offset >> 13) == 0) ? 0 : 1; - int ccs2 = ((offset >> 13) == 1) ? 0 : 1; - int ccs3 = ((offset >> 13) == 2) ? 0 : 1; - int ccs4 = ((offset >> 13) == 3) ? 0 : 1; - int bios = ((offset >> 13) == 4) ? 0 : 1; + const int ccs1 = ((offset >> 13) == 0) ? 0 : 1; + const int ccs2 = ((offset >> 13) == 1) ? 0 : 1; + const int ccs3 = ((offset >> 13) == 2) ? 0 : 1; + const int ccs4 = ((offset >> 13) == 3) ? 0 : 1; + const int bios = ((offset >> 13) == 4) ? 0 : 1; // 5, 6, 7: not connected m_expander->romdis_w(0); m_expander->ramdis_w(bios); - data &= m_cart->bd_r(offset, data, ccs1, ccs2, ccs3, ccs4); + data &= m_cart->read(offset, ccs1, ccs2, ccs3, ccs4); if (bios == 0) data &= m_bios->as_u8(offset & 0x1fff); @@ -124,7 +124,16 @@ uint8_t sv603_device::mreq_r(offs_t offset) void sv603_device::mreq_w(offs_t offset, uint8_t data) { + const int ccs1 = ((offset >> 13) == 0) ? 0 : 1; + const int ccs2 = ((offset >> 13) == 1) ? 0 : 1; + const int ccs3 = ((offset >> 13) == 2) ? 0 : 1; + const int ccs4 = ((offset >> 13) == 3) ? 0 : 1; + const int bios = ((offset >> 13) == 4) ? 0 : 1; + m_expander->romdis_w(0); + m_expander->ramdis_w(bios); + + m_cart->write(offset, data, ccs1, ccs2, ccs3, ccs4); } uint8_t sv603_device::iorq_r(offs_t offset) |