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(reg >= 0 && reg <= 7);
|
||||||
assert(delta >= -2 && delta <= 2);
|
assert(delta >= -2 && delta <= 2);
|
||||||
|
|
||||||
if (getMMR0() & 0160000) // MMR1 etc are locked
|
assert((getMMR0() & 0160000) == 0); // MMR1 should not be locked
|
||||||
return;
|
|
||||||
|
|
||||||
#if defined(ESP32)
|
#if defined(ESP32)
|
||||||
// if (MMR1 > 255)
|
// if (MMR1 > 255)
|
||||||
|
|
5
rl02.cpp
5
rl02.cpp
|
@ -93,7 +93,6 @@ uint32_t rl02::calcOffset(const uint16_t da)
|
||||||
{
|
{
|
||||||
int sector = da & 63;
|
int sector = da & 63;
|
||||||
int track = (da >> 6) & 1023;
|
int track = (da >> 6) & 1023;
|
||||||
|
|
||||||
uint32_t offset = (sectors_per_track * track + sector) * bytes_per_sector;
|
uint32_t offset = (sectors_per_track * track + sector) * bytes_per_sector;
|
||||||
|
|
||||||
return offset;
|
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
|
else if (command == 6 || command == 7) { // read data / read data without header check
|
||||||
*disk_read_acitivity = true;
|
*disk_read_acitivity = true;
|
||||||
|
|
||||||
bool proceed = true;
|
|
||||||
|
|
||||||
uint32_t temp_disk_offset = disk_offset;
|
uint32_t temp_disk_offset = disk_offset;
|
||||||
|
|
||||||
uint32_t memory_address = registers[(RL02_BAR - RL02_BASE) / 2];
|
uint32_t memory_address = registers[(RL02_BAR - RL02_BASE) / 2];
|
||||||
|
@ -134,7 +131,7 @@ 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);
|
DOLOG(debug, false, "RL02 read %d bytes (dec) from %d (dec) to %06o (oct)", count, disk_offset, memory_address);
|
||||||
|
|
||||||
uint32_t p = memory_address;
|
uint32_t p = memory_address;
|
||||||
while(proceed && count > 0) {
|
while(count > 0) {
|
||||||
uint32_t cur = std::min(uint32_t(sizeof xfer_buffer), count);
|
uint32_t cur = std::min(uint32_t(sizeof xfer_buffer), count);
|
||||||
|
|
||||||
if (!fhs.at(device)->read(temp_disk_offset, cur, xfer_buffer)) {
|
if (!fhs.at(device)->read(temp_disk_offset, cur, xfer_buffer)) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue