sinclair/next/specnext.cpp: Attempt to fix edge rendering cases

This commit is contained in:
Andrei I. Holub 2026-05-22 16:24:45 -04:00
parent 6f78bdf018
commit a311a86173
2 changed files with 5 additions and 9 deletions

View File

@ -7,8 +7,7 @@
Versions: TBBlue 1.2, Issue 0, Issue 1, Issue 2, Versions: TBBlue 1.2, Issue 0, Issue 1, Issue 2,
Issue 2B (Kickstarter 1), Issue 2D, Issue 2E, Issue 2H, Issue 2B (Kickstarter 1), Issue 2D, Issue 2E, Issue 2H,
Issue 4 (Kickstarter 2), Issue 5 (Kickstarter 3) Issue 4 (Kickstarter 2), Issue 5 (Kickstarter 3)
Current implementation is based on Issue 4. Only limited difference Current implementation is based on Issue 5.
tracked through PORT_CONFIG
TODO: TODO:
* contention * 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 (tiles_en) m_tiles->draw(screen, bitmap, clip320x256, TILEMAP_DRAW_CATEGORY(1), l[0]);
if (ula_en) 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]); if (m_nr_15_lores_en) m_lores->draw(screen, bitmap, clip256x192, l[0]);
else m_ula_scr->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) 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); if (m_nr_15_lores_en) m_lores->draw(screen, bitmap, clip256x192, 1);
else m_ula_scr->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 (tiles_en) m_tiles->draw(screen, bitmap, clip320x256, TILEMAP_DRAW_CATEGORY(1), 1);
if (ula_en) 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); if (m_nr_15_lores_en) m_lores->draw(screen, bitmap, clip256x192, 1);
else m_ula_scr->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 (layer2_en) m_layer2->draw_mix(screen, bitmap, m_blendprio_bitmap, clip320x256, m_nr_15_layer_priority & 1);
if (ula_en) 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); if (m_nr_15_lores_en) m_lores->draw(screen, bitmap, clip256x192);
else m_ula_scr->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 (tiles_en) m_tiles->draw(screen, bitmap, clip320x256, TILEMAP_DRAW_CATEGORY(1), 2);
if (ula_en) 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); if (m_nr_15_lores_en) m_lores->draw(screen, bitmap, clip256x192, 2);
else m_ula_scr->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 (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 // sprites below foreground

View File

@ -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 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 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) 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)) if ((pen == gt0) || (pen == gt1))