Basically, you load (and execute?) the "libps.exe" file,
libps.exe is like the DLL preloaded into RAM, IIRC it's just a normal PSX-EXE file with the library object code, I dont think its runnable tho, I haven't checked.
and then load and execute the "yaroze coff" file?
No, TMK the ECOFF is PC-DOS side only format, Siocons (the DOS application which sends the ECOFF to the Net Yaroze) reads the ECOFF and it converts it to ELF and then sends that to Net Yaroze MON.EXE PS-X EXE brick screen terminal program running on the playstation... this is the same as what eco2exe does.
Obviously they need to be loaded to different memory addresses... does the coff use a fixed address range, or do you need to deal with the coff relocation entries to map the coff to anywhere where you have free memory?
libps.exe is always loaded to the same address, the ECOFF can be linked and loaded to any address in RAM, like a normal PS-X EXE.
And the coff should be able to call functions in libps.exe...
Yes, well the ECOFF converted to PS-X ELF does.
Is there a function vector table somewhere, or does it need parsing external symbols in the coff's symbol table?
I really dont know, but I would assume the Net Yaroze DOS compiler (ECOFF version of GCC,DJGPP) has the local libps.a (40kb) library as symbol tables pointing to the libps.exe in RAM... this also includes libc functions, so the whole SDK's API is libps.exe(512kb).
Btw. what exactly are "gprmask" and "cprmask[0..3]" in ECOFF?
I dont know, I pretty much just copied what I saw in other peoples code... maybe refer to the DIGITAL UNIX docs above?
Net Yaroze Code warrior isn't ECOFF, the debug binaries .pse I couldn't figure out how to process them for yarexe, these are normally not released anyway, but the release binaries .pxe are PS-X ELF binary format, that need a little massaging.
Found out, from the NY usenet:
Subject: Re: Target management
Date: Sun, 27 Jul 97 01:12:33 GMT
From: Joel Sumner <
[email protected]>
Newsgroups: scea.yaroze.programming.codewarrior
>What is going on with the .pse files. What are these puppies? The target
>file under Target/MIPS Project is specified as a .pse file, yet .pxe files
>are created as well and these are the playstation executables. Any
>enlightenment?
I think this is buried in the Targeting PlayStation manual somewhere around
the description for the MIPS Linker Panel in the IDE. The .pse file is a
combination of the executable code and the debug information (encapsulated in
ELF/DWARF format in case you were wondering). This file is used by the
debugger.
The .pxe file is in the format PSX-EXE which is a Sony format for Playstation
Executable files. This is the file which would go on a CD that the
professionals create. This is just the program code without any debug symbols.
The PlayStation Postlinker turns a .pse file into a .pxe file.
For some reason, SIOCONS doesn't support PSX-EXE format, only ECOFF (which the
GNU tools generate). Thus, you need to use PSComUtil to download the .pxe
files. If I get a spare second, I'll post the PSX-EXE file format up
somewhere. Is anyone interested in it?
-Joel
I dont know what the Pro code warrior does tho.
So, I would guess the reason Net Yaroze (GCC/DJGPP) used ECOFF is maybe because there was a ECOFF version of GDB and ELF/DWARF didn't exist in early 90's GCC/GDB or MIPS support?... I'm not too sure. Net Yaroze GDB (DOS app) uses the HSS protocol (hssutils-0.1.2), and the Net Yaroze side of remote debugger is HSS.EXE (Net Yaroze PS-X EXE app).
Sony shared the GNU code and patches for GCC/GDB and Siocons
I uploaded GCC/GDB here:
https://archive.org/details/NetYaroze-GNU-SOURCES