Merge branch 'master' into sd-card

This commit is contained in:
wheremyfoodat 2023-08-20 14:42:01 +03:00
commit eaccc627b9
8 changed files with 30 additions and 7 deletions

2
.gitmodules vendored
View file

@ -33,4 +33,4 @@
url = https://github.com/g-truc/glm
[submodule "third_party/discord-rpc"]
path = third_party/discord-rpc
url = https://github.com/discord/discord-rpc
url = https://github.com/Panda3DS-emu/discord-rpc

View file

@ -1,5 +1,6 @@
# We need to be able to use enable_language(OBJC) on Mac, so we need CMake 3.16 vs the 3.10 we use otherwise. Blame Apple.
if (APPLE)
set(CMAKE_OSX_DEPLOYMENT_TARGET "11.0" CACHE STRING "Minimum OS X deployment version")
cmake_minimum_required(VERSION 3.16)
else()
cmake_minimum_required(VERSION 3.10)
@ -55,7 +56,7 @@ add_compile_definitions(NOMINMAX) # Make windows.h not define min/ma
add_compile_definitions(WIN32_LEAN_AND_MEAN) # Make windows.h not include literally everything
add_compile_definitions(SDL_MAIN_HANDLED)
if(ENABLE_DISCORD_RPC)
if(ENABLE_DISCORD_RPC AND NOT ANDROID)
add_subdirectory(third_party/discord-rpc)
include_directories(third_party/discord-rpc/include)
endif()
@ -277,7 +278,7 @@ endif()
target_link_libraries(Alber PRIVATE dynarmic SDL2-static cryptopp glad)
if(ENABLE_DISCORD_RPC)
if(ENABLE_DISCORD_RPC AND NOT ANDROID)
target_compile_definitions(Alber PUBLIC "PANDA3DS_ENABLE_DISCORD_RPC=1")
target_link_libraries(Alber PRIVATE discord-rpc)
endif()

View file

@ -71,6 +71,7 @@ class HIDService {
void getGyroscopeLowCalibrateParam(u32 messagePointer);
void getGyroscopeCoefficient(u32 messagePointer);
void getIPCHandles(u32 messagePointer);
void getSoundVolume(u32 messagePointer);
// Don't call these prior to initializing shared mem pls
template <typename T>

View file

@ -20,7 +20,7 @@ You can download stable builds from the Releases tab, or you can download the la
|Linux build|[![Linux Build](https://github.com/wheremyfoodat/Panda3DS/actions/workflows/Linux_Build.yml/badge.svg?branch=master)](https://github.com/wheremyfoodat/Panda3DS/actions/workflows/Linux_Build.yml)|[Linux Executable](https://nightly.link/wheremyfoodat/Panda3DS/workflows/Linux_Build/master/Linux%20executable.zip)|
# Compatibility
Panda3DS is still in the early stages of development. Many games boot, many don't. Most games have at least some hilariously broken graphics, audio is not supported, performance leaves a bit to be desired mainly thanks to lack of shader acceleration, and most QoL features (including a GUI) are missing.
Panda3DS is still in the early stages of development. Many games boot, many don't. Most games have at least some hilariously broken graphics, audio is not supported, and some QoL features (including a GUI) are missing.
In addition, some games don't quiiite work with the upstream code. A lot of them might need some panics in the source code to be commented out before they work, etc. However, just the fact things can work as well as they do now is promising in itself.
@ -80,6 +80,9 @@ Keyboard & Mouse
- Select button Backspace
- Touch Screen Left click
- Gyroscope Hold right click and swipe your mouse left and right (support is kind of shaky atm, but games that require gyro here and there like Kirby should work)
- Pause/Resume F4
- Reload F5
Panda3DS also supports controller input using the SDL2 GameController API.
@ -101,6 +104,8 @@ Panda3DS also supports controller input using the SDL2 GameController API.
- [MelonDS](https://github.com/melonDS-emu/melonDS): "DS emulator, sorta" - Arisotura
- [Kaizen](https://github.com/SimoneN64/Kaizen): Experimental work-in-progress low-level N64 emulator
- [ChonkyStation](https://github.com/liuk7071/ChonkyStation): Work-in-progress PlayStation emulator
- [shadPS4](https://github.com/georgemoralis/shadPS4): Work-in-progress PS4 emulator by the founder of PCSX, PCSX2 and more
- [Hydra](https://github.com/hydra-emu/hydra): Cross-platform GameBoy, NES, N64 and Chip-8 emulator
# Support
If you find this project exciting and want to support the founder, check out [his Patreon page](https://www.patreon.com/wheremyfoodat)

View file

@ -482,6 +482,7 @@ void Kernel::setThreadPriority() {
}
void Kernel::getCurrentProcessorNumber() {
logSVC("GetCurrentProcessorNumber()\n");
const ProcessorID id = threads[currentThreadIndex].processorID;
s32 ret;
@ -658,4 +659,4 @@ bool Kernel::shouldWaitOnObject(KernelObject* object) {
Helpers::panic("Not sure whether to wait on object (type: %s)", object->getTypeName());
return true;
}
}
}

View file

@ -166,6 +166,7 @@ u32 Memory::read32(u32 vaddr) {
if (vaddr >= VirtualAddrs::VramStart && vaddr < VirtualAddrs::VramStart + VirtualAddrs::VramSize) {
static int shutUpCounter = 0;
if (shutUpCounter < 5) { // Stop spamming about VRAM reads after the first 5
shutUpCounter++;
Helpers::warn("VRAM read!\n");
}

View file

@ -11,7 +11,8 @@ namespace HIDCommands {
EnableGyroscopeLow = 0x00130000,
DisableGyroscopeLow = 0x00140000,
GetGyroscopeLowRawToDpsCoefficient = 0x00150000,
GetGyroscopeLowCalibrateParam = 0x00160000
GetGyroscopeLowCalibrateParam = 0x00160000,
GetSoundVolume = 0x00170000,
};
}
@ -46,6 +47,7 @@ void HIDService::handleSyncRequest(u32 messagePointer) {
case HIDCommands::GetGyroscopeLowCalibrateParam: getGyroscopeLowCalibrateParam(messagePointer); break;
case HIDCommands::GetGyroscopeLowRawToDpsCoefficient: getGyroscopeCoefficient(messagePointer); break;
case HIDCommands::GetIPCHandles: getIPCHandles(messagePointer); break;
case HIDCommands::GetSoundVolume: getSoundVolume(messagePointer); break;
default: Helpers::panic("HID service requested. Command: %08X\n", command);
}
}
@ -107,6 +109,18 @@ void HIDService::getGyroscopeCoefficient(u32 messagePointer) {
mem.write32(messagePointer + 8, Helpers::bit_cast<u32, float>(gyroscopeCoeff));
}
// The volume here is in the range [0, 0x3F]
// It is read directly from I2C Device 3 register 0x09
// Since we currently do not have audio, set the volume a bit below max (0x30)
void HIDService::getSoundVolume(u32 messagePointer) {
log("HID::GetSoundVolume\n");
constexpr u8 volume = 0x30;
mem.write32(messagePointer, IPC::responseHeader(0x17, 2, 0));
mem.write32(messagePointer + 4, Result::Success);
mem.write8(messagePointer + 8, volume);
}
void HIDService::getIPCHandles(u32 messagePointer) {
log("HID::GetIPCHandles\n");

@ -1 +1 @@
Subproject commit 963aa9f3e5ce81a4682c6ca3d136cddda614db33
Subproject commit e1caa6186a374758692fb764b811155483742a56