summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/video/ramdac.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/video/ramdac.cpp')
-rw-r--r--src/devices/video/ramdac.cpp39
1 files changed, 19 insertions, 20 deletions
diff --git a/src/devices/video/ramdac.cpp b/src/devices/video/ramdac.cpp
index d651235f60c..bd674d679c1 100644
--- a/src/devices/video/ramdac.cpp
+++ b/src/devices/video/ramdac.cpp
@@ -14,7 +14,7 @@
***************************************************************************/
#include "emu.h"
-#include "video/ramdac.h"
+#include "ramdac.h"
// default address map
void ramdac_device::ramdac_palram(address_map &map)
@@ -44,13 +44,13 @@ DEFINE_DEVICE_TYPE(RAMDAC, ramdac_device, "ramdac", "RAMDAC")
// ramdac_device - constructor
//-------------------------------------------------
-ramdac_device::ramdac_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
- : device_t(mconfig, RAMDAC, tag, owner, clock),
- device_memory_interface(mconfig, *this),
- m_space_config("videoram", ENDIANNESS_LITTLE, 8, 10, 0, address_map_constructor(FUNC(ramdac_device::ramdac_palram), this)),
- m_palette(*this, finder_base::DUMMY_TAG),
- m_color_base(0),
- m_split_read_reg(0)
+ramdac_device::ramdac_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
+ device_t(mconfig, RAMDAC, tag, owner, clock),
+ device_memory_interface(mconfig, *this),
+ m_space_config("videoram", ENDIANNESS_LITTLE, 8, 10, 0, address_map_constructor(FUNC(ramdac_device::ramdac_palram), this)),
+ m_palette(*this, finder_base::DUMMY_TAG),
+ m_color_base(0),
+ m_split_read_reg(0)
{
}
@@ -101,7 +101,6 @@ void ramdac_device::device_validity_check(validity_checker &valid) const
void ramdac_device::device_start()
{
m_palram = make_unique_clear<uint8_t[]>(1 << 10);
-
}
@@ -134,24 +133,24 @@ inline void ramdac_device::reg_increment(uint8_t inc_type)
}
}
-READ8_MEMBER( ramdac_device::index_r )
+uint8_t ramdac_device::index_r()
{
return m_pal_index[0];
}
-WRITE8_MEMBER( ramdac_device::index_w )
+void ramdac_device::index_w(uint8_t data)
{
m_pal_index[0] = data;
m_int_index[0] = 0;
}
-WRITE8_MEMBER( ramdac_device::index_r_w )
+void ramdac_device::index_r_w(uint8_t data)
{
m_pal_index[1] = data;
m_int_index[1] = 0;
}
-READ8_MEMBER( ramdac_device::pal_r )
+uint8_t ramdac_device::pal_r()
{
uint8_t res;
res = readbyte(m_pal_index[m_split_read_reg] | (m_int_index[m_split_read_reg] << 8));
@@ -159,18 +158,18 @@ READ8_MEMBER( ramdac_device::pal_r )
return res;
}
-WRITE8_MEMBER( ramdac_device::pal_w )
+void ramdac_device::pal_w(uint8_t data)
{
- writebyte(m_pal_index[0] | (m_int_index[0] << 8),data);
+ writebyte(m_pal_index[0] | (m_int_index[0] << 8), data);
reg_increment(0);
}
-READ8_MEMBER( ramdac_device::mask_r )
+uint8_t ramdac_device::mask_r()
{
return m_pal_mask;
}
-WRITE8_MEMBER( ramdac_device::mask_w )
+void ramdac_device::mask_w(uint8_t data)
{
m_pal_mask = data;
}
@@ -180,12 +179,12 @@ WRITE8_MEMBER( ramdac_device::mask_w )
// Generic bank read/write handlers
//**************************************************************************
-READ8_MEMBER( ramdac_device::ramdac_pal_r )
+uint8_t ramdac_device::ramdac_pal_r(offs_t offset)
{
return m_palram[offset];
}
-WRITE8_MEMBER( ramdac_device::ramdac_rgb666_w )
+void ramdac_device::ramdac_rgb666_w(offs_t offset, uint8_t data)
{
uint16_t pal_offs;
@@ -196,7 +195,7 @@ WRITE8_MEMBER( ramdac_device::ramdac_rgb666_w )
m_palette->set_pen_color(pen, pal6bit(m_palram[pal_offs|0x000]), pal6bit(m_palram[pal_offs|0x100]), pal6bit(m_palram[pal_offs|0x200]));
}
-WRITE8_MEMBER( ramdac_device::ramdac_rgb888_w )
+void ramdac_device::ramdac_rgb888_w(offs_t offset, uint8_t data)
{
uint16_t pal_offs;