Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DSi SD card swaps do not call setSDcallback() or invalidate cache/FatFs structures #224

Open
asiekierka opened this issue Nov 5, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@asiekierka
Copy link
Contributor

It is technically possible to swap out the SD card at runtime on DSi/3DS consoles (and on flash cartridges too, but this is not entirely fixable there), however this will currently lead to potential data corruption, as the cache and mounted filesystem are not invalidated/deinitialized.

This is probably a low priority issue.

@asiekierka asiekierka added the bug Something isn't working label Nov 5, 2024
@profi200
Copy link

profi200 commented Nov 5, 2024

My suggestion here would be to hook this up to some kind of event system. https://github.com/blocksds/libnds/blob/bb1e9e1510752fc1e402bcf5e34614aa54ab06f0/source/arm7/tmio.twl.c#L35

My only worry here is that delaying IRQ handler end even more is not good but since there is only 1 IRQ for status changes there is no other choice than to check for remove/insert status bits.

@asiekierka
Copy link
Contributor Author

We already have the FIFO system, which should be sufficient; SDMMC_INSERT/REMOVE would be received by the ARM9 from the ARM7.

@asiekierka asiekierka changed the title DSi SD card swaps do not invalidate cache/FatFs structures DSi SD card swaps do not call setSDcallback() or invalidate cache/FatFs structures Nov 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants