Skip to content

Decide how to treat rom addresses, segmented addresses, physical addresses, etc #1274

@AngheloAlf

Description

@AngheloAlf

There has been the never ending discussion of how we should treat the various type of addresses that do not point to vram (ie, can't be derefernced directly).

Currently we use the void* type for holding vram pointers in struct members, temps, function parameters, etc. And cast them to uintptr_t when we need to do arithmetic on them.

We may want to have a distinction for the other numerical addresses.

  • Rom address. Personally I would like to propose a RomOffset type, which would be the uintptr_t equivalent for rom addresses, allowing to represent this type, differentiate it from virtual addresses and allow arithmetic on them.
  • Segmented address. @EllipticEllipsis brought up this possibility.
  • Physical address. Isn't this the same as a rom address? 🤔

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