an .elf file is oviously a file with such an extension. and that's because it is an ELF file; that means that its format is "Executable and Linkable Format". ps2 executables are ELF files and the demo ones also have an extension accordingly. the ps2 executables from games have strange names, but one can distinguish them by looking into the system.cnf file on the game cd/dvd. that file contains a reference to the ELF file: smth. like BOOT2=cdrom0:sl...<--THAT is the ELF file. pcsx2 can get it from the cd/dvd. for nsx2 you have to extract and load it.
code1: i doubt you did something usefull. romdir tool is for extracting files out of bioses or ioprp images, witch is not the case here

ioprp images contains elfs, but irx-elfs used by the IOP. the current matter is how to extract the main elf for the main ps2 proc i.e. EE. [see above]
if you did not understood what i wrote here...forget about...