1
0
mirror of https://github.com/RPCS3/rpcs3.git synced 2024-11-22 02:32:36 +01:00

Add dev_flash2+3

This commit is contained in:
clienthax 2021-04-17 15:22:17 +01:00 committed by Ivan
parent 7a9561b966
commit 68fa377d13
6 changed files with 38 additions and 0 deletions

View File

@ -19,6 +19,8 @@ lv2_fs_mount_point g_mp_sys_dev_usb{"", 512, 4096, lv2_mp_flag::no_uid_gid};
lv2_fs_mount_point g_mp_sys_dev_bdvd{"", 2048, 65536, lv2_mp_flag::read_only + lv2_mp_flag::no_uid_gid};
lv2_fs_mount_point g_mp_sys_host_root{"", 512, 512, lv2_mp_flag::strict_get_block_size + lv2_mp_flag::no_uid_gid};
lv2_fs_mount_point g_mp_sys_dev_flash{"", 512, 8192, lv2_mp_flag::read_only + lv2_mp_flag::no_uid_gid};
lv2_fs_mount_point g_mp_sys_dev_flash2{ "", 512, 8192, lv2_mp_flag::no_uid_gid }; // TODO confirm
lv2_fs_mount_point g_mp_sys_dev_flash3{ "", 512, 8192, lv2_mp_flag::read_only + lv2_mp_flag::no_uid_gid }; // TODO confirm
bool verify_mself(const fs::file& mself_file)
{
@ -119,6 +121,10 @@ lv2_fs_mount_point* lv2_fs_object::get_mp(std::string_view filename)
return &g_mp_sys_host_root;
if (mp_name == "dev_flash"sv)
return &g_mp_sys_dev_flash;
if (mp_name == "dev_flash2"sv)
return &g_mp_sys_dev_flash2;
if (mp_name == "dev_flash3"sv)
return &g_mp_sys_dev_flash3;
// Default
return &g_mp_sys_dev_hdd0;

View File

@ -196,6 +196,8 @@ void Emulator::Init(bool add_only)
const std::string dev_hdd1 = g_cfg.vfs.get(g_cfg.vfs.dev_hdd1, emu_dir);
const std::string dev_usb = g_cfg.vfs.get(g_cfg.vfs.dev_usb000, emu_dir);
const std::string dev_flsh = g_cfg.vfs.get_dev_flash();
const std::string dev_flsh2 = g_cfg.vfs.get_dev_flash2();
const std::string dev_flsh3 = g_cfg.vfs.get_dev_flash3();
auto make_path_verbose = [](const std::string& path)
{
@ -213,6 +215,8 @@ void Emulator::Init(bool add_only)
make_path_verbose(dev_hdd0);
make_path_verbose(dev_hdd1);
make_path_verbose(dev_flsh);
make_path_verbose(dev_flsh2);
make_path_verbose(dev_flsh3);
make_path_verbose(dev_usb);
make_path_verbose(dev_hdd0 + "game/");
make_path_verbose(dev_hdd0 + "game/TEST12345/");
@ -1161,6 +1165,8 @@ game_boot_result Emulator::Load(const std::string& title_id, bool add_only, bool
// Mount default relative path to non-existent directory
vfs::mount("/dev_hdd0", g_cfg.vfs.get(g_cfg.vfs.dev_hdd0, emu_dir));
vfs::mount("/dev_flash", g_cfg.vfs.get_dev_flash());
vfs::mount("/dev_flash2", g_cfg.vfs.get_dev_flash2());
vfs::mount("/dev_flash3", g_cfg.vfs.get_dev_flash3());
vfs::mount("/dev_usb", g_cfg.vfs.get(g_cfg.vfs.dev_usb000, emu_dir));
vfs::mount("/dev_usb000", g_cfg.vfs.get(g_cfg.vfs.dev_usb000, emu_dir));
vfs::mount("/app_home", g_cfg.vfs.app_home.to_string().empty() ? elf_dir + '/' : g_cfg.vfs.get(g_cfg.vfs.app_home, emu_dir));

View File

@ -87,6 +87,8 @@ struct cfg_root : cfg::node
cfg::string dev_hdd0{ this, "/dev_hdd0/", "$(EmulatorDir)dev_hdd0/" };
cfg::string dev_hdd1{ this, "/dev_hdd1/", "$(EmulatorDir)dev_hdd1/" };
cfg::string dev_flash{ this, "/dev_flash/", "$(EmulatorDir)dev_flash/" };
cfg::string dev_flash2{ this, "/dev_flash2/", "$(EmulatorDir)dev_flash2/" };
cfg::string dev_flash3{ this, "/dev_flash3/", "$(EmulatorDir)dev_flash3/" };
cfg::string dev_usb000{ this, "/dev_usb000/", "$(EmulatorDir)dev_usb000/" };
cfg::string dev_bdvd{ this, "/dev_bdvd/" }; // Not mounted
cfg::string app_home{ this, "/app_home/" }; // Not mounted
@ -96,6 +98,16 @@ struct cfg_root : cfg::node
return get(dev_flash);
}
std::string get_dev_flash2() const
{
return get(dev_flash2);
}
std::string get_dev_flash3() const
{
return get(dev_flash3);
}
cfg::_bool host_root{ this, "Enable /host_root/" };
cfg::_bool init_dirs{ this, "Initialize Directories", true };

View File

@ -154,6 +154,8 @@ enum class emu_settings_type
dev_hdd0Location,
dev_hdd1Location,
dev_flashLocation,
dev_flash2Location,
dev_flash3Location,
dev_usb000Location,
};
@ -309,5 +311,7 @@ inline static const QMap<emu_settings_type, cfg_location> settings_location =
{ emu_settings_type::dev_hdd0Location, { "VFS", "/dev_hdd0/" }},
{ emu_settings_type::dev_hdd1Location, { "VFS", "/dev_hdd1/" }},
{ emu_settings_type::dev_flashLocation, { "VFS", "/dev_flash/"}},
{ emu_settings_type::dev_flash2Location, { "VFS", "/dev_flash2/"}},
{ emu_settings_type::dev_flash3Location, { "VFS", "/dev_flash3/"}},
{ emu_settings_type::dev_usb000Location, { "VFS", "/dev_usb000/"}},
};

