emumem: Get rid of the install_* return value [O. Galibert]

This commit is contained in:
Olivier Galibert 2016-05-13 15:19:02 +02:00 committed by Olivier Galibert
parent b46bb13522
commit 8d0d9e1fb0
46 changed files with 301 additions and 234 deletions

View File

@ -2460,7 +2460,7 @@ void *address_space::install_ram_generic(offs_t addrstart, offs_t addrend, offs_
// delegate handlers for the space
//-------------------------------------------------
UINT8 *address_space::install_read_handler(offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, read8_delegate handler, UINT64 unitmask)
void address_space::install_read_handler(offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, read8_delegate handler, UINT64 unitmask)
{
VPRINTF(("address_space::install_read_handler(%s-%s mask=%s mirror=%s, %s, %s)\n",
core_i64_hex_format(addrstart, m_addrchars), core_i64_hex_format(addrend, m_addrchars),
@ -2469,10 +2469,9 @@ UINT8 *address_space::install_read_handler(offs_t addrstart, offs_t addrend, off
read().handler_map_range(addrstart, addrend, addrmask, addrmirror, unitmask).set_delegate(handler);
generate_memdump(machine());
return reinterpret_cast<UINT8 *>(find_backing_memory(addrstart, addrend));
}
UINT8 *address_space::install_write_handler(offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, write8_delegate handler, UINT64 unitmask)
void address_space::install_write_handler(offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, write8_delegate handler, UINT64 unitmask)
{
VPRINTF(("address_space::install_write_handler(%s-%s mask=%s mirror=%s, %s, %s)\n",
core_i64_hex_format(addrstart, m_addrchars), core_i64_hex_format(addrend, m_addrchars),
@ -2481,13 +2480,12 @@ UINT8 *address_space::install_write_handler(offs_t addrstart, offs_t addrend, of
write().handler_map_range(addrstart, addrend, addrmask, addrmirror, unitmask).set_delegate(handler);
generate_memdump(machine());
return reinterpret_cast<UINT8 *>(find_backing_memory(addrstart, addrend));
}
UINT8 *address_space::install_readwrite_handler(offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, read8_delegate rhandler, write8_delegate whandler, UINT64 unitmask)
void address_space::install_readwrite_handler(offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, read8_delegate rhandler, write8_delegate whandler, UINT64 unitmask)
{
install_read_handler(addrstart, addrend, addrmask, addrmirror, rhandler, unitmask);
return install_write_handler(addrstart, addrend, addrmask, addrmirror, whandler, unitmask);
install_write_handler(addrstart, addrend, addrmask, addrmirror, whandler, unitmask);
}
@ -2496,24 +2494,22 @@ UINT8 *address_space::install_readwrite_handler(offs_t addrstart, offs_t addrend
// delegate handlers for the space
//-------------------------------------------------
UINT16 *address_space::install_read_handler(offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, read16_delegate handler, UINT64 unitmask)
void address_space::install_read_handler(offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, read16_delegate handler, UINT64 unitmask)
{
read().handler_map_range(addrstart, addrend, addrmask, addrmirror, unitmask).set_delegate(handler);
generate_memdump(machine());
return reinterpret_cast<UINT16 *>(find_backing_memory(addrstart, addrend));
}
UINT16 *address_space::install_write_handler(offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, write16_delegate handler, UINT64 unitmask)
void address_space::install_write_handler(offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, write16_delegate handler, UINT64 unitmask)
{
write().handler_map_range(addrstart, addrend, addrmask, addrmirror, unitmask).set_delegate(handler);
generate_memdump(machine());
return reinterpret_cast<UINT16 *>(find_backing_memory(addrstart, addrend));
}
UINT16 *address_space::install_readwrite_handler(offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, read16_delegate rhandler, write16_delegate whandler, UINT64 unitmask)
void address_space::install_readwrite_handler(offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, read16_delegate rhandler, write16_delegate whandler, UINT64 unitmask)
{
install_read_handler(addrstart, addrend, addrmask, addrmirror, rhandler, unitmask);
return install_write_handler(addrstart, addrend, addrmask, addrmirror, whandler, unitmask);
install_write_handler(addrstart, addrend, addrmask, addrmirror, whandler, unitmask);
}
@ -2522,24 +2518,22 @@ UINT16 *address_space::install_readwrite_handler(offs_t addrstart, offs_t addren
// delegate handlers for the space
//-------------------------------------------------
UINT32 *address_space::install_read_handler(offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, read32_delegate handler, UINT64 unitmask)
void address_space::install_read_handler(offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, read32_delegate handler, UINT64 unitmask)
{
read().handler_map_range(addrstart, addrend, addrmask, addrmirror, unitmask).set_delegate(handler);
generate_memdump(machine());
return reinterpret_cast<UINT32 *>(find_backing_memory(addrstart, addrend));
}
UINT32 *address_space::install_write_handler(offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, write32_delegate handler, UINT64 unitmask)
void address_space::install_write_handler(offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, write32_delegate handler, UINT64 unitmask)
{
write().handler_map_range(addrstart, addrend, addrmask, addrmirror, unitmask).set_delegate(handler);
generate_memdump(machine());
return reinterpret_cast<UINT32 *>(find_backing_memory(addrstart, addrend));
}
UINT32 *address_space::install_readwrite_handler(offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, read32_delegate rhandler, write32_delegate whandler, UINT64 unitmask)
void address_space::install_readwrite_handler(offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, read32_delegate rhandler, write32_delegate whandler, UINT64 unitmask)
{
install_read_handler(addrstart, addrend, addrmask, addrmirror, rhandler, unitmask);
return install_write_handler(addrstart, addrend, addrmask, addrmirror, whandler, unitmask);
install_write_handler(addrstart, addrend, addrmask, addrmirror, whandler, unitmask);
}
@ -2548,24 +2542,22 @@ UINT32 *address_space::install_readwrite_handler(offs_t addrstart, offs_t addren
// delegate handlers for the space
//-------------------------------------------------
UINT64 *address_space::install_read_handler(offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, read64_delegate handler, UINT64 unitmask)
void address_space::install_read_handler(offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, read64_delegate handler, UINT64 unitmask)
{
read().handler_map_range(addrstart, addrend, addrmask, addrmirror, unitmask).set_delegate(handler);
generate_memdump(machine());
return reinterpret_cast<UINT64 *>(find_backing_memory(addrstart, addrend));
}
UINT64 *address_space::install_write_handler(offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, write64_delegate handler, UINT64 unitmask)
void address_space::install_write_handler(offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, write64_delegate handler, UINT64 unitmask)
{
write().handler_map_range(addrstart, addrend, addrmask, addrmirror, unitmask).set_delegate(handler);
generate_memdump(machine());
return reinterpret_cast<UINT64 *>(find_backing_memory(addrstart, addrend));
}
UINT64 *address_space::install_readwrite_handler(offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, read64_delegate rhandler, write64_delegate whandler, UINT64 unitmask)
void address_space::install_readwrite_handler(offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, read64_delegate rhandler, write64_delegate whandler, UINT64 unitmask)
{
install_read_handler(addrstart, addrend, addrmask, addrmirror, rhandler, unitmask);
return install_write_handler(addrstart, addrend, addrmask, addrmirror, whandler, unitmask);
install_write_handler(addrstart, addrend, addrmask, addrmirror, whandler, unitmask);
}

View File

@ -379,9 +379,9 @@ public:
void install_read_bank(offs_t addrstart, offs_t addrend, memory_bank *bank) { install_read_bank(addrstart, addrend, 0, 0, bank); }
void install_write_bank(offs_t addrstart, offs_t addrend, memory_bank *bank) { install_write_bank(addrstart, addrend, 0, 0, bank); }
void install_readwrite_bank(offs_t addrstart, offs_t addrend, memory_bank *bank) { install_readwrite_bank(addrstart, addrend, 0, 0, bank); }
void *install_rom(offs_t addrstart, offs_t addrend, void *baseptr = nullptr) { return install_rom(addrstart, addrend, 0, 0, baseptr); }
void *install_writeonly(offs_t addrstart, offs_t addrend, void *baseptr = nullptr) { return install_writeonly(addrstart, addrend, 0, 0, baseptr); }
void *install_ram(offs_t addrstart, offs_t addrend, void *baseptr = nullptr) { return install_ram(addrstart, addrend, 0, 0, baseptr); }
void install_rom(offs_t addrstart, offs_t addrend, void *baseptr = nullptr) { install_rom(addrstart, addrend, 0, 0, baseptr); }
void install_writeonly(offs_t addrstart, offs_t addrend, void *baseptr = nullptr) { install_writeonly(addrstart, addrend, 0, 0, baseptr); }
void install_ram(offs_t addrstart, offs_t addrend, void *baseptr = nullptr) { install_ram(addrstart, addrend, 0, 0, baseptr); }
// install ports, banks, RAM (with mirror/mask)
void install_read_port(offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, const char *rtag) { install_readwrite_port(addrstart, addrend, addrmask, addrmirror, rtag, nullptr); }
@ -393,9 +393,9 @@ public:
void install_read_bank(offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, memory_bank *bank) { install_bank_generic(addrstart, addrend, addrmask, addrmirror, bank, nullptr); }
void install_write_bank(offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, memory_bank *bank) { install_bank_generic(addrstart, addrend, addrmask, addrmirror, nullptr, bank); }
void install_readwrite_bank(offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, memory_bank *bank) { install_bank_generic(addrstart, addrend, addrmask, addrmirror, bank, bank); }
void *install_rom(offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, void *baseptr = nullptr) { return install_ram_generic(addrstart, addrend, addrmask, addrmirror, ROW_READ, baseptr); }
void *install_writeonly(offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, void *baseptr = nullptr) { return install_ram_generic(addrstart, addrend, addrmask, addrmirror, ROW_WRITE, baseptr); }
void *install_ram(offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, void *baseptr = nullptr) { return install_ram_generic(addrstart, addrend, addrmask, addrmirror, ROW_READWRITE, baseptr); }
void install_rom(offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, void *baseptr = nullptr) { install_ram_generic(addrstart, addrend, addrmask, addrmirror, ROW_READ, baseptr); }
void install_writeonly(offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, void *baseptr = nullptr) { install_ram_generic(addrstart, addrend, addrmask, addrmirror, ROW_WRITE, baseptr); }
void install_ram(offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, void *baseptr = nullptr) { install_ram_generic(addrstart, addrend, addrmask, addrmirror, ROW_READWRITE, baseptr); }
// install device memory maps
template <typename T> void install_device(offs_t addrstart, offs_t addrend, T &device, void (T::*map)(address_map &map, device_t &device), int bits = 0, UINT64 unitmask = 0) {
@ -406,36 +406,36 @@ public:
void install_device_delegate(offs_t addrstart, offs_t addrend, device_t &device, address_map_delegate &map, int bits = 0, UINT64 unitmask = 0);
// install setoffset handler
void install_setoffset_handler(offs_t addrstart, offs_t addrend, setoffset_delegate sohandler, UINT64 unitmask = 0) { return install_setoffset_handler(addrstart, addrend, 0, 0, sohandler, unitmask); }
void install_setoffset_handler(offs_t addrstart, offs_t addrend, setoffset_delegate sohandler, UINT64 unitmask = 0) { install_setoffset_handler(addrstart, addrend, 0, 0, sohandler, unitmask); }
void install_setoffset_handler(offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, setoffset_delegate sohandler, UINT64 unitmask = 0);
// install new-style delegate handlers (short form)
UINT8 *install_read_handler(offs_t addrstart, offs_t addrend, read8_delegate rhandler, UINT64 unitmask = 0) { return install_read_handler(addrstart, addrend, 0, 0, rhandler, unitmask); }
UINT8 *install_write_handler(offs_t addrstart, offs_t addrend, write8_delegate whandler, UINT64 unitmask = 0) { return install_write_handler(addrstart, addrend, 0, 0, whandler, unitmask); }
UINT8 *install_readwrite_handler(offs_t addrstart, offs_t addrend, read8_delegate rhandler, write8_delegate whandler, UINT64 unitmask = 0) { return install_readwrite_handler(addrstart, addrend, 0, 0, rhandler, whandler, unitmask); }
UINT16 *install_read_handler(offs_t addrstart, offs_t addrend, read16_delegate rhandler, UINT64 unitmask = 0) { return install_read_handler(addrstart, addrend, 0, 0, rhandler, unitmask); }
UINT16 *install_write_handler(offs_t addrstart, offs_t addrend, write16_delegate whandler, UINT64 unitmask = 0) { return install_write_handler(addrstart, addrend, 0, 0, whandler, unitmask); }
UINT16 *install_readwrite_handler(offs_t addrstart, offs_t addrend, read16_delegate rhandler, write16_delegate whandler, UINT64 unitmask = 0) { return install_readwrite_handler(addrstart, addrend, 0, 0, rhandler, whandler, unitmask); }
UINT32 *install_read_handler(offs_t addrstart, offs_t addrend, read32_delegate rhandler, UINT64 unitmask = 0) { return install_read_handler(addrstart, addrend, 0, 0, rhandler, unitmask); }
UINT32 *install_write_handler(offs_t addrstart, offs_t addrend, write32_delegate whandler, UINT64 unitmask = 0) { return install_write_handler(addrstart, addrend, 0, 0, whandler, unitmask); }
UINT32 *install_readwrite_handler(offs_t addrstart, offs_t addrend, read32_delegate rhandler, write32_delegate whandler, UINT64 unitmask = 0) { return install_readwrite_handler(addrstart, addrend, 0, 0, rhandler, whandler, unitmask); }
UINT64 *install_read_handler(offs_t addrstart, offs_t addrend, read64_delegate rhandler, UINT64 unitmask = 0) { return install_read_handler(addrstart, addrend, 0, 0, rhandler, unitmask); }
UINT64 *install_write_handler(offs_t addrstart, offs_t addrend, write64_delegate whandler, UINT64 unitmask = 0) { return install_write_handler(addrstart, addrend, 0, 0, whandler, unitmask); }
UINT64 *install_readwrite_handler(offs_t addrstart, offs_t addrend, read64_delegate rhandler, write64_delegate whandler, UINT64 unitmask = 0) { return install_readwrite_handler(addrstart, addrend, 0, 0, rhandler, whandler, unitmask); }
void install_read_handler(offs_t addrstart, offs_t addrend, read8_delegate rhandler, UINT64 unitmask = 0) { install_read_handler(addrstart, addrend, 0, 0, rhandler, unitmask); }
void install_write_handler(offs_t addrstart, offs_t addrend, write8_delegate whandler, UINT64 unitmask = 0) { install_write_handler(addrstart, addrend, 0, 0, whandler, unitmask); }
void install_readwrite_handler(offs_t addrstart, offs_t addrend, read8_delegate rhandler, write8_delegate whandler, UINT64 unitmask = 0) { return install_readwrite_handler(addrstart, addrend, 0, 0, rhandler, whandler, unitmask); }
void install_read_handler(offs_t addrstart, offs_t addrend, read16_delegate rhandler, UINT64 unitmask = 0) { install_read_handler(addrstart, addrend, 0, 0, rhandler, unitmask); }
void install_write_handler(offs_t addrstart, offs_t addrend, write16_delegate whandler, UINT64 unitmask = 0) { install_write_handler(addrstart, addrend, 0, 0, whandler, unitmask); }
void install_readwrite_handler(offs_t addrstart, offs_t addrend, read16_delegate rhandler, write16_delegate whandler, UINT64 unitmask = 0) { return install_readwrite_handler(addrstart, addrend, 0, 0, rhandler, whandler, unitmask); }
void install_read_handler(offs_t addrstart, offs_t addrend, read32_delegate rhandler, UINT64 unitmask = 0) { install_read_handler(addrstart, addrend, 0, 0, rhandler, unitmask); }
void install_write_handler(offs_t addrstart, offs_t addrend, write32_delegate whandler, UINT64 unitmask = 0) { install_write_handler(addrstart, addrend, 0, 0, whandler, unitmask); }
void install_readwrite_handler(offs_t addrstart, offs_t addrend, read32_delegate rhandler, write32_delegate whandler, UINT64 unitmask = 0) { return install_readwrite_handler(addrstart, addrend, 0, 0, rhandler, whandler, unitmask); }
void install_read_handler(offs_t addrstart, offs_t addrend, read64_delegate rhandler, UINT64 unitmask = 0) { install_read_handler(addrstart, addrend, 0, 0, rhandler, unitmask); }
void install_write_handler(offs_t addrstart, offs_t addrend, write64_delegate whandler, UINT64 unitmask = 0) { install_write_handler(addrstart, addrend, 0, 0, whandler, unitmask); }
void install_readwrite_handler(offs_t addrstart, offs_t addrend, read64_delegate rhandler, write64_delegate whandler, UINT64 unitmask = 0) { install_readwrite_handler(addrstart, addrend, 0, 0, rhandler, whandler, unitmask); }
// install new-style delegate handlers (with mirror/mask)
UINT8 *install_read_handler(offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, read8_delegate rhandler, UINT64 unitmask = 0);
UINT8 *install_write_handler(offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, write8_delegate whandler, UINT64 unitmask = 0);
UINT8 *install_readwrite_handler(offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, read8_delegate rhandler, write8_delegate whandler, UINT64 unitmask = 0);
UINT16 *install_read_handler(offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, read16_delegate rhandler, UINT64 unitmask = 0);
UINT16 *install_write_handler(offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, write16_delegate whandler, UINT64 unitmask = 0);
UINT16 *install_readwrite_handler(offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, read16_delegate rhandler, write16_delegate whandler, UINT64 unitmask = 0);
UINT32 *install_read_handler(offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, read32_delegate rhandler, UINT64 unitmask = 0);
UINT32 *install_write_handler(offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, write32_delegate whandler, UINT64 unitmask = 0);
UINT32 *install_readwrite_handler(offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, read32_delegate rhandler, write32_delegate whandler, UINT64 unitmask = 0);
UINT64 *install_read_handler(offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, read64_delegate rhandler, UINT64 unitmask = 0);
UINT64 *install_write_handler(offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, write64_delegate whandler, UINT64 unitmask = 0);
UINT64 *install_readwrite_handler(offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, read64_delegate rhandler, write64_delegate whandler, UINT64 unitmask = 0);
void install_read_handler(offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, read8_delegate rhandler, UINT64 unitmask = 0);
void install_write_handler(offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, write8_delegate whandler, UINT64 unitmask = 0);
void install_readwrite_handler(offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, read8_delegate rhandler, write8_delegate whandler, UINT64 unitmask = 0);
void install_read_handler(offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, read16_delegate rhandler, UINT64 unitmask = 0);
void install_write_handler(offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, write16_delegate whandler, UINT64 unitmask = 0);
void install_readwrite_handler(offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, read16_delegate rhandler, write16_delegate whandler, UINT64 unitmask = 0);
void install_read_handler(offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, read32_delegate rhandler, UINT64 unitmask = 0);
void install_write_handler(offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, write32_delegate whandler, UINT64 unitmask = 0);
void install_readwrite_handler(offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, read32_delegate rhandler, write32_delegate whandler, UINT64 unitmask = 0);
void install_read_handler(offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, read64_delegate rhandler, UINT64 unitmask = 0);
void install_write_handler(offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, write64_delegate whandler, UINT64 unitmask = 0);
void install_readwrite_handler(offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, read64_delegate rhandler, write64_delegate whandler, UINT64 unitmask = 0);
// setup
void prepare_map();

View File

@ -114,12 +114,14 @@ const device_type ATARI_CAGE = &device_creator<atari_cage_device>;
atari_cage_device::atari_cage_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
device_t(mconfig, ATARI_CAGE, "Atari CAGE", tag, owner, clock, "atari_cage", __FILE__),
m_cageram(*this, "cageram"),
m_irqhandler(*this)
{
}
atari_cage_device::atari_cage_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) :
device_t(mconfig, type, name, tag, owner, clock, shortname, source),
m_cageram(*this, "cageram"),
m_irqhandler(*this)
{
}
@ -147,8 +149,10 @@ void atari_cage_device::device_start()
m_timer[0] = subdevice<timer_device>("cage_timer0");
m_timer[1] = subdevice<timer_device>("cage_timer1");
if (m_speedup)
m_speedup_ram = m_cpu->space(AS_PROGRAM).install_write_handler(m_speedup, m_speedup, write32_delegate(FUNC(atari_cage_device::speedup_w),this));
if (m_speedup) {
m_cpu->space(AS_PROGRAM).install_write_handler(m_speedup, m_speedup, write32_delegate(FUNC(atari_cage_device::speedup_w),this));
m_speedup_ram = m_cageram + m_speedup;
}
for (chan = 0; chan < DAC_BUFFER_CHANNELS; chan++)
{
@ -594,7 +598,7 @@ WRITE32_MEMBER( atari_cage_device::speedup_w )
*************************************/
static ADDRESS_MAP_START( cage_map, AS_PROGRAM, 32, atari_cage_device )
AM_RANGE(0x000000, 0x00ffff) AM_RAM
AM_RANGE(0x000000, 0x00ffff) AM_RAM AM_SHARE("cageram")
AM_RANGE(0x200000, 0x200000) AM_WRITENOP
AM_RANGE(0x400000, 0x47ffff) AM_ROMBANK("bank10")
AM_RANGE(0x808000, 0x8080ff) AM_READWRITE(tms32031_io_r, tms32031_io_w)
@ -605,7 +609,7 @@ ADDRESS_MAP_END
static ADDRESS_MAP_START( cage_map_seattle, AS_PROGRAM, 32, atari_cage_seattle_device )
AM_RANGE(0x000000, 0x00ffff) AM_RAM
AM_RANGE(0x000000, 0x00ffff) AM_RAM AM_SHARE("cageram")
AM_RANGE(0x200000, 0x200000) AM_WRITENOP
AM_RANGE(0x400000, 0x47ffff) AM_ROMBANK("bank10")
AM_RANGE(0x808000, 0x8080ff) AM_READWRITE(tms32031_io_r, tms32031_io_w)

View File

@ -61,6 +61,7 @@ protected:
virtual void device_start() override;
private:
required_shared_ptr<UINT32> m_cageram;
cpu_device *m_cpu;
attotime m_cpu_h1_clock_period;

View File

@ -289,7 +289,7 @@ static ADDRESS_MAP_START( dcs_2k_uart_data_map, AS_DATA, 16, dcs_audio_device )
AM_RANGE(0x3400, 0x3402) AM_NOP /* UART (ignored) */
AM_RANGE(0x3403, 0x3403) AM_READWRITE(input_latch_r, output_latch_w)
AM_RANGE(0x3404, 0x3405) AM_NOP /* UART (ignored) */
AM_RANGE(0x3800, 0x39ff) AM_RAM
AM_RANGE(0x3800, 0x39ff) AM_RAM AM_SHARE("iram")
AM_RANGE(0x3fe0, 0x3fff) AM_READWRITE(adsp_control_r, adsp_control_w)
ADDRESS_MAP_END
@ -307,7 +307,7 @@ static ADDRESS_MAP_START( dcs_8k_data_map, AS_DATA, 16, dcs_audio_device )
AM_RANGE(0x2000, 0x2fff) AM_ROMBANK("databank")
AM_RANGE(0x3000, 0x3000) AM_WRITE(dcs_data_bank_select_w)
AM_RANGE(0x3400, 0x3403) AM_READWRITE(input_latch_r, output_latch_w) // mk3 etc. need this
AM_RANGE(0x3800, 0x39ff) AM_RAM
AM_RANGE(0x3800, 0x39ff) AM_RAM AM_SHARE("iram")
AM_RANGE(0x3fe0, 0x3fff) AM_READWRITE(adsp_control_r, adsp_control_w)
ADDRESS_MAP_END
@ -323,7 +323,7 @@ static ADDRESS_MAP_START( dcs_wpc_data_map, AS_DATA, 16, dcs_audio_wpc_device )
AM_RANGE(0x3000, 0x3000) AM_WRITE(dcs_data_bank_select_w)
AM_RANGE(0x3100, 0x3100) AM_WRITE(dcs_data_bank_select2_w)
AM_RANGE(0x3300, 0x3303) AM_READWRITE(input_latch_r, output_latch_w)
AM_RANGE(0x3800, 0x39ff) AM_RAM
AM_RANGE(0x3800, 0x39ff) AM_RAM AM_SHARE("iram")
AM_RANGE(0x3fe0, 0x3fff) AM_READWRITE(adsp_control_r, adsp_control_w)
ADDRESS_MAP_END
@ -352,7 +352,7 @@ static ADDRESS_MAP_START( dcs2_2115_data_map, AS_DATA, 16, dcs_audio_device )
AM_RANGE(0x0403, 0x0403) AM_READ(latch_status_r)
AM_RANGE(0x0404, 0x0407) AM_READ(fifo_input_r)
AM_RANGE(0x0480, 0x0483) AM_READWRITE(sdrc_r, sdrc_w)
AM_RANGE(0x3800, 0x39ff) AM_RAM
AM_RANGE(0x3800, 0x39ff) AM_RAM AM_SHARE("iram")
AM_RANGE(0x3fe0, 0x3fff) AM_READWRITE(adsp_control_r, adsp_control_w)
ADDRESS_MAP_END
@ -364,7 +364,7 @@ static ADDRESS_MAP_START( dcs2_2104_data_map, AS_DATA, 16, dcs_audio_device )
AM_RANGE(0x0403, 0x0403) AM_READ(latch_status_r)
AM_RANGE(0x0404, 0x0407) AM_READ(fifo_input_r)
AM_RANGE(0x0480, 0x0483) AM_READWRITE(sdrc_r, sdrc_w)
AM_RANGE(0x3800, 0x38ff) AM_RAM
AM_RANGE(0x3800, 0x38ff) AM_RAM AM_SHARE("iram")
AM_RANGE(0x3fe0, 0x3fff) AM_READWRITE(adsp_control_r, adsp_control_w)
ADDRESS_MAP_END
@ -836,7 +836,8 @@ dcs_audio_device::dcs_audio_device(const machine_config &mconfig, device_type ty
m_polling_base(nullptr),
m_internal_program_ram(nullptr),
m_external_program_ram(nullptr),
m_dram_in_mb(0)
m_dram_in_mb(0),
m_iram(*this, "iram")
{
m_dmadac[0] = m_dmadac[1] = m_dmadac[2] = m_dmadac[3] = m_dmadac[4] = m_dmadac[5] = nullptr;
memset(m_control_regs, 0, sizeof(m_control_regs));
@ -982,9 +983,10 @@ void dcs2_audio_device::device_start()
m_auto_ack = FALSE;
/* install the speedup handler */
if (m_polling_offset)
m_polling_base = m_cpu->space(AS_DATA).install_readwrite_handler(m_polling_offset, m_polling_offset, read16_delegate(FUNC(dcs_audio_device::dcs_polling_r),this), write16_delegate(FUNC(dcs_audio_device::dcs_polling_w),this));
if (m_polling_offset) {
m_cpu->space(AS_DATA).install_readwrite_handler(m_polling_offset, m_polling_offset, read16_delegate(FUNC(dcs_audio_device::dcs_polling_r),this), write16_delegate(FUNC(dcs_audio_device::dcs_polling_w),this));
m_polling_base = m_iram + (m_polling_offset - 0x3800);
}
/* allocate a watchdog timer for HLE transfers */
m_transfer.hle_enabled = (ENABLE_HLE_TRANSFERS && m_dram_in_mb != 0);
if (m_transfer.hle_enabled)
@ -1142,7 +1144,7 @@ void dcs_audio_device::sdrc_remap_memory()
/* reinstall the polling hotspot */
if (m_polling_offset)
m_polling_base = m_cpu->space(AS_DATA).install_readwrite_handler(m_polling_offset, m_polling_offset, read16_delegate(FUNC(dcs_audio_device::dcs_polling_r),this), write16_delegate(FUNC(dcs_audio_device::dcs_polling_w),this));
m_cpu->space(AS_DATA).install_readwrite_handler(m_polling_offset, m_polling_offset, read16_delegate(FUNC(dcs_audio_device::dcs_polling_r),this), write16_delegate(FUNC(dcs_audio_device::dcs_polling_w),this));
}

View File

@ -207,6 +207,8 @@ protected:
hle_transfer_state m_transfer;
int m_dram_in_mb;
optional_shared_ptr<UINT16> m_iram;
};

View File

@ -170,7 +170,8 @@ READ16_MEMBER(atarig1_state::pitfightb_cheap_slapstic_r)
void atarig1_state::pitfightb_cheap_slapstic_init()
{
/* install a read handler */
m_bslapstic_base = m_maincpu->space(AS_PROGRAM).install_read_handler(0x038000, 0x03ffff, read16_delegate(FUNC(atarig1_state::pitfightb_cheap_slapstic_r),this));
m_maincpu->space(AS_PROGRAM).install_read_handler(0x038000, 0x03ffff, read16_delegate(FUNC(atarig1_state::pitfightb_cheap_slapstic_r),this));
m_bslapstic_base = (UINT16 *)(memregion("maincpu")->base() + 0x38000);
/* allocate memory for a copy of bank 0 */
m_bslapstic_bank0 = std::make_unique<UINT8[]>(0x2000);
@ -1284,7 +1285,7 @@ ROM_END
DRIVER_INIT_MEMBER(atarig1_state,hydra)
{
slapstic_configure(*m_maincpu, 0x078000, 0);
slapstic_configure(*m_maincpu, 0x078000, 0, memregion("maincpu")->base() + 0x78000);
m_is_pitfight = 0;
}
@ -1295,7 +1296,7 @@ DRIVER_INIT_MEMBER(atarig1_state,hydrap)
DRIVER_INIT_MEMBER(atarig1_state,pitfight)
{
slapstic_configure(*m_maincpu, 0x038000, 0);
slapstic_configure(*m_maincpu, 0x038000, 0, memregion("maincpu")->base() + 0x38000);
m_is_pitfight = 1;
}

View File

@ -781,8 +781,9 @@ DRIVER_INIT_MEMBER(atarig42_state,roadriot)
m_playfield_base = 0x400;
address_space &main = m_maincpu->space(AS_PROGRAM);
m_sloop_base = main.install_readwrite_handler(0x000000, 0x07ffff, read16_delegate(FUNC(atarig42_state::roadriot_sloop_data_r),this), write16_delegate(FUNC(atarig42_state::roadriot_sloop_data_w),this));
main.install_readwrite_handler(0x000000, 0x07ffff, read16_delegate(FUNC(atarig42_state::roadriot_sloop_data_r),this), write16_delegate(FUNC(atarig42_state::roadriot_sloop_data_w),this));
main.set_direct_update_handler(direct_update_delegate(FUNC(atarig42_state::atarig42_sloop_direct_handler), this));
m_sloop_base = (UINT16 *)memregion("maincpu")->base();
/*
Road Riot color MUX
@ -816,8 +817,9 @@ DRIVER_INIT_MEMBER(atarig42_state,guardian)
*(UINT16 *)&memregion("maincpu")->base()[0x80000] = 0x4E75;
address_space &main = m_maincpu->space(AS_PROGRAM);
m_sloop_base = main.install_readwrite_handler(0x000000, 0x07ffff, read16_delegate(FUNC(atarig42_state::guardians_sloop_data_r),this), write16_delegate(FUNC(atarig42_state::guardians_sloop_data_w),this));
main.install_readwrite_handler(0x000000, 0x07ffff, read16_delegate(FUNC(atarig42_state::guardians_sloop_data_r),this), write16_delegate(FUNC(atarig42_state::guardians_sloop_data_w),this));
main.set_direct_update_handler(direct_update_delegate(FUNC(atarig42_state::atarig42_sloop_direct_handler), this));
m_sloop_base = (UINT16 *)memregion("maincpu")->base();
/*
Guardians color MUX

View File

@ -2430,7 +2430,7 @@ ROM_END
DRIVER_INIT_MEMBER(atarisy1_state,marble)
{
slapstic_configure(*m_maincpu, 0x080000, 0);
slapstic_configure(*m_maincpu, 0x080000, 0, memregion("maincpu")->base() + 0x80000);
m_joystick_type = 0; /* none */
m_trackball_type = 1; /* rotated */
@ -2439,7 +2439,7 @@ DRIVER_INIT_MEMBER(atarisy1_state,marble)
DRIVER_INIT_MEMBER(atarisy1_state,peterpak)
{
slapstic_configure(*m_maincpu, 0x080000, 0);
slapstic_configure(*m_maincpu, 0x080000, 0, memregion("maincpu")->base() + 0x80000);
m_joystick_type = 1; /* digital */
m_trackball_type = 0; /* none */
@ -2448,7 +2448,7 @@ DRIVER_INIT_MEMBER(atarisy1_state,peterpak)
DRIVER_INIT_MEMBER(atarisy1_state,indytemp)
{
slapstic_configure(*m_maincpu, 0x080000, 0);
slapstic_configure(*m_maincpu, 0x080000, 0, memregion("maincpu")->base() + 0x80000);
m_joystick_type = 1; /* digital */
m_trackball_type = 0; /* none */
@ -2457,7 +2457,7 @@ DRIVER_INIT_MEMBER(atarisy1_state,indytemp)
DRIVER_INIT_MEMBER(atarisy1_state,roadrunn)
{
slapstic_configure(*m_maincpu, 0x080000, 0);
slapstic_configure(*m_maincpu, 0x080000, 0, memregion("maincpu")->base() + 0x80000);
m_joystick_type = 2; /* analog */
m_trackball_type = 0; /* none */
@ -2466,7 +2466,7 @@ DRIVER_INIT_MEMBER(atarisy1_state,roadrunn)
DRIVER_INIT_MEMBER(atarisy1_state,roadblst)
{
slapstic_configure(*m_maincpu, 0x080000, 0);
slapstic_configure(*m_maincpu, 0x080000, 0, memregion("maincpu")->base() + 0x80000);
m_joystick_type = 3; /* pedal */
m_trackball_type = 2; /* steering wheel */

View File

@ -468,8 +468,11 @@ READ32_MEMBER( beathead_state::movie_speedup_r )
DRIVER_INIT_MEMBER(beathead_state,beathead)
{
/* prepare the speedups */
m_speedup_data = m_maincpu->space(AS_PROGRAM).install_read_handler(0x00000ae8, 0x00000aeb, 0, 0, read32_delegate(FUNC(beathead_state::speedup_r), this));
m_movie_speedup_data = m_maincpu->space(AS_PROGRAM).install_read_handler(0x00000804, 0x00000807, 0, 0, read32_delegate(FUNC(beathead_state::movie_speedup_r), this));
m_maincpu->space(AS_PROGRAM).install_read_handler(0x00000ae8, 0x00000aeb, 0, 0, read32_delegate(FUNC(beathead_state::speedup_r), this));
m_maincpu->space(AS_PROGRAM).install_read_handler(0x00000804, 0x00000807, 0, 0, read32_delegate(FUNC(beathead_state::movie_speedup_r), this));
m_speedup_data = m_ram_base + 0xae8/4;
m_movie_speedup_data = m_ram_base + 0x804/4;
}

View File

@ -1002,7 +1002,7 @@ ROM_END
DRIVER_INIT_MEMBER(cyberbal_state,cyberbalt)
{
slapstic_configure(*m_maincpu, 0x018000, 0);
slapstic_configure(*m_maincpu, 0x018000, 0, memregion("maincpu")->base() + 0x18000);
}

View File

@ -53,6 +53,7 @@ MACHINE_RESET_MEMBER(eprom_state,eprom)
{
atarigen_state::machine_reset();
scanline_timer_reset(*m_screen, 8);
m_sync_data = 0;
}
@ -116,18 +117,16 @@ WRITE16_MEMBER(eprom_state::eprom_latch_w)
READ16_MEMBER(eprom_state::sync_r)
{
return m_sync_data[offset];
return m_sync_data;
}
WRITE16_MEMBER(eprom_state::sync_w)
{
int oldword = m_sync_data[offset];
int newword = oldword;
COMBINE_DATA(&newword);
int oldword = m_sync_data;
COMBINE_DATA(&m_sync_data);
m_sync_data[offset] = newword;
if ((oldword & 0xff00) != (newword & 0xff00))
if ((oldword & 0xff00) != (m_sync_data & 0xff00))
space.device().execute().yield();
}
@ -142,7 +141,7 @@ WRITE16_MEMBER(eprom_state::sync_w)
static ADDRESS_MAP_START( main_map, AS_PROGRAM, 16, eprom_state )
AM_RANGE(0x000000, 0x09ffff) AM_ROM
AM_RANGE(0x0e0000, 0x0e0fff) AM_DEVREADWRITE8("eeprom", atari_eeprom_device, read, write, 0x00ff)
AM_RANGE(0x16cc00, 0x16cc01) AM_RAM AM_SHARE("sync_data")
AM_RANGE(0x16cc00, 0x16cc01) AM_READWRITE(sync_r, sync_w)
AM_RANGE(0x160000, 0x16ffff) AM_RAM AM_SHARE("share1")
AM_RANGE(0x1f0000, 0x1fffff) AM_DEVWRITE("eeprom", atari_eeprom_device, unlock_write)
AM_RANGE(0x260000, 0x26000f) AM_READ_PORT("260000")
@ -167,7 +166,7 @@ ADDRESS_MAP_END
static ADDRESS_MAP_START( guts_map, AS_PROGRAM, 16, eprom_state )
AM_RANGE(0x000000, 0x09ffff) AM_ROM
AM_RANGE(0x0e0000, 0x0e0fff) AM_DEVREADWRITE8("eeprom", atari_eeprom_device, read, write, 0x00ff)
AM_RANGE(0x16cc00, 0x16cc01) AM_RAM AM_SHARE("sync_data")
AM_RANGE(0x16cc00, 0x16cc01) AM_READWRITE(sync_r, sync_w)
AM_RANGE(0x160000, 0x16ffff) AM_RAM AM_SHARE("share1")
AM_RANGE(0x1f0000, 0x1fffff) AM_DEVWRITE("eeprom", atari_eeprom_device, unlock_write)
AM_RANGE(0x260000, 0x26000f) AM_READ_PORT("260000")
@ -728,9 +727,6 @@ ROM_END
DRIVER_INIT_MEMBER(eprom_state,eprom)
{
/* install CPU synchronization handlers */
m_sync_data = m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0x16cc00, 0x16cc01, read16_delegate(FUNC(eprom_state::sync_r),this), write16_delegate(FUNC(eprom_state::sync_w),this));
m_sync_data = m_extra->space(AS_PROGRAM).install_readwrite_handler(0x16cc00, 0x16cc01, read16_delegate(FUNC(eprom_state::sync_r),this), write16_delegate(FUNC(eprom_state::sync_w),this));
}

View File

@ -429,7 +429,7 @@ READ8_MEMBER(exidy440_state::topsecex_input_port_5_r)
WRITE8_MEMBER(exidy440_state::topsecex_yscroll_w)
{
*m_topsecex_yscroll = data;
m_topsecex_yscroll = data;
}
@ -2014,7 +2014,7 @@ DRIVER_INIT_MEMBER(exidy440_state,topsecex)
m_maincpu->space(AS_PROGRAM).install_read_port(0x2ec6, 0x2ec6, "AN0");
m_maincpu->space(AS_PROGRAM).install_read_port(0x2ec7, 0x2ec7, "IN4");
m_topsecex_yscroll = m_maincpu->space(AS_PROGRAM).install_write_handler(0x2ec1, 0x2ec1, write8_delegate(FUNC(exidy440_state::topsecex_yscroll_w),this));
m_maincpu->space(AS_PROGRAM).install_write_handler(0x2ec1, 0x2ec1, write8_delegate(FUNC(exidy440_state::topsecex_yscroll_w),this));
}

View File

@ -494,7 +494,7 @@ void cps_state::fcrash_render_sprites( screen_device &screen, bitmap_ind16 &bitm
UINT16 tileno,flipx,flipy,colour,xpos,ypos;
/* if we have separate sprite ram, use it */
if (m_bootleg_sprite_ram) sprite_ram = m_bootleg_sprite_ram;
if (m_bootleg_sprite_ram) sprite_ram = m_bootleg_sprite_ram.get();
/* get end of sprite list marker */
for (pos = 0x1ffc - base; pos >= 0x0000; pos -= 4)
@ -1929,8 +1929,9 @@ DRIVER_INIT_MEMBER(cps_state, kodb)
/* the original game alternates between 2 sprite ram areas to achieve flashing sprites - the bootleg doesn't do the write to the register to achieve this
mapping both sprite ram areas to the same bootleg sprite ram - similar to how sf2mdt works */
m_bootleg_sprite_ram = (UINT16*)m_maincpu->space(AS_PROGRAM).install_ram(0x900000, 0x903fff);
m_maincpu->space(AS_PROGRAM).install_ram(0x904000, 0x907fff, m_bootleg_sprite_ram); /* both of these need to be mapped */
m_bootleg_sprite_ram = std::make_unique<UINT16[]>(0x2000);
m_maincpu->space(AS_PROGRAM).install_ram(0x900000, 0x903fff, m_bootleg_sprite_ram.get());
m_maincpu->space(AS_PROGRAM).install_ram(0x904000, 0x907fff, m_bootleg_sprite_ram.get()); /* both of these need to be mapped */
DRIVER_INIT_CALL(cps1);
}
@ -2230,7 +2231,8 @@ ROM_END
DRIVER_INIT_MEMBER(cps_state, dinopic)
{
m_bootleg_sprite_ram = (UINT16*)m_maincpu->space(AS_PROGRAM).install_ram(0x990000, 0x993fff);
m_bootleg_sprite_ram = std::make_unique<UINT16[]>(0x2000);
m_maincpu->space(AS_PROGRAM).install_ram(0x990000, 0x993fff, m_bootleg_sprite_ram.get());
DRIVER_INIT_CALL(cps1);
}
@ -2808,8 +2810,9 @@ DRIVER_INIT_MEMBER(cps_state, sf2mdtb)
}
/* bootleg sprite ram */
m_bootleg_sprite_ram = (UINT16*)m_maincpu->space(AS_PROGRAM).install_ram(0x700000, 0x703fff);
m_maincpu->space(AS_PROGRAM).install_ram(0x704000, 0x707fff, m_bootleg_sprite_ram); /* both of these need to be mapped */
m_bootleg_sprite_ram = std::make_unique<UINT16[]>(0x2000);
m_maincpu->space(AS_PROGRAM).install_ram(0x700000, 0x703fff, m_bootleg_sprite_ram.get());
m_maincpu->space(AS_PROGRAM).install_ram(0x704000, 0x707fff, m_bootleg_sprite_ram.get()); /* both of these need to be mapped */
DRIVER_INIT_CALL(cps1);
}
@ -2818,10 +2821,12 @@ DRIVER_INIT_MEMBER(cps_state, sf2mdtb)
DRIVER_INIT_MEMBER(cps_state, sf2mdta)
{
/* bootleg sprite ram */
m_bootleg_sprite_ram = (UINT16*)m_maincpu->space(AS_PROGRAM).install_ram(0x700000, 0x703fff);
m_maincpu->space(AS_PROGRAM).install_ram(0x704000, 0x707fff, m_bootleg_sprite_ram); /* both of these need to be mapped - see the "Magic Delta Turbo" text on the title screen */
m_bootleg_sprite_ram = std::make_unique<UINT16[]>(0x2000);
m_maincpu->space(AS_PROGRAM).install_ram(0x700000, 0x703fff, m_bootleg_sprite_ram.get());
m_maincpu->space(AS_PROGRAM).install_ram(0x704000, 0x707fff, m_bootleg_sprite_ram.get()); /* both of these need to be mapped - see the "Magic Delta Turbo" text on the title screen */
m_bootleg_work_ram = (UINT16*)m_maincpu->space(AS_PROGRAM).install_ram(0xfc0000, 0xfcffff); /* this has moved */
m_bootleg_work_ram = std::make_unique<UINT16[]>(0x8000);
m_maincpu->space(AS_PROGRAM).install_ram(0xfc0000, 0xfcffff, m_bootleg_work_ram.get()); /* this has moved */
DRIVER_INIT_CALL(cps1);
}
@ -2829,8 +2834,9 @@ DRIVER_INIT_MEMBER(cps_state, sf2mdta)
DRIVER_INIT_MEMBER(cps_state, sf2b)
{
/* bootleg sprite ram */
m_bootleg_sprite_ram = (UINT16*)m_maincpu->space(AS_PROGRAM).install_ram(0x700000, 0x703fff);
m_maincpu->space(AS_PROGRAM).install_ram(0x704000, 0x707fff, m_bootleg_sprite_ram);
m_bootleg_sprite_ram = std::make_unique<UINT16[]>(0x2000);
m_maincpu->space(AS_PROGRAM).install_ram(0x700000, 0x703fff, m_bootleg_sprite_ram.get());
m_maincpu->space(AS_PROGRAM).install_ram(0x704000, 0x707fff, m_bootleg_sprite_ram.get());
DRIVER_INIT_CALL(cps1);
}

View File

@ -1649,7 +1649,7 @@ void gauntlet_state::swap_memory(void *ptr1, void *ptr2, int bytes)
void gauntlet_state::common_init(int vindctr2)
{
UINT8 *rom = memregion("maincpu")->base();
slapstic_configure(*m_maincpu, 0x038000, 0);
slapstic_configure(*m_maincpu, 0x038000, 0, memregion("maincpu")->base() + 0x38000);
/* swap the top and bottom halves of the main CPU ROM images */
swap_memory(rom + 0x000000, rom + 0x008000, 0x8000);

View File

@ -376,6 +376,7 @@ harddriv_state::harddriv_state(const machine_config &mconfig, const char *tag, d
m_ds3sdsp_data_memory(*this, "ds3sdsp_data"),
m_ds3sdsp_pgm_memory(*this, "ds3sdsp_pgm"),
m_ds3xdsp_pgm_memory(*this, "ds3xdsp_pgm"),
m_dsp32_ram(*this, "dsp32_ram"),
m_gsp_protection(nullptr),
m_gsp_speedup_pc(0),
m_msp_speedup_addr(nullptr),
@ -719,7 +720,7 @@ ADDRESS_MAP_END
static ADDRESS_MAP_START( dsk_dsp32_map, AS_PROGRAM, 32, harddriv_state )
ADDRESS_MAP_UNMAP_HIGH
AM_RANGE(0x000000, 0x001fff) AM_RAM
AM_RANGE(0x600000, 0x63ffff) AM_RAM
AM_RANGE(0x600000, 0x63ffff) AM_RAM AM_SHARE("dsp32_ram")
AM_RANGE(0xfff800, 0xffffff) AM_RAM
ADDRESS_MAP_END
@ -4865,15 +4866,18 @@ void harddriv_state::init_harddriv(void)
init_driver_sound();
/* set up gsp speedup handler */
m_gsp_speedup_addr[0] = m_gsp->space(AS_PROGRAM).install_write_handler(0xfff9fc00, 0xfff9fc0f, write16_delegate(FUNC(harddriv_state::hdgsp_speedup1_w), this));
m_gsp_speedup_addr[1] = m_gsp->space(AS_PROGRAM).install_write_handler(0xfffcfc00, 0xfffcfc0f, write16_delegate(FUNC(harddriv_state::hdgsp_speedup2_w), this));
m_gsp->space(AS_PROGRAM).install_write_handler(0xfff9fc00, 0xfff9fc0f, write16_delegate(FUNC(harddriv_state::hdgsp_speedup1_w), this));
m_gsp->space(AS_PROGRAM).install_write_handler(0xfffcfc00, 0xfffcfc0f, write16_delegate(FUNC(harddriv_state::hdgsp_speedup2_w), this));
m_gsp->space(AS_PROGRAM).install_read_handler(0xfff9fc00, 0xfff9fc0f, read16_delegate(FUNC(harddriv_state::hdgsp_speedup_r), this));
m_gsp_speedup_pc = 0xffc00f10;
m_gsp_speedup_addr[0] = (UINT16 *)(m_gsp_vram + ((0xfff9fc00 - 0xff800000) >> 3)); // Addresses are in bits. Really.
m_gsp_speedup_addr[1] = (UINT16 *)(m_gsp_vram + ((0xfffcfc00 - 0xff800000) >> 3));
/* set up msp speedup handler */
m_msp_speedup_addr = m_msp->space(AS_PROGRAM).install_write_handler(0x00751b00, 0x00751b0f, write16_delegate(FUNC(harddriv_state::hdmsp_speedup_w), this));
m_msp->space(AS_PROGRAM).install_write_handler(0x00751b00, 0x00751b0f, write16_delegate(FUNC(harddriv_state::hdmsp_speedup_w), this));
m_msp->space(AS_PROGRAM).install_read_handler(0x00751b00, 0x00751b0f, read16_delegate(FUNC(harddriv_state::hdmsp_speedup_r), this));
m_msp_speedup_pc = 0x00723b00;
m_msp_speedup_addr = m_msp_ram + ((0x751b00 - 0x700000) >> 4); // Address in bits, plus UINT16 *
/* set up adsp speedup handlers */
m_adsp->space(AS_DATA).install_read_handler(0x1fff, 0x1fff, read16_delegate(FUNC(harddriv_state::hdadsp_speedup_r), this));
@ -4888,15 +4892,18 @@ void harddriv_state::init_harddrivc(void)
init_driver_sound();
/* set up gsp speedup handler */
m_gsp_speedup_addr[0] = m_gsp->space(AS_PROGRAM).install_write_handler(0xfff9fc00, 0xfff9fc0f, write16_delegate(FUNC(harddriv_state::hdgsp_speedup1_w), this));
m_gsp_speedup_addr[1] = m_gsp->space(AS_PROGRAM).install_write_handler(0xfffcfc00, 0xfffcfc0f, write16_delegate(FUNC(harddriv_state::hdgsp_speedup2_w), this));
m_gsp->space(AS_PROGRAM).install_write_handler(0xfff9fc00, 0xfff9fc0f, write16_delegate(FUNC(harddriv_state::hdgsp_speedup1_w), this));
m_gsp->space(AS_PROGRAM).install_write_handler(0xfffcfc00, 0xfffcfc0f, write16_delegate(FUNC(harddriv_state::hdgsp_speedup2_w), this));
m_gsp->space(AS_PROGRAM).install_read_handler(0xfff9fc00, 0xfff9fc0f, read16_delegate(FUNC(harddriv_state::hdgsp_speedup_r), this));
m_gsp_speedup_pc = 0xfff40ff0;
m_gsp_speedup_addr[0] = (UINT16 *)(m_gsp_vram + ((0xfff9fc00 - 0xffc00000) >> 3)); // Addresses are in bits. Really.
m_gsp_speedup_addr[1] = (UINT16 *)(m_gsp_vram + ((0xfffcfc00 - 0xffc00000) >> 3));
/* set up msp speedup handler */
m_msp_speedup_addr = m_msp->space(AS_PROGRAM).install_write_handler(0x00751b00, 0x00751b0f, write16_delegate(FUNC(harddriv_state::hdmsp_speedup_w), this));
m_msp->space(AS_PROGRAM).install_write_handler(0x00751b00, 0x00751b0f, write16_delegate(FUNC(harddriv_state::hdmsp_speedup_w), this));
m_msp->space(AS_PROGRAM).install_read_handler(0x00751b00, 0x00751b0f, read16_delegate(FUNC(harddriv_state::hdmsp_speedup_r), this));
m_msp_speedup_pc = 0x00723b00;
m_msp_speedup_addr = m_msp_ram + ((0x751b00 - 0x700000) >> 4); // Address in bits, plus UINT16 *
/* set up adsp speedup handlers */
m_adsp->space(AS_DATA).install_read_handler(0x1fff, 0x1fff, read16_delegate(FUNC(harddriv_state::hdadsp_speedup_r), this));
@ -4910,10 +4917,12 @@ void harddriv_state::init_stunrun(void)
init_adsp();
/* set up gsp speedup handler */
m_gsp_speedup_addr[0] = m_gsp->space(AS_PROGRAM).install_write_handler(0xfff9fc00, 0xfff9fc0f, write16_delegate(FUNC(harddriv_state::hdgsp_speedup1_w), this));
m_gsp_speedup_addr[1] = m_gsp->space(AS_PROGRAM).install_write_handler(0xfffcfc00, 0xfffcfc0f, write16_delegate(FUNC(harddriv_state::hdgsp_speedup2_w), this));
m_gsp->space(AS_PROGRAM).install_write_handler(0xfff9fc00, 0xfff9fc0f, write16_delegate(FUNC(harddriv_state::hdgsp_speedup1_w), this));
m_gsp->space(AS_PROGRAM).install_write_handler(0xfffcfc00, 0xfffcfc0f, write16_delegate(FUNC(harddriv_state::hdgsp_speedup2_w), this));
m_gsp->space(AS_PROGRAM).install_read_handler(0xfff9fc00, 0xfff9fc0f, read16_delegate(FUNC(harddriv_state::hdgsp_speedup_r), this));
m_gsp_speedup_pc = 0xfff41070;
m_gsp_speedup_addr[0] = (UINT16 *)(m_gsp_vram + ((0xfff9fc00 - 0xffc00000) >> 3)); // Addresses are in bits. Really.
m_gsp_speedup_addr[1] = (UINT16 *)(m_gsp_vram + ((0xfffcfc00 - 0xffc00000) >> 3));
/* set up adsp speedup handlers */
m_adsp->space(AS_DATA).install_read_handler(0x1fff, 0x1fff, read16_delegate(FUNC(harddriv_state::hdadsp_speedup_r), this));
@ -4930,14 +4939,18 @@ void harddriv_state::init_racedriv(void)
/* set up the slapstic */
m_slapstic_device->slapstic_init();
m_m68k_slapstic_base = m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0xe0000, 0xfffff, read16_delegate(FUNC(harddriv_state::rd68k_slapstic_r), this), write16_delegate(FUNC(harddriv_state::rd68k_slapstic_w), this));
m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0xe0000, 0xfffff, read16_delegate(FUNC(harddriv_state::rd68k_slapstic_r), this), write16_delegate(FUNC(harddriv_state::rd68k_slapstic_w), this));
m_m68k_slapstic_base = (UINT16 *)(memregion("maincpu")->base() + 0xe0000);
/* synchronization */
m_rddsp32_sync[0] = m_dsp32->space(AS_PROGRAM).install_write_handler(0x613c00, 0x613c03, write32_delegate(FUNC(harddriv_state::rddsp32_sync0_w), this));
m_rddsp32_sync[1] = m_dsp32->space(AS_PROGRAM).install_write_handler(0x613e00, 0x613e03, write32_delegate(FUNC(harddriv_state::rddsp32_sync1_w), this));
m_dsp32->space(AS_PROGRAM).install_write_handler(0x613c00, 0x613c03, write32_delegate(FUNC(harddriv_state::rddsp32_sync0_w), this));
m_dsp32->space(AS_PROGRAM).install_write_handler(0x613e00, 0x613e03, write32_delegate(FUNC(harddriv_state::rddsp32_sync1_w), this));
m_rddsp32_sync[0] = m_dsp32_ram + ((0x613c00 - 0x600000) >> 2);
m_rddsp32_sync[1] = m_dsp32_ram + ((0x613e00 - 0x600000) >> 2);
/* set up adsp speedup handlers */
m_adsp->space(AS_DATA).install_read_handler(0x1fff, 0x1fff, read16_delegate(FUNC(harddriv_state::hdadsp_speedup_r), this));
}
@ -4951,19 +4964,24 @@ void harddriv_state::racedrivc_init_common(offs_t gsp_protection)
/* set up the slapstic */
m_slapstic_device->slapstic_init();
m_m68k_slapstic_base = m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0xe0000, 0xfffff, read16_delegate(FUNC(harddriv_state::rd68k_slapstic_r), this), write16_delegate(FUNC(harddriv_state::rd68k_slapstic_w), this));
m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0xe0000, 0xfffff, read16_delegate(FUNC(harddriv_state::rd68k_slapstic_r), this), write16_delegate(FUNC(harddriv_state::rd68k_slapstic_w), this));
m_m68k_slapstic_base = (UINT16 *)(memregion("maincpu")->base() + 0xe0000);
/* synchronization */
m_rddsp32_sync[0] = m_dsp32->space(AS_PROGRAM).install_write_handler(0x613c00, 0x613c03, write32_delegate(FUNC(harddriv_state::rddsp32_sync0_w), this));
m_rddsp32_sync[1] = m_dsp32->space(AS_PROGRAM).install_write_handler(0x613e00, 0x613e03, write32_delegate(FUNC(harddriv_state::rddsp32_sync1_w), this));
m_dsp32->space(AS_PROGRAM).install_write_handler(0x613c00, 0x613c03, write32_delegate(FUNC(harddriv_state::rddsp32_sync0_w), this));
m_dsp32->space(AS_PROGRAM).install_write_handler(0x613e00, 0x613e03, write32_delegate(FUNC(harddriv_state::rddsp32_sync1_w), this));
m_rddsp32_sync[0] = m_dsp32_ram + ((0x613c00 - 0x600000) >> 2);
m_rddsp32_sync[1] = m_dsp32_ram + ((0x613e00 - 0x600000) >> 2);
/* set up protection hacks */
m_gsp_protection = m_gsp->space(AS_PROGRAM).install_write_handler(gsp_protection, gsp_protection + 0x0f, write16_delegate(FUNC(harddriv_state::hdgsp_protection_w), this));
m_gsp->space(AS_PROGRAM).install_write_handler(gsp_protection, gsp_protection + 0x0f, write16_delegate(FUNC(harddriv_state::hdgsp_protection_w), this));
m_gsp_protection = (UINT16 *)(m_gsp_vram + ((gsp_protection - 0xffc00000) >> 3));
/* set up gsp speedup handler */
m_gsp_speedup_addr[0] = m_gsp->space(AS_PROGRAM).install_write_handler(0xfff76f60, 0xfff76f6f, write16_delegate(FUNC(harddriv_state::rdgsp_speedup1_w), this));
m_gsp->space(AS_PROGRAM).install_write_handler(0xfff76f60, 0xfff76f6f, write16_delegate(FUNC(harddriv_state::rdgsp_speedup1_w), this));
m_gsp->space(AS_PROGRAM).install_read_handler(0xfff76f60, 0xfff76f6f, read16_delegate(FUNC(harddriv_state::rdgsp_speedup1_r), this));
m_gsp_speedup_pc = 0xfff43a00;
m_gsp_speedup_addr[0] = (UINT16 *)(m_gsp_vram + ((0xfff76f60 - 0xffc00000) >> 3));
/* set up adsp speedup handlers */
m_adsp->space(AS_DATA).install_read_handler(0x1fff, 0x1fff, read16_delegate(FUNC(harddriv_state::hdadsp_speedup_r), this));
@ -4981,15 +4999,18 @@ void harddriv_state::init_racedrivc_panorama_side()
/* set up the slapstic */
m_slapstic_device->slapstic_init();
m_m68k_slapstic_base = m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0xe0000, 0xfffff, read16_delegate(FUNC(harddriv_state::rd68k_slapstic_r), this), write16_delegate(FUNC(harddriv_state::rd68k_slapstic_w), this));
m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0xe0000, 0xfffff, read16_delegate(FUNC(harddriv_state::rd68k_slapstic_r), this), write16_delegate(FUNC(harddriv_state::rd68k_slapstic_w), this));
m_m68k_slapstic_base = (UINT16 *)(memregion("maincpu")->base() + 0xe0000);
/* set up protection hacks */
m_gsp_protection = m_gsp->space(AS_PROGRAM).install_write_handler(gsp_protection, gsp_protection + 0x0f, write16_delegate(FUNC(harddriv_state::hdgsp_protection_w), this));
m_gsp->space(AS_PROGRAM).install_write_handler(gsp_protection, gsp_protection + 0x0f, write16_delegate(FUNC(harddriv_state::hdgsp_protection_w), this));
m_gsp_protection = (UINT16 *)(m_gsp_vram + ((gsp_protection - 0xffc00000) >> 3));
/* set up gsp speedup handler (todo, work these out) */
// m_gsp_speedup_addr[0] = m_gsp->space(AS_PROGRAM).install_write_handler(0xfff76f60, 0xfff76f6f, write16_delegate(FUNC(harddriv_state::rdgsp_speedup1_w), this));
// m_gsp->space(AS_PROGRAM).install_write_handler(0xfff76f60, 0xfff76f6f, write16_delegate(FUNC(harddriv_state::rdgsp_speedup1_w), this));
// m_gsp->space(AS_PROGRAM).install_read_handler(0xfff76f60, 0xfff76f6f, read16_delegate(FUNC(harddriv_state::rdgsp_speedup1_r), this));
// m_gsp_speedup_pc = 0xfff43a00;
// m_gsp_speedup_addr[0] = (UINT16 *)(m_gsp_vram + ((0xfff76f60 - 0xffc00000) >> 3));
/* set up adsp speedup handlers */
m_adsp->space(AS_DATA).install_read_handler(0x1fff, 0x1fff, read16_delegate(FUNC(harddriv_state::hdadsp_speedup_r), this));
@ -5030,14 +5051,18 @@ void harddriv_state::steeltal_init_common(offs_t ds3_transfer_pc, int proto_sloo
/* set up the SLOOP */
if (!proto_sloop)
{
m_m68k_slapstic_base = m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0xe0000, 0xfffff, read16_delegate(FUNC(harddriv_state::st68k_sloop_r), this), write16_delegate(FUNC(harddriv_state::st68k_sloop_w), this));
m_m68k_sloop_alt_base = m_maincpu->space(AS_PROGRAM).install_read_handler(0x4e000, 0x4ffff, read16_delegate(FUNC(harddriv_state::st68k_sloop_alt_r), this));
m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0xe0000, 0xfffff, read16_delegate(FUNC(harddriv_state::st68k_sloop_r), this), write16_delegate(FUNC(harddriv_state::st68k_sloop_w), this));
m_maincpu->space(AS_PROGRAM).install_read_handler(0x4e000, 0x4ffff, read16_delegate(FUNC(harddriv_state::st68k_sloop_alt_r), this));
}
else
m_m68k_slapstic_base = m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0xe0000, 0xfffff, read16_delegate(FUNC(harddriv_state::st68k_protosloop_r), this), write16_delegate(FUNC(harddriv_state::st68k_protosloop_w), this));
m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0xe0000, 0xfffff, read16_delegate(FUNC(harddriv_state::st68k_protosloop_r), this), write16_delegate(FUNC(harddriv_state::st68k_protosloop_w), this));
m_m68k_slapstic_base = (UINT16 *)(memregion("maincpu")->base() + 0xe0000);
m_m68k_sloop_alt_base = (UINT16 *)(memregion("maincpu")->base() + 0x4e000);
/* set up protection hacks */
m_gsp_protection = m_gsp->space(AS_PROGRAM).install_write_handler(0xfff965d0, 0xfff965df, write16_delegate(FUNC(harddriv_state::hdgsp_protection_w), this));
m_gsp->space(AS_PROGRAM).install_write_handler(0xfff965d0, 0xfff965df, write16_delegate(FUNC(harddriv_state::hdgsp_protection_w), this));
m_gsp_protection = (UINT16 *)(m_gsp_vram + ((0xfff965d0 - 0xffc00000) >> 3));
/* set up adsp speedup handlers */
m_adsp->space(AS_DATA).install_read_handler(0x1fff, 0x1fff, read16_delegate(FUNC(harddriv_state::hdadsp_speedup_r), this));
@ -5048,6 +5073,7 @@ void harddriv_state::steeltal_init_common(offs_t ds3_transfer_pc, int proto_sloo
}
void harddriv_state::init_steeltal(void)
{
steeltal_init_common(0x4fc18, 0);
@ -5073,16 +5099,20 @@ void harddriv_state::init_strtdriv(void)
/* set up the slapstic */
m_slapstic_device->slapstic_init();
m_m68k_slapstic_base = m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0xe0000, 0xfffff, read16_delegate(FUNC(harddriv_state::rd68k_slapstic_r), this), write16_delegate(FUNC(harddriv_state::rd68k_slapstic_w), this));
m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0xe0000, 0xfffff, read16_delegate(FUNC(harddriv_state::rd68k_slapstic_r), this), write16_delegate(FUNC(harddriv_state::rd68k_slapstic_w), this));
m_m68k_slapstic_base = (UINT16 *)(memregion("maincpu")->base() + 0xe0000);
m_maincpu->space(AS_PROGRAM).install_read_handler(0xa80000, 0xafffff, read16_delegate(FUNC(harddriv_state::hda68k_port1_r), this));
/* synchronization */
m_rddsp32_sync[0] = m_dsp32->space(AS_PROGRAM).install_write_handler(0x613c00, 0x613c03, write32_delegate(FUNC(harddriv_state::rddsp32_sync0_w), this));
m_rddsp32_sync[1] = m_dsp32->space(AS_PROGRAM).install_write_handler(0x613e00, 0x613e03, write32_delegate(FUNC(harddriv_state::rddsp32_sync1_w), this));
m_dsp32->space(AS_PROGRAM).install_write_handler(0x613c00, 0x613c03, write32_delegate(FUNC(harddriv_state::rddsp32_sync0_w), this));
m_dsp32->space(AS_PROGRAM).install_write_handler(0x613e00, 0x613e03, write32_delegate(FUNC(harddriv_state::rddsp32_sync1_w), this));
m_rddsp32_sync[0] = m_dsp32_ram + ((0x613c00 - 0x600000) >> 2);
m_rddsp32_sync[1] = m_dsp32_ram + ((0x613e00 - 0x600000) >> 2);
/* set up protection hacks */
m_gsp_protection = m_gsp->space(AS_PROGRAM).install_write_handler(0xfff960a0, 0xfff960af, write16_delegate(FUNC(harddriv_state::hdgsp_protection_w), this));
m_gsp->space(AS_PROGRAM).install_write_handler(0xfff960a0, 0xfff960af, write16_delegate(FUNC(harddriv_state::hdgsp_protection_w), this));
m_gsp_protection = (UINT16 *)(m_gsp_vram + ((0xfff960a0 - 0xffc00000) >> 3));
/* set up adsp speedup handlers */
m_adsp->space(AS_DATA).install_read_handler(0x1fff, 0x1fff, read16_delegate(FUNC(harddriv_state::hdadsp_speedup_r), this));
@ -5103,11 +5133,14 @@ void harddriv_state::init_hdrivair(void)
m_maincpu->space(AS_PROGRAM).install_read_handler(0xa80000, 0xafffff, read16_delegate(FUNC(harddriv_state::hda68k_port1_r), this));
/* synchronization */
m_rddsp32_sync[0] = m_dsp32->space(AS_PROGRAM).install_write_handler(0x613c00, 0x613c03, write32_delegate(FUNC(harddriv_state::rddsp32_sync0_w), this));
m_rddsp32_sync[1] = m_dsp32->space(AS_PROGRAM).install_write_handler(0x613e00, 0x613e03, write32_delegate(FUNC(harddriv_state::rddsp32_sync1_w), this));
m_dsp32->space(AS_PROGRAM).install_write_handler(0x613c00, 0x613c03, write32_delegate(FUNC(harddriv_state::rddsp32_sync0_w), this));
m_dsp32->space(AS_PROGRAM).install_write_handler(0x613e00, 0x613e03, write32_delegate(FUNC(harddriv_state::rddsp32_sync1_w), this));
m_rddsp32_sync[0] = m_dsp32_ram + ((0x613c00 - 0x600000) >> 2);
m_rddsp32_sync[1] = m_dsp32_ram + ((0x613e00 - 0x600000) >> 2);
/* set up protection hacks */
m_gsp_protection = m_gsp->space(AS_PROGRAM).install_write_handler(0xfff960a0, 0xfff960af, write16_delegate(FUNC(harddriv_state::hdgsp_protection_w), this));
m_gsp->space(AS_PROGRAM).install_write_handler(0xfff960a0, 0xfff960af, write16_delegate(FUNC(harddriv_state::hdgsp_protection_w), this));
m_gsp_protection = (UINT16 *)(m_gsp_vram + ((0xfff960a0 - 0xffc00000) >> 3));
/* set up adsp speedup handlers */
m_adsp->space(AS_DATA).install_read_handler(0x1fff, 0x1fff, read16_delegate(FUNC(harddriv_state::hdadsp_speedup_r), this));
@ -5128,11 +5161,14 @@ void harddriv_state::init_hdrivairp(void)
m_maincpu->space(AS_PROGRAM).install_read_handler(0xa80000, 0xafffff, read16_delegate(FUNC(harddriv_state::hda68k_port1_r), this));
/* synchronization */
m_rddsp32_sync[0] = m_dsp32->space(AS_PROGRAM).install_write_handler(0x613c00, 0x613c03, write32_delegate(FUNC(harddriv_state::rddsp32_sync0_w), this));
m_rddsp32_sync[1] = m_dsp32->space(AS_PROGRAM).install_write_handler(0x613e00, 0x613e03, write32_delegate(FUNC(harddriv_state::rddsp32_sync1_w), this));
m_dsp32->space(AS_PROGRAM).install_write_handler(0x613c00, 0x613c03, write32_delegate(FUNC(harddriv_state::rddsp32_sync0_w), this));
m_dsp32->space(AS_PROGRAM).install_write_handler(0x613e00, 0x613e03, write32_delegate(FUNC(harddriv_state::rddsp32_sync1_w), this));
m_rddsp32_sync[0] = m_dsp32_ram + ((0x613c00 - 0x600000) >> 2);
m_rddsp32_sync[1] = m_dsp32_ram + ((0x613e00 - 0x600000) >> 2);
/* set up protection hacks */
m_gsp_protection = m_gsp->space(AS_PROGRAM).install_write_handler(0xfff916c0, 0xfff916cf, write16_delegate(FUNC(harddriv_state::hdgsp_protection_w), this));
m_gsp->space(AS_PROGRAM).install_write_handler(0xfff916c0, 0xfff916cf, write16_delegate(FUNC(harddriv_state::hdgsp_protection_w), this));
m_gsp_protection = (UINT16 *)(m_gsp_vram + ((0xfff916c0 - 0xffc00000) >> 3));
/* set up adsp speedup handlers */
m_adsp->space(AS_DATA).install_read_handler(0x1fff, 0x1fff, read16_delegate(FUNC(harddriv_state::hdadsp_speedup_r), this));

View File

@ -1342,7 +1342,7 @@ static ADDRESS_MAP_START( r3000_map, AS_PROGRAM, 32, jaguar_state )
AM_RANGE(0x04f1b000, 0x04f1cfff) AM_RAM AM_SHARE("dspram")
AM_RANGE(0x06000000, 0x06000003) AM_READWRITE(misc_control_r, misc_control_w)
AM_RANGE(0x10000000, 0x1007ffff) AM_RAM
AM_RANGE(0x10000000, 0x1007ffff) AM_RAM AM_SHARE("mainram")
AM_RANGE(0x12000000, 0x120fffff) AM_RAM // tested in self-test only?
AM_RANGE(0x14000004, 0x14000007) AM_DEVWRITE("watchdog", watchdog_timer_device, reset32_w)
AM_RANGE(0x16000000, 0x16000003) AM_WRITE(eeprom_enable_w)
@ -1354,7 +1354,7 @@ ADDRESS_MAP_END
static ADDRESS_MAP_START( m68020_map, AS_PROGRAM, 32, jaguar_state )
AM_RANGE(0x000000, 0x7fffff) AM_RAM AM_SHARE("sharedram")
AM_RANGE(0x800000, 0x9fffff) AM_ROM AM_REGION("maincpu", 0) AM_SHARE("rom")
AM_RANGE(0xa00000, 0xa1ffff) AM_RAM
AM_RANGE(0xa00000, 0xa1ffff) AM_RAM AM_SHARE("mainram")
AM_RANGE(0xa20000, 0xa21fff) AM_READWRITE(eeprom_data_r, eeprom_data_w) AM_SHARE("nvram")
AM_RANGE(0xa30000, 0xa30003) AM_DEVWRITE("watchdog", watchdog_timer_device, reset32_w)
AM_RANGE(0xa40000, 0xa40003) AM_WRITE(eeprom_enable_w)
@ -2562,7 +2562,8 @@ DRIVER_INIT_MEMBER(jaguar_state,area51a)
#if ENABLE_SPEEDUP_HACKS
/* install speedup for main CPU */
m_main_speedup = m_maincpu->space(AS_PROGRAM).install_write_handler(0xa02030, 0xa02033, write32_delegate(FUNC(jaguar_state::area51_main_speedup_w),this));
m_maincpu->space(AS_PROGRAM).install_write_handler(0xa02030, 0xa02033, write32_delegate(FUNC(jaguar_state::area51_main_speedup_w),this));
m_main_speedup = m_mainram + 0x2030/4;
#endif
}
@ -2571,11 +2572,11 @@ DRIVER_INIT_MEMBER(jaguar_state,area51)
{
m_hacks_enabled = true;
cojag_common_init(0x0c0, 0x09e);
#if ENABLE_SPEEDUP_HACKS
/* install speedup for main CPU */
m_main_speedup_max_cycles = 120;
m_main_speedup = m_maincpu->space(AS_PROGRAM).install_read_handler(0x100062e8, 0x100062eb, read32_delegate(FUNC(jaguar_state::cojagr3k_main_speedup_r),this));
m_maincpu->space(AS_PROGRAM).install_read_handler(0x100062e8, 0x100062eb, read32_delegate(FUNC(jaguar_state::cojagr3k_main_speedup_r),this));
m_main_speedup = m_mainram + 0x62e8/4;
#endif
}
@ -2590,7 +2591,8 @@ DRIVER_INIT_MEMBER(jaguar_state,maxforce)
#if ENABLE_SPEEDUP_HACKS
/* install speedup for main CPU */
m_main_speedup_max_cycles = 120;
m_main_speedup = m_maincpu->space(AS_PROGRAM).install_read_handler(0x1000865c, 0x1000865f, read32_delegate(FUNC(jaguar_state::cojagr3k_main_speedup_r),this));
m_maincpu->space(AS_PROGRAM).install_read_handler(0x1000865c, 0x1000865f, read32_delegate(FUNC(jaguar_state::cojagr3k_main_speedup_r),this));
m_main_speedup = m_mainram + 0x865c/4;
#endif
}
@ -2605,7 +2607,8 @@ DRIVER_INIT_MEMBER(jaguar_state,area51mx)
#if ENABLE_SPEEDUP_HACKS
/* install speedup for main CPU */
m_main_speedup = m_maincpu->space(AS_PROGRAM).install_write_handler(0xa19550, 0xa19557, write32_delegate(FUNC(jaguar_state::area51mx_main_speedup_w),this));
m_maincpu->space(AS_PROGRAM).install_write_handler(0xa19550, 0xa19557, write32_delegate(FUNC(jaguar_state::area51mx_main_speedup_w),this));
m_main_speedup = m_mainram + 0x19550/4;
#endif
}
@ -2621,7 +2624,8 @@ DRIVER_INIT_MEMBER(jaguar_state,a51mxr3k)
#if ENABLE_SPEEDUP_HACKS
/* install speedup for main CPU */
m_main_speedup_max_cycles = 120;
m_main_speedup = m_maincpu->space(AS_PROGRAM).install_read_handler(0x10006f0c, 0x10006f0f, read32_delegate(FUNC(jaguar_state::cojagr3k_main_speedup_r),this));
m_maincpu->space(AS_PROGRAM).install_read_handler(0x10006f0c, 0x10006f0f, read32_delegate(FUNC(jaguar_state::cojagr3k_main_speedup_r),this));
m_main_speedup = m_mainram + 0x6f0c/4;
#endif
}
@ -2634,7 +2638,8 @@ DRIVER_INIT_MEMBER(jaguar_state,fishfren)
#if ENABLE_SPEEDUP_HACKS
/* install speedup for main CPU */
m_main_speedup_max_cycles = 200;
m_main_speedup = m_maincpu->space(AS_PROGRAM).install_read_handler(0x10021b60, 0x10021b63, read32_delegate(FUNC(jaguar_state::cojagr3k_main_speedup_r),this));
m_maincpu->space(AS_PROGRAM).install_read_handler(0x10021b60, 0x10021b63, read32_delegate(FUNC(jaguar_state::cojagr3k_main_speedup_r),this));
m_main_speedup = m_mainram + 0x21b60/4;
#endif
}
@ -2646,9 +2651,12 @@ void jaguar_state::init_freeze_common(offs_t main_speedup_addr)
#if ENABLE_SPEEDUP_HACKS
/* install speedup for main CPU */
m_main_speedup_max_cycles = 200;
if (main_speedup_addr != 0)
m_main_speedup = m_maincpu->space(AS_PROGRAM).install_read_handler(main_speedup_addr, main_speedup_addr + 3, read32_delegate(FUNC(jaguar_state::cojagr3k_main_speedup_r), this));
m_main_gpu_wait = m_maincpu->space(AS_PROGRAM).install_read_handler(0x0400d900, 0x0400d900 + 3, read32_delegate(FUNC(jaguar_state::main_gpu_wait_r), this));
if (main_speedup_addr != 0) {
m_maincpu->space(AS_PROGRAM).install_read_handler(main_speedup_addr, main_speedup_addr + 3, read32_delegate(FUNC(jaguar_state::cojagr3k_main_speedup_r), this));
m_main_speedup = m_mainram + (main_speedup_addr - 0x10000000)/4;
}
m_maincpu->space(AS_PROGRAM).install_read_handler(0x0400d900, 0x0400d900 + 3, read32_delegate(FUNC(jaguar_state::main_gpu_wait_r), this));
m_main_gpu_wait = m_shared_ram + 0xd900/4;
#endif
}
@ -2667,7 +2675,8 @@ DRIVER_INIT_MEMBER(jaguar_state,vcircle)
#if ENABLE_SPEEDUP_HACKS
/* install speedup for main CPU */
m_main_speedup_max_cycles = 50;
m_main_speedup = m_maincpu->space(AS_PROGRAM).install_read_handler(0x12005b34, 0x12005b37, read32_delegate(FUNC(jaguar_state::cojagr3k_main_speedup_r),this));
m_maincpu->space(AS_PROGRAM).install_read_handler(0x12005b34, 0x12005b37, read32_delegate(FUNC(jaguar_state::cojagr3k_main_speedup_r),this));
m_main_speedup = m_mainram + 0x5b34/4;
#endif
}

