Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 276ddfe

Browse files
committedOct 17, 2019
Add EEPROM settings
1 parent a1708b6 commit 276ddfe

File tree

2 files changed

+41
-2
lines changed

2 files changed

+41
-2
lines changed
 

‎main.py

+7-1
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ def reset(self):
2727
'xqemu_path': '/path/to/xqemu',
2828
'mcpx_path': '/path/to/mcpx.bin',
2929
'flash_path': '/path/to/flash.bin',
30+
'eeprom_path': '/path/to/eeprom.bin',
3031
'hdd_path': '/path/to/hdd.img',
3132
'hdd_locked': True,
3233
'dvd_present': True,
@@ -115,6 +116,8 @@ def bindDropdownWidget(widget, var):
115116
bindFilePicker(self.setMcpxPath, self.mcpxPath)
116117
bindTextWidget(self.flashPath, 'flash_path')
117118
bindFilePicker(self.setFlashPath, self.flashPath)
119+
bindTextWidget(self.eepromPath, 'eeprom_path')
120+
bindFilePicker(self.setEepromPath, self.eepromPath)
118121
bindTextWidget(self.hddPath, 'hdd_path')
119122
bindFilePicker(self.setHddPath, self.hddPath)
120123
bindCheckWidget(self.hddLocked, 'hdd_locked')
@@ -229,6 +232,9 @@ def escape_path(path):
229232
flash_path = settings.settings['flash_path']
230233
check_path(flash_path)
231234
flash_path_arg = escape_path(flash_path)
235+
eeprom_path = settings.settings['eeprom_path']
236+
check_path(eeprom_path)
237+
eeprom_path_arg = escape_path(eeprom_path)
232238
hdd_path = settings.settings['hdd_path']
233239
check_path(hdd_path)
234240
hdd_path_arg = escape_path(hdd_path)
@@ -246,7 +252,7 @@ def escape_path(path):
246252
# Build qemu launch cmd
247253
cmd = [xqemu_path,
248254
'-cpu','pentium3',
249-
'-machine','xbox%(accel_arg)s,bootrom=%(mcpx_path_arg)s%(short_anim_arg)s' % locals(),
255+
'-machine', 'xbox%(accel_arg)s,bootrom=%(mcpx_path_arg)s,eeprom=%(eeprom_path_arg)s%(short_anim_arg)s' % locals(),
250256
'-m', '%(sys_memory)s' % locals(),
251257
'-bios', '%(flash_path_arg)s' % locals(),
252258
'-drive','file=%(hdd_path_arg)s,index=0,media=disk%(hdd_lock_arg)s' % locals(),

‎settings.ui

+34-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<x>0</x>
1111
<y>0</y>
1212
<width>660</width>
13-
<height>352</height>
13+
<height>385</height>
1414
</rect>
1515
</property>
1616
<property name="windowTitle">
@@ -205,6 +205,39 @@
205205
</layout>
206206
</widget>
207207
</item>
208+
<item>
209+
<widget class="QGroupBox" name="eepromGroupBox">
210+
<property name="title">
211+
<string>EEPROM</string>
212+
</property>
213+
<layout class="QGridLayout" name="gridLayout_3">
214+
<item row="0" column="0">
215+
<widget class="QLabel" name="eepromImageLabel">
216+
<property name="text">
217+
<string>EEPROM Image:</string>
218+
</property>
219+
</widget>
220+
</item>
221+
<item row="0" column="1">
222+
<widget class="QLineEdit" name="eepromPath"/>
223+
</item>
224+
<item row="0" column="2">
225+
<widget class="QPushButton" name="setEepromPath">
226+
<property name="text">
227+
<string>Choose...</string>
228+
</property>
229+
</widget>
230+
</item>
231+
<item row="1" column="1">
232+
<widget class="QLabel" name="eepromWritebackLabel">
233+
<property name="text">
234+
<string>EEPROM writeback is not currently supported. Changes to EEPROM will not be saved!</string>
235+
</property>
236+
</widget>
237+
</item>
238+
</layout>
239+
</widget>
240+
</item>
208241
<item>
209242
<widget class="QGroupBox" name="groupBox_2">
210243
<property name="title">

0 commit comments

Comments
 (0)
Please sign in to comment.