Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bishoujo Senshi Sailormoon Sailorstars - Fuwafuwa Panic #323

Closed
zack867 opened this issue Aug 26, 2024 · 7 comments · Fixed by #325
Closed

Bishoujo Senshi Sailormoon Sailorstars - Fuwafuwa Panic #323

zack867 opened this issue Aug 26, 2024 · 7 comments · Fixed by #325
Labels
bug Something isn't working

Comments

@zack867
Copy link

zack867 commented Aug 26, 2024

in bsnes v115-windows,
when you load Bishoujo Senshi Sailormoon Sailorstars - Fuwafuwa Panic.
before loading the game, bsnes will ask you to load sufami turbo rom for slot A and B first like you are loading empty sufami turbo system which is weird.
because Bishoujo Senshi Sailormoon Sailorstars - Fuwafuwa Panic is not a sufami turbo game.
instead, Bishoujo Senshi Sailormoon Sailorstars - Fuwafuwa Panic 2 is a sufami turbo game.
this didn't happen in bsnes v073.

@Screwtapello
Copy link
Contributor

As far as I can tell, there's no game called Bishoujo Senshi Sailormoon Sailorstars - Fuwafuwa Panic, but there is a game called Bishoujo Senshi Sailor Moon SuperS - Fuwafuwa Panic, which I assume is what you're talking about. No-Intro includes a picture of the game's PCB, confirming that it is does not have slots for accepting Sufami Turbo games, and therefore bsnes should not prompt for them to be inserted.

(Bishoujo Senshi Sailormoon Sailor Stars - Fuwafuwa Panic 2 is a Sufami Turbo game in the sense that it fits into a slot on the Sufami Turbo, so it should also not prompt for additional things to be put in slots, but that's not what this issue is about)

Near didn't get around to making an official dump of this game in the board database, so bsnes uses its heuristics to detect the game's memory map as:

game
  sha256:   af857c18e168d30b35876aa319171ee363bc262c9d0627176573e8311d43297d
  label:    Bishoujo Senshi Sailor Moon SuperS - Fuwafuwa Panic (Japan)
  name:     Bishoujo Senshi Sailor Moon SuperS - Fuwafuwa Panic (Japan)
  title:    SFC SAILORMOON SUPERS
  region:   NTSC
  revision: SHVC-A9PJ-0
  board:    ST-LOROM
    memory
      type: ROM
      size: 0x100000
      content: Program

"ST-LOROM" is apparently a generic "board with Sufami Turbo slots" memory map; the actual Sufami Turbo's board is "BANDAI-PT-923". Looking at bsnes' heuristic detection, it seems that a LOROM board is converted into an ST-LOROM board if the serial in the ROM header is "A9PJ":

if(serial() == "A9PJ") {
//Sufami Turbo (JPN)
board.append("ST-", mode);

As we can see in the detected memory map above, that is indeed the serial of Fuwafuwa Panic. According to Near's official dump, that is also the serial in the Sufami Turbo base cart:

game
sha256: edacb453da14f825f05d1134d6035f4bf034e55f7cfb97c70c4ee107eabc7342
label: スーファミターボ
name: Sufami Turbo
region: SHVC-A9PJ-JPN
revision: SHVC-A9PJ-0
board: BANDAI-PT-923
memory
type: ROM
size: 0x40000
content: Program

This greatly surprises me, I thought Nintendo were pretty good about making sure serial numbers were unique. Possibly this happened because the Sufami Turbo was manufactured by Bandai instead of Nintendo?

I suspect the easiest fix is to just remove the special-case handling of serial A9PJ, since we have an Official Dump of the Sufami Turbo. On the other hand, that would prevent homebrew devs from making custom games that take Sufami Turbo mini-carts, much like how there are various games that take Satellaview mini-carts. I'm not sure there's anything else in the game header that would distinguish "ROM that wants to be a Sufami Turbo base cart" from any other ROM, except the serial and (perhaps) the size.

It may be worth trying to extract the ROM headers of the SNES library to figure out what an acceptable heuristic might be.

@Screwtapello
Copy link
Contributor

ares inherited the same heuristics that bsnes has.

MesenS doesn't mention "A9PJ" or "Sufami" in its source, I assume it doesn't emulate the Sufami Turbo at all.

snes9x detects the Sufami Turbo base cart by its file size and the strings "BANDAI SFC-ADX" and "SFC-ADX BACKUP", which appear at the very beginning of the ROM dump. Those would be very nice fingerprints for custom ROMs to use, and custom ROMs would need to use them anyway to be compatible with snes9x.

@Screwtapello Screwtapello added the bug Something isn't working label Aug 27, 2024
@Screwtapello
Copy link
Contributor

For the sake of consistency, we should probably fix this the same way ares does, so I've made a PR over there:

ares-emulator/ares#1628

Once that's applied, I'll make the same change for bsnes.

Screwtapello added a commit to Screwtapello/bsnes that referenced this issue Aug 29, 2024
The Sufami Turbo base cartridge is listed in the Super Famicom verified dump
database, so it did not use the heuristics. It turns out the heuristic detection
wouldn't have worked anyway - although the game's header does contain the serial
A9PJ, the heuristic revision() method does not report that serial at all.

Meanwhile, the serial A9PJ is *also* used by the game Bishoujo Senshi Sailor
Moon SuperS - Fuwafuwa Panic, so loading this game would prompt for Sufami Turbo
mini-cartridges even though the game could not make use of them.

Fixes bsnes-emu#323
Screwtapello added a commit that referenced this issue Aug 30, 2024
The Sufami Turbo base cartridge is listed in the Super Famicom verified dump
database, so it did not use the heuristics. It turns out the heuristic detection
wouldn't have worked anyway - although the game's header does contain the serial
A9PJ, the heuristic revision() method does not report that serial at all.

Meanwhile, the serial A9PJ is *also* used by the game Bishoujo Senshi Sailor
Moon SuperS - Fuwafuwa Panic, so loading this game would prompt for Sufami Turbo
mini-cartridges even though the game could not make use of them.

Fixes #323
@Screwtapello
Copy link
Contributor

Thanks for reporting this issue! This should be fixed in the latest nightly build.

@Screwtapello
Copy link
Contributor

Apparently the change that fixed this issue causes a crash on Windows. I guess we need to dig deeper.

@Screwtapello Screwtapello reopened this Aug 31, 2024
@Screwtapello
Copy link
Contributor

Another attempt at a fix in #326.

@Screwtapello
Copy link
Contributor

OK, now it should be fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants