mirror of
https://github.com/dborth/snes9xgx.git
synced 2024-11-23 19:19:22 +01:00
BSX rom is now optional. if missing, it will load directly into the
game.
This commit is contained in:
parent
ffde2f7bf3
commit
8435c09b65
@ -600,8 +600,8 @@ 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:
|
||||
Snes9x GX supports loading BS games. The BSX BIOS is not required.
|
||||
If you wish to use one, 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.
|
||||
|
@ -49,6 +49,7 @@ bool inSz = false;
|
||||
|
||||
unsigned long SNESROMSize = 0;
|
||||
bool loadingFile = false;
|
||||
bool bsxBiosLoadFailed;
|
||||
|
||||
extern bool isBSX();
|
||||
|
||||
@ -377,9 +378,10 @@ static bool IsValidROM()
|
||||
|
||||
if(p != NULL)
|
||||
{
|
||||
if (strcasecmp(p, ".smc") == 0 ||
|
||||
if (strcasecmp(p, ".bs") == 0 ||
|
||||
strcasecmp(p, ".fig") == 0 ||
|
||||
strcasecmp(p, ".sfc") == 0 ||
|
||||
strcasecmp(p, ".smc") == 0 ||
|
||||
strcasecmp(p, ".swc") == 0)
|
||||
{
|
||||
if(zippedFilename) free(zippedFilename);
|
||||
@ -455,8 +457,6 @@ int BrowserLoadSz()
|
||||
return szfiles;
|
||||
}
|
||||
|
||||
static bool bsxBiosLoadFailed;
|
||||
|
||||
int WiiFileLoader()
|
||||
{
|
||||
size_t size;
|
||||
@ -531,9 +531,6 @@ int BrowserLoadFile()
|
||||
{
|
||||
ErrorPrompt("Error loading game!");
|
||||
}
|
||||
else if(bsxBiosLoadFailed) {
|
||||
ErrorPrompt("BS-X BIOS file not found!");
|
||||
}
|
||||
else
|
||||
{
|
||||
// load SRAM or snapshot
|
||||
|
@ -14,6 +14,8 @@
|
||||
#include "display.h"
|
||||
#include <math.h>
|
||||
|
||||
extern bool bsxBiosLoadFailed;
|
||||
|
||||
//#define BSX_DEBUG
|
||||
|
||||
#define BIOS_SIZE 0x100000
|
||||
@ -1209,7 +1211,7 @@ uint8 * S9xGetBasePointerBSX (uint32 address)
|
||||
static bool8 BSX_LoadBIOS (void)
|
||||
{
|
||||
#ifdef GEKKO
|
||||
return FALSE; // We're not loading the BIOS!
|
||||
return TRUE; // We're not loading the BIOS!
|
||||
#else
|
||||
FILE *fp;
|
||||
char path[PATH_MAX + 1], name[PATH_MAX + 1];
|
||||
@ -1305,7 +1307,7 @@ void S9xInitBSX (void)
|
||||
uint8 *header = r1 ? Memory.ROM + 0x7FC0 : Memory.ROM + 0xFFC0;
|
||||
|
||||
FlashMode = (header[0x18] & 0xEF) == 0x20 ? FALSE : TRUE;
|
||||
FlashSize = FLASH_SIZE;
|
||||
FlashSize = (header[0x19] & 0x20) ? PSRAM_SIZE : FLASH_SIZE;
|
||||
|
||||
// Fix Block Allocation Flags
|
||||
// (for games that don't have it setup properly,
|
||||
@ -1374,12 +1376,38 @@ void S9xResetBSX (void)
|
||||
BSX.out_index = 0;
|
||||
memset(BSX.output, 0, sizeof(BSX.output));
|
||||
|
||||
// starting from the bios
|
||||
BSX.MMC[0x02] = BSX.MMC[0x03] = BSX.MMC[0x05] = BSX.MMC[0x06] = 0x80;
|
||||
BSX.MMC[0x09] = BSX.MMC[0x0B] = 0x80;
|
||||
if(bsxBiosLoadFailed) {
|
||||
BSX.MMC[0x02] = FlashMode ? 0x80: 0;
|
||||
|
||||
BSX.MMC[0x07] = BSX.MMC[0x08] = 0x80;
|
||||
BSX.MMC[0x0E] = 0x80;
|
||||
// per bios: run from psram or flash card
|
||||
if (FlashSize == PSRAM_SIZE)
|
||||
{
|
||||
memcpy(PSRAM, FlashROM, PSRAM_SIZE);
|
||||
|
||||
BSX.MMC[0x01] = 0x80;
|
||||
BSX.MMC[0x03] = 0x80;
|
||||
BSX.MMC[0x04] = 0x80;
|
||||
BSX.MMC[0x0C] = 0x80;
|
||||
BSX.MMC[0x0D] = 0x80;
|
||||
}
|
||||
else
|
||||
{
|
||||
BSX.MMC[0x03] = 0x80;
|
||||
BSX.MMC[0x05] = 0x80;
|
||||
BSX.MMC[0x06] = 0x80;
|
||||
BSX.MMC[0x09] = BSX.MMC[0x0B] = 0x80;
|
||||
}
|
||||
|
||||
BSX.MMC[0x0E] = 0x80;
|
||||
}
|
||||
else {
|
||||
// starting from the bios
|
||||
BSX.MMC[0x02] = BSX.MMC[0x03] = BSX.MMC[0x05] = BSX.MMC[0x06] = 0x80;
|
||||
BSX.MMC[0x09] = BSX.MMC[0x0B] = 0x80;
|
||||
|
||||
BSX.MMC[0x07] = BSX.MMC[0x08] = 0x80;
|
||||
BSX.MMC[0x0E] = 0x80;
|
||||
}
|
||||
|
||||
// default register values
|
||||
BSX.PPU[0x2196 - BSXPPUBASE] = 0x10;
|
||||
|
Loading…
Reference in New Issue
Block a user