summaryrefslogtreecommitdiff
path: root/src/core/hw/lcd.cpp
diff options
context:
space:
mode:
authorGravatar Lioncash2018-08-02 10:19:15 -0400
committerGravatar Lioncash2018-08-02 10:23:10 -0400
commitc6db1c390b748646d77f38f92529f706eaa6b6ae (patch)
treef3463db5bea2ca134cc4a57215430d7969fb7205 /src/core/hw/lcd.cpp
parentMerge pull request #896 from lioncash/audio-out (diff)
downloadyuzu-c6db1c390b748646d77f38f92529f706eaa6b6ae.tar.gz
yuzu-c6db1c390b748646d77f38f92529f706eaa6b6ae.tar.xz
yuzu-c6db1c390b748646d77f38f92529f706eaa6b6ae.zip
hw: Remove unused files
None of these files are used in any meaningful way. They're just leftovers from citra. Also has the benefit of getting rid of an unused global variable.
Diffstat (limited to 'src/core/hw/lcd.cpp')
-rw-r--r--src/core/hw/lcd.cpp67
1 files changed, 0 insertions, 67 deletions
diff --git a/src/core/hw/lcd.cpp b/src/core/hw/lcd.cpp
deleted file mode 100644
index 0b62174d5..000000000
--- a/src/core/hw/lcd.cpp
+++ /dev/null
@@ -1,67 +0,0 @@
1// Copyright 2015 Citra Emulator Project
2// Licensed under GPLv2 or any later version
3// Refer to the license.txt file included.
4
5#include <cstring>
6#include "common/common_types.h"
7#include "common/logging/log.h"
8#include "core/hw/hw.h"
9#include "core/hw/lcd.h"
10#include "core/tracer/recorder.h"
11
12namespace LCD {
13
14Regs g_regs;
15
16template <typename T>
17inline void Read(T& var, const u32 raw_addr) {
18 u32 addr = raw_addr - HW::VADDR_LCD;
19 u32 index = addr / 4;
20
21 // Reads other than u32 are untested, so I'd rather have them abort than silently fail
22 if (index >= 0x400 || !std::is_same<T, u32>::value) {
23 LOG_ERROR(HW_LCD, "Unknown Read{} @ 0x{:08X}", sizeof(var) * 8, addr);
24 return;
25 }
26
27 var = g_regs[index];
28}
29
30template <typename T>
31inline void Write(u32 addr, const T data) {
32 addr -= HW::VADDR_LCD;
33 u32 index = addr / 4;
34
35 // Writes other than u32 are untested, so I'd rather have them abort than silently fail
36 if (index >= 0x400 || !std::is_same<T, u32>::value) {
37 LOG_ERROR(HW_LCD, "Unknown Write{} 0x{:08X} @ 0x{:08X}", sizeof(data) * 8, data, addr);
38 return;
39 }
40
41 g_regs[index] = static_cast<u32>(data);
42}
43
44// Explicitly instantiate template functions because we aren't defining this in the header:
45
46template void Read<u64>(u64& var, const u32 addr);
47template void Read<u32>(u32& var, const u32 addr);
48template void Read<u16>(u16& var, const u32 addr);
49template void Read<u8>(u8& var, const u32 addr);
50
51template void Write<u64>(u32 addr, const u64 data);
52template void Write<u32>(u32 addr, const u32 data);
53template void Write<u16>(u32 addr, const u16 data);
54template void Write<u8>(u32 addr, const u8 data);
55
56/// Initialize hardware
57void Init() {
58 memset(&g_regs, 0, sizeof(g_regs));
59 LOG_DEBUG(HW_LCD, "Initialized OK");
60}
61
62/// Shutdown hardware
63void Shutdown() {
64 LOG_DEBUG(HW_LCD, "Shutdown OK");
65}
66
67} // namespace LCD