there's many ways to "fix" this, however i still want to keep the macros around for now.
the simplest way i see is to make the io array a u16, as almost all io regs are u16.
this causes some problems with some regs, such as REG_BG3Xand all dma regs REG_DMA0SAD, REG_DMA0DAD, REG_DMA0CNT
/* old */ #define REG_DISPCNT *reinterpret_cast<std::uint16_t*>(gba.mem.io + (gba::mem::IO_DISPCNT & 0x3FF))
/* new */ #define REG_DISPCNT gba.mem.io[(gba::mem::IO_DISPCNT & 0x3FF) >> 1]
currently, the emulator only works on little endian. reason for this is how the IO regs are defined:
https://github.com/ITotalJustice/notorious_beeg/blob/master/src/core/mem.hpp#L250-L390
a simple runtime test can show this:
there's many ways to "fix" this, however i still want to keep the macros around for now.
the simplest way i see is to make the io array a u16, as almost all io regs are u16. this causes some problems with some regs, such as
REG_BG3X
and all dma regsREG_DMA0SAD, REG_DMA0DAD, REG_DMA0CNT