View File

@ -68,7 +68,7 @@ static ADDRESS_MAP_START( master_map_program, AS_PROGRAM, 8, leland_state )
AM_RANGE(0x0000, 0x1fff) AM_ROM
AM_RANGE(0x2000, 0x9fff) AM_ROMBANK("bank1")
AM_RANGE(0xa000, 0xdfff) AM_ROMBANK("bank2") AM_WRITE(leland_battery_ram_w) AM_SHARE("battery")
AM_RANGE(0xe000, 0xefff) AM_RAM
AM_RANGE(0xe000, 0xefff) AM_RAM AM_SHARE("mainram")
AM_RANGE(0xf000, 0xf3ff) AM_READWRITE(leland_gated_paletteram_r, leland_gated_paletteram_w) AM_SHARE("palette")
AM_RANGE(0xf800, 0xf801) AM_WRITE(leland_master_video_addr_w)
ADDRESS_MAP_END
@ -2047,7 +2047,8 @@ DRIVER_INIT_MEMBER(leland_state,alleymas)
/* kludge warning: the game uses location E0CA to determine if the joysticks are available */
/* it gets cleared by the code, but there is no obvious way for the value to be set to a */
/* non-zero value. If the value is zero, the joystick is never read. */
m_alleymas_kludge_mem = m_master->space(AS_PROGRAM).install_write_handler(0xe0ca, 0xe0ca, write8_delegate(FUNC(leland_state::alleymas_joystick_kludge),this));
m_master->space(AS_PROGRAM).install_write_handler(0xe0ca, 0xe0ca, write8_delegate(FUNC(leland_state::alleymas_joystick_kludge),this));
m_alleymas_kludge_mem = m_mainram + (0xe0ca - 0xe000);
}

