Skip to content

Bug when decoding gSPSetOtherMode/gsSPSetOtherMode macro on gfxdis.f3dex #21

@AngheloAlf

Description

@AngheloAlf

The following gfx data produces no output on gfxdis.f3dex

0xBA000018 0x0000ECF0
0xB9000003 0x00504244

Example:

$ gfxdis.f3dex -d BA0000180000ECF0B900000300504244
{
}

Passing the -i flag produces macros that are not part of the official gbi.h

$ gfxdis.f3dex -i -d BA0000180000ECF0B900000300504244
{
    gsSPSetOtherModeHi(0, 24, G_AD_DISABLE | G_CD_DISABLE | G_CK_NONE | G_TC_FILT | G_TF_BILERP | G_TT_IA16 | G_TL_TILE | G_TD_CLAMP | G_TP_NONE | G_CYC_1CYCLE | G_PM_NPRIMITIVE),
    gsSPSetOtherModeLo(G_MDSFT_ALPHACOMPARE, 3, G_AC_NONE | G_ZS_PRIM | G_RM_XLU_SURF | G_RM_XLU_SURF2),
}

Tharo explained to me those are custom helper macros.

Since gfxdis is used heavily on decomp projects it would be very nice if it could output the corresponding gsSPSetOtherMode(G_SETOTHERMODE_H, ... and gsSPSetOtherMode(G_SETOTHERMODE_L, ..., even if it was behind a flag and the helper macros were preserved.

Tested on gfxdis-0.6

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions