comparison backend.c @ 1983:a7b753e260a2 mame_interp

Merge from default
author Michael Pavone <pavone@retrodev.com>
date Sat, 09 May 2020 23:39:44 -0700
parents 374a5ae694e8 9d35ce5012a6
children 638eb2d25696
comparison
equal deleted inserted replaced
1937:cafde1255ad3 1983:a7b753e260a2
83 uint8_t * base = memmap[chunk].flags & MMAP_PTR_IDX 83 uint8_t * base = memmap[chunk].flags & MMAP_PTR_IDX
84 ? mem_pointers[memmap[chunk].ptr_index] 84 ? mem_pointers[memmap[chunk].ptr_index]
85 : memmap[chunk].buffer; 85 : memmap[chunk].buffer;
86 if (!base) { 86 if (!base) {
87 if (memmap[chunk].flags & MMAP_AUX_BUFF) { 87 if (memmap[chunk].flags & MMAP_AUX_BUFF) {
88 return memmap[chunk].buffer + (address & memmap[chunk].aux_mask); 88 return ((uint8_t *)memmap[chunk].buffer) + (address & memmap[chunk].aux_mask);
89 } 89 }
90 return NULL; 90 return NULL;
91 } 91 }
92 return base + (address & memmap[chunk].mask); 92 return base + (address & memmap[chunk].mask);
93 } 93 }
108 uint8_t * base = memmap[chunk].flags & MMAP_PTR_IDX 108 uint8_t * base = memmap[chunk].flags & MMAP_PTR_IDX
109 ? mem_pointers[memmap[chunk].ptr_index] 109 ? mem_pointers[memmap[chunk].ptr_index]
110 : memmap[chunk].buffer; 110 : memmap[chunk].buffer;
111 if (!base) { 111 if (!base) {
112 if (memmap[chunk].flags & MMAP_AUX_BUFF) { 112 if (memmap[chunk].flags & MMAP_AUX_BUFF) {
113 return memmap[chunk].buffer + (address & memmap[chunk].aux_mask); 113 return ((uint8_t *)memmap[chunk].buffer) + (address & memmap[chunk].aux_mask);
114 } 114 }
115 return NULL; 115 return NULL;
116 } 116 }
117 return base + (address & memmap[chunk].mask); 117 return base + (address & memmap[chunk].mask);
118 } 118 }