diff --git a/src/nostalgia/core/gba/addresses.hpp b/src/nostalgia/core/gba/addresses.hpp index 41918259..7bd64341 100644 --- a/src/nostalgia/core/gba/addresses.hpp +++ b/src/nostalgia/core/gba/addresses.hpp @@ -22,7 +22,7 @@ using interrupt_handler = void (*)(void); ///////////////////////////////////////////////////////////////// // Display Registers -#define REG_DISPCNT *reinterpret_cast(0x04000000) +#define REG_DISPCTL *reinterpret_cast(0x04000000) #define REG_DISPSTAT *reinterpret_cast(0x04000004) #define REG_VCOUNT *reinterpret_cast(0x04000006) @@ -45,10 +45,10 @@ using interrupt_handler = void (*)(void); // background registers // background control registers -#define REG_BG0CNT *reinterpret_cast(0x04000008) -#define REG_BG1CNT *reinterpret_cast(0x0400000a) -#define REG_BG2CNT *reinterpret_cast(0x0400000c) -#define REG_BG3CNT *reinterpret_cast(0x0400000e) +#define REG_BG0CTL *reinterpret_cast(0x04000008) +#define REG_BG1CTL *reinterpret_cast(0x0400000a) +#define REG_BG2CTL *reinterpret_cast(0x0400000c) +#define REG_BG3CTL *reinterpret_cast(0x0400000e) // background horizontal scrolling registers #define REG_BG0HOFS *reinterpret_cast(0x04000010) diff --git a/src/nostalgia/core/gba/gfx.cpp b/src/nostalgia/core/gba/gfx.cpp index 48a2ce44..deb5758b 100644 --- a/src/nostalgia/core/gba/gfx.cpp +++ b/src/nostalgia/core/gba/gfx.cpp @@ -90,7 +90,7 @@ ox::Error initGfx(Context*) { /* Background 0 -\|| */ /* Objects -----\||| */ /* |||| */ - REG_DISPCNT = 0x1101; + REG_DISPCTL = 0x1101; // tell display to trigger vblank interrupts REG_DISPSTAT |= DispStat_irq_vblank; // enable vblank interrupt @@ -105,16 +105,16 @@ ox::Error shutdownGfx(Context*) { [[nodiscard]] constexpr volatile uint32_t &bgCtl(int bg) noexcept { switch (bg) { case 0: - return REG_BG0CNT; + return REG_BG0CTL; case 1: - return REG_BG1CNT; + return REG_BG1CTL; case 2: - return REG_BG2CNT; + return REG_BG2CTL; case 3: - return REG_BG3CNT; + return REG_BG3CTL; default: oxPanic(OxError(1), "Looking up non-existent register"); - return REG_BG0CNT; + return REG_BG0CTL; } }