AppleWin/source/Configuration/PageDisk.h
TomCh 769d4c6927
Support 2nd Disk][ card and improved card management (#726) (PR #741)
Support 2nd Disk][ in slot-5, via command line:
- -s5 diskii
- -s5d1 \<imagefile\>
- -s5d2 \<imagefile\>

NB. there's currently no Configuration UI support, except the Drive icons' tooltips show what's in slot-5 & slot-6 (for drive-n). So there's no way to eject the disks or insert new disks. The use-case I'm supporting it Wasteland which just has the 4 disks in the 4 drives.

Improved card management:
- Added `class Card` (in Card.h) which all other cards (that exist as classes) derive from (eg. LC,SSC,Mouse,Disk2).
- Added `class CardManager` (in CardManager.cpp\h) which now manages the 8 slots (and aux slot).
- Added `class Disk2CardManager` (in Disk2CardManager.cpp\h) which provides methods for operations that act on all Disk2 instances at the same time.
- Currently limited to just 1x SSC and 1x Mouse card (why would you need more?). This simplifies things, meaning there's no need to have dedicated SSCManager / MouseCardManager objects.
- Currently the 2nd Disk2 card can only be put into slot-5. This limitation is just due to the complexity of the Configuration UI. Having a more general drop-down per slot UI would remove this limitation.
2019-12-19 19:42:30 +00:00

45 lines
1.3 KiB
C++

#pragma once
#include "IPropertySheetPage.h"
#include "PropertySheetDefs.h"
class CPropertySheetHelper;
class CPageDisk : private IPropertySheetPage
{
public:
CPageDisk(CPropertySheetHelper& PropertySheetHelper) :
m_Page(PG_DISK),
m_PropertySheetHelper(PropertySheetHelper)
{
CPageDisk::ms_this = this;
}
virtual ~CPageDisk(){}
static BOOL CALLBACK DlgProc(HWND hWnd, UINT message, WPARAM wparam, LPARAM lparam);
protected:
// IPropertySheetPage
virtual BOOL DlgProcInternal(HWND hWnd, UINT message, WPARAM wparam, LPARAM lparam);
virtual void DlgOK(HWND hWnd);
virtual void DlgCANCEL(HWND hWnd){}
private:
void InitOptions(HWND hWnd);
void InitComboFloppyDrive(HWND hWnd, UINT slot);
void InitComboHDD(HWND hWnd, UINT slot);
void EnableHDD(HWND hWnd, BOOL bEnable);
void EnableDisk(HWND hWnd, BOOL bEnable);
void HandleHDDCombo(HWND hWnd, UINT driveSelected, UINT comboSelected);
void HandleFloppyDriveCombo(HWND hWnd, UINT driveSelected, UINT comboSelected);
void HandleHDDSwap(HWND hWnd);
UINT RemovalConfirmation(UINT uCommand);
static CPageDisk* ms_this;
static const TCHAR m_discchoices[];
static const TCHAR m_defaultDiskOptions[];
static const TCHAR m_defaultHDDOptions[];
const PAGETYPE m_Page;
CPropertySheetHelper& m_PropertySheetHelper;
};