Fast 32-to-16-bit memory conversion routine on ARM
Jeffrey Pfau jeffrey@endrift.com
Thu, 07 Nov 2013 23:53:16 -0800
2 files changed,
6 insertions(+),
1 deletions(-)
M
CMakeLists.txt
→
CMakeLists.txt
@@ -7,7 +7,7 @@ set(USE_DEBUGGER ON CACHE BOOL "Whether or not to enable the ARM debugger")
set(EXTRA_LIB "") file(GLOB ARM_SRC ${CMAKE_SOURCE_DIR}/src/arm/*.c) file(GLOB GBA_SRC ${CMAKE_SOURCE_DIR}/src/gba/*.c) -file(GLOB UTIL_SRC ${CMAKE_SOURCE_DIR}/src/util/*.c) +file(GLOB UTIL_SRC ${CMAKE_SOURCE_DIR}/src/util/*.[cS]) file(GLOB RENDERER_SRC ${CMAKE_SOURCE_DIR}/src/gba/renderers/video-software.c) include_directories(${CMAKE_SOURCE_DIR}/src/arm) include_directories(${CMAKE_SOURCE_DIR}/src/gba)@@ -33,6 +33,7 @@ set(OPENGL_LIBRARY "-lEGL -lGLESv2 -lbcm_host")
set(OPENGL_INCLUDE_DIR "") add_definitions(-DBUILD_RASPI) elseif(BUILD_BBB OR BUILD_RASPI) + enable_language(ASM) add_definitions(-DCOLOR_16_BIT -DCOLOR_5_6_5) set(MAIN_SRC ${CMAKE_SOURCE_DIR}/src/platform/sdl/sw-main.c) else()
M
src/gba/renderers/video-software.c
→
src/gba/renderers/video-software.c
@@ -407,9 +407,13 @@ }
} #ifdef COLOR_16_BIT +#ifdef __arm__ + _to16Bit(row, softwareRenderer->row, VIDEO_HORIZONTAL_PIXELS); +#else for (x = 0; x < VIDEO_HORIZONTAL_PIXELS; ++x) { row[x] = softwareRenderer->row[x]; } +#endif #else memcpy(row, softwareRenderer->row, VIDEO_HORIZONTAL_PIXELS * sizeof(*row)); #endif