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

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

Open
AngheloAlf opened this issue Sep 16, 2023 · 0 comments

Comments

@AngheloAlf
Copy link

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

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

1 participant