Add command line to init Saturn memory size

This commit is contained in:
michaelangel007 2017-04-27 14:50:15 -07:00
parent 9fd479b976
commit d3e620fcd4
5 changed files with 25 additions and 4 deletions

View File

@ -1,5 +1,6 @@
/*
.4 Addded: Language Card Status now displayed
.5 Added: Support for RAMWORKS in the Debugger Language Card Status
.4 Added: Language Card Status now displayed
.3 Cleanup drawing of soft switches
.2 Fix crash when NTSC save/load total path length is > console width (80 chars)
.1 Fixed: Implemented missing debugger "CD" command

View File

@ -995,6 +995,24 @@ int APIENTRY WinMain(HINSTANCE passinstance, HINSTANCE, LPSTR lpCmdLine, int)
else if (g_uMaxExPages < 1)
g_uMaxExPages = 1;
}
#endif
#ifdef SATURN
else if (strcmp(lpCmdLine, "-saturn") == 0) // 64 = Saturn 64K (4 banks), 128 = Saturn 128K (8 banks)
{
g_eMemType = MEM_TYPE_SATURN;
lpCmdLine = GetCurrArg(lpNextArg);
lpNextArg = GetNextArg(lpNextArg);
// " The boards consist of 16K banks of memory
// (4 banks for the 64K board,
// 8 banks for the 128K), accessed one at a time"
g_uSaturnTotalBanks = atoi(lpCmdLine) / 16; // number of 16K Banks [1..8]
if (g_uSaturnTotalBanks > 8)
g_uSaturnTotalBanks = 8;
else
if (g_uSaturnTotalBanks < 1)
g_uSaturnTotalBanks = 1;
#endif
else if (strcmp(lpCmdLine, "-f8rom") == 0) // Use custom 2K ROM at [$F800..$FFFF]
{

View File

@ -49,7 +49,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#define ALLOW_INPUT_LOWERCASE 1
// See /docs/Debugger_Changelog.txt for full details
const int DEBUGGER_VERSION = MAKE_VERSION(2,9,0,4);
const int DEBUGGER_VERSION = MAKE_VERSION(2,9,0,5);
// Public _________________________________________________________________________________________

View File

@ -190,8 +190,9 @@ static LPBYTE RWpages[kMaxExMemoryBanks]; // pointers to RW memory banks
#endif
#ifdef SATURN
UINT g_uSaturnActiveBank = 0; // Saturn 128K Language Card Bank 0 .. 7
static LPBYTE SaturnPages[8];
UINT g_uSaturnTotalBanks = 0; // Will be > 0 if Saturn card is "installed"
UINT g_uSaturnActiveBank = 0; // Saturn 128K Language Card Bank 0 .. 7
static LPBYTE g_aSaturnPages[8];
#endif // SATURN
MemoryType_e g_eMemType = MEM_TYPE_NATIVE; // 0 = Native memory, 1=RAMWORKS, 2 = SATURN

View File

@ -62,6 +62,7 @@ extern UINT g_uActiveBank;
#endif
#ifdef SATURN
extern UINT g_uSaturnTotalBanks;
extern UINT g_uSaturnActiveBank; // Saturn 128K Language Card Bank 0 .. 7
#endif // SATURN