From 095da87df0d72578df389a9f1be9438714fe0e38 Mon Sep 17 00:00:00 2001 From: arbee Date: Wed, 11 Oct 2023 22:45:07 -0400 Subject: nubus/8lc.cpp: Add support for the RasterOps 8LC card for the original Macintosh LC. [R. Belmont] * This card provides unaccelerated 1024x768 video, which isn't the greatest idea on a 68020. video/tms34061.h: Added accessors to get the horizontal and vertical visible resolution and totals. [R. Belmont] nubus/cards.cpp, apple/maclc.cpp: Support a list of cards for only the original Macintosh LC. [R. Belmont] --- scripts/src/bus.lua | 2 ++ src/devices/bus/nubus/cards.cpp | 10 +++++++++- src/devices/bus/nubus/cards.h | 1 + src/devices/video/tms34061.h | 4 ++++ src/mame/apple/maclc.cpp | 8 ++++++-- 5 files changed, 22 insertions(+), 3 deletions(-) diff --git a/scripts/src/bus.lua b/scripts/src/bus.lua index 0d0dc7f09d0..1e5096f6ff9 100644 --- a/scripts/src/bus.lua +++ b/scripts/src/bus.lua @@ -3030,6 +3030,8 @@ if (BUSES["NUBUS"]~=null) then MAME_DIR .. "src/devices/bus/nubus/nubus_image.h", MAME_DIR .. "src/devices/bus/nubus/nubus_wsportrait.cpp", MAME_DIR .. "src/devices/bus/nubus/nubus_wsportrait.h", + MAME_DIR .. "src/devices/bus/nubus/8lc.cpp", + MAME_DIR .. "src/devices/bus/nubus/8lc.h", MAME_DIR .. "src/devices/bus/nubus/bootbug.cpp", MAME_DIR .. "src/devices/bus/nubus/bootbug.h", MAME_DIR .. "src/devices/bus/nubus/quadralink.cpp", diff --git a/src/devices/bus/nubus/cards.cpp b/src/devices/bus/nubus/cards.cpp index e33cb1c41cb..8c85a4f81b0 100644 --- a/src/devices/bus/nubus/cards.cpp +++ b/src/devices/bus/nubus/cards.cpp @@ -2,13 +2,14 @@ // copyright-holders:R. Belmont /*************************************************************************** - NuBus, SE/30 PDS, and LC PDS slot cards + NuBus, SE/30 PDS, and LC slot cards ***************************************************************************/ #include "emu.h" #include "cards.h" +#include "8lc.h" #include "bootbug.h" #include "laserview.h" #include "nubus_48gc.h" @@ -65,6 +66,13 @@ void mac_pdslc_cards(device_slot_interface &device) device.option_add("macconilc", PDSLC_MACCONILC); // Asante MacCON i LC Ethernet card } +// cards for the LC PDS slot that only work in the original LC +void mac_pdslc_orig_cards(device_slot_interface &device) +{ + device.option_add("macconilc", PDSLC_MACCONILC); // Asante MacCON i LC Ethernet card + device.option_add("ro8lc", PDSLC_COLORVUE8LC); // RasterOps ColorVue 8LC +} + // IIsi can take either one SE/30 PDS or one NuBus card void mac_iisi_cards(device_slot_interface &device) { diff --git a/src/devices/bus/nubus/cards.h b/src/devices/bus/nubus/cards.h index 02aa1fba010..498e9b0e07c 100644 --- a/src/devices/bus/nubus/cards.h +++ b/src/devices/bus/nubus/cards.h @@ -14,6 +14,7 @@ void mac_nubus_cards(device_slot_interface &device) ATTR_COLD; void mac_pds030_cards(device_slot_interface &device) ATTR_COLD; void mac_pdslc_cards(device_slot_interface &device) ATTR_COLD; +void mac_pdslc_orig_cards(device_slot_interface &device) ATTR_COLD; void mac_iisi_cards(device_slot_interface &device) ATTR_COLD; #endif // MAME_BUS_NUBUS_CARDS_H diff --git a/src/devices/video/tms34061.h b/src/devices/video/tms34061.h index 47cd6e68c60..945f6318391 100644 --- a/src/devices/video/tms34061.h +++ b/src/devices/video/tms34061.h @@ -52,6 +52,10 @@ public: u8 const &vram(unsigned row) const { return m_display.vram[row << m_rowshift]; } u16 xyoffset() const { return m_display.regs[TMS34061_XYOFFSET]; } u16 xyaddress() const { return m_display.regs[TMS34061_XYADDRESS]; } + u16 hvisible() const { return (m_display.regs[TMS34061_HORENDBLNK] - m_display.regs[TMS34061_HORSTARTBLNK]) << 2; } + u16 vvisible() const { return (m_display.regs[TMS34061_VERENDBLNK] - m_display.regs[TMS34061_VERSTARTBLNK]); } + u16 htotal() const { return m_display.regs[TMS34061_HORTOTAL]; } + u16 vtotal() const { return m_display.regs[TMS34061_VERTOTAL]; } // TODO: encapsulate this properly tms34061_display m_display; diff --git a/src/mame/apple/maclc.cpp b/src/mame/apple/maclc.cpp index 3907d6dc1ce..7be70f0efc4 100644 --- a/src/mame/apple/maclc.cpp +++ b/src/mame/apple/maclc.cpp @@ -366,7 +366,6 @@ void maclc_state::maclc_base(machine_config &config) // V8 supports interrupts for slots $C, $D, and $E, but the LC, LC II, and Color Classic // only hook the slot $E IRQ up to the PDS slot. nubus.out_irqe_callback().set(m_v8, FUNC(v8_device::slot_irq_w<0x20>)); - NUBUS_SLOT(config, "lcpds", "pds", mac_pdslc_cards, nullptr); MACADB(config, m_macadb, C15M); @@ -396,6 +395,8 @@ void maclc_state::maclc(machine_config &config) { maclc_base(config); + NUBUS_SLOT(config, "lcpds", "pds", mac_pdslc_orig_cards, nullptr); + m_ram->set_default_size("2M"); m_ram->set_extra_options("4M,6M,10M"); m_v8->set_baseram_is_4M(false); @@ -405,6 +406,8 @@ void maclc_state::maclc2(machine_config &config) { maclc_base(config); + NUBUS_SLOT(config, "lcpds", "pds", mac_pdslc_cards, nullptr); + M68030(config.replace(), m_maincpu, C15M); m_maincpu->set_addrmap(AS_PROGRAM, &maclc_state::maclc_map); m_maincpu->set_dasm_override(std::function(&mac68k_dasm_override), "mac68k_dasm_override"); @@ -445,6 +448,8 @@ void maclc_state::maccclas(machine_config &config) m_v8->pb5_callback().set(m_cuda, FUNC(cuda_device::set_tip)); m_v8->cb2_callback().set(m_cuda, FUNC(cuda_device::set_via_data)); + NUBUS_SLOT(config, "lcpds", "pds", mac_pdslc_cards, nullptr); + m_ram->set_default_size("4M"); m_ram->set_extra_options("6M,8M,10M"); m_v8->set_baseram_is_4M(true); @@ -470,7 +475,6 @@ void maclc_state::macclas2(machine_config &config) m_v8->cb2_callback().set(m_egret, FUNC(egret_device::set_via_data)); // Classic II doesn't have an LC PDS slot (and its ROM has the Slot Manager disabled) - config.device_remove("lcpds"); config.device_remove("pds"); m_ram->set_default_size("4M"); -- cgit v1.2.3