From b946a445f1319b044f7451239c5bfb5244aed299 Mon Sep 17 00:00:00 2001 From: DavidHaywood <28625134+DavidHaywood@users.noreply.github.com> Date: Sat, 30 Mar 2019 01:15:54 +0000 Subject: spg110: add manual vram uploads, needed for most of the jak_spdmo games --- src/devices/machine/spg110.cpp | 1 + src/devices/machine/spg110_video.cpp | 11 +++++++++++ src/devices/machine/spg110_video.h | 3 +++ 3 files changed, 15 insertions(+) diff --git a/src/devices/machine/spg110.cpp b/src/devices/machine/spg110.cpp index 68032a973d5..060ae511f0c 100644 --- a/src/devices/machine/spg110.cpp +++ b/src/devices/machine/spg110.cpp @@ -131,6 +131,7 @@ void spg110_device::map(address_map &map) map(0x002062, 0x002062).rw(m_spg_video, FUNC(spg110_video_device::dma_len_status_r),FUNC(spg110_video_device::dma_len_trigger_w)); map(0x002063, 0x002063).rw(m_spg_video, FUNC(spg110_video_device::spg110_2063_r),FUNC(spg110_video_device::spg110_2063_w)); // Video IRQ source / ack (3 different things checked here instead of 2 on spg2xx?) map(0x002064, 0x002064).w(m_spg_video, FUNC(spg110_video_device::dma_dst_step_w)); + map(0x002065, 0x002065).rw(m_spg_video, FUNC(spg110_video_device::dma_manual_r), FUNC(spg110_video_device::dma_manual_w)); map(0x002066, 0x002066).w(m_spg_video, FUNC(spg110_video_device::dma_src_w)); map(0x002067, 0x002067).w(m_spg_video, FUNC(spg110_video_device::dma_unk_2067_w)); map(0x002068, 0x002068).w(m_spg_video, FUNC(spg110_video_device::dma_src_step_w)); diff --git a/src/devices/machine/spg110_video.cpp b/src/devices/machine/spg110_video.cpp index 799e0653c8a..9a9600b914d 100644 --- a/src/devices/machine/spg110_video.cpp +++ b/src/devices/machine/spg110_video.cpp @@ -435,6 +435,17 @@ WRITE16_MEMBER(spg110_video_device::dma_len_trigger_w) } } +WRITE16_MEMBER(spg110_video_device::dma_manual_w) +{ + this->space(0).write_word(m_dma_dst * 2, data, 0xffff); +} + +READ16_MEMBER(spg110_video_device::dma_manual_r) +{ + uint16_t val = this->space(0).read_word(m_dma_dst * 2); + return val; +} + READ16_MEMBER(spg110_video_device::dma_len_status_r) { return 0x1fff; // DMA related? diff --git a/src/devices/machine/spg110_video.h b/src/devices/machine/spg110_video.h index 1b8743de54d..bd8a7fa8e04 100644 --- a/src/devices/machine/spg110_video.h +++ b/src/devices/machine/spg110_video.h @@ -76,6 +76,9 @@ public: DECLARE_READ16_MEMBER(dma_len_status_r); DECLARE_READ16_MEMBER(spg110_2063_r); + DECLARE_READ16_MEMBER(dma_manual_r); + DECLARE_WRITE16_MEMBER(dma_manual_w); + DECLARE_READ16_MEMBER(tmap0_regs_r); DECLARE_READ16_MEMBER(tmap1_regs_r); DECLARE_WRITE16_MEMBER(tmap0_regs_w); -- cgit v1.2.3