k052109: change invalid logerror m_maincpu->pc to machine().describe_context()

This commit is contained in:
hap 2022-12-11 20:35:46 +01:00
parent 019d763cf1
commit 67baf5b8b3

View File

@ -331,8 +331,7 @@ u8 k052109_device::read(offs_t offset)
{ /* B y scroll */ }
else if (offset >= 0x3a00 && offset < 0x3c00)
{ /* B x scroll */ }
// else
//logerror("%s: read from unknown 052109 address %04x\n",m_maincpu->pc(),offset);
//else logerror("%s: read from unknown 052109 address %04x\n",machine().describe_context(),offset);
}
return m_ram[offset];
@ -358,7 +357,7 @@ u8 k052109_device::read(offs_t offset)
addr = (code << 5) + (offset & 0x1f);
addr &= m_char_rom.length() - 1;
// logerror("%s: off = %04x sub = %02x (bnk = %x) adr = %06x\n", m_maincpu->pc(), offset, m_romsubbank, bank, addr);
//logerror("%s: off = %04x sub = %02x (bnk = %x) adr = %06x\n", machine().describe_context(), offset, m_romsubbank, bank, addr);
return m_char_rom[addr];
}
@ -387,13 +386,13 @@ void k052109_device::write(offs_t offset, u8 data)
if (m_scrollctrl != data)
{
//popmessage("scrollcontrol = %02x", data);
//logerror("%s: rowscrollcontrol = %02x\n", m_maincpu->pc(), data);
//logerror("%s: rowscrollcontrol = %02x\n", machine().describe_context(), data);
m_scrollctrl = data;
}
}
else if (offset == 0x1d00)
{
//logerror("%s: 052109 register 1d00 = %02x\n", m_maincpu->pc(), data);
//logerror("%s: 052109 register 1d00 = %02x\n", machine().describe_context(), data);
/* bit 2 = irq enable */
/* the custom chip can also generate NMI and FIRQ, for use with a 6809 */
m_irq_enabled = data & 0x04;
@ -428,12 +427,12 @@ void k052109_device::write(offs_t offset, u8 data)
}
else if (offset == 0x1e00 || offset == 0x3e00) // Surprise Attack uses offset 0x3e00
{
//logerror("%s: 052109 register 1e00 = %02x\n",m_maincpu->pc(),data);
//logerror("%s: 052109 register 1e00 = %02x\n",machine().describe_context(),data);
m_romsubbank = data;
}
else if (offset == 0x1e80)
{
//if ((data & 0xfe)) logerror("%s: 052109 register 1e80 = %02x\n",m_maincpu->pc(),data);
//if ((data & 0xfe)) logerror("%s: 052109 register 1e80 = %02x\n",machine().describe_context(),data);
m_tilemap[0]->set_flip((data & 1) ? (TILEMAP_FLIPY | TILEMAP_FLIPX) : 0);
m_tilemap[1]->set_flip((data & 1) ? (TILEMAP_FLIPY | TILEMAP_FLIPX) : 0);
m_tilemap[2]->set_flip((data & 1) ? (TILEMAP_FLIPY | TILEMAP_FLIPX) : 0);
@ -487,8 +486,7 @@ void k052109_device::write(offs_t offset, u8 data)
m_charrombank_2[2] = data & 0x0f;
m_charrombank_2[3] = (data >> 4) & 0x0f;
}
// else
// logerror("%s: write %02x to unknown 052109 address %04x\n",m_maincpu->pc(),data,offset);
//else logerror("%s: write %02x to unknown 052109 address %04x\n",machine().describe_context(),data,offset);
}
}
@ -527,13 +525,11 @@ void k052109_device::tilemap_update( )
int xscroll, yscroll, offs;
#if 0
{
popmessage("%x %x %x %x",
m_charrombank[0],
m_charrombank[1],
m_charrombank[2],
m_charrombank[3]);
}
#endif
// note: this chip can do both per-column and per-row scroll in the same time, currently not emulated.