mirror of
https://github.com/holub/mame
synced 2025-04-26 18:23:08 +03:00
(MESS) upd7220: fixed RDAT command when data to read are larger than the FIFO, this fixes dmv and a5105 text scrolling. (nw)
This commit is contained in:
parent
595e77a5af
commit
879b643e41
@ -506,7 +506,7 @@ inline void upd7220_device::read_vram(UINT8 type, UINT8 mod)
|
|||||||
if (mod)
|
if (mod)
|
||||||
LOG (("uPD7220 RDAT used with mod = %02x?\n",mod));
|
LOG (("uPD7220 RDAT used with mod = %02x?\n",mod));
|
||||||
|
|
||||||
for (int i = 0; i < m_figs.m_dc; i++)
|
while (m_figs.m_dc && m_fifo_ptr < (type ? 15 : 14))
|
||||||
{
|
{
|
||||||
switch(type)
|
switch(type)
|
||||||
{
|
{
|
||||||
@ -522,8 +522,12 @@ inline void upd7220_device::read_vram(UINT8 type, UINT8 mod)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
m_figs.m_dc--;
|
||||||
advance_ead();
|
advance_ead();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (m_figs.m_dc == 0)
|
||||||
|
reset_figs_param();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -1371,7 +1375,6 @@ void upd7220_device::process_fifo()
|
|||||||
fifo_set_direction(FIFO_READ);
|
fifo_set_direction(FIFO_READ);
|
||||||
|
|
||||||
read_vram((m_cr & 0x18) >> 3,m_cr & 3);
|
read_vram((m_cr & 0x18) >> 3,m_cr & 3);
|
||||||
reset_figs_param();
|
|
||||||
|
|
||||||
m_sr |= UPD7220_SR_DATA_READY;
|
m_sr |= UPD7220_SR_DATA_READY;
|
||||||
break;
|
break;
|
||||||
@ -1410,6 +1413,21 @@ void upd7220_device::process_fifo()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//-------------------------------------------------
|
||||||
|
// continue command
|
||||||
|
//-------------------------------------------------
|
||||||
|
|
||||||
|
void upd7220_device::continue_command()
|
||||||
|
{
|
||||||
|
// continue RDAT command when data to read are larger than the FIFO (a5105 and dmv text scrolling)
|
||||||
|
if (m_figs.m_dc && translate_command(m_cr) == COMMAND_RDAT)
|
||||||
|
{
|
||||||
|
read_vram((m_cr & 0x18) >> 3, m_cr & 3);
|
||||||
|
m_sr |= UPD7220_SR_DATA_READY;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
//-------------------------------------------------
|
//-------------------------------------------------
|
||||||
// read -
|
// read -
|
||||||
//-------------------------------------------------
|
//-------------------------------------------------
|
||||||
@ -1424,6 +1442,8 @@ READ8_MEMBER( upd7220_device::read )
|
|||||||
int flag;
|
int flag;
|
||||||
fifo_set_direction(FIFO_READ);
|
fifo_set_direction(FIFO_READ);
|
||||||
dequeue(&data, &flag);
|
dequeue(&data, &flag);
|
||||||
|
|
||||||
|
continue_command();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -149,6 +149,7 @@ private:
|
|||||||
void draw_char(int x, int y);
|
void draw_char(int x, int y);
|
||||||
int translate_command(UINT8 data);
|
int translate_command(UINT8 data);
|
||||||
void process_fifo();
|
void process_fifo();
|
||||||
|
void continue_command();
|
||||||
void update_text(bitmap_rgb32 &bitmap, const rectangle &cliprect);
|
void update_text(bitmap_rgb32 &bitmap, const rectangle &cliprect);
|
||||||
void draw_graphics_line(bitmap_rgb32 &bitmap, UINT32 addr, int y, int wd);
|
void draw_graphics_line(bitmap_rgb32 &bitmap, UINT32 addr, int y, int wd);
|
||||||
void update_graphics(bitmap_rgb32 &bitmap, const rectangle &cliprect, int force_bitmap);
|
void update_graphics(bitmap_rgb32 &bitmap, const rectangle &cliprect, int force_bitmap);
|
||||||
|
Loading…
Reference in New Issue
Block a user