Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add path for EEPROM #57

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.browseEepromPath, 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="eepromPathLabel">
<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="browseEepromPath">
<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