From a311a8617377b57928b3cacafdf680ff9d896fae Mon Sep 17 00:00:00 2001 From: "Andrei I. Holub" Date: Fri, 22 May 2026 16:24:45 -0400 Subject: [PATCH] sinclair/next/specnext.cpp: Attempt to fix edge rendering cases --- src/mame/sinclair/next/specnext.cpp | 12 ++++-------- src/mame/sinclair/next/specnext_layer2.cpp | 2 +- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/src/mame/sinclair/next/specnext.cpp b/src/mame/sinclair/next/specnext.cpp index da0c12a07..d096510ef 100644 --- a/src/mame/sinclair/next/specnext.cpp +++ b/src/mame/sinclair/next/specnext.cpp @@ -7,8 +7,7 @@ Versions: TBBlue 1.2, Issue 0, Issue 1, Issue 2, Issue 2B (Kickstarter 1), Issue 2D, Issue 2E, Issue 2H, Issue 4 (Kickstarter 2), Issue 5 (Kickstarter 3) - Current implementation is based on Issue 4. Only limited difference - tracked through PORT_CONFIG + Current implementation is based on Issue 5. TODO: * contention @@ -1041,7 +1040,7 @@ u32 specnext_state::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, c if (tiles_en) m_tiles->draw(screen, bitmap, clip320x256, TILEMAP_DRAW_CATEGORY(1), l[0]); if (ula_en) { - m_ula_scr->draw_border(screen, bitmap, cliprect, m_port_fe_data & 0x07); + m_ula_scr->draw_border(screen, bitmap, cliprect, m_port_fe_data & 0x07, l[0]); if (m_nr_15_lores_en) m_lores->draw(screen, bitmap, clip256x192, l[0]); else m_ula_scr->draw(screen, bitmap, clip256x192, l[0]); } @@ -1054,7 +1053,6 @@ u32 specnext_state::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, c { if (ula_en) { - m_ula_scr->draw_border(screen, bitmap, cliprect, m_port_fe_data & 0x07, 1); if (m_nr_15_lores_en) m_lores->draw(screen, bitmap, clip256x192, 1); else m_ula_scr->draw(screen, bitmap, clip256x192, 1); } @@ -1067,7 +1065,6 @@ u32 specnext_state::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, c if (tiles_en) m_tiles->draw(screen, bitmap, clip320x256, TILEMAP_DRAW_CATEGORY(1), 1); if (ula_en) { - m_ula_scr->draw_border(screen, bitmap, cliprect, m_port_fe_data & 0x07, 1); if (m_nr_15_lores_en) m_lores->draw(screen, bitmap, clip256x192, 1); else m_ula_scr->draw(screen, bitmap, clip256x192, 1); } @@ -1080,7 +1077,6 @@ u32 specnext_state::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, c if (layer2_en) m_layer2->draw_mix(screen, bitmap, m_blendprio_bitmap, clip320x256, m_nr_15_layer_priority & 1); if (ula_en) { - m_ula_scr->draw_border(screen, bitmap, cliprect, m_port_fe_data & 0x07); if (m_nr_15_lores_en) m_lores->draw(screen, bitmap, clip256x192); else m_ula_scr->draw(screen, bitmap, clip256x192); } @@ -1091,12 +1087,12 @@ u32 specnext_state::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, c if (tiles_en) m_tiles->draw(screen, bitmap, clip320x256, TILEMAP_DRAW_CATEGORY(1), 2); if (ula_en) { - m_ula_scr->draw_border(screen, bitmap, cliprect, m_port_fe_data & 0x07); + m_ula_scr->draw_border(screen, bitmap, cliprect, m_port_fe_data & 0x07, 2); if (m_nr_15_lores_en) m_lores->draw(screen, bitmap, clip256x192, 2); else m_ula_scr->draw(screen, bitmap, clip256x192, 2); } if (tiles_en) m_tiles->draw(screen, bitmap, clip320x256, TILEMAP_DRAW_CATEGORY(2), 2); - if (layer2_en) m_layer2->draw_mix(screen, bitmap, bitmap, clip320x256, m_nr_15_layer_priority & 1); + if (layer2_en) m_layer2->draw(screen, bitmap, clip320x256, 1, 2); } } // sprites below foreground diff --git a/src/mame/sinclair/next/specnext_layer2.cpp b/src/mame/sinclair/next/specnext_layer2.cpp index aaf15ecf8..b218d9c69 100644 --- a/src/mame/sinclair/next/specnext_layer2.cpp +++ b/src/mame/sinclair/next/specnext_layer2.cpp @@ -31,7 +31,7 @@ void specnext_layer2_device::draw_mix(screen_device &screen, bitmap_rgb32 &bitma const rgb_t gt0 = rgbexpand<3,3,3>((m_global_transparent << 1) | 0, 6, 3, 0); const rgb_t gt1 = rgbexpand<3,3,3>((m_global_transparent << 1) | 1, 6, 3, 0); - const rgb_t fb = palette().pen_color(0x800); + const rgb_t fb = palette().pen_color(0xa00); auto blend_op = [gt0, gt1, fb, mixer](u8 &prio, u32 &target, u32 &priotarget, const rgb_t pen, bool is_prio_color) { if ((pen == gt0) || (pen == gt1))