libretro / bsnes

Super Nintendo (Super Famicom) emulator
https://bsnes.byuu.org
Other
11 stars 13 forks source link

Add Satellaview support #51

Closed ds22x closed 3 years ago

ds22x commented 3 years ago

Also added a direct way of loading .bs Satellaview games by using BS-X.bin in the system directory as a firmware file.

ds22x commented 3 years ago

Also made sure games smaller than 1024kb in size won't crash the emulator.

Sanaki commented 3 years ago

Compilation attempt resulted in this on x86_64 Linux:

bsnes/bsnes $  target=libretro binary=library local=false platform=linux make
Compiling target-libretro/libretro.cpp ...
In file included from target-libretro/program.cpp:18,
                 from target-libretro/libretro.cpp:32:
./heuristics/bs-memory.cpp: In member function ‘nall::string Heuristics::BSMemory::manifest() const’:
./heuristics/bs-memory.cpp:29:54: error: expression cannot be used as a function
   29 |   output.append(Memory{}.type("Flash").size(0x100000()).content("Program").text());
      |                                                      ^
../nall/GNUmakefile:177: recipe for target 'obj/libretro.o' failed
make: *** [obj/libretro.o] Error 1
ds22x commented 3 years ago

Forgot to remove the '()' part when changing the size output.

Sanaki commented 3 years ago

Now that it compiles cleanly, I gave this a spin. BS-X bios loads now, and Satellaview games that did not work before now do (though some will require a patched bios of course). That said, some games (Actraiser for example) loaded fine directly without bios support previously, and now produce an error on attempt to load with missing bios instead. While I don't mind this myself, some users may find this to be a downgrade. I'm uncertain if it'd be reasonable to add a core option to allow attempting to bypass the bios if possible, but that seems like it would satisfy any such users. If it isn't reasonable to do so, I wouldn't consider it a big enough concern to lose sleep over.

ds22x commented 3 years ago

During debugging I did actually add an option to bypass the BIOS, but I didn't include because I didn't think people would actually use it, and also because some games do exhibit weird behavior when directly loaded (UNDAKE30 Same Game Daisakusen Mario Version for example running at 50hz, and BS F-Zero 2 Practice hanging when overriding a high score). It can be easily added if people want it however.

Sanaki commented 3 years ago

Good enough reason for me, honestly. I just wanted to be certain you were aware of the behavior and had considered all options.

ds22x commented 3 years ago

Again, if people want it, a fast-boot option can be added easily enough (with a decent description attached to it that is).