Removed the redundant mem_write_null* functions (the few mappings that use them, now use NULL pointers instead) and made the _phys function used by DMA not write to the exec buffer if the address has no write mapping (as in that case, it's clearly not intended to be writable), fixes #1332.

This commit is contained in:
OBattler
2021-03-30 02:16:01 +02:00
parent 0cf651ff95
commit 345a61fa7c
5 changed files with 34 additions and 51 deletions

View File

@@ -1538,7 +1538,7 @@ scat_init(const device_t *info)
for (i = 0; i < 16; i++) {
mem_mapping_add(&dev->high_mapping[i], (i << 14) + 0xfc0000, 0x04000,
bios_read, bios_readw, bios_readl,
mem_write_null, mem_write_nullw, mem_write_nulll,
NULL, NULL, NULL,
rom + ((i << 14) & biosmask), 0, NULL);
mem_mapping_enable(&dev->high_mapping[i]);
}
@@ -1558,7 +1558,7 @@ scat_init(const device_t *info)
for (i = (dev->regs[SCAT_VERSION] < 4 ? 0 : 8); i < 16; i++) {
mem_mapping_add(&dev->high_mapping[i], (i << 14) + 0xfc0000, 0x04000,
bios_read, bios_readw, bios_readl,
mem_write_null, mem_write_nullw, mem_write_nulll,
NULL, NULL, NULL,
rom + ((i << 14) & biosmask), 0, NULL);
mem_mapping_enable(&dev->high_mapping[i]);
}