Skip to content

Commit f217a78

Browse files
committed
Add SPARC32 support
1 parent 32e2151 commit f217a78

18 files changed

+726
-191
lines changed

CHANGELOG.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,20 @@
1+
# EmuGUI v1.0.0.5305_dev "Adèle Angela" (based on v1.0.0.5304_dev)
2+
3+
## Changes compared to v0.8.0.5206
4+
5+
- The old feature list has been updated beforehand.
6+
- The updater has been removed due to some unexpected complications.
7+
- The database now supports the keyboard layout selection, which hasn't been implemented as of yet.
8+
- This release is now GitHub-only due to some unexpected complications.
9+
- You can now select different keyboard layouts.
10+
- The version string has been moved to the About section and is also shown in the title of the main window.
11+
- The main window now scales its content when resized.
12+
- The codename will be shown in the About section as well.
13+
- The license file has been updated with the copyright information.
14+
- The readme has been updated so it fits the current circumstances.
15+
- SPARC 32-bit support has been added and the functionality is ready for testing.
16+
- The old feature list is updated so it fits the current circumstances.
17+
118
# EmuGUI v1.0.0.5304_dev "Adèle Angela" (based on v1.0.0.5303_dev)
219

320
## Changes compared to v0.8.0.5206
513 Bytes
Binary file not shown.
232 Bytes
Binary file not shown.
195 Bytes
Binary file not shown.

dialogExecution/editVMNew.py

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,21 @@ def machineCpuAarch64(self, machine, cpu):
259259

260260
i += 1
261261

262+
def machineSparc(self, machine):
263+
i = 0
264+
265+
while i < self.comboBox_20.count():
266+
if self.comboBox_20.itemText(i) == "Let QEMU decide" or self.comboBox_20.itemText(i) == "QEMU überlassen":
267+
if machine == "Let QEMU decide":
268+
self.comboBox_20.setCurrentIndex(i)
269+
break
270+
271+
elif self.comboBox_20.itemText(i) == machine:
272+
self.comboBox_20.setCurrentIndex(i)
273+
break
274+
275+
i += 1
276+
262277
def vhdAddingChange(self):
263278
if self.comboBox_2.currentText() == "Create a new virtual hard drive":
264279
# For new and existing
@@ -362,6 +377,9 @@ def archChanged(self):
362377
elif self.comboBox.currentText() == "arm" or self.comboBox.currentText() == "aarch64":
363378
self.stackedWidget.setCurrentIndex(3)
364379

380+
elif self.comboBox.currentText() == "sparc":
381+
self.stackedWidget.setCurrentIndex(4)
382+
365383
def extBiosFileLocation(self):
366384
filename, filter = QFileDialog.getOpenFileName(parent=self, caption='Select BIOS file', dir='.', filter='BIN files (*.bin);;All files (*.*)')
367385

@@ -429,6 +447,10 @@ def readTempVmFile(self):
429447
self.machineCpuAarch64(vmSpecs[2], vmSpecs[3])
430448
self.spinBox_5.setValue(int(vmSpecs[4]))
431449

450+
elif vmSpecs[1] == "sparc":
451+
self.machineSparc(vmSpecs[2])
452+
self.spinBox_7.setValue(int(vmSpecs[4]))
453+
432454
if vmSpecs[5] != "NULL":
433455
self.lineEdit_2.setText(vmSpecs[5])
434456
i = 0
@@ -585,6 +607,11 @@ def finishCreation(self):
585607
cpu = self.comboBox_17.currentText()
586608
ram = self.spinBox_5.value()
587609

610+
elif self.comboBox.currentText() == "sparc":
611+
machine = self.comboBox_20.currentText()
612+
cpu = "Let QEMU decide"
613+
ram = self.spinBox_7.value()
614+
588615
if machine == "Let QEMU decide" or machine == "QEMU überlassen":
589616
machine = "Let QEMU decide"
590617

dialogExecution/newVirtualMachine.py

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,11 @@ def connectSignalsSlots(self):
8080
self.pushButton_34.clicked.connect(self.vhdMenu)
8181
self.pushButton_35.clicked.connect(self.close)
8282

