emscripten does not guarantee byte arrays to be aligned on word boundaries, specify alignment for them

This commit is contained in:
Toad King 2016-09-11 15:55:39 -05:00
parent 2707890fe9
commit 64ee605076
2 changed files with 10 additions and 10 deletions

View File

@ -54,15 +54,15 @@
}
/* VDP context */
uint8 sat[0x400]; /* Internal copy of sprite attribute table */
uint8 vram[0x10000]; /* Video RAM (64K x 8-bit) */
uint8 cram[0x80]; /* On-chip color RAM (64 x 9-bit) */
uint8 vsram[0x80]; /* On-chip vertical scroll RAM (40 x 11-bit) */
uint8 reg[0x20]; /* Internal VDP registers (23 x 8-bit) */
uint8 hint_pending; /* 0= Line interrupt is pending */
uint8 vint_pending; /* 1= Frame interrupt is pending */
uint16 status; /* VDP status flags */
uint32 dma_length; /* DMA remaining length */
uint8 sat[0x400] __attribute__((aligned(4))); /* Internal copy of sprite attribute table */
uint8 vram[0x10000] __attribute__((aligned(4))); /* Video RAM (64K x 8-bit) */
uint8 cram[0x80] __attribute__((aligned(4))); /* On-chip color RAM (64 x 9-bit) */
uint8 vsram[0x80] __attribute__((aligned(4))); /* On-chip vertical scroll RAM (40 x 11-bit) */
uint8 reg[0x20]; /* Internal VDP registers (23 x 8-bit) */
uint8 hint_pending; /* 0= Line interrupt is pending */
uint8 vint_pending; /* 1= Frame interrupt is pending */
uint16 status; /* VDP status flags */
uint32 dma_length; /* DMA remaining length */
/* Global variables */
uint16 ntab; /* Name table A base address */

View File

@ -553,7 +553,7 @@ static const uint32 tms_palette[16] =
#endif
/* Cached and flipped patterns */
static uint8 bg_pattern_cache[0x80000];
static uint8 bg_pattern_cache[0x80000] __attribute__((aligned(4)));
/* Sprite pattern name offset look-up table (Mode 5) */
static uint8 name_lut[0x400];