Need help compiling swiss

Discuss one of the most feature filled GameCube applications here :)
Locked
User avatar
LiquidSebbey
Posts: 12
Joined: Sun May 15, 2022 9:53 am
Location: Netherlands
Contact:

Need help compiling swiss

Post by LiquidSebbey » Sun May 15, 2022 9:57 am

Hi All,

I want to make some changes to Swiss (adding background music in the Swiss menu), so I cloned the repository (git), installed DevkitPro and also installed another bunch of C related libraries to make stuff work.
However, I am unable to Make the project. Gettings errors.
Is there some tutorial out there or someone outthere who can help me out (so that I can create a tutorial)?

The error I am getting currently is:

Code: Select all

linking ... swiss.elf
c:/devkitpro/devkitppc/bin/../lib/gcc/powerpc-eabi/11.2.0/../../../../powerpc-eabi/bin/ld.exe: FrameBufferMagic.o: in function `_DrawTexObjNow':
C:/swiss-gc/cube/swiss/source/gui/FrameBufferMagic.c:620: undefined reference to `GX_GetTexObjTlut'
I am running Windows 10, using Msys2 to Make the project, have DevkitPro installed and PATH seems to be set correctly.
Thanks so far everyone, I am so happy to see this community still alive and the gamecube running after 20 years!

Sebastiaan
User avatar
LiquidSebbey
Posts: 12
Joined: Sun May 15, 2022 9:53 am
Location: Netherlands
Contact:

Re: need: Build tutorial 2022

Post by LiquidSebbey » Sun May 15, 2022 11:24 am

I started the whole process from scratch, and now getting:

Code: Select all

C:/swiss-gc/cube/swiss/source/bba.c:22:23: error: too few arguments to function 'if_config'
Seems that the network file from devkitPro is newer than the current version of swiss is expecting?
User avatar
LiquidSebbey
Posts: 12
Joined: Sun May 15, 2022 9:53 am
Location: Netherlands
Contact:

Re: need: Build tutorial 2022

Post by LiquidSebbey » Sun May 15, 2022 11:36 am

So, i fixed the network file from devkitPro so this gets ignored, but now I'm getting the following error:

Code: Select all

C:/swiss-gc/cube/swiss/source/devices/diskio.c:19:132: error: '__io_gcode' undeclared here (not in a function); did you mean '__io_gcsd2'?
but __io_gcsd2 is already in the array of DISC_INTERFACE?
User avatar
LiquidSebbey
Posts: 12
Joined: Sun May 15, 2022 9:53 am
Location: Netherlands
Contact:

Re: need: Build tutorial 2022

Post by LiquidSebbey » Sun May 15, 2022 11:53 am

After changing the __io_gcode to __io_gcsd2 (just to have a build) I get the following errors:

Code: Select all

