Device: Fix coremini loading

For:
- RADA2B
- RADComet2
- RADComet3
- RADGalaxy2
- RADMoonT1S
- RADStar2
This commit is contained in:
Bryant Jones
2026-06-24 13:28:12 -04:00
committed by Kyle Schwarz
parent 8af6d5f2a8
commit 749552e443
7 changed files with 27 additions and 28 deletions
+17 -14
View File
@@ -737,15 +737,17 @@ bool Device::uploadCoremini(std::istream& stream, Disk::MemoryType memType) {
return false;
}
auto connected = isLogicalDiskConnected();
if(!connected) {
return false; // Already added an API error
}
if(!(*connected)) {
report(APIEvent::Type::DiskNotConnected, APIEvent::Severity::Error);
return false;
if (memType == Disk::MemoryType::SD) {
auto connected = isLogicalDiskConnected();
if(!connected) {
return false; // Already added an API error
}
if(!(*connected)) {
report(APIEvent::Type::DiskNotConnected, APIEvent::Severity::Error);
return false;
}
}
if(!stopScript()) {
@@ -756,7 +758,6 @@ bool Device::uploadCoremini(std::istream& stream, Disk::MemoryType memType) {
return false;
}
if(!eraseScriptMemory(memType, static_cast<uint64_t>(bin.size()))) {
return false;
}
@@ -846,10 +847,12 @@ std::optional<CoreminiHeader> Device::readCoreminiHeader(Disk::MemoryType memTyp
return std::nullopt;
}
auto connected = isLogicalDiskConnected();
if(!connected) {
return std::nullopt; // Already added an API error
if (memType == Disk::MemoryType::SD) {
auto connected = isLogicalDiskConnected();
if(!connected) {
return std::nullopt; // Already added an API error
}
}
#pragma pack(push, 2)