DS Memory: Ensure DS9 I/O is 8-byte aligned
Vicki Pfau vi@endrift.com
Mon, 10 Apr 2017 20:20:53 -0700
3 files changed,
4 insertions(+),
1 deletions(-)
M
CHANGES
→
CHANGES
@@ -8,6 +8,7 @@ - DS Video: Bitmap sprites use alpha bit for transparent
- DS GX: Fix 4-color texture coordinates Misc: - DS: Set boot complete bit in RAM on boot (fixes mgba.io/i/576, mgba.io/i/580, mgba.io/i/586) + - DS Memory: Ensure DS9 I/O is 8-byte aligned 0.6.0: (Future) Features:
M
include/mgba-util/common.h
→
include/mgba-util/common.h
@@ -153,9 +153,11 @@ #define TEST_FILL_BITS(SRC, START, END, TEST) ((TEST) ? (FILL_BITS(SRC, START, END)) : (CLEAR_BITS(SRC, START, END)))
#ifdef _MSC_VER #define ATTRIBUTE_UNUSED +#define ATTRIBUTE_ALIGN(X) #define ATTRIBUTE_FORMAT(X, Y, Z) #else #define ATTRIBUTE_UNUSED __attribute__((unused)) +#define ATTRIBUTE_ALIGN(X) __attribute__((aligned(X))) #define ATTRIBUTE_FORMAT(X, Y, Z) __attribute__((format(X, Y, Z))) #endif
M
include/mgba/internal/ds/memory.h
→
include/mgba/internal/ds/memory.h
@@ -90,7 +90,7 @@ uint32_t* wramBase9;
uint32_t* wram7; uint32_t* rom; uint16_t io7[DS7_REG_MAX >> 1]; - uint16_t io9[DS9_REG_MAX >> 1]; + uint16_t io9[DS9_REG_MAX >> 1] ATTRIBUTE_ALIGN(8); struct DSSlot1 slot1; struct DSSPIBus spiBus;