mirror of
https://github.com/TomHarte/CLK.git
synced 2024-06-09 17:29:36 +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(); }
|
void tick_floppy() { executor_.bus.tick_floppy(); }
|
||||||
|
|
||||||
// MARK: - MediaTarget
|
// MARK: - MediaTarget
|
||||||
bool insert_media(const Analyser::Static::Media &) override {
|
bool insert_media(const Analyser::Static::Media &media) override {
|
||||||
// int c = 0;
|
int c = 0;
|
||||||
// for(auto &disk : media.disks) {
|
for(auto &disk : media.disks) {
|
||||||
// fdc_.set_disk(disk, c);
|
executor_.bus.set_disk(disk, c);
|
||||||
// c++;
|
c++;
|
||||||
// if(c == 4) break;
|
if(c == 4) break;
|
||||||
// }
|
}
|
||||||
// return true;
|
return true;
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// MARK: - Activity::Source.
|
// MARK: - Activity::Source.
|
||||||
|
|
|
@ -37,6 +37,10 @@ public:
|
||||||
}
|
}
|
||||||
void reset() {}
|
void reset() {}
|
||||||
|
|
||||||
|
void set_disk(std::shared_ptr<Storage::Disk::Disk> disk, size_t drive) {
|
||||||
|
get_drive(drive).set_disk(disk);
|
||||||
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
InterruptObserverT &observer_;
|
InterruptObserverT &observer_;
|
||||||
};
|
};
|
||||||
|
|
|
@ -116,6 +116,10 @@ struct InputOutputController {
|
||||||
floppy_.run_for(Cycles(1));
|
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.
|
/// Decomposes an Archimedes bus address into bank, offset and type.
|
||||||
struct Address {
|
struct Address {
|
||||||
constexpr Address(uint32_t bus_address) noexcept {
|
constexpr Address(uint32_t bus_address) noexcept {
|
||||||
|
|
|
@ -199,6 +199,9 @@ struct MemoryController {
|
||||||
//
|
//
|
||||||
void tick_timers() { ioc_.tick_timers(); }
|
void tick_timers() { ioc_.tick_timers(); }
|
||||||
void tick_floppy() { ioc_.tick_floppy(); }
|
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(); }
|
auto &sound() { return ioc_.sound(); }
|
||||||
const auto &sound() const { return ioc_.sound(); }
|
const auto &sound() const { return ioc_.sound(); }
|
||||||
|
|
|
@ -62,7 +62,7 @@
|
||||||
</Testables>
|
</Testables>
|
||||||
</TestAction>
|
</TestAction>
|
||||||
<LaunchAction
|
<LaunchAction
|
||||||
buildConfiguration = "Debug"
|
buildConfiguration = "Release"
|
||||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||||
enableASanStackUseAfterReturn = "YES"
|
enableASanStackUseAfterReturn = "YES"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user