(MESS) g7400: Better placement of ef934x graphics. Fixed X and Y overflows in the EF9340/1. (nw)

This commit is contained in:
Wilbert Pol 2013-01-18 19:16:50 +00:00
parent 96c4ec5cb2
commit e606fe6131
3 changed files with 11 additions and 4 deletions

View File

@ -100,9 +100,13 @@ UINT16 ef9340_1_device::ef9340_get_c_addr(UINT8 x, UINT8 y)
void ef9340_1_device::ef9340_inc_c() void ef9340_1_device::ef9340_inc_c()
{ {
m_ef9340.X++; m_ef9340.X++;
if ( m_ef9340.X >= 40 ) if ( m_ef9340.X == 40 || m_ef9340.X == 48 || m_ef9340.X == 56 || m_ef9340.X == 64 )
{ {
m_ef9340.Y = ( m_ef9340.Y + 1 ) % 24; m_ef9340.Y = ( m_ef9340.Y + 1 ) & 0x1f;
if ( m_ef9340.Y == 24 )
{
m_ef9340.Y = 0;
}
m_ef9340.X = 0; m_ef9340.X = 0;
} }
} }

View File

@ -105,6 +105,7 @@ public:
// Global constants // Global constants
static const int START_ACTIVE_SCAN = 42; static const int START_ACTIVE_SCAN = 42;
static const int BORDER_SIZE = 10;
static const int END_ACTIVE_SCAN = 42 + 10 + 320 + 10; static const int END_ACTIVE_SCAN = 42 + 10 + 320 + 10;
static const int START_Y = 1; static const int START_Y = 1;
static const int SCREEN_HEIGHT = 243; static const int SCREEN_HEIGHT = 243;

View File

@ -441,14 +441,16 @@ WRITE16_MEMBER(odyssey2_state::scanline_postprocess_g7400)
bitmap_ind16 *ef934x_bitmap = m_ef9340_1->get_bitmap(); bitmap_ind16 *ef934x_bitmap = m_ef9340_1->get_bitmap();
// apply external LUM setting // apply external LUM setting
int x_real_start = i8244_device::START_ACTIVE_SCAN + i8244_device::BORDER_SIZE;
int x_real_end = i8244_device::END_ACTIVE_SCAN - i8244_device::BORDER_SIZE;
for ( int x = i8244_device::START_ACTIVE_SCAN; x < i8244_device::END_ACTIVE_SCAN; x++ ) for ( int x = i8244_device::START_ACTIVE_SCAN; x < i8244_device::END_ACTIVE_SCAN; x++ )
{ {
UINT16 d = bitmap->pix16( vpos, x ); UINT16 d = bitmap->pix16( vpos, x );
if ( ! m_g7400_ic678_decode[ d & 0x07 ] ) if ( ( ! m_g7400_ic678_decode[ d & 0x07 ] ) && x >= x_real_start && x < x_real_end )
{ {
// Use EF934x input // Use EF934x input
d = ef934x_bitmap->pix16( y, x - i8244_device::START_ACTIVE_SCAN ) & 0x07; d = ef934x_bitmap->pix16( y, x - x_real_start ) & 0x07;
if ( ! m_g7400_ic674_decode[ d & 0x07 ] ) if ( ! m_g7400_ic674_decode[ d & 0x07 ] )
{ {