mirror of
https://github.com/holub/mame
synced 2025-04-24 09:20:02 +03:00
tms9995: Make address visible on address bus during on-chip operations.
This commit is contained in:
parent
e50ec3ae1d
commit
ec0b8732ae
@ -1228,7 +1228,7 @@ void tms9995_device::execute_run()
|
||||
if (m_check_ready && m_ready == false)
|
||||
{
|
||||
// We are in a wait state
|
||||
LOGMASKED(LOG_WAIT, "wait state\n");
|
||||
LOGMASKED(LOG_WAIT, "wait\n");
|
||||
// The clock output should be used to change the state of an outer
|
||||
// device which operates the READY line
|
||||
pulse_clock(1);
|
||||
@ -1632,11 +1632,13 @@ void tms9995_device::command_completed()
|
||||
// Pseudo state at the end of the current instruction cycle sequence
|
||||
if (LOG_CYCLES & VERBOSE)
|
||||
{
|
||||
logerror("+++++ Instruction %04x (%s) completed", IR, opname[m_command]);
|
||||
// logerror("+++++ Instruction %04x (%s) completed", IR, opname[m_command]);
|
||||
int cycles = m_first_cycle - m_icount;
|
||||
// Avoid nonsense values due to expired and resumed main loop
|
||||
if (cycles > 0 && cycles < 10000) logerror(", consumed %d cycles", cycles);
|
||||
logerror(" +++++\n");
|
||||
// if (cycles > 0 && cycles < 10000) logerror(", consumed %d cycles", cycles);
|
||||
// logerror(" +++++\n");
|
||||
if (cycles > 0 && cycles < 10000) logerror("%04x %s [%02d]\n", PC_debug, opname[m_command], cycles);
|
||||
else logerror("%04x %s [ ?]\n", PC_debug, opname[m_command]);
|
||||
}
|
||||
|
||||
if (m_int_pending != 0)
|
||||
@ -1827,12 +1829,22 @@ void tms9995_device::mem_read()
|
||||
|
||||
// Ignore the READY state
|
||||
m_check_ready = false;
|
||||
|
||||
// We put fffc-ffff back into the f000-f0ff area
|
||||
m_current_value = m_onchip_memory[m_address & 0x00ff]<<8;
|
||||
if (m_word_access || !m_byteop)
|
||||
offs_t intaddr = m_address & 0x00fe;
|
||||
|
||||
// An on-chip memory access is also visible to the outside world ([1], 2.3.1.2)
|
||||
// but only on word boundary, as only full words are read.
|
||||
if (m_setaddr)
|
||||
m_setaddr->write_byte(m_address & 0xfffe, (TMS99xx_BUS_DBIN | (m_iaq? TMS99xx_BUS_IAQ : 0)));
|
||||
|
||||
// Always read a word from internal memory
|
||||
m_current_value = (m_onchip_memory[intaddr] << 8) | m_onchip_memory[intaddr + 1];
|
||||
|
||||
if (!m_word_access && m_byteop)
|
||||
{
|
||||
// We have a word operation; add the low byte right here (just 1 cycle)
|
||||
m_current_value |= (m_onchip_memory[(m_address & 0x00ff)+1] & 0xff);
|
||||
if ((m_address & 1)==1) m_current_value = m_current_value << 8;
|
||||
m_current_value &= 0xff00;
|
||||
}
|
||||
pulse_clock(1);
|
||||
}
|
||||
@ -1963,6 +1975,12 @@ void tms9995_device::mem_write()
|
||||
if (m_word_access || !m_byteop) m_address &= 0xfffe;
|
||||
|
||||
LOGMASKED(LOG_MEM, "write to onchip memory (single pass, address %04x, value=%04x)\n", m_address, m_current_value);
|
||||
|
||||
// An on-chip memory access is also visible to the outside world ([1], 2.3.1.2)
|
||||
// but only on word boundary
|
||||
if (m_setaddr)
|
||||
m_setaddr->write_byte(m_address & 0xfffe, TMS99xx_BUS_WRITE);
|
||||
|
||||
m_check_ready = false;
|
||||
m_onchip_memory[m_address & 0x00ff] = (m_current_value >> 8) & 0xff;
|
||||
if (m_word_access || !m_byteop)
|
||||
|
Loading…
Reference in New Issue
Block a user