mirror of
https://github.com/holub/mame
synced 2025-06-05 20:33:45 +03:00
am9513.cpp: more logging for LOG_MODE and LOG_TC (#13406)
This commit is contained in:
parent
6b3856b0e5
commit
19a2529f56
@ -448,7 +448,7 @@ void am9513_device::set_counter_mode(int c, u16 data)
|
||||
}
|
||||
|
||||
if ((data & 0x0018) != (m_counter_mode[c] & 0x0018))
|
||||
LOGMASKED(LOG_MODE, "Counter %d: %s %s count\n", c + 1, BIT(data, 4) ? "BCD" : "Binary", BIT(data, 3) ? "up" : "down");
|
||||
LOGMASKED(LOG_MODE, "Counter %d: %s %s count %s\n", c + 1, BIT(data, 4) ? "BCD" : "Binary", BIT(data, 3) ? "up" : "down", BIT(data, 5) ? "repetitively" : "once");
|
||||
|
||||
if ((data & 0x0007) != (m_counter_mode[c] & 0x0007))
|
||||
{
|
||||
@ -620,8 +620,13 @@ void am9513_device::set_tc(int c, bool state)
|
||||
|
||||
// TC cascading
|
||||
if ((m_counter_mode[d] & 0x1f00) == (state ? 0x0000 : 0x1000))
|
||||
{
|
||||
LOGMASKED(LOG_TC, "Counter %d: TC cascade Next Count %u \n", c + 1, m_count[d]);
|
||||
|
||||
count_edge(d);
|
||||
|
||||
}
|
||||
|
||||
// TC gating
|
||||
if ((m_counter_mode[d] & 0xe000) == 0x2000)
|
||||
gate_count(d, state && (bus_is_16_bit() || m_gate_alt[d]));
|
||||
@ -1238,7 +1243,10 @@ void am9513_device::command_write(u8 data)
|
||||
if (BIT(data, 6))
|
||||
step_counter(c, true);
|
||||
if (BIT(data, 5))
|
||||
{
|
||||
LOGMASKED(LOG_MODE, "Arm Counter %d\n", c + 1);
|
||||
arm_counter(c);
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
@ -1251,9 +1259,15 @@ void am9513_device::command_write(u8 data)
|
||||
if (BIT(data, c))
|
||||
{
|
||||
if (!BIT(data, 5))
|
||||
{
|
||||
LOGMASKED(LOG_MODE, "Disarm Counter %d\n", c + 1);
|
||||
disarm_counter(c);
|
||||
}
|
||||
if (!BIT(data, 6))
|
||||
{
|
||||
LOGMASKED(LOG_MODE, "Save Counter %d\n", c + 1);
|
||||
save_counter(c);
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
@ -1270,6 +1284,7 @@ void am9513_device::command_write(u8 data)
|
||||
case 0xe3: case 0xeb: // Clear/set toggle out for counter 3
|
||||
case 0xe4: case 0xec: // Clear/set toggle out for counter 4
|
||||
case 0xe5: case 0xed: // Clear/set toggle out for counter 5
|
||||
LOGMASKED(LOG_MODE, "Counter %d: %s output\n", data & 7, BIT(data, 3) ? "Set" : "Clear");
|
||||
set_toggle((data & 7) - 1, BIT(data, 3));
|
||||
break;
|
||||
case 0xe6: case 0xee: // Clear/set MM12 (FOUT gate on/FOUT gate off)
|
||||
@ -1277,6 +1292,7 @@ void am9513_device::command_write(u8 data)
|
||||
m_mmr = ((m_mmr & ~(1 << 12)) | BIT(data, 3) << 12);
|
||||
break;
|
||||
case 0xe7: case 0xef: // Clear/set MM13 (8-bit bus/16-bit bus)
|
||||
LOGMASKED(LOG_MODE, "Data Bus Width = %d-Bit\n", BIT(data, 3) ? 16 : 8);
|
||||
m_mmr = ((m_mmr & ~(1 << 13)) | BIT(data, 3) << 13);
|
||||
break;
|
||||
case 0xf1: // Step counter 1
|
||||
@ -1284,6 +1300,7 @@ void am9513_device::command_write(u8 data)
|
||||
case 0xf3: // Step counter 3
|
||||
case 0xf4: // Step counter 4
|
||||
case 0xf5: // Step counter 5
|
||||
LOGMASKED(LOG_MODE, "Counter %d: Step\n", data & 7);
|
||||
step_counter((data & 7) - 1, false);
|
||||
break;
|
||||
case 0xff: // Master reset
|
||||
|
Loading…
Reference in New Issue
Block a user