summaryrefslogtreecommitdiff
path: root/gba_memory.c
diff options
context:
space:
mode:
authorAutechre2021-02-15 22:30:27 +0100
committerGitHub2021-02-15 22:30:27 +0100
commit300d0c0028e400eabd81dc718ee8cd8c6459b256 (patch)
treef80b8883d2fce7da3ea7f55ae98f26922af63ca3 /gba_memory.c
parentfa7405450831876b410c1445310456d9b4953165 (diff)
parented3ba2c18b8256372cbdd8c86df8073beebb9a18 (diff)
downloadpicogpsp-300d0c0028e400eabd81dc718ee8cd8c6459b256.tar.gz
picogpsp-300d0c0028e400eabd81dc718ee8cd8c6459b256.tar.bz2
picogpsp-300d0c0028e400eabd81dc718ee8cd8c6459b256.zip
Merge pull request #93 from davidgfnet/master
More cleanups (mostly whitespace and unused stuff)
Diffstat (limited to 'gba_memory.c')
-rw-r--r--gba_memory.c15
1 files changed, 3 insertions, 12 deletions
diff --git a/gba_memory.c b/gba_memory.c
index 02b3e8b..2cb760a 100644
--- a/gba_memory.c
+++ b/gba_memory.c
@@ -311,9 +311,9 @@ u16 palette_ram_converted[512];
u16 io_registers[1024 * 16];
u8 ewram[1024 * 256 * 2];
u8 iwram[1024 * 32 * 2];
-u8 vram[1024 * 96 * 2];
+u8 vram[1024 * 96];
-u8 bios_rom[1024 * 32];
+u8 bios_rom[1024 * 16 * 2];
u32 bios_read_protect;
// Up to 128kb, store SRAM, flash ROM, or EEPROM here.
@@ -3144,16 +3144,6 @@ cpu_alert_type dma_transfer(dma_transfer_type *dma)
memory_map_##type[map_offset + 3] = vram + (0x8000 * 2); \
} \
-#define map_vram_firstpage(type) \
- for(map_offset = 0x6000000 / 0x8000; map_offset < (0x7000000 / 0x8000); \
- map_offset += 4) \
- { \
- memory_map_##type[map_offset] = vram; \
- memory_map_##type[map_offset + 1] = NULL; \
- memory_map_##type[map_offset + 2] = NULL; \
- memory_map_##type[map_offset + 3] = NULL; \
- } \
-
// Picks a page to evict
u32 page_time = 0;
@@ -3331,6 +3321,7 @@ void init_memory(void)
// This is because VRAM cannot be efficiently made incontiguous, and still allow
// the renderer to work as efficiently. It would, at the very least, require a
// lot of hacking of the renderer which I'm not prepared to do.
+ // TODO(davidgfnet): add SMC VRAM detection
// However, it IS possible to directly map the first page no matter what because
// there's 32kb of blank stuff sitting beneath it.