mirror of
https://github.com/holub/mame
synced 2025-04-23 08:49:55 +03:00
apple2: perform single-pixel shift for HGR monochrome with bit 7 set [R. Belmont, SoltanGris42]
This commit is contained in:
parent
9c8934c5c0
commit
b4bc924018
@ -843,7 +843,6 @@ void a2_video_device::hgr_update(screen_device &screen, bitmap_ind16 &bitmap, co
|
||||
| (((uint32_t) vram_row[col+1] & 0x7f) << 7)
|
||||
| (((uint32_t) vram_row[col+2] & 0x7f) << 14);
|
||||
|
||||
|
||||
// verified on h/w: setting dhires w/o 80col emulates a rev. 0 Apple ][ with no orange/blue
|
||||
if (m_dhires)
|
||||
{
|
||||
@ -873,6 +872,10 @@ void a2_video_device::hgr_update(screen_device &screen, bitmap_ind16 &bitmap, co
|
||||
|
||||
case 1:
|
||||
w >>= 7;
|
||||
if (vram_row[col] & 0x80)
|
||||
{
|
||||
p--;
|
||||
}
|
||||
for (b = 0; b < 7; b++)
|
||||
{
|
||||
v = (w & 1);
|
||||
@ -880,10 +883,18 @@ void a2_video_device::hgr_update(screen_device &screen, bitmap_ind16 &bitmap, co
|
||||
*(p++) = v ? WHITE : BLACK;
|
||||
*(p++) = v ? WHITE : BLACK;
|
||||
}
|
||||
if (vram_row[col] & 0x80)
|
||||
{
|
||||
p++;
|
||||
}
|
||||
break;
|
||||
|
||||
case 2:
|
||||
w >>= 7;
|
||||
if (vram_row[col] & 0x80)
|
||||
{
|
||||
p--;
|
||||
}
|
||||
for (b = 0; b < 7; b++)
|
||||
{
|
||||
v = (w & 1);
|
||||
@ -891,10 +902,18 @@ void a2_video_device::hgr_update(screen_device &screen, bitmap_ind16 &bitmap, co
|
||||
*(p++) = v ? GREEN : BLACK;
|
||||
*(p++) = v ? GREEN : BLACK;
|
||||
}
|
||||
if (vram_row[col] & 0x80)
|
||||
{
|
||||
p++;
|
||||
}
|
||||
break;
|
||||
|
||||
case 3:
|
||||
w >>= 7;
|
||||
if (vram_row[col] & 0x80)
|
||||
{
|
||||
p--;
|
||||
}
|
||||
for (b = 0; b < 7; b++)
|
||||
{
|
||||
v = (w & 1);
|
||||
@ -902,6 +921,10 @@ void a2_video_device::hgr_update(screen_device &screen, bitmap_ind16 &bitmap, co
|
||||
*(p++) = v ? ORANGE : BLACK;
|
||||
*(p++) = v ? ORANGE : BLACK;
|
||||
}
|
||||
if (vram_row[col] & 0x80)
|
||||
{
|
||||
p++;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -962,8 +985,12 @@ void a2_video_device::hgr_update_tk2000(screen_device &screen, bitmap_ind16 &bit
|
||||
}
|
||||
break;
|
||||
|
||||
case 1:
|
||||
\ case 1:
|
||||
w >>= 7;
|
||||
if (vram_row[col] & 0x80)
|
||||
{
|
||||
p--;
|
||||
}
|
||||
for (b = 0; b < 7; b++)
|
||||
{
|
||||
v = (w & 1);
|
||||
@ -971,10 +998,18 @@ void a2_video_device::hgr_update_tk2000(screen_device &screen, bitmap_ind16 &bit
|
||||
*(p++) = v ? WHITE : BLACK;
|
||||
*(p++) = v ? WHITE : BLACK;
|
||||
}
|
||||
if (vram_row[col] & 0x80)
|
||||
{
|
||||
p++;
|
||||
}
|
||||
break;
|
||||
|
||||
case 2:
|
||||
w >>= 7;
|
||||
if (vram_row[col] & 0x80)
|
||||
{
|
||||
p--;
|
||||
}
|
||||
for (b = 0; b < 7; b++)
|
||||
{
|
||||
v = (w & 1);
|
||||
@ -982,10 +1017,18 @@ void a2_video_device::hgr_update_tk2000(screen_device &screen, bitmap_ind16 &bit
|
||||
*(p++) = v ? GREEN : BLACK;
|
||||
*(p++) = v ? GREEN : BLACK;
|
||||
}
|
||||
if (vram_row[col] & 0x80)
|
||||
{
|
||||
p++;
|
||||
}
|
||||
break;
|
||||
|
||||
case 3:
|
||||
w >>= 7;
|
||||
if (vram_row[col] & 0x80)
|
||||
{
|
||||
p--;
|
||||
}
|
||||
for (b = 0; b < 7; b++)
|
||||
{
|
||||
v = (w & 1);
|
||||
@ -993,6 +1036,10 @@ void a2_video_device::hgr_update_tk2000(screen_device &screen, bitmap_ind16 &bit
|
||||
*(p++) = v ? ORANGE : BLACK;
|
||||
*(p++) = v ? ORANGE : BLACK;
|
||||
}
|
||||
if (vram_row[col] & 0x80)
|
||||
{
|
||||
p++;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user