mirror of
https://github.com/holub/mame
synced 2025-07-07 02:50:50 +03:00
bus/nubus/nubus.cpp: Support address mask for LC PDS. [R. Belmont]
bus/nubus/nubus_asntmc3b.cpp: Add Asante MacCON i LC Ethernet card, another clone of this design. [R. Belmont] apple/maclc.cpp, maclc3.cpp, macquadra605.cpp: Add LC PDS slots to machines that have them. [R. Belmont] apple/sonora.cpp, apple/v8.cpp: Modernize slot/VIA2 IRQ inputs. [R. Belmont]
This commit is contained in:
parent
8d3545d731
commit
a938c60a4a
@ -2,7 +2,7 @@
|
||||
// copyright-holders:R. Belmont
|
||||
/***************************************************************************
|
||||
|
||||
NuBus and SE/30 PDS slot cards
|
||||
NuBus, SE/30 PDS, and LC PDS slot cards
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
@ -60,6 +60,11 @@ void mac_pds030_cards(device_slot_interface &device)
|
||||
device.option_add("ethermac30", PDS030_ETHERMAC30I); // Farallon EtherMac 30i Ethernet card
|
||||
}
|
||||
|
||||
void mac_pdslc_cards(device_slot_interface &device)
|
||||
{
|
||||
device.option_add("macconilc", PDSLC_MACCONILC); // Asante MacCON i LC Ethernet card
|
||||
}
|
||||
|
||||
// IIsi can take either one SE/30 PDS or one NuBus card
|
||||
void mac_iisi_cards(device_slot_interface &device)
|
||||
{
|
||||
|
@ -2,7 +2,7 @@
|
||||
// copyright-holders:R. Belmont
|
||||
/***************************************************************************
|
||||
|
||||
NuBus and SE/30 PDS slot cards
|
||||
NuBus, SE/30 PDS, and LC PDS slot cards
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
@ -13,6 +13,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_iisi_cards(device_slot_interface &device) ATTR_COLD;
|
||||
|
||||
#endif // MAME_BUS_NUBUS_CARDS_H
|
||||
|
@ -94,6 +94,7 @@ nubus_device::nubus_device(const machine_config &mconfig, device_type type, cons
|
||||
m_out_irqd_cb(*this),
|
||||
m_out_irqe_cb(*this)
|
||||
{
|
||||
m_addr_mask = 0xffffffff;
|
||||
}
|
||||
|
||||
nubus_device::~nubus_device()
|
||||
@ -116,7 +117,9 @@ void nubus_device::add_nubus_card(device_nubus_card_interface &card)
|
||||
template <typename R, typename W>
|
||||
void nubus_device::install_device(offs_t start, offs_t end, R rhandler, W whandler, uint32_t mask)
|
||||
{
|
||||
int buswidth = m_space->data_width();
|
||||
const int buswidth = m_space->data_width();
|
||||
start &= m_addr_mask;
|
||||
end &= m_addr_mask;
|
||||
switch(buswidth)
|
||||
{
|
||||
case 32:
|
||||
@ -146,7 +149,9 @@ template void nubus_device::install_device<read32smo_delegate, write32smo_delega
|
||||
template <typename R>
|
||||
void nubus_device::install_readonly_device(offs_t start, offs_t end, R rhandler, uint32_t mask)
|
||||
{
|
||||
int buswidth = m_space->data_width();
|
||||
const int buswidth = m_space->data_width();
|
||||
start &= m_addr_mask;
|
||||
end &= m_addr_mask;
|
||||
switch(buswidth)
|
||||
{
|
||||
case 32:
|
||||
@ -176,7 +181,9 @@ template void nubus_device::install_readonly_device<read32smo_delegate>(offs_t s
|
||||
template <typename W>
|
||||
void nubus_device::install_writeonly_device(offs_t start, offs_t end, W whandler, uint32_t mask)
|
||||
{
|
||||
int buswidth = m_space->data_width();
|
||||
const int buswidth = m_space->data_width();
|
||||
start &= m_addr_mask;
|
||||
end &= m_addr_mask;
|
||||
switch(buswidth)
|
||||
{
|
||||
case 32:
|
||||
@ -205,13 +212,15 @@ template void nubus_device::install_writeonly_device<write32smo_delegate>(offs_t
|
||||
|
||||
void nubus_device::install_bank(offs_t start, offs_t end, void *data)
|
||||
{
|
||||
// printf("install_bank: %s @ %x->%x\n", tag, start, end);
|
||||
start &= m_addr_mask;
|
||||
end &= m_addr_mask;
|
||||
m_space->install_ram(start, end, data);
|
||||
}
|
||||
|
||||
void nubus_device::install_view(offs_t start, offs_t end, memory_view &view)
|
||||
{
|
||||
// printf("install_view: %s @ %x->%x\n", tag, start, end);
|
||||
start &= m_addr_mask;
|
||||
end &= m_addr_mask;
|
||||
m_space->install_view(start, end, view);
|
||||
}
|
||||
|
||||
@ -274,7 +283,7 @@ void device_nubus_card_interface::interface_pre_start()
|
||||
}
|
||||
else if (!strncmp(m_nubus_slottag, "lcpds", 6))
|
||||
{
|
||||
m_slot = 0xe; // LC PDS slots phantom slot as NuBus slot $E
|
||||
m_slot = 0xe; // LC PDS phantom slots as slot $E in most cases
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -444,7 +453,6 @@ void device_nubus_card_interface::install_declaration_rom(const char *romregion,
|
||||
// now install the ROM
|
||||
uint32_t addr = get_slotspace() + 0x01000000;
|
||||
addr -= romlen;
|
||||
// printf("Installing ROM at %x, length %x\n", addr, romlen);
|
||||
if (mirror_all_mb) // mirror the declaration ROM across all 16 megs of the slot space
|
||||
{
|
||||
uint32_t off = 0;
|
||||
|
@ -129,6 +129,7 @@ public:
|
||||
void install_bank(offs_t start, offs_t end, void *data);
|
||||
void install_view(offs_t start, offs_t end, memory_view &view);
|
||||
void set_irq_line(int slot, int state);
|
||||
void set_address_mask(uint32_t mask) { m_addr_mask = mask; }
|
||||
|
||||
void irq9_w(int state);
|
||||
void irqa_w(int state);
|
||||
@ -154,6 +155,8 @@ protected:
|
||||
devcb_write_line m_out_irqe_cb;
|
||||
|
||||
std::vector<std::reference_wrapper<device_nubus_card_interface> > m_device_list;
|
||||
|
||||
uint32_t m_addr_mask;
|
||||
};
|
||||
|
||||
inline void device_nubus_card_interface::raise_slot_irq()
|
||||
|
@ -46,12 +46,17 @@ ROM_START( ethermac30i )
|
||||
ROM_LOAD( "5000118-00-01.bin", 0x000000, 0x004000, CRC(49a602ec) SHA1(65a8e87180a793cd54d30930cc030b95723369f1) )
|
||||
ROM_END
|
||||
|
||||
ROM_START( macconilc )
|
||||
ROM_REGION(0x4000, MAC8390_ROM_REGION, 0)
|
||||
ROM_LOAD( "asante_maccon_lc_mcilc_1.1.bin", 0x000000, 0x004000, CRC(b95940be) SHA1(317255bcb552ef43f43f85109706ed860baaf6dc) )
|
||||
ROM_END
|
||||
|
||||
class nubus_mac8390_device : public device_t,
|
||||
public device_nubus_card_interface
|
||||
{
|
||||
protected:
|
||||
// construction/destruction
|
||||
nubus_mac8390_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock);
|
||||
nubus_mac8390_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock);
|
||||
|
||||
// device-level overrides
|
||||
virtual void device_start() override;
|
||||
@ -61,39 +66,49 @@ protected:
|
||||
virtual void device_add_mconfig(machine_config &config) override;
|
||||
virtual const tiny_rom_entry *device_rom_region() const override;
|
||||
|
||||
uint8_t asntm3b_ram_r(offs_t offset);
|
||||
void asntm3b_ram_w(offs_t offset, uint8_t data);
|
||||
uint32_t dp_r(offs_t offset, uint32_t mem_mask = ~0);
|
||||
void dp_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0);
|
||||
u8 asntm3b_ram_r(offs_t offset);
|
||||
void asntm3b_ram_w(offs_t offset, u8 data);
|
||||
u32 dp_r(offs_t offset, u32 mem_mask = ~0);
|
||||
void dp_w(offs_t offset, u32 data, u32 mem_mask = ~0);
|
||||
|
||||
required_device<dp8390_device> m_dp83902;
|
||||
|
||||
private:
|
||||
void dp_irq_w(int state);
|
||||
uint8_t dp_mem_read(offs_t offset);
|
||||
void dp_mem_write(offs_t offset, uint8_t data);
|
||||
u8 dp_mem_read(offs_t offset);
|
||||
void dp_mem_write(offs_t offset, u8 data);
|
||||
|
||||
std::unique_ptr<u8[]> m_ram;
|
||||
uint8_t m_prom[16];
|
||||
u8 m_prom[16];
|
||||
};
|
||||
|
||||
class nubus_asntmc3nb_device : public nubus_mac8390_device
|
||||
{
|
||||
public:
|
||||
nubus_asntmc3nb_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
|
||||
nubus_asntmc3nb_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
|
||||
};
|
||||
|
||||
class nubus_appleenet_device : public nubus_mac8390_device
|
||||
{
|
||||
public:
|
||||
nubus_appleenet_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
|
||||
nubus_appleenet_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
|
||||
virtual const tiny_rom_entry *device_rom_region() const override;
|
||||
};
|
||||
|
||||
class pds030_ethermac30i_device : public nubus_mac8390_device
|
||||
{
|
||||
public:
|
||||
pds030_ethermac30i_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
|
||||
pds030_ethermac30i_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
|
||||
virtual const tiny_rom_entry *device_rom_region() const override;
|
||||
|
||||
protected:
|
||||
virtual void device_start() override;
|
||||
};
|
||||
|
||||
class pdslc_macconilc_device : public nubus_mac8390_device
|
||||
{
|
||||
public:
|
||||
pdslc_macconilc_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
|
||||
virtual const tiny_rom_entry *device_rom_region() const override;
|
||||
|
||||
protected:
|
||||
@ -123,33 +138,43 @@ const tiny_rom_entry *pds030_ethermac30i_device::device_rom_region() const
|
||||
return ROM_NAME( ethermac30i );
|
||||
}
|
||||
|
||||
nubus_mac8390_device::nubus_mac8390_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) :
|
||||
const tiny_rom_entry *pdslc_macconilc_device::device_rom_region() const
|
||||
{
|
||||
return ROM_NAME(macconilc);
|
||||
}
|
||||
|
||||
nubus_mac8390_device::nubus_mac8390_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) :
|
||||
device_t(mconfig, type, tag, owner, clock),
|
||||
device_nubus_card_interface(mconfig, *this),
|
||||
m_dp83902(*this, "dp83902")
|
||||
{
|
||||
}
|
||||
|
||||
nubus_asntmc3nb_device::nubus_asntmc3nb_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
|
||||
nubus_asntmc3nb_device::nubus_asntmc3nb_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) :
|
||||
nubus_mac8390_device(mconfig, NUBUS_ASNTMC3NB, tag, owner, clock)
|
||||
{
|
||||
}
|
||||
|
||||
nubus_appleenet_device::nubus_appleenet_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
|
||||
nubus_appleenet_device::nubus_appleenet_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) :
|
||||
nubus_mac8390_device(mconfig, NUBUS_APPLEENET, tag, owner, clock)
|
||||
{
|
||||
}
|
||||
|
||||
pds030_ethermac30i_device::pds030_ethermac30i_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
|
||||
pds030_ethermac30i_device::pds030_ethermac30i_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) :
|
||||
nubus_mac8390_device(mconfig, PDS030_ETHERMAC30I, tag, owner, clock)
|
||||
{
|
||||
}
|
||||
|
||||
pdslc_macconilc_device::pdslc_macconilc_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) :
|
||||
nubus_mac8390_device(mconfig, PDSLC_MACCONILC, tag, owner, clock)
|
||||
{
|
||||
}
|
||||
|
||||
void nubus_mac8390_device::device_start()
|
||||
{
|
||||
uint32_t slotspace;
|
||||
uint8_t mac[6];
|
||||
uint32_t num = machine().rand();
|
||||
const u32 slotspace = get_slotspace();
|
||||
u8 mac[6];
|
||||
u32 num = machine().rand();
|
||||
memset(m_prom, 0x57, 16);
|
||||
mac[2] = 0x1b;
|
||||
put_u24be(mac+3, num);
|
||||
@ -160,14 +185,12 @@ void nubus_mac8390_device::device_start()
|
||||
m_ram = std::make_unique<u8[]>(0x10000);
|
||||
save_pointer(NAME(m_ram), 0x10000);
|
||||
|
||||
install_declaration_rom(MAC8390_ROM_REGION, true);
|
||||
|
||||
slotspace = get_slotspace();
|
||||
install_declaration_rom(MAC8390_ROM_REGION);
|
||||
|
||||
// printf("[ASNTMC3NB %p] slotspace = %x\n", this, slotspace);
|
||||
|
||||
// TODO: move 24-bit mirroring down into nubus.cpp
|
||||
uint32_t ofs_24bit = slotno()<<20;
|
||||
u32 ofs_24bit = slotno()<<20;
|
||||
nubus().install_device(slotspace+0xd0000, slotspace+0xdffff, read8sm_delegate(*this, FUNC(nubus_mac8390_device::asntm3b_ram_r)), write8sm_delegate(*this, FUNC(nubus_mac8390_device::asntm3b_ram_w)));
|
||||
nubus().install_device(slotspace+0xe0000, slotspace+0xe003f, read32s_delegate(*this, FUNC(nubus_mac8390_device::dp_r)), write32s_delegate(*this, FUNC(nubus_mac8390_device::dp_w)));
|
||||
nubus().install_device(slotspace+0xd0000+ofs_24bit, slotspace+0xdffff+ofs_24bit, read8sm_delegate(*this, FUNC(nubus_mac8390_device::asntm3b_ram_r)), write8sm_delegate(*this, FUNC(nubus_mac8390_device::asntm3b_ram_w)));
|
||||
@ -181,25 +204,32 @@ void pds030_ethermac30i_device::device_start()
|
||||
nubus_mac8390_device::device_start();
|
||||
}
|
||||
|
||||
void pdslc_macconilc_device::device_start()
|
||||
{
|
||||
// this card is hardwired to slot E and the driver looks for it there
|
||||
set_pds_slot(0xe);
|
||||
nubus_mac8390_device::device_start();
|
||||
}
|
||||
|
||||
void nubus_mac8390_device::device_reset()
|
||||
{
|
||||
m_dp83902->dp8390_reset(0);
|
||||
memcpy(m_prom, m_dp83902->get_mac(), 6);
|
||||
}
|
||||
|
||||
void nubus_mac8390_device::asntm3b_ram_w(offs_t offset, uint8_t data)
|
||||
void nubus_mac8390_device::asntm3b_ram_w(offs_t offset, u8 data)
|
||||
{
|
||||
// printf("MC3NB: CPU wrote %02x to RAM @ %x\n", data, offset);
|
||||
m_ram[offset] = data;
|
||||
}
|
||||
|
||||
uint8_t nubus_mac8390_device::asntm3b_ram_r(offs_t offset)
|
||||
u8 nubus_mac8390_device::asntm3b_ram_r(offs_t offset)
|
||||
{
|
||||
// printf("MC3NB: CPU read %02x @ RAM %x\n", m_ram[offset], offset);
|
||||
return m_ram[offset];
|
||||
}
|
||||
|
||||
void nubus_mac8390_device::dp_w(offs_t offset, uint32_t data, uint32_t mem_mask)
|
||||
void nubus_mac8390_device::dp_w(offs_t offset, u32 data, u32 mem_mask)
|
||||
{
|
||||
if (mem_mask == 0xff000000)
|
||||
{
|
||||
@ -216,7 +246,7 @@ void nubus_mac8390_device::dp_w(offs_t offset, uint32_t data, uint32_t mem_mask)
|
||||
}
|
||||
}
|
||||
|
||||
uint32_t nubus_mac8390_device::dp_r(offs_t offset, uint32_t mem_mask)
|
||||
u32 nubus_mac8390_device::dp_r(offs_t offset, u32 mem_mask)
|
||||
{
|
||||
if (mem_mask == 0xff000000)
|
||||
{
|
||||
@ -246,13 +276,13 @@ void nubus_mac8390_device::dp_irq_w(int state)
|
||||
}
|
||||
}
|
||||
|
||||
uint8_t nubus_mac8390_device::dp_mem_read(offs_t offset)
|
||||
u8 nubus_mac8390_device::dp_mem_read(offs_t offset)
|
||||
{
|
||||
// printf("MC3NB: 8390 read RAM @ %x = %02x\n", offset, m_ram[offset]);
|
||||
return m_ram[offset];
|
||||
}
|
||||
|
||||
void nubus_mac8390_device::dp_mem_write(offs_t offset, uint8_t data)
|
||||
void nubus_mac8390_device::dp_mem_write(offs_t offset, u8 data)
|
||||
{
|
||||
// printf("MC3NB: 8390 wrote %02x to RAM @ %x\n", data, offset);
|
||||
m_ram[offset] = data;
|
||||
@ -263,3 +293,4 @@ void nubus_mac8390_device::dp_mem_write(offs_t offset, uint8_t data)
|
||||
DEFINE_DEVICE_TYPE_PRIVATE(NUBUS_ASNTMC3NB, device_nubus_card_interface, nubus_asntmc3nb_device, "nb_amc3b", "Asante MC3NB Ethernet card")
|
||||
DEFINE_DEVICE_TYPE_PRIVATE(NUBUS_APPLEENET, device_nubus_card_interface, nubus_appleenet_device, "nb_aenet", "Apple NuBus Ethernet card")
|
||||
DEFINE_DEVICE_TYPE_PRIVATE(PDS030_ETHERMAC30I, device_nubus_card_interface, pds030_ethermac30i_device, "pds30_emac", "Farallon EtherMac 30i-TH Ethernet card")
|
||||
DEFINE_DEVICE_TYPE_PRIVATE(PDSLC_MACCONILC, device_nubus_card_interface, pdslc_macconilc_device, "pdslc_macconlc", "Asante MacCON i LC Ethernet card")
|
||||
|
@ -11,5 +11,6 @@
|
||||
DECLARE_DEVICE_TYPE(NUBUS_ASNTMC3NB, device_nubus_card_interface)
|
||||
DECLARE_DEVICE_TYPE(NUBUS_APPLEENET, device_nubus_card_interface)
|
||||
DECLARE_DEVICE_TYPE(PDS030_ETHERMAC30I, device_nubus_card_interface)
|
||||
DECLARE_DEVICE_TYPE(PDSLC_MACCONILC, device_nubus_card_interface)
|
||||
|
||||
#endif // MAME_BUS_NUBUS_NUBUS_ASNTMC3B_H
|
||||
|
@ -22,6 +22,8 @@
|
||||
|
||||
#include "bus/nscsi/cd.h"
|
||||
#include "bus/nscsi/devices.h"
|
||||
#include "bus/nubus/cards.h"
|
||||
#include "bus/nubus/nubus.h"
|
||||
#include "bus/rs232/rs232.h"
|
||||
#include "cpu/m68000/m68020.h"
|
||||
#include "cpu/m68000/m68030.h"
|
||||
@ -358,6 +360,14 @@ void maclc_state::maclc_base(machine_config &config)
|
||||
m_v8->hdsel_callback().set(FUNC(maclc_state::hdsel_w));
|
||||
m_v8->hmmu_enable_callback().set(FUNC(maclc_state::set_hmmu));
|
||||
|
||||
nubus_device &nubus(NUBUS(config, "pds", 0));
|
||||
nubus.set_space(m_maincpu, AS_PROGRAM);
|
||||
nubus.set_address_mask(0x80ffffff);
|
||||
// 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);
|
||||
|
||||
EGRET(config, m_egret, XTAL(32'768));
|
||||
@ -459,6 +469,10 @@ void maclc_state::macclas2(machine_config &config)
|
||||
m_v8->pb5_callback().set(m_egret, FUNC(egret_device::set_sys_session));
|
||||
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");
|
||||
m_ram->set_extra_options("6M,8M,10M");
|
||||
m_v8->set_baseram_is_4M(true);
|
||||
|
@ -26,6 +26,8 @@
|
||||
|
||||
#include "bus/nscsi/cd.h"
|
||||
#include "bus/nscsi/devices.h"
|
||||
#include "bus/nubus/cards.h"
|
||||
#include "bus/nubus/nubus.h"
|
||||
#include "bus/rs232/rs232.h"
|
||||
#include "cpu/m68000/m68030.h"
|
||||
#include "machine/ram.h"
|
||||
@ -289,6 +291,14 @@ void macvail_state::maclc3_base(machine_config &config)
|
||||
m_sonora->set_maincpu_tag("maincpu");
|
||||
m_sonora->set_rom_tag("bootrom");
|
||||
|
||||
nubus_device &nubus(NUBUS(config, "pds", 0));
|
||||
nubus.set_space(m_maincpu, AS_PROGRAM);
|
||||
// LC III style PDS cards have slot IRQs $C, $D, and $E connected
|
||||
nubus.out_irqc_callback().set(m_sonora, FUNC(sonora_device::slot_irq_w<0x08>));
|
||||
nubus.out_irqd_callback().set(m_sonora, FUNC(sonora_device::slot_irq_w<0x10>));
|
||||
nubus.out_irqe_callback().set(m_sonora, FUNC(sonora_device::slot_irq_w<0x20>));
|
||||
NUBUS_SLOT(config, "lcpds", "pds", mac_pdslc_cards, nullptr);
|
||||
|
||||
MACADB(config, m_macadb, C15M);
|
||||
}
|
||||
|
||||
|
@ -25,6 +25,8 @@
|
||||
|
||||
#include "bus/nscsi/cd.h"
|
||||
#include "bus/nscsi/devices.h"
|
||||
#include "bus/nubus/cards.h"
|
||||
#include "bus/nubus/nubus.h"
|
||||
#include "bus/rs232/rs232.h"
|
||||
#include "cpu/m68000/m68040.h"
|
||||
#include "machine/ncr53c90.h"
|
||||
@ -219,6 +221,11 @@ void quadra605_state::macqd605(machine_config &config)
|
||||
m_primetime->pb5_callback().set(m_cuda, FUNC(cuda_device::set_tip));
|
||||
m_primetime->write_cb2().set(m_cuda, FUNC(cuda_device::set_via_data));
|
||||
|
||||
nubus_device &nubus(NUBUS(config, "pds", 0));
|
||||
nubus.set_space(m_maincpu, AS_PROGRAM);
|
||||
nubus.out_irqe_callback().set(m_primetime, FUNC(primetime_device::via2_irq_w<0x20>));
|
||||
NUBUS_SLOT(config, "lcpds", "pds", mac_pdslc_cards, nullptr);
|
||||
|
||||
/* internal ram */
|
||||
RAM(config, m_ram);
|
||||
m_ram->set_default_size("4M");
|
||||
|
@ -67,7 +67,7 @@ void sonora_device::map(address_map &map)
|
||||
void sonora_device::device_add_mconfig(machine_config &config)
|
||||
{
|
||||
MAC_VIDEO_SONORA(config, m_video);
|
||||
m_video->screen_vblank().set(FUNC(sonora_device::vbl_w));
|
||||
m_video->screen_vblank().set(FUNC(sonora_device::slot_irq_w<0x40>));
|
||||
|
||||
R65NC22(config, m_via1, C7M / 10);
|
||||
m_via1->readpa_handler().set(FUNC(sonora_device::via_in_a));
|
||||
@ -287,21 +287,29 @@ void sonora_device::scc_irq_w(int state)
|
||||
field_interrupts();
|
||||
}
|
||||
|
||||
void sonora_device::vbl_w(int state)
|
||||
template <u8 mask>
|
||||
void sonora_device::slot_irq_w(int state)
|
||||
{
|
||||
if (!state)
|
||||
if (state)
|
||||
{
|
||||
return;
|
||||
m_pseudovia_regs[2] &= ~mask;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_pseudovia_regs[2] |= mask;
|
||||
}
|
||||
|
||||
m_pseudovia_regs[2] &= ~0x40; // set vblank signal
|
||||
|
||||
if (m_pseudovia_regs[0x12] & 0x40)
|
||||
{
|
||||
pseudovia_recalc_irqs();
|
||||
}
|
||||
pseudovia_recalc_irqs();
|
||||
}
|
||||
|
||||
template void sonora_device::slot_irq_w<0x40>(int state);
|
||||
template void sonora_device::slot_irq_w<0x20>(int state);
|
||||
template void sonora_device::slot_irq_w<0x10>(int state);
|
||||
template void sonora_device::slot_irq_w<0x08>(int state);
|
||||
template void sonora_device::slot_irq_w<0x04>(int state);
|
||||
template void sonora_device::slot_irq_w<0x02>(int state);
|
||||
template void sonora_device::slot_irq_w<0x01>(int state);
|
||||
|
||||
void sonora_device::asc_irq(int state)
|
||||
{
|
||||
if (state == ASSERT_LINE)
|
||||
|
@ -40,7 +40,7 @@ public:
|
||||
|
||||
void cb1_w(int state);
|
||||
void cb2_w(int state);
|
||||
void vbl_w(int state);
|
||||
template <u8 mask> void slot_irq_w(int state);
|
||||
void scc_irq_w(int state);
|
||||
|
||||
protected:
|
||||
|
@ -97,7 +97,7 @@ void v8_device::device_add_mconfig(machine_config &config)
|
||||
m_screen->set_size(1024, 768);
|
||||
m_screen->set_visarea(0, 640 - 1, 0, 480 - 1);
|
||||
m_screen->set_screen_update(FUNC(v8_device::screen_update));
|
||||
m_screen->screen_vblank().set(FUNC(v8_device::vbl_w));
|
||||
m_screen->screen_vblank().set(FUNC(v8_device::slot_irq_w<0x40>));
|
||||
config.set_default_layout(layout_monitors);
|
||||
|
||||
PALETTE(config, m_palette).set_entries(256);
|
||||
@ -308,21 +308,29 @@ void v8_device::scc_irq_w(int state)
|
||||
field_interrupts();
|
||||
}
|
||||
|
||||
void v8_device::vbl_w(int state)
|
||||
template <u8 mask>
|
||||
void v8_device::slot_irq_w(int state)
|
||||
{
|
||||
if (!state)
|
||||
if (state)
|
||||
{
|
||||
return;
|
||||
m_pseudovia_regs[2] &= ~mask;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_pseudovia_regs[2] |= mask;
|
||||
}
|
||||
|
||||
m_pseudovia_regs[2] &= ~0x40; // set vblank signal
|
||||
|
||||
if (m_pseudovia_regs[0x12] & 0x40)
|
||||
{
|
||||
pseudovia_recalc_irqs();
|
||||
}
|
||||
pseudovia_recalc_irqs();
|
||||
}
|
||||
|
||||
template void v8_device::slot_irq_w<0x40>(int state);
|
||||
template void v8_device::slot_irq_w<0x20>(int state);
|
||||
template void v8_device::slot_irq_w<0x10>(int state);
|
||||
template void v8_device::slot_irq_w<0x08>(int state);
|
||||
template void v8_device::slot_irq_w<0x04>(int state);
|
||||
template void v8_device::slot_irq_w<0x02>(int state);
|
||||
template void v8_device::slot_irq_w<0x01>(int state);
|
||||
|
||||
void v8_device::asc_irq(int state)
|
||||
{
|
||||
if (state == ASSERT_LINE)
|
||||
@ -926,6 +934,7 @@ void spice_device::map(address_map &map)
|
||||
v8_device::map(map);
|
||||
|
||||
map(0x516000, 0x517fff).rw(FUNC(spice_device::swim_r), FUNC(spice_device::swim_w));
|
||||
map(0x518000, 0x518001).w(FUNC(spice_device::bright_contrast_w));
|
||||
}
|
||||
|
||||
static INPUT_PORTS_START(spice)
|
||||
@ -1150,3 +1159,10 @@ void spice_device::via_out_a(u8 data)
|
||||
}
|
||||
m_hdsel = hdsel;
|
||||
}
|
||||
|
||||
void spice_device::bright_contrast_w(offs_t offset, u8 data)
|
||||
{
|
||||
// offset 0 = brightness (0-255)
|
||||
// offset 1 = contrast (0-255)
|
||||
}
|
||||
|
||||
|
@ -39,7 +39,7 @@ public:
|
||||
|
||||
void cb1_w(int state);
|
||||
void cb2_w(int state);
|
||||
void vbl_w(int state);
|
||||
template <u8 mask> void slot_irq_w(int state);
|
||||
void scc_irq_w(int state);
|
||||
|
||||
protected:
|
||||
@ -157,6 +157,8 @@ private:
|
||||
void devsel_w(u8 devsel);
|
||||
u16 swim_r(offs_t offset, u16 mem_mask);
|
||||
void swim_w(offs_t offset, u16 data, u16 mem_mask);
|
||||
|
||||
void bright_contrast_w(offs_t offset, u8 data);
|
||||
};
|
||||
|
||||
// device type definition
|
||||
|
Loading…
Reference in New Issue
Block a user