Path: chuka.playstation.co.uk!news From: Michael Garcia Newsgroups: scee.yaroze.freetalk.english,scea.yaroze.programming.libraries,scee.yaroze.programming.libraries Subject: [ON TOPIC] 'cdrom:' device ???? Date: Fri, 05 May 2000 13:18:38 +1000 Organization: PlayStation Net Yaroze (SCEE) Lines: 199 Message-ID: <39123D8D.699EA972@start.com.au> Reply-To: mgarcia@start.com.au NNTP-Posting-Host: 203.108.136.30 Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 4.5 [en] (Win95; I) X-Accept-Language: en Xref: chuka.playstation.co.uk scee.yaroze.freetalk.english:5762 scea.yaroze.programming.libraries:18 scee.yaroze.programming.libraries:237 Hi all, again :) I am trying to read the CDROM with the ANIS C functions open() read() lseek()... Here is what I am trying to do. /********************** siocons test ************/ #include #include main() { int fd,ret; char f[] = "cdrom:\\DATA\\SOUND\\SAMPLE1.SEQ;1"; char text[1000]; printf("trying to open %s\n",f); fd = open(f,O_RDONLY); if(fd > 0) printf("open worked fd = %d\n",fd); else { printf("open failed fd = %d\n",fd); return; } printf("trying to read %s\n fd = %d\n",f,fd); ret = read(fd,&text,999); printf("ret = %d\n",ret); text[999] = 0; printf("File <%s> CONTAINS \n<%s>\n",f,text); close(fd); } This compiles but hangs when it hits fd = open(f,O_RDONLY); When this is ran using char f[] = "\\DATA\\SOUND\\SAMPLE1.SEQ;1"; // (no device - cdrom: ) it says that - \DATA\SOUND\SAMPLE1.SEQ;1 is not a device then it displays all devices available eg bu: ,tty:, cdrom: and exits. What is the correct device name for the cdrom eg cdrom??: I really don't want to use the CdlFILE functions ! BTW how do you convert CdlLOC type to a int to create a seek fuction? What did I miss? I had a search and it seems that I am not the only one !! see below Subject: Re: Contents of Boot CD Date: Fri, 09 May 1997 07:40:41 -0400 From: Jack Copper Organization: ArcanaTech Newsgroups: scea.yaroze.beginners References: 1 , 2 Mario Perdue wrote: > > Well, you could put the CD into your PC's CDROM drive browse it to see > what's there. You could also look in the PSX/DATA directory where you > installed the NY dev system. The files are all there as well. > > Mario This is the THIRD time I've tried to respond to you... the newsgroup bit bucket keeps eating messages. Anyway, I went ahead and tried programmatic access, but have had no success so far. I'm either doing something wrong (hmmm..) or there is a bug in the library firstfile() function. First, I tried what appeared to be the straightforward thing to do: struct DIRENTRY stBaseDirectory; firstfile( "cdrom:*", &stBaseDirectory); This sends the playstation off into the weeds (reset city), as do "cdrom:\\", "cdrom:\\*", and other variations. However, some other permutations (e.g., "*", "\\*", "CDROM:\\") resulted in an error message that listed devices (something to the effect of:) * is not a valid device valid devices are: cdrom: tty: bu: etc. And, if in fact I use "bu10:*" as the name parameter, I get a reasonable string back for the first "directory" (i.e., I have a memory card in slot 2, and it has the configuration file on it) Any insights? Thanks, Jack Copper the reply .. Subject: Re: Contents of Boot CD Date: Fri, 09 May 1997 13:52:23 GMT From: mperdue@iquest.net (Mario Perdue) Organization: SCEA Net Yaroze News Newsgroups: scea.yaroze.beginners References: 1 , 2 , 3 >This is the THIRD time I've tried to respond to you... the newsgroup bit >bucket keeps eating messages. Sorry, we've been having a little trouble with the news groups. The problem seems to be under control now, and should be fixed shortly. >Anyway, I went ahead and tried programmatic access, but have had no >success so far. I'm either doing something wrong (hmmm..) or there is a >bug in the library firstfile() function. > >First, I tried what appeared to be the straightforward thing to do: > > struct DIRENTRY stBaseDirectory; > firstfile( "cdrom:*", &stBaseDirectory); >This sends the playstation off into the weeds (reset city), as do >"cdrom:\\", "cdrom:\\*", and other variations. > >However, some other permutations (e.g., "*", "\\*", "CDROM:\\") >resulted in an error message that listed devices (something to the >effect of:) > * is not a valid device > valid devices are: > cdrom: > tty: > bu: >etc. >And, if in fact I use "bu10:*" as the name parameter, I get a reasonable >string back for the first "directory" (i.e., I have a memory card in >slot 2, and it has the configuration file on it) > >Any insights? Not really. I havn't worked with this stuff yet, but you can bet I'll be looking at it later today. If I can't figure it out, I'll find someone who can. Mario any help will be greatly appreciated..