HDD Speed setting in win32

This commit is contained in:
Jasmine Iwanek
2022-11-08 04:18:33 -05:00
parent 6848dfc48c
commit 40d39f1baa
6 changed files with 152 additions and 116 deletions

View File

@@ -15,6 +15,7 @@
* Author: Fred N. van Kempen, <decwiz@yahoo.com>
*
* Copyright 2017,2018 Fred N. van Kempen.
* Copyright 2022 Jasmine Iwanek.
*/
#ifndef LANG_UAGE_H
@@ -60,12 +61,26 @@
#define IDS_2084 2084 // "H"
#define IDS_2085 2085 // "S"
#define IDS_2086 2086 // "MB"
#define IDS_2087 2087 // "Check BPB"
#define IDS_2088 2088 // "KB"
#define IDS_2089 2089 // "Could not initialize the video..."
#define IDS_2090 2090 // "Default"
#define IDS_2091 2091 // "%i Wait state(s)"
#define IDS_2092 2092 // "Type"
#define IDS_2087 2087 // "Speed"
#define IDS_2088 2088 // "Check BPB"
#define IDS_BPB IDS_2088 // "Check BPB"
#define IDS_2089 2089 // "KB"
#define IDS_KB IDS_2089 // "KB"
#define IDS_2090 2090 // "Could not initialize the video..."
#define IDS_2091 2091 // "Default"
#define IDS_DEFAULT IDS_2091 // "Default"
#define IDS_2092 2092 // "%i Wait state(s)"
#define IDS_WS IDS_2092 // "%i Wait state(s)"
#define IDS_2093 2093 // "Type"
#define IDS_TYPE IDS_2093 // "Type"
/* TODO */
#define IDS_2093 2093 // "PCap failed to set up.."
#define IDS_2094 2094 // "No PCap devices found"
#define IDS_2095 2095 // "Invalid PCap device"

View File

@@ -244,37 +244,37 @@ plat_get_string(int i)
return L"Press CTRL-END or middle button to release mouse";
case IDS_2080:
return L"Failed to initialize FluidSynth";
case IDS_2130:
case IDS_2131:
return L"Invalid configuration";
case IDS_4099:
return L"MFM/RLL or ESDI CD-ROM drives never existed";
case IDS_2093:
return L"Failed to set up PCap";
case IDS_2094:
return L"No PCap devices found";
return L"Failed to set up PCap";
case IDS_2095:
return L"No PCap devices found";
case IDS_2096:
return L"Invalid PCap device";
case IDS_2110:
return L"Unable to initialize FreeType";
case IDS_2111:
return L"Unable to initialize FreeType";
case IDS_2112:
return L"Unable to initialize SDL, libsdl2 is required";
case IDS_2131:
return L"libfreetype is required for ESC/P printer emulation.";
case IDS_2132:
return L"libgs is required for automatic conversion of PostScript files to PDF.\n\nAny documents sent to the generic PostScript printer will be saved as PostScript (.ps) files.";
return L"libfreetype is required for ESC/P printer emulation.";
case IDS_2133:
return L"libgs is required for automatic conversion of PostScript files to PDF.\n\nAny documents sent to the generic PostScript printer will be saved as PostScript (.ps) files.";
case IDS_2134:
return L"libfluidsynth is required for FluidSynth MIDI output.";
case IDS_2129:
case IDS_2130:
return L"Make sure libpcap is installed and that you are on a libpcap-compatible network connection.";
case IDS_2114:
case IDS_2115:
return L"Unable to initialize Ghostscript";
case IDS_2063:
return L"Machine \"%hs\" is not available due to missing ROMs in the roms/machines directory. Switching to an available machine.";
case IDS_2064:
return L"Video card \"%hs\" is not available due to missing ROMs in the roms/video directory. Switching to an available video card.";
case IDS_2128:
case IDS_2129:
return L"Hardware not available";
case IDS_2142:
case IDS_2143:
return L"Monitor in sleep mode";
}
return L"";

View File

