import struct


def memory_read(dev_file: str, address: int, length=1) -> tuple:
    """
    reads bytes from a rc2f memory file
    @param dev_file: the memory to use
    @param address: where to read
    @param length: how many bytes to read
    @return: the read bytes as a tuple
    @rtype: tuple
    """
    with open(dev_file, 'rb') as mem:
        mem.seek(address)
        data = mem.read(length)
        return struct.unpack('B' * length, data)