summaryrefslogtreecommitdiffstatshomepage
path: root/src/mess/drivers/h19.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mess/drivers/h19.c')
-rw-r--r--src/mess/drivers/h19.c33
1 files changed, 12 insertions, 21 deletions
diff --git a/src/mess/drivers/h19.c b/src/mess/drivers/h19.c
index b823566fda2..df5b1815980 100644
--- a/src/mess/drivers/h19.c
+++ b/src/mess/drivers/h19.c
@@ -72,6 +72,7 @@ public:
DECLARE_READ8_MEMBER(h19_a0_r);
DECLARE_WRITE8_MEMBER(h19_c0_w);
DECLARE_WRITE8_MEMBER(h19_kbd_put);
+ MC6845_UPDATE_ROW(crtc_update_row);
required_shared_ptr<UINT8> m_p_videoram;
required_device<palette_device> m_palette;
UINT8 *m_p_chargen;
@@ -320,10 +321,9 @@ void h19_state::video_start()
m_p_chargen = memregion("chargen")->base();
}
-static MC6845_UPDATE_ROW( h19_update_row )
+MC6845_UPDATE_ROW( h19_state::crtc_update_row )
{
- h19_state *state = device->machine().driver_data<h19_state>();
- const rgb_t *palette = state->m_palette->palette()->entry_list_raw();
+ const rgb_t *palette = m_palette->palette()->entry_list_raw();
UINT8 chr,gfx;
UINT16 mem,x;
UINT32 *p = &bitmap.pix32(y);
@@ -333,7 +333,7 @@ static MC6845_UPDATE_ROW( h19_update_row )
UINT8 inv=0;
if (x == cursor_x) inv=0xff;
mem = (ma + x) & 0x7ff;
- chr = state->m_p_videoram[mem];
+ chr = m_p_videoram[mem];
if (chr & 0x80)
{
@@ -342,7 +342,7 @@ static MC6845_UPDATE_ROW( h19_update_row )
}
/* get pattern of pixels for that character scanline */
- gfx = state->m_p_chargen[(chr<<4) | ra] ^ inv;
+ gfx = m_p_chargen[(chr<<4) | ra] ^ inv;
/* Display a scanline of a character (8 pixels) */
*p++ = palette[BIT(gfx, 7)];
@@ -372,21 +372,6 @@ static const ins8250_interface h19_ace_interface =
};
-static MC6845_INTERFACE( h19_crtc6845_interface )
-{
- false,
- 0,0,0,0,
- 8 /*?*/,
- NULL,
- h19_update_row,
- NULL,
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_NULL,
- DEVCB_CPU_INPUT_LINE("maincpu", INPUT_LINE_NMI), // frame pulse
- NULL
-};
-
/* F4 Character Displayer */
static const gfx_layout h19_charlayout =
{
@@ -428,8 +413,14 @@ static MACHINE_CONFIG_START( h19, h19_state )
MCFG_GFXDECODE_ADD("gfxdecode", "palette", h19)
MCFG_PALETTE_ADD_MONOCHROME_GREEN("palette")
- MCFG_MC6845_ADD("crtc", MC6845, "screen", XTAL_12_288MHz / 8, h19_crtc6845_interface) // clk taken from schematics
+ MCFG_MC6845_ADD("crtc", MC6845, "screen", XTAL_12_288MHz / 8) // clk taken from schematics
+ MCFG_MC6845_SHOW_BORDER_AREA(false)
+ MCFG_MC6845_CHAR_WIDTH(8) /*?*/
+ MCFG_MC6845_UPDATE_ROW_CB(h19_state, crtc_update_row)
+ MCFG_MC6845_OUT_VSYNC_CB(INPUTLINE("maincpu", INPUT_LINE_NMI)) // frame pulse
+
MCFG_INS8250_ADD( "ins8250", h19_ace_interface, XTAL_12_288MHz / 4) // 3.072mhz clock which gets divided down for the various baud rates
+
MCFG_DEVICE_ADD(KEYBOARD_TAG, GENERIC_KEYBOARD, 0)
MCFG_GENERIC_KEYBOARD_CB(WRITE8(h19_state, h19_kbd_put))