Skip to content

Commit

Permalink
code clean-up
Browse files Browse the repository at this point in the history
  • Loading branch information
folkertvanheusden committed May 1, 2024
1 parent 9e57f3e commit 1f8adad
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions bus.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -523,7 +523,7 @@ uint16_t bus::read(const uint16_t addr_in, const word_mode_t word_mode, const rm
throw 1;
}

uint16_t temp = 0;
uint16_t temp = 0;
if (word_mode == wm_byte)
temp = m->read_byte(m_offset);
else
Expand Down Expand Up @@ -639,7 +639,7 @@ uint32_t bus::calculate_physical_address(const int run_mode, const uint16_t a, c
if (mmu_->is_enabled() || (is_write && (mmu_->getMMR0() & (1 << 8 /* maintenance check */)))) {
uint8_t apf = a >> 13; // active page field

bool d = space == d_space && mmu_->get_use_data_space(run_mode) ? space == d_space : false;
bool d = space == d_space && mmu_->get_use_data_space(run_mode);

uint16_t p_offset = a & 8191; // page offset

Expand Down Expand Up @@ -786,8 +786,7 @@ write_rc_t bus::write(const uint16_t addr_in, const word_mode_t word_mode, uint1
const uint8_t apf = addr_in >> 13; // active page field

bool is_data = space == d_space;

bool d = is_data && mmu_->get_use_data_space(run_mode) ? is_data : false;
bool d = is_data && mmu_->get_use_data_space(run_mode);

if (mmu_->is_enabled() && (addr_in & 1) == 0 /* TODO remove this? */ && addr_in != ADDR_MMR0)
mmu_->set_page_written_to(run_mode, d, apf);
Expand Down

0 comments on commit 1f8adad

Please sign in to comment.