mirror of
https://github.com/PabloMK7/citra.git
synced 2024-12-29 11:06:12 +00:00
Bump kernel version for 3DSX (#5446)
This commit is contained in:
parent
ff9c3b0531
commit
1032b60d9b
|
@ -145,6 +145,22 @@ void Process::ParseKernelCaps(const u32* kernel_caps, std::size_t len) {
|
|||
}
|
||||
}
|
||||
|
||||
void Process::Set3dsxKernelCaps() {
|
||||
svc_access_mask.set();
|
||||
|
||||
address_mappings = {
|
||||
{0x1FF50000, 0x8000, true}, // part of DSP RAM
|
||||
{0x1FF70000, 0x8000, true}, // part of DSP RAM
|
||||
{0x1F000000, 0x600000, false}, // entire VRAM
|
||||
};
|
||||
|
||||
// Similar to Rosalina, we set kernel version to a recent one.
|
||||
// This is 11.2.0, to be consistent with core/hle/kernel/config_mem.cpp
|
||||
// TODO: refactor kernel version out so it is configurable and consistent
|
||||
// among all relevant places.
|
||||
kernel_version = 0x234;
|
||||
}
|
||||
|
||||
void Process::Run(s32 main_thread_priority, u32 stack_size) {
|
||||
memory_region = kernel.GetMemoryRegion(flags.memory_region);
|
||||
|
||||
|
|
|
@ -190,6 +190,11 @@ public:
|
|||
*/
|
||||
void ParseKernelCaps(const u32* kernel_caps, std::size_t len);
|
||||
|
||||
/**
|
||||
* Set up the default kernel capability for 3DSX.
|
||||
*/
|
||||
void Set3dsxKernelCaps();
|
||||
|
||||
/**
|
||||
* Applies address space changes and launches the process main thread.
|
||||
*/
|
||||
|
|
|
@ -268,8 +268,7 @@ ResultStatus AppLoader_THREEDSX::Load(std::shared_ptr<Kernel::Process>& process)
|
|||
codeset->name = filename;
|
||||
|
||||
process = Core::System::GetInstance().Kernel().CreateProcess(std::move(codeset));
|
||||
process->svc_access_mask.set();
|
||||
process->address_mappings = default_address_mappings;
|
||||
process->Set3dsxKernelCaps();
|
||||
|
||||
// Attach the default resource limit (APPLICATION) to the process
|
||||
process->resource_limit = Core::System::GetInstance().Kernel().ResourceLimit().GetForCategory(
|
||||
|
|
|
@ -396,8 +396,7 @@ ResultStatus AppLoader_ELF::Load(std::shared_ptr<Kernel::Process>& process) {
|
|||
codeset->name = filename;
|
||||
|
||||
process = Core::System::GetInstance().Kernel().CreateProcess(std::move(codeset));
|
||||
process->svc_access_mask.set();
|
||||
process->address_mappings = default_address_mappings;
|
||||
process->Set3dsxKernelCaps();
|
||||
|
||||
// Attach the default resource limit (APPLICATION) to the process
|
||||
process->resource_limit = Core::System::GetInstance().Kernel().ResourceLimit().GetForCategory(
|
||||
|
|
|
@ -15,12 +15,6 @@
|
|||
|
||||
namespace Loader {
|
||||
|
||||
const std::initializer_list<Kernel::AddressMapping> default_address_mappings = {
|
||||
{0x1FF50000, 0x8000, true}, // part of DSP RAM
|
||||
{0x1FF70000, 0x8000, true}, // part of DSP RAM
|
||||
{0x1F000000, 0x600000, false}, // entire VRAM
|
||||
};
|
||||
|
||||
FileType IdentifyFile(FileUtil::IOFile& file) {
|
||||
FileType type;
|
||||
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
#pragma once
|
||||
|
||||
#include <algorithm>
|
||||
#include <initializer_list>
|
||||
#include <memory>
|
||||
#include <optional>
|
||||
#include <string>
|
||||
|
@ -237,12 +236,6 @@ protected:
|
|||
bool is_loaded = false;
|
||||
};
|
||||
|
||||
/**
|
||||
* Common address mappings found in most games, used for binary formats that don't have this
|
||||
* information.
|
||||
*/
|
||||
extern const std::initializer_list<Kernel::AddressMapping> default_address_mappings;
|
||||
|
||||
/**
|
||||
* Identifies a bootable file and return a suitable loader
|
||||
* @param filename String filename of bootable file
|
||||
|
|
Loading…
Reference in a new issue