summaryrefslogtreecommitdiff
path: root/mknes.h
diff options
context:
space:
mode:
Diffstat (limited to 'mknes.h')
-rw-r--r--mknes.h17
1 files changed, 8 insertions, 9 deletions
diff --git a/mknes.h b/mknes.h
index e1dc8f2..fba1406 100644
--- a/mknes.h
+++ b/mknes.h
@@ -117,15 +117,14 @@ struct nes_state {
struct cpu_state cpu;
// struct apu_state apu;
- uint8_t *ram;
- uint8_t *ciram;
- uint8_t *prg_rom;
- uint8_t *chr_rom;
- uint8_t *chr_ram;
- uint8_t *pixels;
- uint8_t *sram;
-} __attribute__((packed, aligned(64)));
-
+ uint8_t ram[RAM_SIZE] __attribute__((aligned(4096)));
+ uint8_t ciram[CIRAM_SIZE] __attribute__((aligned(4096)));
+ uint8_t prg_rom[PRG_ROM_SIZE] __attribute__((aligned(4096)));
+ uint8_t chr_rom[CHR_ROM_SIZE] __attribute__((aligned(4096)));
+ uint8_t chr_ram[CHR_RAM_SIZE] __attribute__((aligned(4096)));
+ uint8_t pixels[PIXELS_SIZE] __attribute__((aligned(4096)));
+ uint8_t sram[SRAM_SIZE] __attribute__((aligned(4096)));
+} __attribute__((packed, aligned(4096)));
__attribute__((aligned(4096))) static uint32_t nes_palette[65] = {
0x585858ff, 0x00237cff, 0x0d1099ff, 0x300092ff, 0x4f006cff, 0x600035ff, 0x5c0500ff, 0x461800ff,