mirror of
https://github.com/holub/mame
synced 2025-10-08 09:30:17 +03:00
Get rid of vestigial palette that was breaking generic terminal when it isn't first screen
This commit is contained in:
parent
f68437cfde
commit
0322f14555
@ -145,7 +145,6 @@ static const uint8_t terminal_font[256*16] =
|
|||||||
|
|
||||||
generic_terminal_device::generic_terminal_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, unsigned w, unsigned h)
|
generic_terminal_device::generic_terminal_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, unsigned w, unsigned h)
|
||||||
: device_t(mconfig, type, tag, owner, clock)
|
: device_t(mconfig, type, tag, owner, clock)
|
||||||
, m_palette(*this, "palette")
|
|
||||||
, m_io_term_conf(*this, "TERM_CONF")
|
, m_io_term_conf(*this, "TERM_CONF")
|
||||||
, m_width(w)
|
, m_width(w)
|
||||||
, m_height(h)
|
, m_height(h)
|
||||||
@ -257,19 +256,19 @@ uint32_t generic_terminal_device::update(screen_device &device, bitmap_rgb32 &bi
|
|||||||
uint16_t const cursor = m_y_pos * m_width + m_x_pos;
|
uint16_t const cursor = m_y_pos * m_width + m_x_pos;
|
||||||
uint16_t sy=0,ma=0;
|
uint16_t sy=0,ma=0;
|
||||||
|
|
||||||
|
uint32_t font_color;
|
||||||
switch (options & 0x030)
|
switch (options & 0x030)
|
||||||
{
|
{
|
||||||
case 0x010:
|
case 0x010:
|
||||||
m_palette->set_pen_color(1, rgb_t(0xf7, 0xaa, 0x00));
|
font_color = rgb_t(0xf7, 0xaa, 0x00);
|
||||||
break;
|
break;
|
||||||
case 0x020:
|
case 0x020:
|
||||||
m_palette->set_pen_color(1, rgb_t::white());
|
font_color = rgb_t::white();
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
m_palette->set_pen_color(1, rgb_t(0x00, 0xff, 0x00));
|
font_color = rgb_t(0x00, 0xff, 0x00);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
pen_t const font_color = m_palette->pen(1);
|
|
||||||
|
|
||||||
m_framecnt++;
|
m_framecnt++;
|
||||||
|
|
||||||
@ -328,15 +327,13 @@ void generic_terminal_device::kbd_put(u8 data)
|
|||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
MACHINE_CONFIG_MEMBER( generic_terminal_device::device_add_mconfig )
|
MACHINE_CONFIG_MEMBER( generic_terminal_device::device_add_mconfig )
|
||||||
MCFG_SCREEN_ADD_MONOCHROME(TERMINAL_SCREEN_TAG, RASTER, rgb_t::white())
|
MCFG_SCREEN_ADD(TERMINAL_SCREEN_TAG, RASTER)
|
||||||
MCFG_SCREEN_REFRESH_RATE(50)
|
MCFG_SCREEN_REFRESH_RATE(50)
|
||||||
MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */
|
MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */
|
||||||
MCFG_SCREEN_SIZE(generic_terminal_device::TERMINAL_WIDTH*8, generic_terminal_device::TERMINAL_HEIGHT*10)
|
MCFG_SCREEN_SIZE(generic_terminal_device::TERMINAL_WIDTH*8, generic_terminal_device::TERMINAL_HEIGHT*10)
|
||||||
MCFG_SCREEN_VISIBLE_AREA(0, generic_terminal_device::TERMINAL_WIDTH*8-1, 0, generic_terminal_device::TERMINAL_HEIGHT*10-1)
|
MCFG_SCREEN_VISIBLE_AREA(0, generic_terminal_device::TERMINAL_WIDTH*8-1, 0, generic_terminal_device::TERMINAL_HEIGHT*10-1)
|
||||||
MCFG_SCREEN_UPDATE_DEVICE(DEVICE_SELF, generic_terminal_device, update)
|
MCFG_SCREEN_UPDATE_DEVICE(DEVICE_SELF, generic_terminal_device, update)
|
||||||
|
|
||||||
MCFG_PALETTE_ADD_MONOCHROME("palette")
|
|
||||||
|
|
||||||
MCFG_DEVICE_ADD(KEYBOARD_TAG, GENERIC_KEYBOARD, 0)
|
MCFG_DEVICE_ADD(KEYBOARD_TAG, GENERIC_KEYBOARD, 0)
|
||||||
MCFG_GENERIC_KEYBOARD_CB(PUT(generic_terminal_device, kbd_put))
|
MCFG_GENERIC_KEYBOARD_CB(PUT(generic_terminal_device, kbd_put))
|
||||||
|
|
||||||
|
@ -51,7 +51,6 @@ protected:
|
|||||||
virtual void device_add_mconfig(machine_config &config) override;
|
virtual void device_add_mconfig(machine_config &config) override;
|
||||||
virtual void send_key(uint8_t code) { if (!m_keyboard_cb.isnull()) m_keyboard_cb(code); }
|
virtual void send_key(uint8_t code) { if (!m_keyboard_cb.isnull()) m_keyboard_cb(code); }
|
||||||
|
|
||||||
optional_device<palette_device> m_palette;
|
|
||||||
required_ioport m_io_term_conf;
|
required_ioport m_io_term_conf;
|
||||||
|
|
||||||
static constexpr unsigned TERMINAL_WIDTH = 80;
|
static constexpr unsigned TERMINAL_WIDTH = 80;
|
||||||
|
Loading…
Reference in New Issue
Block a user