Skip to content

Suggestion: "auto PROTECT" #5

@StanHash

Description

@StanHash

something like

PROTECT_AUTO

ORG $BEEF
    SHORT $2000 $0001 // mov r0, #0; mov r1, r0

PROTECT_AUTO_OFF

ORG $BEEF
    // This should through an error, as a previous write to this area was auto protected
    SHORT $2042 $2100 // mov r0, #0x42; mov r1, #0

Everything written between PROTECT_AUTO and PROTECT_AUTO_OFF would be "auto-protected" (as if PROTECT was used for each region of data that was written).

The benefit of such feature would be to make protecting sequences of many "hooks" (ORG p; xyz) more easily feasible. The benefit of doing that would be to ease finding conflicts between modules (hacks) that hook into the original binary (ROM).

I guess we could also get that benefit from doing that on a global scale (maybe through a command-line option that would disallow multiple writes to the same area?).

Of course regular PROTECT needs to be fixed first.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions