Skip to content

Create space for 4 bytes copied from ROM filesystem#97

Draft
queueRAM wants to merge 1 commit intogcsmith:mainfrom
queueRAM:filesystem_fixes
Draft

Create space for 4 bytes copied from ROM filesystem#97
queueRAM wants to merge 1 commit intogcsmith:mainfrom
queueRAM:filesystem_fixes

Conversation

@queueRAM
Copy link
Contributor

UVBlockCounts is the first filesystem block that includes counts for all the block types that follow. This is memset to 0 beforehand with size of 0x24, but when DMA from ROM, the block size is defined to be 0x28. This happens to work out since there happens to be 4 bytes padding between this 0x24 and the next struct in memory.

Create a new wrapper struct which explicitly allocates this 4 bytes to keep the code portable.

UVBlockCounts is the first filesystem block that includes counts for
all the block types that follow. This is memset to 0 beforehand with
size of 0x24, but when DMA from ROM, the block size is defined to be
0x28. This happens to work out since there happens to be 4 bytes padding
between this 0x24 and the next struct in memory.

Create a new wrapper struct which explicitly allocates this 4 bytes to
keep the code portable.
@gcsmith gcsmith marked this pull request as draft March 14, 2026 18:20
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.

1 participant