View File

@ -157,8 +157,8 @@ private:
void switch_cart(int gameno);
std::unique_ptr<UINT8[]> m_banked_ram;
UINT8* sms_mainram;
UINT8* sms_rom;
std::unique_ptr<UINT8[]> sms_mainram;
std::unique_ptr<UINT8[]> sms_rom;
required_device<sega315_5124_device> m_vdp1;
required_device<generic_slot_device> m_cart1;
@ -344,18 +344,18 @@ WRITE8_MEMBER( mtech_state::mt_sms_standard_rom_bank_w )
{
case 0:
logerror("bank w %02x %02x\n", offset, data);
space.install_rom(0x0000, 0xbfff, sms_rom);
space.install_rom(0x0000, 0xbfff, sms_rom.get());
space.unmap_write(0x0000, 0xbfff);
//printf("bank ram??\n");
break;
case 1:
memcpy(sms_rom+0x0000, m_region_maincpu->base()+bank*0x4000, 0x4000);
memcpy(sms_rom.get()+0x0000, m_region_maincpu->base()+bank*0x4000, 0x4000);
break;
case 2:
memcpy(sms_rom+0x4000, m_region_maincpu->base()+bank*0x4000, 0x4000);
memcpy(sms_rom.get()+0x4000, m_region_maincpu->base()+bank*0x4000, 0x4000);
break;
case 3:
memcpy(sms_rom+0x8000, m_region_maincpu->base()+bank*0x4000, 0x4000);
memcpy(sms_rom.get()+0x8000, m_region_maincpu->base()+bank*0x4000, 0x4000);
break;
}
@ -367,13 +367,15 @@ void mtech_state::set_genz80_as_sms()
address_space &io = m_z80snd->space(AS_IO);
// main ram area
sms_mainram = (UINT8 *)prg.install_ram(0xc000, 0xdfff, 0, 0x2000);
memset(sms_mainram,0x00,0x2000);
sms_mainram = std::make_unique<UINT8[]>(0x2000);
prg.install_ram(0xc000, 0xdfff, 0, 0x2000, sms_mainram.get());
memset(sms_mainram.get(), 0x00, 0x2000);
// fixed rom bank area
sms_rom = (UINT8 *)prg.install_rom(0x0000, 0xbfff, nullptr);
sms_rom = std::make_unique<UINT8[]>(0xc000);
prg.install_rom(0x0000, 0xbfff, sms_rom.get());
memcpy(sms_rom, m_region_maincpu->base(), 0xc000);
memcpy(sms_rom.get(), m_region_maincpu->base(), 0xc000);
prg.install_write_handler(0xfffc, 0xffff, write8_delegate(FUNC(mtech_state::mt_sms_standard_rom_bank_w),this));

