diff --git a/src/mess/machine/msx.c b/src/mess/machine/msx.c index 54d76cf38fb..8df2039e0ad 100644 --- a/src/mess/machine/msx.c +++ b/src/mess/machine/msx.c @@ -858,6 +858,20 @@ void msx_state::msx_memory_init() size = layout->size; option = layout->option; + + if (layout->type != SLOT_CARTRIDGE1 && layout->type != SLOT_CARTRIDGE2) + { + int size_tmp = 0; + if (size < 0x4000) + size_tmp = 0x4000; + else if (size > 0x10000) + size_tmp = 0x10000; + else + size_tmp = size; + int extent_tmp = size_tmp / 0x4000; + if (extent_tmp != extent) + fatalerror("incorrect MSX_LAYOUT_SLOT configuration - expected extent %d but found %d\n", extent, extent_tmp); + } if (VERBOSE) {