mirror of
https://github.com/holub/mame
synced 2025-10-07 17:27:06 +03:00
Merge pull request #5320 from npwoods/fix_mc6847_artifacting
Fixing MC6847 to be responsive to live changes of artifacting config
This commit is contained in:
commit
3c0391dc97
@ -854,7 +854,7 @@ uint32_t mc6847_base_device::screen_update(screen_device &screen, bitmap_rgb32 &
|
|||||||
const pixel_t *palette = m_palette;
|
const pixel_t *palette = m_palette;
|
||||||
|
|
||||||
/* if the video didn't change, indicate as much */
|
/* if the video didn't change, indicate as much */
|
||||||
if (!has_video_changed())
|
if (!m_artifacter.poll_config() && !has_video_changed())
|
||||||
return UPDATE_HAS_NOT_CHANGED;
|
return UPDATE_HAS_NOT_CHANGED;
|
||||||
|
|
||||||
/* top border */
|
/* top border */
|
||||||
@ -1701,13 +1701,26 @@ mc6847_base_device::artifacter::artifacter()
|
|||||||
|
|
||||||
void mc6847_base_device::artifacter::setup_config(device_t *device)
|
void mc6847_base_device::artifacter::setup_config(device_t *device)
|
||||||
{
|
{
|
||||||
char port_name[32];
|
std::string port_name = util::string_format("%s:%s", device->tag(), ARTIFACTING_TAG);
|
||||||
snprintf(port_name, ARRAY_LENGTH(port_name), "%s:%s", device->tag(), ARTIFACTING_TAG);
|
|
||||||
m_config = device->ioport(port_name);
|
m_config = device->ioport(port_name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//-------------------------------------------------
|
||||||
|
// artifacter::poll_config
|
||||||
|
//-------------------------------------------------
|
||||||
|
|
||||||
|
bool mc6847_base_device::artifacter::poll_config()
|
||||||
|
{
|
||||||
|
ioport_value new_artifacting = m_config ? m_config->read() : 0;
|
||||||
|
bool changed = new_artifacting != m_artifacting;
|
||||||
|
m_artifacting = new_artifacting;
|
||||||
|
return changed;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//-------------------------------------------------
|
//-------------------------------------------------
|
||||||
// artifacter::update_colors
|
// artifacter::update_colors
|
||||||
//-------------------------------------------------
|
//-------------------------------------------------
|
||||||
|
@ -178,7 +178,7 @@ protected:
|
|||||||
|
|
||||||
// artifacting config
|
// artifacting config
|
||||||
void setup_config(device_t *device);
|
void setup_config(device_t *device);
|
||||||
void poll_config() { m_artifacting = (m_config!=nullptr) ? m_config->read() : 0; }
|
bool poll_config();
|
||||||
void set_pal_artifacting( bool palartifacting ) { m_palartifacting = palartifacting; }
|
void set_pal_artifacting( bool palartifacting ) { m_palartifacting = palartifacting; }
|
||||||
bool get_pal_artifacting() { return m_palartifacting; }
|
bool get_pal_artifacting() { return m_palartifacting; }
|
||||||
void create_color_blend_table( const pixel_t *palette );
|
void create_color_blend_table( const pixel_t *palette );
|
||||||
|
Loading…
Reference in New Issue
Block a user