View File

@ -1730,7 +1730,8 @@ void midvunit_state::init_crusnusa_common(offs_t speedup)
m_adc_shift = 24;
/* speedups */
m_generic_speedup = m_maincpu->space(AS_PROGRAM).install_read_handler(speedup, speedup + 1, read32_delegate(FUNC(midvunit_state::generic_speedup_r),this));
m_maincpu->space(AS_PROGRAM).install_read_handler(speedup, speedup + 1, read32_delegate(FUNC(midvunit_state::generic_speedup_r),this));
m_generic_speedup = m_ram_base + speedup;
}
DRIVER_INIT_MEMBER(midvunit_state,crusnusa) { init_crusnusa_common(0xc93e); }
DRIVER_INIT_MEMBER(midvunit_state,crusnu40) { init_crusnusa_common(0xc957); }
@ -1753,8 +1754,10 @@ void midvunit_state::init_crusnwld_common(offs_t speedup)
m_maincpu->space(AS_PROGRAM).install_write_handler(0x9d0000, 0x9d0000, write32_delegate(FUNC(midvunit_state::bit_reset_w),this));
/* speedups */
if (speedup)
m_generic_speedup = m_maincpu->space(AS_PROGRAM).install_read_handler(speedup, speedup + 1, read32_delegate(FUNC(midvunit_state::generic_speedup_r),this));
if (speedup) {
m_maincpu->space(AS_PROGRAM).install_read_handler(speedup, speedup + 1, read32_delegate(FUNC(midvunit_state::generic_speedup_r),this));
m_generic_speedup = m_ram_base + speedup;
}
}
DRIVER_INIT_MEMBER(midvunit_state,crusnwld) { init_crusnwld_common(0xd4c0); }
#if 0
@ -1773,7 +1776,8 @@ DRIVER_INIT_MEMBER(midvunit_state,offroadc)
m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0x996000, 0x996000, read32_delegate(FUNC(midvunit_state::offroadc_serial_data_r),this), write32_delegate(FUNC(midvunit_state::offroadc_serial_data_w),this));
/* speedups */
m_generic_speedup = m_maincpu->space(AS_PROGRAM).install_read_handler(0x195aa, 0x195aa, read32_delegate(FUNC(midvunit_state::generic_speedup_r),this));
m_maincpu->space(AS_PROGRAM).install_read_handler(0x195aa, 0x195aa, read32_delegate(FUNC(midvunit_state::generic_speedup_r),this));
m_generic_speedup = m_ram_base + 0x195aa;
}
@ -1796,7 +1800,8 @@ DRIVER_INIT_MEMBER(midvunit_state,wargods)
machine().device<midway_ioasic_device>("ioasic")->set_default_nvram(default_nvram);
/* speedups */
m_generic_speedup = m_maincpu->space(AS_PROGRAM).install_read_handler(0x2f4c, 0x2f4c, read32_delegate(FUNC(midvunit_state::generic_speedup_r),this));
m_maincpu->space(AS_PROGRAM).install_read_handler(0x2f4c, 0x2f4c, read32_delegate(FUNC(midvunit_state::generic_speedup_r),this));
m_generic_speedup = m_ram_base + 0x2f4c;
}

