summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author cracyc <cracyc@users.noreply.github.com>2018-02-10 17:20:03 -0600
committer cracyc <cracyc@users.noreply.github.com>2018-02-10 21:08:54 -0600
commit3fef1ce829eb5306d24ed30c33c743febcd4ff8e (patch)
tree51459cf4a987c9f0c229401102790322214e0045
parentd0b1d79a95c0e419c7c7572d45a1b8f962d8b653 (diff)
i8257: don't clear drq on tc (nw)
pc8001: use DRQ callback (nw)
-rw-r--r--src/devices/machine/i8257.cpp1
-rw-r--r--src/devices/video/upd3301.cpp12
-rw-r--r--src/devices/video/upd3301.h2
-rw-r--r--src/mame/drivers/olyboss.cpp2
-rw-r--r--src/mame/drivers/pc8001.cpp2
5 files changed, 10 insertions, 9 deletions
diff --git a/src/devices/machine/i8257.cpp b/src/devices/machine/i8257.cpp
index e624a918648..91dd8829a1b 100644
--- a/src/devices/machine/i8257.cpp
+++ b/src/devices/machine/i8257.cpp
@@ -248,7 +248,6 @@ inline void i8257_device::advance()
if(tc)
{
m_status |= 1 << m_current_channel;
- m_request &= ~(1 << m_current_channel); // docs imply this isn't right but pc-8001 works better with it
set_tc(1);
if(al)
diff --git a/src/devices/video/upd3301.cpp b/src/devices/video/upd3301.cpp
index 0117c9e4977..ee6b7140661 100644
--- a/src/devices/video/upd3301.cpp
+++ b/src/devices/video/upd3301.cpp
@@ -113,6 +113,7 @@ upd3301_device::upd3301_device(const machine_config &mconfig, const char *tag, d
void upd3301_device::device_start()
{
+ screen().register_screen_bitmap(m_bitmap);
// resolve callbacks
m_display_cb.bind_relative_to(*owner());
m_write_drq.resolve_safe();
@@ -157,6 +158,8 @@ void upd3301_device::device_start()
save_item(NAME(m_cy));
save_item(NAME(m_cursor_blink));
save_item(NAME(m_cursor_frame));
+ save_item(NAME(m_data_fifo));
+ save_item(NAME(m_attr_fifo));
}
@@ -211,6 +214,8 @@ void upd3301_device::device_timer(emu_timer &timer, device_timer_id id, int para
m_status |= STATUS_E;
set_interrupt(1);
}
+ else if(!param)
+ set_drq(1);
update_vrtc_timer(param);
break;
@@ -474,7 +479,7 @@ void upd3301_device::draw_scanline()
int csr = m_cm && m_cursor_blink && ((y / m_r) == m_cy) && (sx == m_cx);
int gpa = 0; // TODO
- m_display_cb(*m_bitmap, y, sx, cc, lc, hlgt, rvv, vsp, sl0, sl12, csr, gpa);
+ m_display_cb(m_bitmap, y, sx, cc, lc, hlgt, rvv, vsp, sl0, sl12, csr, gpa);
}
}
@@ -488,7 +493,6 @@ void upd3301_device::draw_scanline()
uint32_t upd3301_device::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
{
- m_bitmap = &bitmap;
if (m_status & STATUS_VE)
{
m_y = 0;
@@ -510,9 +514,7 @@ uint32_t upd3301_device::screen_update(screen_device &screen, bitmap_rgb32 &bitm
m_attr_frame = 0;
m_attr_blink = !m_attr_blink;
}
-
- // start DMA transfer
- set_drq(1);
+ copybitmap(bitmap, m_bitmap, 0, 0, 0, 0, cliprect);
}
else
{
diff --git a/src/devices/video/upd3301.h b/src/devices/video/upd3301.h
index 3ae9b31db7f..281bcf37aab 100644
--- a/src/devices/video/upd3301.h
+++ b/src/devices/video/upd3301.h
@@ -130,7 +130,7 @@ private:
int m_width;
// screen drawing
- bitmap_rgb32 *m_bitmap; // bitmap
+ bitmap_rgb32 m_bitmap; // bitmap
int m_y; // current scanline
int m_hrtc; // horizontal retrace
int m_vrtc; // vertical retrace
diff --git a/src/mame/drivers/olyboss.cpp b/src/mame/drivers/olyboss.cpp
index 396c9f08e51..bcaea7d6ce8 100644
--- a/src/mame/drivers/olyboss.cpp
+++ b/src/mame/drivers/olyboss.cpp
@@ -313,7 +313,7 @@ MACHINE_CONFIG_START( olyboss_state::olybossd )
MCFG_UPD3301_CHARACTER_WIDTH(8)
MCFG_UPD3301_DRAW_CHARACTER_CALLBACK_OWNER(olyboss_state, olyboss_display_pixels)
MCFG_UPD3301_DRQ_CALLBACK(DEVWRITELINE(I8257_TAG, i8257_device, dreq2_w))
- MCFG_UPD3301_INT_CALLBACK(DEVWRITELINE("uic", am9519_device, ireq0_w))
+ MCFG_UPD3301_INT_CALLBACK(DEVWRITELINE("uic", am9519_device, ireq0_w)) MCFG_DEVCB_INVERT
MCFG_VIDEO_SET_SCREEN(SCREEN_TAG)
/* keyboard */
diff --git a/src/mame/drivers/pc8001.cpp b/src/mame/drivers/pc8001.cpp
index a184fe6cfba..67b0ae46451 100644
--- a/src/mame/drivers/pc8001.cpp
+++ b/src/mame/drivers/pc8001.cpp
@@ -509,7 +509,7 @@ MACHINE_CONFIG_START(pc8001_state::pc8001)
MCFG_DEVICE_ADD(UPD3301_TAG, UPD3301, XTAL(14'318'181))
MCFG_UPD3301_CHARACTER_WIDTH(8)
MCFG_UPD3301_DRAW_CHARACTER_CALLBACK_OWNER(pc8001_state, pc8001_display_pixels)
- MCFG_UPD3301_VRTC_CALLBACK(DEVWRITELINE(I8257_TAG, i8257_device, dreq2_w))
+ MCFG_UPD3301_DRQ_CALLBACK(DEVWRITELINE(I8257_TAG, i8257_device, dreq2_w))
MCFG_VIDEO_SET_SCREEN(SCREEN_TAG)
MCFG_CENTRONICS_ADD(CENTRONICS_TAG, centronics_devices, "printer")