diff --git a/.github/workflows/cmake_linux.yml b/.github/workflows/cmake_linux.yml index 9e26e2cd0..5dc0387d8 100644 --- a/.github/workflows/cmake_linux.yml +++ b/.github/workflows/cmake_linux.yml @@ -3,7 +3,6 @@ name: CMake (Linux) on: push: - branches: [ "master" ] paths: - src/** - cmake/** @@ -15,7 +14,6 @@ on: - "!**/Makefile*" pull_request: - branches: [ "master" ] paths: - src/** - cmake/** diff --git a/.github/workflows/cmake_macos.yml b/.github/workflows/cmake_macos.yml index d90c5f158..c917932fe 100644 --- a/.github/workflows/cmake_macos.yml +++ b/.github/workflows/cmake_macos.yml @@ -3,7 +3,6 @@ name: CMake (macos) on: push: - branches: [ "master" ] paths: - src/** - cmake/** @@ -15,7 +14,6 @@ on: - "!**/Makefile*" pull_request: - branches: [ "master" ] paths: - src/** - cmake/** diff --git a/.github/workflows/cmake_windows_msys2.yml b/.github/workflows/cmake_windows_msys2.yml index ef2e11ea7..eb83d4674 100644 --- a/.github/workflows/cmake_windows_msys2.yml +++ b/.github/workflows/cmake_windows_msys2.yml @@ -3,7 +3,6 @@ name: CMake (Windows, msys2) on: push: - branches: [ "master" ] paths: - src/** - cmake/** @@ -15,7 +14,6 @@ on: - "!**/Makefile*" pull_request: - branches: [ "master" ] paths: - src/** - cmake/** diff --git a/CMakeLists.txt b/CMakeLists.txt index 639e78965..1d9386700 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -36,7 +36,7 @@ if(MUNT_EXTERNAL) endif() project(86Box - VERSION 5.0.1 + VERSION 5.1 DESCRIPTION "Emulator of x86-based systems" HOMEPAGE_URL "https://86box.net" LANGUAGES C CXX) diff --git a/debian/changelog b/debian/changelog index 8389d4654..61a0490ee 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,5 +1,5 @@ -86box (5.0.1) UNRELEASED; urgency=medium +86box (5.1) UNRELEASED; urgency=medium * Bump release. - -- Jasmine Iwanek Sun, 24 Aug 2025 15:20:01 +0200 + -- Jasmine Iwanek Wed, 27 Aug 2025 19:39:16 +0200 diff --git a/src/86box.c b/src/86box.c index 498c86871..0b5a26131 100644 --- a/src/86box.c +++ b/src/86box.c @@ -231,6 +231,13 @@ int is_pcjr = 0; /* The current int portable_mode = 0; /* We are running in portable mode (global dirs = exe path) */ +int monitor_edid = 0; /* (C) Which EDID to use. 0=default, 1=custom. */ +char monitor_edid_path[1024] = { 0 }; /* (C) Path to custom EDID */ + +double video_gl_input_scale = 1.0; /* (C) OpenGL 3.x input scale */ +int video_gl_input_scale_mode = FULLSCR_SCALE_FULL; /* (C) OpenGL 3.x input stretch mode */ +int color_scheme = 0; /* (C) Color scheme of UI (Windows-only) */ + // Accelerator key array struct accelKey acc_keys[NUM_ACCELS]; @@ -888,7 +895,7 @@ usage: do_nothing = 1; } else if (!strcasecmp(argv[c], "--nohook") || !strcasecmp(argv[c], "-W")) { hook_enabled = 0; - } else if (!strcasecmp(argv[c], "--clearboth") || !strcasecmp(argv[c], "-X")) { + } else if (!strcasecmp(argv[c], "--clear") || !strcasecmp(argv[c], "-X")) { if ((c + 1) == argc) goto usage; diff --git a/src/cdrom/CMakeLists.txt b/src/cdrom/CMakeLists.txt index 4d5f947ca..6208111de 100644 --- a/src/cdrom/CMakeLists.txt +++ b/src/cdrom/CMakeLists.txt @@ -28,6 +28,9 @@ add_library(cdrom OBJECT if(NOT WIN32) target_include_directories(86Box PRIVATE PkgConfig::SNDFILE) endif() +if(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD") + target_include_directories(cdrom PRIVATE /usr/local/include) +endif() target_link_libraries(86Box PkgConfig::SNDFILE) if(CDROM_MITSUMI) diff --git a/src/cdrom/cdrom.c b/src/cdrom/cdrom.c index ffccbdcb4..98f408d64 100644 --- a/src/cdrom/cdrom.c +++ b/src/cdrom/cdrom.c @@ -344,7 +344,7 @@ cdrom_is_sector_good(cdrom_t *dev, const uint8_t *b, const uint8_t mode2, const { int ret = 1; - if (!mode2 || (form != 1)) { + if ((dev->cd_status != CD_STATUS_DVD) && (!mode2 || (form == 1))) { if (mode2 && (form == 1)) { const uint32_t crc = cdrom_crc32(0xffffffff, &(b[16]), 2056) ^ 0xffffffff; @@ -2976,9 +2976,12 @@ cdrom_update_status(cdrom_t *dev) dev->seek_pos = 0; dev->cd_buflen = 0; - if (dev->ops->is_dvd(dev->local)) - dev->cd_status = CD_STATUS_DVD; - else + if (dev->ops->is_dvd(dev->local)) { + if (cdrom_is_dvd(dev->type)) + dev->cd_status = CD_STATUS_DVD; + else + dev->cd_status = CD_STATUS_DVD_REJECTED; + } else dev->cd_status = dev->ops->has_audio(dev->local) ? CD_STATUS_STOPPED : CD_STATUS_DATA_ONLY; diff --git a/src/cdrom/cdrom_image.c b/src/cdrom/cdrom_image.c index f80ce764a..44f45bdc4 100644 --- a/src/cdrom/cdrom_image.c +++ b/src/cdrom/cdrom_image.c @@ -81,8 +81,9 @@ typedef struct track_t { uint8_t form; uint8_t subch_type; uint8_t skip; + uint8_t max_index; uint32_t sector_size; - track_index_t idx[3]; + track_index_t idx[100]; } track_t; /* @@ -526,7 +527,7 @@ image_get_track(const cd_image_t *img, const uint32_t sector) for (int i = 0; i < img->tracks_num; i++) { track_t *ct = &(img->tracks[i]); - for (int j = 0; j < 3; j++) { + for (int j = 0; j <= ct->max_index; j++) { const track_index_t *ci = &(ct->idx[j]); if ((ci->type >= INDEX_ZERO) && (ci->length != 0ULL) && ((sector + 150) >= ci->start) && ((sector + 150) <= (ci->start + ci->length - 1))) { @@ -548,7 +549,7 @@ image_get_track_and_index(const cd_image_t *img, const uint32_t sector, for (int i = 0; i < img->tracks_num; i++) { track_t *ct = &(img->tracks[i]); - if ((ct->point >= 1) && (ct->point <= 99)) for (int j = 0; j < 3; j++) { + if ((ct->point >= 1) && (ct->point <= 99)) for (int j = 0; j <= ct->max_index; j++) { track_index_t *ci = &(ct->idx[j]); if ((ci->type >= INDEX_ZERO) && (ci->length != 0ULL) && ((sector + 150) >= ci->start) && ((sector + 150) <= (ci->start + ci->length - 1))) { @@ -795,8 +796,10 @@ image_insert_track(cd_image_t *img, const uint8_t session, const uint8_t point) memset(ct, 0x00, sizeof(track_t)); - ct->session = session; - ct->point = point; + ct->max_index = 2; + + ct->session = session; + ct->point = point; for (int i = 0; i < 3; i++) ct->idx[i].type = (point > 99) ? INDEX_SPECIAL : INDEX_NONE; @@ -925,7 +928,7 @@ image_process(cd_image_t *img) for (int i = (img->tracks_num - 1); i >= 0; i--) { ct = &(img->tracks[map[i]]); if (ct->idx[1].type != INDEX_SPECIAL) { - for (int j = 2; j >= 0; j--) { + for (int j = ct->max_index; j >= 0; j--) { ci = &(ct->idx[j]); /* @@ -1013,7 +1016,7 @@ image_process(cd_image_t *img) session_changed = 1; } - for (int j = 0; j < 3; j++) { + for (int j = 0; j <= ct->max_index; j++) { ci = &(ct->idx[j]); if ((ci->type < INDEX_SPECIAL) || (ci->type > INDEX_NORMAL)) { @@ -1167,7 +1170,7 @@ image_process(cd_image_t *img) if (lt->mode == 2) disc_type = 0x20; - for (int j = 0; j < 3; j++) { + for (int j = 0; j <= ct->max_index; j++) { ci = &(ct->idx[j]); ci->type = INDEX_ZERO; ci->start = (lt->point * 60 * 75) + (disc_type * 75); @@ -1201,7 +1204,7 @@ image_process(cd_image_t *img) ct->mode = lt->mode; ct->form = lt->form; - for (int j = 0; j < 3; j++) { + for (int j = 0; j <= ct->max_index; j++) { ci = &(ct->idx[j]); ci->type = INDEX_ZERO; ci->start = (lt->point * 60 * 75); @@ -1238,9 +1241,9 @@ image_process(cd_image_t *img) second or afterwards session of a multi-session Cue sheet, calculate the starting time and update all the indexes accordingly. */ - const track_index_t *li = &(lt->idx[2]); + const track_index_t *li = &(lt->idx[lt->max_index]); - for (int j = 0; j < 3; j++) { + for (int j = 0; j <= ct->max_index; j++) { image_log(img->log, " [TRACK ] %02X/%02X, INDEX %02X, " "ATTR %02X, MODE %02X/%02X, %8s,\n", ct->session, @@ -1323,7 +1326,7 @@ image_process(cd_image_t *img) image_log(img->log, "Final tracks list:\n"); for (int i = 0; i < img->tracks_num; i++) { ct = &(img->tracks[i]); - for (int j = 0; j < 3; j++) { + for (int j = 0; j <= ct->max_index; j++) { ci = &(ct->idx[j]); image_log(img->log, " [TRACK ] %02X INDEX %02X: [%8s, %016" PRIX64 "]\n", ct->point, j, @@ -1601,13 +1604,15 @@ image_load_cue(cd_image_t *img, const char *cuefile) */ ct = &(img->tracks[img->tracks_num - 1]); - for (int i = 2; i >= 0; i--) { + for (int i = ct->max_index; i >= 0; i--) { if (ct->idx[i].file == NULL) ct->idx[i].file = tf; else break; } - } + } else if ((t == 0) && (line[strlen(line) - 2] == ' ') && + (line[strlen(line) - 1] == '0')) + t = 1; last_t = t; ct = image_insert_track(img, session, t); @@ -1668,6 +1673,9 @@ image_load_cue(cd_image_t *img, const char *cuefile) int t = image_cue_get_number(&line); ci = &(ct->idx[t]); + if (t > ct->max_index) + ct->max_index = t; + ci->type = INDEX_NORMAL; ci->file = tf; success = image_cue_get_frame(&frame, &line); @@ -1735,28 +1743,27 @@ image_load_cue(cd_image_t *img, const char *cuefile) image_log(img->log, " [LEAD-OUT] Initialization %s\n", success ? "successful" : "failed"); } else if (!strcmp(command, "SESSION")) { - if (!lo_cmd) { - ct = &(img->tracks[lead[2]]); - /* - Mark it this way so file pointers on it are not - going to be adjusted. - */ - last_t = -1; - ct->sector_size = last; - ci = &(ct->idx[1]); - ci->type = INDEX_ZERO; - ci->file = tf; - ci->file_start = 0; - ci->file_length = 0; - ci->length = (2 * 60 * 75) + (30 * 75); - - image_log(img->log, " [LEAD-OUT] Initialization successful\n"); - } - - lo_cmd = 0; session = image_cue_get_number(&space); if (session > 1) { + if (!lo_cmd) { + ct = &(img->tracks[lead[2]]); + /* + Mark it this way so file pointers on it are not + going to be adjusted. + */ + last_t = -1; + ct->sector_size = last; + ci = &(ct->idx[1]); + ci->type = INDEX_ZERO; + ci->file = tf; + ci->file_start = 0; + ci->file_length = 0; + ci->length = (2 * 60 * 75) + (30 * 75); + + image_log(img->log, " [LEAD-OUT] Initialization successful\n"); + } + ct = image_insert_track(img, session - 1, 0xb0); /* Mark it this way so file pointers on it are not @@ -1793,6 +1800,8 @@ image_load_cue(cd_image_t *img, const char *cuefile) } } + lo_cmd = 0; + image_log(img->log, " [SESSION ] Initialization successful\n"); } } @@ -1815,7 +1824,7 @@ image_load_cue(cd_image_t *img, const char *cuefile) break; } - if (success && (ct != NULL)) for (int i = 2; i >= 0; i--) { + if (success && (ct != NULL)) for (int i = ct->max_index; i >= 0; i--) { if (ct->idx[i].file == NULL) ct->idx[i].file = tf; else @@ -2234,7 +2243,7 @@ image_load_mds(cd_image_t *img, const char *mdsfile) image_log(img->log, "Final tracks list:\n"); for (int i = 0; i < img->tracks_num; i++) { ct = &(img->tracks[i]); - for (int j = 0; j < 3; j++) { + for (int j = 0; j <= ct->max_index; j++) { ci = &(ct->idx[j]); image_log(img->log, " [TRACK ] %02X INDEX %02X: [%8s, %016" PRIX64 "]\n", ct->point, j, @@ -2272,7 +2281,7 @@ image_clear_tracks(cd_image_t *img) cur = &img->tracks[i]; if (((cur->point >= 1) && (cur->point <= 99)) || - (cur->point == 0xa2)) for (int j = 0; j < 3; j++) { + (cur->point == 0xa2)) for (int j = 0; j <= cur->max_index; j++) { idx = &(cur->idx[j]); /* Make sure we do not attempt to close a NULL file. */ if ((idx->file != NULL) && (idx->type == INDEX_NORMAL)) { diff --git a/src/config.c b/src/config.c index e88a4753e..17d729614 100644 --- a/src/config.c +++ b/src/config.c @@ -128,6 +128,7 @@ load_global(void) confirm_reset = ini_section_get_int(cat, "confirm_reset", 1); confirm_exit = ini_section_get_int(cat, "confirm_exit", 1); confirm_save = ini_section_get_int(cat, "confirm_save", 1); + color_scheme = ini_section_get_int(cat, "color_scheme", 0); inhibit_multimedia_keys = ini_section_get_int(cat, "inhibit_multimedia_keys", 0); @@ -153,6 +154,25 @@ load_global(void) } } +/* Load scan code mappings. */ +static void +load_scan_code_mappings(void) +{ + ini_section_t cat = ini_find_section(config, "Scan code mappings"); + char temp[512]; + + for (int c = 0; c < 768; c++) { + sprintf(temp, "%03X", c); + + int mapping = ini_section_get_hex12(cat, temp, c); + + if (mapping == c) + ini_section_delete_var(cat, temp); + else + scancode_config_map[c] = mapping; + } +} + /* Load "General" section. */ static void load_general(void) @@ -227,6 +247,9 @@ load_general(void) video_framerate = ini_section_get_int(cat, "video_gl_framerate", -1); video_vsync = ini_section_get_int(cat, "video_gl_vsync", 0); + video_gl_input_scale = ini_section_get_double(cat, "video_gl_input_scale", 1.0); + video_gl_input_scale_mode = ini_section_get_int(cat, "video_gl_input_scale_mode", FULLSCR_SCALE_FULL); + window_remember = ini_section_get_int(cat, "window_remember", 0); if (window_remember) { p = ini_section_get_string(cat, "window_coordinates", NULL); @@ -278,6 +301,7 @@ static void load_machine(void) { ini_section_t cat = ini_find_section(config, "Machine"); + ini_section_t migration_cat; const char *p; const char *migrate_from = NULL; int c; @@ -286,36 +310,63 @@ load_machine(void) int speed; double multi; + static const struct { + const char *old; + const char *new; + const char *new_bios; + } machine_migrations[] = { + { .old = "tandy", .new = "tandy1000sx", .new_bios = NULL }, + { .old = "mr1217", .new = "325ax", .new_bios = "mr1217" }, + { .old = "deskpro386_05_1988", .new = "deskpro386", .new_bios = "deskpro386_05_1988" }, + { .old = "mr495", .new = "ami495", .new_bios = "mr495" }, + { .old = "403tg_d", .new = "403tg", .new_bios = "403tg_d" }, + { .old = "403tg_d_mr", .new = "403tg", .new_bios = "403tg_d_mr" }, + { .old = "aptiva510", .new = "pc330_6573", .new_bios = "aptiva510" }, + { .old = "ambradp60", .new = "batman", .new_bios = "ambradp60" }, + { .old = "dellxp60", .new = "batman", .new_bios = "dellxp60" }, + { .old = "586mc1", .new = "586is", .new_bios = NULL }, + { .old = "ambradp90", .new = "plato", .new_bios = "ambradp90" }, + { .old = "dellplato", .new = "plato", .new_bios = "dellplato" }, + { .old = "430nx", .new = "586ip", .new_bios = NULL }, + { .old = "p54tp4xe_mr", .new = "p54tp4xe", .new_bios = "p54tp4xe_mr" }, + { .old = "gw2katx", .new = "thor", .new_bios = "gw2katx" }, + { .old = "mrthor", .new = "thor", .new_bios = "mrthor" }, + { .old = "equium5200", .new = "cu430hx", .new_bios = "equium5200" }, + { .old = "infinia7200", .new = "tc430hx", .new_bios = "infinia7200" }, + { .old = "dellvenus", .new = "vs440fx", .new_bios = "dellvenus" }, + { .old = "gw2kvenus", .new = "vs440fx", .new_bios = "gw2kvenus" }, + { 0 } + }; + p = ini_section_get_string(cat, "machine", NULL); if (p != NULL) { - migrate_from = p; /* Migrate renamed machines. */ - if (!strcmp(p, "tandy")) - machine = machine_get_machine_from_internal_name("tandy1000sx"); - else if (!strcmp(p, "430nx")) - machine = machine_get_machine_from_internal_name("586ip"); - else if (!strcmp(p, "586mc1")) - machine = machine_get_machine_from_internal_name("586is"); - else { - machine = machine_get_machine_from_internal_name(p); - migrate_from = NULL; + for (i = 0; machine_migrations[i].old; i++) { + if (!strcmp(p, machine_migrations[i].old)) { + machine = machine_get_machine_from_internal_name(machine_migrations[i].new); + migrate_from = p; + if (machine_migrations[i].new_bios) { + migration_cat = ini_find_or_create_section(config, machine_get_device(machine)->name); + ini_section_set_string(migration_cat, "bios", machine_migrations[i].new_bios); + } + break; + } } - } else + if (!migrate_from) + machine = machine_get_machine_from_internal_name(p); + } else { machine = 0; + } if (machine >= machine_count()) machine = machine_count() - 1; - /* Copy NVR files when migrating a machine to a new internal name. */ - if (migrate_from) { + /* Copy NVR files when migrating a machine to a new NVR name. */ + if (migrate_from && strcmp(migrate_from, machine_get_nvr_name())) { char old_fn[256]; - strcpy(old_fn, migrate_from); - strcat(old_fn, "."); - c = strlen(old_fn); + c = snprintf(old_fn, sizeof(old_fn), "%s.", migrate_from); char new_fn[256]; - strcpy(new_fn, machines[machine].internal_name); - strcat(new_fn, "."); - i = strlen(new_fn); + i = snprintf(new_fn, sizeof(new_fn), "%s.", machine_get_nvr_name()); /* Iterate through NVR files. */ DIR *dirp = opendir(nvr_path(".")); @@ -501,6 +552,11 @@ load_video(void) p = "none"; gfxcard[i] = video_get_video_from_internal_name(p); } + + monitor_edid = ini_section_get_int(cat, "monitor_edid", 0); + + monitor_edid_path[0] = 0; + strncpy(monitor_edid_path, ini_section_get_string(cat, "monitor_edid_path", (char*)""), sizeof(monitor_edid_path) - 1); } /* Load "Input Devices" section. */ @@ -2053,6 +2109,9 @@ config_load(void) #endif memset(rdisk_drives, 0, sizeof(rdisk_drive_t)); + for (int i = 0; i < 768; i++) + scancode_config_map[i] = i; + config = ini_read(cfg_path); if (config == NULL) { @@ -2129,6 +2188,7 @@ config_load(void) load_general(); /* General */ for (i = 0; i < MONITORS_NUM; i++) load_monitor(i); /* Monitors */ + load_scan_code_mappings(); /* Scan code mappings */ load_machine(); /* Machine */ load_video(); /* Video */ load_input_devices(); /* Input devices */ @@ -2185,6 +2245,11 @@ save_global(void) ini_section_set_string(cat, "language", buffer); } + if (color_scheme) + ini_section_set_int(cat, "color_scheme", color_scheme); + else + ini_section_delete_var(cat, "color_scheme"); + if (open_dir_usr_path) ini_section_set_int(cat, "open_dir_usr_path", open_dir_usr_path); else @@ -2232,6 +2297,25 @@ save_global(void) } } +/* Save scan code mappings. */ +static void +save_scan_code_mappings(void) +{ + ini_section_t cat = ini_find_section(config, "Scan code mappings"); + char temp[512]; + + for (int c = 0; c < 768; c++) { + sprintf(temp, "%03X", c); + + if (scancode_config_map[c] == c) + ini_section_delete_var(cat, temp); + else + ini_section_set_hex12(cat, temp, scancode_config_map[c]); + } + + ini_delete_section_if_empty(config, cat); +} + /* Save "General" section. */ static void save_general(void) @@ -2364,6 +2448,18 @@ save_general(void) else ini_section_delete_var(cat, "do_auto_pause"); + if (video_gl_input_scale != 1.0) { + ini_section_set_double(cat, "video_gl_input_scale", video_gl_input_scale); + } else { + ini_section_delete_var(cat, "video_gl_input_scale"); + } + + if (video_gl_input_scale_mode != FULLSCR_SCALE_FULL) { + ini_section_set_int(cat, "video_gl_input_scale_mode", video_gl_input_scale_mode); + } else { + ini_section_delete_var(cat, "video_gl_input_scale_mode"); + } + if (force_constant_mouse) ini_section_set_int(cat, "force_constant_mouse", force_constant_mouse); else @@ -2487,6 +2583,15 @@ save_video(void) ini_section_set_string(cat, "gfxcard", video_get_internal_name(gfxcard[0])); + if (monitor_edid) + ini_section_set_int(cat, "monitor_edid", monitor_edid); + else + ini_section_delete_var(cat, "monitor_edid"); + + if (monitor_edid_path[0]) + ini_section_set_string(cat, "monitor_edid_path", monitor_edid_path); + else + ini_section_delete_var(cat, "monitor_edid_path"); if (vid_cga_comp_brightness) ini_section_set_int(cat, "vid_cga_comp_brightness", vid_cga_comp_brightness); @@ -3507,6 +3612,7 @@ config_save(void) save_general(); /* General */ for (uint8_t i = 0; i < MONITORS_NUM; i++) save_monitor(i); /* Monitors */ + save_scan_code_mappings(); /* Scan code mappings */ save_machine(); /* Machine */ save_video(); /* Video */ save_input_devices(); /* Input devices */ diff --git a/src/device/hasp.c b/src/device/hasp.c index 12dc6f2d1..07e9ac636 100644 --- a/src/device/hasp.c +++ b/src/device/hasp.c @@ -341,7 +341,6 @@ const lpt_device_t lpt_hasp_savquest_device = { .close = hasp_close, .write_data = hasp_write_data, .write_ctrl = NULL, - .autofeed = NULL, .strobe = NULL, .read_status = hasp_read_status, .read_ctrl = NULL, diff --git a/src/device/isamem.c b/src/device/isamem.c index 1e2e92470..f89512779 100644 --- a/src/device/isamem.c +++ b/src/device/isamem.c @@ -2100,7 +2100,7 @@ static const device_config_t mplus2_config[] = { // clang-format off { .name = "size", - .description = "Memory Size", + .description = "Memory size", .type = CONFIG_SPINNER, .default_string = "", .default_int = 64, diff --git a/src/device/keyboard.c b/src/device/keyboard.c index 0acc93505..524593eb7 100644 --- a/src/device/keyboard.c +++ b/src/device/keyboard.c @@ -33,7 +33,8 @@ #include "cpu.h" -uint16_t scancode_map[768] = { 0 }; +uint16_t scancode_map[768] = { 0 }; +uint16_t scancode_config_map[768] = { 0 }; int keyboard_scan; @@ -89,11 +90,11 @@ kbc_at_log(const char* fmt, ...) void (*keyboard_send)(uint16_t val); -static int recv_key[512] = { 0 }; /* keyboard input buffer */ -static int recv_key_ui[512] = { 0 }; /* keyboard input buffer */ -static int oldkey[512]; +static int recv_key[768] = { 0 }; /* keyboard input buffer */ +static int recv_key_ui[768] = { 0 }; /* keyboard input buffer */ +static int oldkey[768]; #if 0 -static int keydelay[512]; +static int keydelay[768]; #endif static scancode *scan_table; /* scancode table for keyboard */ @@ -202,6 +203,8 @@ key_process(uint16_t scan, int down) if (!keyboard_scan || (keyboard_send == NULL)) return; + scan = scancode_config_map[scan]; + oldkey[scan] = down; kbc_at_log("Key %04X,%d in process\n", scan, down); diff --git a/src/device/lpt.c b/src/device/lpt.c index 1466ea021..29689d2de 100644 --- a/src/device/lpt.c +++ b/src/device/lpt.c @@ -222,15 +222,6 @@ lpt_ecp_update_irq(lpt_t *dev) picintclevel(1 << dev->irq, &dev->irq_state); } -static void -lpt_autofeed(lpt_t *dev, const uint8_t val) -{ - if (dev->dt && dev->dt->autofeed && dev->dt->priv) - dev->dt->autofeed(val, dev->dt->priv); - - dev->autofeed = val; -} - static void lpt_strobe(lpt_t *dev, const uint8_t val) { @@ -258,8 +249,6 @@ lpt_fifo_out_callback(void *priv) else ret = dma_channel_read(dev->dma); - lpt_log("DMA %02X: %08X\n", dev->dma, ret); - if (ret != DMA_NODATA) { fifo_write_evt_tagged(0x01, (uint8_t) (ret & 0xff), dev->fifo); @@ -299,7 +288,6 @@ lpt_fifo_out_callback(void *priv) dev->dma_stat = 0x04; dev->state = LPT_STATE_IDLE; lpt_ecp_update_irq(dev); - lpt_autofeed(dev, 0); } else { dev->state = LPT_STATE_READ_DMA; @@ -312,8 +300,6 @@ lpt_fifo_out_callback(void *priv) } else if (!fifo_get_empty(dev->fifo)) timer_advance_u64(&dev->fifo_out_timer, (uint64_t) ((1000000.0 / 2500000.0) * (double) TIMER_USEC)); - else - lpt_autofeed(dev, 0); break; } } @@ -354,13 +340,11 @@ lpt_write(const uint16_t port, const uint8_t val, void *priv) break; case 0x0002: - if (dev->dt && dev->dt->write_ctrl && dev->dt->priv) { - if (dev->ecp && ((dev->ecr & 0xe0) >= 0x20)) - dev->dt->write_ctrl((val & 0xfc) | dev->autofeed | dev->strobe, dev->dt->priv); - else - dev->dt->write_ctrl(val, dev->dt->priv); - } + if (dev->dt && dev->dt->write_ctrl && dev->dt->priv) + dev->dt->write_ctrl(val, dev->dt->priv); dev->ctrl = val; + dev->strobe = val & 0x01; + dev->autofeed = val & 0x02; dev->enable_irq = val & 0x10; if (!(val & 0x10) && (dev->irq != 0xff)) picintc(1 << dev->irq); @@ -430,11 +414,6 @@ lpt_write(const uint16_t port, const uint8_t val, void *priv) break; case 0x0402: case 0x0406: - if (!(val & 0x0c)) - lpt_autofeed(dev, 0x00); - else - lpt_autofeed(dev, 0x02); - if ((dev->ecr & 0x04) && !(val & 0x04)) { dev->dma_stat = 0x00; fifo_reset(dev->fifo); diff --git a/src/device/serial_passthrough.c b/src/device/serial_passthrough.c index 426bfbc7b..249380b4f 100644 --- a/src/device/serial_passthrough.c +++ b/src/device/serial_passthrough.c @@ -75,6 +75,8 @@ host_to_serial_cb(void *priv) uint8_t byte; + plat_serpt_set_line_state(priv); + /* write_fifo has no failure indication, but if we write to fast, the host * can never fetch the bytes in time, so check if the fifo is full if in * fifo mode or if lsr has bit 0 set if not in fifo mode */ diff --git a/src/disk/hdc_ide_rz1000.c b/src/disk/hdc_ide_rz1000.c index 8e664dd92..6b7aa68e8 100644 --- a/src/disk/hdc_ide_rz1000.c +++ b/src/disk/hdc_ide_rz1000.c @@ -208,6 +208,15 @@ rz1000_reset(void *priv) dev->regs[0x0a] = 0x01; /* IDE controller */ dev->regs[0x0b] = 0x01; /* Mass storage controller */ + dev->regs[0x10] = 0xf1; + dev->regs[0x11] = 0x01; + dev->regs[0x14] = 0xf5; + dev->regs[0x15] = 0x03; + dev->regs[0x18] = 0x71; + dev->regs[0x19] = 0x01; + dev->regs[0x1c] = 0x75; + dev->regs[0x1d] = 0x03; + dev->irq_mode[0] = dev->irq_mode[1] = 0; dev->irq_pin = PCI_INTA; dev->irq_line = 14; diff --git a/src/gdbstub.c b/src/gdbstub.c index 42e1fc46d..2ae40d24c 100644 --- a/src/gdbstub.c +++ b/src/gdbstub.c @@ -1791,6 +1791,24 @@ gdbstub_init(void) return; } + int yes = 1; + if (setsockopt(gdbstub_socket, SOL_SOCKET, SO_REUSEADDR, +#ifdef _WIN32 + (const char *) &yes, +#else + &yes, +#endif + sizeof(yes)) == -1) { + pclog("GDB Stub: setsockopt SO_REUSEADDR failed\n"); + return; + } + +#ifdef _WIN32 + if (setsockopt(gdbstub_socket, SOL_SOCKET, SO_EXCLUSIVEADDRUSE, (const char *) &yes, sizeof(yes)) == -1) { + pclog("GDB Stub: setsockopt SO_EXCLUSIVEADDRUSE failed\n"); + } +#endif + /* Bind GDB server socket. */ int port = 12345; struct sockaddr_in bind_addr = { diff --git a/src/include/86box/86box.h b/src/include/86box/86box.h index 521e50965..ce39652bc 100644 --- a/src/include/86box/86box.h +++ b/src/include/86box/86box.h @@ -140,6 +140,8 @@ extern int force_43; /* (C) video */ extern int video_filter_method; /* (C) video */ extern int video_vsync; /* (C) video */ extern int video_framerate; /* (C) video */ +extern double video_gl_input_scale; /* (C) OpenGL 3.x input scale */ +extern int video_gl_input_scale_mode; /* (C) OpenGL 3.x input stretch mode */ extern int gfxcard[GFXCARD_MAX]; /* (C) graphics/video card */ extern int bugger_enabled; /* (C) enable ISAbugger */ extern int novell_keycard_enabled; /* (C) enable Novell NetWare 2.x key card emulation. */ @@ -201,6 +203,11 @@ extern int start_vmm; /* the current execution will start the manag extern int portable_mode; /* we are running in portable mode (global dirs = exe path) */ +extern int monitor_edid; /* (C) Which EDID to use. 0=default, 1=custom. */ +extern char monitor_edid_path[1024]; /* (C) Path to custom EDID */ + +extern int color_scheme; /* (C) Color scheme of UI (Windows-only) */ + #ifndef USE_NEW_DYNAREC extern FILE *stdlog; /* file to log output to */ #endif diff --git a/src/include/86box/ini.h b/src/include/86box/ini.h index bb250e697..4dd8387bc 100644 --- a/src/include/86box/ini.h +++ b/src/include/86box/ini.h @@ -43,6 +43,7 @@ extern uint32_t ini_section_get_uint(ini_section_t section, const char *name, ui extern float ini_section_get_float(ini_section_t section, const char *name, float def); #endif extern double ini_section_get_double(ini_section_t section, const char *name, double def); +extern int ini_section_get_hex12(ini_section_t section, const char *name, int def); extern int ini_section_get_hex16(ini_section_t section, const char *name, int def); extern int ini_section_get_hex20(ini_section_t section, const char *name, int def); extern int ini_section_get_mac(ini_section_t section, const char *name, int def); @@ -54,6 +55,7 @@ extern void ini_section_set_uint(ini_section_t section, const char *name, ui extern void ini_section_set_float(ini_section_t section, const char *name, float val); #endif extern void ini_section_set_double(ini_section_t section, const char *name, double val); +extern void ini_section_set_hex12(ini_section_t section, const char *name, int val); extern void ini_section_set_hex16(ini_section_t section, const char *name, int val); extern void ini_section_set_hex20(ini_section_t section, const char *name, int val); extern void ini_section_set_mac(ini_section_t section, const char *name, int val); @@ -69,6 +71,7 @@ extern int ini_has_entry(ini_section_t self, const char *name); #define ini_get_float(ini, head, name, def) ini_section_get_float(ini_find_section(ini, head), name, def) #endif #define ini_get_double(ini, head, name, def) ini_section_get_double(ini_find_section(ini, head), name, def) +#define ini_get_hex12(ini, head, name, def) ini_section_get_hex12(ini_find_section(ini, head), name, def) #define ini_get_hex16(ini, head, name, def) ini_section_get_hex16(ini_find_section(ini, head), name, def) #define ini_get_hex20(ini, head, name, def) ini_section_get_hex20(ini_find_section(ini, head), name, def) #define ini_get_mac(ini, head, name, def) ini_section_get_mac(ini_find_section(ini, head), name, def) @@ -81,6 +84,7 @@ extern int ini_has_entry(ini_section_t self, const char *name); #define ini_set_float(ini, head, name, val) ini_section_set_float(ini_find_or_create_section(ini, head), name, val) #endif #define ini_set_double(ini, head, name, val) ini_section_set_double(ini_find_or_create_section(ini, head), name, val) +#define ini_set_hex12(ini, head, name, val) ini_section_set_hex12(ini_find_or_create_section(ini, head), name, val) #define ini_set_hex16(ini, head, name, val) ini_section_set_hex16(ini_find_or_create_section(ini, head), name, val) #define ini_set_hex20(ini, head, name, val) ini_section_set_hex20(ini_find_or_create_section(ini, head), name, val) #define ini_set_mac(ini, head, name, val) ini_section_set_mac(ini_find_or_create_section(ini, head), name, val) diff --git a/src/include/86box/keyboard.h b/src/include/86box/keyboard.h index 8220799fc..231da4dd5 100644 --- a/src/include/86box/keyboard.h +++ b/src/include/86box/keyboard.h @@ -165,6 +165,7 @@ extern uint8_t keyboard_mode; extern int keyboard_scan; extern uint16_t scancode_map[768]; +extern uint16_t scancode_config_map[768]; extern void (*keyboard_send)(uint16_t val); extern void kbd_adddata_process(uint16_t val, void (*adddata)(uint16_t val)); diff --git a/src/include/86box/lpt.h b/src/include/86box/lpt.h index 037c31a44..61c95094f 100644 --- a/src/include/86box/lpt.h +++ b/src/include/86box/lpt.h @@ -25,7 +25,6 @@ typedef struct lpt_device_s { void (*close)(void *priv); void (*write_data)(uint8_t val, void *priv); void (*write_ctrl)(uint8_t val, void *priv); - void (*autofeed)(uint8_t val,void *priv); void (*strobe)(uint8_t old, uint8_t val,void *priv); uint8_t (*read_status)(void *priv); uint8_t (*read_ctrl)(void *priv); diff --git a/src/include/86box/m_pcjr.h b/src/include/86box/m_pcjr.h index c6cb33588..7bbcde3ed 100644 --- a/src/include/86box/m_pcjr.h +++ b/src/include/86box/m_pcjr.h @@ -22,6 +22,11 @@ #define PCJR_RGB_NO_BROWN 4 #define PCJR_RGB_IBM_5153 5 +#define DOUBLE_NONE 0 +#define DOUBLE_SIMPLE 1 +#define DOUBLE_INTERPOLATE_SRGB 2 +#define DOUBLE_INTERPOLATE_LINEAR 3 + typedef struct pcjr_s { /* Video Controller stuff. */ @@ -56,6 +61,7 @@ typedef struct pcjr_s int lastline; int composite; int apply_hd; + int double_type; /* Keyboard Controller stuff. */ int latched; diff --git a/src/include/86box/m_tandy.h b/src/include/86box/m_tandy.h index 2d0100c1a..5ef509830 100644 --- a/src/include/86box/m_tandy.h +++ b/src/include/86box/m_tandy.h @@ -47,6 +47,7 @@ typedef struct t1kvid_t { int fullchange; int vsynctime; int vadj; + int double_type; uint16_t memaddr; uint16_t memaddr_backup; diff --git a/src/include/86box/machine.h b/src/include/86box/machine.h index acba9cd45..ef8803812 100644 --- a/src/include/86box/machine.h +++ b/src/include/86box/machine.h @@ -494,8 +494,6 @@ extern int machine_at_ibmat_init(const machine_t *); extern const device_t ibmxt286_device; #endif extern int machine_at_ibmxt286_init(const machine_t *); -/* IBM AT with AMI BIOS */ -extern int machine_at_ibmatami_init(const machine_t *); extern int machine_at_cmdpc_init(const machine_t *); extern int machine_at_portableii_init(const machine_t *); extern int machine_at_portableiii_init(const machine_t *); @@ -503,15 +501,14 @@ extern int machine_at_grid1520_init(const machine_t *); extern int machine_at_mr286_init(const machine_t *); extern int machine_at_pc8_init(const machine_t *); extern int machine_at_m290_init(const machine_t *); -/* IBM AT with Phoenix BIOS */ -extern int machine_at_ibmatpx_init(const machine_t *); -/* IBM AT with Quadtel BIOS */ -extern int machine_at_ibmatquadtel_init(const machine_t *); +extern int machine_at_pxat_init(const machine_t *); +extern int machine_at_quadtat_init(const machine_t *); extern int machine_at_pb286_init(const machine_t *); extern int machine_at_mbc17_init(const machine_t *); extern int machine_at_ax286_init(const machine_t *); /* Siemens PCD-2L. N82330 discrete machine. It segfaults in some places */ extern int machine_at_siemens_init(const machine_t *); +extern int machine_at_tbunk286_init(const machine_t *); /* C&T PC/AT */ extern int machine_at_dells200_init(const machine_t *); @@ -563,8 +560,10 @@ extern int machine_at_pbl300sx_init(const machine_t *); extern int machine_at_arb1374_init(const machine_t *); extern int machine_at_sbc350a_init(const machine_t *); extern int machine_at_flytech386_init(const machine_t *); +#ifdef EMU_DEVICE_H +extern const device_t c325ax_device; +#endif extern int machine_at_325ax_init(const machine_t *); -extern int machine_at_mr1217_init(const machine_t *); /* ALi M1409 */ extern int machine_at_acer100t_init(const machine_t *); @@ -611,8 +610,10 @@ extern int machine_at_prox1332_init(const machine_t *); /* m_at_386dx.c */ /* ISA */ +#ifdef EMU_DEVICE_H +extern const device_t deskpro386_device; +#endif extern int machine_at_deskpro386_init(const machine_t *); -extern int machine_at_deskpro386_05_1988_init(const machine_t *); extern int machine_at_portableiii386_init(const machine_t *); extern int machine_at_micronics386_init(const machine_t *); extern int machine_at_micronics386px_init(const machine_t *); @@ -648,8 +649,10 @@ extern int machine_at_exp4349_init(const machine_t *); /* OPTi 495SX */ extern int machine_at_c747_init(const machine_t *); +#ifdef EMU_DEVICE_H +extern const device_t opti495_ami_device; +#endif extern int machine_at_opti495_ami_init(const machine_t *); -extern int machine_at_opti495_mr_init(const machine_t *); /* m_at_common.c */ extern void machine_at_common_init_ex(const machine_t *, int type); @@ -697,6 +700,7 @@ extern int machine_at_vect486vl_init(const machine_t *); extern int machine_at_d824_init(const machine_t *); /* VLSI 82C486 */ +extern int machine_at_pcs44c_init(const machine_t *); extern int machine_at_tuliptc38_init(const machine_t *); /* ZyMOS Poach */ @@ -743,6 +747,9 @@ extern int machine_at_4gpv5_init(const machine_t *); extern int machine_at_greenb_init(const machine_t *); /* OPTi 895 */ +#ifdef EMU_DEVICE_H +extern const device_t j403tg_device; +#endif extern int machine_at_403tg_init(const machine_t *); extern int machine_at_403tg_d_init(const machine_t *); extern int machine_at_403tg_d_mr_init(const machine_t *); @@ -774,7 +781,9 @@ extern int machine_at_tf486_init(const machine_t *); extern int machine_at_ms4145_init(const machine_t *); /* OPTi 802G */ -extern int machine_at_aptiva510_init(const machine_t *); +#ifdef EMU_DEVICE_H +extern const device_t pc330_6573_device; +#endif extern int machine_at_pc330_6573_init(const machine_t *); /* OPTi 895 */ @@ -854,14 +863,16 @@ extern int machine_at_pcm5330_init(const machine_t *); extern const device_t v12p_device; #endif extern int machine_at_v12p_init(const machine_t *); -extern int machine_at_ambradp60_init(const machine_t *); extern int machine_at_excaliburpci_init(const machine_t *); extern int machine_at_p5mp3_init(const machine_t *); -extern int machine_at_dellxp60_init(const machine_t *); extern int machine_at_opti560l_init(const machine_t *); extern void machine_at_award_common_init(const machine_t *); extern int machine_at_586is_init(const machine_t *); extern int machine_at_valuepointp60_init(const machine_t *); +#ifdef EMU_DEVICE_H +extern const device_t batman_device; +#endif +extern int machine_at_batman_init(const machine_t *); extern void machine_at_premiere_common_init(const machine_t *, int); extern int machine_at_revenge_init(const machine_t *); extern int machine_at_m5pi_init(const machine_t *); @@ -884,10 +895,11 @@ extern int machine_at_pci56001_init(const machine_t *); /* m_at_socket5.c */ /* i430NX */ -extern int machine_at_ambradp90_init(const machine_t *); extern int machine_at_p54np4_init(const machine_t *); -extern int machine_at_dellplato_init(const machine_t *); extern int machine_at_586ip_init(const machine_t *); +#ifdef EMU_DEVICE_H +extern const device_t plato_device; +#endif extern int machine_at_plato_init(const machine_t *); #ifdef EMU_DEVICE_H extern const device_t d842_device; @@ -923,13 +935,16 @@ extern int machine_at_hot539_init(const machine_t *); /* m_at_socket7_3v.c */ /* i430FX */ +#ifdef EMU_DEVICE_H +extern const device_t p54tp4xe_device; +#endif extern int machine_at_p54tp4xe_init(const machine_t *); -extern int machine_at_p54tp4xe_mr_init(const machine_t *); extern int machine_at_exp8551_init(const machine_t *); -extern int machine_at_gw2katx_init(const machine_t *); extern int machine_at_vectra54_init(const machine_t *); +#ifdef EMU_DEVICE_H +extern const device_t thor_device; +#endif extern int machine_at_thor_init(const machine_t *); -extern int machine_at_mrthor_init(const machine_t *); extern uint32_t machine_at_endeavor_gpio_handler(uint8_t write, uint32_t val); extern int machine_at_endeavor_init(const machine_t *); extern int machine_at_ms5119_init(const machine_t *); @@ -972,14 +987,18 @@ extern int machine_at_p55t2p4_init(const machine_t *); extern void machine_at_p65up5_common_init(const machine_t *, const device_t *northbridge); #endif extern int machine_at_p65up5_cp55t2d_init(const machine_t *); +#ifdef EMU_DEVICE_H +extern const device_t cu430hx_device; +#endif extern int machine_at_cu430hx_init(const machine_t *); +#ifdef EMU_DEVICE_H +extern const device_t tc430hx_device; +#endif extern int machine_at_tc430hx_init(const machine_t *); extern int machine_at_m7shi_init(const machine_t *); extern int machine_at_epc2102_init(const machine_t *); extern int machine_at_pcv90_init(const machine_t *); extern int machine_at_p55t2s_init(const machine_t *); -extern int machine_at_equium5200_init(const machine_t *); -extern int machine_at_infinia7200_init(const machine_t *); /* i430VX */ extern int machine_at_ap5vm_init(const machine_t *); @@ -1037,6 +1056,9 @@ extern int machine_at_sq578_init(const machine_t *); extern int machine_at_ms5172_init(const machine_t *); /* ALi ALADDiN IV+ */ +#ifdef EMU_DEVICE_H +extern const device_t m5ata_device; +#endif extern int machine_at_m5ata_init(const machine_t *); extern int machine_at_ms5164_init(const machine_t *); extern int machine_at_m560_init(const machine_t *); @@ -1072,10 +1094,11 @@ extern int machine_at_ficpo6000_init(const machine_t *); extern int machine_at_acerv60n_init(const machine_t *); extern int machine_at_p65up5_cp6nd_init(const machine_t *); extern int machine_at_8600ttc_init(const machine_t *); -extern int machine_at_dellvenus_init(const machine_t *); -extern int machine_at_gw2kvenus_init(const machine_t *); extern int machine_at_686nx_init(const machine_t *); extern int machine_at_ap440fx_init(const machine_t *); +#ifdef EMU_DEVICE_H +extern const device_t vs440fx_device; +#endif extern int machine_at_vs440fx_init(const machine_t *); extern int machine_at_lgibmx61_init(const machine_t *); extern int machine_at_m6mi_init(const machine_t *); @@ -1224,6 +1247,9 @@ extern const device_t ps1_hdc_device; extern int machine_ps2_m30_286_init(const machine_t *); /* m_ps2_mca.c */ +#ifdef EMU_DEVICE_H +extern const device_t ps2_model_50_device; +#endif extern int machine_ps2_model_50_init(const machine_t *); extern int machine_ps2_model_60_init(const machine_t *); extern int machine_ps2_model_55sx_init(const machine_t *); diff --git a/src/include/86box/plat.h b/src/include/86box/plat.h index 7b8a34857..552b074f7 100644 --- a/src/include/86box/plat.h +++ b/src/include/86box/plat.h @@ -52,7 +52,8 @@ enum { STRING_GHOSTPCL_ERROR_TITLE, /* "Unable to initialize GhostPCL" */ STRING_GHOSTPCL_ERROR_DESC, /* "gpcl6dll32.dll/gpcl6dll64.dll/libgpcl6 is required..." */ STRING_ESCP_ERROR_TITLE, /* "Unable to find Dot-Matrix fonts" */ - STRING_ESCP_ERROR_DESC /* "TrueType fonts in the \"roms/printer/fonts\" directory..." */ + STRING_ESCP_ERROR_DESC, /* "TrueType fonts in the \"roms/printer/fonts\" directory..." */ + STRING_EDID_TOO_LARGE, /* "EDID file \"%ls\" is too large (%lld bytes)." */ }; /* The Win32 API uses _wcsicmp. */ diff --git a/src/include/86box/plat_serial_passthrough.h b/src/include/86box/plat_serial_passthrough.h index 60674ea58..ec9a96545 100644 --- a/src/include/86box/plat_serial_passthrough.h +++ b/src/include/86box/plat_serial_passthrough.h @@ -30,6 +30,7 @@ extern int plat_serpt_read(void *priv, uint8_t *data); extern int plat_serpt_open_device(void *priv); extern void plat_serpt_close(void *priv); extern void plat_serpt_set_params(void *priv); +extern void plat_serpt_set_line_state(void *priv); #ifdef __cplusplus } diff --git a/src/include/86box/vid_cga.h b/src/include/86box/vid_cga.h index 2198154ed..439ee36fc 100644 --- a/src/include/86box/vid_cga.h +++ b/src/include/86box/vid_cga.h @@ -116,13 +116,16 @@ typedef struct cga_t { int double_type; } cga_t; -void cga_init(cga_t *cga); -void cga_out(uint16_t addr, uint8_t val, void *priv); -uint8_t cga_in(uint16_t addr, void *priv); -void cga_write(uint32_t addr, uint8_t val, void *priv); -uint8_t cga_read(uint32_t addr, void *priv); -void cga_recalctimings(cga_t *cga); -void cga_poll(void *priv); +extern void cga_init(cga_t *cga); +extern void cga_out(uint16_t addr, uint8_t val, void *priv); +extern uint8_t cga_in(uint16_t addr, void *priv); +extern void cga_write(uint32_t addr, uint8_t val, void *priv); +extern uint8_t cga_read(uint32_t addr, void *priv); +extern void cga_recalctimings(cga_t *cga); +extern void cga_interpolate_init(void); +extern void cga_blit_memtoscreen(int x, int y, int w, int h, int double_type); +extern void cga_do_blit(int vid_xsize, int firstline, int lastline, int double_type); +extern void cga_poll(void *priv); //#ifdef EMU_DEVICE_H //extern const device_config_t cga_config[]; diff --git a/src/include/86box/vid_ddc.h b/src/include/86box/vid_ddc.h index 144cca406..8d68d0adf 100644 --- a/src/include/86box/vid_ddc.h +++ b/src/include/86box/vid_ddc.h @@ -22,5 +22,6 @@ extern void *ddc_init(void *i2c); extern void ddc_close(void *eeprom); +extern void *ddc_create_default_edid(ssize_t* size_out); #endif /*EMU_VID_DDC_H*/ diff --git a/src/include/86box/video.h b/src/include/86box/video.h index fd8d79e8d..89e234265 100644 --- a/src/include/86box/video.h +++ b/src/include/86box/video.h @@ -490,6 +490,7 @@ extern const device_t oti067_device; extern const device_t oti067_acer386_device; extern const device_t oti067_ama932j_device; extern const device_t oti077_acer100t_device; +extern const device_t oti077_pcs44c_device; extern const device_t oti077_device; /* Paradise/WD (S)VGA */ diff --git a/src/machine/m_amstrad.c b/src/machine/m_amstrad.c index 389185e60..809a4a701 100644 --- a/src/machine/m_amstrad.c +++ b/src/machine/m_amstrad.c @@ -86,6 +86,11 @@ #define STAT_IFULL 0x02 #define STAT_OFULL 0x01 +#define DOUBLE_NONE 0 +#define DOUBLE_SIMPLE 1 +#define DOUBLE_INTERPOLATE_SRGB 2 +#define DOUBLE_INTERPOLATE_LINEAR 3 + typedef struct amsvid_t { rom_t bios_rom; /* 1640 */ cga_t cga; /* 1640/200 */ @@ -123,6 +128,7 @@ typedef struct amsvid_t { int vsynctime; int fullchange; int vadj; + int double_type; uint16_t memaddr; uint16_t memaddr_backup; int dispon; @@ -339,15 +345,12 @@ vid_read_1512(uint32_t addr, void *priv) } static void -vid_poll_1512(void *priv) +ams1512_render(amsvid_t *vid, int line) { - amsvid_t *vid = (amsvid_t *) priv; uint16_t cursoraddr = (vid->crtc[15] | (vid->crtc[14] << 8)) & 0x3fff; int drawcursor; int x; int c; - int xs_temp; - int ys_temp; uint8_t chr; uint8_t attr; uint16_t dat; @@ -356,7 +359,142 @@ vid_poll_1512(void *priv) uint16_t dat4; int cols[4]; int col; + + for (c = 0; c < 8; c++) { + if ((vid->cgamode & 0x12) == 0x12) { + buffer32->line[line][c] = buffer32->line[(line) + 1][c] = (vid->border & 15) + 16; + if (vid->cgamode & CGA_MODE_FLAG_HIGHRES) { + buffer32->line[line][c + (vid->crtc[1] << 3) + 8] = buffer32->line[(line) + 1][c + (vid->crtc[1] << 3) + 8] = 0; + } else { + buffer32->line[line][c + (vid->crtc[1] << 4) + 8] = buffer32->line[(line) + 1][c + (vid->crtc[1] << 4) + 8] = 0; + } + } else { + buffer32->line[line][c] = buffer32->line[(line) + 1][c] = (vid->cgacol & 15) + 16; + if (vid->cgamode & CGA_MODE_FLAG_HIGHRES) { + buffer32->line[line][c + (vid->crtc[1] << 3) + 8] = buffer32->line[(line) + 1][c + (vid->crtc[1] << 3) + 8] = (vid->cgacol & 15) + 16; + } else { + buffer32->line[line][c + (vid->crtc[1] << 4) + 8] = buffer32->line[(line) + 1][c + (vid->crtc[1] << 4) + 8] = (vid->cgacol & 15) + 16; + } + } + } + if (vid->cgamode & CGA_MODE_FLAG_HIGHRES) { + for (x = 0; x < 80; x++) { + chr = vid->vram[(vid->memaddr<< 1) & 0x3fff]; + attr = vid->vram[((vid->memaddr<< 1) + 1) & 0x3fff]; + drawcursor = ((vid->memaddr== cursoraddr) && vid->cursorvisible && vid->cursoron); + if (vid->cgamode & CGA_MODE_FLAG_BLINK) { + cols[1] = (attr & 15) + 16; + cols[0] = ((attr >> 4) & 7) + 16; + if ((vid->blink & 16) && (attr & 0x80) && !drawcursor) + cols[1] = cols[0]; + } else { + cols[1] = (attr & 15) + 16; + cols[0] = (attr >> 4) + 16; + } + if (drawcursor) + for (c = 0; c < 8; c++) + buffer32->line[line][(x << 3) + c + 8] = + cols[(fontdat[vid->fontbase + chr][vid->scanline & 7] & (1 << (c ^ 7))) ? 1 : 0] ^ 15; + else + for (c = 0; c < 8; c++) + buffer32->line[line][(x << 3) + c + 8] = + cols[(fontdat[vid->fontbase + chr][vid->scanline & 7] & (1 << (c ^ 7))) ? 1 : 0]; + vid->memaddr++; + } + } else if (!(vid->cgamode & CGA_MODE_FLAG_GRAPHICS)) { + for (x = 0; x < 40; x++) { + chr = vid->vram[(vid->memaddr<< 1) & 0x3fff]; + attr = vid->vram[((vid->memaddr<< 1) + 1) & 0x3fff]; + drawcursor = ((vid->memaddr == cursoraddr) && vid->cursorvisible && vid->cursoron); + + if (vid->cgamode & CGA_MODE_FLAG_BLINK) { + cols[1] = (attr & 15) + 16; + cols[0] = ((attr >> 4) & 7) + 16; + if ((vid->blink & 16) && (attr & 0x80)) + cols[1] = cols[0]; + } else { + cols[1] = (attr & 15) + 16; + cols[0] = (attr >> 4) + 16; + } + vid->memaddr++; + if (drawcursor) + for (c = 0; c < 8; c++) + buffer32->line[line][(x << 4) + (c << 1) + 8] = + buffer32->line[line][(x << 4) + (c << 1) + 1 + 8] = + cols[(fontdat[vid->fontbase + chr][vid->scanline & 7] & (1 << (c ^ 7))) ? 1 : 0] ^ 15; + else + for (c = 0; c < 8; c++) + buffer32->line[line][(x << 4) + (c << 1) + 8] = + buffer32->line[line][(x << 4) + (c << 1) + 1 + 8] = + cols[(fontdat[vid->fontbase + chr][vid->scanline & 7] & (1 << (c ^ 7))) ? 1 : 0]; + } + } else if (!(vid->cgamode & CGA_MODE_FLAG_HIGHRES_GRAPHICS)) { + cols[0] = (vid->cgacol & 15) | 16; + col = (vid->cgacol & 16) ? 24 : 16; + if (vid->cgamode & CGA_MODE_FLAG_BW) { + cols[1] = col | 3; + cols[2] = col | 4; + cols[3] = col | 7; + } else if (vid->cgacol & 32) { + cols[1] = col | 3; + cols[2] = col | 5; + cols[3] = col | 7; + } else { + cols[1] = col | 2; + cols[2] = col | 4; + cols[3] = col | 6; + } + for (x = 0; x < 40; x++) { + dat = (vid->vram[((vid->memaddr<< 1) & 0x1fff) + ((vid->scanline & 1) * 0x2000)] << 8) | + vid->vram[((vid->memaddr<< 1) & 0x1fff) + ((vid->scanline & 1) * 0x2000) + 1]; + vid->memaddr++; + for (c = 0; c < 8; c++) { + buffer32->line[line][(x << 4) + (c << 1) + 8] = + buffer32->line[line][(x << 4) + (c << 1) + 1 + 8] = cols[dat >> 14]; + dat <<= 2; + } + } + } else { + for (x = 0; x < 40; x++) { + cursoraddr = ((vid->memaddr<< 1) & 0x1fff) + ((vid->scanline & 1) * 0x2000); + dat = (vid->vram[cursoraddr] << 8) | vid->vram[cursoraddr + 1]; + dat2 = (vid->vram[cursoraddr + 0x4000] << 8) | vid->vram[cursoraddr + 0x4001]; + dat3 = (vid->vram[cursoraddr + 0x8000] << 8) | vid->vram[cursoraddr + 0x8001]; + dat4 = (vid->vram[cursoraddr + 0xc000] << 8) | vid->vram[cursoraddr + 0xc001]; + + vid->memaddr++; + for (c = 0; c < 16; c++) { + buffer32->line[line][(x << 4) + c + 8] = (((dat >> 15) | ((dat2 >> 15) << 1) | + ((dat3 >> 15) << 2) | ((dat4 >> 15) << 3)) & (vid->cgacol & 15)) + 16; + dat <<= 1; + dat2 <<= 1; + dat3 <<= 1; + dat4 <<= 1; + } + } + } +} + +static void +ams1512_render_blank(amsvid_t *vid, int line) +{ + int cols = ((vid->cgamode & 0x12) == 0x12) ? 0 : (vid->cgacol & 15) + 16; + + if (vid->cgamode & CGA_MODE_FLAG_HIGHRES) + hline(buffer32, 0, line, (vid->crtc[1] << 3) + 16, cols); + else + hline(buffer32, 0, line, (vid->crtc[1] << 4) + 16, cols); +} + +static void +vid_poll_1512(void *priv) +{ + amsvid_t *vid = (amsvid_t *) priv; + int x; + int xs_temp; + int ys_temp; int scanline_old; + int old_ma; if (!vid->linepos) { timer_advance_u64(&vid->timer, vid->dispofftime); @@ -369,126 +507,32 @@ vid_poll_1512(void *priv) video_wait_for_buffer(); } vid->lastline = vid->displine; - for (c = 0; c < 8; c++) { - if ((vid->cgamode & 0x12) == 0x12) { - buffer32->line[vid->displine << 1][c] = buffer32->line[(vid->displine << 1) + 1][c] = (vid->border & 15) + 16; - if (vid->cgamode & CGA_MODE_FLAG_HIGHRES) { - buffer32->line[vid->displine << 1][c + (vid->crtc[1] << 3) + 8] = buffer32->line[(vid->displine << 1) + 1][c + (vid->crtc[1] << 3) + 8] = 0; - } else { - buffer32->line[vid->displine << 1][c + (vid->crtc[1] << 4) + 8] = buffer32->line[(vid->displine << 1) + 1][c + (vid->crtc[1] << 4) + 8] = 0; - } - } else { - buffer32->line[vid->displine << 1][c] = buffer32->line[(vid->displine << 1) + 1][c] = (vid->cgacol & 15) + 16; - if (vid->cgamode & CGA_MODE_FLAG_HIGHRES) { - buffer32->line[vid->displine << 1][c + (vid->crtc[1] << 3) + 8] = buffer32->line[(vid->displine << 1) + 1][c + (vid->crtc[1] << 3) + 8] = (vid->cgacol & 15) + 16; - } else { - buffer32->line[vid->displine << 1][c + (vid->crtc[1] << 4) + 8] = buffer32->line[(vid->displine << 1) + 1][c + (vid->crtc[1] << 4) + 8] = (vid->cgacol & 15) + 16; - } - } - } - if (vid->cgamode & CGA_MODE_FLAG_HIGHRES) { - for (x = 0; x < 80; x++) { - chr = vid->vram[(vid->memaddr<< 1) & 0x3fff]; - attr = vid->vram[((vid->memaddr<< 1) + 1) & 0x3fff]; - drawcursor = ((vid->memaddr== cursoraddr) && vid->cursorvisible && vid->cursoron); - if (vid->cgamode & CGA_MODE_FLAG_BLINK) { - cols[1] = (attr & 15) + 16; - cols[0] = ((attr >> 4) & 7) + 16; - if ((vid->blink & 16) && (attr & 0x80) && !drawcursor) - cols[1] = cols[0]; - } else { - cols[1] = (attr & 15) + 16; - cols[0] = (attr >> 4) + 16; - } - if (drawcursor) { - for (c = 0; c < 8; c++) { - buffer32->line[vid->displine << 1][(x << 3) + c + 8] = buffer32->line[(vid->displine << 1) + 1][(x << 3) + c + 8] = cols[(fontdat[vid->fontbase + chr][vid->scanline & 7] & (1 << (c ^ 7))) ? 1 : 0] ^ 15; - } - } else { - for (c = 0; c < 8; c++) { - buffer32->line[vid->displine << 1][(x << 3) + c + 8] = buffer32->line[(vid->displine << 1) + 1][(x << 3) + c + 8] = cols[(fontdat[vid->fontbase + chr][vid->scanline & 7] & (1 << (c ^ 7))) ? 1 : 0]; - } - } - vid->memaddr++; - } - } else if (!(vid->cgamode & CGA_MODE_FLAG_GRAPHICS)) { - for (x = 0; x < 40; x++) { - chr = vid->vram[(vid->memaddr<< 1) & 0x3fff]; - attr = vid->vram[((vid->memaddr<< 1) + 1) & 0x3fff]; - drawcursor = ((vid->memaddr == cursoraddr) - && vid->cursorvisible && vid->cursoron); - - if (vid->cgamode & CGA_MODE_FLAG_BLINK) { - cols[1] = (attr & 15) + 16; - cols[0] = ((attr >> 4) & 7) + 16; - if ((vid->blink & 16) && (attr & 0x80)) - cols[1] = cols[0]; - } else { - cols[1] = (attr & 15) + 16; - cols[0] = (attr >> 4) + 16; - } - vid->memaddr++; - if (drawcursor) { - for (c = 0; c < 8; c++) { - buffer32->line[vid->displine << 1][(x << 4) + (c << 1) + 8] = buffer32->line[vid->displine << 1][(x << 4) + (c << 1) + 1 + 8] = buffer32->line[(vid->displine << 1) + 1][(x << 4) + (c << 1) + 8] = buffer32->line[(vid->displine << 1) + 1][(x << 4) + (c << 1) + 1 + 8] = cols[(fontdat[vid->fontbase + chr][vid->scanline & 7] & (1 << (c ^ 7))) ? 1 : 0] ^ 15; - } - } else { - for (c = 0; c < 8; c++) { - buffer32->line[vid->displine << 1][(x << 4) + (c << 1) + 8] = buffer32->line[vid->displine << 1][(x << 4) + (c << 1) + 1 + 8] = buffer32->line[(vid->displine << 1) + 1][(x << 4) + (c << 1) + 8] = buffer32->line[(vid->displine << 1) + 1][(x << 4) + (c << 1) + 1 + 8] = cols[(fontdat[vid->fontbase + chr][vid->scanline & 7] & (1 << (c ^ 7))) ? 1 : 0]; - } - } - } - } else if (!(vid->cgamode & CGA_MODE_FLAG_HIGHRES_GRAPHICS)) { - cols[0] = (vid->cgacol & 15) | 16; - col = (vid->cgacol & 16) ? 24 : 16; - if (vid->cgamode & CGA_MODE_FLAG_BW) { - cols[1] = col | 3; - cols[2] = col | 4; - cols[3] = col | 7; - } else if (vid->cgacol & 32) { - cols[1] = col | 3; - cols[2] = col | 5; - cols[3] = col | 7; - } else { - cols[1] = col | 2; - cols[2] = col | 4; - cols[3] = col | 6; - } - for (x = 0; x < 40; x++) { - dat = (vid->vram[((vid->memaddr<< 1) & 0x1fff) + ((vid->scanline & 1) * 0x2000)] << 8) | vid->vram[((vid->memaddr<< 1) & 0x1fff) + ((vid->scanline & 1) * 0x2000) + 1]; - vid->memaddr++; - for (c = 0; c < 8; c++) { - buffer32->line[vid->displine << 1][(x << 4) + (c << 1) + 8] = buffer32->line[vid->displine << 1][(x << 4) + (c << 1) + 1 + 8] = buffer32->line[(vid->displine << 1) + 1][(x << 4) + (c << 1) + 8] = buffer32->line[(vid->displine << 1) + 1][(x << 4) + (c << 1) + 1 + 8] = cols[dat >> 14]; - dat <<= 2; - } - } - } else { - for (x = 0; x < 40; x++) { - cursoraddr = ((vid->memaddr<< 1) & 0x1fff) + ((vid->scanline & 1) * 0x2000); - dat = (vid->vram[cursoraddr] << 8) | vid->vram[cursoraddr + 1]; - dat2 = (vid->vram[cursoraddr + 0x4000] << 8) | vid->vram[cursoraddr + 0x4001]; - dat3 = (vid->vram[cursoraddr + 0x8000] << 8) | vid->vram[cursoraddr + 0x8001]; - dat4 = (vid->vram[cursoraddr + 0xc000] << 8) | vid->vram[cursoraddr + 0xc001]; - - vid->memaddr++; - for (c = 0; c < 16; c++) { - buffer32->line[vid->displine << 1][(x << 4) + c + 8] = buffer32->line[(vid->displine << 1) + 1][(x << 4) + c + 8] = (((dat >> 15) | ((dat2 >> 15) << 1) | ((dat3 >> 15) << 2) | ((dat4 >> 15) << 3)) & (vid->cgacol & 15)) + 16; - dat <<= 1; - dat2 <<= 1; - dat3 <<= 1; - dat4 <<= 1; - } - } - } - } else { - cols[0] = ((vid->cgamode & 0x12) == 0x12) ? 0 : (vid->cgacol & 15) + 16; - if (vid->cgamode & CGA_MODE_FLAG_HIGHRES) { - hline(buffer32, 0, (vid->displine << 1), (vid->crtc[1] << 3) + 16, cols[0]); - hline(buffer32, 0, (vid->displine << 1) + 1, (vid->crtc[1] << 3) + 16, cols[0]); - } else { - hline(buffer32, 0, (vid->displine << 1), (vid->crtc[1] << 4) + 16, cols[0]); - hline(buffer32, 0, (vid->displine << 1), (vid->crtc[1] << 4) + 16, cols[0]); + switch (vid->double_type) { + default: + ams1512_render(vid, vid->displine << 1); + ams1512_render_blank(vid, (vid->displine << 1) + 1); + break; + case DOUBLE_NONE: + ams1512_render(vid, vid->displine); + break; + case DOUBLE_SIMPLE: + old_ma = vid->memaddr; + ams1512_render(vid, vid->displine << 1); + vid->memaddr = old_ma; + ams1512_render(vid, (vid->displine << 1) + 1); + break; } + } else switch (vid->double_type) { + default: + ams1512_render_blank(vid, vid->displine << 1); + break; + case DOUBLE_NONE: + ams1512_render_blank(vid, vid->displine); + break; + case DOUBLE_SIMPLE: + ams1512_render_blank(vid, vid->displine << 1); + ams1512_render_blank(vid, (vid->displine << 1) + 1); + break; } if (vid->cgamode & CGA_MODE_FLAG_HIGHRES) @@ -496,8 +540,15 @@ vid_poll_1512(void *priv) else x = (vid->crtc[1] << 4) + 16; - video_process_8(x, vid->displine << 1); - video_process_8(x, (vid->displine << 1) + 1); + switch (vid->double_type) { + default: + video_process_8((x < 64) ? 656 : x, vid->displine << 1); + video_process_8((x < 64) ? 656 : x, (vid->displine << 1) + 1); + break; + case DOUBLE_NONE: + video_process_8((x < 64) ? 656 : x, vid->displine); + break; + } vid->scanline = scanline_old; if (vid->vsynctime) @@ -576,13 +627,7 @@ vid_poll_1512(void *priv) video_force_resize_set(0); } - if (enable_overscan) { - video_blit_memtoscreen(0, (vid->firstline - 4) << 1, - xsize, ((vid->lastline - vid->firstline) + 8) << 1); - } else { - video_blit_memtoscreen(8, vid->firstline << 1, - xsize, (vid->lastline - vid->firstline) << 1); - } + cga_do_blit(xsize, vid->firstline, vid->lastline, vid->double_type); } video_res_x = xsize; @@ -644,6 +689,9 @@ vid_init_1512(amstrad_t *ams) cga_palette = (device_get_config_int("display_type") << 1); cgapal_rebuild(); + vid->double_type = device_get_config_int("double_type"); + cga_interpolate_init(); + ams->vid = vid; } @@ -681,6 +729,23 @@ const device_config_t vid_1512_config[] = { { .description = "" } } }, + { + .name = "double_type", + .description = "Line doubling type", + .type = CONFIG_SELECTION, + .default_string = NULL, + .default_int = DOUBLE_NONE, + .file_filter = NULL, + .spinner = { 0 }, + .selection = { + { .description = "None", .value = DOUBLE_NONE }, + { .description = "Simple doubling", .value = DOUBLE_SIMPLE }, + { .description = "sRGB interpolation", .value = DOUBLE_INTERPOLATE_SRGB }, + { .description = "Linear interpolation", .value = DOUBLE_INTERPOLATE_LINEAR }, + { .description = "" } + }, + .bios = { { 0 } } + }, { .name = "codepage", .description = "Hardware font", @@ -852,6 +917,10 @@ vid_init_1640(amstrad_t *ams) cga_palette = 0; cgapal_rebuild(); + vid->double_type = device_get_config_int("double_type"); + vid->cga.double_type = device_get_config_int("double_type"); + cga_interpolate_init(); + ams->vid = vid; } @@ -875,6 +944,23 @@ vid_speed_changed_1640(void *priv) const device_config_t vid_1640_config[] = { // clang-format off + { + .name = "double_type", + .description = "Line doubling type", + .type = CONFIG_SELECTION, + .default_string = NULL, + .default_int = DOUBLE_NONE, + .file_filter = NULL, + .spinner = { 0 }, + .selection = { + { .description = "None", .value = DOUBLE_NONE }, + { .description = "Simple doubling", .value = DOUBLE_SIMPLE }, + { .description = "sRGB interpolation", .value = DOUBLE_INTERPOLATE_SRGB }, + { .description = "Linear interpolation", .value = DOUBLE_INTERPOLATE_LINEAR }, + { .description = "" } + }, + .bios = { { 0 } } + }, { .name = "language", .description = "BIOS language", diff --git a/src/machine/m_at_286.c b/src/machine/m_at_286.c index c85c392b8..f74ad5115 100644 --- a/src/machine/m_at_286.c +++ b/src/machine/m_at_286.c @@ -224,23 +224,6 @@ machine_at_ibmxt286_init(const machine_t *model) return ret; } -int -machine_at_ibmatami_init(const machine_t *model) -{ - int ret; - - ret = bios_load_interleaved("roms/machines/ibmatami/BIOS_5170_30APR89_U27_AMI_27256.BIN", - "roms/machines/ibmatami/BIOS_5170_30APR89_U47_AMI_27256.BIN", - 0x000f0000, 65536, 0); - - if (bios_only || !ret) - return ret; - - machine_at_ibm_common_init(model); - - return ret; -} - int machine_at_cmdpc_init(const machine_t *model) { @@ -434,7 +417,7 @@ machine_at_m290_init(const machine_t *model) } int -machine_at_ibmatpx_init(const machine_t *model) +machine_at_pxat_init(const machine_t *model) { int ret; @@ -451,7 +434,7 @@ machine_at_ibmatpx_init(const machine_t *model) } int -machine_at_ibmatquadtel_init(const machine_t *model) +machine_at_quadtat_init(const machine_t *model) { int ret; @@ -551,6 +534,23 @@ machine_at_siemens_init(const machine_t *model) return ret; } +int +machine_at_tbunk286_init(const machine_t *model) +{ + int ret; + + ret = bios_load_interleaved("roms/machines/ibmatami/BIOS_5170_30APR89_U27_AMI_27256.BIN", + "roms/machines/ibmatami/BIOS_5170_30APR89_U47_AMI_27256.BIN", + 0x000f0000, 65536, 0); + + if (bios_only || !ret) + return ret; + + machine_at_ibm_common_init(model); + + return ret; +} + /* C&T PC/AT */ static void machine_at_ctat_common_init(const machine_t *model) diff --git a/src/machine/m_at_386dx.c b/src/machine/m_at_386dx.c index 90461d554..9cb7c5223 100644 --- a/src/machine/m_at_386dx.c +++ b/src/machine/m_at_386dx.c @@ -57,9 +57,56 @@ machine_compaq_p1_handler(void) return machine_generic_p1_handler() | (hasfpu ? 0x00 : 0x04); } -static void -machine_at_deskpro386_common_init(const machine_t *model) +static const device_config_t deskpro386_config[] = { + // clang-format off + { + .name = "bios", + .description = "BIOS Version", + .type = CONFIG_BIOS, + .default_string = "deskpro386", + .default_int = 0, + .file_filter = "", + .spinner = { 0 }, + .bios = { + { .name = "September 1986", .internal_name = "deskpro386", .bios_type = BIOS_NORMAL, + .files_no = 1, .local = 0, .size = 65536, .files = { "roms/machines/deskpro386/1986-09-04-HI.json.bin", "" } }, + { .name = "May 1988", .internal_name = "deskpro386_05_1988", .bios_type = BIOS_NORMAL, + .files_no = 1, .local = 0, .size = 65536, .files = { "roms/machines/deskpro386/1988-05-10.json.bin", "" } }, + { .files_no = 0 } + }, + }, + { .name = "", .description = "", .type = CONFIG_END } + // clang-format on +}; + +const device_t deskpro386_device = { + .name = "Compaq Deskpro 386", + .internal_name = "deskpro386_device", + .flags = 0, + .local = 0, + .init = NULL, + .close = NULL, + .reset = NULL, + .available = NULL, + .speed_changed = NULL, + .force_redraw = NULL, + .config = deskpro386_config +}; + +int +machine_at_deskpro386_init(const machine_t *model) { + int ret = 0; + const char* fn; + + /* No ROMs available */ + if (!device_available(model->device)) + return ret; + + device_context(model->device); + fn = device_get_bios_file(machine_get_device(machine), device_get_config_bios("bios"), 0); + ret = bios_load_linearr(fn, 0x000f8000, 65536, 0); + if (fdc_current[0] == FDC_INTERNAL) device_add(&fdc_at_device); @@ -70,36 +117,6 @@ machine_at_deskpro386_common_init(const machine_t *model) machine_at_common_init(model); device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); -} - -int -machine_at_deskpro386_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linearr("roms/machines/deskpro386/1986-09-04-HI.json.bin", - 0x000f8000, 65536, 0); - - if (bios_only || !ret) - return ret; - - machine_at_deskpro386_common_init(model); - - return ret; -} - -int -machine_at_deskpro386_05_1988_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linearr("roms/machines/deskpro386/1988-05-10.json.bin", - 0x000f8000, 65536, 0); - - if (bios_only || !ret) - return ret; - - machine_at_deskpro386_common_init(model); return ret; } diff --git a/src/machine/m_at_386dx_486.c b/src/machine/m_at_386dx_486.c index f4fb1f713..2942180bb 100644 --- a/src/machine/m_at_386dx_486.c +++ b/src/machine/m_at_386dx_486.c @@ -100,9 +100,56 @@ machine_at_c747_init(const machine_t *model) return ret; } -static void -machine_at_opti495_ami_common_init(const machine_t *model) +static const device_config_t opti495_ami_config[] = { + // clang-format off + { + .name = "bios", + .description = "BIOS Version", + .type = CONFIG_BIOS, + .default_string = "ami495", + .default_int = 0, + .file_filter = "", + .spinner = { 0 }, + .bios = { + { .name = "AMI 060692", .internal_name = "ami495", .bios_type = BIOS_NORMAL, + .files_no = 1, .local = 0, .size = 65536, .files = { "roms/machines/ami495/opt495sx.ami", "" } }, + { .name = "MR BIOS V1.60", .internal_name = "mr495", .bios_type = BIOS_NORMAL, + .files_no = 1, .local = 0, .size = 65536, .files = { "roms/machines/ami495/opt495sx.mr", "" } }, + { .files_no = 0 } + }, + }, + { .name = "", .description = "", .type = CONFIG_END } + // clang-format on +}; + +const device_t opti495_ami_device = { + .name = "DataExpert SX495", + .internal_name = "opti495_ami_device", + .flags = 0, + .local = 0, + .init = NULL, + .close = NULL, + .reset = NULL, + .available = NULL, + .speed_changed = NULL, + .force_redraw = NULL, + .config = opti495_ami_config +}; + +int +machine_at_opti495_ami_init(const machine_t *model) { + int ret = 0; + const char* fn; + + /* No ROMs available */ + if (!device_available(model->device)) + return ret; + + device_context(model->device); + fn = device_get_bios_file(machine_get_device(machine), device_get_config_bios("bios"), 0); + ret = bios_load_linear(fn, 0x000f0000, 65536, 0); + machine_at_common_init(model); device_add(&opti495sx_device); @@ -111,36 +158,6 @@ machine_at_opti495_ami_common_init(const machine_t *model) if (fdc_current[0] == FDC_INTERNAL) device_add(&fdc_at_device); -} - -int -machine_at_opti495_ami_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/ami495/opt495sx.ami", - 0x000f0000, 65536, 0); - - if (bios_only || !ret) - return ret; - - machine_at_opti495_ami_common_init(model); - - return ret; -} - -int -machine_at_opti495_mr_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/mr495/opt495sx.mr", - 0x000f0000, 65536, 0); - - if (bios_only || !ret) - return ret; - - machine_at_opti495_ami_common_init(model); return ret; } diff --git a/src/machine/m_at_386sx.c b/src/machine/m_at_386sx.c index 4aed9f0b1..f48b8977a 100644 --- a/src/machine/m_at_386sx.c +++ b/src/machine/m_at_386sx.c @@ -231,37 +231,55 @@ machine_at_flytech386_init(const machine_t *model) return ret; } +static const device_config_t c325ax_config[] = { + // clang-format off + { + .name = "bios", + .description = "BIOS Version", + .type = CONFIG_BIOS, + .default_string = "325ax", + .default_int = 0, + .file_filter = "", + .spinner = { 0 }, + .bios = { + { .name = "AMIBIOS 070791", .internal_name = "325ax", .bios_type = BIOS_NORMAL, + .files_no = 1, .local = 0, .size = 65536, .files = { "roms/machines/325ax/M27C512.BIN", "" } }, + { .name = "MR BIOS V1.41", .internal_name = "mr1217", .bios_type = BIOS_NORMAL, + .files_no = 1, .local = 0, .size = 65536, .files = { "roms/machines/325ax/mrbios.BIN", "" } }, + { .files_no = 0 } + }, + }, + { .name = "", .description = "", .type = CONFIG_END } + // clang-format on +}; + +const device_t c325ax_device = { + .name = "Chaintech 325AX", + .internal_name = "325ax_device", + .flags = 0, + .local = 0, + .init = NULL, + .close = NULL, + .reset = NULL, + .available = NULL, + .speed_changed = NULL, + .force_redraw = NULL, + .config = c325ax_config +}; + int machine_at_325ax_init(const machine_t *model) { - int ret; + int ret = 0; + const char* fn; - ret = bios_load_linear("roms/machines/325ax/M27C512.BIN", - 0x000f0000, 65536, 0); - - if (bios_only || !ret) + /* No ROMs available */ + if (!device_available(model->device)) return ret; - machine_at_common_init(model); - - device_add(&ali1217_device); - device_add(&fdc_at_device); - - device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); - - return ret; -} - -int -machine_at_mr1217_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/mr1217/mrbios.BIN", - 0x000f0000, 65536, 0); - - if (bios_only || !ret) - return ret; + device_context(model->device); + fn = device_get_bios_file(machine_get_device(machine), device_get_config_bios("bios"), 0); + ret = bios_load_linear(fn, 0x000f0000, 65536, 0); machine_at_common_init(model); @@ -390,6 +408,7 @@ machine_at_cmdsl386sx16_init(const machine_t *model) device_add(&fdc_at_device); device_add(&neat_device); + device_add(&ide_isa_device); /* Two serial ports - on the real hardware SL386SX-16, they are on the single UMC UM82C452. */ device_add_inst(&ns16450_device, 1); device_add_inst(&ns16450_device, 2); diff --git a/src/machine/m_at_socket1.c b/src/machine/m_at_socket1.c index 4357a1b42..ab0fadb1a 100644 --- a/src/machine/m_at_socket1.c +++ b/src/machine/m_at_socket1.c @@ -115,6 +115,9 @@ machine_at_svc486wb_init(const machine_t *model) device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); device_add(&ide_isa_device); + if (fdc_current[0] == FDC_INTERNAL) + device_add(&fdc_at_device); + return ret; } @@ -343,6 +346,35 @@ machine_at_d824_init(const machine_t *model) } /* VLSI 82C486 */ +int +machine_at_pcs44c_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/pcs44c/V032004G.25", + 0x000e0000, 131072, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init_ex(model, 2); + + device_add(&vl82c486_device); + device_add(&tulip_jumper_device); + + if (gfxcard[0] == VID_INTERNAL) + device_add(&oti077_pcs44c_device); + + device_add(&vl82c113_device); + + device_add(&ide_isa_device); + device_add_params(&pc873xx_device, (void *) (PCX73XX_IDE_PRI | PCX730X_398)); + + device_add(&intel_flash_bxt_device); + + return ret; +} + int machine_at_tuliptc38_init(const machine_t *model) { diff --git a/src/machine/m_at_socket3.c b/src/machine/m_at_socket3.c index 1d46ebe18..32cb77973 100644 --- a/src/machine/m_at_socket3.c +++ b/src/machine/m_at_socket3.c @@ -167,9 +167,59 @@ machine_at_greenb_init(const machine_t *model) } /* OPTi 895 */ -static void -machine_at_403tg_common_init(const machine_t *model, int nvr_hack) +static const device_config_t j403tg_config[] = { + // clang-format off + { + .name = "bios", + .description = "BIOS Version", + .type = CONFIG_BIOS, + .default_string = "403tg", + .default_int = 0, + .file_filter = "", + .spinner = { 0 }, + .bios = { + { .name = "AMI 060692", .internal_name = "403tg", .bios_type = BIOS_NORMAL, + .files_no = 1, .local = 0, .size = 65536, .files = { "roms/machines/403tg/403TG.BIN", "" } }, + { .name = "AMI 060692", .internal_name = "403tg_d", .bios_type = BIOS_NORMAL, + .files_no = 1, .local = 0, .size = 65536, .files = { "roms/machines/403tg/J403TGRevD.BIN", "" } }, + { .name = "AMI 060692", .internal_name = "403tg_d_mr", .bios_type = BIOS_NORMAL, + .files_no = 1, .local = 0, .size = 65536, .files = { "roms/machines/403tg/MRBiosOPT895.bin", "" } }, + { .files_no = 0 } + }, + }, + { .name = "", .description = "", .type = CONFIG_END } + // clang-format on +}; + +const device_t j403tg_device = { + .name = "Jetway J-403TG", + .internal_name = "403tg_device", + .flags = 0, + .local = 0, + .init = NULL, + .close = NULL, + .reset = NULL, + .available = NULL, + .speed_changed = NULL, + .force_redraw = NULL, + .config = j403tg_config +}; + +int +machine_at_403tg_init(const machine_t *model) { + int ret = 0; + const char* fn; + + /* No ROMs available */ + if (!device_available(model->device)) + return ret; + + device_context(model->device); + int nvr_hack = !strcmp(device_get_config_bios("bios"), "403tg_d"); + fn = device_get_bios_file(machine_get_device(machine), device_get_config_bios("bios"), 0); + ret = bios_load_linear(fn, 0x000f0000, 65536, 0); + if (nvr_hack) { machine_at_common_init_ex(model, 2); device_add(&ami_1994_nvr_device); @@ -182,52 +232,6 @@ machine_at_403tg_common_init(const machine_t *model, int nvr_hack) if (fdc_current[0] == FDC_INTERNAL) device_add(&fdc_at_device); -} - -int -machine_at_403tg_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/403tg/403TG.BIN", - 0x000f0000, 65536, 0); - - if (bios_only || !ret) - return ret; - - machine_at_403tg_common_init(model, 0); - - return ret; -} - -int -machine_at_403tg_d_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/403tg_d/J403TGRevD.BIN", - 0x000f0000, 65536, 0); - - if (bios_only || !ret) - return ret; - - machine_at_403tg_common_init(model, 1); - - return ret; -} - -int -machine_at_403tg_d_mr_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/403tg_d/MRBiosOPT895.bin", - 0x000f0000, 65536, 0); - - if (bios_only || !ret) - return ret; - - machine_at_403tg_common_init(model, 0); return ret; } diff --git a/src/machine/m_at_socket3_pci.c b/src/machine/m_at_socket3_pci.c index 54f8690ae..451d791ca 100644 --- a/src/machine/m_at_socket3_pci.c +++ b/src/machine/m_at_socket3_pci.c @@ -277,7 +277,7 @@ machine_at_ms4145_init(const machine_t *model) pci_register_slot(0x06, PCI_CARD_NORMAL, 4, 1, 2, 3); device_add(&ali1489_device); - device_add_params(&w837x7_device, (void *) (W83787F | W837X7_KEY_89)); + device_add_params(&w837x7_device, (void *) (W83787F | W837X7_KEY_88)); device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); @@ -287,9 +287,57 @@ machine_at_ms4145_init(const machine_t *model) } /* OPTi 802G */ -static void -machine_at_pc330_6573_common_init(const machine_t *model) +static const device_config_t pc330_6573_config[] = { + // clang-format off + { + .name = "bios", + .description = "BIOS Version", + .type = CONFIG_BIOS, + .default_string = "pc330_6573", + .default_int = 0, + .file_filter = "", + .spinner = { 0 }, + .bios = { + { .name = "IBM Aptiva 510/710/Vision", .internal_name = "aptiva510", .bios_type = BIOS_NORMAL, + .files_no = 1, .local = 0, .size = 131072, .files = { "roms/machines/pc330_6573/aptiva510_$IMAGES.USF", "" } }, + { .name = "IBM PC 330 (type 6573)", .internal_name = "pc330_6573", .bios_type = BIOS_NORMAL, + .files_no = 1, .local = 0, .size = 131072, .files = { "roms/machines/pc330_6573/$IMAGES.USF", "" } }, + { .files_no = 0 } + }, + }, + { .name = "", .description = "", .type = CONFIG_END } + // clang-format on +}; + +const device_t pc330_6573_device = { + .name = "IBM PC 330 (type 6573)", + .internal_name = "pc330_6573_device", + .flags = 0, + .local = 0, + .init = NULL, + .close = NULL, + .reset = NULL, + .available = NULL, + .speed_changed = NULL, + .force_redraw = NULL, + .config = pc330_6573_config +}; + +int +machine_at_pc330_6573_init(const machine_t *model) { + int ret = 0; + const char* fn; + + /* No ROMs available */ + if (!device_available(model->device)) + return ret; + + device_context(model->device); + fn = device_get_bios_file(machine_get_device(machine), device_get_config_bios("bios"), 0); + ret = bios_load_linear(fn, 0x000e0000, 131072, 0); + device_context_restore(); + machine_at_common_init_ex(model, 2); device_add(&ide_vlb_2ch_device); @@ -315,36 +363,6 @@ machine_at_pc330_6573_common_init(const machine_t *model) device_add_params(&fdc37c6xx_device, (void *) (FDC37C665 | FDC37C6XX_IDE_SEC)); device_add(&ide_opti611_vlb_device); device_add(&intel_flash_bxt_device); -} - -int -machine_at_aptiva510_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/aptiva510/$IMAGES.USF", - 0x000e0000, 131072, 0); - - if (bios_only || !ret) - return ret; - - machine_at_pc330_6573_common_init(model); - - return ret; -} - -int -machine_at_pc330_6573_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/pc330_6573/$IMAGES.USF", - 0x000e0000, 131072, 0); - - if (bios_only || !ret) - return ret; - - machine_at_pc330_6573_common_init(model); return ret; } @@ -570,7 +588,7 @@ machine_at_sb486p_init(const machine_t *model) device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); - device_add_params(&i82091aa_device, (void *) I82091AA_022); + device_add_params(&i82091aa_device, (void *) I82091AA_26E); device_add(&i420ex_device); return ret; @@ -1193,6 +1211,7 @@ machine_at_ecs486_init(const machine_t *model) device_add_params(&fdc37c6xx_device, (void *) FDC37C665); device_add(&intel_flash_bxt_device); + machine_force_ps2(1); device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); return ret; @@ -1369,14 +1388,11 @@ machine_at_hot433a_init(const machine_t *model) return ret; device_context(model->device); - int is_award = !strcmp(device_get_config_bios("bios"), "hot433a_award"); + int is_award = !strcmp(device_get_config_bios("bios"), "hot433a_v451pg"); fn = device_get_bios_file(machine_get_device(machine), device_get_config_bios("bios"), 0); ret = bios_load_linear(fn, 0x000e0000, 131072, 0); device_context_restore(); - if (bios_only || !ret) - return ret; - machine_at_common_init_ex(model, 2); if (is_award) device_add(&amstrad_megapc_nvr_device); diff --git a/src/machine/m_at_socket4.c b/src/machine/m_at_socket4.c index 2e5768cbc..d1f9c637f 100644 --- a/src/machine/m_at_socket4.c +++ b/src/machine/m_at_socket4.c @@ -110,40 +110,6 @@ machine_at_v12p_init(const machine_t *model) return ret; } -int -machine_at_ambradp60_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear_combined("roms/machines/ambradp60/1004AF1P.BIO", - "roms/machines/ambradp60/1004AF1P.BI1", - 0x1c000, 128); - - if (bios_only || !ret) - return ret; - - machine_at_common_init_ex(model, 2); - - device_add(&amstrad_megapc_nvr_device); - device_add(&ide_pci_device); - - pci_init(PCI_CONFIG_TYPE_2); - pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); - pci_register_slot(0x01, PCI_CARD_IDE, 0, 0, 0, 0); - pci_register_slot(0x06, PCI_CARD_NORMAL, 3, 2, 1, 4); - pci_register_slot(0x0E, PCI_CARD_NORMAL, 2, 1, 3, 4); - pci_register_slot(0x0C, PCI_CARD_NORMAL, 1, 3, 2, 4); - pci_register_slot(0x02, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); - device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); - device_add(&sio_zb_device); - device_add_params(&fdc37c6xx_device, (void *) (FDC37C665 | FDC37C6XX_IDE_PRI)); - device_add(&intel_flash_bxt_ami_device); - - device_add(&i430lx_device); - - return ret; -} - int machine_at_excaliburpci_init(const machine_t *model) { @@ -204,40 +170,6 @@ machine_at_p5mp3_init(const machine_t *model) return ret; } -int -machine_at_dellxp60_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear_inverted("roms/machines/dellxp60/XP60-A08.ROM", - 0x000e0000, 131072, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_init_ex(model, 2); - - device_add(&amstrad_megapc_nvr_device); - device_add(&ide_pci_device); - - pci_init(PCI_CONFIG_TYPE_2); - pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); - /* Not: 00, 02, 03, 04, 05, 06, 07, 08, 09, 0A, 0B, 0C, 0D, 0E, 0F. */ - /* Yes: 01, 10, 11, 12, 13, 14. */ - pci_register_slot(0x01, PCI_CARD_NORMAL, 1, 3, 2, 4); - pci_register_slot(0x04, PCI_CARD_NORMAL, 4, 4, 3, 3); - pci_register_slot(0x05, PCI_CARD_NORMAL, 1, 4, 3, 2); - pci_register_slot(0x06, PCI_CARD_NORMAL, 2, 1, 3, 4); - pci_register_slot(0x02, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); - device_add(&i430lx_device); - device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); - device_add(&sio_zb_device); - device_add_params(&fdc37c6xx_device, (void *) FDC37C665); - device_add(&intel_flash_bxt_ami_device); - - return ret; -} - int machine_at_opti560l_init(const machine_t *model) { @@ -345,6 +277,94 @@ machine_at_valuepointp60_init(const machine_t *model) return ret; } +static const device_config_t batman_config[] = { + // clang-format off + { + .name = "bios", + .description = "BIOS Version", + .type = CONFIG_BIOS, + .default_string = "batman", + .default_int = 0, + .file_filter = "", + .spinner = { 0 }, + .bios = { + { .name = "AMBRA DP60 PCI", .internal_name = "ambradp60", .bios_type = BIOS_NORMAL, + .files_no = 2, .local = 0, .size = 131072, .files = { "roms/machines/batman/1004AF1P.BIO", "roms/machines/batman/1004AF1P.BI1", "" } }, + { .name = "Dell Dimension XPS P60", .internal_name = "dellxp60", .bios_type = BIOS_NORMAL, + .files_no = 1, .local = 0, .size = 131072, .files = { "roms/machines/batman/XP60-A08.ROM", "" } }, + { .name = "Intel Premiere/PCI (Batman)", .internal_name = "batman", .bios_type = BIOS_NORMAL, + .files_no = 2, .local = 0, .size = 131072, .files = { "roms/machines/batman/1008AF1_.BIO", "roms/machines/batman/1008AF1_.BI1", "" } }, + { .files_no = 0 } + }, + }, + { .name = "", .description = "", .type = CONFIG_END } + // clang-format on +}; + +const device_t batman_device = { + .name = "Intel Premiere/PCI (Batman)", + .internal_name = "batman_device", + .flags = 0, + .local = 0, + .init = NULL, + .close = NULL, + .reset = NULL, + .available = NULL, + .speed_changed = NULL, + .force_redraw = NULL, + .config = batman_config +}; + +int +machine_at_batman_init(const machine_t *model) +{ + int ret = 0; + const char* fn; + const char* fn2; + + /* No ROMs available */ + if (!device_available(model->device)) + return ret; + + device_context(model->device); + int is_dell = !strcmp(device_get_config_bios("bios"), "dellxp60"); + fn = device_get_bios_file(machine_get_device(machine), device_get_config_bios("bios"), 0); + if (is_dell) + ret = bios_load_linear_inverted(fn, 0x000e0000, 131072, 0); + else { + fn2 = device_get_bios_file(machine_get_device(machine), device_get_config_bios("bios"), 1); + ret = bios_load_linear_combined(fn, fn2, 0x1c000, 128); + } + device_context_restore(); + + machine_at_common_init_ex(model, 2); + + device_add(&amstrad_megapc_nvr_device); + device_add(&ide_pci_device); + + pci_init(PCI_CONFIG_TYPE_2); + pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); + pci_register_slot(0x01, PCI_CARD_IDE, 0, 0, 0, 0); + if (is_dell) { + pci_register_slot(0x04, PCI_CARD_NORMAL, 4, 4, 3, 3); + pci_register_slot(0x05, PCI_CARD_NORMAL, 1, 4, 3, 2); + pci_register_slot(0x06, PCI_CARD_NORMAL, 2, 1, 3, 4); + } else { + pci_register_slot(0x06, PCI_CARD_NORMAL, 3, 2, 1, 4); + pci_register_slot(0x0E, PCI_CARD_NORMAL, 2, 1, 3, 4); + pci_register_slot(0x0C, PCI_CARD_NORMAL, 1, 3, 2, 4); + } + pci_register_slot(0x02, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); + device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); + device_add(&sio_zb_device); + device_add_params(&fdc37c6xx_device, (void *) (FDC37C665 | FDC37C6XX_IDE_PRI)); + device_add(&intel_flash_bxt_ami_device); + + device_add(&i430lx_device); + + return ret; +} + void machine_at_premiere_common_init(const machine_t *model, int pci_switch) { diff --git a/src/machine/m_at_socket5.c b/src/machine/m_at_socket5.c index 6756dfe70..a55e2bc2d 100644 --- a/src/machine/m_at_socket5.c +++ b/src/machine/m_at_socket5.c @@ -41,25 +41,6 @@ #include <86box/sound.h> /* i430NX */ -int -machine_at_ambradp90_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear_combined("roms/machines/ambradp90/1002AX1P.BIO", - "roms/machines/ambradp90/1002AX1P.BI1", - 0x1d000, 128); - - if (bios_only || !ret) - return ret; - - machine_at_premiere_common_init(model, PCI_CAN_SWITCH_TYPE); - - device_add(&i430nx_device); - - return ret; -} - int machine_at_p54np4_init(const machine_t *model) { @@ -90,25 +71,6 @@ machine_at_p54np4_init(const machine_t *model) return ret; } -int -machine_at_dellplato_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear_combined("roms/machines/dellplato/1016AX1J.BIO", - "roms/machines/dellplato/1016AX1J.BI1", - 0x1d000, 128); - - if (bios_only || !ret) - return ret; - - machine_at_premiere_common_init(model, PCI_CAN_SWITCH_TYPE); - - device_add(&i430nx_device); - - return ret; -} - int machine_at_586ip_init(const machine_t *model) { @@ -127,18 +89,61 @@ machine_at_586ip_init(const machine_t *model) return ret; } +static const device_config_t plato_config[] = { + // clang-format off + { + .name = "bios", + .description = "BIOS Version", + .type = CONFIG_BIOS, + .default_string = "plato", + .default_int = 0, + .file_filter = "", + .spinner = { 0 }, + .bios = { + { .name = "AMBRA DP90 PCI", .internal_name = "ambradp90", .bios_type = BIOS_NORMAL, + .files_no = 2, .local = 0, .size = 131072, .files = { "roms/machines/plato/1002AX1P.BIO", "roms/machines/plato/1002AX1P.BI1", "" } }, + { .name = "Dell Dimension XPS Pxxx", .internal_name = "dellplato", .bios_type = BIOS_NORMAL, + .files_no = 2, .local = 0, .size = 131072, .files = { "roms/machines/plato/1016AX1J.BIO", "roms/machines/plato/1016AX1J.BI1", "" } }, + { .name = "Intel Premiere/PCI II (Plato)", .internal_name = "plato", .bios_type = BIOS_NORMAL, + .files_no = 2, .local = 0, .size = 131072, .files = { "roms/machines/plato/1016ax1_.bio", "roms/machines/plato/1016ax1_.bi1", "" } }, + { .files_no = 0 } + }, + }, + { .name = "", .description = "", .type = CONFIG_END } + // clang-format on +}; + +const device_t plato_device = { + .name = "Intel Premiere/PCI II (Plato)", + .internal_name = "plato_device", + .flags = 0, + .local = 0, + .init = NULL, + .close = NULL, + .reset = NULL, + .available = NULL, + .speed_changed = NULL, + .force_redraw = NULL, + .config = plato_config +}; + int machine_at_plato_init(const machine_t *model) { - int ret; + int ret = 0; + const char* fn; + const char* fn2; - ret = bios_load_linear_combined("roms/machines/plato/1016ax1_.bio", - "roms/machines/plato/1016ax1_.bi1", - 0x1d000, 128); - - if (bios_only || !ret) + /* No ROMs available */ + if (!device_available(model->device)) return ret; + device_context(model->device); + fn = device_get_bios_file(machine_get_device(machine), device_get_config_bios("bios"), 0); + fn2 = device_get_bios_file(machine_get_device(machine), device_get_config_bios("bios"), 1); + ret = bios_load_linear_combined(fn, fn2, 0x1d000, 128); + device_context_restore(); + machine_at_premiere_common_init(model, PCI_CAN_SWITCH_TYPE); device_add(&i430nx_device); @@ -244,6 +249,7 @@ machine_at_tek932_init(const machine_t *model) pci_register_slot(0x0E, PCI_CARD_NORMAL, 3, 4, 1, 2); pci_register_slot(0x0D, PCI_CARD_NORMAL, 4, 1, 2, 3); pci_register_slot(0x0C, PCI_CARD_NORMAL, 1, 3, 2, 4); + machine_force_ps2(1); device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); device_add(&i430nx_device); device_add(&sio_zb_device); diff --git a/src/machine/m_at_socket7.c b/src/machine/m_at_socket7.c index d44758564..cbc5ec05f 100644 --- a/src/machine/m_at_socket7.c +++ b/src/machine/m_at_socket7.c @@ -140,6 +140,46 @@ machine_at_p65up5_cp55t2d_init(const machine_t *model) return ret; } +static const device_config_t cu430hx_config[] = { + // clang-format off + { + .name = "bios", + .description = "BIOS Version", + .type = CONFIG_BIOS, + .default_string = "cu430hx", + .default_int = 0, + .file_filter = "", + .spinner = { 0 }, + .bios = { + { .name = "Intel CU430HX (Cumberland)", .internal_name = "cu430hx", .bios_type = BIOS_NORMAL, + .files_no = 5, .local = 0, .size = 262144, .files = { "roms/machines/cu430hx/1006DK0_.BIO", "roms/machines/cu430hx/1006DK0_.BI1", + "roms/machines/cu430hx/1006DK0_.BI2", "roms/machines/cu430hx/1006DK0_.BI3", + "roms/machines/cu430hx/1006DK0_.RCV", "" } }, + { .name = "Toshiba Equium 5200D", .internal_name = "equium5200", .bios_type = BIOS_NORMAL, + .files_no = 5, .local = 0, .size = 262144, .files = { "roms/machines/cu430hx/1003DK08.BIO", "roms/machines/cu430hx/1003DK08.BI1", + "roms/machines/cu430hx/1003DK08.BI2", "roms/machines/cu430hx/1003DK08.BI3", + "roms/machines/cu430hx/1003DK08.RCV", "" } }, + { .files_no = 0 } + }, + }, + { .name = "", .description = "", .type = CONFIG_END } + // clang-format on +}; + +const device_t cu430hx_device = { + .name = "Intel CU430HX (Cumberland)", + .internal_name = "cu430hx_device", + .flags = 0, + .local = 0, + .init = NULL, + .close = NULL, + .reset = NULL, + .available = NULL, + .speed_changed = NULL, + .force_redraw = NULL, + .config = cu430hx_config +}; + static void machine_at_cu430hx_gpio_init(void) { @@ -171,9 +211,22 @@ machine_at_cu430hx_gpio_init(void) machine_set_gpio_default(gpio); } -static void -machine_at_cu430hx_common_init(const machine_t *model) +int +machine_at_cu430hx_init(const machine_t *model) { + int ret = 0; + const char* fn[5]; + + /* No ROMs available */ + if (!device_available(model->device)) + return ret; + + device_context(model->device); + for (int i = 0; i < 5; i++) + fn[i] = device_get_bios_file(machine_get_device(machine), device_get_config_bios("bios"), i); + ret = bios_load_linear_combined2(fn[0], fn[1], fn[2], fn[3], fn[4], 0x3a000, 128); + device_context_restore(); + machine_at_common_init_ex(model, 2); machine_at_cu430hx_gpio_init(); @@ -194,28 +247,50 @@ machine_at_cu430hx_common_init(const machine_t *model) device_add(&piix3_device); device_add_params(&pc87306_device, (void *) PCX730X_AMI); device_add(&intel_flash_bxt_ami_device); -} - -int -machine_at_cu430hx_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear_combined2("roms/machines/cu430hx/1006DK0_.BIO", - "roms/machines/cu430hx/1006DK0_.BI1", - "roms/machines/cu430hx/1006DK0_.BI2", - "roms/machines/cu430hx/1006DK0_.BI3", - "roms/machines/cu430hx/1006DK0_.RCV", - 0x3a000, 128); - - if (bios_only || !ret) - return ret; - - machine_at_cu430hx_common_init(model); return ret; } +static const device_config_t tc430hx_config[] = { + // clang-format off + { + .name = "bios", + .description = "BIOS Version", + .type = CONFIG_BIOS, + .default_string = "tc430hx", + .default_int = 0, + .file_filter = "", + .spinner = { 0 }, + .bios = { + { .name = "Intel TC430HX (Tucson)", .internal_name = "tc430hx", .bios_type = BIOS_NORMAL, + .files_no = 5, .local = 0, .size = 262144, .files = { "roms/machines/tc430hx/1007DH0_.BIO", "roms/machines/tc430hx/1007DH0_.BI1", + "roms/machines/tc430hx/1007DH0_.BI2", "roms/machines/tc430hx/1007DH0_.BI3", + "roms/machines/tc430hx/1007DH0_.RCV", "" } }, + { .name = "Toshiba Infinia 7201", .internal_name = "infinia7200", .bios_type = BIOS_NORMAL, + .files_no = 5, .local = 0, .size = 262144, .files = { "roms/machines/tc430hx/1008DH08.BIO", "roms/machines/tc430hx/1008DH08.BI1", + "roms/machines/tc430hx/1008DH08.BI2", "roms/machines/tc430hx/1008DH08.BI3", + "roms/machines/tc430hx/1008DH08.RCV", "" } }, + { .files_no = 0 } + }, + }, + { .name = "", .description = "", .type = CONFIG_END } + // clang-format on +}; + +const device_t tc430hx_device = { + .name = "Intel TC430HX (Tucson)", + .internal_name = "tc430hx_device", + .flags = 0, + .local = 0, + .init = NULL, + .close = NULL, + .reset = NULL, + .available = NULL, + .speed_changed = NULL, + .force_redraw = NULL, + .config = tc430hx_config +}; + static void machine_at_tc430hx_gpio_init(void) { @@ -247,18 +322,19 @@ machine_at_tc430hx_gpio_init(void) int machine_at_tc430hx_init(const machine_t *model) { - int ret; + int ret = 0; + const char* fn[5]; - ret = bios_load_linear_combined2("roms/machines/tc430hx/1007DH0_.BIO", - "roms/machines/tc430hx/1007DH0_.BI1", - "roms/machines/tc430hx/1007DH0_.BI2", - "roms/machines/tc430hx/1007DH0_.BI3", - "roms/machines/tc430hx/1007DH0_.RCV", - 0x3a000, 128); - - if (bios_only || !ret) + /* No ROMs available */ + if (!device_available(model->device)) return ret; + device_context(model->device); + for (int i = 0; i < 5; i++) + fn[i] = device_get_bios_file(machine_get_device(machine), device_get_config_bios("bios"), i); + ret = bios_load_linear_combined2(fn[0], fn[1], fn[2], fn[3], fn[4], 0x3a000, 128); + device_context_restore(); + machine_at_common_init_ex(model, 2); machine_at_tc430hx_gpio_init(); @@ -407,64 +483,6 @@ machine_at_p55t2s_init(const machine_t *model) return ret; } -int -machine_at_equium5200_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear_combined2("roms/machines/equium5200/1003DK08.BIO", - "roms/machines/equium5200/1003DK08.BI1", - "roms/machines/equium5200/1003DK08.BI2", - "roms/machines/equium5200/1003DK08.BI3", - "roms/machines/equium5200/1003DK08.RCV", - 0x3a000, 128); - - if (bios_only || !ret) - return ret; - - machine_at_cu430hx_common_init(model); - - return ret; -} - -int -machine_at_infinia7200_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear_combined2("roms/machines/infinia7200/1008DH08.BIO", - "roms/machines/infinia7200/1008DH08.BI1", - "roms/machines/infinia7200/1008DH08.BI2", - "roms/machines/infinia7200/1008DH08.BI3", - "roms/machines/infinia7200/1008DH08.RCV", - 0x3a000, 128); - - if (bios_only || !ret) - return ret; - - machine_at_common_init_ex(model, 2); - machine_at_tc430hx_gpio_init(); - - pci_init(PCI_CONFIG_TYPE_1); - pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); - pci_register_slot(0x08, PCI_CARD_VIDEO, 4, 0, 0, 0); - pci_register_slot(0x0D, PCI_CARD_NORMAL, 1, 2, 3, 4); - pci_register_slot(0x0E, PCI_CARD_NORMAL, 2, 3, 4, 1); - pci_register_slot(0x0F, PCI_CARD_NORMAL, 3, 4, 1, 2); - pci_register_slot(0x10, PCI_CARD_NORMAL, 4, 1, 2, 3); - pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); - - if (gfxcard[0] == VID_INTERNAL) - device_add(machine_get_vid_device(machine)); - - device_add(&i430hx_device); - device_add(&piix3_device); - device_add_params(&pc87306_device, (void *) PCX730X_AMI); - device_add(&intel_flash_bxt_ami_device); - - return ret; -} - /* i430VX */ int machine_at_ap5vm_init(const machine_t *model) @@ -1684,17 +1702,57 @@ machine_at_ms5172_init(const machine_t *model) } /* ALi ALADDiN IV+ */ +static const device_config_t m5ata_config[] = { + // clang-format off + { + .name = "bios", + .description = "BIOS Version", + .type = CONFIG_BIOS, + .default_string = "m5ata", + .default_int = 0, + .file_filter = "", + .spinner = { 0 }, + .bios = { + { .name = "12/23/97", .internal_name = "m5ata", .bios_type = BIOS_NORMAL, + .files_no = 1, .local = 0, .size = 131072, .files = { "roms/machines/m5ata/ATA1223.BIN", "" } }, + { .name = "05/27/98", .internal_name = "m5ata_0527b", .bios_type = BIOS_NORMAL, + .files_no = 1, .local = 0, .size = 131072, .files = { "roms/machines/m5ata/ATA0527B.BIN", "" } }, + { .files_no = 0 } + }, + }, + { .name = "", .description = "", .type = CONFIG_END } + // clang-format on +}; + +const device_t m5ata_device = { + .name = "Biostar M5ATA", + .internal_name = "m5ata_device", + .flags = 0, + .local = 0, + .init = NULL, + .close = NULL, + .reset = NULL, + .available = NULL, + .speed_changed = NULL, + .force_redraw = NULL, + .config = m5ata_config +}; + int machine_at_m5ata_init(const machine_t *model) { - int ret; + int ret = 0; + const char* fn; - ret = bios_load_linear("roms/machines/m5ata/ATA1223.BIN", - 0x000e0000, 131072, 0); - - if (bios_only || !ret) + /* No ROMs available */ + if (!device_available(model->device)) return ret; + device_context(model->device); + fn = device_get_bios_file(machine_get_device(machine), device_get_config_bios("bios"), 0); + ret = bios_load_linear(fn, 0x000e0000, 131072, 0); + device_context_restore(); + machine_at_common_init_ex(model, 2); pci_init(PCI_CONFIG_TYPE_1); diff --git a/src/machine/m_at_socket7_3v.c b/src/machine/m_at_socket7_3v.c index 1166173f2..64d8a0fd5 100644 --- a/src/machine/m_at_socket7_3v.c +++ b/src/machine/m_at_socket7_3v.c @@ -42,9 +42,57 @@ #include <86box/sound.h> /* i430FX */ -static void -machine_at_p54tp4xe_common_init(const machine_t *model) +static const device_config_t p54tp4xe_config[] = { + // clang-format off + { + .name = "bios", + .description = "BIOS Version", + .type = CONFIG_BIOS, + .default_string = "p54tp4xe", + .default_int = 0, + .file_filter = "", + .spinner = { 0 }, + .bios = { + { .name = "Award BIOS v4.51PG", .internal_name = "p54tp4xe", .bios_type = BIOS_NORMAL, + .files_no = 1, .local = 0, .size = 131072, .files = { "roms/machines/p54tp4xe/t15i0302.awd", "" } }, + { .name = "MR BIOS V3.30", .internal_name = "p54tp4xe_mr", .bios_type = BIOS_NORMAL, + .files_no = 1, .local = 0, .size = 131072, .files = { "roms/machines/p54tp4xe/TRITON.BIO", "" } }, + { .files_no = 0 } + }, + }, + { .name = "", .description = "", .type = CONFIG_END } + // clang-format on +}; + +const device_t p54tp4xe_device = { + .name = "ASUS P/I-P55TP4XE", + .internal_name = "p54tp4xe_device", + .flags = 0, + .local = 0, + .init = NULL, + .close = NULL, + .reset = NULL, + .available = NULL, + .speed_changed = NULL, + .force_redraw = NULL, + .config = p54tp4xe_config +}; + +int +machine_at_p54tp4xe_init(const machine_t *model) { + int ret = 0; + const char* fn; + + /* No ROMs available */ + if (!device_available(model->device)) + return ret; + + device_context(model->device); + fn = device_get_bios_file(machine_get_device(machine), device_get_config_bios("bios"), 0); + ret = bios_load_linear(fn, 0x000e0000, 131072, 0); + device_context_restore(); + machine_at_common_init(model); pci_init(PCI_CONFIG_TYPE_1); @@ -59,36 +107,6 @@ machine_at_p54tp4xe_common_init(const machine_t *model) device_add(&piix_device); device_add_params(&fdc37c6xx_device, (void *) FDC37C665); device_add(&intel_flash_bxt_device); -} - -int -machine_at_p54tp4xe_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/p54tp4xe/t15i0302.awd", - 0x000e0000, 131072, 0); - - if (bios_only || !ret) - return ret; - - machine_at_p54tp4xe_common_init(model); - - return ret; -} - -int -machine_at_p54tp4xe_mr_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/p54tp4xe/TRITON.BIO", - 0x000e0000, 131072, 0); - - if (bios_only || !ret) - return ret; - - machine_at_p54tp4xe_common_init(model); return ret; } @@ -122,6 +140,76 @@ machine_at_exp8551_init(const machine_t *model) return ret; } +int +machine_at_vectra54_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/vectra54/GT0724.22", + 0x000e0000, 131072, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init_ex(model, 2); + + pci_init(PCI_CONFIG_TYPE_1); + pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); + pci_register_slot(0x0F, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); + pci_register_slot(0x0D, PCI_CARD_VIDEO, 0, 0, 0, 0); + pci_register_slot(0x06, PCI_CARD_NORMAL, 1, 2, 3, 4); + pci_register_slot(0x07, PCI_CARD_NORMAL, 2, 3, 4, 1); + pci_register_slot(0x08, PCI_CARD_NORMAL, 3, 4, 1, 2); + + if (gfxcard[0] == VID_INTERNAL) + device_add(&s3_phoenix_trio64_onboard_pci_device); + + device_add(&i430fx_device); + device_add(&piix_device); + device_add_params(&fdc37c93x_device, (void *) (FDC37XXX2 | FDC37C93X_NORMAL)); + device_add(&sst_flash_29ee010_device); + + return ret; +} + +static const device_config_t thor_config[] = { + // clang-format off + { + .name = "bios", + .description = "BIOS Version", + .type = CONFIG_BIOS, + .default_string = "thor", + .default_int = 0, + .file_filter = "", + .spinner = { 0 }, + .bios = { + { .name = "Gateway 2000 (AMIBIOS)", .internal_name = "gw2katx", .bios_type = BIOS_NORMAL, + .files_no = 2, .local = 0, .size = 131072, .files = { "roms/machines/thor/1003CN0T.BIO", "roms/machines/thor/1003CN0T.BI1", "" } }, + { .name = "Intel (AMIBIOS)", .internal_name = "thor", .bios_type = BIOS_NORMAL, + .files_no = 2, .local = 0, .size = 131072, .files = { "roms/machines/thor/1006cn0_.bio", "roms/machines/thor/1006cn0_.bi1", "" } }, + { .name = "Intel (MR BIOS)", .internal_name = "mrthor", .bios_type = BIOS_NORMAL, + .files_no = 1, .local = 0, .size = 131072, .files = { "roms/machines/thor/mr_atx.bio", "" } }, + { .files_no = 0 } + }, + }, + { .name = "", .description = "", .type = CONFIG_END } + // clang-format on +}; + +const device_t thor_device = { + .name = "Intel Advanced/ATX (Thor)", + .internal_name = "thor_device", + .flags = 0, + .local = 0, + .init = NULL, + .close = NULL, + .reset = NULL, + .available = NULL, + .speed_changed = NULL, + .force_redraw = NULL, + .config = thor_config +}; + static void machine_at_thor_gpio_init(void) { @@ -167,9 +255,29 @@ machine_at_thor_gpio_init(void) machine_set_gpio_default(gpio); } -static void -machine_at_thor_common_init(const machine_t *model, int has_video) +int +machine_at_thor_init(const machine_t *model) { + int ret = 0; + const char* fn; + const char* fn2; + + /* No ROMs available */ + if (!device_available(model->device)) + return ret; + + device_context(model->device); + int is_mr = !strcmp(device_get_config_bios("bios"), "mrthor"); + int has_video = !strcmp(device_get_config_bios("bios"), "thor"); + fn = device_get_bios_file(machine_get_device(machine), device_get_config_bios("bios"), 0); + if (is_mr) + ret = bios_load_linear(fn, 0x000e0000, 131072, 0); + else { + fn2 = device_get_bios_file(machine_get_device(machine), device_get_config_bios("bios"), 1); + ret = bios_load_linear_combined(fn, fn2, 0x20000, 128); + } + device_context_restore(); + machine_at_common_init_ex(model, 2); machine_at_thor_gpio_init(); @@ -189,86 +297,6 @@ machine_at_thor_common_init(const machine_t *model, int has_video) device_add(&piix_device); device_add_params(&pc87306_device, (void *) PCX730X_AMI); device_add(&intel_flash_bxt_ami_device); -} - -int -machine_at_gw2katx_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear_combined("roms/machines/gw2katx/1003CN0T.BIO", - "roms/machines/gw2katx/1003CN0T.BI1", - 0x20000, 128); - - if (bios_only || !ret) - return ret; - - machine_at_thor_common_init(model, 0); - - return ret; -} - -int -machine_at_vectra54_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/vectra54/GT0724.22", - 0x000e0000, 131072, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_init_ex(model, 2); - - pci_init(PCI_CONFIG_TYPE_1); - pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); - pci_register_slot(0x0F, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); - pci_register_slot(0x0D, PCI_CARD_VIDEO, 0, 0, 0, 0); - pci_register_slot(0x06, PCI_CARD_NORMAL, 1, 2, 3, 4); - pci_register_slot(0x07, PCI_CARD_NORMAL, 2, 3, 4, 1); - pci_register_slot(0x08, PCI_CARD_NORMAL, 3, 4, 1, 2); - - if (gfxcard[0] == VID_INTERNAL) - device_add(&s3_phoenix_trio64_onboard_pci_device); - - device_add(&i430fx_device); - device_add(&piix_device); - device_add_params(&fdc37c93x_device, (void *) (FDC37XXX2 | FDC37C93X_NORMAL)); - device_add(&sst_flash_29ee010_device); - - return ret; -} - -int -machine_at_thor_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear_combined("roms/machines/thor/1006cn0_.bio", - "roms/machines/thor/1006cn0_.bi1", - 0x20000, 128); - - if (bios_only || !ret) - return ret; - - machine_at_thor_common_init(model, 1); - - return ret; -} - -int -machine_at_mrthor_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/mrthor/mr_atx.bio", - 0x000e0000, 131072, 0); - - if (bios_only || !ret) - return ret; - - machine_at_thor_common_init(model, 0); return ret; } diff --git a/src/machine/m_at_socket8.c b/src/machine/m_at_socket8.c index bcbf6ba18..e7975f601 100644 --- a/src/machine/m_at_socket8.c +++ b/src/machine/m_at_socket8.c @@ -253,78 +253,6 @@ machine_at_8600ttc_init(const machine_t *model) return ret; } -int -machine_at_dellvenus_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear_combined2("roms/machines/dellvenus/1006CS1J.BIO", - "roms/machines/dellvenus/1006CS1J.BI1", - "roms/machines/dellvenus/1006CS1J.BI2", - "roms/machines/dellvenus/1006CS1J.BI3", - "roms/machines/dellvenus/1006CS1J.RCV", - 0x3a000, 128); - - if (bios_only || !ret) - return ret; - - machine_at_common_init(model); - - pci_init(PCI_CONFIG_TYPE_1); - pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); - pci_register_slot(0x0B, PCI_CARD_NORMAL, 1, 2, 3, 4); - pci_register_slot(0x0F, PCI_CARD_NORMAL, 4, 1, 2, 3); - pci_register_slot(0x11, PCI_CARD_NORMAL, 3, 4, 1, 2); - pci_register_slot(0x13, PCI_CARD_NORMAL, 2, 3, 4, 1); - pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); - device_add(&i440fx_device); - device_add(&piix3_device); - device_add_params(&pc87307_device, (void *) (PCX730X_AMI | PCX7307_PC87307)); - - device_add(&intel_flash_bxt_ami_device); - - if (sound_card_current[0] == SOUND_INTERNAL) - device_add(machine_get_snd_device(machine)); - - return ret; -} - -int -machine_at_gw2kvenus_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear_combined2("roms/machines/gw2kvenus/1011CS1T.BIO", - "roms/machines/gw2kvenus/1011CS1T.BI1", - "roms/machines/gw2kvenus/1011CS1T.BI2", - "roms/machines/gw2kvenus/1011CS1T.BI3", - "roms/machines/gw2kvenus/1011CS1T.RCV", - 0x3a000, 128); - - if (bios_only || !ret) - return ret; - - machine_at_common_init(model); - - pci_init(PCI_CONFIG_TYPE_1); - pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); - pci_register_slot(0x0B, PCI_CARD_NORMAL, 1, 2, 3, 4); - pci_register_slot(0x0F, PCI_CARD_NORMAL, 4, 1, 2, 3); - pci_register_slot(0x11, PCI_CARD_NORMAL, 3, 4, 1, 2); - pci_register_slot(0x13, PCI_CARD_NORMAL, 2, 3, 4, 1); - pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); - device_add(&i440fx_device); - device_add(&piix3_device); - device_add_params(&pc87307_device, (void *) (PCX730X_AMI | PCX7307_PC87307)); - - device_add(&intel_flash_bxt_ami_device); - - if (sound_card_current[0] == SOUND_INTERNAL) - device_add(machine_get_snd_device(machine)); - - return ret; -} - int machine_at_686nx_init(const machine_t *model) { @@ -392,21 +320,66 @@ machine_at_ap440fx_init(const machine_t *model) return ret; } +static const device_config_t vs440fx_config[] = { + // clang-format off + { + .name = "bios", + .description = "BIOS Version", + .type = CONFIG_BIOS, + .default_string = "vs440fx", + .default_int = 0, + .file_filter = "", + .spinner = { 0 }, + .bios = { + { .name = "Dell Dimension XPS Pro___n", .internal_name = "dellvenus", .bios_type = BIOS_NORMAL, + .files_no = 5, .local = 0, .size = 262144, .files = { "roms/machines/vs440fx/1006CS1J.BIO", "roms/machines/vs440fx/1006CS1J.BI1", + "roms/machines/vs440fx/1006CS1J.BI2", "roms/machines/vs440fx/1006CS1J.BI3", + "roms/machines/vs440fx/1006CS1J.RCV", "" } }, + { .name = "Gateway 2000 Venus", .internal_name = "gw2kvenus", .bios_type = BIOS_NORMAL, + .files_no = 5, .local = 0, .size = 262144, .files = { "roms/machines/vs440fx/1011CS1T.BIO", "roms/machines/vs440fx/1011CS1T.BI1", + "roms/machines/vs440fx/1011CS1T.BI2", "roms/machines/vs440fx/1011CS1T.BI3", + "roms/machines/vs440fx/1011CS1T.RCV", "" } }, + { .name = "Intel VS440FX (Venus)", .internal_name = "vs440fx", .bios_type = BIOS_NORMAL, + .files_no = 5, .local = 0, .size = 262144, .files = { "roms/machines/vs440fx/1018CS1_.BIO", "roms/machines/vs440fx/1018CS1_.BI1", + "roms/machines/vs440fx/1018CS1_.BI2", "roms/machines/vs440fx/1018CS1_.BI3", + "roms/machines/vs440fx/1018CS1_.RCV", "" } }, + { .files_no = 0 } + }, + }, + { .name = "", .description = "", .type = CONFIG_END } + // clang-format on +}; + +const device_t vs440fx_device = { + .name = "Intel VS440FX (Venus)", + .internal_name = "vs440fx_device", + .flags = 0, + .local = 0, + .init = NULL, + .close = NULL, + .reset = NULL, + .available = NULL, + .speed_changed = NULL, + .force_redraw = NULL, + .config = vs440fx_config +}; + int machine_at_vs440fx_init(const machine_t *model) { - int ret; + int ret = 0; + const char* fn[5]; - ret = bios_load_linear_combined2("roms/machines/vs440fx/1018CS1_.BIO", - "roms/machines/vs440fx/1018CS1_.BI1", - "roms/machines/vs440fx/1018CS1_.BI2", - "roms/machines/vs440fx/1018CS1_.BI3", - "roms/machines/vs440fx/1018CS1_.RCV", - 0x3a000, 128); - - if (bios_only || !ret) + /* No ROMs available */ + if (!device_available(model->device)) return ret; + device_context(model->device); + for (int i = 0; i < 5; i++) + fn[i] = device_get_bios_file(machine_get_device(machine), device_get_config_bios("bios"), i); + ret = bios_load_linear_combined2(fn[0], fn[1], fn[2], fn[3], fn[4], 0x3a000, 128); + device_context_restore(); + machine_at_common_init(model); pci_init(PCI_CONFIG_TYPE_1); diff --git a/src/machine/m_pcjr.c b/src/machine/m_pcjr.c index 092c00b8f..b7d840224 100644 --- a/src/machine/m_pcjr.c +++ b/src/machine/m_pcjr.c @@ -789,6 +789,23 @@ static const device_config_t pcjr_config[] = { { .description = "" } } }, + { + .name = "double_type", + .description = "Line doubling type", + .type = CONFIG_SELECTION, + .default_string = NULL, + .default_int = DOUBLE_NONE, + .file_filter = NULL, + .spinner = { 0 }, + .selection = { + { .description = "None", .value = DOUBLE_NONE }, + { .description = "Simple doubling", .value = DOUBLE_SIMPLE }, + { .description = "sRGB interpolation", .value = DOUBLE_INTERPOLATE_SRGB }, + { .description = "Linear interpolation", .value = DOUBLE_INTERPOLATE_LINEAR }, + { .description = "" } + }, + .bios = { { 0 } } + }, { .name = "apply_hd", .description = "Apply overscan deltas", diff --git a/src/machine/m_ps2_mca.c b/src/machine/m_ps2_mca.c index e8be93038..4a3d94ab3 100644 --- a/src/machine/m_ps2_mca.c +++ b/src/machine/m_ps2_mca.c @@ -1603,21 +1603,70 @@ machine_ps2_common_init(const machine_t *model) ps2.has_e0000_hole = 0; } +static const device_config_t ps2_model_50_config[] = { + // clang-format off + { + .name = "bios", + .description = "BIOS Version", + .type = CONFIG_BIOS, + .default_string = "ibmps2_m50", + .default_int = 0, + .file_filter = "", + .spinner = { 0 }, + .bios = { + { .name = "IBM PS/2 model 50", .internal_name = "ibmps2_m50", .bios_type = BIOS_NORMAL, + .files_no = 4, .local = 0, .size = 131072, .files = { "roms/machines/ibmps2_m50/90x7420.zm13", + "roms/machines/ibmps2_m50/90x7429.zm18", + "roms/machines/ibmps2_m50/90x7423.zm14", + "roms/machines/ibmps2_m50/90x7426.zm16", "" } }, + { .name = "IBM PS/2 model 50Z", .internal_name = "ibmps2_m50z", .bios_type = BIOS_NORMAL, + .files_no = 2, .local = 0, .size = 131072, .files = { "roms/machines/ibmps2_m50/15F8366.BIN", + "roms/machines/ibmps2_m50/15F8365.BIN", "" } }, + { .files_no = 0 } + }, + }, + { .name = "", .description = "", .type = CONFIG_END } + // clang-format on +}; + +const device_t ps2_model_50_device = { + .name = "IBM PS/2 model 50", + .internal_name = "ps2_model_50_device", + .flags = 0, + .local = 0, + .init = NULL, + .close = NULL, + .reset = NULL, + .available = NULL, + .speed_changed = NULL, + .force_redraw = NULL, + .config = ps2_model_50_config +}; + int machine_ps2_model_50_init(const machine_t *model) { - int ret; + int ret = 0; + const char* fn[4]; - ret = bios_load_interleaved("roms/machines/ibmps2_m50/90x7420.zm13", - "roms/machines/ibmps2_m50/90x7429.zm18", - 0x000f0000, 131072, 0); - ret &= bios_load_aux_interleaved("roms/machines/ibmps2_m50/90x7423.zm14", - "roms/machines/ibmps2_m50/90x7426.zm16", - 0x000e0000, 65536, 0); - - if (bios_only || !ret) + /* No ROMs available */ + if (!device_available(model->device)) return ret; + device_context(model->device); + int is_50z = !strcmp(device_get_config_bios("bios"), "ibmps2_m50z"); + if (is_50z) { + for (int i = 0; i < 2; i++) + fn[i] = device_get_bios_file(machine_get_device(machine), device_get_config_bios("bios"), i); + ret = bios_load_interleaved(fn[0], fn[1], 0x000e0000, 131072, 0); + } else { + for (int i = 0; i < 4; i++) + fn[i] = device_get_bios_file(machine_get_device(machine), device_get_config_bios("bios"), i); + ret = bios_load_interleaved(fn[0], fn[1], 0x000f0000, 131072, 0); + ret &= bios_load_aux_interleaved(fn[2], fn[3], 0x000e0000, 65536, 0); + } + device_context_restore(); + machine_ps2_common_init(model); ps2.planar_id = 0xfbff; diff --git a/src/machine/m_tandy.c b/src/machine/m_tandy.c index 1c7061d8a..899e819f7 100644 --- a/src/machine/m_tandy.c +++ b/src/machine/m_tandy.c @@ -149,11 +149,11 @@ static const scancode scancode_tandy[512] = { { .mk = { 0x51, 0 }, .brk = { 0xd1, 0 } }, /* 051 */ { .mk = { 0x52, 0 }, .brk = { 0xd2, 0 } }, /* 052 */ { .mk = { 0x56, 0 }, .brk = { 0xd6, 0 } }, /* 053 */ - { .mk = { 0 }, .brk = { 0 } }, /* 054 */ + { .mk = { 0x54, 0 }, .brk = { 0xd4, 0 } }, /* 054 */ { .mk = { 0 }, .brk = { 0 } }, /* 055 */ { .mk = { 0 }, .brk = { 0 } }, /* 056 */ - { .mk = { 0 }, .brk = { 0 } }, /* 057 */ - { .mk = { 0 }, .brk = { 0 } }, /* 058 */ + { .mk = { 0x59, 0 }, .brk = { 0xd9, 0 } }, /* 057 */ + { .mk = { 0x5a, 0 }, .brk = { 0xda, 0 } }, /* 058 */ { .mk = { 0 }, .brk = { 0 } }, /* 059 */ { .mk = { 0 }, .brk = { 0 } }, /* 05a */ { .mk = { 0 }, .brk = { 0 } }, /* 05b */ @@ -392,7 +392,7 @@ static const scancode scancode_tandy[512] = { { .mk = { 0 }, .brk = { 0 } }, /* 144 */ { .mk = { 0 }, .brk = { 0 } }, /* 145 */ { .mk = { 0x46, 0 }, .brk = { 0xc6, 0 } }, /* 146 */ - { .mk = { 0x47, 0 }, .brk = { 0xc7, 0 } }, /* 147 */ + { .mk = { 0x58, 0 }, .brk = { 0xd8, 0 } }, /* 147 */ { .mk = { 0x29, 0 }, .brk = { 0xa9, 0 } }, /* 148 */ { .mk = { 0x49, 0 }, .brk = { 0xc9, 0 } }, /* 149 */ { .mk = { 0 }, .brk = { 0 } }, /* 14a */ @@ -403,7 +403,7 @@ static const scancode scancode_tandy[512] = { { .mk = { 0x4f, 0 }, .brk = { 0xcf, 0 } }, /* 14f */ { .mk = { 0x4a, 0 }, .brk = { 0xca, 0 } }, /* 150 */ { .mk = { 0x51, 0 }, .brk = { 0xd1, 0 } }, /* 151 */ - { .mk = { 0x52, 0 }, .brk = { 0xd2, 0 } }, /* 152 */ + { .mk = { 0x55, 0 }, .brk = { 0xd5, 0 } }, /* 152 */ { .mk = { 0x53, 0 }, .brk = { 0xd3, 0 } }, /* 153 */ { .mk = { 0 }, .brk = { 0 } }, /* 154 */ { .mk = { 0 }, .brk = { 0 } }, /* 155 */ diff --git a/src/machine/machine_table.c b/src/machine/machine_table.c index e85f7768d..30b859544 100644 --- a/src/machine/machine_table.c +++ b/src/machine/machine_table.c @@ -3123,49 +3123,6 @@ const machine_t machines[] = { .snd_device = NULL, .net_device = NULL }, - /* AMI BIOS for a chipset-less machine, most likely has AMI 'F' KBC firmware. */ - { - .name = "[ISA] AMI IBM AT", - .internal_name = "ibmatami", - .type = MACHINE_TYPE_286, - .chipset = MACHINE_CHIPSET_DISCRETE, - .init = machine_at_ibmatami_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, - .gpio_acpi_handler = NULL, - .cpu = { - .package = CPU_PKG_286, - .block = CPU_BLOCK_NONE, - .min_bus = 0, - .max_bus = 0, - .min_voltage = 0, - .max_voltage = 0, - .min_multi = 0, - .max_multi = 0 - }, - .bus_flags = MACHINE_AT, - .flags = MACHINE_FLAGS_NONE, - .ram = { - .min = 256, - .max = 512, - .step = 256 - }, - .nvrmask = 63, - .jumpered_ecp_dma = 0, - .default_jumpered_ecp_dma = -1, - .kbc_device = &kbc_at_device, - .kbc_params = 0x00000000, - .kbc_p1 = 0x000004f0, - .gpio = 0xffffffff, - .gpio_acpi = 0xffffffff, - .device = NULL, - .fdc_device = NULL, - .sio_device = NULL, - .vid_device = NULL, - .snd_device = NULL, - .net_device = NULL - }, /* Uses Commodore (CBM) KBC firmware, to be implemented as identical to the IBM AT KBC firmware unless evidence emerges of any proprietary commands. */ { @@ -3476,11 +3433,11 @@ const machine_t machines[] = { }, /* Has IBM AT KBC firmware. */ { - .name = "[ISA] Phoenix IBM AT", + .name = "[ISA] Phoenix AT clone", .internal_name = "ibmatpx", .type = MACHINE_TYPE_286, .chipset = MACHINE_CHIPSET_DISCRETE, - .init = machine_at_ibmatpx_init, + .init = machine_at_pxat_init, .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, @@ -3520,11 +3477,11 @@ const machine_t machines[] = { }, /* Has Quadtel KBC firmware. */ { - .name = "[ISA] Quadtel IBM AT", + .name = "[ISA] Quadtel AT clone", .internal_name = "ibmatquadtel", .type = MACHINE_TYPE_286, .chipset = MACHINE_CHIPSET_DISCRETE, - .init = machine_at_ibmatquadtel_init, + .init = machine_at_quadtat_init, .p1_handler = machine_generic_p1_handler, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, @@ -3784,6 +3741,49 @@ const machine_t machines[] = { .snd_device = NULL, .net_device = NULL }, + /* AMI BIOS for a chipset-less machine, most likely has AMI 'F' KBC firmware. */ + { + .name = "[ISA] Trangg Bow Unknown 286", + .internal_name = "ibmatami", + .type = MACHINE_TYPE_286, + .chipset = MACHINE_CHIPSET_DISCRETE, + .init = machine_at_tbunk286_init, + .p1_handler = machine_generic_p1_handler, + .gpio_handler = NULL, + .available_flag = MACHINE_AVAILABLE, + .gpio_acpi_handler = NULL, + .cpu = { + .package = CPU_PKG_286, + .block = CPU_BLOCK_NONE, + .min_bus = 0, + .max_bus = 0, + .min_voltage = 0, + .max_voltage = 0, + .min_multi = 0, + .max_multi = 0 + }, + .bus_flags = MACHINE_AT, + .flags = MACHINE_FLAGS_NONE, + .ram = { + .min = 256, + .max = 512, + .step = 256 + }, + .nvrmask = 63, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_AMI | 0x00003800, + .kbc_p1 = 0x000004f0, + .gpio = 0xffffffff, + .gpio_acpi = 0xffffffff, + .device = NULL, + .fdc_device = NULL, + .sio_device = NULL, + .vid_device = NULL, + .snd_device = NULL, + .net_device = NULL + }, /* No proper pictures of the KBC exist, though it seems to have the IBM AT KBC firmware. */ { @@ -4837,7 +4837,7 @@ const machine_t machines[] = { .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, - .device = NULL, + .device = &ps2_model_50_device, .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, @@ -5237,51 +5237,7 @@ const machine_t machines[] = { .kbc_p1 = 0x000004f0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, - .device = NULL, - .kbd_device = NULL, - .fdc_device = NULL, - .sio_device = NULL, - .vid_device = NULL, - .snd_device = NULL, - .net_device = NULL - }, - /* Has a JetKey KBC without version, which is a clone of AMI '8'. */ - { - .name = "[ALi M1217] Chaintech 325AX (MR BIOS)", - .internal_name = "mr1217", - .type = MACHINE_TYPE_386SX, - .chipset = MACHINE_CHIPSET_ALI_M1217, - .init = machine_at_mr1217_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, - .gpio_acpi_handler = NULL, - .cpu = { - .package = CPU_PKG_386SX, - .block = CPU_BLOCK_NONE, - .min_bus = 0, - .max_bus = 0, - .min_voltage = 0, - .max_voltage = 0, - .min_multi = 0, - .max_multi = 0 - }, - .bus_flags = MACHINE_AT, - .flags = MACHINE_FLAGS_NONE, - .ram = { - .min = 1024, - .max = 16384, - .step = 1024 - }, - .nvrmask = 127, - .jumpered_ecp_dma = 0, - .default_jumpered_ecp_dma = -1, - .kbc_device = &kbc_at_device, - .kbc_params = KBC_VEN_AMI | 0x00003800, - .kbc_p1 = 0x000004f0, - .gpio = 0xffffffff, - .gpio_acpi = 0xffffffff, - .device = NULL, + .device = &c325ax_device, .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, @@ -6187,7 +6143,7 @@ const machine_t machines[] = { /* 386DX machines */ /* Uses Compaq KBC firmware. */ { - .name = "[ISA] Compaq Deskpro 386 (September 1986)", + .name = "[ISA] Compaq Deskpro 386", .internal_name = "deskpro386", .type = MACHINE_TYPE_386DX, .chipset = MACHINE_CHIPSET_DISCRETE, @@ -6221,51 +6177,7 @@ const machine_t machines[] = { .kbc_p1 = 0x000000f4, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, - .device = NULL, - .kbd_device = NULL, - .fdc_device = NULL, - .sio_device = NULL, - .vid_device = NULL, - .snd_device = NULL, - .net_device = NULL - }, - /* Uses Compaq KBC firmware. */ - { - .name = "[ISA] Compaq Deskpro 386 (May 1988)", - .internal_name = "deskpro386_05_1988", - .type = MACHINE_TYPE_386DX, - .chipset = MACHINE_CHIPSET_DISCRETE, - .init = machine_at_deskpro386_05_1988_init, - .p1_handler = machine_compaq_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, - .gpio_acpi_handler = NULL, - .cpu = { - .package = CPU_PKG_386DX_DESKPRO386, - .block = CPU_BLOCK(CPU_486DLC, CPU_RAPIDCAD), - .min_bus = 16000000, - .max_bus = 25000000, - .min_voltage = 0, - .max_voltage = 0, - .min_multi = 0, - .max_multi = 0 - }, - .bus_flags = MACHINE_AT, - .flags = MACHINE_FLAGS_NONE, - .ram = { - .min = 1024, - .max = 16384, - .step = 1024 - }, - .nvrmask = 63, - .jumpered_ecp_dma = 0, - .default_jumpered_ecp_dma = -1, - .kbc_device = &kbc_at_device, - .kbc_params = KBC_VEN_COMPAQ, - .kbc_p1 = 0x000000f4, - .gpio = 0xffffffff, - .gpio_acpi = 0xffffffff, - .device = NULL, + .device = &deskpro386_device, .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, @@ -7063,52 +6975,7 @@ const machine_t machines[] = { .kbc_p1 = 0x000004f0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, - .device = NULL, - .kbd_device = NULL, - .fdc_device = NULL, - .sio_device = NULL, - .vid_device = NULL, - .snd_device = NULL, - .net_device = NULL - }, - /* Has AMIKey 'F' or MR BIOS 'M' KBC firmware - (it's just the MR BIOS for the above machine). */ - { - .name = "[OPTi 495SX] DataExpert SX495 (MR BIOS)", - .internal_name = "mr495", - .type = MACHINE_TYPE_386DX_486, - .chipset = MACHINE_CHIPSET_OPTI_495SX, - .init = machine_at_opti495_mr_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, - .gpio_acpi_handler = NULL, - .cpu = { - .package = CPU_PKG_386DX | CPU_PKG_SOCKET1, - .block = CPU_BLOCK_NONE, - .min_bus = 0, - .max_bus = 0, - .min_voltage = 0, - .max_voltage = 0, - .min_multi = 0, - .max_multi = 0 - }, - .bus_flags = MACHINE_VLB, - .flags = MACHINE_APM, - .ram = { - .min = 1024, - .max = 32768, - .step = 1024 - }, - .nvrmask = 127, - .jumpered_ecp_dma = 0, - .default_jumpered_ecp_dma = -1, - .kbc_device = &kbc_at_device, - .kbc_params = KBC_VEN_AMI | 0x00004d00, - .kbc_p1 = 0x000004f0, - .gpio = 0xffffffff, - .gpio_acpi = 0xffffffff, - .device = NULL, + .device = &opti495_ami_device, .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, @@ -7742,6 +7609,50 @@ const machine_t machines[] = { .net_device = NULL }, /* Has a VLSI VL82C113A SCAMP Combination I/O which holds the KBC. */ + { + .name = "[VLSI 82C486] Olivetti PCS 44/C", + .internal_name = "pcs44c", + .type = MACHINE_TYPE_486, + .chipset = MACHINE_CHIPSET_VLSI_VL82C486, + .init = machine_at_pcs44c_init, + .p1_handler = machine_generic_p1_handler, + .gpio_handler = NULL, + .available_flag = MACHINE_AVAILABLE, + .gpio_acpi_handler = NULL, + .cpu = { + .package = CPU_PKG_SOCKET1, + .block = CPU_BLOCK_NONE, + .min_bus = 0, + .max_bus = 0, + .min_voltage = 0, + .max_voltage = 0, + .min_multi = 0, + .max_multi = 0 + }, + .bus_flags = MACHINE_PS2, + .flags = MACHINE_IDE | MACHINE_VIDEO | MACHINE_APM, + .ram = { + .min = 1024, + .max = 20480, + .step = 1024 + }, + .nvrmask = 127, + .jumpered_ecp_dma = 0, + .default_jumpered_ecp_dma = -1, + .kbc_device = NULL, + .kbc_params = 0x00000000, + .kbc_p1 = 0x00000cf0, + .gpio = 0xffffffff, + .gpio_acpi = 0xffffffff, + .device = NULL, + .kbd_device = NULL, + .fdc_device = NULL, + .sio_device = NULL, + .vid_device = &oti077_pcs44c_device, + .snd_device = NULL, + .net_device = NULL + }, + /* Has a VLSI VL82C113A SCAMP Combination I/O which holds the KBC. */ { .name = "[VLSI 82C486] Tulip 486 DC/DT", .internal_name = "tuliptc38", @@ -8710,95 +8621,7 @@ const machine_t machines[] = { .kbc_p1 = 0x000004f0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, - .device = NULL, - .kbd_device = NULL, - .fdc_device = NULL, - .sio_device = NULL, - .vid_device = NULL, - .snd_device = NULL, - .net_device = NULL - }, - /* This is Version 2.0 - it has a VIA VT82C42N KBC. */ - { - .name = "[OPTi 895] Jetway J-403TG Rev D", - .internal_name = "403tg_d", - .type = MACHINE_TYPE_486_S3, - .chipset = MACHINE_CHIPSET_OPTI_895_802G, - .init = machine_at_403tg_d_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, - .gpio_acpi_handler = NULL, - .cpu = { - .package = CPU_PKG_SOCKET3, - .block = CPU_BLOCK_NONE, - .min_bus = 0, - .max_bus = 0, - .min_voltage = 0, - .max_voltage = 0, - .min_multi = 0, - .max_multi = 0 - }, - .bus_flags = MACHINE_VLB, - .flags = MACHINE_APM, - .ram = { - .min = 1024, - .max = 65536, - .step = 1024 - }, - .nvrmask = 127, - .jumpered_ecp_dma = 0, - .default_jumpered_ecp_dma = -1, - .kbc_device = &kbc_at_device, - .kbc_params = KBC_VEN_VIA | 0x00424600, - .kbc_p1 = 0x000004f0, - .gpio = 0xffffffff, - .gpio_acpi = 0xffffffff, - .device = NULL, - .kbd_device = NULL, - .fdc_device = NULL, - .sio_device = NULL, - .vid_device = NULL, - .snd_device = NULL, - .net_device = NULL - }, - /* Has JetKey 5 KBC Firmware which looks like it is a clone of AMIKey type F. */ - { - .name = "[OPTi 895] Jetway J-403TG Rev D (MR BIOS)", - .internal_name = "403tg_d_mr", - .type = MACHINE_TYPE_486_S3, - .chipset = MACHINE_CHIPSET_OPTI_895_802G, - .init = machine_at_403tg_d_mr_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, - .gpio_acpi_handler = NULL, - .cpu = { - .package = CPU_PKG_SOCKET3, - .block = CPU_BLOCK_NONE, - .min_bus = 0, - .max_bus = 0, - .min_voltage = 0, - .max_voltage = 0, - .min_multi = 0, - .max_multi = 0 - }, - .bus_flags = MACHINE_VLB, - .flags = MACHINE_APM, - .ram = { - .min = 1024, - .max = 65536, - .step = 1024 - }, - .nvrmask = 127, - .jumpered_ecp_dma = 0, - .default_jumpered_ecp_dma = -1, - .kbc_device = &kbc_at_device, - .kbc_params = KBC_VEN_VIA | 0x00424600, - .kbc_p1 = 0x000004f0, - .gpio = 0xffffffff, - .gpio_acpi = 0xffffffff, - .device = NULL, + .device = &j403tg_device, .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, @@ -9548,7 +9371,7 @@ const machine_t machines[] = { .max_multi = 0 }, .bus_flags = MACHINE_PCI, - .flags = MACHINE_IDE_DUAL | MACHINE_APM, + .flags = MACHINE_PS2_KBC | MACHINE_IDE_DUAL | MACHINE_APM, .ram = { .min = 1024, .max = 65536, @@ -9571,50 +9394,6 @@ const machine_t machines[] = { .net_device = NULL }, /* Has IBM PS/2 Type 1 KBC firmware. */ - { - .name = "[OPTi 802G] IBM Aptiva 510/710/Vision", - .internal_name = "aptiva510", - .type = MACHINE_TYPE_486_S3_PCI, - .chipset = MACHINE_CHIPSET_OPTI_895_802G, - .init = machine_at_aptiva510_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, - .gpio_acpi_handler = NULL, - .cpu = { - .package = CPU_PKG_SOCKET3_PC330, - .block = CPU_BLOCK_NONE, - .min_bus = 25000000, - .max_bus = 33333333, - .min_voltage = 0, - .max_voltage = 0, - .min_multi = 2.0, - .max_multi = 3.0 - }, - .bus_flags = MACHINE_PS2_PCI, - .flags = MACHINE_IDE | MACHINE_VIDEO | MACHINE_APM, - .ram = { - .min = 1024, - .max = 65536, - .step = 1024 - }, - .nvrmask = 255, - .jumpered_ecp_dma = 0, - .default_jumpered_ecp_dma = -1, - .kbc_device = &kbc_at_device, - .kbc_params = 0x00000000, - .kbc_p1 = 0x00000cf0, - .gpio = 0xffffffff, - .gpio_acpi = 0xffffffff, - .device = NULL, - .kbd_device = NULL, - .fdc_device = NULL, - .sio_device = NULL, - .vid_device = &gd5430_onboard_vlb_device, - .snd_device = NULL, - .net_device = NULL - }, - /* Has IBM PS/2 Type 1 KBC firmware. */ { .name = "[OPTi 802G] IBM PC 330 (type 6573)", .internal_name = "pc330_6573", @@ -9650,7 +9429,7 @@ const machine_t machines[] = { .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, - .device = NULL, + .device = &pc330_6573_device, .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, @@ -10046,7 +9825,7 @@ const machine_t machines[] = { .default_jumpered_ecp_dma = -1, .kbc_device = &kbc_at_device, .kbc_params = KBC_VEN_PHOENIX | 0x00012900, /* Guess. */ - .kbc_p1 = 0x00000cf0, + .kbc_p1 = 0x00000ce0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, .device = NULL, @@ -11354,52 +11133,6 @@ const machine_t machines[] = { .snd_device = NULL, .net_device = NULL }, - /* This has the Phoenix MultiKey KBC firmware. - This is basically an Intel Batman (*NOT* Batman's Revenge) with a fancier - POST screen */ - { - .name = "[i430LX] AMBRA DP60 PCI", - .internal_name = "ambradp60", - .type = MACHINE_TYPE_SOCKET4, - .chipset = MACHINE_CHIPSET_INTEL_430LX, - .init = machine_at_ambradp60_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, - .gpio_acpi_handler = NULL, - .cpu = { - .package = CPU_PKG_SOCKET4, - .block = CPU_BLOCK_NONE, - .min_bus = 60000000, - .max_bus = 66666667, - .min_voltage = 5000, - .max_voltage = 5000, - .min_multi = MACHINE_MULTIPLIER_FIXED, - .max_multi = MACHINE_MULTIPLIER_FIXED - }, - .bus_flags = MACHINE_PS2_PCI, - .flags = MACHINE_IDE | MACHINE_APM, - .ram = { - .min = 2048, - .max = 131072, - .step = 2048 - }, - .nvrmask = 127, - .jumpered_ecp_dma = 0, - .default_jumpered_ecp_dma = -1, - .kbc_device = &kbc_at_device, - .kbc_params = KBC_VEN_PHOENIX | 0x00012900, - .kbc_p1 = 0x00000cf0, - .gpio = 0xffffffff, - .gpio_acpi = 0xffffffff, - .device = NULL, - .kbd_device = NULL, - .fdc_device = NULL, - .sio_device = NULL, - .vid_device = NULL, - .snd_device = NULL, - .net_device = NULL - }, /* Has AMIKey H KBC firmware (AMIKey-2), per POST screen with BIOS string shown in the manual. Has PS/2 mouse support with serial-style (DB9) connector. @@ -11493,50 +11226,6 @@ const machine_t machines[] = { .net_device = NULL }, /* Has IBM PS/2 Type 1 KBC firmware. */ - { - .name = "[i430LX] Dell Dimension XPS P60", - .internal_name = "dellxp60", - .type = MACHINE_TYPE_SOCKET4, - .chipset = MACHINE_CHIPSET_INTEL_430LX, - .init = machine_at_dellxp60_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, - .gpio_acpi_handler = NULL, - .cpu = { - .package = CPU_PKG_SOCKET4, - .block = CPU_BLOCK_NONE, - .min_bus = 60000000, - .max_bus = 66666667, - .min_voltage = 5000, - .max_voltage = 5000, - .min_multi = MACHINE_MULTIPLIER_FIXED, - .max_multi = MACHINE_MULTIPLIER_FIXED - }, - .bus_flags = MACHINE_PS2_PCI, - .flags = MACHINE_IDE | MACHINE_APM, - .ram = { - .min = 2048, - .max = 131072, - .step = 2048 - }, - .nvrmask = 127, - .jumpered_ecp_dma = MACHINE_DMA_DISABLED | MACHINE_DMA_1 | MACHINE_DMA_3, - .default_jumpered_ecp_dma = 3, - .kbc_device = &kbc_at_device, - .kbc_params = KBC_VEN_PHOENIX | 0x00012900, - .kbc_p1 = 0x00001010, - .gpio = 0xffffffff, - .gpio_acpi = 0xffffffff, - .device = NULL, - .kbd_device = NULL, - .fdc_device = NULL, - .sio_device = NULL, - .vid_device = NULL, - .snd_device = NULL, - .net_device = NULL - }, - /* Has IBM PS/2 Type 1 KBC firmware. */ { .name = "[i430LX] Dell OptiPlex 560/L", .internal_name = "opti560l", @@ -11669,6 +11358,50 @@ const machine_t machines[] = { .net_device = NULL }, /* This has the Phoenix MultiKey KBC firmware. */ + { + .name = "[i430LX] Intel Premiere/PCI (Batman)", + .internal_name = "batman", + .type = MACHINE_TYPE_SOCKET4, + .chipset = MACHINE_CHIPSET_INTEL_430LX, + .init = machine_at_batman_init, + .p1_handler = machine_generic_p1_handler, + .gpio_handler = NULL, + .available_flag = MACHINE_AVAILABLE, + .gpio_acpi_handler = NULL, + .cpu = { + .package = CPU_PKG_SOCKET4, + .block = CPU_BLOCK_NONE, + .min_bus = 60000000, + .max_bus = 66666667, + .min_voltage = 5000, + .max_voltage = 5000, + .min_multi = MACHINE_MULTIPLIER_FIXED, + .max_multi = MACHINE_MULTIPLIER_FIXED + }, + .bus_flags = MACHINE_PS2_PCI, + .flags = MACHINE_IDE | MACHINE_APM, + .ram = { + .min = 2048, + .max = 131072, + .step = 2048 + }, + .nvrmask = 127, + .jumpered_ecp_dma = MACHINE_DMA_DISABLED | MACHINE_DMA_1 | MACHINE_DMA_3, + .default_jumpered_ecp_dma = 3, + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_PHOENIX | 0x00012900, + .kbc_p1 = 0x00001030, + .gpio = 0xffffffff, + .gpio_acpi = 0xffffffff, + .device = &batman_device, + .kbd_device = NULL, + .fdc_device = NULL, + .sio_device = NULL, + .vid_device = NULL, + .snd_device = NULL, + .net_device = NULL + }, + /* This has the Phoenix MultiKey KBC firmware. */ { .name = "[i430LX] Intel Premiere/PCI (Batman's Revenge)", .internal_name = "revenge", @@ -12122,51 +11855,6 @@ const machine_t machines[] = { /* Socket 5 machines */ /* 430NX */ - /* This has the Phoenix MultiKey KBC firmware. - This is basically an Intel Premiere/PCI II with a fancier POST screen. */ - { - .name = "[i430NX] AMBRA DP90 PCI", - .internal_name = "ambradp90", - .type = MACHINE_TYPE_SOCKET5, - .chipset = MACHINE_CHIPSET_INTEL_430NX, - .init = machine_at_ambradp90_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, - .gpio_acpi_handler = NULL, - .cpu = { - .package = CPU_PKG_SOCKET5_7, - .block = CPU_BLOCK(CPU_K5, CPU_5K86, CPU_Cx6x86), - .min_bus = 50000000, - .max_bus = 66666667, - .min_voltage = 3380, - .max_voltage = 3520, - .min_multi = 1.5, - .max_multi = 1.5 - }, - .bus_flags = MACHINE_PS2_PCI, - .flags = MACHINE_IDE_DUAL | MACHINE_APM, - .ram = { - .min = 2048, - .max = 131072, - .step = 2048 - }, - .nvrmask = 127, - .jumpered_ecp_dma = MACHINE_DMA_3, - .default_jumpered_ecp_dma = 3, - .kbc_device = &kbc_at_device, - .kbc_params = KBC_VEN_PHOENIX | 0x00012900, - .kbc_p1 = 0x00000cf0, - .gpio = 0xffffffff, - .gpio_acpi = 0xffffffff, - .device = NULL, - .kbd_device = NULL, - .fdc_device = NULL, - .sio_device = NULL, - .vid_device = NULL, - .snd_device = NULL, - .net_device = NULL - }, /* Has AMI 'H' KBC firmware. */ { .name = "[i430NX] ASUS PCI/I-P54NP4", @@ -12211,50 +11899,6 @@ const machine_t machines[] = { .snd_device = NULL, .net_device = NULL }, - /* Same as Intel Premiere PCI/II, but with a Dell OEM BIOS */ - { - .name = "[i430NX] Dell Dimension XPS Pxxx", - .internal_name = "dellplato", - .type = MACHINE_TYPE_SOCKET5, - .chipset = MACHINE_CHIPSET_INTEL_430NX, - .init = machine_at_dellplato_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, - .gpio_acpi_handler = NULL, - .cpu = { - .package = CPU_PKG_SOCKET5_7, - .block = CPU_BLOCK(CPU_K5, CPU_5K86, CPU_Cx6x86), - .min_bus = 50000000, - .max_bus = 66666667, - .min_voltage = 3520, - .max_voltage = 3520, - .min_multi = 1.5, - .max_multi = 1.5 - }, - .bus_flags = MACHINE_PS2_PCI, - .flags = MACHINE_IDE_DUAL | MACHINE_APM, - .ram = { - .min = 2048, - .max = 131072, - .step = 2048 - }, - .nvrmask = 127, - .jumpered_ecp_dma = MACHINE_DMA_3, - .default_jumpered_ecp_dma = 3, - .kbc_device = &kbc_at_device, - .kbc_params = KBC_VEN_PHOENIX | 0x00012900, - .kbc_p1 = 0x00001010, - .gpio = 0xffffffff, - .gpio_acpi = 0xffffffff, - .device = NULL, - .kbd_device = NULL, - .fdc_device = NULL, - .sio_device = NULL, - .vid_device = NULL, - .snd_device = NULL, - .net_device = NULL - }, /* Has AMI 'H' KBC firmware. */ { .name = "[i430NX] Gigabyte GA-586IP", @@ -12332,10 +11976,10 @@ const machine_t machines[] = { .default_jumpered_ecp_dma = 3, .kbc_device = &kbc_at_device, .kbc_params = KBC_VEN_PHOENIX | 0x00012900, - .kbc_p1 = 0x00000cf0, + .kbc_p1 = 0x00001030, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, - .device = NULL, + .device = &plato_device, .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, @@ -12409,7 +12053,7 @@ const machine_t machines[] = { .max_multi = 1.5 }, .bus_flags = MACHINE_PCI, - .flags = MACHINE_IDE | MACHINE_APM, + .flags = MACHINE_PS2_KBC | MACHINE_IDE | MACHINE_APM, .ram = { .min = 2048, .max = 262144, @@ -13187,51 +12831,7 @@ const machine_t machines[] = { .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, - .device = NULL, - .kbd_device = NULL, - .fdc_device = NULL, - .sio_device = NULL, - .vid_device = NULL, - .snd_device = NULL, - .net_device = NULL - }, - /* This has an AMIKey-2, which is an updated version of type 'H'. */ - { - .name = "[i430FX] ASUS P/I-P55TP4XE (MR BIOS)", - .internal_name = "p54tp4xe_mr", - .type = MACHINE_TYPE_SOCKET7_3V, - .chipset = MACHINE_CHIPSET_INTEL_430FX, - .init = machine_at_p54tp4xe_mr_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, - .gpio_acpi_handler = NULL, - .cpu = { - .package = CPU_PKG_SOCKET5_7, - .block = CPU_BLOCK_NONE, - .min_bus = 50000000, - .max_bus = 66666667, - .min_voltage = 3380, - .max_voltage = 3600, - .min_multi = 1.5, - .max_multi = 3.0 - }, - .bus_flags = MACHINE_PS2_PCI, - .flags = MACHINE_IDE_DUAL | MACHINE_APM, - .ram = { - .min = 8192, - .max = 131072, - .step = 8192 - }, - .nvrmask = 127, - .jumpered_ecp_dma = 0, - .default_jumpered_ecp_dma = -1, - .kbc_device = &kbc_at_device, - .kbc_params = KBC_VEN_AMI | 0x00004800, - .kbc_p1 = 0x00000cf0, - .gpio = 0xffffffff, - .gpio_acpi = 0xffffffff, - .device = NULL, + .device = &p54tp4xe_device, .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, @@ -13283,52 +12883,6 @@ const machine_t machines[] = { .snd_device = NULL, .net_device = NULL }, - /* According to tests from real hardware: This has AMI MegaKey KBC firmware on the - PC87306 Super I/O chip, command 0xA1 returns '5'. - Command 0xA0 copyright string: (C)1994 AMI . */ - { - .name = "[i430FX] Gateway 2000 Thor", - .internal_name = "gw2katx", - .type = MACHINE_TYPE_SOCKET7_3V, - .chipset = MACHINE_CHIPSET_INTEL_430FX, - .init = machine_at_gw2katx_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, - .gpio_acpi_handler = NULL, - .cpu = { - .package = CPU_PKG_SOCKET5_7, - .block = CPU_BLOCK(CPU_K5, CPU_5K86, CPU_Cx6x86), - .min_bus = 50000000, - .max_bus = 66666667, - .min_voltage = 3380, - .max_voltage = 3520, - .min_multi = 1.5, - .max_multi = 3.0 - }, - .bus_flags = MACHINE_PS2_PCI, - .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_GAMEPORT, /* Machine has optional onboard sound: Crystal CS4232-KQ */ - .ram = { - .min = 8192, - .max = 131072, - .step = 8192 - }, - .nvrmask = 255, - .jumpered_ecp_dma = MACHINE_DMA_DISABLED | MACHINE_DMA_1 | MACHINE_DMA_3, - .default_jumpered_ecp_dma = 3, - .kbc_device = NULL, - .kbc_params = 0x00000000, - .kbc_p1 = 0x000044f0, - .gpio = 0xffffffff, - .gpio_acpi = 0xffffffff, - .device = NULL, - .kbd_device = NULL, - .fdc_device = NULL, - .sio_device = NULL, - .vid_device = NULL, - .snd_device = NULL, - .net_device = NULL - }, /* Has a SM(S)C FDC37C932 Super I/O chip with on-chip KBC with AMI MegaKey (revision '5') KBC firmware. */ { @@ -13412,7 +12966,7 @@ const machine_t machines[] = { .kbc_p1 = 0x000044f0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, - .device = NULL, + .device = &thor_device, .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, @@ -13420,52 +12974,6 @@ const machine_t machines[] = { .snd_device = NULL, .net_device = NULL }, - /* According to tests from real hardware: This has AMI MegaKey KBC firmware on the - PC87306 Super I/O chip, command 0xA1 returns '5'. - Command 0xA0 copyright string: (C)1994 AMI . */ - { - .name = "[i430FX] Intel Advanced/ATX (Thor) (MR BIOS)", - .internal_name = "mrthor", - .type = MACHINE_TYPE_SOCKET7_3V, - .chipset = MACHINE_CHIPSET_INTEL_430FX, - .init = machine_at_mrthor_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, - .gpio_acpi_handler = NULL, - .cpu = { - .package = CPU_PKG_SOCKET5_7, - .block = CPU_BLOCK_NONE, - .min_bus = 50000000, - .max_bus = 66666667, - .min_voltage = 3380, - .max_voltage = 3520, - .min_multi = 1.5, - .max_multi = 3.0 - }, - .bus_flags = MACHINE_PS2_PCI, - .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_GAMEPORT, /* Machine has optional onboard video: S3 Trio64V+ and optional onboard sound: Crystal CS4232-KQ */ - .ram = { - .min = 8192, - .max = 131072, - .step = 8192 - }, - .nvrmask = 255, - .jumpered_ecp_dma = MACHINE_DMA_DISABLED | MACHINE_DMA_1 | MACHINE_DMA_3, - .default_jumpered_ecp_dma = 3, - .kbc_device = NULL, - .kbc_params = 0x00000000, - .kbc_p1 = 0x000044f0, - .gpio = 0xffffffff, - .gpio_acpi = 0xffffffff, - .device = NULL, - .kbd_device = NULL, - .fdc_device = NULL, - .sio_device = NULL, - .vid_device = NULL, - .snd_device = NULL, - .net_device = NULL - }, /* According to tests from real hardware: This has AMI MegaKey KBC firmware on the PC87306 Super I/O chip, command 0xA1 returns '5'. Command 0xA0 copyright string: (C)1994 AMI . */ @@ -14313,7 +13821,7 @@ const machine_t machines[] = { .kbc_p1 = 0x000044f0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, - .device = NULL, + .device = &cu430hx_device, .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, @@ -14360,7 +13868,7 @@ const machine_t machines[] = { .kbc_p1 = 0x000044f0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, - .device = NULL, + .device = &tc430hx_device, .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, @@ -14550,96 +14058,6 @@ const machine_t machines[] = { .snd_device = NULL, .net_device = NULL }, - /* OEM-only Intel CU430HX, has AMI MegaKey KBC firmware on the PC87306 Super I/O chip. */ - { - .name = "[i430HX] Toshiba Equium 5200D", - .internal_name = "equium5200", - .type = MACHINE_TYPE_SOCKET7, - .chipset = MACHINE_CHIPSET_INTEL_430HX, - .init = machine_at_equium5200_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, - .gpio_acpi_handler = NULL, - .cpu = { - .package = CPU_PKG_SOCKET5_7, - .block = CPU_BLOCK(CPU_K5, CPU_5K86, CPU_K6, CPU_K6_2, CPU_K6_2C, CPU_K6_3, CPU_K6_2P, - CPU_K6_3P, CPU_Cx6x86, CPU_Cx6x86MX, CPU_Cx6x86L), - .min_bus = 50000000, - .max_bus = 66666667, - .min_voltage = 2800, - .max_voltage = 3520, - .min_multi = 1.5, - .max_multi = 3.5 - }, - .bus_flags = MACHINE_PS2_PCI | MACHINE_BUS_USB, - .flags = MACHINE_IDE_DUAL | MACHINE_SOUND | MACHINE_APM | MACHINE_USB, /* Machine has internal video: ATI Mach64GT 3D Rage and internal NIC: Intel 82557 */ - .ram = { - .min = 8192, - .max = 524288, - .step = 4096 - }, - .nvrmask = 255, - .jumpered_ecp_dma = MACHINE_DMA_3, - .default_jumpered_ecp_dma = 3, - .kbc_device = NULL, - .kbc_params = 0x00000000, - .kbc_p1 = 0x000044f0, - .gpio = 0xffffffff, - .gpio_acpi = 0xffffffff, - .device = NULL, - .kbd_device = NULL, - .fdc_device = NULL, - .sio_device = NULL, - .vid_device = NULL, - .snd_device = &sb_vibra16c_onboard_device, - .net_device = NULL - }, - /* OEM version of Intel TC430HX, has AMI MegaKey KBC firmware on the PC87306 Super I/O chip. */ - { - .name = "[i430HX] Toshiba Infinia 7201", - .internal_name = "infinia7200", - .type = MACHINE_TYPE_SOCKET7, - .chipset = MACHINE_CHIPSET_INTEL_430HX, - .init = machine_at_infinia7200_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, - .gpio_acpi_handler = NULL, - .cpu = { - .package = CPU_PKG_SOCKET5_7, - .block = CPU_BLOCK(CPU_K5, CPU_5K86, CPU_K6, CPU_K6_2, CPU_K6_2C, CPU_K6_3, CPU_K6_2P, - CPU_K6_3P, CPU_Cx6x86, CPU_Cx6x86MX, CPU_Cx6x86L), - .min_bus = 50000000, - .max_bus = 66666667, - .min_voltage = 2800, - .max_voltage = 3520, - .min_multi = 1.5, - .max_multi = 3.5 - }, - .bus_flags = MACHINE_PS2_PCI | MACHINE_BUS_USB, - .flags = MACHINE_VIDEO | MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_GAMEPORT | MACHINE_USB, /* Has internal sound: Yamaha YMF701-S */ - .ram = { - .min = 8192, - .max = 524288, - .step = 4096 - }, - .nvrmask = 255, - .jumpered_ecp_dma = MACHINE_DMA_3, - .default_jumpered_ecp_dma = 3, - .kbc_device = NULL, - .kbc_params = 0x00000000, - .kbc_p1 = 0x000044f0, - .gpio = 0xffffffff, - .gpio_acpi = 0xffffffff, - .device = NULL, - .kbd_device = NULL, - .fdc_device = NULL, - .sio_device = NULL, - .vid_device = &s3_virge_375_pci_device, - .snd_device = NULL, - .net_device = NULL - }, /* 430VX */ /* This has the VIA VT82C42N or Holtek HT6542B KBC. */ @@ -16359,7 +15777,7 @@ const machine_t machines[] = { .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, - .device = NULL, + .device = &m5ata_device, .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, @@ -17222,94 +16640,6 @@ const machine_t machines[] = { .snd_device = NULL, .net_device = NULL }, - /* It's an Intel VS440FX with a Dell OEM BIOS */ - { - .name = "[i440FX] Dell Dimension XPS Pro___n", - .internal_name = "dellvenus", - .type = MACHINE_TYPE_SOCKET8, - .chipset = MACHINE_CHIPSET_INTEL_440FX, - .init = machine_at_dellvenus_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, - .gpio_acpi_handler = NULL, - .cpu = { - .package = CPU_PKG_SOCKET8, - .block = CPU_BLOCK_NONE, - .min_bus = 60000000, - .max_bus = 66666667, - .min_voltage = 2100, - .max_voltage = 3500, - .min_multi = 2.0, - .max_multi = 3.5 - }, - .bus_flags = MACHINE_PS2_PCI | MACHINE_BUS_USB, - .flags = MACHINE_IDE_DUAL | MACHINE_SOUND | MACHINE_APM | MACHINE_GAMEPORT | MACHINE_USB, - .ram = { - .min = 8192, - .max = 524288, - .step = 8192 - }, - .nvrmask = 127, - .jumpered_ecp_dma = 0, - .default_jumpered_ecp_dma = -1, - .kbc_device = NULL, - .kbc_params = 0x00000000, - .kbc_p1 = 0x000044f0, - .gpio = 0xffffffff, - .gpio_acpi = 0xffffffff, - .device = NULL, - .kbd_device = NULL, - .fdc_device = NULL, - .sio_device = NULL, - .vid_device = NULL, - .snd_device = &cs4236_onboard_device, - .net_device = NULL - }, - /* It's an Intel VS440FX with a Gateway 2000 OEM BIOS */ - { - .name = "[i440FX] Gateway 2000 Venus", - .internal_name = "gw2kvenus", - .type = MACHINE_TYPE_SOCKET8, - .chipset = MACHINE_CHIPSET_INTEL_440FX, - .init = machine_at_gw2kvenus_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, - .gpio_acpi_handler = NULL, - .cpu = { - .package = CPU_PKG_SOCKET8, - .block = CPU_BLOCK_NONE, - .min_bus = 60000000, - .max_bus = 66666667, - .min_voltage = 2100, - .max_voltage = 3500, - .min_multi = 2.0, - .max_multi = 3.5 - }, - .bus_flags = MACHINE_PS2_PCI | MACHINE_BUS_USB, - .flags = MACHINE_IDE_DUAL | MACHINE_SOUND | MACHINE_APM | MACHINE_GAMEPORT | MACHINE_USB, - .ram = { - .min = 8192, - .max = 524288, - .step = 8192 - }, - .nvrmask = 127, - .jumpered_ecp_dma = 0, - .default_jumpered_ecp_dma = -1, - .kbc_device = NULL, - .kbc_params = 0x00000000, - .kbc_p1 = 0x000044f0, - .gpio = 0xffffffff, - .gpio_acpi = 0xffffffff, - .device = NULL, - .kbd_device = NULL, - .fdc_device = NULL, - .sio_device = NULL, - .vid_device = NULL, - .snd_device = &cs4236_onboard_device, - .net_device = NULL - }, /* Has the AMIKey-2 ('H') KBC firmware. */ { .name = "[i440FX] Gigabyte GA-686NX", @@ -17438,7 +16768,7 @@ const machine_t machines[] = { .kbc_p1 = 0x000044f0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, - .device = NULL, + .device = &vs440fx_device, .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, diff --git a/src/network/CMakeLists.txt b/src/network/CMakeLists.txt index 82d332e20..3f7ba427c 100644 --- a/src/network/CMakeLists.txt +++ b/src/network/CMakeLists.txt @@ -71,6 +71,9 @@ if(NETSWITCH) endif() if (UNIX) + if(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD") + set_source_files_properties(net_slirp.c PROPERTIES COMPILE_FLAGS "-I/usr/local/include") + endif() find_path(HAS_VDE "libvdeplug.h" PATHS ${VDE_INCLUDE_DIR} "/usr/include /usr/local/include" "/opt/homebrew/include" ) if(HAS_VDE) find_library(VDE_LIB vdeplug) diff --git a/src/network/net_plip.c b/src/network/net_plip.c index c45ad5527..5eacc5536 100644 --- a/src/network/net_plip.c +++ b/src/network/net_plip.c @@ -494,7 +494,6 @@ const lpt_device_t lpt_plip_device = { .close = plip_close, .write_data = plip_write_data, .write_ctrl = plip_write_ctrl, - .autofeed = NULL, .strobe = NULL, .read_status = plip_read_status, .read_ctrl = NULL, diff --git a/src/network/net_rtl8139.c b/src/network/net_rtl8139.c index 0d07a8f83..f1e531deb 100644 --- a/src/network/net_rtl8139.c +++ b/src/network/net_rtl8139.c @@ -3294,8 +3294,8 @@ nic_init(const device_t *info) params.nwords = 64; params.default_content = (uint16_t *) s->eeprom_data; params.filename = filename; - snprintf(filename, sizeof(filename), "nmc93cxx_eeprom_%s_%d.nvr", info->internal_name, device_get_instance()); - s->eeprom = device_add_params(&nmc93cxx_device, ¶ms); + snprintf(filename, sizeof(filename), "nmc93cxx_eeprom_%s_%d.nvr", info->internal_name, s->inst); + s->eeprom = device_add_inst_params(&nmc93cxx_device, s->inst, ¶ms); if (s->eeprom == NULL) { free(s); return NULL; diff --git a/src/network/net_tulip.c b/src/network/net_tulip.c index 685873c93..883ba53ad 100644 --- a/src/network/net_tulip.c +++ b/src/network/net_tulip.c @@ -1643,8 +1643,9 @@ nic_init(const device_t *info) params.nwords = 64; params.default_content = (uint16_t *) s->eeprom_data; params.filename = filename; - snprintf(filename, sizeof(filename), "nmc93cxx_eeprom_%s_%d.nvr", info->internal_name, device_get_instance()); - s->eeprom = device_add_params(&nmc93cxx_device, ¶ms); + int inst = device_get_instance(); + snprintf(filename, sizeof(filename), "nmc93cxx_eeprom_%s_%d.nvr", info->internal_name, inst); + s->eeprom = device_add_inst_params(&nmc93cxx_device, inst, ¶ms); if (s->eeprom == NULL) { free(s); return NULL; diff --git a/src/nvr_at.c b/src/nvr_at.c index 4deda98be..6853867ec 100644 --- a/src/nvr_at.c +++ b/src/nvr_at.c @@ -1212,6 +1212,10 @@ nvr_at_init(const device_t *info) nvr_at_inited = 1; } + /* This is a hack but it is required for the machine to boot properly, no idea why. */ + if (nvr->is_new && !strcmp(machine_get_internal_name(), "spitfire")) + nvr->regs[0x33] = nvr->regs[0x34] = 0xff; + return nvr; } diff --git a/src/printer/CMakeLists.txt b/src/printer/CMakeLists.txt index 071bf7113..0efb2aec2 100644 --- a/src/printer/CMakeLists.txt +++ b/src/printer/CMakeLists.txt @@ -37,6 +37,10 @@ endif() find_package(PkgConfig REQUIRED) pkg_check_modules(FREETYPE REQUIRED IMPORTED_TARGET freetype2) target_link_libraries(86Box PkgConfig::FREETYPE) +if(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD") + target_include_directories(print PRIVATE /usr/local/include) + target_include_directories(print PRIVATE /usr/local/include/freetype2) +endif() if(STATIC_BUILD) # if(QT) # Qt provides its own version of harfbuzz which leads to duplicated symbols. diff --git a/src/printer/prt_escp.c b/src/printer/prt_escp.c index e4f9c81ee..6af374fba 100644 --- a/src/printer/prt_escp.c +++ b/src/printer/prt_escp.c @@ -4,7 +4,7 @@ * using the ISA,EISA,VLB,MCA and PCI system buses, roughly * spanning the era between 1981 and 1995. * - * Implementation of the Generic ESC/P Dot-Matrix printer. + * Implementation of the Generic ESC/P 2 Dot-Matrix printer. * * * @@ -283,10 +283,9 @@ static const uint16_t codepages[15] = { /* "patches" to the codepage for the international charsets * these bytes patch the following 12 positions of the char table, in order: * 0x23 0x24 0x40 0x5b 0x5c 0x5d 0x5e 0x60 0x7b 0x7c 0x7d 0x7e - * TODO: Implement the missing international charsets */ static const uint16_t intCharSets[15][12] = { - {0x0023, 0x0024, 0x0040, 0x005b, 0x005c, 0x005d, /* 0 USA */ + { 0x0023, 0x0024, 0x0040, 0x005b, 0x005c, 0x005d, /* 0 USA */ 0x005e, 0x0060, 0x007b, 0x007c, 0x007d, 0x007e}, { 0x0023, 0x0024, 0x00e0, 0x00ba, 0x00e7, 0x00a7, /* 1 France */ @@ -298,7 +297,7 @@ static const uint16_t intCharSets[15][12] = { { 0x00a3, 0x0024, 0x0040, 0x005b, 0x005c, 0x005d, /* 3 UK */ 0x005e, 0x0060, 0x007b, 0x007c, 0x007d, 0x007e}, - { 0x0023, 0x0024, 0x0040, 0x00c6, 0x00d8, 0x00c5, /* 4 Denmark (1) */ + { 0x0023, 0x0024, 0x0040, 0x00c6, 0x00d8, 0x00c5, /* 4 Denmark I */ 0x005e, 0x0060, 0x00e6, 0x00f8, 0x00e5, 0x007e}, { 0x0023, 0x00a4, 0x00c9, 0x00c4, 0x00d6, 0x00c5, /* 5 Sweden */ @@ -307,28 +306,28 @@ static const uint16_t intCharSets[15][12] = { { 0x0023, 0x0024, 0x0040, 0x00ba, 0x005c, 0x00e9, /* 6 Italy */ 0x005e, 0x00f9, 0x00e0, 0x00f2, 0x00e8, 0x00ec}, - { 0x0023, 0x0024, 0x0040, 0x005b, 0x005c, 0x005d, /* 7 Spain 1 */ - 0x005e, 0x0060, 0x007b, 0x007c, 0x007d, 0x007e}, /* TODO */ + { 0x20a7, 0x0024, 0x0040, 0x00a1, 0x00d1, 0x00bf, /* 7 Spain I */ + 0x005e, 0x0060, 0x00a8, 0x00f1, 0x007d, 0x007e}, - { 0x0023, 0x0024, 0x0040, 0x005b, 0x005c, 0x005d, /* 8 Japan (English) */ - 0x005e, 0x0060, 0x007b, 0x007c, 0x007d, 0x007e}, /* TODO */ + { 0x0023, 0x0024, 0x0040, 0x005b, 0x00a5, 0x005d, /* 8 Japan (Eng) */ + 0x005e, 0x0060, 0x007b, 0x007c, 0x007d, 0x007e}, - { 0x0023, 0x0024, 0x0040, 0x005b, 0x005c, 0x005d, /* 9 Norway */ - 0x005e, 0x0060, 0x007b, 0x007c, 0x007d, 0x007e}, /* TODO */ + { 0x0023, 0x00a4, 0x00c9, 0x00c6, 0x00d8, 0x00c5, /* 9 Norway */ + 0x00dc, 0x00e9, 0x00e6, 0x00f8, 0x00e5, 0x00fc}, - { 0x0023, 0x0024, 0x0040, 0x005b, 0x005c, 0x005d, /* 10 Denmark (2) */ - 0x005e, 0x0060, 0x007b, 0x007c, 0x007d, 0x007e}, /* TODO */ + { 0x0023, 0x0024, 0x00c9, 0x00c6, 0x00d8, 0x00c5, /* 10 Denmark II */ + 0x00dc, 0x00e9, 0x00e6, 0x00f8, 0x00e5, 0x00fc}, - { 0x0023, 0x0024, 0x0040, 0x005b, 0x005c, 0x005d, /* 11 Spain (2) */ - 0x005e, 0x0060, 0x007b, 0x007c, 0x007d, 0x007e}, /* TODO */ + { 0x0023, 0x0024, 0x00e1, 0x00a1, 0x00d1, 0x00bf, /* 11 Spain II */ + 0x00e9, 0x0060, 0x00ed, 0x00f1, 0x00f3, 0x00fa}, - { 0x0023, 0x0024, 0x0040, 0x005b, 0x005c, 0x005d, /* 12 Latin America */ - 0x005e, 0x0060, 0x007b, 0x007c, 0x007d, 0x007e}, /* TODO */ + { 0x0023, 0x0024, 0x00e1, 0x00a1, 0x00d1, 0x00bf, /* 12 Lat America */ + 0x00e9, 0x00fc, 0x00ed, 0x00f1, 0x00f3, 0x00fa}, - { 0x0023, 0x0024, 0x0040, 0x005b, 0x005c, 0x005d, /* 13 Korea */ - 0x005e, 0x0060, 0x007b, 0x007c, 0x007d, 0x007e}, /* TODO */ + { 0x0023, 0x0024, 0x0040, 0x005b, 0x20a9, 0x005d, /* 13 Korea */ + 0x005e, 0x0060, 0x007b, 0x007c, 0x007d, 0x007e}, - { 0x0023, 0x0024, 0x00a7, 0x00c4, 0x0027, 0x0022, /* 14 Legal */ + { 0x0023, 0x0024, 0x00a7, 0x00ba, 0x2019, 0x201d, /* 64 Legal */ 0x00b6, 0x0060, 0x00a9, 0x00ae, 0x2020, 0x2122} }; @@ -521,7 +520,7 @@ update_font(escp_t *dev) } else switch (dev->lq_typeface) { case TYPEFACE_ROMAN: - fn = FONT_FILE_ROMAN; + fn = (dev->font_style & STYLE_PROP) ? FONT_FILE_ROMAN : FONT_FILE_COURIER; break; case TYPEFACE_SANSSERIF: fn = FONT_FILE_SANSSERIF; @@ -891,7 +890,7 @@ process_char(escp_t *dev, uint8_t ch) break; case 0x21: /* master select (ESC !) */ - dev->cpi = dev->esc_parms[0] & 0x01 ? 12.0 : 10.0; + dev->cpi = (dev->esc_parms[0]) & 0x01 ? 12.0 : 10.0; /* Reset first seven bits. */ dev->font_style &= 0xFF80; @@ -1046,7 +1045,7 @@ process_char(escp_t *dev, uint8_t ch) update_font(dev); break; - case 0x47: /* select dobule-strike printing (ESC G) */ + case 0x47: /* select double-strike printing (ESC G) */ dev->font_style |= STYLE_DOUBLESTRIKE; break; @@ -1099,8 +1098,8 @@ process_char(escp_t *dev, uint8_t ch) break; case 0x52: /* select an intl character set (ESC R) */ - if (dev->esc_parms[0] <= 13 || dev->esc_parms[0] == '@') { - if (dev->esc_parms[0] == '@') + if ((dev->esc_parms[0] <= 13) || (dev->esc_parms[0] == 64)) { + if (dev->esc_parms[0] == 64) dev->esc_parms[0] = 14; dev->curr_cpmap[0x23] = intCharSets[dev->esc_parms[0]][0]; @@ -1119,9 +1118,9 @@ process_char(escp_t *dev, uint8_t ch) break; case 0x53: /* select superscript/subscript printing (ESC S) */ - if (dev->esc_parms[0] == 0 || dev->esc_parms[0] == '0') + if ((dev->esc_parms[0] == 0) || (dev->esc_parms[0] == '0')) dev->font_style |= STYLE_SUBSCRIPT; - if (dev->esc_parms[0] == 1 || dev->esc_parms[1] == '1') + if ((dev->esc_parms[0] == 1) || (dev->esc_parms[1] == '1')) dev->font_style |= STYLE_SUPERSCRIPT; update_font(dev); break; @@ -1138,9 +1137,9 @@ process_char(escp_t *dev, uint8_t ch) case 0x57: /* turn double-width printing on/off (ESC W) */ if (!dev->multipoint_mode) { dev->hmi = -1; - if (dev->esc_parms[0] == 0 || dev->esc_parms[0] == '0') + if ((dev->esc_parms[0] == 0) || (dev->esc_parms[0] == '0')) dev->font_style &= ~STYLE_DOUBLEWIDTH; - if (dev->esc_parms[0] == 1 || dev->esc_parms[0] == '1') + if ((dev->esc_parms[0] == 1) || (dev->esc_parms[0] == '1')) dev->font_style |= STYLE_DOUBLEWIDTH; update_font(dev); } @@ -1217,9 +1216,9 @@ process_char(escp_t *dev, uint8_t ch) break; case 0x6b: /* select typeface (ESC k) */ - if (dev->esc_parms[0] <= 11 || dev->esc_parms[0] == 30 || dev->esc_parms[0] == 31) { + if ((dev->esc_parms[0] <= 11) || (dev->esc_parms[0] == 30) || + (dev->esc_parms[0] == 31)) dev->lq_typeface = dev->esc_parms[0]; - } update_font(dev); break; @@ -1230,9 +1229,9 @@ process_char(escp_t *dev, uint8_t ch) break; case 0x70: /* Turn proportional mode on/off (ESC p) */ - if (dev->esc_parms[0] == 0 || dev->esc_parms[0] == '0') + if ((dev->esc_parms[0] == 0) || (dev->esc_parms[0] == '0')) dev->font_style &= ~STYLE_PROP; - if (dev->esc_parms[0] == 1 || dev->esc_parms[0] == '1') { + if ((dev->esc_parms[0] == 1) || (dev->esc_parms[0] == '1')) { dev->font_style |= STYLE_PROP; dev->print_quality = QUALITY_LQ; } @@ -1265,20 +1264,20 @@ process_char(escp_t *dev, uint8_t ch) case 0x77: /* turn double-height printing on/off (ESC w) */ if (!dev->multipoint_mode) { - if (dev->esc_parms[0] == 0 || dev->esc_parms[0] == '0') + if ((dev->esc_parms[0] == 0) || (dev->esc_parms[0] == '0')) dev->font_style &= ~STYLE_DOUBLEHEIGHT; - if (dev->esc_parms[0] == 1 || dev->esc_parms[0] == '1') + if ((dev->esc_parms[0] == 1) || (dev->esc_parms[0] == '1')) dev->font_style |= STYLE_DOUBLEHEIGHT; update_font(dev); } break; case 0x78: /* select LQ or draft (ESC x) */ - if (dev->esc_parms[0] == 0 || dev->esc_parms[0] == '0') { + if ((dev->esc_parms[0] == 0) || (dev->esc_parms[0] == '0')) { dev->print_quality = QUALITY_DRAFT; dev->font_style |= STYLE_CONDENSED; } - if (dev->esc_parms[0] == 1 || dev->esc_parms[0] == '1') { + if ((dev->esc_parms[0] == 1) || (dev->esc_parms[0] == '1')) { dev->print_quality = QUALITY_LQ; dev->font_style &= ~STYLE_CONDENSED; } @@ -1885,17 +1884,6 @@ write_data(uint8_t val, void *priv) dev->data = val; } -static void -autofeed(uint8_t val, void *priv) -{ - escp_t *dev = (escp_t *) priv; - - if (dev == NULL) - return; - - dev->autofeed = ((val & 0x02) > 0); -} - static void strobe(uint8_t old, uint8_t val, void *priv) { @@ -2124,7 +2112,7 @@ static const device_config_t lpt_prt_escp_config[] = { // clang-format on const device_t prt_escp_device = { - .name = "Generic ESC/P Dot-Matrix Printer", + .name = "Generic ESC/P 2 Dot-Matrix Printer", .internal_name = "dot_matrix", .flags = DEVICE_LPT, .local = 0, @@ -2142,13 +2130,12 @@ const device_t prt_escp_device = { }; const lpt_device_t lpt_prt_escp_device = { - .name = "Generic ESC/P Dot-Matrix Printer", + .name = "Generic ESC/P 2 Dot-Matrix Printer", .internal_name = "dot_matrix", .init = escp_init, .close = escp_close, .write_data = write_data, .write_ctrl = write_ctrl, - .autofeed = autofeed, .strobe = strobe, .read_status = read_status, .read_ctrl = read_ctrl, diff --git a/src/printer/prt_ps.c b/src/printer/prt_ps.c index c7183ec3f..c07ad475a 100644 --- a/src/printer/prt_ps.c +++ b/src/printer/prt_ps.c @@ -322,17 +322,6 @@ process_data(ps_t *dev) dev->buffer[dev->buffer_pos] = 0; } -static void -ps_autofeed(uint8_t val, void *priv) -{ - ps_t *dev = (ps_t *) priv; - - if (dev == NULL) - return; - - dev->autofeed = val & 0x02 ? true : false; -} - static void ps_strobe(uint8_t old, uint8_t val, void *priv) { @@ -533,7 +522,6 @@ const lpt_device_t lpt_prt_ps_device = { .close = ps_close, .write_data = ps_write_data, .write_ctrl = ps_write_ctrl, - .autofeed = ps_autofeed, .strobe = ps_strobe, .read_status = ps_read_status, .read_ctrl = NULL, @@ -551,7 +539,6 @@ const lpt_device_t lpt_prt_pcl_device = { .close = ps_close, .write_data = ps_write_data, .write_ctrl = ps_write_ctrl, - .autofeed = ps_autofeed, .strobe = ps_strobe, .read_status = ps_read_status, .read_ctrl = NULL, diff --git a/src/printer/prt_text.c b/src/printer/prt_text.c index a9808845f..eb951de08 100644 --- a/src/printer/prt_text.c +++ b/src/printer/prt_text.c @@ -369,18 +369,6 @@ write_data(uint8_t val, void *priv) dev->data = val; } -static void -autofeed(uint8_t val, void *priv) -{ - prnt_t *dev = (prnt_t *) priv; - - if (dev == NULL) - return; - - /* set autofeed value */ - dev->autofeed = val & 0x02 ? 1 : 0; -} - static void strobe(uint8_t old, uint8_t val, void *priv) { @@ -418,7 +406,7 @@ write_ctrl(uint8_t val, void *priv) return; /* set autofeed value */ - dev->autofeed = val & 0x02 ? 1 : 0; + dev->autofeed = (val & 0x02) ? 1 : 0; if (val & 0x08) { /* SELECT */ /* select printer */ @@ -562,7 +550,6 @@ const lpt_device_t lpt_prt_text_device = { .close = prnt_close, .write_data = write_data, .write_ctrl = write_ctrl, - .autofeed = autofeed, .strobe = strobe, .read_status = read_status, .read_ctrl = NULL, diff --git a/src/qt/languages/86box.pot b/src/qt/languages/86box.pot index bcce43afd..a65578eae 100644 --- a/src/qt/languages/86box.pot +++ b/src/qt/languages/86box.pot @@ -2592,7 +2592,7 @@ msgstr "" msgid "Generic Text Printer" msgstr "" -msgid "Generic ESC/P Dot-Matrix Printer" +msgid "Generic ESC/P 2 Dot-Matrix Printer" msgstr "" msgid "Generic PostScript Printer" @@ -2694,7 +2694,7 @@ msgstr "" msgid "Unable to find Dot-Matrix fonts" msgstr "" -msgid "TrueType fonts in the \"roms/printer/fonts\" directory are required for the emulation of the Generic ESC/P Dot-Matrix Printer." +msgid "TrueType fonts in the \"roms/printer/fonts\" directory are required for the emulation of the Generic ESC/P 2 Dot-Matrix Printer." msgstr "" msgid "Inhibit multimedia keys" @@ -2954,3 +2954,33 @@ msgstr "" msgid "CGA composite settings" msgstr "" + +msgid "Monitor EDID" +msgstr "" + +msgid "Export..." +msgstr "" + +msgid "Export EDID" +msgstr "" + +msgid "EDID file \"%ls\" is too large." +msgstr "" + +msgid "OpenGL input scale" +msgstr "" + +msgid "OpenGL input stretch mode" +msgstr "" + +msgid "Color scheme" +msgstr "" + +msgid "System" +msgstr "" + +msgid "Light" +msgstr "" + +msgid "Dark" +msgstr "" diff --git a/src/qt/languages/cs-CZ.po b/src/qt/languages/cs-CZ.po index a0a072866..ae265593c 100644 --- a/src/qt/languages/cs-CZ.po +++ b/src/qt/languages/cs-CZ.po @@ -2592,8 +2592,8 @@ msgstr "Stereofonní převodník LPT" msgid "Generic Text Printer" msgstr "Obecná textová tiskárna" -msgid "Generic ESC/P Dot-Matrix Printer" -msgstr "Obecná jehličková tiskárna ESC/P" +msgid "Generic ESC/P 2 Dot-Matrix Printer" +msgstr "Obecná jehličková tiskárna ESC/P 2" msgid "Generic PostScript Printer" msgstr "Obecná tiskárna PostScript" @@ -2694,8 +2694,8 @@ msgstr "Obecné rozšíření paměti PC/AT" msgid "Unable to find Dot-Matrix fonts" msgstr "Nebylo možné nalézt písma pro jehličkovou tiskárnu" -msgid "TrueType fonts in the \"roms/printer/fonts\" directory are required for the emulation of the Generic ESC/P Dot-Matrix Printer." -msgstr "Pro emulaci obecné jehličkové tiskárny ESC/P jsou vyžadována písma TrueType ve složce \"roms/printer/fonts\"." +msgid "TrueType fonts in the \"roms/printer/fonts\" directory are required for the emulation of the Generic ESC/P 2 Dot-Matrix Printer." +msgstr "Pro emulaci obecné jehličkové tiskárny ESC/P 2 jsou vyžadována písma TrueType ve složce \"roms/printer/fonts\"." msgid "Inhibit multimedia keys" msgstr "Potlačit stisk multimediálních kláves" @@ -2954,3 +2954,30 @@ msgstr "Nastavení kompozitního výstupu &CGA..." msgid "CGA composite settings" msgstr "Nastavení kompozitního výstupu CGA" + +msgid "Monitor EDID" +msgstr "EDID monitoru" + +msgid "Export..." +msgstr "Exportovat..." + +msgid "Export EDID" +msgstr "Exportovat EDID" + +msgid "EDID file \"%ls\" is too large." +msgstr "Soubor EDID \"%ls\" je příliš velký." + +msgid "OpenGL input scale" +msgstr "Vstupní měřítko OpenGL" + +msgid "OpenGL input stretch mode" +msgstr "režim roztažení vstupu OpenGL" + +msgid "Color scheme" +msgstr "Barevné schéma" + +msgid "Light" +msgstr "Světlo" + +msgid "Dark" +msgstr "Tmavá" diff --git a/src/qt/languages/de-DE.po b/src/qt/languages/de-DE.po index 28caf0d71..4385811c0 100644 --- a/src/qt/languages/de-DE.po +++ b/src/qt/languages/de-DE.po @@ -2592,8 +2592,8 @@ msgstr "Stereo-LPT-DAC" msgid "Generic Text Printer" msgstr "Generischer Textdrucker" -msgid "Generic ESC/P Dot-Matrix Printer" -msgstr "Allgemeiner ESC/P-Nadel-Drucker" +msgid "Generic ESC/P 2 Dot-Matrix Printer" +msgstr "Allgemeiner ESC/P 2-Nadel-Drucker" msgid "Generic PostScript Printer" msgstr "Generischer PostScript-Drucker" @@ -2694,8 +2694,8 @@ msgstr "Generische PC/AT-Speichererweiterung" msgid "Unable to find Dot-Matrix fonts" msgstr "Nadel-Schriften konnten nicht gefunden werden" -msgid "TrueType fonts in the \"roms/printer/fonts\" directory are required for the emulation of the Generic ESC/P Dot-Matrix Printer." -msgstr "TrueType-Schriften in das \"roms/printer/fonts\"-Verzeichnis sind für die Allgemeines ESC/P Nadel-Druckers erforderlich." +msgid "TrueType fonts in the \"roms/printer/fonts\" directory are required for the emulation of the Generic ESC/P 2 Dot-Matrix Printer." +msgstr "TrueType-Schriften in das \"roms/printer/fonts\"-Verzeichnis sind für die Allgemeines ESC/P 2 Nadel-Druckers erforderlich." msgid "Inhibit multimedia keys" msgstr "Multimedia-Tasten unterdrücken" @@ -2954,3 +2954,30 @@ msgstr "Optionen des &CGA-Composite-Modus..." msgid "CGA composite settings" msgstr "Optionen des CGA-Composite-Modus" + +msgid "Monitor EDID" +msgstr "EDID des Monitors" + +msgid "Export..." +msgstr "Exportieren..." + +msgid "Export EDID" +msgstr "EDID exportieren" + +msgid "EDID file \"%ls\" is too large." +msgstr "Die EDID-Datei \"%ls\" ist zu groß." + +msgid "OpenGL input scale" +msgstr "Eingabeskala von OpenGL" + +msgid "OpenGL input stretch mode" +msgstr "Eingabestreckungsmodus von OpenGL" + +msgid "Color scheme" +msgstr "Farbschema" + +msgid "Light" +msgstr "Licht" + +msgid "Dark" +msgstr "Dunkel" diff --git a/src/qt/languages/es-ES.po b/src/qt/languages/es-ES.po index 021cc36ab..b3d8835cf 100644 --- a/src/qt/languages/es-ES.po +++ b/src/qt/languages/es-ES.po @@ -2592,8 +2592,8 @@ msgstr "DAC LPT estéreo" msgid "Generic Text Printer" msgstr "Impresora genérica de texto" -msgid "Generic ESC/P Dot-Matrix Printer" -msgstr "Impresora matricial ESC/P genérica" +msgid "Generic ESC/P 2 Dot-Matrix Printer" +msgstr "Impresora matricial ESC/P 2 genérica" msgid "Generic PostScript Printer" msgstr "Impresora genérica PostScript" @@ -2694,8 +2694,8 @@ msgstr "Expansión de Memoria Generica PC/AT" msgid "Unable to find Dot-Matrix fonts" msgstr "No fué posible encontrar las fuentes matriciales" -msgid "TrueType fonts in the \"roms/printer/fonts\" directory are required for the emulation of the Generic ESC/P Dot-Matrix Printer." -msgstr "Las fuentes TrueType en el directorio \"roms/printer/fonts\" son necesarias para la emulación de la impresora matricial ESC/P genérica." +msgid "TrueType fonts in the \"roms/printer/fonts\" directory are required for the emulation of the Generic ESC/P 2 Dot-Matrix Printer." +msgstr "Las fuentes TrueType en el directorio \"roms/printer/fonts\" son necesarias para la emulación de la impresora matricial ESC/P 2 genérica." msgid "Inhibit multimedia keys" msgstr "Inhibir teclas multimedia" @@ -2954,3 +2954,30 @@ msgstr "Configuración del modo compuesto &CGA..." msgid "CGA composite settings" msgstr "Configuración del modo compuesto CGA" + +msgid "Monitor EDID" +msgstr "EDID du moniteur" + +msgid "Export..." +msgstr "Exporter..." + +msgid "Export EDID" +msgstr "EDID exportieren" + +msgid "EDID file \"%ls\" is too large." +msgstr "El archivo EDID \"%ls\" es demasiado grande." + +msgid "OpenGL input scale" +msgstr "Escala de entrada de OpenGL" + +msgid "OpenGL input stretch mode" +msgstr "Modo de estiramiento de entrada de OpenGL" + +msgid "Color scheme" +msgstr "Esquema de colores" + +msgid "Light" +msgstr "Luz" + +msgid "Dark" +msgstr "Oscuro" diff --git a/src/qt/languages/fi-FI.po b/src/qt/languages/fi-FI.po index cdce435db..475d94b7b 100644 --- a/src/qt/languages/fi-FI.po +++ b/src/qt/languages/fi-FI.po @@ -2592,8 +2592,8 @@ msgstr "Stereo-LPT-DAC" msgid "Generic Text Printer" msgstr "Yleinen tekstitulostin" -msgid "Generic ESC/P Dot-Matrix Printer" -msgstr "Yleinen ESC/P pistematriisitulostin" +msgid "Generic ESC/P 2 Dot-Matrix Printer" +msgstr "Yleinen ESC/P 2 pistematriisitulostin" msgid "Generic PostScript Printer" msgstr "Yleinen PostScript-tulostin" @@ -2694,8 +2694,8 @@ msgstr "Yleinen PC/AT-muistilaajennus" msgid "Unable to find Dot-Matrix fonts" msgstr "Pistematriisifontteja ei löydy" -msgid "TrueType fonts in the \"roms/printer/fonts\" directory are required for the emulation of the Generic ESC/P Dot-Matrix Printer." -msgstr "\"roms/printer/fonts\"-hakemiston TrueType-fontteja vaaditaan ESC/P-pistematriisitulostimen emulointiin." +msgid "TrueType fonts in the \"roms/printer/fonts\" directory are required for the emulation of the Generic ESC/P 2 Dot-Matrix Printer." +msgstr "\"roms/printer/fonts\"-hakemiston TrueType-fontteja vaaditaan ESC/P 2-pistematriisitulostimen emulointiin." msgid "Inhibit multimedia keys" msgstr "Estä multimedianäppäimet" @@ -2954,3 +2954,30 @@ msgstr "&CGA:n komposiittiasetukset..." msgid "CGA composite settings" msgstr "CGA:n komposiittiasetukset" + +msgid "Monitor EDID" +msgstr "Monitorin EDID" + +msgid "Export..." +msgstr "Viedä..." + +msgid "Export EDID" +msgstr "Vie EDID" + +msgid "EDID file \"%ls\" is too large." +msgstr "EDID-tiedosto \"%ls\" on liian suuri." + +msgid "OpenGL input scale" +msgstr "OpenGL:n syöttöasteikko" + +msgid "OpenGL input stretch mode" +msgstr "OpenGL:n syötteen venytystila" + +msgid "Color scheme" +msgstr "Värimaailma" + +msgid "Light" +msgstr "Valo" + +msgid "Dark" +msgstr "Tumma" diff --git a/src/qt/languages/fr-FR.po b/src/qt/languages/fr-FR.po index d5b5b7fdb..3f28b4af8 100644 --- a/src/qt/languages/fr-FR.po +++ b/src/qt/languages/fr-FR.po @@ -2592,8 +2592,8 @@ msgstr "Convertisseur numérique stéréo LPT" msgid "Generic Text Printer" msgstr "Imprimante texte générique" -msgid "Generic ESC/P Dot-Matrix Printer" -msgstr "Imprimante matricielle générique ESC/P" +msgid "Generic ESC/P 2 Dot-Matrix Printer" +msgstr "Imprimante matricielle générique ESC/P 2" msgid "Generic PostScript Printer" msgstr "Imprimante PostScript générique" @@ -2694,8 +2694,8 @@ msgstr "Extension mémoire générique PC/AT" msgid "Unable to find Dot-Matrix fonts" msgstr "Impossible de trouver les polices matricielles" -msgid "TrueType fonts in the \"roms/printer/fonts\" directory are required for the emulation of the Generic ESC/P Dot-Matrix Printer." -msgstr "Les polices TrueType dans le répertoire \"roms/printer/fonts\" sont nécessaires à l'émulation de l'imprimante générique ESC/P matricielle." +msgid "TrueType fonts in the \"roms/printer/fonts\" directory are required for the emulation of the Generic ESC/P 2 Dot-Matrix Printer." +msgstr "Les polices TrueType dans le répertoire \"roms/printer/fonts\" sont nécessaires à l'émulation de l'imprimante générique ESC/P 2 matricielle." msgid "Inhibit multimedia keys" msgstr "Désactiver les touches multimédia" @@ -2954,3 +2954,30 @@ msgstr "Réglages du mode composite &CGA..." msgid "CGA composite settings" msgstr "Réglages du mode composite CGA" + +msgid "Monitor EDID" +msgstr "Écran EDID" + +msgid "Export..." +msgstr "Exporter..." + +msgid "Export EDID" +msgstr "Exporter l'EDID" + +msgid "EDID file \"%ls\" is too large." +msgstr "Le fichier EDID \"%ls\" est trop volumineux." + +msgid "OpenGL input scale" +msgstr "Échelle d'entrée d'OpenGL" + +msgid "OpenGL input stretch mode" +msgstr "Mode d'étirement des données d'entrée d'OpenGL" + +msgid "Color scheme" +msgstr "Palette de couleurs" + +msgid "Light" +msgstr "Lumière" + +msgid "Dark" +msgstr "Sombre" diff --git a/src/qt/languages/hr-HR.po b/src/qt/languages/hr-HR.po index bdb980839..4996db404 100644 --- a/src/qt/languages/hr-HR.po +++ b/src/qt/languages/hr-HR.po @@ -2592,8 +2592,8 @@ msgstr "Stereo DAC za LPT" msgid "Generic Text Printer" msgstr "Generični tekstovni pisač" -msgid "Generic ESC/P Dot-Matrix Printer" -msgstr "Generični matrični pisač ESC/P" +msgid "Generic ESC/P 2 Dot-Matrix Printer" +msgstr "Generični matrični pisač ESC/P 2" msgid "Generic PostScript Printer" msgstr "Generični pisač PostScript" @@ -2694,8 +2694,8 @@ msgstr "Generičko proširenje memorije PC/AT" msgid "Unable to find Dot-Matrix fonts" msgstr "Nije moguće pronaći matrične fontove" -msgid "TrueType fonts in the \"roms/printer/fonts\" directory are required for the emulation of the Generic ESC/P Dot-Matrix Printer." -msgstr "TrueType fontovi u mapi \"roms/printer/fonts\" potrebni su za emulaciju generičnog matričnog pisača ESC/P." +msgid "TrueType fonts in the \"roms/printer/fonts\" directory are required for the emulation of the Generic ESC/P 2 Dot-Matrix Printer." +msgstr "TrueType fontovi u mapi \"roms/printer/fonts\" potrebni su za emulaciju generičnog matričnog pisača ESC/P 2." msgid "Inhibit multimedia keys" msgstr "Blokiraj multimedijske tipke" @@ -2954,3 +2954,30 @@ msgstr "Opcije kompozitnog načina &CGA..." msgid "CGA composite settings" msgstr "Opcije kompozitnog načina CGA" + +msgid "Monitor EDID" +msgstr "EDID monitora" + +msgid "Export..." +msgstr "Izvoz..." + +msgid "Export EDID" +msgstr "Izvoz EDID-a" + +msgid "EDID file \"%ls\" is too large." +msgstr "EDID datoteka \"%ls\" je prevelika." + +msgid "OpenGL input scale" +msgstr "Ulazna skala OpenGL-a" + +msgid "OpenGL input stretch mode" +msgstr "Način rastezanja ulaza u OpenGL-u" + +msgid "Color scheme" +msgstr "Shema boja" + +msgid "Light" +msgstr "Svjetlo" + +msgid "Dark" +msgstr "Tamno" diff --git a/src/qt/languages/it-IT.po b/src/qt/languages/it-IT.po index 43fe84461..f0806bf7b 100644 --- a/src/qt/languages/it-IT.po +++ b/src/qt/languages/it-IT.po @@ -1684,7 +1684,7 @@ msgid "&NIC %1 (%2) %3" msgstr "&Scheda di rete %1 (%2) %3" msgid "Render behavior" -msgstr "Comportamento renderizzazione" +msgstr "Impostazioni di renderizzazione" msgid "Use target framerate:" msgstr "Utilizza l'obiettivo &fotogrammi:" @@ -2592,8 +2592,8 @@ msgstr "DAC LPT stereo" msgid "Generic Text Printer" msgstr "Stampante di testo generica" -msgid "Generic ESC/P Dot-Matrix Printer" -msgstr "Stampante a matrice di punti ESC/P generica" +msgid "Generic ESC/P 2 Dot-Matrix Printer" +msgstr "Stampante a matrice di punti ESC/P 2 generica" msgid "Generic PostScript Printer" msgstr "Stampante PostScript generica" @@ -2694,8 +2694,8 @@ msgstr "Espansione di memoria PC/AT generica" msgid "Unable to find Dot-Matrix fonts" msgstr "Impossibile trovare i caratteri a matrice di punti" -msgid "TrueType fonts in the \"roms/printer/fonts\" directory are required for the emulation of the Generic ESC/P Dot-Matrix Printer." -msgstr "I caratteri TrueType presenti nella directory \"roms/printer/fonts\" sono necessari per l'emulazione della stampante a matrice di punti ESC/P generica." +msgid "TrueType fonts in the \"roms/printer/fonts\" directory are required for the emulation of the Generic ESC/P 2 Dot-Matrix Printer." +msgstr "I caratteri TrueType presenti nella directory \"roms/printer/fonts\" sono necessari per l'emulazione della stampante a matrice di punti ESC/P 2 generica." msgid "Inhibit multimedia keys" msgstr "Inibisci i tasti multimediali" @@ -2932,7 +2932,7 @@ msgid "The system will not be added." msgstr "Il sistema non verrà aggiunto." msgid "&Update mouse every CPU frame" -msgstr "&Aggiorna stato del mouse ad ogni blocco della CPU" +msgstr "Forza &aggiornamento stato del mouse" msgid "Hue" msgstr "Tinta" @@ -2954,3 +2954,30 @@ msgstr "Impostazioni video composito &CGA..." msgid "CGA composite settings" msgstr "Impostazioni video composito CGA" + +msgid "Monitor EDID" +msgstr "EDID del monitor" + +msgid "Export..." +msgstr "Esporta..." + +msgid "Export EDID" +msgstr "Esporta EDID" + +msgid "EDID file \"%ls\" is too large." +msgstr "Il file EDID \"%ls\" è troppo grande." + +msgid "OpenGL input scale" +msgstr "Scala ingresso OpenGL" + +msgid "OpenGL input stretch mode" +msgstr "Modalità adattamento ingresso OpenGL" + +msgid "Color scheme" +msgstr "Modalità colori" + +msgid "Light" +msgstr "Chiara" + +msgid "Dark" +msgstr "Scura" diff --git a/src/qt/languages/ja-JP.po b/src/qt/languages/ja-JP.po index 149170ae0..be01430f9 100644 --- a/src/qt/languages/ja-JP.po +++ b/src/qt/languages/ja-JP.po @@ -2592,8 +2592,8 @@ msgstr "ステレオLPT DAC" msgid "Generic Text Printer" msgstr "汎用テキスト・プリンタ" -msgid "Generic ESC/P Dot-Matrix Printer" -msgstr "汎用ESC/Pドットマトリクスプリンタ" +msgid "Generic ESC/P 2 Dot-Matrix Printer" +msgstr "汎用ESC/P 2ドットマトリクスプリンタ" msgid "Generic PostScript Printer" msgstr "汎用ポストスクリプトプリンタ" @@ -2694,8 +2694,8 @@ msgstr "汎用PC/ATメモリ拡張カード" msgid "Unable to find Dot-Matrix fonts" msgstr "ドットマトリクスフォントが見つかりません" -msgid "TrueType fonts in the \"roms/printer/fonts\" directory are required for the emulation of the Generic ESC/P Dot-Matrix Printer." -msgstr "汎用ESC/Pドットマトリクスプリンタのエミュレーションには、roms/printer/fontsディレクトリ内のTrueTypeフォントが必要です。" +msgid "TrueType fonts in the \"roms/printer/fonts\" directory are required for the emulation of the Generic ESC/P 2 Dot-Matrix Printer." +msgstr "汎用ESC/P 2ドットマトリクスプリンタのエミュレーションには、roms/printer/fontsディレクトリ内のTrueTypeフォントが必要です。" msgid "Inhibit multimedia keys" msgstr "マルチメディアキーを無効にする" @@ -2954,3 +2954,30 @@ msgstr "CGA複合モードの設定...(&C)" msgid "CGA composite settings" msgstr "CGA複合モードの設定" + +msgid "Monitor EDID" +msgstr "モニターのEDID" + +msgid "Export..." +msgstr "エクスポート..." + +msgid "Export EDID" +msgstr "EDIDのエクスポート" + +msgid "EDID file \"%ls\" is too large." +msgstr "EDIDファイル \"%ls\" が大きすぎます。" + +msgid "OpenGL input scale" +msgstr "OpenGLの入力スケール" + +msgid "OpenGL input stretch mode" +msgstr "OpenGLの入力ストレッチモード" + +msgid "Color scheme" +msgstr "配色" + +msgid "Light" +msgstr "光" + +msgid "Dark" +msgstr "暗闇" diff --git a/src/qt/languages/ko-KR.po b/src/qt/languages/ko-KR.po index 066b8a3f8..14da0ec8b 100644 --- a/src/qt/languages/ko-KR.po +++ b/src/qt/languages/ko-KR.po @@ -2592,8 +2592,8 @@ msgstr "스테레오 LPT DAC" msgid "Generic Text Printer" msgstr "일반 텍스트 프린터" -msgid "Generic ESC/P Dot-Matrix Printer" -msgstr "일반 ESC/P 도트 매트릭스 프린터" +msgid "Generic ESC/P 2 Dot-Matrix Printer" +msgstr "일반 ESC/P 2 도트 매트릭스 프린터" msgid "Generic PostScript Printer" msgstr "일반 포스트스크립트 프린터" @@ -2694,8 +2694,8 @@ msgstr "일반 PC/AT 메모리 확장 카드" msgid "Unable to find Dot-Matrix fonts" msgstr "도트 매트릭스 글꼴을 찾을 수 없습니다" -msgid "TrueType fonts in the \"roms/printer/fonts\" directory are required for the emulation of the Generic ESC/P Dot-Matrix Printer." -msgstr "일반 ESC/P 도트 매트릭스 프린터의 에뮬레이션을 사용하려면 \"roms/printer/fonts\" 디렉터리에 있는 트루타입 글꼴이 필요합니다." +msgid "TrueType fonts in the \"roms/printer/fonts\" directory are required for the emulation of the Generic ESC/P 2 Dot-Matrix Printer." +msgstr "일반 ESC/P 2 도트 매트릭스 프린터의 에뮬레이션을 사용하려면 \"roms/printer/fonts\" 디렉터리에 있는 트루타입 글꼴이 필요합니다." msgid "Inhibit multimedia keys" msgstr "멀티미디어 키 사용 금지" @@ -2954,3 +2954,30 @@ msgstr "CGA 복합 모드의 설정...(&C)" msgid "CGA composite settings" msgstr "CGA 복합 모드의 설정" + +msgid "Monitor EDID" +msgstr "모니터의 EDID" + +msgid "Export..." +msgstr "수출..." + +msgid "Export EDID" +msgstr "EDID 내보내기" + +msgid "EDID file \"%ls\" is too large." +msgstr "EDID 파일 \"%ls\"가 너무 큽니다." + +msgid "OpenGL input scale" +msgstr "OpenGL 입력 스케일" + +msgid "OpenGL input stretch mode" +msgstr "OpenGL 입력 스트레치 모드" + +msgid "Color scheme" +msgstr "색상 구성" + +msgid "Light" +msgstr "빛" + +msgid "Dark" +msgstr "어둠" diff --git a/src/qt/languages/nb-NO.po b/src/qt/languages/nb-NO.po index cde1d942e..8d9f97521 100644 --- a/src/qt/languages/nb-NO.po +++ b/src/qt/languages/nb-NO.po @@ -2592,8 +2592,8 @@ msgstr "Stereo LPT-DAC" msgid "Generic Text Printer" msgstr "Generisk tekstskriver" -msgid "Generic ESC/P Dot-Matrix Printer" -msgstr "Generisk ESC/P-matriseskriver" +msgid "Generic ESC/P 2 Dot-Matrix Printer" +msgstr "Generisk ESC/P 2-matriseskriver" msgid "Generic PostScript Printer" msgstr "Generisk PostScript-skriver" @@ -2694,8 +2694,8 @@ msgstr "Generisk PC/AT-minneutvidelse" msgid "Unable to find Dot-Matrix fonts" msgstr "Kan ikke finne matriseskriver-fonter" -msgid "TrueType fonts in the \"roms/printer/fonts\" directory are required for the emulation of the Generic ESC/P Dot-Matrix Printer." -msgstr "TrueType-fonter i mappen \"roms/printer/fonts\" kreves for emulering av generisk ESC/P-matriseskriver." +msgid "TrueType fonts in the \"roms/printer/fonts\" directory are required for the emulation of the Generic ESC/P 2 Dot-Matrix Printer." +msgstr "TrueType-fonter i mappen \"roms/printer/fonts\" kreves for emulering av generisk ESC/P 2-matriseskriver." msgid "Inhibit multimedia keys" msgstr "Deaktiver multimedietaster" @@ -2954,3 +2954,30 @@ msgstr "&CGA-komposittinnstillinger..." msgid "CGA composite settings" msgstr "CGA-komposittinnstillinger" + +msgid "Monitor EDID" +msgstr "EDID for skjerm" + +msgid "Export..." +msgstr "Eksporter..." + +msgid "Export EDID" +msgstr "Eksporter EDID" + +msgid "EDID file \"%ls\" is too large." +msgstr "EDID-filen \"%ls\" er for stor." + +msgid "OpenGL input scale" +msgstr "Inngangsskala for OpenGL" + +msgid "OpenGL input stretch mode" +msgstr "Inngangsstrekkmodus for OpenGL" + +msgid "Color scheme" +msgstr "Fargevalg" + +msgid "Light" +msgstr "Lys" + +msgid "Dark" +msgstr "Mørk" diff --git a/src/qt/languages/nl-NL.po b/src/qt/languages/nl-NL.po index 6408cf21c..d28a72651 100644 --- a/src/qt/languages/nl-NL.po +++ b/src/qt/languages/nl-NL.po @@ -2592,8 +2592,8 @@ msgstr "Stereo LPT DAC" msgid "Generic Text Printer" msgstr "Generieke tekstprinter" -msgid "Generic ESC/P Dot-Matrix Printer" -msgstr "Generieke ESC/P dot-matrix-printer" +msgid "Generic ESC/P 2 Dot-Matrix Printer" +msgstr "Generieke ESC/P 2 dot-matrix-printer" msgid "Generic PostScript Printer" msgstr "Generieke PostScript-printer" @@ -2694,8 +2694,8 @@ msgstr "Generieke PC/AT geheugenuitbreiding" msgid "Unable to find Dot-Matrix fonts" msgstr "Dot-matrix-lettertypen niet gevonden" -msgid "TrueType fonts in the \"roms/printer/fonts\" directory are required for the emulation of the Generic ESC/P Dot-Matrix Printer." -msgstr "TrueType lettertypen in de map \"roms/printer/fonts\" zijn nodig voor de emulatie van de generieke ESC/P dot-matrix-printer." +msgid "TrueType fonts in the \"roms/printer/fonts\" directory are required for the emulation of the Generic ESC/P 2 Dot-Matrix Printer." +msgstr "TrueType lettertypen in de map \"roms/printer/fonts\" zijn nodig voor de emulatie van de generieke ESC/P 2 dot-matrix-printer." msgid "Inhibit multimedia keys" msgstr "Multimedia-toetsen blokkeren" @@ -2954,3 +2954,30 @@ msgstr "Instellingen van de &CGA-compositemodus..." msgid "CGA composite settings" msgstr "Instellingen van de CGA-compositemodus" + +msgid "Monitor EDID" +msgstr "EDID-monitor" + +msgid "Export..." +msgstr "Exporteren..." + +msgid "Export EDID" +msgstr "EDID exporteren" + +msgid "EDID file \"%ls\" is too large." +msgstr "Het EDID-bestand \"%ls\" is te groot." + +msgid "OpenGL input scale" +msgstr "Invoerschaal van OpenGL" + +msgid "OpenGL input stretch mode" +msgstr "Input stretch-modus van OpenGL" + +msgid "Color scheme" +msgstr "Kleurenschema" + +msgid "Light" +msgstr "Licht" + +msgid "Dark" +msgstr "Donker" diff --git a/src/qt/languages/pl-PL.po b/src/qt/languages/pl-PL.po index 8d722817a..2a0cde697 100644 --- a/src/qt/languages/pl-PL.po +++ b/src/qt/languages/pl-PL.po @@ -2592,8 +2592,8 @@ msgstr "Stereo LPT DAC" msgid "Generic Text Printer" msgstr "Generyczna drukarka tekstowa" -msgid "Generic ESC/P Dot-Matrix Printer" -msgstr "Generyczna drukarka igłowa ESC/P" +msgid "Generic ESC/P 2 Dot-Matrix Printer" +msgstr "Generyczna drukarka igłowa ESC/P 2" msgid "Generic PostScript Printer" msgstr "Generyczna drukarka PostScript" @@ -2694,8 +2694,8 @@ msgstr "Generyczne rozszerzenie pamięci PC/AT" msgid "Unable to find Dot-Matrix fonts" msgstr "Nie można znaleźć fontów igłowych" -msgid "TrueType fonts in the \"roms/printer/fonts\" directory are required for the emulation of the Generic ESC/P Dot-Matrix Printer." -msgstr "Fonty TrueType w katalogu „roms/printer/fonts” są wymagane do emulacji generycznej drukarki igłowej ESC/P." +msgid "TrueType fonts in the \"roms/printer/fonts\" directory are required for the emulation of the Generic ESC/P 2 Dot-Matrix Printer." +msgstr "Fonty TrueType w katalogu „roms/printer/fonts” są wymagane do emulacji generycznej drukarki igłowej ESC/P 2." msgid "Inhibit multimedia keys" msgstr "Przejmij klawisze multimedialne" @@ -2954,3 +2954,30 @@ msgstr "Ustawienia trybu kompozytowego &CGA..." msgid "CGA composite settings" msgstr "Ustawienia trybu kompozytowego CGA" + +msgid "Monitor EDID" +msgstr "EDID monitora" + +msgid "Export..." +msgstr "Eksportuj..." + +msgid "Export EDID" +msgstr "Eksportuj EDID" + +msgid "EDID file \"%ls\" is too large." +msgstr "Plik EDID \"%ls\" jest zbyt duży." + +msgid "OpenGL input scale" +msgstr "Skala wejściowa OpenGL" + +msgid "OpenGL input stretch mode" +msgstr "Tryb rozciągania wejściowego OpenGL" + +msgid "Color scheme" +msgstr "Schemat kolorów" + +msgid "Light" +msgstr "Światło" + +msgid "Dark" +msgstr "Ciemny" diff --git a/src/qt/languages/pt-BR.po b/src/qt/languages/pt-BR.po index 68e13e876..63a17871b 100644 --- a/src/qt/languages/pt-BR.po +++ b/src/qt/languages/pt-BR.po @@ -10,7 +10,7 @@ msgid "&Action" msgstr "&Ação" msgid "&Keyboard requires capture" -msgstr "&Teclado requer captura" +msgstr "O &teclado requer captura" msgid "&Right CTRL is left ALT" msgstr "CTR&L direito é o ALT esquerdo" @@ -400,10 +400,10 @@ msgid "Dynamic Recompiler" msgstr "Recompilador dinâmico" msgid "CPU frame size" -msgstr "Tamanho de quadro do CPU" +msgstr "Tamanho do quadro da CPU" msgid "Larger frames (less smooth)" -msgstr "Quadros largos (menos suave)" +msgstr "Quadros maiores (menos suave)" msgid "Smaller frames (smoother)" msgstr "Quadros menores (mais suave)" @@ -412,7 +412,7 @@ msgid "Video:" msgstr "Vídeo:" msgid "Video #2:" -msgstr "Vídeo 2:" +msgstr "Vídeo nº 2:" msgid "Voodoo 1 or 2 Graphics" msgstr "Gráficos Voodoo 1 ou 2" @@ -424,7 +424,7 @@ msgid "XGA Graphics" msgstr "Gráficos XGA" msgid "IBM PS/55 Display Adapter Graphics" -msgstr "Gráficos IBM PS/55 Display Adapter" +msgstr "Gráficos do Adaptador de Vídeo IBM PS/55" msgid "Keyboard:" msgstr "Teclado:" @@ -457,16 +457,16 @@ msgid "Joystick 4..." msgstr "Joystick 4..." msgid "Sound card #1:" -msgstr "Placa de som 1:" +msgstr "Placa de som nº 1:" msgid "Sound card #2:" -msgstr "Placa de som 2:" +msgstr "Placa de som nº 2:" msgid "Sound card #3:" -msgstr "Placa de som 3:" +msgstr "Placa de som nº 3:" msgid "Sound card #4:" -msgstr "Placa de som 4:" +msgstr "Placa de som nº 4:" msgid "MIDI Out Device:" msgstr "Disp. de saída MIDI:" @@ -478,7 +478,7 @@ msgid "MIDI Out:" msgstr "Saída MIDI:" msgid "Standalone MPU-401" -msgstr "MPU-401 independente" +msgstr "MPU-401 autônomo" msgid "Use FLOAT32 sound" msgstr "Usar som FLOAT32" @@ -544,7 +544,7 @@ msgid "Parallel port 4" msgstr "Porta paralela 4" msgid "FD Controller:" -msgstr "Controlador FD:" +msgstr "Controlador de disquete:" msgid "CD-ROM Controller:" msgstr "Controlador de CD-ROM:" @@ -580,7 +580,7 @@ msgid "Hard disks:" msgstr "Discos rígidos:" msgid "Firmware Version" -msgstr "Versão de Firmware" +msgstr "Versão do Firmware" msgid "&New..." msgstr "&Novo..." @@ -673,13 +673,13 @@ msgid "Card 4:" msgstr "Placa 4:" msgid "Generic ISA ROM Board" -msgstr "Placa ROM ISA Genérica" +msgstr "Placa de ROM ISA Genérica" msgid "Generic Dual ISA ROM Board" -msgstr "Placa Dual ROM ISA Genérica" +msgstr "Placa de ROM ISA Dupla Genérica" msgid "Generic Quad ISA ROM Board" -msgstr "Placa Quad ROM ISA Genérica" +msgstr "Placa de ROM ISA Quádrupla Genérica" msgid "ISABugger device" msgstr "Dispositivo ISABugger" @@ -715,7 +715,7 @@ msgid "Image %1" msgstr "Imagem %1" msgid "86Box could not find any usable ROM images.\n\nPlease download a ROM set and extract it into the \"roms\" directory." -msgstr "O 86Box não conseguiu encontrar nenhuma imagem de ROM utilizável.\n\nPor favor, baixe um conjunto de ROM e extraia no diretório \"roms\"." +msgstr "O 86Box não conseguiu encontrar nenhuma imagem de ROM utilizável.\n\nPor favor, baixe um conjunto de ROMs e extraia-o para o diretório \"roms\"." msgid "(empty)" msgstr "(vazio)" @@ -748,7 +748,7 @@ msgid "Video card \"%hs\" is not available due to missing ROMs in the roms/video msgstr "A placa de vídeo \"%hs\" não está disponível devido à falta de ROMs no diretório roms/video. Mudando para uma placa de vídeo disponível." msgid "Video card #2 \"%hs\" is not available due to missing ROMs in the roms/video directory. Disabling the second video card." -msgstr "A placa de vídeo 2 \"%hs\" não está disponível devido à falta de ROMs no diretório roms/video. Desativando a segunda placa vídeo." +msgstr "A placa de vídeo 2 \"%hs\" não está disponível devido à falta de ROMs no diretório roms/video. Desativando a segunda placa de vídeo." msgid "Device \"%hs\" is not available due to missing ROMs. Ignoring the device." msgstr "O dispositivo \"%hs\" não está disponível devido à falta de ROMs. Ignorando o dispositivo." @@ -862,19 +862,19 @@ msgid "2-axis, 8-button joystick" msgstr "Joystick de 2 eixos, 8 botões" msgid "3-axis, 2-button joystick" -msgstr "Joystick padrão de 3 eixos, 2 botões" +msgstr "Joystick de 3 eixos, 2 botões" msgid "3-axis, 4-button joystick" -msgstr "Joystick padrão de 3 eixos, 4 botões" +msgstr "Joystick de 3 eixos, 4 botões" msgid "4-axis, 4-button joystick" -msgstr "Joystick padrão de 4 eixos, 4 botões" +msgstr "Joystick de 4 eixos, 4 botões" msgid "CH Flightstick Pro" msgstr "CH Flightstick Pro" msgid "CH Flightstick Pro + CH Pedals" -msgstr "CH Flightstick Pro + CH Pedais" +msgstr "CH Flightstick Pro + Pedais CH" msgid "Microsoft SideWinder Pad" msgstr "Microsoft SideWinder Pad" @@ -1090,7 +1090,7 @@ msgid "Powered Off" msgstr "Desligada" msgid "%n running" -msgstr "%n rodando" +msgstr "%n executando" msgid "%n paused" msgstr "%n pausada" @@ -1120,7 +1120,7 @@ msgid "Configuration read failed" msgstr "Falha ao ler a configuração" msgid "Unable to open the selected configuration file for reading: %1" -msgstr "Impossível abrir o arquivo de configuração selecionado para leitura: %1" +msgstr "Não foi possível abrir o arquivo de configuração selecionado para leitura: %1" msgid "Use regular expressions in search box" msgstr "Usar expressões regulares na caixa de pesquisa" @@ -1171,7 +1171,7 @@ msgid "System name already exists" msgstr "O nome do sistema já existe" msgid "Please enter a directory for the system" -msgstr "Por favor digite um diretório para o sistema" +msgstr "Por favor, digite um diretório para o sistema" msgid "Directory does not exist" msgstr "O diretório não existe" @@ -1183,7 +1183,7 @@ msgid "System location:" msgstr "Local do sistema:" msgid "System name and location" -msgstr "Nome do sistema e local" +msgstr "Nome e local do sistema" msgid "Enter the name of the system and choose the location" msgstr "Digite o nome do sistema e escolha o local" @@ -1291,10 +1291,10 @@ msgid "Warning" msgstr "Aviso" msgid "&Kill" -msgstr "&Matar" +msgstr "&Forçar encerramento" msgid "Killing a virtual machine can cause data loss. Only do this if the 86Box process gets stuck.\n\nDo you really wish to kill the virtual machine \"%1\"?" -msgstr "Matar uma máquina virtual pode causar perda de dados. Só faça isso se o processo do 86Box travar.\n\nTem certeza que deseja matar a máquina virtual \"%1\"?" +msgstr "Forçar o encerramento de uma máquina virtual pode causar perda de dados. Só faça isso se o processo do 86Box travar.\n\nTem certeza que deseja forçar o encerramento da máquina virtual \"%1\"?" msgid "&Delete" msgstr "&Apagar" @@ -1306,7 +1306,7 @@ msgid "Show &config file" msgstr "Mostrar arquivo de &configuração" msgid "No screenshot" -msgstr "Sem captura" +msgstr "Nenhuma captura de tela" msgid "Search" msgstr "Procurar" @@ -1402,7 +1402,7 @@ msgid "The selected file will be overwritten. Are you sure you want to use it?" msgstr "O arquivo selecionado será sobrescrito. Você tem certeza de que deseja usá-lo?" msgid "Unsupported disk image" -msgstr "Imagem de disco sem suporte" +msgstr "Imagem de disco não suportada" msgid "Overwrite" msgstr "Sobrescrever" @@ -1630,13 +1630,13 @@ msgid "List of MCA devices:" msgstr "Lista de dispositivos MCA:" msgid "&Tablet tool" -msgstr "Ferramenta para tablet" +msgstr "Ferramenta para &tablet" msgid "About &Qt" msgstr "Sobre o &Qt" msgid "&MCA devices..." -msgstr "Dispositivos MCA..." +msgstr "Dispositivos &MCA..." msgid "Show non-&primary monitors" msgstr "Mostrar monitores não &primários" @@ -1660,7 +1660,7 @@ msgid "&Connected" msgstr "&Conectado" msgid "Clear image &history" -msgstr "Limpar histórico de imagens(&H)" +msgstr "Limpar &histórico de imagens" msgid "Create..." msgstr "Criar..." @@ -1738,7 +1738,7 @@ msgid "I Copied It" msgstr "Copiei" msgid "86Box Monitor #" -msgstr "Monitor 86Box #" +msgstr "Monitor 86Box nº" msgid "No MCA devices." msgstr "Nenhum dispositivo MCA." @@ -1750,16 +1750,16 @@ msgid "GiB" msgstr "GiB" msgid "Network Card #1" -msgstr "Placa de rede 1" +msgstr "Placa de rede nº 1" msgid "Network Card #2" -msgstr "Placa de rede 2" +msgstr "Placa de rede nº 2" msgid "Network Card #3" -msgstr "Placa de rede 3" +msgstr "Placa de rede nº 3" msgid "Network Card #4" -msgstr "Placa de rede 4" +msgstr "Placa de rede nº 4" msgid "Mode:" msgstr "Modo:" @@ -1861,7 +1861,7 @@ msgid "Roland CM-32LN Emulation" msgstr "Emulação do Roland CM-32LN" msgid "OPL4-ML Daughterboard" -msgstr "Placa Filha OPL4-ML" +msgstr "Placa-filha OPL4-ML" msgid "System MIDI" msgstr "Sistema MIDI" @@ -1873,46 +1873,46 @@ msgid "BIOS file" msgstr "Arquivo do BIOS" msgid "BIOS file (ROM #1)" -msgstr "Arquivo do BIOS (ROM #1)" +msgstr "Arquivo do BIOS (ROM nº 1)" msgid "BIOS file (ROM #2)" -msgstr "Arquivo do BIOS (ROM #2)" +msgstr "Arquivo do BIOS (ROM nº 2)" msgid "BIOS file (ROM #3)" -msgstr "Arquivo do BIOS (ROM #3)" +msgstr "Arquivo do BIOS (ROM nº 3)" msgid "BIOS file (ROM #4)" -msgstr "Arquivo do BIOS (ROM #4)" +msgstr "Arquivo do BIOS (ROM nº 4)" msgid "BIOS address" msgstr "Endereço do BIOS" msgid "BIOS address (ROM #1)" -msgstr "Endereço do BIOS (ROM #1)" +msgstr "Endereço do BIOS (ROM nº 1)" msgid "BIOS address (ROM #2)" -msgstr "Endereço do BIOS (ROM #2)" +msgstr "Endereço do BIOS (ROM nº 2)" msgid "BIOS address (ROM #3)" -msgstr "Endereço do BIOS (ROM #3)" +msgstr "Endereço do BIOS (ROM nº 3)" msgid "BIOS address (ROM #4)" -msgstr "Endereço do BIOS (ROM #4)" +msgstr "Endereço do BIOS (ROM nº 4)" msgid "Enable BIOS extension ROM Writes" msgstr "Habilitar gravações na ROM de extensão do BIOS" msgid "Enable BIOS extension ROM Writes (ROM #1)" -msgstr "Habilitar gravações na ROM de extensão do BIOS (ROM #1)" +msgstr "Habilitar gravações na ROM de extensão do BIOS (ROM nº 1)" msgid "Enable BIOS extension ROM Writes (ROM #2)" -msgstr "Habilitar gravações na ROM de extensão do BIOS (ROM #2)" +msgstr "Habilitar gravações na ROM de extensão do BIOS (ROM nº 2)" msgid "Enable BIOS extension ROM Writes (ROM #3)" -msgstr "Habilitar gravações na ROM de extensão do BIOS (ROM #3)" +msgstr "Habilitar gravações na ROM de extensão do BIOS (ROM nº 3)" msgid "Enable BIOS extension ROM Writes (ROM #4)" -msgstr "Habilitar gravações na ROM de extensão do BIOS (ROM #4)" +msgstr "Habilitar gravações na ROM de extensão do BIOS (ROM nº 4)" msgid "Linear framebuffer base" msgstr "Base do framebuffer linear" @@ -1924,10 +1924,10 @@ msgid "IRQ" msgstr "IRQ" msgid "Serial port IRQ" -msgstr "IRQ da Porta Serial" +msgstr "IRQ da porta serial" msgid "Parallel port IRQ" -msgstr "IRQ da Porta Paralela" +msgstr "IRQ da porta paralela" msgid "BIOS Revision" msgstr "Revisão do BIOS" @@ -1960,16 +1960,16 @@ msgid "BIOS size" msgstr "Tamanho do BIOS" msgid "BIOS size (ROM #1)" -msgstr "Tamanho do BIOS (ROM #1)" +msgstr "Tamanho do BIOS (ROM nº 1)" msgid "BIOS size (ROM #2)" -msgstr "Tamanho do BIOS (ROM #2)" +msgstr "Tamanho do BIOS (ROM nº 2)" msgid "BIOS size (ROM #3)" -msgstr "Tamanho do BIOS (ROM #3)" +msgstr "Tamanho do BIOS (ROM nº 3)" msgid "BIOS size (ROM #4)" -msgstr "Tamanho do BIOS (ROM #4)" +msgstr "Tamanho do BIOS (ROM nº 4)" msgid "Map C0000-C7FFF as UMB" msgstr "Mapear C0000-C7FFF como UMB" @@ -2047,7 +2047,7 @@ msgid "Interpolation Method" msgstr "Método de interpolação" msgid "Dynamic Sample Loading" -msgstr "Carregamento dinâmico de amostra" +msgstr "Carregamento dinâmico de amostras" msgid "Reverb Output Gain" msgstr "Ganho da saída da reverberação" @@ -2116,7 +2116,7 @@ msgid "Serial Number" msgstr "Número de série" msgid "Host ID" -msgstr "ID do host" +msgstr "ID do anfitrião" msgid "FDC Address" msgstr "Endereço da FDC" @@ -2161,10 +2161,10 @@ msgid "Use EEPROM setting" msgstr "Usar configuração da EEPROM" msgid "WSS IRQ" -msgstr "WSS IRQ" +msgstr "IRQ WSS" msgid "WSS DMA" -msgstr "WSS DMA" +msgstr "DMA WSS" msgid "Enable OPL" msgstr "Ativar OPL" @@ -2251,7 +2251,7 @@ msgid "Bilinear filtering" msgstr "Filtragem bilinear" msgid "Video chroma-keying" -msgstr "Chroma-keying de vídeo" +msgstr "Chroma key de vídeo" msgid "Dithering" msgstr "Pontilhamento" @@ -2592,8 +2592,8 @@ msgstr "DAC LPT estéreo" msgid "Generic Text Printer" msgstr "Impressora de texto genérica" -msgid "Generic ESC/P Dot-Matrix Printer" -msgstr "Impressora matricial ESC/P genérica" +msgid "Generic ESC/P 2 Dot-Matrix Printer" +msgstr "Impressora matricial ESC/P 2 genérica" msgid "Generic PostScript Printer" msgstr "Impressora PostScript genérica" @@ -2650,7 +2650,7 @@ msgid "High performance impact" msgstr "Alto impacto no desempenho" msgid "[Generic] RAM Disk (max. speed)" -msgstr "[Genérico] Disco RAM (velocidade máxima)" +msgstr "[Genérico] Disco RAM (velocidade máx.)" msgid "[Generic] 1989 (3500 RPM)" msgstr "[Genérico] 1989 (3500 RPM)" @@ -2692,10 +2692,10 @@ msgid "Generic PC/AT Memory Expansion" msgstr "Expansão de memória genérica PC/AT" msgid "Unable to find Dot-Matrix fonts" -msgstr "Não foi possível localizar os fontes matriciais de pontos" +msgstr "Não foi possível localizar as fontes matriciais" -msgid "TrueType fonts in the \"roms/printer/fonts\" directory are required for the emulation of the Generic ESC/P Dot-Matrix Printer." -msgstr "As fontes TrueType no diretório \"roms/printer/fonts\" são necessárias para a emulação da impressora matricial ESC/P genérica." +msgid "TrueType fonts in the \"roms/printer/fonts\" directory are required for the emulation of the Generic ESC/P 2 Dot-Matrix Printer." +msgstr "As fontes TrueType no diretório \"roms/printer/fonts\" são necessárias para a emulação da impressora matricial ESC/P 2 genérica." msgid "Inhibit multimedia keys" msgstr "Inibir teclas multimídia" @@ -2725,25 +2725,25 @@ msgid "GLSL Error" msgstr "Erro GLSL" msgid "Could not load shader: %1" -msgstr "Impossível carregar o shader: %1" +msgstr "Não foi possível carregar o shader: %1" msgid "OpenGL version 3.0 or greater is required. Current GLSL version is %1.%2" msgstr "OpenGL versão 3.0 ou superior é exigido. Versão atual GLSL é %1.%2" msgid "Could not load texture: %1" -msgstr "Impossível carregar a textura: %1" +msgstr "Não foi possível carregar a textura: %1" msgid "Could not compile shader:\n\n%1" -msgstr "Impossível compilar o shader:\n\n%1" +msgstr "Não foi possível compilar o shader:\n\n%1" msgid "Program not linked:\n\n%1" -msgstr "Programa não linkado:\n\n%1" +msgstr "Programa não vinculado:\n\n%1" msgid "Shader Manager" -msgstr "Gerenciador de Shader" +msgstr "Gerenciador de Shaders" msgid "Shader Configuration" -msgstr "Configuração de Shader" +msgstr "Configuração de Shaders" msgid "Add" msgstr "Adicionar" @@ -2755,7 +2755,7 @@ msgid "Move down" msgstr "Mover para baixo" msgid "Could not load file %1" -msgstr "Impossível carregar arquivo %1" +msgstr "Não foi possível carregar o arquivo %1" msgid "Key Bindings:" msgstr "Atalhos:" @@ -2779,7 +2779,7 @@ msgid "Enter key combo:" msgstr "Pressione combinação de teclas:" msgid "Bind conflict" -msgstr "Conflito de vínculo" +msgstr "Conflito de atalho" msgid "This key combo is already in use." msgstr "Esta combinação de teclas já está em uso." @@ -2827,7 +2827,7 @@ msgid "Hub Mode" msgstr "Modo Hub" msgid "Hostname:" -msgstr "Nome do Host:" +msgstr "Nome do anfitrião:" msgid "ISA RAM:" msgstr "RAM ISA:" @@ -2866,7 +2866,7 @@ msgid "Check for updates on startup" msgstr "Verificar atualizações ao iniciar" msgid "Unable to determine release information" -msgstr "Impossível determinar informações do lançamento" +msgstr "Não foi possível determinar as informações da versão" msgid "There was an error checking for updates:\n\n%1\n\nPlease try again later." msgstr "Ocorreu um erro ao verificar por atualizações:\n\n%1\n\nPor favor tente mais tarde." @@ -2893,13 +2893,13 @@ msgid "You are currently running version %1." msgstr "Você está executando atualmente a versão %1." msgid "Version %1 is now available." -msgstr "Versão %2 está disponível." +msgstr "A versão %1 já está disponível." msgid "You are currently running build %1." msgstr "Você está executando atualmente a compilação %1." msgid "Build %1 is now available." -msgstr "Compilação %2 está disponível." +msgstr "A compilação %1 já está disponível." msgid "Would you like to visit the download page?" msgstr "Gostaria de visitar a página de download?" @@ -2911,7 +2911,7 @@ msgid "Update check" msgstr "Verificação de atualização" msgid "Checking for updates..." -msgstr "Verificando por atualizações.." +msgstr "Verificando por atualizações..." msgid "86Box Update" msgstr "Atualização do 86Box" @@ -2932,7 +2932,7 @@ msgid "The system will not be added." msgstr "O sistema não será adicionado." msgid "&Update mouse every CPU frame" -msgstr "&Atualiza o estado do mouse em cada quadro do CPU" +msgstr "&Atualiza o estado do mouse em cada quadro da CPU" msgid "Hue" msgstr "Matiz" @@ -2954,3 +2954,30 @@ msgstr "Configurações do modo composto &CGA..." msgid "CGA composite settings" msgstr "Configurações do modo composto CGA" + +msgid "Monitor EDID" +msgstr "EDID do monitor" + +msgid "Export..." +msgstr "Exportar..." + +msgid "Export EDID" +msgstr "Exportar EDID" + +msgid "EDID file \"%ls\" is too large." +msgstr "O arquivo EDID \"%ls\" é muito grande." + +msgid "OpenGL input scale" +msgstr "Escala de entrada do OpenGL" + +msgid "OpenGL input stretch mode" +msgstr "Modo de expansão de entrada do OpenGL" + +msgid "Color scheme" +msgstr "Esquema de cores" + +msgid "Light" +msgstr "Claro" + +msgid "Dark" +msgstr "Escuro" diff --git a/src/qt/languages/pt-PT.po b/src/qt/languages/pt-PT.po index 61512ed9e..4c7866f41 100644 --- a/src/qt/languages/pt-PT.po +++ b/src/qt/languages/pt-PT.po @@ -2592,8 +2592,8 @@ msgstr "DAC LPT estéreo" msgid "Generic Text Printer" msgstr "Impressora de texto genérica" -msgid "Generic ESC/P Dot-Matrix Printer" -msgstr "Impressora matricial de pontos ESC/P genérica" +msgid "Generic ESC/P 2 Dot-Matrix Printer" +msgstr "Impressora matricial de pontos ESC/P 2 genérica" msgid "Generic PostScript Printer" msgstr "Impressora PostScript genérica" @@ -2694,8 +2694,8 @@ msgstr "Expansão de memória genérica PC/AT" msgid "Unable to find Dot-Matrix fonts" msgstr "Não foi possível encontrar os fontes matriciais de pontos" -msgid "TrueType fonts in the \"roms/printer/fonts\" directory are required for the emulation of the Generic ESC/P Dot-Matrix Printer." -msgstr "As fontes TrueType no diretório \"roms/printer/fonts\" são necessárias para a emulação da impressora matricial de pontos ESC/P genérica" +msgid "TrueType fonts in the \"roms/printer/fonts\" directory are required for the emulation of the Generic ESC/P 2 Dot-Matrix Printer." +msgstr "As fontes TrueType no diretório \"roms/printer/fonts\" são necessárias para a emulação da impressora matricial de pontos ESC/P 2 genérica" msgid "Inhibit multimedia keys" msgstr "Deshabilitar teclas de multimídia" @@ -2954,3 +2954,30 @@ msgstr "Definições do modo compósito &CGA..." msgid "CGA composite settings" msgstr "Definições do modo compósito CGA" + +msgid "Monitor EDID" +msgstr "EDID do monitor" + +msgid "Export..." +msgstr "Exportar..." + +msgid "Export EDID" +msgstr "Exportar EDID" + +msgid "EDID file \"%ls\" is too large." +msgstr "O ficheiro EDID \"%ls\" é demasiado grande." + +msgid "OpenGL input scale" +msgstr "Escala de entrada do OpenGL" + +msgid "OpenGL input stretch mode" +msgstr "Modo de expansão de entrada do OpenGL" + +msgid "Color scheme" +msgstr "Esquema de cores" + +msgid "Light" +msgstr "Claro" + +msgid "Dark" +msgstr "Escuro" diff --git a/src/qt/languages/ru-RU.po b/src/qt/languages/ru-RU.po index 9b9d3756f..904757d74 100644 --- a/src/qt/languages/ru-RU.po +++ b/src/qt/languages/ru-RU.po @@ -2592,8 +2592,8 @@ msgstr "Стереофонический ЦАП LPT" msgid "Generic Text Printer" msgstr "Стандартный текстовый принтер" -msgid "Generic ESC/P Dot-Matrix Printer" -msgstr "Стандартный матричный принтер ESC/P" +msgid "Generic ESC/P 2 Dot-Matrix Printer" +msgstr "Стандартный матричный принтер ESC/P 2" msgid "Generic PostScript Printer" msgstr "Стандартный принтер PostScript" @@ -2694,8 +2694,8 @@ msgstr "Стандартное расширение памяти PC/AT" msgid "Unable to find Dot-Matrix fonts" msgstr "Невозможно найти матричные шрифты" -msgid "TrueType fonts in the \"roms/printer/fonts\" directory are required for the emulation of the Generic ESC/P Dot-Matrix Printer." -msgstr "Шрифты TrueType в каталоге \"roms/printer/fonts\" необходимы для эмуляции стандартного матричного принтера ESC/P." +msgid "TrueType fonts in the \"roms/printer/fonts\" directory are required for the emulation of the Generic ESC/P 2 Dot-Matrix Printer." +msgstr "Шрифты TrueType в каталоге \"roms/printer/fonts\" необходимы для эмуляции стандартного матричного принтера ESC/P 2." msgid "Inhibit multimedia keys" msgstr "Перехватывать мультимедийные клавиши" @@ -2954,3 +2954,30 @@ msgstr "Настройки композитного видео &CGA..." msgid "CGA composite settings" msgstr "Настройки композитного видео CGA" + +msgid "Monitor EDID" +msgstr "EDID монитора" + +msgid "Export..." +msgstr "Экспорт..." + +msgid "Export EDID" +msgstr "Экспорт EDID" + +msgid "EDID file \"%ls\" is too large." +msgstr "Файл EDID \"%ls\" слишком велик." + +msgid "OpenGL input scale" +msgstr "Масштаб ввода OpenGL" + +msgid "OpenGL input stretch mode" +msgstr "Режим растяжения ввода OpenGL" + +msgid "Color scheme" +msgstr "Цветовая схема" + +msgid "Light" +msgstr "Светлая" + +msgid "Dark" +msgstr "Тёмная" diff --git a/src/qt/languages/sk-SK.po b/src/qt/languages/sk-SK.po index a4169fac9..3a5e3b863 100644 --- a/src/qt/languages/sk-SK.po +++ b/src/qt/languages/sk-SK.po @@ -2592,8 +2592,8 @@ msgstr "Stereofónny prevodník LPT DAC" msgid "Generic Text Printer" msgstr "Generická textová tlačiareň" -msgid "Generic ESC/P Dot-Matrix Printer" -msgstr "Generická ihličková tlačiareň ESC/P" +msgid "Generic ESC/P 2 Dot-Matrix Printer" +msgstr "Generická ihličková tlačiareň ESC/P 2" msgid "Generic PostScript Printer" msgstr "Generická tlačiareň PostScript" @@ -2694,8 +2694,8 @@ msgstr "Všeobecné rozšírenie pamäte PC/AT" msgid "Unable to find Dot-Matrix fonts" msgstr "Nastala chyba pri hľadaní ihličkových písem" -msgid "TrueType fonts in the \"roms/printer/fonts\" directory are required for the emulation of the Generic ESC/P Dot-Matrix Printer." -msgstr "Písma TrueType v adresári \"roms/printer/fonts\" sú potrebné na emuláciu generickej ihličkovej tlačiarne ESC/P." +msgid "TrueType fonts in the \"roms/printer/fonts\" directory are required for the emulation of the Generic ESC/P 2 Dot-Matrix Printer." +msgstr "Písma TrueType v adresári \"roms/printer/fonts\" sú potrebné na emuláciu generickej ihličkovej tlačiarne ESC/P 2." msgid "Inhibit multimedia keys" msgstr "Potlačiť stlačenie multimediálnych klávesov" @@ -2954,3 +2954,30 @@ msgstr "Nastavenia kompozitného režimu &CGA..." msgid "CGA composite settings" msgstr "Nastavenia kompozitného režimu CGA" + +msgid "Monitor EDID" +msgstr "EDID monitora" + +msgid "Export..." +msgstr "Exportovať..." + +msgid "Export EDID" +msgstr "Exportovať EDID" + +msgid "EDID file \"%ls\" is too large." +msgstr "Súbor EDID \"%ls\" je príliš veľký." + +msgid "OpenGL input scale" +msgstr "Vstupná stupnica OpenGL" + +msgid "OpenGL input stretch mode" +msgstr "Režim rozťahovania vstupu OpenGL" + +msgid "Color scheme" +msgstr "Farebná schéma" + +msgid "Light" +msgstr "Svetlo" + +msgid "Dark" +msgstr "Tmavá" diff --git a/src/qt/languages/sl-SI.po b/src/qt/languages/sl-SI.po index 47a99b915..c23024a33 100644 --- a/src/qt/languages/sl-SI.po +++ b/src/qt/languages/sl-SI.po @@ -2592,8 +2592,8 @@ msgstr "Stereo DAC LPT" msgid "Generic Text Printer" msgstr "Generični besedilni tiskalnik" -msgid "Generic ESC/P Dot-Matrix Printer" -msgstr "Generični matrični tiskalnik ESC/P" +msgid "Generic ESC/P 2 Dot-Matrix Printer" +msgstr "Generični matrični tiskalnik ESC/P 2" msgid "Generic PostScript Printer" msgstr "Generični tiskalnik PostScript" @@ -2694,8 +2694,8 @@ msgstr "Generična razširitev pomnilnika PC/AT" msgid "Unable to find Dot-Matrix fonts" msgstr "Ni bilo mogoče najti matričnih pisav" -msgid "TrueType fonts in the \"roms/printer/fonts\" directory are required for the emulation of the Generic ESC/P Dot-Matrix Printer." -msgstr "Za emulacijo generičnega ESC/P matričnega tiskalnika so potrebne TrueType pisave v imeniku \"roms/printer/fonts\"." +msgid "TrueType fonts in the \"roms/printer/fonts\" directory are required for the emulation of the Generic ESC/P 2 Dot-Matrix Printer." +msgstr "Za emulacijo generičnega ESC/P 2 matričnega tiskalnika so potrebne TrueType pisave v imeniku \"roms/printer/fonts\"." msgid "Inhibit multimedia keys" msgstr "Blokiraj multimedijske tipke" @@ -2954,3 +2954,30 @@ msgstr "Nastavitve kompozitnega načina &CGA..." msgid "CGA composite settings" msgstr "Nastavitve kompozitnega načina CGA" + +msgid "Monitor EDID" +msgstr "EDID monitorja" + +msgid "Export..." +msgstr "Izvoz..." + +msgid "Export EDID" +msgstr "Izvoz EDID" + +msgid "EDID file \"%ls\" is too large." +msgstr "Datoteka EDID \"%ls\" je prevelika." + +msgid "OpenGL input scale" +msgstr "Vhodna lestvica OpenGL" + +msgid "OpenGL input stretch mode" +msgstr "Način raztezanja vhoda OpenGL" + +msgid "Color scheme" +msgstr "Barvna shema" + +msgid "Light" +msgstr "Svetloba" + +msgid "Dark" +msgstr "Temno" diff --git a/src/qt/languages/sv-SE.po b/src/qt/languages/sv-SE.po index a0b4a0752..58ead9405 100644 --- a/src/qt/languages/sv-SE.po +++ b/src/qt/languages/sv-SE.po @@ -2592,8 +2592,8 @@ msgstr "Stereo LPT DAC" msgid "Generic Text Printer" msgstr "Allmän textskrivare" -msgid "Generic ESC/P Dot-Matrix Printer" -msgstr "Allmän ESC/P punktmatrisskrivare" +msgid "Generic ESC/P 2 Dot-Matrix Printer" +msgstr "Allmän ESC/P 2 punktmatrisskrivare" msgid "Generic PostScript Printer" msgstr "Allmän PostScript-skrivare" @@ -2694,8 +2694,8 @@ msgstr "Allmän minnesexpansion PC/AT" msgid "Unable to find Dot-Matrix fonts" msgstr "Kunde inte hitta typsnitt för punktmatris" -msgid "TrueType fonts in the \"roms/printer/fonts\" directory are required for the emulation of the Generic ESC/P Dot-Matrix Printer." -msgstr "TrueType-typsnitt i mappen \"roms/printer/fonts\" krävs för emulering av den allmänna ESC/P punktmatrisskrivaren." +msgid "TrueType fonts in the \"roms/printer/fonts\" directory are required for the emulation of the Generic ESC/P 2 Dot-Matrix Printer." +msgstr "TrueType-typsnitt i mappen \"roms/printer/fonts\" krävs för emulering av den allmänna ESC/P 2 punktmatrisskrivaren." msgid "Inhibit multimedia keys" msgstr "Hindra multimediatangenter" @@ -2954,3 +2954,30 @@ msgstr "Inställningar för &CGA-kompositläget..." msgid "CGA composite settings" msgstr "Inställningar för CGA-kompositläget" + +msgid "Monitor EDID" +msgstr "EDID för bildskärm" + +msgid "Export..." +msgstr "Exportera..." + +msgid "Export EDID" +msgstr "Exportera EDID" + +msgid "EDID file \"%ls\" is too large." +msgstr "EDID-filen \"%ls\" är för stor." + +msgid "OpenGL input scale" +msgstr "Inmatningsskala för OpenGL" + +msgid "OpenGL input stretch mode" +msgstr "Inmatningssträckningsläge för OpenGL" + +msgid "Color scheme" +msgstr "Färgschema" + +msgid "Light" +msgstr "Ljus" + +msgid "Dark" +msgstr "Mörk" diff --git a/src/qt/languages/tr-TR.po b/src/qt/languages/tr-TR.po index 4a9109b13..538cc7af6 100644 --- a/src/qt/languages/tr-TR.po +++ b/src/qt/languages/tr-TR.po @@ -2592,8 +2592,8 @@ msgstr "Stereo LPT DAC" msgid "Generic Text Printer" msgstr "Genel Metin Yazıcı" -msgid "Generic ESC/P Dot-Matrix Printer" -msgstr "Genel ESC/P Dot-Matrix Yazıcı" +msgid "Generic ESC/P 2 Dot-Matrix Printer" +msgstr "Genel ESC/P 2 Dot-Matrix Yazıcı" msgid "Generic PostScript Printer" msgstr "Genel PostScript Yazıcı" @@ -2694,8 +2694,8 @@ msgstr "Genel PC/AT Bellek Artırıcı" msgid "Unable to find Dot-Matrix fonts" msgstr "Dot-Matrix yazı tipleri bulunamıyor" -msgid "TrueType fonts in the \"roms/printer/fonts\" directory are required for the emulation of the Generic ESC/P Dot-Matrix Printer." -msgstr "Genel ESC/P Dot-Matrix yazıcısının emülasyonu için \"roms/printer/fonts\" dizininde TrueType yazı tiplerinin bulunması gereklidir." +msgid "TrueType fonts in the \"roms/printer/fonts\" directory are required for the emulation of the Generic ESC/P 2 Dot-Matrix Printer." +msgstr "Genel ESC/P 2 Dot-Matrix yazıcısının emülasyonu için \"roms/printer/fonts\" dizininde TrueType yazı tiplerinin bulunması gereklidir." msgid "Inhibit multimedia keys" msgstr "Multimedya tuşlarını engelle" @@ -2954,3 +2954,30 @@ msgstr "&CGA kompozit modunun ayarları..." msgid "CGA composite settings" msgstr "CGA kompozit modunun ayarları" + +msgid "Monitor EDID" +msgstr "Monitörün EDID'si" + +msgid "Export..." +msgstr "Dışa aktar..." + +msgid "Export EDID" +msgstr "EDID'i dışa aktar" + +msgid "EDID file \"%ls\" is too large." +msgstr "EDID dosyası \"%ls\" çok büyük." + +msgid "OpenGL input scale" +msgstr "OpenGL'nin giriş ölçeği" + +msgid "OpenGL input stretch mode" +msgstr "OpenGL'nin giriş germe modu" + +msgid "Color scheme" +msgstr "Renk şeması" + +msgid "Light" +msgstr "Işık" + +msgid "Dark" +msgstr "Karanlık" diff --git a/src/qt/languages/uk-UA.po b/src/qt/languages/uk-UA.po index dfe8d9d42..c079fc141 100644 --- a/src/qt/languages/uk-UA.po +++ b/src/qt/languages/uk-UA.po @@ -2592,8 +2592,8 @@ msgstr "Стерео LPT ЦАП" msgid "Generic Text Printer" msgstr "Загальний текстовий принтер" -msgid "Generic ESC/P Dot-Matrix Printer" -msgstr "Загальний матричний принтер ESC/P" +msgid "Generic ESC/P 2 Dot-Matrix Printer" +msgstr "Загальний матричний принтер ESC/P 2" msgid "Generic PostScript Printer" msgstr "Загальний принтер PostScript" @@ -2694,8 +2694,8 @@ msgstr "Загальне розширення пам'яті PC/AT" msgid "Unable to find Dot-Matrix fonts" msgstr "Неможливо знайти матричні шрифти" -msgid "TrueType fonts in the \"roms/printer/fonts\" directory are required for the emulation of the Generic ESC/P Dot-Matrix Printer." -msgstr "Шрифти TrueType у каталозі \"roms/printer/fonts\" потрібні для емуляції загального матричного принтера Generic ESC/P." +msgid "TrueType fonts in the \"roms/printer/fonts\" directory are required for the emulation of the Generic ESC/P 2 Dot-Matrix Printer." +msgstr "Шрифти TrueType у каталозі \"roms/printer/fonts\" потрібні для емуляції загального матричного принтера Generic ESC/P 2." msgid "Inhibit multimedia keys" msgstr "Перехоплювати мультимедійні клавіші" @@ -2954,3 +2954,30 @@ msgstr "Налаштування композитного відео &CGA..." msgid "CGA composite settings" msgstr "Налаштування композитного відео CGA" + +msgid "Monitor EDID" +msgstr "EDID монітора" + +msgid "Export..." +msgstr "Експорт..." + +msgid "Export EDID" +msgstr "Експорт EDID" + +msgid "EDID file \"%ls\" is too large." +msgstr "Файл EDID \"%ls\" занадто великий." + +msgid "OpenGL input scale" +msgstr "Шкала введення OpenGL" + +msgid "OpenGL input stretch mode" +msgstr "Режим розтягування вхідних даних OpenGL" + +msgid "Color scheme" +msgstr "Колірна гамма" + +msgid "Light" +msgstr "Світло" + +msgid "Dark" +msgstr "Темний" diff --git a/src/qt/languages/vi-VN.po b/src/qt/languages/vi-VN.po index 9a3521afb..0190aee4c 100644 --- a/src/qt/languages/vi-VN.po +++ b/src/qt/languages/vi-VN.po @@ -2592,8 +2592,8 @@ msgstr "STEREO LPT DAC" msgid "Generic Text Printer" msgstr "Máy in generic văn bản" -msgid "Generic ESC/P Dot-Matrix Printer" -msgstr "Máy in generic ESC/P ma trận chấm" +msgid "Generic ESC/P 2 Dot-Matrix Printer" +msgstr "Máy in generic ESC/P 2 ma trận chấm" msgid "Generic PostScript Printer" msgstr "Máy in generic PostScript" @@ -2694,8 +2694,8 @@ msgstr "Mở rộng bộ nhớ chung qua PC/AT" msgid "Unable to find Dot-Matrix fonts" msgstr "Không tìm thấy phông chữ ma trận chấm" -msgid "TrueType fonts in the \"roms/printer/fonts\" directory are required for the emulation of the Generic ESC/P Dot-Matrix Printer." -msgstr "Cần có phông chữ TrueType trong thư mục \"roms/printer/fonts\" để mô phỏng máy in generic ESC/P ma trận chấm." +msgid "TrueType fonts in the \"roms/printer/fonts\" directory are required for the emulation of the Generic ESC/P 2 Dot-Matrix Printer." +msgstr "Cần có phông chữ TrueType trong thư mục \"roms/printer/fonts\" để mô phỏng máy in generic ESC/P 2 ma trận chấm." msgid "Inhibit multimedia keys" msgstr "Không dùng dãy phím multimedia" @@ -2954,3 +2954,30 @@ msgstr "Cài đặt chế độ tổng hợp &CGA..." msgid "CGA composite settings" msgstr "Cài đặt chế độ tổng hợp CGA" + +msgid "Monitor EDID" +msgstr "EDID của màn hình" + +msgid "Export..." +msgstr "Xuất khẩu..." + +msgid "Export EDID" +msgstr "Xuất khẩu EDID" + +msgid "EDID file \"%ls\" is too large." +msgstr "Tệp EDID \"%ls\" quá lớn." + +msgid "OpenGL input scale" +msgstr "Độ phân giải đầu vào của OpenGL" + +msgid "OpenGL input stretch mode" +msgstr "Chế độ kéo giãn đầu vào của OpenGL" + +msgid "Color scheme" +msgstr "Bảng màu" + +msgid "Light" +msgstr "Ánh sáng" + +msgid "Dark" +msgstr "Tối" diff --git a/src/qt/languages/zh-CN.po b/src/qt/languages/zh-CN.po index 6f9ee1c4f..7f44fe4fc 100644 --- a/src/qt/languages/zh-CN.po +++ b/src/qt/languages/zh-CN.po @@ -1114,7 +1114,7 @@ msgid "Choose configuration file" msgstr "选择配置文件" msgid "86Box configuration files (86box.cfg)" -msgstr "86Box 配置文件 (86box.cfg)" +msgstr "86Box 配置文件(86box.cfg)" msgid "Configuration read failed" msgstr "读取配置失败" @@ -1606,7 +1606,7 @@ msgid "WinBox is no longer supported" msgstr "WinBox 不再受支持" msgid "Development of the WinBox manager stopped in 2022 due to a lack of maintainers. As we direct our efforts towards making 86Box even better, we have made the decision to no longer support WinBox as a manager.\n\nNo further updates will be provided through WinBox, and you may encounter incorrect behavior should you continue using it with newer versions of 86Box. Any bug reports related to WinBox behavior will be closed as invalid.\n\nGo to 86box.net for a list of other managers you can use." -msgstr "由于缺乏维护者,WinBox 管理器的开发工作于 2022 年停止。由于我们正努力将 86Box 做得更好,因此决定不再支持 WinBox 作为管理器。\n\nWinBox 将不再提供更新,如果你继续在 86Box 的新版本中使用 WinBox,可能会遇到不正确的行为。任何与 WinBox 行为相关的错误报告都将被视为无效而关闭。\n\n请访问 86box.net,查看你可以使用的其他管理器列表。" +msgstr "由于缺乏维护者,WinBox 管理器的开发工作已于 2022 年停止。由于我们正努力将 86Box 做得更好,因此决定不再支持 WinBox 作为管理器。\n\nWinBox 将不再提供更新,如果你继续在 86Box 的新版本中使用 WinBox,可能会遇到不正确的行为。任何与 WinBox 行为相关的错误报告都将被视为无效而关闭。\n\n请访问 86box.net,查看你可以使用的其他管理器列表。" msgid "Generate" msgstr "生成" @@ -2047,7 +2047,7 @@ msgid "Interpolation Method" msgstr "插值法" msgid "Dynamic Sample Loading" -msgstr "采样的动态加载" +msgstr "动态采样加载" msgid "Reverb Output Gain" msgstr "混响输出增益" @@ -2592,8 +2592,8 @@ msgstr "立体声 LPT DAC" msgid "Generic Text Printer" msgstr "通用文本打印机" -msgid "Generic ESC/P Dot-Matrix Printer" -msgstr "通用 ESC/P 点阵打印机" +msgid "Generic ESC/P 2 Dot-Matrix Printer" +msgstr "通用 ESC/P 2 点阵打印机" msgid "Generic PostScript Printer" msgstr "通用 PostScript 打印机" @@ -2694,8 +2694,8 @@ msgstr "通用 PC/AT 内存扩展" msgid "Unable to find Dot-Matrix fonts" msgstr "无法找到点阵字体" -msgid "TrueType fonts in the \"roms/printer/fonts\" directory are required for the emulation of the Generic ESC/P Dot-Matrix Printer." -msgstr "仿真通用 ESC/P 点阵打印机需要使用 \"roms/printer/fonts\" 目录中的 TrueType 字体。" +msgid "TrueType fonts in the \"roms/printer/fonts\" directory are required for the emulation of the Generic ESC/P 2 Dot-Matrix Printer." +msgstr "仿真通用 ESC/P 2 点阵打印机需要使用 \"roms/printer/fonts\" 目录中的 TrueType 字体。" msgid "Inhibit multimedia keys" msgstr "禁止多媒体按键" @@ -2954,3 +2954,30 @@ msgstr "CGA 复合模式设置...(&C)" msgid "CGA composite settings" msgstr "CGA 复合模式设置" + +msgid "Monitor EDID" +msgstr "显示器的EDID" + +msgid "Export..." +msgstr "导出..." + +msgid "Export EDID" +msgstr "导出EDID" + +msgid "EDID file \"%ls\" is too large." +msgstr "EDID文件 \"%ls\" 过大。" + +msgid "OpenGL input scale" +msgstr "OpenGL的输入比例" + +msgid "OpenGL input stretch mode" +msgstr "OpenGL的输入拉伸模式" + +msgid "Color scheme" +msgstr "配色方案" + +msgid "Light" +msgstr "亮色" + +msgid "Dark" +msgstr "暗色" diff --git a/src/qt/languages/zh-TW.po b/src/qt/languages/zh-TW.po index ad03bd44d..21a984ebd 100644 --- a/src/qt/languages/zh-TW.po +++ b/src/qt/languages/zh-TW.po @@ -2592,8 +2592,8 @@ msgstr "立體聲 LPT DAC" msgid "Generic Text Printer" msgstr "通用文字印表機" -msgid "Generic ESC/P Dot-Matrix Printer" -msgstr "通用 ESC/P 點矩陣印表機" +msgid "Generic ESC/P 2 Dot-Matrix Printer" +msgstr "通用 ESC/P 2 點矩陣印表機" msgid "Generic PostScript Printer" msgstr "通用 PostScript 印表機" @@ -2694,8 +2694,8 @@ msgstr "通用 PC/AT 記憶體擴充" msgid "Unable to find Dot-Matrix fonts" msgstr "無法找到點矩陣字型" -msgid "TrueType fonts in the \"roms/printer/fonts\" directory are required for the emulation of the Generic ESC/P Dot-Matrix Printer." -msgstr "通用 ESC/P 點矩陣印表機的模擬需要 \"roms/printer/fonts\" 目錄中的 TrueType 字體。" +msgid "TrueType fonts in the \"roms/printer/fonts\" directory are required for the emulation of the Generic ESC/P 2 Dot-Matrix Printer." +msgstr "通用 ESC/P 2 點矩陣印表機的模擬需要 \"roms/printer/fonts\" 目錄中的 TrueType 字體。" msgid "Inhibit multimedia keys" msgstr "禁止多媒體按鍵" @@ -2954,3 +2954,30 @@ msgstr "CGA 複合模式的設定...(&C)" msgid "CGA composite settings" msgstr "CGA 複合模式的設定" + +msgid "Monitor EDID" +msgstr "監視器的 EDID" + +msgid "Export..." +msgstr "出口..." + +msgid "Export EDID" +msgstr "匯出 EDID" + +msgid "EDID file \"%ls\" is too large." +msgstr "EDID 檔案 \"%ls\" 太大。" + +msgid "OpenGL input scale" +msgstr "OpenGL 的輸入比例" + +msgid "OpenGL input stretch mode" +msgstr "OpenGL 的輸入拉伸模式" + +msgid "Color scheme" +msgstr "配色方案" + +msgid "Light" +msgstr "光" + +msgid "Dark" +msgstr "黑暗" diff --git a/src/qt/qt_main.cpp b/src/qt/qt_main.cpp index 6a2ba1a3a..664b495bd 100644 --- a/src/qt/qt_main.cpp +++ b/src/qt/qt_main.cpp @@ -515,10 +515,15 @@ main_thread_fn() static std::thread *main_thread; +#ifdef Q_OS_WINDOWS +WindowsDarkModeFilter* vmm_dark_mode_filter = nullptr; +#endif + int main(int argc, char *argv[]) { #ifdef Q_OS_WINDOWS + bool wasDarkTheme = false; /* Check if Windows supports UTF-8 */ if (GetACP() == CP_UTF8) acp_utf8 = 1; @@ -554,6 +559,7 @@ main(int argc, char *argv[]) f.open(QFile::ReadOnly | QFile::Text); QTextStream ts(&f); qApp->setStyleSheet(ts.readAll()); + wasDarkTheme = true; } QPalette palette(qApp->palette()); palette.setColor(QPalette::Link, Qt::white); @@ -585,6 +591,16 @@ main(int argc, char *argv[]) return 0; } +#ifdef Q_OS_WINDOWS + if (util::isWindowsLightTheme() && wasDarkTheme) { + qApp->setStyleSheet(""); + QPalette palette(qApp->palette()); + palette.setColor(QPalette::Link, Qt::blue); + palette.setColor(QPalette::LinkVisited, Qt::magenta); + qApp->setPalette(palette); + } +#endif + if (!start_vmm) #ifdef Q_OS_MACOS qt_set_sequence_auto_mnemonic(false); @@ -645,6 +661,8 @@ main(int argc, char *argv[]) const auto vmm_main_window = new VMManagerMainWindow(); #ifdef Q_OS_WINDOWS darkModeFilter.get()->setWindow(vmm_main_window); + // HACK + vmm_dark_mode_filter = darkModeFilter.get(); #endif vmm_main_window->show(); }); @@ -831,6 +849,7 @@ main(int argc, char *argv[]) }); QObject::connect(main_window, &MainWindow::vmmRunningStateChanged, &manager_socket, &VMManagerClientSocket::clientRunningStateChanged); QObject::connect(main_window, &MainWindow::vmmConfigurationChanged, &manager_socket, &VMManagerClientSocket::configurationChanged); + QObject::connect(main_window, &MainWindow::vmmGlobalConfigurationChanged, &manager_socket, &VMManagerClientSocket::globalConfigurationChanged); main_window->installEventFilter(&manager_socket); manager_socket.sendWinIdMessage(main_window->winId()); @@ -864,6 +883,10 @@ main(int argc, char *argv[]) /* Initialize the rendering window, or fullscreen. */ QTimer::singleShot(0, &app, [] { +#ifdef Q_OS_WINDOWS + extern bool NewDarkMode; + NewDarkMode = util::isWindowsLightTheme(); +#endif pc_reset_hard_init(); /* Set the PAUSE mode depending on the renderer. */ diff --git a/src/qt/qt_mainwindow.cpp b/src/qt/qt_mainwindow.cpp index ffcf56825..a08bf6ab7 100644 --- a/src/qt/qt_mainwindow.cpp +++ b/src/qt/qt_mainwindow.cpp @@ -175,6 +175,8 @@ extern "C" void qt_blit(int x, int y, int w, int h, int monitor_index); extern MainWindow *main_window; +bool MainWindow::s_adjustingForce43 = false; + MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent) , ui(new Ui::MainWindow) @@ -512,6 +514,8 @@ MainWindow::MainWindow(QWidget *parent) #endif } ui->stackedWidget->switchRenderer(newVidApi); + ui->menuOpenGL_input_scale->setEnabled(newVidApi == RendererStack::Renderer::OpenGL3); + ui->menuOpenGL_input_stretch_mode->setEnabled(newVidApi == RendererStack::Renderer::OpenGL3); if (!show_second_monitors) return; for (int i = 1; i < MONITORS_NUM; i++) { @@ -532,6 +536,41 @@ MainWindow::MainWindow(QWidget *parent) break; } + ui->action_0_5x_2->setChecked(video_gl_input_scale < 1.0); + ui->action_1x_2->setChecked(video_gl_input_scale >= 1.0 && video_gl_input_scale < 1.5); + ui->action1_5x_2->setChecked(video_gl_input_scale >= 1.5 && video_gl_input_scale < 2.0); + ui->action_2x_2->setChecked(video_gl_input_scale >= 2.0 && video_gl_input_scale < 3.0); + ui->action_3x_2->setChecked(video_gl_input_scale >= 3.0 && video_gl_input_scale < 4.0); + ui->action_4x_2->setChecked(video_gl_input_scale >= 4.0 && video_gl_input_scale < 5.0); + ui->action_5x_2->setChecked(video_gl_input_scale >= 5.0 && video_gl_input_scale < 6.0); + ui->action_6x_2->setChecked(video_gl_input_scale >= 6.0 && video_gl_input_scale < 7.0); + ui->action_7x_2->setChecked(video_gl_input_scale >= 7.0 && video_gl_input_scale < 8.0); + ui->action_8x_2->setChecked(video_gl_input_scale >= 8.0); + + actGroup = new QActionGroup(this); + actGroup->addAction(ui->action_0_5x_2); + actGroup->addAction(ui->action_1x_2); + actGroup->addAction(ui->action1_5x_2); + actGroup->addAction(ui->action_2x_2); + actGroup->addAction(ui->action_3x_2); + actGroup->addAction(ui->action_4x_2); + actGroup->addAction(ui->action_5x_2); + actGroup->addAction(ui->action_6x_2); + actGroup->addAction(ui->action_7x_2); + actGroup->addAction(ui->action_8x_2); + connect(actGroup, &QActionGroup::triggered, this, [this](QAction* action) { + if (action == ui->action_0_5x_2) video_gl_input_scale = 0.5; + if (action == ui->action_1x_2) video_gl_input_scale = 1; + if (action == ui->action1_5x_2) video_gl_input_scale = 1.5; + if (action == ui->action_2x_2) video_gl_input_scale = 2; + if (action == ui->action_3x_2) video_gl_input_scale = 3; + if (action == ui->action_4x_2) video_gl_input_scale = 4; + if (action == ui->action_5x_2) video_gl_input_scale = 5; + if (action == ui->action_6x_2) video_gl_input_scale = 6; + if (action == ui->action_7x_2) video_gl_input_scale = 7; + if (action == ui->action_8x_2) video_gl_input_scale = 8; + }); + switch (scale) { default: break; @@ -615,6 +654,38 @@ MainWindow::MainWindow(QWidget *parent) actGroup->addAction(ui->actionFullScreen_keepRatio); actGroup->addAction(ui->actionFullScreen_int); actGroup->addAction(ui->actionFullScreen_int43); + switch (video_gl_input_scale_mode) { + default: + break; + case FULLSCR_SCALE_FULL: + ui->action_Full_screen_stretch_gl->setChecked(true); + break; + case FULLSCR_SCALE_43: + ui->action_4_3_gl->setChecked(true); + break; + case FULLSCR_SCALE_KEEPRATIO: + ui->action_Square_pixels_keep_ratio_gl->setChecked(true); + break; + case FULLSCR_SCALE_INT: + ui->action_Integer_scale_gl->setChecked(true); + break; + case FULLSCR_SCALE_INT43: + ui->action4_3_Integer_scale_gl->setChecked(true); + break; + } + actGroup = new QActionGroup(this); + actGroup->addAction(ui->action_Full_screen_stretch_gl); + actGroup->addAction(ui->action_4_3_gl); + actGroup->addAction(ui->action_Square_pixels_keep_ratio_gl); + actGroup->addAction(ui->action_Integer_scale_gl); + actGroup->addAction(ui->action4_3_Integer_scale_gl); + connect(actGroup, &QActionGroup::triggered, this, [this](QAction* action) { + if (action == ui->action_Full_screen_stretch_gl) video_gl_input_scale_mode = FULLSCR_SCALE_FULL; + if (action == ui->action_4_3_gl) video_gl_input_scale_mode = FULLSCR_SCALE_43; + if (action == ui->action_Square_pixels_keep_ratio_gl) video_gl_input_scale_mode = FULLSCR_SCALE_KEEPRATIO; + if (action == ui->action_Integer_scale_gl) video_gl_input_scale_mode = FULLSCR_SCALE_INT; + if (action == ui->action4_3_Integer_scale_gl) video_gl_input_scale_mode = FULLSCR_SCALE_INT43; + }); switch (video_grayscale) { default: break; @@ -973,11 +1044,75 @@ void MainWindow::updateShortcuts() ui->actionMute_Unmute->setShortcut(seq); } +void +MainWindow::adjustForForce43(const QSize &newWinSize) +{ + // Only act in resizable mode with Force 4:3 enabled and not fullscreen + if (!(vid_resize == 1 && force_43 > 0) || video_fullscreen || s_adjustingForce43) + return; + + s_adjustingForce43 = true; + + // Height consumed by menu/status/toolbars + int chromeH = menuBar()->height() + + (hide_status_bar ? 0 : statusBar()->height()) + + (hide_tool_bar ? 0 : ui->toolBar->height()); + + // Compute client area size in device‑independent pixels + double dpr = (!dpi_scale ? util::screenOfWidget(this)->devicePixelRatio() : 1.0); + int winW = newWinSize.width(); + int winH = newWinSize.height(); + int clientW = static_cast(winW / dpr); + int clientH = static_cast((winH - chromeH) / dpr); + + if (clientW <= 0 || clientH <= 0) { + s_adjustingForce43 = false; + return; + } + + // Decide which dimension the user changed most – adjust the other + int curW = static_cast(width() / dpr); + int curH = static_cast((height() - chromeH) / dpr); + bool widthChanged = std::abs(clientW - curW) >= std::abs(clientH - curH); + + int targetW, targetH; + if (widthChanged) { + // user dragged width – compute matching height for 4:3 + targetW = clientW; + targetH = (clientW * 3) / 4; + } else { + // user dragged height – compute matching width for 4:3 + targetH = clientH; + targetW = (clientH * 4) / 3; + } + + // Convert back to window size including chrome and apply + int newW = static_cast(targetW * dpr); + int newH = static_cast(targetH * dpr) + chromeH; + if (newW != winW || newH != winH) + resize(newW, newH); + + // Update emulator framebuffer size and notify platform + monitors[0].mon_scrnsz_x = targetW; + monitors[0].mon_scrnsz_y = targetH; + plat_resize_request(targetW, targetH, 0); + + // Allow renderer widget to grow and recompute scaling + ui->stackedWidget->setFixedSize(QWIDGETSIZE_MAX, QWIDGETSIZE_MAX); + ui->stackedWidget->onResize(width(), height()); + + s_adjustingForce43 = false; +} + void MainWindow::resizeEvent(QResizeEvent *event) { //qDebug() << pos().x() + event->size().width(); //qDebug() << pos().y() + event->size().height(); + + // Enforce 4:3 aspect ratio in resizable mode when the option is set + adjustForForce43(event->size()); + if (vid_resize == 1 || video_fullscreen) return; @@ -1463,7 +1598,8 @@ MainWindow::eventFilter(QObject *receiver, QEvent *event) if (event->type() == QEvent::KeyPress) { QKeyEvent *ke = (QKeyEvent *) event; - if ((QKeySequence)(ke->key() | ke->modifiers()) == FindAcceleratorSeq("release_mouse")) + if ((QKeySequence)(ke->key() | (ke->modifiers() & ~Qt::KeypadModifier)) == FindAcceleratorSeq("release_mouse") || + (QKeySequence)(ke->key() | ke->modifiers()) == FindAcceleratorSeq("release_mouse")) { plat_mouse_capture(0); } @@ -1473,31 +1609,38 @@ MainWindow::eventFilter(QObject *receiver, QEvent *event) { QKeyEvent *ke = (QKeyEvent *) event; - if ((QKeySequence)(ke->key() | ke->modifiers()) == FindAcceleratorSeq("screenshot")) + if ((QKeySequence)(ke->key() | (ke->modifiers() & ~Qt::KeypadModifier)) == FindAcceleratorSeq("screenshot") + || (QKeySequence)(ke->key() | ke->modifiers()) == FindAcceleratorSeq("screenshot")) { ui->actionTake_screenshot->trigger(); } - if ((QKeySequence)(ke->key() | ke->modifiers()) == FindAcceleratorSeq("fullscreen")) + if ((QKeySequence)(ke->key() | (ke->modifiers() & ~Qt::KeypadModifier)) == FindAcceleratorSeq("fullscreen") + || (QKeySequence)(ke->key() | ke->modifiers()) == FindAcceleratorSeq("fullscreen")) { ui->actionFullscreen->trigger(); } - if ((QKeySequence)(ke->key() | ke->modifiers()) == FindAcceleratorSeq("hard_reset")) + if ((QKeySequence)(ke->key() | (ke->modifiers() & ~Qt::KeypadModifier)) == FindAcceleratorSeq("hard_reset") + || (QKeySequence)(ke->key() | ke->modifiers()) == FindAcceleratorSeq("hard_reset")) { ui->actionHard_Reset->trigger(); } - if ((QKeySequence)(ke->key() | ke->modifiers()) == FindAcceleratorSeq("send_ctrl_alt_del")) + if ((QKeySequence)(ke->key() | (ke->modifiers() & ~Qt::KeypadModifier)) == FindAcceleratorSeq("send_ctrl_alt_del") + || (QKeySequence)(ke->key() | ke->modifiers()) == FindAcceleratorSeq("send_ctrl_alt_del")) { ui->actionCtrl_Alt_Del->trigger(); } - if ((QKeySequence)(ke->key() | ke->modifiers()) == FindAcceleratorSeq("send_ctrl_alt_esc")) + if ((QKeySequence)(ke->key() | (ke->modifiers() & ~Qt::KeypadModifier)) == FindAcceleratorSeq("send_ctrl_alt_esc") + || (QKeySequence)(ke->key() | ke->modifiers()) == FindAcceleratorSeq("send_ctrl_alt_esc")) { ui->actionCtrl_Alt_Esc->trigger(); } - if ((QKeySequence)(ke->key() | ke->modifiers()) == FindAcceleratorSeq("pause")) + if ((QKeySequence)(ke->key() | (ke->modifiers() & ~Qt::KeypadModifier)) == FindAcceleratorSeq("pause") + || (QKeySequence)(ke->key() | ke->modifiers()) == FindAcceleratorSeq("pause")) { ui->actionPause->trigger(); } - if ((QKeySequence)(ke->key() | ke->modifiers()) == FindAcceleratorSeq("mute")) + if ((QKeySequence)(ke->key() | (ke->modifiers() & ~Qt::KeypadModifier)) == FindAcceleratorSeq("mute") + || (QKeySequence)(ke->key() | ke->modifiers()) == FindAcceleratorSeq("mute")) { ui->actionMute_Unmute->trigger(); } @@ -2024,6 +2167,17 @@ void MainWindow::on_actionForce_4_3_display_ratio_triggered() { video_toggle_option(ui->actionForce_4_3_display_ratio, &force_43); + + // When turning on Force 4:3 in resizable mode, immediately snap to 4:3 + if (vid_resize == 1 && !video_fullscreen) { + ui->stackedWidget->setFixedSize(QWIDGETSIZE_MAX, QWIDGETSIZE_MAX); + if (force_43 > 0) { + adjustForForce43(size()); + } else { + // Turning off: refresh renderer scaling + ui->stackedWidget->onResize(width(), height()); + } + } } void @@ -2089,6 +2243,9 @@ MainWindow::on_actionHiDPI_scaling_triggered() void MainWindow::on_actionHide_status_bar_triggered() { + auto w = ui->stackedWidget->width() * (!dpi_scale ? util::screenOfWidget(this)->devicePixelRatio() : 1.); + auto h = ui->stackedWidget->height() * (!dpi_scale ? util::screenOfWidget(this)->devicePixelRatio() : 1.); + hide_status_bar ^= 1; ui->actionHide_status_bar->setChecked(hide_status_bar); statusBar()->setVisible(!hide_status_bar); @@ -2100,7 +2257,7 @@ MainWindow::on_actionHide_status_bar_triggered() } else { int vid_resize_orig = vid_resize; vid_resize = 0; - emit resizeContents(monitors[0].mon_scrnsz_x, monitors[0].mon_scrnsz_y); + emit resizeContents(vid_resize_orig ? w : monitors[0].mon_scrnsz_x, vid_resize_orig ? h : monitors[0].mon_scrnsz_y); vid_resize = vid_resize_orig; if (vid_resize == 1) setFixedSize(QWIDGETSIZE_MAX, QWIDGETSIZE_MAX); @@ -2110,6 +2267,9 @@ MainWindow::on_actionHide_status_bar_triggered() void MainWindow::on_actionHide_tool_bar_triggered() { + auto w = ui->stackedWidget->width() * (!dpi_scale ? util::screenOfWidget(this)->devicePixelRatio() : 1.); + auto h = ui->stackedWidget->height() * (!dpi_scale ? util::screenOfWidget(this)->devicePixelRatio() : 1.); + hide_tool_bar ^= 1; ui->actionHide_tool_bar->setChecked(hide_tool_bar); ui->toolBar->setVisible(!hide_tool_bar); @@ -2118,7 +2278,7 @@ MainWindow::on_actionHide_tool_bar_triggered() } else { int vid_resize_orig = vid_resize; vid_resize = 0; - emit resizeContents(monitors[0].mon_scrnsz_x, monitors[0].mon_scrnsz_y); + emit resizeContents(vid_resize_orig ? w : monitors[0].mon_scrnsz_x, vid_resize_orig ? h : monitors[0].mon_scrnsz_y); vid_resize = vid_resize_orig; if (vid_resize == 1) setFixedSize(QWIDGETSIZE_MAX, QWIDGETSIZE_MAX); @@ -2193,7 +2353,9 @@ void MainWindow::on_actionPreferences_triggered() { ProgSettings progsettings(this); - progsettings.exec(); + if (progsettings.exec() == QDialog::Accepted) { + emit vmmGlobalConfigurationChanged(); + } } void diff --git a/src/qt/qt_mainwindow.hpp b/src/qt/qt_mainwindow.hpp index 26b5efbb2..885b9b8f5 100644 --- a/src/qt/qt_mainwindow.hpp +++ b/src/qt/qt_mainwindow.hpp @@ -72,6 +72,7 @@ signals: void vmmRunningStateChanged(VMManagerProtocol::RunningState state); void vmmConfigurationChanged(); + void vmmGlobalConfigurationChanged(); public slots: void showSettings(); void hardReset(); @@ -187,6 +188,9 @@ private: std::unique_ptr status; std::shared_ptr mm; + static bool s_adjustingForce43; // guard against recursion + void adjustForForce43(const QSize &newWinSize); + void updateShortcuts(); void processKeyboardInput(bool down, uint32_t keycode); #ifdef Q_OS_MACOS diff --git a/src/qt/qt_mainwindow.ui b/src/qt/qt_mainwindow.ui index 68f2c43b5..194c595e1 100644 --- a/src/qt/qt_mainwindow.ui +++ b/src/qt/qt_mainwindow.ui @@ -186,6 +186,31 @@ + + + OpenGL input stretch mode + + + + + + + + + + OpenGL input scale + + + + + + + + + + + + @@ -195,6 +220,8 @@ + + @@ -900,7 +927,7 @@ &CGA composite settings... - + @@ -912,6 +939,272 @@ RIVA 128 Realtime Debugger + + + GPU Debug - VRAM Viewer + + + + + RIVA 128 Realtime Debugger + + + + + true + + + &Full screen stretch + + + + + true + + + &4:3 + + + + + true + + + &Square pixels (Keep ratio) + + + + + true + + + &Integer scale + + + + + true + + + 4:&3 Integer scale + + + + + true + + + &1x + + + + + true + + + &0.5x + + + + + true + + + &1x + + + + + true + + + 1.&5x + + + + + true + + + &2x + + + + + true + + + &3x + + + + + true + + + &4x + + + + + true + + + &5x + + + + + true + + + &6x + + + + + true + + + &7x + + + + + true + + + &8x + + + + + true + + + &Full screen stretch + + + + + true + + + &4:3 + + + + + true + + + &Square pixels (Keep ratio) + + + + + true + + + &Integer scale + + + + + true + + + 4:&3 Integer scale + + + + + true + + + &1x + + + + + true + + + &0.5x + + + + + true + + + &1x + + + + + true + + + 1.&5x + + + + + true + + + &2x + + + + + true + + + &3x + + + + + true + + + &4x + + + + + true + + + &5x + + + + + true + + + &6x + + + + + true + + + &7x + + + + + true + + + &8x + + diff --git a/src/qt/qt_mediahistorymanager.cpp b/src/qt/qt_mediahistorymanager.cpp index 47ff7b4b5..ff9f1cf1c 100644 --- a/src/qt/qt_mediahistorymanager.cpp +++ b/src/qt/qt_mediahistorymanager.cpp @@ -381,7 +381,7 @@ MediaHistoryManager::removeMissingImages(device_index_list_t &device_history) #ifdef Q_OS_WINDOWS if (new_fi.filePath().left(8) == "ioctl://") - file_exists = (GetDriveType(new_fi.filePath().right(2).toUtf8().data()) == DRIVE_CDROM); + file_exists = (GetDriveTypeA(new_fi.filePath().right(2).toUtf8().data()) == DRIVE_CDROM); #endif if (!file_exists) { diff --git a/src/qt/qt_mediamenu.cpp b/src/qt/qt_mediamenu.cpp index 465c56129..b42812ad6 100644 --- a/src/qt/qt_mediamenu.cpp +++ b/src/qt/qt_mediamenu.cpp @@ -31,7 +31,6 @@ extern "C" { #ifdef Q_OS_WINDOWS #define BITMAP WINDOWS_BITMAP -#undef UNICODE #include #include #undef BITMAP @@ -176,7 +175,7 @@ MediaMenu::refresh(QMenu *parentMenu) it's a CDROM */ for (const auto &letter : driveLetters) { auto drive = QString("%1:\\").arg(letter); - if (GetDriveType(drive.toUtf8().constData()) == DRIVE_CDROM) + if (GetDriveTypeA(drive.toUtf8().constData()) == DRIVE_CDROM) menu->addAction(QIcon(":/settings/qt/icons/cdrom_host.ico"), tr("&Host CD/DVD Drive (%1:)").arg(letter), [this, i, letter] { cdromMount(i, 2, QString(R"(\\.\%1:)").arg(letter)); })->setCheckable(false); } menu->addSeparator(); diff --git a/src/qt/qt_openglrenderer.cpp b/src/qt/qt_openglrenderer.cpp index 4ec091eb2..cecc8ea9c 100644 --- a/src/qt/qt_openglrenderer.cpp +++ b/src/qt/qt_openglrenderer.cpp @@ -1386,6 +1386,8 @@ OpenGLRenderer::getOptions(QWidget *parent) return new OpenGLShaderManagerDialog(parent); } +extern void standalone_scale(QRect &destination, int width, int height, QRect source, int scalemode); + void OpenGLRenderer::render() { @@ -1428,19 +1430,16 @@ OpenGLRenderer::render() { struct shader_pass *pass = &active_shader->scene; - struct { - uint32_t x; - uint32_t y; - uint32_t w; - uint32_t h; - } rect; - rect.x = 0; - rect.y = 0; - rect.w = source.width(); - rect.h = source.height(); + QRect rect; + rect.setX(0); + rect.setY(0); + rect.setWidth(source.width() * video_gl_input_scale); + rect.setHeight(source.height() * video_gl_input_scale); - pass->state.input_size[0] = pass->state.output_size[0] = rect.w; - pass->state.input_size[1] = pass->state.output_size[1] = rect.h; + standalone_scale(rect, source.width(), source.height(), rect, video_gl_input_scale_mode); + + pass->state.input_size[0] = pass->state.output_size[0] = rect.width(); + pass->state.input_size[1] = pass->state.output_size[1] = rect.height(); pass->state.input_texture_size[0] = pass->state.output_texture_size[0] = next_pow2(pass->state.output_size[0]); pass->state.input_texture_size[1] = pass->state.output_texture_size[1] = next_pow2(pass->state.output_size[1]); diff --git a/src/qt/qt_platform.cpp b/src/qt/qt_platform.cpp index 653926071..03bc68390 100644 --- a/src/qt/qt_platform.cpp +++ b/src/qt/qt_platform.cpp @@ -648,7 +648,8 @@ ProgSettings::reloadStrings() translatedstrings[STRING_NET_ERROR] = QCoreApplication::translate("", "Failed to initialize network driver").toStdWString(); translatedstrings[STRING_NET_ERROR_DESC] = QCoreApplication::translate("", "The network configuration will be switched to the null driver").toStdWString(); translatedstrings[STRING_ESCP_ERROR_TITLE] = QCoreApplication::translate("", "Unable to find Dot-Matrix fonts").toStdWString(); - translatedstrings[STRING_ESCP_ERROR_DESC] = QCoreApplication::translate("", "TrueType fonts in the \"roms/printer/fonts\" directory are required for the emulation of the Generic ESC/P Dot-Matrix Printer.").toStdWString(); + translatedstrings[STRING_ESCP_ERROR_DESC] = QCoreApplication::translate("", "TrueType fonts in the \"roms/printer/fonts\" directory are required for the emulation of the Generic ESC/P 2 Dot-Matrix Printer.").toStdWString(); + translatedstrings[STRING_EDID_TOO_LARGE] = QCoreApplication::translate("", "EDID file \"%ls\" is too large.").toStdWString(); } wchar_t * diff --git a/src/qt/qt_progsettings.cpp b/src/qt/qt_progsettings.cpp index c2fa75dff..7efeba377 100644 --- a/src/qt/qt_progsettings.cpp +++ b/src/qt/qt_progsettings.cpp @@ -96,8 +96,13 @@ ProgSettings::ProgSettings(QWidget *parent) ui->checkBoxConfirmSave->setChecked(confirm_save); ui->checkBoxConfirmHardReset->setChecked(confirm_reset); + ui->radioButtonSystem->setChecked(color_scheme == 0); + ui->radioButtonLight->setChecked(color_scheme == 1); + ui->radioButtonDark->setChecked(color_scheme == 2); + #ifndef Q_OS_WINDOWS ui->checkBoxMultimediaKeys->setHidden(true); + ui->groupBox->setHidden(true); #endif } @@ -111,6 +116,13 @@ ProgSettings::accept() confirm_reset = ui->checkBoxConfirmHardReset->isChecked() ? 1 : 0; inhibit_multimedia_keys = ui->checkBoxMultimediaKeys->isChecked() ? 1 : 0; + color_scheme = (ui->radioButtonSystem->isChecked()) ? 0 : (ui->radioButtonLight->isChecked() ? 1 : 2); + +#ifdef Q_OS_WINDOWS + extern void selectDarkMode(); + selectDarkMode(); +#endif + loadTranslators(QCoreApplication::instance()); reloadStrings(); update_mouse_msg(); @@ -126,6 +138,7 @@ ProgSettings::accept() connect(main_window, &MainWindow::updateStatusBarTip, main_window->status.get(), &MachineStatus::updateTip); connect(main_window, &MainWindow::statusBarMessage, main_window->status.get(), &MachineStatus::message, Qt::QueuedConnection); mouse_sensitivity = mouseSensitivity; + config_save_global(); QDialog::accept(); } diff --git a/src/qt/qt_progsettings.ui b/src/qt/qt_progsettings.ui index abaee5019..ca33726b1 100644 --- a/src/qt/qt_progsettings.ui +++ b/src/qt/qt_progsettings.ui @@ -7,7 +7,7 @@ 0 0 458 - 391 + 508 @@ -27,7 +27,7 @@ - QLayout::SetFixedSize + QLayout::SizeConstraint::SetFixedSize @@ -36,6 +36,40 @@ + + + + Qt::Orientation::Horizontal + + + + 40 + 20 + + + + + + + + Inhibit multimedia keys + + + + + + + Mouse sensitivity: + + + + + + + Default + + + @@ -48,30 +82,10 @@ - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - + + - Default - - - - - - - Mouse sensitivity: + Ask for confirmation before saving settings @@ -93,27 +107,7 @@ 100 - Qt::Horizontal - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - Default + Qt::Orientation::Horizontal @@ -127,19 +121,25 @@ - - + + - Inhibit multimedia keys + Default - - - - Ask for confirmation before saving settings + + + + Qt::Orientation::Horizontal - + + + 40 + 20 + + + @@ -148,6 +148,16 @@ + + + + Qt::Orientation::Horizontal + + + QDialogButtonBox::StandardButton::Cancel|QDialogButtonBox::StandardButton::Ok + + + @@ -155,14 +165,34 @@ - - - - Qt::Horizontal - - - QDialogButtonBox::Cancel|QDialogButtonBox::Ok + + + + Color scheme + + + + + System + + + + + + + Light + + + + + + + Dark + + + + diff --git a/src/qt/qt_renderercommon.cpp b/src/qt/qt_renderercommon.cpp index 56217b611..b71e19e75 100644 --- a/src/qt/qt_renderercommon.cpp +++ b/src/qt/qt_renderercommon.cpp @@ -49,6 +49,73 @@ integer_scale(double *d, double *g) } } +void +standalone_scale(QRect &destination, int width, int height, QRect source, int scalemode) +{ + double dx; + double dy; + double dw; + double dh; + double gsr; + + double hw = width; + double hh = height; + double gw = source.width(); + double gh = source.height(); + double hsr = hw / hh; + double r43 = 4.0 / 3.0; + + switch (scalemode) { + case FULLSCR_SCALE_INT: + case FULLSCR_SCALE_INT43: + gsr = gw / gh; + + if (scalemode == FULLSCR_SCALE_INT43) { + gh = gw / r43; + + gsr = r43; + } + + if (gsr <= hsr) { + dw = hh * gsr; + dh = hh; + } else { + dw = hw; + dh = hw / gsr; + } + + integer_scale(&dw, &gw); + integer_scale(&dh, &gh); + + dx = (hw - dw) / 2.0; + dy = (hh - dh) / 2.0; + destination.setRect((int) dx, (int) dy, (int) dw, (int) dh); + break; + case FULLSCR_SCALE_43: + case FULLSCR_SCALE_KEEPRATIO: + if (scalemode == FULLSCR_SCALE_43) + gsr = r43; + else + gsr = gw / gh; + + if (gsr <= hsr) { + dw = hh * gsr; + dh = hh; + } else { + dw = hw; + dh = hw / gsr; + } + dx = (hw - dw) / 2.0; + dy = (hh - dh) / 2.0; + destination.setRect((int) dx, (int) dy, (int) dw, (int) dh); + break; + case FULLSCR_SCALE_FULL: + default: + destination.setRect(0, 0, (int) hw, (int) hh); + break; + } +} + void RendererCommon::onResize(int width, int height) { diff --git a/src/qt/qt_rendererstack.cpp b/src/qt/qt_rendererstack.cpp index ade27d831..32b017b92 100644 --- a/src/qt/qt_rendererstack.cpp +++ b/src/qt/qt_rendererstack.cpp @@ -62,6 +62,10 @@ # include #endif +#ifdef Q_OS_WINDOWS +# include +#endif + extern "C" { #include <86box/86box.h> #include <86box/config.h> diff --git a/src/qt/qt_settingsdisplay.cpp b/src/qt/qt_settingsdisplay.cpp index 15b2f4588..b03930806 100644 --- a/src/qt/qt_settingsdisplay.cpp +++ b/src/qt/qt_settingsdisplay.cpp @@ -17,7 +17,11 @@ #include "qt_settingsdisplay.hpp" #include "ui_qt_settingsdisplay.h" +#include "qt_util.hpp" + #include +#include +#include extern "C" { #include <86box/86box.h> @@ -27,6 +31,7 @@ extern "C" { #include <86box/vid_8514a_device.h> #include <86box/vid_xga_device.h> #include <86box/vid_ps55da2.h> +#include <86box/vid_ddc.h> } #include "qt_deviceconfig.hpp" @@ -40,6 +45,9 @@ SettingsDisplay::SettingsDisplay(QWidget *parent) for (uint8_t i = 0; i < GFXCARD_MAX; i ++) videoCard[i] = gfxcard[i]; + + ui->lineEdit->setFilter(tr("EDID") % util::DlgFilter({ "bin", "dat", "edid" }) % tr("All files") % util::DlgFilter({ "*" }, true)); + onCurrentMachineChanged(machine); } @@ -67,6 +75,9 @@ SettingsDisplay::save() ibm8514_standalone_enabled = ui->checkBox8514->isChecked() ? 1 : 0; xga_standalone_enabled = ui->checkBoxXga->isChecked() ? 1 : 0; da2_standalone_enabled = ui->checkBoxDa2->isChecked() ? 1 : 0; + monitor_edid = ui->radioButtonCustom->isChecked() ? 1 : 0; + + strncpy(monitor_edid_path, ui->lineEdit->fileName().toUtf8().data(), sizeof(monitor_edid_path) - 1); } void @@ -121,6 +132,11 @@ SettingsDisplay::onCurrentMachineChanged(int machineId) for (uint8_t i = 1; i < GFXCARD_MAX; i ++) if (gfxcard[i] == 0) ui->pushButtonConfigureVideoSecondary->setEnabled(false); + + ui->radioButtonDefault->setChecked(monitor_edid == 0); + ui->radioButtonCustom->setChecked(monitor_edid == 1); + ui->lineEdit->setFileName(monitor_edid_path); + ui->lineEdit->setEnabled(monitor_edid == 1); } void @@ -305,3 +321,33 @@ SettingsDisplay::on_pushButtonConfigureVideoSecondary_clicked() auto *device = video_card_getdevice(ui->comboBoxVideoSecondary->currentData().toInt()); DeviceConfig::ConfigureDevice(device); } + +void SettingsDisplay::on_radioButtonDefault_clicked() +{ + ui->radioButtonDefault->setChecked(true); + ui->radioButtonCustom->setChecked(false); + ui->lineEdit->setEnabled(false); +} + + +void SettingsDisplay::on_radioButtonCustom_clicked() +{ + ui->radioButtonDefault->setChecked(false); + ui->radioButtonCustom->setChecked(true); + ui->lineEdit->setEnabled(true); +} + +void SettingsDisplay::on_pushButtonExportDefault_clicked() +{ + auto str = QFileDialog::getSaveFileName(this, tr("Export EDID")); + if (!str.isEmpty()) { + QFile file(str); + if (file.open(QFile::WriteOnly)) { + ssize_t size = 0; + auto bytes = ddc_create_default_edid(&size); + file.write((char*)bytes, size); + file.close(); + } + } +} + diff --git a/src/qt/qt_settingsdisplay.hpp b/src/qt/qt_settingsdisplay.hpp index 7eca7cc60..8854b0373 100644 --- a/src/qt/qt_settingsdisplay.hpp +++ b/src/qt/qt_settingsdisplay.hpp @@ -40,6 +40,12 @@ private slots: void on_checkBoxDa2_stateChanged(int state); void on_pushButtonConfigureDa2_clicked(); + void on_radioButtonDefault_clicked(); + + void on_radioButtonCustom_clicked(); + + void on_pushButtonExportDefault_clicked(); + private: Ui::SettingsDisplay *ui; int machineId = 0; diff --git a/src/qt/qt_settingsdisplay.ui b/src/qt/qt_settingsdisplay.ui index c5eba7adf..6e4c14152 100644 --- a/src/qt/qt_settingsdisplay.ui +++ b/src/qt/qt_settingsdisplay.ui @@ -7,13 +7,13 @@ 0 0 400 - 300 + 466 Form - + 0 @@ -26,45 +26,27 @@ 0 - - - - - 0 - 0 - - + + - Video: + Voodoo 1 or 2 Graphics - - - - - 0 - 0 - - - - 30 - - - - - - - - 0 - 0 - - + + Configure + + + + IBM 8514/A Graphics + + + @@ -78,6 +60,83 @@ + + + + Configure + + + + + + + Configure + + + + + + + + 0 + 0 + + + + Monitor EDID + + + + + + + + Default + + + + + + + + 0 + 0 + + + + Export... + + + + + + + + + QLayout::SizeConstraint::SetNoConstraint + + + + + Custom... + + + + + + + + 0 + 0 + + + + + + + + + @@ -91,19 +150,18 @@ - - - - Configure + + + + Qt::Orientation::Vertical - - - - - - Voodoo 1 or 2 Graphics + + + 20 + 40 + - + @@ -112,20 +170,52 @@ - - + + + + + 0 + 0 + + - IBM 8514/A Graphics + Configure - - + + + + + 0 + 0 + + + + Video: + + + + + Configure + + + + + 0 + 0 + + + + 30 + + + @@ -133,13 +223,6 @@ - - - - Configure - - - @@ -147,28 +230,26 @@ - - - - Configure + + + + + 0 + 0 + - - - - Qt::Vertical - - - - 20 - 40 - - - - + + + FileField + QWidget +
qt_filefield.hpp
+ 1 +
+
diff --git a/src/qt/qt_specifydimensions.cpp b/src/qt/qt_specifydimensions.cpp index c01ef2ae4..0b88e9b57 100644 --- a/src/qt/qt_specifydimensions.cpp +++ b/src/qt/qt_specifydimensions.cpp @@ -112,4 +112,13 @@ SpecifyDimensions::on_SpecifyDimensions_accepted() } main_window->show(); emit main_window->updateWindowRememberOption(); + + if (vid_resize == 1) { + main_window->resize(ui->spinBoxWidth->value() / (!dpi_scale ? util::screenOfWidget(this)->devicePixelRatio() : 1.), (ui->spinBoxHeight->value() / (!dpi_scale ? util::screenOfWidget(this)->devicePixelRatio() : 1.)) + + main_window->menuBar()->height() + + (main_window->statusBar()->height() * !hide_status_bar) + + (main_window->ui->toolBar->height() * !hide_tool_bar)); + window_w = ui->spinBoxWidth->value(); + window_h = ui->spinBoxHeight->value(); + } } diff --git a/src/qt/qt_util.cpp b/src/qt/qt_util.cpp index 201b61b3f..a95226247 100644 --- a/src/qt/qt_util.cpp +++ b/src/qt/qt_util.cpp @@ -66,6 +66,10 @@ screenOfWidget(QWidget *widget) bool isWindowsLightTheme(void) { + if (color_scheme != 0) { + return (color_scheme == 1); + } + // based on https://stackoverflow.com/questions/51334674/how-to-detect-windows-10-light-dark-mode-in-win32-application // The value is expected to be a REG_DWORD, which is a signed 32-bit little-endian diff --git a/src/qt/qt_vmmanager_clientsocket.cpp b/src/qt/qt_vmmanager_clientsocket.cpp index ffe4fb5f7..7f1587cb4 100644 --- a/src/qt/qt_vmmanager_clientsocket.cpp +++ b/src/qt/qt_vmmanager_clientsocket.cpp @@ -23,6 +23,7 @@ extern "C" { #include "86box/plat.h" +#include "86box/config.h" } VMManagerClientSocket::VMManagerClientSocket(QObject* obj) : server_connected(false) @@ -183,6 +184,15 @@ VMManagerClientSocket::jsonReceived(const QJsonObject &json) case VMManagerProtocol::ManagerMessage::RequestStatus: qDebug("Status request command received from manager"); break; + case VMManagerProtocol::ManagerMessage::GlobalConfigurationChanged: + { + config_load_global(); +#ifdef Q_OS_WINDOWS + void selectDarkMode(); + selectDarkMode(); +#endif + break; + } default: qDebug("Unknown client message type received:"); qDebug() << json; @@ -248,6 +258,12 @@ VMManagerClientSocket::clientRunningStateChanged(VMManagerProtocol::RunningState sendMessageWithObject(VMManagerProtocol::ClientMessage::RunningStateChanged, extra_object); } +void +VMManagerClientSocket::globalConfigurationChanged() const +{ + sendMessage(VMManagerProtocol::ClientMessage::GlobalConfigurationChanged); +} + void VMManagerClientSocket::configurationChanged() const { diff --git a/src/qt/qt_vmmanager_clientsocket.hpp b/src/qt/qt_vmmanager_clientsocket.hpp index 50657a27b..1848749a3 100644 --- a/src/qt/qt_vmmanager_clientsocket.hpp +++ b/src/qt/qt_vmmanager_clientsocket.hpp @@ -45,6 +45,7 @@ signals: public slots: void clientRunningStateChanged(VMManagerProtocol::RunningState state) const; void configurationChanged() const; + void globalConfigurationChanged() const; private: QString server_name; diff --git a/src/qt/qt_vmmanager_details.cpp b/src/qt/qt_vmmanager_details.cpp index 65608cf0a..873da9083 100644 --- a/src/qt/qt_vmmanager_details.cpp +++ b/src/qt/qt_vmmanager_details.cpp @@ -248,52 +248,52 @@ VMManagerDetails::updateConfig(VMManagerSystem *passed_sysconfig) { // System systemSection->clear(); - systemSection->addSection("Machine", passed_sysconfig->getDisplayValue(Display::Name::Machine)); - systemSection->addSection("CPU", passed_sysconfig->getDisplayValue(Display::Name::CPU)); - systemSection->addSection("Memory", passed_sysconfig->getDisplayValue(Display::Name::Memory)); + systemSection->addSection("Machine", passed_sysconfig->getDisplayValue(VMManager::Display::Name::Machine)); + systemSection->addSection("CPU", passed_sysconfig->getDisplayValue(VMManager::Display::Name::CPU)); + systemSection->addSection("Memory", passed_sysconfig->getDisplayValue(VMManager::Display::Name::Memory)); // Video videoSection->clear(); - videoSection->addSection("Video", passed_sysconfig->getDisplayValue(Display::Name::Video)); - if(!passed_sysconfig->getDisplayValue(Display::Name::Voodoo).isEmpty()) { - videoSection->addSection("Voodoo", passed_sysconfig->getDisplayValue(Display::Name::Voodoo)); + videoSection->addSection("Video", passed_sysconfig->getDisplayValue(VMManager::Display::Name::Video)); + if(!passed_sysconfig->getDisplayValue(VMManager::Display::Name::Voodoo).isEmpty()) { + videoSection->addSection("Voodoo", passed_sysconfig->getDisplayValue(VMManager::Display::Name::Voodoo)); } // Disks storageSection->clear(); - storageSection->addSection("Disks", passed_sysconfig->getDisplayValue(Display::Name::Disks)); - storageSection->addSection("Floppy", passed_sysconfig->getDisplayValue(Display::Name::Floppy)); - storageSection->addSection("CD-ROM", passed_sysconfig->getDisplayValue(Display::Name::CD)); - storageSection->addSection("Removable disks", passed_sysconfig->getDisplayValue(Display::Name::RDisk)); - storageSection->addSection("MO", passed_sysconfig->getDisplayValue(Display::Name::MO)); - storageSection->addSection("SCSI", passed_sysconfig->getDisplayValue(Display::Name::SCSIController)); - storageSection->addSection("Controllers", passed_sysconfig->getDisplayValue(Display::Name::StorageController)); + storageSection->addSection("Disks", passed_sysconfig->getDisplayValue(VMManager::Display::Name::Disks)); + storageSection->addSection("Floppy", passed_sysconfig->getDisplayValue(VMManager::Display::Name::Floppy)); + storageSection->addSection("CD-ROM", passed_sysconfig->getDisplayValue(VMManager::Display::Name::CD)); + storageSection->addSection("Removable disks", passed_sysconfig->getDisplayValue(VMManager::Display::Name::RDisk)); + storageSection->addSection("MO", passed_sysconfig->getDisplayValue(VMManager::Display::Name::MO)); + storageSection->addSection("SCSI", passed_sysconfig->getDisplayValue(VMManager::Display::Name::SCSIController)); + storageSection->addSection("Controllers", passed_sysconfig->getDisplayValue(VMManager::Display::Name::StorageController)); // Audio audioSection->clear(); - audioSection->addSection("Audio", passed_sysconfig->getDisplayValue(Display::Name::Audio)); - audioSection->addSection("MIDI Out", passed_sysconfig->getDisplayValue(Display::Name::MidiOut)); + audioSection->addSection("Audio", passed_sysconfig->getDisplayValue(VMManager::Display::Name::Audio)); + audioSection->addSection("MIDI Out", passed_sysconfig->getDisplayValue(VMManager::Display::Name::MidiOut)); // Network networkSection->clear(); - networkSection->addSection("NIC", passed_sysconfig->getDisplayValue(Display::Name::NIC)); + networkSection->addSection("NIC", passed_sysconfig->getDisplayValue(VMManager::Display::Name::NIC)); // Input inputSection->clear(); - inputSection->addSection("Keyboard", passed_sysconfig->getDisplayValue(Display::Name::Keyboard)); - inputSection->addSection("Mouse", passed_sysconfig->getDisplayValue(Display::Name::Mouse)); - inputSection->addSection("Joystick", passed_sysconfig->getDisplayValue(Display::Name::Joystick)); + inputSection->addSection("Keyboard", passed_sysconfig->getDisplayValue(VMManager::Display::Name::Keyboard)); + inputSection->addSection("Mouse", passed_sysconfig->getDisplayValue(VMManager::Display::Name::Mouse)); + inputSection->addSection("Joystick", passed_sysconfig->getDisplayValue(VMManager::Display::Name::Joystick)); // Ports portsSection->clear(); - portsSection->addSection("Serial ports", passed_sysconfig->getDisplayValue(Display::Name::Serial)); - portsSection->addSection("Parallel ports", passed_sysconfig->getDisplayValue(Display::Name::Parallel)); + portsSection->addSection("Serial ports", passed_sysconfig->getDisplayValue(VMManager::Display::Name::Serial)); + portsSection->addSection("Parallel ports", passed_sysconfig->getDisplayValue(VMManager::Display::Name::Parallel)); // Other devices otherSection->clear(); - otherSection->addSection("ISA RTC", passed_sysconfig->getDisplayValue(Display::Name::IsaRtc)); - otherSection->addSection("ISA RAM", passed_sysconfig->getDisplayValue(Display::Name::IsaMem)); - otherSection->addSection("ISA ROM", passed_sysconfig->getDisplayValue(Display::Name::IsaRom)); + otherSection->addSection("ISA RTC", passed_sysconfig->getDisplayValue(VMManager::Display::Name::IsaRtc)); + otherSection->addSection("ISA RAM", passed_sysconfig->getDisplayValue(VMManager::Display::Name::IsaMem)); + otherSection->addSection("ISA ROM", passed_sysconfig->getDisplayValue(VMManager::Display::Name::IsaRom)); systemSection->setSections(); videoSection->setSections(); diff --git a/src/qt/qt_vmmanager_detailsection.cpp b/src/qt/qt_vmmanager_detailsection.cpp index ab9a4b5ff..afb71a5f0 100644 --- a/src/qt/qt_vmmanager_detailsection.cpp +++ b/src/qt/qt_vmmanager_detailsection.cpp @@ -145,7 +145,7 @@ VMManagerDetailSection::setSectionName(const QString &name) } void -VMManagerDetailSection::addSection(const QString &name, const QString &value, Display::Name displayField) +VMManagerDetailSection::addSection(const QString &name, const QString &value, VMManager::Display::Name displayField) { const auto new_section = DetailSection { name, value}; sections.push_back(new_section); diff --git a/src/qt/qt_vmmanager_main.cpp b/src/qt/qt_vmmanager_main.cpp index cfded658e..e53e2e407 100644 --- a/src/qt/qt_vmmanager_main.cpp +++ b/src/qt/qt_vmmanager_main.cpp @@ -31,10 +31,13 @@ #include #include "qt_vmmanager_main.hpp" +#include "qt_vmmanager_mainwindow.hpp" #include "ui_qt_vmmanager_main.h" #include "qt_vmmanager_model.hpp" #include "qt_vmmanager_addmachine.hpp" +extern VMManagerMainWindow* vmm_main_window; + // https://stackoverflow.com/a/36460740 bool copyPath(QString sourceDir, QString destinationDir, bool overWriteDirectory) { @@ -348,6 +351,10 @@ illegal_chars: } }); + connect(vm_model, &VMManagerModel::globalConfigurationChanged, this, [this] () { + vmm_main_window->updateSettings(); + }); + // Initial default details view vm_details = new VMManagerDetails(ui->detailsArea); ui->detailsArea->layout()->addWidget(vm_details); @@ -400,6 +407,12 @@ VMManagerMain::~VMManagerMain() { delete vm_model; } +void +VMManagerMain::updateGlobalSettings() +{ + vmm_main_window->updateSettings(); +} + void VMManagerMain::currentSelectionChanged(const QModelIndex ¤t, const QModelIndex &previous) @@ -768,6 +781,10 @@ VMManagerMain::onPreferencesUpdated() if (oldRegexSearch != regexSearch) { ui->searchBar->clear(); } + + if (vm_model) { + vm_model->sendGlobalConfigurationChanged(); + } } void diff --git a/src/qt/qt_vmmanager_main.hpp b/src/qt/qt_vmmanager_main.hpp index be43da705..070f30398 100644 --- a/src/qt/qt_vmmanager_main.hpp +++ b/src/qt/qt_vmmanager_main.hpp @@ -70,6 +70,7 @@ public slots: void shutdownForceButtonPressed() const; void searchSystems(const QString &text) const; void newMachineWizard(); + void updateGlobalSettings(); void deleteSystem(VMManagerSystem *sysconfig); void addNewSystem(const QString &name, const QString &dir, const QString &displayName = QString(), const QString &configFile = {}); #if __GNUC__ >= 11 diff --git a/src/qt/qt_vmmanager_mainwindow.cpp b/src/qt/qt_vmmanager_mainwindow.cpp index 6ee8979cd..55e980ec9 100644 --- a/src/qt/qt_vmmanager_mainwindow.cpp +++ b/src/qt/qt_vmmanager_mainwindow.cpp @@ -18,6 +18,7 @@ #include "qt_vmmanager_mainwindow.hpp" #include "qt_vmmanager_main.hpp" #include "qt_vmmanager_preferences.hpp" +#include "qt_vmmanager_windarkmodefilter.hpp" #include "ui_qt_vmmanager_mainwindow.h" #if EMU_BUILD_NUM != 0 # include "qt_updatecheckdialog.hpp" @@ -30,7 +31,16 @@ #include #include #include -#include +#include + +extern "C" +{ +extern void config_load_global(); +extern void config_save_global(); +} + +VMManagerMainWindow* vmm_main_window = nullptr; +extern WindowsDarkModeFilter* vmm_dark_mode_filter; VMManagerMainWindow:: VMManagerMainWindow(QWidget *parent) @@ -41,6 +51,8 @@ VMManagerMainWindow(QWidget *parent) { ui->setupUi(this); + vmm_main_window = this; + // Connect signals from the VMManagerMain widget connect(vmm, &VMManagerMain::selectionChanged, this, &VMManagerMainWindow::vmmSelectionChanged); @@ -118,6 +130,7 @@ VMManagerMainWindow(QWidget *parent) connect(this, &VMManagerMainWindow::languageUpdated, vmm, &VMManagerMain::onLanguageUpdated); #ifdef Q_OS_WINDOWS connect(this, &VMManagerMainWindow::darkModeUpdated, vmm, &VMManagerMain::onDarkModeUpdated); + connect(this, &VMManagerMainWindow::preferencesUpdated, [this] () { vmm_dark_mode_filter->reselectDarkMode(); }); #endif { @@ -187,6 +200,14 @@ VMManagerMainWindow::preferencesTriggered() } } +void +VMManagerMainWindow::updateSettings() +{ + config_load_global(); + emit preferencesUpdated(); + updateLanguage(); +} + void VMManagerMainWindow::saveSettings() const { diff --git a/src/qt/qt_vmmanager_mainwindow.hpp b/src/qt/qt_vmmanager_mainwindow.hpp index bde74765c..be02c3095 100644 --- a/src/qt/qt_vmmanager_mainwindow.hpp +++ b/src/qt/qt_vmmanager_mainwindow.hpp @@ -34,6 +34,7 @@ class VMManagerMainWindow final : public QMainWindow public: explicit VMManagerMainWindow(QWidget *parent = nullptr); ~VMManagerMainWindow() override; + void updateSettings(); signals: void preferencesUpdated(); void languageUpdated(); diff --git a/src/qt/qt_vmmanager_model.cpp b/src/qt/qt_vmmanager_model.cpp index 40baac90a..6e74da82c 100644 --- a/src/qt/qt_vmmanager_model.cpp +++ b/src/qt/qt_vmmanager_model.cpp @@ -23,6 +23,7 @@ VMManagerModel::VMManagerModel() { for ( const auto& each_config : machines_vec) { machines.append(each_config); connect(each_config, &VMManagerSystem::itemDataChanged, this, &VMManagerModel::modelDataChanged); + connect(each_config, &VMManagerSystem::globalConfigurationChanged, this, &VMManagerModel::globalConfigurationChanged); } } @@ -138,6 +139,7 @@ VMManagerModel::addConfigToModel(VMManagerSystem *system_config) beginInsertRows(QModelIndex(), this->rowCount(QModelIndex()), this->rowCount(QModelIndex())); machines.append(system_config); connect(system_config, &VMManagerSystem::itemDataChanged, this, &VMManagerModel::modelDataChanged); + connect(system_config, &VMManagerSystem::globalConfigurationChanged, this, &VMManagerModel::globalConfigurationChanged); endInsertRows(); } @@ -177,6 +179,16 @@ VMManagerModel::getProcessStats() return stats; } +void +VMManagerModel::sendGlobalConfigurationChanged() +{ + for (auto& system: machines) { + if (system->getProcessStatus() != VMManagerSystem::ProcessStatus::Stopped) { + system->sendGlobalConfigurationChanged(); + } + } +} + int VMManagerModel::getActiveMachineCount() { diff --git a/src/qt/qt_vmmanager_model.hpp b/src/qt/qt_vmmanager_model.hpp index 159dad9f2..af72f3bc9 100644 --- a/src/qt/qt_vmmanager_model.hpp +++ b/src/qt/qt_vmmanager_model.hpp @@ -60,8 +60,10 @@ public: QMap getProcessStats(); int getActiveMachineCount(); void refreshConfigs(); + void sendGlobalConfigurationChanged(); signals: void systemDataChanged(); + void globalConfigurationChanged(); private: QVector machines; diff --git a/src/qt/qt_vmmanager_preferences.cpp b/src/qt/qt_vmmanager_preferences.cpp index 49b7b4a1f..b709b0b13 100644 --- a/src/qt/qt_vmmanager_preferences.cpp +++ b/src/qt/qt_vmmanager_preferences.cpp @@ -24,6 +24,11 @@ #include "qt_vmmanager_config.hpp" #include "ui_qt_vmmanager_preferences.h" +#ifdef Q_OS_WINDOWS +#include "qt_vmmanager_windarkmodefilter.hpp" +extern WindowsDarkModeFilter* vmm_dark_mode_filter; +#endif + extern "C" { #include <86box/86box.h> #include <86box/config.h> @@ -66,7 +71,13 @@ VMManagerPreferences(QWidget *parent) : ui(new Ui::VMManagerPreferences) const auto useRegexSearch = config->getStringValue("regex_search").toInt(); ui->regexSearchCheckBox->setChecked(useRegexSearch); + ui->radioButtonSystem->setChecked(color_scheme == 0); + ui->radioButtonLight->setChecked(color_scheme == 1); + ui->radioButtonDark->setChecked(color_scheme == 2); +#ifndef Q_OS_WINDOWS + ui->groupBoxColorScheme->setHidden(true); +#endif } VMManagerPreferences::~ @@ -95,6 +106,7 @@ VMManagerPreferences::accept() strncpy(vmm_path_cfg, QDir::cleanPath(ui->systemDirectory->text()).toUtf8().constData(), sizeof(vmm_path_cfg) - 1); lang_id = ui->comboBoxLanguage->currentData().toInt(); + color_scheme = (ui->radioButtonSystem->isChecked()) ? 0 : (ui->radioButtonLight->isChecked() ? 1 : 2); config_save_global(); #if EMU_BUILD_NUM != 0 diff --git a/src/qt/qt_vmmanager_preferences.ui b/src/qt/qt_vmmanager_preferences.ui index 37caaae56..ab96109e6 100644 --- a/src/qt/qt_vmmanager_preferences.ui +++ b/src/qt/qt_vmmanager_preferences.ui @@ -7,13 +7,16 @@ 0 0 400 - 300 + 475 Preferences + + QLayout::SizeConstraint::SetFixedSize + @@ -103,10 +106,40 @@ + + + + Color scheme + + + + + + System + + + + + + + Light + + + + + + + Dark + + + + + + - Qt::Vertical + Qt::Orientation::Vertical @@ -119,10 +152,10 @@ - Qt::Horizontal + Qt::Orientation::Horizontal - QDialogButtonBox::Cancel|QDialogButtonBox::Ok + QDialogButtonBox::StandardButton::Cancel|QDialogButtonBox::StandardButton::Ok diff --git a/src/qt/qt_vmmanager_protocol.cpp b/src/qt/qt_vmmanager_protocol.cpp index bc1805411..d113ba203 100644 --- a/src/qt/qt_vmmanager_protocol.cpp +++ b/src/qt/qt_vmmanager_protocol.cpp @@ -95,6 +95,8 @@ VMManagerProtocol::getClientMessageType(const QJsonObject &json_document) return VMManagerProtocol::ClientMessage::ConfigurationChanged; } else if (message_type == "WinIdMessage") { return VMManagerProtocol::ClientMessage::WinIdMessage; + } else if (message_type == "GlobalConfigurationChanged") { + return VMManagerProtocol::ClientMessage::GlobalConfigurationChanged; } return VMManagerProtocol::ClientMessage::UnknownMessage; } @@ -119,6 +121,8 @@ VMManagerProtocol::getManagerMessageType(const QJsonObject &json_document) return VMManagerProtocol::ManagerMessage::RequestShutdown; } if (message_type == "ForceShutdown") { return VMManagerProtocol::ManagerMessage::ForceShutdown; + } if (message_type == "GlobalConfigurationChanged") { + return VMManagerProtocol::ManagerMessage::GlobalConfigurationChanged; } return VMManagerProtocol::ManagerMessage::UnknownMessage; } diff --git a/src/qt/qt_vmmanager_protocol.hpp b/src/qt/qt_vmmanager_protocol.hpp index 90f7e4eeb..99c88d808 100644 --- a/src/qt/qt_vmmanager_protocol.hpp +++ b/src/qt/qt_vmmanager_protocol.hpp @@ -43,6 +43,7 @@ public: ResetVM, RequestShutdown, ForceShutdown, + GlobalConfigurationChanged, UnknownMessage, }; @@ -56,6 +57,7 @@ public: RunningStateChanged, ConfigurationChanged, WinIdMessage, + GlobalConfigurationChanged, UnknownMessage, }; Q_ENUM(ClientMessage); diff --git a/src/qt/qt_vmmanager_serversocket.cpp b/src/qt/qt_vmmanager_serversocket.cpp index 1364ff794..edd1e6c02 100644 --- a/src/qt/qt_vmmanager_serversocket.cpp +++ b/src/qt/qt_vmmanager_serversocket.cpp @@ -189,6 +189,10 @@ VMManagerServerSocket::jsonReceived(const QJsonObject &json) qDebug("Configuration change received from client"); emit configurationChanged(); break; + case VMManagerProtocol::ClientMessage::GlobalConfigurationChanged: + qDebug("Global configuration change received from client"); + emit globalConfigurationChanged(); + break; default: qDebug("Unknown client message type received:"); qDebug() << json; diff --git a/src/qt/qt_vmmanager_serversocket.hpp b/src/qt/qt_vmmanager_serversocket.hpp index 30ad02b2c..ff1950771 100644 --- a/src/qt/qt_vmmanager_serversocket.hpp +++ b/src/qt/qt_vmmanager_serversocket.hpp @@ -76,6 +76,7 @@ signals: void windowStatusChanged(int status); void runningStatusChanged(VMManagerProtocol::RunningState state); void configurationChanged(); + void globalConfigurationChanged(); void winIdReceived(WId id); diff --git a/src/qt/qt_vmmanager_system.cpp b/src/qt/qt_vmmanager_system.cpp index 00b699163..8079f1ba0 100644 --- a/src/qt/qt_vmmanager_system.cpp +++ b/src/qt/qt_vmmanager_system.cpp @@ -557,7 +557,7 @@ VMManagerSystem::setupVars() { } } } - display_table[Display::Name::Machine] = machine_name; + display_table[VMManager::Display::Name::Machine] = machine_name; // CPU: Combine name with speed and FPU QString cpu_name = "Unknown"; @@ -592,34 +592,34 @@ VMManagerSystem::setupVars() { // int speed_display = machine_config["cpu_speed"].toInt() / 1000000; // cpu_name.append(QString::number(speed_display).prepend(" / ")); // cpu_name.append(QCoreApplication::translate("", "MHz").prepend(' ')); - display_table[Display::Name::CPU] = cpu_name; + display_table[VMManager::Display::Name::CPU] = cpu_name; // Memory int divisor = (ram_granularity < 1024) ? 1 : 1024; QString display_unit = (divisor == 1) ? "KB" : "MB"; auto mem_display = QString::number(machine_config["mem_size"].toInt() / divisor); mem_display.append(QCoreApplication::translate("", display_unit.toUtf8().constData()).prepend(' ')); - display_table[Display::Name::Memory] = mem_display; + display_table[VMManager::Display::Name::Memory] = mem_display; // Video card int video_int = video_get_video_from_internal_name(video_config["gfxcard"].toUtf8().data()); const device_t* video_dev = video_card_getdevice(video_int); - display_table[Display::Name::Video] = DeviceConfig::DeviceName(video_dev, video_get_internal_name(video_int), 1); + display_table[VMManager::Display::Name::Video] = DeviceConfig::DeviceName(video_dev, video_get_internal_name(video_int), 1); // Secondary video if (video_config.contains("gfxcard_2")) { int video2_int = video_get_video_from_internal_name(video_config["gfxcard_2"].toUtf8().data()); const device_t* video2_dev = video_card_getdevice(video2_int); - display_table[Display::Name::Video].append(DeviceConfig::DeviceName(video2_dev, video_get_internal_name(video2_int), 1).prepend(VMManagerDetailSection::sectionSeparator)); + display_table[VMManager::Display::Name::Video].append(DeviceConfig::DeviceName(video2_dev, video_get_internal_name(video2_int), 1).prepend(VMManagerDetailSection::sectionSeparator)); } // Add-on video that's not Voodoo if (video_config.contains("8514a") && (video_config["8514a"].toInt() != 0)) - display_table[Display::Name::Video].append(tr("IBM 8514/A Graphics").prepend(VMManagerDetailSection::sectionSeparator)); + display_table[VMManager::Display::Name::Video].append(tr("IBM 8514/A Graphics").prepend(VMManagerDetailSection::sectionSeparator)); if (video_config.contains("xga") && (video_config["xga"].toInt() != 0)) - display_table[Display::Name::Video].append(tr("XGA Graphics").prepend(VMManagerDetailSection::sectionSeparator)); + display_table[VMManager::Display::Name::Video].append(tr("XGA Graphics").prepend(VMManagerDetailSection::sectionSeparator)); if (video_config.contains("da2") && (video_config["da2"].toInt() != 0)) - display_table[Display::Name::Video].append(tr("IBM PS/55 Display Adapter Graphics").prepend(VMManagerDetailSection::sectionSeparator)); + display_table[VMManager::Display::Name::Video].append(tr("IBM PS/55 Display Adapter Graphics").prepend(VMManagerDetailSection::sectionSeparator)); // Voodoo QString voodoo_name = ""; @@ -641,7 +641,7 @@ VMManagerSystem::setupVars() { break; } } - display_table[Display::Name::Voodoo] = voodoo_name; + display_table[VMManager::Display::Name::Voodoo] = voodoo_name; // Drives // First the number of disks @@ -666,7 +666,7 @@ VMManagerSystem::setupVars() { if (disks.count()) { disks_display.append(" / ").append(bus_types.keys().join(", ").toUpper()); } -// display_table[Display::Name::Disks] = disks_display; +// display_table[VMManager::Display::Name::Disks] = disks_display; // Drives QString new_disk_display; @@ -699,7 +699,7 @@ VMManagerSystem::setupVars() { if(new_disk_display.isEmpty()) { new_disk_display = tr("No disks"); } - display_table[Display::Name::Disks] = new_disk_display; + display_table[VMManager::Display::Name::Disks] = new_disk_display; // Floppy & CD-ROM QStringList floppyDevices; @@ -748,8 +748,8 @@ VMManagerSystem::setupVars() { } } - display_table[Display::Name::Floppy] = floppyDevices.join(VMManagerDetailSection::sectionSeparator); - display_table[Display::Name::CD] = cdromDevices.join(VMManagerDetailSection::sectionSeparator); + display_table[VMManager::Display::Name::Floppy] = floppyDevices.join(VMManagerDetailSection::sectionSeparator); + display_table[VMManager::Display::Name::CD] = cdromDevices.join(VMManagerDetailSection::sectionSeparator); // Removable disks & MO QStringList rdiskDevices; @@ -786,8 +786,8 @@ VMManagerSystem::setupVars() { } } - display_table[Display::Name::RDisk] = rdiskDevices.join(VMManagerDetailSection::sectionSeparator); - display_table[Display::Name::MO] = moDevices.join(VMManagerDetailSection::sectionSeparator); + display_table[VMManager::Display::Name::RDisk] = rdiskDevices.join(VMManagerDetailSection::sectionSeparator); + display_table[VMManager::Display::Name::MO] = moDevices.join(VMManagerDetailSection::sectionSeparator); // SCSI controllers @@ -805,7 +805,7 @@ VMManagerSystem::setupVars() { } } } - display_table[Display::Name::SCSIController] = scsiControllers.join(VMManagerDetailSection::sectionSeparator); + display_table[VMManager::Display::Name::SCSIController] = scsiControllers.join(VMManagerDetailSection::sectionSeparator); // Hard and floppy disk controllers QStringList storageControllers; @@ -864,7 +864,7 @@ VMManagerSystem::setupVars() { if (storage_config.contains(ide_qua_internal_name) && (storage_config[ide_qua_internal_name].toInt() != 0)) storageControllers.append(DeviceConfig::DeviceName(hdc_get_device(hdc_get_from_internal_name(ide_qua_internal_name.toUtf8().data())), ide_qua_internal_name.toUtf8().constData(), 1)); - display_table[Display::Name::StorageController] = storageControllers.join(VMManagerDetailSection::sectionSeparator); + display_table[VMManager::Display::Name::StorageController] = storageControllers.join(VMManagerDetailSection::sectionSeparator); // Audio QStringList sndCards; @@ -889,7 +889,7 @@ VMManagerSystem::setupVars() { if(sndCards.isEmpty()) { sndCards.append(tr("None")); } - display_table[Display::Name::Audio] = sndCards.join(VMManagerDetailSection::sectionSeparator); + display_table[VMManager::Display::Name::Audio] = sndCards.join(VMManagerDetailSection::sectionSeparator); // MIDI QString midiOutDev; @@ -901,7 +901,7 @@ VMManagerSystem::setupVars() { midiOutDev = midiDevName; } } - display_table[Display::Name::MidiOut] = midiOutDev; + display_table[VMManager::Display::Name::MidiOut] = midiOutDev; // midi_device = mt32 (output) // mpu401_standalone = 1 @@ -940,21 +940,21 @@ VMManagerSystem::setupVars() { if(nicList.isEmpty()) { nicList.append(tr("None")); } - display_table[Display::Name::NIC] = nicList.join(VMManagerDetailSection::sectionSeparator); + display_table[VMManager::Display::Name::NIC] = nicList.join(VMManagerDetailSection::sectionSeparator); // Input (Keyboard) if (input_config.contains("keyboard_type")) { auto keyboard_internal_name = input_config["keyboard_type"]; auto keyboard_dev = keyboard_get_from_internal_name(keyboard_internal_name.toUtf8().data()); auto keyboard_dev_name = DeviceConfig::DeviceName(keyboard_get_device(keyboard_dev), keyboard_get_internal_name(keyboard_dev), 0); - display_table[Display::Name::Keyboard] = keyboard_dev_name; + display_table[VMManager::Display::Name::Keyboard] = keyboard_dev_name; } // Input (Mouse) auto mouse_internal_name = input_config["mouse_type"]; auto mouse_dev = mouse_get_from_internal_name(mouse_internal_name.toUtf8().data()); auto mouse_dev_name = DeviceConfig::DeviceName(mouse_get_device(mouse_dev), mouse_get_internal_name(mouse_dev), 0); - display_table[Display::Name::Mouse] = mouse_dev_name; + display_table[VMManager::Display::Name::Mouse] = mouse_dev_name; // Input (joystick) QString joystickDevice; @@ -965,7 +965,7 @@ VMManagerSystem::setupVars() { joystickDevice = joystickName; } } - display_table[Display::Name::Joystick] = joystickDevice; + display_table[VMManager::Display::Name::Joystick] = joystickDevice; // # Ports // Serial @@ -1026,8 +1026,8 @@ VMManagerSystem::setupVars() { if (portIndex == PARALLEL_MAX) break; } - display_table[Display::Name::Serial] = (serialFinal.empty() ? tr("None") : serialFinal.join(", ")); - display_table[Display::Name::Parallel] = (lptFinal.empty() ? tr("None") : lptFinal.join((hasLptDevices ? VMManagerDetailSection::sectionSeparator : ", "))); + display_table[VMManager::Display::Name::Serial] = (serialFinal.empty() ? tr("None") : serialFinal.join(", ")); + display_table[VMManager::Display::Name::Parallel] = (lptFinal.empty() ? tr("None") : lptFinal.join((hasLptDevices ? VMManagerDetailSection::sectionSeparator : ", "))); // ISA RTC QString isartc_dev_name = ""; @@ -1036,7 +1036,7 @@ VMManagerSystem::setupVars() { auto isartc_dev = isartc_get_from_internal_name(isartc_internal_name.toUtf8().data()); isartc_dev_name = DeviceConfig::DeviceName(isartc_get_device(isartc_dev), isartc_get_internal_name(isartc_dev), 0); } - display_table[Display::Name::IsaRtc] = isartc_dev_name; + display_table[VMManager::Display::Name::IsaRtc] = isartc_dev_name; // ISA RAM QStringList IsaMemCards; @@ -1053,7 +1053,7 @@ VMManagerSystem::setupVars() { } } } - display_table[Display::Name::IsaMem] = IsaMemCards.join(VMManagerDetailSection::sectionSeparator); + display_table[VMManager::Display::Name::IsaMem] = IsaMemCards.join(VMManagerDetailSection::sectionSeparator); // ISA ROM QStringList IsaRomCards; @@ -1070,7 +1070,7 @@ VMManagerSystem::setupVars() { } } } - display_table[Display::Name::IsaRom] = IsaRomCards.join(VMManagerDetailSection::sectionSeparator); + display_table[VMManager::Display::Name::IsaRom] = IsaRomCards.join(VMManagerDetailSection::sectionSeparator); } bool @@ -1081,6 +1081,7 @@ VMManagerSystem::startServer() { connect(socket_server, &VMManagerServerSocket::windowStatusChanged, this, &VMManagerSystem::windowStatusChangeReceived); connect(socket_server, &VMManagerServerSocket::runningStatusChanged, this, &VMManagerSystem::runningStatusChangeReceived); connect(socket_server, &VMManagerServerSocket::configurationChanged, this, &VMManagerSystem::configurationChangeReceived); + connect(socket_server, &VMManagerServerSocket::globalConfigurationChanged, this, &VMManagerSystem::globalConfigurationChanged); connect(socket_server, &VMManagerServerSocket::winIdReceived, this, [this] (WId id) { this->id = id; }); return true; } else { @@ -1119,11 +1120,17 @@ VMManagerSystem::windowStatusChangeReceived(int status) processStatusChanged(); } QString -VMManagerSystem::getDisplayValue(Display::Name key) +VMManagerSystem::getDisplayValue(VMManager::Display::Name key) { return (display_table.contains(key)) ? display_table[key] : ""; } +void +VMManagerSystem::sendGlobalConfigurationChanged() +{ + socket_server->serverSendMessage(VMManagerProtocol::ManagerMessage::GlobalConfigurationChanged); +} + void VMManagerSystem::shutdownRequestButtonPressed() { diff --git a/src/qt/qt_vmmanager_system.hpp b/src/qt/qt_vmmanager_system.hpp index 5914e46cb..e40e2d4e1 100644 --- a/src/qt/qt_vmmanager_system.hpp +++ b/src/qt/qt_vmmanager_system.hpp @@ -129,6 +129,7 @@ public slots: void shutdownForceButtonPressed(); void cadButtonPressed(); void reloadConfig(); + void sendGlobalConfigurationChanged(); public: QDateTime timestamp(); void setIcon(const QString &newIcon); @@ -157,6 +158,7 @@ signals: void itemDataChanged(); void clientProcessStatusChanged(); void configurationChanged(const QString &uuid); + void globalConfigurationChanged(); private: void loadSettings(); diff --git a/src/qt/qt_vmmanager_windarkmodefilter.cpp b/src/qt/qt_vmmanager_windarkmodefilter.cpp index 195419ad9..c95bc0c0f 100644 --- a/src/qt/qt_vmmanager_windarkmodefilter.cpp +++ b/src/qt/qt_vmmanager_windarkmodefilter.cpp @@ -38,6 +38,48 @@ static bool NewDarkMode = FALSE; +void +WindowsDarkModeFilter::reselectDarkMode() +{ + bool OldDarkMode = NewDarkMode; + + if (!util::isWindowsLightTheme()) { + QFile f(":qdarkstyle/dark/darkstyle.qss"); + + if (!f.exists()) + printf("Unable to set stylesheet, file not found\n"); + else { + f.open(QFile::ReadOnly | QFile::Text); + QTextStream ts(&f); + qApp->setStyleSheet(ts.readAll()); + } + QPalette palette(qApp->palette()); + palette.setColor(QPalette::Link, Qt::white); + palette.setColor(QPalette::LinkVisited, Qt::lightGray); + qApp->setPalette(palette); + window->resize(window->size()); + + NewDarkMode = TRUE; + } else { + qApp->setStyleSheet(""); + QPalette palette(qApp->palette()); + palette.setColor(QPalette::Link, Qt::blue); + palette.setColor(QPalette::LinkVisited, Qt::magenta); + qApp->setPalette(palette); + window->resize(window->size()); + NewDarkMode = FALSE; + } + window->updateDarkMode(); + + if (NewDarkMode != OldDarkMode) QTimer::singleShot(1000, [this] () { + BOOL DarkMode = NewDarkMode; + DwmSetWindowAttribute((HWND) window->winId(), + DWMWA_USE_IMMERSIVE_DARK_MODE, + (LPCVOID) &DarkMode, + sizeof(DarkMode)); + }); +} + void WindowsDarkModeFilter::setWindow(VMManagerMainWindow *window) { @@ -52,45 +94,9 @@ WindowsDarkModeFilter::nativeEventFilter(const QByteArray &eventType, void *mess if ((msg != nullptr) && (msg->message == WM_SETTINGCHANGE)) { if ((((void *) msg->lParam) != nullptr) && - (wcscmp(L"ImmersiveColorSet", (wchar_t*)msg->lParam) == 0)) { - - bool OldDarkMode = NewDarkMode; - - if (!util::isWindowsLightTheme()) { - QFile f(":qdarkstyle/dark/darkstyle.qss"); - - if (!f.exists()) - printf("Unable to set stylesheet, file not found\n"); - else { - f.open(QFile::ReadOnly | QFile::Text); - QTextStream ts(&f); - qApp->setStyleSheet(ts.readAll()); - } - QPalette palette(qApp->palette()); - palette.setColor(QPalette::Link, Qt::white); - palette.setColor(QPalette::LinkVisited, Qt::lightGray); - qApp->setPalette(palette); - window->resize(window->size()); - - NewDarkMode = TRUE; - } else { - qApp->setStyleSheet(""); - QPalette palette(qApp->palette()); - palette.setColor(QPalette::Link, Qt::blue); - palette.setColor(QPalette::LinkVisited, Qt::magenta); - qApp->setPalette(palette); - window->resize(window->size()); - NewDarkMode = FALSE; - } - window->updateDarkMode(); - - if (NewDarkMode != OldDarkMode) QTimer::singleShot(1000, [this] () { - BOOL DarkMode = NewDarkMode; - DwmSetWindowAttribute((HWND) window->winId(), - DWMWA_USE_IMMERSIVE_DARK_MODE, - (LPCVOID) &DarkMode, - sizeof(DarkMode)); - }); + (wcscmp(L"ImmersiveColorSet", (wchar_t*)msg->lParam) == 0) && + color_scheme == 0) { + reselectDarkMode(); } } } diff --git a/src/qt/qt_vmmanager_windarkmodefilter.hpp b/src/qt/qt_vmmanager_windarkmodefilter.hpp index 4f6b28a6e..e89b22acd 100644 --- a/src/qt/qt_vmmanager_windarkmodefilter.hpp +++ b/src/qt/qt_vmmanager_windarkmodefilter.hpp @@ -39,6 +39,7 @@ public: WindowsDarkModeFilter() = default; void setWindow(VMManagerMainWindow *window); bool nativeEventFilter(const QByteArray &eventType, void *message, result_t *result) override; + void reselectDarkMode(); private: VMManagerMainWindow *window; diff --git a/src/qt/qt_winrawinputfilter.cpp b/src/qt/qt_winrawinputfilter.cpp index 9b7adce1d..9029f4fcd 100644 --- a/src/qt/qt_winrawinputfilter.cpp +++ b/src/qt/qt_winrawinputfilter.cpp @@ -74,7 +74,9 @@ extern void win_keyboard_handle(uint32_t scancode, int up, int e0, int e1); #include "qt_util.hpp" #include "ui_qt_mainwindow.h" -static bool NewDarkMode = FALSE; +bool NewDarkMode = FALSE; + +extern MainWindow* main_window; struct { @@ -307,6 +309,56 @@ device_change(WPARAM wParam, LPARAM lParam) } } +void +selectDarkMode() +{ + bool OldDarkMode = NewDarkMode; + + if (!util::isWindowsLightTheme()) { + QFile f(":qdarkstyle/dark/darkstyle.qss"); + + if (!f.exists()) + printf("Unable to set stylesheet, file not found\n"); + else { + f.open(QFile::ReadOnly | QFile::Text); + QTextStream ts(&f); + qApp->setStyleSheet(ts.readAll()); + } + QPalette palette(qApp->palette()); + palette.setColor(QPalette::Link, Qt::white); + palette.setColor(QPalette::LinkVisited, Qt::lightGray); + qApp->setPalette(palette); + NewDarkMode = TRUE; + } else { + qApp->setStyleSheet(""); + QPalette palette(qApp->palette()); + palette.setColor(QPalette::Link, Qt::blue); + palette.setColor(QPalette::LinkVisited, Qt::magenta); + qApp->setPalette(palette); + NewDarkMode = FALSE; + } + + if (NewDarkMode != OldDarkMode) + QTimer::singleShot(1000, []() { + BOOL DarkMode = NewDarkMode; + DwmSetWindowAttribute((HWND) main_window->winId(), + DWMWA_USE_IMMERSIVE_DARK_MODE, + (LPCVOID) &DarkMode, + sizeof(DarkMode)); + + main_window->resizeContents(monitors[0].mon_scrnsz_x, + monitors[0].mon_scrnsz_y); + + for (int i = 1; i < MONITORS_NUM; i++) { + auto mon = &(monitors[i]); + + if ((main_window->renderers[i] != nullptr) && !main_window->renderers[i]->isHidden()) + main_window->resizeContentsMonitor(mon->mon_scrnsz_x, + mon->mon_scrnsz_y, i); + } + }); +} + bool WindowsRawInputFilter::nativeEventFilter(const QByteArray &eventType, void *message, result_t *result) { @@ -328,7 +380,8 @@ WindowsRawInputFilter::nativeEventFilter(const QByteArray &eventType, void *mess return true; case WM_SETTINGCHANGE: if ((((void *) msg->lParam) != nullptr) && - (wcscmp(L"ImmersiveColorSet", (wchar_t*)msg->lParam) == 0)) { + (wcscmp(L"ImmersiveColorSet", (wchar_t*)msg->lParam) == 0) && + color_scheme == 0) { bool OldDarkMode = NewDarkMode; #if 0 diff --git a/src/qt/win_serial_passthrough.c b/src/qt/win_serial_passthrough.c index 4ea6a1875..87252e88d 100644 --- a/src/qt/win_serial_passthrough.c +++ b/src/qt/win_serial_passthrough.c @@ -82,6 +82,26 @@ plat_serpt_write_vcon(serial_passthrough_t *dev, uint8_t data) WriteFile((HANDLE) dev->master_fd, &data, 1, &bytesWritten, NULL); } +void +plat_serpt_set_line_state(void *priv) +{ + const serial_passthrough_t *dev = (serial_passthrough_t *) priv; + + if (dev->mode == SERPT_MODE_HOSTSER) { + DWORD msrstate; + EscapeCommFunction((HANDLE) dev->master_fd, (dev->serial->mctrl & 1) ? SETDTR : CLRDTR); + EscapeCommFunction((HANDLE) dev->master_fd, (dev->serial->mctrl & 2) ? SETRTS : CLRRTS); + EscapeCommFunction((HANDLE) dev->master_fd, (dev->serial->lcr & (1 << 6) ? SETBREAK : CLRBREAK)); + + if (GetCommModemStatus((HANDLE) dev->master_fd, &msrstate)) { + serial_set_dcd(dev->serial, !!(msrstate & MS_RLSD_ON)); + serial_set_dsr(dev->serial, !!(msrstate & MS_DSR_ON)); + serial_set_cts(dev->serial, !!(msrstate & MS_CTS_ON)); + serial_set_ri(dev->serial, !!(msrstate & MS_RING_ON)); + } + } +} + void plat_serpt_set_params(void *priv) { @@ -108,6 +128,13 @@ plat_serpt_set_params(void *priv) BAUDRATE_RANGE(dev->baudrate, 57600, 115200); BAUDRATE_RANGE(dev->baudrate, 115200, 0xFFFFFFFF); + serialattr.fRtsControl = RTS_CONTROL_ENABLE; + serialattr.fDtrControl = DTR_CONTROL_ENABLE; + serialattr.fDsrSensitivity = FALSE; + serialattr.fAbortOnError = FALSE; + + serialattr.fInX = FALSE; + serialattr.fOutX = FALSE; serialattr.ByteSize = dev->data_bits; serialattr.StopBits = (dev->serial->lcr & 0x04) ? TWOSTOPBITS : ONESTOPBIT; if (!(dev->serial->lcr & 0x08)) { @@ -122,7 +149,21 @@ plat_serpt_set_params(void *priv) } } - SetCommState((HANDLE) dev->master_fd, &serialattr); + (void) SetCommState((HANDLE) dev->master_fd, &serialattr); + + { + DWORD msrstate; + EscapeCommFunction((HANDLE) dev->master_fd, (dev->serial->mctrl & 1) ? SETDTR : CLRDTR); + EscapeCommFunction((HANDLE) dev->master_fd, (dev->serial->mctrl & 2) ? SETRTS : CLRRTS); + EscapeCommFunction((HANDLE) dev->master_fd, (dev->serial->lcr & (1 << 6) ? SETBREAK : CLRBREAK)); + + if (GetCommModemStatus((HANDLE) dev->master_fd, &msrstate)) { + serial_set_dcd(dev->serial, !!(msrstate & MS_RLSD_ON)); + serial_set_dsr(dev->serial, !!(msrstate & MS_DSR_ON)); + serial_set_cts(dev->serial, !!(msrstate & MS_CTS_ON)); + serial_set_ri(dev->serial, !!(msrstate & MS_RING_ON)); + } + } #undef BAUDRATE_RANGE } } diff --git a/src/sio/sio_um8669f.c b/src/sio/sio_um8669f.c index f0460ada9..96c37573d 100644 --- a/src/sio/sio_um8669f.c +++ b/src/sio/sio_um8669f.c @@ -209,6 +209,9 @@ um8669f_pnp_config_changed(uint8_t ld, isapnp_device_config_t *config, void *pri if (config->activate && (config->io[0].base != ISAPNP_IO_DISABLED)) { um8669f_log("UM8669F: LPT enabled at port %04X IRQ %d\n", config->io[0].base, config->irq[0].irq); lpt_port_setup(dev->lpt, config->io[0].base); + + lpt_port_irq(dev->lpt, config->irq[0].irq); + lpt_port_dma(dev->lpt, (config->dma[0].dma == ISAPNP_DMA_DISABLED) ? -1 : config->dma[0].dma); } else { um8669f_log("UM8669F: LPT disabled\n"); } diff --git a/src/sio/sio_um866x.c b/src/sio/sio_um866x.c index bc1127a8b..0c6f04484 100644 --- a/src/sio/sio_um866x.c +++ b/src/sio/sio_um866x.c @@ -108,25 +108,27 @@ um866x_lpt_handler(um866x_t *dev) int enabled = (dev->regs[0] & 0x08); lpt_port_remove(dev->lpt); - switch(dev->regs[1] & 0xc0) { - case 0x00: - enabled = 0; - break; - case 0x40: - lpt_set_epp(dev->lpt, 1); - lpt_set_ecp(dev->lpt, 0); - lpt_set_ext(dev->lpt, 0); - break; - case 0x80: - lpt_set_epp(dev->lpt, 0); - lpt_set_ecp(dev->lpt, 0); - lpt_set_ext(dev->lpt, 1); - break; - case 0xc0: - lpt_set_epp(dev->lpt, 0); - lpt_set_ecp(dev->lpt, 1); - lpt_set_ext(dev->lpt, 0); - break; + if (dev->max_reg != 0x00) { + switch(dev->regs[1] & 0xc0) { + case 0x00: + enabled = 0; + break; + case 0x40: + lpt_set_epp(dev->lpt, 1); + lpt_set_ecp(dev->lpt, 0); + lpt_set_ext(dev->lpt, 0); + break; + case 0x80: + lpt_set_epp(dev->lpt, 0); + lpt_set_ecp(dev->lpt, 0); + lpt_set_ext(dev->lpt, 1); + break; + case 0xc0: + lpt_set_epp(dev->lpt, 0); + lpt_set_ecp(dev->lpt, 1); + lpt_set_ext(dev->lpt, 0); + break; + } } if (enabled) { switch ((dev->regs[1] >> 3) & 0x01) { diff --git a/src/sio/sio_w837x7.c b/src/sio/sio_w837x7.c index 3b5924b27..0b6aae240 100644 --- a/src/sio/sio_w837x7.c +++ b/src/sio/sio_w837x7.c @@ -390,7 +390,7 @@ w837x7_reset(w837x7_t *dev) if (dev->has_ide == 0x02) dev->regs[0x00] = 0x90; - else if (dev->has_ide == 0x01) + else dev->regs[0x00] = 0xd0; if (dev->ide_start) diff --git a/src/sound/snd_covox.c b/src/sound/snd_covox.c index aaffbcf08..c7e32c7dc 100644 --- a/src/sound/snd_covox.c +++ b/src/sound/snd_covox.c @@ -95,17 +95,17 @@ covox_write(uint16_t addr, uint8_t val, void *priv) switch (addr) { case 0x221: // Soundman case 0x229: // Soundman - case 0x22f: // Soundman, voicemasterkey + case 0x22f: // Soundman, voicemasterkey soundmasterplus case 0x231: // isadac-r1? - case 0x24f: // voicemasterkey + case 0x24f: // voicemasterkey soundmasterplus case 0x279: // isadac-r0 (lPT2) case 0x28f: // voicemasterkey case 0x2cf: // voicemasterkey case 0x301: // Soundman case 0x309: // Soundman case 0x30f: // soundman - case 0x331: // soundmasterplus - case 0x339: // soundmasterplus + case 0x331: // + case 0x339: // case 0x371: // isadac-r0 case 0x379: // isadac-r0 (lPT1) case 0x381: // isadac-r0 @@ -281,12 +281,12 @@ static const device_config_t soundmasterplus_config[] = { .description = "Address", .type = CONFIG_HEX16, .default_string = NULL, - .default_int = 0x330, + .default_int = 0x22e, .file_filter = NULL, .spinner = { 0 }, .selection = { - { .description = "0x330", .value = 0x330 }, - { .description = "0x338", .value = 0x338 }, + { .description = "0x22e", .value = 0x22e }, + { .description = "0x24e", .value = 0x24e }, { .description = "" } }, .bios = { { 0 } } diff --git a/src/sound/snd_lpt_dac.c b/src/sound/snd_lpt_dac.c index 99cf66916..33b197230 100644 --- a/src/sound/snd_lpt_dac.c +++ b/src/sound/snd_lpt_dac.c @@ -124,7 +124,6 @@ const lpt_device_t lpt_dac_device = { .close = dac_close, .write_data = dac_write_data, .write_ctrl = dac_write_ctrl, - .autofeed = NULL, .strobe = dac_strobe, .read_status = dac_read_status, .read_ctrl = NULL, @@ -141,7 +140,6 @@ const lpt_device_t lpt_dac_stereo_device = { .close = dac_close, .write_data = dac_write_data, .write_ctrl = dac_write_ctrl, - .autofeed = NULL, .strobe = dac_strobe, .read_status = dac_read_status, .read_ctrl = NULL, diff --git a/src/sound/snd_lpt_dss.c b/src/sound/snd_lpt_dss.c index 206f44ec8..5ea0048f4 100644 --- a/src/sound/snd_lpt_dss.c +++ b/src/sound/snd_lpt_dss.c @@ -139,7 +139,6 @@ const lpt_device_t dss_device = { .init = dss_init, .close = dss_close, .write_data = dss_write_data, - .autofeed = NULL, .strobe = NULL, .write_ctrl = dss_write_ctrl, .read_status = dss_read_status, diff --git a/src/unix/assets/86Box.spec b/src/unix/assets/86Box.spec index 000fb07c3..0e57beb1c 100644 --- a/src/unix/assets/86Box.spec +++ b/src/unix/assets/86Box.spec @@ -15,7 +15,7 @@ %global romver 4.1 Name: 86Box -Version: 5.0.1 +Version: 5.1 Release: 1%{?dist} Summary: Classic PC emulator License: GPLv2+ @@ -121,5 +121,5 @@ popd %{_datadir}/%{name}/roms %changelog -* Sat Aug 31 Jasmine Iwanek 5.0.1-1 +* Sat Aug 31 Jasmine Iwanek 5.1-1 - Bump release diff --git a/src/unix/assets/net.86box.86Box.metainfo.xml b/src/unix/assets/net.86box.86Box.metainfo.xml index 49d5a87d9..455e6841d 100644 --- a/src/unix/assets/net.86box.86Box.metainfo.xml +++ b/src/unix/assets/net.86box.86Box.metainfo.xml @@ -11,7 +11,7 @@ net.86box.86Box.desktop - + diff --git a/src/unix/unix_serial_passthrough.c b/src/unix/unix_serial_passthrough.c index 873c706b9..fb74f67b3 100644 --- a/src/unix/unix_serial_passthrough.c +++ b/src/unix/unix_serial_passthrough.c @@ -36,6 +36,7 @@ #include #include #include +#include #include <86box/86box.h> #include <86box/log.h> @@ -48,6 +49,35 @@ #define LOG_PREFIX "serial_passthrough: " +void +plat_serpt_set_line_state(void *priv) +{ + serial_passthrough_t *dev = (serial_passthrough_t *) priv; + int setstate = 0, clrstate = 0, curstate = 0; + if (dev->mode != SERPT_MODE_HOSTSER) + return; + + if (dev->serial->lcr & (1 << 6)) { + tcsendbreak(dev->master_fd, 0); + } + + ioctl(dev->master_fd, TIOCMGET, &curstate); + + clrstate |= !(dev->serial->mctrl & 1) ? TIOCM_DTR : 0; + clrstate |= !(dev->serial->mctrl & 2) ? TIOCM_RTS : 0; + + setstate |= (dev->serial->mctrl & 1) ? TIOCM_DTR : 0; + setstate |= (dev->serial->mctrl & 2) ? TIOCM_RTS : 0; + + ioctl(dev->master_fd, TIOCMBIS, &setstate); + ioctl(dev->master_fd, TIOCMBIC, &clrstate); + + serial_set_cts(dev->serial, !!(curstate & TIOCM_CTS)); + serial_set_dcd(dev->serial, !!(curstate & TIOCM_CAR)); + serial_set_dsr(dev->serial, !!(curstate & TIOCM_DSR)); + serial_set_ri(dev->serial, !!(curstate & TIOCM_RI)); +} + int plat_serpt_read(void *priv, uint8_t *data) { @@ -57,8 +87,13 @@ plat_serpt_read(void *priv, uint8_t *data) fd_set rdfds; switch (dev->mode) { + case SERPT_MODE_HOSTSER: { + if (read(dev->master_fd, data, 1) > 0) { + return 1; + } + return 0; + } case SERPT_MODE_VCON: - case SERPT_MODE_HOSTSER: FD_ZERO(&rdfds); FD_SET(dev->master_fd, &rdfds); tv.tv_sec = 0; @@ -189,6 +224,7 @@ plat_serpt_set_params(void *priv) term_attr.c_cflag |= CMSPAR; #endif } + term_attr.c_iflag &= ~(IXON | IXOFF); tcsetattr(dev->master_fd, TCSANOW, &term_attr); #undef BAUDRATE_RANGE } diff --git a/src/utils/ini.c b/src/utils/ini.c index e23f83670..b267f38b5 100644 --- a/src/utils/ini.c +++ b/src/utils/ini.c @@ -782,6 +782,25 @@ ini_section_get_double(ini_section_t self, const char *name, double def) return value; } +int +ini_section_get_hex12(ini_section_t self, const char *name, int def) +{ + section_t *section = (section_t *) self; + const entry_t *entry; + unsigned int value = 0; + + if (section == NULL) + return def; + + entry = find_entry(section, name); + if (entry == NULL) + return def; + + sscanf(entry->data, "%03X", &value); + + return value; +} + int ini_section_get_hex16(ini_section_t self, const char *name, int def) { @@ -943,6 +962,23 @@ ini_section_set_double(ini_section_t self, const char *name, double val) mbstowcs(ent->wdata, ent->data, 512); } +void +ini_section_set_hex12(ini_section_t self, const char *name, int val) +{ + section_t *section = (section_t *) self; + entry_t *ent; + + if (section == NULL) + return; + + ent = find_entry(section, name); + if (ent == NULL) + ent = create_entry(section, name); + + sprintf(ent->data, "%03X", val); + mbstowcs(ent->wdata, ent->data, sizeof_w(ent->wdata)); +} + void ini_section_set_hex16(ini_section_t self, const char *name, int val) { diff --git a/src/video/CMakeLists.txt b/src/video/CMakeLists.txt index edd5de3a9..a3e86ff7c 100644 --- a/src/video/CMakeLists.txt +++ b/src/video/CMakeLists.txt @@ -204,6 +204,10 @@ add_library(vid OBJECT vid_bochs_vbe.c ) +if(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD") + target_include_directories(vid PRIVATE /usr/local/include) +endif() + if(G100) target_compile_definitions(vid PRIVATE USE_G100) endif() diff --git a/src/video/vid_cga.c b/src/video/vid_cga.c index 01870ae94..3bedf53a4 100644 --- a/src/video/vid_cga.c +++ b/src/video/vid_cga.c @@ -454,10 +454,10 @@ cga_interpolate_linear(uint8_t co1, uint8_t co2, double fraction) } static color_t -cga_interpolate_lookup(cga_t *cga, color_t color1, color_t color2, UNUSED(double fraction)) +cga_interpolate_lookup(color_t color1, color_t color2, int double_type) { color_t ret; - uint8_t dt = cga->double_type - DOUBLE_INTERPOLATE_SRGB; + uint8_t dt = double_type - DOUBLE_INTERPOLATE_SRGB; ret.a = 0x00; ret.r = interp_lut[dt][color1.r][color2.r]; @@ -468,10 +468,8 @@ cga_interpolate_lookup(cga_t *cga, color_t color1, color_t color2, UNUSED(double } static void -cga_interpolate(cga_t *cga, int x, int y, int w, int h) +cga_interpolate(int x, int y, int w, int h, int double_type) { - double quotient = 0.5; - for (int i = y; i < (y + h); i++) { if (i & 1) for (int j = x; j < (x + w); j++) { int prev = i - 1; @@ -496,24 +494,57 @@ cga_interpolate(cga_t *cga, int x, int y, int w, int h) else next_color.color = 0x00000000; - interim_1 = cga_interpolate_lookup(cga, prev_color, black, quotient); - interim_2 = cga_interpolate_lookup(cga, black, next_color, quotient); - final = cga_interpolate_lookup(cga, interim_1, interim_2, quotient); + interim_1 = cga_interpolate_lookup(prev_color, black, double_type); + interim_2 = cga_interpolate_lookup(black, next_color, double_type); + final = cga_interpolate_lookup(interim_1, interim_2, double_type); buffer32->line[i][j] = final.color; } } } -static void -cga_blit_memtoscreen(cga_t *cga, int x, int y, int w, int h) +void +cga_interpolate_init(void) { - if (cga->double_type > DOUBLE_SIMPLE) - cga_interpolate(cga, x, y, w, h); + for (uint16_t i = 0; i < 256; i++) { + for (uint16_t j = 0; j < 256; j++) { + interp_lut[0][i][j] = cga_interpolate_srgb(i, j, 0.5); + interp_lut[1][i][j] = cga_interpolate_linear(i, j, 0.5); + } + } +} + +void +cga_blit_memtoscreen(int x, int y, int w, int h, int double_type) +{ + if (double_type > DOUBLE_SIMPLE) + cga_interpolate(x, y, w, h, double_type); video_blit_memtoscreen(x, y, w, h); } +void +cga_do_blit(int vid_xsize, int firstline, int lastline, int double_type) +{ + if (double_type > DOUBLE_NONE) { + if (enable_overscan) + cga_blit_memtoscreen(0, (firstline - 4) << 1, + vid_xsize, ((lastline - firstline) << 1) + 16, + double_type); + else + cga_blit_memtoscreen(8, firstline << 1, + vid_xsize, (lastline - firstline) << 1, + double_type); + } else { + if (enable_overscan) + video_blit_memtoscreen(0, firstline - 4, + vid_xsize, (lastline - firstline) + 8); + else + video_blit_memtoscreen(8, firstline, + vid_xsize, lastline - firstline); + } +} + void cga_poll(void *priv) { @@ -553,19 +584,17 @@ cga_poll(void *priv) cga_render(cga, (cga->displine << 1) + 1); break; } - } else { - switch (cga->double_type) { - default: - cga_render_blank(cga, cga->displine << 1); - break; - case DOUBLE_NONE: - cga_render_blank(cga, cga->displine); - break; - case DOUBLE_SIMPLE: - cga_render_blank(cga, cga->displine << 1); - cga_render_blank(cga, (cga->displine << 1) + 1); - break; - } + } else switch (cga->double_type) { + default: + cga_render_blank(cga, cga->displine << 1); + break; + case DOUBLE_NONE: + cga_render_blank(cga, cga->displine); + break; + case DOUBLE_SIMPLE: + cga_render_blank(cga, cga->displine << 1); + cga_render_blank(cga, (cga->displine << 1) + 1); + break; } switch (cga->double_type) { @@ -651,9 +680,7 @@ cga_poll(void *priv) cga->lastline++; xs_temp = x; - ys_temp = cga->lastline - cga->firstline; - if (cga->double_type > DOUBLE_NONE) - ys_temp <<= 1; + ys_temp = (cga->lastline - cga->firstline) << 1; if ((xs_temp > 0) && (ys_temp > 0)) { if (xs_temp < 64) @@ -667,30 +694,13 @@ cga_poll(void *priv) (ys_temp != ysize) || video_force_resize_get())) { xsize = xs_temp; ysize = ys_temp; - if (cga->double_type > DOUBLE_NONE) - set_screen_size(xsize, ysize + (enable_overscan ? 16 : 0)); - else - set_screen_size(xsize, ysize + (enable_overscan ? 8 : 0)); + set_screen_size(xsize, ysize + (enable_overscan ? 16 : 0)); if (video_force_resize_get()) video_force_resize_set(0); } - if (cga->double_type > DOUBLE_NONE) { - if (enable_overscan) - cga_blit_memtoscreen(cga, 0, (cga->firstline - 4) << 1, - xsize, ((cga->lastline - cga->firstline) << 1) + 16); - else - cga_blit_memtoscreen(cga, 8, cga->firstline << 1, - xsize, (cga->lastline - cga->firstline) << 1); - } else { - if (enable_overscan) - video_blit_memtoscreen(0, cga->firstline - 4, - xsize, (cga->lastline - cga->firstline) + 8); - else - video_blit_memtoscreen(8, cga->firstline, - xsize, cga->lastline - cga->firstline); - } + cga_do_blit(xsize, cga->firstline, cga->lastline, cga->double_type); } frames++; @@ -768,13 +778,7 @@ cga_standalone_init(UNUSED(const device_t *info)) update_cga16_color(cga->cgamode); cga->double_type = device_get_config_int("double_type"); - - for (uint16_t i = 0; i < 256; i++) { - for (uint16_t j = 0; j < 256; j++) { - interp_lut[0][i][j] = cga_interpolate_srgb(i, j, 0.5); - interp_lut[1][i][j] = cga_interpolate_linear(i, j, 0.5); - } - } + cga_interpolate_init(); switch(device_get_config_int("font")) { case 0: diff --git a/src/video/vid_cga_v6355.c b/src/video/vid_cga_v6355.c index bdd4b82e6..1ddc1f2cd 100644 --- a/src/video/vid_cga_v6355.c +++ b/src/video/vid_cga_v6355.c @@ -34,6 +34,7 @@ #include <86box/device.h> #include <86box/video.h> #include <86box/vid_v6355.h> +#include <86box/vid_cga.h> #include <86box/vid_cga_comp.h> #include <86box/plat_unused.h> @@ -112,8 +113,6 @@ static uint8_t crtcmask[32] = { 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; -static uint8_t interp_lut[2][256][256]; - static video_timings_t timing_v6355 = { .type = VIDEO_ISA, .write_b = 8, .write_w = 16, .write_l = 32, .read_b = 8, .read_w = 16, .read_l = 32 }; static uint8_t mdamap[256][2][2]; @@ -617,99 +616,6 @@ v6355_render_process(v6355_t *v6355, int line) } } -static uint8_t -v6355_interpolate_srgb(uint8_t co1, uint8_t co2, double fraction) -{ - uint8_t ret = ((co2 - co1) * fraction + co1); - - return ret; -} - -static uint8_t -v6355_interpolate_linear(uint8_t co1, uint8_t co2, double fraction) -{ - double c1, c2; - double r1, r2; - uint8_t ret; - - c1 = ((double) co1) / 255.0; - c1 = pow((co1 >= 0) ? c1 : -c1, 2.19921875); - if (co1 <= 0) - c1 = -c1; - c2 = ((double) co2) / 255.0; - c2 = pow((co2 >= 0) ? c2 : -c2, 2.19921875); - if (co2 <= 0) - c2 = -c2; - r1 = ((c2 - c1) * fraction + c1); - r2 = pow((r1 >= 0.0) ? r1 : -r1, 1.0 / 2.19921875); - if (r1 <= 0.0) - r2 = -r2; - ret = (uint8_t) round(r2 * 255.0); - - return ret; -} - -static color_t -v6355_interpolate_lookup(v6355_t *v6355, color_t color1, color_t color2, UNUSED(double fraction)) -{ - color_t ret; - uint8_t dt = v6355->double_type - DOUBLE_INTERPOLATE_SRGB; - - ret.a = 0x00; - ret.r = interp_lut[dt][color1.r][color2.r]; - ret.g = interp_lut[dt][color1.g][color2.g]; - ret.b = interp_lut[dt][color1.b][color2.b]; - - return ret; -} - -static void -v6355_interpolate(v6355_t *v6355, int x, int y, int w, int h) -{ - double quotient = 0.5; - - for (int i = y; i < (y + h); i++) { - if (i & 1) for (int j = x; j < (x + w); j++) { - int prev = i - 1; - int next = i + 1; - color_t prev_color, next_color; - color_t black; - color_t interim_1, interim_2; - color_t final; - - if (i < 0) - continue; - - black.color = 0x00000000; - - if ((prev >= 0) && (prev < (y + h))) - prev_color.color = buffer32->line[prev][j]; - else - prev_color.color = 0x00000000; - - if ((next >= 0) && (next < (y + h))) - next_color.color = buffer32->line[next][j]; - else - next_color.color = 0x00000000; - - interim_1 = v6355_interpolate_lookup(v6355, prev_color, black, quotient); - interim_2 = v6355_interpolate_lookup(v6355, black, next_color, quotient); - final = v6355_interpolate_lookup(v6355, interim_1, interim_2, quotient); - - buffer32->line[i][j] = final.color; - } - } -} - -static void -v6355_blit_memtoscreen(v6355_t *v6355, int x, int y, int w, int h) -{ - if (v6355->double_type > DOUBLE_SIMPLE) - v6355_interpolate(v6355, x, y, w, h); - - video_blit_memtoscreen(x, y, w, h); -} - static void v6355_poll(void *priv) { @@ -779,19 +685,17 @@ v6355_poll(void *priv) v6355_render(v6355, (v6355->displine << 1) + 1); break; } - } else { - switch (v6355->double_type) { - default: - v6355_render_blank(v6355, v6355->displine << 1); - break; - case DOUBLE_NONE: - v6355_render_blank(v6355, v6355->displine); - break; - case DOUBLE_SIMPLE: - v6355_render_blank(v6355, v6355->displine << 1); - v6355_render_blank(v6355, (v6355->displine << 1) + 1); - break; - } + } else switch (v6355->double_type) { + default: + v6355_render_blank(v6355, v6355->displine << 1); + break; + case DOUBLE_NONE: + v6355_render_blank(v6355, v6355->displine); + break; + case DOUBLE_SIMPLE: + v6355_render_blank(v6355, v6355->displine << 1); + v6355_render_blank(v6355, (v6355->displine << 1) + 1); + break; } switch (v6355->double_type) { @@ -879,9 +783,7 @@ v6355_poll(void *priv) v6355->lastline++; xs_temp = x; - ys_temp = v6355->lastline - v6355->firstline; - if (v6355->double_type > DOUBLE_NONE) - ys_temp <<= 1; + ys_temp = (v6355->lastline - v6355->firstline) << 1; if ((xs_temp > 0) && (ys_temp > 0)) { if (xs_temp < 64) @@ -894,30 +796,13 @@ v6355_poll(void *priv) if (((xs_temp != xsize) || (ys_temp != ysize) || video_force_resize_get())) { xsize = xs_temp; ysize = ys_temp; - if (v6355->double_type > DOUBLE_NONE) - set_screen_size(xsize, ysize + (enable_overscan ? 16 : 0)); - else - set_screen_size(xsize, ysize + (enable_overscan ? 8 : 0)); + set_screen_size(xsize, ysize + (enable_overscan ? 16 : 0)); if (video_force_resize_get()) video_force_resize_set(0); } - if (v6355->double_type > DOUBLE_NONE) { - if (enable_overscan) - v6355_blit_memtoscreen(v6355, 0, (v6355->firstline - 4) << 1, - xsize, ((v6355->lastline - v6355->firstline) << 1) + 16); - else - v6355_blit_memtoscreen(v6355, 8, v6355->firstline << 1, - xsize, (v6355->lastline - v6355->firstline) << 1); - } else { - if (enable_overscan) - video_blit_memtoscreen(0, v6355->firstline - 4, - xsize, (v6355->lastline - v6355->firstline) + 8); - else - video_blit_memtoscreen(8, v6355->firstline, - xsize, v6355->lastline - v6355->firstline); - } + cga_do_blit(xsize, v6355->firstline, v6355->lastline, v6355->double_type); } frames++; @@ -1035,13 +920,7 @@ v6355_standalone_init(const device_t *info) { update_cga16_color(v6355->cgamode); v6355->double_type = device_get_config_int("double_type"); - - for (uint16_t i = 0; i < 256; i++) { - for (uint16_t j = 0; j < 256; j++) { - interp_lut[0][i][j] = v6355_interpolate_srgb(i, j, 0.5); - interp_lut[1][i][j] = v6355_interpolate_linear(i, j, 0.5); - } - } + cga_interpolate_init(); switch(device_get_config_int("font")) { case 0: diff --git a/src/video/vid_ddc.c b/src/video/vid_ddc.c index 787e7560e..d6c9095ef 100644 --- a/src/video/vid_ddc.c +++ b/src/video/vid_ddc.c @@ -23,6 +23,9 @@ #include #include <86box/86box.h> #include <86box/i2c.h> +#include <86box/vid_ddc.h> +#include <86box/plat.h> +#include <86box/ui.h> #define PIXEL_MM(px) (((px) * 25.4) / 96.0) #define STANDARD_TIMING(slot, width, aspect_ratio, refresh) \ @@ -126,8 +129,8 @@ typedef struct { uint8_t padding[15], checksum2; } edid_t; -void * -ddc_init(void *i2c) +void* +ddc_create_default_edid(ssize_t* size_out) { edid_t *edid = malloc(sizeof(edid_t)); memset(edid, 0, sizeof(edid_t)); @@ -222,7 +225,94 @@ ddc_init(void *i2c) edid->checksum2 += edid_bytes[c]; edid->checksum2 = 256 - edid->checksum2; - return i2c_eeprom_init(i2c, 0x50, edid_bytes, sizeof(edid_t), 0); + if (size_out) + *size_out = sizeof(edid_t); + + return edid; +} + +void * +ddc_init(void *i2c) +{ + ssize_t edid_size = 0; + uint8_t* edid_bytes = NULL; + if (monitor_edid == 1 && monitor_edid_path[0]) { + FILE* file = plat_fopen(monitor_edid_path, "rb"); + + if (!file) + goto default_init; + + if (fseek(file, 0, SEEK_END) == -1) { + fclose(file); + goto default_init; + } + + edid_size = ftell(file); + fseek(file, 0, SEEK_SET); + + if (edid_size <= 0) { + fclose(file); + goto default_init; + } + + if (edid_size > 256) { + wchar_t errmsg[2048] = { 0 }; + wchar_t path[2048] = { 0 }; + +#ifdef _WIN32 + mbstoc16s(path, monitor_edid_path, sizeof_w(path)); +#else + mbstowcs(path, monitor_edid_path, sizeof_w(path)); +#endif + swprintf(errmsg, sizeof_w(errmsg), plat_get_string(STRING_EDID_TOO_LARGE), path); + ui_msgbox_header(MBX_ERROR, L"EDID", errmsg); + fclose(file); + goto default_init; + } + + edid_bytes = calloc(1, edid_size); + if (!edid_bytes) { + fclose(file); + goto default_init; + } + + if (fread(edid_bytes, edid_size, 1, file) <= 0) { + free(edid_bytes); + fclose(file); + goto default_init; + } + + if (edid_size < 128) { + edid_bytes = realloc(edid_bytes, 128); + edid_size = 128; + } else if (edid_size < 256) { + edid_bytes = realloc(edid_bytes, 256); + edid_size = 256; + } + + { + int checksum = 0; + for (uint8_t c = 0; c < 127; c++) + checksum += edid_bytes[c]; + edid_bytes[127] = 256 - checksum; + + if (edid_size == 256) { + checksum = 0; + + for (uint8_t c = 128; c < 255; c++) { + checksum += edid_bytes[c]; + } + edid_bytes[255] = 256 - checksum; + } + } + + fclose(file); + return i2c_eeprom_init(i2c, 0x50, edid_bytes, edid_size, 0); + } +default_init: + edid_size = sizeof(edid_t); + edid_bytes = ddc_create_default_edid(&edid_size); + return i2c_eeprom_init(i2c, 0x50, edid_bytes, edid_size, 0); } void diff --git a/src/video/vid_ega.c b/src/video/vid_ega.c index 5a552ab6d..e96bd827c 100644 --- a/src/video/vid_ega.c +++ b/src/video/vid_ega.c @@ -149,6 +149,7 @@ ega_out(uint16_t addr, uint8_t val, void *priv) ega->vres = !(val & 0x80); ega->pallook = ega->vres ? pallook16 : pallook64; ega->vidclock = val & 4; + pclog("clock = %01X\n", (val & 0x0c) >> 2); ega->miscout = val; ega->overscan_color = ega->vres ? pallook16[ega->attrregs[0x11] & 0x0f] : pallook64[ega->attrregs[0x11] & 0x3f]; @@ -603,7 +604,22 @@ ega_recalctimings(ega_t *ega) ega->linedbl = ega->crtc[9] & 0x80; ega->rowcount = ega->crtc[9] & 0x1f; - if (ega_type == EGA_TYPE_COMPAQ) { + if (ega->actual_type == EGA_SUPEREGA) { + switch ((ega->miscout >> 2) & 0x03) { + case 0x00: + crtcconst = (cpuclock / 16257000.0 * (double) (1ULL << 32)); + break; + case 0x01: + crtcconst = (cpuclock / (157500000.0 / 11.0) * (double) (1ULL << 32)); + break; + default: + case 0x02: case 0x03: + crtcconst = (cpuclock / 25110000.0 * (double) (1ULL << 32)); + break; + } + + crtcconst *= mdiv; + } else if (ega_type == EGA_TYPE_COMPAQ) { color = (ega->miscout & 1); clksel = ((ega->miscout & 0xc) >> 2); diff --git a/src/video/vid_oak_oti.c b/src/video/vid_oak_oti.c index 3ea935b06..4ea0b21e4 100644 --- a/src/video/vid_oak_oti.c +++ b/src/video/vid_oak_oti.c @@ -38,6 +38,7 @@ #define BIOS_067_M300_15_PATH "roms/machines/m30015/EVC_BIOS.ROM" #define BIOS_077_PATH "roms/video/oti/oti077.vbi" #define BIOS_077_ACER100T_PATH "roms/machines/acer100t/oti077_acer100t.BIN" +#define BIOS_077_PCS44C_PATH "roms/machines/pcs44c/V032004G.25" enum { OTI_037C = 0, @@ -46,7 +47,8 @@ enum { OTI_067_AMA932J = 3, OTI_067_M300 = 4, OTI_077 = 5, - OTI_077_ACER100T = 6 + OTI_077_ACER100T = 6, + OTI_077_PCS44C = 7 }; typedef struct { @@ -104,7 +106,8 @@ oti_out(uint16_t addr, uint8_t val, void *priv) case 0x3c7: case 0x3c8: case 0x3c9: - if ((oti->chip_id == OTI_077) || (oti->chip_id == OTI_077_ACER100T)) + if ((oti->chip_id == OTI_077) || (oti->chip_id == OTI_077_ACER100T) || + (oti->chip_id == OTI_077_PCS44C)) sc1148x_ramdac_out(addr, 0, val, svga->ramdac, svga); else svga_out(addr, val, svga); @@ -166,7 +169,8 @@ oti_out(uint16_t addr, uint8_t val, void *priv) mem_mapping_disable(&svga->mapping); else mem_mapping_enable(&svga->mapping); - } else if (oti->chip_id == OTI_077 || oti->chip_id == OTI_077_ACER100T) { + } else if ((oti->chip_id == OTI_077) || (oti->chip_id == OTI_077_ACER100T) || + (oti->chip_id == OTI_077_PCS44C)) { svga->vram_display_mask = (val & 0x0c) ? oti->vram_mask : 0x3ffff; switch ((val & 0xc0) >> 6) { @@ -251,7 +255,8 @@ oti_in(uint16_t addr, void *priv) case 0x3c7: case 0x3c8: case 0x3c9: - if (oti->chip_id == OTI_077 || oti->chip_id == OTI_077_ACER100T) + if ((oti->chip_id == OTI_077) || (oti->chip_id == OTI_077_ACER100T) || + (oti->chip_id == OTI_077_PCS44C)) temp = sc1148x_ramdac_in(addr, 0, svga->ramdac, svga); else temp = svga_in(addr, svga); @@ -324,7 +329,9 @@ oti_in(uint16_t addr, void *priv) case 0x3de: temp = oti->index; - if (oti->chip_id) + if (oti->chip_id > 5) + temp |= (5 << 5); + else if (oti->chip_id) temp |= (oti->chip_id << 5); break; @@ -495,6 +502,12 @@ oti_init(const device_t *info) oti->pos = 0x08; /* Tell the BIOS the I/O ports are already enabled to avoid a double I/O handler mess. */ io_sethandler(0x46e8, 1, oti_pos_in, NULL, NULL, oti_pos_out, NULL, NULL, oti); break; + case OTI_077_PCS44C: + romfn = BIOS_077_PCS44C_PATH; + oti->vram_size = device_get_config_int("memory"); + oti->pos = 0x08; /* Tell the BIOS the I/O ports are already enabled to avoid a double I/O handler mess. */ + io_sethandler(0x46e8, 1, oti_pos_in, NULL, NULL, oti_pos_out, NULL, NULL, oti); + break; default: break; @@ -513,12 +526,13 @@ oti_init(const device_t *info) */ video_inform(0x1, &timing_oti); } else - video_inform(VIDEO_FLAG_TYPE_SPECIAL, &timing_oti); + video_inform(VIDEO_FLAG_TYPE_SPECIAL, &timing_oti); svga_init(info, &oti->svga, oti, oti->vram_size << 10, oti_recalctimings, oti_in, oti_out, NULL, NULL); - if ((oti->chip_id == OTI_077) || (oti->chip_id == OTI_077_ACER100T)) + if ((oti->chip_id == OTI_077) || (oti->chip_id == OTI_077_ACER100T) || + (oti->chip_id == OTI_077_PCS44C)) oti->svga.ramdac = device_add(&sc11487_ramdac_device); /*Actually a 82c487, probably a clone.*/ io_sethandler(0x03c0, 32, @@ -574,6 +588,12 @@ oti077_acer100t_available(void) return (rom_present(BIOS_077_ACER100T_PATH)); } +static int +oti077_pcs44c_available(void) +{ + return (rom_present(BIOS_077_PCS44C_PATH)); +} + static int oti067_077_available(void) { @@ -766,3 +786,16 @@ const device_t oti077_acer100t_device = { .force_redraw = oti_force_redraw, .config = oti077_acer100t_config }; +const device_t oti077_pcs44c_device = { + .name = "Oak OTI-077 (Olivetti PCS 44/C)", + .internal_name = "oti077_pcs44c", + .flags = DEVICE_ISA, + .local = 7, + .init = oti_init, + .close = oti_close, + .reset = NULL, + .available = oti077_pcs44c_available, + .speed_changed = oti_speed_changed, + .force_redraw = oti_force_redraw, + .config = oti077_acer100t_config +}; diff --git a/src/video/vid_pcjr.c b/src/video/vid_pcjr.c index 6cdc5b783..fd8ef515b 100644 --- a/src/video/vid_pcjr.c +++ b/src/video/vid_pcjr.c @@ -283,21 +283,29 @@ vid_get_h_overscan_delta(pcjr_t *pcjr) } static void -vid_blit_h_overscan(pcjr_t *pcjr) +vid_blit_v_overscan(pcjr_t *pcjr) { - int cols = (pcjr->array[2] & 0xf) + 16;; - int y0 = pcjr->firstline << 1; - int y = (pcjr->lastline << 1) + 16; + int cols = (pcjr->array[2] & 0xf) + 16; + int y0 = pcjr->firstline; + int y = pcjr->lastline + 8; + int h = 8; int ho_s = vid_get_h_overscan_size(pcjr); int i; int x; + if (pcjr->double_type > DOUBLE_NONE) { + y0 <<= 1; + y <<= 1; + + h <<= 1; + } + if (pcjr->array[0] & 1) x = (pcjr->crtc[1] << 3) + ho_s; else x = (pcjr->crtc[1] << 4) + ho_s; - for (i = 0; i < 16; i++) { + for (i = 0; i < h; i++) { hline(buffer32, 0, y0 + i, x, cols); hline(buffer32, 0, y + i, x, cols); @@ -312,23 +320,222 @@ vid_blit_h_overscan(pcjr_t *pcjr) } static void -vid_poll(void *priv) +vid_render(pcjr_t *pcjr, int line, int ho_s, int ho_d) { - pcjr_t *pcjr = (pcjr_t *) priv; uint16_t cursoraddr = (pcjr->crtc[15] | (pcjr->crtc[14] << 8)) & 0x3fff; int drawcursor; - int x; - int xs_temp; - int ys_temp; - int oldvc; uint8_t chr; uint8_t attr; uint16_t dat; int cols[4]; + uint16_t offset = 0; + uint16_t mask = 0x1fff; + int x; + + cols[0] = (pcjr->array[2] & 0xf) + 16; + + if (pcjr->array[0] & 1) + hline(buffer32, 0, line, (pcjr->crtc[1] << 3) + ho_s, cols[0]); + else + hline(buffer32, 0, line, (pcjr->crtc[1] << 4) + ho_s, cols[0]); + + switch (pcjr->addr_mode) { + case 0: /*Alpha*/ + offset = 0; + mask = 0x3fff; + break; + case 1: /*Low resolution graphics*/ + offset = (pcjr->scanline & 1) * 0x2000; + break; + case 3: /*High resolution graphics*/ + offset = (pcjr->scanline & 3) * 0x2000; + break; + default: + break; + } + switch ((pcjr->array[0] & 0x13) | ((pcjr->array[3] & 0x08) << 5)) { + case 0x13: /*320x200x16*/ + for (x = 0; x < pcjr->crtc[1]; x++) { + int ef_x = (x << 3) + ho_d; + dat = (pcjr->vram[((pcjr->memaddr << 1) & mask) + offset] << 8) | + pcjr->vram[((pcjr->memaddr << 1) & mask) + offset + 1]; + pcjr->memaddr++; + buffer32->line[line][ef_x] = buffer32->line[line][ef_x + 1] = + pcjr->array[((dat >> 12) & pcjr->array[1] & 0x0f) + 16] + 16; + buffer32->line[line][ef_x + 2] = buffer32->line[line][ef_x + 3] = + pcjr->array[((dat >> 8) & pcjr->array[1] & 0x0f) + 16] + 16; + buffer32->line[line][ef_x + 4] = buffer32->line[line][ef_x + 5] = + pcjr->array[((dat >> 4) & pcjr->array[1] & 0x0f) + 16] + 16; + buffer32->line[line][ef_x + 6] = buffer32->line[line][ef_x + 7] = + pcjr->array[(dat & pcjr->array[1] & 0x0f) + 16] + 16; + } + break; + case 0x12: /*160x200x16*/ + for (x = 0; x < pcjr->crtc[1]; x++) { + int ef_x = (x << 4) + ho_d; + dat = (pcjr->vram[((pcjr->memaddr << 1) & mask) + offset] << 8) | + pcjr->vram[((pcjr->memaddr << 1) & mask) + offset + 1]; + pcjr->memaddr++; + buffer32->line[line][ef_x] = buffer32->line[line][ef_x + 1] = + buffer32->line[line][ef_x + 2] = buffer32->line[line][ef_x + 3] = + pcjr->array[((dat >> 12) & pcjr->array[1] & 0x0f) + 16] + 16; + buffer32->line[line][ef_x + 4] = buffer32->line[line][ef_x + 5] = + buffer32->line[line][ef_x + 6] = buffer32->line[line][ef_x + 7] = + pcjr->array[((dat >> 8) & pcjr->array[1] & 0x0f) + 16] + 16; + buffer32->line[line][ef_x + 8] = buffer32->line[line][ef_x + 9] = + buffer32->line[line][ef_x + 10] = buffer32->line[line][ef_x + 11] = + pcjr->array[((dat >> 4) & pcjr->array[1] & 0x0f) + 16] + 16; + buffer32->line[line][ef_x + 12] = buffer32->line[line][ef_x + 13] = + buffer32->line[line][ef_x + 14] = buffer32->line[line][ef_x + 15] = + pcjr->array[(dat & pcjr->array[1] & 0x0f) + 16] + 16; + } + break; + case 0x03: /*640x200x4*/ + for (x = 0; x < pcjr->crtc[1]; x++) { + int ef_x = (x << 3) + ho_d; + dat = (pcjr->vram[((pcjr->memaddr << 1) & mask) + offset + 1] << 8) | + pcjr->vram[((pcjr->memaddr << 1) & mask) + offset]; + pcjr->memaddr++; + for (uint8_t c = 0; c < 8; c++) { + chr = (dat >> 7) & 1; + chr |= ((dat >> 14) & 2); + buffer32->line[line][ef_x + c] = pcjr->array[(chr & pcjr->array[1] & 0x0f) + 16] + 16; + dat <<= 1; + } + } + break; + case 0x01: /*80 column text*/ + for (x = 0; x < pcjr->crtc[1]; x++) { + int ef_x = (x << 3) + ho_d; + chr = pcjr->vram[((pcjr->memaddr << 1) & mask) + offset]; + attr = pcjr->vram[((pcjr->memaddr << 1) & mask) + offset + 1]; + drawcursor = ((pcjr->memaddr == cursoraddr) && pcjr->cursorvisible && pcjr->cursoron); + if (pcjr->array[3] & 4) { + cols[1] = pcjr->array[((attr & 15) & pcjr->array[1] & 0x0f) + 16] + 16; + cols[0] = pcjr->array[(((attr >> 4) & 7) & pcjr->array[1] & 0x0f) + 16] + 16; + if ((pcjr->blink & 16) && (attr & 0x80) && !drawcursor) + cols[1] = cols[0]; + } else { + cols[1] = pcjr->array[((attr & 15) & pcjr->array[1] & 0x0f) + 16] + 16; + cols[0] = pcjr->array[((attr >> 4) & pcjr->array[1] & 0x0f) + 16] + 16; + } + if (pcjr->scanline & 8) + for (uint8_t c = 0; c < 8; c++) + buffer32->line[line][ef_x + c] = cols[0]; + else for (uint8_t c = 0; c < 8; c++) + buffer32->line[line][ef_x + c] = cols[(fontdat[chr][pcjr->scanline & 7] & (1 << (c ^ 7))) ? 1 : 0]; + if (drawcursor) for (uint8_t c = 0; c < 8; c++) + buffer32->line[line][ef_x + c] ^= 15; + pcjr->memaddr++; + } + break; + case 0x00: /*40 column text*/ + for (x = 0; x < pcjr->crtc[1]; x++) { + int ef_x = (x << 4) + ho_d; + chr = pcjr->vram[((pcjr->memaddr << 1) & mask) + offset]; + attr = pcjr->vram[((pcjr->memaddr << 1) & mask) + offset + 1]; + drawcursor = ((pcjr->memaddr == cursoraddr) && pcjr->cursorvisible && pcjr->cursoron); + if (pcjr->array[3] & 4) { + cols[1] = pcjr->array[((attr & 15) & pcjr->array[1] & 0x0f) + 16] + 16; + cols[0] = pcjr->array[(((attr >> 4) & 7) & pcjr->array[1] & 0x0f) + 16] + 16; + if ((pcjr->blink & 16) && (attr & 0x80) && !drawcursor) + cols[1] = cols[0]; + } else { + cols[1] = pcjr->array[((attr & 15) & pcjr->array[1] & 0x0f) + 16] + 16; + cols[0] = pcjr->array[((attr >> 4) & pcjr->array[1] & 0x0f) + 16] + 16; + } + pcjr->memaddr++; + if (pcjr->scanline & 8) + for (uint8_t c = 0; c < 8; c++) + buffer32->line[line][ef_x + (c << 1)] = + buffer32->line[line][ef_x + (c << 1) + 1] = cols[0]; + else + for (uint8_t c = 0; c < 8; c++) + buffer32->line[line][ef_x + (c << 1)] = + buffer32->line[line][ef_x + (c << 1) + 1] = cols[(fontdat[chr][pcjr->scanline & 7] & (1 << (c ^ 7))) ? 1 : 0]; + if (drawcursor) for (uint8_t c = 0; c < 16; c++) + buffer32->line[line][ef_x + c] ^= 15; + } + break; + case 0x02: /*320x200x4*/ + cols[0] = pcjr->array[0 + 16] + 16; + cols[1] = pcjr->array[1 + 16] + 16; + cols[2] = pcjr->array[2 + 16] + 16; + cols[3] = pcjr->array[3 + 16] + 16; + for (x = 0; x < pcjr->crtc[1]; x++) { + int ef_x = (x << 4) + ho_d; + dat = (pcjr->vram[((pcjr->memaddr << 1) & mask) + offset] << 8) | + pcjr->vram[((pcjr->memaddr << 1) & mask) + offset + 1]; + pcjr->memaddr++; + for (uint8_t c = 0; c < 8; c++) + buffer32->line[line][ef_x + (c << 1)] = buffer32->line[line][ef_x + (c << 1) + 1] = dat <<= 2; + } + break; + case 0x102: /*640x200x2*/ + cols[0] = pcjr->array[0 + 16] + 16; + cols[1] = pcjr->array[1 + 16] + 16; + for (x = 0; x < pcjr->crtc[1]; x++) { + int ef_x = (x << 4) + ho_d; + dat = (pcjr->vram[((pcjr->memaddr << 1) & mask) + offset] << 8) | + pcjr->vram[((pcjr->memaddr << 1) & mask) + offset + 1]; + pcjr->memaddr++; + for (uint8_t c = 0; c < 16; c++) { + buffer32->line[line][ef_x + c] = cols[dat >> 15]; + dat <<= 1; + } + } + break; + + default: + break; + } +} + +static void +vid_render_blank(pcjr_t *pcjr, int line, int ho_s) +{ + if (pcjr->array[3] & 4) { + if (pcjr->array[0] & 1) + hline(buffer32, 0, line, (pcjr->crtc[1] << 3) + ho_s, (pcjr->array[2] & 0xf) + 16); + else + hline(buffer32, 0, line, (pcjr->crtc[1] << 4) + ho_s, (pcjr->array[2] & 0xf) + 16); + } else { + if (pcjr->array[0] & 1) + hline(buffer32, 0, line, (pcjr->crtc[1] << 3) + ho_s, pcjr->array[0 + 16] + 16); + else + hline(buffer32, 0, line, (pcjr->crtc[1] << 4) + ho_s, pcjr->array[0 + 16] + 16); + } +} + +static void +vid_render_process(pcjr_t *pcjr, int line, int ho_s) +{ + int x; + + if (pcjr->array[0] & 1) + x = (pcjr->crtc[1] << 3) + ho_s; + else + x = (pcjr->crtc[1] << 4) + ho_s; + + if (pcjr->composite) + Composite_Process(pcjr->array[0], 0, x >> 2, buffer32->line[line]); + else + video_process_8(x, line); +} + +static void +vid_poll(void *priv) +{ + pcjr_t *pcjr = (pcjr_t *) priv; + int x; + int xs_temp; + int ys_temp; + int oldvc; int scanline_old; - int l = (pcjr->displine << 1) + 16; + int l = pcjr->displine + 8; int ho_s = vid_get_h_overscan_size(pcjr); int ho_d = vid_get_h_overscan_delta(pcjr) + (ho_s / 2); + int old_ma; if (!pcjr->linepos) { timer_advance_u64(&pcjr->timer, pcjr->dispofftime); @@ -338,239 +545,49 @@ vid_poll(void *priv) if ((pcjr->crtc[8] & 3) == 3) pcjr->scanline = (pcjr->scanline << 1) & 7; if (pcjr->dispon) { - uint16_t offset = 0; - uint16_t mask = 0x1fff; - if (pcjr->displine < pcjr->firstline) { pcjr->firstline = pcjr->displine; video_wait_for_buffer(); } pcjr->lastline = pcjr->displine; - cols[0] = (pcjr->array[2] & 0xf) + 16; - - if (pcjr->array[0] & 1) { - hline(buffer32, 0, l, (pcjr->crtc[1] << 3) + ho_s, cols[0]); - hline(buffer32, 0, l + 1, (pcjr->crtc[1] << 3) + ho_s, cols[0]); - } else { - hline(buffer32, 0, l, (pcjr->crtc[1] << 4) + ho_s, cols[0]); - hline(buffer32, 0, l + 1, (pcjr->crtc[1] << 4) + ho_s, cols[0]); - } - - switch (pcjr->addr_mode) { - case 0: /*Alpha*/ - offset = 0; - mask = 0x3fff; - break; - case 1: /*Low resolution graphics*/ - offset = (pcjr->scanline & 1) * 0x2000; - break; - case 3: /*High resolution graphics*/ - offset = (pcjr->scanline & 3) * 0x2000; - break; + switch (pcjr->double_type) { default: + vid_render(pcjr, l << 1, ho_s, ho_d); + vid_render_blank(pcjr, (l << 1) + 1, ho_s); + break; + case DOUBLE_NONE: + vid_render(pcjr, l, ho_s, ho_d); + break; + case DOUBLE_SIMPLE: + old_ma = pcjr->memaddr; + vid_render(pcjr, l << 1, ho_s, ho_d); + pcjr->memaddr = old_ma; + vid_render(pcjr, (l << 1) + 1, ho_s, ho_d); break; } - switch ((pcjr->array[0] & 0x13) | ((pcjr->array[3] & 0x08) << 5)) { - case 0x13: /*320x200x16*/ - for (x = 0; x < pcjr->crtc[1]; x++) { - int ef_x = (x << 3) + ho_d; - dat = (pcjr->vram[((pcjr->memaddr << 1) & mask) + offset] << 8) | - pcjr->vram[((pcjr->memaddr << 1) & mask) + offset + 1]; - pcjr->memaddr++; - buffer32->line[l][ef_x] = buffer32->line[l][ef_x + 1] = - buffer32->line[l + 1][ef_x] = buffer32->line[l + 1][ef_x + 1] = - pcjr->array[((dat >> 12) & pcjr->array[1] & 0x0f) + 16] + 16; - buffer32->line[l][ef_x + 2] = buffer32->line[l][ef_x + 3] = - buffer32->line[l + 1][ef_x + 2] = buffer32->line[l + 1][ef_x + 3] = - pcjr->array[((dat >> 8) & pcjr->array[1] & 0x0f) + 16] + 16; - buffer32->line[l][ef_x + 4] = buffer32->line[l][ef_x + 5] = - buffer32->line[l + 1][ef_x + 4] = buffer32->line[l + 1][ef_x + 5] = - pcjr->array[((dat >> 4) & pcjr->array[1] & 0x0f) + 16] + 16; - buffer32->line[l][ef_x + 6] = buffer32->line[l][ef_x + 7] = - buffer32->line[l + 1][ef_x + 6] = buffer32->line[l + 1][ef_x + 7] = - pcjr->array[(dat & pcjr->array[1] & 0x0f) + 16] + 16; - } - break; - case 0x12: /*160x200x16*/ - for (x = 0; x < pcjr->crtc[1]; x++) { - int ef_x = (x << 4) + ho_d; - dat = (pcjr->vram[((pcjr->memaddr << 1) & mask) + offset] << 8) | - pcjr->vram[((pcjr->memaddr << 1) & mask) + offset + 1]; - pcjr->memaddr++; - buffer32->line[l][ef_x] = buffer32->line[l][ef_x + 1] = - buffer32->line[l][ef_x + 2] = buffer32->line[l][ef_x + 3] = - buffer32->line[l + 1][ef_x] = buffer32->line[l + 1][ef_x + 1] = - buffer32->line[l + 1][ef_x + 2] = buffer32->line[l + 1][ef_x + 3] = - pcjr->array[((dat >> 12) & pcjr->array[1] & 0x0f) + 16] + 16; - buffer32->line[l][ef_x + 4] = buffer32->line[l][ef_x + 5] = - buffer32->line[l][ef_x + 6] = buffer32->line[l][ef_x + 7] = - buffer32->line[l + 1][ef_x + 4] = buffer32->line[l + 1][ef_x + 5] = - buffer32->line[l + 1][ef_x + 6] = buffer32->line[l + 1][ef_x + 7] = - pcjr->array[((dat >> 8) & pcjr->array[1] & 0x0f) + 16] + 16; - buffer32->line[l][ef_x + 8] = buffer32->line[l][ef_x + 9] = - buffer32->line[l][ef_x + 10] = buffer32->line[l][ef_x + 11] = - buffer32->line[l + 1][ef_x + 8] = buffer32->line[l + 1][ef_x + 9] = - buffer32->line[l + 1][ef_x + 10] = buffer32->line[l + 1][ef_x + 11] = - pcjr->array[((dat >> 4) & pcjr->array[1] & 0x0f) + 16] + 16; - buffer32->line[l][ef_x + 12] = buffer32->line[l][ef_x + 13] = - buffer32->line[l][ef_x + 14] = buffer32->line[l][ef_x + 15] = - buffer32->line[l + 1][ef_x + 12] = buffer32->line[l + 1][ef_x + 13] = - buffer32->line[l + 1][ef_x + 14] = buffer32->line[l + 1][ef_x + 15] = - pcjr->array[(dat & pcjr->array[1] & 0x0f) + 16] + 16; - } - break; - case 0x03: /*640x200x4*/ - for (x = 0; x < pcjr->crtc[1]; x++) { - int ef_x = (x << 3) + ho_d; - dat = (pcjr->vram[((pcjr->memaddr << 1) & mask) + offset + 1] << 8) | - pcjr->vram[((pcjr->memaddr << 1) & mask) + offset]; - pcjr->memaddr++; - for (uint8_t c = 0; c < 8; c++) { - chr = (dat >> 7) & 1; - chr |= ((dat >> 14) & 2); - buffer32->line[l][ef_x + c] = buffer32->line[l + 1][ef_x + c] = - pcjr->array[(chr & pcjr->array[1] & 0x0f) + 16] + 16; - dat <<= 1; - } - } - break; - case 0x01: /*80 column text*/ - for (x = 0; x < pcjr->crtc[1]; x++) { - int ef_x = (x << 3) + ho_d; - chr = pcjr->vram[((pcjr->memaddr << 1) & mask) + offset]; - attr = pcjr->vram[((pcjr->memaddr << 1) & mask) + offset + 1]; - drawcursor = ((pcjr->memaddr == cursoraddr) && pcjr->cursorvisible && pcjr->cursoron); - if (pcjr->array[3] & 4) { - cols[1] = pcjr->array[((attr & 15) & pcjr->array[1] & 0x0f) + 16] + 16; - cols[0] = pcjr->array[(((attr >> 4) & 7) & pcjr->array[1] & 0x0f) + 16] + 16; - if ((pcjr->blink & 16) && (attr & 0x80) && !drawcursor) - cols[1] = cols[0]; - } else { - cols[1] = pcjr->array[((attr & 15) & pcjr->array[1] & 0x0f) + 16] + 16; - cols[0] = pcjr->array[((attr >> 4) & pcjr->array[1] & 0x0f) + 16] + 16; - } - if (pcjr->scanline & 8) - for (uint8_t c = 0; c < 8; c++) - buffer32->line[l][ef_x + c] = - buffer32->line[l + 1][ef_x + c] = cols[0]; - else - for (uint8_t c = 0; c < 8; c++) - buffer32->line[l][ef_x + c] = - buffer32->line[l + 1][ef_x + c] = - cols[(fontdat[chr][pcjr->scanline & 7] & (1 << (c ^ 7))) ? 1 : 0]; - if (drawcursor) - for (uint8_t c = 0; c < 8; c++) { - buffer32->line[l][ef_x + c] ^= 15; - buffer32->line[l + 1][ef_x + c] ^= 15; - } - pcjr->memaddr++; - } - break; - case 0x00: /*40 column text*/ - for (x = 0; x < pcjr->crtc[1]; x++) { - int ef_x = (x << 4) + ho_d; - chr = pcjr->vram[((pcjr->memaddr << 1) & mask) + offset]; - attr = pcjr->vram[((pcjr->memaddr << 1) & mask) + offset + 1]; - drawcursor = ((pcjr->memaddr == cursoraddr) && pcjr->cursorvisible && pcjr->cursoron); - if (pcjr->array[3] & 4) { - cols[1] = pcjr->array[((attr & 15) & pcjr->array[1] & 0x0f) + 16] + 16; - cols[0] = pcjr->array[(((attr >> 4) & 7) & pcjr->array[1] & 0x0f) + 16] + 16; - if ((pcjr->blink & 16) && (attr & 0x80) && !drawcursor) - cols[1] = cols[0]; - } else { - cols[1] = pcjr->array[((attr & 15) & pcjr->array[1] & 0x0f) + 16] + 16; - cols[0] = pcjr->array[((attr >> 4) & pcjr->array[1] & 0x0f) + 16] + 16; - } - pcjr->memaddr++; - if (pcjr->scanline & 8) - for (uint8_t c = 0; c < 8; c++) - buffer32->line[l][ef_x + (c << 1)] = - buffer32->line[l][ef_x + (c << 1) + 1] = - buffer32->line[l + 1][ef_x + (c << 1)] = - buffer32->line[l + 1][ef_x + (c << 1) + 1] = cols[0]; - else - for (uint8_t c = 0; c < 8; c++) - buffer32->line[l][ef_x + (c << 1)] = - buffer32->line[l][ef_x + (c << 1) + 1] = - buffer32->line[l + 1][ef_x + (c << 1)] = - buffer32->line[l + 1][ef_x + (c << 1) + 1] = - cols[(fontdat[chr][pcjr->scanline & 7] & (1 << (c ^ 7))) ? 1 : 0]; - if (drawcursor) - for (uint8_t c = 0; c < 16; c++) { - buffer32->line[l][ef_x + c] ^= 15; - buffer32->line[l + 1][ef_x + c] ^= 15; - } - } - break; - case 0x02: /*320x200x4*/ - cols[0] = pcjr->array[0 + 16] + 16; - cols[1] = pcjr->array[1 + 16] + 16; - cols[2] = pcjr->array[2 + 16] + 16; - cols[3] = pcjr->array[3 + 16] + 16; - for (x = 0; x < pcjr->crtc[1]; x++) { - int ef_x = (x << 4) + ho_d; - dat = (pcjr->vram[((pcjr->memaddr << 1) & mask) + offset] << 8) | - pcjr->vram[((pcjr->memaddr << 1) & mask) + offset + 1]; - pcjr->memaddr++; - for (uint8_t c = 0; c < 8; c++) { - buffer32->line[l][ef_x + (c << 1)] = - buffer32->line[l][ef_x + (c << 1) + 1] = - buffer32->line[l + 1][ef_x + (c << 1)] = - buffer32->line[l + 1][ef_x + (c << 1) + 1] = cols[dat >> 14]; - dat <<= 2; - } - } - break; - case 0x102: /*640x200x2*/ - cols[0] = pcjr->array[0 + 16] + 16; - cols[1] = pcjr->array[1 + 16] + 16; - for (x = 0; x < pcjr->crtc[1]; x++) { - int ef_x = (x << 4) + ho_d; - dat = (pcjr->vram[((pcjr->memaddr << 1) & mask) + offset] << 8) | - pcjr->vram[((pcjr->memaddr << 1) & mask) + offset + 1]; - pcjr->memaddr++; - for (uint8_t c = 0; c < 16; c++) { - buffer32->line[l][ef_x + c] = buffer32->line[l + 1][ef_x + c] = - cols[dat >> 15]; - dat <<= 1; - } - } - break; + } else switch (pcjr->double_type) { + default: + vid_render_blank(pcjr, l << 1, ho_s); + break; + case DOUBLE_NONE: + vid_render_blank(pcjr, l, ho_s); + break; + case DOUBLE_SIMPLE: + vid_render_blank(pcjr, l << 1, ho_s); + vid_render_blank(pcjr, (l << 1) + 1, ho_s); + break; + } - default: - break; - } - } else { - if (pcjr->array[3] & 4) { - if (pcjr->array[0] & 1) { - hline(buffer32, 0, l, (pcjr->crtc[1] << 3) + ho_s, (pcjr->array[2] & 0xf) + 16); - hline(buffer32, 0, l + 1, (pcjr->crtc[1] << 3) + ho_s, (pcjr->array[2] & 0xf) + 16); - } else { - hline(buffer32, 0, l, (pcjr->crtc[1] << 4) + ho_s, (pcjr->array[2] & 0xf) + 16); - hline(buffer32, 0, l + 1, (pcjr->crtc[1] << 4) + ho_s, (pcjr->array[2] & 0xf) + 16); - } - } else { - cols[0] = pcjr->array[0 + 16] + 16; - if (pcjr->array[0] & 1) { - hline(buffer32, 0, l, (pcjr->crtc[1] << 3) + ho_s, cols[0]); - hline(buffer32, 0, l + 1, (pcjr->crtc[1] << 3) + ho_s, cols[0]); - } else { - hline(buffer32, 0, l, (pcjr->crtc[1] << 4) + ho_s, cols[0]); - hline(buffer32, 0, l + 1, (pcjr->crtc[1] << 4) + ho_s, cols[0]); - } - } - } - if (pcjr->array[0] & 1) - x = (pcjr->crtc[1] << 3) + ho_s; - else - x = (pcjr->crtc[1] << 4) + ho_s; - if (pcjr->composite) { - Composite_Process(pcjr->array[0], 0, x >> 2, buffer32->line[l]); - Composite_Process(pcjr->array[0], 0, x >> 2, buffer32->line[l + 1]); - } else { - video_process_8(x, l); - video_process_8(x, l + 1); + switch (pcjr->double_type) { + default: + vid_render_process(pcjr, l << 1, ho_s); + vid_render_process(pcjr, (l << 1) + 1, ho_s); + break; + case DOUBLE_NONE: + vid_render_process(pcjr, l, ho_s); + break; } + pcjr->scanline = scanline_old; if (pcjr->vc == pcjr->crtc[7] && !pcjr->scanline) { pcjr->status |= 8; @@ -657,17 +674,33 @@ vid_poll(void *priv) video_force_resize_set(0); } - vid_blit_h_overscan(pcjr); + vid_blit_v_overscan(pcjr); - if (enable_overscan) { - video_blit_memtoscreen(0, pcjr->firstline << 1, - xsize, actual_ys + 32); - } else if (pcjr->apply_hd) { - video_blit_memtoscreen(ho_s / 2, (pcjr->firstline << 1) + 16, - xsize, actual_ys); + if (pcjr->double_type > DOUBLE_NONE) { + if (enable_overscan) { + cga_blit_memtoscreen(0, pcjr->firstline << 1, + xsize, actual_ys + 32, + pcjr->double_type); + } else if (pcjr->apply_hd) { + cga_blit_memtoscreen(ho_s / 2, (pcjr->firstline << 1) + 16, + xsize, actual_ys, + pcjr->double_type); + } else { + cga_blit_memtoscreen(ho_d, (pcjr->firstline << 1) + 16, + xsize, actual_ys, + pcjr->double_type); + } } else { - video_blit_memtoscreen(ho_d, (pcjr->firstline << 1) + 16, - xsize, actual_ys); + if (enable_overscan) { + video_blit_memtoscreen(0, pcjr->firstline, + xsize, (actual_ys >> 1) + 16); + } else if (pcjr->apply_hd) { + video_blit_memtoscreen(ho_s / 2, pcjr->firstline + 8, + xsize, actual_ys >> 1); + } else { + video_blit_memtoscreen(ho_d, pcjr->firstline + 8, + xsize, actual_ys >> 1); + } } } @@ -720,5 +753,8 @@ pcjr_vid_init(pcjr_t *pcjr) cga_palette = (display_type << 1); cgapal_rebuild(); + pcjr->double_type = device_get_config_int("double_type"); + cga_interpolate_init(); + monitors[monitor_index_global].mon_composite = !!pcjr->composite; } diff --git a/src/video/vid_s3.c b/src/video/vid_s3.c index 3704df946..91b7b097e 100644 --- a/src/video/vid_s3.c +++ b/src/video/vid_s3.c @@ -3155,8 +3155,6 @@ s3_out(uint16_t addr, uint8_t val, void *priv) svga->hwcursor.x /= 3; else if ((s3->chip <= S3_86C805) && s3->color_16bit) svga->hwcursor.x >>= 1; - else if ((s3->chip == S3_TRIO32) && ((svga->bpp == 15) || (svga->bpp == 16))) - svga->hwcursor.x >>= 1; break; case 0x4a: diff --git a/src/video/vid_svga.c b/src/video/vid_svga.c index 21ea23c93..302a26f23 100644 --- a/src/video/vid_svga.c +++ b/src/video/vid_svga.c @@ -330,7 +330,9 @@ svga_out(uint16_t addr, uint8_t val, void *priv) case 4: svga->chain2_write = !(val & 4); svga->chain4 = (svga->chain4 & ~8) | (val & 8); - svga->fast = (svga->gdcreg[8] == 0xff && !(svga->gdcreg[3] & 0x18) && !svga->gdcreg[1]) && ((svga->chain4 && (svga->packed_chain4 || svga->force_old_addr)) || svga->fb_only) && !(svga->adv_flags & FLAG_ADDR_BY8); + svga->fast = (svga->gdcreg[8] == 0xff && !(svga->gdcreg[3] & 0x18) && !svga->gdcreg[1]) && + ((svga->chain4 && (svga->packed_chain4 || svga->force_old_addr)) || svga->fb_only) && + !(svga->adv_flags & FLAG_ADDR_BY8); break; default: @@ -431,7 +433,9 @@ svga_out(uint16_t addr, uint8_t val, void *priv) break; } svga->gdcreg[svga->gdcaddr & 15] = val; - svga->fast = (svga->gdcreg[8] == 0xff && !(svga->gdcreg[3] & 0x18) && !svga->gdcreg[1]) && ((svga->chain4 && (svga->packed_chain4 || svga->force_old_addr)) || svga->fb_only); + svga->fast = (svga->gdcreg[8] == 0xff && !(svga->gdcreg[3] & 0x18) && !svga->gdcreg[1]) && + ((svga->chain4 && (svga->packed_chain4 || svga->force_old_addr)) || svga->fb_only) && + !(svga->adv_flags & FLAG_ADDR_BY8);; if (((svga->gdcaddr & 15) == 5 && (val ^ o) & 0x70) || ((svga->gdcaddr & 15) == 6 && (val ^ o) & 1)) { svga_log("GDCADDR%02x recalc.\n", svga->gdcaddr & 0x0f); svga_recalctimings(svga); @@ -1146,7 +1150,6 @@ svga_recalctimings(svga_t *svga) if (dev->dispofftime < TIMER_USEC) dev->dispofftime = TIMER_USEC; - svga->monitor->mon_interlace = !!dev->interlace; ibm8514_set_poll(svga); } else svga_set_poll(svga); @@ -1165,7 +1168,6 @@ svga_recalctimings(svga_t *svga) if (xga->dispofftime < TIMER_USEC) xga->dispofftime = TIMER_USEC; - svga->monitor->mon_interlace = !!xga->interlace; xga_set_poll(svga); } else svga_set_poll(svga); @@ -1184,7 +1186,6 @@ svga_recalctimings(svga_t *svga) if (dev->dispofftime < TIMER_USEC) dev->dispofftime = TIMER_USEC; - svga->monitor->mon_interlace = !!dev->interlace; ibm8514_set_poll(svga); } else if (xga->on) { _dispofftime_xga = disptime_xga - _dispontime_xga; @@ -1198,7 +1199,6 @@ svga_recalctimings(svga_t *svga) if (xga->dispofftime < TIMER_USEC) xga->dispofftime = TIMER_USEC; - svga->monitor->mon_interlace = !!xga->interlace; xga_set_poll(svga); } else svga_set_poll(svga); @@ -1253,8 +1253,34 @@ svga_recalctimings(svga_t *svga) } svga->monitor->mon_interlace = 0; - if (!svga->override && svga->interlace) - svga->monitor->mon_interlace = 1; + if (!svga->override) { + switch (set_timer) { + default: + case 0: /*VGA only*/ + svga->monitor->mon_interlace = !!svga->interlace; + break; + case 1: /*Plus 8514/A*/ + if (dev->on) + svga->monitor->mon_interlace = !!dev->interlace; + else + svga->monitor->mon_interlace = !!svga->interlace; + break; + case 2: /*Plus XGA*/ + if (xga->on) + svga->monitor->mon_interlace = !!xga->interlace; + else + svga->monitor->mon_interlace = !!svga->interlace; + break; + case 3: /*Plus 8514/A and XGA*/ + if (dev->on) + svga->monitor->mon_interlace = !!dev->interlace; + else if (xga->on) + svga->monitor->mon_interlace = !!xga->interlace; + else + svga->monitor->mon_interlace = !!svga->interlace; + break; + } + } } static void diff --git a/src/video/vid_tandy.c b/src/video/vid_tandy.c index 53c5b0dfd..f11b687ef 100644 --- a/src/video/vid_tandy.c +++ b/src/video/vid_tandy.c @@ -44,6 +44,7 @@ #include <86box/sound.h> #include <86box/snd_sn76489.h> #include <86box/video.h> +#include <86box/vid_cga.h> #include <86box/vid_cga_comp.h> #include <86box/m_tandy.h> #include <86box/machine.h> @@ -67,6 +68,11 @@ enum { TANDY_COMPOSITE }; +#define DOUBLE_NONE 0 +#define DOUBLE_SIMPLE 1 +#define DOUBLE_INTERPOLATE_SRGB 2 +#define DOUBLE_INTERPOLATE_LINEAR 3 + static video_timings_t timing_dram = { VIDEO_BUS, 0, 0, 0, 0, 0, 0 }; /*No additional waitstates*/ static void @@ -333,23 +339,253 @@ vid_read(uint32_t addr, void *priv) } static void -vid_poll(void *priv) +vid_render(tandy_t *dev, int line) { - tandy_t *dev = (tandy_t *) priv; - t1kvid_t *vid = dev->vid; + t1kvid_t *vid = dev->vid; uint16_t cursoraddr = (vid->crtc[15] | (vid->crtc[14] << 8)) & 0x3fff; int drawcursor; int x; int c; - int xs_temp; - int ys_temp; - int oldvc; uint8_t chr; uint8_t attr; uint16_t dat; - int cols[4]; int col; + int cols[4]; + + cols[0] = (vid->array[2] & 0xf) + 16; + + for (c = 0; c < 8; c++) { + if (vid->array[3] & 4) { + buffer32->line[line][c] = cols[0]; + if (vid->mode & 1) + buffer32->line[line][c + (vid->crtc[1] << 3) + 8] = cols[0]; + else + buffer32->line[line][c + (vid->crtc[1] << 4) + 8] = cols[0]; + } else if ((vid->mode & 0x12) == 0x12) { + buffer32->line[line][c] = 0; + if (vid->mode & 1) + buffer32->line[line][c + (vid->crtc[1] << 3) + 8] = 0; + else + buffer32->line[line][c + (vid->crtc[1] << 4) + 8] = 0; + } else { + buffer32->line[line][c] = buffer32->line[(line) + 1][c] = (vid->col & 15) + 16; + if (vid->mode & 1) + buffer32->line[line][c + (vid->crtc[1] << 3) + 8] = (vid->col & 15) + 16; + else + buffer32->line[line][c + (vid->crtc[1] << 4) + 8] = (vid->col & 15) + 16; + } + } + + if (dev->is_sl2 && (vid->array[5] & 1)) { /*640x200x16*/ + for (x = 0; x < vid->crtc[1] * 2; x++) { + dat = (vid->vram[(vid->memaddr << 1) & 0xffff] << 8) | vid->vram[((vid->memaddr << 1) + 1) & 0xffff]; + vid->memaddr++; + buffer32->line[line][(x << 2) + 8] = vid->array[((dat >> 12) & 0xf) + 16] + 16; + buffer32->line[line][(x << 2) + 9] = vid->array[((dat >> 8) & 0xf) + 16] + 16; + buffer32->line[line][(x << 2) + 10] = vid->array[((dat >> 4) & 0xf) + 16] + 16; + buffer32->line[line][(x << 2) + 11] = vid->array[(dat & 0xf) + 16] + 16; + } + } else if ((vid->array[3] & 0x10) && (vid->mode & 1)) { /*320x200x16*/ + for (x = 0; x < vid->crtc[1]; x++) { + dat = (vid->vram[((vid->memaddr << 1) & 0x1fff) + ((vid->scanline & 3) * 0x2000)] << 8) | + vid->vram[((vid->memaddr << 1) & 0x1fff) + ((vid->scanline & 3) * 0x2000) + 1]; + vid->memaddr++; + buffer32->line[line][(x << 3) + 8] = buffer32->line[line][(x << 3) + 9] = + vid->array[((dat >> 12) & vid->array[1] & 0x0f) + 16] + 16; + buffer32->line[line][(x << 3) + 10] = buffer32->line[line][(x << 3) + 11] = + vid->array[((dat >> 8) & vid->array[1] & 0x0f) + 16] + 16; + buffer32->line[line][(x << 3) + 12] = buffer32->line[line][(x << 3) + 13] = + vid->array[((dat >> 4) & vid->array[1] & 0x0f) + 16] + 16; + buffer32->line[line][(x << 3) + 14] = buffer32->line[line][(x << 3) + 15] = + vid->array[(dat & vid->array[1] & 0x0f) + 16] + 16; + } + } else if (vid->array[3] & 0x10) { /*160x200x16*/ + for (x = 0; x < vid->crtc[1]; x++) { + if (dev->is_sl2) + dat = (vid->vram[((vid->memaddr << 1) & 0x1fff) + ((vid->scanline & 1) * 0x2000)] << 8) | + vid->vram[((vid->memaddr << 1) & 0x1fff) + ((vid->scanline & 1) * 0x2000) + 1]; + else + dat = (vid->vram[((vid->memaddr << 1) & 0x1fff) + ((vid->scanline & 3) * 0x2000)] << 8) | + vid->vram[((vid->memaddr << 1) & 0x1fff) + ((vid->scanline & 3) * 0x2000) + 1]; + vid->memaddr++; + buffer32->line[line][(x << 4) + 8] = buffer32->line[line][(x << 4) + 9] = + buffer32->line[line][(x << 4) + 10] = buffer32->line[line][(x << 4) + 11] = + vid->array[((dat >> 12) & vid->array[1] & 0x0f) + 16] + 16; + buffer32->line[line][(x << 4) + 12] = buffer32->line[line][(x << 4) + 13] = + buffer32->line[line][(x << 4) + 14] = buffer32->line[line][(x << 4) + 15] = + vid->array[((dat >> 8) & vid->array[1] & 0x0f) + 16] + 16; + buffer32->line[line][(x << 4) + 16] = buffer32->line[line][(x << 4) + 17] = + buffer32->line[line][(x << 4) + 18] = buffer32->line[line][(x << 4) + 19] = + vid->array[((dat >> 4) & vid->array[1] & 0x0f) + 16] + 16; + buffer32->line[line][(x << 4) + 20] = buffer32->line[line][(x << 4) + 21] = + buffer32->line[line][(x << 4) + 22] = buffer32->line[line][(x << 4) + 23] = + vid->array[(dat & vid->array[1] & 0x0f) + 16] + 16; + } + } else if (vid->array[3] & 0x08) { /*640x200x4 - this implementation is a complete guess!*/ + for (x = 0; x < vid->crtc[1]; x++) { + dat = (vid->vram[((vid->memaddr << 1) & 0x1fff) + ((vid->scanline & 3) * 0x2000)] << 8) | + vid->vram[((vid->memaddr << 1) & 0x1fff) + ((vid->scanline & 3) * 0x2000) + 1]; + vid->memaddr++; + for (c = 0; c < 8; c++) { + chr = (dat >> 6) & 2; + chr |= ((dat >> 15) & 1); + buffer32->line[line][(x << 3) + 8 + c] = + vid->array[(chr & vid->array[1]) + 16] + 16; + dat <<= 1; + } + } + } else if (vid->mode & 1) { + for (x = 0; x < vid->crtc[1]; x++) { + chr = vid->vram[(vid->memaddr << 1) & 0x3fff]; + attr = vid->vram[((vid->memaddr << 1) + 1) & 0x3fff]; + drawcursor = ((vid->memaddr == cursoraddr) && vid->cursorvisible && vid->cursoron); + if (vid->mode & 0x20) { + cols[1] = vid->array[((attr & 15) & vid->array[1]) + 16] + 16; + cols[0] = vid->array[(((attr >> 4) & 7) & vid->array[1]) + 16] + 16; + if ((vid->blink & 16) && (attr & 0x80) && !drawcursor) + cols[1] = cols[0]; + } else { + cols[1] = vid->array[((attr & 15) & vid->array[1]) + 16] + 16; + cols[0] = vid->array[((attr >> 4) & vid->array[1]) + 16] + 16; + } + if (vid->scanline & 8) for (c = 0; c < 8; c++) + buffer32->line[line][(x << 3) + c + 8] = + ((chr >= 0xb3) && (chr <= 0xdf)) ? cols[(fontdat[chr][7] & (1 << (c ^ 7))) ? 1 : 0] : cols[0]; + else for (c = 0; c < 8; c++) { + if (vid->scanline == 8) + buffer32->line[line][(x << 3) + c + 8] = cols[(fontdat[chr][7] & (1 << (c ^ 7))) ? 1 : 0]; + else + buffer32->line[line][(x << 3) + c + 8] = cols[(fontdat[chr][vid->scanline & 7] & (1 << (c ^ 7))) ? 1 : 0]; + } + if (drawcursor) for (c = 0; c < 8; c++) + buffer32->line[line][(x << 3) + c + 8] ^= 15; + vid->memaddr++; + } + } else if (!(vid->mode & 2)) { + for (x = 0; x < vid->crtc[1]; x++) { + chr = vid->vram[(vid->memaddr << 1) & 0x3fff]; + attr = vid->vram[((vid->memaddr << 1) + 1) & 0x3fff]; + drawcursor = ((vid->memaddr == cursoraddr) && vid->cursorvisible && vid->cursoron); + if (vid->mode & 0x20) { + cols[1] = vid->array[((attr & 15) & vid->array[1]) + 16] + 16; + cols[0] = vid->array[(((attr >> 4) & 7) & vid->array[1]) + 16] + 16; + if ((vid->blink & 16) && (attr & 0x80) && !drawcursor) + cols[1] = cols[0]; + } else { + cols[1] = vid->array[((attr & 15) & vid->array[1]) + 16] + 16; + cols[0] = vid->array[((attr >> 4) & vid->array[1]) + 16] + 16; + } + vid->memaddr++; + if (vid->scanline & 8) for (c = 0; c < 8; c++) + buffer32->line[line][(x << 4) + (c << 1) + 8] = + buffer32->line[line][(x << 4) + (c << 1) + 1 + 8] = + ((chr >= 0xb3) && (chr <= 0xdf)) ? cols[(fontdat[chr][7] & (1 << (c ^ 7))) ? 1 : 0] : cols[0]; + else for (c = 0; c < 8; c++) { + if (vid->scanline == 8) + buffer32->line[line][(x << 4) + (c << 1) + 8] = + buffer32->line[line][(x << 4) + (c << 1) + 1 + 8] = + cols[(fontdat[chr][7] & (1 << (c ^ 7))) ? 1 : 0]; + else + buffer32->line[line][(x << 4) + (c << 1) + 8] = + buffer32->line[line][(x << 4) + (c << 1) + 1 + 8] = + cols[(fontdat[chr][vid->scanline & 7] & (1 << (c ^ 7))) ? 1 : 0]; + } + if (drawcursor) for (c = 0; c < 16; c++) + buffer32->line[line][(x << 4) + c + 8] ^= 15; + } + } else if (!(vid->mode & 16)) { + cols[0] = (vid->col & 15); + col = (vid->col & 16) ? 8 : 0; + if (vid->mode & 4) { + cols[1] = col | 3; + cols[2] = col | 4; + cols[3] = col | 7; + } else if (vid->col & 32) { + cols[1] = col | 3; + cols[2] = col | 5; + cols[3] = col | 7; + } else { + cols[1] = col | 2; + cols[2] = col | 4; + cols[3] = col | 6; + } + cols[0] = vid->array[(cols[0] & vid->array[1]) + 16] + 16; + cols[1] = vid->array[(cols[1] & vid->array[1]) + 16] + 16; + cols[2] = vid->array[(cols[2] & vid->array[1]) + 16] + 16; + cols[3] = vid->array[(cols[3] & vid->array[1]) + 16] + 16; + for (x = 0; x < vid->crtc[1]; x++) { + dat = (vid->vram[((vid->memaddr << 1) & 0x1fff) + ((vid->scanline & 1) * 0x2000)] << 8) | + vid->vram[((vid->memaddr << 1) & 0x1fff) + ((vid->scanline & 1) * 0x2000) + 1]; + vid->memaddr++; + for (c = 0; c < 8; c++) { + buffer32->line[line][(x << 4) + (c << 1) + 8] = + buffer32->line[line][(x << 4) + (c << 1) + 1 + 8] = cols[dat >> 14]; + dat <<= 2; + } + } + } else { + cols[0] = 0; + cols[1] = vid->array[(vid->col & vid->array[1]) + 16] + 16; + for (x = 0; x < vid->crtc[1]; x++) { + dat = (vid->vram[((vid->memaddr << 1) & 0x1fff) + ((vid->scanline & 1) * 0x2000)] << 8) | + vid->vram[((vid->memaddr << 1) & 0x1fff) + ((vid->scanline & 1) * 0x2000) + 1]; + vid->memaddr++; + for (c = 0; c < 16; c++) { + buffer32->line[line][(x << 4) + c + 8] = buffer32->line[(line) + 1][(x << 4) + c + 8] = cols[dat >> 15]; + dat <<= 1; + } + } + } +} + +static void +vid_render_blank(tandy_t *dev, int line) +{ + t1kvid_t *vid = dev->vid; + + if (vid->array[3] & 4) { + if (vid->mode & 1) + hline(buffer32, 0, line, (vid->crtc[1] << 3) + 16, (vid->array[2] & 0xf) + 16); + else + hline(buffer32, 0, line, (vid->crtc[1] << 4) + 16, (vid->array[2] & 0xf) + 16); + } else { + int cols = ((vid->mode & 0x12) == 0x12) ? 0 : (vid->col & 0xf) + 16; + + if (vid->mode & 1) + hline(buffer32, 0, line, (vid->crtc[1] << 3) + 16, cols); + else + hline(buffer32, 0, line, (vid->crtc[1] << 4) + 16, cols); + } +} + +static void +vid_render_process(tandy_t *dev, int line) +{ + t1kvid_t *vid = dev->vid; + int x; + + if (vid->mode & 1) + x = (vid->crtc[1] << 3) + 16; + else + x = (vid->crtc[1] << 4) + 16; + + if (!dev->is_sl2 && vid->composite) + Composite_Process(vid->mode, 0, x >> 2, buffer32->line[line]); + else + video_process_8(x, line); +} + +static void +vid_poll(void *priv) +{ + tandy_t *dev = (tandy_t *) priv; + t1kvid_t *vid = dev->vid; + int x; + int xs_temp; + int ys_temp; + int oldvc; int scanline_old; + int old_ma; if (!vid->linepos) { timer_advance_u64(&vid->timer, vid->dispofftime); @@ -364,214 +600,44 @@ vid_poll(void *priv) video_wait_for_buffer(); } vid->lastline = vid->displine; - cols[0] = (vid->array[2] & 0xf) + 16; - for (c = 0; c < 8; c++) { - if (vid->array[3] & 4) { - buffer32->line[vid->displine << 1][c] = buffer32->line[(vid->displine << 1) + 1][c] = cols[0]; - if (vid->mode & 1) { - buffer32->line[vid->displine << 1][c + (vid->crtc[1] << 3) + 8] = buffer32->line[(vid->displine << 1) + 1][c + (vid->crtc[1] << 3) + 8] = cols[0]; - } else { - buffer32->line[vid->displine << 1][c + (vid->crtc[1] << 4) + 8] = buffer32->line[(vid->displine << 1) + 1][c + (vid->crtc[1] << 4) + 8] = cols[0]; - } - } else if ((vid->mode & 0x12) == 0x12) { - buffer32->line[vid->displine << 1][c] = buffer32->line[(vid->displine << 1) + 1][c] = 0; - if (vid->mode & 1) { - buffer32->line[vid->displine << 1][c + (vid->crtc[1] << 3) + 8] = buffer32->line[(vid->displine << 1) + 1][c + (vid->crtc[1] << 3) + 8] = 0; - } else { - buffer32->line[vid->displine << 1][c + (vid->crtc[1] << 4) + 8] = buffer32->line[(vid->displine << 1) + 1][c + (vid->crtc[1] << 4) + 8] = 0; - } - } else { - buffer32->line[vid->displine << 1][c] = buffer32->line[(vid->displine << 1) + 1][c] = (vid->col & 15) + 16; - if (vid->mode & 1) { - buffer32->line[vid->displine << 1][c + (vid->crtc[1] << 3) + 8] = buffer32->line[(vid->displine << 1) + 1][c + (vid->crtc[1] << 3) + 8] = (vid->col & 15) + 16; - } else { - buffer32->line[vid->displine << 1][c + (vid->crtc[1] << 4) + 8] = buffer32->line[(vid->displine << 1) + 1][c + (vid->crtc[1] << 4) + 8] = (vid->col & 15) + 16; - } - } - } - if (dev->is_sl2 && (vid->array[5] & 1)) { /*640x200x16*/ - for (x = 0; x < vid->crtc[1] * 2; x++) { - dat = (vid->vram[(vid->memaddr << 1) & 0xffff] << 8) | vid->vram[((vid->memaddr << 1) + 1) & 0xffff]; - vid->memaddr++; - buffer32->line[vid->displine << 1][(x << 2) + 8] = buffer32->line[(vid->displine << 1) + 1][(x << 2) + 8] = vid->array[((dat >> 12) & 0xf) + 16] + 16; - buffer32->line[vid->displine << 1][(x << 2) + 9] = buffer32->line[(vid->displine << 1) + 1][(x << 2) + 9] = vid->array[((dat >> 8) & 0xf) + 16] + 16; - buffer32->line[vid->displine << 1][(x << 2) + 10] = buffer32->line[(vid->displine << 1) + 1][(x << 2) + 10] = vid->array[((dat >> 4) & 0xf) + 16] + 16; - buffer32->line[vid->displine << 1][(x << 2) + 11] = buffer32->line[(vid->displine << 1) + 1][(x << 2) + 11] = vid->array[(dat & 0xf) + 16] + 16; - } - } else if ((vid->array[3] & 0x10) && (vid->mode & 1)) { /*320x200x16*/ - for (x = 0; x < vid->crtc[1]; x++) { - dat = (vid->vram[((vid->memaddr << 1) & 0x1fff) + ((vid->scanline & 3) * 0x2000)] << 8) | vid->vram[((vid->memaddr << 1) & 0x1fff) + ((vid->scanline & 3) * 0x2000) + 1]; - vid->memaddr++; - buffer32->line[vid->displine << 1][(x << 3) + 8] = buffer32->line[(vid->displine << 1) + 1][(x << 3) + 8] = buffer32->line[vid->displine << 1][(x << 3) + 9] = buffer32->line[(vid->displine << 1) + 1][(x << 3) + 9] = vid->array[((dat >> 12) & vid->array[1] & 0x0f) + 16] + 16; - buffer32->line[vid->displine << 1][(x << 3) + 10] = buffer32->line[(vid->displine << 1) + 1][(x << 3) + 10] = buffer32->line[vid->displine << 1][(x << 3) + 11] = buffer32->line[(vid->displine << 1) + 1][(x << 3) + 11] = vid->array[((dat >> 8) & vid->array[1] & 0x0f) + 16] + 16; - buffer32->line[vid->displine << 1][(x << 3) + 12] = buffer32->line[(vid->displine << 1) + 1][(x << 3) + 12] = buffer32->line[vid->displine << 1][(x << 3) + 13] = buffer32->line[(vid->displine << 1) + 1][(x << 3) + 13] = vid->array[((dat >> 4) & vid->array[1] & 0x0f) + 16] + 16; - buffer32->line[vid->displine << 1][(x << 3) + 14] = buffer32->line[(vid->displine << 1) + 1][(x << 3) + 14] = buffer32->line[vid->displine << 1][(x << 3) + 15] = buffer32->line[(vid->displine << 1) + 1][(x << 3) + 15] = vid->array[(dat & vid->array[1] & 0x0f) + 16] + 16; - } - } else if (vid->array[3] & 0x10) { /*160x200x16*/ - for (x = 0; x < vid->crtc[1]; x++) { - if (dev->is_sl2) { - dat = (vid->vram[((vid->memaddr << 1) & 0x1fff) + ((vid->scanline & 1) * 0x2000)] << 8) | vid->vram[((vid->memaddr << 1) & 0x1fff) + ((vid->scanline & 1) * 0x2000) + 1]; - } else { - dat = (vid->vram[((vid->memaddr << 1) & 0x1fff) + ((vid->scanline & 3) * 0x2000)] << 8) | vid->vram[((vid->memaddr << 1) & 0x1fff) + ((vid->scanline & 3) * 0x2000) + 1]; - } - vid->memaddr++; - buffer32->line[vid->displine << 1][(x << 4) + 8] = buffer32->line[(vid->displine << 1) + 1][(x << 4) + 8] = buffer32->line[vid->displine << 1][(x << 4) + 9] = buffer32->line[(vid->displine << 1) + 1][(x << 4) + 9] = buffer32->line[vid->displine << 1][(x << 4) + 10] = buffer32->line[(vid->displine << 1) + 1][(x << 4) + 10] = buffer32->line[vid->displine << 1][(x << 4) + 11] = buffer32->line[(vid->displine << 1) + 1][(x << 4) + 11] = vid->array[((dat >> 12) & vid->array[1] & 0x0f) + 16] + 16; - buffer32->line[vid->displine << 1][(x << 4) + 12] = buffer32->line[(vid->displine << 1) + 1][(x << 4) + 12] = buffer32->line[vid->displine << 1][(x << 4) + 13] = buffer32->line[(vid->displine << 1) + 1][(x << 4) + 13] = buffer32->line[vid->displine << 1][(x << 4) + 14] = buffer32->line[(vid->displine << 1) + 1][(x << 4) + 14] = buffer32->line[vid->displine << 1][(x << 4) + 15] = buffer32->line[(vid->displine << 1) + 1][(x << 4) + 15] = vid->array[((dat >> 8) & vid->array[1] & 0x0f) + 16] + 16; - buffer32->line[vid->displine << 1][(x << 4) + 16] = buffer32->line[(vid->displine << 1) + 1][(x << 4) + 16] = buffer32->line[vid->displine << 1][(x << 4) + 17] = buffer32->line[(vid->displine << 1) + 1][(x << 4) + 17] = buffer32->line[vid->displine << 1][(x << 4) + 18] = buffer32->line[(vid->displine << 1) + 1][(x << 4) + 18] = buffer32->line[vid->displine << 1][(x << 4) + 19] = buffer32->line[(vid->displine << 1) + 1][(x << 4) + 19] = vid->array[((dat >> 4) & vid->array[1] & 0x0f) + 16] + 16; - buffer32->line[vid->displine << 1][(x << 4) + 20] = buffer32->line[(vid->displine << 1) + 1][(x << 4) + 20] = buffer32->line[vid->displine << 1][(x << 4) + 21] = buffer32->line[(vid->displine << 1) + 1][(x << 4) + 21] = buffer32->line[vid->displine << 1][(x << 4) + 22] = buffer32->line[(vid->displine << 1) + 1][(x << 4) + 22] = buffer32->line[vid->displine << 1][(x << 4) + 23] = buffer32->line[(vid->displine << 1) + 1][(x << 4) + 23] = vid->array[(dat & vid->array[1] & 0x0f) + 16] + 16; - } - } else if (vid->array[3] & 0x08) { /*640x200x4 - this implementation is a complete guess!*/ - for (x = 0; x < vid->crtc[1]; x++) { - dat = (vid->vram[((vid->memaddr << 1) & 0x1fff) + ((vid->scanline & 3) * 0x2000)] << 8) | vid->vram[((vid->memaddr << 1) & 0x1fff) + ((vid->scanline & 3) * 0x2000) + 1]; - vid->memaddr++; - for (c = 0; c < 8; c++) { - chr = (dat >> 6) & 2; - chr |= ((dat >> 15) & 1); - buffer32->line[vid->displine << 1][(x << 3) + 8 + c] = buffer32->line[(vid->displine << 1) + 1][(x << 3) + 8 + c] = vid->array[(chr & vid->array[1]) + 16] + 16; - dat <<= 1; - } - } - } else if (vid->mode & 1) { - for (x = 0; x < vid->crtc[1]; x++) { - chr = vid->vram[(vid->memaddr << 1) & 0x3fff]; - attr = vid->vram[((vid->memaddr << 1) + 1) & 0x3fff]; - drawcursor = ((vid->memaddr == cursoraddr) && vid->cursorvisible && vid->cursoron); - if (vid->mode & 0x20) { - cols[1] = vid->array[((attr & 15) & vid->array[1]) + 16] + 16; - cols[0] = vid->array[(((attr >> 4) & 7) & vid->array[1]) + 16] + 16; - if ((vid->blink & 16) && (attr & 0x80) && !drawcursor) - cols[1] = cols[0]; - } else { - cols[1] = vid->array[((attr & 15) & vid->array[1]) + 16] + 16; - cols[0] = vid->array[((attr >> 4) & vid->array[1]) + 16] + 16; - } - if (vid->scanline & 8) { - for (c = 0; c < 8; c++) { - buffer32->line[vid->displine << 1][(x << 3) + c + 8] = buffer32->line[(vid->displine << 1) + 1][(x << 3) + c + 8] = ((chr >= 0xb3) && (chr <= 0xdf)) ? cols[(fontdat[chr][7] & (1 << (c ^ 7))) ? 1 : 0] : cols[0]; - } - } else { - for (c = 0; c < 8; c++) { - if (vid->scanline == 8) { - buffer32->line[vid->displine << 1][(x << 3) + c + 8] = buffer32->line[(vid->displine << 1) + 1][(x << 3) + c + 8] = cols[(fontdat[chr][7] & (1 << (c ^ 7))) ? 1 : 0]; - } else { - buffer32->line[vid->displine << 1][(x << 3) + c + 8] = buffer32->line[(vid->displine << 1) + 1][(x << 3) + c + 8] = cols[(fontdat[chr][vid->scanline & 7] & (1 << (c ^ 7))) ? 1 : 0]; - } - } - } - if (drawcursor) { - for (c = 0; c < 8; c++) { - buffer32->line[vid->displine << 1][(x << 3) + c + 8] ^= 15; - buffer32->line[(vid->displine << 1) + 1][(x << 3) + c + 8] ^= 15; - } - } - vid->memaddr++; - } - } else if (!(vid->mode & 2)) { - for (x = 0; x < vid->crtc[1]; x++) { - chr = vid->vram[(vid->memaddr << 1) & 0x3fff]; - attr = vid->vram[((vid->memaddr << 1) + 1) & 0x3fff]; - drawcursor = ((vid->memaddr == cursoraddr) && vid->cursorvisible && vid->cursoron); - if (vid->mode & 0x20) { - cols[1] = vid->array[((attr & 15) & vid->array[1]) + 16] + 16; - cols[0] = vid->array[(((attr >> 4) & 7) & vid->array[1]) + 16] + 16; - if ((vid->blink & 16) && (attr & 0x80) && !drawcursor) - cols[1] = cols[0]; - } else { - cols[1] = vid->array[((attr & 15) & vid->array[1]) + 16] + 16; - cols[0] = vid->array[((attr >> 4) & vid->array[1]) + 16] + 16; - } - vid->memaddr++; - if (vid->scanline & 8) { - for (c = 0; c < 8; c++) - buffer32->line[vid->displine << 1][(x << 4) + (c << 1) + 8] = buffer32->line[(vid->displine << 1) + 1][(x << 4) + (c << 1) + 8] = buffer32->line[vid->displine << 1][(x << 4) + (c << 1) + 1 + 8] = buffer32->line[(vid->displine << 1) + 1][(x << 4) + (c << 1) + 1 + 8] = ((chr >= 0xb3) && (chr <= 0xdf)) ? cols[(fontdat[chr][7] & (1 << (c ^ 7))) ? 1 : 0] : cols[0]; - } else { - for (c = 0; c < 8; c++) { - if (vid->scanline == 8) { - buffer32->line[vid->displine << 1][(x << 4) + (c << 1) + 8] = buffer32->line[(vid->displine << 1) + 1][(x << 4) + (c << 1) + 8] = buffer32->line[vid->displine << 1][(x << 4) + (c << 1) + 1 + 8] = buffer32->line[(vid->displine << 1) + 1][(x << 4) + (c << 1) + 1 + 8] = cols[(fontdat[chr][7] & (1 << (c ^ 7))) ? 1 : 0]; - } else { - buffer32->line[vid->displine << 1][(x << 4) + (c << 1) + 8] = buffer32->line[(vid->displine << 1) + 1][(x << 4) + (c << 1) + 8] = buffer32->line[vid->displine << 1][(x << 4) + (c << 1) + 1 + 8] = buffer32->line[(vid->displine << 1) + 1][(x << 4) + (c << 1) + 1 + 8] = cols[(fontdat[chr][vid->scanline & 7] & (1 << (c ^ 7))) ? 1 : 0]; - } - } - } - if (drawcursor) { - for (c = 0; c < 16; c++) { - buffer32->line[vid->displine << 1][(x << 4) + c + 8] ^= 15; - buffer32->line[(vid->displine << 1) + 1][(x << 4) + c + 8] ^= 15; - } - } - } - } else if (!(vid->mode & 16)) { - cols[0] = (vid->col & 15); - col = (vid->col & 16) ? 8 : 0; - if (vid->mode & 4) { - cols[1] = col | 3; - cols[2] = col | 4; - cols[3] = col | 7; - } else if (vid->col & 32) { - cols[1] = col | 3; - cols[2] = col | 5; - cols[3] = col | 7; - } else { - cols[1] = col | 2; - cols[2] = col | 4; - cols[3] = col | 6; - } - cols[0] = vid->array[(cols[0] & vid->array[1]) + 16] + 16; - cols[1] = vid->array[(cols[1] & vid->array[1]) + 16] + 16; - cols[2] = vid->array[(cols[2] & vid->array[1]) + 16] + 16; - cols[3] = vid->array[(cols[3] & vid->array[1]) + 16] + 16; - for (x = 0; x < vid->crtc[1]; x++) { - dat = (vid->vram[((vid->memaddr << 1) & 0x1fff) + ((vid->scanline & 1) * 0x2000)] << 8) | vid->vram[((vid->memaddr << 1) & 0x1fff) + ((vid->scanline & 1) * 0x2000) + 1]; - vid->memaddr++; - for (c = 0; c < 8; c++) { - buffer32->line[vid->displine << 1][(x << 4) + (c << 1) + 8] = buffer32->line[(vid->displine << 1) + 1][(x << 4) + (c << 1) + 8] = buffer32->line[vid->displine << 1][(x << 4) + (c << 1) + 1 + 8] = buffer32->line[(vid->displine << 1) + 1][(x << 4) + (c << 1) + 1 + 8] = cols[dat >> 14]; - dat <<= 2; - } - } - } else { - cols[0] = 0; - cols[1] = vid->array[(vid->col & vid->array[1]) + 16] + 16; - for (x = 0; x < vid->crtc[1]; x++) { - dat = (vid->vram[((vid->memaddr << 1) & 0x1fff) + ((vid->scanline & 1) * 0x2000)] << 8) | vid->vram[((vid->memaddr << 1) & 0x1fff) + ((vid->scanline & 1) * 0x2000) + 1]; - vid->memaddr++; - for (c = 0; c < 16; c++) { - buffer32->line[vid->displine << 1][(x << 4) + c + 8] = buffer32->line[(vid->displine << 1) + 1][(x << 4) + c + 8] = cols[dat >> 15]; - dat <<= 1; - } - } - } - } else { - if (vid->array[3] & 4) { - if (vid->mode & 1) { - hline(buffer32, 0, (vid->displine << 1), (vid->crtc[1] << 3) + 16, (vid->array[2] & 0xf) + 16); - hline(buffer32, 0, (vid->displine << 1) + 1, (vid->crtc[1] << 3) + 16, (vid->array[2] & 0xf) + 16); - } else { - hline(buffer32, 0, (vid->displine << 1), (vid->crtc[1] << 4) + 16, (vid->array[2] & 0xf) + 16); - hline(buffer32, 0, (vid->displine << 1) + 1, (vid->crtc[1] << 4) + 16, (vid->array[2] & 0xf) + 16); - } - } else { - cols[0] = ((vid->mode & 0x12) == 0x12) ? 0 : (vid->col & 0xf) + 16; - if (vid->mode & 1) { - hline(buffer32, 0, (vid->displine << 1), (vid->crtc[1] << 3) + 16, cols[0]); - hline(buffer32, 0, (vid->displine << 1) + 1, (vid->crtc[1] << 3) + 16, cols[0]); - } else { - hline(buffer32, 0, (vid->displine << 1), (vid->crtc[1] << 4) + 16, cols[0]); - hline(buffer32, 0, (vid->displine << 1) + 1, (vid->crtc[1] << 4) + 16, cols[0]); - } + switch (vid->double_type) { + default: + vid_render(dev, vid->displine << 1); + vid_render_blank(dev, (vid->displine << 1) + 1); + break; + case DOUBLE_NONE: + vid_render(dev, vid->displine); + break; + case DOUBLE_SIMPLE: + old_ma = vid->memaddr; + vid_render(dev, vid->displine << 1); + vid->memaddr = old_ma; + vid_render(dev, (vid->displine << 1) + 1); + break; } + } else switch (vid->double_type) { + default: + vid_render_blank(dev, vid->displine << 1); + break; + case DOUBLE_NONE: + vid_render_blank(dev, vid->displine); + break; + case DOUBLE_SIMPLE: + vid_render_blank(dev, vid->displine << 1); + vid_render_blank(dev, (vid->displine << 1) + 1); + break; } - if (vid->mode & 1) - x = (vid->crtc[1] << 3) + 16; - else - x = (vid->crtc[1] << 4) + 16; - if (!dev->is_sl2 && vid->composite) { - Composite_Process(vid->mode, 0, x >> 2, buffer32->line[vid->displine << 1]); - Composite_Process(vid->mode, 0, x >> 2, buffer32->line[(vid->displine << 1) + 1]); - } else { - video_process_8(x, vid->displine << 1); - video_process_8(x, (vid->displine << 1) + 1); + switch (vid->double_type) { + default: + vid_render_process(dev, vid->displine << 1); + vid_render_process(dev, (vid->displine << 1) + 1); + break; + case DOUBLE_NONE: + vid_render_process(dev, vid->displine); + break; } + vid->scanline = scanline_old; if (vid->vc == vid->crtc[7] && !vid->scanline) vid->status |= 8; @@ -663,13 +729,7 @@ vid_poll(void *priv) video_force_resize_set(0); } - if (enable_overscan) { - video_blit_memtoscreen(0, (vid->firstline - 4) << 1, - xsize, ((vid->lastline - vid->firstline) + 8) << 1); - } else { - video_blit_memtoscreen(8, vid->firstline << 1, - xsize, (vid->lastline - vid->firstline) << 1); - } + cga_do_blit(xsize, vid->firstline, vid->lastline, vid->double_type); } frames++; @@ -763,6 +823,9 @@ tandy_vid_init(tandy_t *dev) dev->vid = vid; + vid->double_type = device_get_config_int("double_type"); + cga_interpolate_init(); + monitors[monitor_index_global].mon_composite = !!vid->composite; } @@ -782,6 +845,46 @@ const device_config_t vid_config[] = { { .description = "" } } }, + { + .name = "double_type", + .description = "Line doubling type", + .type = CONFIG_SELECTION, + .default_string = NULL, + .default_int = DOUBLE_NONE, + .file_filter = NULL, + .spinner = { 0 }, + .selection = { + { .description = "None", .value = DOUBLE_NONE }, + { .description = "Simple doubling", .value = DOUBLE_SIMPLE }, + { .description = "sRGB interpolation", .value = DOUBLE_INTERPOLATE_SRGB }, + { .description = "Linear interpolation", .value = DOUBLE_INTERPOLATE_LINEAR }, + { .description = "" } + }, + .bios = { { 0 } } + }, + { .name = "", .description = "", .type = CONFIG_END } + // clang-format on +}; + +const device_config_t sl_vid_config[] = { + // clang-format off + { + .name = "double_type", + .description = "Line doubling type", + .type = CONFIG_SELECTION, + .default_string = NULL, + .default_int = DOUBLE_NONE, + .file_filter = NULL, + .spinner = { 0 }, + .selection = { + { .description = "None", .value = DOUBLE_NONE }, + { .description = "Simple doubling", .value = DOUBLE_SIMPLE }, + { .description = "sRGB interpolation", .value = DOUBLE_INTERPOLATE_SRGB }, + { .description = "Linear interpolation", .value = DOUBLE_INTERPOLATE_LINEAR }, + { .description = "" } + }, + .bios = { { 0 } } + }, { .name = "", .description = "", .type = CONFIG_END } // clang-format on }; @@ -825,5 +928,5 @@ const device_t tandy_1000sl_video_device = { .available = NULL, .speed_changed = tandy_vid_speed_changed, .force_redraw = NULL, - .config = NULL + .config = sl_vid_config }; diff --git a/src/video/vid_voodoo_banshee.c b/src/video/vid_voodoo_banshee.c index 86329ee8d..7bd94a34a 100644 --- a/src/video/vid_voodoo_banshee.c +++ b/src/video/vid_voodoo_banshee.c @@ -876,6 +876,9 @@ banshee_ext_outl(uint16_t addr, uint32_t val, void *priv) svga->write_bank = (val & 0x3ff) << 15; svga->read_bank = ((val >> 10) & 0x3ff) << 15; svga->packed_chain4 = !!(val & 0x00100000); + svga->fast = (svga->gdcreg[8] == 0xff && !(svga->gdcreg[3] & 0x18) && !svga->gdcreg[1]) && + ((svga->chain4 && (svga->packed_chain4 || svga->force_old_addr)) || svga->fb_only) && + !(svga->adv_flags & FLAG_ADDR_BY8);; break; case PLL_pllCtrl0: diff --git a/vcpkg.json b/vcpkg.json index 52e30dd51..a623508e7 100644 --- a/vcpkg.json +++ b/vcpkg.json @@ -1,6 +1,6 @@ { "name": "86box", - "version-string": "5.0.1", + "version-string": "5.1", "homepage": "https://86box.net/", "documentation": "https://86box.readthedocs.io/", "license": "GPL-2.0-or-later",