Skip to content

libnds - Improve cardReset for DSi #255

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

Open
Lorenzooone opened this issue Jan 6, 2025 · 3 comments
Open

libnds - Improve cardReset for DSi #255

Lorenzooone opened this issue Jan 6, 2025 · 3 comments
Labels
bug Something isn't working

Comments

@Lorenzooone
Copy link

Making the issue here, since libnds has issues blocked.
Hope it's fine!

On DSi, one can reset the cartridge by simply turning off and then on slot 1.
This could be used to improve cardReset, so it works properly on DSi as well.
0x04004012 and 0x04004014 are the registers handling the timeout of these operations, and they can be changed to make the operation faster.
http://problemkaputt.de/gbatek-dsi-control-registers-scfg.htm

@AntonioND AntonioND added the bug Something isn't working label Jan 6, 2025
@AntonioND
Copy link
Member

AntonioND commented Jan 8, 2025

I assume you have some code in your project that fixes this, what did you do in the end to get it to work? You could also send a PR and we discuss the changes there.

@Lorenzooone
Copy link
Author

Oh no, I simply restored the old one while testing stuff... So not really...

@asiekierka
Copy link
Contributor

cardReset() in libnds doesn't really "reset" the cartridge, as that cannot be done on NDS without ejection/reinsertion, while on DSi this requires controlling power to the slot.

See https://github.com/NovaSquirrel/WildStorage/blob/main/source/main.c#L254-L285 for an example of a card initialization procedure I wrote in the past. In general, I think a good chunk of card.h needs to be thrown out and reconsidered, with functions that match an user's typical workflow more.

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

3 participants