mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-04-07 22:55:40 +12:00
Merge remote-tracking branch 'upstream/master' into lr-audio_support
This commit is contained in:
commit
98c1653b24
6 changed files with 47 additions and 5 deletions
33
.github/workflows/Hydra_Build.yml
vendored
33
.github/workflows/Hydra_Build.yml
vendored
|
@ -180,3 +180,36 @@ jobs:
|
||||||
with:
|
with:
|
||||||
name: Android Hydra core
|
name: Android Hydra core
|
||||||
path: '${{github.workspace}}/build/libAlber.so'
|
path: '${{github.workspace}}/build/libAlber.so'
|
||||||
|
|
||||||
|
ARM-Libretro:
|
||||||
|
runs-on: ubuntu-24.04-arm
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- name: Fetch submodules
|
||||||
|
run: git submodule update --init --recursive
|
||||||
|
|
||||||
|
- name: Install misc packages
|
||||||
|
run: |
|
||||||
|
sudo apt-get update && sudo apt install libx11-dev libxext-dev libgl1 libglx-mesa0 mesa-common-dev libfuse2 libwayland-dev
|
||||||
|
|
||||||
|
- name: Install newer Clang
|
||||||
|
run: |
|
||||||
|
wget https://apt.llvm.org/llvm.sh
|
||||||
|
chmod +x ./llvm.sh
|
||||||
|
sudo ./llvm.sh 17
|
||||||
|
|
||||||
|
- name: Configure CMake
|
||||||
|
run: |
|
||||||
|
cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_C_COMPILER=clang-17 -DCMAKE_CXX_COMPILER=clang++-17 -DENABLE_USER_BUILD=ON -DBUILD_LIBRETRO_CORE=ON -DENABLE_VULKAN=OFF -DCRYPTOPP_OPT_DISABLE_ASM=ON
|
||||||
|
|
||||||
|
- name: Build
|
||||||
|
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
|
||||||
|
|
||||||
|
- name: Upload Libretro core
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: Linux arm64 Libretro core
|
||||||
|
path: |
|
||||||
|
${{github.workspace}}/build/panda3ds_libretro.so
|
||||||
|
${{github.workspace}}/docs/libretro/panda3ds_libretro.info
|
||||||
|
|
|
@ -253,4 +253,5 @@ public:
|
||||||
void sendGPUInterrupt(GPUInterrupt type) { serviceManager.sendGPUInterrupt(type); }
|
void sendGPUInterrupt(GPUInterrupt type) { serviceManager.sendGPUInterrupt(type); }
|
||||||
void clearInstructionCache();
|
void clearInstructionCache();
|
||||||
void clearInstructionCacheRange(u32 start, u32 size);
|
void clearInstructionCacheRange(u32 start, u32 size);
|
||||||
|
u32 getSharedFontVaddr();
|
||||||
};
|
};
|
|
@ -19,7 +19,7 @@ struct ResourceLimitValues {
|
||||||
// APPLICATION resource limit
|
// APPLICATION resource limit
|
||||||
static constexpr ResourceLimitValues appResourceLimits = {
|
static constexpr ResourceLimitValues appResourceLimits = {
|
||||||
.maxPriority = 0x18,
|
.maxPriority = 0x18,
|
||||||
.maxCommit = 0x4000000,
|
.maxCommit = 64_MB + 16_MB, // We're currently giving 80MB to all apps. TODO: Implement extended memory properly
|
||||||
.maxThreads = 0x20,
|
.maxThreads = 0x20,
|
||||||
.maxEvents = 0x20,
|
.maxEvents = 0x20,
|
||||||
.maxMutexes = 0x20,
|
.maxMutexes = 0x20,
|
||||||
|
@ -33,7 +33,7 @@ static constexpr ResourceLimitValues appResourceLimits = {
|
||||||
// SYS_APPLET resource limit
|
// SYS_APPLET resource limit
|
||||||
static constexpr ResourceLimitValues sysAppletResourceLimits = {
|
static constexpr ResourceLimitValues sysAppletResourceLimits = {
|
||||||
.maxPriority = 0x4,
|
.maxPriority = 0x4,
|
||||||
.maxCommit = 0x5E00000,
|
.maxCommit = 0x5E00000 - 16_MB,
|
||||||
.maxThreads = 0x1D,
|
.maxThreads = 0x1D,
|
||||||
.maxEvents = 0xB,
|
.maxEvents = 0xB,
|
||||||
.maxMutexes = 0x8,
|
.maxMutexes = 0x8,
|
||||||
|
|
|
@ -132,7 +132,7 @@ public:
|
||||||
static constexpr u32 totalPageCount = 1 << (32 - pageShift);
|
static constexpr u32 totalPageCount = 1 << (32 - pageShift);
|
||||||
|
|
||||||
static constexpr u32 FCRAM_SIZE = u32(128_MB);
|
static constexpr u32 FCRAM_SIZE = u32(128_MB);
|
||||||
static constexpr u32 FCRAM_APPLICATION_SIZE = u32(64_MB);
|
static constexpr u32 FCRAM_APPLICATION_SIZE = u32(80_MB);
|
||||||
static constexpr u32 FCRAM_PAGE_COUNT = FCRAM_SIZE / pageSize;
|
static constexpr u32 FCRAM_PAGE_COUNT = FCRAM_SIZE / pageSize;
|
||||||
static constexpr u32 FCRAM_APPLICATION_PAGE_COUNT = FCRAM_APPLICATION_SIZE / pageSize;
|
static constexpr u32 FCRAM_APPLICATION_PAGE_COUNT = FCRAM_APPLICATION_SIZE / pageSize;
|
||||||
|
|
||||||
|
|
|
@ -122,7 +122,10 @@ void Kernel::mapMemoryBlock() {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (KernelHandles::isSharedMemHandle(block)) {
|
if (KernelHandles::isSharedMemHandle(block)) {
|
||||||
if (block == KernelHandles::FontSharedMemHandle && addr == 0) addr = 0x18000000;
|
if (block == KernelHandles::FontSharedMemHandle && addr == 0) {
|
||||||
|
addr = getSharedFontVaddr();
|
||||||
|
}
|
||||||
|
|
||||||
u8* ptr = mem.mapSharedMemory(block, addr, myPerms, otherPerms); // Map shared memory block
|
u8* ptr = mem.mapSharedMemory(block, addr, myPerms, otherPerms); // Map shared memory block
|
||||||
|
|
||||||
// Pass pointer to shared memory to the appropriate service
|
// Pass pointer to shared memory to the appropriate service
|
||||||
|
@ -216,3 +219,8 @@ void Kernel::unmapMemoryBlock() {
|
||||||
Helpers::warn("Stubbed svcUnmapMemoryBlock!");
|
Helpers::warn("Stubbed svcUnmapMemoryBlock!");
|
||||||
regs[0] = Result::Success;
|
regs[0] = Result::Success;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
u32 Kernel::getSharedFontVaddr() {
|
||||||
|
// Place shared font at the very beginning of system FCRAM
|
||||||
|
return mem.getLinearHeapVaddr() + Memory::FCRAM_APPLICATION_SIZE;
|
||||||
|
}
|
|
@ -391,7 +391,7 @@ void APTService::setScreencapPostPermission(u32 messagePointer) {
|
||||||
void APTService::getSharedFont(u32 messagePointer) {
|
void APTService::getSharedFont(u32 messagePointer) {
|
||||||
log("APT::GetSharedFont\n");
|
log("APT::GetSharedFont\n");
|
||||||
|
|
||||||
constexpr u32 fontVaddr = 0x18000000;
|
const u32 fontVaddr = kernel.getSharedFontVaddr();
|
||||||
mem.write32(messagePointer, IPC::responseHeader(0x44, 2, 2));
|
mem.write32(messagePointer, IPC::responseHeader(0x44, 2, 2));
|
||||||
mem.write32(messagePointer + 4, Result::Success);
|
mem.write32(messagePointer + 4, Result::Success);
|
||||||
mem.write32(messagePointer + 8, fontVaddr);
|
mem.write32(messagePointer + 8, fontVaddr);
|
||||||
|
|
Loading…
Add table
Reference in a new issue