Compare commits

...

27 Commits

Author SHA1 Message Date
niansa 2e31355b46 Merge branch 'disable-web-services' into 'dev'
Visually disable web services

See merge request suyu-emu/suyu!37
2024-03-07 02:43:07 +00:00
Crimson Hawk 93dcbbeccf Merge branch 'palfaiate-dev-patch-24781' into 'dev'
Removing WriteToFile method to prevent suyu from output keys

See merge request suyu-emu/suyu!62
2024-03-07 02:42:23 +00:00
Paulo Alfaiate 8633ba8769 Removing WriteToFile method to prevent suyu from output keys 2024-03-07 02:42:23 +00:00
Crimson Hawk fe65f14e69 Merge branch 'nokeywrite' into 'dev'
Removed key writeout function

See merge request suyu-emu/suyu!61
2024-03-07 01:34:45 +00:00
niansa f0b13ee2f6 Removed key writeout function 2024-03-07 02:09:30 +01:00
Crimson Hawk 3e8dc06867 Merge branch 'zqpvr-dev-patch-27409' into 'dev'
Update README.md

See merge request suyu-emu/suyu!59
2024-03-07 00:33:20 +00:00
zqpvr 3bfadff6a4 Update README.md 2024-03-07 00:12:37 +00:00
Crimson Hawk 6f0e60b8d3 Merge branch 'MattTheTekie-dev-patch-1bf8' into 'dev'
chore: more README corrections.

See merge request suyu-emu/suyu!57
2024-03-07 00:08:02 +00:00
Crimson Hawk 3ed2cc91fa Merge branch 'master' into 'dev'
Initialize .gitlab-ci.yml for build pipelines

See merge request suyu-emu/suyu!58
2024-03-07 00:05:52 +00:00
blitzingeagle d5df2ace8e Initialize .gitlab-ci.yml for build pipelines 2024-03-07 00:05:52 +00:00
MattTheTekie 099df26bf6 Update file README.md 2024-03-07 00:05:43 +00:00
Crimson-Hawk e4fc3840c1 added build guide link to wiki to readme 2024-03-07 07:56:42 +08:00
MattTheTekie 59275a47e8 Update file README.md 2024-03-06 23:56:02 +00:00
MattTheTekie 923db982f1 Update file README.md 2024-03-06 23:54:59 +00:00
MattTheTekie 036a7e5ace Update file README.md 2024-03-06 23:54:19 +00:00
MattTheTekie a4ffb72144 Update file README.md 2024-03-06 23:53:55 +00:00
MattTheTekie a3c9ddb9c8 Update file README.md 2024-03-06 23:52:17 +00:00
MattTheTekie a882e3aad2 Update file README.md 2024-03-06 23:51:55 +00:00
MattTheTekie 5c00d6e943 Update file README.md 2024-03-06 23:48:32 +00:00
MattTheTekie 357bd403b0 Update file README.md 2024-03-06 23:48:14 +00:00
MattTheTekie e29d50c295 Update file README.md 2024-03-06 23:38:57 +00:00
MattTheTekie b5ca0beb34 Merge branch 'MattTheTekie-dev-patch-da1f' into 'dev'
Update file README.md

See merge request suyu-emu/suyu!56
2024-03-06 23:31:46 +00:00
MattTheTekie 915331dc91 Update file README.md 2024-03-06 23:24:53 +00:00
MattTheTekie 1c9d3b7fe9 Merge branch 'dev-mattthetekie' into 'dev'
Correct Readme

See merge request suyu-emu/suyu!55
2024-03-06 23:18:46 +00:00
MattTheTekie 36e984c2f0 Update file README.md 2024-03-06 23:16:24 +00:00
MattTheTekie 72015483da Delete compatibility.yml 2024-03-06 23:04:47 +00:00
niansa c00745b663 Disable web services 2024-03-06 15:32:06 +01:00
8 changed files with 66 additions and 95 deletions

45
.gitlab-ci.yml Normal file
View File

