Mercurial > repos > blastem
comparison backend.c @ 1519:1f745318f10a
Made the NOR flash emulation a bit more flexible, but not yet flexible enough to properly support the flash chip in the MegaWiFi cart
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Wed, 31 Jan 2018 22:05:10 -0800 |
parents | 92e7dafcc0dc |
children | b7ecd0d6a77b d377d6037dd9 |
comparison
equal
deleted
inserted
replaced
1518:713b504dc577 | 1519:1f745318f10a |
---|---|
73 memmap_chunk const * memmap = opts->memmap; | 73 memmap_chunk const * memmap = opts->memmap; |
74 address &= opts->address_mask; | 74 address &= opts->address_mask; |
75 for (uint32_t chunk = 0; chunk < opts->memmap_chunks; chunk++) | 75 for (uint32_t chunk = 0; chunk < opts->memmap_chunks; chunk++) |
76 { | 76 { |
77 if (address >= memmap[chunk].start && address < memmap[chunk].end) { | 77 if (address >= memmap[chunk].start && address < memmap[chunk].end) { |
78 if (!(memmap[chunk].flags & MMAP_READ)) { | 78 if (!(memmap[chunk].flags & (MMAP_READ|MMAP_READ_CODE))) { |
79 return NULL; | 79 return NULL; |
80 } | 80 } |
81 uint8_t * base = memmap[chunk].flags & MMAP_PTR_IDX | 81 uint8_t * base = memmap[chunk].flags & MMAP_PTR_IDX |
82 ? mem_pointers[memmap[chunk].ptr_index] | 82 ? mem_pointers[memmap[chunk].ptr_index] |
83 : memmap[chunk].buffer; | 83 : memmap[chunk].buffer; |