Skip to content

Commit 5b03dc7

Browse files
committed
Add SPARC64 support
1 parent f217a78 commit 5b03dc7

17 files changed

+630
-205
lines changed

CHANGELOG.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,22 @@
1+
# EmuGUI v1.0.0.5306_dev "Adèle Angela" (based on v1.0.0.5305_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+
- SPARC 64-bit support has been added and the functionality is ready for testing.
18+
- In the development version 1.0.0.5305_dev, there has been a bug which didn't properly fill the text fields for the QEMU settings. That has been fixed in this development version.
19+
120
# EmuGUI v1.0.0.5305_dev "Adèle Angela" (based on v1.0.0.5304_dev)
221

322
## Changes compared to v0.8.0.5206
347 Bytes
Binary file not shown.
234 Bytes
Binary file not shown.
185 Bytes
Binary file not shown.

dialogExecution/editVMNew.py

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -274,6 +274,21 @@ def machineSparc(self, machine):
274274

275275
i += 1
276276

277+
def machineSparc64(self, machine):
278+
i = 0
279+
280+
while i < self.comboBox_21.count():
281+
if self.comboBox_21.itemText(i) == "Let QEMU decide" or self.comboBox_21.itemText(i) == "QEMU überlassen":
282+
if machine == "Let QEMU decide":
283+
self.comboBox_21.setCurrentIndex(i)
284+
break
285+
286+
elif self.comboBox_21.itemText(i) == machine:
287+
self.comboBox_21.setCurrentIndex(i)
288+
break
289+
290+
i += 1
291+
277292
def vhdAddingChange(self):
278293
if self.comboBox_2.currentText() == "Create a new virtual hard drive":
279294
# For new and existing
@@ -380,6 +395,9 @@ def archChanged(self):
380395
elif self.comboBox.currentText() == "sparc":
381396
self.stackedWidget.setCurrentIndex(4)
382397

398+
elif self.comboBox.currentText() == "sparc64":
399+
self.stackedWidget.setCurrentIndex(5)
400+
383401
def extBiosFileLocation(self):
384402
filename, filter = QFileDialog.getOpenFileName(parent=self, caption='Select BIOS file', dir='.', filter='BIN files (*.bin);;All files (*.*)')
385403

@@ -451,6 +469,10 @@ def readTempVmFile(self):
451469
self.machineSparc(vmSpecs[2])
452470
self.spinBox_7.setValue(int(vmSpecs[4]))
453471

472+
elif vmSpecs[1] == "sparc64":
473+
self.machineSparc64(vmSpecs[2])
474+
self.spinBox_8.setValue(int(vmSpecs[4]))
475+
454476
if vmSpecs[5] != "NULL":
455477
self.lineEdit_2.setText(vmSpecs[5])
456478
i = 0
@@ -612,6 +634,11 @@ def finishCreation(self):
612634
cpu = "Let QEMU decide"
613635
ram = self.spinBox_7.value()
614636

637+
elif self.comboBox.currentText() == "sparc64":
638+
machine = self.comboBox_21.currentText()
639+
cpu = "Let QEMU decide"
640+
ram = self.spinBox_8.value()
641+
615642
if machine == "Let QEMU decide" or machine == "QEMU überlassen":
616643
machine = "Let QEMU decide"
617644

dialogExecution/newVirtualMachine.py

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,11 @@ def connectSignalsSlots(self):
8585
self.pushButton_38.clicked.connect(self.vhdMenu)
8686
self.pushButton_39.clicked.connect(self.close)
8787

88+
# Page 2.6 (sparc64 machine preparation)
89+
self.pushButton_41.clicked.connect(self.firstStage)
90+
self.pushButton_40.clicked.connect(self.vhdMenu)
91+
self.pushButton_42.clicked.connect(self.close)
92+
8893
# Page 3 (VHD creation)
8994
self.pushButton_13.clicked.connect(self.vhdBrowseLocation)
9095
self.pushButton_16.clicked.connect(self.archSystem)
@@ -258,12 +263,15 @@ def archSystem(self):
258263

259264
elif self.comboBox.currentText() == "sparc":
260265
self.stackedWidget.setCurrentIndex(5)
266+
267+
elif self.comboBox.currentText() == "sparc64":
268+
self.stackedWidget.setCurrentIndex(6)
261269

262270
except sqlite3.Error as e:
263271
print(f"The SQLite module encountered an error: {e}.")
264272

265273
def vhdMenu(self):
266-
self.stackedWidget.setCurrentIndex(6)
274+
self.stackedWidget.setCurrentIndex(7)
267275

