summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/video/cbuster.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/video/cbuster.cpp')
-rw-r--r--src/mame/video/cbuster.cpp28
1 files changed, 14 insertions, 14 deletions
diff --git a/src/mame/video/cbuster.cpp b/src/mame/video/cbuster.cpp
index 11d725c7bb7..2afb65eac9c 100644
--- a/src/mame/video/cbuster.cpp
+++ b/src/mame/video/cbuster.cpp
@@ -22,24 +22,24 @@ void cbuster_state::video_start()
m_sprgen->alloc_sprite_bitmap();
}
-/*
- Crude Buster palette is a little strange compared to other Data East games
- of this period. Although the digital palette is 8 bits per channel, the
- analog 'white' level is set at 0x8e. In hardware this is done at the
- final resistors before the JAMMA connector. It also suggests that if the
- game were to use any values above 0x8e (it doesn't) then the final output
- voltage would be out of spec.
-
- I suspect this setup is actually software compensating for a hardware
- design problem.
+/*
+ Crude Buster palette is a little strange compared to other Data East games
+ of this period. Although the digital palette is 8 bits per channel, the
+ analog 'white' level is set at 0x8e. In hardware this is done at the
+ final resistors before the JAMMA connector. It also suggests that if the
+ game were to use any values above 0x8e (it doesn't) then the final output
+ voltage would be out of spec.
+
+ I suspect this setup is actually software compensating for a hardware
+ design problem.
*/
-
+
void cbuster_state::update_palette(int offset)
{
int r = m_paletteram[offset]&0xff;
int g = m_paletteram[offset]>>8;
int b = m_paletteram_ext[offset]&0xff;
-
+
if (r>0x8e) r=0x8e;
if (g>0x8e) g=0x8e;
if (b>0x8e) b=0x8e;
@@ -47,7 +47,7 @@ void cbuster_state::update_palette(int offset)
r = (r * 255) / 0x8e;
g = (g * 255) / 0x8e;
b = (b * 255) / 0x8e;
-
+
m_palette->set_pen_color(offset,rgb_t(r,g,b));
}
@@ -56,7 +56,7 @@ WRITE16_MEMBER(cbuster_state::cbuster_palette_w)
COMBINE_DATA(&m_paletteram[offset]);
update_palette(offset);
}
-
+
WRITE16_MEMBER(cbuster_state::cbuster_palette_ext_w)
{
COMBINE_DATA(&m_paletteram_ext[offset]);