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

NCER: implement TACU(UCAT) #1

Open
red031000 opened this issue Jul 28, 2023 · 3 comments
Open

NCER: implement TACU(UCAT) #1

red031000 opened this issue Jul 28, 2023 · 3 comments

Comments

@red031000
Copy link
Owner

vram transfer is set immediately after the OAM, and is present if the vram transfer pointer in the CBEK(KEBC) header is not null, located as a u32 at 0x10 in the header (not including magic and size)

format for vram transfer info is as follows

u32 sizeToTransfer;
Data *dataPtr;

Data format is as follows

u32 dataOffset;
u32 size;

TACU(UCAT) is a user specified extended attribute information format, with very limited to no documentation on it. whether it is present is somewhat random, and depends on the options the NCER was created with. TACU is located directly after vram transfer, and just before the LBAL section

the format for TACU is as follows

u32 magic = "TACU";
u32 size;
u16 numCells;
u16 numAttributes;
u32 *cellAttributePtr;
u32 cellAttributes[];

the TACU is padded to 0x10 (as far as I can tell, assuming that the padding is not relevant information), not including the magic and size

@turtleisaac
Copy link
Contributor

the vram transfer pointer is a u32 at 0x24 in the NCER file (including the generic nitro header, and the magic and size at the start of the KBEC section), so that wouldn't be 0x10

@turtleisaac
Copy link
Contributor

turtleisaac commented Jul 28, 2023

after comparing output from my own NCER writing code and some original files, figured out the offset of the TACU section is a u32 at 0x2C in the entire NCER file, and the value stored is relative to start of KBEC + 8.

(so therefore TACU pointer is at 0x1c relative to start of KBEC, aka it is 8 bytes after the vram transfer pointer)

@red031000
Copy link
Owner Author

vram transfer added in, TACU still TODO

@red031000 red031000 changed the title NCER: implement TACU(UCAT) and vram transfer NCER: implement TACU(UCAT) Nov 9, 2024
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

No branches or pull requests

2 participants