mirror of
https://github.com/holub/mame
synced 2025-06-03 19:36:26 +03:00
amstrad: added Plus left border shift function
This commit is contained in:
parent
1d0a763128
commit
27ad714680
@ -101,6 +101,8 @@ struct asic_t
|
||||
UINT8 horiz_disp;
|
||||
UINT8 hscroll;
|
||||
UINT8 de_start; /* flag to check if DE is been enabled this frame yet */
|
||||
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 */
|
||||
UINT8 hsync_tick_count;
|
||||
|
||||
/* DMA */
|
||||
UINT8 dma_status;
|
||||
|
@ -709,9 +709,13 @@ void amstrad_state::amstrad_plus_gate_array_get_video_data()
|
||||
{
|
||||
ma += m_asic.horiz_disp;
|
||||
}
|
||||
|
||||
m_gate_array.address = ( ( ma & 0x3000 ) << 2 ) | ( ( ra & 0x07 ) << 11 ) | ( ( ma & 0x3ff ) << 1 );
|
||||
m_gate_array.data = m_ram->pointer()[ m_gate_array.address ];
|
||||
caddr = 0x2400 + m_gate_array.mode_lookup[m_gate_array.data] * 2;
|
||||
if((m_asic.ram[0x2804] & 0x80) && m_asic.hsync_first_tick)
|
||||
caddr = 0x2420;
|
||||
else
|
||||
caddr = 0x2400 + m_gate_array.mode_lookup[m_gate_array.data] * 2;
|
||||
m_gate_array.colour = m_asic.ram[caddr] + ( m_asic.ram[caddr+1] << 8 );
|
||||
m_gate_array.colour_ticks = m_gate_array.max_colour_ticks;
|
||||
m_gate_array.ticks = 0;
|
||||
@ -750,7 +754,10 @@ void amstrad_state::amstrad_plus_update_video()
|
||||
UINT16 caddr;
|
||||
|
||||
m_gate_array.data <<= 1;
|
||||
caddr = 0x2400 + m_gate_array.mode_lookup[m_gate_array.data] * 2;
|
||||
if((m_asic.ram[0x2804] & 0x80) && m_asic.hsync_first_tick)
|
||||
caddr = 0x2420;
|
||||
else
|
||||
caddr = 0x2400 + m_gate_array.mode_lookup[m_gate_array.data] * 2;
|
||||
m_gate_array.colour = m_asic.ram[caddr] + ( m_asic.ram[caddr+1] << 8 );
|
||||
m_gate_array.colour_ticks = m_gate_array.max_colour_ticks;
|
||||
}
|
||||
@ -762,7 +769,10 @@ void amstrad_state::amstrad_plus_update_video()
|
||||
UINT16 caddr;
|
||||
|
||||
m_gate_array.data = m_ram->pointer()[ m_gate_array.address + 1 ];
|
||||
caddr = 0x2400 + m_gate_array.mode_lookup[m_gate_array.data] * 2;
|
||||
if((m_asic.ram[0x2804] & 0x80) && m_asic.hsync_first_tick)
|
||||
caddr = 0x2420;
|
||||
else
|
||||
caddr = 0x2400 + m_gate_array.mode_lookup[m_gate_array.data] * 2;
|
||||
m_gate_array.colour = m_asic.ram[caddr] + ( m_asic.ram[caddr+1] << 8 );
|
||||
}
|
||||
break;
|
||||
@ -776,6 +786,9 @@ void amstrad_state::amstrad_plus_update_video()
|
||||
m_gate_array.draw_p++;
|
||||
cycles_passed--;
|
||||
m_gate_array.line_ticks++;
|
||||
m_asic.hsync_tick_count++;
|
||||
if(m_asic.hsync_tick_count > 16)
|
||||
m_asic.hsync_first_tick = false;
|
||||
if ( m_gate_array.line_ticks >= m_gate_array.bitmap->width() )
|
||||
{
|
||||
m_gate_array.draw_p = NULL;
|
||||
@ -1031,6 +1044,8 @@ WRITE_LINE_MEMBER(amstrad_state::amstrad_plus_de_changed)
|
||||
m_gate_array.ma = m_crtc->get_ma();
|
||||
m_gate_array.ra = m_crtc->get_ra();
|
||||
|
||||
m_asic.hsync_first_tick = true;
|
||||
m_asic.hsync_tick_count = 0;
|
||||
m_asic.h_start = m_gate_array.line_ticks;
|
||||
if(m_asic.de_start == 0)
|
||||
m_asic.vpos = 0;
|
||||
@ -1039,8 +1054,6 @@ WRITE_LINE_MEMBER(amstrad_state::amstrad_plus_de_changed)
|
||||
m_asic.hscroll = m_asic.ram[0x2804] & 0x0f;
|
||||
if ( m_asic.hscroll == 0 )
|
||||
amstrad_plus_gate_array_get_video_data();
|
||||
// if( m_asic.ram[0x2804] & 0x80 ) // draw border for first character if set (hides graphic mess when using softscroll)
|
||||
// *m_gate_array.draw_p = m_asic.ram[0x2420] + ( m_asic.ram[0x2421] << 8 );
|
||||
|
||||
/* Start of screen */
|
||||
if ( m_asic.vpos == 0 )
|
||||
|
Loading…
Reference in New Issue
Block a user