comparison backend.c @ 1692:5dacaef602a7 segacd

Merge from default
author Michael Pavone <pavone@retrodev.com>
date Sat, 05 Jan 2019 00:58:08 -0800
parents 1f745318f10a
children b7ecd0d6a77b d377d6037dd9
comparison
equal deleted inserted replaced
1504:95b3a1a8b26c 1692:5dacaef602a7
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;