mirror of
https://github.com/holub/mame
synced 2025-07-05 18:08:04 +03:00
atarigen: Remove the slapstic direct update handler, which hasn't been
necessary since direct access has been enhanced to work correctly on handlers, years ago [O. Galibert]
This commit is contained in:
parent
3f0a378e54
commit
d755d76fda
@ -1185,28 +1185,6 @@ void atarigen_state::device_post_load()
|
||||
}
|
||||
|
||||
|
||||
DIRECT_UPDATE_MEMBER(atarigen_state::slapstic_setdirect)
|
||||
{
|
||||
// if we jump to an address in the slapstic region, tweak the slapstic
|
||||
// at that address and return ~0; this will cause us to be called on
|
||||
// subsequent fetches as well
|
||||
address &= ~m_slapstic_mirror;
|
||||
if (address >= m_slapstic_base && address < m_slapstic_base + 0x8000)
|
||||
{
|
||||
offs_t pc = direct.space().device().safe_pcbase();
|
||||
if (pc != m_slapstic_last_pc || address != m_slapstic_last_address)
|
||||
{
|
||||
m_slapstic_last_pc = pc;
|
||||
m_slapstic_last_address = address;
|
||||
slapstic_r(direct.space(), (address >> 1) & 0x3fff, 0xffff);
|
||||
}
|
||||
return ~0;
|
||||
}
|
||||
return address;
|
||||
}
|
||||
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// slapstic_configure: Installs memory handlers for the
|
||||
// slapstic and sets the chip number.
|
||||
@ -1224,7 +1202,6 @@ void atarigen_state::slapstic_configure(cpu_device &device, offs_t base, offs_t
|
||||
// install the memory handlers
|
||||
address_space &program = device.space(AS_PROGRAM);
|
||||
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
|
||||
@ -1265,6 +1242,8 @@ READ16_MEMBER(atarigen_state::slapstic_r)
|
||||
if (!m_slapstic_device.found())
|
||||
fatalerror("Slapstic device is missing?\n");
|
||||
|
||||
fprintf(stderr, "slapstic_r %04x\n", offset);
|
||||
|
||||
// fetch the result from the current bank first
|
||||
int result = m_slapstic[offset & 0xfff];
|
||||
|
||||
|
@ -357,7 +357,6 @@ public:
|
||||
// slapstic helpers
|
||||
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);
|
||||
DECLARE_READ16_MEMBER(slapstic_r);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user