Skip to content

Commit

Permalink
One can’t cause the state of inputs to magically change on reset, or …
Browse files Browse the repository at this point in the history
…we’ll get out of sync with whatever’s driving it.
  • Loading branch information
felipesanches committed Dec 27, 2023
1 parent fdb37b5 commit 5156f4e
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 14 deletions.
10 changes: 6 additions & 4 deletions src/devices/cpu/tlcs900/tmp94c241.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,12 @@ void tmp94c241_device::device_start()
save_item(NAME(m_dram_refresh));
save_item(NAME(m_dram_access));
save_item(NAME(m_da_drive));

m_nmi_state = CLEAR_LINE;
for( int i = 0; i < TLCS900_NUM_INPUTS; i++ )
{
m_level[i] = CLEAR_LINE;
}
}


Expand All @@ -302,7 +308,6 @@ void tmp94c241_device::device_reset()
tlcs900h_device::device_reset();

m_ad_cycles_left = 0;
m_nmi_state = CLEAR_LINE;
m_timer_pre = 0;
TIMER_CHANGE_0 = 0;
TIMER_CHANGE_1 = 0;
Expand Down Expand Up @@ -381,9 +386,6 @@ void tmp94c241_device::device_reset()
std::fill_n(&m_dram_refresh[0], 2, 0x00);
std::fill_n(&m_dram_access[0], 2, 0x80);
m_da_drive = 0x00;

for( int i = 0; i < TLCS900_NUM_INPUTS; i++ )
m_level[i] = CLEAR_LINE;
}


Expand Down
12 changes: 6 additions & 6 deletions src/devices/cpu/tlcs900/tmp95c061.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,12 @@ void tmp95c061_device::device_start()
save_item(NAME(m_mem_start_mask));
save_item(NAME(m_dram_refresh));
save_item(NAME(m_dram_access));

m_nmi_state = CLEAR_LINE;
for( int i = 0; i < TLCS900_NUM_INPUTS; i++ )
{
m_level[i] = CLEAR_LINE;
}
}

void tmp95c061_device::device_reset()
Expand All @@ -201,7 +207,6 @@ void tmp95c061_device::device_reset()
m_to3 = 0;

m_ad_cycles_left = 0;
m_nmi_state = CLEAR_LINE;
m_timer_pre = 0;
m_timer_change[0] = 0;
m_timer_change[1] = 0;
Expand Down Expand Up @@ -251,11 +256,6 @@ void tmp95c061_device::device_reset()
std::fill_n(&m_mem_start_mask[0], 4, 0xff);
m_dram_refresh = 0x00;
m_dram_access = 0x80;

for (int i = 0; i < TLCS900_NUM_INPUTS; i++)
{
m_level[i] = CLEAR_LINE;
}
}


Expand Down
10 changes: 6 additions & 4 deletions src/devices/cpu/tlcs900/tmp95c063.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -590,14 +590,19 @@ void tmp95c063_device::device_start()
save_item(NAME(m_dram_refresh));
save_item(NAME(m_dram_access));
save_item(NAME(m_da_drive));

m_nmi_state = CLEAR_LINE;
for( int i = 0; i < TLCS900_NUM_INPUTS; i++ )
{
m_level[i] = CLEAR_LINE;
}
}

void tmp95c063_device::device_reset()
{
tlcs900h_device::device_reset();

m_ad_cycles_left = 0;
m_nmi_state = CLEAR_LINE;
m_timer_pre = 0;
m_timer_change[0] = 0;
m_timer_change[1] = 0;
Expand Down Expand Up @@ -648,9 +653,6 @@ void tmp95c063_device::device_reset()
std::fill_n(&m_dram_refresh[0], 2, 0x00);
std::fill_n(&m_dram_access[0], 2, 0x80);
m_da_drive = 0x00;

for (int i = 0; i < TLCS900_NUM_INPUTS; i++)
m_level[i] = CLEAR_LINE;
}


Expand Down

0 comments on commit 5156f4e

Please sign in to comment.