@WILL

I know almost nothing about x86 instructions or any other platform instructions. The xbox has almost a regular PIII processor; it just has half the amount cache as retail processors.

I will send this to the fpc guys and hope they include it.

I just copied the game boy rtl and stripped out the gameboy stuff. The rtl doesn't currently have any file io or support from the OS for allocationg memory etc, it's a barebones RTL.

@savage

I made a barebones RTL that doesn't link to any libs since there are no libs on the xbox and all programs are statically linked. Then I modified fpcmake to generate Makefiles that support xbox and ran fpcmake on the fpc source tree. then I compiled fpc with this:

make PP=ppc386 CROSSOPT="-Xe -XPi386-pc-xbox-" CPU_TARGET=i386 OS_TARGET=xbox all

(the -Xe shouldn't be needed but for now it's needed just to build the crosscompiler.)

The rtl builds fine and the fcl but it fails at freevision but at this point I have the rtl and fcl and a crosscompiler. Then I made a program which just writes to the video framebuffer memory and then calls a xbox kernel function imported by ordinal.

It compiles like so:

ppcross386 -Txbox -WB00010000 program.pas

$10000 is the base address at which xbe's are loaded.

At this point the program.exe is converted with cxbe to program.xbe and the file can be copied to the xbox and run.

I don't link in any way to the official XDK or to OpenXDK. I've tried to link to OpenXDK but for some reason it didn't work.

When I link to OpenXDK it compiles fine and the Import address table is filled correctly but when I run the programon the xbox it freezes afaict. I've had no success using the gnu linker ld, but using the internal linker from fpc for win32 I'm able to compile working programs. It's impossible for me to see what is going on in the xbox with no terminal or debugger.

Currently I'm converting the OpenXDK header for the xboxkrnl functions to pascal. This is giong well so far. Now I can Eject the dvd tray

Regards,

Andrew