Skip to content

Commit

Permalink
apple/apple2video.cpp: Fixed Apple II DHGR rendering in Color/Composi…
Browse files Browse the repository at this point in the history
…te mode. (#11595)

Fixes regression causing Video-7 RGB rendering to be used when (rgbmode == -1).
  • Loading branch information
uraniumgun committed Oct 4, 2023
1 parent 52e5d73 commit 63843b5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/mame/apple/apple2video.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -655,7 +655,6 @@ void a2_video_device::dhgr_update(screen_device &screen, bitmap_ind16 &bitmap, c
endrow = (std::min)(endrow, cliprect.bottom());
int const startcol = (cliprect.left() / 14);
int const stopcol = (cliprect.right() / 14) + 1;
const bool bIsRGBMonitor = rgb_monitor();

uint8_t const *const vram = &m_ram_ptr[page];
uint8_t const *const vaux = (m_aux_ptr ? m_aux_ptr : vram) + page;
Expand Down Expand Up @@ -703,8 +702,9 @@ void a2_video_device::dhgr_update(screen_device &screen, bitmap_ind16 &bitmap, c
words[col] = (vaux_row[col] & 0x7f) + ((vram_row[col] & 0x7f) << 7);
}

if (monochrome)
if (rgbmode < 0 || monochrome)
{
// Composite or monochrome, use the renderer that supports artifact rendering.
render_line(p, words, startcol, stopcol, monochrome, true);
}
else
Expand All @@ -730,7 +730,7 @@ void a2_video_device::dhgr_update(screen_device &screen, bitmap_ind16 &bitmap, c
{
unsigned const w = words[col] + (words[col+1] << 14);

unsigned const color_mask = (rgbmode == 3 || !bIsRGBMonitor) ? -1u :
unsigned const color_mask = (rgbmode == 3) ? -1u :
(vaux_row[col] >> 7) * 0x7f + (vram_row[col] >> 7) * 0x3f80
+ (vaux_row[col+1] >> 7) * 0x1fc000 + (vram_row[col+1] >> 7) * 0xfe00000;

Expand Down

0 comments on commit 63843b5

Please sign in to comment.