b5000: remove tkbs_step

This commit is contained in:
hap 2022-03-24 22:17:26 +01:00
parent 03340de132
commit 3756f85043
7 changed files with 14 additions and 40 deletions

View File

@ -63,7 +63,7 @@ u16 b5000_cpu_device::decode_digit(u8 data)
0x3f, 0x06, 0x5b, 0x4f, 0x66, 0x6d, 0x7d, 0x07, 0x7f, 0x6f,
// ?, ?, ?, ?, ?, ?
0x00, 0x00, 0x00, 0x00, 0x00, 0x00
0, 0, 0, 0, 0, 0
};
return lut_segs[data & 0xf];
}
@ -120,7 +120,7 @@ void b5000_cpu_device::execute_one()
case 0x00: op_nop(); break;
case 0x01: op_tc(); break;
case 0x02: op_tkb(); break;
case 0x03: m_tkbs_step = 1; break;
case 0x03: op_tkbs(); break;
case 0x39: op_rsc(); break;
case 0x3b: op_sc(); break;
case 0x74: op_kseg(); break;

View File

@ -100,7 +100,7 @@ protected:
virtual void op_kseg();
virtual void op_atbz() override;
virtual void op_tkb();
virtual void op_tkbs() override;
virtual void op_tkbs();
virtual void op_read();
virtual void op_tdin();
};

View File

@ -73,13 +73,11 @@ void b5000_base_device::device_start()
m_c = 0;
m_prev_c = 0;
m_prev2_c = 0;
m_prev3_c = 0;
m_sr = false;
m_skip = false;
m_seg = 0;
m_atbz_step = 0;
m_tkbs_step = 0;
m_tra_step = 0;
m_ret_step = 0;
@ -101,13 +99,11 @@ void b5000_base_device::device_start()
save_item(NAME(m_c));
save_item(NAME(m_prev_c));
save_item(NAME(m_prev2_c));
save_item(NAME(m_prev3_c));
save_item(NAME(m_sr));
save_item(NAME(m_skip));
save_item(NAME(m_seg));
save_item(NAME(m_atbz_step));
save_item(NAME(m_tkbs_step));
save_item(NAME(m_tra_step));
save_item(NAME(m_ret_step));
@ -152,7 +148,6 @@ void b5000_base_device::device_reset()
m_skip = false;
m_atbz_step = 0;
m_tkbs_step = 0;
m_tra_step = 0;
m_ret_step = 0;
}
@ -180,7 +175,6 @@ void b5000_base_device::execute_run()
m_prev_bl = m_bl;
m_prev_bu = m_bu;
m_prev3_c = m_prev2_c;
m_prev2_c = m_prev_c;
m_prev_c = m_c;
@ -203,7 +197,6 @@ void b5000_base_device::execute_run()
// some opcodes have multiple steps and will run in parallel with next ones,
// eg. it may fetch in order A,B and parts executed in order B,A
if (m_atbz_step) op_atbz();
if (m_tkbs_step) op_tkbs();
if (m_tra_step) op_tra();
if (m_ret_step) op_ret();

View File

@ -89,18 +89,15 @@ protected:
u8 m_c;
u8 m_prev_c;
u8 m_prev2_c;
u8 m_prev3_c;
bool m_sr;
bool m_skip;
u16 m_seg;
u8 m_atbz_step;
u8 m_tkbs_step;
u8 m_tra_step;
u8 m_ret_step;
virtual void op_atbz() { ; }
virtual void op_tkbs() { ; }
virtual void op_tra() { ; }
virtual void op_ret() { ; }

View File

@ -281,13 +281,13 @@ void b5000_cpu_device::op_atbz()
op_kseg();
break;
// step 2: disable strobe
case 2:
// step 3: disable strobe
case 3:
m_write_str(0);
break;
// step 3: load strobe from Bl
case 3:
// step 4: load strobe from Bl
case 4:
m_write_str(1 << (m_ram_addr & 0xf));
m_atbz_step = 0;
return;
@ -306,27 +306,11 @@ void b5000_cpu_device::op_tkb()
void b5000_cpu_device::op_tkbs()
{
assert(m_tkbs_step > 0);
// TKBS: TKB + load segments
op_tkb();
// TKBS: TKB + load segments (multi step)
switch (m_tkbs_step)
{
// step 1: TKB
case 1:
op_tkb();
break;
// step 2: load segments from RAM
case 2:
// note: SEG0(DP) from C flag is delayed 2 cycles
seg_w(m_seg | decode_digit(ram_r()) << 1 | m_prev3_c);
m_tkbs_step = 0;
return;
default:
break;
}
m_tkbs_step++;
// note: SEG0(DP) from C flag is delayed 2 cycles
seg_w(m_seg | decode_digit(ram_r()) << 1 | m_prev2_c);
}
void b5000_cpu_device::op_read()

View File

@ -102,7 +102,7 @@ void b6000_cpu_device::op_tkbs()
void b6000_cpu_device::op_atbz()
{
// ATBZ: load strobe from A (no ATB step)
m_write_str(1 << (m_a & 0xf));
// ATBZ: KSEG + load strobe (no ATB step)
op_kseg();
m_write_str(1 << m_a);
}

View File

@ -2,7 +2,7 @@
// copyright-holders:hap
/*
Rockwell B6100 MCU (based on A5500+B6000)
Rockwell B6100 MCU (based on B5500+B6000)
*/