i8257: don't clear drq on tc (nw)

pc8001: use DRQ callback (nw)
This commit is contained in:
cracyc 2018-02-10 17:20:03 -06:00
parent d0b1d79a95
commit 3fef1ce829
5 changed files with 10 additions and 9 deletions

View File

@ -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)

View File

@ -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
{

View File

@ -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

View File

@ -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 */

View File

@ -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")