Skip to content

Incorrect START address validation #5

@Colpocorto

Description

@Colpocorto

The program wrongly assumes that the START address must be between BEGIN and END addresses.

The MSX system allows the START address to be outside the BEGIN-END range, and it is in fact something that many commercial games use.

Typical use case:

-The loader loads a binary file at a high area of RAM (e.g. #F200, #F2FF, #F200).
-After, the loader loads a block at #9000 (addresses #9000,#CFFF,#F200)
-The second block causes the very first routine that was load at #F200 to execute in order to allocate the #9000 block to a different page.
-Now, a third block is loaded again at #9000, #CFFF, #F240. The routine at #F240 (that was loaded in the first block) is now executed to allocate the new #9000 to a different area, and finally the INIT address of the game is invoked.

In other words, it is very common that a set of assembly routines are loaded together from a "loader" block, and those routines are later invoked by different BLOAD files that have them as their respective "START" addresses.

These kind of .BIN files can't currently be added to a .CAS file with MCP, since it causes an error like this:

Adding binary file "P1.bin"... Error: IO operation failed: invalid binary file header: START address F42F is not between BEGIN address 8080 and END address C07F

However, this error should not occur, since it is perfectly legal (and common) that the START address is outside the BEGIN - END range.

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