View File

@ -107,7 +107,7 @@ Notes:
static ADDRESS_MAP_START( main_map, AS_PROGRAM, 16, midwunit_state )
AM_RANGE(0x00000000, 0x003fffff) AM_READWRITE(midtunit_vram_r, midtunit_vram_w)
AM_RANGE(0x01000000, 0x013fffff) AM_RAM
AM_RANGE(0x01000000, 0x013fffff) AM_RAM AM_SHARE("mainram")
AM_RANGE(0x01400000, 0x0145ffff) AM_READWRITE(midwunit_cmos_r, midwunit_cmos_w) AM_SHARE("nvram")
AM_RANGE(0x01480000, 0x014fffff) AM_WRITE(midwunit_cmos_enable_w)
AM_RANGE(0x01600000, 0x0160001f) AM_READWRITE(midwunit_security_r, midwunit_security_w)

View File

@ -179,7 +179,7 @@ CUSTOM_INPUT_MEMBER(midyunit_state::adpcm_irq_state_r)
static ADDRESS_MAP_START( main_map, AS_PROGRAM, 16, midyunit_state )
AM_RANGE(0x00000000, 0x001fffff) AM_READWRITE(midyunit_vram_r, midyunit_vram_w)
AM_RANGE(0x01000000, 0x010fffff) AM_RAM
AM_RANGE(0x01000000, 0x010fffff) AM_RAM AM_SHARE("mainram")
AM_RANGE(0x01400000, 0x0140ffff) AM_READWRITE(midyunit_cmos_r, midyunit_cmos_w)
AM_RANGE(0x01800000, 0x0181ffff) AM_RAM_WRITE(midyunit_paletteram_w) AM_SHARE("paletteram")
AM_RANGE(0x01a80000, 0x01a8009f) AM_MIRROR(0x00080000) AM_READWRITE(midyunit_dma_r, midyunit_dma_w)

View File

@ -256,7 +256,7 @@ static ADDRESS_MAP_START( main_map, AS_PROGRAM, 16, offtwall_state )
AM_RANGE(0x3f6000, 0x3f7fff) AM_RAM_DEVWRITE("vad", atari_vad_device, playfield_upper_w) AM_SHARE("vad:playfield_ext")
AM_RANGE(0x3f8000, 0x3fcfff) AM_RAM
AM_RANGE(0x3fd000, 0x3fd7ff) AM_RAM AM_SHARE("vad:mob")
AM_RANGE(0x3fd800, 0x3fffff) AM_RAM
AM_RANGE(0x3fd800, 0x3fffff) AM_RAM AM_SHARE("mainram")
ADDRESS_MAP_END
@ -470,18 +470,24 @@ ROM_END
DRIVER_INIT_MEMBER(offtwall_state,offtwall)
{
/* install son-of-slapstic workarounds */
m_spritecache_count = m_maincpu->space(AS_PROGRAM).install_read_handler(0x3fde42, 0x3fde43, read16_delegate(FUNC(offtwall_state::spritecache_count_r),this));
m_bankswitch_base = m_maincpu->space(AS_PROGRAM).install_read_handler(0x037ec2, 0x037f39, read16_delegate(FUNC(offtwall_state::bankswitch_r),this));
m_unknown_verify_base = m_maincpu->space(AS_PROGRAM).install_read_handler(0x3fdf1e, 0x3fdf1f, read16_delegate(FUNC(offtwall_state::unknown_verify_r),this));
m_maincpu->space(AS_PROGRAM).install_read_handler(0x3fde42, 0x3fde43, read16_delegate(FUNC(offtwall_state::spritecache_count_r),this));
m_maincpu->space(AS_PROGRAM).install_read_handler(0x037ec2, 0x037f39, read16_delegate(FUNC(offtwall_state::bankswitch_r),this));
m_maincpu->space(AS_PROGRAM).install_read_handler(0x3fdf1e, 0x3fdf1f, read16_delegate(FUNC(offtwall_state::unknown_verify_r),this));
m_spritecache_count = m_mainram + (0x3fde42 - 0x3fd800)/2;
m_bankswitch_base = (UINT16 *)(memregion("maincpu")->base() + 0x37ec2);
m_unknown_verify_base = m_mainram + (0x3fdf1e - 0x3fd800)/2;
}
DRIVER_INIT_MEMBER(offtwall_state,offtwalc)
{
/* install son-of-slapstic workarounds */
m_spritecache_count = m_maincpu->space(AS_PROGRAM).install_read_handler(0x3fde42, 0x3fde43, read16_delegate(FUNC(offtwall_state::spritecache_count_r),this));
m_bankswitch_base = m_maincpu->space(AS_PROGRAM).install_read_handler(0x037eca, 0x037f43, read16_delegate(FUNC(offtwall_state::bankswitch_r),this));
m_unknown_verify_base = m_maincpu->space(AS_PROGRAM).install_read_handler(0x3fdf24, 0x3fdf25, read16_delegate(FUNC(offtwall_state::unknown_verify_r),this));
m_maincpu->space(AS_PROGRAM).install_read_handler(0x3fde42, 0x3fde43, read16_delegate(FUNC(offtwall_state::spritecache_count_r),this));
m_maincpu->space(AS_PROGRAM).install_read_handler(0x037eca, 0x037f43, read16_delegate(FUNC(offtwall_state::bankswitch_r),this));
m_maincpu->space(AS_PROGRAM).install_read_handler(0x3fdf24, 0x3fdf25, read16_delegate(FUNC(offtwall_state::unknown_verify_r),this));
m_spritecache_count = m_mainram + (0x3fde42 - 0x3fd800)/2;
m_bankswitch_base = (UINT16 *)(memregion("maincpu")->base() + 0x37eca);
m_unknown_verify_base = m_mainram + (0x3fdf24 - 0x3fd800)/2;
}

