Skip to content

Problem with ROMs whose size isn't a multiple of 1024 bytes #56

@michalderkacz

Description

@michalderkacz

The compression algorithm in the JS function generateAndSaveUF2 doesn't support the ROM size that isn't a multiple of 1024 bytes.

This is the likely cause of the problem with N64 240p test suite ROM that I reported before whose size is 6421760 bytes = 6271.25 KiB.

The generateAndSaveUF2 calculates the number of chunks as num_chunks = Math.floor(rom.fileSize / chunk_size) where chunk_size = 1024 so it doesn't handle the last incomplete chunk in any way.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions