mirror of
https://github.com/AppleWin/AppleWin.git
synced 2025-08-15 18:27:29 +00:00
Fixed cmd line regressions: (#790)
. -s7-empty-on-exit wasn't being recognised . -d1, -d2 weren't saving the 'Last Disk Image 1/2' & 'Starting Directory'
This commit is contained in:
@@ -1211,11 +1211,9 @@ static void InsertHardDisks(LPSTR szImageName_harddisk[NUM_HARDDISKS], bool& bBo
|
|||||||
HD_SetEnabled(true);
|
HD_SetEnabled(true);
|
||||||
|
|
||||||
DWORD dwTmp;
|
DWORD dwTmp;
|
||||||
if (REGLOAD(TEXT(REGVALUE_HDD_ENABLED), &dwTmp))
|
BOOL res = REGLOAD(TEXT(REGVALUE_HDD_ENABLED), &dwTmp);
|
||||||
{
|
if (!res || !dwTmp)
|
||||||
if (!dwTmp)
|
REGSAVE(TEXT(REGVALUE_HDD_ENABLED), 1); // Config: HDD Enabled
|
||||||
REGSAVE(TEXT(REGVALUE_HDD_ENABLED), 1); // Config: HDD Enabled
|
|
||||||
}
|
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|
||||||
@@ -1244,11 +1242,9 @@ static void UnplugHardDiskControllerCard(void)
|
|||||||
HD_SetEnabled(false);
|
HD_SetEnabled(false);
|
||||||
|
|
||||||
DWORD dwTmp;
|
DWORD dwTmp;
|
||||||
if (REGLOAD(TEXT(REGVALUE_HDD_ENABLED), &dwTmp))
|
BOOL res = REGLOAD(TEXT(REGVALUE_HDD_ENABLED), &dwTmp);
|
||||||
{
|
if (!res || dwTmp)
|
||||||
if (dwTmp)
|
REGSAVE(TEXT(REGVALUE_HDD_ENABLED), 0); // Config: HDD Disabled
|
||||||
REGSAVE(TEXT(REGVALUE_HDD_ENABLED), 0); // Config: HDD Disabled
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool CheckOldAppleWinVersion(void)
|
static bool CheckOldAppleWinVersion(void)
|
||||||
@@ -1504,15 +1500,15 @@ static bool ProcessCmdLine(LPSTR lpCmdLine)
|
|||||||
g_cmdLine.szImageName_drive[slot][drive] = lpCmdLine;
|
g_cmdLine.szImageName_drive[slot][drive] = lpCmdLine;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if (strcmp(lpCmdLine, "-s7-empty-on-exit") == 0)
|
||||||
|
{
|
||||||
|
g_cmdLine.bSlot7EmptyOnExit = true;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
LogFileOutput("Unsupported arg: %s\n", lpCmdLine);
|
LogFileOutput("Unsupported arg: %s\n", lpCmdLine);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (strcmp(lpCmdLine, "-s7-empty-on-exit") == 0)
|
|
||||||
{
|
|
||||||
g_cmdLine.bSlot7EmptyOnExit = true;
|
|
||||||
}
|
|
||||||
else if (strcmp(lpCmdLine, "-load-state") == 0)
|
else if (strcmp(lpCmdLine, "-load-state") == 0)
|
||||||
{
|
{
|
||||||
lpCmdLine = GetCurrArg(lpNextArg);
|
lpCmdLine = GetCurrArg(lpNextArg);
|
||||||
|
@@ -46,12 +46,12 @@ void CardManager::Insert(UINT slot, SS_CARDTYPE type)
|
|||||||
switch (type)
|
switch (type)
|
||||||
{
|
{
|
||||||
case CT_Disk2:
|
case CT_Disk2:
|
||||||
m_slot[slot] = new Disk2InterfaceCard;
|
m_slot[slot] = new Disk2InterfaceCard(slot);
|
||||||
break;
|
break;
|
||||||
case CT_SSC:
|
case CT_SSC:
|
||||||
_ASSERT(m_pSSC == NULL);
|
_ASSERT(m_pSSC == NULL);
|
||||||
if (m_pSSC) break; // Only support one SSC
|
if (m_pSSC) break; // Only support one SSC
|
||||||
m_slot[slot] = m_pSSC = new CSuperSerialCard;
|
m_slot[slot] = m_pSSC = new CSuperSerialCard(slot);
|
||||||
break;
|
break;
|
||||||
case CT_MockingboardC:
|
case CT_MockingboardC:
|
||||||
m_slot[slot] = new DummyCard(type);
|
m_slot[slot] = new DummyCard(type);
|
||||||
|
@@ -53,14 +53,14 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|||||||
// . if false && I/O ReadWrite($C0EC) && drive is spinning, then advance the track buffer's nibble index (to simulate spinning).
|
// . if false && I/O ReadWrite($C0EC) && drive is spinning, then advance the track buffer's nibble index (to simulate spinning).
|
||||||
// Also m_enhanceDisk is persisted to the save-state, so it's an attribute of the DiskII interface card.
|
// Also m_enhanceDisk is persisted to the save-state, so it's an attribute of the DiskII interface card.
|
||||||
|
|
||||||
Disk2InterfaceCard::Disk2InterfaceCard(void) :
|
Disk2InterfaceCard::Disk2InterfaceCard(UINT slot) :
|
||||||
Card(CT_Disk2)
|
Card(CT_Disk2),
|
||||||
|
m_slot(slot)
|
||||||
{
|
{
|
||||||
ResetSwitches();
|
ResetSwitches();
|
||||||
|
|
||||||
m_floppyLatch = 0;
|
m_floppyLatch = 0;
|
||||||
m_saveDiskImage = true; // Save the DiskImage name to Registry
|
m_saveDiskImage = true; // Save the DiskImage name to Registry
|
||||||
m_slot = 0;
|
|
||||||
m_diskLastCycle = 0;
|
m_diskLastCycle = 0;
|
||||||
m_diskLastReadLatchCycle = 0;
|
m_diskLastReadLatchCycle = 0;
|
||||||
m_enhanceDisk = true;
|
m_enhanceDisk = true;
|
||||||
@@ -1770,6 +1770,7 @@ void Disk2InterfaceCard::Initialize(LPBYTE pCxRomPeripheral, UINT uSlot)
|
|||||||
// . Patching the firmware breaks the ADC checksum used by "The CIA Files" (Tricky Dick)
|
// . Patching the firmware breaks the ADC checksum used by "The CIA Files" (Tricky Dick)
|
||||||
// . In this case we can patch to compensate for an ADC or EOR checksum but not both (nickw)
|
// . In this case we can patch to compensate for an ADC or EOR checksum but not both (nickw)
|
||||||
|
|
||||||
|
_ASSERT(m_slot == uSlot);
|
||||||
RegisterIoHandler(uSlot, &Disk2InterfaceCard::IORead, &Disk2InterfaceCard::IOWrite, NULL, NULL, this, NULL);
|
RegisterIoHandler(uSlot, &Disk2InterfaceCard::IORead, &Disk2InterfaceCard::IOWrite, NULL, NULL, this, NULL);
|
||||||
|
|
||||||
m_slot = uSlot;
|
m_slot = uSlot;
|
||||||
|
@@ -120,7 +120,7 @@ public:
|
|||||||
class Disk2InterfaceCard : public Card
|
class Disk2InterfaceCard : public Card
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
Disk2InterfaceCard(void);
|
Disk2InterfaceCard(UINT slot);
|
||||||
virtual ~Disk2InterfaceCard(void);
|
virtual ~Disk2InterfaceCard(void);
|
||||||
|
|
||||||
virtual void Init(void) {};
|
virtual void Init(void) {};
|
||||||
|
@@ -181,6 +181,7 @@ void CMouseInterface::Initialize(LPBYTE pCxRomPeripheral, UINT uSlot)
|
|||||||
{
|
{
|
||||||
// m_bActive = true;
|
// m_bActive = true;
|
||||||
m_bEnabled = true;
|
m_bEnabled = true;
|
||||||
|
_ASSERT(m_uSlot == uSlot);
|
||||||
SetSlotRom(); // Pre: m_bActive == true
|
SetSlotRom(); // Pre: m_bActive == true
|
||||||
RegisterIoHandler(uSlot, &CMouseInterface::IORead, &CMouseInterface::IOWrite, NULL, NULL, this, NULL);
|
RegisterIoHandler(uSlot, &CMouseInterface::IORead, &CMouseInterface::IOWrite, NULL, NULL, this, NULL);
|
||||||
}
|
}
|
||||||
|
@@ -64,9 +64,9 @@ SSC_DIPSW CSuperSerialCard::m_DIPSWDefault =
|
|||||||
|
|
||||||
//===========================================================================
|
//===========================================================================
|
||||||
|
|
||||||
CSuperSerialCard::CSuperSerialCard() :
|
CSuperSerialCard::CSuperSerialCard(UINT slot) :
|
||||||
Card(CT_SSC),
|
Card(CT_SSC),
|
||||||
m_uSlot(0),
|
m_uSlot(slot),
|
||||||
m_aySerialPortChoices(NULL),
|
m_aySerialPortChoices(NULL),
|
||||||
m_uTCPChoiceItemIdx(0),
|
m_uTCPChoiceItemIdx(0),
|
||||||
m_bCfgSupportDCD(false),
|
m_bCfgSupportDCD(false),
|
||||||
@@ -957,10 +957,9 @@ void CSuperSerialCard::CommInitialize(LPBYTE pCxRomPeripheral, UINT uSlot)
|
|||||||
if(pData == NULL)
|
if(pData == NULL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
_ASSERT(m_uSlot == uSlot);
|
||||||
memcpy(pCxRomPeripheral + uSlot*256, pData+SSC_SLOT_FW_OFFSET, SSC_SLOT_FW_SIZE);
|
memcpy(pCxRomPeripheral + uSlot*256, pData+SSC_SLOT_FW_OFFSET, SSC_SLOT_FW_SIZE);
|
||||||
|
|
||||||
m_uSlot = uSlot;
|
|
||||||
|
|
||||||
// Expansion ROM
|
// Expansion ROM
|
||||||
if (m_pExpansionRom == NULL)
|
if (m_pExpansionRom == NULL)
|
||||||
{
|
{
|
||||||
|
@@ -25,7 +25,7 @@ typedef struct
|
|||||||
class CSuperSerialCard : public Card
|
class CSuperSerialCard : public Card
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
CSuperSerialCard();
|
CSuperSerialCard(UINT slot);
|
||||||
virtual ~CSuperSerialCard();
|
virtual ~CSuperSerialCard();
|
||||||
|
|
||||||
virtual void Init(void) {};
|
virtual void Init(void) {};
|
||||||
|
Reference in New Issue
Block a user