diff options
| author | 2014-04-28 19:44:43 -0700 | |
|---|---|---|
| committer | 2014-04-28 19:44:43 -0700 | |
| commit | 237d079aad97aefcddc991157bf3ac50aa64b7f6 (patch) | |
| tree | cad4e7082fb3c97ecf9d8a6818722308154aa76a | |
| parent | IT'S ALIVE! (diff) | |
| parent | added FAQ link to README.md (diff) | |
| download | yuzu-237d079aad97aefcddc991157bf3ac50aa64b7f6.tar.gz yuzu-237d079aad97aefcddc991157bf3ac50aa64b7f6.tar.xz yuzu-237d079aad97aefcddc991157bf3ac50aa64b7f6.zip | |
Merge commit upstream/master into issue-7-fix
| -rw-r--r-- | .travis.yml | 14 | ||||
| -rw-r--r-- | README.md | 4 | ||||
| -rw-r--r-- | src/citra/CMakeLists.txt | 2 | ||||
| -rw-r--r-- | src/core/mem_map.h | 2 | ||||
| -rw-r--r-- | src/core/mem_map_funcs.cpp | 14 |
5 files changed, 29 insertions, 7 deletions
diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 000000000..8bad122b2 --- /dev/null +++ b/.travis.yml | |||
| @@ -0,0 +1,14 @@ | |||
| 1 | language: cpp | ||
| 2 | compiler: | ||
| 3 | - gcc | ||
| 4 | before_install: | ||
| 5 | - sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y | ||
| 6 | - sudo apt-get -qq update | ||
| 7 | - sudo apt-get -qq install g++-4.8 xorg-dev libglu1-mesa-dev libglew-dev libxcursor-dev | ||
| 8 | - sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.8 90 | ||
| 9 | - git clone https://github.com/glfw/glfw.git | ||
| 10 | - "mkdir glfw/build && cd glfw/build && cmake .. && make && sudo make install ; cd -" | ||
| 11 | script: | ||
| 12 | - mkdir build && cd build | ||
| 13 | - cmake .. | ||
| 14 | - make -j4 \ No newline at end of file | ||
| @@ -1,6 +1,8 @@ | |||
| 1 | citra emulator | 1 | citra emulator |
| 2 | ============== | 2 | ============== |
| 3 | An experimental open-source Nintendo 3DS emulator/debugger written in C++. At this time, it only emulates a very small subset of 3DS hardware, and therefore is only useful for booting/debugging very simple homebrew demos. Citra is licensed under the GPLv2. Refer to the license.txt file included. | 3 | [](https://travis-ci.org/bunnei/citra) |
| 4 | |||
| 5 | An experimental open-source Nintendo 3DS emulator/debugger written in C++. At this time, it only emulates a very small subset of 3DS hardware, and therefore is only useful for booting/debugging very simple homebrew demos. Citra is licensed under the GPLv2. Refer to the license.txt file included. Please read the [FAQ](https://github.com/bunnei/citra/wiki/FAQ) before getting started with the project. | ||
| 4 | 6 | ||
| 5 | For development discussion, please join us @ #citra on [freenode](http://webchat.freenode.net/). | 7 | For development discussion, please join us @ #citra on [freenode](http://webchat.freenode.net/). |
| 6 | 8 | ||
diff --git a/src/citra/CMakeLists.txt b/src/citra/CMakeLists.txt index d7478a2d2..ca272249f 100644 --- a/src/citra/CMakeLists.txt +++ b/src/citra/CMakeLists.txt | |||
| @@ -9,6 +9,6 @@ if (NOT X11_xf86vmode_LIB) | |||
| 9 | endif() | 9 | endif() |
| 10 | 10 | ||
| 11 | add_executable(citra ${SRCS} ${HEADS}) | 11 | add_executable(citra ${SRCS} ${HEADS}) |
| 12 | target_link_libraries(citra core common video_core GLEW pthread X11 Xxf86vm Xi ${OPENGL_LIBRARIES} ${GLFW_LIBRARIES} rt ${X11_Xrandr_LIB} ${X11_xv86vmode_LIB}) | 12 | 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}) |
| 13 | 13 | ||
| 14 | #install(TARGETS citra RUNTIME DESTINATION ${bindir}) | 14 | #install(TARGETS citra RUNTIME DESTINATION ${bindir}) |
diff --git a/src/core/mem_map.h b/src/core/mem_map.h index c744e377e..509fc8fd9 100644 --- a/src/core/mem_map.h +++ b/src/core/mem_map.h | |||
| @@ -47,6 +47,8 @@ enum { | |||
| 47 | FCRAM_PADDR_END = (FCRAM_PADDR + FCRAM_SIZE), ///< FCRAM end of physical space | 47 | FCRAM_PADDR_END = (FCRAM_PADDR + FCRAM_SIZE), ///< FCRAM end of physical space |
| 48 | FCRAM_VADDR = 0x08000000, ///< FCRAM virtual address | 48 | FCRAM_VADDR = 0x08000000, ///< FCRAM virtual address |
| 49 | FCRAM_VADDR_END = (FCRAM_VADDR + FCRAM_SIZE), ///< FCRAM end of virtual space | 49 | FCRAM_VADDR_END = (FCRAM_VADDR + FCRAM_SIZE), ///< FCRAM end of virtual space |
| 50 | FRAM_VADDR_FW0B = 0xF0000000, ///< FCRAM adress for firmare FW0B | ||
| 51 | FRAM_VADDR_FW0B_END = (FRAM_VADDR_FW0B + FCRAM_SIZE), ///< FCRAM adress end for FW0B | ||
| 50 | 52 | ||
| 51 | HARDWARE_IO_PADDR = 0x10000000, ///< IO physical address start | 53 | HARDWARE_IO_PADDR = 0x10000000, ///< IO physical address start |
| 52 | HARDWARE_IO_VADDR = 0x1EC00000, ///< IO virtual address start | 54 | 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 c8daf0df5..c057a8114 100644 --- a/src/core/mem_map_funcs.cpp +++ b/src/core/mem_map_funcs.cpp | |||
| @@ -16,14 +16,18 @@ std::map<u32, MemoryBlock> g_heap_map; | |||
| 16 | std::map<u32, MemoryBlock> g_heap_gsp_map; | 16 | std::map<u32, MemoryBlock> g_heap_gsp_map; |
| 17 | std::map<u32, MemoryBlock> g_shared_map; | 17 | std::map<u32, MemoryBlock> g_shared_map; |
| 18 | 18 | ||
| 19 | /// Convert a physical address to virtual address | 19 | /// Convert a physical address (or firmware-specific virtual address) to primary virtual address |
| 20 | u32 _AddressPhysicalToVirtual(const u32 addr) { | 20 | u32 _VirtualAddress(const u32 addr) { |
| 21 | // Our memory interface read/write functions assume virtual addresses. Put any physical address | 21 | // Our memory interface read/write functions assume virtual addresses. Put any physical address |
| 22 | // to virtual address translations here. This is obviously quite hacky... But we're not doing | 22 | // to virtual address translations here. This is obviously quite hacky... But we're not doing |
| 23 | // any MMU emulation yet or anything | 23 | // any MMU emulation yet or anything |
| 24 | if ((addr >= FCRAM_PADDR) && (addr < FCRAM_PADDR_END)) { | 24 | if ((addr >= FCRAM_PADDR) && (addr < FCRAM_PADDR_END)) { |
| 25 | return VirtualAddressFromPhysical_FCRAM(addr); | 25 | return VirtualAddressFromPhysical_FCRAM(addr); |
| 26 | 26 | ||
| 27 | // Virtual address mapping FW0B | ||
| 28 | } else if ((addr >= FRAM_VADDR_FW0B) && (addr < FRAM_VADDR_FW0B_END)) { | ||
| 29 | return VirtualAddressFromPhysical_FCRAM(addr); | ||
| 30 | |||
| 27 | // Hardware IO | 31 | // Hardware IO |
| 28 | // TODO(bunnei): FixMe | 32 | // TODO(bunnei): FixMe |
| 29 | // This isn't going to work... The physical address of HARDWARE_IO conflicts with the virtual | 33 | // 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) { | |||
| 41 | // TODO: Make sure this represents the mirrors in a correct way. | 45 | // TODO: Make sure this represents the mirrors in a correct way. |
| 42 | // Could just do a base-relative read, too.... TODO | 46 | // Could just do a base-relative read, too.... TODO |
| 43 | 47 | ||
| 44 | const u32 vaddr = _AddressPhysicalToVirtual(addr); | 48 | const u32 vaddr = _VirtualAddress(addr); |
| 45 | 49 | ||
| 46 | // Memory allocated for HLE use that can be addressed from the emulated application | 50 | // Memory allocated for HLE use that can be addressed from the emulated application |
| 47 | // The primary use of this is sharing a commandbuffer between the HLE OS (syscore) and the LLE | 51 | // 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) { | |||
| 77 | 81 | ||
| 78 | template <typename T> | 82 | template <typename T> |
| 79 | inline void _Write(u32 addr, const T data) { | 83 | inline void _Write(u32 addr, const T data) { |
| 80 | u32 vaddr = _AddressPhysicalToVirtual(addr); | 84 | u32 vaddr = _VirtualAddress(addr); |
| 81 | 85 | ||
| 82 | // Memory allocated for HLE use that can be addressed from the emulated application | 86 | // Memory allocated for HLE use that can be addressed from the emulated application |
| 83 | // The primary use of this is sharing a commandbuffer between the HLE OS (syscore) and the LLE | 87 | // 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) { | |||
| 121 | } | 125 | } |
| 122 | 126 | ||
| 123 | u8 *GetPointer(const u32 addr) { | 127 | u8 *GetPointer(const u32 addr) { |
| 124 | const u32 vaddr = _AddressPhysicalToVirtual(addr); | 128 | const u32 vaddr = _VirtualAddress(addr); |
| 125 | 129 | ||
| 126 | // FCRAM - GSP heap | 130 | // FCRAM - GSP heap |
| 127 | if ((vaddr >= HEAP_GSP_VADDR) && (vaddr < HEAP_GSP_VADDR_END)) { | 131 | if ((vaddr >= HEAP_GSP_VADDR) && (vaddr < HEAP_GSP_VADDR_END)) { |