Sound page has SAM card option

This commit is contained in:
unknown 2015-03-11 12:43:24 +09:00
parent 33d33b71ec
commit c2b62d26d3
6 changed files with 76 additions and 43 deletions

View File

@ -169,6 +169,9 @@
<ClCompile Include="source\Debugger\Util_MemoryTextFile.cpp">
<Filter>Source Files\Debugger</Filter>
</ClCompile>
<ClCompile Include="source\DAC.cpp">
<Filter>Source Files\Emulator</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="source\Applewin.h">

View File

@ -154,10 +154,11 @@ BEGIN
CONTROL "Slider1",IDC_SPKR_VOLUME,"msctls_trackbar32",TBS_AUTOTICKS | TBS_VERT | TBS_BOTH | WS_TABSTOP,13,47,28,60
LTEXT "&Mockingboard:",IDC_STATIC,49,39,51,8
CONTROL "Slider1",IDC_MB_VOLUME,"msctls_trackbar32",TBS_AUTOTICKS | TBS_VERT | TBS_BOTH | WS_TABSTOP,59,47,25,60
GROUPBOX "Sound Cards",IDC_STATIC,6,122,197,61
GROUPBOX "Sound Cards",IDC_STATIC,6,122,197,64
CONTROL "Mockingboards (in slots 4 && 5)",IDC_MB_ENABLE,"Button",BS_AUTORADIOBUTTON,10,136,142,8
CONTROL "Phasor (in slot 4)",IDC_PHASOR_ENABLE,"Button",BS_AUTORADIOBUTTON,10,149,92,10
CONTROL "No sound cards",IDC_SOUNDCARD_DISABLE,"Button",BS_AUTORADIOBUTTON,10,163,78,10
CONTROL "SAM/DAC (in slot 5)",IDC_SAM_ENABLE,"Button",BS_AUTORADIOBUTTON,10,162,95,10
CONTROL "No sound cards",IDC_SOUNDCARD_DISABLE,"Button",BS_AUTORADIOBUTTON,10,175,78,10
END
IDD_PROPPAGE_DISK DIALOGEX 0, 0, 211, 188

View File

@ -67,36 +67,39 @@
#define IDC_SPIN_XTRIM 1026
#define IDC_SPIN_YTRIM 1027
#define IDC_PHASOR_ENABLE 1029
#define IDC_SOUNDCARD_DISABLE 1030
#define IDC_TFE_SETTINGS_ENABLE_T 1031
#define IDC_TFE_SETTINGS_ENABLE 1032
#define IDC_TFE_SETTINGS_INTERFACE_T 1033
#define IDC_TFE_SETTINGS_INTERFACE 1034
#define IDC_TFE_SETTINGS_INTERFACE_NAME 1035
#define IDC_TFE_SETTINGS_INTERFACE_DESC 1036
#define IDS_TFE_CAPTION 1037
#define IDS_TFE_ETHERNET 1038
#define IDS_TFE_INTERFACE 1039
#define IDS_OK 1040
#define IDS_CANCEL 1041
#define IDC_ETHERNET 1042
#define IDC_SCROLLLOCK_TOGGLE 1043
#define IDC_MOUSE_IN_SLOT4 1044
#define IDC_THE_FREEZES_F8_ROM_FW 1045
#define IDC_MOUSE_CROSSHAIR 1046
#define IDC_CLONETYPE 1047
#define IDC_MOUSE_RESTRICT_TO_WINDOW 1048
#define IDC_CIDERPRESS_BROWSE 1049
#define IDC_CIDERPRESS_FILENAME 1050
#define IDC_CPM_CONFIG 1051
#define IDC_DUMPTOPRINTER 1052
#define IDC_PRINTER_DUMP_FILENAME 1053
#define IDC_PRINTER_DUMP_FILENAME_BROWSE 1054
#define IDC_PRINTER_CONVERT_ENCODING 1055
#define IDC_PRINTER_FILTER_UNPRINTABLE 1056
#define IDC_PRINTER_APPEND 1057
#define IDC_SPIN_PRINTER_IDLE 1058
#define IDC_CHECK_HALF_SCAN_LINES 1059
#define IDC_SAM_ENABLE 1030
#define IDC_SOUNDCARD_DISABLE 1031
#define IDC_TFE_SETTINGS_ENABLE_T 1032
#define IDC_TFE_SETTINGS_ENABLE 1033
#define IDC_TFE_SETTINGS_INTERFACE_T 1034
#define IDC_TFE_SETTINGS_INTERFACE 1035
#define IDC_TFE_SETTINGS_INTERFACE_NAME 1036
#define IDC_TFE_SETTINGS_INTERFACE_DESC 1037
#define IDS_TFE_CAPTION 1038
#define IDS_TFE_ETHERNET 1039
#define IDS_TFE_INTERFACE 1040
#define IDS_OK 1041
#define IDS_CANCEL 1042
#define IDC_ETHERNET 1043
#define IDC_SCROLLLOCK_TOGGLE 1044
#define IDC_MOUSE_IN_SLOT4 1045
#define IDC_THE_FREEZES_F8_ROM_FW 1046
#define IDC_MOUSE_CROSSHAIR 1047
#define IDC_CLONETYPE 1048
#define IDC_MOUSE_RESTRICT_TO_WINDOW 1049
#define IDC_CIDERPRESS_BROWSE 1050
#define IDC_CIDERPRESS_FILENAME 1051
#define IDC_CPM_CONFIG 1052
#define IDC_DUMPTOPRINTER 1053
#define IDC_PRINTER_DUMP_FILENAME 1054
#define IDC_PRINTER_DUMP_FILENAME_BROWSE 1055
#define IDC_PRINTER_CONVERT_ENCODING 1056
#define IDC_PRINTER_FILTER_UNPRINTABLE 1057
#define IDC_PRINTER_APPEND 1058
#define IDC_SPIN_PRINTER_IDLE 1059
#define IDC_CHECK_HALF_SCAN_LINES 1060
#define IDC_GPL_TEXT 1061
#define IDC_GPL_BORDER 1063
#define IDC_APPLEWIN_VERSION 1064

