Matheus Izvekov writes: > Well to simplify things, imagine i want to implement a cdrom drive > emulator, like daemon-tools, using libcdio. > Do you see the issues now?
No. If you find as you go along that some things are missing and/or better suited in libcdio, it can be put in. (It will go a lot faster though if you submit a patch and a regression tests ;-) One thing others have done is put the support in their packages first to test things out and before suggesting addition to libcdio. > What I am doing is just implementing the > playstation cdrom drive. Some times the user > (a game for example, not the guy on the control pad) will issue a > command to read the whole 2352 bytes of a sector, > and the real psx just accepts and does that correctly, no matter what > kind of sector it is. Okay. Just keep in mind that a raw read, that is, a MMC GP_CMD_READ issued via mmc_read_sectors() with a read type CDIO_MMC_READ_TYPE_ANY, isn't the same as a redbook cd-audio read. I probably need to add another "mode" to cd-read which will help make this more explicit. > > The mmc_* routines issue multimedia commands to a CD-ROM drive. Some > > support for simulating CD-ROM behavior is tolerated but there is only > > so far one can go pretending an image file is a CD-ROM. With some > > effort, possibly one can jimmy up routines to always return false if > > you ask if the media has been changed, but what does it mean to > > "eject" a CD image file? (I think here libcdio returns a status like > > "not supported") > > It seems like a good compromise, although I dont see a dilemma here. Not a dilemma so much as something that can be painstakingly difficult with vanishingly small returns. You want to fake up the 3 or so versions of the MMC INQUIRY commands? > For the operations that dont make sense, just dont implement them like you > said. > And for a CD image file, almost everything makes sense, except maybe > in case of libcdio eject itself. > For an example of this take a look at daemon-tools. And they even > implement ejecting.... > > > > > > > > > The weird thing is that doing the same thing on a image file, > > cddio_read_sector > > > doesnt return an error, but gives some garbage instead. > > > > Perhaps an error should be returned. The weird thing to me is that you > > seem to want to just try any a read of a sector in audio format, > > whether it makes sense or not. There is a saying: garbage in, garbage > > out. > > > > > > _______________________________________________ > > Libcdio-help mailing list > > [email protected] > > http://lists.gnu.org/mailman/listinfo/libcdio-help > > > _______________________________________________ Libcdio-help mailing list [email protected] http://lists.gnu.org/mailman/listinfo/libcdio-help
