Skip to content

HALTCNT accesses should only work via BIOS code #2309

Closed
@fleroviux

Description

@fleroviux

I found two edge-cases when accessing HALTCNT:

  1. writes to HALTCNT seem to not work when R15 is not inside the BIOS region. I.e. on hardware a direct write from IWRAM or ROM code to HALTCNT doesn't appear to have any effect, but performing a CpuSet to it appears to work.
  2. writing a halfword to HALTCNT & ~1 appears to work on HW but doesn't seem to work on mGBA?

I attached a test ROM which I used to confirm the behavior on AGB-001, AGS-100 and a N3DS.
The first value should be around 2, the second should be around 1038 but the exact values don't matter.

haltcnt.zip

Metadata

Metadata

Assignees

No one assigned

    Labels

    pendingThis issue needs more investigation by a maintainer to triage appropriately

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions