diff options
| author | 2013-09-05 18:33:46 -0400 | |
|---|---|---|
| committer | 2013-09-05 18:33:46 -0400 | |
| commit | d708e2d68a53524ea40e86ebd6157adbdb5b8712 (patch) | |
| tree | 72cc34d42cdd50667ed6cf79e2a5ae5a28df04a7 /src | |
| parent | added ipch/ folder (MSVS generated) to .gitignore (diff) | |
| download | yuzu-d708e2d68a53524ea40e86ebd6157adbdb5b8712.tar.gz yuzu-d708e2d68a53524ea40e86ebd6157adbdb5b8712.tar.xz yuzu-d708e2d68a53524ea40e86ebd6157adbdb5b8712.zip | |
added core and mem_map files to the project
Diffstat (limited to 'src')
| -rw-r--r-- | src/akiru/src/akiru.h | 24 | ||||
| -rw-r--r-- | src/core/core.vcxproj | 3 | ||||
| -rw-r--r-- | src/core/core.vcxproj.filters | 3 | ||||
| -rw-r--r-- | src/core/src/core.cpp | 48 | ||||
| -rw-r--r-- | src/core/src/core.h | 70 | ||||
| -rw-r--r-- | src/core/src/mem_map.cpp | 52 | ||||
| -rw-r--r-- | src/core/src/mem_map.h | 58 |
7 files changed, 244 insertions, 14 deletions
diff --git a/src/akiru/src/akiru.h b/src/akiru/src/akiru.h index a3b210922..4752b961e 100644 --- a/src/akiru/src/akiru.h +++ b/src/akiru/src/akiru.h | |||
| @@ -1,12 +1,12 @@ | |||
| 1 | /*! | 1 | /** |
| 2 | * Copyright (C) 2005-2012 Gekko Emulator | 2 | * Copyright (C) 2013 Akiru Emulator |
| 3 | * | 3 | * |
| 4 | * \file pcafe.h | 4 | * @file akiru.cpp |
| 5 | * \author ShizZy <shizzy247@gmail.com> | 5 | * @author ShizZy <shizzy247@gmail.com> |
| 6 | * \date 2012-02-11 | 6 | * @date 2013-09-04 |
| 7 | * \brief Main entry point | 7 | * @brief Main entry point |
| 8 | * | 8 | * |
| 9 | * \section LICENSE | 9 | * @section LICENSE |
| 10 | * This program is free software; you can redistribute it and/or | 10 | * This program is free software; you can redistribute it and/or |
| 11 | * modify it under the terms of the GNU General Public License as | 11 | * modify it under the terms of the GNU General Public License as |
| 12 | * published by the Free Software Foundation; either version 2 of | 12 | * published by the Free Software Foundation; either version 2 of |
| @@ -22,14 +22,14 @@ | |||
| 22 | * http://code.google.com/p/gekko-gc-emu/ | 22 | * http://code.google.com/p/gekko-gc-emu/ |
| 23 | */ | 23 | */ |
| 24 | 24 | ||
| 25 | #ifndef PCAFE_PCAFE_H_ | 25 | #ifndef AKIRU_AKIRU_H_ |
| 26 | #define PCAFE_PCAFE_H_ | 26 | #define AKIRU_AKIRU_H_ |
| 27 | 27 | ||
| 28 | #include "version.h" | 28 | #include "version.h" |
| 29 | 29 | ||
| 30 | #define APP_NAME "gekko" | 30 | #define APP_NAME "akiru" |
| 31 | #define APP_VERSION "0.31-" VERSION | 31 | #define APP_VERSION "0.31-" VERSION |
| 32 | #define APP_TITLE APP_NAME " " APP_VERSION | 32 | #define APP_TITLE APP_NAME " " APP_VERSION |
| 33 | #define COPYRIGHT "Copyright (C) 2005-2012 Gekko Team" | 33 | #define COPYRIGHT "Copyright (C) 2005-2012 Akiru Team" |
| 34 | 34 | ||
| 35 | #endif // PCAFE_PCAFE_H_ \ No newline at end of file | 35 | #endif // AKIRU_AKIRU_H_ |
diff --git a/src/core/core.vcxproj b/src/core/core.vcxproj index b413beba9..cd167af47 100644 --- a/src/core/core.vcxproj +++ b/src/core/core.vcxproj | |||
| @@ -183,9 +183,12 @@ | |||
| 183 | <ItemGroup> | 183 | <ItemGroup> |
| 184 | <ClCompile Include="src\arm\disassembler\arm_disasm.cpp" /> | 184 | <ClCompile Include="src\arm\disassembler\arm_disasm.cpp" /> |
| 185 | <ClCompile Include="src\core.cpp" /> | 185 | <ClCompile Include="src\core.cpp" /> |
| 186 | <ClCompile Include="src\mem_map.cpp" /> | ||
| 186 | </ItemGroup> | 187 | </ItemGroup> |
| 187 | <ItemGroup> | 188 | <ItemGroup> |
| 188 | <ClInclude Include="src\arm\disassembler\arm_disasm.h" /> | 189 | <ClInclude Include="src\arm\disassembler\arm_disasm.h" /> |
| 190 | <ClInclude Include="src\core.h" /> | ||
| 191 | <ClInclude Include="src\mem_map.h" /> | ||
| 189 | </ItemGroup> | 192 | </ItemGroup> |
| 190 | <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> | 193 | <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> |
| 191 | <ImportGroup Label="ExtensionTargets"> | 194 | <ImportGroup Label="ExtensionTargets"> |
diff --git a/src/core/core.vcxproj.filters b/src/core/core.vcxproj.filters index 3c0ae8786..9d981b995 100644 --- a/src/core/core.vcxproj.filters +++ b/src/core/core.vcxproj.filters | |||
| @@ -5,6 +5,7 @@ | |||
| 5 | <ClCompile Include="src\arm\disassembler\arm_disasm.cpp"> | 5 | <ClCompile Include="src\arm\disassembler\arm_disasm.cpp"> |
| 6 | <Filter>arm\disassembler</Filter> | 6 | <Filter>arm\disassembler</Filter> |
| 7 | </ClCompile> | 7 | </ClCompile> |
| 8 | <ClCompile Include="src\mem_map.cpp" /> | ||
| 8 | </ItemGroup> | 9 | </ItemGroup> |
| 9 | <ItemGroup> | 10 | <ItemGroup> |
| 10 | <Filter Include="arm"> | 11 | <Filter Include="arm"> |
| @@ -18,5 +19,7 @@ | |||
| 18 | <ClInclude Include="src\arm\disassembler\arm_disasm.h"> | 19 | <ClInclude Include="src\arm\disassembler\arm_disasm.h"> |
| 19 | <Filter>arm\disassembler</Filter> | 20 | <Filter>arm\disassembler</Filter> |
| 20 | </ClInclude> | 21 | </ClInclude> |
| 22 | <ClInclude Include="src\mem_map.h" /> | ||
| 23 | <ClInclude Include="src\core.h" /> | ||
| 21 | </ItemGroup> | 24 | </ItemGroup> |
| 22 | </Project> \ No newline at end of file | 25 | </Project> \ No newline at end of file |
diff --git a/src/core/src/core.cpp b/src/core/src/core.cpp index b5ac85648..4e956fde3 100644 --- a/src/core/src/core.cpp +++ b/src/core/src/core.cpp | |||
| @@ -1,2 +1,46 @@ | |||
| 1 | void null() { | 1 | /** |
| 2 | } \ No newline at end of file | 2 | * Copyright (C) 2013 Akiru Emulator |
| 3 | * | ||
| 4 | * @file core.cpp | ||
| 5 | * @author ShizZy <shizzy247@gmail.com> | ||
| 6 | * @date 2013-09-04 | ||
| 7 | * @brief Core of emulator | ||
| 8 | * | ||
| 9 | * @section LICENSE | ||
| 10 | * This program is free software; you can redistribute it and/or | ||
| 11 | * modify it under the terms of the GNU General Public License as | ||
| 12 | * published by the Free Software Foundation; either version 2 of | ||
| 13 | * the License, or (at your option) any later version. | ||
| 14 | * | ||
| 15 | * This program is distributed in the hope that it will be useful, but | ||
| 16 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
| 18 | * General Public License for more details at | ||
| 19 | * http://www.gnu.org/copyleft/gpl.html | ||
| 20 | * | ||
| 21 | * Official project repository can be found at: | ||
| 22 | * http://code.google.com/p/gekko-gc-emu/ | ||
| 23 | */ | ||
| 24 | |||
| 25 | #include "core.h" | ||
| 26 | |||
| 27 | namespace Core { | ||
| 28 | |||
| 29 | /// Start the core | ||
| 30 | void Start() { | ||
| 31 | } | ||
| 32 | |||
| 33 | /// Kill the core | ||
| 34 | void Kill() { | ||
| 35 | } | ||
| 36 | |||
| 37 | /// Stop the core | ||
| 38 | void Stop() { | ||
| 39 | } | ||
| 40 | |||
| 41 | /// Initialize the core | ||
| 42 | int Init(EmuWindow* emu_window) { | ||
| 43 | return 0; | ||
| 44 | } | ||
| 45 | |||
| 46 | } // namespace | ||
diff --git a/src/core/src/core.h b/src/core/src/core.h new file mode 100644 index 000000000..41429e8a3 --- /dev/null +++ b/src/core/src/core.h | |||
| @@ -0,0 +1,70 @@ | |||
| 1 | /** | ||
| 2 | * Copyright (C) 2013 Akiru Emulator | ||
| 3 | * | ||
| 4 | * @file core.h | ||
| 5 | * @author ShizZy <shizzy247@gmail.com> | ||
| 6 | * @date 2013-09-04 | ||
| 7 | * @brief Core of emulator | ||
| 8 | * | ||
| 9 | * @section LICENSE | ||
| 10 | * This program is free software; you can redistribute it and/or | ||
| 11 | * modify it under the terms of the GNU General Public License as | ||
| 12 | * published by the Free Software Foundation; either version 2 of | ||
| 13 | * the License, or (at your option) any later version. | ||
| 14 | * | ||
| 15 | * This program is distributed in the hope that it will be useful, but | ||
| 16 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
| 18 | * General Public License for more details at | ||
| 19 | * http://www.gnu.org/copyleft/gpl.html | ||
| 20 | * | ||
| 21 | * Official project repository can be found at: | ||
| 22 | * http://code.google.com/p/gekko-gc-emu/ | ||
| 23 | */ | ||
| 24 | |||
| 25 | #ifndef CORE_CORE_H_ | ||
| 26 | #define CORE_CORE_H_ | ||
| 27 | |||
| 28 | //////////////////////////////////////////////////////////////////////////////////////////////////// | ||
| 29 | |||
| 30 | #include "common.h" | ||
| 31 | |||
| 32 | //////////////////////////////////////////////////////////////////////////////////////////////////// | ||
| 33 | |||
| 34 | class EmuWindow; | ||
| 35 | |||
| 36 | namespace Core { | ||
| 37 | |||
| 38 | // State of the full emulator | ||
| 39 | typedef enum { | ||
| 40 | SYS_NULL = 0, ///< System is in null state, nothing initialized | ||
| 41 | SYS_IDLE, ///< System is in an initialized state, but not running | ||
| 42 | SYS_RUNNING, ///< System is running | ||
| 43 | SYS_LOADING, ///< System is loading a ROM | ||
| 44 | SYS_HALTED, ///< System is halted (error) | ||
| 45 | SYS_STALLED, ///< System is stalled (unused) | ||
| 46 | SYS_DEBUG, ///< System is in a special debug mode (unused) | ||
| 47 | SYS_DIE ///< System is shutting down | ||
| 48 | } SystemState; | ||
| 49 | |||
| 50 | |||
| 51 | /// Start the core | ||
| 52 | void Start(); | ||
| 53 | |||
| 54 | /// Kill the core | ||
| 55 | void Kill(); | ||
| 56 | |||
| 57 | /// Stop the core | ||
| 58 | void Stop(); | ||
| 59 | |||
| 60 | /// Initialize the core | ||
| 61 | int Init(EmuWindow* emu_window); | ||
| 62 | |||
| 63 | extern SystemState g_state; ///< State of the emulator | ||
| 64 | extern bool g_started; ///< Whether or not the emulator has been started | ||
| 65 | |||
| 66 | } // namespace | ||
| 67 | |||
| 68 | //////////////////////////////////////////////////////////////////////////////////////////////////// | ||
| 69 | |||
| 70 | #endif // CORE_CORE_H_ | ||
diff --git a/src/core/src/mem_map.cpp b/src/core/src/mem_map.cpp new file mode 100644 index 000000000..3ff516cbd --- /dev/null +++ b/src/core/src/mem_map.cpp | |||
| @@ -0,0 +1,52 @@ | |||
| 1 | /** | ||
| 2 | * Copyright (C) 2013 Akiru Emulator | ||
| 3 | * | ||
| 4 | * @file mem_map.cpp | ||
| 5 | * @author ShizZy <shizzy247@gmail.com> | ||
| 6 | * @date 2013-09-05 | ||
| 7 | * @brief Memory map - handles virtual to physical memory access | ||
| 8 | * | ||
| 9 | * @section LICENSE | ||
| 10 | * This program is free software; you can redistribute it and/or | ||
| 11 | * modify it under the terms of the GNU General Public License as | ||
| 12 | * published by the Free Software Foundation; either version 2 of | ||
| 13 | * the License, or (at your option) any later version. | ||
| 14 | * | ||
| 15 | * This program is distributed in the hope that it will be useful, but | ||
| 16 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
| 18 | * General Public License for more details at | ||
| 19 | * http://www.gnu.org/copyleft/gpl.html | ||
| 20 | * | ||
| 21 | * Official project repository can be found at: | ||
| 22 | * http://code.google.com/p/gekko-gc-emu/ | ||
| 23 | */ | ||
| 24 | |||
| 25 | #include "mem_map.h" | ||
| 26 | |||
| 27 | namespace Memory { | ||
| 28 | |||
| 29 | u8 Read8(const u32 addr) { | ||
| 30 | return 0xDE; | ||
| 31 | } | ||
| 32 | |||
| 33 | u16 Read16(const u32 addr) { | ||
| 34 | return 0xDEAD; | ||
| 35 | } | ||
| 36 | |||
| 37 | u32 Read32(const u32 addr) { | ||
| 38 | return 0xDEADBEEF; | ||
| 39 | } | ||
| 40 | |||
| 41 | void Write8(const u32 addr, const u32 data) { | ||
| 42 | } | ||
| 43 | |||
| 44 | void Write16(const u32 addr, const u32 data) { | ||
| 45 | } | ||
| 46 | |||
| 47 | void Write32(const u32 addr, const u32 data) { | ||
| 48 | } | ||
| 49 | |||
| 50 | |||
| 51 | |||
| 52 | } // namespace | ||
diff --git a/src/core/src/mem_map.h b/src/core/src/mem_map.h new file mode 100644 index 000000000..8ef6e58a2 --- /dev/null +++ b/src/core/src/mem_map.h | |||
| @@ -0,0 +1,58 @@ | |||
| 1 | /** | ||
| 2 | * Copyright (C) 2013 Akiru Emulator | ||
| 3 | * | ||
| 4 | * @file mem_map.h | ||
| 5 | * @author ShizZy <shizzy247@gmail.com> | ||
| 6 | * @date 2013-09-05 | ||
| 7 | * @brief Memory map - handles virtual to physical memory access | ||
| 8 | * | ||
| 9 | * @section LICENSE | ||
| 10 | * This program is free software; you can redistribute it and/or | ||
| 11 | * modify it under the terms of the GNU General Public License as | ||
| 12 | * published by the Free Software Foundation; either version 2 of | ||
| 13 | * the License, or (at your option) any later version. | ||
| 14 | * | ||
| 15 | * This program is distributed in the hope that it will be useful, but | ||
| 16 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
| 18 | * General Public License for more details at | ||
| 19 | * http://www.gnu.org/copyleft/gpl.html | ||
| 20 | * | ||
| 21 | * Official project repository can be found at: | ||
| 22 | * http://code.google.com/p/gekko-gc-emu/ | ||
| 23 | */ | ||
| 24 | |||
| 25 | #ifndef CORE_MEM_MAP_H_ | ||
| 26 | #define CORE_MEM_MAP_H_ | ||
| 27 | |||
| 28 | //////////////////////////////////////////////////////////////////////////////////////////////////// | ||
| 29 | |||
| 30 | #include "common.h" | ||
| 31 | #include "common_types.h" | ||
| 32 | |||
| 33 | //////////////////////////////////////////////////////////////////////////////////////////////////// | ||
| 34 | |||
| 35 | namespace Memory { | ||
| 36 | |||
| 37 | extern u8* g_ram; | ||
| 38 | extern u8* g_vram; | ||
| 39 | |||
| 40 | extern u32 g_memory_size; | ||
| 41 | extern u32 g_memory_mask; | ||
| 42 | |||
| 43 | void Init(); | ||
| 44 | void Shutdown(); | ||
| 45 | |||
| 46 | u8 Read8(const u32 addr); | ||
| 47 | u16 Read16(const u32 addr); | ||
| 48 | u32 Read32(const u32 addr); | ||
| 49 | |||
| 50 | void Write8(const u32 addr, const u32 data); | ||
| 51 | void Write16(const u32 addr, const u32 data); | ||
| 52 | void Write32(const u32 addr, const u32 data); | ||
| 53 | |||
| 54 | } // namespace | ||
| 55 | |||
| 56 | //////////////////////////////////////////////////////////////////////////////////////////////////// | ||
| 57 | |||
| 58 | #endif // CORE_MEM_MAP_H_ \ No newline at end of file | ||