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

Extracting graphics from elf file/Decompiling elf files? #13

Open
StickyChannel92 opened this issue May 2, 2024 · 1 comment
Open

Comments

@StickyChannel92
Copy link

I'd like to know how to extract graphics from an .elf file? I can press [I] in Siftulator in order to view the graphics bank currently loaded. Unfortunately I can't quite get the Zoom level to perfectly align 1:1 in pixel ratio to the Asset flash.

@StickyChannel92 StickyChannel92 changed the title Extracting graphics from elf file? Extracting graphics from elf file/Decompiling elf files? May 2, 2024
@AlexGuo1998
Copy link
Contributor

I can't quite remember, but you may be able to figure it out yourself by compiling some demos.

According to the asset workflow, assets are first run through stir to generate C++ structs in assets.gen.cpp, then compiled and linked together with other code into the final object file.

There are 2 parts for a image, first is Sifteo::AssetGroup, which contains tile pixel data (i.e. the data in the "graphics bank"), second is Sifteo::AssetImage, which indicates how those tiles combine into a image.

Having these two dumped and you should be fine, which could be achieved by scanning the elf for struct headers. Also these raw data are compressed, so you have to figure out the compression algorithm to decompress it.

It should also be possible to dump the whole asset flash for a cube after upload finishes, in Siftulator. You can hack and re-compile the SDK for this.

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