@ -0,0 +1,45 @@
# This file is a template, and might need editing before it works on your project.
# This is a sample GitLab CI/CD configuration file that should run without any modifications.
# It demonstrates a basic 3 stage CI/CD pipeline. Instead of real tests or scripts,
# it uses echo commands to simulate the pipeline execution.
#
# A pipeline is composed of independent jobs that run scripts, grouped into stages.
# Stages run in sequential order, but jobs within stages run in parallel.
#
# For more information, see: https://docs.gitlab.com/ee/ci/yaml/index.html#stages
#
# You can copy and paste this template into a new `.gitlab-ci.yml` file.
# You should not add this template to an existing `.gitlab-ci.yml` file by using the `include:` keyword.
#
# To contribute improvements to CI/CD templates, please follow the Development guide at:
# https://docs.gitlab.com/ee/development/cicd/templates.html
# This specific template is located at:
# https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/ci/templates/Getting-Started.gitlab-ci.yml
stages: # List of stages for jobs, and their order of execution
- build
build-ubuntu: # This job runs in the build stage, which runs first.
stage: build
image: ubuntu:latest # Maybe replace with image with more required dependencies
before_script:
- apt update --yes
- apt install --yes cmake gcc g++ git
script:
- echo "Compiling the code..."
- git submodule update --init --recursive
- ls -la
# TODO: Add build instructions for linux
- echo "Compile complete."
build-win:
stage: build
tags:
- shared-windows
- windows
- windows-1809
script:
- echo "Compiling the code..."
- dir
# TODO: Add build instructions for windows
- echo "Compile complete."

View File

