Excellent news!! I have gotten my first simple sdl program working for the GP2X using freepascal, compiled under Win32!!

Someone was able to give me advice

The process requires the fpcbuild source files and the normal freepascal binaries installed, for example v 2.0.4 so you can use the make.exe file included in the fpc\2.0.4\bin\i386-win32 folder to compile the source code.

It also requires the devkitGP2X (http://archive.gp2x.de/cgi-bin/cfile...,0,0,0,14,1362) downloaded and extracted to the rootfolder of a drive (c:\ in my case)

SDL.pas also needs to be slightly modified.

There are lots of instructions so instead of placing them here I will upload the files needed to a server so people can download them and have a play

to wet your appitite though here are some of the script batch files I have used.

I put all the scripts into the project folder and update the CompileProject to point to the files to compile

InitFiles.bat
Code:
Del *.s
Del *.o
Del *.ppu
Del *.gpe
CompileProject.bat
Code:
@echo off
set path=C:\FPC_win32_arm-linux\bin\arm-linux

call InitFiles.bat

rem compile all needed units to allow compiling of main file
call CompileAux.bat SDL.pas

rem compile main file
call CompileMain.bat gp2x_test

call CleanupFiles.bat

pause
CompileAux.bat
Code:
echo compiling %1...
ppcrossarm -dgp2x %1
CompileMain.bat
Code:
echo Compiling %1.dpr
ppcrossarm -s -dgp2x %1.dpr
echo Assembling %1 
arm-linux-as.exe -mcpu=arm920 -o %1.o %1.s
if errorlevel 1 goto asmend
echo Linking %1
arm-linux-ld.exe -static --no-warn-mismatch -s -L. -o%1.gpe link.res -lm -lstdc++ -lgcc_eh -lpthread -lvorbisidec -lmikmod -lpng -lpng12 -lz -lSDL -ljpeg -lfreetype -lc -lgcc
if errorlevel 1 goto linkend
goto end
:asmend
echo An error occured while assembling %1
goto end
:linkend
echo An error occured while linking %1
:end
CleanupFiles.bat
Code:
Del *.s
Del link.res
Del ppas.bat
Del *.o
Del *.ppu

cheers,
Paul.