mirror of
https://github.com/TomHarte/CLK.git
synced 2025-01-24 17:32:55 +00:00
Plumb through disk insertion.
Surprisingly: some things now load.
This commit is contained in:
parent
5e502df48b
commit
169298af42
@ -470,15 +470,14 @@ class ConcreteMachine:
|
||||
void tick_floppy() { executor_.bus.tick_floppy(); }
|
||||
|
||||
// MARK: - MediaTarget
|
||||
bool insert_media(const Analyser::Static::Media &) override {
|
||||
// int c = 0;
|
||||
// for(auto &disk : media.disks) {
|
||||
// fdc_.set_disk(disk, c);
|
||||
// c++;
|
||||
// if(c == 4) break;
|
||||
// }
|
||||
// return true;
|
||||
return false;
|
||||
bool insert_media(const Analyser::Static::Media &media) override {
|
||||
int c = 0;
|
||||
for(auto &disk : media.disks) {
|
||||
executor_.bus.set_disk(disk, c);
|
||||
c++;
|
||||
if(c == 4) break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
// MARK: - Activity::Source.
|
||||
|
@ -37,6 +37,10 @@ public:
|
||||
}
|
||||
void reset() {}
|
||||
|
||||
void set_disk(std::shared_ptr<Storage::Disk::Disk> disk, size_t drive) {
|
||||
get_drive(drive).set_disk(disk);
|
||||
}
|
||||
|
||||
private:
|
||||
InterruptObserverT &observer_;
|
||||
};
|
||||
|
@ -116,6 +116,10 @@ struct InputOutputController {
|
||||
floppy_.run_for(Cycles(1));
|
||||
}
|
||||
|
||||
void set_disk(std::shared_ptr<Storage::Disk::Disk> disk, size_t drive) {
|
||||
floppy_.set_disk(disk, drive);
|
||||
}
|
||||
|
||||
/// Decomposes an Archimedes bus address into bank, offset and type.
|
||||
struct Address {
|
||||
constexpr Address(uint32_t bus_address) noexcept {
|
||||
|
@ -199,6 +199,9 @@ struct MemoryController {
|
||||
//
|
||||
void tick_timers() { ioc_.tick_timers(); }
|
||||
void tick_floppy() { ioc_.tick_floppy(); }
|
||||
void set_disk(std::shared_ptr<Storage::Disk::Disk> disk, size_t drive) {
|
||||
ioc_.set_disk(disk, drive);
|
||||
}
|
||||
|
||||
auto &sound() { return ioc_.sound(); }
|
||||
const auto &sound() const { return ioc_.sound(); }
|
||||
|
@ -62,7 +62,7 @@
|
||||
</Testables>
|
||||
</TestAction>
|
||||
<LaunchAction
|
||||
buildConfiguration = "Debug"
|
||||
buildConfiguration = "Release"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
enableASanStackUseAfterReturn = "YES"
|
||||
|
Loading…
x
Reference in New Issue
Block a user