diff options
author | 2016-08-26 22:21:47 -0400 | |
---|---|---|
committer | 2016-08-26 22:39:58 -0400 | |
commit | 1fe589ca1e65e94bc51a6dd694f21182ae4801cf (patch) | |
tree | 32030de3885b2cc484031f13d02cdb33c7b8710e /src/emu/emupal.cpp | |
parent | cdb531e83defeb87fe131c37ca4ff3d28fc3f3df (diff) |
Show color values in palette viewer
- On the UI graphics viewer's palette screen, moving the mouse over a color rectangle will show the index of the entry and its RGB values in hexadecimal.
- For indirect pens, the index of the corresponding color will also be shown.
- For colors in normal RAM-based palettes, the raw (i.e. undecoded) value stored in memory will also be shown. This does not currently work with most buffered palettes (though the Seibu SPI driver has been updated for this purpose), and is totally incompatible with PROM-based or RAMDAC-based palettes.
(nw) The changes made to the core while implementing this feature may look more substantial than they really are. A whole batch of read methods have been made const, and palette_device now has a generic read_entry function that is used both internally and externally.
Diffstat (limited to 'src/emu/emupal.cpp')
-rw-r--r-- | src/emu/emupal.cpp | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/emu/emupal.cpp b/src/emu/emupal.cpp index 86f3b916b6d..dd32ba7816d 100644 --- a/src/emu/emupal.cpp +++ b/src/emu/emupal.cpp @@ -301,14 +301,10 @@ inline void palette_device::update_for_write(offs_t byte_offset, int bytes_modif offs_t base = byte_offset / bpe; for (int index = 0; index < count; index++) { - UINT32 data = m_paletteram.read(base + index); - if (m_paletteram_ext.base() != nullptr) - data |= m_paletteram_ext.read(base + index) << (8 * bpe); - if (indirect) - set_indirect_color(base + index, m_raw_to_rgb(data)); + set_indirect_color(base + index, m_raw_to_rgb(read_entry(base + index))); else - m_palette->entry_set_color(base + index, m_raw_to_rgb(data)); + m_palette->entry_set_color(base + index, m_raw_to_rgb(read_entry(base + index))); } } |