Page 1 of 3 123 LastLast
Results 1 to 10 of 25

Thread: Freepascal on the Original XBox

  1. #1

    Freepascal on the Original XBox

    Hi, I've been doing some work at porting fpc so it can make programs that run on the original xbox. Finally I've had some success in compiling a program with fpc that can be converted to an xbe which loads and runs on the xbox.

    It doesn't do anything glamorous, it just draws to the screen and then has the xbox reboot. I've currently made no code to access the controllers or sound card, network etc. unfortunatly programs which link to OpenXDK don't run However it is possible to import all the xbox kernel exports so at least everything that is done in openxdk can be done with fpc.

    Andrew

  2. #2

    Freepascal on the Original XBox

    Excellent work Andrew!
    cheers,
    Paul

  3. #3

    Freepascal on the Original XBox

    Exelent 1? post :shock:
    From brazil (:

    Pascal pownz!

  4. #4

    Freepascal on the Original XBox

    Sounds very cool! It must have been a lot of hard work to get anything working at all so I'm impressed.
    I still use my XBox sometimes as a mediaserver.
    ZGameEditor - Develop 64kb games for Windows.
    Thrust for Vectrex - ROM-file and 6809 source code.

  5. #5

    Freepascal on the Original XBox

    This is excellent news!
    If this could be expanded, FreePascal would startto rival lots of commercial compilers for console development.
    <br /><br />There are a lot of people who are dead while they are still alive. I want to be alive until the day I die.<br />-= Paulo Coelho =-

  6. #6

    Freepascal on the Original XBox

    Hi Andrew,
    Can you post details about how you got to the point you are at right now and what errors you get when linking to the XDK. Maybe Steve who works for Crome Studios and has written commercial XBox games could provide some insight.
    <br /><br />There are a lot of people who are dead while they are still alive. I want to be alive until the day I die.<br />-= Paulo Coelho =-

  7. #7
    Co-Founder / PGD Elder WILL's Avatar
    Join Date
    Apr 2003
    Location
    Canada
    Posts
    6,107
    Blog Entries
    25

    Freepascal on the Original XBox

    Wow, thats really quite excellent!

    Was there any needed additions to the x86 instruction set for Coppermine or was it all pretty much just the rtl that needed the work?

    Also, will this work get sent in to the FPC guys to add to the amassing amount of platforms that this bad-boy is packing in?


    I think this might call for a Platform Support Guide update soon.
    Jason McMillen
    Pascal Game Development
    Co-Founder





  8. #8

    Freepascal on the Original XBox

    FPC :shock:
    we are able to use pascal power on many consoles / OS :twisted:
    From brazil (:

    Pascal pownz!

  9. #9

    Freepascal on the Original XBox

    @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

  10. #10
    Co-Founder / PGD Elder WILL's Avatar
    Join Date
    Apr 2003
    Location
    Canada
    Posts
    6,107
    Blog Entries
    25

    Freepascal on the Original XBox

    Ah, sounds to me like you sort of made a start of the XBox platform like how I started with the GBA one. Well... I didn't get as far with it as Legolas took it, or you with the XBox (if your actually able to run programs at some capacity) but I like you had no idea how to 'add' instructions or any of that to the FPC compiler.

    Luckily though, I think that with some of the platform support documentation that the FPC guys have put up on their site, it has really helped to make these sort of ports accessible for us as the end users to do.

    What are you using to send over your executables to the physical machine? Is yours modded or do you have some equipment?

    btw, are you the same 'drewski' from IRC? I think we may have even had a chat on there once or twice.
    Jason McMillen
    Pascal Game Development
    Co-Founder





Page 1 of 3 123 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Comodo SSL