Skip to content

dstt: add DMA support#162

Merged
Gericom merged 2 commits into
LNH-team:developfrom
lifehackerhansol:dstt-dma
May 10, 2026
Merged

dstt: add DMA support#162
Gericom merged 2 commits into
LNH-team:developfrom
lifehackerhansol:dstt-dma

Conversation

@lifehackerhansol
Copy link
Copy Markdown
Contributor

This PR comes in two parts.

Previously the main patch (prior to CMD12) was 0x78 bytes, which caused some games to fail to load.

It has been split into 4 sections:

  • IReadSectorsPatchCode entrypoint
  • Apply 0x54 command
  • Wait for data ready loop
  • Transfer data loop

This fixes most of the issues seen in #111 , except games that require DMA.

Additionally, the CMD12 command has been split into its own file. Which is then used in the DMA patch code, which fully resolves #111.

@lifehackerhansol
Copy link
Copy Markdown
Contributor Author

Currently this isn't checking for contiguous blocks properly, so this patch may break on fragmented SDs. working on it

@lifehackerhansol
Copy link
Copy Markdown
Contributor Author

This is now fixed.

Comment thread arm9/source/patches/platform/dstt/DsttReadSdDmaPatchCode.h Outdated
Comment thread arm9/source/patches/platform/dstt/DsttReadSdDmaPatchCode.s Outdated
Comment thread arm9/source/patches/platform/dstt/DsttReadSdWaitDataReadyPatchCode.s Outdated
Comment thread arm9/source/patches/platform/dstt/DsttReadSdDmaPatchCode.s Outdated
Comment thread arm9/source/patches/platform/dstt/DsttReadSdWaitDataReadyPatchCode.s Outdated
Comment thread arm9/source/patches/platform/dstt/DsttReadSdWaitDataReadyPatchCode.s Outdated
Comment thread arm9/source/patches/platform/dstt/DsttReadSdHelperPatchCode.s Outdated
Comment thread arm9/source/patches/platform/dstt/DsttReadSdTransferDataPatchCode.s Outdated
@lifehackerhansol lifehackerhansol force-pushed the dstt-dma branch 3 times, most recently from d984ddc to b7deba3 Compare May 3, 2026 10:18
Comment thread arm9/source/patches/platform/dstt/DsttReadSdHelperPatchCode.s
Comment thread arm9/source/patches/platform/dstt/DsttReadSdHelperPatchCode.s
Comment thread arm9/source/patches/platform/dstt/DsttReadSdHelperPatchCode.s
Comment thread arm9/source/patches/platform/dstt/DsttReadSdHelperPatchCode.s Outdated
Comment thread arm9/source/patches/platform/dstt/DsttReadSdHelperPatchCode.s
@lifehackerhansol lifehackerhansol force-pushed the dstt-dma branch 2 times, most recently from 14f01fd to 817559f Compare May 3, 2026 11:41
Comment thread arm9/source/patches/platform/dstt/DsttReadSdDmaPatchCode.h Outdated
@Gericom
Copy link
Copy Markdown
Contributor

Gericom commented May 3, 2026

Could you also update the changelog (rebase first). The change in patch size is a fix and the dma an addition.

Previously the main patch (prior to CMD12) was 0x78 bytes, which caused
some games to fail to load.

It has been split into 2 sections:
- IReadSectorsPatchCode entrypoint
- A helper function that contains 3 patches:
  - Apply 0x54 command
  - Wait for data ready loop
  - Transfer data loop

Additionally, the CMD12 command has been split into its own file, in
order to reuse this patch code in the future.
Comment thread arm9/source/patches/platform/dstt/DsttReadSdDmaPatchCode.h Outdated
@Gericom Gericom merged commit e227cff into LNH-team:develop May 10, 2026
17 checks passed
@lifehackerhansol lifehackerhansol deleted the dstt-dma branch May 10, 2026 09:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

DSTT Pico Loader 1.5.0 list of games that do not load (attached)

2 participants