Skip to content

Conversation

@Luminyx1
Copy link
Contributor

@Luminyx1 Luminyx1 commented Dec 3, 2025

Related PR: decompme/compilers#51

@mkst
Copy link
Collaborator

mkst commented Dec 3, 2025

Great stuff - thanks for this!

Could you add "wiiu": "ppc" to this dict: https://github.com/decompme/decomp.me/blob/main/backend/coreapp/m2c_wrapper.py#L18

@mkst
Copy link
Collaborator

mkst commented Dec 3, 2025

Tweaked the SVG slightly - think it'll be better to use the full width:
wiiu

edit ignore this svg as it looks crap on the site... but my point still stands about maximising the width

@mkst
Copy link
Collaborator

mkst commented Dec 3, 2025

Just tried to run this locally and get

Failed to resolve path to guest program /backend/compilers/wiiu/ghs5.3.22/cxppc.exe

looks like the path is wrong (needs /bin):

cc='${WIBO} "${COMPILER_DIR}/bin/cxppc.exe" -c ${COMPILER_FLAGS} -o "${OUTPUT}" "${INPUT}"'

edit
but then hit:

wibo: call reached missing import 115 from WS2_32

edit2
tried with wine but got

compiler: Cannot create file: \gh_101.s

which seems to be because the compiler is implicitly passed --gh_out \gh_101.s:

Z:\backend\compilers\wiiu\ghs5.3.22\bin\ecomppc.exe --option=70 \
        --multi_version v50 -X722 -X682 -X735 -X780 -Z1715 -X1165 --c \
        --gnu=safe -Z1835 --diag_warning=223 --diag_warning=1547,1791 -Z1840 \
        --config \
        f,f,us,,2,4,4,8,4,2,4,4,8,4,8,32,4,8,8,4,8,8,-1,t,f,-1,i,ui,1,f,t,1,1,32,1,32,416,8,6,f,26,0,0 \
        --option=30 --option=40 --gnu_version=40300 -$ -X70 -X1532 -X1602 \
        --option=124 --alternative_tokens --diag_remark=667,1546 \
        --pragma_diag_level=warn --display_error_number -Z4024 -X78 -X947 \
        -Z3535 -X3536 -Z479 -Z1250 -X566 -X3362 -X2867 -X2869 -X2868 \
        --long_long -Z1208 -X445 -X777 -Z1161 -X1312 -cpu=espresso -X1579 \
        --option=217 --option=59 -X4649 -X4658 -X1024 -Z1177 -Z2800 -Z2799 \
        -Z1958 -X2581 -Z332 -Z4105 -Z4502 -Z4503 -X1664 \
        --thread_local_storage -X4559 -X4574 -X4572 -X3838 -D__PROTOTYPES__ \
        -D__STDC__=0 -D__STDC_HOSTED__=1 -D__STDC_VERSION__=199409L \
        -D__ATTRIBUTES -D__EDG__ -D__ghs -D__ghs__ -D__ghs_asm -D__ELF \
        -D__ELF__ -D__PowerPC -D__PowerPC__ -D__ppc -D__ppc__ -D__powerpc__ \
        -D__espresso__ -D__espresso -D__PPC_FSEL__ -D__PPC_SUPPORT_PS \
        -D__ghs_alignment=8 -D__ghs_max_pack_value=32 -D__ghs_sda -D__ghs_zda \
        -D__BigEndian -D__BigEndian__ -D__BIG_ENDIAN__ -D__DOUBLE_HL \
        -D__DOUBLE_HL__ -D__IeeeFloat -D__IeeeFloat__ -D__Char_Is_Unsigned__ \
        -D__CHAR_UNSIGNED__ -D__Ptr_Is_Unsigned__ -D__Field_Is_Unsigned__ \
        -D__Enum_Field_Is_Signed__ -D__Int_Is_32 -D__Long_Is_32 -D__LL_Is_64 \
        -D__Ptr_Is_32 -D__CHAR_BIT=8 -D__SHRT_BIT=16 -D__INT_BIT=32 \
        -D__LONG_BIT=32 -D__WCHAR_BIT=16 -D__PTR_BIT=32 -D__FUNCPTR_BIT=32 \
        -D__LL_BIT=64 -D__LLONG_BIT=64 -D__MAX_BIT=64 -D__LDBL_BIT=64 \
        -D__LDBL_SIZE=8 -D__REG_BIT=32 -D__FREG_BIT=64 -D__Reg_Is_32 \
        -D__WChar_Is_Unsigned__ -D__WChar_Is_Short__ \
        -IZ:\backend\compilers\wiiu\ghs5.3.22\bin\include\ppc \
        -IZ:\backend\compilers\wiiu\ghs5.3.22\bin\ansi -X1189 -X1610 -X1116 \
        -Z1875 -D__LANGUAGE_C -D__LANGUAGE_C__ --gh_out \gh_101.s -X3075 \
        --gh_outbin /tmp/object.o /tmp/code.c
