mirror of
https://github.com/AppleWin/AppleWin.git
synced 2026-04-20 15:17:50 +00:00
Cmd line: -sN 6522a|b-bad (for mb-audit)
This commit is contained in:
@@ -353,6 +353,8 @@ BYTE SY6522::Read(BYTE nReg)
|
||||
break;
|
||||
case 0x02: // DDRB
|
||||
nValue = m_regs.DDRB;
|
||||
if (m_bad6522)
|
||||
nValue &= ~1; // DDRB.b0 = 0 (for testing mb-audit)
|
||||
break;
|
||||
case 0x03: // DDRA
|
||||
nValue = m_regs.DDRA;
|
||||
|
||||
@@ -20,6 +20,11 @@ public:
|
||||
m_syncEvent[1] = event1;
|
||||
}
|
||||
|
||||
void InitBadState(bool bad6522)
|
||||
{
|
||||
m_bad6522 = bad6522;
|
||||
}
|
||||
|
||||
void Reset(const bool powerCycle);
|
||||
|
||||
void StartTimer1(void);
|
||||
@@ -148,4 +153,7 @@ private:
|
||||
bool m_isBusDriven;
|
||||
|
||||
static const UINT kExtraMegaAudioTimerCycles = kExtraTimerCycles + 1;
|
||||
|
||||
// For mb-audit
|
||||
bool m_bad6522;
|
||||
};
|
||||
|
||||
@@ -187,7 +187,9 @@ bool ProcessCmdLine(LPSTR lpCmdLine)
|
||||
g_cmdLine.slotInfo[slot].isDiskII13 = true;
|
||||
}
|
||||
if (strcmp(lpCmdLine, "hdc") == 0)
|
||||
{
|
||||
g_cmdLine.slotInsert[slot] = CT_GenericHDD;
|
||||
}
|
||||
if (strcmp(lpCmdLine, "hdc-sp") == 0)
|
||||
{
|
||||
g_cmdLine.slotInsert[slot] = CT_GenericHDD;
|
||||
@@ -204,7 +206,9 @@ bool ProcessCmdLine(LPSTR lpCmdLine)
|
||||
g_cmdLine.slotInfo[slot].useHdcFirmwareMode = HdcBlockMode4Devices;
|
||||
}
|
||||
if (strcmp(lpCmdLine, "saturn") == 0 || strcmp(lpCmdLine, "saturn128") == 0) // Support Saturn128 card in slot 1-7 too (GH#1279)
|
||||
{
|
||||
g_cmdLine.slotInsert[slot] = CT_Saturn128K;
|
||||
}
|
||||
if (strcmp(lpCmdLine, "megaaudio") == 0)
|
||||
{
|
||||
g_cmdLine.slotInsert[slot] = CT_MegaAudio;
|
||||
@@ -215,6 +219,14 @@ bool ProcessCmdLine(LPSTR lpCmdLine)
|
||||
g_cmdLine.slotInsert[slot] = CT_SDMusic;
|
||||
g_cmdLine.supportExtraMBCardTypes = true;
|
||||
}
|
||||
if (strcmp(lpCmdLine, "6522a-bad") == 0)
|
||||
{
|
||||
g_cmdLine.slotInfo[slot].useBad6522A = true;
|
||||
}
|
||||
if (strcmp(lpCmdLine, "6522b-bad") == 0)
|
||||
{
|
||||
g_cmdLine.slotInfo[slot].useBad6522B = true;
|
||||
}
|
||||
if (strcmp(lpCmdLine, "parallel") == 0)
|
||||
{
|
||||
if (slot == SLOT1)
|
||||
|
||||
@@ -15,10 +15,14 @@ struct CmdLine
|
||||
{
|
||||
isDiskII13 = false;
|
||||
useHdcFirmwareMode = HdcDefault;
|
||||
useBad6522A = false;
|
||||
useBad6522B = false;
|
||||
}
|
||||
|
||||
bool isDiskII13;
|
||||
HdcMode useHdcFirmwareMode;
|
||||
bool useBad6522A;
|
||||
bool useBad6522B;
|
||||
};
|
||||
|
||||
CmdLine()
|
||||
|
||||
@@ -48,6 +48,8 @@ public:
|
||||
void UpdateIFR(BYTE nDevice, BYTE clr_mask, BYTE set_mask);
|
||||
BYTE GetPCR(BYTE nDevice);
|
||||
bool IsAnyTimer1Active(void);
|
||||
void UseBad6522A(void) { m_MBSubUnit[0].sy6522.InitBadState(true); }
|
||||
void UseBad6522B(void) { m_MBSubUnit[1].sy6522.InitBadState(true); }
|
||||
|
||||
struct DEBUGGER_MB_SUBUNIT
|
||||
{
|
||||
|
||||
@@ -803,8 +803,10 @@ static void RepeatInitialization(void)
|
||||
for (UINT i = SLOT0; i < NUM_SLOTS; i++)
|
||||
{
|
||||
if (GetCardMgr().QuerySlot(i) == CT_Disk2 && g_cmdLine.slotInfo[i].isDiskII13)
|
||||
{
|
||||
dynamic_cast<Disk2InterfaceCard&>(GetCardMgr().GetRef(i)).SetFirmware13Sector();
|
||||
if (GetCardMgr().QuerySlot(i) == CT_GenericHDD)
|
||||
}
|
||||
else if (GetCardMgr().QuerySlot(i) == CT_GenericHDD)
|
||||
{
|
||||
dynamic_cast<HarddiskInterfaceCard&>(GetCardMgr().GetRef(i)).SetUserNumBlocks(g_cmdLine.uHarddiskNumBlocks);
|
||||
if (g_cmdLine.useHdcFirmwareV1)
|
||||
@@ -813,6 +815,13 @@ static void RepeatInitialization(void)
|
||||
dynamic_cast<HarddiskInterfaceCard&>(GetCardMgr().GetRef(i)).UseHdcFirmwareV2();
|
||||
dynamic_cast<HarddiskInterfaceCard&>(GetCardMgr().GetRef(i)).SetHdcFirmwareMode(g_cmdLine.slotInfo[i].useHdcFirmwareMode);
|
||||
}
|
||||
else if (GetCardMgr().GetMockingboardCardMgr().IsMockingboard(i))
|
||||
{
|
||||
if (g_cmdLine.slotInfo[i].useBad6522A)
|
||||
dynamic_cast<MockingboardCard&>(GetCardMgr().GetRef(i)).UseBad6522A();
|
||||
if (g_cmdLine.slotInfo[i].useBad6522B)
|
||||
dynamic_cast<MockingboardCard&>(GetCardMgr().GetRef(i)).UseBad6522B();
|
||||
}
|
||||
}
|
||||
|
||||
// Create window after inserting/removing VidHD card (as it affects width & height)
|
||||
|
||||
Reference in New Issue
Block a user