smartboard: fix problem when playing with leds disabled

This commit is contained in:
hap 2021-04-16 19:54:32 +02:00
parent 0c9791b00f
commit 3da3d50d47
2 changed files with 6 additions and 8 deletions

View File

@ -36,7 +36,6 @@ notes:
TODO:
- bootrom disable timer shouldn't be needed, real ARM has already fetched the next opcode
- sound is too high pitched, same problem as in risc2500
- "disable leds" setting breaks smartboard controls
******************************************************************************/

View File

@ -278,10 +278,10 @@ u8 tasc_sb30_device::read()
void tasc_sb30_device::write(u8 data)
{
if (BIT(data, 3) && !BIT(m_data, 3))
if (!BIT(data, 3) && BIT(m_data, 3))
m_position = 0;
if (BIT(data, 6) && !BIT(m_data, 6))
if (!BIT(data, 6) && BIT(m_data, 6))
{
if (m_position < 0x40)
{
@ -289,17 +289,16 @@ void tasc_sb30_device::write(u8 data)
int y = m_position % 8;
m_out_leds[y][x] = BIT(data, 7);
}
m_shift = 0;
}
if (!BIT(data, 7) && BIT(m_data, 7))
{
m_position++;
if (m_position >= 0x40)
{
if (m_position == 0x40)
m_shift++;
if (m_position & 1)
m_shift = 0;
}
}
m_data = data;