Previous 199869 Revisions Next

r31770 Monday 25th August, 2014 at 18:21:17 UTC by Sandro Ronco
(MESS) upd7220: fixed RDAT command when data to read are larger than the FIFO, this fixes dmv and a5105 text scrolling. (nw)
[src/emu/video]upd7220.c upd7220.h

trunk/src/emu/video/upd7220.c
r31769r31770
506506   if (mod)
507507      LOG (("uPD7220 RDAT used with mod = %02x?\n",mod));
508508
509   for (int i = 0; i < m_figs.m_dc; i++)
509   while (m_figs.m_dc && m_fifo_ptr < (type ? 15 : 14))
510510   {
511511      switch(type)
512512      {
r31769r31770
522522            break;
523523      }
524524
525      m_figs.m_dc--;
525526      advance_ead();
526527   }
528
529   if (m_figs.m_dc == 0)
530      reset_figs_param();
527531}
528532
529533
r31769r31770
13711375      fifo_set_direction(FIFO_READ);
13721376
13731377      read_vram((m_cr & 0x18) >> 3,m_cr & 3);
1374      reset_figs_param();
13751378
13761379      m_sr |= UPD7220_SR_DATA_READY;
13771380      break;
r31769r31770
14111414
14121415
14131416//-------------------------------------------------
1417//  continue command
1418//-------------------------------------------------
1419
1420void upd7220_device::continue_command()
1421{
1422   // continue RDAT command when data to read are larger than the FIFO (a5105 and dmv text scrolling)
1423   if (m_figs.m_dc && translate_command(m_cr) == COMMAND_RDAT)
1424   {
1425      read_vram((m_cr & 0x18) >> 3, m_cr & 3);
1426      m_sr |= UPD7220_SR_DATA_READY;
1427   }
1428}
1429
1430
1431//-------------------------------------------------
14141432//  read -
14151433//-------------------------------------------------
14161434
r31769r31770
14241442      int flag;
14251443      fifo_set_direction(FIFO_READ);
14261444      dequeue(&data, &flag);
1445
1446      continue_command();
14271447   }
14281448   else
14291449   {
trunk/src/emu/video/upd7220.h
r31769r31770
149149   void draw_char(int x, int y);
150150   int translate_command(UINT8 data);
151151   void process_fifo();
152   void continue_command();
152153   void update_text(bitmap_rgb32 &bitmap, const rectangle &cliprect);
153154   void draw_graphics_line(bitmap_rgb32 &bitmap, UINT32 addr, int y, int wd);
154155   void update_graphics(bitmap_rgb32 &bitmap, const rectangle &cliprect, int force_bitmap);

Previous 199869 Revisions Next


© 1997-2024 The MAME Team