83+
# Page 2.5 (sparc machine preparation)
84+
self.pushButton_37.clicked.connect(self.firstStage)
85+
self.pushButton_38.clicked.connect(self.vhdMenu)
86+
self.pushButton_39.clicked.connect(self.close)
87+
8388
# Page 3 (VHD creation)
8489
self.pushButton_13.clicked.connect(self.vhdBrowseLocation)
8590
self.pushButton_16.clicked.connect(self.archSystem)
@@ -250,12 +255,15 @@ def archSystem(self):
250255

251256
elif self.comboBox.currentText() == "aarch64" or self.comboBox.currentText() == "arm":
252257
self.stackedWidget.setCurrentIndex(4)
258+
259+
elif self.comboBox.currentText() == "sparc":
260+
self.stackedWidget.setCurrentIndex(5)
253261

254262
except sqlite3.Error as e:
255263
print(f"The SQLite module encountered an error: {e}.")
256264

257265
def vhdMenu(self):
258-
self.stackedWidget.setCurrentIndex(5)
266+
self.stackedWidget.setCurrentIndex(6)
259267

260268
def vhdAddingChange(self):
261269
if self.comboBox_18.currentText() == "Create a new virtual hard drive":
@@ -330,10 +338,10 @@ def firstStage(self):
330338
self.stackedWidget.setCurrentIndex(0)
331339

332340
def vgaNetworkMenu(self):
333-
self.stackedWidget.setCurrentIndex(6)
341+
self.stackedWidget.setCurrentIndex(7)
334342

335343
def extBios(self):
336-
self.stackedWidget.setCurrentIndex(7)
344+
self.stackedWidget.setCurrentIndex(8)
337345

338346
def extBiosFileLocation(self):
339347
filename, filter = QFileDialog.getOpenFileName(parent=self, caption='Select BIOS file', dir='.', filter='BIN files (*.bin);;All files (*.*)')
@@ -342,10 +350,10 @@ def extBiosFileLocation(self):
342350
self.lineEdit_8.setText(filename)
343351

344352
def soundCard(self):
345-
self.stackedWidget.setCurrentIndex(8)
353+
self.stackedWidget.setCurrentIndex(9)
346354

347355
def linuxVMSpecific(self):
348-
self.stackedWidget.setCurrentIndex(9)
356+
self.stackedWidget.setCurrentIndex(10)
349357

350358
def linuxKernelBrowseLocation(self):
351359
filename, filter = QFileDialog.getOpenFileName(parent=self, caption='Select Linux kernel', dir='.', filter='All files (*.*)')
@@ -360,7 +368,7 @@ def linuxInitridBrowseLocation(self):
360368
self.lineEdit_5.setText(filename)
361369

362370
def win2kHacker(self):
363-
self.stackedWidget.setCurrentIndex(10)
371+
self.stackedWidget.setCurrentIndex(11)
364372

365373
def finishCreation(self):
366374
# This creates your VM in the first place
@@ -397,6 +405,11 @@ def finishCreation(self):
397405
cpu = self.comboBox_15.currentText()
398406
ram = self.spinBox_5.value()
399407

408+
elif self.comboBox.currentText() == "sparc":
409+
machine = self.comboBox_20.currentText()
410+
cpu = "Let QEMU decide"
411+
ram = self.spinBox_7.value()
412+
400413
if machine == "Let QEMU decide" or machine == "QEMU überlassen":
401414
machine = "Let QEMU decide"
402415

