notaz / pcsx_rearmed

ARM optimized PCSX fork
GNU General Public License v2.0
392 stars 210 forks source link

'Error opening CD-ROM plugin!' when using -cdfile #16

Closed OmegaPhil closed 11 years ago

OmegaPhil commented 11 years ago

I think I've already donated, but regardless thankyou again for making the first usable libre PSX emulator.

Since I'm getting back into FFVIII, I decided to knock up a command to start it up from a save state in one go. Unfortunately the following pndrun.sh command fails:

/usr/pandora/scripts/pnd_run.sh -p /media/pandora_1/pandora/menu/pcsx_rearmed_r18.pnd -e pcsx.sh -b pcsx_rearmed -a '-cdfile "/media/pandora_2/files/games/Final Fantasy VIII/Final Fantasy VIII (Europe) (Disc 3).cue"'

The following is logged:

=======================================================================================
PND             : /media/pandora_1/pandora/menu/pcsx_rearmed_r18.pnd
PND_FSTYPE      : Squashfs
APPDATADIR      : /media/pandora_1/pandora/appdata/pcsx_rearmed
APPDD_FSTYPE    : ext2
PND_CPUSPEED    : <unset>
EXENAME         : pcsx
ARGUMENTS       : -cdfile "/media/pandora_2/files/games/Final Fantasy VIII/Final Fantasy VIII (Europe) (Disc 3).cue"
=======================================================================================
[ START ]--- Mount the PND ----------
Mounting : mount -t squashfs -o ro "/dev/loop0" "/mnt/utmp/pcsx_rearmed"
Mounting the Union FS : mount -t aufs -o exec,dirs="/media/pandora_1/pandora/appdata/pcsx_rearmed=rw+nolwh":"/mnt/pnd/pcsx_rearmed=rr" none "/mnt/utmp/pcsx_rearmed"
[SUCCESS]--- Mount the PND ----------
[ START ]--- Starting the application (pcsx -cdfile "/media/pandora_2/files/games/Final Fantasy VIII/Final Fantasy VIII (Europe) (Disc 3).cue") ----------
warning: failed to do hugetlb mmap (0x80000000, 2162688): 12
xenv: X vendor: The X.Org Foundation, rel: 10704000, display: :0.0, protocol ver: 11.0
xenv: display is 800x480
fbdev: /dev/fb0: 800x480@16
fbdev initialized.
fbdev: switching to 640x512@16
fbdev: /dev/fb1: 640x512@16
fbdev initialized.
in_evdev: found "keypad" with 84 events (type 00100013)
input: new device #0 "evdev:keypad"
in_evdev: found "nub0" with 3 events (type 00000007)
input: new device #1 "evdev:nub0"
in_evdev: found "nub1" with 3 events (type 00000007)
input: new device #2 "evdev:nub1"
in_evdev: found "gpio-keys" with 16 events (type 00000023)
input: new device #3 "evdev:gpio-keys"
# drv probed binds name
0   0      y     y evdev:keypad
1   0      y     n evdev:nub0
2   0      y     n evdev:nub1
3   0      y     y evdev:gpio-keys
found skin.txt
me_id2offset: id 28 not found
Running PCSX Version 1.9 (Jan  6 2013).
Init new dynarec
Loading memory card ./.pcsx/memcards/card1.mcd
Loading memory card ./.pcsx/memcards/card2.mcd
plugin: plugins/builtin_gpu
plugin: plugins/builtin_spu
plugin: plugins/builtin_pad
plugin: plugins/builtin_pad
Plugins loaded.
Error opening CD-ROM plugin!
[ FAILED]--- Starting the application (pcsx -cdfile "/media/pandora_2/files/games/Final Fantasy VIII/Final Fantasy VIII (Europe) (Disc 3).cue") ----------
[ START ]--- Restoring the frame buffer status ----------
[SUCCESS]--- Restoring the frame buffer status ----------
[ START ]--- uMount the PND ----------
[ START ]--- Waiting the Union to be available ----------
[SUCCESS]--- Waiting the Union to be available ----------
auplink:plink.c:223: AUFS_CTL_PLINK_MAINT: Inappropriate ioctl for device
rmdir: failed to remove `/mnt/utmp/pcsx_rearmed': Device or resource busy
[ START ]--- Waiting the PND mount dir to be free ----------
[SUCCESS]--- Waiting the PND mount dir to be free ----------
cleanup done
[SUCCESS]--- uMount the PND ----------
=======================================================================================
Return code is : 4

When started manually, the game works smoothly.

notaz commented 11 years ago

It's a flaw of '-a' handling in pnd_run.sh in pandora's firmware, it loses quotes so PCSX gets args like this: 1 '-cdfile' 2 '"/media/fat/roms/psx/Resident' 3 'Evil' 4 '(USA).cue"' I'm not going to try making PCSX re-assemble args, that would not make sense.

If you can update to latest firmware, or at least install http://openpandora.org/feeds/unstable/armv7a/pandora-libpnd_1.0-r67.5_armv7a.ipk , pnd_run.sh will know a '--' argument, after which all subsequent args are passed though with proper escape chars and quotes, so your command line becomes this:

/usr/pandora/scripts/pnd_run.sh -p /media/pandora_1/pandora/menu/pcsx_rearmed_r18.pnd -e pcsx.sh -b pcsx_rearmed -- -cdfile "/media/pandora_2/files/games/Final Fantasy VIII/Final Fantasy VIII (Europe) (Disc 3).cue"

OmegaPhil commented 11 years ago

I thought the Upgrade OS script was doing its job, but apparently not... manually doing a opkg update and opkg upgrade pulled in a lot of updates, including pandora-libpnd. The problem however still occurs after rebooting (there was a new kernel too) - do you want the logfile from the r19 run?

OmegaPhil commented 11 years ago

Testing r19 on my normal Debian machine, I can confirm it works fine here at least (almost instant start, amazing...)

notaz commented 11 years ago

Read what I wrote above, don't pass '-a' to pnd_run.sh, it's broken by design, use '--' and then specify args after that as if you ran ./pcsx binary directly.

OmegaPhil commented 11 years ago

Sorry, read what I wanted to rather than what you said. And you even gave me the command too ;) Looked like a quote.

I have confirmed this works, thanks for your help!