diff options
author | andreasnaive <andreasnaive@gmail.com> | 2019-03-25 23:13:40 +0100 |
---|---|---|
committer | andreasnaive <andreasnaive@gmail.com> | 2019-03-25 23:13:40 +0100 |
commit | b380514764cf857469bae61c11143a19f79a74c5 (patch) | |
tree | 63c8012e262618f08a332da31dd714281aa2c5ed /src/devices/video/mb_vcu.cpp | |
parent | c24473ddff715ecec2e258a6eb38960cf8c8e98e (diff) |
Revert "conflict resolution (nw)"
This reverts commit c24473ddff715ecec2e258a6eb38960cf8c8e98e, reversing
changes made to 009cba4fb8102102168ef32870892438327f3705.
Diffstat (limited to 'src/devices/video/mb_vcu.cpp')
-rw-r--r-- | src/devices/video/mb_vcu.cpp | 30 |
1 files changed, 13 insertions, 17 deletions
diff --git a/src/devices/video/mb_vcu.cpp b/src/devices/video/mb_vcu.cpp index 96acc945359..8d0f921be12 100644 --- a/src/devices/video/mb_vcu.cpp +++ b/src/devices/video/mb_vcu.cpp @@ -38,20 +38,16 @@ DEFINE_DEVICE_TYPE(MB_VCU, mb_vcu_device, "mb_vcu", "Mazer Blazer custom VCU") void mb_vcu_device::mb_vcu_vram(address_map &map) { - if (!has_configured_map(0)) - map(0x00000, 0x7ffff).ram(); // enough for a 256x256x4 x 2 pages of framebuffer with 4 layers (TODO: doubled for simplicity) + map(0x00000, 0x7ffff).ram(); // enough for a 256x256x4 x 2 pages of framebuffer with 4 layers (TODO: doubled for simplicity) } void mb_vcu_device::mb_vcu_pal_ram(address_map &map) { - if (!has_configured_map(1)) - { - map(0x0000, 0x00ff).ram(); - map(0x0200, 0x02ff).ram(); - map(0x0400, 0x04ff).ram(); - map(0x0600, 0x06ff).rw(FUNC(mb_vcu_device::mb_vcu_paletteram_r), FUNC(mb_vcu_device::mb_vcu_paletteram_w)); - } + map(0x0000, 0x00ff).ram(); + map(0x0200, 0x02ff).ram(); + map(0x0400, 0x04ff).ram(); + map(0x0600, 0x06ff).rw(FUNC(mb_vcu_device::mb_vcu_paletteram_r), FUNC(mb_vcu_device::mb_vcu_paletteram_w)); } READ8_MEMBER( mb_vcu_device::mb_vcu_paletteram_r ) @@ -68,19 +64,19 @@ WRITE8_MEMBER( mb_vcu_device::mb_vcu_paletteram_w ) /* red component */ bit1 = (m_palram[offset] >> 7) & 0x01; bit0 = (m_palram[offset] >> 6) & 0x01; - r = combine_weights(m_weights_r, bit0, bit1); + r = combine_2_weights(m_weights_r, bit0, bit1); /* green component */ bit2 = (m_palram[offset] >> 5) & 0x01; bit1 = (m_palram[offset] >> 4) & 0x01; bit0 = (m_palram[offset] >> 3) & 0x01; - g = combine_weights(m_weights_g, bit0, bit1, bit2); + g = combine_3_weights(m_weights_g, bit0, bit1, bit2); /* blue component */ bit2 = (m_palram[offset] >> 2) & 0x01; bit1 = (m_palram[offset] >> 1) & 0x01; bit0 = (m_palram[offset] >> 0) & 0x01; - b = combine_weights(m_weights_b, bit0, bit1, bit2); + b = combine_3_weights(m_weights_b, bit0, bit1, bit2); m_palette->set_pen_color(offset, rgb_t(r, g, b)); } @@ -151,8 +147,8 @@ mb_vcu_device::mb_vcu_device(const machine_config &mconfig, const char *tag, dev : device_t(mconfig, MB_VCU, tag, owner, clock) , device_memory_interface(mconfig, *this) , device_video_interface(mconfig, *this) - , m_videoram_space_config("videoram", ENDIANNESS_LITTLE, 8, 19, 0, address_map_constructor(FUNC(mb_vcu_device::mb_vcu_vram), this)) - , m_paletteram_space_config("palram", ENDIANNESS_LITTLE, 8, 16, 0, address_map_constructor(FUNC(mb_vcu_device::mb_vcu_pal_ram), this)) + , m_videoram_space_config("videoram", ENDIANNESS_LITTLE, 8, 19, 0, address_map_constructor(), address_map_constructor(FUNC(mb_vcu_device::mb_vcu_vram), this)) + , m_paletteram_space_config("palram", ENDIANNESS_LITTLE, 8, 16, 0, address_map_constructor(), address_map_constructor(FUNC(mb_vcu_device::mb_vcu_pal_ram), this)) , m_cpu(*this, finder_base::DUMMY_TAG) , m_palette(*this, finder_base::DUMMY_TAG) { @@ -478,19 +474,19 @@ WRITE8_MEMBER( mb_vcu_device::background_color_w ) /* red component */ bit1 = (m_bk_color >> 7) & 0x01; bit0 = (m_bk_color >> 6) & 0x01; - r = combine_weights(m_weights_r, bit0, bit1); + r = combine_2_weights(m_weights_r, bit0, bit1); /* green component */ bit2 = (m_bk_color >> 5) & 0x01; bit1 = (m_bk_color >> 4) & 0x01; bit0 = (m_bk_color >> 3) & 0x01; - g = combine_weights(m_weights_g, bit0, bit1, bit2); + g = combine_3_weights(m_weights_g, bit0, bit1, bit2); /* blue component */ bit2 = (m_bk_color >> 2) & 0x01; bit1 = (m_bk_color >> 1) & 0x01; bit0 = (m_bk_color >> 0) & 0x01; - b = combine_weights(m_weights_b, bit0, bit1, bit2); + b = combine_3_weights(m_weights_b, bit0, bit1, bit2); m_palette->set_pen_color(0x100, rgb_t(r, g, b)); } |