```d writeln (getSize(rom)) ```reports 478 bytes but since you work with ushorts (why? as far as I can see, this is a 8 bit machine) you convert the read(rom) into ushorts, which is only half in size:
```d writeln (cast(ushort[])read(rom)); ``` gives you 478/2 = 239 bytes ```dthis.memory[memStart..memStart + romSize] = cast(ushort[])read(rom);
``` fails because both ranges have different sizes.