Skip to content

Commit

Permalink
Tweak a few things perfomance-wise.
Browse files Browse the repository at this point in the history
  • Loading branch information
Frederic Meyer committed Jan 13, 2019
1 parent a9e2938 commit 0d92013
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}/CMakeTests)

SET(TARGET "sdl" CACHE STRING "Build Target (sdl, ...)")

SET(COMPILE_FLAGS "${COMPILE_FLAGS} -Ofast")
SET(COMPILE_FLAGS "${COMPILE_FLAGS} -O3")
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${COMPILE_FLAGS}")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${COMPILE_FLAGS} -std=c++1z")

Expand Down
6 changes: 3 additions & 3 deletions src/core/bus.inl
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ void WriteByte(std::uint32_t address, std::uint8_t value, ARM::AccessType type)
}
case 0x5: WRITE_FAST_16(memory.palette, address & 0x3FF, value * 0x0101); break;
case 0x6: {
std::printf("[W][VRAM] 0x%08x=0x%x\n", address, value);
//std::printf("[W][VRAM] 0x%08x=0x%x\n", address, value);
address &= 0x1FFFF;
if (address >= 0x18000)
address &= ~0x8000;
Expand Down Expand Up @@ -211,7 +211,7 @@ void WriteHalf(std::uint32_t address, std::uint16_t value, ARM::AccessType type)
}
case 0x5: WRITE_FAST_16(memory.palette, address & 0x3FF, value); break;
case 0x6: {
std::printf("[W][VRAM] 0x%08x=0x%x\n", address, value);
//std::printf("[W][VRAM] 0x%08x=0x%x\n", address, value);
address &= 0x1FFFF;
if (address >= 0x18000) {
address &= ~0x8000;
Expand Down Expand Up @@ -277,7 +277,7 @@ void WriteWord(std::uint32_t address, std::uint32_t value, ARM::AccessType type)
}
case 0x5: WRITE_FAST_32(memory.palette, address & 0x3FF, value); break;
case 0x6: {
std::printf("[W][VRAM] 0x%08x=0x%x\n", address, value);
//std::printf("[W][VRAM] 0x%08x=0x%x\n", address, value);
address &= 0x1FFFF;
if (address >= 0x18000) {
address &= ~0x8000;
Expand Down
2 changes: 1 addition & 1 deletion src/core/cpu.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class CPU : private ARM::Interface {
/* Get next event. */
int run_until = ppu.wait_cycles;

for (int i = 0; i < run_until; i++) {
for (int i = 0; i < run_until / 4; i++) {
cpu.Run();
}

Expand Down

0 comments on commit 0d92013

Please sign in to comment.