mirror of
https://github.com/holub/mame
synced 2025-04-25 09:50:04 +03:00
nubus: cleanup to current practice (nw)
This commit is contained in:
parent
58d92d0b05
commit
ce34c6cc75
@ -96,13 +96,11 @@ void nubus_bootbug_device::device_start()
|
||||
{
|
||||
uint32_t slotspace;
|
||||
|
||||
// set_nubus_device makes m_slot valid
|
||||
set_nubus_device();
|
||||
install_declaration_rom(this, BOOTBUG_ROM_REGION);
|
||||
|
||||
slotspace = get_slotspace();
|
||||
|
||||
m_nubus->install_device(slotspace, slotspace+0xff, read32_delegate(FUNC(nubus_bootbug_device::dev_r), this), write32_delegate(FUNC(nubus_bootbug_device::dev_w), this));
|
||||
nubus().install_device(slotspace, slotspace+0xff, read32_delegate(FUNC(nubus_bootbug_device::dev_r), this), write32_delegate(FUNC(nubus_bootbug_device::dev_w), this));
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
|
@ -273,38 +273,52 @@ void device_nubus_card_interface::static_set_nubus_tag(device_t &device, const c
|
||||
nubus_card.m_nubus_slottag = slottag;
|
||||
}
|
||||
|
||||
void device_nubus_card_interface::set_nubus_device()
|
||||
void device_nubus_card_interface::interface_pre_start()
|
||||
{
|
||||
if (!strncmp(m_nubus_slottag, "pds030", 6))
|
||||
if (!m_nubus)
|
||||
{
|
||||
m_slot = 0x9; // '030 PDS slots phantom slot as NuBus slots $9, $A, and $B
|
||||
}
|
||||
else if (!strncmp(m_nubus_slottag, "lcpds", 6))
|
||||
{
|
||||
m_slot = 0xe; // LC PDS slots phantom slot as NuBus slot $E
|
||||
}
|
||||
else
|
||||
{
|
||||
// extract the slot number from the last digit of the slot tag
|
||||
int tlen = strlen(m_nubus_slottag);
|
||||
|
||||
if (m_nubus_slottag[tlen-1] == '9')
|
||||
if (!strncmp(m_nubus_slottag, "pds030", 6))
|
||||
{
|
||||
m_slot = (m_nubus_slottag[tlen-1] - '9') + 9;
|
||||
m_slot = 0x9; // '030 PDS slots phantom slot as NuBus slots $9, $A, and $B
|
||||
}
|
||||
else if (!strncmp(m_nubus_slottag, "lcpds", 6))
|
||||
{
|
||||
m_slot = 0xe; // LC PDS slots phantom slot as NuBus slot $E
|
||||
}
|
||||
else
|
||||
{
|
||||
m_slot = (m_nubus_slottag[tlen-1] - 'a') + 0xa;
|
||||
// extract the slot number from the last digit of the slot tag
|
||||
int tlen = strlen(m_nubus_slottag);
|
||||
|
||||
if (m_nubus_slottag[tlen-1] == '9')
|
||||
{
|
||||
m_slot = (m_nubus_slottag[tlen-1] - '9') + 9;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_slot = (m_nubus_slottag[tlen-1] - 'a') + 0xa;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (m_slot < 9 || m_slot > 0xe)
|
||||
{
|
||||
fatalerror("Slot %x out of range for Apple NuBus\n", m_slot);
|
||||
}
|
||||
if (m_slot < 9 || m_slot > 0xe)
|
||||
{
|
||||
fatalerror("Slot %x out of range for Apple NuBus\n", m_slot);
|
||||
}
|
||||
|
||||
m_nubus = dynamic_cast<nubus_device *>(device().machine().device(m_nubus_tag));
|
||||
m_nubus->add_nubus_card(this);
|
||||
device_t *const bus = device().machine().device(m_nubus_tag);
|
||||
if (!bus)
|
||||
{
|
||||
fatalerror("Can't find NuBus device %s\n", m_nubus_tag);
|
||||
}
|
||||
|
||||
m_nubus = dynamic_cast<nubus_device *>(bus);
|
||||
if (!m_nubus)
|
||||
{
|
||||
fatalerror("Device %s (%s) is not an instance of nubus_device\n", bus->tag(), bus->name());
|
||||
}
|
||||
|
||||
nubus().add_nubus_card(this);
|
||||
}
|
||||
}
|
||||
|
||||
void device_nubus_card_interface::install_bank(offs_t start, offs_t end, const char *tag, uint8_t *data)
|
||||
@ -316,7 +330,7 @@ void device_nubus_card_interface::install_bank(offs_t start, offs_t end, const c
|
||||
strcat(bank, "_");
|
||||
strcat(bank, m_nubus_slottag);
|
||||
|
||||
m_nubus->install_bank(start, end, bank, data);
|
||||
nubus().install_bank(start, end, bank, data);
|
||||
}
|
||||
|
||||
void device_nubus_card_interface::install_declaration_rom(device_t *dev, const char *romregion, bool mirror_all_mb, bool reverse_rom)
|
||||
@ -464,12 +478,12 @@ void device_nubus_card_interface::install_declaration_rom(device_t *dev, const c
|
||||
{
|
||||
uint32_t off = 0;
|
||||
while(off < 0x1000000) {
|
||||
m_nubus->install_bank(addr + off, addr+off+romlen-1, bankname, &m_declaration_rom[0]);
|
||||
nubus().install_bank(addr + off, addr+off+romlen-1, bankname, &m_declaration_rom[0]);
|
||||
off += romlen;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
m_nubus->install_bank(addr, addr+romlen-1, bankname, &m_declaration_rom[0]);
|
||||
nubus().install_bank(addr, addr+romlen-1, bankname, &m_declaration_rom[0]);
|
||||
}
|
||||
}
|
||||
|
@ -161,21 +161,24 @@ public:
|
||||
uint32_t get_slotspace() { return 0xf0000000 | (m_slot<<24); }
|
||||
uint32_t get_super_slotspace() { return m_slot<<28; }
|
||||
|
||||
void raise_slot_irq() { m_nubus->set_irq_line(m_slot, ASSERT_LINE); }
|
||||
void lower_slot_irq() { m_nubus->set_irq_line(m_slot, CLEAR_LINE); }
|
||||
void raise_slot_irq() { nubus().set_irq_line(m_slot, ASSERT_LINE); }
|
||||
void lower_slot_irq() { nubus().set_irq_line(m_slot, CLEAR_LINE); }
|
||||
|
||||
// inline configuration
|
||||
static void static_set_nubus_tag(device_t &device, const char *tag, const char *slottag);
|
||||
|
||||
protected:
|
||||
device_nubus_card_interface(const machine_config &mconfig, device_t &device);
|
||||
virtual void interface_pre_start() override;
|
||||
|
||||
int slotno() const { assert(m_nubus); return m_slot; }
|
||||
nubus_device &nubus() { assert(m_nubus); return *m_nubus; }
|
||||
|
||||
private:
|
||||
nubus_device *m_nubus;
|
||||
const char *m_nubus_tag, *m_nubus_slottag;
|
||||
int m_slot;
|
||||
std::vector<uint8_t> m_declaration_rom;
|
||||
|
||||
private:
|
||||
device_nubus_card_interface *m_next;
|
||||
};
|
||||
|
||||
|
@ -100,8 +100,6 @@ void jmfb_device::device_start()
|
||||
{
|
||||
uint32_t slotspace;
|
||||
|
||||
// set_nubus_device makes m_slot valid
|
||||
set_nubus_device();
|
||||
install_declaration_rom(this, GC48_ROM_REGION);
|
||||
|
||||
slotspace = get_slotspace();
|
||||
@ -111,7 +109,7 @@ void jmfb_device::device_start()
|
||||
m_vram.resize(VRAM_SIZE);
|
||||
install_bank(slotspace, slotspace+VRAM_SIZE-1, "bank_48gc", &m_vram[0]);
|
||||
|
||||
m_nubus->install_device(slotspace+0x200000, slotspace+0x2003ff, read32_delegate(FUNC(jmfb_device::mac_48gc_r), this), write32_delegate(FUNC(jmfb_device::mac_48gc_w), this));
|
||||
nubus().install_device(slotspace+0x200000, slotspace+0x2003ff, read32_delegate(FUNC(jmfb_device::mac_48gc_r), this), write32_delegate(FUNC(jmfb_device::mac_48gc_w), this));
|
||||
|
||||
m_timer = timer_alloc(0, nullptr);
|
||||
m_screen = nullptr; // can we look this up now?
|
||||
|
@ -101,8 +101,7 @@ void nubus_mac8390_device::device_start()
|
||||
mac[0] = mac[1] = 0; // avoid gcc warning
|
||||
memcpy(m_prom, mac, 6);
|
||||
m_dp83902->set_mac(mac);
|
||||
// set_nubus_device makes m_slot valid
|
||||
set_nubus_device();
|
||||
|
||||
install_declaration_rom(this, MAC8390_ROM_REGION, true);
|
||||
|
||||
slotspace = get_slotspace();
|
||||
@ -110,11 +109,11 @@ void nubus_mac8390_device::device_start()
|
||||
// printf("[ASNTMC3NB %p] slotspace = %x\n", this, slotspace);
|
||||
|
||||
// TODO: move 24-bit mirroring down into nubus.c
|
||||
uint32_t ofs_24bit = m_slot<<20;
|
||||
m_nubus->install_device(slotspace+0xd0000, slotspace+0xdffff, read8_delegate(FUNC(nubus_mac8390_device::asntm3b_ram_r), this), write8_delegate(FUNC(nubus_mac8390_device::asntm3b_ram_w), this));
|
||||
m_nubus->install_device(slotspace+0xe0000, slotspace+0xe003f, read32_delegate(FUNC(nubus_mac8390_device::en_r), this), write32_delegate(FUNC(nubus_mac8390_device::en_w), this));
|
||||
m_nubus->install_device(slotspace+0xd0000+ofs_24bit, slotspace+0xdffff+ofs_24bit, read8_delegate(FUNC(nubus_mac8390_device::asntm3b_ram_r), this), write8_delegate(FUNC(nubus_mac8390_device::asntm3b_ram_w), this));
|
||||
m_nubus->install_device(slotspace+0xe0000+ofs_24bit, slotspace+0xe003f+ofs_24bit, read32_delegate(FUNC(nubus_mac8390_device::en_r), this), write32_delegate(FUNC(nubus_mac8390_device::en_w), this));
|
||||
uint32_t ofs_24bit = slotno()<<20;
|
||||
nubus().install_device(slotspace+0xd0000, slotspace+0xdffff, read8_delegate(FUNC(nubus_mac8390_device::asntm3b_ram_r), this), write8_delegate(FUNC(nubus_mac8390_device::asntm3b_ram_w), this));
|
||||
nubus().install_device(slotspace+0xe0000, slotspace+0xe003f, read32_delegate(FUNC(nubus_mac8390_device::en_r), this), write32_delegate(FUNC(nubus_mac8390_device::en_w), this));
|
||||
nubus().install_device(slotspace+0xd0000+ofs_24bit, slotspace+0xdffff+ofs_24bit, read8_delegate(FUNC(nubus_mac8390_device::asntm3b_ram_r), this), write8_delegate(FUNC(nubus_mac8390_device::asntm3b_ram_w), this));
|
||||
nubus().install_device(slotspace+0xe0000+ofs_24bit, slotspace+0xe003f+ofs_24bit, read32_delegate(FUNC(nubus_mac8390_device::en_r), this), write32_delegate(FUNC(nubus_mac8390_device::en_w), this));
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
|
@ -85,8 +85,6 @@ void nubus_cb264_device::device_start()
|
||||
{
|
||||
uint32_t slotspace;
|
||||
|
||||
// set_nubus_device makes m_slot valid
|
||||
set_nubus_device();
|
||||
install_declaration_rom(this, CB264_ROM_REGION);
|
||||
|
||||
slotspace = get_slotspace();
|
||||
@ -96,8 +94,8 @@ void nubus_cb264_device::device_start()
|
||||
m_vram.resize(VRAM_SIZE);
|
||||
install_bank(slotspace, slotspace+VRAM_SIZE-1, "bank_cb264", &m_vram[0]);
|
||||
|
||||
m_nubus->install_device(slotspace+0xff6000, slotspace+0xff60ff, read32_delegate(FUNC(nubus_cb264_device::cb264_r), this), write32_delegate(FUNC(nubus_cb264_device::cb264_w), this));
|
||||
m_nubus->install_device(slotspace+0xff7000, slotspace+0xff70ff, read32_delegate(FUNC(nubus_cb264_device::cb264_ramdac_r), this), write32_delegate(FUNC(nubus_cb264_device::cb264_ramdac_w), this));
|
||||
nubus().install_device(slotspace+0xff6000, slotspace+0xff60ff, read32_delegate(FUNC(nubus_cb264_device::cb264_r), this), write32_delegate(FUNC(nubus_cb264_device::cb264_w), this));
|
||||
nubus().install_device(slotspace+0xff7000, slotspace+0xff70ff, read32_delegate(FUNC(nubus_cb264_device::cb264_ramdac_r), this), write32_delegate(FUNC(nubus_cb264_device::cb264_ramdac_w), this));
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
|
@ -172,8 +172,6 @@ void nubus_image_device::device_start()
|
||||
uint32_t slotspace;
|
||||
uint32_t superslotspace;
|
||||
|
||||
// set_nubus_device makes m_slot valid
|
||||
set_nubus_device();
|
||||
install_declaration_rom(this, IMAGE_ROM_REGION);
|
||||
|
||||
slotspace = get_slotspace();
|
||||
@ -181,13 +179,13 @@ void nubus_image_device::device_start()
|
||||
|
||||
// printf("[image %p] slotspace = %x, super = %x\n", this, slotspace, superslotspace);
|
||||
|
||||
m_nubus->install_device(slotspace, slotspace+3, read32_delegate(FUNC(nubus_image_device::image_r), this), write32_delegate(FUNC(nubus_image_device::image_w), this));
|
||||
m_nubus->install_device(slotspace+4, slotspace+7, read32_delegate(FUNC(nubus_image_device::image_status_r), this), write32_delegate(FUNC(nubus_image_device::image_status_w), this));
|
||||
m_nubus->install_device(slotspace+8, slotspace+11, read32_delegate(FUNC(nubus_image_device::file_cmd_r), this), write32_delegate(FUNC(nubus_image_device::file_cmd_w), this));
|
||||
m_nubus->install_device(slotspace+12, slotspace+15, read32_delegate(FUNC(nubus_image_device::file_data_r), this), write32_delegate(FUNC(nubus_image_device::file_data_w), this));
|
||||
m_nubus->install_device(slotspace+16, slotspace+19, read32_delegate(FUNC(nubus_image_device::file_len_r), this), write32_delegate(FUNC(nubus_image_device::file_len_w), this));
|
||||
m_nubus->install_device(slotspace+20, slotspace+147, read32_delegate(FUNC(nubus_image_device::file_name_r), this), write32_delegate(FUNC(nubus_image_device::file_name_w), this));
|
||||
m_nubus->install_device(superslotspace, superslotspace+((256*1024*1024)-1), read32_delegate(FUNC(nubus_image_device::image_super_r), this), write32_delegate(FUNC(nubus_image_device::image_super_w), this));
|
||||
nubus().install_device(slotspace, slotspace+3, read32_delegate(FUNC(nubus_image_device::image_r), this), write32_delegate(FUNC(nubus_image_device::image_w), this));
|
||||
nubus().install_device(slotspace+4, slotspace+7, read32_delegate(FUNC(nubus_image_device::image_status_r), this), write32_delegate(FUNC(nubus_image_device::image_status_w), this));
|
||||
nubus().install_device(slotspace+8, slotspace+11, read32_delegate(FUNC(nubus_image_device::file_cmd_r), this), write32_delegate(FUNC(nubus_image_device::file_cmd_w), this));
|
||||
nubus().install_device(slotspace+12, slotspace+15, read32_delegate(FUNC(nubus_image_device::file_data_r), this), write32_delegate(FUNC(nubus_image_device::file_data_w), this));
|
||||
nubus().install_device(slotspace+16, slotspace+19, read32_delegate(FUNC(nubus_image_device::file_len_r), this), write32_delegate(FUNC(nubus_image_device::file_len_w), this));
|
||||
nubus().install_device(slotspace+20, slotspace+147, read32_delegate(FUNC(nubus_image_device::file_name_r), this), write32_delegate(FUNC(nubus_image_device::file_name_w), this));
|
||||
nubus().install_device(superslotspace, superslotspace+((256*1024*1024)-1), read32_delegate(FUNC(nubus_image_device::image_super_r), this), write32_delegate(FUNC(nubus_image_device::image_super_w), this));
|
||||
|
||||
m_image = subdevice<messimg_disk_image_device>(IMAGE_DISK0_TAG);
|
||||
|
||||
|
@ -84,8 +84,6 @@ void nubus_m2hires_device::device_start()
|
||||
{
|
||||
uint32_t slotspace;
|
||||
|
||||
// set_nubus_device makes m_slot valid
|
||||
set_nubus_device();
|
||||
install_declaration_rom(this, M2HIRES_ROM_REGION, true);
|
||||
|
||||
slotspace = get_slotspace();
|
||||
@ -95,9 +93,9 @@ void nubus_m2hires_device::device_start()
|
||||
m_vram.resize(VRAM_SIZE);
|
||||
m_vram32 = (uint32_t *)&m_vram[0];
|
||||
|
||||
m_nubus->install_device(slotspace, slotspace+VRAM_SIZE-1, read32_delegate(FUNC(nubus_m2hires_device::vram_r), this), write32_delegate(FUNC(nubus_m2hires_device::vram_w), this));
|
||||
m_nubus->install_device(slotspace+0x900000, slotspace+VRAM_SIZE-1+0x900000, read32_delegate(FUNC(nubus_m2hires_device::vram_r), this), write32_delegate(FUNC(nubus_m2hires_device::vram_w), this));
|
||||
m_nubus->install_device(slotspace+0x80000, slotspace+0xeffff, read32_delegate(FUNC(nubus_m2hires_device::m2hires_r), this), write32_delegate(FUNC(nubus_m2hires_device::m2hires_w), this));
|
||||
nubus().install_device(slotspace, slotspace+VRAM_SIZE-1, read32_delegate(FUNC(nubus_m2hires_device::vram_r), this), write32_delegate(FUNC(nubus_m2hires_device::vram_w), this));
|
||||
nubus().install_device(slotspace+0x900000, slotspace+VRAM_SIZE-1+0x900000, read32_delegate(FUNC(nubus_m2hires_device::vram_r), this), write32_delegate(FUNC(nubus_m2hires_device::vram_w), this));
|
||||
nubus().install_device(slotspace+0x80000, slotspace+0xeffff, read32_delegate(FUNC(nubus_m2hires_device::m2hires_r), this), write32_delegate(FUNC(nubus_m2hires_device::m2hires_w), this));
|
||||
|
||||
m_timer = timer_alloc(0, nullptr);
|
||||
m_timer->adjust(screen().time_until_pos(479, 0), 0);
|
||||
|
@ -86,8 +86,6 @@ void nubus_m2video_device::device_start()
|
||||
{
|
||||
uint32_t slotspace;
|
||||
|
||||
// set_nubus_device makes m_slot valid
|
||||
set_nubus_device();
|
||||
install_declaration_rom(this, M2VIDEO_ROM_REGION, true, true);
|
||||
|
||||
slotspace = get_slotspace();
|
||||
@ -97,9 +95,9 @@ void nubus_m2video_device::device_start()
|
||||
m_vram.resize(VRAM_SIZE);
|
||||
m_vram32 = (uint32_t *)&m_vram[0];
|
||||
|
||||
m_nubus->install_device(slotspace, slotspace+VRAM_SIZE-1, read32_delegate(FUNC(nubus_m2video_device::vram_r), this), write32_delegate(FUNC(nubus_m2video_device::vram_w), this));
|
||||
m_nubus->install_device(slotspace+0x900000, slotspace+VRAM_SIZE-1+0x900000, read32_delegate(FUNC(nubus_m2video_device::vram_r), this), write32_delegate(FUNC(nubus_m2video_device::vram_w), this));
|
||||
m_nubus->install_device(slotspace+0x80000, slotspace+0xeffff, read32_delegate(FUNC(nubus_m2video_device::m2video_r), this), write32_delegate(FUNC(nubus_m2video_device::m2video_w), this));
|
||||
nubus().install_device(slotspace, slotspace+VRAM_SIZE-1, read32_delegate(FUNC(nubus_m2video_device::vram_r), this), write32_delegate(FUNC(nubus_m2video_device::vram_w), this));
|
||||
nubus().install_device(slotspace+0x900000, slotspace+VRAM_SIZE-1+0x900000, read32_delegate(FUNC(nubus_m2video_device::vram_r), this), write32_delegate(FUNC(nubus_m2video_device::vram_w), this));
|
||||
nubus().install_device(slotspace+0x80000, slotspace+0xeffff, read32_delegate(FUNC(nubus_m2video_device::m2video_r), this), write32_delegate(FUNC(nubus_m2video_device::m2video_w), this));
|
||||
|
||||
m_timer = timer_alloc(0, nullptr);
|
||||
m_timer->adjust(screen().time_until_pos(479, 0), 0);
|
||||
|
@ -87,8 +87,6 @@ void nubus_radiustpd_device::device_start()
|
||||
{
|
||||
uint32_t slotspace;
|
||||
|
||||
// set_nubus_device makes m_slot valid
|
||||
set_nubus_device();
|
||||
install_declaration_rom(this, RADIUSTPD_ROM_REGION, true, true);
|
||||
|
||||
slotspace = get_slotspace();
|
||||
@ -98,10 +96,10 @@ void nubus_radiustpd_device::device_start()
|
||||
m_vram.resize(VRAM_SIZE);
|
||||
m_vram32 = (uint32_t *)&m_vram[0];
|
||||
|
||||
m_nubus->install_device(slotspace, slotspace+VRAM_SIZE-1, read32_delegate(FUNC(nubus_radiustpd_device::vram_r), this), write32_delegate(FUNC(nubus_radiustpd_device::vram_w), this));
|
||||
m_nubus->install_device(slotspace+0x900000, slotspace+VRAM_SIZE-1+0x900000, read32_delegate(FUNC(nubus_radiustpd_device::vram_r), this), write32_delegate(FUNC(nubus_radiustpd_device::vram_w), this));
|
||||
m_nubus->install_device(slotspace+0x80000, slotspace+0xeffff, read32_delegate(FUNC(nubus_radiustpd_device::radiustpd_r), this), write32_delegate(FUNC(nubus_radiustpd_device::radiustpd_w), this));
|
||||
m_nubus->install_device(slotspace+0x980000, slotspace+0x9effff, read32_delegate(FUNC(nubus_radiustpd_device::radiustpd_r), this), write32_delegate(FUNC(nubus_radiustpd_device::radiustpd_w), this));
|
||||
nubus().install_device(slotspace, slotspace+VRAM_SIZE-1, read32_delegate(FUNC(nubus_radiustpd_device::vram_r), this), write32_delegate(FUNC(nubus_radiustpd_device::vram_w), this));
|
||||
nubus().install_device(slotspace+0x900000, slotspace+VRAM_SIZE-1+0x900000, read32_delegate(FUNC(nubus_radiustpd_device::vram_r), this), write32_delegate(FUNC(nubus_radiustpd_device::vram_w), this));
|
||||
nubus().install_device(slotspace+0x80000, slotspace+0xeffff, read32_delegate(FUNC(nubus_radiustpd_device::radiustpd_r), this), write32_delegate(FUNC(nubus_radiustpd_device::radiustpd_w), this));
|
||||
nubus().install_device(slotspace+0x980000, slotspace+0x9effff, read32_delegate(FUNC(nubus_radiustpd_device::radiustpd_r), this), write32_delegate(FUNC(nubus_radiustpd_device::radiustpd_w), this));
|
||||
|
||||
m_timer = timer_alloc(0, nullptr);
|
||||
m_timer->adjust(screen().time_until_pos(479, 0), 0);
|
||||
|
@ -89,8 +89,6 @@ void nubus_spec8s3_device::device_start()
|
||||
{
|
||||
uint32_t slotspace;
|
||||
|
||||
// set_nubus_device makes m_slot valid
|
||||
set_nubus_device();
|
||||
install_declaration_rom(this, SPEC8S3_ROM_REGION);
|
||||
|
||||
slotspace = get_slotspace();
|
||||
@ -99,9 +97,9 @@ void nubus_spec8s3_device::device_start()
|
||||
|
||||
m_vram.resize(VRAM_SIZE);
|
||||
m_vram32 = (uint32_t *)&m_vram[0];
|
||||
m_nubus->install_device(slotspace, slotspace+VRAM_SIZE-1, read32_delegate(FUNC(nubus_spec8s3_device::vram_r), this), write32_delegate(FUNC(nubus_spec8s3_device::vram_w), this));
|
||||
m_nubus->install_device(slotspace+0x900000, slotspace+VRAM_SIZE-1+0x900000, read32_delegate(FUNC(nubus_spec8s3_device::vram_r), this), write32_delegate(FUNC(nubus_spec8s3_device::vram_w), this));
|
||||
m_nubus->install_device(slotspace+0xd0000, slotspace+0xfffff, read32_delegate(FUNC(nubus_spec8s3_device::spec8s3_r), this), write32_delegate(FUNC(nubus_spec8s3_device::spec8s3_w), this));
|
||||
nubus().install_device(slotspace, slotspace+VRAM_SIZE-1, read32_delegate(FUNC(nubus_spec8s3_device::vram_r), this), write32_delegate(FUNC(nubus_spec8s3_device::vram_w), this));
|
||||
nubus().install_device(slotspace+0x900000, slotspace+VRAM_SIZE-1+0x900000, read32_delegate(FUNC(nubus_spec8s3_device::vram_r), this), write32_delegate(FUNC(nubus_spec8s3_device::vram_w), this));
|
||||
nubus().install_device(slotspace+0xd0000, slotspace+0xfffff, read32_delegate(FUNC(nubus_spec8s3_device::spec8s3_r), this), write32_delegate(FUNC(nubus_spec8s3_device::spec8s3_w), this));
|
||||
|
||||
m_timer = timer_alloc(0, nullptr);
|
||||
m_timer->adjust(screen().time_until_pos(767, 0), 0);
|
||||
|
@ -103,8 +103,6 @@ void nubus_specpdq_device::device_start()
|
||||
{
|
||||
uint32_t slotspace;
|
||||
|
||||
// set_nubus_device makes m_slot valid
|
||||
set_nubus_device();
|
||||
install_declaration_rom(this, SPECPDQ_ROM_REGION);
|
||||
|
||||
slotspace = get_slotspace();
|
||||
@ -113,8 +111,8 @@ void nubus_specpdq_device::device_start()
|
||||
|
||||
m_vram.resize(VRAM_SIZE);
|
||||
m_vram32 = (uint32_t *)&m_vram[0];
|
||||
m_nubus->install_device(slotspace, slotspace+VRAM_SIZE-1, read32_delegate(FUNC(nubus_specpdq_device::vram_r), this), write32_delegate(FUNC(nubus_specpdq_device::vram_w), this));
|
||||
m_nubus->install_device(slotspace+0x400000, slotspace+0xfbffff, read32_delegate(FUNC(nubus_specpdq_device::specpdq_r), this), write32_delegate(FUNC(nubus_specpdq_device::specpdq_w), this));
|
||||
nubus().install_device(slotspace, slotspace+VRAM_SIZE-1, read32_delegate(FUNC(nubus_specpdq_device::vram_r), this), write32_delegate(FUNC(nubus_specpdq_device::vram_w), this));
|
||||
nubus().install_device(slotspace+0x400000, slotspace+0xfbffff, read32_delegate(FUNC(nubus_specpdq_device::specpdq_r), this), write32_delegate(FUNC(nubus_specpdq_device::specpdq_w), this));
|
||||
|
||||
m_timer = timer_alloc(0, nullptr);
|
||||
m_timer->adjust(screen().time_until_pos(843, 0), 0);
|
||||
|
@ -81,8 +81,6 @@ void nubus_vikbw_device::device_start()
|
||||
{
|
||||
uint32_t slotspace;
|
||||
|
||||
// set_nubus_device makes m_slot valid
|
||||
set_nubus_device();
|
||||
install_declaration_rom(this, VIKBW_ROM_REGION, true);
|
||||
|
||||
slotspace = get_slotspace();
|
||||
@ -93,8 +91,8 @@ void nubus_vikbw_device::device_start()
|
||||
install_bank(slotspace+0x40000, slotspace+0x40000+VRAM_SIZE-1, "bank_vikbw", &m_vram[0]);
|
||||
install_bank(slotspace+0x940000, slotspace+0x940000+VRAM_SIZE-1, "bank_vikbw2", &m_vram[0]);
|
||||
|
||||
m_nubus->install_device(slotspace, slotspace+3, read32_delegate(FUNC(nubus_vikbw_device::viking_enable_r), this), write32_delegate(FUNC(nubus_vikbw_device::viking_disable_w), this));
|
||||
m_nubus->install_device(slotspace+0x80000, slotspace+0x80000+3, read32_delegate(FUNC(nubus_vikbw_device::viking_ack_r), this), write32_delegate(FUNC(nubus_vikbw_device::viking_ack_w), this));
|
||||
nubus().install_device(slotspace, slotspace+3, read32_delegate(FUNC(nubus_vikbw_device::viking_enable_r), this), write32_delegate(FUNC(nubus_vikbw_device::viking_disable_w), this));
|
||||
nubus().install_device(slotspace+0x80000, slotspace+0x80000+3, read32_delegate(FUNC(nubus_vikbw_device::viking_ack_r), this), write32_delegate(FUNC(nubus_vikbw_device::viking_ack_w), this));
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
|
@ -87,8 +87,6 @@ void nubus_wsportrait_device::device_start()
|
||||
{
|
||||
uint32_t slotspace;
|
||||
|
||||
// set_nubus_device makes m_slot valid
|
||||
set_nubus_device();
|
||||
install_declaration_rom(this, WSPORTRAIT_ROM_REGION, true);
|
||||
|
||||
slotspace = get_slotspace();
|
||||
@ -98,9 +96,9 @@ void nubus_wsportrait_device::device_start()
|
||||
m_vram.resize(VRAM_SIZE);
|
||||
m_vram32 = (uint32_t *)&m_vram[0];
|
||||
|
||||
m_nubus->install_device(slotspace, slotspace+VRAM_SIZE-1, read32_delegate(FUNC(nubus_wsportrait_device::vram_r), this), write32_delegate(FUNC(nubus_wsportrait_device::vram_w), this));
|
||||
m_nubus->install_device(slotspace+0x900000, slotspace+0x900000+VRAM_SIZE-1, read32_delegate(FUNC(nubus_wsportrait_device::vram_r), this), write32_delegate(FUNC(nubus_wsportrait_device::vram_w), this));
|
||||
m_nubus->install_device(slotspace+0x80000, slotspace+0xeffff, read32_delegate(FUNC(nubus_wsportrait_device::wsportrait_r), this), write32_delegate(FUNC(nubus_wsportrait_device::wsportrait_w), this));
|
||||
nubus().install_device(slotspace, slotspace+VRAM_SIZE-1, read32_delegate(FUNC(nubus_wsportrait_device::vram_r), this), write32_delegate(FUNC(nubus_wsportrait_device::vram_w), this));
|
||||
nubus().install_device(slotspace+0x900000, slotspace+0x900000+VRAM_SIZE-1, read32_delegate(FUNC(nubus_wsportrait_device::vram_r), this), write32_delegate(FUNC(nubus_wsportrait_device::vram_w), this));
|
||||
nubus().install_device(slotspace+0x80000, slotspace+0xeffff, read32_delegate(FUNC(nubus_wsportrait_device::wsportrait_r), this), write32_delegate(FUNC(nubus_wsportrait_device::wsportrait_w), this));
|
||||
|
||||
m_timer = timer_alloc(0, nullptr);
|
||||
m_timer->adjust(screen().time_until_pos(869, 0), 0);
|
||||
|
@ -87,8 +87,6 @@ void nubus_xceed30hr_device::device_start()
|
||||
{
|
||||
uint32_t slotspace;
|
||||
|
||||
// set_nubus_device makes m_slot valid
|
||||
set_nubus_device();
|
||||
install_declaration_rom(this, XCEED30HR_ROM_REGION);
|
||||
|
||||
slotspace = get_slotspace();
|
||||
@ -98,8 +96,8 @@ void nubus_xceed30hr_device::device_start()
|
||||
m_vram.resize(VRAM_SIZE);
|
||||
m_vram32 = (uint32_t *)&m_vram[0];
|
||||
|
||||
m_nubus->install_device(slotspace, slotspace+VRAM_SIZE-1, read32_delegate(FUNC(nubus_xceed30hr_device::vram_r), this), write32_delegate(FUNC(nubus_xceed30hr_device::vram_w), this));
|
||||
m_nubus->install_device(slotspace+0x800000, slotspace+0xefffff, read32_delegate(FUNC(nubus_xceed30hr_device::xceed30hr_r), this), write32_delegate(FUNC(nubus_xceed30hr_device::xceed30hr_w), this));
|
||||
nubus().install_device(slotspace, slotspace+VRAM_SIZE-1, read32_delegate(FUNC(nubus_xceed30hr_device::vram_r), this), write32_delegate(FUNC(nubus_xceed30hr_device::vram_w), this));
|
||||
nubus().install_device(slotspace+0x800000, slotspace+0xefffff, read32_delegate(FUNC(nubus_xceed30hr_device::xceed30hr_r), this), write32_delegate(FUNC(nubus_xceed30hr_device::xceed30hr_w), this));
|
||||
|
||||
m_timer = timer_alloc(0, nullptr);
|
||||
m_timer->adjust(screen().time_until_pos(479, 0), 0);
|
||||
|
@ -81,8 +81,6 @@ void nubus_cb264se30_device::device_start()
|
||||
{
|
||||
uint32_t slotspace;
|
||||
|
||||
// set_nubus_device makes m_slot valid
|
||||
set_nubus_device();
|
||||
install_declaration_rom(this, CB264SE30_ROM_REGION);
|
||||
|
||||
slotspace = get_slotspace();
|
||||
@ -92,8 +90,8 @@ void nubus_cb264se30_device::device_start()
|
||||
m_vram.resize(VRAM_SIZE);
|
||||
m_vram32 = (uint32_t *)&m_vram[0];
|
||||
|
||||
m_nubus->install_device(slotspace, slotspace+VRAM_SIZE-1, read32_delegate(FUNC(nubus_cb264se30_device::vram_r), this), write32_delegate(FUNC(nubus_cb264se30_device::vram_w), this));
|
||||
m_nubus->install_device(slotspace+0xf00000, slotspace+0xfeffff, read32_delegate(FUNC(nubus_cb264se30_device::cb264se30_r), this), write32_delegate(FUNC(nubus_cb264se30_device::cb264se30_w), this));
|
||||
nubus().install_device(slotspace, slotspace+VRAM_SIZE-1, read32_delegate(FUNC(nubus_cb264se30_device::vram_r), this), write32_delegate(FUNC(nubus_cb264se30_device::vram_w), this));
|
||||
nubus().install_device(slotspace+0xf00000, slotspace+0xfeffff, read32_delegate(FUNC(nubus_cb264se30_device::cb264se30_r), this), write32_delegate(FUNC(nubus_cb264se30_device::cb264se30_w), this));
|
||||
|
||||
m_timer = timer_alloc(0, nullptr);
|
||||
m_timer->adjust(screen().time_until_pos(479, 0), 0);
|
||||
|
@ -83,8 +83,6 @@ void nubus_xceedmc30_device::device_start()
|
||||
{
|
||||
uint32_t slotspace;
|
||||
|
||||
// set_nubus_device makes m_slot valid
|
||||
set_nubus_device();
|
||||
install_declaration_rom(this, XCEEDMC30_ROM_REGION);
|
||||
|
||||
slotspace = get_slotspace();
|
||||
@ -94,8 +92,8 @@ void nubus_xceedmc30_device::device_start()
|
||||
m_vram.resize(VRAM_SIZE);
|
||||
m_vram32 = (uint32_t *)&m_vram[0];
|
||||
|
||||
m_nubus->install_device(slotspace, slotspace+VRAM_SIZE-1, read32_delegate(FUNC(nubus_xceedmc30_device::vram_r), this), write32_delegate(FUNC(nubus_xceedmc30_device::vram_w), this));
|
||||
m_nubus->install_device(slotspace+0x800000, slotspace+0xefffff, read32_delegate(FUNC(nubus_xceedmc30_device::xceedmc30_r), this), write32_delegate(FUNC(nubus_xceedmc30_device::xceedmc30_w), this));
|
||||
nubus().install_device(slotspace, slotspace+VRAM_SIZE-1, read32_delegate(FUNC(nubus_xceedmc30_device::vram_r), this), write32_delegate(FUNC(nubus_xceedmc30_device::vram_w), this));
|
||||
nubus().install_device(slotspace+0x800000, slotspace+0xefffff, read32_delegate(FUNC(nubus_xceedmc30_device::xceedmc30_r), this), write32_delegate(FUNC(nubus_xceedmc30_device::xceedmc30_w), this));
|
||||
|
||||
m_timer = timer_alloc(0, nullptr);
|
||||
m_timer->adjust(screen().time_until_pos(479, 0), 0);
|
||||
|
@ -86,8 +86,6 @@ void nubus_procolor816_device::device_start()
|
||||
{
|
||||
uint32_t slotspace;
|
||||
|
||||
// set_nubus_device makes m_slot valid
|
||||
set_nubus_device();
|
||||
install_declaration_rom(this, PROCOLOR816_ROM_REGION);
|
||||
|
||||
slotspace = get_slotspace();
|
||||
@ -97,9 +95,9 @@ void nubus_procolor816_device::device_start()
|
||||
m_vram.resize(VRAM_SIZE);
|
||||
m_vram32 = (uint32_t *)&m_vram[0];
|
||||
|
||||
m_nubus->install_device(slotspace, slotspace+VRAM_SIZE-1, read32_delegate(FUNC(nubus_procolor816_device::vram_r), this), write32_delegate(FUNC(nubus_procolor816_device::vram_w), this));
|
||||
m_nubus->install_device(slotspace+0x900000, slotspace+VRAM_SIZE-1+0x900000, read32_delegate(FUNC(nubus_procolor816_device::vram_r), this), write32_delegate(FUNC(nubus_procolor816_device::vram_w), this));
|
||||
m_nubus->install_device(slotspace+0xf00000, slotspace+0xff7fff, read32_delegate(FUNC(nubus_procolor816_device::procolor816_r), this), write32_delegate(FUNC(nubus_procolor816_device::procolor816_w), this));
|
||||
nubus().install_device(slotspace, slotspace+VRAM_SIZE-1, read32_delegate(FUNC(nubus_procolor816_device::vram_r), this), write32_delegate(FUNC(nubus_procolor816_device::vram_w), this));
|
||||
nubus().install_device(slotspace+0x900000, slotspace+VRAM_SIZE-1+0x900000, read32_delegate(FUNC(nubus_procolor816_device::vram_r), this), write32_delegate(FUNC(nubus_procolor816_device::vram_w), this));
|
||||
nubus().install_device(slotspace+0xf00000, slotspace+0xff7fff, read32_delegate(FUNC(nubus_procolor816_device::procolor816_r), this), write32_delegate(FUNC(nubus_procolor816_device::procolor816_w), this));
|
||||
|
||||
m_timer = timer_alloc(0, nullptr);
|
||||
m_timer->adjust(screen().time_until_pos(479, 0), 0);
|
||||
|
@ -81,8 +81,6 @@ void nubus_lview_device::device_start()
|
||||
{
|
||||
uint32_t slotspace;
|
||||
|
||||
// set_nubus_device makes m_slot valid
|
||||
set_nubus_device();
|
||||
install_declaration_rom(this, LVIEW_ROM_REGION);
|
||||
|
||||
slotspace = get_slotspace();
|
||||
@ -92,9 +90,9 @@ void nubus_lview_device::device_start()
|
||||
m_vram.resize(VRAM_SIZE);
|
||||
m_vram32 = (uint32_t *)&m_vram[0];
|
||||
|
||||
m_nubus->install_device(slotspace, slotspace+VRAM_SIZE-1, read32_delegate(FUNC(nubus_lview_device::vram_r), this), write32_delegate(FUNC(nubus_lview_device::vram_w), this));
|
||||
m_nubus->install_device(slotspace+0x900000, slotspace+VRAM_SIZE-1+0x900000, read32_delegate(FUNC(nubus_lview_device::vram_r), this), write32_delegate(FUNC(nubus_lview_device::vram_w), this));
|
||||
m_nubus->install_device(slotspace+0xb0000, slotspace+0xbffff, read32_delegate(FUNC(nubus_lview_device::lview_r), this), write32_delegate(FUNC(nubus_lview_device::lview_w), this));
|
||||
nubus().install_device(slotspace, slotspace+VRAM_SIZE-1, read32_delegate(FUNC(nubus_lview_device::vram_r), this), write32_delegate(FUNC(nubus_lview_device::vram_w), this));
|
||||
nubus().install_device(slotspace+0x900000, slotspace+VRAM_SIZE-1+0x900000, read32_delegate(FUNC(nubus_lview_device::vram_r), this), write32_delegate(FUNC(nubus_lview_device::vram_w), this));
|
||||
nubus().install_device(slotspace+0xb0000, slotspace+0xbffff, read32_delegate(FUNC(nubus_lview_device::lview_r), this), write32_delegate(FUNC(nubus_lview_device::lview_w), this));
|
||||
|
||||
m_timer = timer_alloc(0, nullptr);
|
||||
m_timer->adjust(screen().time_until_pos(599, 0), 0);
|
||||
|
@ -104,13 +104,11 @@ void nubus_quadralink_device::device_start()
|
||||
{
|
||||
uint32_t slotspace;
|
||||
|
||||
// set_nubus_device makes m_slot valid
|
||||
set_nubus_device();
|
||||
install_declaration_rom(this, QUADRALINK_ROM_REGION);
|
||||
|
||||
slotspace = get_slotspace();
|
||||
|
||||
m_nubus->install_device(slotspace, slotspace+0xefffff, read32_delegate(FUNC(nubus_quadralink_device::dev_r), this), write32_delegate(FUNC(nubus_quadralink_device::dev_w), this));
|
||||
nubus().install_device(slotspace, slotspace+0xefffff, read32_delegate(FUNC(nubus_quadralink_device::dev_r), this), write32_delegate(FUNC(nubus_quadralink_device::dev_w), this));
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user