@@ -422,102 +422,103 @@ BEGIN
IDS_2084 "H"
IDS_2085 "S"
IDS_2086 "MB"
IDS_2087 "Check BPB"
IDS_2088 "KB"
IDS_2089 "Could not initialize the video renderer."
IDS_2090 "Default"
IDS_2091 "%i Wait state(s)"
IDS_2092 "Type"
IDS_2093 "Failed to set up PCap"
IDS_2094 "No PCap devices found"
IDS_2095 "Invalid PCap device"
IDS_2096 "Standard 2-button joystick(s)"
IDS_2097 "Standard 4-button joystick"
IDS_2098 "Standard 6-button joystick"
IDS_2099 "Standard 8-button joystick"
IDS_2100 "CH Flightstick Pro"
IDS_2101 "Microsoft SideWinder Pad"
IDS_2102 "Thrustmaster Flight Control System"
IDS_2103 "None"
IDS_2104 "Unable to load keyboard accelerators."
IDS_2105 "Unable to register raw input."
IDS_2106 "%u"
IDS_2107 "%u MB (CHS: %i, %i, %i)"
IDS_2108 "Floppy %i (%s): %ls"
IDS_2109 "All images (*.0??;*.1??;*.??0;*.86F;*.BIN;*.CQ?;*.D??;*.FLP;*.HDM;*.IM?;*.JSON;*.TD0;*.*FD?;*.MFM;*.XDF)\0*.0??;*.1??;*.??0;*.86F;*.BIN;*.CQ?;*.D??;*.FLP;*.HDM;*.IM?;*.JSON;*.TD0;*.*FD?;*.MFM;*.XDF\0Advanced sector images (*.IMD;*.JSON;*.TD0)\0*.IMD;*.JSON;*.TD0\0Basic sector images (*.0??;*.1??;*.??0;*.BIN;*.CQ?;*.D??;*.FLP;*.HDM;*.IM?;*.XDF;*.*FD?)\0*.0??;*.1??;*.??0;*.BIN;*.CQ?;*.D??;*.FLP;*.HDM;*.IM?;*.XDF;*.*FD?\0Flux images (*.FDI)\0*.FDI\0Surface images (*.86F;*.MFM)\0*.86F;*.MFM\0All files (*.*)\0*.*\0"
IDS_2110 "Unable to initialize FreeType"
IDS_2111 "Unable to initialize SDL, SDL2.dll is required"
IDS_2112 "Are you sure you want to hard reset the emulated machine?"
IDS_2113 "Are you sure you want to exit 86Box?"
IDS_2114 "Unable to initialize Ghostscript"
IDS_2115 "MO %i (%ls): %ls"
IDS_2116 "MO images (*.IM?;*.MDI)\0*.IM?;*.MDI\0All files (*.*)\0*.*\0"
IDS_2117 "Welcome to 86Box!"
IDS_2118 "Internal controller"
IDS_2119 "Exit"
IDS_2120 "No ROMs found"
IDS_2121 "Do you want to save the settings?"
IDS_2122 "This will hard reset the emulated machine."
IDS_2123 "Save"
IDS_2124 "About 86Box"
IDS_2125 "86Box v" EMU_VERSION
IDS_2087 "Speed"
IDS_2088 "Check BPB"
IDS_2089 "KB"
IDS_2090 "Could not initialize the video renderer."
IDS_2091 "Default"
IDS_2092 "%i Wait state(s)"
IDS_2093 "Type"
IDS_2094 "Failed to set up PCap"
IDS_2095 "No PCap devices found"
IDS_2096 "Invalid PCap device"
IDS_2097 "Standard 2-button joystick(s)"
IDS_2098 "Standard 4-button joystick"
IDS_2099 "Standard 6-button joystick"
IDS_2100 "Standard 8-button joystick"
IDS_2101 "CH Flightstick Pro"
IDS_2102 "Microsoft SideWinder Pad"
IDS_2103 "Thrustmaster Flight Control System"
IDS_2104 "None"
IDS_2105 "Unable to load keyboard accelerators."
IDS_2106 "Unable to register raw input."
IDS_2107 "%u"
IDS_2108 "%u MB (CHS: %i, %i, %i)"
IDS_2109 "Floppy %i (%s): %ls"
IDS_2110 "All images (*.0??;*.1??;*.??0;*.86F;*.BIN;*.CQ?;*.D??;*.FLP;*.HDM;*.IM?;*.JSON;*.TD0;*.*FD?;*.MFM;*.XDF)\0*.0??;*.1??;*.??0;*.86F;*.BIN;*.CQ?;*.D??;*.FLP;*.HDM;*.IM?;*.JSON;*.TD0;*.*FD?;*.MFM;*.XDF\0Advanced sector images (*.IMD;*.JSON;*.TD0)\0*.IMD;*.JSON;*.TD0\0Basic sector images (*.0??;*.1??;*.??0;*.BIN;*.CQ?;*.D??;*.FLP;*.HDM;*.IM?;*.XDF;*.*FD?)\0*.0??;*.1??;*.??0;*.BIN;*.CQ?;*.D??;*.FLP;*.HDM;*.IM?;*.XDF;*.*FD?\0Flux images (*.FDI)\0*.FDI\0Surface images (*.86F;*.MFM)\0*.86F;*.MFM\0All files (*.*)\0*.*\0"
IDS_2111 "Unable to initialize FreeType"
IDS_2112 "Unable to initialize SDL, SDL2.dll is required"
IDS_2113 "Are you sure you want to hard reset the emulated machine?"
IDS_2114 "Are you sure you want to exit 86Box?"
IDS_2115 "Unable to initialize Ghostscript"
IDS_2116 "MO %i (%ls): %ls"
IDS_2117 "MO images (*.IM?;*.MDI)\0*.IM?;*.MDI\0All files (*.*)\0*.*\0"
IDS_2118 "Welcome to 86Box!"
IDS_2119 "Internal controller"
IDS_2120 "Exit"
IDS_2121 "No ROMs found"
IDS_2122 "Do you want to save the settings?"
IDS_2123 "This will hard reset the emulated machine."
IDS_2124 "Save"
IDS_2125 "About 86Box"
IDS_2126 "86Box v" EMU_VERSION
IDS_2126 "An emulator of old computers\n\nAuthors: Sarah Walker, Miran Grca, Fred N. van Kempen (waltje), SA1988, Tiseno100, reenigne, leilei, JohnElliott, greatpsycho, and others.\n\nReleased under the GNU General Public License version 2 or later. See LICENSE for more information."
IDS_2127 "OK"
IDS_2128 "Hardware not available"
IDS_2127 "An emulator of old computers\n\nAuthors: Sarah Walker, Miran Grca, Fred N. van Kempen (waltje), SA1988, Tiseno100, reenigne, leilei, JohnElliott, greatpsycho, and others.\n\nReleased under the GNU General Public License version 2 or later. See LICENSE for more information."
IDS_2128 "OK"
IDS_2129 "Hardware not available"
#ifdef _WIN32
#define LIB_NAME_PCAP "WinPcap"
#else
#define LIB_NAME_PCAP "libpcap"
#endif
IDS_2129 "Make sure " LIB_NAME_PCAP " is installed and that you are on a " LIB_NAME_PCAP "-compatible network connection."
IDS_2130 "Invalid configuration"
IDS_2130 "Make sure " LIB_NAME_PCAP " is installed and that you are on a " LIB_NAME_PCAP "-compatible network connection."
IDS_2131 "Invalid configuration"
#ifdef _WIN32
#define LIB_NAME_FREETYPE "freetype.dll"
#else
#define LIB_NAME_FREETYPE "libfreetype"
#endif
IDS_2131 LIB_NAME_FREETYPE " is required for ESC/P printer emulation."
IDS_2132 LIB_NAME_FREETYPE " is required for ESC/P printer emulation."
#ifdef _WIN32
#define LIB_NAME_GS "gsdll32.dll"
#else
#define LIB_NAME_GS "libgs"
#endif
IDS_2132 LIB_NAME_GS " is required for automatic conversion of PostScript files to PDF.\n\nAny documents sent to the generic PostScript printer will be saved as PostScript (.ps) files."
IDS_2133 LIB_NAME_GS " is required for automatic conversion of PostScript files to PDF.\n\nAny documents sent to the generic PostScript printer will be saved as PostScript (.ps) files."
#ifdef _WIN32
#define LIB_NAME_FLUIDSYNTH "libfluidsynth.dll"
#else
#define LIB_NAME_FLUIDSYNTH "libfluidsynth"
#endif
IDS_2133 LIB_NAME_FLUIDSYNTH " is required for FluidSynth MIDI output."
IDS_2134 "Entering fullscreen mode"
IDS_2135 "Don't show this message again"
IDS_2136 "Don't exit"
IDS_2137 "Reset"
IDS_2138 "Don't reset"
IDS_2139 "MO images (*.IM?;*.MDI)\0*.IM?;*.MDI\0All files (*.*)\0*.*\0"
IDS_2140 "CD-ROM images (*.ISO;*.CUE)\0*.ISO;*.CUE\0All files (*.*)\0*.*\0"
IDS_2141 "%hs Device Configuration"
IDS_2142 "Monitor in sleep mode"
IDS_2143 "OpenGL Shaders (*.GLSL)\0*.GLSL\0All files (*.*)\0*.*\0"
IDS_2144 "OpenGL options"
IDS_2145 "You are loading an unsupported configuration"
IDS_2146 "CPU type filtering based on selected machine is disabled for this emulated machine.\n\nThis makes it possible to choose a CPU that is otherwise incompatible with the selected machine. However, you may run into incompatibilities with the machine BIOS or other software.\n\nEnabling this setting is not officially supported and any bug reports filed may be closed as invalid."
IDS_2147 "Continue"
IDS_2148 "Cassette: %s"
IDS_2149 "Cassette images (*.PCM;*.RAW;*.WAV;*.CAS)\0*.PCM;*.RAW;*.WAV;*.CAS\0All files (*.*)\0*.*\0"
IDS_2150 "Cartridge %i: %ls"
IDS_2151 "Cartridge images (*.A;*.B;*.JRC)\0*.A;*.B;*.JRC\0All files (*.*)\0*.*\0"
IDS_2152 "Error initializing renderer"
IDS_2153 "OpenGL (3.0 Core) renderer could not be initialized. Use another renderer."
IDS_2154 "Resume execution"
IDS_2155 "Pause execution"
IDS_2156 "Press Ctrl+Alt+Del"
IDS_2157 "Press Ctrl+Alt+Esc"
IDS_2158 "Hard reset"
IDS_2159 "ACPI shutdown"
IDS_2160 "Settings"
IDS_2161 "Earlier drive"
IDS_2134 LIB_NAME_FLUIDSYNTH " is required for FluidSynth MIDI output."
IDS_2135 "Entering fullscreen mode"
IDS_2136 "Don't show this message again"
IDS_2137 "Don't exit"
IDS_2138 "Reset"
IDS_2139 "Don't reset"
IDS_2140 "MO images (*.IM?;*.MDI)\0*.IM?;*.MDI\0All files (*.*)\0*.*\0"
IDS_2141 "CD-ROM images (*.ISO;*.CUE)\0*.ISO;*.CUE\0All files (*.*)\0*.*\0"
IDS_2142 "%hs Device Configuration"
IDS_2143 "Monitor in sleep mode"
IDS_2144 "OpenGL Shaders (*.GLSL)\0*.GLSL\0All files (*.*)\0*.*\0"
IDS_2145 "OpenGL options"
IDS_2146 "You are loading an unsupported configuration"
IDS_2147 "CPU type filtering based on selected machine is disabled for this emulated machine.\n\nThis makes it possible to choose a CPU that is otherwise incompatible with the selected machine. However, you may run into incompatibilities with the machine BIOS or other software.\n\nEnabling this setting is not officially supported and any bug reports filed may be closed as invalid."
IDS_2148 "Continue"
IDS_2149 "Cassette: %s"
IDS_2150 "Cassette images (*.PCM;*.RAW;*.WAV;*.CAS)\0*.PCM;*.RAW;*.WAV;*.CAS\0All files (*.*)\0*.*\0"
IDS_2151 "Cartridge %i: %ls"
IDS_2152 "Cartridge images (*.A;*.B;*.JRC)\0*.A;*.B;*.JRC\0All files (*.*)\0*.*\0"
IDS_2153 "Error initializing renderer"
IDS_2154 "OpenGL (3.0 Core) renderer could not be initialized. Use another renderer."
IDS_2155 "Resume execution"
IDS_2156 "Pause execution"
IDS_2157 "Press Ctrl+Alt+Del"
IDS_2158 "Press Ctrl+Alt+Esc"
IDS_2159 "Hard reset"
IDS_2160 "ACPI shutdown"
IDS_2161 "Settings"
IDS_2162 "Earlier drive"
END
STRINGTABLE DISCARDABLE

