From a226dc57bf7ec7d3c6b32f2ec489fdca313732d5 Mon Sep 17 00:00:00 2001 From: Thomas Edvalson Date: Fri, 25 Apr 2014 23:01:58 -0400 Subject: Need to add Xcursor to linker? --- src/citra/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/citra/CMakeLists.txt b/src/citra/CMakeLists.txt index 0023da2b..147f51e9 100644 --- a/src/citra/CMakeLists.txt +++ b/src/citra/CMakeLists.txt @@ -7,6 +7,6 @@ if (NOT X11_xf86vmode_LIB) endif() add_executable(citra ${SRCS}) -target_link_libraries(citra core common video_core GLEW pthread X11 Xxf86vm Xi ${OPENGL_LIBRARIES} ${GLFW_LIBRARIES} rt ${X11_Xrandr_LIB} ${X11_xv86vmode_LIB}) +target_link_libraries(citra core common video_core GLEW pthread X11 Xxf86vm Xi Xcursor ${OPENGL_LIBRARIES} ${GLFW_LIBRARIES} rt ${X11_Xrandr_LIB} ${X11_xv86vmode_LIB}) #install(TARGETS citra RUNTIME DESTINATION ${bindir}) -- cgit v1.2.3 From af921daa4c4bb9c02b53dfcaa35e3f4158b6bf21 Mon Sep 17 00:00:00 2001 From: bunnei Date: Sun, 27 Apr 2014 22:32:51 -0400 Subject: added virtual address conversion for firmware FW0B --- src/core/mem_map.h | 2 ++ src/core/mem_map_funcs.cpp | 14 +++++++++----- 2 files changed, 11 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/core/mem_map.h b/src/core/mem_map.h index c744e377..509fc8fd 100644 --- a/src/core/mem_map.h +++ b/src/core/mem_map.h @@ -47,6 +47,8 @@ enum { FCRAM_PADDR_END = (FCRAM_PADDR + FCRAM_SIZE), ///< FCRAM end of physical space FCRAM_VADDR = 0x08000000, ///< FCRAM virtual address FCRAM_VADDR_END = (FCRAM_VADDR + FCRAM_SIZE), ///< FCRAM end of virtual space + FRAM_VADDR_FW0B = 0xF0000000, ///< FCRAM adress for firmare FW0B + FRAM_VADDR_FW0B_END = (FRAM_VADDR_FW0B + FCRAM_SIZE), ///< FCRAM adress end for FW0B HARDWARE_IO_PADDR = 0x10000000, ///< IO physical address start HARDWARE_IO_VADDR = 0x1EC00000, ///< IO virtual address start diff --git a/src/core/mem_map_funcs.cpp b/src/core/mem_map_funcs.cpp index c8daf0df..c057a811 100644 --- a/src/core/mem_map_funcs.cpp +++ b/src/core/mem_map_funcs.cpp @@ -16,14 +16,18 @@ std::map g_heap_map; std::map g_heap_gsp_map; std::map g_shared_map; -/// Convert a physical address to virtual address -u32 _AddressPhysicalToVirtual(const u32 addr) { +/// Convert a physical address (or firmware-specific virtual address) to primary virtual address +u32 _VirtualAddress(const u32 addr) { // Our memory interface read/write functions assume virtual addresses. Put any physical address // to virtual address translations here. This is obviously quite hacky... But we're not doing // any MMU emulation yet or anything if ((addr >= FCRAM_PADDR) && (addr < FCRAM_PADDR_END)) { return VirtualAddressFromPhysical_FCRAM(addr); + // Virtual address mapping FW0B + } else if ((addr >= FRAM_VADDR_FW0B) && (addr < FRAM_VADDR_FW0B_END)) { + return VirtualAddressFromPhysical_FCRAM(addr); + // Hardware IO // TODO(bunnei): FixMe // This isn't going to work... The physical address of HARDWARE_IO conflicts with the virtual @@ -41,7 +45,7 @@ inline void _Read(T &var, const u32 addr) { // TODO: Make sure this represents the mirrors in a correct way. // Could just do a base-relative read, too.... TODO - const u32 vaddr = _AddressPhysicalToVirtual(addr); + const u32 vaddr = _VirtualAddress(addr); // Memory allocated for HLE use that can be addressed from the emulated application // The primary use of this is sharing a commandbuffer between the HLE OS (syscore) and the LLE @@ -77,7 +81,7 @@ inline void _Read(T &var, const u32 addr) { template inline void _Write(u32 addr, const T data) { - u32 vaddr = _AddressPhysicalToVirtual(addr); + u32 vaddr = _VirtualAddress(addr); // Memory allocated for HLE use that can be addressed from the emulated application // The primary use of this is sharing a commandbuffer between the HLE OS (syscore) and the LLE @@ -121,7 +125,7 @@ inline void _Write(u32 addr, const T data) { } u8 *GetPointer(const u32 addr) { - const u32 vaddr = _AddressPhysicalToVirtual(addr); + const u32 vaddr = _VirtualAddress(addr); // FCRAM - GSP heap if ((vaddr >= HEAP_GSP_VADDR) && (vaddr < HEAP_GSP_VADDR_END)) { -- cgit v1.2.3