summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service
diff options
context:
space:
mode:
authorliamwhite <liamwhite@users.noreply.github.com>2023-03-23 15:00:19 +0100
committerGitHub <noreply@github.com>2023-03-23 15:00:19 +0100
commitc41a4baf06efe935f08331bc6f8ff6d80dc088f5 (patch)
treea6580d41bd440b240b2f60db38fdeec60fca2eff /src/core/hle/service
parentMerge pull request #9962 from Kelebek1/disable_srgb (diff)
parentkernel: use KTypedAddress for addresses (diff)
downloadyuzu-c41a4baf06efe935f08331bc6f8ff6d80dc088f5.tar
yuzu-c41a4baf06efe935f08331bc6f8ff6d80dc088f5.tar.gz
yuzu-c41a4baf06efe935f08331bc6f8ff6d80dc088f5.tar.bz2
yuzu-c41a4baf06efe935f08331bc6f8ff6d80dc088f5.tar.lz
yuzu-c41a4baf06efe935f08331bc6f8ff6d80dc088f5.tar.xz
yuzu-c41a4baf06efe935f08331bc6f8ff6d80dc088f5.tar.zst
yuzu-c41a4baf06efe935f08331bc6f8ff6d80dc088f5.zip
Diffstat (limited to 'src/core/hle/service')
-rw-r--r--src/core/hle/service/hid/controllers/console_sixaxis.cpp2
-rw-r--r--src/core/hle/service/hid/controllers/console_sixaxis.h6
-rw-r--r--src/core/hle/service/hid/controllers/palma.cpp2
-rw-r--r--src/core/hle/service/hid/controllers/palma.h6
-rw-r--r--src/core/hle/service/hid/hidbus/hidbus_base.cpp2
-rw-r--r--src/core/hle/service/hid/hidbus/hidbus_base.h6
-rw-r--r--src/core/hle/service/hid/irsensor/image_transfer_processor.cpp2
-rw-r--r--src/core/hle/service/hid/irsensor/image_transfer_processor.h6
-rw-r--r--src/core/hle/service/jit/jit.cpp6
-rw-r--r--src/core/hle/service/ldr/ldr.cpp5
10 files changed, 22 insertions, 21 deletions
diff --git a/src/core/hle/service/hid/controllers/console_sixaxis.cpp b/src/core/hle/service/hid/controllers/console_sixaxis.cpp
index 478d38590..37f2e4405 100644
--- a/src/core/hle/service/hid/controllers/console_sixaxis.cpp
+++ b/src/core/hle/service/hid/controllers/console_sixaxis.cpp
@@ -63,7 +63,7 @@ void Controller_ConsoleSixAxis::OnUpdate(const Core::Timing::CoreTiming& core_ti
system.Memory().WriteBlock(transfer_memory, &seven_sixaxis_lifo, sizeof(seven_sixaxis_lifo));
}
-void Controller_ConsoleSixAxis::SetTransferMemoryAddress(VAddr t_mem) {
+void Controller_ConsoleSixAxis::SetTransferMemoryAddress(Common::ProcessAddress t_mem) {
transfer_memory = t_mem;
}
diff --git a/src/core/hle/service/hid/controllers/console_sixaxis.h b/src/core/hle/service/hid/controllers/console_sixaxis.h
index 8d3e4081b..7015d924c 100644
--- a/src/core/hle/service/hid/controllers/console_sixaxis.h
+++ b/src/core/hle/service/hid/controllers/console_sixaxis.h
@@ -5,8 +5,8 @@
#include <array>
-#include "common/common_types.h"
#include "common/quaternion.h"
+#include "common/typed_address.h"
#include "core/hle/service/hid/controllers/controller_base.h"
#include "core/hle/service/hid/ring_lifo.h"
@@ -34,7 +34,7 @@ public:
void OnUpdate(const Core::Timing::CoreTiming& core_timing) override;
// Called on InitializeSevenSixAxisSensor
- void SetTransferMemoryAddress(VAddr t_mem);
+ void SetTransferMemoryAddress(Common::ProcessAddress t_mem);
// Called on ResetSevenSixAxisSensorTimestamp
void ResetTimestamp();
@@ -66,7 +66,7 @@ private:
static_assert(sizeof(seven_sixaxis_lifo) == 0xA70, "SevenSixAxisState is an invalid size");
SevenSixAxisState next_seven_sixaxis_state{};
- VAddr transfer_memory{};
+ Common::ProcessAddress transfer_memory{};
ConsoleSharedMemory* shared_memory = nullptr;
Core::HID::EmulatedConsole* console = nullptr;
diff --git a/src/core/hle/service/hid/controllers/palma.cpp b/src/core/hle/service/hid/controllers/palma.cpp
index bce51285c..14c67e454 100644
--- a/src/core/hle/service/hid/controllers/palma.cpp
+++ b/src/core/hle/service/hid/controllers/palma.cpp
@@ -152,7 +152,7 @@ Result Controller_Palma::WritePalmaRgbLedPatternEntry(const PalmaConnectionHandl
}
Result Controller_Palma::WritePalmaWaveEntry(const PalmaConnectionHandle& handle, PalmaWaveSet wave,
- VAddr t_mem, u64 size) {
+ Common::ProcessAddress t_mem, u64 size) {
if (handle.npad_id != active_handle.npad_id) {
return InvalidPalmaHandle;
}
diff --git a/src/core/hle/service/hid/controllers/palma.h b/src/core/hle/service/hid/controllers/palma.h
index cf62f0dbc..a0491a819 100644
--- a/src/core/hle/service/hid/controllers/palma.h
+++ b/src/core/hle/service/hid/controllers/palma.h
@@ -5,7 +5,7 @@
#include <array>
#include "common/common_funcs.h"
-#include "common/common_types.h"
+#include "common/typed_address.h"
#include "core/hle/service/hid/controllers/controller_base.h"
#include "core/hle/service/hid/errors.h"
@@ -125,8 +125,8 @@ public:
Result ReadPalmaUniqueCode(const PalmaConnectionHandle& handle);
Result SetPalmaUniqueCodeInvalid(const PalmaConnectionHandle& handle);
Result WritePalmaRgbLedPatternEntry(const PalmaConnectionHandle& handle, u64 unknown);
- Result WritePalmaWaveEntry(const PalmaConnectionHandle& handle, PalmaWaveSet wave, VAddr t_mem,
- u64 size);
+ Result WritePalmaWaveEntry(const PalmaConnectionHandle& handle, PalmaWaveSet wave,
+ Common::ProcessAddress t_mem, u64 size);
Result SetPalmaDataBaseIdentificationVersion(const PalmaConnectionHandle& handle,
s32 database_id_version_);
Result GetPalmaDataBaseIdentificationVersion(const PalmaConnectionHandle& handle);
diff --git a/src/core/hle/service/hid/hidbus/hidbus_base.cpp b/src/core/hle/service/hid/hidbus/hidbus_base.cpp
index dfd23ec04..ee522c36e 100644
--- a/src/core/hle/service/hid/hidbus/hidbus_base.cpp
+++ b/src/core/hle/service/hid/hidbus/hidbus_base.cpp
@@ -59,7 +59,7 @@ void HidbusBase::DisablePollingMode() {
polling_mode_enabled = false;
}
-void HidbusBase::SetTransferMemoryAddress(VAddr t_mem) {
+void HidbusBase::SetTransferMemoryAddress(Common::ProcessAddress t_mem) {
transfer_memory = t_mem;
}
diff --git a/src/core/hle/service/hid/hidbus/hidbus_base.h b/src/core/hle/service/hid/hidbus/hidbus_base.h
index 26313264d..ec41684e1 100644
--- a/src/core/hle/service/hid/hidbus/hidbus_base.h
+++ b/src/core/hle/service/hid/hidbus/hidbus_base.h
@@ -5,7 +5,7 @@
#include <array>
#include <span>
-#include "common/common_types.h"
+#include "common/typed_address.h"
#include "core/hle/result.h"
namespace Core {
@@ -138,7 +138,7 @@ public:
void DisablePollingMode();
// Called on EnableJoyPollingReceiveMode
- void SetTransferMemoryAddress(VAddr t_mem);
+ void SetTransferMemoryAddress(Common::ProcessAddress t_mem);
Kernel::KReadableEvent& GetSendCommandAsycEvent() const;
@@ -174,7 +174,7 @@ protected:
JoyEnableSixAxisDataAccessor enable_sixaxis_data{};
ButtonOnlyPollingDataAccessor button_only_data{};
- VAddr transfer_memory{};
+ Common::ProcessAddress transfer_memory{};
Core::System& system;
Kernel::KEvent* send_command_async_event;
diff --git a/src/core/hle/service/hid/irsensor/image_transfer_processor.cpp b/src/core/hle/service/hid/irsensor/image_transfer_processor.cpp
index a268750cd..ca5d067e8 100644
--- a/src/core/hle/service/hid/irsensor/image_transfer_processor.cpp
+++ b/src/core/hle/service/hid/irsensor/image_transfer_processor.cpp
@@ -140,7 +140,7 @@ void ImageTransferProcessor::SetConfig(
npad_device->SetCameraFormat(current_config.origin_format);
}
-void ImageTransferProcessor::SetTransferMemoryAddress(VAddr t_mem) {
+void ImageTransferProcessor::SetTransferMemoryAddress(Common::ProcessAddress t_mem) {
transfer_memory = t_mem;
}
diff --git a/src/core/hle/service/hid/irsensor/image_transfer_processor.h b/src/core/hle/service/hid/irsensor/image_transfer_processor.h
index 7cfe04c8c..7f42d8453 100644
--- a/src/core/hle/service/hid/irsensor/image_transfer_processor.h
+++ b/src/core/hle/service/hid/irsensor/image_transfer_processor.h
@@ -3,7 +3,7 @@
#pragma once
-#include "common/common_types.h"
+#include "common/typed_address.h"
#include "core/hid/irs_types.h"
#include "core/hle/service/hid/irsensor/processor_base.h"
@@ -37,7 +37,7 @@ public:
void SetConfig(Core::IrSensor::PackedImageTransferProcessorExConfig config);
// Transfer memory where the image data will be stored
- void SetTransferMemoryAddress(VAddr t_mem);
+ void SetTransferMemoryAddress(Common::ProcessAddress t_mem);
Core::IrSensor::ImageTransferProcessorState GetState(std::vector<u8>& data) const;
@@ -72,6 +72,6 @@ private:
int callback_key{};
Core::System& system;
- VAddr transfer_memory{};
+ Common::ProcessAddress transfer_memory{};
};
} // namespace Service::IRS
diff --git a/src/core/hle/service/jit/jit.cpp b/src/core/hle/service/jit/jit.cpp
index 46bcfd695..607f27b21 100644
--- a/src/core/hle/service/jit/jit.cpp
+++ b/src/core/hle/service/jit/jit.cpp
@@ -195,7 +195,7 @@ public:
}
// Set up the configuration with the required TransferMemory address
- configuration.transfer_memory.offset = tmem->GetSourceAddress();
+ configuration.transfer_memory.offset = GetInteger(tmem->GetSourceAddress());
configuration.transfer_memory.size = tmem_size;
// Gather up all the callbacks from the loaded plugin
@@ -383,12 +383,12 @@ public:
}
const CodeRange user_rx{
- .offset = rx_mem->GetSourceAddress(),
+ .offset = GetInteger(rx_mem->GetSourceAddress()),
.size = parameters.rx_size,
};
const CodeRange user_ro{
- .offset = ro_mem->GetSourceAddress(),
+ .offset = GetInteger(ro_mem->GetSourceAddress()),
.size = parameters.ro_size,
};
diff --git a/src/core/hle/service/ldr/ldr.cpp b/src/core/hle/service/ldr/ldr.cpp
index 6de96ed5b..437dc2ea5 100644
--- a/src/core/hle/service/ldr/ldr.cpp
+++ b/src/core/hle/service/ldr/ldr.cpp
@@ -337,7 +337,7 @@ public:
bool succeeded = false;
const auto map_region_end =
- page_table.GetAliasCodeRegionStart() + page_table.GetAliasCodeRegionSize();
+ GetInteger(page_table.GetAliasCodeRegionStart()) + page_table.GetAliasCodeRegionSize();
while (current_map_addr < map_region_end) {
if (is_region_available(current_map_addr)) {
succeeded = true;
@@ -642,7 +642,8 @@ public:
LOG_WARNING(Service_LDR, "(STUBBED) called");
initialized = true;
- current_map_addr = system.ApplicationProcess()->PageTable().GetAliasCodeRegionStart();
+ current_map_addr =
+ GetInteger(system.ApplicationProcess()->PageTable().GetAliasCodeRegionStart());
IPC::ResponseBuilder rb{ctx, 2};
rb.Push(ResultSuccess);