Skip to content

Commit

Permalink
Add EEPROM settings
Browse files Browse the repository at this point in the history
  • Loading branch information
Libbers committed Oct 17, 2019
1 parent a1708b6 commit 86bd445
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 2 deletions.
8 changes: 7 additions & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ def reset(self):
'xqemu_path': '/path/to/xqemu',
'mcpx_path': '/path/to/mcpx.bin',
'flash_path': '/path/to/flash.bin',
'eeprom_path': '/path/to/eeprom.bin',
'hdd_path': '/path/to/hdd.img',
'hdd_locked': True,
'dvd_present': True,
Expand Down Expand Up @@ -115,6 +116,8 @@ def bindDropdownWidget(widget, var):
bindFilePicker(self.setMcpxPath, self.mcpxPath)
bindTextWidget(self.flashPath, 'flash_path')
bindFilePicker(self.setFlashPath, self.flashPath)
bindTextWidget(self.eepromPath, 'eeprom_path')
bindFilePicker(self.setEepromPath, self.eepromPath)
bindTextWidget(self.hddPath, 'hdd_path')
bindFilePicker(self.setHddPath, self.hddPath)
bindCheckWidget(self.hddLocked, 'hdd_locked')
Expand Down Expand Up @@ -229,6 +232,9 @@ def escape_path(path):
flash_path = settings.settings['flash_path']
check_path(flash_path)
flash_path_arg = escape_path(flash_path)
eeprom_path = settings.settings['eeprom_path']
check_path(eeprom_path)
eeprom_path_arg = escape_path(eeprom_path)
hdd_path = settings.settings['hdd_path']
check_path(hdd_path)
hdd_path_arg = escape_path(hdd_path)
Expand All @@ -246,7 +252,7 @@ def escape_path(path):
# Build qemu launch cmd
cmd = [xqemu_path,
'-cpu','pentium3',
'-machine','xbox%(accel_arg)s,bootrom=%(mcpx_path_arg)s%(short_anim_arg)s' % locals(),
'-machine', 'xbox%(accel_arg)s,bootrom=%(mcpx_path_arg)s,eeprom=%(eeprom_path_arg)s%(short_anim_arg)s' % locals(),
'-m', '%(sys_memory)s' % locals(),
'-bios', '%(flash_path_arg)s' % locals(),
'-drive','file=%(hdd_path_arg)s,index=0,media=disk%(hdd_lock_arg)s' % locals(),
Expand Down
35 changes: 34 additions & 1 deletion settings.ui
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<x>0</x>
<y>0</y>
<width>660</width>
<height>352</height>
<height>385</height>
</rect>
</property>
<property name="windowTitle">
Expand Down Expand Up @@ -205,6 +205,39 @@
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="eepromGroupBox">
<property name="title">
<string>EEPROM</string>
</property>
<layout class="QGridLayout" name="eepromGridLayout">
<item row="0" column="0">
<widget class="QLabel" name="eepromImageLabel">
<property name="text">
<string>EEPROM Image:</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLineEdit" name="eepromPath"/>
</item>
<item row="0" column="2">
<widget class="QPushButton" name="setEepromPath">
<property name="text">
<string>Choose...</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QLabel" name="eepromWritebackLabel">
<property name="text">
<string>EEPROM writeback is not currently supported. Changes to EEPROM will not be saved!</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="groupBox_2">
<property name="title">
Expand Down

0 comments on commit 86bd445

Please sign in to comment.