mirror of
https://github.com/TomHarte/CLK.git
synced 2024-12-25 03:32:01 +00:00
Exposes DOS 3.3 acceleration as an option.
Albeit with an unhelpful label in the macOS GUI for now.
This commit is contained in:
parent
af54666c23
commit
d576ff1172
@ -24,10 +24,9 @@
|
|||||||
#include "DiskIICard.hpp"
|
#include "DiskIICard.hpp"
|
||||||
#include "Video.hpp"
|
#include "Video.hpp"
|
||||||
|
|
||||||
#include "../../ClockReceiver/ForceInline.hpp"
|
|
||||||
|
|
||||||
#include "../../Analyser/Static/AppleII/Target.hpp"
|
#include "../../Analyser/Static/AppleII/Target.hpp"
|
||||||
|
#include "../../ClockReceiver/ForceInline.hpp"
|
||||||
|
#include "../../Configurable/Configurable.hpp"
|
||||||
#include "../../Storage/Disk/Track/TrackSerialiser.hpp"
|
#include "../../Storage/Disk/Track/TrackSerialiser.hpp"
|
||||||
#include "../../Storage/Disk/Encodings/AppleGCR/SegmentParser.hpp"
|
#include "../../Storage/Disk/Encodings/AppleGCR/SegmentParser.hpp"
|
||||||
|
|
||||||
@ -35,12 +34,19 @@
|
|||||||
#include <array>
|
#include <array>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
||||||
|
std::vector<std::unique_ptr<Configurable::Option>> AppleII::get_options() {
|
||||||
|
std::vector<std::unique_ptr<Configurable::Option>> options;
|
||||||
|
options.emplace_back(new Configurable::BooleanOption("Accelerate DOS 3.3", "quickload"));
|
||||||
|
return options;
|
||||||
|
}
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
class ConcreteMachine:
|
class ConcreteMachine:
|
||||||
public CRTMachine::Machine,
|
public CRTMachine::Machine,
|
||||||
public ConfigurationTarget::Machine,
|
public ConfigurationTarget::Machine,
|
||||||
public KeyboardMachine::Machine,
|
public KeyboardMachine::Machine,
|
||||||
|
public Configurable::Device,
|
||||||
public CPU::MOS6502::BusHandler,
|
public CPU::MOS6502::BusHandler,
|
||||||
public Inputs::Keyboard,
|
public Inputs::Keyboard,
|
||||||
public AppleII::Machine,
|
public AppleII::Machine,
|
||||||
@ -165,7 +171,7 @@ class ConcreteMachine:
|
|||||||
std::unique_ptr<Utility::StringSerialiser> string_serialiser_;
|
std::unique_ptr<Utility::StringSerialiser> string_serialiser_;
|
||||||
|
|
||||||
// MARK - quick loading
|
// MARK - quick loading
|
||||||
bool should_load_quickly_ = true;
|
bool should_load_quickly_ = false;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
ConcreteMachine():
|
ConcreteMachine():
|
||||||
@ -277,6 +283,7 @@ class ConcreteMachine:
|
|||||||
ram_[io_control_block_address+0x02] > 0 && ram_[io_control_block_address+0x02] < 3 &&
|
ram_[io_control_block_address+0x02] > 0 && ram_[io_control_block_address+0x02] < 3 &&
|
||||||
ram_[io_control_block_address+0x0c] < 2
|
ram_[io_control_block_address+0x0c] < 2
|
||||||
) {
|
) {
|
||||||
|
printf(".");
|
||||||
const uint8_t iob_track = ram_[io_control_block_address+4];
|
const uint8_t iob_track = ram_[io_control_block_address+4];
|
||||||
const uint8_t iob_sector = ram_[io_control_block_address+5];
|
const uint8_t iob_sector = ram_[io_control_block_address+5];
|
||||||
const uint8_t iob_drive = ram_[io_control_block_address+2] - 1;
|
const uint8_t iob_drive = ram_[io_control_block_address+2] - 1;
|
||||||
@ -576,7 +583,6 @@ class ConcreteMachine:
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool insert_media(const Analyser::Static::Media &media) override {
|
bool insert_media(const Analyser::Static::Media &media) override {
|
||||||
|
|
||||||
if(!media.disks.empty()) {
|
if(!media.disks.empty()) {
|
||||||
auto diskii = diskii_card();
|
auto diskii = diskii_card();
|
||||||
if(diskii) diskii->set_disk(media.disks[0], 0);
|
if(diskii) diskii->set_disk(media.disks[0], 0);
|
||||||
@ -590,6 +596,30 @@ class ConcreteMachine:
|
|||||||
if(card) card->set_activity_observer(observer);
|
if(card) card->set_activity_observer(observer);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// MARK: Options
|
||||||
|
std::vector<std::unique_ptr<Configurable::Option>> get_options() override {
|
||||||
|
return AppleII::get_options();
|
||||||
|
}
|
||||||
|
|
||||||
|
void set_selections(const Configurable::SelectionSet &selections_by_option) override {
|
||||||
|
bool quickload;
|
||||||
|
if(Configurable::get_quick_load_tape(selections_by_option, quickload)) {
|
||||||
|
should_load_quickly_ = quickload;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Configurable::SelectionSet get_accurate_selections() override {
|
||||||
|
Configurable::SelectionSet selection_set;
|
||||||
|
Configurable::append_quick_load_tape_selection(selection_set, false);
|
||||||
|
return selection_set;
|
||||||
|
}
|
||||||
|
|
||||||
|
Configurable::SelectionSet get_user_friendly_selections() override {
|
||||||
|
Configurable::SelectionSet selection_set;
|
||||||
|
Configurable::append_quick_load_tape_selection(selection_set, true);
|
||||||
|
return selection_set;
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -9,8 +9,16 @@
|
|||||||
#ifndef AppleII_hpp
|
#ifndef AppleII_hpp
|
||||||
#define AppleII_hpp
|
#define AppleII_hpp
|
||||||
|
|
||||||
|
#include "../../Configurable/Configurable.hpp"
|
||||||
|
|
||||||
|
#include <memory>
|
||||||
|
#include <vector>
|
||||||
|
|
||||||
namespace AppleII {
|
namespace AppleII {
|
||||||
|
|
||||||
|
/// @returns The options available for an Apple II.
|
||||||
|
std::vector<std::unique_ptr<Configurable::Option>> get_options();
|
||||||
|
|
||||||
class Machine {
|
class Machine {
|
||||||
public:
|
public:
|
||||||
virtual ~Machine();
|
virtual ~Machine();
|
||||||
|
@ -12,6 +12,7 @@
|
|||||||
#include "../../Configurable/Configurable.hpp"
|
#include "../../Configurable/Configurable.hpp"
|
||||||
|
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
|
#include <memory>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
namespace Electron {
|
namespace Electron {
|
||||||
|
@ -129,6 +129,7 @@ std::string Machine::LongNameForTargetMachine(Analyser::Machine machine) {
|
|||||||
std::map<std::string, std::vector<std::unique_ptr<Configurable::Option>>> Machine::AllOptionsByMachineName() {
|
std::map<std::string, std::vector<std::unique_ptr<Configurable::Option>>> Machine::AllOptionsByMachineName() {
|
||||||
std::map<std::string, std::vector<std::unique_ptr<Configurable::Option>>> options;
|
std::map<std::string, std::vector<std::unique_ptr<Configurable::Option>>> options;
|
||||||
|
|
||||||
|
options.emplace(std::make_pair(LongNameForTargetMachine(Analyser::Machine::Electron), AppleII::get_options()));
|
||||||
options.emplace(std::make_pair(LongNameForTargetMachine(Analyser::Machine::Electron), Electron::get_options()));
|
options.emplace(std::make_pair(LongNameForTargetMachine(Analyser::Machine::Electron), Electron::get_options()));
|
||||||
options.emplace(std::make_pair(LongNameForTargetMachine(Analyser::Machine::MSX), MSX::get_options()));
|
options.emplace(std::make_pair(LongNameForTargetMachine(Analyser::Machine::MSX), MSX::get_options()));
|
||||||
options.emplace(std::make_pair(LongNameForTargetMachine(Analyser::Machine::Oric), Oric::get_options()));
|
options.emplace(std::make_pair(LongNameForTargetMachine(Analyser::Machine::Oric), Oric::get_options()));
|
||||||
|
@ -183,7 +183,7 @@ static Analyser::Static::ZX8081::Target::MemoryModel ZX8081MemoryModelFromSize(K
|
|||||||
|
|
||||||
- (NSString *)optionsPanelNibName {
|
- (NSString *)optionsPanelNibName {
|
||||||
switch(_targets.front()->machine) {
|
switch(_targets.front()->machine) {
|
||||||
case Analyser::Machine::AmstradCPC: return nil;
|
case Analyser::Machine::AppleII: return @"QuickLoadOptions";
|
||||||
case Analyser::Machine::Atari2600: return @"Atari2600Options";
|
case Analyser::Machine::Atari2600: return @"Atari2600Options";
|
||||||
case Analyser::Machine::Electron: return @"QuickLoadCompositeOptions";
|
case Analyser::Machine::Electron: return @"QuickLoadCompositeOptions";
|
||||||
case Analyser::Machine::MSX: return @"QuickLoadCompositeOptions";
|
case Analyser::Machine::MSX: return @"QuickLoadCompositeOptions";
|
||||||
|
Loading…
Reference in New Issue
Block a user