public void mapWriter(int start, int end, NesBusWriter writer) {
        int startPage = start >> ADDRESS_SHIFT;
        int endPage = end >> ADDRESS_SHIFT;
        int pagesToMap = endPage - startPage + 1;

        if (writer == null)
            writer = defaultWriter;

        for (int page = 0; page < pagesToMap; page++) {
            this.writer[startPage + page] = writer;
        }
    }