diff --git a/OSBindings/Qt/mainwindow.cpp b/OSBindings/Qt/mainwindow.cpp index cfef7ab73..630bff4a6 100644 --- a/OSBindings/Qt/mainwindow.cpp +++ b/OSBindings/Qt/mainwindow.cpp @@ -1,12 +1,14 @@ +#include "mainwindow.h" +#include "settings.h" +#include "timer.h" + #include #include #include #include -#include "mainwindow.h" -#include "settings.h" -#include "timer.h" +#include #include "../../Numeric/CRC.hpp" @@ -462,6 +464,11 @@ void MainWindow::launchMachine() { addZX8081Menu(settingsPrefix); break; + case Analyser::Machine::ZXSpectrum: + addDisplayMenu(settingsPrefix, "Composite", "", "S-Video", "SCART"); + addEnhancementsMenu(settingsPrefix, true, false); + break; + default: break; } @@ -599,7 +606,7 @@ void MainWindow::addZX8081Menu(const std::string &machinePrefix) { controlsMenu->addAction(startTapeAction); connect(startTapeAction, &QAction::triggered, this, [=] { std::lock_guard lock_guard(machineMutex); - static_cast(machine->raw_pointer())->set_tape_is_playing(true); + static_cast(machine->raw_pointer())->set_tape_is_playing(true); updateTapeControls(); }); @@ -607,7 +614,7 @@ void MainWindow::addZX8081Menu(const std::string &machinePrefix) { controlsMenu->addAction(stopTapeAction); connect(stopTapeAction, &QAction::triggered, this, [=] { std::lock_guard lock_guard(machineMutex); - static_cast(machine->raw_pointer())->set_tape_is_playing(false); + static_cast(machine->raw_pointer())->set_tape_is_playing(false); updateTapeControls(); }); @@ -620,7 +627,7 @@ void MainWindow::addZX8081Menu(const std::string &machinePrefix) { void MainWindow::updateTapeControls() { const bool startStopEnabled = !automaticTapeControlAction->isChecked(); - const bool isPlaying = static_cast(machine->raw_pointer())->get_tape_is_playing(); + const bool isPlaying = static_cast(machine->raw_pointer())->get_tape_is_playing(); startTapeAction->setEnabled(!isPlaying && startStopEnabled); stopTapeAction->setEnabled(isPlaying && startStopEnabled); @@ -1097,6 +1104,7 @@ void MainWindow::setButtonPressed(int index, bool isPressed) { #include "../../Analyser/Static/MSX/Target.hpp" #include "../../Analyser/Static/Oric/Target.hpp" #include "../../Analyser/Static/ZX8081/Target.hpp" +#include "../../Analyser/Static/ZXSpectrum/Target.hpp" void MainWindow::startMachine() { const auto selectedTab = ui->machineSelectionTabs->currentWidget(); @@ -1115,6 +1123,7 @@ void MainWindow::startMachine() { TEST(macintosh); TEST(msx); TEST(oric); + TEST(spectrum); TEST(vic20); TEST(zx80); TEST(zx81); @@ -1245,6 +1254,18 @@ void MainWindow::start_oric() { launchTarget(std::move(target)); } +void MainWindow::start_spectrum() { + using Target = Analyser::Static::ZXSpectrum::Target; + auto target = std::make_unique(); + + switch(ui->oricModelComboBox->currentIndex()) { + default: target->model = Target::Model::Plus2a; break; + case 1: target->model = Target::Model::Plus3; break; + } + + launchTarget(std::move(target)); +} + void MainWindow::start_vic20() { using Target = Analyser::Static::Commodore::Target; auto target = std::make_unique(); diff --git a/OSBindings/Qt/mainwindow.h b/OSBindings/Qt/mainwindow.h index e3601c1eb..441612213 100644 --- a/OSBindings/Qt/mainwindow.h +++ b/OSBindings/Qt/mainwindow.h @@ -19,7 +19,7 @@ #include "../../Activity/Observer.hpp" // There are machine-specific controls for the following: -#include "../../Machines/ZX8081/ZX8081.hpp" +#include "../../Machines/Sinclair/ZX8081/ZX8081.hpp" #include "../../Machines/Atari/2600/Atari2600.hpp" QT_BEGIN_NAMESPACE @@ -92,6 +92,7 @@ class MainWindow : public QMainWindow, public Outputs::Speaker::Speaker::Delegat void start_macintosh(); void start_msx(); void start_oric(); + void start_spectrum(); void start_vic20(); void start_zx80(); void start_zx81(); diff --git a/OSBindings/Qt/mainwindow.ui b/OSBindings/Qt/mainwindow.ui index ed2fb7835..95a835436 100644 --- a/OSBindings/Qt/mainwindow.ui +++ b/OSBindings/Qt/mainwindow.ui @@ -533,6 +533,55 @@ + + + Spectrum + + + + + + + + + + Model: + + + + + + + + +2a + + + + + +3 + + + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + Vic-20