View File

@ -93,6 +93,10 @@ BOOL CPageSound::DlgProcInternal(HWND hWnd, UINT message, WPARAM wparam, LPARAM
if (NewSoundcardConfigured(hWnd, wparam, CT_Phasor))
InitOptions(hWnd); // re-init
break;
case IDC_SAM_ENABLE:
if (NewSoundcardConfigured(hWnd, wparam, CT_SAM))
InitOptions(hWnd); // re-init
break;
case IDC_SOUNDCARD_DISABLE:
if (NewSoundcardConfigured(hWnd, wparam, CT_Empty))
InitOptions(hWnd); // re-init
@ -114,7 +118,11 @@ BOOL CPageSound::DlgProcInternal(HWND hWnd, UINT message, WPARAM wparam, LPARAM
SendDlgItemMessage(hWnd,IDC_MB_VOLUME,TBM_SETTICFREQ,10,0);
SendDlgItemMessage(hWnd,IDC_MB_VOLUME,TBM_SETPOS,1,MB_GetVolume());
m_NewCardType = MB_GetSoundcardType(); // Reinit 1st time page is activated (fires before PSN_SETACTIVE)
if (g_Slot5 == CT_SAM)
m_NewCardType = CT_SAM;
else
m_NewCardType = MB_GetSoundcardType(); // Reinit 1st time page is activated (fires before PSN_SETACTIVE)
InitOptions(hWnd);
break;
@ -153,7 +161,9 @@ void CPageSound::InitOptions(HWND hWnd)
m_nCurrentIDCheckButton = IDC_MB_ENABLE;
else if(m_NewCardType == CT_Phasor)
m_nCurrentIDCheckButton = IDC_PHASOR_ENABLE;
else
else if(m_NewCardType == CT_SAM)
m_nCurrentIDCheckButton = IDC_SAM_ENABLE;
else
m_nCurrentIDCheckButton = IDC_SOUNDCARD_DISABLE;
CheckRadioButton(hWnd, IDC_MB_ENABLE, IDC_SOUNDCARD_DISABLE, m_nCurrentIDCheckButton);
@ -168,16 +178,23 @@ void CPageSound::InitOptions(HWND hWnd)
// Phasor button
{
const BOOL bEnable = bIsSlot4Empty || Slot4 == CT_MockingboardC;
const BOOL bEnable = bIsSlot4Empty || Slot4 == CT_MockingboardC || Slot4 == CT_Phasor;
EnableWindow(GetDlgItem(hWnd, IDC_PHASOR_ENABLE), bEnable); // Disable Phasor (slot 4)
}
// Mockingboard button
{
const BOOL bEnable = (bIsSlot4Empty || Slot4 == CT_Phasor) && bIsSlot5Empty;
const BOOL bEnable = (bIsSlot4Empty || Slot4 == CT_Phasor || Slot4 == CT_MockingboardC) &&
(bIsSlot5Empty || Slot5 == CT_SAM || Slot5 == CT_MockingboardC);
EnableWindow(GetDlgItem(hWnd, IDC_MB_ENABLE), bEnable); // Disable Mockingboard (slot 4 & 5)
}
// SAM button
{
const BOOL bEnable = bIsSlot5Empty || Slot5 == CT_MockingboardC || Slot5 == CT_SAM;
EnableWindow(GetDlgItem(hWnd, IDC_SAM_ENABLE), bEnable); // Disable SAM (slot 5)
}
EnableWindow(GetDlgItem(hWnd, IDC_MB_VOLUME), (m_nCurrentIDCheckButton != IDC_SOUNDCARD_DISABLE) ? TRUE : FALSE);
}
@ -191,6 +208,7 @@ bool CPageSound::NewSoundcardConfigured(HWND hWnd, WPARAM wparam, SS_CARDTYPE Ne
m_NewCardType = NewCardType;
const SS_CARDTYPE Slot4 = m_PropertySheetHelper.GetConfigNew().m_Slot[4];
const SS_CARDTYPE Slot5 = m_PropertySheetHelper.GetConfigNew().m_Slot[5];
if (NewCardType == CT_MockingboardC)
@ -201,14 +219,21 @@ bool CPageSound::NewSoundcardConfigured(HWND hWnd, WPARAM wparam, SS_CARDTYPE Ne
else if (NewCardType == CT_Phasor)
{
m_PropertySheetHelper.GetConfigNew().m_Slot[4] = CT_Phasor;
if (Slot5 == CT_MockingboardC)
if ((Slot5 == CT_MockingboardC) || (Slot5 == CT_SAM))
m_PropertySheetHelper.GetConfigNew().m_Slot[5] = CT_Empty;
}
else
{
else if (NewCardType == CT_SAM)
{
if ((Slot4 == CT_MockingboardC) || (Slot4 == CT_Phasor))
m_PropertySheetHelper.GetConfigNew().m_Slot[4] = CT_Empty;
if (Slot5 == CT_MockingboardC)
m_PropertySheetHelper.GetConfigNew().m_Slot[5] = CT_Empty;
m_PropertySheetHelper.GetConfigNew().m_Slot[5] = CT_SAM;
}
else
{
if ((Slot4 == CT_MockingboardC) || (Slot4 == CT_Phasor))
m_PropertySheetHelper.GetConfigNew().m_Slot[4] = CT_Empty;
if ((Slot5 == CT_MockingboardC) || (Slot5 == CT_SAM))
m_PropertySheetHelper.GetConfigNew().m_Slot[5] = CT_Empty;
}
return true;

View File

@ -44,7 +44,7 @@ Input
. Mouse WM_USER_RESTART
. CP/M WM_USER_RESTART
Sound
. MB/Phasor/None WM_USER_RESTART
. MB/Phasor/SAM/None WM_USER_RESTART
Disk
. Enhanced disk speed WM_USER_RESTART Why? (used to patch Disk][ f/w - but not anymore)
. HDD enable WM_USER_RESTART

View File

@ -1296,7 +1296,8 @@ void MemInitialize()
ConfigureSoftcard(pCxRomPeripheral, 5); // $C500 : Z80 card
}
else
ConfigureDAC(pCxRomPeripheral, 5); // $C500 : Z80 card
if (g_Slot5 == CT_SAM)
ConfigureDAC(pCxRomPeripheral, 5); // $C500 : Z80 card
DiskLoadRom(pCxRomPeripheral, 6); // $C600 : Disk][ f/w
HD_Load_Rom(pCxRomPeripheral, 7); // $C700 : HDD f/w