Minor changes to AT29x and logging.

This commit is contained in:
Michael Zapf 2015-08-22 14:35:57 +02:00
parent 5072c4d0bd
commit 44a87f8d29
2 changed files with 19 additions and 24 deletions

View File

@ -1322,21 +1322,21 @@ WRITE_LINE_MEMBER( geneve_mapper_device::pfm_select_lsb )
{
if (state==ASSERT_LINE) m_pfm_bank |= 1;
else m_pfm_bank &= 0xfe;
logerror("%s: Setting bank (l) = %d\n", tag(), m_pfm_bank);
if (TRACE_PFM) logerror("%s: Setting bank (l) = %d\n", tag(), m_pfm_bank);
}
WRITE_LINE_MEMBER( geneve_mapper_device::pfm_select_msb )
{
if (state==ASSERT_LINE) m_pfm_bank |= 2;
else m_pfm_bank &= 0xfd;
logerror("%s: Setting bank (u) = %d\n", tag(), m_pfm_bank);
if (TRACE_PFM) logerror("%s: Setting bank (u) = %d\n", tag(), m_pfm_bank);
}
WRITE_LINE_MEMBER( geneve_mapper_device::pfm_output_enable )
{
// Negative logic
m_pfm_output_enable = (state==CLEAR_LINE);
logerror("%s: PFM output %s\n", tag(), m_pfm_output_enable? "enable" : "disable");
if (TRACE_PFM) logerror("%s: PFM output %s\n", tag(), m_pfm_output_enable? "enable" : "disable");
}
//====================================================================

View File

@ -221,28 +221,23 @@ READ8_MEMBER( at29x_device::read )
if (m_id_mode)
{
switch (offset)
// Experiments showed that the manufacturer code and device code
// are returned for every address 0 and 1 modulo sector_size.
//
if ((offset % m_sector_size)==0) reply = 0x1f; // Manufacturer code
else
{
if ((offset % m_sector_size)==1) reply = m_device_id; // Device code
else
{
case 0x00000:
reply = 0x1f; // Manufacturer code
break;
case 0x00001:
reply = m_device_id; // Device code
break;
// Boot block lockout detection [1]
case 0x00002:
reply = m_lower_bbl? 0xff : 0xfe;
break;
case 0x7fff2:
reply = m_higher_bbl? 0xff : 0xfe;
break;
default:
reply = 0;
break;
if (offset == 0x00002) reply = m_lower_bbl? 0xff : 0xfe;
else
{
if (offset == 0x7fff2) reply = m_higher_bbl? 0xff : 0xfe;
else reply = 0;
}
}
}
}
else if ((m_pgm == PGM_2) || (m_pgm == PGM_3))