mirror of
https://github.com/Lime3DS/Lime3DS.git
synced 2024-11-30 13:24:16 +01:00
renamed some functions
This commit is contained in:
parent
c89f3a5c38
commit
590f294d8e
@ -29,7 +29,7 @@
|
|||||||
namespace Memory {
|
namespace Memory {
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
inline void ReadFromHardware(T &var, const u32 addr) {
|
inline void _Read(T &var, const u32 addr) {
|
||||||
// TODO: Figure out the fastest order of tests for both read and write (they are probably different).
|
// TODO: Figure out the fastest order of tests for both read and write (they are probably different).
|
||||||
// TODO: Make sure this represents the mirrors in a correct way.
|
// TODO: Make sure this represents the mirrors in a correct way.
|
||||||
|
|
||||||
@ -55,12 +55,12 @@ inline void ReadFromHardware(T &var, const u32 addr) {
|
|||||||
|
|
||||||
} else {
|
} else {
|
||||||
_assert_msg_(MEMMAP, false, "unknown hardware read");
|
_assert_msg_(MEMMAP, false, "unknown hardware read");
|
||||||
// WARN_LOG(MEMMAP, "ReadFromHardware: Invalid addr %08x PC %08x LR %08x", addr, currentMIPS->pc, currentMIPS->r[MIPS_REG_RA]);
|
// WARN_LOG(MEMMAP, "_Read: Invalid addr %08x PC %08x LR %08x", addr, currentMIPS->pc, currentMIPS->r[MIPS_REG_RA]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
inline void WriteToHardware(u32 addr, const T data) {
|
inline void _Write(u32 addr, const T data) {
|
||||||
// ExeFS:/.code is loaded here:
|
// ExeFS:/.code is loaded here:
|
||||||
if ((addr & 0xFFF00000) == 0x00100000) {
|
if ((addr & 0xFFF00000) == 0x00100000) {
|
||||||
// TODO(ShizZy): This is dumb... handle correctly. From 3DBrew:
|
// TODO(ShizZy): This is dumb... handle correctly. From 3DBrew:
|
||||||
@ -151,25 +151,25 @@ u8 *GetPointer(const u32 addr) {
|
|||||||
|
|
||||||
u8 Read8(const u32 addr) {
|
u8 Read8(const u32 addr) {
|
||||||
u8 _var = 0;
|
u8 _var = 0;
|
||||||
ReadFromHardware<u8>(_var, addr);
|
_Read<u8>(_var, addr);
|
||||||
return (u8)_var;
|
return (u8)_var;
|
||||||
}
|
}
|
||||||
|
|
||||||
u16 Read16(const u32 addr) {
|
u16 Read16(const u32 addr) {
|
||||||
u16_le _var = 0;
|
u16_le _var = 0;
|
||||||
ReadFromHardware<u16_le>(_var, addr);
|
_Read<u16_le>(_var, addr);
|
||||||
return (u16)_var;
|
return (u16)_var;
|
||||||
}
|
}
|
||||||
|
|
||||||
u32 Read32(const u32 addr) {
|
u32 Read32(const u32 addr) {
|
||||||
u32_le _var = 0;
|
u32_le _var = 0;
|
||||||
ReadFromHardware<u32_le>(_var, addr);
|
_Read<u32_le>(_var, addr);
|
||||||
return _var;
|
return _var;
|
||||||
}
|
}
|
||||||
|
|
||||||
u64 Read64(const u32 addr) {
|
u64 Read64(const u32 addr) {
|
||||||
u64_le _var = 0;
|
u64_le _var = 0;
|
||||||
ReadFromHardware<u64_le>(_var, addr);
|
_Read<u64_le>(_var, addr);
|
||||||
return _var;
|
return _var;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -182,19 +182,19 @@ u32 Read16_ZX(const u32 addr) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void Write8(const u32 addr, const u8 data) {
|
void Write8(const u32 addr, const u8 data) {
|
||||||
WriteToHardware<u8>(addr, data);
|
_Write<u8>(addr, data);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Write16(const u32 addr, const u16 data) {
|
void Write16(const u32 addr, const u16 data) {
|
||||||
WriteToHardware<u16_le>(addr, data);
|
_Write<u16_le>(addr, data);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Write32(const u32 addr, const u32 data) {
|
void Write32(const u32 addr, const u32 data) {
|
||||||
WriteToHardware<u32_le>(addr, data);
|
_Write<u32_le>(addr, data);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Write64(const u32 addr, const u64 data) {
|
void Write64(const u32 addr, const u64 data) {
|
||||||
WriteToHardware<u64_le>(addr, data);
|
_Write<u64_le>(addr, data);
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace
|
} // namespace
|
||||||
|
Loading…
Reference in New Issue
Block a user