linking ... swiss.elf
c:/devkitpro/devkitppc/bin/../lib/gcc/powerpc-eabi/11.2.0/../../../../powerpc-eabi/bin/ld.exe: FrameBufferMagic.o: in function `_DrawTexObjNow':
C:/swiss-gc/cube/swiss/source/gui/FrameBufferMagic.c:590: undefined reference to `GX_GetTexObjMagFilt'
c:/devkitpro/devkitppc/bin/../lib/gcc/powerpc-eabi/11.2.0/../../../../powerpc-eabi/bin/ld.exe: C:/swiss-gc/cube/swiss/source/gui/FrameBufferMagic.c:596: undefined reference to `GX_GetTexObjTlut'
c:/devkitpro/devkitppc/bin/../lib/gcc/powerpc-eabi/11.2.0/../../../../powerpc-eabi/bin/ld.exe: FrameBufferMagic.o: in function `_DrawImageNow':
C:/swiss-gc/cube/swiss/source/gui/FrameBufferMagic.c:555: undefined reference to `GX_GetTexObjTlut'
c:/devkitpro/devkitppc/bin/../lib/gcc/powerpc-eabi/11.2.0/../../../../powerpc-eabi/bin/ld.exe: C:/swiss-gc/cube/swiss/source/gui/FrameBufferMagic.c:472: undefined reference to `GX_GetTlutObjFmt'
c:/devkitpro/devkitppc/bin/../lib/gcc/powerpc-eabi/11.2.0/../../../../powerpc-eabi/bin/ld.exe: FrameBufferMagic.o: in function `_DrawTitleBar':
C:/swiss-gc/cube/swiss/source/gui/FrameBufferMagic.c:1371: undefined reference to `SYS_GetCoreTemperature'
c:/devkitpro/devkitppc/bin/../lib/gcc/powerpc-eabi/11.2.0/../../../../powerpc-eabi/bin/ld.exe: FrameBufferMagic.o: in function `_DrawFileBrowserButton':
C:/swiss-gc/cube/swiss/source/gui/FrameBufferMagic.c:1044: undefined reference to `GX_GetTexObjTlut'
c:/devkitpro/devkitppc/bin/../lib/gcc/powerpc-eabi/11.2.0/../../../../powerpc-eabi/bin/ld.exe: C:/swiss-gc/cube/swiss/source/gui/FrameBufferMagic.c:1164: undefined reference to `GX_GetTexObjTlut'
c:/devkitpro/devkitppc/bin/../lib/gcc/powerpc-eabi/11.2.0/../../../../powerpc-eabi/bin/ld.exe: C:/swiss-gc/cube/swiss/source/gui/FrameBufferMagic.c:1123: undefined reference to `GX_GetTexObjTlut'
c:/devkitpro/devkitppc/bin/../lib/gcc/powerpc-eabi/11.2.0/../../../../powerpc-eabi/bin/ld.exe: FrameBufferMagic.o: in function `DrawLoadBackdrop':
C:/swiss-gc/cube/swiss/source/gui/FrameBufferMagic.c:2123: undefined reference to `TPL_OpenTPLFromHandle'
c:/devkitpro/devkitppc/bin/../lib/gcc/powerpc-eabi/11.2.0/../../../../powerpc-eabi/bin/ld.exe: settings.o: in function `refreshSRAM':
C:/swiss-gc/cube/swiss/source/gui/settings.c:94: undefined reference to `__SYS_CheckSram'
c:/devkitpro/devkitppc/bin/../lib/gcc/powerpc-eabi/11.2.0/../../../../powerpc-eabi/bin/ld.exe: settings.o: in function `settings_toggle':
C:/swiss-gc/cube/swiss/source/gui/settings.c:362: undefined reference to `VIDEO_SetAdjustingValues'
c:/devkitpro/devkitppc/bin/../lib/gcc/powerpc-eabi/11.2.0/../../../../powerpc-eabi/bin/ld.exe: settings.o: in function `show_settings':
C:/swiss-gc/cube/swiss/source/gui/settings.c:847: undefined reference to `VIDEO_SetAdjustingValues'
c:/devkitpro/devkitppc/bin/../lib/gcc/powerpc-eabi/11.2.0/../../../../powerpc-eabi/bin/ld.exe: C:/swiss-gc/cube/swiss/source/gui/settings.c:809: undefined reference to `VIDEO_SetAdjustingValues'
c:/devkitpro/devkitppc/bin/../lib/gcc/powerpc-eabi/11.2.0/../../../../powerpc-eabi/bin/ld.exe: deviceHandler.o: in function `getHwNameByLocation':
C:/swiss-gc/cube/swiss/source/devices/deviceHandler.c:120: undefined reference to `EXI_GetType'
c:/devkitpro/devkitppc/bin/../lib/gcc/powerpc-eabi/11.2.0/../../../../powerpc-eabi/bin/ld.exe: C:/swiss-gc/cube/swiss/source/devices/deviceHandler.c:129: undefined reference to `EXI_GetTypeString'
c:/devkitpro/devkitppc/bin/../lib/gcc/powerpc-eabi/11.2.0/../../../../powerpc-eabi/bin/ld.exe: C:/swiss-gc/cube/swiss/source/devices/deviceHandler.c:129: undefined reference to `EXI_GetType'
c:/devkitpro/devkitppc/bin/../lib/gcc/powerpc-eabi/11.2.0/../../../../powerpc-eabi/bin/ld.exe: C:/swiss-gc/cube/swiss/source/devices/deviceHandler.c:117: undefined reference to `EXI_GetType'
c:/devkitpro/devkitppc/bin/../lib/gcc/powerpc-eabi/11.2.0/../../../../powerpc-eabi/bin/ld.exe: C:/swiss-gc/cube/swiss/source/devices/deviceHandler.c:123: undefined reference to `EXI_GetType'
c:/devkitpro/devkitppc/bin/../lib/gcc/powerpc-eabi/11.2.0/../../../../powerpc-eabi/bin/ld.exe: C:/swiss-gc/cube/swiss/source/devices/deviceHandler.c:126: undefined reference to `EXI_GetType'
collect2.exe: error: ld returned 1 exit status
make[2]: *** [/c/swiss-gc/cube/swiss/Makefile:43: /c/swiss-gc/cube/swiss/swiss.elf] Error 1
rm images.tpl buttons.tpl
make[1]: *** [Makefile:172: build] Error 2
make[1]: Leaving directory '/c/swiss-gc/cube/swiss'
make: *** [Makefile:56: compile] Error 2
Now I am out of options...
User avatar
Extrems
Posts: 1312
Joined: Tue Aug 17, 2010 10:40 pm
Location: Québec, Canada
Contact:

Re: need: Build tutorial 2022

Post by Extrems » Sun May 15, 2022 2:23 pm

You need to use libogc2, not libogc.
User avatar
LiquidSebbey
Posts: 12
Joined: Sun May 15, 2022 9:53 am
Location: Netherlands
Contact:

Re: need: Build tutorial 2022

Post by LiquidSebbey » Sun May 15, 2022 7:17 pm

