From b458283914ba41f0c746cdc2140175090891e304 Mon Sep 17 00:00:00 2001 From: benrg Date: Sat, 31 Dec 2022 16:54:44 -0800 Subject: Remove a2_video_device::m_dhires_artifact_map (#10767) m_dhires_artifact_map was just a rotate-four-bits-by-2 lookup table. The code that used it was already doing four-bit rotations by arbitrary amounts, so it is slightly simplified by eliminating the table. --- src/mame/apple/apple2video.cpp | 22 +++------------------- src/mame/apple/apple2video.h | 1 - 2 files changed, 3 insertions(+), 20 deletions(-) diff --git a/src/mame/apple/apple2video.cpp b/src/mame/apple/apple2video.cpp index 6815b035446..93f1eaa1834 100644 --- a/src/mame/apple/apple2video.cpp +++ b/src/mame/apple/apple2video.cpp @@ -53,13 +53,6 @@ void a2_video_device::device_start() BLACK, PURPLE, GREEN, WHITE, BLACK, BLUE, ORANGE, WHITE }; - static const uint8_t dhires_artifact_color_table[] = - { - BLACK, DKGREEN, BROWN, GREEN, - DKRED, DKGRAY, ORANGE, YELLOW, - DKBLUE, BLUE, GRAY, AQUA, - PURPLE, LTBLUE, PINK, WHITE - }; // generate hi-res artifact data int i, j; @@ -92,15 +85,6 @@ void a2_video_device::device_start() } } - /* 2^4 dependent pixels */ - m_dhires_artifact_map = std::make_unique(16); - - /* build double hires artifact map */ - for (i = 0; i < 16; i++) - { - m_dhires_artifact_map[i] = dhires_artifact_color_table[i]; - } - // initialise for device_palette_interface init_palette(); @@ -921,7 +905,7 @@ void a2_video_device::dhgr_update(screen_device &screen, bitmap_ind16 &bitmap, c { for (int b = 0; b < 4; b++) { - v = m_dhires_artifact_map[((((w >> (b + 7-1)) & 0x0F) * 0x11) >> (((2-(col*7+b))) & 0x03)) & 0x0F]; + v = ((((w >> (b + 7-1)) & 0x0F) * 0x11) >> (-(col*7+b) & 0x03)) & 0x0F; *(p++) = v; } } @@ -939,7 +923,7 @@ void a2_video_device::dhgr_update(screen_device &screen, bitmap_ind16 &bitmap, c { for (int b = 4; b < 7; b++) { - v = m_dhires_artifact_map[((((w >> (b + 7-1)) & 0x0F) * 0x11) >> (((2-(col*7+b))) & 0x03)) & 0x0F]; + v = ((((w >> (b + 7-1)) & 0x0F) * 0x11) >> (-(col*7+b) & 0x03)) & 0x0F; *(p++) = v; } } @@ -960,7 +944,7 @@ void a2_video_device::dhgr_update(screen_device &screen, bitmap_ind16 &bitmap, c { for (int b = 0; b < 7; b++) { - v = m_dhires_artifact_map[((((w >> (b + 7-1)) & 0x0F) * 0x11) >> (((2-(col*7+b))) & 0x03)) & 0x0F]; + v = ((((w >> (b + 7-1)) & 0x0F) * 0x11) >> (-(col*7+b) & 0x03)) & 0x0F; *(p++) = v; } } diff --git a/src/mame/apple/apple2video.h b/src/mame/apple/apple2video.h index a41196cbeae..e0edd659ef3 100644 --- a/src/mame/apple/apple2video.h +++ b/src/mame/apple/apple2video.h @@ -36,7 +36,6 @@ public: u32 m_GSborder_colors[16]{}, m_shr_palette[256]{}; std::unique_ptr m_8bit_graphics; std::unique_ptr m_hires_artifact_map; - std::unique_ptr m_dhires_artifact_map; u8 *m_ram_ptr = nullptr, *m_aux_ptr = nullptr, *m_char_ptr = nullptr; u16 m_aux_mask = 0xffff; -- cgit v1.2.3