Support for auto-mount of boot0-3.vhd
This commit is contained in:
30
user_io.cpp
30
user_io.cpp
@@ -825,7 +825,7 @@ void user_io_init(const char *path, const char *xml)
|
||||
// check for multipart rom
|
||||
for (char i = 0; i < 4; i++)
|
||||
{
|
||||
sprintf(mainpath, "%s/boot%i.rom", user_io_get_core_path(), i);
|
||||
sprintf(mainpath, "%s/boot%d.rom", user_io_get_core_path(), i);
|
||||
user_io_file_tx(mainpath, i << 6);
|
||||
}
|
||||
}
|
||||
@@ -868,15 +868,35 @@ void user_io_init(const char *path, const char *xml)
|
||||
}
|
||||
|
||||
// check if vhd present
|
||||
for (char i = 0; i < 4; i++)
|
||||
{
|
||||
sprintf(mainpath, "%s/boot%d.vhd", user_io_get_core_path(), i);
|
||||
if (FileExists(mainpath))
|
||||
{
|
||||
user_io_set_index(i << 6);
|
||||
user_io_file_mount(mainpath, i);
|
||||
}
|
||||
}
|
||||
|
||||
sprintf(mainpath, "%s/boot.vhd", user_io_get_core_path());
|
||||
user_io_set_index(0);
|
||||
if (!user_io_file_mount(mainpath))
|
||||
if (FileExists(mainpath))
|
||||
{
|
||||
user_io_set_index(0);
|
||||
user_io_file_mount(mainpath, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
strcpy(name + strlen(name) - 3, "VHD");
|
||||
sprintf(mainpath, "%s/%s", get_rbf_dir(), name);
|
||||
if (!get_rbf_dir()[0] || !user_io_file_mount(mainpath))
|
||||
if (FileExists(mainpath))
|
||||
{
|
||||
user_io_file_mount(name);
|
||||
user_io_set_index(0);
|
||||
user_io_file_mount(mainpath, 0);
|
||||
}
|
||||
else if (FileExists(name))
|
||||
{
|
||||
user_io_set_index(0);
|
||||
user_io_file_mount(name, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user