@ -5,15 +5,14 @@ SPDX-License-Identifier: GPL v3
**Note**: We do not support or condone piracy in any form. In order to use Suyu, you'll need keys from your real Switch system, and games which you have legally obtained and paid for. We do not intend to make money or profit from this project.
We are in great need of developers, join our Discord server at <a href="https://discord.gg/2gQRBp44KT">https://discord.gg/2gQRBp44KT</a>.
We are in great need of developers. Please join our Discord server below if you can help out with the project.
This repo is based on Yuzu EA 4176. Please contribute if you can!
<hr />
<h1 align="center">
<br>
<a href=""><img src="https://gitlab.com/suyu-emu/suyu/-/raw/master/dist/readme/suyu__Logo-Pill.svg" alt="suyu" height="128"></a>
<a href="https://gitlab.com/suyu-emu/suyu"><img src="dist/readme/suyu__Logo-Pill.svg" alt="suyu" height="128"></a>
<br>
<b>suyu</b>
<br>
@ -25,16 +24,10 @@ It is written in C++ with portability in mind, and we actively maintain builds f
</h4>
<p align="center">
<a href="https://dev.azure.com/suyu-emu/suyu/">
<img src="https://dev.azure.com/suyu-emu/suyu/_apis/build/status/suyu%20mainline?branchName=master"
alt="Azure Mainline CI Build Status">
</a>
</p>
<p align="center">
<a href="https://gitlab.com/suyu-emu/suyu/-/wikis/Compatibility">Compatibility</a> |
<a href="#compatibility">Compatibility</a> |
<a href="#development">Development</a> |
<a href="#building">Building</a> |
<a href="https://gitlab.com/suyu-emu/suyu/-/pipelines">Pipelines</a>
<a href="#downloads">Downloads</a> |
<a href="#support">Support</a> |
<a href="#license">License</a>
@ -48,27 +41,21 @@ We are trying to get the builds working. We are in need of developers. Join our
## Compatibility
W.I.P.
The emulator is capable of running most commercial games at full speed, provided you meet the [necessary hardware requirements](https://suyu-emu.org/help/quickstart/#hardware-requirements).
For a full list of games suyu supports, please visit our [Compatibility page](https://gitlab.com/suyu-emu/suyu/-/wikis/Compatibility).
Check out our [website](https://suyu-emu.org/) for the latest news on exciting features, monthly progress reports, and more!
Check out our [website](https://suyu.dev) for the latest news on exciting features, monthly progress reports, and more!
## Development
W.I.P.
This project is completely free and open source, this project is made possible by many people who share the same interest.
Most of the development happens on GitHub. For development discussion, please join us on [Discord](https://discord.gg/2gQRBp44KT).
Most of the development happens on GitLab. For development discussion, please join us on [Discord](https://discord.gg/2gQRBp44KT).
If you want to contribute, please take a look at the [Contributor's Guide](https://gitlab.com/suyu-emu/suyu/-/wikis/Contributing) and [Developer Information](https://gitlab.com/suyu-emu/suyu/-/wikis/Developer-Information).
You can also contact any of the developers on Discord in order to know about the current state of the emulator.
If you want to contribute to the user interface translation project, please check out the [suyu project on transifex](https://www.transifex.com/suyu-emulator/suyu). We centralize translation work there, and periodically upstream translations.
## Downloads
* __Windows__: [Legacy Artifacts](https://github.com/pineappleea/pineapple-src/releases)
@ -76,14 +63,14 @@ If you want to contribute to the user interface translation project, please chec
## Building
* __Windows__: W.I.P.
* __Linux__: W.I.P.
* __Windows__: [Wiki page](https://gitlab.com/suyu-emu/suyu/-/wikis/Building-for-Windows)
* __Linux__: [Wiki page](https://gitlab.com/suyu-emu/suyu/-/wikis/Building-for-Linux)
## Support
This project is completely free and open source, this project is made possible by many people who share the same interest. Please join the Discord server to contribute.
This project is completely free and open source, this project is made possible by many people who share the same interest. Please join the Discord server [here](https://discord.gg/2gQRBp44KT) to contribute.
## License

View File

@ -1,2 +0,0 @@
WIP
- MattTheTekie

View File

@ -609,7 +609,7 @@ struct Values {
Category::Network};
// WebService
Setting<bool> enable_telemetry{linkage, true, "enable_telemetry", Category::WebService};
Setting<bool> enable_telemetry{linkage, false, "enable_telemetry", Category::WebService};
Setting<std::string> web_api_url{linkage, "https://api.yuzu-emu.org", "web_api_url",
Category::WebService};
Setting<std::string> yuzu_username{linkage, std::string(), "yuzu_username",

View File

@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project
// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project & 2024 suyu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
#include <algorithm>
@ -372,7 +372,7 @@ Key128 DeriveKeyblobMACKey(const Key128& keyblob_key, const Key128& mac_source)
std::optional<Key128> DeriveSDSeed() {
const auto system_save_43_path =
Common::FS::GetYuzuPath(Common::FS::YuzuPath::NANDDir) / "system/save/8000000000000043";
Common::FS::GetSuyuPath(Common::FS::SuyuPath::NANDDir) / "system/save/8000000000000043";
const Common::FS::IOFile save_43{system_save_43_path, Common::FS::FileAccessMode::Read,
Common::FS::FileType::BinaryFile};
@ -381,7 +381,7 @@ std::optional<Key128> DeriveSDSeed() {
}
const auto sd_private_path =
Common::FS::GetYuzuPath(Common::FS::YuzuPath::SDMCDir) / "Nintendo/Contents/private";
Common::FS::GetSuyuPath(Common::FS::SuyuPath::SDMCDir) / "Nintendo/Contents/private";
const Common::FS::IOFile sd_private{sd_private_path, Common::FS::FileAccessMode::Read,
Common::FS::FileType::BinaryFile};
@ -640,7 +640,7 @@ KeyManager::KeyManager() {
void KeyManager::ReloadKeys() {
// Initialize keys
const auto yuzu_keys_dir = Common::FS::GetYuzuPath(Common::FS::YuzuPath::KeysDir);
const auto yuzu_keys_dir = Common::FS::GetSuyuPath(Common::FS::SuyuPath::KeysDir);
if (!Common::FS::CreateDir(yuzu_keys_dir)) {
LOG_ERROR(Core, "Failed to create the keys directory.");
@ -845,38 +845,6 @@ Key256 KeyManager::GetBISKey(u8 partition_id) const {
}
template <size_t Size>
void KeyManager::WriteKeyToFile(KeyCategory category, std::string_view keyname,
const std::array<u8, Size>& key) {
const auto yuzu_keys_dir = Common::FS::GetYuzuPath(Common::FS::YuzuPath::KeysDir);
std::string filename = "title.keys_autogenerated";
if (category == KeyCategory::Standard) {
filename = dev_mode ? "dev.keys_autogenerated" : "prod.keys_autogenerated";
} else if (category == KeyCategory::Console) {
filename = "console.keys_autogenerated";
}
const auto path = yuzu_keys_dir / filename;
const auto add_info_text = !Common::FS::Exists(path);
Common::FS::IOFile file{path, Common::FS::FileAccessMode::Append,
Common::FS::FileType::TextFile};
if (!file.IsOpen()) {
return;
}
if (add_info_text) {
void(file.WriteString(
"# This file is autogenerated by Yuzu\n"
"# It serves to store keys that were automatically generated from the normal keys\n"
"# If you are experiencing issues involving keys, it may help to delete this file\n"));
}
void(file.WriteString(fmt::format("\n{} = {}", keyname, Common::HexToString(key))));
LoadFromFile(path, category == KeyCategory::Title);
}
void KeyManager::SetKey(S128KeyType id, Key128 key, u64 field1, u64 field2) {
if (s128_keys.find({id, field1, field2}) != s128_keys.end() || key == Key128{}) {
@ -886,7 +854,6 @@ void KeyManager::SetKey(S128KeyType id, Key128 key, u64 field1, u64 field2) {
Key128 rights_id;
std::memcpy(rights_id.data(), &field2, sizeof(u64));
std::memcpy(rights_id.data() + sizeof(u64), &field1, sizeof(u64));
WriteKeyToFile(KeyCategory::Title, Common::HexToString(rights_id), key);
}
auto category = KeyCategory::Standard;
@ -901,7 +868,6 @@ void KeyManager::SetKey(S128KeyType id, Key128 key, u64 field1, u64 field2) {
std::tie(id, field1, field2);
});
if (iter2 != s128_file_id.end()) {
WriteKeyToFile(category, iter2->first, key);
}
// Variable cases
@ -911,21 +877,6 @@ void KeyManager::SetKey(S128KeyType id, Key128 key, u64 field1, u64 field2) {
"key_area_key_ocean_{:02X}",
"key_area_key_system_{:02X}",
};
WriteKeyToFile(category, fmt::format(fmt::runtime(kak_names.at(field2)), field1), key);
} else if (id == S128KeyType::Master) {
WriteKeyToFile(category, fmt::format("master_key_{:02X}", field1), key);
} else if (id == S128KeyType::Package1) {
WriteKeyToFile(category, fmt::format("package1_key_{:02X}", field1), key);
} else if (id == S128KeyType::Package2) {
WriteKeyToFile(category, fmt::format("package2_key_{:02X}", field1), key);
} else if (id == S128KeyType::Titlekek) {
WriteKeyToFile(category, fmt::format("titlekek_{:02X}", field1), key);
} else if (id == S128KeyType::Keyblob) {
WriteKeyToFile(category, fmt::format("keyblob_key_{:02X}", field1), key);
} else if (id == S128KeyType::KeyblobMAC) {
WriteKeyToFile(category, fmt::format("keyblob_mac_key_{:02X}", field1), key);
} else if (id == S128KeyType::Source && field1 == static_cast<u64>(SourceKeyType::Keyblob)) {
WriteKeyToFile(category, fmt::format("keyblob_key_source_{:02X}", field2), key);
}
s128_keys[{id, field1, field2}] = key;
@ -940,14 +891,11 @@ void KeyManager::SetKey(S256KeyType id, Key256 key, u64 field1, u64 field2) {
return std::tie(elem.second.type, elem.second.field1, elem.second.field2) ==
std::tie(id, field1, field2);
});
if (iter != s256_file_id.end()) {
WriteKeyToFile(KeyCategory::Standard, iter->first, key);
}
s256_keys[{id, field1, field2}] = key;
}
bool KeyManager::KeyFileExists(bool title) {
const auto yuzu_keys_dir = Common::FS::GetYuzuPath(Common::FS::YuzuPath::KeysDir);
const auto yuzu_keys_dir = Common::FS::GetSuyuPath(Common::FS::SuyuPath::KeysDir);
if (title) {
return Common::FS::Exists(yuzu_keys_dir / "title.keys");
@ -1052,8 +1000,6 @@ void KeyManager::DeriveBase() {
// Decrypt keyblob
if (keyblobs[i] == std::array<u8, 0x90>{}) {
keyblobs[i] = DecryptKeyblob(encrypted_keyblobs[i], key);
WriteKeyToFile<0x90>(KeyCategory::Console, fmt::format("keyblob_{:02X}", i),
keyblobs[i]);
}
Key128 package1;
@ -1183,7 +1129,6 @@ void KeyManager::DeriveETicket(PartitionDataManager& data,
data.DecryptProdInfo(GetBISKey(0));
eticket_extended_kek = data.GetETicketExtendedKek();
WriteKeyToFile(KeyCategory::Console, "eticket_extended_kek", eticket_extended_kek);
DeriveETicketRSAKey();
PopulateTickets();
}
@ -1197,7 +1142,7 @@ void KeyManager::PopulateTickets() {
std::vector<Ticket> tickets;
const auto system_save_e1_path =
Common::FS::GetYuzuPath(Common::FS::YuzuPath::NANDDir) / "system/save/80000000000000e1";
Common::FS::GetSuyuPath(Common::FS::SuyuPath::NANDDir) / "system/save/80000000000000e1";
if (Common::FS::Exists(system_save_e1_path)) {
const Common::FS::IOFile save_e1{system_save_e1_path, Common::FS::FileAccessMode::Read,
Common::FS::FileType::BinaryFile};
@ -1206,7 +1151,7 @@ void KeyManager::PopulateTickets() {
}
const auto system_save_e2_path =
Common::FS::GetYuzuPath(Common::FS::YuzuPath::NANDDir) / "system/save/80000000000000e2";
Common::FS::GetSuyuPath(Common::FS::SuyuPath::NANDDir) / "system/save/80000000000000e2";
if (Common::FS::Exists(system_save_e2_path)) {
const Common::FS::IOFile save_e2{system_save_e2_path, Common::FS::FileAccessMode::Read,
Common::FS::FileType::BinaryFile};
@ -1261,8 +1206,6 @@ void KeyManager::PopulateFromPartitionData(PartitionDataManager& data) {
continue;
}
encrypted_keyblobs[i] = data.GetEncryptedKeyblob(i);
WriteKeyToFile<0xB0>(KeyCategory::Console, fmt::format("encrypted_keyblob_{:02X}", i),
encrypted_keyblobs[i]);
}
SetKeyWrapped(S128KeyType::Source, data.GetPackage2KeySource(),

View File

@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project
// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project & 2024 suyu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
#pragma once
@ -315,8 +315,6 @@ private:
void LoadFromFile(const std::filesystem::path& file_path, bool is_title_keys);
template <size_t Size>
void WriteKeyToFile(KeyCategory category, std::string_view keyname,
const std::array<u8, Size>& key);
void DeriveGeneralPurposeKeys(std::size_t crypto_revision);

View File

@ -2,6 +2,9 @@
<ui version="4.0">
<class>ConfigureWeb</class>
<widget class="QWidget" name="ConfigureWeb">
<property name="enabled">
<bool>false</bool>
</property>
<property name="geometry">
<rect>
<x>0</x>

View File

@ -429,9 +429,6 @@ GMainWindow::GMainWindow(std::unique_ptr<QtConfig> config_, bool has_broken_vulk
game_list->LoadCompatibilityList();
game_list->PopulateAsync(UISettings::values.game_dirs);
// Show one-time "callout" messages to the user
ShowTelemetryCallout();
// make sure menubar has the arrow cursor instead of inheriting from this
ui->menubar->setCursor(QCursor());
statusBar()->setCursor(QCursor());