View File

@@ -86,7 +86,7 @@ preferences_fill_iconsets(HWND hdlg)
/* Add the default one */
wchar_t buffer[512] = L"(";
wcscat(buffer, plat_get_string(IDS_2090));
wcscat(buffer, plat_get_string(IDS_DEFAULT));
wcscat(buffer, L")");
SendMessage(icon_combo, CB_RESETCONTENT, 0, 0);

View File

@@ -75,7 +75,7 @@
#include "../disk/minivhd/minivhd_util.h"
/* Icon, Bus, File, C, H, S, Size */
#define C_COLUMNS_HARD_DISKS 6
#define C_COLUMNS_HARD_DISKS 7
static int first_cat = 0;
@@ -789,7 +789,7 @@ win_settings_machine_recalc_machine(HWND hdlg)
SendMessage(h, UDM_SETPOS, 0, temp_mem_size);
h = GetDlgItem(hdlg, IDC_TEXT_MB);
SendMessage(h, WM_SETTEXT, 0, win_get_string(IDS_2088));
SendMessage(h, WM_SETTEXT, 0, win_get_string(IDS_KB));
} else {
/* MB granularity */
h = GetDlgItem(hdlg, IDC_MEMSPIN);
@@ -886,9 +886,9 @@ win_settings_machine_proc(HWND hdlg, UINT message, WPARAM wParam, LPARAM lParam)
c++;
}
settings_add_string(hdlg, IDC_COMBO_WS, win_get_string(IDS_2090));
for (c = 0; c < 8; c++) {
wsprintf(lptsTemp, plat_get_string(IDS_2091), c);
settings_add_string(hdlg, IDC_COMBO_WS, win_get_string(IDS_DEFAULT));
for (c = 0; c < 8; c++) { /* TODO */
wsprintf(lptsTemp, plat_get_string(IDS_WS), c);
settings_add_string(hdlg, IDC_COMBO_WS, (LPARAM) lptsTemp);
}
@@ -2308,11 +2308,27 @@ win_settings_hard_disks_recalc_list(HWND hdlg)
return TRUE;
}
#define C_COLUMNS_HARD_DISKS_BUS 104
#define C_COLUMNS_HARD_DISKS_FILE 354
#define C_COLUMNS_HARD_DISKS_CYLS 50
#define C_COLUMNS_HARD_DISKS_HEADS 26
#define C_COLUMNS_HARD_DISKS_SECT 32
#define C_COLUMNS_HARD_DISKS_SIZE 50
#define C_COLUMNS_HARD_DISKS_SPEED 50
static void
win_settings_hard_disks_resize_columns(HWND hdlg)
{
/* Bus, File, Cylinders, Heads, Sectors, Size */
int iCol, width[C_COLUMNS_HARD_DISKS] = { 104, 354, 50, 26, 32, 50 };
int iCol, width[C_COLUMNS_HARD_DISKS] = {
C_COLUMNS_HARD_DISKS_BUS,
C_COLUMNS_HARD_DISKS_FILE,
C_COLUMNS_HARD_DISKS_CYLS,
C_COLUMNS_HARD_DISKS_HEADS,
C_COLUMNS_HARD_DISKS_SECT,
C_COLUMNS_HARD_DISKS_SIZE,
C_COLUMNS_HARD_DISKS_SPEED
};
int total = 0;
HWND hwndList = GetDlgItem(hdlg, IDC_LIST_HARD_DISKS);
RECT r;
@@ -2342,27 +2358,31 @@ win_settings_hard_disks_init_columns(HWND hdlg)
switch (iCol) {
case 0: /* Bus */
lvc.cx = 104;
lvc.cx = C_COLUMNS_HARD_DISKS_BUS;
lvc.fmt = LVCFMT_LEFT;
break;
case 1: /* File */
lvc.cx = 354;
lvc.cx = C_COLUMNS_HARD_DISKS_FILE;
lvc.fmt = LVCFMT_LEFT;
break;
case 2: /* Cylinders */
lvc.cx = 50;
lvc.cx = C_COLUMNS_HARD_DISKS_CYLS;
lvc.fmt = LVCFMT_RIGHT;
break;
case 3: /* Heads */
lvc.cx = 26;
lvc.cx = C_COLUMNS_HARD_DISKS_HEADS;
lvc.fmt = LVCFMT_RIGHT;
break;
case 4: /* Sectors */
lvc.cx = 32;
lvc.cx = C_COLUMNS_HARD_DISKS_SECT;
lvc.fmt = LVCFMT_RIGHT;
break;
case 5: /* Size (MB) 8 */
lvc.cx = 50;
lvc.cx = C_COLUMNS_HARD_DISKS_SIZE;
lvc.fmt = LVCFMT_RIGHT;
break;
case 6: /* Speed (RPM) */
lvc.cx = C_COLUMNS_HARD_DISKS_SPEED;
lvc.fmt = LVCFMT_RIGHT;
break;
}
@@ -3790,7 +3810,7 @@ win_settings_floppy_drives_init_columns(HWND hdlg)
lvc.mask = LVCF_FMT | LVCF_WIDTH | LVCF_TEXT | LVCF_SUBITEM;
lvc.iSubItem = 0;
lvc.pszText = plat_get_string(IDS_2092);
lvc.pszText = plat_get_string(IDS_TYPE);
lvc.cx = 292;
lvc.fmt = LVCFMT_LEFT;
@@ -3808,7 +3828,7 @@ win_settings_floppy_drives_init_columns(HWND hdlg)
return FALSE;
lvc.iSubItem = 2;
lvc.pszText = plat_get_string(IDS_2087);
lvc.pszText = plat_get_string(IDS_BPB);
lvc.cx = 89;
lvc.fmt = LVCFMT_LEFT;
@@ -3909,7 +3929,7 @@ win_settings_mo_drives_init_columns(HWND hdlg)
return FALSE;
lvc.iSubItem = 1;
lvc.pszText = plat_get_string(IDS_2092);
lvc.pszText = plat_get_string(IDS_TYPE);
lvc.cx = 147;
lvc.fmt = LVCFMT_LEFT;
@@ -3953,7 +3973,7 @@ win_settings_zip_drives_init_columns(HWND hdlg)
return FALSE;
lvc.iSubItem = 1;
lvc.pszText = plat_get_string(IDS_2092);
lvc.pszText = plat_get_string(IDS_TYPE);
lvc.cx = 147;
lvc.fmt = LVCFMT_LEFT;

View File

@@ -1371,7 +1371,7 @@ ui_init(int nCmdShow)
/* Initialize the configured Video API. */
if (! plat_setvid(vid_api)) {
tdconfig.pszContent = MAKEINTRESOURCE(IDS_2089);
tdconfig.pszContent = MAKEINTRESOURCE(IDS_2090);
TaskDialogIndirect(&tdconfig, NULL, NULL, NULL);
return(5);
}