diff options
author | arbee <rb6502@users.noreply.github.com> | 2017-07-19 22:39:21 -0400 |
---|---|---|
committer | arbee <rb6502@users.noreply.github.com> | 2017-07-19 22:39:21 -0400 |
commit | 94eab0cec6ab793255076fb6449cce41800c0ccb (patch) | |
tree | d1a98032faaa501f613e6fcaa054825d96f9e4ca | |
parent | 08af3d9f61de5028d581db86178b3bdada7c6eb6 (diff) |
alphatro: allow DMA to VRAM (nw)
-rw-r--r-- | src/mame/drivers/alphatro.cpp | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/src/mame/drivers/alphatro.cpp b/src/mame/drivers/alphatro.cpp index 9d251ff3dad..786e421936b 100644 --- a/src/mame/drivers/alphatro.cpp +++ b/src/mame/drivers/alphatro.cpp @@ -160,8 +160,28 @@ void alphatro_state::update_banking() } } -READ8_MEMBER (alphatro_state::ram0000_r) { return m_ram_ptr[offset]; } -WRITE8_MEMBER(alphatro_state::ram0000_w) { m_ram_ptr[offset] = data; } +READ8_MEMBER (alphatro_state::ram0000_r) +{ + if (offset < 0xf000) + { + return m_ram_ptr[offset]; + } + + return m_p_videoram[offset & 0xfff]; +} + +WRITE8_MEMBER(alphatro_state::ram0000_w) +{ + if (offset < 0xf000) + { + m_ram_ptr[offset] = data; + } + else + { + m_p_videoram[offset & 0xfff] = data; + } +} + READ8_MEMBER (alphatro_state::ram6000_r) { return m_ram_ptr[offset+0x6000]; } WRITE8_MEMBER(alphatro_state::ram6000_w) { m_ram_ptr[offset+0x6000] = data; } READ8_MEMBER (alphatro_state::rama000_r) { return m_ram_ptr[offset+0xa000]; } |