diff options
Diffstat (limited to 'src/devices/video/catseye.cpp')
-rw-r--r-- | src/devices/video/catseye.cpp | 61 |
1 files changed, 49 insertions, 12 deletions
diff --git a/src/devices/video/catseye.cpp b/src/devices/video/catseye.cpp index 0423b88fb8f..11ca2677475 100644 --- a/src/devices/video/catseye.cpp +++ b/src/devices/video/catseye.cpp @@ -14,10 +14,49 @@ DEFINE_DEVICE_TYPE(CATSEYE, catseye_device, "catseye", "HP Catseye ASIC") catseye_device::catseye_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : - device_t(mconfig, type, tag, owner, clock), - m_vram(*this, { "^vram_video", "^vram_overlay"}), - m_int_write_func(*this), - m_blink_timer(nullptr) + device_t{mconfig, type, tag, owner, clock}, + m_vram{*this, { "^vram_video", "^vram_overlay"}}, + m_int_write_func{*this}, + m_blink_timer{nullptr}, + m_changed{false}, + m_blink_state{false}, + m_plane_mask_l{0}, + m_plane_mask_h{0}, + m_write_enable{0}, + m_read_enable{0}, + m_fb_enable{0}, + m_display_enable{0}, + m_blink_enable{0}, + m_in_vblank{0}, + m_wm_int_pending{0}, + m_vblank_int_pending{0}, + m_wm_int_enable{0}, + m_vblank_int_enable{0}, + m_rugsc{0}, + m_misc{0}, + m_wmx{0}, + m_wmwidth{0}, + m_wmheight{0}, + m_wmsourcex{0}, + m_wmsourcey{0}, + m_wmdestx{0}, + m_wmdesty{0}, + m_wmclipleft{0}, + m_wmclipright{0}, + m_wmcliptop{0}, + m_wmclipbottom{0}, + m_patterns{{{0}}}, + m_linepath{0}, + m_linetype{0}, + m_prr{0}, + m_wrr{0}, + m_trr{0}, + m_trrctl{0}, + m_color{0}, + m_vb{0}, + m_acntrl{0}, + m_planemode{0}, + m_status{0} { } @@ -29,9 +68,7 @@ catseye_device::catseye_device(const machine_config &mconfig, const char *tag, d void catseye_device::device_start() { - m_int_write_func.resolve_safe(); - - m_blink_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(catseye_device::blink_callback), this)); + m_blink_timer = timer_alloc(FUNC(catseye_device::blink_callback), this); m_blink_timer->adjust(attotime::from_hz(3)); save_item(NAME(m_changed)); @@ -433,7 +470,7 @@ u16 catseye_device::vram_r(offs_t offset, u16 mem_mask) return vram_r_word<Idx>(offset, mem_mask); } -READ16_MEMBER(catseye_device::vram_r) +uint16_t catseye_device::vram_r(offs_t offset, uint16_t mem_mask) { uint16_t ret = 0; @@ -491,7 +528,7 @@ void catseye_device::vram_w(offs_t offset, u16 data, u16 mem_mask) vram_w_word<Idx>(offset, data, mem_mask); } -WRITE16_MEMBER(catseye_device::vram_w) +void catseye_device::vram_w(offs_t offset, u16 data, u16 mem_mask) { LOGMASKED(LOG_VRAM, "%s: %04x: %04x(%04x)\n", __func__, offset << 1, data, mem_mask); @@ -502,7 +539,7 @@ WRITE16_MEMBER(catseye_device::vram_w) vram_w<VRAM_OVERLAY_PLANE>(offset, data, mem_mask); } -WRITE16_MEMBER(catseye_device::ctrl_w) +void catseye_device::ctrl_w(offs_t offset, u16 data, u16 mem_mask) { bool trigger = false; @@ -863,7 +900,7 @@ WRITE16_MEMBER(catseye_device::ctrl_w) } -READ16_MEMBER(catseye_device::ctrl_r) +uint16_t catseye_device::ctrl_r(address_space &space, offs_t offset, uint16_t mem_mask) { uint16_t ret; @@ -1220,7 +1257,7 @@ READ16_MEMBER(catseye_device::ctrl_r) return ret; } -WRITE_LINE_MEMBER(catseye_device::vblank_w) +void catseye_device::vblank_w(int state) { m_in_vblank = state ? m_plane_mask_h : 0; if (state && m_vblank_int_enable) |