Merge branch 'master' of github.com:folkertvanheusden/kek
This commit is contained in:
commit
688c0c6960
3 changed files with 8 additions and 12 deletions
3
bus.cpp
3
bus.cpp
|
@ -738,8 +738,7 @@ void bus::addToMMR1(const int8_t delta, const uint8_t reg)
|
|||
assert(reg >= 0 && reg <= 7);
|
||||
assert(delta >= -2 && delta <= 2);
|
||||
|
||||
if (getMMR0() & 0160000) // MMR1 etc are locked
|
||||
return;
|
||||
assert((getMMR0() & 0160000) == 0); // MMR1 should not be locked
|
||||
|
||||
#if defined(ESP32)
|
||||
// if (MMR1 > 255)
|
||||
|
|
|
@ -574,7 +574,7 @@ void dump_par_pdr(console *const cnsl, bus *const b, const uint16_t pdrs, const
|
|||
else
|
||||
cnsl->put_string_lf(format("%s DISABLED", name.c_str()));
|
||||
|
||||
cnsl->put_string_lf(" PAR PDR LEN");
|
||||
cnsl->put_string_lf(" PAR PDR LEN");
|
||||
|
||||
for(int i=0; i<8; i++) {
|
||||
if (selection.has_value() && i != selection.value())
|
||||
|
|
15
rl02.cpp
15
rl02.cpp
|
@ -41,7 +41,7 @@ rl02::~rl02()
|
|||
|
||||
void rl02::reset()
|
||||
{
|
||||
memset(registers, 0x00, sizeof registers);
|
||||
memset(registers, 0x00, sizeof registers);
|
||||
memset(xfer_buffer, 0x00, sizeof xfer_buffer);
|
||||
}
|
||||
|
||||
|
@ -91,10 +91,9 @@ void rl02::writeByte(const uint16_t addr, const uint8_t v)
|
|||
|
||||
uint32_t rl02::calcOffset(const uint16_t da)
|
||||
{
|
||||
int sector = da & 63;
|
||||
int track = (da >> 6) & 1023;
|
||||
|
||||
uint32_t offset = (sectors_per_track * track + sector) * bytes_per_sector;
|
||||
int sector = da & 63;
|
||||
int track = (da >> 6) & 1023;
|
||||
uint32_t offset = (sectors_per_track * track + sector) * bytes_per_sector;
|
||||
|
||||
return offset;
|
||||
}
|
||||
|
@ -123,8 +122,6 @@ void rl02::writeWord(const uint16_t addr, uint16_t v)
|
|||
else if (command == 6 || command == 7) { // read data / read data without header check
|
||||
*disk_read_acitivity = true;
|
||||
|
||||
bool proceed = true;
|
||||
|
||||
uint32_t temp_disk_offset = disk_offset;
|
||||
|
||||
uint32_t memory_address = registers[(RL02_BAR - RL02_BASE) / 2];
|
||||
|
@ -133,8 +130,8 @@ void rl02::writeWord(const uint16_t addr, uint16_t v)
|
|||
|
||||
DOLOG(debug, false, "RL02 read %d bytes (dec) from %d (dec) to %06o (oct)", count, disk_offset, memory_address);
|
||||
|
||||
uint32_t p = memory_address;
|
||||
while(proceed && count > 0) {
|
||||
uint32_t p = memory_address;
|
||||
while(count > 0) {
|
||||
uint32_t cur = std::min(uint32_t(sizeof xfer_buffer), count);
|
||||
|
||||
if (!fhs.at(device)->read(temp_disk_offset, cur, xfer_buffer)) {
|
||||
|
|
Loading…
Add table
Reference in a new issue