diff options
author | Vas Crabb <vas@vastheman.com> | 2018-07-07 02:40:29 +1000 |
---|---|---|
committer | Vas Crabb <vas@vastheman.com> | 2018-07-07 02:40:29 +1000 |
commit | c3fb11c2c98a5c28ece6a27093a0f9def350ac64 (patch) | |
tree | c68b38f05ed1d32358add721fda7f45e8803479f /src/mame/video | |
parent | 5d9e33b786d7ef452317439359f3cbd8cc920513 (diff) |
devcb3
There are multiple issues with the current device callbacks:
* They always dispatch through a pointer-to-member
* Chained callbacks are a linked list so the branch unit can't predict the early
* There's a runtime decision made on the left/right shift direction
* There are runtime NULL checks on various objects
* Binding a lambda isn't practical
* Arbitrary transformations are not supported
* When chaining callbacks it isn't clear what the MCFG_DEVCB_ modifiers apply to
* It isn't possible to just append to a callback in derived configuration
* The macros need a magic, hidden local called devcb
* Moving code that uses the magic locals around is error-prone
* Writing the MCFG_ macros to make a device usable is a pain
* You can't discover applicable MCFG_ macros with intellisense
* Macros are not scoped
* Using an inappropriate macro isn't detected at compile time
* Lots of other things
This changeset overcomes the biggest obstacle to remving MCFG_ macros
altogether. Essentially, to allow a devcb to be configured, call
.bind() and expose the result (a bind target for the callback). Bind
target methods starting with "set" repace the current callbacks; methods
starting with "append" append to them. You can't reconfigure a callback
after resolving it. There's no need to use a macro matching the
handler signatures - use FUNC for everything. Current device is implied
if no tag/finder is supplied (no need for explicit this).
Lambdas are supported, and the memory space and offset are optional.
These kinds of things work:
* .read_cb().set([this] () { return something; });
* .read_cb().set([this] (offs_t offset) { return ~offset; });
* .write_cb().set([this] (offs_t offset, u8 data) { m_array[offset] = data; });
* .write_cb().set([this] (int state) { some_var = state; });
Arbitrary transforms are allowed, and they can modify offset/mask for example:
* .read_cb().set(FUNC(my_state::handler)).transform([] (u8 data) { return bitswap<4>(data, 1, 3, 0, 2); });
* .read_cb().set(m_dev, FUNC(some_device::member)).transform([] (offs_t &offset, u8 data) { offset ^= 3; return data; });
It's possible to stack arbitrary transforms, at the cost of compile
time (the whole transform stack gets inlined at compile time). Shifts
count as an arbitrary transform, but mask/exor does not.
Order of mask/shift/exor now matters. Modifications are applied in the
specified order. These are NOT EQUIVALENT:
* .read_cb().set(FUNC(my_state::handler)).mask(0x06).lshift(2);
* .read_cb().set(FUNC(my_state::handler)).lshift(2).mask(0x06);
The bit helper no longer reverses its behaviour for read callbacks, and
I/O ports are no longer aware of the field mask. Binding a read
callback to no-op is not supported - specify a constant. The GND and
VCC aliases have been removed intentionally - they're TTL-centric, and
were already being abused.
Other quirks have been preserved, including write logger only logging
when the data is non-zero (quite unhelpful in many of the cases where
it's used). Legacy syntax is still supported for simple cases, but will
be phased out. New devices should not have MCFG_ macros.
I don't think I've missed any fundamental issues, but if I've broken
something, let me know.
Diffstat (limited to 'src/mame/video')
37 files changed, 107 insertions, 111 deletions
diff --git a/src/mame/video/733_asr.h b/src/mame/video/733_asr.h index 82edf41dd5a..6d5527762bf 100644 --- a/src/mame/video/733_asr.h +++ b/src/mame/video/733_asr.h @@ -87,9 +87,9 @@ private: DECLARE_DEVICE_TYPE(ASR733, asr733_device) #define MCFG_ASR733_KEYINT_HANDLER( _intcallb ) \ - devcb = &downcast<asr733_device &>(*device).set_keyint_callback(DEVCB_##_intcallb); + downcast<asr733_device &>(*device).set_keyint_callback(DEVCB_##_intcallb); #define MCFG_ASR733_LINEINT_HANDLER( _intcallb ) \ - devcb = &downcast<asr733_device &>(*device).set_lineint_callback(DEVCB_##_intcallb); + downcast<asr733_device &>(*device).set_lineint_callback(DEVCB_##_intcallb); #endif // MAME_VIDEO_733_ASR diff --git a/src/mame/video/911_vdt.h b/src/mame/video/911_vdt.h index b47786ef87b..b92c0a9d748 100644 --- a/src/mame/video/911_vdt.h +++ b/src/mame/video/911_vdt.h @@ -115,9 +115,9 @@ private: DECLARE_DEVICE_TYPE(VDT911, vdt911_device) #define MCFG_VDT911_KEYINT_HANDLER( _intcallb ) \ - devcb = &downcast<vdt911_device &>(*device).set_keyint_callback(DEVCB_##_intcallb); + downcast<vdt911_device &>(*device).set_keyint_callback(DEVCB_##_intcallb); #define MCFG_VDT911_LINEINT_HANDLER( _intcallb ) \ - devcb = &downcast<vdt911_device &>(*device).set_lineint_callback(DEVCB_##_intcallb); + downcast<vdt911_device &>(*device).set_lineint_callback(DEVCB_##_intcallb); #endif // MAME_VIDEO_911_VDT_H diff --git a/src/mame/video/abc800.cpp b/src/mame/video/abc800.cpp index 53f0530ead4..ec9c2c63999 100644 --- a/src/mame/video/abc800.cpp +++ b/src/mame/video/abc800.cpp @@ -278,11 +278,12 @@ uint32_t abc800m_state::screen_update(screen_device &screen, bitmap_rgb32 &bitma //------------------------------------------------- MACHINE_CONFIG_START(abc800m_state::abc800m_video) - MCFG_MC6845_ADD(MC6845_TAG, MC6845, SCREEN_TAG, ABC800_CCLK) - MCFG_MC6845_SHOW_BORDER_AREA(true) - MCFG_MC6845_CHAR_WIDTH(ABC800_CHAR_WIDTH) - MCFG_MC6845_UPDATE_ROW_CB(abc800m_state, abc800m_update_row) - MCFG_MC6845_OUT_VSYNC_CB(WRITELINE(Z80DART_TAG, z80dart_device, rib_w)) MCFG_DEVCB_XOR(1) + mc6845_device &mc6845(MC6845(config, MC6845_TAG, ABC800_CCLK)); + mc6845.set_screen(SCREEN_TAG); + mc6845.set_show_border_area(true); + mc6845.set_char_width(ABC800_CHAR_WIDTH); + mc6845.set_update_row_callback(FUNC(abc800m_state::abc800m_update_row), this); + mc6845.out_vsync_callback().set(m_dart, FUNC(z80dart_device::rib_w)).invert(); MCFG_SCREEN_ADD_MONOCHROME(SCREEN_TAG, RASTER, rgb_t(0xff, 0xff, 0x00)) MCFG_SCREEN_UPDATE_DRIVER(abc800m_state, screen_update) diff --git a/src/mame/video/abc802.cpp b/src/mame/video/abc802.cpp index 893e76f5e0f..fb1eb1da22f 100644 --- a/src/mame/video/abc802.cpp +++ b/src/mame/video/abc802.cpp @@ -179,12 +179,13 @@ WRITE_LINE_MEMBER( abc802_state::vs_w ) //------------------------------------------------- MACHINE_CONFIG_START(abc802_state::abc802_video) - MCFG_MC6845_ADD(MC6845_TAG, MC6845, SCREEN_TAG, ABC800_CCLK) - MCFG_MC6845_SHOW_BORDER_AREA(true) - MCFG_MC6845_CHAR_WIDTH(ABC800_CHAR_WIDTH) - MCFG_MC6845_UPDATE_ROW_CB(abc802_state, abc802_update_row) - MCFG_MC6845_OUT_VSYNC_CB(WRITELINE(*this, abc802_state, vs_w)) - MCFG_DEVCB_CHAIN_OUTPUT(WRITELINE(Z80DART_TAG, z80dart_device, rib_w)) MCFG_DEVCB_XOR(1) + mc6845_device &mc6845(MC6845(config, MC6845_TAG, ABC800_CCLK)); + mc6845.set_screen(SCREEN_TAG); + mc6845.set_show_border_area(true); + mc6845.set_char_width(ABC800_CHAR_WIDTH); + mc6845.set_update_row_callback(FUNC(abc802_state::abc802_update_row), this); + mc6845.out_vsync_callback().set(FUNC(abc802_state::vs_w)); + mc6845.out_vsync_callback().append(m_dart, FUNC(z80dart_device::rib_w)).invert(); MCFG_SCREEN_ADD_MONOCHROME(SCREEN_TAG, RASTER, rgb_t::amber()) MCFG_SCREEN_UPDATE_DEVICE(MC6845_TAG, mc6845_device, screen_update) diff --git a/src/mame/video/atarivad.h b/src/mame/video/atarivad.h index a7461bff3c9..acc8486d4c4 100644 --- a/src/mame/video/atarivad.h +++ b/src/mame/video/atarivad.h @@ -21,7 +21,7 @@ #define MCFG_ATARI_VAD_ADD(_tag, _screen, _intcb) \ MCFG_DEVICE_ADD(_tag, ATARI_VAD, 0) \ MCFG_VIDEO_SET_SCREEN(_screen) \ - devcb = &downcast<atari_vad_device &>(*device).set_scanline_int_cb(DEVCB_##_intcb); + downcast<atari_vad_device &>(*device).set_scanline_int_cb(DEVCB_##_intcb); #define MCFG_ATARI_VAD_PLAYFIELD(_class, _gfxtag, _getinfo) \ { std::string fulltag(device->tag()); fulltag.append(":playfield"); device_t *device; \ diff --git a/src/mame/video/bfm_dm01.h b/src/mame/video/bfm_dm01.h index bac2de6ce74..93205a92a7a 100644 --- a/src/mame/video/bfm_dm01.h +++ b/src/mame/video/bfm_dm01.h @@ -14,7 +14,7 @@ #include "screen.h" #define MCFG_BFM_DM01_BUSY_CB(_devcb) \ - devcb = &downcast<bfm_dm01_device &>(*device).set_busy_callback(DEVCB_##_devcb); + downcast<bfm_dm01_device &>(*device).set_busy_callback(DEVCB_##_devcb); class bfm_dm01_device : public device_t { diff --git a/src/mame/video/cidelsa.cpp b/src/mame/video/cidelsa.cpp index e8cbfab93a1..d649d64ddad 100644 --- a/src/mame/video/cidelsa.cpp +++ b/src/mame/video/cidelsa.cpp @@ -159,7 +159,7 @@ MACHINE_CONFIG_START(cidelsa_state::destryer_video) MCFG_CDP1869_CHAR_PCB_READ_OWNER(cidelsa_state, cidelsa_pcb_r) MCFG_CDP1869_CHAR_RAM_READ_OWNER(cidelsa_state, cidelsa_charram_r) MCFG_CDP1869_CHAR_RAM_WRITE_OWNER(cidelsa_state, cidelsa_charram_w) - MCFG_CDP1869_PAL_NTSC_CALLBACK(VCC) + MCFG_CDP1869_PAL_NTSC_CALLBACK(CONSTANT(1)) MCFG_CDP1869_PRD_CALLBACK(WRITELINE(*this, cidelsa_state, prd_w)) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) MACHINE_CONFIG_END @@ -173,7 +173,7 @@ MACHINE_CONFIG_START(cidelsa_state::altair_video) MCFG_CDP1869_CHAR_PCB_READ_OWNER(cidelsa_state, cidelsa_pcb_r) MCFG_CDP1869_CHAR_RAM_READ_OWNER(cidelsa_state, cidelsa_charram_r) MCFG_CDP1869_CHAR_RAM_WRITE_OWNER(cidelsa_state, cidelsa_charram_w) - MCFG_CDP1869_PAL_NTSC_CALLBACK(VCC) + MCFG_CDP1869_PAL_NTSC_CALLBACK(CONSTANT(1)) MCFG_CDP1869_PRD_CALLBACK(WRITELINE(*this, cidelsa_state, prd_w)) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) MACHINE_CONFIG_END @@ -187,7 +187,7 @@ MACHINE_CONFIG_START(draco_state::draco_video) MCFG_CDP1869_CHAR_PCB_READ_OWNER(draco_state, draco_pcb_r) MCFG_CDP1869_CHAR_RAM_READ_OWNER(draco_state, draco_charram_r) MCFG_CDP1869_CHAR_RAM_WRITE_OWNER(draco_state, draco_charram_w) - MCFG_CDP1869_PAL_NTSC_CALLBACK(VCC) + MCFG_CDP1869_PAL_NTSC_CALLBACK(CONSTANT(1)) MCFG_CDP1869_PRD_CALLBACK(INPUTLINE(CDP1802_TAG, COSMAC_INPUT_LINE_EF1)) MCFG_DEVICE_ADD(AY8910_TAG, AY8910, DRACO_SND_CHR1) MCFG_AY8910_OUTPUT_TYPE(AY8910_SINGLE_OUTPUT) diff --git a/src/mame/video/comx35.cpp b/src/mame/video/comx35.cpp index 2754d80d2d5..7c31d10be56 100644 --- a/src/mame/video/comx35.cpp +++ b/src/mame/video/comx35.cpp @@ -100,7 +100,7 @@ MACHINE_CONFIG_START(comx35_state::comx35_pal_video) MCFG_CDP1869_CHAR_PCB_READ_OWNER(comx35_state, comx35_pcb_r) MCFG_CDP1869_CHAR_RAM_READ_OWNER(comx35_state, comx35_charram_r) MCFG_CDP1869_CHAR_RAM_WRITE_OWNER(comx35_state, comx35_charram_w) - MCFG_CDP1869_PAL_NTSC_CALLBACK(VCC) + MCFG_CDP1869_PAL_NTSC_CALLBACK(CONSTANT(1)) MCFG_CDP1869_PRD_CALLBACK(WRITELINE(*this, comx35_state, prd_w)) MCFG_CDP1869_SET_SCREEN(SCREEN_TAG) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) @@ -119,7 +119,7 @@ MACHINE_CONFIG_START(comx35_state::comx35_ntsc_video) MCFG_CDP1869_CHAR_PCB_READ_OWNER(comx35_state, comx35_pcb_r) MCFG_CDP1869_CHAR_RAM_READ_OWNER(comx35_state, comx35_charram_r) MCFG_CDP1869_CHAR_RAM_WRITE_OWNER(comx35_state, comx35_charram_w) - MCFG_CDP1869_PAL_NTSC_CALLBACK(GND) + MCFG_CDP1869_PAL_NTSC_CALLBACK(CONSTANT(0)) MCFG_CDP1869_PRD_CALLBACK(WRITELINE(*this, comx35_state, prd_w)) MCFG_CDP1869_SET_SCREEN(SCREEN_TAG) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) diff --git a/src/mame/video/decodmd1.cpp b/src/mame/video/decodmd1.cpp index 90a5abf593e..e23e47644a7 100644 --- a/src/mame/video/decodmd1.cpp +++ b/src/mame/video/decodmd1.cpp @@ -217,13 +217,13 @@ MACHINE_CONFIG_START(decodmd_type1_device::device_add_mconfig) MCFG_RAM_ADD(RAM_TAG) MCFG_RAM_DEFAULT_SIZE("8K") - MCFG_DEVICE_ADD("bitlatch", HC259, 0) // U4 - MCFG_ADDRESSABLE_LATCH_PARALLEL_OUT_CB(MEMBANK("dmdbank1")) MCFG_DEVCB_MASK(0x07) MCFG_DEVCB_INVERT - MCFG_ADDRESSABLE_LATCH_Q3_OUT_CB(WRITELINE(*this, decodmd_type1_device, blank_w)) - MCFG_ADDRESSABLE_LATCH_Q4_OUT_CB(WRITELINE(*this, decodmd_type1_device, status_w)) - MCFG_ADDRESSABLE_LATCH_Q5_OUT_CB(WRITELINE(*this, decodmd_type1_device, rowdata_w)) - MCFG_ADDRESSABLE_LATCH_Q6_OUT_CB(WRITELINE(*this, decodmd_type1_device, rowclock_w)) - MCFG_ADDRESSABLE_LATCH_Q7_OUT_CB(WRITELINE(*this, decodmd_type1_device, test_w)) + HC259(config, m_bitlatch); // U4 + m_bitlatch->parallel_out_cb().set_membank(m_rombank1).mask(0x07).invert(); + m_bitlatch->q_out_cb<3>().set(FUNC(decodmd_type1_device::blank_w)); + m_bitlatch->q_out_cb<4>().set(FUNC(decodmd_type1_device::status_w)); + m_bitlatch->q_out_cb<5>().set(FUNC(decodmd_type1_device::rowdata_w)); + m_bitlatch->q_out_cb<6>().set(FUNC(decodmd_type1_device::rowclock_w)); + m_bitlatch->q_out_cb<7>().set(FUNC(decodmd_type1_device::test_w)); MACHINE_CONFIG_END diff --git a/src/mame/video/dynax_blitter_rev2.h b/src/mame/video/dynax_blitter_rev2.h index 29704351251..a28f2fb8f8a 100644 --- a/src/mame/video/dynax_blitter_rev2.h +++ b/src/mame/video/dynax_blitter_rev2.h @@ -16,24 +16,24 @@ //************************************************************************** #define MCFG_DYNAX_BLITTER_REV2_VRAM_OUT_CB(_devcb) \ - devcb = &downcast<dynax_blitter_rev2_device &>(*device).set_vram_out_cb(DEVCB_##_devcb); + downcast<dynax_blitter_rev2_device &>(*device).set_vram_out_cb(DEVCB_##_devcb); #define MCFG_DYNAX_BLITTER_REV2_SCROLLX_CB(_devcb) \ - devcb = &downcast<dynax_blitter_rev2_device &>(*device).set_scrollx_cb(DEVCB_##_devcb); + downcast<dynax_blitter_rev2_device &>(*device).set_scrollx_cb(DEVCB_##_devcb); #define MCFG_DYNAX_BLITTER_REV2_SCROLLY_CB(_devcb) \ - devcb = &downcast<dynax_blitter_rev2_device &>(*device).set_scrolly_cb(DEVCB_##_devcb); + downcast<dynax_blitter_rev2_device &>(*device).set_scrolly_cb(DEVCB_##_devcb); #define MCFG_DYNAX_BLITTER_REV2_READY_CB(_devcb) \ - devcb = &downcast<dynax_blitter_rev2_device &>(*device).set_ready_cb(DEVCB_##_devcb); + downcast<dynax_blitter_rev2_device &>(*device).set_ready_cb(DEVCB_##_devcb); #define MCFG_CDRACULA_BLITTER_VRAM_OUT_CB(_devcb) \ - devcb = &downcast<cdracula_blitter_device &>(*device).set_vram_out_cb(DEVCB_##_devcb); + downcast<cdracula_blitter_device &>(*device).set_vram_out_cb(DEVCB_##_devcb); #define MCFG_CDRACULA_BLITTER_SCROLLX_CB(_devcb) \ - devcb = &downcast<cdracula_blitter_device &>(*device).set_scrollx_cb(DEVCB_##_devcb); + downcast<cdracula_blitter_device &>(*device).set_scrollx_cb(DEVCB_##_devcb); #define MCFG_CDRACULA_BLITTER_SCROLLY_CB(_devcb) \ - devcb = &downcast<cdracula_blitter_device &>(*device).set_scrolly_cb(DEVCB_##_devcb); + downcast<cdracula_blitter_device &>(*device).set_scrolly_cb(DEVCB_##_devcb); #define MCFG_CDRACULA_BLITTER_READY_CB(_devcb) \ - devcb = &downcast<cdracula_blitter_device &>(*device).set_ready_cb(DEVCB_##_devcb); + downcast<cdracula_blitter_device &>(*device).set_ready_cb(DEVCB_##_devcb); #define MCFG_CDRACULA_BLITTER_DEST_CB(_devcb) \ - devcb = &downcast<cdracula_blitter_device &>(*device).set_blit_dest_cb(DEVCB_##_devcb); + downcast<cdracula_blitter_device &>(*device).set_blit_dest_cb(DEVCB_##_devcb); //************************************************************************** // TYPE DEFINITIONS @@ -52,6 +52,10 @@ public: template<class Object> devcb_base &set_scrollx_cb(Object &&cb) { return m_scrollx_cb.set_callback(std::forward<Object>(cb)); } template<class Object> devcb_base &set_scrolly_cb(Object &&cb) { return m_scrolly_cb.set_callback(std::forward<Object>(cb)); } template<class Object> devcb_base &set_ready_cb(Object &&cb) { return m_ready_cb.set_callback(std::forward<Object>(cb)); } + auto vram_out_cb() { return m_vram_out_cb.bind(); } + auto scrollx_cb() { return m_scrollx_cb.bind(); } + auto scrolly_cb() { return m_scrolly_cb.bind(); } + auto ready_cb() { return m_ready_cb.bind(); } // write handlers DECLARE_WRITE8_MEMBER(pen_w); diff --git a/src/mame/video/exidy440.cpp b/src/mame/video/exidy440.cpp index df28b2b340d..3aba8684ea7 100644 --- a/src/mame/video/exidy440.cpp +++ b/src/mame/video/exidy440.cpp @@ -463,13 +463,13 @@ uint32_t topsecex_state::screen_update_topsecex(screen_device &screen, bitmap_in MACHINE_CONFIG_START(exidy440_state::exidy440_video) MCFG_PALETTE_ADD("palette", 256) - MCFG_SCREEN_ADD("screen", RASTER) - MCFG_SCREEN_VIDEO_ATTRIBUTES(VIDEO_ALWAYS_UPDATE) - MCFG_SCREEN_RAW_PARAMS(PIXEL_CLOCK, HTOTAL, HBEND, HBSTART, VTOTAL, VBEND, VBSTART) - MCFG_SCREEN_UPDATE_DRIVER(exidy440_state, screen_update_exidy440) - MCFG_SCREEN_PALETTE("palette") - MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(*this, exidy440_state, vblank_interrupt_w)) - MCFG_DEVCB_CHAIN_OUTPUT(WRITELINE("440audio", exidy440_sound_device, sound_interrupt_w)) + screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); + screen.set_video_attributes(VIDEO_ALWAYS_UPDATE); + screen.set_raw(PIXEL_CLOCK, HTOTAL, HBEND, HBSTART, VTOTAL, VBEND, VBSTART); + screen.set_screen_update(FUNC(exidy440_state::screen_update_exidy440)); + screen.set_palette(m_palette); + screen.screen_vblank().set(FUNC(exidy440_state::vblank_interrupt_w)); + screen.screen_vblank().append(m_custom, FUNC(exidy440_sound_device::sound_interrupt_w)); MACHINE_CONFIG_END diff --git a/src/mame/video/gime.h b/src/mame/video/gime.h index a8f208ff58c..3ecf1aa3e7e 100644 --- a/src/mame/video/gime.h +++ b/src/mame/video/gime.h @@ -28,13 +28,13 @@ #define MCFG_GIME_FSYNC_CALLBACK MCFG_MC6847_FSYNC_CALLBACK #define MCFG_GIME_IRQ_CALLBACK(_write) \ - devcb = &downcast<gime_device &>(*device).set_irq_wr_callback(DEVCB_##_write); + downcast<gime_device &>(*device).set_irq_wr_callback(DEVCB_##_write); #define MCFG_GIME_FIRQ_CALLBACK(_write) \ - devcb = &downcast<gime_device &>(*device).set_firq_wr_callback(DEVCB_##_write); + downcast<gime_device &>(*device).set_firq_wr_callback(DEVCB_##_write); #define MCFG_GIME_FLOATING_BUS_CALLBACK(_read) \ - devcb = &downcast<gime_device &>(*device).set_floating_bus_rd_callback(DEVCB_##_read); + downcast<gime_device &>(*device).set_floating_bus_rd_callback(DEVCB_##_read); //************************************************************************** diff --git a/src/mame/video/gp9001.h b/src/mame/video/gp9001.h index 876ea9ba886..9e3a25a2a64 100644 --- a/src/mame/video/gp9001.h +++ b/src/mame/video/gp9001.h @@ -6,9 +6,6 @@ #pragma once -#define MCFG_GP9001_VINT_CALLBACK(_devcb) \ - devcb = &downcast<gp9001vdp_device &>(*device).set_vint_out_cb(DEVCB_##_devcb); - class gp9001vdp_device : public device_t, public device_gfx_interface, public device_video_interface, @@ -22,14 +19,14 @@ class gp9001vdp_device : public device_t, public: gp9001vdp_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); - template<class Object> devcb_base &set_vint_out_cb(Object &&obj) { return m_vint_out_cb.set_callback(std::forward<Object>(obj)); } + auto vint_out_cb() { return m_vint_out_cb.bind(); } - void draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect, const uint8_t* primap ); - void gp9001_draw_custom_tilemap( bitmap_ind16 &bitmap, int layer, const uint8_t* priremap, const uint8_t* pri_enable ); - void gp9001_render_vdp( bitmap_ind16 &bitmap, const rectangle &cliprect); - void gp9001_screen_eof(void); - void create_tilemaps(void); - void init_scroll_regs(void); + void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect, const uint8_t* primap); + void gp9001_draw_custom_tilemap(bitmap_ind16 &bitmap, int layer, const uint8_t* priremap, const uint8_t* pri_enable); + void gp9001_render_vdp(bitmap_ind16 &bitmap, const rectangle &cliprect); + void gp9001_screen_eof(); + void create_tilemaps(); + void init_scroll_regs(); bitmap_ind8 *custom_priority_bitmap; diff --git a/src/mame/video/gtia.h b/src/mame/video/gtia.h index e00ac8aa73b..2d01f47bfbf 100644 --- a/src/mame/video/gtia.h +++ b/src/mame/video/gtia.h @@ -17,10 +17,10 @@ #define MCFG_GTIA_READ_CB(_devcb) \ - devcb = &downcast<gtia_device &>(*device).set_read_callback(DEVCB_##_devcb); + downcast<gtia_device &>(*device).set_read_callback(DEVCB_##_devcb); #define MCFG_GTIA_WRITE_CB(_devcb) \ - devcb = &downcast<gtia_device &>(*device).set_write_callback(DEVCB_##_devcb); + downcast<gtia_device &>(*device).set_write_callback(DEVCB_##_devcb); #define MCFG_GTIA_REGION(region) \ downcast<gtia_device &>(*device).set_region(region); diff --git a/src/mame/video/k051960.h b/src/mame/video/k051960.h index a5807d3efea..a5c523fcab7 100644 --- a/src/mame/video/k051960.h +++ b/src/mame/video/k051960.h @@ -28,13 +28,13 @@ typedef device_delegate<void (int *code, int *color, int *priority, int *shadow) downcast<k051960_device &>(*device).set_screen_tag(_tag); #define MCFG_K051960_IRQ_HANDLER(_devcb) \ - devcb = &downcast<k051960_device &>(*device).set_irq_handler(DEVCB_##_devcb); + downcast<k051960_device &>(*device).set_irq_handler(DEVCB_##_devcb); #define MCFG_K051960_NMI_HANDLER(_devcb) \ - devcb = &downcast<k051960_device &>(*device).set_nmi_handler(DEVCB_##_devcb); + downcast<k051960_device &>(*device).set_nmi_handler(DEVCB_##_devcb); #define MCFG_K051960_VREG_CONTRAST_HANDLER(_devcb) \ - devcb = &downcast<k051960_device &>(*device).set_vreg_contrast_handler(DEVCB_##_devcb); + downcast<k051960_device &>(*device).set_vreg_contrast_handler(DEVCB_##_devcb); class k051960_device : public device_t, public device_gfx_interface diff --git a/src/mame/video/k052109.h b/src/mame/video/k052109.h index 294ee133366..69ee5108dc2 100644 --- a/src/mame/video/k052109.h +++ b/src/mame/video/k052109.h @@ -20,7 +20,7 @@ typedef device_delegate<void (int layer, int bank, int *code, int *color, int *f downcast<k052109_device &>(*device).set_screen_tag(_tag); #define MCFG_K052109_IRQ_HANDLER(_devcb) \ - devcb = &downcast<k052109_device &>(*device).set_irq_handler(DEVCB_##_devcb); + downcast<k052109_device &>(*device).set_irq_handler(DEVCB_##_devcb); class k052109_device : public device_t, public device_gfx_interface diff --git a/src/mame/video/k053250_ps.h b/src/mame/video/k053250_ps.h index ebc16089ce7..f755a34a1c1 100644 --- a/src/mame/video/k053250_ps.h +++ b/src/mame/video/k053250_ps.h @@ -17,7 +17,7 @@ downcast<k053250ps_device &>(*device).set_offsets(offx, offy); #define MCFG_K053250PS_DMAIRQ_CB(_cb) \ - devcb = &downcast<k053250ps_device &>(*device).set_dmairq_cb(DEVCB_##_cb); + downcast<k053250ps_device &>(*device).set_dmairq_cb(DEVCB_##_cb); class k053250ps_device : public device_t, public device_gfx_interface, diff --git a/src/mame/video/k057714.h b/src/mame/video/k057714.h index 08524f1fde3..2b902fc62b6 100644 --- a/src/mame/video/k057714.h +++ b/src/mame/video/k057714.h @@ -64,7 +64,7 @@ private: DECLARE_DEVICE_TYPE(K057714, k057714_device) #define MCFG_K057714_IRQ_CALLBACK(_devcb) \ - devcb = &downcast<k057714_device &>(*device).set_irq_callback(DEVCB_##_devcb); + downcast<k057714_device &>(*device).set_irq_callback(DEVCB_##_devcb); #endif // MAME_MACHINE_K057714_H diff --git a/src/mame/video/k1ge.h b/src/mame/video/k1ge.h index 250ad493173..1fcac610cf2 100644 --- a/src/mame/video/k1ge.h +++ b/src/mame/video/k1ge.h @@ -17,14 +17,14 @@ #define MCFG_K1GE_ADD(_tag, _clock, _screen, _vblank, _hblank ) \ MCFG_DEVICE_ADD( _tag, K1GE, _clock ) \ MCFG_VIDEO_SET_SCREEN( _screen ) \ - devcb = &downcast<k1ge_device &>(*device).set_vblank_callback(DEVCB_##_vblank ); \ - devcb = &downcast<k1ge_device &>(*device).set_hblank_callback(DEVCB_##_hblank ); + downcast<k1ge_device &>(*device).set_vblank_callback(DEVCB_##_vblank ); \ + downcast<k1ge_device &>(*device).set_hblank_callback(DEVCB_##_hblank ); #define MCFG_K2GE_ADD(_tag, _clock, _screen, _vblank, _hblank ) \ MCFG_DEVICE_ADD( _tag, K2GE, _clock ) \ MCFG_VIDEO_SET_SCREEN( _screen ) \ - devcb = &downcast<k1ge_device &>(*device).set_vblank_callback(DEVCB_##_vblank ); \ - devcb = &downcast<k1ge_device &>(*device).set_hblank_callback(DEVCB_##_hblank ); + downcast<k1ge_device &>(*device).set_vblank_callback(DEVCB_##_vblank ); \ + downcast<k1ge_device &>(*device).set_hblank_callback(DEVCB_##_hblank ); class k1ge_device : public device_t, public device_video_interface diff --git a/src/mame/video/liberatr.cpp b/src/mame/video/liberatr.cpp index c97b1cd66ad..f4d59688d0d 100644 --- a/src/mame/video/liberatr.cpp +++ b/src/mame/video/liberatr.cpp @@ -54,12 +54,6 @@ WRITE8_MEMBER( liberatr_state::bitmap_w ) } -WRITE_LINE_MEMBER(liberatr_state::planet_select_w) -{ - m_planet_select = state; -} - - /******************************************************************************************** liberatr_init_planet() diff --git a/src/mame/video/nick.h b/src/mame/video/nick.h index a57258309c7..3f2cc6452f2 100644 --- a/src/mame/video/nick.h +++ b/src/mame/video/nick.h @@ -33,7 +33,7 @@ #define MCFG_NICK_VIRQ_CALLBACK(_write) \ - devcb = &downcast<nick_device &>(*device).set_virq_wr_callback(DEVCB_##_write); + downcast<nick_device &>(*device).set_virq_wr_callback(DEVCB_##_write); /* there are 64us per line, although in reality diff --git a/src/mame/video/pcd.h b/src/mame/video/pcd.h index 0a92588d310..8d874d5cbf8 100644 --- a/src/mame/video/pcd.h +++ b/src/mame/video/pcd.h @@ -15,7 +15,7 @@ #define MCFG_PCX_VIDEO_TXD_HANDLER(_devcb) \ - devcb = &downcast<pcx_video_device &>(*device).set_txd_handler(DEVCB_##_devcb); + downcast<pcx_video_device &>(*device).set_txd_handler(DEVCB_##_devcb); class pcdx_video_device : public device_t, public device_gfx_interface { diff --git a/src/mame/video/pecom.cpp b/src/mame/video/pecom.cpp index 5365b9fd3bc..1cd4c67287f 100644 --- a/src/mame/video/pecom.cpp +++ b/src/mame/video/pecom.cpp @@ -101,7 +101,7 @@ MACHINE_CONFIG_START(pecom_state::pecom_video) MCFG_CDP1869_CHAR_PCB_READ_OWNER(pecom_state, pecom_pcb_r) MCFG_CDP1869_CHAR_RAM_READ_OWNER(pecom_state, pecom_char_ram_r) MCFG_CDP1869_CHAR_RAM_WRITE_OWNER(pecom_state, pecom_char_ram_w) - MCFG_CDP1869_PAL_NTSC_CALLBACK(VCC) + MCFG_CDP1869_PAL_NTSC_CALLBACK(CONSTANT(1)) MCFG_CDP1869_PRD_CALLBACK(WRITELINE(*this, pecom_state, pecom_prd_w)) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) WAVE(config, "wave", "cassette").add_route(ALL_OUTPUTS, "mono", 0.25); diff --git a/src/mame/video/runaway.cpp b/src/mame/video/runaway.cpp index 234355c3450..01fdecad60a 100644 --- a/src/mame/video/runaway.cpp +++ b/src/mame/video/runaway.cpp @@ -44,10 +44,9 @@ WRITE_LINE_MEMBER(runaway_state::tile_bank_w) { if (state != m_tile_bank) { + m_tile_bank = state; m_bg_tilemap->mark_all_dirty(); } - - m_tile_bank = state; } diff --git a/src/mame/video/segaic24.h b/src/mame/video/segaic24.h index 04d0fae7250..dfc17df0099 100644 --- a/src/mame/video/segaic24.h +++ b/src/mame/video/segaic24.h @@ -11,10 +11,10 @@ #pragma once #define MCFG_S24TILE_XHOUT_CALLBACK(_write) \ - devcb = &downcast<segas24_tile_device &>(*device).set_xhout_write_callback(DEVCB_##_write); + downcast<segas24_tile_device &>(*device).set_xhout_write_callback(DEVCB_##_write); #define MCFG_S24TILE_XVOUT_CALLBACK(_write) \ - devcb = &downcast<segas24_tile_device &>(*device).set_xvout_write_callback(DEVCB_##_write); + downcast<segas24_tile_device &>(*device).set_xvout_write_callback(DEVCB_##_write); class segas24_tile_device : public device_t, public device_gfx_interface diff --git a/src/mame/video/seibu_crtc.h b/src/mame/video/seibu_crtc.h index 30818aa5a6f..e6e58be1e10 100644 --- a/src/mame/video/seibu_crtc.h +++ b/src/mame/video/seibu_crtc.h @@ -17,19 +17,19 @@ //************************************************************************** #define MCFG_SEIBU_CRTC_DECRYPT_KEY_CB(_devcb) \ - devcb = &downcast<seibu_crtc_device &>(*device).set_decrypt_key_callback(DEVCB_##_devcb); + downcast<seibu_crtc_device &>(*device).set_decrypt_key_callback(DEVCB_##_devcb); #define MCFG_SEIBU_CRTC_LAYER_EN_CB(_devcb) \ - devcb = &downcast<seibu_crtc_device &>(*device).set_layer_en_callback(DEVCB_##_devcb); + downcast<seibu_crtc_device &>(*device).set_layer_en_callback(DEVCB_##_devcb); #define MCFG_SEIBU_CRTC_LAYER_SCROLL_CB(_devcb) \ - devcb = &downcast<seibu_crtc_device &>(*device).set_layer_scroll_callback(DEVCB_##_devcb); + downcast<seibu_crtc_device &>(*device).set_layer_scroll_callback(DEVCB_##_devcb); #define MCFG_SEIBU_CRTC_LAYER_SCROLL_BASE_CB(_devcb) \ - devcb = &downcast<seibu_crtc_device &>(*device).set_layer_scroll_base_callback(DEVCB_##_devcb); + downcast<seibu_crtc_device &>(*device).set_layer_scroll_base_callback(DEVCB_##_devcb); #define MCFG_SEIBU_CRTC_REG_1A_CB(_devcb) \ - devcb = &downcast<seibu_crtc_device &>(*device).set_reg_1a_callback(DEVCB_##_devcb); + downcast<seibu_crtc_device &>(*device).set_reg_1a_callback(DEVCB_##_devcb); //************************************************************************** diff --git a/src/mame/video/taito_b.cpp b/src/mame/video/taito_b.cpp index 2383430f83f..a5ad113d0be 100644 --- a/src/mame/video/taito_b.cpp +++ b/src/mame/video/taito_b.cpp @@ -32,7 +32,7 @@ void taitob_state::hitice_clear_pixel_bitmap( ) hitice_pixelram_w(space, i, 0, 0xffff); } -WRITE16_MEMBER(taitob_state::realpunc_video_ctrl_w) +WRITE16_MEMBER(taitob_c_state::realpunc_video_ctrl_w) { COMBINE_DATA(&m_realpunc_video_ctrl); } @@ -62,7 +62,7 @@ VIDEO_RESET_MEMBER(taitob_state,hitice) } -VIDEO_START_MEMBER(taitob_state,realpunc) +VIDEO_START_MEMBER(taitob_c_state,realpunc) { m_realpunc_bitmap = std::make_unique<bitmap_ind16>(m_screen->width(), m_screen->height()); @@ -107,7 +107,7 @@ uint32_t taitob_state::screen_update_taitob(screen_device &screen, bitmap_ind16 -uint32_t taitob_state::screen_update_realpunc(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) +uint32_t taitob_c_state::screen_update_realpunc(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) { const pen_t *palette = m_palette->pens(); uint8_t const video_control = m_tc0180vcu->get_videoctrl(); diff --git a/src/mame/video/tc0180vcu.h b/src/mame/video/tc0180vcu.h index 3d3f4e8ece8..f8c31c75dea 100644 --- a/src/mame/video/tc0180vcu.h +++ b/src/mame/video/tc0180vcu.h @@ -6,9 +6,9 @@ #pragma once #define MCFG_TC0180VCU_INTH_CALLBACK(_write) \ - devcb = &downcast<tc0180vcu_device &>(*device).set_inth_callback(DEVCB_##_write); + downcast<tc0180vcu_device &>(*device).set_inth_callback(DEVCB_##_write); #define MCFG_TC0180VCU_INTL_CALLBACK(_write) \ - devcb = &downcast<tc0180vcu_device &>(*device).set_intl_callback(DEVCB_##_write); + downcast<tc0180vcu_device &>(*device).set_intl_callback(DEVCB_##_write); class tc0180vcu_device : public device_t, public device_gfx_interface, public device_video_interface { diff --git a/src/mame/video/tia.h b/src/mame/video/tia.h index 027f9d2b68d..57c9ade29aa 100644 --- a/src/mame/video/tia.h +++ b/src/mame/video/tia.h @@ -36,13 +36,13 @@ struct player_gfx { //************************************************************************** #define MCFG_TIA_READ_INPUT_PORT_CB(_devcb) \ - devcb = &downcast<tia_video_device &>(*device).set_read_input_port_callback(DEVCB_##_devcb); + downcast<tia_video_device &>(*device).set_read_input_port_callback(DEVCB_##_devcb); #define MCFG_TIA_DATABUS_CONTENTS_CB(_devcb) \ - devcb = &downcast<tia_video_device &>(*device).set_databus_contents_callback(DEVCB_##_devcb); + downcast<tia_video_device &>(*device).set_databus_contents_callback(DEVCB_##_devcb); #define MCFG_TIA_VSYNC_CB(_devcb) \ - devcb = &downcast<tia_video_device &>(*device).set_vsync_callback(DEVCB_##_devcb); + downcast<tia_video_device &>(*device).set_vsync_callback(DEVCB_##_devcb); //************************************************************************** // TYPE DEFINITIONS diff --git a/src/mame/video/tmc1800.cpp b/src/mame/video/tmc1800.cpp index 29414734828..631bf1595ab 100644 --- a/src/mame/video/tmc1800.cpp +++ b/src/mame/video/tmc1800.cpp @@ -57,7 +57,7 @@ MACHINE_CONFIG_START(tmc2000_state::tmc2000_video) MCFG_SCREEN_UPDATE_DEVICE(CDP1864_TAG, cdp1864_device, screen_update) SPEAKER(config, "mono").front_center(); - MCFG_CDP1864_ADD(CDP1864_TAG, SCREEN_TAG, XTAL(1'750'000), GND, INPUTLINE(CDP1802_TAG, COSMAC_INPUT_LINE_INT), INPUTLINE(CDP1802_TAG, COSMAC_INPUT_LINE_DMAOUT), INPUTLINE(CDP1802_TAG, COSMAC_INPUT_LINE_EF1), NOOP, READLINE(*this, tmc2000_state, rdata_r), READLINE(*this, tmc2000_state, bdata_r), READLINE(*this, tmc2000_state, gdata_r)) + MCFG_CDP1864_ADD(CDP1864_TAG, SCREEN_TAG, XTAL(1'750'000), CONSTANT(0), INPUTLINE(CDP1802_TAG, COSMAC_INPUT_LINE_INT), INPUTLINE(CDP1802_TAG, COSMAC_INPUT_LINE_DMAOUT), INPUTLINE(CDP1802_TAG, COSMAC_INPUT_LINE_EF1), NOOP, READLINE(*this, tmc2000_state, rdata_r), READLINE(*this, tmc2000_state, bdata_r), READLINE(*this, tmc2000_state, gdata_r)) MCFG_CDP1864_CHROMINANCE(RES_K(1.21), RES_K(2.05), RES_K(2.26), RES_K(3.92)) // RL64, RL63, RL61, RL65 (also RH62 (2K pot) in series, but ignored here) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) MACHINE_CONFIG_END @@ -67,7 +67,7 @@ MACHINE_CONFIG_START(nano_state::nano_video) MCFG_SCREEN_UPDATE_DEVICE(CDP1864_TAG, cdp1864_device, screen_update) SPEAKER(config, "mono").front_center(); - MCFG_CDP1864_ADD(CDP1864_TAG, SCREEN_TAG, XTAL(1'750'000), GND, INPUTLINE(CDP1802_TAG, COSMAC_INPUT_LINE_INT), INPUTLINE(CDP1802_TAG, COSMAC_INPUT_LINE_DMAOUT), INPUTLINE(CDP1802_TAG, COSMAC_INPUT_LINE_EF1), NOOP, VCC, VCC, VCC) + MCFG_CDP1864_ADD(CDP1864_TAG, SCREEN_TAG, XTAL(1'750'000), CONSTANT(0), INPUTLINE(CDP1802_TAG, COSMAC_INPUT_LINE_INT), INPUTLINE(CDP1802_TAG, COSMAC_INPUT_LINE_DMAOUT), INPUTLINE(CDP1802_TAG, COSMAC_INPUT_LINE_EF1), NOOP, CONSTANT(1), CONSTANT(1), CONSTANT(1)) MCFG_CDP1864_CHROMINANCE(RES_K(1.21), RES_INF, RES_INF, 0) // R18 (unconfirmed) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) MACHINE_CONFIG_END diff --git a/src/mame/video/tmc600.cpp b/src/mame/video/tmc600.cpp index 00cf771de67..bfa59a47995 100644 --- a/src/mame/video/tmc600.cpp +++ b/src/mame/video/tmc600.cpp @@ -128,7 +128,7 @@ MACHINE_CONFIG_START(tmc600_state::tmc600_video) MCFG_CDP1869_COLOR_CLOCK(cdp1869_device::COLOR_CLK_PAL) MCFG_CDP1869_CHAR_PCB_READ_OWNER(tmc600_state, tmc600_pcb_r) MCFG_CDP1869_CHAR_RAM_READ_OWNER(tmc600_state, tmc600_char_ram_r) - MCFG_CDP1869_PAL_NTSC_CALLBACK(VCC) + MCFG_CDP1869_PAL_NTSC_CALLBACK(CONSTANT(1)) MCFG_CDP1869_PRD_CALLBACK(WRITELINE(*this, tmc600_state, prd_w)) MCFG_VIDEO_SET_SCREEN(SCREEN_TAG) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) diff --git a/src/mame/video/uv201.h b/src/mame/video/uv201.h index 39311855a2c..26d11435a92 100644 --- a/src/mame/video/uv201.h +++ b/src/mame/video/uv201.h @@ -65,13 +65,13 @@ //************************************************************************** #define MCFG_UV201_EXT_INT_CALLBACK(_write) \ - devcb = &downcast<uv201_device &>(*device).set_ext_int_wr_callback(DEVCB_##_write); + downcast<uv201_device &>(*device).set_ext_int_wr_callback(DEVCB_##_write); #define MCFG_UV201_HBLANK_CALLBACK(_write) \ - devcb = &downcast<uv201_device &>(*device).set_hblank_wr_callback(DEVCB_##_write); + downcast<uv201_device &>(*device).set_hblank_wr_callback(DEVCB_##_write); #define MCFG_UV201_DB_CALLBACK(_read) \ - devcb = &downcast<uv201_device &>(*device).set_db_rd_callback(DEVCB_##_read); + downcast<uv201_device &>(*device).set_db_rd_callback(DEVCB_##_read); diff --git a/src/mame/video/vsystem_gga.h b/src/mame/video/vsystem_gga.h index a15d02a963a..02e633c2b38 100644 --- a/src/mame/video/vsystem_gga.h +++ b/src/mame/video/vsystem_gga.h @@ -51,7 +51,7 @@ //************************************************************************** #define MCFG_VSYSTEM_GGA_REGISTER_WRITE_CB(_devcb) \ - devcb = &downcast<vsystem_gga_device &>(*device).set_write_cb(DEVCB_##_devcb); + downcast<vsystem_gga_device &>(*device).set_write_cb(DEVCB_##_devcb); //************************************************************************** diff --git a/src/mame/video/vtvideo.h b/src/mame/video/vtvideo.h index 9017657cffd..fa91cc64398 100644 --- a/src/mame/video/vtvideo.h +++ b/src/mame/video/vtvideo.h @@ -117,15 +117,15 @@ DECLARE_DEVICE_TYPE(RAINBOW_VIDEO, rainbow_video_device) downcast<vt100_video_device &>(*device).set_chargen_tag(_tag); #define MCFG_VT_VIDEO_RAM_CALLBACK(_read) \ - devcb = &downcast<vt100_video_device &>(*device).set_ram_rd_callback(DEVCB_##_read); + downcast<vt100_video_device &>(*device).set_ram_rd_callback(DEVCB_##_read); #define MCFG_VT_VIDEO_VERT_FREQ_INTR_CALLBACK(_write) \ - devcb = &downcast<vt100_video_device &>(*device).set_vert_freq_intr_wr_callback(DEVCB_##_write); + downcast<vt100_video_device &>(*device).set_vert_freq_intr_wr_callback(DEVCB_##_write); #define MCFG_VT_VIDEO_LBA3_LBA4_CALLBACK(_write) \ - devcb = &downcast<vt100_video_device &>(*device).set_lba3_lba4_wr_callback(DEVCB_##_write); + downcast<vt100_video_device &>(*device).set_lba3_lba4_wr_callback(DEVCB_##_write); #define MCFG_VT_VIDEO_LBA7_CALLBACK(_write) \ - devcb = &downcast<vt100_video_device &>(*device).set_lba7_wr_callback(DEVCB_##_write); + downcast<vt100_video_device &>(*device).set_lba7_wr_callback(DEVCB_##_write); #endif // MAME_VIDEO_VTVIDEO_H diff --git a/src/mame/video/wpc_dmd.h b/src/mame/video/wpc_dmd.h index 312974f4fdd..a6d6f6bfa3f 100644 --- a/src/mame/video/wpc_dmd.h +++ b/src/mame/video/wpc_dmd.h @@ -11,7 +11,7 @@ #include "machine/timer.h" #define MCFG_WPC_DMD_SCANLINE_CALLBACK(_scanline_cb) \ - devcb = &downcast<wpc_dmd_device &>(*device).set_scanline_cb(DEVCB_##_scanline_cb); + downcast<wpc_dmd_device &>(*device).set_scanline_cb(DEVCB_##_scanline_cb); class wpc_dmd_device : public device_t { diff --git a/src/mame/video/ygv608.h b/src/mame/video/ygv608.h index c2c9e82ed3a..ae054a0ac6b 100644 --- a/src/mame/video/ygv608.h +++ b/src/mame/video/ygv608.h @@ -315,10 +315,10 @@ DECLARE_DEVICE_TYPE(YGV608, ygv608_device) //************************************************************************** #define MCFG_YGV608_VBLANK_HANDLER( _intcallb ) \ - devcb = &downcast<ygv608_device &>(*device).set_vblank_callback(DEVCB_##_intcallb); + downcast<ygv608_device &>(*device).set_vblank_callback(DEVCB_##_intcallb); #define MCFG_YGV608_RASTER_HANDLER( _intcallb ) \ - devcb = &downcast<ygv608_device &>(*device).set_raster_callback(DEVCB_##_intcallb); + downcast<ygv608_device &>(*device).set_raster_callback(DEVCB_##_intcallb); #endif diff --git a/src/mame/video/zx8301.h b/src/mame/video/zx8301.h index 4c92403a519..1d3b64f22d8 100644 --- a/src/mame/video/zx8301.h +++ b/src/mame/video/zx8301.h @@ -42,7 +42,7 @@ ///************************************************************************* #define MCFG_ZX8301_VSYNC_CALLBACK(_write) \ - devcb = &downcast<zx8301_device &>(*device).set_vsync_wr_callback(DEVCB_##_write); + downcast<zx8301_device &>(*device).set_vsync_wr_callback(DEVCB_##_write); |