def splitRom(rom, chunk = 65536, count = 3, lanes = ('hi', 'lo')):
    """Split a ROM image into chunk*count chunks of chunk bytes.

    Supports only 8-bit ROM chips.

    rom: the ROM image. Shall be iterable, should be a bytearray.
    chunk: the length of one ROM chip.
    count: the number of banks, for sanity checking as it shall hold that
           len(rom)==chunk*count*len(lanes)
    lanes: the name of each ROM chip in a bank.

    return: dictionary of bytearrays of chunk bytes, keyed "{lane}{bank}"
            for each lane in lanes and each bank up to count.
    """
    if (l:=len(rom))!=chunk*count:
        print(F"caution, {l} is not {chunk*count//1024}kB")
    return {F"{lanes[j]}{i}":rom[chunk*i:chunk*(i+1)][j::len(lanes)]
            for i in range(count) for j in range(len(lanes))}