libretro / snes9x

Snes9x - Portable Super Nintendo Entertainment System (TM) emulator
http://www.snes9x.com
Other
47 stars 56 forks source link

Make Sufami Turbo .ST rom files compliant with Snes9x core #235

Closed KingKebab closed 4 years ago

KingKebab commented 4 years ago

Hello,

Like many people, I use .dat files from the No-Intro group to manage and validate my roms. Also, I use zipped roms to reduce their storage size.

In RetroArch, I use the Snes9x 1.60 core with Super NES, Satellaview and Sufami Turbo roms. Any roms works great except with Sufami roms.

When I load zipped Sufami roms I get an error message about the rom extraction. Here is the error I get in the log file :

libretro INFO] "x_\z_____C______Byd__N" [bad checksum] LoROM, Corrupt, ROM+RAM+BAT, NTSC, SRAM:Corrupt, ID:___G, CRC32:46F16E00
[INFO] [Environ]: SET_PIXEL_FORMAT: RGB565.
[INFO] [CONTENT LOAD]: Failed to extract content from compressed file: C:\Users\Beloko\Downloads\RetroArch\roms\sufami\Bishoujo Senshi Sailor Moon Sailor Stars - Fuwafuwa Panic 2 (Japan).zip

So, I did some tests and it seems the issue come from the rom file name. Because the .ST extension isn't entitled in the snes9x libretro.

To fix the issue, if I rename the rom file into .SFC (or .BS) instead of .ST in the zip archive file then the game starts and runs properly. There's no bad checksum message anymore.

[libretro INFO] "ADD-ON BASE CASSETE" [no checksum] LoROM, N/A, ROM, NTSC, SRAM:128Kbits, ID:A9PJ, CRC32:9B4CA911
[INFO] [Environ]: SET_PIXEL_FORMAT: RGB565.
[INFO] [SRAM]: Skipping SRAM load..
[INFO] Version of libretro API: 1
[INFO] Compiled against API: 1
[INFO] [Cheats]: Load game-specific cheatfile: C:\Users\Beloko\Downloads\RetroArch\cheats\Snes9x\Bishoujo Senshi Sailor Moon Sailor Stars - Fuwafuwa Panic 2 (Japan).cht

So I suggest to add the .ST suffix as compliant in snes9x libretro to make No-Intro's Sufami romset ready to play for everyone.

hizzlekizzle commented 4 years ago

It probably just needs it added here: https://github.com/libretro/libretro-super/blob/master/dist/info/snes9x_libretro.info#L6 Can you make that change to your core info file locally and see if that fixes it for you?

KingKebab commented 4 years ago

Hello HizzleKizzle ,

I updated the supported_extensions value in my local config file \RetroArch\info\snes9x_libretro.info like this : supported_extensions = "smc|sfc|swc|fig|bs|st"

But unfortunately it doesn't make the .ST compliant. I get the same error in the log file and the game doesn't play. However uncompressed .ST files appear in the RetroArch's browser list.

Sanaki commented 4 years ago

It likely needs to be added to the extension list in libretro.cpp. I'll test a build.

Sanaki commented 4 years ago

PRs open, works fine with those adjustments in place.

KingKebab commented 4 years ago

Hello Sanaki,

Thank you for your fix. Hope it will be merged and available in the next core release. If you like, I can test with RetroArch too. But I'll just need the bin files to replace.