268276
def vhdAddingChange(self):
269277
if self.comboBox_18.currentText() == "Create a new virtual hard drive":
@@ -338,10 +346,10 @@ def firstStage(self):
338346
self.stackedWidget.setCurrentIndex(0)
339347

340348
def vgaNetworkMenu(self):
341-
self.stackedWidget.setCurrentIndex(7)
349+
self.stackedWidget.setCurrentIndex(8)
342350

343351
def extBios(self):
344-
self.stackedWidget.setCurrentIndex(8)
352+
self.stackedWidget.setCurrentIndex(9)
345353

346354
def extBiosFileLocation(self):
347355
filename, filter = QFileDialog.getOpenFileName(parent=self, caption='Select BIOS file', dir='.', filter='BIN files (*.bin);;All files (*.*)')
@@ -350,10 +358,10 @@ def extBiosFileLocation(self):
350358
self.lineEdit_8.setText(filename)
351359

352360
def soundCard(self):
353-
self.stackedWidget.setCurrentIndex(9)
361+
self.stackedWidget.setCurrentIndex(10)
354362

355363
def linuxVMSpecific(self):
356-
self.stackedWidget.setCurrentIndex(10)
364+
self.stackedWidget.setCurrentIndex(11)
357365

358366
def linuxKernelBrowseLocation(self):
359367
filename, filter = QFileDialog.getOpenFileName(parent=self, caption='Select Linux kernel', dir='.', filter='All files (*.*)')
@@ -368,7 +376,7 @@ def linuxInitridBrowseLocation(self):
368376
self.lineEdit_5.setText(filename)
369377

370378
def win2kHacker(self):
371-
self.stackedWidget.setCurrentIndex(11)
379+
self.stackedWidget.setCurrentIndex(12)
372380

373381
def finishCreation(self):
374382
# This creates your VM in the first place
@@ -410,6 +418,11 @@ def finishCreation(self):
410418
cpu = "Let QEMU decide"
411419
ram = self.spinBox_7.value()
412420

421+
elif self.comboBox.currentText() == "sparc64":
422+
machine = self.comboBox_21.currentText()
423+
cpu = "Let QEMU decide"
424+
ram = self.spinBox_8.value()
425+
413426
if machine == "Let QEMU decide" or machine == "QEMU überlassen":
414427
machine = "Let QEMU decide"
415428

dialogExecution/startVirtualMachine.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,11 @@ def start_virtual_machine(self):
229229
WHERE name = 'qemu-system-sparc';
230230
"""
231231

232+
qemu_sparc64_bin = """
233+
SELECT value FROM settings
234+
WHERE name = 'qemu-system-sparc64';
235+
"""
236+
232237
connection = self.connection
233238
cursor = connection.cursor()
234239

@@ -308,6 +313,13 @@ def start_virtual_machine(self):
308313

309314
print(result)
310315

316+
elif self.vmSpecs[1] == "sparc64":
317+
cursor.execute(qemu_sparc64_bin)
318+
connection.commit()
319+
result = cursor.fetchall()
320+
321+
print(result)
322+
311323
qemu_to_execute = result[0][0]
312324

313325
if platform.system() == "Windows":

main.py

Lines changed: 58 additions & 5 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.5305_dev (pre-release, not for production)\nCodename 'Adèle Angela'")
43-
self.setWindowTitle("EmuGUI v1.0.0.5305_dev (Development Release)")
42+
self.label_8.setText("EmuGUI v1.0.0.5306_dev (pre-release, not for production)\nCodename 'Adèle Angela'")
43+
self.setWindowTitle("EmuGUI v1.0.0.5306_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 = 5305
52+
self.versionCode = 5306
5353

5454
if platform.system() == "Windows":
5555
self.connection = platformSpecific.windowsSpecific.setupWindowsBackend()
@@ -125,6 +125,7 @@ def connectSignalsSlots(self):
125125
self.pushButton_12.clicked.connect(self.set_qemu_arm_path)
126126
self.pushButton_15.clicked.connect(self.applyGeneric)
127127
self.pushButton_13.clicked.connect(self.set_qemu_sparc_path)
128+
self.pushButton_14.clicked.connect(self.set_qemu_sparc64_path)
128129
self.label_6.setPixmap(QtGui.QPixmap("Text colourized.png"))
129130

130131
def setLanguage(self, langmode):
@@ -380,6 +381,14 @@ def prepareDatabase(self, connection):
380381
);
381382
"""
382383

