SSC: Added support for '-s2 empty' to remove SSC from slot-2 (#668)

This commit is contained in:
tomcw 2019-09-09 22:12:51 +01:00
parent 15c30f4e1c
commit 94556b5eaf
3 changed files with 15 additions and 1 deletions

View File

@ -110,6 +110,7 @@ CMouseInterface sg_Mouse;
Disk2InterfaceCard sg_Disk2Card;
SS_CARDTYPE g_Slot0 = CT_LanguageCard; // Just for Apple II or II+ or similar clones
SS_CARDTYPE g_Slot2 = CT_SSC;
SS_CARDTYPE g_Slot4 = CT_Empty;
SS_CARDTYPE g_Slot5 = CT_Empty;
SS_CARDTYPE g_SlotAux = CT_Extended80Col; // For Apple //e and above
@ -1193,6 +1194,7 @@ int APIENTRY WinMain(HINSTANCE passinstance, HINSTANCE, LPSTR lpCmdLine, int)
bool bBoot = false;
bool bChangedDisplayResolution = false;
bool bSlot0LanguageCard = false;
bool bSlot2Empty = false;
bool bSlot7Empty = false;
UINT bestWidth = 0, bestHeight = 0;
LPSTR szImageName_drive[NUM_DRIVES] = {NULL,NULL};
@ -1243,6 +1245,13 @@ int APIENTRY WinMain(HINSTANCE passinstance, HINSTANCE, LPSTR lpCmdLine, int)
lpNextArg = GetNextArg(lpNextArg);
szImageName_harddisk[HARDDISK_2] = lpCmdLine;
}
else if (strcmp(lpCmdLine, "-s2") == 0)
{
lpCmdLine = GetCurrArg(lpNextArg);
lpNextArg = GetNextArg(lpNextArg);
if (strcmp(lpCmdLine, "empty") == 0)
bSlot2Empty = true;
}
else if (strcmp(lpCmdLine, "-s7") == 0)
{
lpCmdLine = GetCurrArg(lpNextArg);
@ -1620,6 +1629,9 @@ int APIENTRY WinMain(HINSTANCE passinstance, HINSTANCE, LPSTR lpCmdLine, int)
FrameCreateWindow(); // g_hFrameWindow is now valid
LogFileOutput("Main: FrameCreateWindow() - post\n");
if (bSlot2Empty)
g_Slot2 = CT_Empty;
// Pre: may need g_hFrameWindow for MessageBox errors
// Post: may enable HDD, required for MemInitialize()->MemInitializeIO()
{

View File

@ -52,6 +52,7 @@ extern bool g_bDisableDirectSoundMockingboard; // Cmd line switch: don't i
extern int g_nMemoryClearType; // Cmd line switch: use specific MIP (Memory Initialization Pattern)
extern SS_CARDTYPE g_Slot0; // LC or Saturn in slot0
extern SS_CARDTYPE g_Slot2; // SSC in slot2
extern SS_CARDTYPE g_Slot4; // Mockingboard, Z80, Mouse in slot4
extern SS_CARDTYPE g_Slot5; // Mockingboard, Z80, in slot5
extern SS_CARDTYPE g_SlotAux;

View File

@ -1657,7 +1657,8 @@ void MemInitializeIO(void)
// TODO: Cleanup peripheral setup!!!
PrintLoadRom(pCxRomPeripheral, 1); // $C100 : Parallel printer f/w
sg_SSC.CommInitialize(pCxRomPeripheral, 2); // $C200 : SSC
if (g_Slot2 == CT_SSC)
sg_SSC.CommInitialize(pCxRomPeripheral, 2); // $C200 : SSC
// Slot 3 contains the Uthernet card (which can coexist with an 80-col+Ram card in AUX slot)
// . Uthernet card has no ROM and only IO mapped at $C0Bx