mirror of
https://github.com/Lime3DS/Lime3DS
synced 2024-12-25 08:32:48 -06:00
reformat all files with clang-format
This commit is contained in:
parent
7c5a76e58b
commit
0eab948728
79 changed files with 659 additions and 707 deletions
|
@ -127,7 +127,7 @@ void DspHle::Impl::PipeWrite(DspPipe pipe_number, const std::vector<u8>& buffer)
|
||||||
case DspPipe::Audio: {
|
case DspPipe::Audio: {
|
||||||
if (buffer.size() != 4) {
|
if (buffer.size() != 4) {
|
||||||
LOG_ERROR(Audio_DSP, "DspPipe::Audio: Unexpected buffer length {} was written",
|
LOG_ERROR(Audio_DSP, "DspPipe::Audio: Unexpected buffer length {} was written",
|
||||||
buffer.size());
|
buffer.size());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -168,8 +168,8 @@ void DspHle::Impl::PipeWrite(DspPipe pipe_number, const std::vector<u8>& buffer)
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
LOG_ERROR(Audio_DSP,
|
LOG_ERROR(Audio_DSP,
|
||||||
"Application has requested unknown state transition of DSP hardware {}",
|
"Application has requested unknown state transition of DSP hardware {}",
|
||||||
buffer[0]);
|
buffer[0]);
|
||||||
dsp_state = DspState::Off;
|
dsp_state = DspState::Off;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -177,8 +177,7 @@ void DspHle::Impl::PipeWrite(DspPipe pipe_number, const std::vector<u8>& buffer)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
LOG_CRITICAL(Audio_DSP, "pipe_number = {} unimplemented",
|
LOG_CRITICAL(Audio_DSP, "pipe_number = {} unimplemented", static_cast<size_t>(pipe_number));
|
||||||
static_cast<size_t>(pipe_number));
|
|
||||||
UNIMPLEMENTED();
|
UNIMPLEMENTED();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -69,7 +69,7 @@ void Mixers::ParseConfig(DspConfiguration& config) {
|
||||||
config.output_format_dirty.Assign(0);
|
config.output_format_dirty.Assign(0);
|
||||||
state.output_format = config.output_format;
|
state.output_format = config.output_format;
|
||||||
LOG_TRACE(Audio_DSP, "mixers output_format = {}",
|
LOG_TRACE(Audio_DSP, "mixers output_format = {}",
|
||||||
static_cast<size_t>(config.output_format));
|
static_cast<size_t>(config.output_format));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (config.headphones_connected_dirty) {
|
if (config.headphones_connected_dirty) {
|
||||||
|
|
|
@ -82,7 +82,7 @@ void Source::ParseConfig(SourceConfiguration::Configuration& config,
|
||||||
|
|
||||||
if (state.rate_multiplier <= 0) {
|
if (state.rate_multiplier <= 0) {
|
||||||
LOG_ERROR(Audio_DSP, "Was given an invalid rate multiplier: source_id={} rate={}",
|
LOG_ERROR(Audio_DSP, "Was given an invalid rate multiplier: source_id={} rate={}",
|
||||||
source_id, state.rate_multiplier);
|
source_id, state.rate_multiplier);
|
||||||
state.rate_multiplier = 1.0f;
|
state.rate_multiplier = 1.0f;
|
||||||
// Note: Actual firmware starts producing garbage if this occurs.
|
// Note: Actual firmware starts producing garbage if this occurs.
|
||||||
}
|
}
|
||||||
|
@ -122,7 +122,7 @@ void Source::ParseConfig(SourceConfiguration::Configuration& config,
|
||||||
state.filters.Enable(config.simple_filter_enabled.ToBool(),
|
state.filters.Enable(config.simple_filter_enabled.ToBool(),
|
||||||
config.biquad_filter_enabled.ToBool());
|
config.biquad_filter_enabled.ToBool());
|
||||||
LOG_TRACE(Audio_DSP, "source_id={} enable_simple={} enable_biquad={}", source_id,
|
LOG_TRACE(Audio_DSP, "source_id={} enable_simple={} enable_biquad={}", source_id,
|
||||||
config.simple_filter_enabled.Value(), config.biquad_filter_enabled.Value());
|
config.simple_filter_enabled.Value(), config.biquad_filter_enabled.Value());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (config.simple_filter_dirty) {
|
if (config.simple_filter_dirty) {
|
||||||
|
@ -141,21 +141,21 @@ void Source::ParseConfig(SourceConfiguration::Configuration& config,
|
||||||
config.interpolation_dirty.Assign(0);
|
config.interpolation_dirty.Assign(0);
|
||||||
state.interpolation_mode = config.interpolation_mode;
|
state.interpolation_mode = config.interpolation_mode;
|
||||||
LOG_TRACE(Audio_DSP, "source_id={} interpolation_mode={}", source_id,
|
LOG_TRACE(Audio_DSP, "source_id={} interpolation_mode={}", source_id,
|
||||||
static_cast<size_t>(state.interpolation_mode));
|
static_cast<size_t>(state.interpolation_mode));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (config.format_dirty || config.embedded_buffer_dirty) {
|
if (config.format_dirty || config.embedded_buffer_dirty) {
|
||||||
config.format_dirty.Assign(0);
|
config.format_dirty.Assign(0);
|
||||||
state.format = config.format;
|
state.format = config.format;
|
||||||
LOG_TRACE(Audio_DSP, "source_id={} format={}", source_id,
|
LOG_TRACE(Audio_DSP, "source_id={} format={}", source_id,
|
||||||
static_cast<size_t>(state.format));
|
static_cast<size_t>(state.format));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (config.mono_or_stereo_dirty || config.embedded_buffer_dirty) {
|
if (config.mono_or_stereo_dirty || config.embedded_buffer_dirty) {
|
||||||
config.mono_or_stereo_dirty.Assign(0);
|
config.mono_or_stereo_dirty.Assign(0);
|
||||||
state.mono_or_stereo = config.mono_or_stereo;
|
state.mono_or_stereo = config.mono_or_stereo;
|
||||||
LOG_TRACE(Audio_DSP, "source_id={} mono_or_stereo={}", source_id,
|
LOG_TRACE(Audio_DSP, "source_id={} mono_or_stereo={}", source_id,
|
||||||
static_cast<size_t>(state.mono_or_stereo));
|
static_cast<size_t>(state.mono_or_stereo));
|
||||||
}
|
}
|
||||||
|
|
||||||
u32_dsp play_position = {};
|
u32_dsp play_position = {};
|
||||||
|
@ -183,14 +183,14 @@ void Source::ParseConfig(SourceConfiguration::Configuration& config,
|
||||||
false,
|
false,
|
||||||
});
|
});
|
||||||
LOG_TRACE(Audio_DSP, "enqueuing embedded addr={:#010x} len={} id={} start={}",
|
LOG_TRACE(Audio_DSP, "enqueuing embedded addr={:#010x} len={} id={} start={}",
|
||||||
config.physical_address, config.length, config.buffer_id,
|
config.physical_address, config.length, config.buffer_id,
|
||||||
static_cast<u32>(config.play_position));
|
static_cast<u32>(config.play_position));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (config.loop_related_dirty && config.loop_related != 0) {
|
if (config.loop_related_dirty && config.loop_related != 0) {
|
||||||
config.loop_related_dirty.Assign(0);
|
config.loop_related_dirty.Assign(0);
|
||||||
LOG_WARNING(Audio_DSP, "Unhandled complex loop with loop_related={:#010x}",
|
LOG_WARNING(Audio_DSP, "Unhandled complex loop with loop_related={:#010x}",
|
||||||
static_cast<u32>(config.loop_related));
|
static_cast<u32>(config.loop_related));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (config.buffer_queue_dirty) {
|
if (config.buffer_queue_dirty) {
|
||||||
|
@ -213,7 +213,7 @@ void Source::ParseConfig(SourceConfiguration::Configuration& config,
|
||||||
false,
|
false,
|
||||||
});
|
});
|
||||||
LOG_TRACE(Audio_DSP, "enqueuing queued {} addr={:#010x} len={} id={}", i,
|
LOG_TRACE(Audio_DSP, "enqueuing queued {} addr={:#010x} len={} id={}", i,
|
||||||
b.physical_address, b.length, b.buffer_id);
|
b.physical_address, b.length, b.buffer_id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
config.buffers_dirty = 0;
|
config.buffers_dirty = 0;
|
||||||
|
@ -305,8 +305,8 @@ bool Source::DequeueBuffer() {
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
LOG_WARNING(Audio_DSP,
|
LOG_WARNING(Audio_DSP,
|
||||||
"source_id={} buffer_id={} length={}: Invalid physical address {:#010x}",
|
"source_id={} buffer_id={} length={}: Invalid physical address {:#010x}",
|
||||||
source_id, buf.buffer_id, buf.length, buf.physical_address);
|
source_id, buf.buffer_id, buf.length, buf.physical_address);
|
||||||
state.current_buffer.clear();
|
state.current_buffer.clear();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -323,7 +323,7 @@ bool Source::DequeueBuffer() {
|
||||||
}
|
}
|
||||||
|
|
||||||
LOG_TRACE(Audio_DSP, "source_id={} buffer_id={} from_queue={} current_buffer.size()={}",
|
LOG_TRACE(Audio_DSP, "source_id={} buffer_id={} from_queue={} current_buffer.size()={}",
|
||||||
source_id, buf.buffer_id, buf.from_queue, state.current_buffer.size());
|
source_id, buf.buffer_id, buf.from_queue, state.current_buffer.size());
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -59,7 +59,7 @@ SDL2Sink::SDL2Sink() : impl(std::make_unique<Impl>()) {
|
||||||
device, false, &desired_audiospec, &obtained_audiospec, SDL_AUDIO_ALLOW_FREQUENCY_CHANGE);
|
device, false, &desired_audiospec, &obtained_audiospec, SDL_AUDIO_ALLOW_FREQUENCY_CHANGE);
|
||||||
if (impl->audio_device_id <= 0) {
|
if (impl->audio_device_id <= 0) {
|
||||||
LOG_CRITICAL(Audio_Sink, "SDL_OpenAudioDevice failed with code {} for device \"{}\"",
|
LOG_CRITICAL(Audio_Sink, "SDL_OpenAudioDevice failed with code {} for device \"{}\"",
|
||||||
impl->audio_device_id, Settings::values.audio_device_id);
|
impl->audio_device_id, Settings::values.audio_device_id);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -92,7 +92,7 @@ static void OnStateChanged(const Network::RoomMember::State& state) {
|
||||||
break;
|
break;
|
||||||
case Network::RoomMember::State::MacCollision:
|
case Network::RoomMember::State::MacCollision:
|
||||||
LOG_ERROR(Network, "You tried to use the same MAC-Address then another user that is "
|
LOG_ERROR(Network, "You tried to use the same MAC-Address then another user that is "
|
||||||
"connected to the Room");
|
"connected to the Room");
|
||||||
exit(1);
|
exit(1);
|
||||||
break;
|
break;
|
||||||
case Network::RoomMember::State::WrongPassword:
|
case Network::RoomMember::State::WrongPassword:
|
||||||
|
@ -101,7 +101,7 @@ static void OnStateChanged(const Network::RoomMember::State& state) {
|
||||||
break;
|
break;
|
||||||
case Network::RoomMember::State::WrongVersion:
|
case Network::RoomMember::State::WrongVersion:
|
||||||
LOG_ERROR(Network,
|
LOG_ERROR(Network,
|
||||||
"You are using a different version then the room you are trying to connect to");
|
"You are using a different version then the room you are trying to connect to");
|
||||||
exit(1);
|
exit(1);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
@ -288,9 +288,9 @@ int main(int argc, char** argv) {
|
||||||
return -1;
|
return -1;
|
||||||
case Core::System::ResultStatus::ErrorLoader_ErrorEncrypted:
|
case Core::System::ResultStatus::ErrorLoader_ErrorEncrypted:
|
||||||
LOG_CRITICAL(Frontend, "The game that you are trying to load must be decrypted before "
|
LOG_CRITICAL(Frontend, "The game that you are trying to load must be decrypted before "
|
||||||
"being used with Citra. \n\n For more information on dumping and "
|
"being used with Citra. \n\n For more information on dumping and "
|
||||||
"decrypting games, please refer to: "
|
"decrypting games, please refer to: "
|
||||||
"https://citra-emu.org/wiki/dumping-game-cartridges/");
|
"https://citra-emu.org/wiki/dumping-game-cartridges/");
|
||||||
return -1;
|
return -1;
|
||||||
case Core::System::ResultStatus::ErrorLoader_ErrorInvalidFormat:
|
case Core::System::ResultStatus::ErrorLoader_ErrorInvalidFormat:
|
||||||
LOG_CRITICAL(Frontend, "Error while loading ROM: The ROM format is not supported.");
|
LOG_CRITICAL(Frontend, "Error while loading ROM: The ROM format is not supported.");
|
||||||
|
@ -315,7 +315,7 @@ int main(int argc, char** argv) {
|
||||||
member->BindOnChatMessageRecieved(OnMessageReceived);
|
member->BindOnChatMessageRecieved(OnMessageReceived);
|
||||||
member->BindOnStateChanged(OnStateChanged);
|
member->BindOnStateChanged(OnStateChanged);
|
||||||
LOG_DEBUG(Network, "Start connection to {}:{} with nickname {}", address, port,
|
LOG_DEBUG(Network, "Start connection to {}:{} with nickname {}", address, port,
|
||||||
nickname);
|
nickname);
|
||||||
member->Join(nickname, address.c_str(), port, 0, Network::NoPreferredMac, password);
|
member->Join(nickname, address.c_str(), port, 0, Network::NoPreferredMac, password);
|
||||||
} else {
|
} else {
|
||||||
LOG_ERROR(Network, "Could not access RoomMember");
|
LOG_ERROR(Network, "Could not access RoomMember");
|
||||||
|
|
|
@ -134,8 +134,8 @@ EmuWindow_SDL2::EmuWindow_SDL2(bool fullscreen) {
|
||||||
OnMinimalClientAreaChangeRequest(GetActiveConfig().min_client_area_size);
|
OnMinimalClientAreaChangeRequest(GetActiveConfig().min_client_area_size);
|
||||||
SDL_PumpEvents();
|
SDL_PumpEvents();
|
||||||
SDL_GL_SetSwapInterval(Settings::values.use_vsync);
|
SDL_GL_SetSwapInterval(Settings::values.use_vsync);
|
||||||
LOG_INFO(Frontend, "Citra Version: {} | {}-{}", Common::g_build_fullname,
|
LOG_INFO(Frontend, "Citra Version: {} | {}-{}", Common::g_build_fullname, Common::g_scm_branch,
|
||||||
Common::g_scm_branch, Common::g_scm_desc);
|
Common::g_scm_desc);
|
||||||
|
|
||||||
DoneCurrent();
|
DoneCurrent();
|
||||||
}
|
}
|
||||||
|
|
|
@ -137,8 +137,8 @@ GMainWindow::GMainWindow() : config(new Config()), emu_thread(nullptr) {
|
||||||
ConnectWidgetEvents();
|
ConnectWidgetEvents();
|
||||||
|
|
||||||
SetupUIStrings();
|
SetupUIStrings();
|
||||||
LOG_INFO(Frontend, "Citra Version: {} | {}-{}", Common::g_build_fullname,
|
LOG_INFO(Frontend, "Citra Version: {} | {}-{}", Common::g_build_fullname, Common::g_scm_branch,
|
||||||
Common::g_scm_branch, Common::g_scm_desc);
|
Common::g_scm_desc);
|
||||||
|
|
||||||
show();
|
show();
|
||||||
|
|
||||||
|
|
|
@ -276,7 +276,7 @@ void UpdaterPrivate::LaunchWithArguments(const QStringList& args) {
|
||||||
|
|
||||||
if (!QProcess::startDetached(tool_info.absoluteFilePath(), args, tool_info.absolutePath())) {
|
if (!QProcess::startDetached(tool_info.absoluteFilePath(), args, tool_info.absolutePath())) {
|
||||||
LOG_WARNING(Frontend, "Unable to start program {}",
|
LOG_WARNING(Frontend, "Unable to start program {}",
|
||||||
tool_info.absoluteFilePath().toStdString());
|
tool_info.absoluteFilePath().toStdString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -30,15 +30,14 @@ __declspec(noinline, noreturn)
|
||||||
#define ASSERT(_a_) \
|
#define ASSERT(_a_) \
|
||||||
do \
|
do \
|
||||||
if (!(_a_)) { \
|
if (!(_a_)) { \
|
||||||
assert_noinline_call([] { LOG_CRITICAL(Debug, "Assertion Failed!"); }); \
|
assert_noinline_call([] { LOG_CRITICAL(Debug, "Assertion Failed!"); }); \
|
||||||
} \
|
} \
|
||||||
while (0)
|
while (0)
|
||||||
|
|
||||||
#define ASSERT_MSG(_a_, ...) \
|
#define ASSERT_MSG(_a_, ...) \
|
||||||
do \
|
do \
|
||||||
if (!(_a_)) { \
|
if (!(_a_)) { \
|
||||||
assert_noinline_call( \
|
assert_noinline_call([&] { LOG_CRITICAL(Debug, "Assertion Failed!\n" __VA_ARGS__); }); \
|
||||||
[&] { LOG_CRITICAL(Debug, "Assertion Failed!\n" __VA_ARGS__); }); \
|
|
||||||
} \
|
} \
|
||||||
while (0)
|
while (0)
|
||||||
|
|
||||||
|
|
|
@ -160,7 +160,7 @@ public:
|
||||||
|
|
||||||
if (error == ERROR_FAILURE || foundVersion < minVer || foundVersion > ver) {
|
if (error == ERROR_FAILURE || foundVersion < minVer || foundVersion > ver) {
|
||||||
LOG_ERROR(Common, "Savestate failure: wrong version {} found for {}", foundVersion,
|
LOG_ERROR(Common, "Savestate failure: wrong version {} found for {}", foundVersion,
|
||||||
title);
|
title);
|
||||||
SetError(ERROR_FAILURE);
|
SetError(ERROR_FAILURE);
|
||||||
return PointerWrapSection(*this, -1, title);
|
return PointerWrapSection(*this, -1, title);
|
||||||
}
|
}
|
||||||
|
@ -608,9 +608,9 @@ public:
|
||||||
Do(cookie);
|
Do(cookie);
|
||||||
if (mode == PointerWrap::MODE_READ && cookie != arbitraryNumber) {
|
if (mode == PointerWrap::MODE_READ && cookie != arbitraryNumber) {
|
||||||
LOG_ERROR(Common,
|
LOG_ERROR(Common,
|
||||||
"After \"{}\", found {} ({:#X}) instead of save marker {} ({:#X}). "
|
"After \"{}\", found {} ({:#X}) instead of save marker {} ({:#X}). "
|
||||||
"Aborting savestate load...",
|
"Aborting savestate load...",
|
||||||
prevName, cookie, cookie, arbitraryNumber, arbitraryNumber);
|
prevName, cookie, cookie, arbitraryNumber, arbitraryNumber);
|
||||||
SetError(ERROR_FAILURE);
|
SetError(ERROR_FAILURE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -257,7 +257,7 @@ bool Rename(const std::string& srcFilename, const std::string& destFilename) {
|
||||||
return true;
|
return true;
|
||||||
#endif
|
#endif
|
||||||
LOG_ERROR(Common_Filesystem, "failed {} --> {}: {}", srcFilename, destFilename,
|
LOG_ERROR(Common_Filesystem, "failed {} --> {}: {}", srcFilename, destFilename,
|
||||||
GetLastErrorMsg());
|
GetLastErrorMsg());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -270,7 +270,7 @@ bool Copy(const std::string& srcFilename, const std::string& destFilename) {
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
LOG_ERROR(Common_Filesystem, "failed {} --> {}: {}", srcFilename, destFilename,
|
LOG_ERROR(Common_Filesystem, "failed {} --> {}: {}", srcFilename, destFilename,
|
||||||
GetLastErrorMsg());
|
GetLastErrorMsg());
|
||||||
return false;
|
return false;
|
||||||
#else
|
#else
|
||||||
|
|
||||||
|
@ -283,7 +283,7 @@ bool Copy(const std::string& srcFilename, const std::string& destFilename) {
|
||||||
FILE* input = fopen(srcFilename.c_str(), "rb");
|
FILE* input = fopen(srcFilename.c_str(), "rb");
|
||||||
if (!input) {
|
if (!input) {
|
||||||
LOG_ERROR(Common_Filesystem, "opening input failed {} --> {}: {}", srcFilename,
|
LOG_ERROR(Common_Filesystem, "opening input failed {} --> {}: {}", srcFilename,
|
||||||
destFilename, GetLastErrorMsg());
|
destFilename, GetLastErrorMsg());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -292,7 +292,7 @@ bool Copy(const std::string& srcFilename, const std::string& destFilename) {
|
||||||
if (!output) {
|
if (!output) {
|
||||||
fclose(input);
|
fclose(input);
|
||||||
LOG_ERROR(Common_Filesystem, "opening output failed {} --> {}: {}", srcFilename,
|
LOG_ERROR(Common_Filesystem, "opening output failed {} --> {}: {}", srcFilename,
|
||||||
destFilename, GetLastErrorMsg());
|
destFilename, GetLastErrorMsg());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -303,7 +303,7 @@ bool Copy(const std::string& srcFilename, const std::string& destFilename) {
|
||||||
if (rnum != BSIZE) {
|
if (rnum != BSIZE) {
|
||||||
if (ferror(input) != 0) {
|
if (ferror(input) != 0) {
|
||||||
LOG_ERROR(Common_Filesystem, "failed reading from source, {} --> {}: {}",
|
LOG_ERROR(Common_Filesystem, "failed reading from source, {} --> {}: {}",
|
||||||
srcFilename, destFilename, GetLastErrorMsg());
|
srcFilename, destFilename, GetLastErrorMsg());
|
||||||
goto bail;
|
goto bail;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -312,7 +312,7 @@ bool Copy(const std::string& srcFilename, const std::string& destFilename) {
|
||||||
size_t wnum = fwrite(buffer, sizeof(char), rnum, output);
|
size_t wnum = fwrite(buffer, sizeof(char), rnum, output);
|
||||||
if (wnum != rnum) {
|
if (wnum != rnum) {
|
||||||
LOG_ERROR(Common_Filesystem, "failed writing to output, {} --> {}: {}", srcFilename,
|
LOG_ERROR(Common_Filesystem, "failed writing to output, {} --> {}: {}", srcFilename,
|
||||||
destFilename, GetLastErrorMsg());
|
destFilename, GetLastErrorMsg());
|
||||||
goto bail;
|
goto bail;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -66,7 +66,7 @@ bool Filter::ParseFilterRule(const std::string::const_iterator begin,
|
||||||
auto level_separator = std::find(begin, end, ':');
|
auto level_separator = std::find(begin, end, ':');
|
||||||
if (level_separator == end) {
|
if (level_separator == end) {
|
||||||
LOG_ERROR(Log, "Invalid log filter. Must specify a log level after `:`: {}",
|
LOG_ERROR(Log, "Invalid log filter. Must specify a log level after `:`: {}",
|
||||||
std::string(begin, end));
|
std::string(begin, end));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -113,29 +113,29 @@ void FmtLogMessage(Class log_class, Level log_level, const char* filename, unsig
|
||||||
} // namespace Log
|
} // namespace Log
|
||||||
|
|
||||||
// Define the fmt lib macros
|
// Define the fmt lib macros
|
||||||
#define LOG_GENERIC(log_class, log_level, ...) \
|
#define LOG_GENERIC(log_class, log_level, ...) \
|
||||||
::Log::FmtLogMessage(log_class, log_level, __FILE__, __LINE__, __func__, __VA_ARGS__)
|
::Log::FmtLogMessage(log_class, log_level, __FILE__, __LINE__, __func__, __VA_ARGS__)
|
||||||
|
|
||||||
#ifdef _DEBUG
|
#ifdef _DEBUG
|
||||||
#define LOG_TRACE(log_class, ...) \
|
#define LOG_TRACE(log_class, ...) \
|
||||||
::Log::FmtLogMessage(::Log::Class::log_class, ::Log::Level::Trace, __FILE__, __LINE__, \
|
::Log::FmtLogMessage(::Log::Class::log_class, ::Log::Level::Trace, __FILE__, __LINE__, \
|
||||||
__func__, __VA_ARGS__)
|
__func__, __VA_ARGS__)
|
||||||
#else
|
#else
|
||||||
#define LOG_TRACE(log_class, fmt, ...) (void(0))
|
#define LOG_TRACE(log_class, fmt, ...) (void(0))
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define LOG_DEBUG(log_class, ...) \
|
#define LOG_DEBUG(log_class, ...) \
|
||||||
::Log::FmtLogMessage(::Log::Class::log_class, ::Log::Level::Debug, __FILE__, __LINE__, \
|
::Log::FmtLogMessage(::Log::Class::log_class, ::Log::Level::Debug, __FILE__, __LINE__, \
|
||||||
__func__, __VA_ARGS__)
|
__func__, __VA_ARGS__)
|
||||||
#define LOG_INFO(log_class, ...) \
|
#define LOG_INFO(log_class, ...) \
|
||||||
::Log::FmtLogMessage(::Log::Class::log_class, ::Log::Level::Info, __FILE__, __LINE__, \
|
::Log::FmtLogMessage(::Log::Class::log_class, ::Log::Level::Info, __FILE__, __LINE__, \
|
||||||
__func__, __VA_ARGS__)
|
__func__, __VA_ARGS__)
|
||||||
#define LOG_WARNING(log_class, ...) \
|
#define LOG_WARNING(log_class, ...) \
|
||||||
::Log::FmtLogMessage(::Log::Class::log_class, ::Log::Level::Warning, __FILE__, __LINE__, \
|
::Log::FmtLogMessage(::Log::Class::log_class, ::Log::Level::Warning, __FILE__, __LINE__, \
|
||||||
__func__, __VA_ARGS__)
|
__func__, __VA_ARGS__)
|
||||||
#define LOG_ERROR(log_class, ...) \
|
#define LOG_ERROR(log_class, ...) \
|
||||||
::Log::FmtLogMessage(::Log::Class::log_class, ::Log::Level::Error, __FILE__, __LINE__, \
|
::Log::FmtLogMessage(::Log::Class::log_class, ::Log::Level::Error, __FILE__, __LINE__, \
|
||||||
__func__, __VA_ARGS__)
|
__func__, __VA_ARGS__)
|
||||||
#define LOG_CRITICAL(log_class, ...) \
|
#define LOG_CRITICAL(log_class, ...) \
|
||||||
::Log::FmtLogMessage(::Log::Class::log_class, ::Log::Level::Critical, __FILE__, __LINE__, \
|
::Log::FmtLogMessage(::Log::Class::log_class, ::Log::Level::Critical, __FILE__, __LINE__, \
|
||||||
__func__, __VA_ARGS__)
|
__func__, __VA_ARGS__)
|
||||||
|
|
|
@ -231,7 +231,7 @@ static unsigned int DPO(RotateRightByRegister)(ARMul_State* cpu, unsigned int sh
|
||||||
}
|
}
|
||||||
|
|
||||||
#define DEBUG_MSG \
|
#define DEBUG_MSG \
|
||||||
LOG_DEBUG(Core_ARM11, "inst is {:x}", inst); \
|
LOG_DEBUG(Core_ARM11, "inst is {:x}", inst); \
|
||||||
CITRA_IGNORE_EXIT(0)
|
CITRA_IGNORE_EXIT(0)
|
||||||
|
|
||||||
#define LnSWoUB(s) glue(LnSWoUB, s)
|
#define LnSWoUB(s) glue(LnSWoUB, s)
|
||||||
|
@ -829,9 +829,9 @@ static unsigned int InterpreterTranslateInstruction(const ARMul_State* cpu, cons
|
||||||
int idx;
|
int idx;
|
||||||
if (DecodeARMInstruction(inst, &idx) == ARMDecodeStatus::FAILURE) {
|
if (DecodeARMInstruction(inst, &idx) == ARMDecodeStatus::FAILURE) {
|
||||||
LOG_ERROR(Core_ARM11, "Decode failure.\tPC: [{:#010X}]\tInstruction: {:08X}", phys_addr,
|
LOG_ERROR(Core_ARM11, "Decode failure.\tPC: [{:#010X}]\tInstruction: {:08X}", phys_addr,
|
||||||
inst);
|
inst);
|
||||||
LOG_ERROR(Core_ARM11, "cpsr={:#X}, cpu->TFlag={}, r15={:#010X}", cpu->Cpsr, cpu->TFlag,
|
LOG_ERROR(Core_ARM11, "cpsr={:#X}, cpu->TFlag={}, r15={:#010X}", cpu->Cpsr, cpu->TFlag,
|
||||||
cpu->Reg[15]);
|
cpu->Reg[15]);
|
||||||
CITRA_IGNORE_EXIT(-1);
|
CITRA_IGNORE_EXIT(-1);
|
||||||
}
|
}
|
||||||
inst_base = arm_instruction_trans[idx](inst, idx);
|
inst_base = arm_instruction_trans[idx](inst, idx);
|
||||||
|
@ -2368,10 +2368,9 @@ MCRR_INST : {
|
||||||
if (inst_base->cond == ConditionCode::AL || CondPassed(cpu, inst_base->cond)) {
|
if (inst_base->cond == ConditionCode::AL || CondPassed(cpu, inst_base->cond)) {
|
||||||
mcrr_inst* const inst_cream = (mcrr_inst*)inst_base->component;
|
mcrr_inst* const inst_cream = (mcrr_inst*)inst_base->component;
|
||||||
|
|
||||||
LOG_ERROR(Core_ARM11,
|
LOG_ERROR(Core_ARM11, "MCRR executed | Coprocessor: {}, CRm {}, opc1: {}, Rt: {}, Rt2: {}",
|
||||||
"MCRR executed | Coprocessor: {}, CRm {}, opc1: {}, Rt: {}, Rt2: {}",
|
inst_cream->cp_num, inst_cream->crm, inst_cream->opcode_1, inst_cream->rt,
|
||||||
inst_cream->cp_num, inst_cream->crm, inst_cream->opcode_1, inst_cream->rt,
|
inst_cream->rt2);
|
||||||
inst_cream->rt2);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
cpu->Reg[15] += cpu->GetInstructionSize();
|
cpu->Reg[15] += cpu->GetInstructionSize();
|
||||||
|
@ -2452,10 +2451,9 @@ MRRC_INST : {
|
||||||
if (inst_base->cond == ConditionCode::AL || CondPassed(cpu, inst_base->cond)) {
|
if (inst_base->cond == ConditionCode::AL || CondPassed(cpu, inst_base->cond)) {
|
||||||
mcrr_inst* const inst_cream = (mcrr_inst*)inst_base->component;
|
mcrr_inst* const inst_cream = (mcrr_inst*)inst_base->component;
|
||||||
|
|
||||||
LOG_ERROR(Core_ARM11,
|
LOG_ERROR(Core_ARM11, "MRRC executed | Coprocessor: {}, CRm {}, opc1: {}, Rt: {}, Rt2: {}",
|
||||||
"MRRC executed | Coprocessor: {}, CRm {}, opc1: {}, Rt: {}, Rt2: {}",
|
inst_cream->cp_num, inst_cream->crm, inst_cream->opcode_1, inst_cream->rt,
|
||||||
inst_cream->cp_num, inst_cream->crm, inst_cream->opcode_1, inst_cream->rt,
|
inst_cream->rt2);
|
||||||
inst_cream->rt2);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
cpu->Reg[15] += cpu->GetInstructionSize();
|
cpu->Reg[15] += cpu->GetInstructionSize();
|
||||||
|
|
|
@ -429,7 +429,7 @@ u32 ARMul_State::ReadCP15Register(u32 crn, u32 opcode_1, u32 crm, u32 opcode_2)
|
||||||
}
|
}
|
||||||
|
|
||||||
LOG_ERROR(Core_ARM11, "MRC CRn={}, CRm={}, OP1={} OP2={} is not implemented. Returning zero.",
|
LOG_ERROR(Core_ARM11, "MRC CRn={}, CRm={}, OP1={} OP2={} is not implemented. Returning zero.",
|
||||||
crn, crm, opcode_1, opcode_2);
|
crn, crm, opcode_1, opcode_2);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -107,7 +107,7 @@ u64 vfp_get_double(ARMul_State* state, unsigned int reg) {
|
||||||
|
|
||||||
void vfp_put_double(ARMul_State* state, u64 val, unsigned int reg) {
|
void vfp_put_double(ARMul_State* state, u64 val, unsigned int reg) {
|
||||||
LOG_TRACE(Core_ARM11, "VFP put double: s[{}-{}] <= [{:08x}-{:08x}]", reg * 2 + 1, reg * 2,
|
LOG_TRACE(Core_ARM11, "VFP put double: s[{}-{}] <= [{:08x}-{:08x}]", reg * 2 + 1, reg * 2,
|
||||||
(u32)(val >> 32), (u32)(val & 0xffffffff));
|
(u32)(val >> 32), (u32)(val & 0xffffffff));
|
||||||
state->ExtReg[reg * 2] = (u32)(val & 0xffffffff);
|
state->ExtReg[reg * 2] = (u32)(val & 0xffffffff);
|
||||||
state->ExtReg[reg * 2 + 1] = (u32)(val >> 32);
|
state->ExtReg[reg * 2 + 1] = (u32)(val >> 32);
|
||||||
}
|
}
|
||||||
|
|
|
@ -65,7 +65,7 @@ static struct vfp_double vfp_double_default_qnan = {
|
||||||
|
|
||||||
static void vfp_double_dump(const char* str, struct vfp_double* d) {
|
static void vfp_double_dump(const char* str, struct vfp_double* d) {
|
||||||
LOG_TRACE(Core_ARM11, "VFP: {}: sign={} exponent={} significand={:016llx}", str, d->sign != 0,
|
LOG_TRACE(Core_ARM11, "VFP: {}: sign={} exponent={} significand={:016llx}", str, d->sign != 0,
|
||||||
d->exponent, d->significand);
|
d->exponent, d->significand);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void vfp_double_normalise_denormal(struct vfp_double* vd) {
|
static void vfp_double_normalise_denormal(struct vfp_double* vd) {
|
||||||
|
@ -222,7 +222,7 @@ pack:
|
||||||
{
|
{
|
||||||
s64 d = vfp_double_pack(vd);
|
s64 d = vfp_double_pack(vd);
|
||||||
LOG_TRACE(Core_ARM11, "VFP: {}: d(d{})={:016llx} exceptions={:08x}", func, dd, d,
|
LOG_TRACE(Core_ARM11, "VFP: {}: d(d{})={:016llx} exceptions={:08x}", func, dd, d,
|
||||||
exceptions);
|
exceptions);
|
||||||
vfp_put_double(state, d, dd);
|
vfp_put_double(state, d, dd);
|
||||||
}
|
}
|
||||||
return exceptions;
|
return exceptions;
|
||||||
|
@ -390,8 +390,7 @@ static u32 vfp_compare(ARMul_State* state, int dd, int signal_on_qnan, s64 m, u3
|
||||||
s64 d;
|
s64 d;
|
||||||
u32 ret = 0;
|
u32 ret = 0;
|
||||||
|
|
||||||
LOG_TRACE(Core_ARM11, "In {}, state=0x{}, fpscr=0x{:x}", __FUNCTION__, fmt::ptr(state),
|
LOG_TRACE(Core_ARM11, "In {}, state=0x{}, fpscr=0x{:x}", __FUNCTION__, fmt::ptr(state), fpscr);
|
||||||
fpscr);
|
|
||||||
if (vfp_double_packed_exponent(m) == 2047 && vfp_double_packed_mantissa(m)) {
|
if (vfp_double_packed_exponent(m) == 2047 && vfp_double_packed_mantissa(m)) {
|
||||||
ret |= FPSCR_CFLAG | FPSCR_VFLAG;
|
ret |= FPSCR_CFLAG | FPSCR_VFLAG;
|
||||||
if (signal_on_qnan ||
|
if (signal_on_qnan ||
|
||||||
|
@ -1210,7 +1209,7 @@ u32 vfp_double_cpdo(ARMul_State* state, u32 inst, u32 fpscr) {
|
||||||
veclen = fpscr & FPSCR_LENGTH_MASK;
|
veclen = fpscr & FPSCR_LENGTH_MASK;
|
||||||
|
|
||||||
LOG_TRACE(Core_ARM11, "VFP: vecstride={} veclen={}", vecstride,
|
LOG_TRACE(Core_ARM11, "VFP: vecstride={} veclen={}", vecstride,
|
||||||
(veclen >> FPSCR_LENGTH_BIT) + 1);
|
(veclen >> FPSCR_LENGTH_BIT) + 1);
|
||||||
|
|
||||||
if (!fop->fn) {
|
if (!fop->fn) {
|
||||||
LOG_TRACE(Core_ARM11, "VFP: could not find double op {}", FEXT_TO_IDX(inst));
|
LOG_TRACE(Core_ARM11, "VFP: could not find double op {}", FEXT_TO_IDX(inst));
|
||||||
|
@ -1224,14 +1223,13 @@ u32 vfp_double_cpdo(ARMul_State* state, u32 inst, u32 fpscr) {
|
||||||
type = (fop->flags & OP_SD) ? 's' : 'd';
|
type = (fop->flags & OP_SD) ? 's' : 'd';
|
||||||
if (op == FOP_EXT)
|
if (op == FOP_EXT)
|
||||||
LOG_TRACE(Core_ARM11, "VFP: itr{} ({}{}) = op[{}] (d{})", vecitr >> FPSCR_LENGTH_BIT,
|
LOG_TRACE(Core_ARM11, "VFP: itr{} ({}{}) = op[{}] (d{})", vecitr >> FPSCR_LENGTH_BIT,
|
||||||
type, dest, dn, dm);
|
type, dest, dn, dm);
|
||||||
else
|
else
|
||||||
LOG_TRACE(Core_ARM11, "VFP: itr{} ({}{}) = (d{}) op[{}] (d{})",
|
LOG_TRACE(Core_ARM11, "VFP: itr{} ({}{}) = (d{}) op[{}] (d{})",
|
||||||
vecitr >> FPSCR_LENGTH_BIT, type, dest, dn, FOP_TO_IDX(op), dm);
|
vecitr >> FPSCR_LENGTH_BIT, type, dest, dn, FOP_TO_IDX(op), dm);
|
||||||
|
|
||||||
except = fop->fn(state, dest, dn, dm, fpscr);
|
except = fop->fn(state, dest, dn, dm, fpscr);
|
||||||
LOG_TRACE(Core_ARM11, "VFP: itr{}: exceptions={:08x}", vecitr >> FPSCR_LENGTH_BIT,
|
LOG_TRACE(Core_ARM11, "VFP: itr{}: exceptions={:08x}", vecitr >> FPSCR_LENGTH_BIT, except);
|
||||||
except);
|
|
||||||
|
|
||||||
exceptions |= except & ~VFP_NAN_FLAG;
|
exceptions |= except & ~VFP_NAN_FLAG;
|
||||||
|
|
||||||
|
|
|
@ -67,7 +67,7 @@ static struct vfp_single vfp_single_default_qnan = {
|
||||||
|
|
||||||
static void vfp_single_dump(const char* str, struct vfp_single* s) {
|
static void vfp_single_dump(const char* str, struct vfp_single* s) {
|
||||||
LOG_TRACE(Core_ARM11, "{}: sign={} exponent={} significand={:08x}", str, s->sign != 0,
|
LOG_TRACE(Core_ARM11, "{}: sign={} exponent={} significand={:08x}", str, s->sign != 0,
|
||||||
s->exponent, s->significand);
|
s->exponent, s->significand);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void vfp_single_normalise_denormal(struct vfp_single* vs) {
|
static void vfp_single_normalise_denormal(struct vfp_single* vs) {
|
||||||
|
@ -1234,7 +1234,7 @@ u32 vfp_single_cpdo(ARMul_State* state, u32 inst, u32 fpscr) {
|
||||||
|
|
||||||
if (!fop->fn) {
|
if (!fop->fn) {
|
||||||
LOG_CRITICAL(Core_ARM11, "could not find single op {}, inst=0x{:x}@0x{:x}",
|
LOG_CRITICAL(Core_ARM11, "could not find single op {}, inst=0x{:x}@0x{:x}",
|
||||||
FEXT_TO_IDX(inst), inst, state->Reg[15]);
|
FEXT_TO_IDX(inst), inst, state->Reg[15]);
|
||||||
Crash();
|
Crash();
|
||||||
goto invalid;
|
goto invalid;
|
||||||
}
|
}
|
||||||
|
@ -1246,11 +1246,11 @@ u32 vfp_single_cpdo(ARMul_State* state, u32 inst, u32 fpscr) {
|
||||||
|
|
||||||
type = (fop->flags & OP_DD) ? 'd' : 's';
|
type = (fop->flags & OP_DD) ? 'd' : 's';
|
||||||
if (op == FOP_EXT)
|
if (op == FOP_EXT)
|
||||||
LOG_TRACE(Core_ARM11, "itr{} ({}{}) = op[{}] (s{}={:08x})",
|
LOG_TRACE(Core_ARM11, "itr{} ({}{}) = op[{}] (s{}={:08x})", vecitr >> FPSCR_LENGTH_BIT,
|
||||||
vecitr >> FPSCR_LENGTH_BIT, type, dest, sn, sm, m);
|
type, dest, sn, sm, m);
|
||||||
else
|
else
|
||||||
LOG_TRACE(Core_ARM11, "itr{} ({}{}) = (s{}) op[{}] (s{}={:08x})",
|
LOG_TRACE(Core_ARM11, "itr{} ({}{}) = (s{}) op[{}] (s{}={:08x})",
|
||||||
vecitr >> FPSCR_LENGTH_BIT, type, dest, sn, FOP_TO_IDX(op), sm, m);
|
vecitr >> FPSCR_LENGTH_BIT, type, dest, sn, FOP_TO_IDX(op), sm, m);
|
||||||
|
|
||||||
except = fop->fn(state, dest, sn, m, fpscr);
|
except = fop->fn(state, dest, sn, m, fpscr);
|
||||||
LOG_TRACE(Core_ARM11, "itr{}: exceptions={:08x}", vecitr >> FPSCR_LENGTH_BIT, except);
|
LOG_TRACE(Core_ARM11, "itr{}: exceptions={:08x}", vecitr >> FPSCR_LENGTH_BIT, except);
|
||||||
|
|
|
@ -92,7 +92,7 @@ System::ResultStatus System::Load(EmuWindow* emu_window, const std::string& file
|
||||||
|
|
||||||
if (system_mode.second != Loader::ResultStatus::Success) {
|
if (system_mode.second != Loader::ResultStatus::Success) {
|
||||||
LOG_CRITICAL(Core, "Failed to determine system mode (Error {})!",
|
LOG_CRITICAL(Core, "Failed to determine system mode (Error {})!",
|
||||||
static_cast<int>(system_mode.second));
|
static_cast<int>(system_mode.second));
|
||||||
|
|
||||||
switch (system_mode.second) {
|
switch (system_mode.second) {
|
||||||
case Loader::ResultStatus::ErrorEncrypted:
|
case Loader::ResultStatus::ErrorEncrypted:
|
||||||
|
@ -107,7 +107,7 @@ System::ResultStatus System::Load(EmuWindow* emu_window, const std::string& file
|
||||||
ResultStatus init_result{Init(emu_window, system_mode.first.get())};
|
ResultStatus init_result{Init(emu_window, system_mode.first.get())};
|
||||||
if (init_result != ResultStatus::Success) {
|
if (init_result != ResultStatus::Success) {
|
||||||
LOG_CRITICAL(Core, "Failed to initialize system (Error {})!",
|
LOG_CRITICAL(Core, "Failed to initialize system (Error {})!",
|
||||||
static_cast<u32>(init_result));
|
static_cast<u32>(init_result));
|
||||||
System::Shutdown();
|
System::Shutdown();
|
||||||
return init_result;
|
return init_result;
|
||||||
}
|
}
|
||||||
|
|
|
@ -107,7 +107,7 @@ ResultVal<std::unique_ptr<FileBackend>> NCCHArchive::OpenFile(const Path& path,
|
||||||
u32 low = static_cast<u32>(title_id & 0xFFFFFFFF);
|
u32 low = static_cast<u32>(title_id & 0xFFFFFFFF);
|
||||||
|
|
||||||
LOG_DEBUG(Service_FS, "Full Path: {}. Category: 0x{:X}. Path: 0x{:X}.", path.DebugStr(),
|
LOG_DEBUG(Service_FS, "Full Path: {}. Category: 0x{:X}. Path: 0x{:X}.", path.DebugStr(),
|
||||||
high, low);
|
high, low);
|
||||||
|
|
||||||
std::string archive_name;
|
std::string archive_name;
|
||||||
if (high == shared_data_archive) {
|
if (high == shared_data_archive) {
|
||||||
|
@ -122,7 +122,7 @@ ResultVal<std::unique_ptr<FileBackend>> NCCHArchive::OpenFile(const Path& path,
|
||||||
|
|
||||||
if (!archive_name.empty()) {
|
if (!archive_name.empty()) {
|
||||||
LOG_ERROR(Service_FS, "Failed to get a handle for shared data archive: {}. ",
|
LOG_ERROR(Service_FS, "Failed to get a handle for shared data archive: {}. ",
|
||||||
archive_name);
|
archive_name);
|
||||||
Core::System::GetInstance().SetStatus(Core::System::ResultStatus::ErrorSystemFiles,
|
Core::System::GetInstance().SetStatus(Core::System::ResultStatus::ErrorSystemFiles,
|
||||||
archive_name.c_str());
|
archive_name.c_str());
|
||||||
}
|
}
|
||||||
|
@ -140,22 +140,21 @@ ResultCode NCCHArchive::DeleteFile(const Path& path) const {
|
||||||
}
|
}
|
||||||
|
|
||||||
ResultCode NCCHArchive::RenameFile(const Path& src_path, const Path& dest_path) const {
|
ResultCode NCCHArchive::RenameFile(const Path& src_path, const Path& dest_path) const {
|
||||||
LOG_CRITICAL(Service_FS, "Attempted to rename a file within an NCCH archive ({}).",
|
LOG_CRITICAL(Service_FS, "Attempted to rename a file within an NCCH archive ({}).", GetName());
|
||||||
GetName());
|
|
||||||
// TODO(wwylele): Use correct error code
|
// TODO(wwylele): Use correct error code
|
||||||
return ResultCode(-1);
|
return ResultCode(-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
ResultCode NCCHArchive::DeleteDirectory(const Path& path) const {
|
ResultCode NCCHArchive::DeleteDirectory(const Path& path) const {
|
||||||
LOG_CRITICAL(Service_FS, "Attempted to delete a directory from an NCCH archive ({}).",
|
LOG_CRITICAL(Service_FS, "Attempted to delete a directory from an NCCH archive ({}).",
|
||||||
GetName());
|
GetName());
|
||||||
// TODO(wwylele): Use correct error code
|
// TODO(wwylele): Use correct error code
|
||||||
return ResultCode(-1);
|
return ResultCode(-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
ResultCode NCCHArchive::DeleteDirectoryRecursively(const Path& path) const {
|
ResultCode NCCHArchive::DeleteDirectoryRecursively(const Path& path) const {
|
||||||
LOG_CRITICAL(Service_FS, "Attempted to delete a directory from an NCCH archive ({}).",
|
LOG_CRITICAL(Service_FS, "Attempted to delete a directory from an NCCH archive ({}).",
|
||||||
GetName());
|
GetName());
|
||||||
// TODO(wwylele): Use correct error code
|
// TODO(wwylele): Use correct error code
|
||||||
return ResultCode(-1);
|
return ResultCode(-1);
|
||||||
}
|
}
|
||||||
|
@ -168,22 +167,20 @@ ResultCode NCCHArchive::CreateFile(const Path& path, u64 size) const {
|
||||||
}
|
}
|
||||||
|
|
||||||
ResultCode NCCHArchive::CreateDirectory(const Path& path) const {
|
ResultCode NCCHArchive::CreateDirectory(const Path& path) const {
|
||||||
LOG_CRITICAL(Service_FS, "Attempted to create a directory in an NCCH archive ({}).",
|
LOG_CRITICAL(Service_FS, "Attempted to create a directory in an NCCH archive ({}).", GetName());
|
||||||
GetName());
|
|
||||||
// TODO(wwylele): Use correct error code
|
// TODO(wwylele): Use correct error code
|
||||||
return ResultCode(-1);
|
return ResultCode(-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
ResultCode NCCHArchive::RenameDirectory(const Path& src_path, const Path& dest_path) const {
|
ResultCode NCCHArchive::RenameDirectory(const Path& src_path, const Path& dest_path) const {
|
||||||
LOG_CRITICAL(Service_FS, "Attempted to rename a file within an NCCH archive ({}).",
|
LOG_CRITICAL(Service_FS, "Attempted to rename a file within an NCCH archive ({}).", GetName());
|
||||||
GetName());
|
|
||||||
// TODO(wwylele): Use correct error code
|
// TODO(wwylele): Use correct error code
|
||||||
return ResultCode(-1);
|
return ResultCode(-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
ResultVal<std::unique_ptr<DirectoryBackend>> NCCHArchive::OpenDirectory(const Path& path) const {
|
ResultVal<std::unique_ptr<DirectoryBackend>> NCCHArchive::OpenDirectory(const Path& path) const {
|
||||||
LOG_CRITICAL(Service_FS, "Attempted to open a directory within an NCCH archive ({}).",
|
LOG_CRITICAL(Service_FS, "Attempted to open a directory within an NCCH archive ({}).",
|
||||||
GetName().c_str());
|
GetName().c_str());
|
||||||
// TODO(shinyquagsire23): Use correct error code
|
// TODO(shinyquagsire23): Use correct error code
|
||||||
return ResultCode(-1);
|
return ResultCode(-1);
|
||||||
}
|
}
|
||||||
|
|
|
@ -79,7 +79,7 @@ ResultVal<std::unique_ptr<FileBackend>> SDMCArchive::OpenFileBase(const Path& pa
|
||||||
case PathParser::NotFound:
|
case PathParser::NotFound:
|
||||||
if (!mode.create_flag) {
|
if (!mode.create_flag) {
|
||||||
LOG_ERROR(Service_FS, "Non-existing file {} can't be open without mode create.",
|
LOG_ERROR(Service_FS, "Non-existing file {} can't be open without mode create.",
|
||||||
full_path);
|
full_path);
|
||||||
return ERROR_NOT_FOUND;
|
return ERROR_NOT_FOUND;
|
||||||
} else {
|
} else {
|
||||||
// Create the file
|
// Create the file
|
||||||
|
|
|
@ -242,12 +242,12 @@ void ArchiveFactory_SelfNCCH::Register(Loader::AppLoader& app_loader) {
|
||||||
}
|
}
|
||||||
|
|
||||||
LOG_DEBUG(Service_FS, "Registering program {:016X} with the SelfNCCH archive factory",
|
LOG_DEBUG(Service_FS, "Registering program {:016X} with the SelfNCCH archive factory",
|
||||||
program_id);
|
program_id);
|
||||||
|
|
||||||
if (ncch_data.find(program_id) != ncch_data.end()) {
|
if (ncch_data.find(program_id) != ncch_data.end()) {
|
||||||
LOG_WARNING(Service_FS,
|
LOG_WARNING(Service_FS,
|
||||||
"Registering program {:016X} with SelfNCCH will override existing mapping",
|
"Registering program {:016X} with SelfNCCH will override existing mapping",
|
||||||
program_id);
|
program_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
NCCHData& data = ncch_data[program_id];
|
NCCHData& data = ncch_data[program_id];
|
||||||
|
|
|
@ -36,22 +36,21 @@ ResultCode IVFCArchive::DeleteFile(const Path& path) const {
|
||||||
}
|
}
|
||||||
|
|
||||||
ResultCode IVFCArchive::RenameFile(const Path& src_path, const Path& dest_path) const {
|
ResultCode IVFCArchive::RenameFile(const Path& src_path, const Path& dest_path) const {
|
||||||
LOG_CRITICAL(Service_FS, "Attempted to rename a file within an IVFC archive ({}).",
|
LOG_CRITICAL(Service_FS, "Attempted to rename a file within an IVFC archive ({}).", GetName());
|
||||||
GetName());
|
|
||||||
// TODO(wwylele): Use correct error code
|
// TODO(wwylele): Use correct error code
|
||||||
return ResultCode(-1);
|
return ResultCode(-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
ResultCode IVFCArchive::DeleteDirectory(const Path& path) const {
|
ResultCode IVFCArchive::DeleteDirectory(const Path& path) const {
|
||||||
LOG_CRITICAL(Service_FS, "Attempted to delete a directory from an IVFC archive ({}).",
|
LOG_CRITICAL(Service_FS, "Attempted to delete a directory from an IVFC archive ({}).",
|
||||||
GetName());
|
GetName());
|
||||||
// TODO(wwylele): Use correct error code
|
// TODO(wwylele): Use correct error code
|
||||||
return ResultCode(-1);
|
return ResultCode(-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
ResultCode IVFCArchive::DeleteDirectoryRecursively(const Path& path) const {
|
ResultCode IVFCArchive::DeleteDirectoryRecursively(const Path& path) const {
|
||||||
LOG_CRITICAL(Service_FS, "Attempted to delete a directory from an IVFC archive ({}).",
|
LOG_CRITICAL(Service_FS, "Attempted to delete a directory from an IVFC archive ({}).",
|
||||||
GetName());
|
GetName());
|
||||||
// TODO(wwylele): Use correct error code
|
// TODO(wwylele): Use correct error code
|
||||||
return ResultCode(-1);
|
return ResultCode(-1);
|
||||||
}
|
}
|
||||||
|
@ -64,15 +63,13 @@ ResultCode IVFCArchive::CreateFile(const Path& path, u64 size) const {
|
||||||
}
|
}
|
||||||
|
|
||||||
ResultCode IVFCArchive::CreateDirectory(const Path& path) const {
|
ResultCode IVFCArchive::CreateDirectory(const Path& path) const {
|
||||||
LOG_CRITICAL(Service_FS, "Attempted to create a directory in an IVFC archive ({}).",
|
LOG_CRITICAL(Service_FS, "Attempted to create a directory in an IVFC archive ({}).", GetName());
|
||||||
GetName());
|
|
||||||
// TODO(wwylele): Use correct error code
|
// TODO(wwylele): Use correct error code
|
||||||
return ResultCode(-1);
|
return ResultCode(-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
ResultCode IVFCArchive::RenameDirectory(const Path& src_path, const Path& dest_path) const {
|
ResultCode IVFCArchive::RenameDirectory(const Path& src_path, const Path& dest_path) const {
|
||||||
LOG_CRITICAL(Service_FS, "Attempted to rename a file within an IVFC archive ({}).",
|
LOG_CRITICAL(Service_FS, "Attempted to rename a file within an IVFC archive ({}).", GetName());
|
||||||
GetName());
|
|
||||||
// TODO(wwylele): Use correct error code
|
// TODO(wwylele): Use correct error code
|
||||||
return ResultCode(-1);
|
return ResultCode(-1);
|
||||||
}
|
}
|
||||||
|
|
|
@ -160,10 +160,9 @@ Loader::ResultStatus NCCHContainer::Load() {
|
||||||
exheader_header.arm11_system_local_caps.resource_limit_category;
|
exheader_header.arm11_system_local_caps.resource_limit_category;
|
||||||
|
|
||||||
LOG_DEBUG(Service_FS, "Name: {}",
|
LOG_DEBUG(Service_FS, "Name: {}",
|
||||||
exheader_header.codeset_info.name);
|
exheader_header.codeset_info.name);
|
||||||
LOG_DEBUG(Service_FS, "Program ID: {:016X}", ncch_header.program_id);
|
LOG_DEBUG(Service_FS, "Program ID: {:016X}", ncch_header.program_id);
|
||||||
LOG_DEBUG(Service_FS, "Code compressed: {}",
|
LOG_DEBUG(Service_FS, "Code compressed: {}", is_compressed ? "yes" : "no");
|
||||||
is_compressed ? "yes" : "no");
|
|
||||||
LOG_DEBUG(Service_FS, "Entry point: 0x{:08X}", entry_point);
|
LOG_DEBUG(Service_FS, "Entry point: 0x{:08X}", entry_point);
|
||||||
LOG_DEBUG(Service_FS, "Code size: 0x{:08X}", code_size);
|
LOG_DEBUG(Service_FS, "Code size: 0x{:08X}", code_size);
|
||||||
LOG_DEBUG(Service_FS, "Stack size: 0x{:08X}", stack_size);
|
LOG_DEBUG(Service_FS, "Stack size: 0x{:08X}", stack_size);
|
||||||
|
@ -172,11 +171,11 @@ Loader::ResultStatus NCCHContainer::Load() {
|
||||||
LOG_DEBUG(Service_FS, "Thread priority: 0x{:X}", priority);
|
LOG_DEBUG(Service_FS, "Thread priority: 0x{:X}", priority);
|
||||||
LOG_DEBUG(Service_FS, "Resource limit category: {}", resource_limit_category);
|
LOG_DEBUG(Service_FS, "Resource limit category: {}", resource_limit_category);
|
||||||
LOG_DEBUG(Service_FS, "System Mode: {}",
|
LOG_DEBUG(Service_FS, "System Mode: {}",
|
||||||
static_cast<int>(exheader_header.arm11_system_local_caps.system_mode));
|
static_cast<int>(exheader_header.arm11_system_local_caps.system_mode));
|
||||||
|
|
||||||
if (exheader_header.system_info.jump_id != ncch_header.program_id) {
|
if (exheader_header.system_info.jump_id != ncch_header.program_id) {
|
||||||
LOG_ERROR(Service_FS,
|
LOG_ERROR(Service_FS,
|
||||||
"ExHeader Program ID mismatch: the ROM is probably encrypted.");
|
"ExHeader Program ID mismatch: the ROM is probably encrypted.");
|
||||||
return Loader::ResultStatus::ErrorEncrypted;
|
return Loader::ResultStatus::ErrorEncrypted;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -240,8 +239,8 @@ Loader::ResultStatus NCCHContainer::LoadOverrides() {
|
||||||
|
|
||||||
if (is_tainted)
|
if (is_tainted)
|
||||||
LOG_WARNING(Service_FS,
|
LOG_WARNING(Service_FS,
|
||||||
"Loaded NCCH {} is tainted, application behavior may not be as expected!",
|
"Loaded NCCH {} is tainted, application behavior may not be as expected!",
|
||||||
filepath);
|
filepath);
|
||||||
|
|
||||||
return Loader::ResultStatus::Success;
|
return Loader::ResultStatus::Success;
|
||||||
}
|
}
|
||||||
|
@ -287,8 +286,8 @@ Loader::ResultStatus NCCHContainer::LoadSectionExeFS(const char* name, std::vect
|
||||||
|
|
||||||
// Load the specified section...
|
// Load the specified section...
|
||||||
if (strcmp(section.name, name) == 0) {
|
if (strcmp(section.name, name) == 0) {
|
||||||
LOG_DEBUG(Service_FS, "{} - offset: 0x{:08X}, size: 0x{:08X}, name: {}",
|
LOG_DEBUG(Service_FS, "{} - offset: 0x{:08X}, size: 0x{:08X}, name: {}", section_number,
|
||||||
section_number, section.offset, section.size, section.name);
|
section.offset, section.size, section.name);
|
||||||
|
|
||||||
s64 section_offset =
|
s64 section_offset =
|
||||||
(section.offset + exefs_offset + sizeof(ExeFs_Header) + ncch_offset);
|
(section.offset + exefs_offset + sizeof(ExeFs_Header) + ncch_offset);
|
||||||
|
|
|
@ -64,7 +64,7 @@ ResultVal<std::unique_ptr<FileBackend>> SaveDataArchive::OpenFile(const Path& pa
|
||||||
case PathParser::NotFound:
|
case PathParser::NotFound:
|
||||||
if (!mode.create_flag) {
|
if (!mode.create_flag) {
|
||||||
LOG_ERROR(Service_FS, "Non-existing file {} can't be open without mode create.",
|
LOG_ERROR(Service_FS, "Non-existing file {} can't be open without mode create.",
|
||||||
full_path);
|
full_path);
|
||||||
return ERROR_FILE_NOT_FOUND;
|
return ERROR_FILE_NOT_FOUND;
|
||||||
} else {
|
} else {
|
||||||
// Create the file
|
// Create the file
|
||||||
|
|
|
@ -76,7 +76,7 @@ Loader::ResultStatus TitleMetadata::Load(const std::vector<u8> file_data, size_t
|
||||||
body_start + sizeof(Body) + tmd_body.content_count * sizeof(ContentChunk);
|
body_start + sizeof(Body) + tmd_body.content_count * sizeof(ContentChunk);
|
||||||
if (total_size < expected_size) {
|
if (total_size < expected_size) {
|
||||||
LOG_ERROR(Service_FS, "Malformed TMD, expected size 0x{:x}, got 0x{:x}!", expected_size,
|
LOG_ERROR(Service_FS, "Malformed TMD, expected size 0x{:x}, got 0x{:x}!", expected_size,
|
||||||
total_size);
|
total_size);
|
||||||
return Loader::ResultStatus::ErrorInvalidFormat;
|
return Loader::ResultStatus::ErrorInvalidFormat;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -218,8 +218,8 @@ void TitleMetadata::Print() const {
|
||||||
break;
|
break;
|
||||||
|
|
||||||
LOG_DEBUG(Service_FS, " Index {:04X}, Command Count {:04X}",
|
LOG_DEBUG(Service_FS, " Index {:04X}, Command Count {:04X}",
|
||||||
static_cast<u32>(tmd_body.contentinfo[i].index),
|
static_cast<u32>(tmd_body.contentinfo[i].index),
|
||||||
static_cast<u32>(tmd_body.contentinfo[i].command_count));
|
static_cast<u32>(tmd_body.contentinfo[i].command_count));
|
||||||
}
|
}
|
||||||
|
|
||||||
// For each content info, print their content chunk range
|
// For each content info, print their content chunk range
|
||||||
|
@ -238,8 +238,8 @@ void TitleMetadata::Print() const {
|
||||||
|
|
||||||
const ContentChunk& chunk = tmd_chunks[j];
|
const ContentChunk& chunk = tmd_chunks[j];
|
||||||
LOG_DEBUG(Service_FS, " ID {:08X}, Index {:04X}, Type {:04x}, Size {:016X}",
|
LOG_DEBUG(Service_FS, " ID {:08X}, Index {:04X}, Type {:04x}, Size {:016X}",
|
||||||
static_cast<u32>(chunk.id), static_cast<u32>(chunk.index),
|
static_cast<u32>(chunk.id), static_cast<u32>(chunk.index),
|
||||||
static_cast<u32>(chunk.type), static_cast<u64>(chunk.size));
|
static_cast<u32>(chunk.type), static_cast<u64>(chunk.size));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -302,7 +302,7 @@ static void RemoveBreakpoint(BreakpointType type, PAddr addr) {
|
||||||
auto bp = p.find(addr);
|
auto bp = p.find(addr);
|
||||||
if (bp != p.end()) {
|
if (bp != p.end()) {
|
||||||
LOG_DEBUG(Debug_GDBStub, "gdb: removed a breakpoint: {:08x} bytes at {:08x} of type {}\n",
|
LOG_DEBUG(Debug_GDBStub, "gdb: removed a breakpoint: {:08x} bytes at {:08x} of type {}\n",
|
||||||
bp->second.len, bp->second.addr, static_cast<int>(type));
|
bp->second.len, bp->second.addr, static_cast<int>(type));
|
||||||
p.erase(addr);
|
p.erase(addr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -348,8 +348,8 @@ bool CheckBreakpoint(PAddr addr, BreakpointType type) {
|
||||||
|
|
||||||
if (bp->second.active && (addr >= bp->second.addr && addr < bp->second.addr + len)) {
|
if (bp->second.active && (addr >= bp->second.addr && addr < bp->second.addr + len)) {
|
||||||
LOG_DEBUG(Debug_GDBStub,
|
LOG_DEBUG(Debug_GDBStub,
|
||||||
"Found breakpoint type {} @ {:08x}, range: {:08x} - {:08x} ({} bytes)\n",
|
"Found breakpoint type {} @ {:08x}, range: {:08x} - {:08x} ({} bytes)\n",
|
||||||
static_cast<int>(type), addr, bp->second.addr, bp->second.addr + len, len);
|
static_cast<int>(type), addr, bp->second.addr, bp->second.addr + len, len);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -740,7 +740,7 @@ static bool CommitBreakpoint(BreakpointType type, PAddr addr, u32 len) {
|
||||||
p.insert({addr, breakpoint});
|
p.insert({addr, breakpoint});
|
||||||
|
|
||||||
LOG_DEBUG(Debug_GDBStub, "gdb: added {} breakpoint: {:08x} bytes at {:08x}\n",
|
LOG_DEBUG(Debug_GDBStub, "gdb: added {} breakpoint: {:08x} bytes at {:08x}\n",
|
||||||
static_cast<int>(type), breakpoint.len, breakpoint.addr);
|
static_cast<int>(type), breakpoint.len, breakpoint.addr);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -116,7 +116,7 @@ void HandleSpecialMapping(VMManager& address_space, const AddressMapping& mappin
|
||||||
VAddr mapping_limit = mapping.address + mapping.size;
|
VAddr mapping_limit = mapping.address + mapping.size;
|
||||||
if (mapping_limit < mapping.address) {
|
if (mapping_limit < mapping.address) {
|
||||||
LOG_CRITICAL(Loader, "Mapping size overflowed: address=0x{:08X} size=0x{:X}",
|
LOG_CRITICAL(Loader, "Mapping size overflowed: address=0x{:08X} size=0x{:X}",
|
||||||
mapping.address, mapping.size);
|
mapping.address, mapping.size);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -127,16 +127,16 @@ void HandleSpecialMapping(VMManager& address_space, const AddressMapping& mappin
|
||||||
});
|
});
|
||||||
if (area == std::end(memory_areas)) {
|
if (area == std::end(memory_areas)) {
|
||||||
LOG_ERROR(Loader,
|
LOG_ERROR(Loader,
|
||||||
"Unhandled special mapping: address=0x{:08X} size=0x{:X}"
|
"Unhandled special mapping: address=0x{:08X} size=0x{:X}"
|
||||||
" read_only={} unk_flag={}",
|
" read_only={} unk_flag={}",
|
||||||
mapping.address, mapping.size, mapping.read_only, mapping.unk_flag);
|
mapping.address, mapping.size, mapping.read_only, mapping.unk_flag);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
u32 offset_into_region = mapping.address - area->vaddr_base;
|
u32 offset_into_region = mapping.address - area->vaddr_base;
|
||||||
if (area->paddr_base == IO_AREA_PADDR) {
|
if (area->paddr_base == IO_AREA_PADDR) {
|
||||||
LOG_ERROR(Loader, "MMIO mappings are not supported yet. phys_addr=0x{:08X}",
|
LOG_ERROR(Loader, "MMIO mappings are not supported yet. phys_addr=0x{:08X}",
|
||||||
area->paddr_base + offset_into_region);
|
area->paddr_base + offset_into_region);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -107,14 +107,14 @@ ResultCode SharedMemory::Map(Process* target_process, VAddr address, MemoryPermi
|
||||||
// Error out if the requested permissions don't match what the creator process allows.
|
// Error out if the requested permissions don't match what the creator process allows.
|
||||||
if (static_cast<u32>(permissions) & ~static_cast<u32>(own_other_permissions)) {
|
if (static_cast<u32>(permissions) & ~static_cast<u32>(own_other_permissions)) {
|
||||||
LOG_ERROR(Kernel, "cannot map id={}, address=0x{:08X} name={}, permissions don't match",
|
LOG_ERROR(Kernel, "cannot map id={}, address=0x{:08X} name={}, permissions don't match",
|
||||||
GetObjectId(), address, name);
|
GetObjectId(), address, name);
|
||||||
return ERR_INVALID_COMBINATION;
|
return ERR_INVALID_COMBINATION;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Heap-backed memory blocks can not be mapped with other_permissions = DontCare
|
// Heap-backed memory blocks can not be mapped with other_permissions = DontCare
|
||||||
if (base_address != 0 && other_permissions == MemoryPermission::DontCare) {
|
if (base_address != 0 && other_permissions == MemoryPermission::DontCare) {
|
||||||
LOG_ERROR(Kernel, "cannot map id={}, address=0x{08X} name={}, permissions don't match",
|
LOG_ERROR(Kernel, "cannot map id={}, address=0x{08X} name={}, permissions don't match",
|
||||||
GetObjectId(), address, name);
|
GetObjectId(), address, name);
|
||||||
return ERR_INVALID_COMBINATION;
|
return ERR_INVALID_COMBINATION;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -122,7 +122,7 @@ ResultCode SharedMemory::Map(Process* target_process, VAddr address, MemoryPermi
|
||||||
if (other_permissions != MemoryPermission::DontCare &&
|
if (other_permissions != MemoryPermission::DontCare &&
|
||||||
static_cast<u32>(this->permissions) & ~static_cast<u32>(other_permissions)) {
|
static_cast<u32>(this->permissions) & ~static_cast<u32>(other_permissions)) {
|
||||||
LOG_ERROR(Kernel, "cannot map id={}, address=0x{:08X} name={}, permissions don't match",
|
LOG_ERROR(Kernel, "cannot map id={}, address=0x{:08X} name={}, permissions don't match",
|
||||||
GetObjectId(), address, name);
|
GetObjectId(), address, name);
|
||||||
return ERR_WRONG_PERMISSION;
|
return ERR_WRONG_PERMISSION;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -138,7 +138,7 @@ ResultCode SharedMemory::Map(Process* target_process, VAddr address, MemoryPermi
|
||||||
if (address != 0) {
|
if (address != 0) {
|
||||||
if (address < Memory::HEAP_VADDR || address + size >= Memory::SHARED_MEMORY_VADDR_END) {
|
if (address < Memory::HEAP_VADDR || address + size >= Memory::SHARED_MEMORY_VADDR_END) {
|
||||||
LOG_ERROR(Kernel, "cannot map id={}, address=0x{:08X} name={}, invalid address",
|
LOG_ERROR(Kernel, "cannot map id={}, address=0x{:08X} name={}, invalid address",
|
||||||
GetObjectId(), address, name);
|
GetObjectId(), address, name);
|
||||||
return ERR_INVALID_ADDRESS;
|
return ERR_INVALID_ADDRESS;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -59,9 +59,9 @@ enum ControlMemoryOperation {
|
||||||
static ResultCode ControlMemory(u32* out_addr, u32 operation, u32 addr0, u32 addr1, u32 size,
|
static ResultCode ControlMemory(u32* out_addr, u32 operation, u32 addr0, u32 addr1, u32 size,
|
||||||
u32 permissions) {
|
u32 permissions) {
|
||||||
LOG_DEBUG(Kernel_SVC,
|
LOG_DEBUG(Kernel_SVC,
|
||||||
"called operation=0x{:08X}, addr0=0x{:08X}, addr1=0x{:08X}, "
|
"called operation=0x{:08X}, addr0=0x{:08X}, addr1=0x{:08X}, "
|
||||||
"size=0x{:X}, permissions=0x{:08X}",
|
"size=0x{:X}, permissions=0x{:08X}",
|
||||||
operation, addr0, addr1, size, permissions);
|
operation, addr0, addr1, size, permissions);
|
||||||
|
|
||||||
if ((addr0 & Memory::PAGE_MASK) != 0 || (addr1 & Memory::PAGE_MASK) != 0) {
|
if ((addr0 & Memory::PAGE_MASK) != 0 || (addr1 & Memory::PAGE_MASK) != 0) {
|
||||||
return ERR_MISALIGNED_ADDRESS;
|
return ERR_MISALIGNED_ADDRESS;
|
||||||
|
@ -75,7 +75,7 @@ static ResultCode ControlMemory(u32* out_addr, u32 operation, u32 addr0, u32 add
|
||||||
|
|
||||||
if (region != 0) {
|
if (region != 0) {
|
||||||
LOG_WARNING(Kernel_SVC, "ControlMemory with specified region not supported, region={:X}",
|
LOG_WARNING(Kernel_SVC, "ControlMemory with specified region not supported, region={:X}",
|
||||||
region);
|
region);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((permissions & (u32)MemoryPermission::ReadWrite) != permissions) {
|
if ((permissions & (u32)MemoryPermission::ReadWrite) != permissions) {
|
||||||
|
@ -177,9 +177,9 @@ static void ExitProcess() {
|
||||||
/// Maps a memory block to specified address
|
/// Maps a memory block to specified address
|
||||||
static ResultCode MapMemoryBlock(Handle handle, u32 addr, u32 permissions, u32 other_permissions) {
|
static ResultCode MapMemoryBlock(Handle handle, u32 addr, u32 permissions, u32 other_permissions) {
|
||||||
LOG_TRACE(Kernel_SVC,
|
LOG_TRACE(Kernel_SVC,
|
||||||
"called memblock=0x{:08X}, addr=0x{:08X}, mypermissions=0x{:08X}, "
|
"called memblock=0x{:08X}, addr=0x{:08X}, mypermissions=0x{:08X}, "
|
||||||
"otherpermission={}",
|
"otherpermission={}",
|
||||||
handle, addr, permissions, other_permissions);
|
handle, addr, permissions, other_permissions);
|
||||||
|
|
||||||
SharedPtr<SharedMemory> shared_memory = g_handle_table.Get<SharedMemory>(handle);
|
SharedPtr<SharedMemory> shared_memory = g_handle_table.Get<SharedMemory>(handle);
|
||||||
if (shared_memory == nullptr)
|
if (shared_memory == nullptr)
|
||||||
|
@ -274,7 +274,7 @@ static ResultCode WaitSynchronization1(Handle handle, s64 nano_seconds) {
|
||||||
return ERR_INVALID_HANDLE;
|
return ERR_INVALID_HANDLE;
|
||||||
|
|
||||||
LOG_TRACE(Kernel_SVC, "called handle=0x{:08X}({}:{}), nanoseconds={}", handle,
|
LOG_TRACE(Kernel_SVC, "called handle=0x{:08X}({}:{}), nanoseconds={}", handle,
|
||||||
object->GetTypeName(), object->GetName(), nano_seconds);
|
object->GetTypeName(), object->GetName(), nano_seconds);
|
||||||
|
|
||||||
if (object->ShouldWait(thread)) {
|
if (object->ShouldWait(thread)) {
|
||||||
|
|
||||||
|
@ -624,9 +624,8 @@ static ResultCode CreateAddressArbiter(Handle* out_handle) {
|
||||||
/// Arbitrate address
|
/// Arbitrate address
|
||||||
static ResultCode ArbitrateAddress(Handle handle, u32 address, u32 type, u32 value,
|
static ResultCode ArbitrateAddress(Handle handle, u32 address, u32 type, u32 value,
|
||||||
s64 nanoseconds) {
|
s64 nanoseconds) {
|
||||||
LOG_TRACE(Kernel_SVC,
|
LOG_TRACE(Kernel_SVC, "called handle=0x{:08X}, address=0x{:08X}, type=0x{:08X}, value=0x{:08X}",
|
||||||
"called handle=0x{:08X}, address=0x{:08X}, type=0x{:08X}, value=0x{:08X}", handle,
|
handle, address, type, value);
|
||||||
address, type, value);
|
|
||||||
|
|
||||||
SharedPtr<AddressArbiter> arbiter = g_handle_table.Get<AddressArbiter>(handle);
|
SharedPtr<AddressArbiter> arbiter = g_handle_table.Get<AddressArbiter>(handle);
|
||||||
if (arbiter == nullptr)
|
if (arbiter == nullptr)
|
||||||
|
@ -685,7 +684,7 @@ static ResultCode GetResourceLimit(Handle* resource_limit, Handle process_handle
|
||||||
static ResultCode GetResourceLimitCurrentValues(VAddr values, Handle resource_limit_handle,
|
static ResultCode GetResourceLimitCurrentValues(VAddr values, Handle resource_limit_handle,
|
||||||
VAddr names, u32 name_count) {
|
VAddr names, u32 name_count) {
|
||||||
LOG_TRACE(Kernel_SVC, "called resource_limit={:08X}, names={:08X}, name_count={}",
|
LOG_TRACE(Kernel_SVC, "called resource_limit={:08X}, names={:08X}, name_count={}",
|
||||||
resource_limit_handle, names, name_count);
|
resource_limit_handle, names, name_count);
|
||||||
|
|
||||||
SharedPtr<ResourceLimit> resource_limit =
|
SharedPtr<ResourceLimit> resource_limit =
|
||||||
g_handle_table.Get<ResourceLimit>(resource_limit_handle);
|
g_handle_table.Get<ResourceLimit>(resource_limit_handle);
|
||||||
|
@ -705,7 +704,7 @@ static ResultCode GetResourceLimitCurrentValues(VAddr values, Handle resource_li
|
||||||
static ResultCode GetResourceLimitLimitValues(VAddr values, Handle resource_limit_handle,
|
static ResultCode GetResourceLimitLimitValues(VAddr values, Handle resource_limit_handle,
|
||||||
VAddr names, u32 name_count) {
|
VAddr names, u32 name_count) {
|
||||||
LOG_TRACE(Kernel_SVC, "called resource_limit={:08X}, names={:08X}, name_count={}",
|
LOG_TRACE(Kernel_SVC, "called resource_limit={:08X}, names={:08X}, name_count={}",
|
||||||
resource_limit_handle, names, name_count);
|
resource_limit_handle, names, name_count);
|
||||||
|
|
||||||
SharedPtr<ResourceLimit> resource_limit =
|
SharedPtr<ResourceLimit> resource_limit =
|
||||||
g_handle_table.Get<ResourceLimit>(resource_limit_handle);
|
g_handle_table.Get<ResourceLimit>(resource_limit_handle);
|
||||||
|
@ -746,11 +745,11 @@ static ResultCode CreateThread(Handle* out_handle, u32 priority, u32 entry_point
|
||||||
break;
|
break;
|
||||||
case THREADPROCESSORID_ALL:
|
case THREADPROCESSORID_ALL:
|
||||||
LOG_INFO(Kernel_SVC,
|
LOG_INFO(Kernel_SVC,
|
||||||
"Newly created thread is allowed to be run in any Core, unimplemented.");
|
"Newly created thread is allowed to be run in any Core, unimplemented.");
|
||||||
break;
|
break;
|
||||||
case THREADPROCESSORID_1:
|
case THREADPROCESSORID_1:
|
||||||
LOG_ERROR(Kernel_SVC,
|
LOG_ERROR(Kernel_SVC,
|
||||||
"Newly created thread must run in the SysCore (Core1), unimplemented.");
|
"Newly created thread must run in the SysCore (Core1), unimplemented.");
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
// TODO(bunnei): Implement support for other processor IDs
|
// TODO(bunnei): Implement support for other processor IDs
|
||||||
|
@ -770,9 +769,9 @@ static ResultCode CreateThread(Handle* out_handle, u32 priority, u32 entry_point
|
||||||
Core::System::GetInstance().PrepareReschedule();
|
Core::System::GetInstance().PrepareReschedule();
|
||||||
|
|
||||||
LOG_TRACE(Kernel_SVC,
|
LOG_TRACE(Kernel_SVC,
|
||||||
"called entrypoint=0x{:08X} ({}), arg=0x{:08X}, stacktop=0x{:08X}, "
|
"called entrypoint=0x{:08X} ({}), arg=0x{:08X}, stacktop=0x{:08X}, "
|
||||||
"threadpriority=0x{:08X}, processorid=0x{:08X} : created handle=0x{:08X}",
|
"threadpriority=0x{:08X}, processorid=0x{:08X} : created handle=0x{:08X}",
|
||||||
entry_point, name, arg, stack_top, priority, processor_id, *out_handle);
|
entry_point, name, arg, stack_top, priority, processor_id, *out_handle);
|
||||||
|
|
||||||
return RESULT_SUCCESS;
|
return RESULT_SUCCESS;
|
||||||
}
|
}
|
||||||
|
@ -830,7 +829,7 @@ static ResultCode CreateMutex(Handle* out_handle, u32 initial_locked) {
|
||||||
CASCADE_RESULT(*out_handle, g_handle_table.Create(std::move(mutex)));
|
CASCADE_RESULT(*out_handle, g_handle_table.Create(std::move(mutex)));
|
||||||
|
|
||||||
LOG_TRACE(Kernel_SVC, "called initial_locked={} : created handle=0x{:08X}",
|
LOG_TRACE(Kernel_SVC, "called initial_locked={} : created handle=0x{:08X}",
|
||||||
initial_locked ? "true" : "false", *out_handle);
|
initial_locked ? "true" : "false", *out_handle);
|
||||||
|
|
||||||
return RESULT_SUCCESS;
|
return RESULT_SUCCESS;
|
||||||
}
|
}
|
||||||
|
@ -893,7 +892,7 @@ static ResultCode CreateSemaphore(Handle* out_handle, s32 initial_count, s32 max
|
||||||
CASCADE_RESULT(*out_handle, g_handle_table.Create(std::move(semaphore)));
|
CASCADE_RESULT(*out_handle, g_handle_table.Create(std::move(semaphore)));
|
||||||
|
|
||||||
LOG_TRACE(Kernel_SVC, "called initial_count={}, max_count={}, created handle=0x{:08X}",
|
LOG_TRACE(Kernel_SVC, "called initial_count={}, max_count={}, created handle=0x{:08X}",
|
||||||
initial_count, max_count, *out_handle);
|
initial_count, max_count, *out_handle);
|
||||||
return RESULT_SUCCESS;
|
return RESULT_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -944,7 +943,7 @@ static ResultCode CreateEvent(Handle* out_handle, u32 reset_type) {
|
||||||
CASCADE_RESULT(*out_handle, g_handle_table.Create(std::move(evt)));
|
CASCADE_RESULT(*out_handle, g_handle_table.Create(std::move(evt)));
|
||||||
|
|
||||||
LOG_TRACE(Kernel_SVC, "called reset_type=0x{:08X} : created handle=0x{:08X}", reset_type,
|
LOG_TRACE(Kernel_SVC, "called reset_type=0x{:08X} : created handle=0x{:08X}", reset_type,
|
||||||
*out_handle);
|
*out_handle);
|
||||||
return RESULT_SUCCESS;
|
return RESULT_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -987,7 +986,7 @@ static ResultCode CreateTimer(Handle* out_handle, u32 reset_type) {
|
||||||
CASCADE_RESULT(*out_handle, g_handle_table.Create(std::move(timer)));
|
CASCADE_RESULT(*out_handle, g_handle_table.Create(std::move(timer)));
|
||||||
|
|
||||||
LOG_TRACE(Kernel_SVC, "called reset_type=0x{:08X} : created handle=0x{:08X}", reset_type,
|
LOG_TRACE(Kernel_SVC, "called reset_type=0x{:08X} : created handle=0x{:08X}", reset_type,
|
||||||
*out_handle);
|
*out_handle);
|
||||||
return RESULT_SUCCESS;
|
return RESULT_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -267,7 +267,7 @@ static void DebugThreadQueue() {
|
||||||
LOG_DEBUG(Kernel, "Current: NO CURRENT THREAD");
|
LOG_DEBUG(Kernel, "Current: NO CURRENT THREAD");
|
||||||
} else {
|
} else {
|
||||||
LOG_DEBUG(Kernel, "0x{:02X} {} (current)", thread->current_priority,
|
LOG_DEBUG(Kernel, "0x{:02X} {} (current)", thread->current_priority,
|
||||||
GetCurrentThread()->GetObjectId());
|
GetCurrentThread()->GetObjectId());
|
||||||
}
|
}
|
||||||
|
|
||||||
for (auto& t : thread_list) {
|
for (auto& t : thread_list) {
|
||||||
|
@ -376,7 +376,7 @@ ResultVal<SharedPtr<Thread>> Thread::Create(std::string name, VAddr entry_point,
|
||||||
|
|
||||||
if (linheap_memory->size() + Memory::PAGE_SIZE > memory_region->size) {
|
if (linheap_memory->size() + Memory::PAGE_SIZE > memory_region->size) {
|
||||||
LOG_ERROR(Kernel_SVC,
|
LOG_ERROR(Kernel_SVC,
|
||||||
"Not enough space in region to allocate a new TLS page for thread");
|
"Not enough space in region to allocate a new TLS page for thread");
|
||||||
return ERR_OUT_OF_MEMORY;
|
return ERR_OUT_OF_MEMORY;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -261,11 +261,11 @@ void VMManager::LogLayout(Log::Level log_level) const {
|
||||||
for (const auto& p : vma_map) {
|
for (const auto& p : vma_map) {
|
||||||
const VirtualMemoryArea& vma = p.second;
|
const VirtualMemoryArea& vma = p.second;
|
||||||
LOG_GENERIC(::Log::Class::Kernel, log_level, "{:08X} - {:08X} size: {:8X} {}{}{} {}",
|
LOG_GENERIC(::Log::Class::Kernel, log_level, "{:08X} - {:08X} size: {:8X} {}{}{} {}",
|
||||||
vma.base, vma.base + vma.size, vma.size,
|
vma.base, vma.base + vma.size, vma.size,
|
||||||
(u8)vma.permissions & (u8)VMAPermission::Read ? 'R' : '-',
|
(u8)vma.permissions & (u8)VMAPermission::Read ? 'R' : '-',
|
||||||
(u8)vma.permissions & (u8)VMAPermission::Write ? 'W' : '-',
|
(u8)vma.permissions & (u8)VMAPermission::Write ? 'W' : '-',
|
||||||
(u8)vma.permissions & (u8)VMAPermission::Execute ? 'X' : '-',
|
(u8)vma.permissions & (u8)VMAPermission::Execute ? 'X' : '-',
|
||||||
GetMemoryStateName(vma.meminfo_state));
|
GetMemoryStateName(vma.meminfo_state));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -153,8 +153,8 @@ void Module::Interface::IsConnected(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(RESULT_SUCCESS);
|
||||||
rb.Push(ac->ac_connected);
|
rb.Push(ac->ac_connected);
|
||||||
|
|
||||||
LOG_WARNING(Service_AC, "(STUBBED) called unk=0x{:08X} descriptor=0x{:08X} param=0x{:08X}",
|
LOG_WARNING(Service_AC, "(STUBBED) called unk=0x{:08X} descriptor=0x{:08X} param=0x{:08X}", unk,
|
||||||
unk, unk_descriptor, unk_param);
|
unk_descriptor, unk_param);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Module::Interface::SetClientVersion(Kernel::HLERequestContext& ctx) {
|
void Module::Interface::SetClientVersion(Kernel::HLERequestContext& ctx) {
|
||||||
|
|
|
@ -144,7 +144,7 @@ ResultVal<size_t> CIAFile::WriteContentData(u64 offset, size_t length, const u8*
|
||||||
// values can be calculated.
|
// values can be calculated.
|
||||||
content_written[i] += available_to_write;
|
content_written[i] += available_to_write;
|
||||||
LOG_DEBUG(Service_AM, "Wrote {:x} to content {}, total {:x}", available_to_write, i,
|
LOG_DEBUG(Service_AM, "Wrote {:x} to content {}, total {:x}", available_to_write, i,
|
||||||
content_written[i]);
|
content_written[i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -312,7 +312,7 @@ InstallStatus InstallCIA(const std::string& path,
|
||||||
update_callback(total_bytes_read, file.GetSize());
|
update_callback(total_bytes_read, file.GetSize());
|
||||||
if (result.Failed()) {
|
if (result.Failed()) {
|
||||||
LOG_ERROR(Service_AM, "CIA file installation aborted with error code {:08x}",
|
LOG_ERROR(Service_AM, "CIA file installation aborted with error code {:08x}",
|
||||||
result.Code().raw);
|
result.Code().raw);
|
||||||
return InstallStatus::ErrorAborted;
|
return InstallStatus::ErrorAborted;
|
||||||
}
|
}
|
||||||
total_bytes_read += bytes_read;
|
total_bytes_read += bytes_read;
|
||||||
|
@ -386,7 +386,7 @@ std::string GetTitleContentPath(Service::FS::MediaType media_type, u64 tid, u16
|
||||||
if (media_type == Service::FS::MediaType::GameCard) {
|
if (media_type == Service::FS::MediaType::GameCard) {
|
||||||
// TODO(shinyquagsire23): get current app file if TID matches?
|
// TODO(shinyquagsire23): get current app file if TID matches?
|
||||||
LOG_ERROR(Service_AM, "Request for gamecard partition {} content path unimplemented!",
|
LOG_ERROR(Service_AM, "Request for gamecard partition {} content path unimplemented!",
|
||||||
static_cast<u32>(index));
|
static_cast<u32>(index));
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -608,7 +608,7 @@ void Module::Interface::DeleteContents(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(RESULT_SUCCESS);
|
||||||
rb.PushMappedBuffer(content_ids_in);
|
rb.PushMappedBuffer(content_ids_in);
|
||||||
LOG_WARNING(Service_AM, "(STUBBED) media_type={}, title_id=0x{:016x}, content_count={}",
|
LOG_WARNING(Service_AM, "(STUBBED) media_type={}, title_id=0x{:016x}, content_count={}",
|
||||||
media_type, title_id, content_count);
|
media_type, title_id, content_count);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Module::Interface::GetProgramList(Kernel::HLERequestContext& ctx) {
|
void Module::Interface::GetProgramList(Kernel::HLERequestContext& ctx) {
|
||||||
|
@ -828,8 +828,8 @@ void Module::Interface::ListDataTitleTicketInfos(Kernel::HLERequestContext& ctx)
|
||||||
rb.PushMappedBuffer(ticket_info_out);
|
rb.PushMappedBuffer(ticket_info_out);
|
||||||
|
|
||||||
LOG_WARNING(Service_AM,
|
LOG_WARNING(Service_AM,
|
||||||
"(STUBBED) ticket_count=0x{:08X}, title_id=0x{:016x}, start_index=0x{:08X}",
|
"(STUBBED) ticket_count=0x{:08X}, title_id=0x{:016x}, start_index=0x{:08X}",
|
||||||
ticket_count, title_id, start_index);
|
ticket_count, title_id, start_index);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Module::Interface::GetDLCContentInfoCount(Kernel::HLERequestContext& ctx) {
|
void Module::Interface::GetDLCContentInfoCount(Kernel::HLERequestContext& ctx) {
|
||||||
|
@ -858,7 +858,7 @@ void Module::Interface::GetDLCContentInfoCount(Kernel::HLERequestContext& ctx) {
|
||||||
} else {
|
} else {
|
||||||
rb.Push<u32>(1); // Number of content infos plus one
|
rb.Push<u32>(1); // Number of content infos plus one
|
||||||
LOG_WARNING(Service_AM, "(STUBBED) called media_type={}, title_id=0x{:016x}",
|
LOG_WARNING(Service_AM, "(STUBBED) called media_type={}, title_id=0x{:016x}",
|
||||||
static_cast<u32>(media_type), title_id);
|
static_cast<u32>(media_type), title_id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -892,7 +892,7 @@ void Module::Interface::GetTicketList(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push(ticket_list_count);
|
rb.Push(ticket_list_count);
|
||||||
rb.PushMappedBuffer(ticket_tids_out);
|
rb.PushMappedBuffer(ticket_tids_out);
|
||||||
LOG_WARNING(Service_AM, "(STUBBED) ticket_list_count=0x{:08x}, ticket_index=0x{:08x}",
|
LOG_WARNING(Service_AM, "(STUBBED) ticket_list_count=0x{:08x}, ticket_index=0x{:08x}",
|
||||||
ticket_list_count, ticket_index);
|
ticket_list_count, ticket_index);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Module::Interface::QueryAvailableTitleDatabase(Kernel::HLERequestContext& ctx) {
|
void Module::Interface::QueryAvailableTitleDatabase(Kernel::HLERequestContext& ctx) {
|
||||||
|
|
|
@ -171,7 +171,7 @@ void AppletManager::CancelAndSendParameter(const MessageParameter& parameter) {
|
||||||
auto* const slot_data = GetAppletSlotData(static_cast<AppletId>(parameter.destination_id));
|
auto* const slot_data = GetAppletSlotData(static_cast<AppletId>(parameter.destination_id));
|
||||||
if (slot_data == nullptr) {
|
if (slot_data == nullptr) {
|
||||||
LOG_DEBUG(Service_APT, "No applet was registered with the id {:03X}",
|
LOG_DEBUG(Service_APT, "No applet was registered with the id {:03X}",
|
||||||
static_cast<u32>(parameter.destination_id));
|
static_cast<u32>(parameter.destination_id));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -330,7 +330,7 @@ ResultCode AppletManager::PrepareToStartLibraryApplet(AppletId applet_id) {
|
||||||
auto applet = HLE::Applets::Applet::Get(applet_id);
|
auto applet = HLE::Applets::Applet::Get(applet_id);
|
||||||
if (applet) {
|
if (applet) {
|
||||||
LOG_WARNING(Service_APT, "applet has already been started id={:08X}",
|
LOG_WARNING(Service_APT, "applet has already been started id={:08X}",
|
||||||
static_cast<u32>(applet_id));
|
static_cast<u32>(applet_id));
|
||||||
return RESULT_SUCCESS;
|
return RESULT_SUCCESS;
|
||||||
} else {
|
} else {
|
||||||
return HLE::Applets::Applet::Create(applet_id, shared_from_this());
|
return HLE::Applets::Applet::Create(applet_id, shared_from_this());
|
||||||
|
@ -354,7 +354,7 @@ ResultCode AppletManager::PreloadLibraryApplet(AppletId applet_id) {
|
||||||
auto applet = HLE::Applets::Applet::Get(applet_id);
|
auto applet = HLE::Applets::Applet::Get(applet_id);
|
||||||
if (applet) {
|
if (applet) {
|
||||||
LOG_WARNING(Service_APT, "applet has already been started id={:08X}",
|
LOG_WARNING(Service_APT, "applet has already been started id={:08X}",
|
||||||
static_cast<u32>(applet_id));
|
static_cast<u32>(applet_id));
|
||||||
return RESULT_SUCCESS;
|
return RESULT_SUCCESS;
|
||||||
} else {
|
} else {
|
||||||
return HLE::Applets::Applet::Create(applet_id, shared_from_this());
|
return HLE::Applets::Applet::Create(applet_id, shared_from_this());
|
||||||
|
@ -401,7 +401,7 @@ ResultVal<AppletManager::AppletInfo> AppletManager::GetAppletInfo(AppletId app_i
|
||||||
ErrorSummary::NotFound, ErrorLevel::Status);
|
ErrorSummary::NotFound, ErrorLevel::Status);
|
||||||
}
|
}
|
||||||
LOG_WARNING(Service_APT, "Using HLE applet info for applet {:03X}",
|
LOG_WARNING(Service_APT, "Using HLE applet info for applet {:03X}",
|
||||||
static_cast<u32>(app_id));
|
static_cast<u32>(app_id));
|
||||||
// TODO(Subv): Get the title id for the current applet and write it in the response[2-3]
|
// TODO(Subv): Get the title id for the current applet and write it in the response[2-3]
|
||||||
return MakeResult<AppletInfo>({0, Service::FS::MediaType::NAND, true, true, 0});
|
return MakeResult<AppletInfo>({0, Service::FS::MediaType::NAND, true, true, 0});
|
||||||
}
|
}
|
||||||
|
|
|
@ -32,8 +32,8 @@ void Module::Interface::Initialize(Kernel::HLERequestContext& ctx) {
|
||||||
AppletId app_id = rp.PopEnum<AppletId>();
|
AppletId app_id = rp.PopEnum<AppletId>();
|
||||||
u32 attributes = rp.Pop<u32>();
|
u32 attributes = rp.Pop<u32>();
|
||||||
|
|
||||||
LOG_DEBUG(Service_APT, "called app_id={:#010X}, attributes={:#010X}",
|
LOG_DEBUG(Service_APT, "called app_id={:#010X}, attributes={:#010X}", static_cast<u32>(app_id),
|
||||||
static_cast<u32>(app_id), attributes);
|
attributes);
|
||||||
|
|
||||||
auto result = apt->applet_manager->Initialize(app_id, attributes);
|
auto result = apt->applet_manager->Initialize(app_id, attributes);
|
||||||
if (result.Failed()) {
|
if (result.Failed()) {
|
||||||
|
@ -307,10 +307,10 @@ void Module::Interface::SendParameter(Kernel::HLERequestContext& ctx) {
|
||||||
std::vector<u8> buffer = rp.PopStaticBuffer();
|
std::vector<u8> buffer = rp.PopStaticBuffer();
|
||||||
|
|
||||||
LOG_DEBUG(Service_APT,
|
LOG_DEBUG(Service_APT,
|
||||||
"called src_app_id={:#010X}, dst_app_id={:#010X}, signal_type={:#010X},"
|
"called src_app_id={:#010X}, dst_app_id={:#010X}, signal_type={:#010X},"
|
||||||
"buffer_size={:#010X}",
|
"buffer_size={:#010X}",
|
||||||
static_cast<u32>(src_app_id), static_cast<u32>(dst_app_id),
|
static_cast<u32>(src_app_id), static_cast<u32>(dst_app_id),
|
||||||
static_cast<u32>(signal_type), buffer_size);
|
static_cast<u32>(signal_type), buffer_size);
|
||||||
|
|
||||||
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
|
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
|
||||||
|
|
||||||
|
@ -329,8 +329,8 @@ void Module::Interface::ReceiveParameter(Kernel::HLERequestContext& ctx) {
|
||||||
AppletId app_id = rp.PopEnum<AppletId>();
|
AppletId app_id = rp.PopEnum<AppletId>();
|
||||||
u32 buffer_size = rp.Pop<u32>();
|
u32 buffer_size = rp.Pop<u32>();
|
||||||
|
|
||||||
LOG_DEBUG(Service_APT, "called app_id={:#010X}, buffer_size={:#010X}",
|
LOG_DEBUG(Service_APT, "called app_id={:#010X}, buffer_size={:#010X}", static_cast<u32>(app_id),
|
||||||
static_cast<u32>(app_id), buffer_size);
|
buffer_size);
|
||||||
|
|
||||||
auto next_parameter = apt->applet_manager->ReceiveParameter(app_id);
|
auto next_parameter = apt->applet_manager->ReceiveParameter(app_id);
|
||||||
|
|
||||||
|
@ -357,8 +357,8 @@ void Module::Interface::GlanceParameter(Kernel::HLERequestContext& ctx) {
|
||||||
AppletId app_id = rp.PopEnum<AppletId>();
|
AppletId app_id = rp.PopEnum<AppletId>();
|
||||||
u32 buffer_size = rp.Pop<u32>();
|
u32 buffer_size = rp.Pop<u32>();
|
||||||
|
|
||||||
LOG_DEBUG(Service_APT, "called app_id={:#010X}, buffer_size={:#010X}",
|
LOG_DEBUG(Service_APT, "called app_id={:#010X}, buffer_size={:#010X}", static_cast<u32>(app_id),
|
||||||
static_cast<u32>(app_id), buffer_size);
|
buffer_size);
|
||||||
|
|
||||||
auto next_parameter = apt->applet_manager->GlanceParameter(app_id);
|
auto next_parameter = apt->applet_manager->GlanceParameter(app_id);
|
||||||
|
|
||||||
|
@ -394,10 +394,10 @@ void Module::Interface::CancelParameter(Kernel::HLERequestContext& ctx) {
|
||||||
receiver_appid));
|
receiver_appid));
|
||||||
|
|
||||||
LOG_DEBUG(Service_APT,
|
LOG_DEBUG(Service_APT,
|
||||||
"called check_sender={}, sender_appid={:#010X}, "
|
"called check_sender={}, sender_appid={:#010X}, "
|
||||||
"check_receiver={}, receiver_appid={:#010X}",
|
"check_receiver={}, receiver_appid={:#010X}",
|
||||||
check_sender, static_cast<u32>(sender_appid), check_receiver,
|
check_sender, static_cast<u32>(sender_appid), check_receiver,
|
||||||
static_cast<u32>(receiver_appid));
|
static_cast<u32>(receiver_appid));
|
||||||
}
|
}
|
||||||
|
|
||||||
void Module::Interface::PrepareToStartApplication(Kernel::HLERequestContext& ctx) {
|
void Module::Interface::PrepareToStartApplication(Kernel::HLERequestContext& ctx) {
|
||||||
|
@ -415,11 +415,10 @@ void Module::Interface::PrepareToStartApplication(Kernel::HLERequestContext& ctx
|
||||||
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
|
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
|
||||||
rb.Push(RESULT_SUCCESS); // No error
|
rb.Push(RESULT_SUCCESS); // No error
|
||||||
|
|
||||||
LOG_WARNING(
|
LOG_WARNING(Service_APT,
|
||||||
Service_APT,
|
"(STUBBED) called title_info1={:#010X}, title_info2={:#010X}, title_info3={:#010X},"
|
||||||
"(STUBBED) called title_info1={:#010X}, title_info2={:#010X}, title_info3={:#010X},"
|
"title_info4={:#010X}, flags={:#010X}",
|
||||||
"title_info4={:#010X}, flags={:#010X}",
|
title_info1, title_info2, title_info3, title_info4, flags);
|
||||||
title_info1, title_info2, title_info3, title_info4, flags);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Module::Interface::StartApplication(Kernel::HLERequestContext& ctx) {
|
void Module::Interface::StartApplication(Kernel::HLERequestContext& ctx) {
|
||||||
|
@ -434,8 +433,8 @@ void Module::Interface::StartApplication(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push(RESULT_SUCCESS); // No error
|
rb.Push(RESULT_SUCCESS); // No error
|
||||||
|
|
||||||
LOG_WARNING(Service_APT,
|
LOG_WARNING(Service_APT,
|
||||||
"(STUBBED) called buffer1_size={:#010X}, buffer2_size={:#010X}, flag={:#010X}",
|
"(STUBBED) called buffer1_size={:#010X}, buffer2_size={:#010X}, flag={:#010X}",
|
||||||
buffer1_size, buffer2_size, flag);
|
buffer1_size, buffer2_size, flag);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Module::Interface::AppletUtility(Kernel::HLERequestContext& ctx) {
|
void Module::Interface::AppletUtility(Kernel::HLERequestContext& ctx) {
|
||||||
|
@ -451,8 +450,8 @@ void Module::Interface::AppletUtility(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push(RESULT_SUCCESS); // No error
|
rb.Push(RESULT_SUCCESS); // No error
|
||||||
|
|
||||||
LOG_WARNING(Service_APT,
|
LOG_WARNING(Service_APT,
|
||||||
"(STUBBED) called command={:#010X}, input_size={:#010X}, output_size={:#010X}",
|
"(STUBBED) called command={:#010X}, input_size={:#010X}, output_size={:#010X}",
|
||||||
utility_command, input_size, output_size);
|
utility_command, input_size, output_size);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Module::Interface::SetAppCpuTimeLimit(Kernel::HLERequestContext& ctx) {
|
void Module::Interface::SetAppCpuTimeLimit(Kernel::HLERequestContext& ctx) {
|
||||||
|
@ -467,8 +466,7 @@ void Module::Interface::SetAppCpuTimeLimit(Kernel::HLERequestContext& ctx) {
|
||||||
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
|
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
|
||||||
rb.Push(RESULT_SUCCESS); // No error
|
rb.Push(RESULT_SUCCESS); // No error
|
||||||
|
|
||||||
LOG_WARNING(Service_APT, "(STUBBED) called, cpu_percent={}, value={}", apt->cpu_percent,
|
LOG_WARNING(Service_APT, "(STUBBED) called, cpu_percent={}, value={}", apt->cpu_percent, value);
|
||||||
value);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Module::Interface::GetAppCpuTimeLimit(Kernel::HLERequestContext& ctx) {
|
void Module::Interface::GetAppCpuTimeLimit(Kernel::HLERequestContext& ctx) {
|
||||||
|
@ -583,7 +581,7 @@ void Module::Interface::SetScreenCapPostPermission(Kernel::HLERequestContext& ct
|
||||||
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
|
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
|
||||||
rb.Push(RESULT_SUCCESS); // No error
|
rb.Push(RESULT_SUCCESS); // No error
|
||||||
LOG_WARNING(Service_APT, "(STUBBED) called, screen_capture_post_permission={}",
|
LOG_WARNING(Service_APT, "(STUBBED) called, screen_capture_post_permission={}",
|
||||||
static_cast<u32>(apt->screen_capture_post_permission));
|
static_cast<u32>(apt->screen_capture_post_permission));
|
||||||
}
|
}
|
||||||
|
|
||||||
void Module::Interface::GetScreenCapPostPermission(Kernel::HLERequestContext& ctx) {
|
void Module::Interface::GetScreenCapPostPermission(Kernel::HLERequestContext& ctx) {
|
||||||
|
@ -593,7 +591,7 @@ void Module::Interface::GetScreenCapPostPermission(Kernel::HLERequestContext& ct
|
||||||
rb.Push(RESULT_SUCCESS); // No error
|
rb.Push(RESULT_SUCCESS); // No error
|
||||||
rb.Push(static_cast<u32>(apt->screen_capture_post_permission));
|
rb.Push(static_cast<u32>(apt->screen_capture_post_permission));
|
||||||
LOG_WARNING(Service_APT, "(STUBBED) called, screen_capture_post_permission={}",
|
LOG_WARNING(Service_APT, "(STUBBED) called, screen_capture_post_permission={}",
|
||||||
static_cast<u32>(apt->screen_capture_post_permission));
|
static_cast<u32>(apt->screen_capture_post_permission));
|
||||||
}
|
}
|
||||||
|
|
||||||
void Module::Interface::GetAppletInfo(Kernel::HLERequestContext& ctx) {
|
void Module::Interface::GetAppletInfo(Kernel::HLERequestContext& ctx) {
|
||||||
|
@ -632,9 +630,8 @@ void Module::Interface::GetStartupArgument(Kernel::HLERequestContext& ctx) {
|
||||||
|
|
||||||
std::vector<u8> parameter(parameter_size, 0);
|
std::vector<u8> parameter(parameter_size, 0);
|
||||||
|
|
||||||
LOG_WARNING(Service_APT,
|
LOG_WARNING(Service_APT, "(STUBBED) called, startup_argument_type={}, parameter_size={:#010X}",
|
||||||
"(STUBBED) called, startup_argument_type={}, parameter_size={:#010X}",
|
static_cast<u32>(startup_argument_type), parameter_size);
|
||||||
static_cast<u32>(startup_argument_type), parameter_size);
|
|
||||||
|
|
||||||
IPC::RequestBuilder rb = rp.MakeBuilder(2, 2);
|
IPC::RequestBuilder rb = rp.MakeBuilder(2, 2);
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(RESULT_SUCCESS);
|
||||||
|
@ -658,9 +655,8 @@ void Module::Interface::Wrap(Kernel::HLERequestContext& ctx) {
|
||||||
ASSERT_MSG(output_size == input_size + HW::AES::CCM_MAC_SIZE,
|
ASSERT_MSG(output_size == input_size + HW::AES::CCM_MAC_SIZE,
|
||||||
"input_size ({}) doesn't match to output_size ({})", input_size, output_size);
|
"input_size ({}) doesn't match to output_size ({})", input_size, output_size);
|
||||||
|
|
||||||
LOG_DEBUG(Service_APT,
|
LOG_DEBUG(Service_APT, "called, output_size={}, input_size={}, nonce_offset={}, nonce_size={}",
|
||||||
"called, output_size={}, input_size={}, nonce_offset={}, nonce_size={}",
|
output_size, input_size, nonce_offset, nonce_size);
|
||||||
output_size, input_size, nonce_offset, nonce_size);
|
|
||||||
|
|
||||||
// Note: This weird nonce size modification is verified against real 3DS
|
// Note: This weird nonce size modification is verified against real 3DS
|
||||||
nonce_size = std::min<u32>(nonce_size & ~3, HW::AES::CCM_NONCE_SIZE);
|
nonce_size = std::min<u32>(nonce_size & ~3, HW::AES::CCM_NONCE_SIZE);
|
||||||
|
@ -704,9 +700,8 @@ void Module::Interface::Unwrap(Kernel::HLERequestContext& ctx) {
|
||||||
ASSERT_MSG(output_size == input_size - HW::AES::CCM_MAC_SIZE,
|
ASSERT_MSG(output_size == input_size - HW::AES::CCM_MAC_SIZE,
|
||||||
"input_size ({}) doesn't match to output_size ({})", input_size, output_size);
|
"input_size ({}) doesn't match to output_size ({})", input_size, output_size);
|
||||||
|
|
||||||
LOG_DEBUG(Service_APT,
|
LOG_DEBUG(Service_APT, "called, output_size={}, input_size={}, nonce_offset={}, nonce_size={}",
|
||||||
"called, output_size={}, input_size={}, nonce_offset={}, nonce_size={}",
|
output_size, input_size, nonce_offset, nonce_size);
|
||||||
output_size, input_size, nonce_offset, nonce_size);
|
|
||||||
|
|
||||||
// Note: This weird nonce size modification is verified against real 3DS
|
// Note: This weird nonce size modification is verified against real 3DS
|
||||||
nonce_size = std::min<u32>(nonce_size & ~3, HW::AES::CCM_NONCE_SIZE);
|
nonce_size = std::min<u32>(nonce_size & ~3, HW::AES::CCM_NONCE_SIZE);
|
||||||
|
|
|
@ -36,8 +36,8 @@ void InitializeSession(Service::Interface* self) {
|
||||||
cmd_buff[1] = RESULT_SUCCESS.raw;
|
cmd_buff[1] = RESULT_SUCCESS.raw;
|
||||||
|
|
||||||
LOG_WARNING(Service_BOSS,
|
LOG_WARNING(Service_BOSS,
|
||||||
"(STUBBED) unk_param={:#018X}, translation={:#010X}, unk_param4={:#010X}",
|
"(STUBBED) unk_param={:#018X}, translation={:#010X}, unk_param4={:#010X}",
|
||||||
unk_param, translation, unk_param4);
|
unk_param, translation, unk_param4);
|
||||||
}
|
}
|
||||||
|
|
||||||
void RegisterStorage(Service::Interface* self) {
|
void RegisterStorage(Service::Interface* self) {
|
||||||
|
@ -52,9 +52,9 @@ void RegisterStorage(Service::Interface* self) {
|
||||||
cmd_buff[1] = RESULT_SUCCESS.raw;
|
cmd_buff[1] = RESULT_SUCCESS.raw;
|
||||||
|
|
||||||
LOG_WARNING(Service_BOSS,
|
LOG_WARNING(Service_BOSS,
|
||||||
"(STUBBED) unk_param1={:#010X}, unk_param2={:#010X}, unk_param3={:#010X}, "
|
"(STUBBED) unk_param1={:#010X}, unk_param2={:#010X}, unk_param3={:#010X}, "
|
||||||
"unk_flag={:#010X}",
|
"unk_flag={:#010X}",
|
||||||
unk_param1, unk_param2, unk_param3, unk_flag);
|
unk_param1, unk_param2, unk_param3, unk_flag);
|
||||||
}
|
}
|
||||||
|
|
||||||
void UnregisterStorage(Service::Interface* self) {
|
void UnregisterStorage(Service::Interface* self) {
|
||||||
|
@ -89,8 +89,8 @@ void RegisterPrivateRootCa(Service::Interface* self) {
|
||||||
cmd_buff[3] = buff_addr;
|
cmd_buff[3] = buff_addr;
|
||||||
|
|
||||||
LOG_WARNING(Service_BOSS,
|
LOG_WARNING(Service_BOSS,
|
||||||
"(STUBBED) translation={:#010X}, buff_addr{:#010X}, buff_size={:#010X}",
|
"(STUBBED) translation={:#010X}, buff_addr{:#010X}, buff_size={:#010X}",
|
||||||
translation, buff_addr, buff_size);
|
translation, buff_addr, buff_size);
|
||||||
}
|
}
|
||||||
|
|
||||||
void RegisterPrivateClientCert(Service::Interface* self) {
|
void RegisterPrivateClientCert(Service::Interface* self) {
|
||||||
|
@ -113,11 +113,11 @@ void RegisterPrivateClientCert(Service::Interface* self) {
|
||||||
cmd_buff[3] = buff2_addr;
|
cmd_buff[3] = buff2_addr;
|
||||||
|
|
||||||
LOG_WARNING(Service_BOSS,
|
LOG_WARNING(Service_BOSS,
|
||||||
"(STUBBED) unk_param1={:#010X}, unk_param2={:#010X}, "
|
"(STUBBED) unk_param1={:#010X}, unk_param2={:#010X}, "
|
||||||
"translation1={:#010X}, buff1_addr={:#010X}, buff1_size={:#010X}, "
|
"translation1={:#010X}, buff1_addr={:#010X}, buff1_size={:#010X}, "
|
||||||
"translation2={:#010X}, buff2_addr={:#010X}, buff2_size={:#010X}",
|
"translation2={:#010X}, buff2_addr={:#010X}, buff2_size={:#010X}",
|
||||||
unk_param1, unk_param2, translation1, buff1_addr, buff1_size, translation2,
|
unk_param1, unk_param2, translation1, buff1_addr, buff1_size, translation2,
|
||||||
buff2_addr, buff2_size);
|
buff2_addr, buff2_size);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GetNewArrivalFlag(Service::Interface* self) {
|
void GetNewArrivalFlag(Service::Interface* self) {
|
||||||
|
@ -140,7 +140,7 @@ void RegisterNewArrivalEvent(Service::Interface* self) {
|
||||||
cmd_buff[1] = RESULT_SUCCESS.raw;
|
cmd_buff[1] = RESULT_SUCCESS.raw;
|
||||||
|
|
||||||
LOG_WARNING(Service_BOSS, "(STUBBED) unk_param1={:#010X}, unk_param2={:#010X}", unk_param1,
|
LOG_WARNING(Service_BOSS, "(STUBBED) unk_param1={:#010X}, unk_param2={:#010X}", unk_param1,
|
||||||
unk_param2);
|
unk_param2);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetOptoutFlag(Service::Interface* self) {
|
void SetOptoutFlag(Service::Interface* self) {
|
||||||
|
@ -180,9 +180,9 @@ void RegisterTask(Service::Interface* self) {
|
||||||
cmd_buff[3] = buff_addr;
|
cmd_buff[3] = buff_addr;
|
||||||
|
|
||||||
LOG_WARNING(Service_BOSS,
|
LOG_WARNING(Service_BOSS,
|
||||||
"(STUBBED) unk_param1={:#010X}, unk_param2={:#010X}, unk_param3={:#010X}, "
|
"(STUBBED) unk_param1={:#010X}, unk_param2={:#010X}, unk_param3={:#010X}, "
|
||||||
"translation={:#010X}, buff_addr={:#010X}, buff_size={:#010X}",
|
"translation={:#010X}, buff_addr={:#010X}, buff_size={:#010X}",
|
||||||
unk_param1, unk_param2, unk_param3, translation, buff_addr, buff_size);
|
unk_param1, unk_param2, unk_param3, translation, buff_addr, buff_size);
|
||||||
}
|
}
|
||||||
|
|
||||||
void UnregisterTask(Service::Interface* self) {
|
void UnregisterTask(Service::Interface* self) {
|
||||||
|
@ -200,9 +200,9 @@ void UnregisterTask(Service::Interface* self) {
|
||||||
cmd_buff[3] = buff_addr;
|
cmd_buff[3] = buff_addr;
|
||||||
|
|
||||||
LOG_WARNING(Service_BOSS,
|
LOG_WARNING(Service_BOSS,
|
||||||
"(STUBBED) unk_param1={:#010X}, unk_param2={:#010X}, translation={:#010X}, "
|
"(STUBBED) unk_param1={:#010X}, unk_param2={:#010X}, translation={:#010X}, "
|
||||||
"buff_addr={:#010X}, buff_size={:#010X}",
|
"buff_addr={:#010X}, buff_size={:#010X}",
|
||||||
unk_param1, unk_param2, translation, buff_addr, buff_size);
|
unk_param1, unk_param2, translation, buff_addr, buff_size);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ReconfigureTask(Service::Interface* self) {
|
void ReconfigureTask(Service::Interface* self) {
|
||||||
|
@ -220,9 +220,9 @@ void ReconfigureTask(Service::Interface* self) {
|
||||||
cmd_buff[3] = buff_addr;
|
cmd_buff[3] = buff_addr;
|
||||||
|
|
||||||
LOG_WARNING(Service_BOSS,
|
LOG_WARNING(Service_BOSS,
|
||||||
"(STUBBED) unk_param1={:#010X}, unk_param2={:#010X}, translation={:#010X}, "
|
"(STUBBED) unk_param1={:#010X}, unk_param2={:#010X}, translation={:#010X}, "
|
||||||
"buff_addr={:#010X}, buff_size={:#010X}",
|
"buff_addr={:#010X}, buff_size={:#010X}",
|
||||||
unk_param1, unk_param2, translation, buff_addr, buff_size);
|
unk_param1, unk_param2, translation, buff_addr, buff_size);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GetTaskIdList(Service::Interface* self) {
|
void GetTaskIdList(Service::Interface* self) {
|
||||||
|
@ -247,8 +247,8 @@ void GetStepIdList(Service::Interface* self) {
|
||||||
cmd_buff[3] = buff_addr;
|
cmd_buff[3] = buff_addr;
|
||||||
|
|
||||||
LOG_WARNING(Service_BOSS,
|
LOG_WARNING(Service_BOSS,
|
||||||
"(STUBBED) translation={:#010X}, buff_addr={:#010X}, buff_size={:#010X}",
|
"(STUBBED) translation={:#010X}, buff_addr={:#010X}, buff_size={:#010X}",
|
||||||
translation, buff_addr, buff_size);
|
translation, buff_addr, buff_size);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GetNsDataIdList(Service::Interface* self) {
|
void GetNsDataIdList(Service::Interface* self) {
|
||||||
|
@ -270,11 +270,10 @@ void GetNsDataIdList(Service::Interface* self) {
|
||||||
cmd_buff[5] = buff_addr;
|
cmd_buff[5] = buff_addr;
|
||||||
|
|
||||||
LOG_WARNING(Service_BOSS,
|
LOG_WARNING(Service_BOSS,
|
||||||
"(STUBBED) unk_param1={:#010X}, unk_param2={:#010X}, unk_param3={:#010X}, "
|
"(STUBBED) unk_param1={:#010X}, unk_param2={:#010X}, unk_param3={:#010X}, "
|
||||||
"unk_param4={:#010X}, translation={:#010X}, "
|
"unk_param4={:#010X}, translation={:#010X}, "
|
||||||
"buff_addr={:#010X}, buff_size={:#010X}",
|
"buff_addr={:#010X}, buff_size={:#010X}",
|
||||||
unk_param1, unk_param2, unk_param3, unk_param4, translation, buff_addr,
|
unk_param1, unk_param2, unk_param3, unk_param4, translation, buff_addr, buff_size);
|
||||||
buff_size);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void GetOwnNsDataIdList(Service::Interface* self) {
|
void GetOwnNsDataIdList(Service::Interface* self) {
|
||||||
|
@ -296,11 +295,10 @@ void GetOwnNsDataIdList(Service::Interface* self) {
|
||||||
cmd_buff[5] = buff_addr;
|
cmd_buff[5] = buff_addr;
|
||||||
|
|
||||||
LOG_WARNING(Service_BOSS,
|
LOG_WARNING(Service_BOSS,
|
||||||
"(STUBBED) unk_param1={:#010X}, unk_param2={:#010X}, unk_param3={:#010X}, "
|
"(STUBBED) unk_param1={:#010X}, unk_param2={:#010X}, unk_param3={:#010X}, "
|
||||||
"unk_param4={:#010X}, translation={:#010X}, "
|
"unk_param4={:#010X}, translation={:#010X}, "
|
||||||
"buff_addr={:#010X}, buff_size={:#010X}",
|
"buff_addr={:#010X}, buff_size={:#010X}",
|
||||||
unk_param1, unk_param2, unk_param3, unk_param4, translation, buff_addr,
|
unk_param1, unk_param2, unk_param3, unk_param4, translation, buff_addr, buff_size);
|
||||||
buff_size);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void GetNewDataNsDataIdList(Service::Interface* self) {
|
void GetNewDataNsDataIdList(Service::Interface* self) {
|
||||||
|
@ -322,11 +320,10 @@ void GetNewDataNsDataIdList(Service::Interface* self) {
|
||||||
cmd_buff[5] = buff_addr;
|
cmd_buff[5] = buff_addr;
|
||||||
|
|
||||||
LOG_WARNING(Service_BOSS,
|
LOG_WARNING(Service_BOSS,
|
||||||
"(STUBBED) unk_param1={:#010X}, unk_param2={:#010X}, unk_param3={:#010X}, "
|
"(STUBBED) unk_param1={:#010X}, unk_param2={:#010X}, unk_param3={:#010X}, "
|
||||||
"unk_param4={:#010X}, translation={:#010X}, "
|
"unk_param4={:#010X}, translation={:#010X}, "
|
||||||
"buff_addr={:#010X}, buff_size={:#010X}",
|
"buff_addr={:#010X}, buff_size={:#010X}",
|
||||||
unk_param1, unk_param2, unk_param3, unk_param4, translation, buff_addr,
|
unk_param1, unk_param2, unk_param3, unk_param4, translation, buff_addr, buff_size);
|
||||||
buff_size);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void GetOwnNewDataNsDataIdList(Service::Interface* self) {
|
void GetOwnNewDataNsDataIdList(Service::Interface* self) {
|
||||||
|
@ -348,11 +345,10 @@ void GetOwnNewDataNsDataIdList(Service::Interface* self) {
|
||||||
cmd_buff[5] = buff_addr;
|
cmd_buff[5] = buff_addr;
|
||||||
|
|
||||||
LOG_WARNING(Service_BOSS,
|
LOG_WARNING(Service_BOSS,
|
||||||
"(STUBBED) unk_param1={:#010X}, unk_param2={:#010X}, unk_param3={:#010X}, "
|
"(STUBBED) unk_param1={:#010X}, unk_param2={:#010X}, unk_param3={:#010X}, "
|
||||||
"unk_param4={:#010X}, translation={:#010X}, "
|
"unk_param4={:#010X}, translation={:#010X}, "
|
||||||
"buff_addr={:#010X}, buff_size={:#010X}",
|
"buff_addr={:#010X}, buff_size={:#010X}",
|
||||||
unk_param1, unk_param2, unk_param3, unk_param4, translation, buff_addr,
|
unk_param1, unk_param2, unk_param3, unk_param4, translation, buff_addr, buff_size);
|
||||||
buff_size);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void SendProperty(Service::Interface* self) {
|
void SendProperty(Service::Interface* self) {
|
||||||
|
@ -370,9 +366,9 @@ void SendProperty(Service::Interface* self) {
|
||||||
cmd_buff[3] = buff_addr;
|
cmd_buff[3] = buff_addr;
|
||||||
|
|
||||||
LOG_WARNING(Service_BOSS,
|
LOG_WARNING(Service_BOSS,
|
||||||
"(STUBBED) unk_param1={:#010X}, unk_param2={:#010X}, translation={:#010X}, "
|
"(STUBBED) unk_param1={:#010X}, unk_param2={:#010X}, translation={:#010X}, "
|
||||||
"buff_addr={:#010X}, buff_size={:#010X}",
|
"buff_addr={:#010X}, buff_size={:#010X}",
|
||||||
unk_param1, unk_param2, translation, buff_addr, buff_size);
|
unk_param1, unk_param2, translation, buff_addr, buff_size);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SendPropertyHandle(Service::Interface* self) {
|
void SendPropertyHandle(Service::Interface* self) {
|
||||||
|
@ -389,9 +385,9 @@ void SendPropertyHandle(Service::Interface* self) {
|
||||||
cmd_buff[3] = buff_addr;
|
cmd_buff[3] = buff_addr;
|
||||||
|
|
||||||
LOG_WARNING(Service_BOSS,
|
LOG_WARNING(Service_BOSS,
|
||||||
"(STUBBED) unk_param1={:#010X}, translation={:#010X}, "
|
"(STUBBED) unk_param1={:#010X}, translation={:#010X}, "
|
||||||
"buff_addr={:#010X}, buff_size={:#010X}",
|
"buff_addr={:#010X}, buff_size={:#010X}",
|
||||||
unk_param1, translation, buff_addr, buff_size);
|
unk_param1, translation, buff_addr, buff_size);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ReceiveProperty(Service::Interface* self) {
|
void ReceiveProperty(Service::Interface* self) {
|
||||||
|
@ -409,9 +405,9 @@ void ReceiveProperty(Service::Interface* self) {
|
||||||
cmd_buff[4] = buff_addr;
|
cmd_buff[4] = buff_addr;
|
||||||
|
|
||||||
LOG_WARNING(Service_BOSS,
|
LOG_WARNING(Service_BOSS,
|
||||||
"(STUBBED) unk_param1={:#010X}, buff_size={:#010X}, "
|
"(STUBBED) unk_param1={:#010X}, buff_size={:#010X}, "
|
||||||
"translation={:#010X}, buff_addr={:#010X}",
|
"translation={:#010X}, buff_addr={:#010X}",
|
||||||
unk_param1, buff_size, translation, buff_addr);
|
unk_param1, buff_size, translation, buff_addr);
|
||||||
}
|
}
|
||||||
|
|
||||||
void UpdateTaskInterval(Service::Interface* self) {
|
void UpdateTaskInterval(Service::Interface* self) {
|
||||||
|
@ -429,9 +425,9 @@ void UpdateTaskInterval(Service::Interface* self) {
|
||||||
cmd_buff[3] = buff_addr;
|
cmd_buff[3] = buff_addr;
|
||||||
|
|
||||||
LOG_WARNING(Service_BOSS,
|
LOG_WARNING(Service_BOSS,
|
||||||
"(STUBBED) unk_param1={:#010X}, unk_param2={:#010X}, "
|
"(STUBBED) unk_param1={:#010X}, unk_param2={:#010X}, "
|
||||||
"translation={:#010X}, buff_addr={:#010X}, buff_size={:#010X}",
|
"translation={:#010X}, buff_addr={:#010X}, buff_size={:#010X}",
|
||||||
unk_param1, unk_param2, translation, buff_addr, buff_size);
|
unk_param1, unk_param2, translation, buff_addr, buff_size);
|
||||||
}
|
}
|
||||||
|
|
||||||
void UpdateTaskCount(Service::Interface* self) {
|
void UpdateTaskCount(Service::Interface* self) {
|
||||||
|
@ -448,9 +444,9 @@ void UpdateTaskCount(Service::Interface* self) {
|
||||||
cmd_buff[3] = buff_addr;
|
cmd_buff[3] = buff_addr;
|
||||||
|
|
||||||
LOG_WARNING(Service_BOSS,
|
LOG_WARNING(Service_BOSS,
|
||||||
"(STUBBED) buff_size={:#010X}, unk_param2={:#010X}, "
|
"(STUBBED) buff_size={:#010X}, unk_param2={:#010X}, "
|
||||||
"translation={:#010X}, buff_addr={:#010X}",
|
"translation={:#010X}, buff_addr={:#010X}",
|
||||||
buff_size, unk_param2, translation, buff_addr);
|
buff_size, unk_param2, translation, buff_addr);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GetTaskInterval(Service::Interface* self) {
|
void GetTaskInterval(Service::Interface* self) {
|
||||||
|
@ -468,9 +464,9 @@ void GetTaskInterval(Service::Interface* self) {
|
||||||
cmd_buff[4] = buff_addr;
|
cmd_buff[4] = buff_addr;
|
||||||
|
|
||||||
LOG_WARNING(Service_BOSS,
|
LOG_WARNING(Service_BOSS,
|
||||||
"(STUBBED) unk_param1={:#010X}, translation={:#010X}, "
|
"(STUBBED) unk_param1={:#010X}, translation={:#010X}, "
|
||||||
"buff_addr={:#010X}, buff_size={:#010X}",
|
"buff_addr={:#010X}, buff_size={:#010X}",
|
||||||
unk_param1, translation, buff_addr, buff_size);
|
unk_param1, translation, buff_addr, buff_size);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GetTaskCount(Service::Interface* self) {
|
void GetTaskCount(Service::Interface* self) {
|
||||||
|
@ -488,9 +484,9 @@ void GetTaskCount(Service::Interface* self) {
|
||||||
cmd_buff[4] = buff_addr;
|
cmd_buff[4] = buff_addr;
|
||||||
|
|
||||||
LOG_WARNING(Service_BOSS,
|
LOG_WARNING(Service_BOSS,
|
||||||
"(STUBBED) unk_param1={:#010X}, translation={:#010X}, "
|
"(STUBBED) unk_param1={:#010X}, translation={:#010X}, "
|
||||||
"buff_addr={:#010X}, buff_size={:#010X}",
|
"buff_addr={:#010X}, buff_size={:#010X}",
|
||||||
unk_param1, translation, buff_addr, buff_size);
|
unk_param1, translation, buff_addr, buff_size);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GetTaskServiceStatus(Service::Interface* self) {
|
void GetTaskServiceStatus(Service::Interface* self) {
|
||||||
|
@ -508,9 +504,9 @@ void GetTaskServiceStatus(Service::Interface* self) {
|
||||||
cmd_buff[4] = buff_addr;
|
cmd_buff[4] = buff_addr;
|
||||||
|
|
||||||
LOG_WARNING(Service_BOSS,
|
LOG_WARNING(Service_BOSS,
|
||||||
"(STUBBED) unk_param1={:#010X}, translation={:#010X}, "
|
"(STUBBED) unk_param1={:#010X}, translation={:#010X}, "
|
||||||
"buff_addr={:#010X}, buff_size={:#010X}",
|
"buff_addr={:#010X}, buff_size={:#010X}",
|
||||||
unk_param1, translation, buff_addr, buff_size);
|
unk_param1, translation, buff_addr, buff_size);
|
||||||
}
|
}
|
||||||
|
|
||||||
void StartTask(Service::Interface* self) {
|
void StartTask(Service::Interface* self) {
|
||||||
|
@ -527,9 +523,9 @@ void StartTask(Service::Interface* self) {
|
||||||
cmd_buff[3] = buff_addr;
|
cmd_buff[3] = buff_addr;
|
||||||
|
|
||||||
LOG_WARNING(Service_BOSS,
|
LOG_WARNING(Service_BOSS,
|
||||||
"(STUBBED) unk_param1={:#010X}, translation={:#010X}, "
|
"(STUBBED) unk_param1={:#010X}, translation={:#010X}, "
|
||||||
"buff_addr={:#010X}, buff_size={:#010X}",
|
"buff_addr={:#010X}, buff_size={:#010X}",
|
||||||
unk_param1, translation, buff_addr, buff_size);
|
unk_param1, translation, buff_addr, buff_size);
|
||||||
}
|
}
|
||||||
|
|
||||||
void StartTaskImmediate(Service::Interface* self) {
|
void StartTaskImmediate(Service::Interface* self) {
|
||||||
|
@ -546,9 +542,9 @@ void StartTaskImmediate(Service::Interface* self) {
|
||||||
cmd_buff[3] = buff_addr;
|
cmd_buff[3] = buff_addr;
|
||||||
|
|
||||||
LOG_WARNING(Service_BOSS,
|
LOG_WARNING(Service_BOSS,
|
||||||
"(STUBBED) unk_param1={:#010X}, translation={:#010X}, "
|
"(STUBBED) unk_param1={:#010X}, translation={:#010X}, "
|
||||||
"buff_addr={:#010X}, buff_size={:#010X}",
|
"buff_addr={:#010X}, buff_size={:#010X}",
|
||||||
unk_param1, translation, buff_addr, buff_size);
|
unk_param1, translation, buff_addr, buff_size);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CancelTask(Service::Interface* self) {
|
void CancelTask(Service::Interface* self) {
|
||||||
|
@ -565,9 +561,9 @@ void CancelTask(Service::Interface* self) {
|
||||||
cmd_buff[3] = buff_addr;
|
cmd_buff[3] = buff_addr;
|
||||||
|
|
||||||
LOG_WARNING(Service_BOSS,
|
LOG_WARNING(Service_BOSS,
|
||||||
"(STUBBED) unk_param1={:#010X}, translation={:#010X}, "
|
"(STUBBED) unk_param1={:#010X}, translation={:#010X}, "
|
||||||
"buff_addr={:#010X}, buff_size={:#010X}",
|
"buff_addr={:#010X}, buff_size={:#010X}",
|
||||||
unk_param1, translation, buff_addr, buff_size);
|
unk_param1, translation, buff_addr, buff_size);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GetTaskFinishHandle(Service::Interface* self) {
|
void GetTaskFinishHandle(Service::Interface* self) {
|
||||||
|
@ -598,9 +594,9 @@ void GetTaskState(Service::Interface* self) {
|
||||||
cmd_buff[6] = buff_addr;
|
cmd_buff[6] = buff_addr;
|
||||||
|
|
||||||
LOG_WARNING(Service_BOSS,
|
LOG_WARNING(Service_BOSS,
|
||||||
"(STUBBED) buff_size={:#010X}, unk_param2={:#010X}, "
|
"(STUBBED) buff_size={:#010X}, unk_param2={:#010X}, "
|
||||||
"translation={:#010X}, buff_addr={:#010X}",
|
"translation={:#010X}, buff_addr={:#010X}",
|
||||||
buff_size, unk_param2, translation, buff_addr);
|
buff_size, unk_param2, translation, buff_addr);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GetTaskResult(Service::Interface* self) {
|
void GetTaskResult(Service::Interface* self) {
|
||||||
|
@ -620,9 +616,9 @@ void GetTaskResult(Service::Interface* self) {
|
||||||
cmd_buff[6] = buff_addr;
|
cmd_buff[6] = buff_addr;
|
||||||
|
|
||||||
LOG_WARNING(Service_BOSS,
|
LOG_WARNING(Service_BOSS,
|
||||||
"(STUBBED) unk_param1={:#010X}, translation={:#010X}, "
|
"(STUBBED) unk_param1={:#010X}, translation={:#010X}, "
|
||||||
"buff_addr={:#010X}, buff_size={:#010X}",
|
"buff_addr={:#010X}, buff_size={:#010X}",
|
||||||
unk_param1, translation, buff_addr, buff_size);
|
unk_param1, translation, buff_addr, buff_size);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GetTaskCommErrorCode(Service::Interface* self) {
|
void GetTaskCommErrorCode(Service::Interface* self) {
|
||||||
|
@ -642,9 +638,9 @@ void GetTaskCommErrorCode(Service::Interface* self) {
|
||||||
cmd_buff[6] = buff_addr;
|
cmd_buff[6] = buff_addr;
|
||||||
|
|
||||||
LOG_WARNING(Service_BOSS,
|
LOG_WARNING(Service_BOSS,
|
||||||
"(STUBBED) unk_param1={:#010X}, translation={:#010X}, "
|
"(STUBBED) unk_param1={:#010X}, translation={:#010X}, "
|
||||||
"buff_addr={:#010X}, buff_size={:#010X}",
|
"buff_addr={:#010X}, buff_size={:#010X}",
|
||||||
unk_param1, translation, buff_addr, buff_size);
|
unk_param1, translation, buff_addr, buff_size);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GetTaskStatus(Service::Interface* self) {
|
void GetTaskStatus(Service::Interface* self) {
|
||||||
|
@ -664,9 +660,9 @@ void GetTaskStatus(Service::Interface* self) {
|
||||||
cmd_buff[4] = buff_addr;
|
cmd_buff[4] = buff_addr;
|
||||||
|
|
||||||
LOG_WARNING(Service_BOSS,
|
LOG_WARNING(Service_BOSS,
|
||||||
"(STUBBED) unk_param1={:#010X}, unk_param2={:#010X}, unk_param3={:#010X}, "
|
"(STUBBED) unk_param1={:#010X}, unk_param2={:#010X}, unk_param3={:#010X}, "
|
||||||
"translation={:#010X}, buff_addr={:#010X}, buff_size={:#010X}",
|
"translation={:#010X}, buff_addr={:#010X}, buff_size={:#010X}",
|
||||||
unk_param1, unk_param2, unk_param3, translation, buff_addr, buff_size);
|
unk_param1, unk_param2, unk_param3, translation, buff_addr, buff_size);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GetTaskError(Service::Interface* self) {
|
void GetTaskError(Service::Interface* self) {
|
||||||
|
@ -685,9 +681,9 @@ void GetTaskError(Service::Interface* self) {
|
||||||
cmd_buff[4] = buff_addr;
|
cmd_buff[4] = buff_addr;
|
||||||
|
|
||||||
LOG_WARNING(Service_BOSS,
|
LOG_WARNING(Service_BOSS,
|
||||||
"(STUBBED) unk_param1={:#010X}, unk_param2={:#010X}, translation={:#010X}, "
|
"(STUBBED) unk_param1={:#010X}, unk_param2={:#010X}, translation={:#010X}, "
|
||||||
"buff_addr={:#010X}, buff_size={:#010X}",
|
"buff_addr={:#010X}, buff_size={:#010X}",
|
||||||
unk_param1, unk_param2, translation, buff_addr, buff_size);
|
unk_param1, unk_param2, translation, buff_addr, buff_size);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GetTaskInfo(Service::Interface* self) {
|
void GetTaskInfo(Service::Interface* self) {
|
||||||
|
@ -705,9 +701,9 @@ void GetTaskInfo(Service::Interface* self) {
|
||||||
cmd_buff[3] = buff_addr;
|
cmd_buff[3] = buff_addr;
|
||||||
|
|
||||||
LOG_WARNING(Service_BOSS,
|
LOG_WARNING(Service_BOSS,
|
||||||
"(STUBBED) unk_param1={:#010X}, unk_param2={:#010X}, translation={:#010X}, "
|
"(STUBBED) unk_param1={:#010X}, unk_param2={:#010X}, translation={:#010X}, "
|
||||||
"buff_addr={:#010X}, buff_size={:#010X}",
|
"buff_addr={:#010X}, buff_size={:#010X}",
|
||||||
unk_param1, unk_param2, translation, buff_addr, buff_size);
|
unk_param1, unk_param2, translation, buff_addr, buff_size);
|
||||||
}
|
}
|
||||||
|
|
||||||
void DeleteNsData(Service::Interface* self) {
|
void DeleteNsData(Service::Interface* self) {
|
||||||
|
@ -737,9 +733,9 @@ void GetNsDataHeaderInfo(Service::Interface* self) {
|
||||||
cmd_buff[3] = buff_addr;
|
cmd_buff[3] = buff_addr;
|
||||||
|
|
||||||
LOG_WARNING(Service_BOSS,
|
LOG_WARNING(Service_BOSS,
|
||||||
"(STUBBED) unk_param1={:#010X}, unk_param2={:#010X}, unk_param3={:#010X}, "
|
"(STUBBED) unk_param1={:#010X}, unk_param2={:#010X}, unk_param3={:#010X}, "
|
||||||
"translation={:#010X}, buff_addr={:#010X}, buff_size={:#010X}",
|
"translation={:#010X}, buff_addr={:#010X}, buff_size={:#010X}",
|
||||||
unk_param1, unk_param2, unk_param3, translation, buff_addr, buff_size);
|
unk_param1, unk_param2, unk_param3, translation, buff_addr, buff_size);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ReadNsData(Service::Interface* self) {
|
void ReadNsData(Service::Interface* self) {
|
||||||
|
@ -761,11 +757,10 @@ void ReadNsData(Service::Interface* self) {
|
||||||
cmd_buff[5] = buff_addr;
|
cmd_buff[5] = buff_addr;
|
||||||
|
|
||||||
LOG_WARNING(Service_BOSS,
|
LOG_WARNING(Service_BOSS,
|
||||||
"(STUBBED) unk_param1={:#010X}, unk_param2={:#010X}, unk_param3={:#010X}, "
|
"(STUBBED) unk_param1={:#010X}, unk_param2={:#010X}, unk_param3={:#010X}, "
|
||||||
"unk_param4={:#010X}, translation={:#010X}, "
|
"unk_param4={:#010X}, translation={:#010X}, "
|
||||||
"buff_addr={:#010X}, buff_size={:#010X}",
|
"buff_addr={:#010X}, buff_size={:#010X}",
|
||||||
unk_param1, unk_param2, unk_param3, unk_param4, translation, buff_addr,
|
unk_param1, unk_param2, unk_param3, unk_param4, translation, buff_addr, buff_size);
|
||||||
buff_size);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetNsDataAdditionalInfo(Service::Interface* self) {
|
void SetNsDataAdditionalInfo(Service::Interface* self) {
|
||||||
|
@ -778,7 +773,7 @@ void SetNsDataAdditionalInfo(Service::Interface* self) {
|
||||||
cmd_buff[1] = RESULT_SUCCESS.raw;
|
cmd_buff[1] = RESULT_SUCCESS.raw;
|
||||||
|
|
||||||
LOG_WARNING(Service_BOSS, "(STUBBED) unk_param1={:#010X}, unk_param2={:#010X}", unk_param1,
|
LOG_WARNING(Service_BOSS, "(STUBBED) unk_param1={:#010X}, unk_param2={:#010X}", unk_param1,
|
||||||
unk_param2);
|
unk_param2);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GetNsDataAdditionalInfo(Service::Interface* self) {
|
void GetNsDataAdditionalInfo(Service::Interface* self) {
|
||||||
|
@ -803,7 +798,7 @@ void SetNsDataNewFlag(Service::Interface* self) {
|
||||||
cmd_buff[1] = RESULT_SUCCESS.raw;
|
cmd_buff[1] = RESULT_SUCCESS.raw;
|
||||||
|
|
||||||
LOG_WARNING(Service_BOSS, "(STUBBED) unk_param1={:#010X}, ns_data_new_flag={:#010X}",
|
LOG_WARNING(Service_BOSS, "(STUBBED) unk_param1={:#010X}, ns_data_new_flag={:#010X}",
|
||||||
unk_param1, ns_data_new_flag);
|
unk_param1, ns_data_new_flag);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GetNsDataNewFlag(Service::Interface* self) {
|
void GetNsDataNewFlag(Service::Interface* self) {
|
||||||
|
@ -816,7 +811,7 @@ void GetNsDataNewFlag(Service::Interface* self) {
|
||||||
cmd_buff[2] = ns_data_new_flag;
|
cmd_buff[2] = ns_data_new_flag;
|
||||||
|
|
||||||
LOG_WARNING(Service_BOSS, "(STUBBED) unk_param1={:#010X}, ns_data_new_flag={:#010X}",
|
LOG_WARNING(Service_BOSS, "(STUBBED) unk_param1={:#010X}, ns_data_new_flag={:#010X}",
|
||||||
unk_param1, ns_data_new_flag);
|
unk_param1, ns_data_new_flag);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GetNsDataLastUpdate(Service::Interface* self) {
|
void GetNsDataLastUpdate(Service::Interface* self) {
|
||||||
|
@ -857,9 +852,9 @@ void RegisterStorageEntry(Service::Interface* self) {
|
||||||
cmd_buff[1] = RESULT_SUCCESS.raw;
|
cmd_buff[1] = RESULT_SUCCESS.raw;
|
||||||
|
|
||||||
LOG_WARNING(Service_BOSS,
|
LOG_WARNING(Service_BOSS,
|
||||||
"(STUBBED) unk_param1={:#010X}, unk_param2={:#010X}, unk_param3={:#010X}, "
|
"(STUBBED) unk_param1={:#010X}, unk_param2={:#010X}, unk_param3={:#010X}, "
|
||||||
"unk_param4={:#010X}, unk_param5={:#010X}",
|
"unk_param4={:#010X}, unk_param5={:#010X}",
|
||||||
unk_param1, unk_param2, unk_param3, unk_param4, unk_param5);
|
unk_param1, unk_param2, unk_param3, unk_param4, unk_param5);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GetStorageEntryInfo(Service::Interface* self) {
|
void GetStorageEntryInfo(Service::Interface* self) {
|
||||||
|
@ -885,9 +880,9 @@ void SetStorageOption(Service::Interface* self) {
|
||||||
cmd_buff[1] = RESULT_SUCCESS.raw;
|
cmd_buff[1] = RESULT_SUCCESS.raw;
|
||||||
|
|
||||||
LOG_WARNING(Service_BOSS,
|
LOG_WARNING(Service_BOSS,
|
||||||
"(STUBBED) unk_param1={:#010X}, unk_param2={:#010X}, "
|
"(STUBBED) unk_param1={:#010X}, unk_param2={:#010X}, "
|
||||||
"unk_param3={:#010X}, unk_param4={:#010X}",
|
"unk_param3={:#010X}, unk_param4={:#010X}",
|
||||||
unk_param1, unk_param2, unk_param3, unk_param4);
|
unk_param1, unk_param2, unk_param3, unk_param4);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GetStorageOption(Service::Interface* self) {
|
void GetStorageOption(Service::Interface* self) {
|
||||||
|
@ -917,9 +912,9 @@ void StartBgImmediate(Service::Interface* self) {
|
||||||
cmd_buff[3] = buff_addr;
|
cmd_buff[3] = buff_addr;
|
||||||
|
|
||||||
LOG_WARNING(Service_BOSS,
|
LOG_WARNING(Service_BOSS,
|
||||||
"(STUBBED) buff_size={:#010X}, unk_param2={:#010X}, "
|
"(STUBBED) buff_size={:#010X}, unk_param2={:#010X}, "
|
||||||
"translation={:#010X}, buff_addr={:#010X}",
|
"translation={:#010X}, buff_addr={:#010X}",
|
||||||
unk_param1, translation, buff_addr, buff_size);
|
unk_param1, translation, buff_addr, buff_size);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GetTaskActivePriority(Service::Interface* self) {
|
void GetTaskActivePriority(Service::Interface* self) {
|
||||||
|
@ -937,9 +932,9 @@ void GetTaskActivePriority(Service::Interface* self) {
|
||||||
cmd_buff[4] = buff_addr;
|
cmd_buff[4] = buff_addr;
|
||||||
|
|
||||||
LOG_WARNING(Service_BOSS,
|
LOG_WARNING(Service_BOSS,
|
||||||
"(STUBBED) buff_size={:#010X}, unk_param2={:#010X}, "
|
"(STUBBED) buff_size={:#010X}, unk_param2={:#010X}, "
|
||||||
"translation={:#010X}, buff_addr={:#010X}",
|
"translation={:#010X}, buff_addr={:#010X}",
|
||||||
unk_param1, translation, buff_addr, buff_size);
|
unk_param1, translation, buff_addr, buff_size);
|
||||||
}
|
}
|
||||||
|
|
||||||
void RegisterImmediateTask(Service::Interface* self) {
|
void RegisterImmediateTask(Service::Interface* self) {
|
||||||
|
@ -958,9 +953,9 @@ void RegisterImmediateTask(Service::Interface* self) {
|
||||||
cmd_buff[4] = buff_addr;
|
cmd_buff[4] = buff_addr;
|
||||||
|
|
||||||
LOG_WARNING(Service_BOSS,
|
LOG_WARNING(Service_BOSS,
|
||||||
"(STUBBED) unk_param1={:#010X}, unk_param2={:#010X}, unk_param3={:#010X}, "
|
"(STUBBED) unk_param1={:#010X}, unk_param2={:#010X}, unk_param3={:#010X}, "
|
||||||
"translation={:#010X}, buff_addr={:#010X}, buff_size={:#010X}",
|
"translation={:#010X}, buff_addr={:#010X}, buff_size={:#010X}",
|
||||||
unk_param1, unk_param2, unk_param3, translation, buff_addr, buff_size);
|
unk_param1, unk_param2, unk_param3, translation, buff_addr, buff_size);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetTaskQuery(Service::Interface* self) {
|
void SetTaskQuery(Service::Interface* self) {
|
||||||
|
@ -983,11 +978,11 @@ void SetTaskQuery(Service::Interface* self) {
|
||||||
cmd_buff[3] = buff2_addr;
|
cmd_buff[3] = buff2_addr;
|
||||||
|
|
||||||
LOG_WARNING(Service_BOSS,
|
LOG_WARNING(Service_BOSS,
|
||||||
"(STUBBED) unk_param1={:#010X}, unk_param2={:#010X}, "
|
"(STUBBED) unk_param1={:#010X}, unk_param2={:#010X}, "
|
||||||
"translation1={:#010X}, buff1_addr={:#010X}, buff1_size={:#010X}, "
|
"translation1={:#010X}, buff1_addr={:#010X}, buff1_size={:#010X}, "
|
||||||
"translation2={:#010X}, buff2_addr={:#010X}, buff2_size={:#010X}",
|
"translation2={:#010X}, buff2_addr={:#010X}, buff2_size={:#010X}",
|
||||||
unk_param1, unk_param2, translation1, buff1_addr, buff1_size, translation2,
|
unk_param1, unk_param2, translation1, buff1_addr, buff1_size, translation2,
|
||||||
buff2_addr, buff2_size);
|
buff2_addr, buff2_size);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GetTaskQuery(Service::Interface* self) {
|
void GetTaskQuery(Service::Interface* self) {
|
||||||
|
@ -1010,11 +1005,11 @@ void GetTaskQuery(Service::Interface* self) {
|
||||||
cmd_buff[3] = buff2_addr;
|
cmd_buff[3] = buff2_addr;
|
||||||
|
|
||||||
LOG_WARNING(Service_BOSS,
|
LOG_WARNING(Service_BOSS,
|
||||||
"(STUBBED) unk_param1={:#010X}, unk_param2={:#010X}, "
|
"(STUBBED) unk_param1={:#010X}, unk_param2={:#010X}, "
|
||||||
"translation1={:#010X}, buff1_addr={:#010X}, buff1_size={:#010X}, "
|
"translation1={:#010X}, buff1_addr={:#010X}, buff1_size={:#010X}, "
|
||||||
"translation2={:#010X}, buff2_addr={:#010X}, buff2_size={:#010X}",
|
"translation2={:#010X}, buff2_addr={:#010X}, buff2_size={:#010X}",
|
||||||
unk_param1, unk_param2, translation1, buff1_addr, buff1_size, translation2,
|
unk_param1, unk_param2, translation1, buff1_addr, buff1_size, translation2,
|
||||||
buff2_addr, buff2_size);
|
buff2_addr, buff2_size);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Init() {
|
void Init() {
|
||||||
|
|
|
@ -87,7 +87,7 @@ void Module::CompletionEventCallBack(u64 port_id, int) {
|
||||||
if (port.x1 <= port.x0 || port.y1 <= port.y0 || port.x1 > original_width ||
|
if (port.x1 <= port.x0 || port.y1 <= port.y0 || port.x1 > original_width ||
|
||||||
port.y1 > original_height) {
|
port.y1 > original_height) {
|
||||||
LOG_ERROR(Service_CAM, "Invalid trimming coordinates x0={}, y0={}, x1={}, y1={}",
|
LOG_ERROR(Service_CAM, "Invalid trimming coordinates x0={}, y0={}, x1={}, y1={}",
|
||||||
port.x0, port.y0, port.x1, port.y1);
|
port.x0, port.y0, port.x1, port.y1);
|
||||||
trim_width = 0;
|
trim_width = 0;
|
||||||
trim_height = 0;
|
trim_height = 0;
|
||||||
} else {
|
} else {
|
||||||
|
@ -98,7 +98,7 @@ void Module::CompletionEventCallBack(u64 port_id, int) {
|
||||||
u32 trim_size = (port.x1 - port.x0) * (port.y1 - port.y0) * 2;
|
u32 trim_size = (port.x1 - port.x0) * (port.y1 - port.y0) * 2;
|
||||||
if (port.dest_size != trim_size) {
|
if (port.dest_size != trim_size) {
|
||||||
LOG_ERROR(Service_CAM, "The destination size ({}) doesn't match the source ({})!",
|
LOG_ERROR(Service_CAM, "The destination size ({}) doesn't match the source ({})!",
|
||||||
port.dest_size, trim_size);
|
port.dest_size, trim_size);
|
||||||
}
|
}
|
||||||
|
|
||||||
const u32 src_offset = port.y0 * original_width + port.x0;
|
const u32 src_offset = port.y0 * original_width + port.x0;
|
||||||
|
@ -125,7 +125,7 @@ void Module::CompletionEventCallBack(u64 port_id, int) {
|
||||||
std::size_t buffer_size = buffer.size() * sizeof(u16);
|
std::size_t buffer_size = buffer.size() * sizeof(u16);
|
||||||
if (port.dest_size != buffer_size) {
|
if (port.dest_size != buffer_size) {
|
||||||
LOG_ERROR(Service_CAM, "The destination size ({}) doesn't match the source ({})!",
|
LOG_ERROR(Service_CAM, "The destination size ({}) doesn't match the source ({})!",
|
||||||
port.dest_size, buffer_size);
|
port.dest_size, buffer_size);
|
||||||
}
|
}
|
||||||
Memory::WriteBlock(*port.dest_process, port.dest, buffer.data(),
|
Memory::WriteBlock(*port.dest_process, port.dest, buffer.data(),
|
||||||
std::min<size_t>(port.dest_size, buffer_size));
|
std::min<size_t>(port.dest_size, buffer_size));
|
||||||
|
@ -361,7 +361,7 @@ void Module::Interface::SetReceiving(Kernel::HLERequestContext& ctx) {
|
||||||
}
|
}
|
||||||
|
|
||||||
LOG_DEBUG(Service_CAM, "called, addr=0x{:X}, port_select={}, image_size={}, trans_unit={}",
|
LOG_DEBUG(Service_CAM, "called, addr=0x{:X}, port_select={}, image_size={}, trans_unit={}",
|
||||||
dest, port_select.m_val, image_size, trans_unit);
|
dest, port_select.m_val, image_size, trans_unit);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Module::Interface::IsFinishedReceiving(Kernel::HLERequestContext& ctx) {
|
void Module::Interface::IsFinishedReceiving(Kernel::HLERequestContext& ctx) {
|
||||||
|
@ -402,7 +402,7 @@ void Module::Interface::SetTransferLines(Kernel::HLERequestContext& ctx) {
|
||||||
}
|
}
|
||||||
|
|
||||||
LOG_WARNING(Service_CAM, "(STUBBED) called, port_select={}, lines={}, width={}, height={}",
|
LOG_WARNING(Service_CAM, "(STUBBED) called, port_select={}, lines={}, width={}, height={}",
|
||||||
port_select.m_val, transfer_lines, width, height);
|
port_select.m_val, transfer_lines, width, height);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Module::Interface::GetMaxLines(Kernel::HLERequestContext& ctx) {
|
void Module::Interface::GetMaxLines(Kernel::HLERequestContext& ctx) {
|
||||||
|
@ -457,7 +457,7 @@ void Module::Interface::SetTransferBytes(Kernel::HLERequestContext& ctx) {
|
||||||
}
|
}
|
||||||
|
|
||||||
LOG_WARNING(Service_CAM, "(STUBBED)called, port_select={}, bytes={}, width={}, height={}",
|
LOG_WARNING(Service_CAM, "(STUBBED)called, port_select={}, bytes={}, width={}, height={}",
|
||||||
port_select.m_val, transfer_bytes, width, height);
|
port_select.m_val, transfer_bytes, width, height);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Module::Interface::GetTransferBytes(Kernel::HLERequestContext& ctx) {
|
void Module::Interface::GetTransferBytes(Kernel::HLERequestContext& ctx) {
|
||||||
|
@ -564,8 +564,8 @@ void Module::Interface::SetTrimmingParams(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push(ERROR_INVALID_ENUM_VALUE);
|
rb.Push(ERROR_INVALID_ENUM_VALUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
LOG_DEBUG(Service_CAM, "called, port_select={}, x0={}, y0={}, x1={}, y1={}",
|
LOG_DEBUG(Service_CAM, "called, port_select={}, x0={}, y0={}, x1={}, y1={}", port_select.m_val,
|
||||||
port_select.m_val, x0, y0, x1, y1);
|
x0, y0, x1, y1);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Module::Interface::GetTrimmingParams(Kernel::HLERequestContext& ctx) {
|
void Module::Interface::GetTrimmingParams(Kernel::HLERequestContext& ctx) {
|
||||||
|
@ -612,7 +612,7 @@ void Module::Interface::SetTrimmingParamsCenter(Kernel::HLERequestContext& ctx)
|
||||||
}
|
}
|
||||||
|
|
||||||
LOG_DEBUG(Service_CAM, "called, port_select={}, trim_w={}, trim_h={}, cam_w={}, cam_h={}",
|
LOG_DEBUG(Service_CAM, "called, port_select={}, trim_w={}, trim_h={}, cam_w={}, cam_h={}",
|
||||||
port_select.m_val, trim_w, trim_h, cam_w, cam_h);
|
port_select.m_val, trim_w, trim_h, cam_w, cam_h);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Module::Interface::Activate(Kernel::HLERequestContext& ctx) {
|
void Module::Interface::Activate(Kernel::HLERequestContext& ctx) {
|
||||||
|
@ -673,12 +673,12 @@ void Module::Interface::SwitchContext(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(RESULT_SUCCESS);
|
||||||
} else {
|
} else {
|
||||||
LOG_ERROR(Service_CAM, "invalid camera_select={}, context_select={}", camera_select.m_val,
|
LOG_ERROR(Service_CAM, "invalid camera_select={}, context_select={}", camera_select.m_val,
|
||||||
context_select.m_val);
|
context_select.m_val);
|
||||||
rb.Push(ERROR_INVALID_ENUM_VALUE);
|
rb.Push(ERROR_INVALID_ENUM_VALUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
LOG_DEBUG(Service_CAM, "called, camera_select={}, context_select={}", camera_select.m_val,
|
LOG_DEBUG(Service_CAM, "called, camera_select={}, context_select={}", camera_select.m_val,
|
||||||
context_select.m_val);
|
context_select.m_val);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Module::Interface::FlipImage(Kernel::HLERequestContext& ctx) {
|
void Module::Interface::FlipImage(Kernel::HLERequestContext& ctx) {
|
||||||
|
@ -700,12 +700,12 @@ void Module::Interface::FlipImage(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(RESULT_SUCCESS);
|
||||||
} else {
|
} else {
|
||||||
LOG_ERROR(Service_CAM, "invalid camera_select={}, context_select={}", camera_select.m_val,
|
LOG_ERROR(Service_CAM, "invalid camera_select={}, context_select={}", camera_select.m_val,
|
||||||
context_select.m_val);
|
context_select.m_val);
|
||||||
rb.Push(ERROR_INVALID_ENUM_VALUE);
|
rb.Push(ERROR_INVALID_ENUM_VALUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
LOG_DEBUG(Service_CAM, "called, camera_select={}, flip={}, context_select={}",
|
LOG_DEBUG(Service_CAM, "called, camera_select={}, flip={}, context_select={}",
|
||||||
camera_select.m_val, static_cast<int>(flip), context_select.m_val);
|
camera_select.m_val, static_cast<int>(flip), context_select.m_val);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Module::Interface::SetDetailSize(Kernel::HLERequestContext& ctx) {
|
void Module::Interface::SetDetailSize(Kernel::HLERequestContext& ctx) {
|
||||||
|
@ -733,15 +733,15 @@ void Module::Interface::SetDetailSize(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(RESULT_SUCCESS);
|
||||||
} else {
|
} else {
|
||||||
LOG_ERROR(Service_CAM, "invalid camera_select={}, context_select={}", camera_select.m_val,
|
LOG_ERROR(Service_CAM, "invalid camera_select={}, context_select={}", camera_select.m_val,
|
||||||
context_select.m_val);
|
context_select.m_val);
|
||||||
rb.Push(ERROR_INVALID_ENUM_VALUE);
|
rb.Push(ERROR_INVALID_ENUM_VALUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
LOG_DEBUG(Service_CAM,
|
LOG_DEBUG(Service_CAM,
|
||||||
"called, camera_select={}, width={}, height={}, crop_x0={}, crop_y0={}, "
|
"called, camera_select={}, width={}, height={}, crop_x0={}, crop_y0={}, "
|
||||||
"crop_x1={}, crop_y1={}, context_select={}",
|
"crop_x1={}, crop_y1={}, context_select={}",
|
||||||
camera_select.m_val, resolution.width, resolution.height, resolution.crop_x0,
|
camera_select.m_val, resolution.width, resolution.height, resolution.crop_x0,
|
||||||
resolution.crop_y0, resolution.crop_x1, resolution.crop_y1, context_select.m_val);
|
resolution.crop_y0, resolution.crop_x1, resolution.crop_y1, context_select.m_val);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Module::Interface::SetSize(Kernel::HLERequestContext& ctx) {
|
void Module::Interface::SetSize(Kernel::HLERequestContext& ctx) {
|
||||||
|
@ -763,12 +763,12 @@ void Module::Interface::SetSize(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(RESULT_SUCCESS);
|
||||||
} else {
|
} else {
|
||||||
LOG_ERROR(Service_CAM, "invalid camera_select={}, context_select={}", camera_select.m_val,
|
LOG_ERROR(Service_CAM, "invalid camera_select={}, context_select={}", camera_select.m_val,
|
||||||
context_select.m_val);
|
context_select.m_val);
|
||||||
rb.Push(ERROR_INVALID_ENUM_VALUE);
|
rb.Push(ERROR_INVALID_ENUM_VALUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
LOG_DEBUG(Service_CAM, "called, camera_select={}, size={}, context_select={}",
|
LOG_DEBUG(Service_CAM, "called, camera_select={}, size={}, context_select={}",
|
||||||
camera_select.m_val, size, context_select.m_val);
|
camera_select.m_val, size, context_select.m_val);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Module::Interface::SetFrameRate(Kernel::HLERequestContext& ctx) {
|
void Module::Interface::SetFrameRate(Kernel::HLERequestContext& ctx) {
|
||||||
|
@ -789,7 +789,7 @@ void Module::Interface::SetFrameRate(Kernel::HLERequestContext& ctx) {
|
||||||
}
|
}
|
||||||
|
|
||||||
LOG_WARNING(Service_CAM, "(STUBBED) called, camera_select={}, frame_rate={}",
|
LOG_WARNING(Service_CAM, "(STUBBED) called, camera_select={}, frame_rate={}",
|
||||||
camera_select.m_val, static_cast<int>(frame_rate));
|
camera_select.m_val, static_cast<int>(frame_rate));
|
||||||
}
|
}
|
||||||
|
|
||||||
void Module::Interface::SetEffect(Kernel::HLERequestContext& ctx) {
|
void Module::Interface::SetEffect(Kernel::HLERequestContext& ctx) {
|
||||||
|
@ -811,12 +811,12 @@ void Module::Interface::SetEffect(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(RESULT_SUCCESS);
|
||||||
} else {
|
} else {
|
||||||
LOG_ERROR(Service_CAM, "invalid camera_select={}, context_select={}", camera_select.m_val,
|
LOG_ERROR(Service_CAM, "invalid camera_select={}, context_select={}", camera_select.m_val,
|
||||||
context_select.m_val);
|
context_select.m_val);
|
||||||
rb.Push(ERROR_INVALID_ENUM_VALUE);
|
rb.Push(ERROR_INVALID_ENUM_VALUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
LOG_DEBUG(Service_CAM, "called, camera_select={}, effect={}, context_select={}",
|
LOG_DEBUG(Service_CAM, "called, camera_select={}, effect={}, context_select={}",
|
||||||
camera_select.m_val, static_cast<int>(effect), context_select.m_val);
|
camera_select.m_val, static_cast<int>(effect), context_select.m_val);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Module::Interface::SetOutputFormat(Kernel::HLERequestContext& ctx) {
|
void Module::Interface::SetOutputFormat(Kernel::HLERequestContext& ctx) {
|
||||||
|
@ -838,12 +838,12 @@ void Module::Interface::SetOutputFormat(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(RESULT_SUCCESS);
|
||||||
} else {
|
} else {
|
||||||
LOG_ERROR(Service_CAM, "invalid camera_select={}, context_select={}", camera_select.m_val,
|
LOG_ERROR(Service_CAM, "invalid camera_select={}, context_select={}", camera_select.m_val,
|
||||||
context_select.m_val);
|
context_select.m_val);
|
||||||
rb.Push(ERROR_INVALID_ENUM_VALUE);
|
rb.Push(ERROR_INVALID_ENUM_VALUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
LOG_DEBUG(Service_CAM, "called, camera_select={}, format={}, context_select={}",
|
LOG_DEBUG(Service_CAM, "called, camera_select={}, format={}, context_select={}",
|
||||||
camera_select.m_val, static_cast<int>(format), context_select.m_val);
|
camera_select.m_val, static_cast<int>(format), context_select.m_val);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Module::Interface::SynchronizeVsyncTiming(Kernel::HLERequestContext& ctx) {
|
void Module::Interface::SynchronizeVsyncTiming(Kernel::HLERequestContext& ctx) {
|
||||||
|
@ -855,7 +855,7 @@ void Module::Interface::SynchronizeVsyncTiming(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(RESULT_SUCCESS);
|
||||||
|
|
||||||
LOG_WARNING(Service_CAM, "(STUBBED) called, camera_select1={}, camera_select2={}",
|
LOG_WARNING(Service_CAM, "(STUBBED) called, camera_select1={}, camera_select2={}",
|
||||||
camera_select1, camera_select2);
|
camera_select1, camera_select2);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Module::Interface::GetStereoCameraCalibrationData(Kernel::HLERequestContext& ctx) {
|
void Module::Interface::GetStereoCameraCalibrationData(Kernel::HLERequestContext& ctx) {
|
||||||
|
@ -918,8 +918,8 @@ ResultCode Module::SetPackageParameter(const PackageParameterType& package) {
|
||||||
}
|
}
|
||||||
return RESULT_SUCCESS;
|
return RESULT_SUCCESS;
|
||||||
} else {
|
} else {
|
||||||
LOG_ERROR(Service_CAM, "invalid camera_select={}, context_select={}",
|
LOG_ERROR(Service_CAM, "invalid camera_select={}, context_select={}", package.camera_select,
|
||||||
package.camera_select, package.context_select);
|
package.context_select);
|
||||||
return ERROR_INVALID_ENUM_VALUE;
|
return ERROR_INVALID_ENUM_VALUE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -161,7 +161,7 @@ void Module::Interface::GetCountryCodeID(Kernel::HLERequestContext& ctx) {
|
||||||
IPC::RequestBuilder rb = rp.MakeBuilder(2, 0);
|
IPC::RequestBuilder rb = rp.MakeBuilder(2, 0);
|
||||||
if (0 == country_code_id) {
|
if (0 == country_code_id) {
|
||||||
LOG_ERROR(Service_CFG, "requested country code name={}{} is invalid",
|
LOG_ERROR(Service_CFG, "requested country code name={}{} is invalid",
|
||||||
static_cast<char>(country_code & 0xff), static_cast<char>(country_code >> 8));
|
static_cast<char>(country_code & 0xff), static_cast<char>(country_code >> 8));
|
||||||
rb.Push(ResultCode(ErrorDescription::NotFound, ErrorModule::Config,
|
rb.Push(ResultCode(ErrorDescription::NotFound, ErrorModule::Config,
|
||||||
ErrorSummary::WrongArgument, ErrorLevel::Permanent));
|
ErrorSummary::WrongArgument, ErrorLevel::Permanent));
|
||||||
rb.Push<u16>(0x00FF);
|
rb.Push<u16>(0x00FF);
|
||||||
|
@ -310,21 +310,21 @@ ResultVal<void*> Module::GetConfigInfoBlockPointer(u32 block_id, u32 size, u32 f
|
||||||
|
|
||||||
if (itr == std::end(config->block_entries)) {
|
if (itr == std::end(config->block_entries)) {
|
||||||
LOG_ERROR(Service_CFG, "Config block 0x{:X} with flags {} and size {} was not found",
|
LOG_ERROR(Service_CFG, "Config block 0x{:X} with flags {} and size {} was not found",
|
||||||
block_id, flag, size);
|
block_id, flag, size);
|
||||||
return ResultCode(ErrorDescription::NotFound, ErrorModule::Config,
|
return ResultCode(ErrorDescription::NotFound, ErrorModule::Config,
|
||||||
ErrorSummary::WrongArgument, ErrorLevel::Permanent);
|
ErrorSummary::WrongArgument, ErrorLevel::Permanent);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((itr->flags & flag) == 0) {
|
if ((itr->flags & flag) == 0) {
|
||||||
LOG_ERROR(Service_CFG, "Invalid flag {} for config block 0x{:X} with size {}", flag,
|
LOG_ERROR(Service_CFG, "Invalid flag {} for config block 0x{:X} with size {}", flag,
|
||||||
block_id, size);
|
block_id, size);
|
||||||
return ResultCode(ErrorDescription::NotAuthorized, ErrorModule::Config,
|
return ResultCode(ErrorDescription::NotAuthorized, ErrorModule::Config,
|
||||||
ErrorSummary::WrongArgument, ErrorLevel::Permanent);
|
ErrorSummary::WrongArgument, ErrorLevel::Permanent);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (itr->size != size) {
|
if (itr->size != size) {
|
||||||
LOG_ERROR(Service_CFG, "Invalid size {} for config block 0x{:X} with flags {}", size,
|
LOG_ERROR(Service_CFG, "Invalid size {} for config block 0x{:X} with flags {}", size,
|
||||||
block_id, flag);
|
block_id, flag);
|
||||||
return ResultCode(ErrorDescription::InvalidSize, ErrorModule::Config,
|
return ResultCode(ErrorDescription::InvalidSize, ErrorModule::Config,
|
||||||
ErrorSummary::WrongArgument, ErrorLevel::Permanent);
|
ErrorSummary::WrongArgument, ErrorLevel::Permanent);
|
||||||
}
|
}
|
||||||
|
@ -607,7 +607,7 @@ void Module::SetPreferredRegionCode(u32 region_code) {
|
||||||
AdjustLanguageInfoBlock(region_code, current_language);
|
AdjustLanguageInfoBlock(region_code, current_language);
|
||||||
if (current_language != adjusted_language) {
|
if (current_language != adjusted_language) {
|
||||||
LOG_WARNING(Service_CFG, "System language {} does not fit the region. Adjusted to {}",
|
LOG_WARNING(Service_CFG, "System language {} does not fit the region. Adjusted to {}",
|
||||||
static_cast<int>(current_language), static_cast<int>(adjusted_language));
|
static_cast<int>(current_language), static_cast<int>(adjusted_language));
|
||||||
SetSystemLanguage(adjusted_language);
|
SetSystemLanguage(adjusted_language);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -147,11 +147,11 @@ static void LoadComponent(Service::Interface* self) {
|
||||||
Memory::ReadBlock(buffer, component_data.data(), component_data.size());
|
Memory::ReadBlock(buffer, component_data.data(), component_data.size());
|
||||||
|
|
||||||
LOG_INFO(Service_DSP, "Firmware hash: {:#018x}",
|
LOG_INFO(Service_DSP, "Firmware hash: {:#018x}",
|
||||||
Common::ComputeHash64(component_data.data(), component_data.size()));
|
Common::ComputeHash64(component_data.data(), component_data.size()));
|
||||||
// Some versions of the firmware have the location of DSP structures listed here.
|
// Some versions of the firmware have the location of DSP structures listed here.
|
||||||
if (size > 0x37C) {
|
if (size > 0x37C) {
|
||||||
LOG_INFO(Service_DSP, "Structures hash: {:#018x}",
|
LOG_INFO(Service_DSP, "Structures hash: {:#018x}",
|
||||||
Common::ComputeHash64(component_data.data() + 0x340, 60));
|
Common::ComputeHash64(component_data.data() + 0x340, 60));
|
||||||
}
|
}
|
||||||
LOG_WARNING(
|
LOG_WARNING(
|
||||||
Service_DSP,
|
Service_DSP,
|
||||||
|
@ -198,8 +198,8 @@ static void FlushDataCache(Service::Interface* self) {
|
||||||
cmd_buff[0] = IPC::MakeHeader(0x13, 1, 0);
|
cmd_buff[0] = IPC::MakeHeader(0x13, 1, 0);
|
||||||
cmd_buff[1] = RESULT_SUCCESS.raw; // No error
|
cmd_buff[1] = RESULT_SUCCESS.raw; // No error
|
||||||
|
|
||||||
LOG_TRACE(Service_DSP, "called address=0x{:08X}, size=0x{:X}, process=0x{:08X}", address,
|
LOG_TRACE(Service_DSP, "called address=0x{:08X}, size=0x{:X}, process=0x{:08X}", address, size,
|
||||||
size, process);
|
process);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -231,15 +231,15 @@ static void RegisterInterruptEvents(Service::Interface* self) {
|
||||||
|
|
||||||
if (!evt) {
|
if (!evt) {
|
||||||
LOG_INFO(Service_DSP, "Invalid event handle! type={}, pipe={}, event_handle=0x{:08X}",
|
LOG_INFO(Service_DSP, "Invalid event handle! type={}, pipe={}, event_handle=0x{:08X}",
|
||||||
type_index, pipe_index, event_handle);
|
type_index, pipe_index, event_handle);
|
||||||
ASSERT(false); // TODO: This should really be handled at an IPC translation layer.
|
ASSERT(false); // TODO: This should really be handled at an IPC translation layer.
|
||||||
}
|
}
|
||||||
|
|
||||||
if (interrupt_events.HasTooManyEventsRegistered()) {
|
if (interrupt_events.HasTooManyEventsRegistered()) {
|
||||||
LOG_INFO(Service_DSP,
|
LOG_INFO(Service_DSP,
|
||||||
"Ran out of space to register interrupts (Attempted to register "
|
"Ran out of space to register interrupts (Attempted to register "
|
||||||
"type={}, pipe={}, event_handle=0x{:08X})",
|
"type={}, pipe={}, event_handle=0x{:08X})",
|
||||||
type_index, pipe_index, event_handle);
|
type_index, pipe_index, event_handle);
|
||||||
cmd_buff[1] = ResultCode(ErrorDescription::InvalidResultValue, ErrorModule::DSP,
|
cmd_buff[1] = ResultCode(ErrorDescription::InvalidResultValue, ErrorModule::DSP,
|
||||||
ErrorSummary::OutOfResource, ErrorLevel::Status)
|
ErrorSummary::OutOfResource, ErrorLevel::Status)
|
||||||
.raw;
|
.raw;
|
||||||
|
@ -248,12 +248,12 @@ static void RegisterInterruptEvents(Service::Interface* self) {
|
||||||
|
|
||||||
interrupt_events.Get(type, pipe) = evt;
|
interrupt_events.Get(type, pipe) = evt;
|
||||||
LOG_INFO(Service_DSP, "Registered type={}, pipe={}, event_handle=0x{:08X}", type_index,
|
LOG_INFO(Service_DSP, "Registered type={}, pipe={}, event_handle=0x{:08X}", type_index,
|
||||||
pipe_index, event_handle);
|
pipe_index, event_handle);
|
||||||
cmd_buff[1] = RESULT_SUCCESS.raw;
|
cmd_buff[1] = RESULT_SUCCESS.raw;
|
||||||
} else {
|
} else {
|
||||||
interrupt_events.Get(type, pipe) = nullptr;
|
interrupt_events.Get(type, pipe) = nullptr;
|
||||||
LOG_INFO(Service_DSP, "Unregistered interrupt={}, channel={}, event_handle=0x{:08X}",
|
LOG_INFO(Service_DSP, "Unregistered interrupt={}, channel={}, event_handle=0x{:08X}",
|
||||||
type_index, pipe_index, event_handle);
|
type_index, pipe_index, event_handle);
|
||||||
cmd_buff[1] = RESULT_SUCCESS.raw;
|
cmd_buff[1] = RESULT_SUCCESS.raw;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -296,9 +296,9 @@ static void WriteProcessPipe(Service::Interface* self) {
|
||||||
|
|
||||||
if (IPC::StaticBufferDesc(size, 1) != cmd_buff[3]) {
|
if (IPC::StaticBufferDesc(size, 1) != cmd_buff[3]) {
|
||||||
LOG_ERROR(Service_DSP,
|
LOG_ERROR(Service_DSP,
|
||||||
"IPC static buffer descriptor failed validation (0x{:X}). pipe={}, "
|
"IPC static buffer descriptor failed validation (0x{:X}). pipe={}, "
|
||||||
"size=0x{:X}, buffer=0x{:08X}",
|
"size=0x{:X}, buffer=0x{:08X}",
|
||||||
cmd_buff[3], pipe_index, size, buffer);
|
cmd_buff[3], pipe_index, size, buffer);
|
||||||
cmd_buff[0] = IPC::MakeHeader(0, 1, 0);
|
cmd_buff[0] = IPC::MakeHeader(0, 1, 0);
|
||||||
cmd_buff[1] = IPC::ERR_INVALID_BUFFER_DESCRIPTOR.raw;
|
cmd_buff[1] = IPC::ERR_INVALID_BUFFER_DESCRIPTOR.raw;
|
||||||
return;
|
return;
|
||||||
|
@ -454,7 +454,7 @@ static void GetPipeReadableSize(Service::Interface* self) {
|
||||||
cmd_buff[2] = static_cast<u32>(Core::DSP().GetPipeReadableSize(pipe));
|
cmd_buff[2] = static_cast<u32>(Core::DSP().GetPipeReadableSize(pipe));
|
||||||
|
|
||||||
LOG_DEBUG(Service_DSP, "pipe={}, unknown=0x{:08X}, return cmd_buff[2]=0x{:08X}", pipe_index,
|
LOG_DEBUG(Service_DSP, "pipe={}, unknown=0x{:08X}, return cmd_buff[2]=0x{:08X}", pipe_index,
|
||||||
unknown, cmd_buff[2]);
|
unknown, cmd_buff[2]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -134,11 +134,11 @@ static std::string GetCurrentSystemTime() {
|
||||||
static void LogGenericInfo(const ErrInfo::ErrInfoCommon& errinfo_common) {
|
static void LogGenericInfo(const ErrInfo::ErrInfoCommon& errinfo_common) {
|
||||||
LOG_CRITICAL(Service_ERR, "PID: 0x{:08X}", errinfo_common.pid);
|
LOG_CRITICAL(Service_ERR, "PID: 0x{:08X}", errinfo_common.pid);
|
||||||
LOG_CRITICAL(Service_ERR, "REV: 0x{:08X}_0x{:08X}", errinfo_common.rev_high,
|
LOG_CRITICAL(Service_ERR, "REV: 0x{:08X}_0x{:08X}", errinfo_common.rev_high,
|
||||||
errinfo_common.rev_low);
|
errinfo_common.rev_low);
|
||||||
LOG_CRITICAL(Service_ERR, "TID: 0x{:08X}_0x{:08X}", errinfo_common.title_id_high,
|
LOG_CRITICAL(Service_ERR, "TID: 0x{:08X}_0x{:08X}", errinfo_common.title_id_high,
|
||||||
errinfo_common.title_id_low);
|
errinfo_common.title_id_low);
|
||||||
LOG_CRITICAL(Service_ERR, "AID: 0x{:08X}_0x{:08X}", errinfo_common.app_title_id_high,
|
LOG_CRITICAL(Service_ERR, "AID: 0x{:08X}_0x{:08X}", errinfo_common.app_title_id_high,
|
||||||
errinfo_common.app_title_id_low);
|
errinfo_common.app_title_id_low);
|
||||||
LOG_CRITICAL(Service_ERR, "ADR: 0x{:08X}", errinfo_common.pc_address);
|
LOG_CRITICAL(Service_ERR, "ADR: 0x{:08X}", errinfo_common.pc_address);
|
||||||
|
|
||||||
ResultCode result_code{errinfo_common.result_code};
|
ResultCode result_code{errinfo_common.result_code};
|
||||||
|
@ -154,8 +154,7 @@ void ERR_F::ThrowFatalError(Kernel::HLERequestContext& ctx) {
|
||||||
|
|
||||||
LOG_CRITICAL(Service_ERR, "Fatal error");
|
LOG_CRITICAL(Service_ERR, "Fatal error");
|
||||||
const ErrInfo errinfo = rp.PopRaw<ErrInfo>();
|
const ErrInfo errinfo = rp.PopRaw<ErrInfo>();
|
||||||
LOG_CRITICAL(Service_ERR, "Fatal error type: {}",
|
LOG_CRITICAL(Service_ERR, "Fatal error type: {}", GetErrType(errinfo.errinfo_common.specifier));
|
||||||
GetErrType(errinfo.errinfo_common.specifier));
|
|
||||||
Core::System::GetInstance().SetStatus(Core::System::ResultStatus::ErrorUnknown);
|
Core::System::GetInstance().SetStatus(Core::System::ResultStatus::ErrorUnknown);
|
||||||
|
|
||||||
// Generic Info
|
// Generic Info
|
||||||
|
@ -178,23 +177,23 @@ void ERR_F::ThrowFatalError(Kernel::HLERequestContext& ctx) {
|
||||||
++index) {
|
++index) {
|
||||||
if (index < 13) {
|
if (index < 13) {
|
||||||
LOG_DEBUG(Service_ERR, "r{}=0x{:08X}", index,
|
LOG_DEBUG(Service_ERR, "r{}=0x{:08X}", index,
|
||||||
errtype.exception_data.exception_context.arm_regs.at(index));
|
errtype.exception_data.exception_context.arm_regs.at(index));
|
||||||
} else if (index == 13) {
|
} else if (index == 13) {
|
||||||
LOG_CRITICAL(Service_ERR, "SP=0x{:08X}",
|
LOG_CRITICAL(Service_ERR, "SP=0x{:08X}",
|
||||||
errtype.exception_data.exception_context.arm_regs.at(index));
|
errtype.exception_data.exception_context.arm_regs.at(index));
|
||||||
} else if (index == 14) {
|
} else if (index == 14) {
|
||||||
LOG_CRITICAL(Service_ERR, "LR=0x{:08X}",
|
LOG_CRITICAL(Service_ERR, "LR=0x{:08X}",
|
||||||
errtype.exception_data.exception_context.arm_regs.at(index));
|
errtype.exception_data.exception_context.arm_regs.at(index));
|
||||||
} else if (index == 15) {
|
} else if (index == 15) {
|
||||||
LOG_CRITICAL(Service_ERR, "PC=0x{:08X}",
|
LOG_CRITICAL(Service_ERR, "PC=0x{:08X}",
|
||||||
errtype.exception_data.exception_context.arm_regs.at(index));
|
errtype.exception_data.exception_context.arm_regs.at(index));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
LOG_CRITICAL(Service_ERR, "CPSR=0x{:08X}", errtype.exception_data.exception_context.cpsr);
|
LOG_CRITICAL(Service_ERR, "CPSR=0x{:08X}", errtype.exception_data.exception_context.cpsr);
|
||||||
|
|
||||||
// Exception Info
|
// Exception Info
|
||||||
LOG_CRITICAL(Service_ERR, "EXCEPTION TYPE: {}",
|
LOG_CRITICAL(Service_ERR, "EXCEPTION TYPE: {}",
|
||||||
GetExceptionType(errtype.exception_data.exception_info.exception_type));
|
GetExceptionType(errtype.exception_data.exception_info.exception_type));
|
||||||
switch (static_cast<ExceptionType>(errtype.exception_data.exception_info.exception_type)) {
|
switch (static_cast<ExceptionType>(errtype.exception_data.exception_info.exception_type)) {
|
||||||
case ExceptionType::PrefetchAbort:
|
case ExceptionType::PrefetchAbort:
|
||||||
LOG_CRITICAL(Service_ERR, "IFSR: 0x{:08X}", errtype.exception_data.exception_info.sr);
|
LOG_CRITICAL(Service_ERR, "IFSR: 0x{:08X}", errtype.exception_data.exception_info.sr);
|
||||||
|
@ -206,11 +205,11 @@ void ERR_F::ThrowFatalError(Kernel::HLERequestContext& ctx) {
|
||||||
break;
|
break;
|
||||||
case ExceptionType::VectorFP:
|
case ExceptionType::VectorFP:
|
||||||
LOG_CRITICAL(Service_ERR, "FPEXC: 0x{:08X}",
|
LOG_CRITICAL(Service_ERR, "FPEXC: 0x{:08X}",
|
||||||
errtype.exception_data.exception_info.fpinst);
|
errtype.exception_data.exception_info.fpinst);
|
||||||
LOG_CRITICAL(Service_ERR, "FINST: 0x{:08X}",
|
LOG_CRITICAL(Service_ERR, "FINST: 0x{:08X}",
|
||||||
errtype.exception_data.exception_info.fpinst);
|
errtype.exception_data.exception_info.fpinst);
|
||||||
LOG_CRITICAL(Service_ERR, "FINST2: 0x{:08X}",
|
LOG_CRITICAL(Service_ERR, "FINST2: 0x{:08X}",
|
||||||
errtype.exception_data.exception_info.fpinst2);
|
errtype.exception_data.exception_info.fpinst2);
|
||||||
break;
|
break;
|
||||||
case ExceptionType::Undefined:
|
case ExceptionType::Undefined:
|
||||||
break; // Not logging exception_info for this case
|
break; // Not logging exception_info for this case
|
||||||
|
|
|
@ -87,8 +87,8 @@ void File::Read(Kernel::HLERequestContext& ctx) {
|
||||||
|
|
||||||
if (offset + length > backend->GetSize()) {
|
if (offset + length > backend->GetSize()) {
|
||||||
LOG_ERROR(Service_FS,
|
LOG_ERROR(Service_FS,
|
||||||
"Reading from out of bounds offset=0x{:x} length=0x{:08X} file_size=0x{:x}",
|
"Reading from out of bounds offset=0x{:x} length=0x{:08X} file_size=0x{:x}",
|
||||||
offset, length, backend->GetSize());
|
offset, length, backend->GetSize());
|
||||||
}
|
}
|
||||||
|
|
||||||
IPC::RequestBuilder rb = rp.MakeBuilder(2, 2);
|
IPC::RequestBuilder rb = rp.MakeBuilder(2, 2);
|
||||||
|
@ -120,7 +120,7 @@ void File::Write(Kernel::HLERequestContext& ctx) {
|
||||||
u32 flush = rp.Pop<u32>();
|
u32 flush = rp.Pop<u32>();
|
||||||
auto& buffer = rp.PopMappedBuffer();
|
auto& buffer = rp.PopMappedBuffer();
|
||||||
LOG_TRACE(Service_FS, "Write {}: offset=0x{:x} length={}, flush=0x{:x}", GetName(), offset,
|
LOG_TRACE(Service_FS, "Write {}: offset=0x{:x} length={}, flush=0x{:x}", GetName(), offset,
|
||||||
length, flush);
|
length, flush);
|
||||||
|
|
||||||
IPC::RequestBuilder rb = rp.MakeBuilder(2, 2);
|
IPC::RequestBuilder rb = rp.MakeBuilder(2, 2);
|
||||||
|
|
||||||
|
@ -182,7 +182,7 @@ void File::Close(Kernel::HLERequestContext& ctx) {
|
||||||
// TODO(Subv): Only close the backend if this client is the only one left.
|
// TODO(Subv): Only close the backend if this client is the only one left.
|
||||||
if (connected_sessions.size() > 1)
|
if (connected_sessions.size() > 1)
|
||||||
LOG_WARNING(Service_FS, "Closing File backend but {} clients still connected",
|
LOG_WARNING(Service_FS, "Closing File backend but {} clients still connected",
|
||||||
connected_sessions.size());
|
connected_sessions.size());
|
||||||
|
|
||||||
backend->Close();
|
backend->Close();
|
||||||
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
|
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
|
||||||
|
@ -405,7 +405,7 @@ ResultCode RegisterArchiveType(std::unique_ptr<FileSys::ArchiveFactory>&& factor
|
||||||
|
|
||||||
auto& archive = result.first->second;
|
auto& archive = result.first->second;
|
||||||
LOG_DEBUG(Service_FS, "Registered archive {} with id code 0x{:08X}", archive->GetName(),
|
LOG_DEBUG(Service_FS, "Registered archive {} with id code 0x{:08X}", archive->GetName(),
|
||||||
static_cast<u32>(id_code));
|
static_cast<u32>(id_code));
|
||||||
return RESULT_SUCCESS;
|
return RESULT_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -630,7 +630,7 @@ void RegisterArchiveTypes() {
|
||||||
RegisterArchiveType(std::move(sdmcwo_factory), ArchiveIdCode::SDMCWriteOnly);
|
RegisterArchiveType(std::move(sdmcwo_factory), ArchiveIdCode::SDMCWriteOnly);
|
||||||
else
|
else
|
||||||
LOG_ERROR(Service_FS, "Can't instantiate SDMCWriteOnly archive with path {}",
|
LOG_ERROR(Service_FS, "Can't instantiate SDMCWriteOnly archive with path {}",
|
||||||
sdmc_directory);
|
sdmc_directory);
|
||||||
|
|
||||||
// Create the SaveData archive
|
// Create the SaveData archive
|
||||||
auto sd_savedata_source = std::make_shared<FileSys::ArchiveSource_SDSaveData>(sdmc_directory);
|
auto sd_savedata_source = std::make_shared<FileSys::ArchiveSource_SDSaveData>(sdmc_directory);
|
||||||
|
@ -651,7 +651,7 @@ void RegisterArchiveTypes() {
|
||||||
RegisterArchiveType(std::move(extsavedata_factory), ArchiveIdCode::ExtSaveData);
|
RegisterArchiveType(std::move(extsavedata_factory), ArchiveIdCode::ExtSaveData);
|
||||||
else
|
else
|
||||||
LOG_ERROR(Service_FS, "Can't instantiate ExtSaveData archive with path {}",
|
LOG_ERROR(Service_FS, "Can't instantiate ExtSaveData archive with path {}",
|
||||||
extsavedata_factory->GetMountPoint());
|
extsavedata_factory->GetMountPoint());
|
||||||
|
|
||||||
auto sharedextsavedata_factory =
|
auto sharedextsavedata_factory =
|
||||||
std::make_unique<FileSys::ArchiveFactory_ExtSaveData>(nand_directory, true);
|
std::make_unique<FileSys::ArchiveFactory_ExtSaveData>(nand_directory, true);
|
||||||
|
@ -659,7 +659,7 @@ void RegisterArchiveTypes() {
|
||||||
RegisterArchiveType(std::move(sharedextsavedata_factory), ArchiveIdCode::SharedExtSaveData);
|
RegisterArchiveType(std::move(sharedextsavedata_factory), ArchiveIdCode::SharedExtSaveData);
|
||||||
else
|
else
|
||||||
LOG_ERROR(Service_FS, "Can't instantiate SharedExtSaveData archive with path {}",
|
LOG_ERROR(Service_FS, "Can't instantiate SharedExtSaveData archive with path {}",
|
||||||
sharedextsavedata_factory->GetMountPoint());
|
sharedextsavedata_factory->GetMountPoint());
|
||||||
|
|
||||||
// Create the NCCH archive, basically a small variation of the RomFS archive
|
// Create the NCCH archive, basically a small variation of the RomFS archive
|
||||||
auto savedatacheck_factory = std::make_unique<FileSys::ArchiveFactory_NCCH>();
|
auto savedatacheck_factory = std::make_unique<FileSys::ArchiveFactory_NCCH>();
|
||||||
|
@ -676,9 +676,8 @@ void RegisterArchiveTypes() {
|
||||||
void RegisterSelfNCCH(Loader::AppLoader& app_loader) {
|
void RegisterSelfNCCH(Loader::AppLoader& app_loader) {
|
||||||
auto itr = id_code_map.find(ArchiveIdCode::SelfNCCH);
|
auto itr = id_code_map.find(ArchiveIdCode::SelfNCCH);
|
||||||
if (itr == id_code_map.end()) {
|
if (itr == id_code_map.end()) {
|
||||||
LOG_ERROR(
|
LOG_ERROR(Service_FS,
|
||||||
Service_FS,
|
"Could not register a new NCCH because the SelfNCCH archive hasn't been created");
|
||||||
"Could not register a new NCCH because the SelfNCCH archive hasn't been created");
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -54,8 +54,7 @@ void FS_USER::OpenFile(Kernel::HLERequestContext& ctx) {
|
||||||
ASSERT(filename.size() == filename_size);
|
ASSERT(filename.size() == filename_size);
|
||||||
FileSys::Path file_path(filename_type, filename);
|
FileSys::Path file_path(filename_type, filename);
|
||||||
|
|
||||||
LOG_DEBUG(Service_FS, "path={}, mode={} attrs={}", file_path.DebugStr(), mode.hex,
|
LOG_DEBUG(Service_FS, "path={}, mode={} attrs={}", file_path.DebugStr(), mode.hex, attributes);
|
||||||
attributes);
|
|
||||||
|
|
||||||
ResultVal<std::shared_ptr<File>> file_res =
|
ResultVal<std::shared_ptr<File>> file_res =
|
||||||
OpenFileFromArchive(archive_handle, file_path, mode);
|
OpenFileFromArchive(archive_handle, file_path, mode);
|
||||||
|
@ -88,18 +87,17 @@ void FS_USER::OpenFileDirectly(Kernel::HLERequestContext& ctx) {
|
||||||
FileSys::Path archive_path(archivename_type, archivename);
|
FileSys::Path archive_path(archivename_type, archivename);
|
||||||
FileSys::Path file_path(filename_type, filename);
|
FileSys::Path file_path(filename_type, filename);
|
||||||
|
|
||||||
LOG_DEBUG(Service_FS,
|
LOG_DEBUG(Service_FS, "archive_id=0x{:08X} archive_path={} file_path={}, mode={} attributes={}",
|
||||||
"archive_id=0x{:08X} archive_path={} file_path={}, mode={} attributes={}",
|
static_cast<u32>(archive_id), archive_path.DebugStr(), file_path.DebugStr(), mode.hex,
|
||||||
static_cast<u32>(archive_id), archive_path.DebugStr(), file_path.DebugStr(),
|
attributes);
|
||||||
mode.hex, attributes);
|
|
||||||
|
|
||||||
IPC::RequestBuilder rb = rp.MakeBuilder(1, 2);
|
IPC::RequestBuilder rb = rp.MakeBuilder(1, 2);
|
||||||
|
|
||||||
ResultVal<ArchiveHandle> archive_handle = Service::FS::OpenArchive(archive_id, archive_path);
|
ResultVal<ArchiveHandle> archive_handle = Service::FS::OpenArchive(archive_id, archive_path);
|
||||||
if (archive_handle.Failed()) {
|
if (archive_handle.Failed()) {
|
||||||
LOG_ERROR(Service_FS,
|
LOG_ERROR(Service_FS,
|
||||||
"Failed to get a handle for archive archive_id=0x{:08X} archive_path={}",
|
"Failed to get a handle for archive archive_id=0x{:08X} archive_path={}",
|
||||||
static_cast<u32>(archive_id), archive_path.DebugStr());
|
static_cast<u32>(archive_id), archive_path.DebugStr());
|
||||||
rb.Push(archive_handle.Code());
|
rb.Push(archive_handle.Code());
|
||||||
rb.PushMoveObjects<Kernel::Object>(nullptr);
|
rb.PushMoveObjects<Kernel::Object>(nullptr);
|
||||||
return;
|
return;
|
||||||
|
@ -115,7 +113,7 @@ void FS_USER::OpenFileDirectly(Kernel::HLERequestContext& ctx) {
|
||||||
} else {
|
} else {
|
||||||
rb.PushMoveObjects<Kernel::Object>(nullptr);
|
rb.PushMoveObjects<Kernel::Object>(nullptr);
|
||||||
LOG_ERROR(Service_FS, "failed to get a handle for file {} mode={} attributes={}",
|
LOG_ERROR(Service_FS, "failed to get a handle for file {} mode={} attributes={}",
|
||||||
file_path.DebugStr(), mode.hex, attributes);
|
file_path.DebugStr(), mode.hex, attributes);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -130,8 +128,8 @@ void FS_USER::DeleteFile(Kernel::HLERequestContext& ctx) {
|
||||||
|
|
||||||
FileSys::Path file_path(filename_type, filename);
|
FileSys::Path file_path(filename_type, filename);
|
||||||
|
|
||||||
LOG_DEBUG(Service_FS, "type={} size={} data={}", static_cast<u32>(filename_type),
|
LOG_DEBUG(Service_FS, "type={} size={} data={}", static_cast<u32>(filename_type), filename_size,
|
||||||
filename_size, file_path.DebugStr());
|
file_path.DebugStr());
|
||||||
|
|
||||||
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
|
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
|
||||||
rb.Push(DeleteFileFromArchive(archive_handle, file_path));
|
rb.Push(DeleteFileFromArchive(archive_handle, file_path));
|
||||||
|
@ -155,10 +153,10 @@ void FS_USER::RenameFile(Kernel::HLERequestContext& ctx) {
|
||||||
FileSys::Path src_file_path(src_filename_type, src_filename);
|
FileSys::Path src_file_path(src_filename_type, src_filename);
|
||||||
FileSys::Path dest_file_path(dest_filename_type, dest_filename);
|
FileSys::Path dest_file_path(dest_filename_type, dest_filename);
|
||||||
|
|
||||||
LOG_DEBUG(
|
LOG_DEBUG(Service_FS,
|
||||||
Service_FS, "src_type={} src_size={} src_data={} dest_type={} dest_size={} dest_data={}",
|
"src_type={} src_size={} src_data={} dest_type={} dest_size={} dest_data={}",
|
||||||
static_cast<u32>(src_filename_type), src_filename_size, src_file_path.DebugStr(),
|
static_cast<u32>(src_filename_type), src_filename_size, src_file_path.DebugStr(),
|
||||||
static_cast<u32>(dest_filename_type), dest_filename_size, dest_file_path.DebugStr());
|
static_cast<u32>(dest_filename_type), dest_filename_size, dest_file_path.DebugStr());
|
||||||
|
|
||||||
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
|
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
|
||||||
rb.Push(RenameFileBetweenArchives(src_archive_handle, src_file_path, dest_archive_handle,
|
rb.Push(RenameFileBetweenArchives(src_archive_handle, src_file_path, dest_archive_handle,
|
||||||
|
@ -178,7 +176,7 @@ void FS_USER::DeleteDirectory(Kernel::HLERequestContext& ctx) {
|
||||||
FileSys::Path dir_path(dirname_type, dirname);
|
FileSys::Path dir_path(dirname_type, dirname);
|
||||||
|
|
||||||
LOG_DEBUG(Service_FS, "type={} size={} data={}", static_cast<u32>(dirname_type), dirname_size,
|
LOG_DEBUG(Service_FS, "type={} size={} data={}", static_cast<u32>(dirname_type), dirname_size,
|
||||||
dir_path.DebugStr());
|
dir_path.DebugStr());
|
||||||
|
|
||||||
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
|
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
|
||||||
rb.Push(DeleteDirectoryFromArchive(archive_handle, dir_path));
|
rb.Push(DeleteDirectoryFromArchive(archive_handle, dir_path));
|
||||||
|
@ -197,7 +195,7 @@ void FS_USER::DeleteDirectoryRecursively(Kernel::HLERequestContext& ctx) {
|
||||||
FileSys::Path dir_path(dirname_type, dirname);
|
FileSys::Path dir_path(dirname_type, dirname);
|
||||||
|
|
||||||
LOG_DEBUG(Service_FS, "type={} size={} data={}", static_cast<u32>(dirname_type), dirname_size,
|
LOG_DEBUG(Service_FS, "type={} size={} data={}", static_cast<u32>(dirname_type), dirname_size,
|
||||||
dir_path.DebugStr());
|
dir_path.DebugStr());
|
||||||
|
|
||||||
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
|
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
|
||||||
rb.Push(DeleteDirectoryRecursivelyFromArchive(archive_handle, dir_path));
|
rb.Push(DeleteDirectoryRecursivelyFromArchive(archive_handle, dir_path));
|
||||||
|
@ -218,7 +216,7 @@ void FS_USER::CreateFile(Kernel::HLERequestContext& ctx) {
|
||||||
FileSys::Path file_path(filename_type, filename);
|
FileSys::Path file_path(filename_type, filename);
|
||||||
|
|
||||||
LOG_DEBUG(Service_FS, "type={} attributes={} size={:x} data={}",
|
LOG_DEBUG(Service_FS, "type={} attributes={} size={:x} data={}",
|
||||||
static_cast<u32>(filename_type), attributes, file_size, file_path.DebugStr());
|
static_cast<u32>(filename_type), attributes, file_size, file_path.DebugStr());
|
||||||
|
|
||||||
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
|
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
|
||||||
rb.Push(CreateFileInArchive(archive_handle, file_path, file_size));
|
rb.Push(CreateFileInArchive(archive_handle, file_path, file_size));
|
||||||
|
@ -236,7 +234,7 @@ void FS_USER::CreateDirectory(Kernel::HLERequestContext& ctx) {
|
||||||
FileSys::Path dir_path(dirname_type, dirname);
|
FileSys::Path dir_path(dirname_type, dirname);
|
||||||
|
|
||||||
LOG_DEBUG(Service_FS, "type={} size={} data={}", static_cast<u32>(dirname_type), dirname_size,
|
LOG_DEBUG(Service_FS, "type={} size={} data={}", static_cast<u32>(dirname_type), dirname_size,
|
||||||
dir_path.DebugStr());
|
dir_path.DebugStr());
|
||||||
|
|
||||||
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
|
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
|
||||||
rb.Push(CreateDirectoryFromArchive(archive_handle, dir_path));
|
rb.Push(CreateDirectoryFromArchive(archive_handle, dir_path));
|
||||||
|
@ -260,9 +258,9 @@ void FS_USER::RenameDirectory(Kernel::HLERequestContext& ctx) {
|
||||||
FileSys::Path dest_dir_path(dest_dirname_type, dest_dirname);
|
FileSys::Path dest_dir_path(dest_dirname_type, dest_dirname);
|
||||||
|
|
||||||
LOG_DEBUG(Service_FS,
|
LOG_DEBUG(Service_FS,
|
||||||
"src_type={} src_size={} src_data={} dest_type={} dest_size={} dest_data={}",
|
"src_type={} src_size={} src_data={} dest_type={} dest_size={} dest_data={}",
|
||||||
static_cast<u32>(src_dirname_type), src_dirname_size, src_dir_path.DebugStr(),
|
static_cast<u32>(src_dirname_type), src_dirname_size, src_dir_path.DebugStr(),
|
||||||
static_cast<u32>(dest_dirname_type), dest_dirname_size, dest_dir_path.DebugStr());
|
static_cast<u32>(dest_dirname_type), dest_dirname_size, dest_dir_path.DebugStr());
|
||||||
|
|
||||||
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
|
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
|
||||||
rb.Push(RenameDirectoryBetweenArchives(src_archive_handle, src_dir_path, dest_archive_handle,
|
rb.Push(RenameDirectoryBetweenArchives(src_archive_handle, src_dir_path, dest_archive_handle,
|
||||||
|
@ -280,7 +278,7 @@ void FS_USER::OpenDirectory(Kernel::HLERequestContext& ctx) {
|
||||||
FileSys::Path dir_path(dirname_type, dirname);
|
FileSys::Path dir_path(dirname_type, dirname);
|
||||||
|
|
||||||
LOG_DEBUG(Service_FS, "type={} size={} data={}", static_cast<u32>(dirname_type), dirname_size,
|
LOG_DEBUG(Service_FS, "type={} size={} data={}", static_cast<u32>(dirname_type), dirname_size,
|
||||||
dir_path.DebugStr());
|
dir_path.DebugStr());
|
||||||
|
|
||||||
IPC::RequestBuilder rb = rp.MakeBuilder(1, 2);
|
IPC::RequestBuilder rb = rp.MakeBuilder(1, 2);
|
||||||
ResultVal<std::shared_ptr<Directory>> dir_res =
|
ResultVal<std::shared_ptr<Directory>> dir_res =
|
||||||
|
@ -293,7 +291,7 @@ void FS_USER::OpenDirectory(Kernel::HLERequestContext& ctx) {
|
||||||
rb.PushMoveObjects(std::get<SharedPtr<ClientSession>>(sessions));
|
rb.PushMoveObjects(std::get<SharedPtr<ClientSession>>(sessions));
|
||||||
} else {
|
} else {
|
||||||
LOG_ERROR(Service_FS, "failed to get a handle for directory type={} size={} data={}",
|
LOG_ERROR(Service_FS, "failed to get a handle for directory type={} size={} data={}",
|
||||||
static_cast<u32>(dirname_type), dirname_size, dir_path.DebugStr());
|
static_cast<u32>(dirname_type), dirname_size, dir_path.DebugStr());
|
||||||
rb.PushMoveObjects<Kernel::Object>(nullptr);
|
rb.PushMoveObjects<Kernel::Object>(nullptr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -308,7 +306,7 @@ void FS_USER::OpenArchive(Kernel::HLERequestContext& ctx) {
|
||||||
FileSys::Path archive_path(archivename_type, archivename);
|
FileSys::Path archive_path(archivename_type, archivename);
|
||||||
|
|
||||||
LOG_DEBUG(Service_FS, "archive_id=0x{:08X} archive_path={}", static_cast<u32>(archive_id),
|
LOG_DEBUG(Service_FS, "archive_id=0x{:08X} archive_path={}", static_cast<u32>(archive_id),
|
||||||
archive_path.DebugStr());
|
archive_path.DebugStr());
|
||||||
|
|
||||||
IPC::RequestBuilder rb = rp.MakeBuilder(3, 0);
|
IPC::RequestBuilder rb = rp.MakeBuilder(3, 0);
|
||||||
ResultVal<ArchiveHandle> handle = Service::FS::OpenArchive(archive_id, archive_path);
|
ResultVal<ArchiveHandle> handle = Service::FS::OpenArchive(archive_id, archive_path);
|
||||||
|
@ -318,8 +316,8 @@ void FS_USER::OpenArchive(Kernel::HLERequestContext& ctx) {
|
||||||
} else {
|
} else {
|
||||||
rb.Push<u64>(0);
|
rb.Push<u64>(0);
|
||||||
LOG_ERROR(Service_FS,
|
LOG_ERROR(Service_FS,
|
||||||
"failed to get a handle for archive archive_id=0x{:08X} archive_path={}",
|
"failed to get a handle for archive archive_id=0x{:08X} archive_path={}",
|
||||||
static_cast<u32>(archive_id), archive_path.DebugStr());
|
static_cast<u32>(archive_id), archive_path.DebugStr());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -369,7 +367,7 @@ void FS_USER::FormatSaveData(Kernel::HLERequestContext& ctx) {
|
||||||
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
|
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
|
||||||
if (archive_id != FS::ArchiveIdCode::SaveData) {
|
if (archive_id != FS::ArchiveIdCode::SaveData) {
|
||||||
LOG_ERROR(Service_FS, "tried to format an archive different than SaveData, {}",
|
LOG_ERROR(Service_FS, "tried to format an archive different than SaveData, {}",
|
||||||
static_cast<u32>(archive_id));
|
static_cast<u32>(archive_id));
|
||||||
rb.Push(FileSys::ERROR_INVALID_PATH);
|
rb.Push(FileSys::ERROR_INVALID_PATH);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -439,9 +437,9 @@ void FS_USER::CreateExtSaveData(Kernel::HLERequestContext& ctx) {
|
||||||
auto icon_buffer = rp.PopMappedBuffer();
|
auto icon_buffer = rp.PopMappedBuffer();
|
||||||
|
|
||||||
LOG_WARNING(Service_FS,
|
LOG_WARNING(Service_FS,
|
||||||
"(STUBBED) savedata_high={:08X} savedata_low={:08X} unknown={:08X} "
|
"(STUBBED) savedata_high={:08X} savedata_low={:08X} unknown={:08X} "
|
||||||
"files={:08X} directories={:08X} size_limit={:016x} icon_size={:08X}",
|
"files={:08X} directories={:08X} size_limit={:016x} icon_size={:08X}",
|
||||||
save_high, save_low, unknown, directories, files, size_limit, icon_size);
|
save_high, save_low, unknown, directories, files, size_limit, icon_size);
|
||||||
|
|
||||||
std::vector<u8> icon(icon_size);
|
std::vector<u8> icon(icon_size);
|
||||||
icon_buffer.Read(icon.data(), 0, icon_size);
|
icon_buffer.Read(icon.data(), 0, icon_size);
|
||||||
|
@ -465,8 +463,8 @@ void FS_USER::DeleteExtSaveData(Kernel::HLERequestContext& ctx) {
|
||||||
u32 unknown = rp.Pop<u32>(); // TODO(Subv): Figure out what this is
|
u32 unknown = rp.Pop<u32>(); // TODO(Subv): Figure out what this is
|
||||||
|
|
||||||
LOG_WARNING(Service_FS,
|
LOG_WARNING(Service_FS,
|
||||||
"(STUBBED) save_low={:08X} save_high={:08X} media_type={:08X} unknown={:08X}",
|
"(STUBBED) save_low={:08X} save_high={:08X} media_type={:08X} unknown={:08X}",
|
||||||
save_low, save_high, static_cast<u32>(media_type), unknown);
|
save_low, save_high, static_cast<u32>(media_type), unknown);
|
||||||
|
|
||||||
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
|
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
|
||||||
rb.Push(Service::FS::DeleteExtSaveData(media_type, save_high, save_low));
|
rb.Push(Service::FS::DeleteExtSaveData(media_type, save_high, save_low));
|
||||||
|
@ -524,10 +522,10 @@ void FS_USER::CreateLegacySystemSaveData(Kernel::HLERequestContext& ctx) {
|
||||||
bool duplicate = rp.Pop<bool>();
|
bool duplicate = rp.Pop<bool>();
|
||||||
|
|
||||||
LOG_WARNING(Service_FS,
|
LOG_WARNING(Service_FS,
|
||||||
"(STUBBED) savedata_id={:08X} total_size={:08X} block_size={:08X} directories={} "
|
"(STUBBED) savedata_id={:08X} total_size={:08X} block_size={:08X} directories={} "
|
||||||
"files={} directory_buckets={} file_buckets={} duplicate={}",
|
"files={} directory_buckets={} file_buckets={} duplicate={}",
|
||||||
savedata_id, total_size, block_size, directories, files, directory_buckets,
|
savedata_id, total_size, block_size, directories, files, directory_buckets,
|
||||||
file_buckets, duplicate);
|
file_buckets, duplicate);
|
||||||
|
|
||||||
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
|
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
|
||||||
// With this command, the SystemSaveData always has save_high = 0 (Always created in the NAND)
|
// With this command, the SystemSaveData always has save_high = 0 (Always created in the NAND)
|
||||||
|
@ -667,9 +665,9 @@ void FS_USER::SetSaveDataSecureValue(Kernel::HLERequestContext& ctx) {
|
||||||
// TODO: Generate and Save the Secure Value
|
// TODO: Generate and Save the Secure Value
|
||||||
|
|
||||||
LOG_WARNING(Service_FS,
|
LOG_WARNING(Service_FS,
|
||||||
"(STUBBED) called, value=0x{:016x} secure_value_slot=0x{:08X} "
|
"(STUBBED) called, value=0x{:016x} secure_value_slot=0x{:08X} "
|
||||||
"unqiue_id=0x{:08X} title_variation=0x{:02X}",
|
"unqiue_id=0x{:08X} title_variation=0x{:02X}",
|
||||||
value, secure_value_slot, unique_id, title_variation);
|
value, secure_value_slot, unique_id, title_variation);
|
||||||
|
|
||||||
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
|
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
|
||||||
|
|
||||||
|
|
|
@ -120,10 +120,9 @@ static ResultCode WriteHWRegs(u32 base_address, u32 size_in_bytes, const std::ve
|
||||||
const u32 max_size_in_bytes = 0x80;
|
const u32 max_size_in_bytes = 0x80;
|
||||||
|
|
||||||
if (base_address & 3 || base_address >= 0x420000) {
|
if (base_address & 3 || base_address >= 0x420000) {
|
||||||
LOG_ERROR(
|
LOG_ERROR(Service_GSP,
|
||||||
Service_GSP,
|
"Write address was out of range or misaligned! (address=0x{:08x}, size=0x{:08x})",
|
||||||
"Write address was out of range or misaligned! (address=0x{:08x}, size=0x{:08x})",
|
base_address, size_in_bytes);
|
||||||
base_address, size_in_bytes);
|
|
||||||
return ERR_REGS_OUTOFRANGE_OR_MISALIGNED;
|
return ERR_REGS_OUTOFRANGE_OR_MISALIGNED;
|
||||||
} else if (size_in_bytes <= max_size_in_bytes) {
|
} else if (size_in_bytes <= max_size_in_bytes) {
|
||||||
if (size_in_bytes & 3) {
|
if (size_in_bytes & 3) {
|
||||||
|
@ -165,10 +164,9 @@ static ResultCode WriteHWRegsWithMask(u32 base_address, u32 size_in_bytes,
|
||||||
const u32 max_size_in_bytes = 0x80;
|
const u32 max_size_in_bytes = 0x80;
|
||||||
|
|
||||||
if (base_address & 3 || base_address >= 0x420000) {
|
if (base_address & 3 || base_address >= 0x420000) {
|
||||||
LOG_ERROR(
|
LOG_ERROR(Service_GSP,
|
||||||
Service_GSP,
|
"Write address was out of range or misaligned! (address=0x{:08x}, size=0x{:08x})",
|
||||||
"Write address was out of range or misaligned! (address=0x{:08x}, size=0x{:08x})",
|
base_address, size_in_bytes);
|
||||||
base_address, size_in_bytes);
|
|
||||||
return ERR_REGS_OUTOFRANGE_OR_MISALIGNED;
|
return ERR_REGS_OUTOFRANGE_OR_MISALIGNED;
|
||||||
} else if (size_in_bytes <= max_size_in_bytes) {
|
} else if (size_in_bytes <= max_size_in_bytes) {
|
||||||
if (size_in_bytes & 3) {
|
if (size_in_bytes & 3) {
|
||||||
|
@ -319,8 +317,8 @@ void GSP_GPU::FlushDataCache(Kernel::HLERequestContext& ctx) {
|
||||||
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
|
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(RESULT_SUCCESS);
|
||||||
|
|
||||||
LOG_DEBUG(Service_GSP, "(STUBBED) called address=0x{:08X}, size=0x{:08X}, process={}",
|
LOG_DEBUG(Service_GSP, "(STUBBED) called address=0x{:08X}, size=0x{:08X}, process={}", address,
|
||||||
address, size, process->process_id);
|
size, process->process_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GSP_GPU::InvalidateDataCache(Kernel::HLERequestContext& ctx) {
|
void GSP_GPU::InvalidateDataCache(Kernel::HLERequestContext& ctx) {
|
||||||
|
@ -334,8 +332,8 @@ void GSP_GPU::InvalidateDataCache(Kernel::HLERequestContext& ctx) {
|
||||||
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
|
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(RESULT_SUCCESS);
|
||||||
|
|
||||||
LOG_DEBUG(Service_GSP, "(STUBBED) called address=0x{:08X}, size=0x{:08X}, process={}",
|
LOG_DEBUG(Service_GSP, "(STUBBED) called address=0x{:08X}, size=0x{:08X}, process={}", address,
|
||||||
address, size, process->process_id);
|
size, process->process_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GSP_GPU::SetAxiConfigQoSMode(Kernel::HLERequestContext& ctx) {
|
void GSP_GPU::SetAxiConfigQoSMode(Kernel::HLERequestContext& ctx) {
|
||||||
|
@ -680,7 +678,7 @@ void GSP_GPU::AcquireRight(Kernel::HLERequestContext& ctx) {
|
||||||
SessionData* session_data = GetSessionData(ctx.Session());
|
SessionData* session_data = GetSessionData(ctx.Session());
|
||||||
|
|
||||||
LOG_WARNING(Service_GSP, "called flag={:08X} process={} thread_id={}", flag,
|
LOG_WARNING(Service_GSP, "called flag={:08X} process={} thread_id={}", flag,
|
||||||
process->process_id, session_data->thread_id);
|
process->process_id, session_data->thread_id);
|
||||||
|
|
||||||
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
|
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
|
||||||
|
|
||||||
|
@ -726,8 +724,8 @@ void GSP_GPU::StoreDataCache(Kernel::HLERequestContext& ctx) {
|
||||||
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
|
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(RESULT_SUCCESS);
|
||||||
|
|
||||||
LOG_DEBUG(Service_GSP, "(STUBBED) called address=0x{:08X}, size=0x{:08X}, process={}",
|
LOG_DEBUG(Service_GSP, "(STUBBED) called address=0x{:08X}, size=0x{:08X}, process={}", address,
|
||||||
address, size, process->process_id);
|
size, process->process_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GSP_GPU::SetLedForceOff(Kernel::HLERequestContext& ctx) {
|
void GSP_GPU::SetLedForceOff(Kernel::HLERequestContext& ctx) {
|
||||||
|
|
|
@ -166,7 +166,7 @@ void ExtraHID::OnDisconnect() {
|
||||||
void ExtraHID::HandleConfigureHIDPollingRequest(const std::vector<u8>& request) {
|
void ExtraHID::HandleConfigureHIDPollingRequest(const std::vector<u8>& request) {
|
||||||
if (request.size() != 3) {
|
if (request.size() != 3) {
|
||||||
LOG_ERROR(Service_IR, "Wrong request size ({}): {}", request.size(),
|
LOG_ERROR(Service_IR, "Wrong request size ({}): {}", request.size(),
|
||||||
Common::ArrayToString(request.data(), request.size()));
|
Common::ArrayToString(request.data(), request.size()));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -188,7 +188,7 @@ void ExtraHID::HandleReadCalibrationDataRequest(const std::vector<u8>& request_b
|
||||||
|
|
||||||
if (request_buf.size() != sizeof(ReadCalibrationDataRequest)) {
|
if (request_buf.size() != sizeof(ReadCalibrationDataRequest)) {
|
||||||
LOG_ERROR(Service_IR, "Wrong request size ({}): {}", request_buf.size(),
|
LOG_ERROR(Service_IR, "Wrong request size ({}): {}", request_buf.size(),
|
||||||
Common::ArrayToString(request_buf.data(), request_buf.size()));
|
Common::ArrayToString(request_buf.data(), request_buf.size()));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -200,7 +200,7 @@ void ExtraHID::HandleReadCalibrationDataRequest(const std::vector<u8>& request_b
|
||||||
|
|
||||||
if (offset + size > calibration_data.size()) {
|
if (offset + size > calibration_data.size()) {
|
||||||
LOG_ERROR(Service_IR, "Read beyond the end of calibration data! (offset={}, size={})",
|
LOG_ERROR(Service_IR, "Read beyond the end of calibration data! (offset={}, size={})",
|
||||||
offset, size);
|
offset, size);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -223,7 +223,7 @@ void ExtraHID::OnReceive(const std::vector<u8>& data) {
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
LOG_ERROR(Service_IR, "Unknown request: {}",
|
LOG_ERROR(Service_IR, "Unknown request: {}",
|
||||||
Common::ArrayToString(data.data(), data.size()));
|
Common::ArrayToString(data.data(), data.size()));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -183,8 +183,7 @@ private:
|
||||||
|
|
||||||
/// Wraps the payload into packet and puts it to the receive buffer
|
/// Wraps the payload into packet and puts it to the receive buffer
|
||||||
void IR_USER::PutToReceive(const std::vector<u8>& payload) {
|
void IR_USER::PutToReceive(const std::vector<u8>& payload) {
|
||||||
LOG_TRACE(Service_IR, "called, data={}",
|
LOG_TRACE(Service_IR, "called, data={}", Common::ArrayToString(payload.data(), payload.size()));
|
||||||
Common::ArrayToString(payload.data(), payload.size()));
|
|
||||||
size_t size = payload.size();
|
size_t size = payload.size();
|
||||||
|
|
||||||
std::vector<u8> packet;
|
std::vector<u8> packet;
|
||||||
|
@ -252,11 +251,11 @@ void IR_USER::InitializeIrNopShared(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(RESULT_SUCCESS);
|
||||||
|
|
||||||
LOG_INFO(Service_IR,
|
LOG_INFO(Service_IR,
|
||||||
"called, shared_buff_size={}, recv_buff_size={}, "
|
"called, shared_buff_size={}, recv_buff_size={}, "
|
||||||
"recv_buff_packet_count={}, send_buff_size={}, "
|
"recv_buff_packet_count={}, send_buff_size={}, "
|
||||||
"send_buff_packet_count={}, baud_rate={}",
|
"send_buff_packet_count={}, baud_rate={}",
|
||||||
shared_buff_size, recv_buff_size, recv_buff_packet_count, send_buff_size,
|
shared_buff_size, recv_buff_size, recv_buff_packet_count, send_buff_size,
|
||||||
send_buff_packet_count, baud_rate);
|
send_buff_packet_count, baud_rate);
|
||||||
}
|
}
|
||||||
|
|
||||||
void IR_USER::RequireConnection(Kernel::HLERequestContext& ctx) {
|
void IR_USER::RequireConnection(Kernel::HLERequestContext& ctx) {
|
||||||
|
|
|
@ -551,7 +551,7 @@ ResultCode CROHelper::ApplyStaticAnonymousSymbolToCRS(VAddr crs_address) {
|
||||||
CROHelper crs(crs_address);
|
CROHelper crs(crs_address);
|
||||||
u32 offset_export_num = GetField(StaticAnonymousSymbolNum);
|
u32 offset_export_num = GetField(StaticAnonymousSymbolNum);
|
||||||
LOG_INFO(Service_LDR, "CRO \"{}\" exports {} static anonymous symbols", ModuleName(),
|
LOG_INFO(Service_LDR, "CRO \"{}\" exports {} static anonymous symbols", ModuleName(),
|
||||||
offset_export_num);
|
offset_export_num);
|
||||||
for (u32 i = 0; i < offset_export_num; ++i) {
|
for (u32 i = 0; i < offset_export_num; ++i) {
|
||||||
StaticAnonymousSymbolEntry entry;
|
StaticAnonymousSymbolEntry entry;
|
||||||
GetEntry(i, entry);
|
GetEntry(i, entry);
|
||||||
|
@ -564,7 +564,7 @@ ResultCode CROHelper::ApplyStaticAnonymousSymbolToCRS(VAddr crs_address) {
|
||||||
|
|
||||||
u32 symbol_address = SegmentTagToAddress(entry.symbol_position);
|
u32 symbol_address = SegmentTagToAddress(entry.symbol_position);
|
||||||
LOG_TRACE(Service_LDR, "CRO \"{}\" exports 0x{:08X} to the static module", ModuleName(),
|
LOG_TRACE(Service_LDR, "CRO \"{}\" exports 0x{:08X} to the static module", ModuleName(),
|
||||||
symbol_address);
|
symbol_address);
|
||||||
ResultCode result = crs.ApplyRelocationBatch(batch_address, symbol_address);
|
ResultCode result = crs.ApplyRelocationBatch(batch_address, symbol_address);
|
||||||
if (result.IsError()) {
|
if (result.IsError()) {
|
||||||
LOG_ERROR(Service_LDR, "Error applying relocation batch {:08X}", result.raw);
|
LOG_ERROR(Service_LDR, "Error applying relocation batch {:08X}", result.raw);
|
||||||
|
@ -604,7 +604,7 @@ ResultCode CROHelper::ApplyInternalRelocations(u32 old_data_segment_address) {
|
||||||
SegmentEntry symbol_segment;
|
SegmentEntry symbol_segment;
|
||||||
GetEntry(relocation.symbol_segment, symbol_segment);
|
GetEntry(relocation.symbol_segment, symbol_segment);
|
||||||
LOG_TRACE(Service_LDR, "Internally relocates 0x{:08X} with 0x{:08X}", target_address,
|
LOG_TRACE(Service_LDR, "Internally relocates 0x{:08X} with 0x{:08X}", target_address,
|
||||||
symbol_segment.offset);
|
symbol_segment.offset);
|
||||||
ResultCode result = ApplyRelocation(target_address, relocation.type, relocation.addend,
|
ResultCode result = ApplyRelocation(target_address, relocation.type, relocation.addend,
|
||||||
symbol_segment.offset, target_addressB);
|
symbol_segment.offset, target_addressB);
|
||||||
if (result.IsError()) {
|
if (result.IsError()) {
|
||||||
|
@ -765,12 +765,12 @@ ResultCode CROHelper::ApplyImportNamedSymbol(VAddr crs_address) {
|
||||||
|
|
||||||
if (symbol_address != 0) {
|
if (symbol_address != 0) {
|
||||||
LOG_TRACE(Service_LDR, "CRO \"{}\" imports \"{}\" from \"{}\"",
|
LOG_TRACE(Service_LDR, "CRO \"{}\" imports \"{}\" from \"{}\"",
|
||||||
ModuleName(), symbol_name, source.ModuleName());
|
ModuleName(), symbol_name, source.ModuleName());
|
||||||
|
|
||||||
ResultCode result = ApplyRelocationBatch(relocation_addr, symbol_address);
|
ResultCode result = ApplyRelocationBatch(relocation_addr, symbol_address);
|
||||||
if (result.IsError()) {
|
if (result.IsError()) {
|
||||||
LOG_ERROR(Service_LDR, "Error applying relocation batch {:08X}",
|
LOG_ERROR(Service_LDR, "Error applying relocation batch {:08X}",
|
||||||
result.raw);
|
result.raw);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -860,7 +860,7 @@ ResultCode CROHelper::ApplyModuleImport(VAddr crs_address) {
|
||||||
ForEachAutoLinkCRO(crs_address, [&](CROHelper source) -> ResultVal<bool> {
|
ForEachAutoLinkCRO(crs_address, [&](CROHelper source) -> ResultVal<bool> {
|
||||||
if (want_cro_name == source.ModuleName()) {
|
if (want_cro_name == source.ModuleName()) {
|
||||||
LOG_INFO(Service_LDR, "CRO \"{}\" imports {} indexed symbols from \"{}\"",
|
LOG_INFO(Service_LDR, "CRO \"{}\" imports {} indexed symbols from \"{}\"",
|
||||||
ModuleName(), entry.import_indexed_symbol_num, source.ModuleName());
|
ModuleName(), entry.import_indexed_symbol_num, source.ModuleName());
|
||||||
for (u32 j = 0; j < entry.import_indexed_symbol_num; ++j) {
|
for (u32 j = 0; j < entry.import_indexed_symbol_num; ++j) {
|
||||||
ImportIndexedSymbolEntry im;
|
ImportIndexedSymbolEntry im;
|
||||||
entry.GetImportIndexedSymbolEntry(j, im);
|
entry.GetImportIndexedSymbolEntry(j, im);
|
||||||
|
@ -872,13 +872,12 @@ ResultCode CROHelper::ApplyModuleImport(VAddr crs_address) {
|
||||||
ApplyRelocationBatch(im.relocation_batch_offset, symbol_address);
|
ApplyRelocationBatch(im.relocation_batch_offset, symbol_address);
|
||||||
if (result.IsError()) {
|
if (result.IsError()) {
|
||||||
LOG_ERROR(Service_LDR, "Error applying relocation batch {:08X}",
|
LOG_ERROR(Service_LDR, "Error applying relocation batch {:08X}",
|
||||||
result.raw);
|
result.raw);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
LOG_INFO(Service_LDR, "CRO \"{}\" imports {} anonymous symbols from \"{}\"",
|
LOG_INFO(Service_LDR, "CRO \"{}\" imports {} anonymous symbols from \"{}\"",
|
||||||
ModuleName(), entry.import_anonymous_symbol_num,
|
ModuleName(), entry.import_anonymous_symbol_num, source.ModuleName());
|
||||||
source.ModuleName());
|
|
||||||
for (u32 j = 0; j < entry.import_anonymous_symbol_num; ++j) {
|
for (u32 j = 0; j < entry.import_anonymous_symbol_num; ++j) {
|
||||||
ImportAnonymousSymbolEntry im;
|
ImportAnonymousSymbolEntry im;
|
||||||
entry.GetImportAnonymousSymbolEntry(j, im);
|
entry.GetImportAnonymousSymbolEntry(j, im);
|
||||||
|
@ -888,7 +887,7 @@ ResultCode CROHelper::ApplyModuleImport(VAddr crs_address) {
|
||||||
ApplyRelocationBatch(im.relocation_batch_offset, symbol_address);
|
ApplyRelocationBatch(im.relocation_batch_offset, symbol_address);
|
||||||
if (result.IsError()) {
|
if (result.IsError()) {
|
||||||
LOG_ERROR(Service_LDR, "Error applying relocation batch {:08X}",
|
LOG_ERROR(Service_LDR, "Error applying relocation batch {:08X}",
|
||||||
result.raw);
|
result.raw);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -905,7 +904,7 @@ ResultCode CROHelper::ApplyModuleImport(VAddr crs_address) {
|
||||||
|
|
||||||
ResultCode CROHelper::ApplyExportNamedSymbol(CROHelper target) {
|
ResultCode CROHelper::ApplyExportNamedSymbol(CROHelper target) {
|
||||||
LOG_DEBUG(Service_LDR, "CRO \"{}\" exports named symbols to \"{}\"", ModuleName(),
|
LOG_DEBUG(Service_LDR, "CRO \"{}\" exports named symbols to \"{}\"", ModuleName(),
|
||||||
target.ModuleName());
|
target.ModuleName());
|
||||||
u32 target_import_strings_size = target.GetField(ImportStringsSize);
|
u32 target_import_strings_size = target.GetField(ImportStringsSize);
|
||||||
u32 target_symbol_import_num = target.GetField(ImportNamedSymbolNum);
|
u32 target_symbol_import_num = target.GetField(ImportNamedSymbolNum);
|
||||||
for (u32 i = 0; i < target_symbol_import_num; ++i) {
|
for (u32 i = 0; i < target_symbol_import_num; ++i) {
|
||||||
|
@ -934,7 +933,7 @@ ResultCode CROHelper::ApplyExportNamedSymbol(CROHelper target) {
|
||||||
|
|
||||||
ResultCode CROHelper::ResetExportNamedSymbol(CROHelper target) {
|
ResultCode CROHelper::ResetExportNamedSymbol(CROHelper target) {
|
||||||
LOG_DEBUG(Service_LDR, "CRO \"{}\" unexports named symbols to \"{}\"", ModuleName(),
|
LOG_DEBUG(Service_LDR, "CRO \"{}\" unexports named symbols to \"{}\"", ModuleName(),
|
||||||
target.ModuleName());
|
target.ModuleName());
|
||||||
u32 unresolved_symbol = target.GetOnUnresolvedAddress();
|
u32 unresolved_symbol = target.GetOnUnresolvedAddress();
|
||||||
u32 target_import_strings_size = target.GetField(ImportStringsSize);
|
u32 target_import_strings_size = target.GetField(ImportStringsSize);
|
||||||
u32 target_symbol_import_num = target.GetField(ImportNamedSymbolNum);
|
u32 target_symbol_import_num = target.GetField(ImportNamedSymbolNum);
|
||||||
|
@ -975,7 +974,7 @@ ResultCode CROHelper::ApplyModuleExport(CROHelper target) {
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
LOG_INFO(Service_LDR, "CRO \"{}\" exports {} indexed symbols to \"{}\"", module_name,
|
LOG_INFO(Service_LDR, "CRO \"{}\" exports {} indexed symbols to \"{}\"", module_name,
|
||||||
entry.import_indexed_symbol_num, target.ModuleName());
|
entry.import_indexed_symbol_num, target.ModuleName());
|
||||||
for (u32 j = 0; j < entry.import_indexed_symbol_num; ++j) {
|
for (u32 j = 0; j < entry.import_indexed_symbol_num; ++j) {
|
||||||
ImportIndexedSymbolEntry im;
|
ImportIndexedSymbolEntry im;
|
||||||
entry.GetImportIndexedSymbolEntry(j, im);
|
entry.GetImportIndexedSymbolEntry(j, im);
|
||||||
|
@ -992,7 +991,7 @@ ResultCode CROHelper::ApplyModuleExport(CROHelper target) {
|
||||||
}
|
}
|
||||||
|
|
||||||
LOG_INFO(Service_LDR, "CRO \"{}\" exports {} anonymous symbols to \"{}\"", module_name,
|
LOG_INFO(Service_LDR, "CRO \"{}\" exports {} anonymous symbols to \"{}\"", module_name,
|
||||||
entry.import_anonymous_symbol_num, target.ModuleName());
|
entry.import_anonymous_symbol_num, target.ModuleName());
|
||||||
for (u32 j = 0; j < entry.import_anonymous_symbol_num; ++j) {
|
for (u32 j = 0; j < entry.import_anonymous_symbol_num; ++j) {
|
||||||
ImportAnonymousSymbolEntry im;
|
ImportAnonymousSymbolEntry im;
|
||||||
entry.GetImportAnonymousSymbolEntry(j, im);
|
entry.GetImportAnonymousSymbolEntry(j, im);
|
||||||
|
@ -1024,7 +1023,7 @@ ResultCode CROHelper::ResetModuleExport(CROHelper target) {
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
LOG_DEBUG(Service_LDR, "CRO \"{}\" unexports indexed symbols to \"{}\"", module_name,
|
LOG_DEBUG(Service_LDR, "CRO \"{}\" unexports indexed symbols to \"{}\"", module_name,
|
||||||
target.ModuleName());
|
target.ModuleName());
|
||||||
for (u32 j = 0; j < entry.import_indexed_symbol_num; ++j) {
|
for (u32 j = 0; j < entry.import_indexed_symbol_num; ++j) {
|
||||||
ImportIndexedSymbolEntry im;
|
ImportIndexedSymbolEntry im;
|
||||||
entry.GetImportIndexedSymbolEntry(j, im);
|
entry.GetImportIndexedSymbolEntry(j, im);
|
||||||
|
@ -1037,7 +1036,7 @@ ResultCode CROHelper::ResetModuleExport(CROHelper target) {
|
||||||
}
|
}
|
||||||
|
|
||||||
LOG_DEBUG(Service_LDR, "CRO \"{}\" unexports anonymous symbols to \"{}\"", module_name,
|
LOG_DEBUG(Service_LDR, "CRO \"{}\" unexports anonymous symbols to \"{}\"", module_name,
|
||||||
target.ModuleName());
|
target.ModuleName());
|
||||||
for (u32 j = 0; j < entry.import_anonymous_symbol_num; ++j) {
|
for (u32 j = 0; j < entry.import_anonymous_symbol_num; ++j) {
|
||||||
ImportAnonymousSymbolEntry im;
|
ImportAnonymousSymbolEntry im;
|
||||||
entry.GetImportAnonymousSymbolEntry(j, im);
|
entry.GetImportAnonymousSymbolEntry(j, im);
|
||||||
|
@ -1070,12 +1069,12 @@ ResultCode CROHelper::ApplyExitRelocations(VAddr crs_address) {
|
||||||
|
|
||||||
if (symbol_address != 0) {
|
if (symbol_address != 0) {
|
||||||
LOG_DEBUG(Service_LDR, "CRO \"{}\" import exit function from \"{}\"",
|
LOG_DEBUG(Service_LDR, "CRO \"{}\" import exit function from \"{}\"",
|
||||||
ModuleName(), source.ModuleName());
|
ModuleName(), source.ModuleName());
|
||||||
|
|
||||||
ResultCode result = ApplyRelocationBatch(relocation_addr, symbol_address);
|
ResultCode result = ApplyRelocationBatch(relocation_addr, symbol_address);
|
||||||
if (result.IsError()) {
|
if (result.IsError()) {
|
||||||
LOG_ERROR(Service_LDR, "Error applying relocation batch {:08X}",
|
LOG_ERROR(Service_LDR, "Error applying relocation batch {:08X}",
|
||||||
result.raw);
|
result.raw);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -58,9 +58,8 @@ void RO::Initialize(Kernel::HLERequestContext& ctx) {
|
||||||
// All other service functions below have the same issue.
|
// All other service functions below have the same issue.
|
||||||
auto process = rp.PopObject<Kernel::Process>();
|
auto process = rp.PopObject<Kernel::Process>();
|
||||||
|
|
||||||
LOG_DEBUG(Service_LDR,
|
LOG_DEBUG(Service_LDR, "called, crs_buffer_ptr=0x{:08X}, crs_address=0x{:08X}, crs_size=0x{:X}",
|
||||||
"called, crs_buffer_ptr=0x{:08X}, crs_address=0x{:08X}, crs_size=0x{:X}",
|
crs_buffer_ptr, crs_address, crs_size);
|
||||||
crs_buffer_ptr, crs_address, crs_size);
|
|
||||||
|
|
||||||
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
|
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
|
||||||
|
|
||||||
|
@ -167,7 +166,7 @@ void RO::LoadCRR(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(RESULT_SUCCESS);
|
||||||
|
|
||||||
LOG_WARNING(Service_LDR, "(STUBBED) called, crr_buffer_ptr=0x{:08X}, crr_size=0x{:08X}",
|
LOG_WARNING(Service_LDR, "(STUBBED) called, crr_buffer_ptr=0x{:08X}, crr_size=0x{:08X}",
|
||||||
crr_buffer_ptr, crr_size);
|
crr_buffer_ptr, crr_size);
|
||||||
}
|
}
|
||||||
|
|
||||||
void RO::UnloadCRR(Kernel::HLERequestContext& ctx) {
|
void RO::UnloadCRR(Kernel::HLERequestContext& ctx) {
|
||||||
|
@ -197,13 +196,13 @@ void RO::LoadCRO(Kernel::HLERequestContext& ctx, bool link_on_load_bug_fix) {
|
||||||
auto process = rp.PopObject<Kernel::Process>();
|
auto process = rp.PopObject<Kernel::Process>();
|
||||||
|
|
||||||
LOG_DEBUG(Service_LDR,
|
LOG_DEBUG(Service_LDR,
|
||||||
"called ({}), cro_buffer_ptr=0x{:08X}, cro_address=0x{:08X}, cro_size=0x{:X}, "
|
"called ({}), cro_buffer_ptr=0x{:08X}, cro_address=0x{:08X}, cro_size=0x{:X}, "
|
||||||
"data_segment_address=0x{:08X}, zero={}, data_segment_size=0x{:X}, "
|
"data_segment_address=0x{:08X}, zero={}, data_segment_size=0x{:X}, "
|
||||||
"bss_segment_address=0x{:08X}, bss_segment_size=0x{:X}, auto_link={}, "
|
"bss_segment_address=0x{:08X}, bss_segment_size=0x{:X}, auto_link={}, "
|
||||||
"fix_level={}, crr_address=0x{:08X}",
|
"fix_level={}, crr_address=0x{:08X}",
|
||||||
link_on_load_bug_fix ? "new" : "old", cro_buffer_ptr, cro_address, cro_size,
|
link_on_load_bug_fix ? "new" : "old", cro_buffer_ptr, cro_address, cro_size,
|
||||||
data_segment_address, zero, data_segment_size, bss_segment_address,
|
data_segment_address, zero, data_segment_size, bss_segment_address, bss_segment_size,
|
||||||
bss_segment_size, auto_link ? "true" : "false", fix_level, crr_address);
|
auto_link ? "true" : "false", fix_level, crr_address);
|
||||||
|
|
||||||
IPC::RequestBuilder rb = rp.MakeBuilder(2, 0);
|
IPC::RequestBuilder rb = rp.MakeBuilder(2, 0);
|
||||||
|
|
||||||
|
@ -373,7 +372,7 @@ void RO::LoadCRO(Kernel::HLERequestContext& ctx, bool link_on_load_bug_fix) {
|
||||||
Core::CPU().InvalidateCacheRange(cro_address, cro_size);
|
Core::CPU().InvalidateCacheRange(cro_address, cro_size);
|
||||||
|
|
||||||
LOG_INFO(Service_LDR, "CRO \"{}\" loaded at 0x{:08X}, fixed_end=0x{:08X}", cro.ModuleName(),
|
LOG_INFO(Service_LDR, "CRO \"{}\" loaded at 0x{:08X}, fixed_end=0x{:08X}", cro.ModuleName(),
|
||||||
cro_address, cro_address + fix_size);
|
cro_address, cro_address + fix_size);
|
||||||
|
|
||||||
rb.Push(RESULT_SUCCESS, fix_size);
|
rb.Push(RESULT_SUCCESS, fix_size);
|
||||||
}
|
}
|
||||||
|
@ -386,7 +385,7 @@ void RO::UnloadCRO(Kernel::HLERequestContext& ctx) {
|
||||||
auto process = rp.PopObject<Kernel::Process>();
|
auto process = rp.PopObject<Kernel::Process>();
|
||||||
|
|
||||||
LOG_DEBUG(Service_LDR, "called, cro_address=0x{:08X}, zero={}, cro_buffer_ptr=0x{:08X}",
|
LOG_DEBUG(Service_LDR, "called, cro_address=0x{:08X}, zero={}, cro_buffer_ptr=0x{:08X}",
|
||||||
cro_address, zero, cro_buffer_ptr);
|
cro_address, zero, cro_buffer_ptr);
|
||||||
|
|
||||||
CROHelper cro(cro_address);
|
CROHelper cro(cro_address);
|
||||||
|
|
||||||
|
|
|
@ -64,10 +64,10 @@ struct MIC_U::Impl {
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(RESULT_SUCCESS);
|
||||||
is_sampling = true;
|
is_sampling = true;
|
||||||
LOG_WARNING(Service_MIC,
|
LOG_WARNING(Service_MIC,
|
||||||
"(STUBBED) called, encoding={}, sample_rate={}, "
|
"(STUBBED) called, encoding={}, sample_rate={}, "
|
||||||
"audio_buffer_offset={}, audio_buffer_size={}, audio_buffer_loop={}",
|
"audio_buffer_offset={}, audio_buffer_size={}, audio_buffer_loop={}",
|
||||||
static_cast<u32>(encoding), static_cast<u32>(sample_rate),
|
static_cast<u32>(encoding), static_cast<u32>(sample_rate), audio_buffer_offset,
|
||||||
audio_buffer_offset, audio_buffer_size, audio_buffer_loop);
|
audio_buffer_size, audio_buffer_loop);
|
||||||
}
|
}
|
||||||
|
|
||||||
void AdjustSampling(Kernel::HLERequestContext& ctx) {
|
void AdjustSampling(Kernel::HLERequestContext& ctx) {
|
||||||
|
@ -76,8 +76,7 @@ struct MIC_U::Impl {
|
||||||
|
|
||||||
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
|
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(RESULT_SUCCESS);
|
||||||
LOG_WARNING(Service_MIC, "(STUBBED) called, sample_rate={}",
|
LOG_WARNING(Service_MIC, "(STUBBED) called, sample_rate={}", static_cast<u32>(sample_rate));
|
||||||
static_cast<u32>(sample_rate));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void StopSampling(Kernel::HLERequestContext& ctx) {
|
void StopSampling(Kernel::HLERequestContext& ctx) {
|
||||||
|
@ -148,7 +147,7 @@ struct MIC_U::Impl {
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(RESULT_SUCCESS);
|
||||||
rb.PushMappedBuffer(buffer);
|
rb.PushMappedBuffer(buffer);
|
||||||
LOG_WARNING(Service_MIC, "(STUBBED) called, size=0x{:X}, buffer=0x{:08X}", size,
|
LOG_WARNING(Service_MIC, "(STUBBED) called, size=0x{:X}, buffer=0x{:08X}", size,
|
||||||
buffer.GetId());
|
buffer.GetId());
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetClamp(Kernel::HLERequestContext& ctx) {
|
void SetClamp(Kernel::HLERequestContext& ctx) {
|
||||||
|
|
|
@ -16,7 +16,7 @@ void NDM_U::EnterExclusiveState(Kernel::HLERequestContext& ctx) {
|
||||||
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
|
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(RESULT_SUCCESS);
|
||||||
LOG_WARNING(Service_NDM, "(STUBBED) exclusive_state=0x{:08X}",
|
LOG_WARNING(Service_NDM, "(STUBBED) exclusive_state=0x{:08X}",
|
||||||
static_cast<u32>(exclusive_state));
|
static_cast<u32>(exclusive_state));
|
||||||
}
|
}
|
||||||
|
|
||||||
void NDM_U::LeaveExclusiveState(Kernel::HLERequestContext& ctx) {
|
void NDM_U::LeaveExclusiveState(Kernel::HLERequestContext& ctx) {
|
||||||
|
|
|
@ -239,7 +239,7 @@ static void HandleEAPoLPacket(const Network::WifiPacket& packet) {
|
||||||
if (GetEAPoLFrameType(packet.data) == EAPoLStartMagic) {
|
if (GetEAPoLFrameType(packet.data) == EAPoLStartMagic) {
|
||||||
if (connection_status.status != static_cast<u32>(NetworkStatus::ConnectedAsHost)) {
|
if (connection_status.status != static_cast<u32>(NetworkStatus::ConnectedAsHost)) {
|
||||||
LOG_DEBUG(Service_NWM, "Connection sequence aborted, because connection status is {}",
|
LOG_DEBUG(Service_NWM, "Connection sequence aborted, because connection status is {}",
|
||||||
connection_status.status);
|
connection_status.status);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -426,7 +426,7 @@ void SendAssociationResponseFrame(const MacAddress& address) {
|
||||||
std::lock_guard<std::mutex> lock(connection_status_mutex);
|
std::lock_guard<std::mutex> lock(connection_status_mutex);
|
||||||
if (connection_status.status != static_cast<u32>(NetworkStatus::ConnectedAsHost)) {
|
if (connection_status.status != static_cast<u32>(NetworkStatus::ConnectedAsHost)) {
|
||||||
LOG_ERROR(Service_NWM, "Connection sequence aborted, because connection status is {}",
|
LOG_ERROR(Service_NWM, "Connection sequence aborted, because connection status is {}",
|
||||||
connection_status.status);
|
connection_status.status);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -458,8 +458,8 @@ void HandleAuthenticationFrame(const Network::WifiPacket& packet) {
|
||||||
std::lock_guard<std::mutex> lock(connection_status_mutex);
|
std::lock_guard<std::mutex> lock(connection_status_mutex);
|
||||||
if (connection_status.status != static_cast<u32>(NetworkStatus::ConnectedAsHost)) {
|
if (connection_status.status != static_cast<u32>(NetworkStatus::ConnectedAsHost)) {
|
||||||
LOG_ERROR(Service_NWM,
|
LOG_ERROR(Service_NWM,
|
||||||
"Connection sequence aborted, because connection status is {}",
|
"Connection sequence aborted, because connection status is {}",
|
||||||
connection_status.status);
|
connection_status.status);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -618,9 +618,9 @@ void NWM_UDS::RecvBeaconBroadcastData(Kernel::HLERequestContext& ctx) {
|
||||||
rb.PushMappedBuffer(out_buffer);
|
rb.PushMappedBuffer(out_buffer);
|
||||||
|
|
||||||
LOG_DEBUG(Service_NWM,
|
LOG_DEBUG(Service_NWM,
|
||||||
"called out_buffer_size=0x{:08X}, wlan_comm_id=0x{:08X}, id=0x{:08X},"
|
"called out_buffer_size=0x{:08X}, wlan_comm_id=0x{:08X}, id=0x{:08X},"
|
||||||
"unk1=0x{:08X}, unk2=0x{:08X}, offset={}",
|
"unk1=0x{:08X}, unk2=0x{:08X}, offset={}",
|
||||||
out_buffer_size, wlan_comm_id, id, unk1, unk2, cur_buffer_size);
|
out_buffer_size, wlan_comm_id, id, unk1, unk2, cur_buffer_size);
|
||||||
}
|
}
|
||||||
|
|
||||||
void NWM_UDS::InitializeWithVersion(Kernel::HLERequestContext& ctx) {
|
void NWM_UDS::InitializeWithVersion(Kernel::HLERequestContext& ctx) {
|
||||||
|
@ -661,7 +661,7 @@ void NWM_UDS::InitializeWithVersion(Kernel::HLERequestContext& ctx) {
|
||||||
rb.PushCopyObjects(connection_status_event);
|
rb.PushCopyObjects(connection_status_event);
|
||||||
|
|
||||||
LOG_DEBUG(Service_NWM, "called sharedmem_size=0x{:08X}, version=0x{:08X}", sharedmem_size,
|
LOG_DEBUG(Service_NWM, "called sharedmem_size=0x{:08X}, version=0x{:08X}", sharedmem_size,
|
||||||
version);
|
version);
|
||||||
}
|
}
|
||||||
|
|
||||||
void NWM_UDS::GetConnectionStatus(Kernel::HLERequestContext& ctx) {
|
void NWM_UDS::GetConnectionStatus(Kernel::HLERequestContext& ctx) {
|
||||||
|
@ -729,7 +729,7 @@ void NWM_UDS::Bind(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push(ResultCode(ErrorDescription::NotAuthorized, ErrorModule::UDS,
|
rb.Push(ResultCode(ErrorDescription::NotAuthorized, ErrorModule::UDS,
|
||||||
ErrorSummary::WrongArgument, ErrorLevel::Usage));
|
ErrorSummary::WrongArgument, ErrorLevel::Usage));
|
||||||
LOG_WARNING(Service_NWM, "data_channel = {}, bind_node_id = {}", data_channel,
|
LOG_WARNING(Service_NWM, "data_channel = {}, bind_node_id = {}", data_channel,
|
||||||
bind_node_id);
|
bind_node_id);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -93,7 +93,7 @@ void Module::Interface::GetStepHistory(Kernel::HLERequestContext& ctx) {
|
||||||
rb.PushMappedBuffer(buffer);
|
rb.PushMappedBuffer(buffer);
|
||||||
|
|
||||||
LOG_WARNING(Service_PTM, "(STUBBED) called, from time(raw): 0x{:x}, for {} hours", start_time,
|
LOG_WARNING(Service_PTM, "(STUBBED) called, from time(raw): 0x{:x}, for {} hours", start_time,
|
||||||
hours);
|
hours);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Module::Interface::GetTotalStepCount(Kernel::HLERequestContext& ctx) {
|
void Module::Interface::GetTotalStepCount(Kernel::HLERequestContext& ctx) {
|
||||||
|
@ -120,16 +120,14 @@ void CheckNew3DS(IPC::RequestBuilder& rb) {
|
||||||
const bool is_new_3ds = Settings::values.is_new_3ds;
|
const bool is_new_3ds = Settings::values.is_new_3ds;
|
||||||
|
|
||||||
if (is_new_3ds) {
|
if (is_new_3ds) {
|
||||||
LOG_CRITICAL(Service_PTM,
|
LOG_CRITICAL(Service_PTM, "The option 'is_new_3ds' is enabled as part of the 'System' "
|
||||||
"The option 'is_new_3ds' is enabled as part of the 'System' "
|
"settings. Citra does not fully support New 3DS emulation yet!");
|
||||||
"settings. Citra does not fully support New 3DS emulation yet!");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(RESULT_SUCCESS);
|
||||||
rb.Push(is_new_3ds);
|
rb.Push(is_new_3ds);
|
||||||
|
|
||||||
LOG_WARNING(Service_PTM, "(STUBBED) called isNew3DS = 0x{:08x}",
|
LOG_WARNING(Service_PTM, "(STUBBED) called isNew3DS = 0x{:08x}", static_cast<u32>(is_new_3ds));
|
||||||
static_cast<u32>(is_new_3ds));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Module::Interface::CheckNew3DS(Kernel::HLERequestContext& ctx) {
|
void Module::Interface::CheckNew3DS(Kernel::HLERequestContext& ctx) {
|
||||||
|
|
|
@ -95,14 +95,13 @@ void Interface::HandleSyncRequest(SharedPtr<ServerSession> server_session) {
|
||||||
? Common::StringFromFormat("0x%08X", cmd_buff[0])
|
? Common::StringFromFormat("0x%08X", cmd_buff[0])
|
||||||
: itr->second.name;
|
: itr->second.name;
|
||||||
LOG_ERROR(Service, "unknown / unimplemented {}",
|
LOG_ERROR(Service, "unknown / unimplemented {}",
|
||||||
MakeFunctionString(function_name.c_str(), GetPortName().c_str(), cmd_buff));
|
MakeFunctionString(function_name.c_str(), GetPortName().c_str(), cmd_buff));
|
||||||
|
|
||||||
// TODO(bunnei): Hack - ignore error
|
// TODO(bunnei): Hack - ignore error
|
||||||
cmd_buff[1] = 0;
|
cmd_buff[1] = 0;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
LOG_TRACE(Service, "{}",
|
LOG_TRACE(Service, "{}", MakeFunctionString(itr->second.name, GetPortName().c_str(), cmd_buff));
|
||||||
MakeFunctionString(itr->second.name, GetPortName().c_str(), cmd_buff));
|
|
||||||
|
|
||||||
itr->second.func(this);
|
itr->second.func(this);
|
||||||
}
|
}
|
||||||
|
|
|
@ -103,15 +103,13 @@ void SRV::GetServiceHandle(Kernel::HLERequestContext& ctx) {
|
||||||
if (client_port.Failed()) {
|
if (client_port.Failed()) {
|
||||||
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
|
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
|
||||||
rb.Push(client_port.Code());
|
rb.Push(client_port.Code());
|
||||||
LOG_ERROR(Service_SRV, "called service={} -> error 0x{:08X}", name,
|
LOG_ERROR(Service_SRV, "called service={} -> error 0x{:08X}", name, client_port.Code().raw);
|
||||||
client_port.Code().raw);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
auto session = client_port.Unwrap()->Connect();
|
auto session = client_port.Unwrap()->Connect();
|
||||||
if (session.Succeeded()) {
|
if (session.Succeeded()) {
|
||||||
LOG_DEBUG(Service_SRV, "called service={} -> session={}", name,
|
LOG_DEBUG(Service_SRV, "called service={} -> session={}", name, (*session)->GetObjectId());
|
||||||
(*session)->GetObjectId());
|
|
||||||
IPC::RequestBuilder rb = rp.MakeBuilder(1, 2);
|
IPC::RequestBuilder rb = rp.MakeBuilder(1, 2);
|
||||||
rb.Push(session.Code());
|
rb.Push(session.Code());
|
||||||
rb.PushMoveObjects(std::move(session).Unwrap());
|
rb.PushMoveObjects(std::move(session).Unwrap());
|
||||||
|
@ -179,8 +177,8 @@ void SRV::PublishToSubscriber(Kernel::HLERequestContext& ctx) {
|
||||||
|
|
||||||
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
|
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(RESULT_SUCCESS);
|
||||||
LOG_WARNING(Service_SRV, "(STUBBED) called, notification_id=0x{:X}, flags={}",
|
LOG_WARNING(Service_SRV, "(STUBBED) called, notification_id=0x{:X}, flags={}", notification_id,
|
||||||
notification_id, flags);
|
flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SRV::RegisterService(Kernel::HLERequestContext& ctx) {
|
void SRV::RegisterService(Kernel::HLERequestContext& ctx) {
|
||||||
|
|
|
@ -133,7 +133,7 @@ void Y2R_U::SetBlockAlignment(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(RESULT_SUCCESS);
|
||||||
|
|
||||||
LOG_DEBUG(Service_Y2R, "called block_alignment={}",
|
LOG_DEBUG(Service_Y2R, "called block_alignment={}",
|
||||||
static_cast<u8>(conversion.block_alignment));
|
static_cast<u8>(conversion.block_alignment));
|
||||||
}
|
}
|
||||||
|
|
||||||
void Y2R_U::GetBlockAlignment(Kernel::HLERequestContext& ctx) {
|
void Y2R_U::GetBlockAlignment(Kernel::HLERequestContext& ctx) {
|
||||||
|
@ -144,7 +144,7 @@ void Y2R_U::GetBlockAlignment(Kernel::HLERequestContext& ctx) {
|
||||||
rb.PushEnum(conversion.block_alignment);
|
rb.PushEnum(conversion.block_alignment);
|
||||||
|
|
||||||
LOG_DEBUG(Service_Y2R, "called block_alignment={}",
|
LOG_DEBUG(Service_Y2R, "called block_alignment={}",
|
||||||
static_cast<u8>(conversion.block_alignment));
|
static_cast<u8>(conversion.block_alignment));
|
||||||
}
|
}
|
||||||
|
|
||||||
void Y2R_U::SetSpacialDithering(Kernel::HLERequestContext& ctx) {
|
void Y2R_U::SetSpacialDithering(Kernel::HLERequestContext& ctx) {
|
||||||
|
@ -231,10 +231,10 @@ void Y2R_U::SetSendingY(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(RESULT_SUCCESS);
|
||||||
|
|
||||||
LOG_DEBUG(Service_Y2R,
|
LOG_DEBUG(Service_Y2R,
|
||||||
"called image_size=0x{:08X}, transfer_unit={}, transfer_stride={}, "
|
"called image_size=0x{:08X}, transfer_unit={}, transfer_stride={}, "
|
||||||
"src_process_id={}",
|
"src_process_id={}",
|
||||||
conversion.src_Y.image_size, conversion.src_Y.transfer_unit, conversion.src_Y.gap,
|
conversion.src_Y.image_size, conversion.src_Y.transfer_unit, conversion.src_Y.gap,
|
||||||
process->process_id);
|
process->process_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Y2R_U::SetSendingU(Kernel::HLERequestContext& ctx) {
|
void Y2R_U::SetSendingU(Kernel::HLERequestContext& ctx) {
|
||||||
|
@ -250,10 +250,10 @@ void Y2R_U::SetSendingU(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(RESULT_SUCCESS);
|
||||||
|
|
||||||
LOG_DEBUG(Service_Y2R,
|
LOG_DEBUG(Service_Y2R,
|
||||||
"called image_size=0x{:08X}, transfer_unit={}, transfer_stride={}, "
|
"called image_size=0x{:08X}, transfer_unit={}, transfer_stride={}, "
|
||||||
"src_process_id={}",
|
"src_process_id={}",
|
||||||
conversion.src_U.image_size, conversion.src_U.transfer_unit, conversion.src_U.gap,
|
conversion.src_U.image_size, conversion.src_U.transfer_unit, conversion.src_U.gap,
|
||||||
process->process_id);
|
process->process_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Y2R_U::SetSendingV(Kernel::HLERequestContext& ctx) {
|
void Y2R_U::SetSendingV(Kernel::HLERequestContext& ctx) {
|
||||||
|
@ -270,10 +270,10 @@ void Y2R_U::SetSendingV(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(RESULT_SUCCESS);
|
||||||
|
|
||||||
LOG_DEBUG(Service_Y2R,
|
LOG_DEBUG(Service_Y2R,
|
||||||
"called image_size=0x{:08X}, transfer_unit={}, transfer_stride={}, "
|
"called image_size=0x{:08X}, transfer_unit={}, transfer_stride={}, "
|
||||||
"src_process_id={}",
|
"src_process_id={}",
|
||||||
conversion.src_V.image_size, conversion.src_V.transfer_unit, conversion.src_V.gap,
|
conversion.src_V.image_size, conversion.src_V.transfer_unit, conversion.src_V.gap,
|
||||||
process->process_id);
|
process->process_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Y2R_U::SetSendingYUYV(Kernel::HLERequestContext& ctx) {
|
void Y2R_U::SetSendingYUYV(Kernel::HLERequestContext& ctx) {
|
||||||
|
@ -290,10 +290,10 @@ void Y2R_U::SetSendingYUYV(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(RESULT_SUCCESS);
|
||||||
|
|
||||||
LOG_DEBUG(Service_Y2R,
|
LOG_DEBUG(Service_Y2R,
|
||||||
"called image_size=0x{:08X}, transfer_unit={}, transfer_stride={}, "
|
"called image_size=0x{:08X}, transfer_unit={}, transfer_stride={}, "
|
||||||
"src_process_id={}",
|
"src_process_id={}",
|
||||||
conversion.src_YUYV.image_size, conversion.src_YUYV.transfer_unit,
|
conversion.src_YUYV.image_size, conversion.src_YUYV.transfer_unit,
|
||||||
conversion.src_YUYV.gap, process->process_id);
|
conversion.src_YUYV.gap, process->process_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Y2R_U::IsFinishedSendingYuv(Kernel::HLERequestContext& ctx) {
|
void Y2R_U::IsFinishedSendingYuv(Kernel::HLERequestContext& ctx) {
|
||||||
|
@ -350,10 +350,10 @@ void Y2R_U::SetReceiving(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(RESULT_SUCCESS);
|
||||||
|
|
||||||
LOG_DEBUG(Service_Y2R,
|
LOG_DEBUG(Service_Y2R,
|
||||||
"called image_size=0x{:08X}, transfer_unit={}, transfer_stride={}, "
|
"called image_size=0x{:08X}, transfer_unit={}, transfer_stride={}, "
|
||||||
"dst_process_id={}",
|
"dst_process_id={}",
|
||||||
conversion.dst.image_size, conversion.dst.transfer_unit, conversion.dst.gap,
|
conversion.dst.image_size, conversion.dst.transfer_unit, conversion.dst.gap,
|
||||||
static_cast<u32>(dst_process->process_id));
|
static_cast<u32>(dst_process->process_id));
|
||||||
}
|
}
|
||||||
|
|
||||||
void Y2R_U::IsFinishedReceiving(Kernel::HLERequestContext& ctx) {
|
void Y2R_U::IsFinishedReceiving(Kernel::HLERequestContext& ctx) {
|
||||||
|
@ -415,9 +415,9 @@ void Y2R_U::SetCoefficient(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(RESULT_SUCCESS);
|
||||||
|
|
||||||
LOG_DEBUG(Service_Y2R, "called coefficients=[{:X}, {:X}, {:X}, {:X}, {:X}, {:X}, {:X}, {:X}]",
|
LOG_DEBUG(Service_Y2R, "called coefficients=[{:X}, {:X}, {:X}, {:X}, {:X}, {:X}, {:X}, {:X}]",
|
||||||
conversion.coefficients[0], conversion.coefficients[1], conversion.coefficients[2],
|
conversion.coefficients[0], conversion.coefficients[1], conversion.coefficients[2],
|
||||||
conversion.coefficients[3], conversion.coefficients[4], conversion.coefficients[5],
|
conversion.coefficients[3], conversion.coefficients[4], conversion.coefficients[5],
|
||||||
conversion.coefficients[6], conversion.coefficients[7]);
|
conversion.coefficients[6], conversion.coefficients[7]);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Y2R_U::GetCoefficient(Kernel::HLERequestContext& ctx) {
|
void Y2R_U::GetCoefficient(Kernel::HLERequestContext& ctx) {
|
||||||
|
@ -568,12 +568,12 @@ cleanup:
|
||||||
rb.Push(result);
|
rb.Push(result);
|
||||||
|
|
||||||
LOG_DEBUG(Service_Y2R,
|
LOG_DEBUG(Service_Y2R,
|
||||||
"called input_format={} output_format={} rotation={} block_alignment={} "
|
"called input_format={} output_format={} rotation={} block_alignment={} "
|
||||||
"input_line_width={} input_lines={} standard_coefficient={} reserved={} alpha={:X}",
|
"input_line_width={} input_lines={} standard_coefficient={} reserved={} alpha={:X}",
|
||||||
static_cast<u8>(params.input_format), static_cast<u8>(params.output_format),
|
static_cast<u8>(params.input_format), static_cast<u8>(params.output_format),
|
||||||
static_cast<u8>(params.rotation), static_cast<u8>(params.block_alignment),
|
static_cast<u8>(params.rotation), static_cast<u8>(params.block_alignment),
|
||||||
params.input_line_width, params.input_lines,
|
params.input_line_width, params.input_lines,
|
||||||
static_cast<u8>(params.standard_coefficient), params.padding, params.alpha);
|
static_cast<u8>(params.standard_coefficient), params.padding, params.alpha);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Y2R_U::PingProcess(Kernel::HLERequestContext& ctx) {
|
void Y2R_U::PingProcess(Kernel::HLERequestContext& ctx) {
|
||||||
|
|
|
@ -65,8 +65,7 @@ static Math::Vec4<u8> DecodePixel(Regs::PixelFormat input_format, const u8* src_
|
||||||
return Color::DecodeRGBA4(src_pixel);
|
return Color::DecodeRGBA4(src_pixel);
|
||||||
|
|
||||||
default:
|
default:
|
||||||
LOG_ERROR(HW_GPU, "Unknown source framebuffer format {:x}",
|
LOG_ERROR(HW_GPU, "Unknown source framebuffer format {:x}", static_cast<u32>(input_format));
|
||||||
static_cast<u32>(input_format));
|
|
||||||
return {0, 0, 0, 0};
|
return {0, 0, 0, 0};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -91,7 +90,7 @@ static void MemoryFill(const Regs::MemoryFillConfig& config) {
|
||||||
|
|
||||||
if (end_addr <= start_addr) {
|
if (end_addr <= start_addr) {
|
||||||
LOG_CRITICAL(HW_GPU, "invalid memory range from {:#010X} to {:#010X}", start_addr,
|
LOG_CRITICAL(HW_GPU, "invalid memory range from {:#010X} to {:#010X}", start_addr,
|
||||||
end_addr);
|
end_addr);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -170,7 +169,7 @@ static void DisplayTransfer(const Regs::DisplayTransferConfig& config) {
|
||||||
|
|
||||||
if (config.scaling > config.ScaleXY) {
|
if (config.scaling > config.ScaleXY) {
|
||||||
LOG_CRITICAL(HW_GPU, "Unimplemented display transfer scaling mode {}",
|
LOG_CRITICAL(HW_GPU, "Unimplemented display transfer scaling mode {}",
|
||||||
config.scaling.Value());
|
config.scaling.Value());
|
||||||
UNIMPLEMENTED();
|
UNIMPLEMENTED();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -296,7 +295,7 @@ static void DisplayTransfer(const Regs::DisplayTransferConfig& config) {
|
||||||
|
|
||||||
default:
|
default:
|
||||||
LOG_ERROR(HW_GPU, "Unknown destination framebuffer format {:x}",
|
LOG_ERROR(HW_GPU, "Unknown destination framebuffer format {:x}",
|
||||||
static_cast<u32>(config.output_format.Value()));
|
static_cast<u32>(config.output_format.Value()));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -392,8 +391,7 @@ inline void Write(u32 addr, const T data) {
|
||||||
|
|
||||||
// Writes other than u32 are untested, so I'd rather have them abort than silently fail
|
// Writes other than u32 are untested, so I'd rather have them abort than silently fail
|
||||||
if (index >= Regs::NumIds() || !std::is_same<T, u32>::value) {
|
if (index >= Regs::NumIds() || !std::is_same<T, u32>::value) {
|
||||||
LOG_ERROR(HW_GPU, "unknown Write{} {:#010X} @ {:#010X}", sizeof(data) * 8, (u32)data,
|
LOG_ERROR(HW_GPU, "unknown Write{} {:#010X} @ {:#010X}", sizeof(data) * 8, (u32)data, addr);
|
||||||
addr);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -410,7 +408,7 @@ inline void Write(u32 addr, const T data) {
|
||||||
if (config.trigger) {
|
if (config.trigger) {
|
||||||
MemoryFill(config);
|
MemoryFill(config);
|
||||||
LOG_TRACE(HW_GPU, "MemoryFill from {:#010X} to {:#010X}", config.GetStartAddress(),
|
LOG_TRACE(HW_GPU, "MemoryFill from {:#010X} to {:#010X}", config.GetStartAddress(),
|
||||||
config.GetEndAddress());
|
config.GetEndAddress());
|
||||||
|
|
||||||
// It seems that it won't signal interrupt if "address_start" is zero.
|
// It seems that it won't signal interrupt if "address_start" is zero.
|
||||||
// TODO: hwtest this
|
// TODO: hwtest this
|
||||||
|
@ -443,22 +441,21 @@ inline void Write(u32 addr, const T data) {
|
||||||
if (config.is_texture_copy) {
|
if (config.is_texture_copy) {
|
||||||
TextureCopy(config);
|
TextureCopy(config);
|
||||||
LOG_TRACE(HW_GPU,
|
LOG_TRACE(HW_GPU,
|
||||||
"TextureCopy: {:#X} bytes from {:#010X}({}+{})-> "
|
"TextureCopy: {:#X} bytes from {:#010X}({}+{})-> "
|
||||||
"{:#010X}({}+{}), flags {:#010X}",
|
"{:#010X}({}+{}), flags {:#010X}",
|
||||||
config.texture_copy.size, config.GetPhysicalInputAddress(),
|
config.texture_copy.size, config.GetPhysicalInputAddress(),
|
||||||
config.texture_copy.input_width * 16,
|
config.texture_copy.input_width * 16, config.texture_copy.input_gap * 16,
|
||||||
config.texture_copy.input_gap * 16, config.GetPhysicalOutputAddress(),
|
config.GetPhysicalOutputAddress(), config.texture_copy.output_width * 16,
|
||||||
config.texture_copy.output_width * 16,
|
config.texture_copy.output_gap * 16, config.flags);
|
||||||
config.texture_copy.output_gap * 16, config.flags);
|
|
||||||
} else {
|
} else {
|
||||||
DisplayTransfer(config);
|
DisplayTransfer(config);
|
||||||
LOG_TRACE(HW_GPU,
|
LOG_TRACE(HW_GPU,
|
||||||
"DisplayTransfer: {:#010X}({}x{})-> "
|
"DisplayTransfer: {:#010X}({}x{})-> "
|
||||||
"{:#010X}({}x{}), dst format {:x}, flags {:#010X}",
|
"{:#010X}({}x{}), dst format {:x}, flags {:#010X}",
|
||||||
config.GetPhysicalInputAddress(), config.input_width.Value(),
|
config.GetPhysicalInputAddress(), config.input_width.Value(),
|
||||||
config.input_height.Value(), config.GetPhysicalOutputAddress(),
|
config.input_height.Value(), config.GetPhysicalOutputAddress(),
|
||||||
config.output_width.Value(), config.output_height.Value(),
|
config.output_width.Value(), config.output_height.Value(),
|
||||||
static_cast<u32>(config.output_format.Value()), config.flags);
|
static_cast<u32>(config.output_format.Value()), config.flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
g_regs.display_transfer_config.trigger = 0;
|
g_regs.display_transfer_config.trigger = 0;
|
||||||
|
|
|
@ -66,7 +66,7 @@ inline void Write(u32 addr, const T data) {
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
LOG_ERROR(HW_Memory, "unknown Write{} {:#010X} @ {:#010X}", sizeof(data) * 8, (u32)data,
|
LOG_ERROR(HW_Memory, "unknown Write{} {:#010X} @ {:#010X}", sizeof(data) * 8, (u32)data,
|
||||||
addr);
|
addr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -35,8 +35,7 @@ inline void Write(u32 addr, const T data) {
|
||||||
|
|
||||||
// Writes other than u32 are untested, so I'd rather have them abort than silently fail
|
// Writes other than u32 are untested, so I'd rather have them abort than silently fail
|
||||||
if (index >= 0x400 || !std::is_same<T, u32>::value) {
|
if (index >= 0x400 || !std::is_same<T, u32>::value) {
|
||||||
LOG_ERROR(HW_LCD, "unknown Write{} {:#010X} @ {:#010X}", sizeof(data) * 8, (u32)data,
|
LOG_ERROR(HW_LCD, "unknown Write{} {:#010X} @ {:#010X}", sizeof(data) * 8, (u32)data, addr);
|
||||||
addr);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -173,7 +173,7 @@ static THREEDSX_Error Load3DSXFile(FileUtil::IOFile& file, u32 base_addr,
|
||||||
current_inprogress < remaining && pos < end_pos; current_inprogress++) {
|
current_inprogress < remaining && pos < end_pos; current_inprogress++) {
|
||||||
const auto& table = reloc_table[current_inprogress];
|
const auto& table = reloc_table[current_inprogress];
|
||||||
LOG_TRACE(Loader, "(t={},skip={},patch={})", current_segment_reloc_table,
|
LOG_TRACE(Loader, "(t={},skip={},patch={})", current_segment_reloc_table,
|
||||||
static_cast<u32>(table.skip), static_cast<u32>(table.patch));
|
static_cast<u32>(table.skip), static_cast<u32>(table.patch));
|
||||||
pos += table.skip;
|
pos += table.skip;
|
||||||
s32 num_patches = table.patch;
|
s32 num_patches = table.patch;
|
||||||
while (0 < num_patches && pos < end_pos) {
|
while (0 < num_patches && pos < end_pos) {
|
||||||
|
@ -183,7 +183,7 @@ static THREEDSX_Error Load3DSXFile(FileUtil::IOFile& file, u32 base_addr,
|
||||||
u32 sub_type = orig_data >> (32 - 4);
|
u32 sub_type = orig_data >> (32 - 4);
|
||||||
u32 addr = TranslateAddr(orig_data & ~0xF0000000, &loadinfo, offsets);
|
u32 addr = TranslateAddr(orig_data & ~0xF0000000, &loadinfo, offsets);
|
||||||
LOG_TRACE(Loader, "Patching {:08X} <-- rel({:08X},{}) ({:08X})", in_addr,
|
LOG_TRACE(Loader, "Patching {:08X} <-- rel({:08X},{}) ({:08X})", in_addr,
|
||||||
addr, current_segment_reloc_table, *pos);
|
addr, current_segment_reloc_table, *pos);
|
||||||
switch (current_segment_reloc_table) {
|
switch (current_segment_reloc_table) {
|
||||||
case 0: {
|
case 0: {
|
||||||
if (sub_type != 0)
|
if (sub_type != 0)
|
||||||
|
@ -237,7 +237,7 @@ static THREEDSX_Error Load3DSXFile(FileUtil::IOFile& file, u32 base_addr,
|
||||||
LOG_DEBUG(Loader, "code size: {:#X}", loadinfo.seg_sizes[0]);
|
LOG_DEBUG(Loader, "code size: {:#X}", loadinfo.seg_sizes[0]);
|
||||||
LOG_DEBUG(Loader, "rodata size: {:#X}", loadinfo.seg_sizes[1]);
|
LOG_DEBUG(Loader, "rodata size: {:#X}", loadinfo.seg_sizes[1]);
|
||||||
LOG_DEBUG(Loader, "data size: {:#X} (including {:#X} of bss)", loadinfo.seg_sizes[2],
|
LOG_DEBUG(Loader, "data size: {:#X} (including {:#X} of bss)", loadinfo.seg_sizes[2],
|
||||||
hdr.bss_size);
|
hdr.bss_size);
|
||||||
|
|
||||||
*out_codeset = code_set;
|
*out_codeset = code_set;
|
||||||
return ERROR_NONE;
|
return ERROR_NONE;
|
||||||
|
|
|
@ -304,7 +304,7 @@ SharedPtr<CodeSet> ElfReader::LoadInto(u32 vaddr) {
|
||||||
for (unsigned int i = 0; i < header->e_phnum; ++i) {
|
for (unsigned int i = 0; i < header->e_phnum; ++i) {
|
||||||
Elf32_Phdr* p = &segments[i];
|
Elf32_Phdr* p = &segments[i];
|
||||||
LOG_DEBUG(Loader, "Type: {} Vaddr: {:08X} Filesz: {:08X} Memsz: {:08X} ", p->p_type,
|
LOG_DEBUG(Loader, "Type: {} Vaddr: {:08X} Filesz: {:08X} Memsz: {:08X} ", p->p_type,
|
||||||
p->p_vaddr, p->p_filesz, p->p_memsz);
|
p->p_vaddr, p->p_filesz, p->p_memsz);
|
||||||
|
|
||||||
if (p->p_type == PT_LOAD) {
|
if (p->p_type == PT_LOAD) {
|
||||||
CodeSet::Segment* codeset_segment;
|
CodeSet::Segment* codeset_segment;
|
||||||
|
@ -317,15 +317,15 @@ SharedPtr<CodeSet> ElfReader::LoadInto(u32 vaddr) {
|
||||||
codeset_segment = &codeset->data;
|
codeset_segment = &codeset->data;
|
||||||
} else {
|
} else {
|
||||||
LOG_ERROR(Loader, "Unexpected ELF PT_LOAD segment id {} with flags {:X}", i,
|
LOG_ERROR(Loader, "Unexpected ELF PT_LOAD segment id {} with flags {:X}", i,
|
||||||
p->p_flags);
|
p->p_flags);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (codeset_segment->size != 0) {
|
if (codeset_segment->size != 0) {
|
||||||
LOG_ERROR(Loader,
|
LOG_ERROR(Loader,
|
||||||
"ELF has more than one segment of the same type. Skipping extra "
|
"ELF has more than one segment of the same type. Skipping extra "
|
||||||
"segment (id {})",
|
"segment (id {})",
|
||||||
i);
|
i);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -39,7 +39,7 @@ PageTable* GetCurrentPageTable() {
|
||||||
|
|
||||||
static void MapPages(PageTable& page_table, u32 base, u32 size, u8* memory, PageType type) {
|
static void MapPages(PageTable& page_table, u32 base, u32 size, u8* memory, PageType type) {
|
||||||
LOG_DEBUG(HW_Memory, "Mapping {} onto {:08X}-{:08X}", (void*)memory, base * PAGE_SIZE,
|
LOG_DEBUG(HW_Memory, "Mapping {} onto {:08X}-{:08X}", (void*)memory, base * PAGE_SIZE,
|
||||||
(base + size) * PAGE_SIZE);
|
(base + size) * PAGE_SIZE);
|
||||||
|
|
||||||
RasterizerFlushVirtualRegion(base << PAGE_BITS, size * PAGE_SIZE,
|
RasterizerFlushVirtualRegion(base << PAGE_BITS, size * PAGE_SIZE,
|
||||||
FlushMode::FlushAndInvalidate);
|
FlushMode::FlushAndInvalidate);
|
||||||
|
@ -189,7 +189,7 @@ void Write(const VAddr vaddr, const T data) {
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case PageType::Unmapped:
|
case PageType::Unmapped:
|
||||||
LOG_ERROR(HW_Memory, "unmapped Write{} 0x{:08X} @ 0x{:08X}", sizeof(data) * 8, (u32)data,
|
LOG_ERROR(HW_Memory, "unmapped Write{} 0x{:08X} @ 0x{:08X}", sizeof(data) * 8, (u32)data,
|
||||||
vaddr);
|
vaddr);
|
||||||
return;
|
return;
|
||||||
case PageType::Memory:
|
case PageType::Memory:
|
||||||
ASSERT_MSG(false, "Mapped memory page without a pointer @ {:08X}", vaddr);
|
ASSERT_MSG(false, "Mapped memory page without a pointer @ {:08X}", vaddr);
|
||||||
|
@ -340,8 +340,8 @@ void RasterizerMarkRegionCached(PAddr start, u32 size, bool cached) {
|
||||||
// parts of the texture.
|
// parts of the texture.
|
||||||
if (!maybe_vaddr) {
|
if (!maybe_vaddr) {
|
||||||
LOG_ERROR(HW_Memory,
|
LOG_ERROR(HW_Memory,
|
||||||
"Trying to flush a cached region to an invalid physical address {:08X}",
|
"Trying to flush a cached region to an invalid physical address {:08X}",
|
||||||
paddr);
|
paddr);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
VAddr vaddr = *maybe_vaddr;
|
VAddr vaddr = *maybe_vaddr;
|
||||||
|
@ -486,8 +486,8 @@ void ReadBlock(const Kernel::Process& process, const VAddr src_addr, void* dest_
|
||||||
switch (page_table.attributes[page_index]) {
|
switch (page_table.attributes[page_index]) {
|
||||||
case PageType::Unmapped: {
|
case PageType::Unmapped: {
|
||||||
LOG_ERROR(HW_Memory,
|
LOG_ERROR(HW_Memory,
|
||||||
"unmapped ReadBlock @ 0x{:08X} (start address = 0x{:08X}, size = {})",
|
"unmapped ReadBlock @ 0x{:08X} (start address = 0x{:08X}, size = {})",
|
||||||
current_vaddr, src_addr, size);
|
current_vaddr, src_addr, size);
|
||||||
std::memset(dest_buffer, 0, copy_amount);
|
std::memset(dest_buffer, 0, copy_amount);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -555,8 +555,8 @@ void WriteBlock(const Kernel::Process& process, const VAddr dest_addr, const voi
|
||||||
switch (page_table.attributes[page_index]) {
|
switch (page_table.attributes[page_index]) {
|
||||||
case PageType::Unmapped: {
|
case PageType::Unmapped: {
|
||||||
LOG_ERROR(HW_Memory,
|
LOG_ERROR(HW_Memory,
|
||||||
"unmapped WriteBlock @ 0x{:08X} (start address = 0x{:08X}, size = {})",
|
"unmapped WriteBlock @ 0x{:08X} (start address = 0x{:08X}, size = {})",
|
||||||
current_vaddr, dest_addr, size);
|
current_vaddr, dest_addr, size);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case PageType::Memory: {
|
case PageType::Memory: {
|
||||||
|
@ -608,8 +608,8 @@ void ZeroBlock(const Kernel::Process& process, const VAddr dest_addr, const size
|
||||||
switch (page_table.attributes[page_index]) {
|
switch (page_table.attributes[page_index]) {
|
||||||
case PageType::Unmapped: {
|
case PageType::Unmapped: {
|
||||||
LOG_ERROR(HW_Memory,
|
LOG_ERROR(HW_Memory,
|
||||||
"unmapped ZeroBlock @ 0x{:08X} (start address = 0x{:08X}, size = {})",
|
"unmapped ZeroBlock @ 0x{:08X} (start address = 0x{:08X}, size = {})",
|
||||||
current_vaddr, dest_addr, size);
|
current_vaddr, dest_addr, size);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case PageType::Memory: {
|
case PageType::Memory: {
|
||||||
|
@ -658,8 +658,8 @@ void CopyBlock(const Kernel::Process& process, VAddr dest_addr, VAddr src_addr,
|
||||||
switch (page_table.attributes[page_index]) {
|
switch (page_table.attributes[page_index]) {
|
||||||
case PageType::Unmapped: {
|
case PageType::Unmapped: {
|
||||||
LOG_ERROR(HW_Memory,
|
LOG_ERROR(HW_Memory,
|
||||||
"unmapped CopyBlock @ 0x{:08X} (start address = 0x{:08X}, size = {})",
|
"unmapped CopyBlock @ 0x{:08X} (start address = 0x{:08X}, size = {})",
|
||||||
current_vaddr, src_addr, size);
|
current_vaddr, src_addr, size);
|
||||||
ZeroBlock(process, dest_addr, copy_amount);
|
ZeroBlock(process, dest_addr, copy_amount);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -139,8 +139,8 @@ void Movie::Play(Service::HID::PadState& pad_state, s16& circle_pad_x, s16& circ
|
||||||
|
|
||||||
if (s.type != ControllerStateType::PadAndCircle) {
|
if (s.type != ControllerStateType::PadAndCircle) {
|
||||||
LOG_ERROR(Movie,
|
LOG_ERROR(Movie,
|
||||||
"Expected to read type {}, but found {}. Your playback will be out of sync",
|
"Expected to read type {}, but found {}. Your playback will be out of sync",
|
||||||
static_cast<int>(ControllerStateType::PadAndCircle), static_cast<int>(s.type));
|
static_cast<int>(ControllerStateType::PadAndCircle), static_cast<int>(s.type));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -168,8 +168,8 @@ void Movie::Play(Service::HID::TouchDataEntry& touch_data) {
|
||||||
|
|
||||||
if (s.type != ControllerStateType::Touch) {
|
if (s.type != ControllerStateType::Touch) {
|
||||||
LOG_ERROR(Movie,
|
LOG_ERROR(Movie,
|
||||||
"Expected to read type {}, but found {}. Your playback will be out of sync",
|
"Expected to read type {}, but found {}. Your playback will be out of sync",
|
||||||
static_cast<int>(ControllerStateType::Touch), static_cast<int>(s.type));
|
static_cast<int>(ControllerStateType::Touch), static_cast<int>(s.type));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -185,8 +185,8 @@ void Movie::Play(Service::HID::AccelerometerDataEntry& accelerometer_data) {
|
||||||
|
|
||||||
if (s.type != ControllerStateType::Accelerometer) {
|
if (s.type != ControllerStateType::Accelerometer) {
|
||||||
LOG_ERROR(Movie,
|
LOG_ERROR(Movie,
|
||||||
"Expected to read type {}, but found {}. Your playback will be out of sync",
|
"Expected to read type {}, but found {}. Your playback will be out of sync",
|
||||||
static_cast<int>(ControllerStateType::Accelerometer), static_cast<int>(s.type));
|
static_cast<int>(ControllerStateType::Accelerometer), static_cast<int>(s.type));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -202,8 +202,8 @@ void Movie::Play(Service::HID::GyroscopeDataEntry& gyroscope_data) {
|
||||||
|
|
||||||
if (s.type != ControllerStateType::Gyroscope) {
|
if (s.type != ControllerStateType::Gyroscope) {
|
||||||
LOG_ERROR(Movie,
|
LOG_ERROR(Movie,
|
||||||
"Expected to read type {}, but found {}. Your playback will be out of sync",
|
"Expected to read type {}, but found {}. Your playback will be out of sync",
|
||||||
static_cast<int>(ControllerStateType::Gyroscope), static_cast<int>(s.type));
|
static_cast<int>(ControllerStateType::Gyroscope), static_cast<int>(s.type));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -219,8 +219,8 @@ void Movie::Play(Service::IR::PadState& pad_state, s16& c_stick_x, s16& c_stick_
|
||||||
|
|
||||||
if (s.type != ControllerStateType::IrRst) {
|
if (s.type != ControllerStateType::IrRst) {
|
||||||
LOG_ERROR(Movie,
|
LOG_ERROR(Movie,
|
||||||
"Expected to read type {}, but found {}. Your playback will be out of sync",
|
"Expected to read type {}, but found {}. Your playback will be out of sync",
|
||||||
static_cast<int>(ControllerStateType::IrRst), static_cast<int>(s.type));
|
static_cast<int>(ControllerStateType::IrRst), static_cast<int>(s.type));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -351,8 +351,8 @@ bool Movie::ValidateHeader(const CTMHeader& header) {
|
||||||
revision = Common::ToLower(revision);
|
revision = Common::ToLower(revision);
|
||||||
|
|
||||||
if (revision != Common::g_scm_rev) {
|
if (revision != Common::g_scm_rev) {
|
||||||
LOG_WARNING(
|
LOG_WARNING(Movie,
|
||||||
Movie, "This movie was created on a different version of Citra, playback may desync");
|
"This movie was created on a different version of Citra, playback may desync");
|
||||||
}
|
}
|
||||||
|
|
||||||
u64 program_id;
|
u64 program_id;
|
||||||
|
@ -408,7 +408,7 @@ void Movie::Init() {
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
LOG_ERROR(Movie, "Failed to playback movie: Unable to open '{}'",
|
LOG_ERROR(Movie, "Failed to playback movie: Unable to open '{}'",
|
||||||
Settings::values.movie_play);
|
Settings::values.movie_play);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -409,10 +409,10 @@ void Room::RoomImpl::HandleWifiPacket(const ENetEvent* event) {
|
||||||
enet_peer_send(member->peer, 0, enet_packet);
|
enet_peer_send(member->peer, 0, enet_packet);
|
||||||
} else {
|
} else {
|
||||||
LOG_ERROR(Network,
|
LOG_ERROR(Network,
|
||||||
"Attempting to send to unknown MAC address: "
|
"Attempting to send to unknown MAC address: "
|
||||||
"{:02X}:{:02X}:{:02X}:{:02X}:{:02X}:{:02X}",
|
"{:02X}:{:02X}:{:02X}:{:02X}:{:02X}:{:02X}",
|
||||||
destination_address[0], destination_address[1], destination_address[2],
|
destination_address[0], destination_address[1], destination_address[2],
|
||||||
destination_address[3], destination_address[4], destination_address[5]);
|
destination_address[3], destination_address[4], destination_address[5]);
|
||||||
enet_packet_destroy(enet_packet);
|
enet_packet_destroy(enet_packet);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -69,7 +69,7 @@ static void WriteUniformIntReg(Shader::ShaderSetup& setup, unsigned index,
|
||||||
ASSERT(index < setup.uniforms.i.size());
|
ASSERT(index < setup.uniforms.i.size());
|
||||||
setup.uniforms.i[index] = values;
|
setup.uniforms.i[index] = values;
|
||||||
LOG_TRACE(HW_GPU, "Set {} integer uniform {} to {:02x} {:02x} {:02x} {:02x}",
|
LOG_TRACE(HW_GPU, "Set {} integer uniform {} to {:02x} {:02x} {:02x} {:02x}",
|
||||||
GetShaderSetupTypeName(setup), index, values.x, values.y, values.z, values.w);
|
GetShaderSetupTypeName(setup), index, values.x, values.y, values.z, values.w);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void WriteUniformFloatReg(ShaderRegs& config, Shader::ShaderSetup& setup,
|
static void WriteUniformFloatReg(ShaderRegs& config, Shader::ShaderSetup& setup,
|
||||||
|
@ -91,7 +91,7 @@ static void WriteUniformFloatReg(ShaderRegs& config, Shader::ShaderSetup& setup,
|
||||||
|
|
||||||
if (uniform_setup.index >= 96) {
|
if (uniform_setup.index >= 96) {
|
||||||
LOG_ERROR(HW_GPU, "Invalid {} float uniform index {}", GetShaderSetupTypeName(setup),
|
LOG_ERROR(HW_GPU, "Invalid {} float uniform index {}", GetShaderSetupTypeName(setup),
|
||||||
(int)uniform_setup.index);
|
(int)uniform_setup.index);
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
// NOTE: The destination component order indeed is "backwards"
|
// NOTE: The destination component order indeed is "backwards"
|
||||||
|
@ -109,9 +109,9 @@ static void WriteUniformFloatReg(ShaderRegs& config, Shader::ShaderSetup& setup,
|
||||||
}
|
}
|
||||||
|
|
||||||
LOG_TRACE(HW_GPU, "Set {} float uniform {:x} to ({} {} {} {})",
|
LOG_TRACE(HW_GPU, "Set {} float uniform {:x} to ({} {} {} {})",
|
||||||
GetShaderSetupTypeName(setup), (int)uniform_setup.index,
|
GetShaderSetupTypeName(setup), (int)uniform_setup.index,
|
||||||
uniform.x.ToFloat32(), uniform.y.ToFloat32(), uniform.z.ToFloat32(),
|
uniform.x.ToFloat32(), uniform.y.ToFloat32(), uniform.z.ToFloat32(),
|
||||||
uniform.w.ToFloat32());
|
uniform.w.ToFloat32());
|
||||||
|
|
||||||
// TODO: Verify that this actually modifies the register!
|
// TODO: Verify that this actually modifies the register!
|
||||||
uniform_setup.index.Assign(uniform_setup.index + 1);
|
uniform_setup.index.Assign(uniform_setup.index + 1);
|
||||||
|
@ -199,8 +199,8 @@ static void WritePicaReg(u32 id, u32 value, u32 mask) {
|
||||||
attribute.x = float24::FromRaw(default_attr_write_buffer[2] & 0xFFFFFF);
|
attribute.x = float24::FromRaw(default_attr_write_buffer[2] & 0xFFFFFF);
|
||||||
|
|
||||||
LOG_TRACE(HW_GPU, "Set default VS attribute {:x} to ({} {} {} {})", (int)setup.index,
|
LOG_TRACE(HW_GPU, "Set default VS attribute {:x} to ({} {} {} {})", (int)setup.index,
|
||||||
attribute.x.ToFloat32(), attribute.y.ToFloat32(), attribute.z.ToFloat32(),
|
attribute.x.ToFloat32(), attribute.y.ToFloat32(), attribute.z.ToFloat32(),
|
||||||
attribute.w.ToFloat32());
|
attribute.w.ToFloat32());
|
||||||
|
|
||||||
// TODO: Verify that this actually modifies the register!
|
// TODO: Verify that this actually modifies the register!
|
||||||
if (setup.index < 15) {
|
if (setup.index < 15) {
|
||||||
|
|
|
@ -179,11 +179,11 @@ void DumpShader(const std::string& filename, const ShaderRegs& config,
|
||||||
} catch (const std::out_of_range&) {
|
} catch (const std::out_of_range&) {
|
||||||
DEBUG_ASSERT_MSG(false, "Unknown output attribute mapping");
|
DEBUG_ASSERT_MSG(false, "Unknown output attribute mapping");
|
||||||
LOG_ERROR(HW_GPU,
|
LOG_ERROR(HW_GPU,
|
||||||
"Unknown output attribute mapping: {:03x}, {:03x}, {:03x}, {:03x}",
|
"Unknown output attribute mapping: {:03x}, {:03x}, {:03x}, {:03x}",
|
||||||
(int)output_attributes[i].map_x.Value(),
|
(int)output_attributes[i].map_x.Value(),
|
||||||
(int)output_attributes[i].map_y.Value(),
|
(int)output_attributes[i].map_y.Value(),
|
||||||
(int)output_attributes[i].map_z.Value(),
|
(int)output_attributes[i].map_z.Value(),
|
||||||
(int)output_attributes[i].map_w.Value());
|
(int)output_attributes[i].map_w.Value());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -43,9 +43,8 @@ RasterizerOpenGL::RasterizerOpenGL()
|
||||||
allow_shadow = GLAD_GL_ARB_shader_image_load_store && GLAD_GL_ARB_shader_image_size &&
|
allow_shadow = GLAD_GL_ARB_shader_image_load_store && GLAD_GL_ARB_shader_image_size &&
|
||||||
GLAD_GL_ARB_framebuffer_no_attachments;
|
GLAD_GL_ARB_framebuffer_no_attachments;
|
||||||
if (!allow_shadow) {
|
if (!allow_shadow) {
|
||||||
LOG_WARNING(
|
LOG_WARNING(Render_OpenGL,
|
||||||
Render_OpenGL,
|
"Shadow might not be able to render because of unsupported OpenGL extensions.");
|
||||||
"Shadow might not be able to render because of unsupported OpenGL extensions.");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Clipping plane 0 is always enabled for PICA fixed clip plane z <= 0
|
// Clipping plane 0 is always enabled for PICA fixed clip plane z <= 0
|
||||||
|
@ -1601,7 +1600,7 @@ void RasterizerOpenGL::SyncCullMode() {
|
||||||
|
|
||||||
default:
|
default:
|
||||||
LOG_CRITICAL(Render_OpenGL, "Unknown cull mode {}",
|
LOG_CRITICAL(Render_OpenGL, "Unknown cull mode {}",
|
||||||
static_cast<u32>(regs.rasterizer.cull_mode.Value()));
|
static_cast<u32>(regs.rasterizer.cull_mode.Value()));
|
||||||
UNIMPLEMENTED();
|
UNIMPLEMENTED();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1391,7 +1391,7 @@ SurfaceSurfaceRect_Tuple RasterizerCacheOpenGL::GetFramebufferSurfaces(
|
||||||
if (using_color_fb && using_depth_fb &&
|
if (using_color_fb && using_depth_fb &&
|
||||||
boost::icl::length(color_vp_interval & depth_vp_interval)) {
|
boost::icl::length(color_vp_interval & depth_vp_interval)) {
|
||||||
LOG_CRITICAL(Render_OpenGL, "Color and depth framebuffer memory regions overlap; "
|
LOG_CRITICAL(Render_OpenGL, "Color and depth framebuffer memory regions overlap; "
|
||||||
"overlapping framebuffers not supported!");
|
"overlapping framebuffers not supported!");
|
||||||
using_depth_fb = false;
|
using_depth_fb = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -573,8 +573,8 @@ private:
|
||||||
|
|
||||||
default: {
|
default: {
|
||||||
LOG_ERROR(HW_GPU, "Unhandled arithmetic instruction: 0x{:02x} ({}): 0x{:08x}",
|
LOG_ERROR(HW_GPU, "Unhandled arithmetic instruction: 0x{:02x} ({}): 0x{:08x}",
|
||||||
(int)instr.opcode.Value().EffectiveOpCode(),
|
(int)instr.opcode.Value().EffectiveOpCode(),
|
||||||
instr.opcode.Value().GetInfo().name, instr.hex);
|
instr.opcode.Value().GetInfo().name, instr.hex);
|
||||||
throw DecompileFail("Unhandled instruction");
|
throw DecompileFail("Unhandled instruction");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -617,8 +617,8 @@ private:
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
LOG_ERROR(HW_GPU, "Unhandled multiply-add instruction: 0x{:02x} ({}): 0x{:08x}",
|
LOG_ERROR(HW_GPU, "Unhandled multiply-add instruction: 0x{:02x} ({}): 0x{:08x}",
|
||||||
(int)instr.opcode.Value().EffectiveOpCode(),
|
(int)instr.opcode.Value().EffectiveOpCode(),
|
||||||
instr.opcode.Value().GetInfo().name, instr.hex);
|
instr.opcode.Value().GetInfo().name, instr.hex);
|
||||||
throw DecompileFail("Unhandled instruction");
|
throw DecompileFail("Unhandled instruction");
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -771,8 +771,8 @@ private:
|
||||||
|
|
||||||
default: {
|
default: {
|
||||||
LOG_ERROR(HW_GPU, "Unhandled instruction: 0x{:02x} ({}): 0x{:08x}",
|
LOG_ERROR(HW_GPU, "Unhandled instruction: 0x{:02x} ({}): 0x{:08x}",
|
||||||
(int)instr.opcode.Value().EffectiveOpCode(),
|
(int)instr.opcode.Value().EffectiveOpCode(),
|
||||||
instr.opcode.Value().GetInfo().name, instr.hex);
|
instr.opcode.Value().GetInfo().name, instr.hex);
|
||||||
throw DecompileFail("Unhandled instruction");
|
throw DecompileFail("Unhandled instruction");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -270,7 +270,7 @@ void PicaGSConfigCommonRaw::Init(const Pica::Regs& regs) {
|
||||||
semantic_maps[static_cast<size_t>(semantic)] = {attrib, comp};
|
semantic_maps[static_cast<size_t>(semantic)] = {attrib, comp};
|
||||||
} else if (semantic != VSOutputAttributes::INVALID) {
|
} else if (semantic != VSOutputAttributes::INVALID) {
|
||||||
LOG_ERROR(Render_OpenGL, "Invalid/unknown semantic id: {}",
|
LOG_ERROR(Render_OpenGL, "Invalid/unknown semantic id: {}",
|
||||||
static_cast<u32>(semantic));
|
static_cast<u32>(semantic));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -321,7 +321,7 @@ static std::string SampleTexture(const PicaFSConfig& config, unsigned texture_un
|
||||||
return "shadowTextureCube(texcoord0, texcoord0_w)";
|
return "shadowTextureCube(texcoord0, texcoord0_w)";
|
||||||
default:
|
default:
|
||||||
LOG_CRITICAL(HW_GPU, "Unhandled texture type {:x}",
|
LOG_CRITICAL(HW_GPU, "Unhandled texture type {:x}",
|
||||||
static_cast<int>(state.texture0_type));
|
static_cast<int>(state.texture0_type));
|
||||||
UNIMPLEMENTED();
|
UNIMPLEMENTED();
|
||||||
return "texture(tex0, texcoord0)";
|
return "texture(tex0, texcoord0)";
|
||||||
}
|
}
|
||||||
|
@ -535,7 +535,7 @@ static void AppendColorCombiner(std::string& out, TevStageConfig::Operation oper
|
||||||
default:
|
default:
|
||||||
out += "vec3(0.0)";
|
out += "vec3(0.0)";
|
||||||
LOG_CRITICAL(Render_OpenGL, "Unknown color combiner operation: {}",
|
LOG_CRITICAL(Render_OpenGL, "Unknown color combiner operation: {}",
|
||||||
static_cast<u32>(operation));
|
static_cast<u32>(operation));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
out += ", vec3(0.0), vec3(1.0))"; // Clamp result to 0.0, 1.0
|
out += ", vec3(0.0), vec3(1.0))"; // Clamp result to 0.0, 1.0
|
||||||
|
@ -576,7 +576,7 @@ static void AppendAlphaCombiner(std::string& out, TevStageConfig::Operation oper
|
||||||
default:
|
default:
|
||||||
out += "0.0";
|
out += "0.0";
|
||||||
LOG_CRITICAL(Render_OpenGL, "Unknown alpha combiner operation: {}",
|
LOG_CRITICAL(Render_OpenGL, "Unknown alpha combiner operation: {}",
|
||||||
static_cast<u32>(operation));
|
static_cast<u32>(operation));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
out += ", 0.0, 1.0)";
|
out += ", 0.0, 1.0)";
|
||||||
|
|
|
@ -43,7 +43,7 @@ GLuint LoadShader(const char* source, GLenum type) {
|
||||||
LOG_DEBUG(Render_OpenGL, "{}", &shader_error[0]);
|
LOG_DEBUG(Render_OpenGL, "{}", &shader_error[0]);
|
||||||
} else {
|
} else {
|
||||||
LOG_ERROR(Render_OpenGL, "Error compiling {} shader:\n{}", debug_type,
|
LOG_ERROR(Render_OpenGL, "Error compiling {} shader:\n{}", debug_type,
|
||||||
&shader_error[0]);
|
&shader_error[0]);
|
||||||
LOG_ERROR(Render_OpenGL, "Shader source code:\n{}", source);
|
LOG_ERROR(Render_OpenGL, "Shader source code:\n{}", source);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -172,8 +172,8 @@ void RendererOpenGL::LoadFBToScreenInfo(const GPU::Regs::FramebufferConfig& fram
|
||||||
: (!right_eye ? framebuffer.address_left2 : framebuffer.address_right2);
|
: (!right_eye ? framebuffer.address_left2 : framebuffer.address_right2);
|
||||||
|
|
||||||
LOG_TRACE(Render_OpenGL, "0x{:08x} bytes from 0x{:08x}({}x{}), fmt {:x}",
|
LOG_TRACE(Render_OpenGL, "0x{:08x} bytes from 0x{:08x}({}x{}), fmt {:x}",
|
||||||
framebuffer.stride * framebuffer.height, framebuffer_addr, (int)framebuffer.width,
|
framebuffer.stride * framebuffer.height, framebuffer_addr, (int)framebuffer.width,
|
||||||
(int)framebuffer.height, (int)framebuffer.format);
|
(int)framebuffer.height, (int)framebuffer.format);
|
||||||
|
|
||||||
int bpp = GPU::Regs::BytesPerPixel(framebuffer.color_format);
|
int bpp = GPU::Regs::BytesPerPixel(framebuffer.color_format);
|
||||||
size_t pixel_stride = framebuffer.stride / bpp;
|
size_t pixel_stride = framebuffer.stride / bpp;
|
||||||
|
@ -494,8 +494,8 @@ static void APIENTRY DebugHandler(GLenum source, GLenum type, GLuint id, GLenum
|
||||||
level = Log::Level::Debug;
|
level = Log::Level::Debug;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
LOG_GENERIC(Log::Class::Render_OpenGL, level, "{} {} {}: {}", GetSource(source),
|
LOG_GENERIC(Log::Class::Render_OpenGL, level, "{} {} {}: {}", GetSource(source), GetType(type),
|
||||||
GetType(type), id, message);
|
id, message);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Initialize the renderer
|
/// Initialize the renderer
|
||||||
|
|
|
@ -66,14 +66,14 @@ OutputVertex OutputVertex::FromAttributeBuffer(const RasterizerRegs& regs,
|
||||||
}
|
}
|
||||||
|
|
||||||
LOG_TRACE(HW_GPU,
|
LOG_TRACE(HW_GPU,
|
||||||
"Output vertex: pos({:.2}, {:.2}, {:.2}, {:.2}), quat({:.2}, {:.2}, {:.2}, {:.2}), "
|
"Output vertex: pos({:.2}, {:.2}, {:.2}, {:.2}), quat({:.2}, {:.2}, {:.2}, {:.2}), "
|
||||||
"col({:.2}, {:.2}, {:.2}, {:.2}), tc0({:.2}, {:.2}), view({:.2}, {:.2}, {:.2})",
|
"col({:.2}, {:.2}, {:.2}, {:.2}), tc0({:.2}, {:.2}), view({:.2}, {:.2}, {:.2})",
|
||||||
ret.pos.x.ToFloat32(), ret.pos.y.ToFloat32(), ret.pos.z.ToFloat32(),
|
ret.pos.x.ToFloat32(), ret.pos.y.ToFloat32(), ret.pos.z.ToFloat32(),
|
||||||
ret.pos.w.ToFloat32(), ret.quat.x.ToFloat32(), ret.quat.y.ToFloat32(),
|
ret.pos.w.ToFloat32(), ret.quat.x.ToFloat32(), ret.quat.y.ToFloat32(),
|
||||||
ret.quat.z.ToFloat32(), ret.quat.w.ToFloat32(), ret.color.x.ToFloat32(),
|
ret.quat.z.ToFloat32(), ret.quat.w.ToFloat32(), ret.color.x.ToFloat32(),
|
||||||
ret.color.y.ToFloat32(), ret.color.z.ToFloat32(), ret.color.w.ToFloat32(),
|
ret.color.y.ToFloat32(), ret.color.z.ToFloat32(), ret.color.w.ToFloat32(),
|
||||||
ret.tc0.u().ToFloat32(), ret.tc0.v().ToFloat32(), ret.view.x.ToFloat32(),
|
ret.tc0.u().ToFloat32(), ret.tc0.v().ToFloat32(), ret.view.x.ToFloat32(),
|
||||||
ret.view.y.ToFloat32(), ret.view.z.ToFloat32());
|
ret.view.y.ToFloat32(), ret.view.z.ToFloat32());
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
|
@ -447,8 +447,8 @@ static void RunInterpreter(const ShaderSetup& setup, UnitState& state, DebugData
|
||||||
|
|
||||||
default:
|
default:
|
||||||
LOG_ERROR(HW_GPU, "Unhandled arithmetic instruction: 0x{:02x} ({}): 0x{:08x}",
|
LOG_ERROR(HW_GPU, "Unhandled arithmetic instruction: 0x{:02x} ({}): 0x{:08x}",
|
||||||
(int)instr.opcode.Value().EffectiveOpCode(),
|
(int)instr.opcode.Value().EffectiveOpCode(),
|
||||||
instr.opcode.Value().GetInfo().name, instr.hex);
|
instr.opcode.Value().GetInfo().name, instr.hex);
|
||||||
DEBUG_ASSERT(false);
|
DEBUG_ASSERT(false);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -536,8 +536,8 @@ static void RunInterpreter(const ShaderSetup& setup, UnitState& state, DebugData
|
||||||
Record<DebugDataRecord::DEST_OUT>(debug_data, iteration, dest);
|
Record<DebugDataRecord::DEST_OUT>(debug_data, iteration, dest);
|
||||||
} else {
|
} else {
|
||||||
LOG_ERROR(HW_GPU, "Unhandled multiply-add instruction: 0x{:02x} ({}): 0x{:08x}",
|
LOG_ERROR(HW_GPU, "Unhandled multiply-add instruction: 0x{:02x} ({}): 0x{:08x}",
|
||||||
(int)instr.opcode.Value().EffectiveOpCode(),
|
(int)instr.opcode.Value().EffectiveOpCode(),
|
||||||
instr.opcode.Value().GetInfo().name, instr.hex);
|
instr.opcode.Value().GetInfo().name, instr.hex);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -654,8 +654,8 @@ static void RunInterpreter(const ShaderSetup& setup, UnitState& state, DebugData
|
||||||
|
|
||||||
default:
|
default:
|
||||||
LOG_ERROR(HW_GPU, "Unhandled instruction: 0x{:02x} ({}): 0x{:08x}",
|
LOG_ERROR(HW_GPU, "Unhandled instruction: 0x{:02x} ({}): 0x{:08x}",
|
||||||
(int)instr.opcode.Value().EffectiveOpCode(),
|
(int)instr.opcode.Value().EffectiveOpCode(),
|
||||||
instr.opcode.Value().GetInfo().name, instr.hex);
|
instr.opcode.Value().GetInfo().name, instr.hex);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -859,7 +859,7 @@ void JitShader::Compile_NextInstr() {
|
||||||
} else {
|
} else {
|
||||||
// Unhandled instruction
|
// Unhandled instruction
|
||||||
LOG_CRITICAL(HW_GPU, "Unhandled instruction: 0x{:02x} (0x{:08x})",
|
LOG_CRITICAL(HW_GPU, "Unhandled instruction: 0x{:02x} (0x{:08x})",
|
||||||
static_cast<u32>(instr.opcode.Value().EffectiveOpCode()), instr.hex);
|
static_cast<u32>(instr.opcode.Value().EffectiveOpCode()), instr.hex);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -58,7 +58,7 @@ void DrawPixel(int x, int y, const Math::Vec4<u8>& color) {
|
||||||
|
|
||||||
default:
|
default:
|
||||||
LOG_CRITICAL(Render_Software, "Unknown framebuffer color format {:x}",
|
LOG_CRITICAL(Render_Software, "Unknown framebuffer color format {:x}",
|
||||||
static_cast<u32>(framebuffer.color_format.Value()));
|
static_cast<u32>(framebuffer.color_format.Value()));
|
||||||
UNIMPLEMENTED();
|
UNIMPLEMENTED();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -94,7 +94,7 @@ const Math::Vec4<u8> GetPixel(int x, int y) {
|
||||||
|
|
||||||
default:
|
default:
|
||||||
LOG_CRITICAL(Render_Software, "Unknown framebuffer color format {:x}",
|
LOG_CRITICAL(Render_Software, "Unknown framebuffer color format {:x}",
|
||||||
static_cast<u32>(framebuffer.color_format.Value()));
|
static_cast<u32>(framebuffer.color_format.Value()));
|
||||||
UNIMPLEMENTED();
|
UNIMPLEMENTED();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -124,7 +124,7 @@ u32 GetDepth(int x, int y) {
|
||||||
return Color::DecodeD24S8(src_pixel).x;
|
return Color::DecodeD24S8(src_pixel).x;
|
||||||
default:
|
default:
|
||||||
LOG_CRITICAL(HW_GPU, "Unimplemented depth format {}",
|
LOG_CRITICAL(HW_GPU, "Unimplemented depth format {}",
|
||||||
static_cast<u32>(framebuffer.depth_format.Value()));
|
static_cast<u32>(framebuffer.depth_format.Value()));
|
||||||
UNIMPLEMENTED();
|
UNIMPLEMENTED();
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -186,7 +186,7 @@ void SetDepth(int x, int y, u32 value) {
|
||||||
|
|
||||||
default:
|
default:
|
||||||
LOG_CRITICAL(HW_GPU, "Unimplemented depth format {}",
|
LOG_CRITICAL(HW_GPU, "Unimplemented depth format {}",
|
||||||
static_cast<u32>(framebuffer.depth_format.Value()));
|
static_cast<u32>(framebuffer.depth_format.Value()));
|
||||||
UNIMPLEMENTED();
|
UNIMPLEMENTED();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -218,7 +218,7 @@ void SetStencil(int x, int y, u8 value) {
|
||||||
|
|
||||||
default:
|
default:
|
||||||
LOG_CRITICAL(HW_GPU, "Unimplemented depth format {}",
|
LOG_CRITICAL(HW_GPU, "Unimplemented depth format {}",
|
||||||
static_cast<u32>(framebuffer.depth_format.Value()));
|
static_cast<u32>(framebuffer.depth_format.Value()));
|
||||||
UNIMPLEMENTED();
|
UNIMPLEMENTED();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -54,7 +54,7 @@ std::tuple<Math::Vec4<u8>, Math::Vec4<u8>> ComputeFragmentsColors(
|
||||||
surface_tangent = perturbation;
|
surface_tangent = perturbation;
|
||||||
} else {
|
} else {
|
||||||
LOG_ERROR(HW_GPU, "Unknown bump mode {}",
|
LOG_ERROR(HW_GPU, "Unknown bump mode {}",
|
||||||
static_cast<u32>(lighting.config0.bump_mode.Value()));
|
static_cast<u32>(lighting.config0.bump_mode.Value()));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
surface_normal = Math::MakeVec(0.0f, 0.0f, 1.0f);
|
surface_normal = Math::MakeVec(0.0f, 0.0f, 1.0f);
|
||||||
|
|
|
@ -363,8 +363,7 @@ static void ProcessTriangleInternal(const Vertex& v0, const Vertex& v1, const Ve
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
// TODO: Change to LOG_ERROR when more types are handled.
|
// TODO: Change to LOG_ERROR when more types are handled.
|
||||||
LOG_DEBUG(HW_GPU, "Unhandled texture type {:x}",
|
LOG_DEBUG(HW_GPU, "Unhandled texture type {:x}", (int)texture.config.type);
|
||||||
(int)texture.config.type);
|
|
||||||
UNIMPLEMENTED();
|
UNIMPLEMENTED();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -844,8 +843,7 @@ static void ProcessTriangleInternal(const Vertex& v0, const Vertex& v1, const Ve
|
||||||
return std::min(combiner_output.a(), static_cast<u8>(255 - dest.a()));
|
return std::min(combiner_output.a(), static_cast<u8>(255 - dest.a()));
|
||||||
|
|
||||||
default:
|
default:
|
||||||
LOG_CRITICAL(HW_GPU, "Unknown blend factor {:x}",
|
LOG_CRITICAL(HW_GPU, "Unknown blend factor {:x}", static_cast<u32>(factor));
|
||||||
static_cast<u32>(factor));
|
|
||||||
UNIMPLEMENTED();
|
UNIMPLEMENTED();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -37,10 +37,9 @@ void VertexLoader::Setup(const PipelineRegs& regs) {
|
||||||
// TODO: What happens if a loader overwrites a previous one's data?
|
// TODO: What happens if a loader overwrites a previous one's data?
|
||||||
for (unsigned component = 0; component < loader_config.component_count; ++component) {
|
for (unsigned component = 0; component < loader_config.component_count; ++component) {
|
||||||
if (component >= 12) {
|
if (component >= 12) {
|
||||||
LOG_ERROR(
|
LOG_ERROR(HW_GPU,
|
||||||
HW_GPU,
|
"Overflow in the vertex attribute loader {} trying to load component {}",
|
||||||
"Overflow in the vertex attribute loader {} trying to load component {}",
|
loader, component);
|
||||||
loader, component);
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -138,12 +137,12 @@ void VertexLoader::LoadVertex(u32 base_address, int index, int vertex,
|
||||||
}
|
}
|
||||||
|
|
||||||
LOG_TRACE(HW_GPU,
|
LOG_TRACE(HW_GPU,
|
||||||
"Loaded {} components of attribute {:x} for vertex {:x} (index {:x}) from "
|
"Loaded {} components of attribute {:x} for vertex {:x} (index {:x}) from "
|
||||||
"0x{:08x} + 0x{:08x} + 0x{:04x}: {} {} {} {}",
|
"0x{:08x} + 0x{:08x} + 0x{:04x}: {} {} {} {}",
|
||||||
vertex_attribute_elements[i], i, vertex, index, base_address,
|
vertex_attribute_elements[i], i, vertex, index, base_address,
|
||||||
vertex_attribute_sources[i], vertex_attribute_strides[i] * vertex,
|
vertex_attribute_sources[i], vertex_attribute_strides[i] * vertex,
|
||||||
input.attr[i][0].ToFloat32(), input.attr[i][1].ToFloat32(),
|
input.attr[i][0].ToFloat32(), input.attr[i][1].ToFloat32(),
|
||||||
input.attr[i][2].ToFloat32(), input.attr[i][3].ToFloat32());
|
input.attr[i][2].ToFloat32(), input.attr[i][3].ToFloat32());
|
||||||
} else if (vertex_attribute_is_default[i]) {
|
} else if (vertex_attribute_is_default[i]) {
|
||||||
// Load the default attribute if we're configured to do so
|
// Load the default attribute if we're configured to do so
|
||||||
input.attr[i] = g_state.input_default_attributes.attr[i];
|
input.attr[i] = g_state.input_default_attributes.attr[i];
|
||||||
|
|
|
@ -104,7 +104,7 @@ std::future<Common::WebResult> PostJson(const std::string& url, const std::strin
|
||||||
|
|
||||||
if (response.status >= 400) {
|
if (response.status >= 400) {
|
||||||
LOG_ERROR(WebService, "POST to {} returned error status code: {}", url,
|
LOG_ERROR(WebService, "POST to {} returned error status code: {}", url,
|
||||||
response.status);
|
response.status);
|
||||||
return Common::WebResult{Common::WebResult::Code::HttpError,
|
return Common::WebResult{Common::WebResult::Code::HttpError,
|
||||||
std::to_string(response.status)};
|
std::to_string(response.status)};
|
||||||
}
|
}
|
||||||
|
@ -114,7 +114,7 @@ std::future<Common::WebResult> PostJson(const std::string& url, const std::strin
|
||||||
if (content_type == response.headers.end() ||
|
if (content_type == response.headers.end() ||
|
||||||
content_type->second.find("application/json") == std::string::npos) {
|
content_type->second.find("application/json") == std::string::npos) {
|
||||||
LOG_ERROR(WebService, "POST to {} returned wrong content: {}", url,
|
LOG_ERROR(WebService, "POST to {} returned wrong content: {}", url,
|
||||||
content_type->second);
|
content_type->second);
|
||||||
return Common::WebResult{Common::WebResult::Code::WrongContent, content_type->second};
|
return Common::WebResult{Common::WebResult::Code::WrongContent, content_type->second};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -175,8 +175,7 @@ std::future<T> GetJson(std::function<T(const std::string&)> func, const std::str
|
||||||
}
|
}
|
||||||
|
|
||||||
if (response.status >= 400) {
|
if (response.status >= 400) {
|
||||||
LOG_ERROR(WebService, "GET to {} returned error status code: {}", url,
|
LOG_ERROR(WebService, "GET to {} returned error status code: {}", url, response.status);
|
||||||
response.status);
|
|
||||||
return func("");
|
return func("");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -185,7 +184,7 @@ std::future<T> GetJson(std::function<T(const std::string&)> func, const std::str
|
||||||
if (content_type == response.headers.end() ||
|
if (content_type == response.headers.end() ||
|
||||||
content_type->second.find("application/json") == std::string::npos) {
|
content_type->second.find("application/json") == std::string::npos) {
|
||||||
LOG_ERROR(WebService, "GET to {} returned wrong content: {}", url,
|
LOG_ERROR(WebService, "GET to {} returned wrong content: {}", url,
|
||||||
content_type->second);
|
content_type->second);
|
||||||
return func("");
|
return func("");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -248,7 +247,7 @@ void DeleteJson(const std::string& url, const std::string& data, const std::stri
|
||||||
|
|
||||||
if (response.status >= 400) {
|
if (response.status >= 400) {
|
||||||
LOG_ERROR(WebService, "DELETE to {} returned error status code: {}", url,
|
LOG_ERROR(WebService, "DELETE to {} returned error status code: {}", url,
|
||||||
response.status);
|
response.status);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -257,7 +256,7 @@ void DeleteJson(const std::string& url, const std::string& data, const std::stri
|
||||||
if (content_type == response.headers.end() ||
|
if (content_type == response.headers.end() ||
|
||||||
content_type->second.find("application/json") == std::string::npos) {
|
content_type->second.find("application/json") == std::string::npos) {
|
||||||
LOG_ERROR(WebService, "DELETE to {} returned wrong content: {}", url,
|
LOG_ERROR(WebService, "DELETE to {} returned wrong content: {}", url,
|
||||||
content_type->second);
|
content_type->second);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue