From dabd7a5848e6aa55e91cf4c804f6236b4f7fe30e Mon Sep 17 00:00:00 2001 From: Peter Fors Date: Sat, 5 Apr 2025 20:26:45 +0200 Subject: everything working, 2285 fps --- mknes.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'mknes.h') diff --git a/mknes.h b/mknes.h index 2d04add..c1784f6 100644 --- a/mknes.h +++ b/mknes.h @@ -35,7 +35,6 @@ struct ppu_state { uint8_t oam_data; uint8_t even_frame; - uint8_t pixels[256 * 240] __attribute__((aligned(64))); uint8_t oam[256]; uint8_t secondary_oam[32]; uint8_t palette[0x20]; @@ -101,12 +100,13 @@ struct nes_state { struct ppu_state ppu; struct mapper_entry mapper; union mapper_data map; - uint8_t ram[0x800] __attribute__((aligned(64))); - uint8_t sram[0x2000] __attribute__((aligned(64))); - uint8_t ciram[0x1000] __attribute__((aligned(64))); // NOTE(peter): Originally 0x800 bytes, but extended as it should work for up to fourway, this is optimization, reality is 2kb, but there is no side-effects, so this is fine! - uint8_t prg_rom[4 * 1024 * 1024] __attribute__((aligned(64))); - uint8_t chr_rom[4 * 1024 * 1024] __attribute__((aligned(64))); -} __attribute__((aligned(64))); + uint8_t *pixels; + uint8_t *ram; + uint8_t *sram; + uint8_t *ciram; + uint8_t *prg_rom; + uint8_t *chr_rom; +}; __attribute__((aligned(4096))) static uint32_t nes_palette[64] = { -- cgit v1.2.3