KW11-L fixes
This commit is contained in:
parent
cdccde1956
commit
3879721b28
3 changed files with 15 additions and 10 deletions
5
bus.cpp
5
bus.cpp
|
@ -833,9 +833,12 @@ write_rc_t bus::write(const uint16_t addr_in, const word_mode_t word_mode, uint1
|
||||||
return { false };
|
return { false };
|
||||||
}
|
}
|
||||||
|
|
||||||
if (a == ADDR_LFC) // line frequency clock and status register
|
if (a == ADDR_LFC) { // line frequency clock and status register
|
||||||
kw11_l_->writeWord(a, value);
|
kw11_l_->writeWord(a, value);
|
||||||
|
|
||||||
|
return { false };
|
||||||
|
}
|
||||||
|
|
||||||
if (tm11 && a >= TM_11_BASE && a < TM_11_END) {
|
if (tm11 && a >= TM_11_BASE && a < TM_11_END) {
|
||||||
DOLOG(debug, false, "WRITE-I/O TM11 register %d: %06o", (a - TM_11_BASE) / 2, value);
|
DOLOG(debug, false, "WRITE-I/O TM11 register %d: %06o", (a - TM_11_BASE) / 2, value);
|
||||||
word_mode == wm_byte ? tm11->writeByte(a, value) : tm11->writeWord(a, value);
|
word_mode == wm_byte ? tm11->writeByte(a, value) : tm11->writeWord(a, value);
|
||||||
|
|
|
@ -34,8 +34,11 @@ kw11_l::~kw11_l()
|
||||||
stop_flag = true;
|
stop_flag = true;
|
||||||
|
|
||||||
#if !defined(ESP32) && !defined(BUILD_FOR_RP2040)
|
#if !defined(ESP32) && !defined(BUILD_FOR_RP2040)
|
||||||
th->join();
|
if (th) {
|
||||||
delete th;
|
th->join();
|
||||||
|
|
||||||
|
delete th;
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -62,7 +65,6 @@ void kw11_l::operator()()
|
||||||
|
|
||||||
while(!stop_flag) {
|
while(!stop_flag) {
|
||||||
if (*cnsl->get_running_flag()) {
|
if (*cnsl->get_running_flag()) {
|
||||||
DOLOG(debug, true, "KW11-L tick");
|
|
||||||
set_lf_crs_b7();
|
set_lf_crs_b7();
|
||||||
|
|
||||||
if (get_lf_crs() & 64)
|
if (get_lf_crs() & 64)
|
||||||
|
|
12
kw11-l.h
12
kw11-l.h
|
@ -11,18 +11,18 @@
|
||||||
class kw11_l
|
class kw11_l
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
bus *const b { nullptr };
|
bus *const b { nullptr };
|
||||||
console *cnsl { nullptr };
|
console *cnsl { nullptr };
|
||||||
|
|
||||||
#if defined(BUILD_FOR_RP2040)
|
#if defined(BUILD_FOR_RP2040)
|
||||||
SemaphoreHandle_t lf_csr_lock { xSemaphoreCreateBinary() };
|
SemaphoreHandle_t lf_csr_lock { xSemaphoreCreateBinary() };
|
||||||
#else
|
#else
|
||||||
std::thread * th { nullptr };
|
std::thread *th { nullptr };
|
||||||
std::mutex lf_csr_lock;
|
std::mutex lf_csr_lock;
|
||||||
#endif
|
#endif
|
||||||
uint16_t lf_csr { 0 };
|
uint16_t lf_csr { 0 };
|
||||||
|
|
||||||
std::atomic_bool stop_flag { false };
|
std::atomic_bool stop_flag { false };
|
||||||
|
|
||||||
uint8_t get_lf_crs();
|
uint8_t get_lf_crs();
|
||||||
void set_lf_crs_b7();
|
void set_lf_crs_b7();
|
||||||
|
|
Loading…
Add table
Reference in a new issue