BS-X works again. required BSX BIOS ROM be placed in snes9xgx as

BS-X.bin.
This commit is contained in:
Daryl Borth 2018-08-15 10:01:48 -06:00
parent e138b27dea
commit 1a89c5174a
3 changed files with 40 additions and 4 deletions

View File

@ -19,6 +19,7 @@ Wii homebrew is WiiBrew (www.wiibrew.org).
* Wiimote, Nunchuk, Classic, and Gamecube controller support
* SNES Superscope, Mouse, Justifier support
* Cheat support
* BS-X support
* Auto Load/Save Game Snapshots and SRAM
* Custom controller configurations
* SD, USB, DVD, SMB, Zip, and 7z support
@ -35,6 +36,8 @@ Wii homebrew is WiiBrew (www.wiibrew.org).
[4.3.8]
* Updated core to 1.56 (with less accurate but faster Blargg audio core)
* Improved audio synchronization - reduced crackling
* Added BS-X BIOS loading
* Memory optimizations to free up more MEM1 for Snes9x
* Disable multi pixel format support for a speed boost
* Add MSU1 support (thanks qwertymodo!)
@ -513,6 +516,14 @@ need to place your ROM image(s) into "\snes9xgx\roms" directory and place any
cheat code files (optional) in the "\snes9xgx\cheats" directory. Once this is
done you can proceed to run the emulator via the Homebrew Channel.
-=[ Satellaview (BS-X) ]=-
Snes9x GX supports loading BS games. The BSX BIOS is required.
Download the English + No DRM BS-X ROM here:
https://project.satellaview.org/downloads.htm
Put it in your snes9xgx folder, renamed to BS-X.bin.
•˜———–—––-- - —————————––––– ———–—––-- - —————————––––– ———–—––-- - ————————•
| INITIAL SETUP |
•˜———–—––-- - —————————––––– ———–—––-- - —————————––––– ———–—––-- - ————————•

View File

@ -50,6 +50,8 @@ bool inSz = false;
unsigned long SNESROMSize = 0;
bool loadingFile = false;
extern bool isBSX();
/****************************************************************************
* autoLoadMethod()
* Auto-determines and sets the load device
@ -453,6 +455,8 @@ int BrowserLoadSz()
return szfiles;
}
static bool bsxBiosLoadFailed;
int WiiFileLoader()
{
size_t size;
@ -485,6 +489,15 @@ int WiiFileLoader()
return 0;
SNESROMSize = Memory.HeaderRemove(size, Memory.ROM);
bsxBiosLoadFailed = false;
if(isBSX()) {
sprintf (filepath, "%s%s/BS-X.bin", pathPrefix[GCSettings.LoadMethod], APPFOLDER);
if(LoadFile ((char *)Memory.BIOSROM, filepath, 0, SILENT) == 0) {
bsxBiosLoadFailed = true;
}
}
return SNESROMSize;
}
@ -516,10 +529,13 @@ int BrowserLoadFile()
S9xDeleteCheats();
Memory.LoadROM("ROM");
if (SNESROMSize <= 0)
if (SNESROMSize == 0)
{
ErrorPrompt("Error loading game!");
}
else if(bsxBiosLoadFailed) {
ErrorPrompt("BS-X BIOS file not found!");
}
else
{
// load SRAM or snapshot

View File

@ -1049,6 +1049,7 @@ uint8 S9xGetBSXPPU (uint16 address)
break;
}
#ifndef GEKKO
if (BSX.sat_stream1_queue <= 0)
{
BSX.sat_stream1_count++;
@ -1060,7 +1061,7 @@ uint8 S9xGetBSXPPU (uint16 address)
BSX.sat_stream1_count = 1;
S9xBSXSetStream1(BSX.sat_stream1_count - 1);
}
#endif
if (BSX.sat_stream1_loaded)
{
//Lock at 0x7F for bigger packets
@ -1167,6 +1168,7 @@ uint8 S9xGetBSXPPU (uint16 address)
break;
}
#ifndef GEKKO
if (BSX.sat_stream2_queue <= 0)
{
BSX.sat_stream2_count++;
@ -1178,7 +1180,7 @@ uint8 S9xGetBSXPPU (uint16 address)
BSX.sat_stream2_count = 1;
S9xBSXSetStream2(BSX.sat_stream2_count - 1);
}
#endif
if (BSX.sat_stream2_loaded)
{
if (BSX.sat_stream2_queue >= 128)
@ -1437,7 +1439,14 @@ static bool8 is_BSX_BIOS (const uint8 *data, uint32 size)
else
return (FALSE);
}
#ifdef GEKKO
bool isBSX() {
if(is_bsx(Memory.ROM + 0x7FC0) == 1 || is_bsx(Memory.ROM + 0xFFC0) == 1) {
return true;
}
return false;
}
#endif
void S9xInitBSX (void)
{
Settings.BS = FALSE;