|
|
| version 1.9, 2004/02/13 20:31:55 | version 1.11, 2005/02/07 15:39:27 |
|---|---|
| Line 25 static const char fddui_filter[] = | Line 25 static const char fddui_filter[] = |
| "All files (*.*)\0*.*\0"; | "All files (*.*)\0*.*\0"; |
| static const FILESEL fddui = {fddui_title, str_d88, fddui_filter, 3}; | static const FILESEL fddui = {fddui_title, str_d88, fddui_filter, 3}; |
| #if defined(SUPPORT_SASI) | |
| static const char sasiui_title[] = "Select SASI/IDE HDD image"; | static const char sasiui_title[] = "Select SASI/IDE HDD image"; |
| #else | |
| static const char sasiui_title[] = "Select HDD image"; | |
| #endif | |
| static const char sasiui_filter[] = \ | static const char sasiui_filter[] = \ |
| "Anex86 harddisk image files (*.HDI)\0" \ | "Anex86 harddisk image files (*.HDI)\0" \ |
| "*.hdi\0" \ | "*.hdi\0" \ |
| Line 37 static const char sasiui_filter[] = | Line 41 static const char sasiui_filter[] = |
| "*.thd;*.nhd;*.hdi\0"; | "*.thd;*.nhd;*.hdi\0"; |
| static const FILESEL sasiui = {sasiui_title, str_thd, sasiui_filter, 4}; | static const FILESEL sasiui = {sasiui_title, str_thd, sasiui_filter, 4}; |
| #if defined(SUPPORT_SCSI) | |
| static const char scsiui_title[] = "Select SCSI HDD image"; | static const char scsiui_title[] = "Select SCSI HDD image"; |
| static const char scsiui_filter[] = \ | static const char scsiui_filter[] = \ |
| "Virtual98 harddisk image files (*.HDD)\0" \ | "Virtual98 harddisk image files (*.HDD)\0" \ |
| "*.hdd\0"; | "*.hdd\0"; |
| static const FILESEL scsiui = {scsiui_title, str_hdd, scsiui_filter, 1}; | static const FILESEL scsiui = {scsiui_title, str_hdd, scsiui_filter, 1}; |
| #endif | |
| static const char newdisk_title[] = "Create disk image"; | static const char newdisk_title[] = "Create disk image"; |
| #if defined(SUPPORT_SCSI) | |
| static const char newdisk_filter[] = \ | static const char newdisk_filter[] = \ |
| "D88 image files (*.D88;*.88D)\0" \ | "D88 image files (*.D88;*.88D)\0" \ |
| "*.d88;*.88d\0" \ | "*.d88;*.88d;*.d98;*.98d\0" \ |
| "Anex86 harddisk image files (*.HDI)\0" \ | "Anex86 harddisk image files (*.HDI)\0" \ |
| "*.hdi\0" \ | "*.hdi\0" \ |
| "T98 harddisk image files (*.THD)\0" \ | "T98 harddisk image files (*.THD)\0" \ |
| Line 55 static const char newdisk_filter[] = | Line 62 static const char newdisk_filter[] = |
| "*.nhd\0" \ | "*.nhd\0" \ |
| "Virtual98 harddisk image files (*.HDD)\0" \ | "Virtual98 harddisk image files (*.HDD)\0" \ |
| "*.hdd\0"; | "*.hdd\0"; |
| #else | |
| static const char newdisk_filter[] = \ | |
| "D88 image files (*.D88;*.88D)\0" \ | |
| "*.d88;*.88d;*.d98;*.98d\0" \ | |
| "Anex86 harddisk image files (*.HDI)\0" \ | |
| "*.hdi\0" \ | |
| "T98 harddisk image files (*.THD)\0" \ | |
| "*.thd\0" \ | |
| "T98-Next harddisk image files (*.NHD)\0" \ | |
| "*.nhd\0"; | |
| #endif | |
| static const FILESEL newdiskui = {newdisk_title, str_d88, newdisk_filter, 1}; | static const FILESEL newdiskui = {newdisk_title, str_d88, newdisk_filter, 1}; |
| Line 85 void dialog_changehdd(HWND hWnd, REG8 dr | Line 103 void dialog_changehdd(HWND hWnd, REG8 dr |
| UINT num; | UINT num; |
| const char *p; | const char *p; |
| char path[MAX_PATH]; | |
| const FILESEL *hddui; | const FILESEL *hddui; |
| char path[MAX_PATH]; | |
| num = drv & 0x0f; | num = drv & 0x0f; |
| p = NULL; | |
| hddui = NULL; | |
| if (!(drv & 0x20)) { // SASI/IDE | if (!(drv & 0x20)) { // SASI/IDE |
| if (num >= 2) { | if (num < 2) { |
| return; | p = np2cfg.sasihdd[num]; |
| hddui = &sasiui; | |
| } | } |
| p = np2cfg.sasihdd[num]; | |
| hddui = &sasiui; | |
| } | } |
| #if defined(SUPPORT_SCSI) | |
| else { // SCSI | else { // SCSI |
| if (num >= 4) { | if (num < 4) { |
| return; | p = np2cfg.scsihdd[num]; |
| hddui = &scsiui; | |
| } | } |
| p = np2cfg.scsihdd[num]; | |
| hddui = &scsiui; | |
| } | } |
| if ((p == NULL) || (p[0] == '\0')) { | #endif |
| if (hddui == NULL) { | |
| return; | |
| } | |
| if (p[0] == '\0') { | |
| p = hddfolder; | p = hddfolder; |
| } | } |
| file_cpyname(path, p, sizeof(path)); | file_cpyname(path, p, sizeof(path)); |
| Line 125 static const UINT16 sasires[6] = { | Line 148 static const UINT16 sasires[6] = { |
| IDC_NEWSASI15MB, IDC_NEWSASI20MB, | IDC_NEWSASI15MB, IDC_NEWSASI20MB, |
| IDC_NEWSASI30MB, IDC_NEWSASI40MB}; | IDC_NEWSASI30MB, IDC_NEWSASI40MB}; |
| static BYTE makefdtype = DISKTYPE_2HD << 4; | static UINT8 makefdtype = DISKTYPE_2HD << 4; |
| static char disklabel[16+1]; | static char disklabel[16+1]; |
| static UINT hddsize; | static UINT hddsize; |
| static UINT hddminsize; | static UINT hddminsize; |
| Line 146 static LRESULT CALLBACK NewHddDlgProc(HW | Line 169 static LRESULT CALLBACK NewHddDlgProc(HW |
| return(FALSE); | return(FALSE); |
| case WM_COMMAND: | case WM_COMMAND: |
| switch (LOWORD(wp)) { | switch(LOWORD(wp)) { |
| case IDOK: | case IDOK: |
| GetWindowText(GetDlgItem(hWnd, IDC_HDDSIZE), | GetWindowText(GetDlgItem(hWnd, IDC_HDDSIZE), |
| work, sizeof(work)); | work, sizeof(work)); |
| Line 191 static LRESULT CALLBACK NewSASIDlgProc(H | Line 214 static LRESULT CALLBACK NewSASIDlgProc(H |
| return(FALSE); | return(FALSE); |
| case WM_COMMAND: | case WM_COMMAND: |
| switch (LOWORD(wp)) { | switch(LOWORD(wp)) { |
| case IDOK: | case IDOK: |
| for (val=0; val<6; val++) { | for (val=0; val<6; val++) { |
| if (GetDlgItemCheck(hWnd, sasires[val])) { | if (GetDlgItemCheck(hWnd, sasires[val])) { |
| Line 227 static LRESULT CALLBACK NewSASIDlgProc(H | Line 250 static LRESULT CALLBACK NewSASIDlgProc(H |
| static LRESULT CALLBACK NewdiskDlgProc(HWND hWnd, UINT msg, | static LRESULT CALLBACK NewdiskDlgProc(HWND hWnd, UINT msg, |
| WPARAM wp, LPARAM lp) { | WPARAM wp, LPARAM lp) { |
| WORD res; | UINT16 res; |
| switch (msg) { | switch (msg) { |
| case WM_INITDIALOG: | case WM_INITDIALOG: |
| Line 249 static LRESULT CALLBACK NewdiskDlgProc(H | Line 272 static LRESULT CALLBACK NewdiskDlgProc(H |
| return(FALSE); | return(FALSE); |
| case WM_COMMAND: | case WM_COMMAND: |
| switch (LOWORD(wp)) { | switch(LOWORD(wp)) { |
| case IDOK: | case IDOK: |
| GetWindowText(GetDlgItem(hWnd, IDC_DISKLABEL), | GetWindowText(GetDlgItem(hWnd, IDC_DISKLABEL), |
| disklabel, sizeof(disklabel)); | disklabel, sizeof(disklabel)); |
| Line 327 const char *ext; | Line 350 const char *ext; |
| newdisk_hdi(path, hddsize); | newdisk_hdi(path, hddsize); |
| } | } |
| } | } |
| #if defined(SUPPORT_SCSI) | |
| else if (!file_cmpname(ext, str_hdd)) { | else if (!file_cmpname(ext, str_hdd)) { |
| hddsize = 0; | hddsize = 0; |
| hddminsize = 2; | hddminsize = 2; |
| Line 336 const char *ext; | Line 360 const char *ext; |
| newdisk_vhd(path, hddsize); | newdisk_vhd(path, hddsize); |
| } | } |
| } | } |
| else { | #endif |
| else if ((!file_cmpname(ext, str_d88)) || | |
| (!file_cmpname(ext, str_d98)) || | |
| (!file_cmpname(ext, str_88d)) || | |
| (!file_cmpname(ext, str_98d))) { | |
| if (DialogBox(hinst, | if (DialogBox(hinst, |
| MAKEINTRESOURCE((np2cfg.usefd144)?IDD_NEWDISK2:IDD_NEWDISK), | MAKEINTRESOURCE((np2cfg.usefd144)?IDD_NEWDISK2:IDD_NEWDISK), |
| hWnd, (DLGPROC)NewdiskDlgProc) == IDOK) { | hWnd, (DLGPROC)NewdiskDlgProc) == IDOK) { |