View File

@ -678,27 +678,31 @@ ROM_END
DRIVER_INIT_MEMBER(policetr_state,policetr)
{
m_speedup_data = m_maincpu->space(AS_PROGRAM).install_write_handler(0x00000fc8, 0x00000fcb, write32_delegate(FUNC(policetr_state::speedup_w),this));
m_maincpu->space(AS_PROGRAM).install_write_handler(0x00000fc8, 0x00000fcb, write32_delegate(FUNC(policetr_state::speedup_w),this));
m_speedup_pc = 0x1fc028ac;
m_speedup_data = m_rambase + 0xfc8/4;
}
DRIVER_INIT_MEMBER(policetr_state,plctr13b)
{
m_speedup_data = m_maincpu->space(AS_PROGRAM).install_write_handler(0x00000fc8, 0x00000fcb, write32_delegate(FUNC(policetr_state::speedup_w),this));
m_maincpu->space(AS_PROGRAM).install_write_handler(0x00000fc8, 0x00000fcb, write32_delegate(FUNC(policetr_state::speedup_w),this));
m_speedup_pc = 0x1fc028bc;
m_speedup_data = m_rambase + 0xfc8/4;
}
DRIVER_INIT_MEMBER(policetr_state,sshooter)
{
m_speedup_data = m_maincpu->space(AS_PROGRAM).install_write_handler(0x00018fd8, 0x00018fdb, write32_delegate(FUNC(policetr_state::speedup_w),this));
m_maincpu->space(AS_PROGRAM).install_write_handler(0x00018fd8, 0x00018fdb, write32_delegate(FUNC(policetr_state::speedup_w),this));
m_speedup_pc = 0x1fc03470;
m_speedup_data = m_rambase + 0x18fd8/4;
}
DRIVER_INIT_MEMBER(policetr_state,sshoot12)
{
m_speedup_data = m_maincpu->space(AS_PROGRAM).install_write_handler(0x00018fd8, 0x00018fdb, write32_delegate(FUNC(policetr_state::speedup_w),this));
m_maincpu->space(AS_PROGRAM).install_write_handler(0x00018fd8, 0x00018fdb, write32_delegate(FUNC(policetr_state::speedup_w),this));
m_speedup_pc = 0x1fc033e0;
m_speedup_data = m_rambase + 0x18fd8/4;
}

View File

@ -483,7 +483,7 @@ DRIVER_INIT_MEMBER(rampart_state,rampart)
UINT8 *rom = memregion("maincpu")->base();
memcpy(&rom[0x140000], &rom[0x40000], 0x8000);
slapstic_configure(*m_maincpu, 0x140000, 0x438000);
slapstic_configure(*m_maincpu, 0x140000, 0x438000, memregion("maincpu")->base() + 0x140000);
}

View File

@ -2701,7 +2701,7 @@ MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( blitz99, seattle150 )
MCFG_DEVICE_ADD("dcs", DCS2_AUDIO_2115, 0)
MCFG_DCS2_AUDIO_DRAM_IN_MB(2)
MCFG_DCS2_AUDIO_POLLING_OFFSET(0x0afb)
// MCFG_DCS2_AUDIO_POLLING_OFFSET(0x0afb) -- Not in ram???
MCFG_DEVICE_ADD("ioasic", MIDWAY_IOASIC, 0)
MCFG_MIDWAY_IOASIC_SHUFFLE(MIDWAY_IOASIC_BLITZ99)
@ -2713,7 +2713,7 @@ MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( blitz2k, seattle150 )
MCFG_DEVICE_ADD("dcs", DCS2_AUDIO_2115, 0)
MCFG_DCS2_AUDIO_DRAM_IN_MB(2)
MCFG_DCS2_AUDIO_POLLING_OFFSET(0x0b5d)
// MCFG_DCS2_AUDIO_POLLING_OFFSET(0x0b5d) -- Not in ram???
MCFG_DEVICE_ADD("ioasic", MIDWAY_IOASIC, 0)
MCFG_MIDWAY_IOASIC_SHUFFLE(MIDWAY_IOASIC_BLITZ99)
@ -2725,7 +2725,7 @@ MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( carnevil, seattle150 )
MCFG_DEVICE_ADD("dcs", DCS2_AUDIO_2115, 0)
MCFG_DCS2_AUDIO_DRAM_IN_MB(2)
MCFG_DCS2_AUDIO_POLLING_OFFSET(0x0af7)
// MCFG_DCS2_AUDIO_POLLING_OFFSET(0x0af7) -- Not in ram???
MCFG_DEVICE_ADD("ioasic", MIDWAY_IOASIC, 0)
MCFG_MIDWAY_IOASIC_SHUFFLE(MIDWAY_IOASIC_CARNEVIL)
@ -2737,7 +2737,7 @@ MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( hyprdriv, seattle200_widget )
MCFG_DEVICE_ADD("dcs", DCS2_AUDIO_2115, 0)
MCFG_DCS2_AUDIO_DRAM_IN_MB(2)
MCFG_DCS2_AUDIO_POLLING_OFFSET(0x0af7)
// MCFG_DCS2_AUDIO_POLLING_OFFSET(0x0af7) -- Not in ram???
MCFG_DEVICE_ADD("ioasic", MIDWAY_IOASIC, 0)
MCFG_MIDWAY_IOASIC_SHUFFLE(MIDWAY_IOASIC_HYPRDRIV)

View File

@ -284,6 +284,7 @@ segaxbd_state::segaxbd_state(const machine_config &mconfig, const char *tag, dev
m_sprites(*this, "sprites"),
m_segaic16vid(*this, "segaic16vid"),
m_segaic16road(*this, "segaic16road"),
m_subram0(*this, "subram0"),
m_road_priority(1),
m_scanline_timer(nullptr),
m_timer_irq_state(0),
@ -4763,7 +4764,8 @@ void segaxbd_state::install_loffire(void)
m_adc_reverse[1] = m_adc_reverse[3] = true;
// install sync hack on core shared memory
m_loffire_sync = m_maincpu->space(AS_PROGRAM).install_write_handler(0x29c000, 0x29c011, write16_delegate(FUNC(segaxbd_state::loffire_sync0_w), this));
m_maincpu->space(AS_PROGRAM).install_write_handler(0x29c000, 0x29c011, write16_delegate(FUNC(segaxbd_state::loffire_sync0_w), this));
m_loffire_sync = m_subram0;
}

View File

