nununoisy / gb-presenter-rs

GBS/LSDj visualizer based on SameBoy and FFmpeg
MIT License
58 stars 1 forks source link

[Bug] [GBS] GBS Support doesn't seem to work with the GUI #1

Closed N-SPC700 closed 1 year ago

N-SPC700 commented 1 year ago

Found a couple bugs when it comes to trying to play GBS files over the GUI:

  1. GBS files with Japanese characters in its metadata (see attached for examples) break the program when loaded. A bit of an issue here because those GBSes are also likely from GBGBS which can automatically rip GBS files from GB rom images, which always appends Japanese metadata to the file. In a program like foobar2000 (very good GBS player) or nezplug++ (bad outdated program), which parse it correctly, it would look like this: image Example GBS: JPMetadata.zip

  2. If the above GBS does load, I can't select any song. I also have to manually specify the file opener to select GBS files, and once it accepts those, the song selector is broken. Even worse, I can't even render a file since it says it's not a valid file. image (And yes, that is a custom windows theme. I'm just using Windows 10.)

I'm not sure if using it from command line fares better, but I can try using that instead.

nununoisy commented 1 year ago

I took a look and it actually seems that the code that decides whether or not the input is a GBS or LSDj ROM depends on the file extension being lowercase. That should be an easy fix for the next release, though I would like to refactor it to look for magic bytes instead. As a workaround, you can try renaming the file.

Would you mind sending the GBS to me somehow so I can test the metadata extraction on CJK characters? You can drop it here or DM me on Discord if you want.

N-SPC700 commented 1 year ago

I uploaded them in that post. See the JPMetadata.zip link. I hope those help.

nununoisy commented 1 year ago

Didn't see that, thanks! I'll try to have a fix out for this quickly.

nununoisy commented 1 year ago

Quick update on this - I'm now matching/validating files based on magic bytes instead of extensions. However, the JP GBSes still don't work. I think that it's because the titles are encoded as Shift-JIS instead of UTF-8. I'll start working on getting that working properly.

nununoisy commented 1 year ago

Fixed in v0.1.1.