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

FEATURE: Instruction output #3

Open
JerryWester opened this issue Aug 26, 2021 · 3 comments
Open

FEATURE: Instruction output #3

JerryWester opened this issue Aug 26, 2021 · 3 comments

Comments

@JerryWester
Copy link

Different from C output (unless I'm mistaken, it's all just header defines), I'd like to have the actual, compilable F3DEX C output. An example of what I'm looking for. Is something like this possible?

@Dragorn421
Copy link

I actually plan to have objex2 directly output C, at some point. (probably not before months, I'm all over the place)

Meanwhile you could use ZAPD to disassemble the zobj z64convert produces to C

Compiling ZAPD may be your main concern if you want to go that route, as there are no released binaries

I posted this recently on the Hylian Modding discord:

as a kind of proof of concept with zapd

decompiling my_object.zobj in the current directory .

my_object.xml:

<Root>
    <File Name="my_object.zobj" Segment="6">
        <DList Name="Cube" Offset="0x180"/>
    </File>
</Root>
tools/ZAPD/ZAPD.out e -i my_object.xml -b . -o my_object_disas

-i my_object.xml means read description from this xml
-b . means search my_object.zobj in .
-o my_object_disas is the output directory

-> my_object_disas/my_object.c

For how to add stuff to the xml see https://github.com/zeldaret/ZAPD/blob/master/docs/zapd_extraction_xml_reference.md

feel free to @ me on the ml64 discord for more info

@z64me
Copy link
Collaborator

z64me commented Aug 26, 2021

This shouldn't require much work, in theory. Were you wanting textures written externally as well or do you think it's okay to embed them?

@JerryWester
Copy link
Author

@z64me embedded works fine. Thanks for the quick response

@Dragorn421 wow, I had no idea ZAPD existed! Thanks a ton for pointing this out to me!

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

3 participants