diff options
| author | 2014-04-04 22:47:10 -0400 | |
|---|---|---|
| committer | 2014-04-04 22:47:10 -0400 | |
| commit | 590f294d8e66ee534e6ecb475a62b61e5a0dea84 (patch) | |
| tree | 957dc256ac11ad3e2f728c4e1a0db5ac7cd4f498 /src/core | |
| parent | added entry point loading from ELF file (diff) | |
| download | yuzu-590f294d8e66ee534e6ecb475a62b61e5a0dea84.tar.gz yuzu-590f294d8e66ee534e6ecb475a62b61e5a0dea84.tar.xz yuzu-590f294d8e66ee534e6ecb475a62b61e5a0dea84.zip | |
renamed some functions
Diffstat (limited to 'src/core')
| -rw-r--r-- | src/core/src/mem_map_funcs.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/core/src/mem_map_funcs.cpp b/src/core/src/mem_map_funcs.cpp index 18959dc70..446d3ac97 100644 --- a/src/core/src/mem_map_funcs.cpp +++ b/src/core/src/mem_map_funcs.cpp | |||
| @@ -29,7 +29,7 @@ | |||
| 29 | namespace Memory { | 29 | namespace Memory { |
| 30 | 30 | ||
| 31 | template <typename T> | 31 | template <typename T> |
| 32 | inline void ReadFromHardware(T &var, const u32 addr) { | 32 | inline void _Read(T &var, const u32 addr) { |
| 33 | // TODO: Figure out the fastest order of tests for both read and write (they are probably different). | 33 | // TODO: Figure out the fastest order of tests for both read and write (they are probably different). |
| 34 | // TODO: Make sure this represents the mirrors in a correct way. | 34 | // TODO: Make sure this represents the mirrors in a correct way. |
| 35 | 35 | ||
| @@ -55,12 +55,12 @@ inline void ReadFromHardware(T &var, const u32 addr) { | |||
| 55 | 55 | ||
| 56 | } else { | 56 | } else { |
| 57 | _assert_msg_(MEMMAP, false, "unknown hardware read"); | 57 | _assert_msg_(MEMMAP, false, "unknown hardware read"); |
| 58 | // WARN_LOG(MEMMAP, "ReadFromHardware: Invalid addr %08x PC %08x LR %08x", addr, currentMIPS->pc, currentMIPS->r[MIPS_REG_RA]); | 58 | // WARN_LOG(MEMMAP, "_Read: Invalid addr %08x PC %08x LR %08x", addr, currentMIPS->pc, currentMIPS->r[MIPS_REG_RA]); |
| 59 | } | 59 | } |
| 60 | } | 60 | } |
| 61 | 61 | ||
| 62 | template <typename T> | 62 | template <typename T> |
| 63 | inline void WriteToHardware(u32 addr, const T data) { | 63 | inline void _Write(u32 addr, const T data) { |
| 64 | // ExeFS:/.code is loaded here: | 64 | // ExeFS:/.code is loaded here: |
| 65 | if ((addr & 0xFFF00000) == 0x00100000) { | 65 | if ((addr & 0xFFF00000) == 0x00100000) { |
| 66 | // TODO(ShizZy): This is dumb... handle correctly. From 3DBrew: | 66 | // TODO(ShizZy): This is dumb... handle correctly. From 3DBrew: |
| @@ -151,25 +151,25 @@ u8 *GetPointer(const u32 addr) { | |||
| 151 | 151 | ||
| 152 | u8 Read8(const u32 addr) { | 152 | u8 Read8(const u32 addr) { |
| 153 | u8 _var = 0; | 153 | u8 _var = 0; |
| 154 | ReadFromHardware<u8>(_var, addr); | 154 | _Read<u8>(_var, addr); |
| 155 | return (u8)_var; | 155 | return (u8)_var; |
| 156 | } | 156 | } |
| 157 | 157 | ||
| 158 | u16 Read16(const u32 addr) { | 158 | u16 Read16(const u32 addr) { |
| 159 | u16_le _var = 0; | 159 | u16_le _var = 0; |
| 160 | ReadFromHardware<u16_le>(_var, addr); | 160 | _Read<u16_le>(_var, addr); |
| 161 | return (u16)_var; | 161 | return (u16)_var; |
| 162 | } | 162 | } |
| 163 | 163 | ||
| 164 | u32 Read32(const u32 addr) { | 164 | u32 Read32(const u32 addr) { |
| 165 | u32_le _var = 0; | 165 | u32_le _var = 0; |
| 166 | ReadFromHardware<u32_le>(_var, addr); | 166 | _Read<u32_le>(_var, addr); |
| 167 | return _var; | 167 | return _var; |
| 168 | } | 168 | } |
| 169 | 169 | ||
| 170 | u64 Read64(const u32 addr) { | 170 | u64 Read64(const u32 addr) { |
| 171 | u64_le _var = 0; | 171 | u64_le _var = 0; |
| 172 | ReadFromHardware<u64_le>(_var, addr); | 172 | _Read<u64_le>(_var, addr); |
| 173 | return _var; | 173 | return _var; |
| 174 | } | 174 | } |
| 175 | 175 | ||
| @@ -182,19 +182,19 @@ u32 Read16_ZX(const u32 addr) { | |||
| 182 | } | 182 | } |
| 183 | 183 | ||
| 184 | void Write8(const u32 addr, const u8 data) { | 184 | void Write8(const u32 addr, const u8 data) { |
| 185 | WriteToHardware<u8>(addr, data); | 185 | _Write<u8>(addr, data); |
| 186 | } | 186 | } |
| 187 | 187 | ||
| 188 | void Write16(const u32 addr, const u16 data) { | 188 | void Write16(const u32 addr, const u16 data) { |
| 189 | WriteToHardware<u16_le>(addr, data); | 189 | _Write<u16_le>(addr, data); |
| 190 | } | 190 | } |
| 191 | 191 | ||
| 192 | void Write32(const u32 addr, const u32 data) { | 192 | void Write32(const u32 addr, const u32 data) { |
| 193 | WriteToHardware<u32_le>(addr, data); | 193 | _Write<u32_le>(addr, data); |
| 194 | } | 194 | } |
| 195 | 195 | ||
| 196 | void Write64(const u32 addr, const u64 data) { | 196 | void Write64(const u32 addr, const u64 data) { |
| 197 | WriteToHardware<u64_le>(addr, data); | 197 | _Write<u64_le>(addr, data); |
| 198 | } | 198 | } |
| 199 | 199 | ||
| 200 | } // namespace | 200 | } // namespace |