Release-mode

This commit is contained in:
folkert van heusden 2022-03-14 21:47:04 +01:00
parent 412e512c70
commit b47fc65221
2 changed files with 6 additions and 6 deletions

View file

@ -21,7 +21,7 @@ add_executable(
utils.cpp utils.cpp
) )
set(CMAKE_BUILD_TYPE Debug) set(CMAKE_BUILD_TYPE Release)
set(CMAKE_THREAD_PREFER_PTHREAD TRUE) set(CMAKE_THREAD_PREFER_PTHREAD TRUE)
set(THREADS_PREFER_PTHREAD_FLAG TRUE) set(THREADS_PREFER_PTHREAD_FLAG TRUE)

10
bus.cpp
View file

@ -42,7 +42,7 @@ uint16_t bus::read(const uint16_t a, const bool word_mode, const bool use_prev)
uint16_t temp = 0; uint16_t temp = 0;
if (a >= 0160000) { if (a >= 0160000) {
fprintf(stderr, "read%c I/O %o\n", word_mode ? 'b' : ' ', a); D(fprintf(stderr, "read%c I/O %o\n", word_mode ? 'b' : ' ', a);)
if (a == 0177750) { // MAINT if (a == 0177750) { // MAINT
fprintf(stderr, "read MAINT\n"); fprintf(stderr, "read MAINT\n");
@ -236,13 +236,13 @@ uint16_t bus::read(const uint16_t a, const bool word_mode, const bool use_prev)
const uint8_t apf = a >> 13; // active page field const uint8_t apf = a >> 13; // active page field
bool is_user = use_prev ? (c -> getBitPSW(12) && c -> getBitPSW(13)) : (c -> getBitPSW(14) && c -> getBitPSW(15)); bool is_user = use_prev ? (c -> getBitPSW(12) && c -> getBitPSW(13)) : (c -> getBitPSW(14) && c -> getBitPSW(15));
fprintf(stderr, "READ: is_user %d, offset %d\n", is_user, apf + is_user * 8); D(fprintf(stderr, "READ: is_user %d, offset %d\n", is_user, apf + is_user * 8);)
uint32_t m_offset = pages[apf + is_user * 8].par * 64; uint32_t m_offset = pages[apf + is_user * 8].par * 64;
if ((a & 1) && word_mode == 0) if ((a & 1) && word_mode == 0)
fprintf(stderr, "odd addressing\n"); fprintf(stderr, "odd addressing\n");
fprintf(stderr, "READ FROM %o\n", m_offset); D(fprintf(stderr, "READ FROM %o\n", m_offset);)
if (!word_mode) if (!word_mode)
temp = m -> readWord(m_offset + (a & 8191)); temp = m -> readWord(m_offset + (a & 8191));
else else
@ -429,7 +429,7 @@ uint16_t bus::write(const uint16_t a, const bool word_mode, uint16_t value, cons
const uint8_t apf = a >> 13; // active page field const uint8_t apf = a >> 13; // active page field
bool is_user = use_prev ? (c -> getBitPSW(12) && c -> getBitPSW(13)) : (c -> getBitPSW(14) && c -> getBitPSW(15)); bool is_user = use_prev ? (c -> getBitPSW(12) && c -> getBitPSW(13)) : (c -> getBitPSW(14) && c -> getBitPSW(15));
fprintf(stderr, "WRITE: is_user %d, offset %d\n", is_user, apf + is_user * 8); D(fprintf(stderr, "WRITE: is_user %d, offset %d\n", is_user, apf + is_user * 8);)
uint32_t m_offset = pages[apf + is_user * 8].par * 64; uint32_t m_offset = pages[apf + is_user * 8].par * 64;
pages[apf].pdr |= 1 << 6; // page has been written to pages[apf].pdr |= 1 << 6; // page has been written to
@ -437,7 +437,7 @@ uint16_t bus::write(const uint16_t a, const bool word_mode, uint16_t value, cons
if ((a & 1) && word_mode == 0) if ((a & 1) && word_mode == 0)
fprintf(stderr, "odd addressing\n"); fprintf(stderr, "odd addressing\n");
fprintf(stderr, "WRITE TO: %o\n", m_offset); D(fprintf(stderr, "WRITE TO: %o\n", m_offset);)
if (word_mode) if (word_mode)
m -> writeByte(m_offset + (a & 8191), value); m -> writeByte(m_offset + (a & 8191), value);
else else