Closed SeaLiteral closed 3 years ago
I've come up with a fix but it means switching to c++17 in order to have access to <filesystem>
:
FWIW, the relevant code was here :
https://github.com/Lameguy64/mkpsxiso/blob/master/src/main.cpp#L306-L307
fprintf( cuefp, "FILE \"%s\" BINARY\n",
global::ImageName.c_str() );
~https://github.com/ABelliqueux/mkpsxiso/commit/869091d7e0f21a46aa69ed3c111e8db2fa1d77cd~ ~https://github.com/ABelliqueux/mkpsxiso/commit/1232e9d88f83e80e312293e824e09eaf8fd5bdcd~
~Should I PR those changes ?~
EDIT: PR links are dead
Building from the target directory seems possible but took me a couple of tries:
mkpsxiso -y -q ../iso.xml
, it exits with the error ERROR: Unable to create cue sheet.
system.cnf
(probably because it's looking for it in the build directory).build/
in the XML file and added ../
to all paths that referred to source files. Then it seems to work as intended.I've just committed a quick fix that strips the path of the .bin file in the cue sheet that doesn't need that stupid filesystem library. I haven't been able to test it properly because msys64 seems to be broken as mkpsxiso throws a segfault when it starts to build the disc image (not related to my changes, crashes during the directory tree building process) and was unable to debug it with gdb as it fails to open source files and locks up on breakpoints, but the changes should work.
This problem fixed in the fork https://github.com/brill2k/mkpsxiso
@Lameguy64 I can confirm it works after building the last commit on Linux. Cheers!
I can confirm it works after building the last commit on Linux. Cheers!
So can I. So I guess I could close this issue now, since the only issue from this that remains would be if you try to put the bin and cue files in different directories, which I don't see why people would want to do (other than to make it work differently in different emulators). Thanks!
When I tried running a simple font demo in PCSX-Redux, it couldn't find the bin file. Turns out the culprit was here:
I'm keeping source files in a directory/folder and the built files in a subdirectory/subfolder. And the xml file isn't built/generated, so it's in the same directory as the source code, the directory that I'm calling
mkpsxiso
from (throughmake
).The langs.bin file in the build directory ends up like this:
I think if the cue and bin files are in the same directory, it would make sense for the cue file to just reference the filename of the bin file, like this:
I haven't rebuilt
mkpsxiso
after the CMake updates to this project and PSn00bSDK, so it's possible that games built with CMake avoid this issue. But I thought I should concentrate on the demo rather than adapting it to using CMake, so I thought I'd at least write somewhere that this can happen, in case others make some game and wonder why it works in some emulators but not others.Edit: I had posted the same cue file contents twice in the above post. I've fixed that now. I've also looked into what happens if I call
mkpsxiso
from the target directory, and it works with some tweaks, which I'll put in a comment.