dialogExecution/startVirtualMachine.py

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,11 @@ def start_virtual_machine(self):
224224
WHERE name = 'qemu-system-arm';
225225
"""
226226

227+
qemu_sparc_bin = """
228+
SELECT value FROM settings
229+
WHERE name = 'qemu-system-sparc';
230+
"""
231+
227232
connection = self.connection
228233
cursor = connection.cursor()
229234

@@ -296,6 +301,13 @@ def start_virtual_machine(self):
296301

297302
print(result)
298303

304+
elif self.vmSpecs[1] == "sparc":
305+
cursor.execute(qemu_sparc_bin)
306+
connection.commit()
307+
result = cursor.fetchall()
308+
309+
print(result)
310+
299311
qemu_to_execute = result[0][0]
300312

301313
if platform.system() == "Windows":
@@ -337,7 +349,7 @@ def start_virtual_machine(self):
337349
qemu_cmd = qemu_cmd + f" -vga {self.vmSpecs[6]}"
338350

339351
if self.vmSpecs[7] != "none":
340-
if self.vmSpecs[1] == "i386" or self.vmSpecs[1] == "x86_64" or self.vmSpecs[1] == "ppc" or self.vmSpecs[1] == "ppc64":
352+
if self.vmSpecs[1] == "i386" or self.vmSpecs[1] == "x86_64" or self.vmSpecs[1] == "ppc" or self.vmSpecs[1] == "ppc64" or self.vmSpecs[1] == "sparc":
341353
qemu_cmd = qemu_cmd + f" -net nic,model={self.vmSpecs[7]} -net user"
342354

343355
elif self.vmSpecs[1] == "mips64el" or self.vmSpecs[1] == "mipsel":

doc/OLD_FEATURES.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ EmuGUI's depreciation policy for built-in features is as follows: When one featu
1414
| ------- | ----- | ------------------------- | ------------------------------------- | ----------------------- |
1515
| USB Tablet checkbox | Depreciated | 0.4 | 5 | A combobox with more possibilities has been created |
1616
| Windows 2000 checkbox | Depreciated | 0.6.5 | 7 | Rather prevents you from installing the OS in question than helping you |
17-
| doc/TESTED.md compatibility list | Depreciated | 0.7.2.5108 | 8 | It's not very productive to use two versions of the same file. Please visit the EmuGUI wiki on the stable repository on Codeberg instead. |
17+
| doc/TESTED.md compatibility list | Depreciated | 0.7.2.5108 | 8 | It's not very productive to use two versions of the same file. Please visit the EmuGUI wiki on the stable repository on GitHub instead. |
1818
| Icelake-Client x86 CPU | Depreciated | 0.7.6.5112 | 8 | This CPU has been removed from QEMU 7.1 already, although EmuGUI is going to keep it for compatibility reasons (for now). Please change the CPU as soon as possible. |
1919

2020
## Supported host operating systems

main.py

Lines changed: 57 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ def __init__(self, parent=None):
3939
self.connectSignalsSlots()
4040
self.timer = QTimer()
4141
self.timer.timeout.connect(self.updateVmList)
42-
self.label_8.setText("EmuGUI v1.0.0.5304_dev (pre-release, not for production)\nCodename 'Adèle Angela'")
43-
self.setWindowTitle("EmuGUI v1.0.0.5304_dev (Development Release)")
42+
self.label_8.setText("EmuGUI v1.0.0.5305_dev (pre-release, not for production)\nCodename 'Adèle Angela'")
43+
self.setWindowTitle("EmuGUI v1.0.0.5305_dev (Development Release)")
4444
self.languageInUse = "system"
4545

4646
try:
@@ -49,7 +49,7 @@ def __init__(self, parent=None):
4949
except:
5050
pass
5151

52-
self.versionCode = 5304
52+
self.versionCode = 5305
5353

5454
if platform.system() == "Windows":
5555
self.connection = platformSpecific.windowsSpecific.setupWindowsBackend()
@@ -124,6 +124,7 @@ def connectSignalsSlots(self):
124124
self.pushButton_7.clicked.connect(self.set_qemu_aarch64_path)
125125
self.pushButton_12.clicked.connect(self.set_qemu_arm_path)
126126
self.pushButton_15.clicked.connect(self.applyGeneric)
127+
self.pushButton_13.clicked.connect(self.set_qemu_sparc_path)
127128
self.label_6.setPixmap(QtGui.QPixmap("Text colourized.png"))
128129

129130
def setLanguage(self, langmode):
@@ -371,6 +372,14 @@ def prepareDatabase(self, connection):
371372
);
372373
"""
373374

