From 2016ea50df109ae057e12feb5b2e5968407ade7f Mon Sep 17 00:00:00 2001 From: ownedbywuigi Date: Tue, 8 Jul 2025 06:06:30 +0100 Subject: [PATCH] PROGRESS YAY --- common/common_types.h | 53 ++++++++++++++++++++++++++++++++++++++++++ common/fs/fs_util.h | 2 +- common/fs/path_util.h | 2 +- core/fs/card_image.cpp | 2 +- 4 files changed, 56 insertions(+), 3 deletions(-) create mode 100755 common/common_types.h diff --git a/common/common_types.h b/common/common_types.h new file mode 100755 index 0000000..ae04c4d --- /dev/null +++ b/common/common_types.h @@ -0,0 +1,53 @@ +// SPDX-FileCopyrightText: 2012 Gekko Emulator +// SPDX-FileContributor: ShizZy +// SPDX-License-Identifier: GPL-2.0-or-later + +/** + * Copyright (C) 2005-2012 Gekko Emulator + * + * @file common_types.h + * @author ShizZy + * @date 2012-02-11 + * @brief Common types used throughout the project + * + * @section LICENSE + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details at + * http://www.gnu.org/copyleft/gpl.html + * + * Official project repository can be found at: + * http://code.google.com/p/gekko-gc-emu/ + */ + +#pragma once + +#include +#include + +using u8 = std::uint8_t; ///< 8-bit unsigned byte +using u16 = std::uint16_t; ///< 16-bit unsigned short +using u32 = std::uint32_t; ///< 32-bit unsigned word +using u64 = std::uint64_t; ///< 64-bit unsigned int + +using s8 = std::int8_t; ///< 8-bit signed byte +using s16 = std::int16_t; ///< 16-bit signed short +using s32 = std::int32_t; ///< 32-bit signed word +using s64 = std::int64_t; ///< 64-bit signed int + +using f32 = float; ///< 32-bit floating point +using f64 = double; ///< 64-bit floating point + +using VAddr = u64; ///< Represents a pointer in the userspace virtual address space. +using DAddr = u64; ///< Represents a pointer in the device specific virtual address space. +using PAddr = u64; ///< Represents a pointer in the ARM11 physical address space. +using GPUVAddr = u64; ///< Represents a pointer in the GPU virtual address space. + +using u128 = std::array; +static_assert(sizeof(u128) == 16, "u128 must be 128 bits wide"); diff --git a/common/fs/fs_util.h b/common/fs/fs_util.h index 2492a9f..a028f7c 100755 --- a/common/fs/fs_util.h +++ b/common/fs/fs_util.h @@ -8,7 +8,7 @@ #include #include -#include "common/common_types.h" +#include "../common/common_types.h" namespace Common::FS { diff --git a/common/fs/path_util.h b/common/fs/path_util.h index 59301e7..a3b2083 100755 --- a/common/fs/path_util.h +++ b/common/fs/path_util.h @@ -6,7 +6,7 @@ #include #include -#include "common/fs/fs_util.h" +#include "fs_util.h" namespace Common::FS { diff --git a/core/fs/card_image.cpp b/core/fs/card_image.cpp index dc1c7cb..293dcbe 100644 --- a/core/fs/card_image.cpp +++ b/core/fs/card_image.cpp @@ -6,7 +6,7 @@ #include #include -#include +#include #include "common/logging/log.h" #include "core/crypto/key_manager.h"