summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/video
diff options
context:
space:
mode:
author hap <happppp@users.noreply.github.com>2020-08-13 19:01:21 +0200
committer hap <happppp@users.noreply.github.com>2020-08-13 19:01:36 +0200
commit6e59ecf94f8438634646664dddbe8eb667f4df1d (patch)
treead9a8d60862a65667767c03fb3b4ab5cbb3d3b92 /src/devices/video
parentded0337498c315b0303326842eb74f1f1f57348f (diff)
ef9340: bgcolor is remembered for alphanumeric chars
Diffstat (limited to 'src/devices/video')
-rw-r--r--src/devices/video/ef9340_1.cpp36
1 files changed, 12 insertions, 24 deletions
diff --git a/src/devices/video/ef9340_1.cpp b/src/devices/video/ef9340_1.cpp
index 956d6d11668..1083b160f68 100644
--- a/src/devices/video/ef9340_1.cpp
+++ b/src/devices/video/ef9340_1.cpp
@@ -22,9 +22,6 @@ ef9340_1_device::ef9340_1_device(const machine_config &mconfig, const char *tag,
, device_video_interface(mconfig, *this)
, m_line_timer(nullptr)
, m_charset(*this, "ef9340_1")
-//, m_start_vpos(START_Y)
- //, m_start_vblank(START_Y + SCREEN_HEIGHT)
- //, m_screen_lines(LINES)
{
}
@@ -283,6 +280,8 @@ void ef9340_1_device::ef9340_scanline(int vpos)
{
int y = vpos - 0;
int y_row, slice;
+ uint8_t fg = 0;
+ uint8_t bg = 0;
if ( y < 10 )
{
@@ -298,7 +297,7 @@ void ef9340_1_device::ef9340_scanline(int vpos)
// Service row is disabled
for ( int i = 0; i < 40 * 8; i++ )
{
- m_tmp_bitmap.pix16(vpos, 0 + i ) = 24;
+ m_tmp_bitmap.pix16(vpos, 0 + i ) = 0;
}
return;
}
@@ -315,8 +314,6 @@ void ef9340_1_device::ef9340_scanline(int vpos)
uint16_t addr = ef9340_get_c_addr( x, y_row );
uint8_t a = m_ef934x_ram_a[addr];
uint8_t b = m_ef934x_ram_b[addr];
- uint8_t fg = 0;
- uint8_t bg = 0;
uint8_t char_data = 0x00;
if ( a & 0x80 )
@@ -331,6 +328,10 @@ void ef9340_1_device::ef9340_scanline(int vpos)
fg = bgr2rgb[ a & 0x07 ];
bg = bgr2rgb[ ( a >> 4 ) & 0x07 ];
}
+ else
+ {
+ // Illegal
+ }
}
else
{
@@ -349,38 +350,25 @@ void ef9340_1_device::ef9340_scanline(int vpos)
{
// Extension
char_data = m_ef934x_ext_char_ram[ external_chargen_address( b & 0x7f, slice ) ];
-
if ( a & 0x40 )
- {
- fg = bg;
- bg = bgr2rgb[ a & 0x07 ];
- }
- else
- {
- fg = bgr2rgb[ a & 0x07 ];
- }
+ char_data ^= 0xff;
+ fg = bgr2rgb[ a & 0x07 ];
}
else
{
// DEL
char_data = 0xff;
fg = bgr2rgb[ a & 0x07 ];
+ bg = bgr2rgb[ ( a >> 4 ) & 0x07 ];
}
}
else
{
// Normal
char_data = m_charset[((b & 0x7f) * 10) + slice];
-
if ( a & 0x40 )
- {
- fg = bg;
- bg = bgr2rgb[ a & 0x07 ];
- }
- else
- {
- fg = bgr2rgb[ a & 0x07 ];
- }
+ char_data ^= 0xff;
+ fg = bgr2rgb[ a & 0x07 ];
}
}