compiler: Cannot create file: \gh_101.s
rm -f \gh_101.s
rm -f /tmp/object.o

@Luminyx1
Copy link
Contributor Author

Luminyx1 commented Dec 3, 2025

  • Added "wiiu": "ppc" to the dict
  • The SVG is strange, for some reason it doesn't scale properly despite the CSS trying to make it 40x40 so I just made it small to not get cut off. Not really sure how to make it look good, sorry
  • Fixed the path by adding /bin
  • Switched from wibo to wine
  • Not sure why that's happening. Could you also provide the initial cxppc.exe invocation command it's doing? Also what method did you use to capture the ecomppc.exe one ther?

@mkst
Copy link
Collaborator

mkst commented Dec 3, 2025

I just created a simple scratch locally to test the change. The invocation output is from passing -v. I'm not sure how to set the path for the temporary assembly file. Maybe an env variable, maybe a hidden flag...

@Luminyx1
Copy link
Contributor Author

Luminyx1 commented Dec 3, 2025

I think -tmp=... can do it? Idk which value would be appropriate for the server deployment though

@mkst
Copy link
Collaborator

mkst commented Dec 3, 2025

Could try just -tmp=/tmp? I'm not at a computer else I'd try it out

@mkst
Copy link
Collaborator

mkst commented Dec 3, 2025

I think this is better (tested locally):

GHS5322 = GHSCompiler(
    id="ghs5.3.22",
    platform=WIIU,
    cc='${WINE} "${COMPILER_DIR}/bin/cxppc.exe" -c -tmp="${OUTPUT}".s ${COMPILER_FLAGS} -o "${OUTPUT}" "${INPUT}"'
)

@mkst
Copy link
Collaborator

mkst commented Dec 3, 2025

For the biome and ruff, I would do the following (assuming you have done docker compose up.

docker compose exec -ti backend uv run ruff format coreapp

docker compose exec -ti frontend yarn format

if you want I can run these and push a commit with the changes.

@Luminyx1
Copy link
Contributor Author

Luminyx1 commented Dec 3, 2025

Yes that would be appreciated, thank you

@mkst
Copy link
Collaborator

mkst commented Dec 4, 2025

Hmm, looks like you didnt allow edits by maintainers? If you want to make the changes manually the diff is here. or if you allow edits I can push to your branch.

@Luminyx1
Copy link
Contributor Author

Luminyx1 commented Dec 4, 2025

I have applied the changes

@mkst
Copy link
Collaborator

mkst commented Dec 6, 2025

OK I've fixed up the SVG properly (I thought mine was broken, but yours was too):

<?xml version="1.0" encoding="UTF-8"?>
<svg version="1.1" viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg">
 <path d="m12.005 11.124c0 6.7553 7.9892 5.7888 7.9892 1.0654v-11.189h-7.9892z" clip-rule="evenodd" fill="#02abca" fill-rule="evenodd"/>
 <path d="m1 18.218c0 3.3391 2.3053 5.3255 5.68 5.3255h19.171c2.8459 0 5.1492-1.9666 5.1492-4.7927v-14.024c0-1.7032-1.0545-3.7273-2.625-3.7273h-4.875v11.887c0 8.7636-15.044 8.518-15.044 0v-11.887h-3.3668c-2.1964 0-4.0838 1.3864-4.0838 3.549z" clip-rule="evenodd" fill="#02abca" fill-rule="evenodd"/>
</svg>

e.g.
image

@Luminyx1
Copy link
Contributor Author

Luminyx1 commented Dec 6, 2025

Updated

@mkst mkst merged commit c0c00b1 into decompme:main Dec 7, 2025
6 of 7 checks passed
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

Successfully merging this pull request may close these issues.

2 participants