From 70c2cce963264678b5ba5b6aa17c2653bf459e61 Mon Sep 17 00:00:00 2001 From: bunnei Date: Thu, 17 Apr 2014 23:48:23 -0400 Subject: renamed hw_lcd module to just lcd --- src/core/core.vcxproj | 4 ++-- src/core/core.vcxproj.filters | 12 +++++------ src/core/hle/syscall.cpp | 2 -- src/core/hw/hw.cpp | 2 +- src/core/hw/hw_lcd.cpp | 48 ------------------------------------------- src/core/hw/hw_lcd.h | 44 --------------------------------------- src/core/hw/lcd.cpp | 48 +++++++++++++++++++++++++++++++++++++++++++ src/core/hw/lcd.h | 44 +++++++++++++++++++++++++++++++++++++++ 8 files changed, 101 insertions(+), 103 deletions(-) delete mode 100644 src/core/hw/hw_lcd.cpp delete mode 100644 src/core/hw/hw_lcd.h create mode 100644 src/core/hw/lcd.cpp create mode 100644 src/core/hw/lcd.h (limited to 'src/core') diff --git a/src/core/core.vcxproj b/src/core/core.vcxproj index 80bd75eeb..b6fc604c6 100644 --- a/src/core/core.vcxproj +++ b/src/core/core.vcxproj @@ -160,7 +160,7 @@ - + @@ -199,7 +199,7 @@ - + diff --git a/src/core/core.vcxproj.filters b/src/core/core.vcxproj.filters index 61cb6e405..ff7877feb 100644 --- a/src/core/core.vcxproj.filters +++ b/src/core/core.vcxproj.filters @@ -69,9 +69,6 @@ hw - - hw - elf @@ -105,6 +102,9 @@ hw + + hw + @@ -161,9 +161,6 @@ hw - - hw - elf @@ -205,6 +202,9 @@ hw + + hw + diff --git a/src/core/hle/syscall.cpp b/src/core/hle/syscall.cpp index 0cb563955..e5533a741 100644 --- a/src/core/hle/syscall.cpp +++ b/src/core/hle/syscall.cpp @@ -6,8 +6,6 @@ #include "core/mem_map.h" -#include "core/hw/hw_lcd.h" - #include "core/hle/function_wrappers.h" #include "core/hle/syscall.h" #include "core/hle/service/service.h" diff --git a/src/core/hw/hw.cpp b/src/core/hw/hw.cpp index 1f240f09c..16bd70125 100644 --- a/src/core/hw/hw.cpp +++ b/src/core/hw/hw.cpp @@ -6,7 +6,7 @@ #include "common/log.h" #include "core/hw/hw.h" -#include "core/hw/hw_lcd.h" +#include "core/hw/lcd.h" #include "core/hw/ndma.h" namespace HW { diff --git a/src/core/hw/hw_lcd.cpp b/src/core/hw/hw_lcd.cpp deleted file mode 100644 index 9fb485bac..000000000 --- a/src/core/hw/hw_lcd.cpp +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright 2014 Citra Emulator Project -// Licensed under GPLv2 -// Refer to the license.txt file included. - -#include "common/common_types.h" -#include "common/log.h" - -#include "core/core.h" -#include "core/hw/hw_lcd.h" - -#include "video_core/video_core.h" - -namespace LCD { - -static const u32 kFrameTicks = 268123480 / 60; ///< 268MHz / 60 frames per second - -u64 g_last_ticks = 0; ///< Last CPU ticks - -template -inline void Read(T &var, const u32 addr) { -} - -template -inline void Write(u32 addr, const T data) { -} - -/// Update hardware -void Update() { - u64 current_ticks = Core::g_app_core->GetTicks(); - - if ((current_ticks - g_last_ticks) >= kFrameTicks) { - g_last_ticks = current_ticks; - VideoCore::g_renderer->SwapBuffers(); - } -} - -/// Initialize hardware -void Init() { - g_last_ticks = Core::g_app_core->GetTicks(); - NOTICE_LOG(LCD, "initialized OK"); -} - -/// Shutdown hardware -void Shutdown() { - NOTICE_LOG(LCD, "shutdown OK"); -} - -} // namespace diff --git a/src/core/hw/hw_lcd.h b/src/core/hw/hw_lcd.h deleted file mode 100644 index 386ed6004..000000000 --- a/src/core/hw/hw_lcd.h +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright 2014 Citra Emulator Project -// Licensed under GPLv2 -// Refer to the license.txt file included. - -#pragma once - -#include "common/common_types.h" - -namespace LCD { - -enum { - TOP_ASPECT_X = 0x5, - TOP_ASPECT_Y = 0x3, - - TOP_HEIGHT = 240, - TOP_WIDTH = 400, - BOTTOM_WIDTH = 320, - - FRAMEBUFFER_SEL = 0x20184E59, - TOP_LEFT_FRAME1 = 0x20184E60, - TOP_LEFT_FRAME2 = 0x201CB370, - TOP_RIGHT_FRAME1 = 0x20282160, - TOP_RIGHT_FRAME2 = 0x202C8670, - SUB_FRAME1 = 0x202118E0, - SUB_FRAME2 = 0x20249CF0, -}; - -template -inline void Read(T &var, const u32 addr); - -template -inline void Write(u32 addr, const T data); - -/// Update hardware -void Update(); - -/// Initialize hardware -void Init(); - -/// Shutdown hardware -void Shutdown(); - - -} // namespace diff --git a/src/core/hw/lcd.cpp b/src/core/hw/lcd.cpp new file mode 100644 index 000000000..3013673f8 --- /dev/null +++ b/src/core/hw/lcd.cpp @@ -0,0 +1,48 @@ +// Copyright 2014 Citra Emulator Project +// Licensed under GPLv2 +// Refer to the license.txt file included. + +#include "common/common_types.h" +#include "common/log.h" + +#include "core/core.h" +#include "core/hw/lcd.h" + +#include "video_core/video_core.h" + +namespace LCD { + +static const u32 kFrameTicks = 268123480 / 60; ///< 268MHz / 60 frames per second + +u64 g_last_ticks = 0; ///< Last CPU ticks + +template +inline void Read(T &var, const u32 addr) { +} + +template +inline void Write(u32 addr, const T data) { +} + +/// Update hardware +void Update() { + u64 current_ticks = Core::g_app_core->GetTicks(); + + if ((current_ticks - g_last_ticks) >= kFrameTicks) { + g_last_ticks = current_ticks; + VideoCore::g_renderer->SwapBuffers(); + } +} + +/// Initialize hardware +void Init() { + g_last_ticks = Core::g_app_core->GetTicks(); + NOTICE_LOG(LCD, "initialized OK"); +} + +/// Shutdown hardware +void Shutdown() { + NOTICE_LOG(LCD, "shutdown OK"); +} + +} // namespace diff --git a/src/core/hw/lcd.h b/src/core/hw/lcd.h new file mode 100644 index 000000000..386ed6004 --- /dev/null +++ b/src/core/hw/lcd.h @@ -0,0 +1,44 @@ +// Copyright 2014 Citra Emulator Project +// Licensed under GPLv2 +// Refer to the license.txt file included. + +#pragma once + +#include "common/common_types.h" + +namespace LCD { + +enum { + TOP_ASPECT_X = 0x5, + TOP_ASPECT_Y = 0x3, + + TOP_HEIGHT = 240, + TOP_WIDTH = 400, + BOTTOM_WIDTH = 320, + + FRAMEBUFFER_SEL = 0x20184E59, + TOP_LEFT_FRAME1 = 0x20184E60, + TOP_LEFT_FRAME2 = 0x201CB370, + TOP_RIGHT_FRAME1 = 0x20282160, + TOP_RIGHT_FRAME2 = 0x202C8670, + SUB_FRAME1 = 0x202118E0, + SUB_FRAME2 = 0x20249CF0, +}; + +template +inline void Read(T &var, const u32 addr); + +template +inline void Write(u32 addr, const T data); + +/// Update hardware +void Update(); + +/// Initialize hardware +void Init(); + +/// Shutdown hardware +void Shutdown(); + + +} // namespace -- cgit v1.2.3