diff --git a/src/nostalgia/core/config.hpp b/src/nostalgia/core/config.hpp index 5fdc4fb8..5387b3f1 100644 --- a/src/nostalgia/core/config.hpp +++ b/src/nostalgia/core/config.hpp @@ -9,9 +9,7 @@ #include -namespace nostalgia::core { - -namespace config { +namespace nostalgia::core::config { constexpr auto ImGuiEnabled = #if __has_include() @@ -28,11 +26,8 @@ enum class SdlVsync { constexpr auto GbaSpriteBufferLen = 128; constexpr auto GbaEventLoopTimerBased = false; +constexpr auto GbaTimerBits = 32; constexpr auto UserlandFpsPrint = false; constexpr auto SdlVsyncOption = static_cast(SdlVsync::Adaptive); } - -using gba_timer_t = uint32_t; - -} diff --git a/src/nostalgia/core/gba/core.arm.cpp b/src/nostalgia/core/gba/core.arm.cpp index ca646cd7..3055b2dc 100644 --- a/src/nostalgia/core/gba/core.arm.cpp +++ b/src/nostalgia/core/gba/core.arm.cpp @@ -8,6 +8,7 @@ #include "addresses.hpp" #include "bios.hpp" #include "irq.hpp" +#include "core.hpp" extern "C" void isr(); diff --git a/src/nostalgia/core/gba/core.cpp b/src/nostalgia/core/gba/core.cpp index 613d5cbd..8ad054f5 100644 --- a/src/nostalgia/core/gba/core.cpp +++ b/src/nostalgia/core/gba/core.cpp @@ -9,6 +9,7 @@ #include "addresses.hpp" #include "bios.hpp" #include "irq.hpp" +#include "core.hpp" extern "C" void isr(); diff --git a/src/nostalgia/core/gba/core.hpp b/src/nostalgia/core/gba/core.hpp new file mode 100644 index 00000000..0b27def7 --- /dev/null +++ b/src/nostalgia/core/gba/core.hpp @@ -0,0 +1,15 @@ +/* + * Copyright 2016 - 2022 Gary Talent (gary@drinkingtea.net). All rights reserved. + */ + +#pragma once + +#include + +#include + +namespace nostalgia::core { + +using gba_timer_t = ox::Uint; + +} \ No newline at end of file diff --git a/src/nostalgia/core/gba/irq.arm.cpp b/src/nostalgia/core/gba/irq.arm.cpp index 32b07a7e..27485c75 100644 --- a/src/nostalgia/core/gba/irq.arm.cpp +++ b/src/nostalgia/core/gba/irq.arm.cpp @@ -8,6 +8,7 @@ #include #include "addresses.hpp" +#include "core.hpp" #include "gfx.hpp" #include "irq.hpp"