Previous 199869 Revisions Next

r41821 Sunday 22nd November, 2015 at 08:00:07 UTC by Barry Rodewald
amstrad: added Plus left border shift function
[src/mame/includes]amstrad.h
[src/mame/machine]amstrad.cpp

trunk/src/mame/includes/amstrad.h
r250332r250333
101101   UINT8   horiz_disp;
102102   UINT8   hscroll;
103103   UINT8   de_start;           /* flag to check if DE is been enabled this frame yet */
104   bool    hsync_first_tick;   /* flag to check in first CRTC tick, used for knowing when to cover left side of screen to cover horizontal softscroll mess */
105   UINT8   hsync_tick_count;
104106
105107   /* DMA */
106108   UINT8   dma_status;
trunk/src/mame/machine/amstrad.cpp
r250332r250333
709709   {
710710      ma += m_asic.horiz_disp;
711711   }
712   
712713   m_gate_array.address = ( ( ma & 0x3000 ) << 2 ) | ( ( ra & 0x07 ) << 11 ) | ( ( ma & 0x3ff ) << 1 );
713714   m_gate_array.data = m_ram->pointer()[ m_gate_array.address ];
714   caddr = 0x2400 + m_gate_array.mode_lookup[m_gate_array.data] * 2;
715   if((m_asic.ram[0x2804] & 0x80) && m_asic.hsync_first_tick)
716      caddr = 0x2420;
717   else
718      caddr = 0x2400 + m_gate_array.mode_lookup[m_gate_array.data] * 2;
715719   m_gate_array.colour = m_asic.ram[caddr] + ( m_asic.ram[caddr+1] << 8 );
716720   m_gate_array.colour_ticks = m_gate_array.max_colour_ticks;
717721   m_gate_array.ticks = 0;
r250332r250333
750754                  UINT16 caddr;
751755
752756                  m_gate_array.data <<= 1;
753                  caddr = 0x2400 + m_gate_array.mode_lookup[m_gate_array.data] * 2;
757                  if((m_asic.ram[0x2804] & 0x80) && m_asic.hsync_first_tick)
758                     caddr = 0x2420;
759                  else
760                     caddr = 0x2400 + m_gate_array.mode_lookup[m_gate_array.data] * 2;
754761                  m_gate_array.colour = m_asic.ram[caddr] + ( m_asic.ram[caddr+1] << 8 );
755762                  m_gate_array.colour_ticks = m_gate_array.max_colour_ticks;
756763               }
r250332r250333
762769                     UINT16 caddr;
763770
764771                     m_gate_array.data = m_ram->pointer()[ m_gate_array.address + 1 ];
765                     caddr = 0x2400 + m_gate_array.mode_lookup[m_gate_array.data] * 2;
772                     if((m_asic.ram[0x2804] & 0x80) && m_asic.hsync_first_tick)
773                        caddr = 0x2420;
774                     else
775                        caddr = 0x2400 + m_gate_array.mode_lookup[m_gate_array.data] * 2;
766776                     m_gate_array.colour = m_asic.ram[caddr] + ( m_asic.ram[caddr+1] << 8 );
767777                  }
768778                  break;
r250332r250333
776786         m_gate_array.draw_p++;
777787         cycles_passed--;
778788         m_gate_array.line_ticks++;
789         m_asic.hsync_tick_count++;
790         if(m_asic.hsync_tick_count > 16)
791            m_asic.hsync_first_tick = false;
779792         if ( m_gate_array.line_ticks >= m_gate_array.bitmap->width() )
780793         {
781794            m_gate_array.draw_p = NULL;
r250332r250333
10311044      m_gate_array.ma = m_crtc->get_ma();
10321045      m_gate_array.ra = m_crtc->get_ra();
10331046
1047      m_asic.hsync_first_tick = true;
1048      m_asic.hsync_tick_count = 0;
10341049      m_asic.h_start = m_gate_array.line_ticks;
10351050      if(m_asic.de_start == 0)
10361051         m_asic.vpos = 0;
r250332r250333
10391054      m_asic.hscroll = m_asic.ram[0x2804] & 0x0f;
10401055      if ( m_asic.hscroll == 0 )
10411056         amstrad_plus_gate_array_get_video_data();
1042//      if( m_asic.ram[0x2804] & 0x80 )  // draw border for first character if set (hides graphic mess when using softscroll)
1043//         *m_gate_array.draw_p = m_asic.ram[0x2420] + ( m_asic.ram[0x2421] << 8 );
10441057
10451058      /* Start of screen */
10461059      if ( m_asic.vpos == 0 )


Previous 199869 Revisions Next


© 1997-2024 The MAME Team