This information is outdated, but kept for nostalgia.
By Freeman
I've been asked to set up a tutorial of how to build a simple gc dol using the ogclib. You'll nead these files:
- devkitcube-r0.zip ( http://heliscar.com/greg/gamecube.php )
- libogc-2003-06-22.zip ( http://www.dextrose-forum.com/files/gc/source/libogc-2003-06-22.zip )
- pong.zip ( http://www.dextrose-forum.com/files/gc/source/gc/pong.zip )
extract them to c:gc
devkitcube
libogc-2003-06-22
pong
We'll have to edit the pong main file. I usually use Ultraedit ( I find it superior to all other editors ) but any text editor will work. Open c:gcpongmain.c and uncomment these three lines:
#define COLOR_WHITE 0xFF80FF80 #define COLOR_BLUE 0x1DFF1D6B #define COLOR_RED 0x4C554CFF
and add this
#define COLOR_BLACK 0x10801080
I don't add them to the video.h ( as suggested in the file ). You shouldn't edit librarie files.
We'll also have to change the path to the include files.
#include "..libogc-2003-06-22lib ypes.h" #include "..libogc-2003-06-22libvideo.h" #include "..libogc-2003-06-22libmemory.h" #include "..libogc-2003-06-22libpad.h" change(79) vidInit (VID_MODE_640_480_PAL_60_YUV_16); to VIDEO_Init (VIDEO_640X480_PAL60_YUV16); change(80) vidSetFrameBuffer((u32)fb); to VIDEO_SetFrameBuffer (VIDEO_FRAMEBUFFER_BOTH,(u32)fb); change(98) vidWaitRetrace(); to VIDEO_WaitVSync();
Now all we have to do is compile it. In c:gcpong create a make.bat and run it.
@ECHO OFF SET DEVKITCUBE=c:gcdevkitcube SET PATH=%DEVKITCUBE%�in;%PATH% SET PROGNAME=pong powerpc-eabi-elf-gcc -o %PROGNAME%.elf -Wl,-Ttext,0x80003100 -o %PROGNAME%.elf ../libogc-2003-06-22/crt0.s main.c ../libogc-2003-06-22/lib/pad.c ../libogc-2003-06-22/lib/video.c ../libogc-2003-06-22/lib/render.c ../libogc-2003-06-22/lib/audio.c ../libogc-2003-06-22/lib/color.c ../libogc-2003-06-22/lib/debug.c ../libogc-2003-06-22/lib/dvd.c ../libogc-2003-06-22/lib/interrupt.c ../libogc-2003-06-22/lib/random.c ../libogc-2003-06-22/lib/memcard.c if ERRORLEVEL=1 goto error powerpc-eabi-elf-objcopy -O binary %PROGNAME%.elf %PROGNAME%.bin if ERRORLEVEL=1 goto error "..libogc-2003-06-22�in2dol.exe" %PROGNAME%.bin %PROGNAME%.dol if ERRORLEVEL=1 goto error goto end :error echo [[FATAL ERROR]] :end
![[Main Page]](http://www.eurasia.nu/images/svico_t.gif)