summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author Vas Crabb <vas@vastheman.com>2019-04-22 09:22:33 +1000
committer Vas Crabb <vas@vastheman.com>2019-04-22 09:25:23 +1000
commit62cb3a78d20a5800373404e64b2262260caba21e (patch)
tree940ee40fdf10ba19813bc605e18f1b4402ccdfe5
parent95aa67b728e99f5ec05273eaf0b4c54855049f4f (diff)
cleanup for cherry-picking (nw)
-rw-r--r--src/mame/drivers/cgc7900.cpp1
-rw-r--r--src/mame/drivers/sigmab98.cpp2
-rw-r--r--src/mame/video/newport.cpp154
-rw-r--r--src/mame/video/newport.h2
4 files changed, 79 insertions, 80 deletions
diff --git a/src/mame/drivers/cgc7900.cpp b/src/mame/drivers/cgc7900.cpp
index cc5774a751e..3e9c69f9e75 100644
--- a/src/mame/drivers/cgc7900.cpp
+++ b/src/mame/drivers/cgc7900.cpp
@@ -470,7 +470,6 @@ void cgc7900_state::cgc7900(machine_config &config)
m_maincpu->set_addrmap(AS_PROGRAM, &cgc7900_state::cgc7900_mem);
m_maincpu->set_addrmap(m68000_base_device::AS_CPU_SPACE, &cgc7900_state::cpu_space_map);
-
i8035_device &kbmcu(I8035(config, I8035_TAG, 1000000));
kbmcu.set_addrmap(AS_PROGRAM, &cgc7900_state::keyboard_mem);
kbmcu.set_disable();
diff --git a/src/mame/drivers/sigmab98.cpp b/src/mame/drivers/sigmab98.cpp
index b8b96f072a6..3f5ba8cdb67 100644
--- a/src/mame/drivers/sigmab98.cpp
+++ b/src/mame/drivers/sigmab98.cpp
@@ -2925,7 +2925,7 @@ TIMER_DEVICE_CALLBACK_MEMBER(lufykzku_state::lufykzku_irq)
else if (scanline == 128)
m_maincpu->set_input_line_and_vector(0, HOLD_LINE, m_timer0_vector); // Z80
else if ((scanline % 8) == 0)
- m_maincpu->set_input_line_and_vector(0, HOLD_LINE, m_timer1_vector); // Z*) - this needs to be called often or the state of the door is not read at boot (at least 5 times before bb9 is called)
+ m_maincpu->set_input_line_and_vector(0, HOLD_LINE, m_timer1_vector); // Z80 - this needs to be called often or the state of the door is not read at boot (at least 5 times before bb9 is called)
}
void lufykzku_state::lufykzku(machine_config &config)
diff --git a/src/mame/video/newport.cpp b/src/mame/video/newport.cpp
index 69f7275acee..f12589f592b 100644
--- a/src/mame/video/newport.cpp
+++ b/src/mame/video/newport.cpp
@@ -363,9 +363,9 @@ uint32_t newport_video_device::screen_update(screen_device &device, bitmap_rgb32
{
const uint8_t shift = BIT(table_entry, 0) ? 4 : 0;
const uint8_t pix_in = *src_ci >> shift;
- const uint8_t r = 0xff * BIT(pix_in, 3);
- const uint8_t g = (0xaa * BIT(pix_in, 2)) | (0x55 * BIT(pix_in, 1));
- const uint8_t b = 0xff * BIT(pix_in, 0);
+ const uint8_t r = 0xff * BIT(pix_in, 3);
+ const uint8_t g = (0xaa * BIT(pix_in, 2)) | (0x55 * BIT(pix_in, 1));
+ const uint8_t b = 0xff * BIT(pix_in, 0);
*dest++ = (r << 16) | (g << 8) | b;
break;
}
@@ -1469,81 +1469,81 @@ void newport_video_device::write_pixel(int16_t x, int16_t y, uint8_t color)
uint8_t newport_video_device::get_shade_color(int16_t x, int16_t y)
{
- static const uint8_t s_bayer[4][4] = { { 0, 12, 3, 15 },{ 8, 4, 11, 7 },{ 2, 14, 1, 13 },{ 10, 6, 9, 5 } };
-
- const uint8_t red = (uint8_t)(m_rex3.m_color_red >> 11);
- const uint8_t green = (uint8_t)(m_rex3.m_color_green >> 11);
- const uint8_t blue = (uint8_t)(m_rex3.m_color_blue >> 11);
-
- if (!BIT(m_rex3.m_draw_mode1, 15)) // RGB
- {
- return red;
- }
-
- if (BIT(m_rex3.m_draw_mode1, 16)) // Dithering
- {
- switch ((m_rex3.m_draw_mode1 >> 3) & 3)
- {
- case 0: // 4bpp
- {
- const uint8_t sr = (red >> 3) - (red >> 4);
- const uint8_t sg = (green >> 2) - (green >> 4);
- const uint8_t sb = (blue >> 3) - (blue >> 4);
-
- uint8_t dr = BIT(sr, 4);
- uint8_t dg = (sg >> 4) & 3;
- uint8_t db = BIT(sb, 4);
-
- if ((sr & 0xf) > s_bayer[x & 3][y & 3]) dr++;
- if ((sg & 0xf) > s_bayer[x & 3][y & 3]) dg++;
- if ((sb & 0xf) > s_bayer[x & 3][y & 3]) db++;
-
- if (dr > 1) dr = 1;
- if (dg > 3) dg = 3;
- if (db > 1) db = 1;
-
- return (dr << 3) | (dg << 1) | db;
- }
- case 1: // 8bpp
- {
- const uint8_t sr = (red >> 1) - (red >> 4);
- const uint8_t sg = (green >> 1) - (green >> 4);
- const uint8_t sb = (blue >> 2) - (blue >> 4);
-
- uint8_t dr = (sr >> 4) & 7;
- uint8_t dg = (sg >> 4) & 7;
- uint8_t db = (sb >> 4) & 3;
-
- if ((sr & 0xf) > s_bayer[x & 3][y & 3]) dr++;
- if ((sg & 0xf) > s_bayer[x & 3][y & 3]) dg++;
- if ((sb & 0xf) > s_bayer[x & 3][y & 3]) db++;
-
- if (dr > 7) dr = 7;
- if (dg > 7) dg = 7;
- if (db > 3) db = 3;
-
- return (dr << 5) | (dg << 2) | db;
- }
- case 2: // 12bpp (not yet supported)
- case 3: // 24bpp (not yet supported)
- default:
- return 0;
- }
- }
- else
- {
- switch ((m_rex3.m_draw_mode1 >> 3) & 3)
- {
- case 0: // 4bpp
- return (BIT(red, 7) << 3) | ((green & 0xc0) >> 5) | BIT(blue, 7);
- case 1: // 8bpp
+ static const uint8_t s_bayer[4][4] = { { 0, 12, 3, 15 },{ 8, 4, 11, 7 },{ 2, 14, 1, 13 },{ 10, 6, 9, 5 } };
+
+ const uint8_t red = (uint8_t)(m_rex3.m_color_red >> 11);
+ const uint8_t green = (uint8_t)(m_rex3.m_color_green >> 11);
+ const uint8_t blue = (uint8_t)(m_rex3.m_color_blue >> 11);
+
+ if (!BIT(m_rex3.m_draw_mode1, 15)) // RGB
+ {
+ return red;
+ }
+
+ if (BIT(m_rex3.m_draw_mode1, 16)) // Dithering
+ {
+ switch ((m_rex3.m_draw_mode1 >> 3) & 3)
+ {
+ case 0: // 4bpp
+ {
+ const uint8_t sr = (red >> 3) - (red >> 4);
+ const uint8_t sg = (green >> 2) - (green >> 4);
+ const uint8_t sb = (blue >> 3) - (blue >> 4);
+
+ uint8_t dr = BIT(sr, 4);
+ uint8_t dg = (sg >> 4) & 3;
+ uint8_t db = BIT(sb, 4);
+
+ if ((sr & 0xf) > s_bayer[x & 3][y & 3]) dr++;
+ if ((sg & 0xf) > s_bayer[x & 3][y & 3]) dg++;
+ if ((sb & 0xf) > s_bayer[x & 3][y & 3]) db++;
+
+ if (dr > 1) dr = 1;
+ if (dg > 3) dg = 3;
+ if (db > 1) db = 1;
+
+ return (dr << 3) | (dg << 1) | db;
+ }
+ case 1: // 8bpp
+ {
+ const uint8_t sr = (red >> 1) - (red >> 4);
+ const uint8_t sg = (green >> 1) - (green >> 4);
+ const uint8_t sb = (blue >> 2) - (blue >> 4);
+
+ uint8_t dr = (sr >> 4) & 7;
+ uint8_t dg = (sg >> 4) & 7;
+ uint8_t db = (sb >> 4) & 3;
+
+ if ((sr & 0xf) > s_bayer[x & 3][y & 3]) dr++;
+ if ((sg & 0xf) > s_bayer[x & 3][y & 3]) dg++;
+ if ((sb & 0xf) > s_bayer[x & 3][y & 3]) db++;
+
+ if (dr > 7) dr = 7;
+ if (dg > 7) dg = 7;
+ if (db > 3) db = 3;
+
+ return (dr << 5) | (dg << 2) | db;
+ }
+ case 2: // 12bpp (not yet supported)
+ case 3: // 24bpp (not yet supported)
+ default:
+ return 0;
+ }
+ }
+ else
+ {
+ switch ((m_rex3.m_draw_mode1 >> 3) & 3)
+ {
+ case 0: // 4bpp
+ return (BIT(red, 7) << 3) | ((green & 0xc0) >> 5) | BIT(blue, 7);
+ case 1: // 8bpp
return (red & 0xe0) | ((green & 0xe0) >> 3) | ((blue & 0xc0) >> 6);
- case 2: // 12bpp (not yet supported)
- case 3: // 24bpp (not yet supported)
- default:
- return 0;
- }
- }
+ case 2: // 12bpp (not yet supported)
+ case 3: // 24bpp (not yet supported)
+ default:
+ return 0;
+ }
+ }
}
void newport_video_device::do_v_iline(uint8_t color, bool skip_last, bool shade)
diff --git a/src/mame/video/newport.h b/src/mame/video/newport.h
index 518dc65b8d9..933f660ce12 100644
--- a/src/mame/video/newport.h
+++ b/src/mame/video/newport.h
@@ -11,7 +11,7 @@
#include "machine/hpc3.h"
-#define ENABLE_NEWVIEW_LOG (1)
+#define ENABLE_NEWVIEW_LOG (0)
class newport_video_device : public device_t, public device_palette_interface
{