diff options
Diffstat (limited to 'src/devices/bus/interpro/sr/gt.cpp')
-rw-r--r-- | src/devices/bus/interpro/sr/gt.cpp | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/src/devices/bus/interpro/sr/gt.cpp b/src/devices/bus/interpro/sr/gt.cpp index 650e1463cfe..bae9a72f739 100644 --- a/src/devices/bus/interpro/sr/gt.cpp +++ b/src/devices/bus/interpro/sr/gt.cpp @@ -113,7 +113,6 @@ #include "bus/interpro/keyboard/keyboard.h" #include "bus/interpro/mouse/mouse.h" -#define LOG_GENERAL (1U << 0) #define LOG_LINE (1U << 1) #define LOG_BLIT (1U << 2) @@ -506,6 +505,7 @@ gt_device_base::gt_device_base(const machine_config &mconfig, device_type type, , m_vram(*this, "vram%u", 0) , m_mram(*this, "mram%u", 0) , m_bpu(*this, "bpu%u", 0) + , m_control(0) , m_double_buffered(double_buffered) , m_masked_reads(masked_reads) { @@ -615,12 +615,12 @@ void gt_device_base::device_start() save_item(NAME(m_control)); // allocate timers - m_blit_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(gt_device_base::blit), this)); - m_line_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(gt_device_base::line), this)); - m_done_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(gt_device_base::done), this)); + m_blit_timer = timer_alloc(FUNC(gt_device_base::blit), this); + m_line_timer = timer_alloc(FUNC(gt_device_base::line), this); + m_done_timer = timer_alloc(FUNC(gt_device_base::done), this); } -WRITE32_MEMBER(gt_device_base::control_w) +void gt_device_base::control_w(offs_t offset, u32 data, u32 mem_mask) { if (data & GFX_BSGA_RST) { @@ -680,13 +680,13 @@ void gt_device_base::bsga_clip_status(s16 x, s16 y) LOG("bsga_clip_status result 0x%04x\n", m_bsga_status); } -WRITE32_MEMBER(gt_device_base::ri_xfer_w) +void gt_device_base::ri_xfer_w(offs_t offset, u32 data, u32 mem_mask) { LOG("ri_xfer_w 0x%08x mem_mask 0x%08x (%s)\n", data, mem_mask, machine().describe_context()); // initiate ri line draw u32 address = m_ri_initial_address; - u32 error = m_ri_initial_error; + s32 error = m_ri_initial_error; for (int i = 0; i < m_ri_stop_count; i++) { @@ -706,7 +706,7 @@ WRITE32_MEMBER(gt_device_base::ri_xfer_w) } } -WRITE32_MEMBER(gt_device_base::bsga_xin1yin1_w) +void gt_device_base::bsga_xin1yin1_w(offs_t offset, u32 data, u32 mem_mask) { m_bsga_xin1 = (m_bsga_xin1 & ~(mem_mask >> 0)) | ((data & mem_mask) >> 0); m_bsga_yin1 = (m_bsga_yin1 & ~(mem_mask >> 16)) | ((data & mem_mask) >> 16); @@ -725,7 +725,7 @@ WRITE32_MEMBER(gt_device_base::bsga_xin1yin1_w) m_bsga_tmp = m_bsga_xin1; } -WRITE32_MEMBER(gt_device_base::bsga_xin2yin2_w) +void gt_device_base::bsga_xin2yin2_w(offs_t offset, u32 data, u32 mem_mask) { m_bsga_xin2 = (m_bsga_xin2 & ~(mem_mask >> 0)) | ((data & mem_mask) >> 0); m_bsga_yin2 = (m_bsga_yin2 & ~(mem_mask >> 16)) | ((data & mem_mask) >> 16); @@ -742,7 +742,7 @@ WRITE32_MEMBER(gt_device_base::bsga_xin2yin2_w) m_line_timer->adjust(attotime::zero); } -WRITE16_MEMBER(gt_device_base::bsga_yin2_w) +void gt_device_base::bsga_yin2_w(offs_t offset, u16 data, u16 mem_mask) { COMBINE_DATA(&m_bsga_yin2); @@ -756,14 +756,14 @@ WRITE16_MEMBER(gt_device_base::bsga_yin2_w) m_line_timer->adjust(attotime::zero); } -READ16_MEMBER(gt_device_base::bsga_status_r) +u16 gt_device_base::bsga_status_r() { LOG("bsga_status_r 0x%04x (%s)\n", m_bsga_status, machine().describe_context()); return m_bsga_status; } -WRITE32_MEMBER(gt_device_base::bsga_float_w) +void gt_device_base::bsga_float_w(offs_t offset, u32 data) { // TODO: when we figure out exactly what this is supposed to do, convert it // to use softfloat instead. @@ -811,7 +811,7 @@ WRITE32_MEMBER(gt_device_base::bsga_float_w) LOG("bsga_float_w result 0x%04x overflow %s\n", m_bsga_xin, m_bsga_status & STATUS_FLOAT_OFLOW ? "set" : "clear"); } -WRITE16_MEMBER(gt_device_base::blit_width_w) +void gt_device_base::blit_width_w(offs_t offset, u16 data, u16 mem_mask) { // writing to blit width starts blit operation LOG("blit_width_w 0x%04x (%s)\n", data, machine().describe_context()); @@ -959,7 +959,7 @@ TIMER_CALLBACK_MEMBER(gt_device_base::done) m_control &= ~u32(param); } -WRITE8_MEMBER(gt_device_base::plane_enable_w) +void gt_device_base::plane_enable_w(u8 data) { if (m_control & GFX_GRPHCS_BUSY) return; @@ -970,7 +970,7 @@ WRITE8_MEMBER(gt_device_base::plane_enable_w) m_plane_enable = (data << 24) | (data << 16) | (data << 8) | (data << 0); } -WRITE8_MEMBER(gt_device_base::plane_data_w) +void gt_device_base::plane_data_w(u8 data) { if (m_control & GFX_GRPHCS_BUSY) return; @@ -1372,7 +1372,7 @@ void gt_device_base::bresenham_line(s16 major, s16 minor, s16 major_step, s16 mi LOG("bresenham_line end %d,%d\n", shallow ? major : minor, shallow ? minor : major); } -WRITE8_MEMBER(gt_device_base::contrast_dac_w) +void gt_device_base::contrast_dac_w(u8 data) { m_ramdac[0]->set_contrast(data); @@ -1383,14 +1383,14 @@ WRITE8_MEMBER(gt_device_base::contrast_dac_w) /* * GTDB support (SRX, SCC and mouse). */ -WRITE32_MEMBER(gtdb_device::srx_mapping_w) +void gtdb_device::srx_mapping_w(u32 data) { const offs_t srx_base = data << 24; m_bus->install_map(*this, srx_base, srx_base | 0xffffff, >db_device::map_dynamic); } -WRITE_LINE_MEMBER(gtdb_device::serial_irq) +void gtdb_device::serial_irq(int state) { if (state) m_mouse_int |= SERIAL; @@ -1400,7 +1400,7 @@ WRITE_LINE_MEMBER(gtdb_device::serial_irq) irq0(state); } -WRITE32_MEMBER(gtdb_device::mouse_status_w) +void gtdb_device::mouse_status_w(offs_t offset, u32 data, u32 mem_mask) { if (mem_mask & interpro_mouse_device::state_mask::MOUSE_XPOS) { @@ -1428,7 +1428,7 @@ WRITE32_MEMBER(gtdb_device::mouse_status_w) irq0(CLEAR_LINE); } -READ32_MEMBER(gtdb_device::mouse_x_r) +u32 gtdb_device::mouse_x_r() { const u32 result = m_mouse_x; @@ -1437,7 +1437,7 @@ READ32_MEMBER(gtdb_device::mouse_x_r) return result; } -READ32_MEMBER(gtdb_device::mouse_y_r) +u32 gtdb_device::mouse_y_r() { const u32 result = m_mouse_y; @@ -1570,7 +1570,7 @@ u32 gtdb_device::vram_r(offs_t offset, const bool linear) const return gt_device_base::vram_r(offset, linear); } -void gtdb_device::vram_w(const offs_t offset, const u32 data, const u32 mem_mask, const bool linear) const +void gtdb_device::vram_w(offs_t offset, const u32 data, u32 mem_mask, const bool linear) const { if (m_control & GFX_HILITE_SEL) { |