From 7b8e5215de7d8f6bb00d7e2f832c9e2cf0b7eda5 Mon Sep 17 00:00:00 2001 From: louist103 <35883445+louist103@users.noreply.github.com> Date: Mon, 6 May 2024 21:05:54 -0400 Subject: [PATCH] Remove math related to macros (#560) --- include/libultraship/libultra/convert.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/libultraship/libultra/convert.h b/include/libultraship/libultra/convert.h index eb01625..3a9fda1 100644 --- a/include/libultraship/libultra/convert.h +++ b/include/libultraship/libultra/convert.h @@ -9,10 +9,10 @@ #define OS_CYCLES_TO_NSEC(c) (((u64)(c) * (1000000000LL / 15625000LL)) / (OS_CPU_COUNTER / 15625000LL)) #define OS_CYCLES_TO_USEC(c) (((u64)(c) * (1000000LL / 15625LL)) / (OS_CPU_COUNTER / 15625LL)) -#define OS_K0_TO_PHYSICAL(x) (u32)(((char*)(x)-0x80000000)) -#define OS_K1_TO_PHYSICAL(x) (0) //(u32)(((char*)(x)-0xA0000000)) +#define OS_K0_TO_PHYSICAL(x) (x) +#define OS_K1_TO_PHYSICAL(x) (x) -#define OS_PHYSICAL_TO_K0(x) (void*)(((u32)(x) + 0x80000000)) -#define OS_PHYSICAL_TO_K1(x) (void*)(((u32)(x) + 0xA0000000)) +#define OS_PHYSICAL_TO_K0(x) (x) +#define OS_PHYSICAL_TO_K1(x) (x) #endif