alucryd / oxyromon

Rusty ROM OrgaNizer
Other
128 stars 14 forks source link

Strange behavior and error with No-Intro PS3 PSN Content #78

Open Melluish opened 1 year ago

Melluish commented 1 year ago

If I import say, Daytona USA (USA), from a No-Intro "Sony - PlayStation 3 (PSN) (Content)" set like so:

$ oxyromon import-roms temp/Daytona\ USA\ \(USA\).zip

It gets added fine to {rom_dir}/Sony - PlayStation 3 (PSN) (Content)/Daytona USA (USA).zip (I have GROUP_SUBSYSTEMS set to "false) and I can also convert-roms between loose, zip, 7z, etc.

However, if I import the ROMs from that game individually like so:

$ oxyromon import-roms temp/Daytona\ USA\ \(USA\)/SJczHgXTSIqQkEvTVwMpNtxgamUilReFjPPZwtVmWCKFhLSFfZbRUhsEGrdOSfYOGfzGhKNzRseKnhBrEeWzrGJJTrfZaPERMWuSw.pkg
$ oxyromon import-roms temp/Daytona\ USA\ \(USA\)/UP0177-NPUB30493_00-DAYTONAUSA000000.rap

A couple of weird things happen. First, they get renamed on import to "Daytona USA (USA).pkg" and "Daytona USA (USA).rap" respectively. And then when you try to convert them to zip I get the following error:

ben@lobster:~$ oxyromon convert-roms
Please select systems: Sony - PlayStation 3 (PSN) (Content)
Please select a format: ZIP
Processing "Sony - PlayStation 3 (PSN) (Content)"
Compressing "SJczHgXTSIqQkEvTVwMpNtxgamUilReFjPPZwtVmWCKFhLSFfZbRUhsEGrdOSfYOGfzGhKNzRseKnhBrEeWzrGJJTrfZaPERMWuSw.pkg"
Compressing "UP0177-NPUB30493_00-DAYTONAUSA000000.rap"
Error: SimpleError { err: "\nWARNING: No more files\nSJczHgXTSIqQkEvTVwMpNtxgamUilReFjPPZwtVmWCKFhLSFfZbRUhsEGrdOSfYOGfzGhKNzRseKnhBrEeWzrGJJTrfZaPERMWuSw.pkg\n\n\nWARNING: No more files\nUP0177-NPUB30493_00-DAYTONAUSA000000.rap\n\n" }

I'm then left with a 22 byte "Daytona USA (USA).zip" alongside the pkg and rap.

Am I doing something wrong? I've been enjoying this software a lot, so please keep working on this as it's really cool. :)

ROM in question: https://nopaystation.com/view/PS3/NPUB30493/DAYTONAUSA000000/1?version=1

Kind regards,

Ben

Oh, and my bad, I'm using the DAT "Sony - PlayStation 3 (PSN) (Content) (20230201-155510).dat" from No-Intro.

alucryd commented 1 year ago

Looking into it, I have some special code paths for PS3, a bug most likely crept into them.

alucryd commented 1 year ago

Ok, so the root of the issue is that I decided to rename all PKG/RAP files to match the game name instead of the mostly nonsensical names, AFAICT rpcs3 has no way to make sense of them so we need some way to know which is which. Except I didn't take that into account in convert-roms.

2 options to ponder:

I admittedly have less experience with PS3 emulation, maybe I'm breaking stuff by renaming these files so option 1 could be the cleanest (and easiest to implement).

@Melluish Would love to hear your thoughts on this one :)

Melluish commented 1 year ago

Yeah, it's a tricky one. I can't comment on emulation for the PS3 as I've not used it, I use them on real hardware. AFAIK the PKG name doesn't matter and will still install, but the RAP might be have to be named correctly. My only issue is that the names (while strange) match what's in the DAT and so I feel like it's more "correct" to keep the original names, certainly when the end user has them in a container (zip, 7z). It's your project, mate, so I'm only putting out the suggestion, but I'd like to see them retain their original names if imported as part of an archive, or indeed, if they are later converted to an archive format, otherwise to me it's not really a valid set.

Perhaps it could be a config option?

I'm going to look at working with No-Intro's "Nintendo - Wii U (NUS)" sets this weekend and they all have files like "0000000a.app", so you'd be looking at a similar problem.

To be honest I was surprised when your "original" format put the files loose in the system dir. I would have thought that option would at least place them in a subfolder. But I understand that for several systems that just have one iso file for the ROM, it's cleaner to have them at the top level.

alucryd commented 1 year ago

Thanks for the input, I dont really have strong feelings towards one or the other, so original names it is then. Will push to beta branch later today, I can publish a hotfix release if you aren't able to build from git.

alucryd commented 1 year ago

There you go :) https://github.com/alucryd/oxyromon/commit/b74394d7f053b3c0ff040acc1a62a0c962a94495

alucryd commented 1 year ago

Still need a couple tweaks, after sorting my collection I noticed inconsitent naming between convert-roms and sort-roms when it comes to PSN archives, hopefully I can address that by the end of the week.

Melluish commented 1 year ago

Okay, great. Thanks again. I will keep an eye on the repo and when you're happy I will take the plunge and start using it on my main romsets. I'm currently using RomCenter through a Windows 10 VM and it's a bit flakey, and hasn't been updated in a while, but for now I trust it. Would love to switch to this when it's ready.

On Mon, 22 May 2023 at 20:05, Maxime Gauduin @.***> wrote:

Still need a couple tweaks, after sorting my collection I noticed inconsitent naming between convert-roms and sort-roms when it comes to PSN archives, hopefully I can address that by the end of the week.

— Reply to this email directly, view it on GitHub https://github.com/alucryd/oxyromon/issues/78#issuecomment-1557766478, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAGWQOW2BW6YJO7Z5XDZ4YTXHO2GTANCNFSM6AAAAAAX6X663E . You are receiving this because you were mentioned.Message ID: @.***>

alucryd commented 1 year ago

convert-roms and sort-roms are now in line with each other on the develop branch. Will probably produce a new release soon once another item is confirmed working. The code would still benefit from a good refactoring to avoid some duplication but it's good enough for now.

Melluish commented 1 year ago

Fantastic. I will give it a later next week.

On Sat, 27 May 2023 at 11:52, Maxime Gauduin @.***> wrote:

convert-roms and sort-roms are now in line with each other on the develop branch. Will probably produce a new release soon once another item is confirmed working. The code would still benefit from a good refactoring to avoid some duplication but it's good enough for now.

— Reply to this email directly, view it on GitHub https://github.com/alucryd/oxyromon/issues/78#issuecomment-1565347923, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAGWQOUPXFZANMZVXVZCLWLXIHMGHANCNFSM6AAAAAAX6X663E . You are receiving this because you were mentioned.Message ID: @.***>