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

SD cluster size incorrectly detected #7

Open
RocketRobz opened this issue May 14, 2021 · 3 comments
Open

SD cluster size incorrectly detected #7

RocketRobz opened this issue May 14, 2021 · 3 comments
Labels
bug Something isn't working

Comments

@RocketRobz
Copy link
Member

While testing libslim in TWLMenu++, when launching a game, it says the SD cluster size isn't 32KB.

@RocketRobz RocketRobz added the bug Something isn't working label May 14, 2021
@chyyran
Copy link
Contributor

chyyran commented Mar 18, 2022

relevant lines:

#define BPB_SecPerClus 13 /* Cluster size [sector] (BYTE) */

buf->f_bfree = nclust * fat->csize;

return fs->database + (LBA_t)fs->csize * clst; /* Start sector number of the cluster */

Maybe we need to manually set this..? How does TWLMenu++/nds-bootstrap determine cluster size

@RocketRobz
Copy link
Member Author

RocketRobz commented Mar 18, 2022

It checks for f_bsize:

if (f_bsize < (32 << 10))

@chyyran
Copy link
Contributor

chyyran commented Mar 18, 2022

Which is configured here:

#define ELM_SS(fs) ((fs)->ssize)

buf->f_bsize = ELM_SS(fat);

#define FF_MAX_SS 512

Probably need to set this so the equation balances properly, could possibly be a source of bugs with libslim

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