384+
insert_qemu_sparc64 = """
385+
INSERT INTO settings (
386+
name
387+
) VALUES (
388+
"qemu-system-sparc64"
389+
);
390+
"""
391+
383392
# Language codes:
384393
# default: same language as system (English if not present)
385394
# en: English
@@ -495,6 +504,11 @@ def prepareDatabase(self, connection):
495504
WHERE name = "qemu-system-sparc";
496505
"""
497506

507+
select_qemu_sparc64 = """
508+
SELECT name, value FROM settings
509+
WHERE name = "qemu-system-sparc64";
510+
"""
511+
498512
select_language = """
499513
SELECT name, value FROM settings
500514
WHERE name = "lang";
@@ -755,7 +769,7 @@ def prepareDatabase(self, connection):
755769

756770
try:
757771
qemu_img_slot = str(result[0])
758-
self.lineEdit_7.setText(result[0][1])
772+
self.lineEdit_12.setText(result[0][1])
759773
print("The query was executed successfully. The qemu-system-arm slot already is in the database.")
760774

761775
except:
@@ -766,6 +780,24 @@ def prepareDatabase(self, connection):
766780
except sqlite3.Error as e:
767781
print(f"The SQLite module encountered an error: {e}.")
768782

783+
try:
784+
cursor.execute(select_qemu_sparc64)
785+
connection.commit()
786+
result = cursor.fetchall()
787+
788+
try:
789+
qemu_img_slot = str(result[0])
790+
self.lineEdit_13.setText(result[0][1])
791+
print("The query was executed successfully. The qemu-system-arm slot already is in the database.")
792+
793+
except:
794+
cursor.execute(insert_qemu_sparc64)
795+
connection.commit()
796+
print("The query was executed successfully. The qemu-system-arm slot has been created.")
797+
798+
except sqlite3.Error as e:
799+
print(f"The SQLite module encountered an error: {e}.")
800+
769801
try:
770802
cursor.execute(select_language)
771803
connection.commit()
@@ -1356,7 +1388,7 @@ def startVM(self):
13561388
dialog.exec()
13571389
break
13581390

1359-
elif architecture_of_vm == "mips64" or architecture_of_vm == "sparc":
1391+
elif architecture_of_vm == "mips64" or architecture_of_vm == "sparc" or architecture_of_vm == "sparc64":
13601392
if result_settings[i][0] == f"qemu-system-{architecture_of_vm}":
13611393
if result_settings[i][1] == "":
13621394
dialog = QemuSysMissing(self)
@@ -1562,6 +1594,12 @@ def set_qemu_sparc_path(self):
15621594
if filename:
15631595
self.lineEdit_12.setText(filename)
15641596

1597+
def set_qemu_sparc64_path(self):
1598+
filename, filter = QFileDialog.getOpenFileName(parent=self, caption='Select qemu-system-sparc64 executable', dir='.', filter='Windows executables (*.exe);;All files (*.*)')
1599+
1600+
if filename:
1601+
self.lineEdit_13.setText(filename)
1602+
15651603
def applyChangesQemu(self):
15661604
pathQemuImg = self.lineEdit_5.text()
15671605
pathQemuI386 = self.lineEdit_4.text()
@@ -1575,6 +1613,7 @@ def applyChangesQemu(self):
15751613
pathQemuAarch64 = self.lineEdit_6.text()
15761614
pathQemuArm = self.lineEdit_7.text()
15771615
pathQemuSparc = self.lineEdit_12.text()
1616+
pathQemuSparc64 = self.lineEdit_13.text()
15781617

15791618
qemu_img_update = f"""
15801619
UPDATE settings
@@ -1648,6 +1687,12 @@ def applyChangesQemu(self):
16481687
WHERE name = 'qemu-system-sparc';
16491688
"""
16501689

1690+
qemu_sparc64_update = f"""
1691+
UPDATE settings
1692+
SET value = '{pathQemuSparc64}'
1693+
WHERE name = 'qemu-system-sparc64';
1694+
"""
1695+
16511696
connection = self.connection
16521697
cursor = connection.cursor()
16531698

@@ -1747,6 +1792,14 @@ def applyChangesQemu(self):
17471792
except sqlite3.Error as e:
17481793
print(f"The SQLite module encountered an error: {e}.")
17491794

1795+
try:
1796+
cursor.execute(qemu_sparc64_update)
1797+
connection.commit()
1798+
print("The query was executed successfully.")
1799+
1800+
except sqlite3.Error as e:
1801+
print(f"The SQLite module encountered an error: {e}.")
1802+
17501803
#def applyChangesUpdate(self):
17511804
# updateMirror = self.comboBox.currentText()
17521805

0 commit comments

Comments
 (0)