Extrems wrote:
Sun May 15, 2022 2:23 pm
You need to use libogc2, not libogc.
I added the libogc2 folder, but no success yet. What am I doing wrong?
- installed devkitpro (Windows installer https://github.com/devkitPro/installer/ ... -3.0.3.exe)
- git cloned the swiss sources (git clone https://github.com/emukidid/swiss-gc.git)
- added the libogc2 folder (and also run Make in this folder) from https://github.com/extremscorner/libogc2
- checked the PATH, seems all fine? (DEVKITARM, DEVKITPPC, DEVKITPRO, DEVKITPPC and PORTLIBS_PATH)

devkitpro is installed on C:\devkitpro\
swiss-gc is cloned to c:\swiss-gc\
User avatar
Extrems
Posts: 1312
Joined: Tue Aug 17, 2010 10:40 pm
Location: Québec, Canada
Contact:

Re: need: Build tutorial 2022

Post by Extrems » Sun May 15, 2022 10:16 pm

Have you "make install" libogc2?
User avatar
LiquidSebbey
Posts: 12
Joined: Sun May 15, 2022 9:53 am
Location: Netherlands
Contact:

Re: need: Build tutorial 2022

Post by LiquidSebbey » Mon May 16, 2022 5:04 am

That did it! Amazing! I was able to compile now and test it in Dolphin! Expect a tutorial soon from me to the community for new people who want to discover this! :-)
DavidRGZ
Posts: 9
Joined: Sat May 14, 2022 8:00 pm

Re: need: Build tutorial 2022

Post by DavidRGZ » Mon May 16, 2022 7:56 pm

Awesome, did you add music to main menu? Could you share the link to your swiss.dol modified file so we can download it?
User avatar
Extrems
Posts: 1312
Joined: Tue Aug 17, 2010 10:40 pm
Location: Québec, Canada
Contact:

Re: need: Build tutorial 2022

Post by Extrems » Mon May 16, 2022 8:32 pm

Note that this would be pretty much guaranteed to decrease sound quality in games due to a hardware bug.
User avatar
LiquidSebbey
Posts: 12
Joined: Sun May 15, 2022 9:53 am
Location: Netherlands
Contact:

Re: need: Build tutorial 2022

Post by LiquidSebbey » Tue May 17, 2022 1:03 pm

The music will only play in Swiss menu, when a DOL is launched I want it to stop playing MP3.
The MP3 player is already included in Swiss, so I am using that code to achieve it. So, why would it decrease audio quality in-game?

When its ready, ill make a new thread and post the file. I am out of the city for a couple of days, when I return I'll continue this.
User avatar
LiquidSebbey
Posts: 12
Joined: Sun May 15, 2022 9:53 am
Location: Netherlands
Contact:

Re: need: Build tutorial 2022

Post by LiquidSebbey » Wed May 18, 2022 7:43 pm

So, back in town I put the GCI file on the memory card again (using a Wii), loaded up my usual shinehax and.... the screen kept black. The already available gci and dol files are working fine. Still investigating...
DavidRGZ
Posts: 9
Joined: Sat May 14, 2022 8:00 pm

Re: need: Build tutorial 2022

Post by DavidRGZ » Thu May 19, 2022 4:49 am

LiquidSebbey wrote:
Wed May 18, 2022 7:43 pm
So, back in town I put the GCI file on the memory card again (using a Wii), loaded up my usual shinehax and.... the screen kept black. The already available gci and dol files are working fine. Still investigating...
I use a Gamecube, could you just share the swiss dol file so we can try it? Some of us dont use GCI exploits, just Xeno and burned DVD, thanks.
User avatar
LiquidSebbey
Posts: 12
Joined: Sun May 15, 2022 9:53 am
Location: Netherlands
Contact:

Re: need: Build tutorial 2022

Post by LiquidSebbey » Thu May 19, 2022 11:29 am

When I have a working DOL running on the cube (I have a wau to test it, but it takes over 10 minutes each build to test) I will share it here.
Mission log:
1. Make swiss compile locally and test run the DOL on Dolphin
2. Run the DOL on an actual gamecube (running from a working GCI and adding it as boot2.dol on the SP2SD card so it autoboots my own compiled version when original swiss is loaded)
3. Make changes on code and repeat the process as step 2

So, when I reach step 3 and have minor code changes that work playing music, (my attempt is to play "background.mp3" using the play_mp3 function), i'll share my DOL with you guys!
User avatar
LiquidSebbey
Posts: 12
Joined: Sun May 15, 2022 9:53 am
Location: Netherlands
Contact:

Re: need: Build tutorial 2022

Post by LiquidSebbey » Fri May 20, 2022 7:25 pm

MP3 playing swiss build can be found in https://www.gc-forever.com/forums/viewt ... =25&t=5181
Tutorial coming soon, this thread can be closed. Title of post can be changed in "Need help compiling swiss", thanks admins! :mrgreen:
Locked