1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-11-26 08:49:37 +00:00

Add Qt GUI for Amiga memory selection.

This commit is contained in:
Thomas Harte 2021-12-23 11:28:44 -05:00
parent f094aa946a
commit fd569201ef
2 changed files with 99 additions and 7 deletions

View File

@ -1016,7 +1016,19 @@ void MainWindow::start_amiga() {
using Target = Analyser::Static::Amiga::Target;
auto target = std::make_unique<Target>();
/* There are no options yet for an Amiga. */
switch(ui->amigaChipRAMComboBox->currentIndex()) {
default: target->chip_ram = Target::ChipRAM::FiveHundredAndTwelveKilobytes; break;
case 1: target->chip_ram = Target::ChipRAM::OneMegabyte; break;
case 2: target->chip_ram = Target::ChipRAM::TwoMegabytes; break;
}
switch(ui->amigaFastRAMComboBox->currentIndex()) {
default: target->fast_ram = Target::FastRAM::None; break;
case 1: target->fast_ram = Target::FastRAM::OneMegabyte; break;
case 2: target->fast_ram = Target::FastRAM::TwoMegabytes; break;
case 3: target->fast_ram = Target::FastRAM::FourMegabytes; break;
case 4: target->fast_ram = Target::FastRAM::EightMegabytes; break;
}
launchTarget(std::move(target));
}
@ -1247,6 +1259,10 @@ void MainWindow::launchTarget(std::unique_ptr<Analyser::Static::Target> &&target
/* Machine selection. */ \
Tabs(machineSelectionTabs, "machineSelection"); \
\
/* Amiga. */ \
ComboBox(amigaChipRAMComboBox, "amiga.chipRAM"); \
ComboBox(amigaFastRAMComboBox, "amiga.fastRAM"); \
\
/* Apple II. */ \
ComboBox(appleIIModelComboBox, "appleII.model"); \
ComboBox(appleIIDiskControllerComboBox, "appleII.diskController"); \

View File

@ -34,12 +34,88 @@
<string>Amiga</string>
</attribute>
<layout class="QVBoxLayout" name="amigaLayout">
<item alignment="Qt::AlignTop">
<widget class="QLabel" name="amigaLabel">
<property name="text">
<string>At present only a 1mb Amiga 500 is supported.</string>
</property>
</widget>
<item>
<layout class="QHBoxLayout" name="amigaHorizontalLayout">
<item>
<layout class="QFormLayout" name="amigaFormLayout">
<item row="0" column="0">
<widget class="QLabel" name="amigaChipRAMLabel">
<property name="text">
<string>Chip RAM:</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QComboBox" name="amigaChipRAMComboBox">
<item>
<property name="text">
<string>512 kb</string>
</property>
</item>
<item>
<property name="text">
<string>1 mb</string>
</property>
</item>
<item>
<property name="text">
<string>2 mb</string>
</property>
</item>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="amigaFastRAMLabel">
<property name="text">
<string>Fast RAM:</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QComboBox" name="amigaFastRAMComboBox">
<item>
<property name="text">
<string>None</string>
</property>
</item>
<item>
<property name="text">
<string>1 mb</string>
</property>
</item>
<item>
<property name="text">
<string>2 mb</string>
</property>
</item>
<item>
<property name="text">
<string>4 mb</string>
</property>
</item>
<item>
<property name="text">
<string>8 mb</string>
</property>
</item>
</widget>
</item>
</layout>
</item>
<item>
<spacer name="amigaHSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
</layout>
</widget>