summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/machine/nes.cpp
diff options
context:
space:
mode:
author AJR <ajrhacker@users.noreply.github.com>2018-05-06 09:28:52 -0400
committer AJR <ajrhacker@users.noreply.github.com>2018-05-06 09:28:52 -0400
commit52b047aae3d2aad6f93a891e909c39597d31f2fe (patch)
tree7bf8e24aa78dde18126d902431f3d4436f5bf394 /src/mame/machine/nes.cpp
parent4b7661dbbd48ca408bcbc3c8b35c7203922946c9 (diff)
ppu2c0x family: Make palette internal to device
Diffstat (limited to 'src/mame/machine/nes.cpp')
-rw-r--r--src/mame/machine/nes.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/mame/machine/nes.cpp b/src/mame/machine/nes.cpp
index eed8dc34b5c..19beec307d0 100644
--- a/src/mame/machine/nes.cpp
+++ b/src/mame/machine/nes.cpp
@@ -194,14 +194,11 @@ DRIVER_INIT_MEMBER(nes_state,famicom)
NESCTRL_BRIGHTPIXEL_CB(nes_state::bright_pixel)
{
// get the pixel at the gun position
- uint32_t pix = m_ppu->get_pixel(x, y);
-
- // get the color base from the ppu
- uint32_t color_base = m_ppu->get_colorbase();
+ rgb_t pix = m_ppu->get_pixel(x, y);
// check if the cursor is over a bright pixel
- if ((pix == color_base + 0x20) || (pix == color_base + 0x30) ||
- (pix == color_base + 0x33) || (pix == color_base + 0x34))
+ // FIXME: still a gross hack
+ if (pix.r() == 0xff && pix.b() == 0xff && pix.g() > 0x90)
return true;
else
return false;