@WILL

my xbox is softmodded so it can run unsigned code.

For instance the entrypoint of the xbe is _WinMainCRTStartup. This function is implemented in the unit sysinitunit, a precompiled unit in the rtl, all it does is set some booleans and then call PASCAL_MAIN which is the begin end. part of a program unit.

If I declare this function in my program.pas it seems to work untill it tries to call a method from a unit in the rtl or fcl.

From my preliminary dissecting of the xbe file the address of the entry point is correct even when the entrypoint is in the sysinitunit unit. perhaps it is having trouble resolving PASCAL_MAIN.

@savage

I mean the units that are compiled just after the compiler is built like system, sysutils, classes etc, all the units that are part of the rtl and fcl.