mirror of
https://github.com/AppleWin/AppleWin.git
synced 2025-01-03 11:30:22 +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:
parent
cca3ecd436
commit
eed3182bef
@ -1211,11 +1211,9 @@ static void InsertHardDisks(LPSTR szImageName_harddisk[NUM_HARDDISKS], bool& bBo
|
||||
HD_SetEnabled(true);
|
||||
|
||||
DWORD dwTmp;
|
||||
if (REGLOAD(TEXT(REGVALUE_HDD_ENABLED), &dwTmp))
|
||||
{
|
||||
if (!dwTmp)
|
||||
REGSAVE(TEXT(REGVALUE_HDD_ENABLED), 1); // Config: HDD Enabled
|
||||
}
|
||||
BOOL res = REGLOAD(TEXT(REGVALUE_HDD_ENABLED), &dwTmp);
|
||||
if (!res || !dwTmp)
|
||||
REGSAVE(TEXT(REGVALUE_HDD_ENABLED), 1); // Config: HDD Enabled
|
||||
|
||||
//
|
||||
|
||||
@ -1244,11 +1242,9 @@ static void UnplugHardDiskControllerCard(void)
|
||||
HD_SetEnabled(false);
|
||||
|
||||
DWORD dwTmp;
|
||||
if (REGLOAD(TEXT(REGVALUE_HDD_ENABLED), &dwTmp))
|
||||
{
|
||||
if (dwTmp)
|
||||
REGSAVE(TEXT(REGVALUE_HDD_ENABLED), 0); // Config: HDD Disabled
|
||||
}
|
||||
BOOL res = REGLOAD(TEXT(REGVALUE_HDD_ENABLED), &dwTmp);
|
||||
if (!res || dwTmp)
|
||||
REGSAVE(TEXT(REGVALUE_HDD_ENABLED), 0); // Config: HDD Disabled
|
||||
}
|
||||
|
||||
static bool CheckOldAppleWinVersion(void)
|
||||
@ -1504,15 +1500,15 @@ static bool ProcessCmdLine(LPSTR lpCmdLine)
|
||||
g_cmdLine.szImageName_drive[slot][drive] = lpCmdLine;
|
||||
}
|
||||
}
|
||||
else if (strcmp(lpCmdLine, "-s7-empty-on-exit") == 0)
|
||||
{
|
||||
g_cmdLine.bSlot7EmptyOnExit = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
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)
|
||||
{
|
||||
lpCmdLine = GetCurrArg(lpNextArg);
|
||||
|
@ -46,12 +46,12 @@ void CardManager::Insert(UINT slot, SS_CARDTYPE type)
|
||||
switch (type)
|
||||
{
|
||||
case CT_Disk2:
|
||||
m_slot[slot] = new Disk2InterfaceCard;
|
||||
m_slot[slot] = new Disk2InterfaceCard(slot);
|
||||
break;
|
||||
case CT_SSC:
|
||||
_ASSERT(m_pSSC == NULL);
|
||||
if (m_pSSC) break; // Only support one SSC
|
||||
m_slot[slot] = m_pSSC = new CSuperSerialCard;
|
||||
m_slot[slot] = m_pSSC = new CSuperSerialCard(slot);
|
||||
break;
|
||||
case CT_MockingboardC:
|
||||
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).
|
||||
// Also m_enhanceDisk is persisted to the save-state, so it's an attribute of the DiskII interface card.
|
||||
|
||||
Disk2InterfaceCard::Disk2InterfaceCard(void) :
|
||||
Card(CT_Disk2)
|
||||
Disk2InterfaceCard::Disk2InterfaceCard(UINT slot) :
|
||||
Card(CT_Disk2),
|
||||
m_slot(slot)
|
||||
{
|
||||
ResetSwitches();
|
||||
|
||||
m_floppyLatch = 0;
|
||||
m_saveDiskImage = true; // Save the DiskImage name to Registry
|
||||
m_slot = 0;
|
||||
m_diskLastCycle = 0;
|
||||
m_diskLastReadLatchCycle = 0;
|
||||
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)
|
||||
// . 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);
|
||||
|
||||
m_slot = uSlot;
|
||||
|
@ -120,7 +120,7 @@ public:
|
||||
class Disk2InterfaceCard : public Card
|
||||
{
|
||||
public:
|
||||
Disk2InterfaceCard(void);
|
||||
Disk2InterfaceCard(UINT slot);
|
||||
virtual ~Disk2InterfaceCard(void);
|
||||
|
||||
virtual void Init(void) {};
|
||||
|
@ -181,6 +181,7 @@ void CMouseInterface::Initialize(LPBYTE pCxRomPeripheral, UINT uSlot)
|
||||
{
|
||||
// m_bActive = true;
|
||||
m_bEnabled = true;
|
||||
_ASSERT(m_uSlot == uSlot);
|
||||
SetSlotRom(); // Pre: m_bActive == true
|
||||
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),
|
||||
m_uSlot(0),
|
||||
m_uSlot(slot),
|
||||
m_aySerialPortChoices(NULL),
|
||||
m_uTCPChoiceItemIdx(0),
|
||||
m_bCfgSupportDCD(false),
|
||||
@ -957,10 +957,9 @@ void CSuperSerialCard::CommInitialize(LPBYTE pCxRomPeripheral, UINT uSlot)
|
||||
if(pData == NULL)
|
||||
return;
|
||||
|
||||
_ASSERT(m_uSlot == uSlot);
|
||||
memcpy(pCxRomPeripheral + uSlot*256, pData+SSC_SLOT_FW_OFFSET, SSC_SLOT_FW_SIZE);
|
||||
|
||||
m_uSlot = uSlot;
|
||||
|
||||
// Expansion ROM
|
||||
if (m_pExpansionRom == NULL)
|
||||
{
|
||||
|
@ -25,7 +25,7 @@ typedef struct
|
||||
class CSuperSerialCard : public Card
|
||||
{
|
||||
public:
|
||||
CSuperSerialCard();
|
||||
CSuperSerialCard(UINT slot);
|
||||
virtual ~CSuperSerialCard();
|
||||
|
||||
virtual void Init(void) {};
|
||||
|
Loading…
Reference in New Issue
Block a user