diff options
| author | 2016-08-01 17:57:59 -0400 | |
|---|---|---|
| committer | 2016-08-01 19:46:53 -0400 | |
| commit | a2b0b2fbd4813ccc593f44c61bc4b29e69dfb933 (patch) | |
| tree | 771e651e93474f9af6cad7b2a7623211ca073e8c /src/emu/romload.cpp | |
| parent | 871656c98caca81aa501c3dbdc8d0a581e2b0178 (diff) | |
Fixed breakage caused by a change in how the byte for ROM_FILL is represented with recent changes
Diffstat (limited to 'src/emu/romload.cpp')
| -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); } |