@ -2313,7 +2313,7 @@ MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( gauntleg, vegas )
MCFG_DEVICE_ADD("dcs", DCS2_AUDIO_2104, 0)
MCFG_DCS2_AUDIO_DRAM_IN_MB(4)
MCFG_DCS2_AUDIO_POLLING_OFFSET(0x0b5d)
// MCFG_DCS2_AUDIO_POLLING_OFFSET(0x0b5d) -- Not in ram???
MCFG_DEVICE_ADD("ioasic", MIDWAY_IOASIC, 0)
MCFG_MIDWAY_IOASIC_SHUFFLE(MIDWAY_IOASIC_CALSPEED)
@ -2326,7 +2326,7 @@ MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( gauntdl, vegas )
MCFG_DEVICE_ADD("dcs", DCS2_AUDIO_2104, 0)
MCFG_DCS2_AUDIO_DRAM_IN_MB(4)
MCFG_DCS2_AUDIO_POLLING_OFFSET(0x0b5d)
// MCFG_DCS2_AUDIO_POLLING_OFFSET(0x0b5d) -- Not in ram???
MCFG_DEVICE_ADD("ioasic", MIDWAY_IOASIC, 0)
MCFG_MIDWAY_IOASIC_SHUFFLE(MIDWAY_IOASIC_GAUNTDL)
@ -2339,7 +2339,7 @@ MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( warfa, vegas250 )
MCFG_DEVICE_ADD("dcs", DCS2_AUDIO_2104, 0)
MCFG_DCS2_AUDIO_DRAM_IN_MB(4)
MCFG_DCS2_AUDIO_POLLING_OFFSET(0x0b5d)
// MCFG_DCS2_AUDIO_POLLING_OFFSET(0x0b5d) -- Not in ram???
MCFG_DEVICE_ADD("ioasic", MIDWAY_IOASIC, 0)
MCFG_MIDWAY_IOASIC_SHUFFLE(MIDWAY_IOASIC_MACE)
@ -2352,7 +2352,7 @@ MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( tenthdeg, vegas )
MCFG_DEVICE_ADD("dcs", DCS2_AUDIO_2104, 0)
MCFG_DCS2_AUDIO_DRAM_IN_MB(4)
MCFG_DCS2_AUDIO_POLLING_OFFSET(0x0afb)
// MCFG_DCS2_AUDIO_POLLING_OFFSET(0x0afb) -- Not in ram???
MCFG_DEVICE_ADD("ioasic", MIDWAY_IOASIC, 0)
MCFG_MIDWAY_IOASIC_SHUFFLE(MIDWAY_IOASIC_GAUNTDL)

View File

@ -2997,7 +2997,8 @@ DRIVER_INIT_MEMBER(williams_state,mayday)
CONFIGURE_BLITTER(WILLIAMS_BLITTER_NONE, 0x0000);
/* install a handler to catch protection checks */
m_mayday_protection = m_maincpu->space(AS_PROGRAM).install_read_handler(0xa190, 0xa191, read8_delegate(FUNC(williams_state::mayday_protection_r),this));
m_maincpu->space(AS_PROGRAM).install_read_handler(0xa190, 0xa191, read8_delegate(FUNC(williams_state::mayday_protection_r),this));
m_mayday_protection = m_videoram + 0xa190;
}

View File

@ -393,7 +393,7 @@ ROM_END
DRIVER_INIT_MEMBER(xybots_state,xybots)
{
m_h256 = 0x0400;
slapstic_configure(*m_maincpu, 0x008000, 0);
slapstic_configure(*m_maincpu, 0x008000, 0, memregion("maincpu")->base() + 0x8000);
}

View File

@ -219,8 +219,8 @@ public:
int m_sprite_base;
int m_sprite_list_end_marker;
int m_sprite_x_offset;
UINT16 *m_bootleg_sprite_ram;
UINT16 *m_bootleg_work_ram;
std::unique_ptr<UINT16[]> m_bootleg_sprite_ram;
std::unique_ptr<UINT16[]> m_bootleg_work_ram;
/* devices */
required_device<m68000_base_device> m_maincpu;

View File

@ -28,7 +28,7 @@ public:
required_device<atari_jsa_base_device> m_jsa;
int m_screen_intensity;
int m_video_disable;
UINT16 * m_sync_data;
UINT16 m_sync_data;
int m_last_offset;
virtual void update_interrupts() override;
virtual void scanline_update(screen_device &screen, int scanline) override;

View File

@ -39,7 +39,7 @@ public:
UINT8 m_showdown_bank_offset;
UINT8 m_firq_vblank;
UINT8 m_firq_beam;
UINT8 *m_topsecex_yscroll;
UINT8 m_topsecex_yscroll;
UINT8 m_latched_x;
std::unique_ptr<UINT8[]> m_local_videoram;
std::unique_ptr<UINT8[]> m_local_paletteram;

View File

@ -287,6 +287,8 @@ protected:
optional_shared_ptr<UINT32> m_ds3sdsp_pgm_memory;
optional_shared_ptr<UINT32> m_ds3xdsp_pgm_memory;
optional_shared_ptr<UINT32> m_dsp32_ram;
UINT16 * m_gsp_protection;
UINT16 * m_gsp_speedup_addr[2];
@ -306,7 +308,7 @@ protected:
UINT32 m_adsp_speedup_count[4];
UINT8 m_gsp_multisync;
optional_shared_ptr<UINT8> m_gsp_vram;
optional_shared_ptr<UINT8> m_gsp_vram;
optional_shared_ptr<UINT16> m_gsp_control_lo;
optional_shared_ptr<UINT16> m_gsp_control_hi;
optional_shared_ptr<UINT16> m_gsp_paletteram_lo;

View File

@ -44,6 +44,7 @@ public:
m_gpu_ram(*this, "gpuram"),
m_gpu_clut(*this, "gpuclut"),
m_romboard_region(*this, "romboard"),
m_mainram(*this, "mainram"),
m_is_r3000(false),
m_is_cojag(false),
m_hacks_enabled(false),
@ -85,6 +86,7 @@ public:
required_shared_ptr<UINT32> m_gpu_ram;
required_shared_ptr<UINT32> m_gpu_clut;
optional_memory_region m_romboard_region;
optional_shared_ptr<UINT32> m_mainram;
// configuration
bool m_is_r3000;

View File

@ -31,6 +31,7 @@ public:
: driver_device(mconfig, type, tag),
m_master(*this, "master"),
m_slave(*this, "slave"),
m_mainram(*this, "mainram"),
m_eeprom(*this, "eeprom"),
m_sound(*this, "custom"),
m_dac0(*this, "dac0"),
@ -40,6 +41,7 @@ public:
required_device<cpu_device> m_master;
required_device<cpu_device> m_slave;
required_shared_ptr<UINT8> m_mainram;
required_device<eeprom_serial_93cxx_device> m_eeprom;
optional_device<leland_80186_sound_device> m_sound;
optional_device<dac_device> m_dac0;

View File

@ -15,11 +15,13 @@ public:
: midtunit_state(mconfig, type, tag),
m_midway_serial_pic(*this, "serial_pic"),
m_nvram(*this, "nvram"),
m_mainram(*this, "mainram"),
m_ports(*this, wunit_ports)
{ }
required_device<midway_serial_pic_device> m_midway_serial_pic;
required_shared_ptr<UINT16> m_nvram;
required_shared_ptr<UINT16> m_mainram;
required_ioport_array<4> m_ports;
DECLARE_IOPORT_ARRAY(wunit_ports);

View File

@ -52,6 +52,7 @@ public:
m_adpcm_sound(*this, "adpcm"),
m_generic_paletteram_16(*this, "paletteram"),
m_gfx_rom(*this, "gfx_rom", 16),
m_mainram(*this, "mainram"),
m_ports(*this, ports) { }
required_device<cpu_device> m_maincpu;
@ -64,7 +65,7 @@ public:
required_shared_ptr<UINT16> m_generic_paletteram_16;
optional_shared_ptr<UINT8> m_gfx_rom;
required_shared_ptr<UINT16> m_mainram;
optional_ioport_array<6> m_ports;
DECLARE_IOPORT_ARRAY(ports);

View File

@ -17,10 +17,12 @@ public:
: atarigen_state(mconfig, type, tag),
m_jsa(*this, "jsa"),
m_vad(*this, "vad"),
m_mainram(*this, "mainram"),
m_bankrom_base(*this, "bankrom_base") { }
required_device<atari_jsa_iii_device> m_jsa;
required_device<atari_vad_device> m_vad;
required_shared_ptr<UINT16> m_mainram;
UINT16 *m_bankswitch_base;
required_shared_ptr<UINT16> m_bankrom_base;

View File

@ -106,6 +106,7 @@ protected:
required_device<sega_xboard_sprite_device> m_sprites;
required_device<segaic16_video_device> m_segaic16vid;
required_device<segaic16_road_device> m_segaic16road;
required_shared_ptr<UINT16> m_subram0;
// configuration
bool m_adc_reverse[8];

View File

@ -1212,7 +1212,7 @@ DIRECT_UPDATE_MEMBER(atarigen_state::slapstic_setdirect)
// slapstic and sets the chip number.
//-------------------------------------------------
void atarigen_state::slapstic_configure(cpu_device &device, offs_t base, offs_t mirror)
void atarigen_state::slapstic_configure(cpu_device &device, offs_t base, offs_t mirror, UINT8 *mem)
{
if (!m_slapstic_device.found())
fatalerror("Slapstic device is missing\n");
@ -1223,8 +1223,9 @@ void atarigen_state::slapstic_configure(cpu_device &device, offs_t base, offs_t
// install the memory handlers
address_space &program = device.space(AS_PROGRAM);
m_slapstic = program.install_readwrite_handler(base, base + 0x7fff, 0, mirror, read16_delegate(FUNC(atarigen_state::slapstic_r), this), write16_delegate(FUNC(atarigen_state::slapstic_w), this));
program.install_readwrite_handler(base, base + 0x7fff, 0, mirror, read16_delegate(FUNC(atarigen_state::slapstic_r), this), write16_delegate(FUNC(atarigen_state::slapstic_w), this));
program.set_direct_update_handler(direct_update_delegate(FUNC(atarigen_state::slapstic_setdirect), this));
m_slapstic = (UINT16 *)mem;
// allocate memory for a copy of bank 0
m_slapstic_bank0.resize(0x2000);

View File

@ -355,7 +355,7 @@ public:
DECLARE_WRITE16_MEMBER(video_int_ack_w);
// slapstic helpers
void slapstic_configure(cpu_device &device, offs_t base, offs_t mirror);
void slapstic_configure(cpu_device &device, offs_t base, offs_t mirror, UINT8 *mem);
void slapstic_update_bank(int bank);
DECLARE_DIRECT_UPDATE_MEMBER(slapstic_setdirect);
DECLARE_WRITE16_MEMBER(slapstic_w);

View File

@ -13,10 +13,6 @@
#include "includes/midtunit.h"
/* compile-time constants */
#define ENABLE_ALL_JDREDD_LEVELS 0
/* constant definitions */
#define SOUND_ADPCM 1
#define SOUND_ADPCM_LARGE 2
@ -351,21 +347,6 @@ READ16_MEMBER(midtunit_state::jdredd_prot_r)
}
#if ENABLE_ALL_JDREDD_LEVELS
static UINT16 *jdredd_hack;
READ16_MEMBER(midtunit_state::jdredd_hack_r)
{
if (space.device().safe_pc() == 0xFFBA7EB0)
{
fprintf(stderr, "jdredd_hack_r\n");
return 0;
}
return jdredd_hack[offset];
}
#endif
/*************************************
*
@ -466,11 +447,6 @@ DRIVER_INIT_MEMBER(midtunit_state,jdreddp)
machine().device("adpcm:cpu")->memory().space(AS_PROGRAM).install_read_bank(0xfbcf, 0xfbf9, "bank7");
machine().device("adpcm:cpu")->memory().space(AS_PROGRAM).install_write_bank(0xfbcf, 0xfbf9, "bank9");
membank("adpcm:bank9")->set_base(auto_alloc_array(machine(), UINT8, 0x80));
#if ENABLE_ALL_JDREDD_LEVELS
/* how about the final levels? */
jdredd_hack = m_maincpu->space(AS_PROGRAM).install_read_handler(0xFFBA7FF0, 0xFFBA7FFf, read16_delegate(FUNC(midtunit_state::jdredd_hack_r), this));
#endif
}

View File

@ -218,13 +218,15 @@ DRIVER_INIT_MEMBER(midwunit_state,mk3r10)
DRIVER_INIT_MEMBER(midwunit_state,umk3)
{
init_mk3_common();
m_umk3_palette = m_maincpu->space(AS_PROGRAM).install_write_handler(0x0106a060, 0x0106a09f, write16_delegate(FUNC(midwunit_state::umk3_palette_hack_w),this));
m_maincpu->space(AS_PROGRAM).install_write_handler(0x0106a060, 0x0106a09f, write16_delegate(FUNC(midwunit_state::umk3_palette_hack_w),this));
m_umk3_palette = m_mainram + (0x6a060>>4);
}
DRIVER_INIT_MEMBER(midwunit_state,umk3r11)
{
init_mk3_common();
m_umk3_palette = m_maincpu->space(AS_PROGRAM).install_write_handler(0x0106a060, 0x0106a09f,write16_delegate(FUNC(midwunit_state::umk3_palette_hack_w),this));
m_maincpu->space(AS_PROGRAM).install_write_handler(0x0106a060, 0x0106a09f,write16_delegate(FUNC(midwunit_state::umk3_palette_hack_w),this));
m_umk3_palette = m_mainram + (0x6a060>>4);
}

View File

@ -504,7 +504,8 @@ void midyunit_state::term2_init_common(write16_delegate hack_w)
/* HACK: this prevents the freeze on the movies */
/* until we figure what's causing it, this is better than nothing */
m_t2_hack_mem = m_maincpu->space(AS_PROGRAM).install_write_handler(0x010aa0e0, 0x010aa0ff, hack_w);
m_maincpu->space(AS_PROGRAM).install_write_handler(0x010aa0e0, 0x010aa0ff, hack_w);
m_t2_hack_mem = m_mainram + (0xaa0e0>>4);
}
DRIVER_INIT_MEMBER(midyunit_state,term2) { term2_init_common(write16_delegate(FUNC(midyunit_state::term2_hack_w),this)); }

View File

@ -57,7 +57,7 @@ VIDEO_START_MEMBER(exidy440_state,topsecex)
{
VIDEO_START_CALL_MEMBER(exidy440);
*m_topsecex_yscroll = 0;
m_topsecex_yscroll = 0;
}
@ -442,7 +442,7 @@ UINT32 exidy440_state::screen_update_exidy440(screen_device &screen, bitmap_ind1
UINT32 exidy440_state::screen_update_topsecex(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
/* redraw the screen */
update_screen(screen, bitmap, cliprect, *m_topsecex_yscroll, FALSE);
update_screen(screen, bitmap, cliprect, m_topsecex_yscroll, FALSE);
return 0;
}