diff options
author | 2016-08-02 09:52:42 +1000 | |
---|---|---|
committer | 2016-08-02 09:52:42 +1000 | |
commit | 062017977dbbaae000e8e5ecbeef5a9662e85b9c (patch) | |
tree | 403e99736778deb60724cfb726d5e702789ea6c2 /src | |
parent | 77f1b1dca46caac6bd21dd4c9f2d517b28c3c231 (diff) | |
parent | a2b0b2fbd4813ccc593f44c61bc4b29e69dfb933 (diff) |
Merge pull request #1176 from npwoods/fix_romload_fill
Fixed breakage caused by a change in how the byte for ROM_FILL is represented with recent changes
Diffstat (limited to 'src')
-rw-r--r-- | src/emu/romload.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/emu/romload.cpp b/src/emu/romload.cpp index 7ba443e9abc..989539259cc 100644 --- a/src/emu/romload.cpp +++ b/src/emu/romload.cpp @@ -804,22 +804,25 @@ void rom_load_manager::fill_rom_data(const rom_entry *romp) int skip = ROM_GETSKIPCOUNT(romp); UINT8 *base = m_region->base() + ROM_GETOFFSET(romp); - /* make sure we fill within the region space */ + // make sure we fill within the region space if (ROM_GETOFFSET(romp) + numbytes > m_region->bytes()) fatalerror("Error in RomModule definition: FILL out of memory region space\n"); - /* make sure the length was valid */ + // make sure the length was valid if (numbytes == 0) fatalerror("Error in RomModule definition: FILL has an invalid length\n"); - /* fill the data (filling value is stored in place of the hashdata) */ + // for fill bytes, the byte that gets filled is the first byte of the hashdata string + UINT8 fill_byte = (UINT8)atoi(ROM_GETHASHDATA(romp)); + + // fill the data (filling value is stored in place of the hashdata) if(skip != 0) { for (int i = 0; i < numbytes; i+= skip + 1) - base[i] = (FPTR)ROM_GETHASHDATA(romp) & 0xff; + base[i] = fill_byte; } else - memset(base, (FPTR)ROM_GETHASHDATA(romp) & 0xff, numbytes); + memset(base, fill_byte, numbytes); } |