Halt _until_ data is available; do it only once.

This commit is contained in:
Thomas Harte committed 2026-05-20 13:42:17 -04:00
1 parent a37aa8771b
commit 5e4fca1c61
2 files changed
+5 -3

No files matched your search

+4 -2
View File
@@ -61,8 +61,10 @@ const Storage::Disk::Disk *DiskController::disk(const std::string &name) {
// * DRQ informs HALT, if enabled.
//
bool DiskController::halt() const {
return get_data_request_line() && enable_halt_;
bool DiskController::halt() {
const bool halt = !get_data_request_line() && enable_halt_;
if(halt) enable_halt_ = false;
return halt;
}
bool DiskController::nmi() const {
+1 -1
View File
@@ -43,7 +43,7 @@ public:
void set_disk(std::shared_ptr<Storage::Disk::Disk>, size_t drive);
const Storage::Disk::Disk *disk(const std::string &);
bool halt() const;
bool halt();
bool nmi() const;
private: