# HG changeset patch # User Michael Pavone # Date 1507982618 25200 # Node ID 1e3e0205640f92017e6b5ee9d333b7930b04de00 # Parent 723f6381cffab1f23b7399aacab654cf68488913 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 diff -r 723f6381cffa -r 1e3e0205640f rom.db --- a/rom.db Mon Oct 09 07:48:48 2017 -0700 +++ b/rom.db Sat Oct 14 05:03:38 2017 -0700 @@ -1287,3 +1287,15 @@ } } } +31c66bd13abf4ae8271c09ec5286a0ee0289dbbc { + #Designed to run on Sega Channel hardware which is RAM-based + #writes to the this RAM qutie a bit to select games + name Game no Kanzume Otokuyou + map { + 0 { + device ROM + last 3FFFFF + writeable yes + } + } +} diff -r 723f6381cffa -r 1e3e0205640f romdb.c --- 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) {