375+
insert_qemu_sparc = """
376+
INSERT INTO settings (
377+
name
378+
) VALUES (
379+
"qemu-system-sparc"
380+
);
381+
"""
382+
374383
# Language codes:
375384
# default: same language as system (English if not present)
376385
# en: English
@@ -481,6 +490,11 @@ def prepareDatabase(self, connection):
481490
WHERE name = "qemu-system-arm";
482491
"""
483492

493+
select_qemu_sparc = """
494+
SELECT name, value FROM settings
495+
WHERE name = "qemu-system-sparc";
496+
"""
497+
484498
select_language = """
485499
SELECT name, value FROM settings
486500
WHERE name = "lang";
@@ -734,6 +748,24 @@ def prepareDatabase(self, connection):
734748
except sqlite3.Error as e:
735749
print(f"The SQLite module encountered an error: {e}.")
736750

751+
try:
752+
cursor.execute(select_qemu_sparc)
753+
connection.commit()
754+
result = cursor.fetchall()
755+
756+
try:
757+
qemu_img_slot = str(result[0])
758+
self.lineEdit_7.setText(result[0][1])
759+
print("The query was executed successfully. The qemu-system-arm slot already is in the database.")
760+
761+
except:
762+
cursor.execute(insert_qemu_sparc)
763+
connection.commit()
764+
print("The query was executed successfully. The qemu-system-arm slot has been created.")
765+
766+
except sqlite3.Error as e:
767+
print(f"The SQLite module encountered an error: {e}.")
768+
737769
try:
738770
cursor.execute(select_language)
739771
connection.commit()
@@ -1324,7 +1356,7 @@ def startVM(self):
13241356
dialog.exec()
13251357
break
13261358

1327-
elif architecture_of_vm == "mips64":
1359+
elif architecture_of_vm == "mips64" or architecture_of_vm == "sparc":
13281360
if result_settings[i][0] == f"qemu-system-{architecture_of_vm}":
13291361
if result_settings[i][1] == "":
13301362
dialog = QemuSysMissing(self)
@@ -1524,6 +1556,12 @@ def set_qemu_arm_path(self):
15241556
if filename:
15251557
self.lineEdit_7.setText(filename)
15261558

1559+
def set_qemu_sparc_path(self):
1560+
filename, filter = QFileDialog.getOpenFileName(parent=self, caption='Select qemu-system-sparc executable', dir='.', filter='Windows executables (*.exe);;All files (*.*)')
1561+
1562+
if filename:
1563+
self.lineEdit_12.setText(filename)
1564+
15271565
def applyChangesQemu(self):
15281566
pathQemuImg = self.lineEdit_5.text()
15291567
pathQemuI386 = self.lineEdit_4.text()
@@ -1536,6 +1574,7 @@ def applyChangesQemu(self):
15361574
pathQemuMips = self.lineEdit_10.text()
15371575
pathQemuAarch64 = self.lineEdit_6.text()
15381576
pathQemuArm = self.lineEdit_7.text()
1577+
pathQemuSparc = self.lineEdit_12.text()
15391578

15401579
qemu_img_update = f"""
15411580
UPDATE settings
@@ -1603,6 +1642,12 @@ def applyChangesQemu(self):
16031642
WHERE name = 'qemu-system-arm';
16041643
"""
16051644

1645+
qemu_sparc_update = f"""
1646+
UPDATE settings
1647+
SET value = '{pathQemuSparc}'
1648+
WHERE name = 'qemu-system-sparc';
1649+
"""
1650+
16061651
connection = self.connection
16071652
cursor = connection.cursor()
16081653

@@ -1694,6 +1739,14 @@ def applyChangesQemu(self):
16941739
except sqlite3.Error as e:
16951740
print(f"The SQLite module encountered an error: {e}.")
16961741

1742+
try:
1743+
cursor.execute(qemu_sparc_update)
1744+
connection.commit()
1745+
print("The query was executed successfully.")
1746+
1747+
except sqlite3.Error as e:
1748+
print(f"The SQLite module encountered an error: {e}.")
1749+
16971750
#def applyChangesUpdate(self):
16981751
# updateMirror = self.comboBox.currentText()
16991752

0 commit comments

Comments
 (0)