Mercurial > repos > blastem
diff romdb.c @ 1470:1e3e0205640f
Add support for writeable ROM and an entry for Game no Kanzume Otokuyou using that support as it expects the cart area to be writable
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Sat, 14 Oct 2017 05:03:38 -0700 |
parents | 14a2834d010c |
children | 8f3b6a64b658 |
line wrap: on
line diff
--- a/romdb.c Mon Oct 09 07:48:48 2017 -0700 +++ b/romdb.c Sat Oct 14 05:03:38 2017 -0700 @@ -559,8 +559,12 @@ map->end = end + 1; if (!strcmp(dtype, "ROM")) { map->buffer = state->rom + offset; - map->flags = MMAP_READ; map->mask = calc_mask(state->rom_size - offset, start, end); + if (strcmp(tern_find_ptr_default(node, "writeable", "no"), "yes")) { + map->flags = MMAP_READ; + } else { + map->flags = MMAP_READ | MMAP_WRITE | MMAP_CODE; + } } else if (!strcmp(dtype, "LOCK-ON")) { rom_info lock_info; if (state->lock_on) {