diff options
Diffstat (limited to 'src/mame/video/super80.cpp')
-rw-r--r-- | src/mame/video/super80.cpp | 89 |
1 files changed, 56 insertions, 33 deletions
diff --git a/src/mame/video/super80.cpp b/src/mame/video/super80.cpp index fc209ddaeb8..c71ebd8ca8c 100644 --- a/src/mame/video/super80.cpp +++ b/src/mame/video/super80.cpp @@ -66,14 +66,22 @@ void super80_state::screen_eof_super80m(screen_device &screen, bool state) UINT32 super80_state::screen_update_super80(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { - UINT8 y,ra,chr=32,gfx,screen_on=0; + UINT8 y,ra,chr=32,gfx,screen_on=0,fg=0,options=m_io_config->read(); UINT16 sy=0,ma=m_vidpg,x; output().set_value("cass_led",BIT(m_portf0, 5)); - if ((BIT(m_portf0, 2)) | (!BIT(m_io_config->read(), 2))) /* bit 2 of port F0 is high, OR user turned on config switch */ + if ((BIT(m_portf0, 2)) | (!BIT(options, 2))) /* bit 2 of port F0 is high, OR user turned on config switch */ screen_on++; + if (screen_on) + { + if BIT(options, 5) + fg = 15; /* b&w */ + else + fg = 5; /* green */ + } + for (y = 0; y < 16; y++) { for (ra = 0; ra < 10; ra++) @@ -89,14 +97,14 @@ UINT32 super80_state::screen_update_super80(screen_device &screen, bitmap_ind16 gfx = m_p_chargen[(chr<<4) | ((ra & 8) >> 3) | ((ra & 7) << 1)]; /* Display a scanline of a character */ - *p++ = BIT(gfx, 7); - *p++ = BIT(gfx, 6); - *p++ = BIT(gfx, 5); - *p++ = BIT(gfx, 4); - *p++ = BIT(gfx, 3); - *p++ = BIT(gfx, 2); - *p++ = BIT(gfx, 1); - *p++ = BIT(gfx, 0); + *p++ = BIT(gfx, 7) ? fg : 0; + *p++ = BIT(gfx, 6) ? fg : 0; + *p++ = BIT(gfx, 5) ? fg : 0; + *p++ = BIT(gfx, 4) ? fg : 0; + *p++ = BIT(gfx, 3) ? fg : 0; + *p++ = BIT(gfx, 2) ? fg : 0; + *p++ = BIT(gfx, 1) ? fg : 0; + *p++ = BIT(gfx, 0) ? fg : 0; } } ma+=32; @@ -106,14 +114,22 @@ UINT32 super80_state::screen_update_super80(screen_device &screen, bitmap_ind16 UINT32 super80_state::screen_update_super80d(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { - UINT8 y,ra,chr=32,gfx,screen_on=0; + UINT8 y,ra,chr=32,gfx,screen_on=0,fg=0,options=m_io_config->read(); UINT16 sy=0,ma=m_vidpg,x; output().set_value("cass_led",BIT(m_portf0, 5)); - if ((BIT(m_portf0, 2)) | (!BIT(m_io_config->read(), 2))) /* bit 2 of port F0 is high, OR user turned on config switch */ + if ((BIT(m_portf0, 2)) | (!BIT(options, 2))) /* bit 2 of port F0 is high, OR user turned on config switch */ screen_on++; + if (screen_on) + { + if BIT(options, 5) + fg = 15; /* b&w */ + else + fg = 5; /* green */ + } + for (y = 0; y < 16; y++) { for (ra = 0; ra < 10; ra++) @@ -129,14 +145,14 @@ UINT32 super80_state::screen_update_super80d(screen_device &screen, bitmap_ind16 gfx = m_p_chargen[((chr & 0x7f)<<4) | ((ra & 8) >> 3) | ((ra & 7) << 1)] ^ ((chr & 0x80) ? 0xff : 0); /* Display a scanline of a character */ - *p++ = BIT(gfx, 7); - *p++ = BIT(gfx, 6); - *p++ = BIT(gfx, 5); - *p++ = BIT(gfx, 4); - *p++ = BIT(gfx, 3); - *p++ = BIT(gfx, 2); - *p++ = BIT(gfx, 1); - *p++ = BIT(gfx, 0); + *p++ = BIT(gfx, 7) ? fg : 0; + *p++ = BIT(gfx, 6) ? fg : 0; + *p++ = BIT(gfx, 5) ? fg : 0; + *p++ = BIT(gfx, 4) ? fg : 0; + *p++ = BIT(gfx, 3) ? fg : 0; + *p++ = BIT(gfx, 2) ? fg : 0; + *p++ = BIT(gfx, 1) ? fg : 0; + *p++ = BIT(gfx, 0) ? fg : 0; } } ma+=32; @@ -146,14 +162,22 @@ UINT32 super80_state::screen_update_super80d(screen_device &screen, bitmap_ind16 UINT32 super80_state::screen_update_super80e(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { - UINT8 y,ra,chr=32,gfx,screen_on=0; + UINT8 y,ra,chr=32,gfx,screen_on=0,fg=0,options=m_io_config->read(); UINT16 sy=0,ma=m_vidpg,x; output().set_value("cass_led",BIT(m_portf0, 5)); - if ((BIT(m_portf0, 2)) | (!BIT(m_io_config->read(), 2))) /* bit 2 of port F0 is high, OR user turned on config switch */ + if ((BIT(m_portf0, 2)) | (!BIT(options, 2))) /* bit 2 of port F0 is high, OR user turned on config switch */ screen_on++; + if (screen_on) + { + if BIT(options, 5) + fg = 15; /* b&w */ + else + fg = 5; /* green */ + } + for (y = 0; y < 16; y++) { for (ra = 0; ra < 10; ra++) @@ -169,14 +193,14 @@ UINT32 super80_state::screen_update_super80e(screen_device &screen, bitmap_ind16 gfx = m_p_chargen[(chr<<4) | ((ra & 8) >> 3) | ((ra & 7) << 1)]; /* Display a scanline of a character */ - *p++ = BIT(gfx, 7); - *p++ = BIT(gfx, 6); - *p++ = BIT(gfx, 5); - *p++ = BIT(gfx, 4); - *p++ = BIT(gfx, 3); - *p++ = BIT(gfx, 2); - *p++ = BIT(gfx, 1); - *p++ = BIT(gfx, 0); + *p++ = BIT(gfx, 7) ? fg : 0; + *p++ = BIT(gfx, 6) ? fg : 0; + *p++ = BIT(gfx, 5) ? fg : 0; + *p++ = BIT(gfx, 4) ? fg : 0; + *p++ = BIT(gfx, 3) ? fg : 0; + *p++ = BIT(gfx, 2) ? fg : 0; + *p++ = BIT(gfx, 1) ? fg : 0; + *p++ = BIT(gfx, 0) ? fg : 0; } } ma+=32; @@ -186,9 +210,8 @@ UINT32 super80_state::screen_update_super80e(screen_device &screen, bitmap_ind16 UINT32 super80_state::screen_update_super80m(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { - UINT8 y,ra,chr=32,gfx,screen_on=0; + UINT8 y,ra,chr=32,gfx,screen_on=0,col,bg=0,fg=0,options=m_io_config->read(); UINT16 sy=0,ma=m_vidpg,x; - UINT8 col, bg=0, fg=0, options=m_io_config->read(); /* get selected character generator */ UINT8 cgen = m_current_charset ^ ((options & 0x10)>>4); /* bit 0 of port F1 and cgen config switch */ @@ -200,7 +223,7 @@ UINT32 super80_state::screen_update_super80m(screen_device &screen, bitmap_ind16 if (screen_on) { - if ((options & 0x60) == 0x60) + if BIT(options, 5) fg = 15; /* b&w */ else fg = 5; /* green */ |