View File

@ -173,6 +173,8 @@ namespace gui
const gui_save fs_dev_hdd0_list = gui_save(fs, "dev_hdd0_list", QStringList());
const gui_save fs_dev_hdd1_list = gui_save(fs, "dev_hdd1_list", QStringList());
const gui_save fs_dev_flash_list = gui_save(fs, "dev_flash_list", QStringList());
const gui_save fs_dev_flash2_list = gui_save(fs, "dev_flash2_list", QStringList());
const gui_save fs_dev_flash3_list = gui_save(fs, "dev_flash3_list", QStringList());
const gui_save fs_dev_usb000_list = gui_save(fs, "dev_usb000_list", QStringList());
const gui_save l_tty = gui_save(logger, "TTY", true);

View File

@ -35,6 +35,12 @@ vfs_dialog::vfs_dialog(std::shared_ptr<gui_settings> guiSettings, std::shared_pt
vfs_dialog_tab* dev_flash_tab = new vfs_dialog_tab({ "dev_flash", emu_settings_type::dev_flashLocation, gui::fs_dev_flash_list, &g_cfg.vfs.dev_flash },
m_gui_settings, m_emu_settings, this);
vfs_dialog_tab* dev_flash2_tab = new vfs_dialog_tab({ "dev_flash2", emu_settings_type::dev_flash2Location, gui::fs_dev_flash2_list, &g_cfg.vfs.dev_flash2 },
m_gui_settings, m_emu_settings, this);
vfs_dialog_tab* dev_flash3_tab = new vfs_dialog_tab({ "dev_flash3", emu_settings_type::dev_flash3Location, gui::fs_dev_flash3_list, &g_cfg.vfs.dev_flash3 },
m_gui_settings, m_emu_settings, this);
vfs_dialog_tab* dev_usb000_tab = new vfs_dialog_tab({ "dev_usb000", emu_settings_type::dev_usb000Location, gui::fs_dev_usb000_list, &g_cfg.vfs.dev_usb000 },
m_gui_settings, m_emu_settings, this);
@ -42,6 +48,8 @@ vfs_dialog::vfs_dialog(std::shared_ptr<gui_settings> guiSettings, std::shared_pt
tabs->addTab(dev_hdd0_tab, "dev_hdd0");
tabs->addTab(dev_hdd1_tab, "dev_hdd1");
tabs->addTab(dev_flash_tab, "dev_flash");
tabs->addTab(dev_flash2_tab, "dev_flash2");
tabs->addTab(dev_flash3_tab, "dev_flash3");
tabs->addTab(dev_usb000_tab, "dev_usb000");
// Create buttons