diff options
author | Fabio Priuli <etabeta78@users.noreply.github.com> | 2014-05-01 08:36:28 +0000 |
---|---|---|
committer | Fabio Priuli <etabeta78@users.noreply.github.com> | 2014-05-01 08:36:28 +0000 |
commit | cc8edf5ac2faa4e0bd54c3b9715871870cd61cdf (patch) | |
tree | 6a686dca4d3758b6db3d5dcce1b5aca00b16f8bf /src/mame/drivers/amusco.c | |
parent | ea02fd06a5883097ad970c81219d9d8124002853 (diff) |
mc6845: converted to devcb2, delegates and inline configs. nw.
while at it, cleaned up the args of the mc6845 delegates as well
(no need to pass back and forth pieces of the driver class, now
that delegates belong to it as well)
even if I tested the changes extensively, I might have missed
something among the 177 source files using this, so please report
any regressions you see :)
Diffstat (limited to 'src/mame/drivers/amusco.c')
-rw-r--r-- | src/mame/drivers/amusco.c | 27 |
1 files changed, 7 insertions, 20 deletions
diff --git a/src/mame/drivers/amusco.c b/src/mame/drivers/amusco.c index ce14c156431..894480d2c8b 100644 --- a/src/mame/drivers/amusco.c +++ b/src/mame/drivers/amusco.c @@ -99,6 +99,7 @@ public: DECLARE_READ8_MEMBER(mc6845_r); DECLARE_WRITE8_MEMBER(mc6845_w); DECLARE_WRITE16_MEMBER(vram_w); + MC6845_ON_UPDATE_ADDR_CHANGED(crtc_addr); UINT32 screen_update_amusco(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); INTERRUPT_GEN_MEMBER(amusco_interrupt); @@ -482,28 +483,11 @@ GFXDECODE_END * CRTC Interface * ************************/ -MC6845_ON_UPDATE_ADDR_CHANGED(crtc_addr) +MC6845_ON_UPDATE_ADDR_CHANGED(amusco_state::crtc_addr) { -// amusco_state *state = device->machine().driver_data<amusco_state>(); -// state->m_video_update_address = address; +// m_video_update_address = address; } -static MC6845_INTERFACE( mc6845_intf ) -{ - false, /* show border area */ - 0,0,0,0, /* visarea adjustment */ - 8, /* number of pixels per video memory address */ - NULL, /* before pixel update callback */ - NULL, /* row update callback */ - NULL, /* after pixel update callback */ - DEVCB_NULL, /* callback for display state changes */ - DEVCB_NULL, /* callback for cursor state changes */ - DEVCB_NULL, /* HSYNC callback */ - DEVCB_NULL, /* VSYNC callback */ - crtc_addr /* update address callback */ -}; - - INTERRUPT_GEN_MEMBER(amusco_state::amusco_vblank_irq) { device.execute().set_input_line_and_vector(0, HOLD_LINE, 0x80/4); // sets 0x665 to 0xff @@ -545,7 +529,10 @@ static MACHINE_CONFIG_START( amusco, amusco_state ) MCFG_PALETTE_ADD("palette", 8) MCFG_PALETTE_INIT_OWNER(amusco_state, amusco_palette_init) - MCFG_MC6845_ADD("crtc", R6545_1, "screen", CRTC_CLOCK, mc6845_intf) /* guess */ + MCFG_MC6845_ADD("crtc", R6545_1, "screen", CRTC_CLOCK) /* guess */ + MCFG_MC6845_SHOW_BORDER_AREA(false) + MCFG_MC6845_CHAR_WIDTH(8) + MCFG_MC6845_ADDR_CHANGED_CB(amusco_state, crtc_addr) /* sound hardware */ MCFG_SPEAKER_STANDARD_MONO("mono") |