summaryrefslogtreecommitdiff
path: root/src/core/hw/hw.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/hw.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/hw.cpp')
-rw-r--r--src/core/hw/hw.cpp96
1 files changed, 0 insertions, 96 deletions
diff --git a/src/core/hw/hw.cpp b/src/core/hw/hw.cpp
deleted file mode 100644
index 2f48068c1..000000000
--- a/src/core/hw/hw.cpp
+++ /dev/null
@@ -1,96 +0,0 @@
1// Copyright 2014 Citra Emulator Project
2// Licensed under GPLv2 or any later version
3// Refer to the license.txt file included.
4
5#include "common/common_types.h"
6#include "common/logging/log.h"
7#include "core/hw/hw.h"
8#include "core/hw/lcd.h"
9
10namespace HW {
11
12template <typename T>
13inline void Read(T& var, const u32 addr) {
14 switch (addr & 0xFFFFF000) {
15 case VADDR_GPU:
16 case VADDR_GPU + 0x1000:
17 case VADDR_GPU + 0x2000:
18 case VADDR_GPU + 0x3000:
19 case VADDR_GPU + 0x4000:
20 case VADDR_GPU + 0x5000:
21 case VADDR_GPU + 0x6000:
22 case VADDR_GPU + 0x7000:
23 case VADDR_GPU + 0x8000:
24 case VADDR_GPU + 0x9000:
25 case VADDR_GPU + 0xA000:
26 case VADDR_GPU + 0xB000:
27 case VADDR_GPU + 0xC000:
28 case VADDR_GPU + 0xD000:
29 case VADDR_GPU + 0xE000:
30 case VADDR_GPU + 0xF000:
31 break;
32 case VADDR_LCD:
33 LCD::Read(var, addr);
34 break;
35 default:
36 LOG_ERROR(HW_Memory, "Unknown Read{} @ 0x{:08X}", sizeof(var) * 8, addr);
37 break;
38 }
39}
40
41template <typename T>
42inline void Write(u32 addr, const T data) {
43 switch (addr & 0xFFFFF000) {
44 case VADDR_GPU:
45 case VADDR_GPU + 0x1000:
46 case VADDR_GPU + 0x2000:
47 case VADDR_GPU + 0x3000:
48 case VADDR_GPU + 0x4000:
49 case VADDR_GPU + 0x5000:
50 case VADDR_GPU + 0x6000:
51 case VADDR_GPU + 0x7000:
52 case VADDR_GPU + 0x8000:
53 case VADDR_GPU + 0x9000:
54 case VADDR_GPU + 0xA000:
55 case VADDR_GPU + 0xB000:
56 case VADDR_GPU + 0xC000:
57 case VADDR_GPU + 0xD000:
58 case VADDR_GPU + 0xE000:
59 case VADDR_GPU + 0xF000:
60 break;
61 case VADDR_LCD:
62 LCD::Write(addr, data);
63 break;
64 default:
65 LOG_ERROR(HW_Memory, "Unknown Write{} 0x{:08X} @ 0x{:08X}", sizeof(data) * 8, data, addr);
66 break;
67 }
68}
69
70// Explicitly instantiate template functions because we aren't defining this in the header:
71
72template void Read<u64>(u64& var, const u32 addr);
73template void Read<u32>(u32& var, const u32 addr);
74template void Read<u16>(u16& var, const u32 addr);
75template void Read<u8>(u8& var, const u32 addr);
76
77template void Write<u64>(u32 addr, const u64 data);
78template void Write<u32>(u32 addr, const u32 data);
79template void Write<u16>(u32 addr, const u16 data);
80template void Write<u8>(u32 addr, const u8 data);
81
82/// Update hardware
83void Update() {}
84
85/// Initialize hardware
86void Init() {
87 LCD::Init();
88 LOG_DEBUG(HW, "Initialized OK");
89}
90
91/// Shutdown hardware
92void Shutdown() {
93 LCD::Shutdown();
94 LOG_DEBUG(HW, "Shutdown OK");
95}
96} // namespace HW