mirror of
https://github.com/AppleWin/AppleWin.git
synced 2024-05-28 17:41:37 +00:00
Debugger: add 'DISK SLOT n' - to set current slot of Disk II card
This commit is contained in:
parent
9ca217dd4f
commit
91ebc14400
|
@ -3471,8 +3471,9 @@ Update_t CmdFlag (int nArgs)
|
|||
// Disk ___________________________________________________________________________________________
|
||||
|
||||
// Usage:
|
||||
// DISK SLOT [#] // Show [or set] the current slot of the Disk II I/F card (for all other cmds to act on)
|
||||
// DISK INFO // Info for current drive
|
||||
// DISK # EJECT // Unmount disk
|
||||
// DISK INFO
|
||||
// DISK # PROTECT # // Write-protect disk on/off
|
||||
// DISK # "<filename>" // Mount filename as floppy disk
|
||||
// TODO:
|
||||
|
@ -3480,18 +3481,20 @@ Update_t CmdFlag (int nArgs)
|
|||
// DISK # READ <Track> <Sector> Addr:Addr // Read Track/Sector(s)
|
||||
// DISK # WRITE <Track> <Sector> Addr:Addr // Write Track/Sector(s)
|
||||
// Examples:
|
||||
// DISK 2 INFO
|
||||
Update_t CmdDisk ( int nArgs)
|
||||
// DISK INFO
|
||||
Update_t CmdDisk (int nArgs)
|
||||
{
|
||||
static UINT currentSlot = SLOT6;
|
||||
|
||||
if (! nArgs)
|
||||
return HelpLastCommand();
|
||||
|
||||
if (GetCardMgr().QuerySlot(SLOT6) != CT_Disk2)
|
||||
return ConsoleDisplayError("No DiskII card in slot-6");
|
||||
if (GetCardMgr().QuerySlot(currentSlot) != CT_Disk2)
|
||||
return ConsoleDisplayErrorFormat("No Disk II card in slot-%d", currentSlot);
|
||||
|
||||
Disk2InterfaceCard& diskCard = dynamic_cast<Disk2InterfaceCard&>(GetCardMgr().GetRef(SLOT6));
|
||||
Disk2InterfaceCard& diskCard = dynamic_cast<Disk2InterfaceCard&>(GetCardMgr().GetRef(currentSlot));
|
||||
|
||||
// check for info command
|
||||
// check for info or slot command
|
||||
int iParam = 0;
|
||||
FindParam( g_aArgs[ 1 ].sArg, MATCH_EXACT, iParam, _PARAM_DISK_BEGIN, _PARAM_DISK_END );
|
||||
|
||||
|
@ -3513,6 +3516,24 @@ Update_t CmdDisk ( int nArgs)
|
|||
return ConsoleUpdate();
|
||||
}
|
||||
|
||||
if (iParam == PARAM_DISK_SET_SLOT)
|
||||
{
|
||||
if (nArgs > 2)
|
||||
return HelpLastCommand();
|
||||
|
||||
if (nArgs > 1)
|
||||
{
|
||||
UINT slot = g_aArgs[2].nValue;
|
||||
if (slot < SLOT1 || slot > SLOT7)
|
||||
return HelpLastCommand();
|
||||
|
||||
currentSlot = slot;
|
||||
}
|
||||
|
||||
ConsoleBufferPushFormat("Current Disk II slot = %d", currentSlot);
|
||||
return ConsoleUpdate();
|
||||
}
|
||||
|
||||
if (nArgs < 2)
|
||||
return HelpLastCommand();
|
||||
|
||||
|
|
|
@ -442,8 +442,9 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|||
{TEXT("SPACES") , NULL, PARAM_CONFIG_SPACES },
|
||||
{TEXT("TARGET") , NULL, PARAM_CONFIG_TARGET },
|
||||
// Disk
|
||||
{TEXT("EJECT") , NULL, PARAM_DISK_EJECT },
|
||||
{TEXT("INFO") , NULL, PARAM_DISK_INFO },
|
||||
{TEXT("SLOT") , NULL, PARAM_DISK_SET_SLOT },
|
||||
{TEXT("EJECT") , NULL, PARAM_DISK_EJECT },
|
||||
{TEXT("PROTECT") , NULL, PARAM_DISK_PROTECT },
|
||||
{TEXT("READ") , NULL, PARAM_DISK_READ },
|
||||
// Font (Config)
|
||||
|
|
|
@ -1396,8 +1396,9 @@ const DisasmData_t* pDisasmData; // If != NULL then bytes are marked up as data
|
|||
|
||||
// Disk
|
||||
, _PARAM_DISK_BEGIN = _PARAM_CONFIG_END // Daisy Chain
|
||||
, PARAM_DISK_EJECT = _PARAM_DISK_BEGIN // DISK 1 EJECT
|
||||
, PARAM_DISK_INFO // DISK 1 INFO
|
||||
, PARAM_DISK_INFO = _PARAM_DISK_BEGIN // DISK INFO
|
||||
, PARAM_DISK_SET_SLOT // DISK SLOT 6
|
||||
, PARAM_DISK_EJECT // DISK 1 EJECT
|
||||
, PARAM_DISK_PROTECT // DISK 1 PROTECT
|
||||
, PARAM_DISK_READ // DISK 1 READ Track Sector NumSectors MemAddress
|
||||
, _PARAM_DISK_END
|
||||
|
|
Loading…
Reference in New Issue
Block a user