Mercurial > repos > blastem
comparison backend.c @ 1079:329ff62ea391
Add a new memory map flag to support an auxilliary buffer for translating code from MMAP_PTR_IDX chunks for which the pointer is null
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Tue, 04 Oct 2016 18:30:24 -0700 |
parents | fc04781f4d28 |
children | 8f14767661fa |
comparison
equal
deleted
inserted
replaced
1078:c4bfbf55d418 | 1079:329ff62ea391 |
---|---|
63 } | 63 } |
64 uint8_t * base = memmap[chunk].flags & MMAP_PTR_IDX | 64 uint8_t * base = memmap[chunk].flags & MMAP_PTR_IDX |
65 ? mem_pointers[memmap[chunk].ptr_index] | 65 ? mem_pointers[memmap[chunk].ptr_index] |
66 : memmap[chunk].buffer; | 66 : memmap[chunk].buffer; |
67 if (!base) { | 67 if (!base) { |
68 if (memmap[chunk].flags & MMAP_AUX_BUFF) { | |
69 return memmap[chunk].buffer + (address & memmap[chunk].aux_mask); | |
70 } | |
68 return NULL; | 71 return NULL; |
69 } | 72 } |
70 return base + (address & memmap[chunk].mask); | 73 return base + (address & memmap[chunk].mask); |
71 } | 74 } |
72 } | 75 } |