Merge remote-tracking branch 'upstream/master' into feature/mtrr

This commit is contained in:
Jasmine Iwanek
2023-10-13 18:42:28 -04:00
46 changed files with 516 additions and 635 deletions

View File

@@ -14,8 +14,8 @@
#
# Define our flags
string(APPEND CMAKE_C_FLAGS_INIT " -std=c99 -fomit-frame-pointer -Wall -fno-strict-aliasing -Werror=implicit-int -Werror=implicit-function-declaration -Werror=int-conversion -Werror=strict-prototypes -Werror=old-style-definition")
string(APPEND CMAKE_CXX_FLAGS_INIT " -std=c++11 -fomit-frame-pointer -Wall -fno-strict-aliasing")
string(APPEND CMAKE_C_FLAGS_INIT " -fomit-frame-pointer -Wall -fno-strict-aliasing -Werror=implicit-int -Werror=implicit-function-declaration -Werror=int-conversion -Werror=strict-prototypes -Werror=old-style-definition")
string(APPEND CMAKE_CXX_FLAGS_INIT " -fomit-frame-pointer -Wall -fno-strict-aliasing")
string(APPEND CMAKE_C_FLAGS_RELEASE_INIT " -g0 -O3")
string(APPEND CMAKE_CXX_FLAGS_RELEASE_INIT " -g0 -O3")
string(APPEND CMAKE_C_FLAGS_DEBUG_INIT " -ggdb -Og")

View File

@@ -142,12 +142,13 @@ char log_path[1024] = { '\0' }; /* (O) full path of logfile */
char vm_name[1024] = { '\0' }; /* (O) display name of the VM */
int do_nothing = 0;
int dump_missing = 0;
int clear_cmos = 0;
#ifdef USE_INSTRUMENT
uint8_t instru_enabled = 0;
uint64_t instru_run_ms = 0;
#endif
int clear_cmos = 0;
int clear_flash = 0;
int auto_paused = 0;
/* Configuration values. */
int window_remember;
@@ -155,7 +156,8 @@ int vid_resize; /* (C) allow r
int invert_display = 0; /* (C) invert the display */
int suppress_overscan = 0; /* (C) suppress overscans */
int scale = 0; /* (C) screen scale factor */
int dpi_scale = 0; /* (C) DPI scaling of the emulated screen */
int dpi_scale = 0; /* (C) DPI scaling of the emulated
screen */
int vid_api = 0; /* (C) video renderer */
int vid_cga_contrast = 0; /* (C) video */
int video_fullscreen = 0; /* (C) video */
@@ -167,7 +169,8 @@ int video_filter_method = 1; /* (C) video *
int video_vsync = 0; /* (C) video */
int video_framerate = -1; /* (C) video */
char video_shader[512] = { '\0' }; /* (C) video */
bool serial_passthrough_enabled[SERIAL_MAX] = { 0, 0, 0, 0 }; /* (C) activation and kind of pass-through for serial ports */
bool serial_passthrough_enabled[SERIAL_MAX] = { 0, 0, 0, 0 }; /* (C) activation and kind of
pass-through for serial ports */
int bugger_enabled = 0; /* (C) enable ISAbugger */
int postcard_enabled = 0; /* (C) enable POST card */
int isamem_type[ISAMEM_MAX] = { 0, 0, 0, 0 }; /* (C) enable ISA mem cards */
@@ -178,7 +181,8 @@ int sound_is_float = 1; /* (C) sound u
int voodoo_enabled = 0; /* (C) video option */
int ibm8514_standalone_enabled = 0; /* (C) video option */
int xga_standalone_enabled = 0; /* (C) video option */
uint32_t mem_size = 0; /* (C) memory size (Installed on system board)*/
uint32_t mem_size = 0; /* (C) memory size (Installed on
system board)*/
uint32_t isa_mem_size = 0; /* (C) memory size (ISA Memory Cards) */
int cpu_use_dynarec = 0; /* (C) cpu uses/needs Dyna */
int cpu = 0; /* (C) cpu type */
@@ -191,8 +195,12 @@ int confirm_save = 1; /* (C) enable
int enable_discord = 0; /* (C) enable Discord integration */
int pit_mode = -1; /* (C) force setting PIT mode */
int fm_driver = 0; /* (C) select FM sound driver */
int open_dir_usr_path = 0; /* default file open dialog directory of usr_path */
int video_fullscreen_scale_maximized = 0; /* (C) Whether fullscreen scaling settings also apply when maximized. */
int open_dir_usr_path = 0; /* (C) default file open dialog directory
of usr_path */
int video_fullscreen_scale_maximized = 0; /* (C) Whether fullscreen scaling settings
also apply when maximized. */
int do_auto_pause = 0; /* (C) Auto-pause the emulator on focus
loss */
/* Statistics. */
extern int mmuflush;
@@ -444,6 +452,7 @@ pc_init(int argc, char *argv[])
char *fn[FDD_NUM] = { NULL };
char drive = 0;
char *temp2 = NULL;
char *what;
const struct tm *info;
time_t now;
int c;
@@ -508,7 +517,6 @@ usage:
printf("\nUsage: 86box [options] [cfg-file]\n\n");
printf("Valid options are:\n\n");
printf("-? or --help - show this information\n");
printf("-B or --clearflash - clears the BIOS flash file\n");
printf("-C or --config path - set 'path' to be config file\n");
#ifdef _WIN32
printf("-D or --debug - force debug output logging\n");
@@ -527,14 +535,13 @@ usage:
#endif
printf("-K or --keycodes codes - set 'codes' to be the uncapture combination\n");
printf("-L or --logfile path - set 'path' to be the logfile\n");
printf("-M or --dumpmissing - dump missing machines and video cards\n");
printf("-M or --missing - dump missing machines and video cards\n");
printf("-N or --noconfirm - do not ask for confirmation on quit\n");
printf("-P or --vmpath path - set 'path' to be root for vm\n");
printf("-Q or --clearnvr - clears the CMOS file\n");
printf("-R or --rompath path - set 'path' to be ROM path\n");
printf("-S or --settings - show only the settings dialog\n");
printf("-V or --vmname name - overrides the name of the running VM\n");
printf("-X or --clearboth - clears the CMOS and BIOS flash files\n");
printf("-X or --clear what - clears the 'what' (cmos/flash/both)\n");
printf("-Y or --donothing - do not show any UI or run the emulation\n");
printf("-Z or --lastvmpath - the last parameter is VM path rather than config\n");
printf("\nA config file can be specified. If none is, the default file will be used.\n");
@@ -603,14 +610,10 @@ usage:
settings_only = 1;
} else if (!strcasecmp(argv[c], "--noconfirm") || !strcasecmp(argv[c], "-N")) {
confirm_exit_cmdl = 0;
} else if (!strcasecmp(argv[c], "--dumpmissing") || !strcasecmp(argv[c], "-M")) {
} else if (!strcasecmp(argv[c], "--missing") || !strcasecmp(argv[c], "-M")) {
dump_missing = 1;
} else if (!strcasecmp(argv[c], "--donothing") || !strcasecmp(argv[c], "-Y")) {
do_nothing = 1;
} else if (!strcasecmp(argv[c], "--clearflash") || !strcasecmp(argv[c], "-B")) {
clear_flash = 1;
} else if (!strcasecmp(argv[c], "--clearnvr") || !strcasecmp(argv[c], "-Q")) {
clear_cmos = 1;
} else if (!strcasecmp(argv[c], "--keycodes") || !strcasecmp(argv[c], "-K")) {
if ((c + 1) == argc)
goto usage;
@@ -619,8 +622,20 @@ usage:
&key_prefix_1_1, &key_prefix_1_2, &key_prefix_2_1, &key_prefix_2_2,
&key_uncapture_1, &key_uncapture_2);
} else if (!strcasecmp(argv[c], "--clearboth") || !strcasecmp(argv[c], "-X")) {
clear_cmos = 1;
clear_flash = 1;
if ((c + 1) == argc)
goto usage;
what = argv[++c];
if (!strcasecmp(what, "cmos"))
clear_cmos = 1;
else if (!strcasecmp(what, "flash"))
clear_flash = 1;
else if (!strcasecmp(what, "both")) {
clear_cmos = 1;
clear_flash = 1;
} else
goto usage;
#ifdef _WIN32
} else if (!strcasecmp(argv[c], "--hwnd") || !strcasecmp(argv[c], "-H")) {
@@ -867,7 +882,7 @@ pc_speed_changed(void)
if (cpu_s->cpu_type >= CPU_286)
pit_set_clock(cpu_s->rspeed);
else
pit_set_clock(14318184.0);
pit_set_clock((uint32_t) 14318184.0);
}
void
@@ -1353,7 +1368,7 @@ pc_run(void)
/* Run a block of code. */
startblit();
cpu_exec(cpu_s->rspeed / 100);
cpu_exec((int32_t) cpu_s->rspeed / 100);
#ifdef USE_GDBSTUB /* avoid a KBC FIFO overflow when CPU emulation is stalled */
if (gdbstub_step == GDBSTUB_EXEC) {
#endif

File diff suppressed because it is too large Load Diff

View File

@@ -219,16 +219,16 @@ fetch_ea_16_long(uint32_t rmdat)
#include "386_ops.h"
void
exec386_2386(int cycs)
exec386_2386(int32_t cycs)
{
int ol;
int vector;
int tempi;
int cycdiff;
int oldcyc;
int cycle_period;
int ins_cycles;
int32_t cycdiff;
int32_t oldcyc;
int32_t cycle_period;
int32_t ins_cycles;
uint32_t addr;
cycles += cycs;

View File

@@ -226,12 +226,12 @@ fetch_ea_16_long(uint32_t rmdat)
#define CACHE_ON() (!(cr0 & (1 << 30)) && !(cpu_state.flags & T_FLAG))
#ifdef USE_DYNAREC
int cycles_main = 0;
static int cycles_old = 0;
int32_t cycles_main = 0;
static int32_t cycles_old = 0;
static uint64_t tsc_old = 0;
# ifdef USE_ACYCS
int acycs = 0;
int32_t acycs = 0;
# endif
void
@@ -676,24 +676,24 @@ exec386_dynarec_dyn(void)
}
void
exec386_dynarec(int cycs)
exec386_dynarec(int32_t cycs)
{
int vector;
int tempi;
int cycdiff;
int oldcyc;
int oldcyc2;
int32_t cycdiff;
int32_t oldcyc;
int32_t oldcyc2;
uint64_t oldtsc;
uint64_t delta;
int cyc_period = cycs / 2000; /*5us*/
int32_t cyc_period = cycs / 2000; /*5us*/
# ifdef USE_ACYCS
acycs = 0;
# endif
cycles_main += cycs;
while (cycles_main > 0) {
int cycles_start;
int32_t cycles_start;
cycles += cyc_period;
cycles_start = cycles;
@@ -799,14 +799,14 @@ exec386_dynarec(int cycs)
#endif
void
exec386(int cycs)
exec386(int32_t cycs)
{
int vector;
int tempi;
int cycdiff;
int oldcyc;
int cycle_period;
int ins_cycles;
int32_t cycdiff;
int32_t oldcyc;
int32_t cycle_period;
int32_t ins_cycles;
uint32_t addr;
cycles += cycs;

View File

@@ -2056,13 +2056,14 @@ farret(int far)
}
wait(2, 0);
load_cs(new_cs);
if (far)
load_cs(new_cs);
set_ip(new_ip);
}
/* Executes instructions up to the specified number of cycles. */
void
execx86(int cycs)
execx86(int32_t cycs)
{
uint8_t temp = 0;
uint8_t temp2;

View File

@@ -258,7 +258,7 @@ CPU *cpu_s;
uint8_t do_translate = 0;
uint8_t do_translate2 = 0;
void (*cpu_exec)(int cycs);
void (*cpu_exec)(int32_t cycs);
static uint8_t ccr0;
static uint8_t ccr1;

View File

@@ -143,7 +143,7 @@ typedef struct cpu_t {
const char *name;
uint64_t cpu_type;
const FPU *fpus;
int rspeed;
uint32_t rspeed;
double multi;
uint16_t voltage;
uint32_t edx_reset;
@@ -166,9 +166,9 @@ typedef struct {
} cpu_family_t;
typedef struct {
const char *family;
const int rspeed;
const double multi;
const char *family;
const uint32_t rspeed;
const double multi;
} cpu_legacy_table_t;
typedef struct {
@@ -740,13 +740,13 @@ extern void codegen_block_end(void);
extern void codegen_reset(void);
extern void cpu_set_edx(void);
extern int divl(uint32_t val);
extern void execx86(int cycs);
extern void execx86(int32_t cycs);
extern void enter_smm(int in_hlt);
extern void enter_smm_check(int in_hlt);
extern void leave_smm(void);
extern void exec386_2386(int cycs);
extern void exec386(int cycs);
extern void exec386_dynarec(int cycs);
extern void exec386_2386(int32_t cycs);
extern void exec386(int32_t cycs);
extern void exec386_dynarec(int32_t cycs);
extern int idivl(int32_t val);
extern void resetmcr(void);
extern void resetx86(void);
@@ -815,7 +815,7 @@ extern int prefetch_prefixes;
extern uint8_t use_custom_nmi_vector;
extern uint32_t custom_nmi_vector;
extern void (*cpu_exec)(int cycs);
extern void (*cpu_exec)(int32_t cycs);
extern uint8_t do_translate;
extern uint8_t do_translate2;

View File

@@ -343,7 +343,7 @@ static gdbstub_client_t *first_client = NULL;
static gdbstub_client_t *last_client = NULL;
static mutex_t *client_list_mutex;
static void (*cpu_exec_shadow)(int cycs);
static void (*cpu_exec_shadow)(int32_t cycs);
static gdbstub_breakpoint_t *first_swbreak = NULL;
static gdbstub_breakpoint_t *first_hwbreak = NULL;
static gdbstub_breakpoint_t *first_rwatch = NULL;
@@ -1373,7 +1373,7 @@ end:
}
static void
gdbstub_cpu_exec(int cycs)
gdbstub_cpu_exec(int32_t cycs)
{
/* Flag that we're now in the debugger context to avoid triggering watchpoints. */
in_gdbstub = 1;

View File

@@ -146,6 +146,8 @@ extern int enable_discord; /* (C) enable Discord integration */
extern int fixed_size_x;
extern int fixed_size_y;
extern int do_auto_pause; /* (C) Auto-pause the emulator on focus loss */
extern int auto_paused;
extern double mouse_sensitivity; /* (C) Mouse sensitivity scale */
#ifdef _Atomic
extern _Atomic double mouse_x_error; /* Mouse error accumulator - Y */

View File

@@ -37,6 +37,10 @@ extern void ini_close(ini_t ini);
extern void ini_section_delete_var(ini_section_t section, const char *name);
extern int ini_section_get_int(ini_section_t section, const char *name, int def);
extern uint32_t ini_section_get_uint(ini_section_t section, const char *name, uint32_t def);
#if 0
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_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);
@@ -44,6 +48,10 @@ extern int ini_section_get_mac(ini_section_t section, const char *name, int
extern char *ini_section_get_string(ini_section_t section, const char *name, char *def);
extern wchar_t *ini_section_get_wstring(ini_section_t section, const char *name, wchar_t *def);
extern void ini_section_set_int(ini_section_t section, const char *name, int val);
extern void ini_section_set_uint(ini_section_t section, const char *name, uint32_t val);
#if 0
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_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);
@@ -54,6 +62,10 @@ extern void ini_section_set_wstring(ini_section_t section, const char *name,
#define ini_delete_var(ini, head, name) ini_section_delete_var(ini_find_section(ini, head), name)
#define ini_get_int(ini, head, name, def) ini_section_get_int(ini_find_section(ini, head), name, def)
#define ini_get_uint(ini, head, name, def) ini_section_get_uint(ini_find_section(ini, head), name, def)
#if 0
#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_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)
@@ -62,6 +74,10 @@ extern void ini_section_set_wstring(ini_section_t section, const char *name,
#define ini_get_wstring(ini, head, name, def) ini_section_get_wstring(ini_find_section(ini, head), name, def)
#define ini_set_int(ini, head, name, val) ini_section_set_int(ini_find_or_create_section(ini, head), name, val)
#define ini_set_uint(ini, head, name, val) ini_section_set_uint(ini_find_or_create_section(ini, head), name, val)
#if 0
#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_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)

View File

@@ -447,8 +447,8 @@ extern void mem_close(void);
extern void mem_reset(void);
extern void mem_remap_top(int kb);
extern mem_mapping_t *read_mapping[MEM_MAPPINGS_NO];
extern mem_mapping_t *write_mapping[MEM_MAPPINGS_NO];
extern mem_mapping_t *read_mapping[MEM_MAPPINGS_NO];
extern mem_mapping_t *write_mapping[MEM_MAPPINGS_NO];
extern void mem_add_mtrr(uint64_t base, uint64_t mask, uint8_t type);
extern void mem_del_mtrr(uint64_t base, uint64_t mask);

View File

@@ -128,7 +128,7 @@ extern void pit_speaker_timer(int new_out, int old_out);
extern void pit_nmi_timer_ps2(int new_out, int old_out);
extern void pit_set_clock(int clock);
extern void pit_set_clock(uint32_t clock);
extern void pit_handler(int set, uint16_t base, int size, void *priv);
#ifdef EMU_DEVICE_H

View File

@@ -42,7 +42,8 @@ enum {
FULLSCR_SCALE_FULL = 0,
FULLSCR_SCALE_43,
FULLSCR_SCALE_KEEPRATIO,
FULLSCR_SCALE_INT
FULLSCR_SCALE_INT,
FULLSCR_SCALE_INT43
};
#ifdef __cplusplus

View File

@@ -560,6 +560,46 @@ ini_section_get_int(ini_section_t self, const char *name, int def)
return value;
}
uint32_t
ini_section_get_uint(ini_section_t self, const char *name, uint32_t def)
{
section_t *section = (section_t *) self;
const entry_t *entry;
uint32_t value;
if (section == NULL)
return def;
entry = find_entry(section, name);
if (entry == NULL)
return def;
sscanf(entry->data, "%u", &value);
return value;
}
#if 0
float
ini_section_get_float(ini_section_t self, const char *name, float def)
{
section_t *section = (section_t *) self;
const entry_t *entry;
float value;
if (section == NULL)
return def;
entry = find_entry(section, name);
if (entry == NULL)
return def;
sscanf(entry->data, "%g", &value);
return value;
}
#endif
double
ini_section_get_double(ini_section_t self, const char *name, double def)
{
@@ -687,6 +727,42 @@ ini_section_set_int(ini_section_t self, const char *name, int val)
mbstowcs(ent->wdata, ent->data, 512);
}
void
ini_section_set_uint(ini_section_t self, const char *name, uint32_t 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, "%i", val);
mbstowcs(ent->wdata, ent->data, 512);
}
#if 0
void
ini_section_set_float(ini_section_t self, const char *name, float 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, "%g", val);
mbstowcs(ent->wdata, ent->data, 512);
}
#endif
void
ini_section_set_double(ini_section_t self, const char *name, double val)
{

View File

@@ -1943,7 +1943,7 @@ machine_xt_m19_init(const machine_t *model)
device_add(&keyboard_xt_olivetti_device);
pit_set_clock(14318184.0);
pit_set_clock((uint32_t) 14318184.0);
return ret;
}

View File

@@ -335,7 +335,7 @@ static void
time_get(nvr_t *nvr, struct tm *tm)
{
const local_t *local = (local_t *) nvr->data;
int8_t temp;
int8_t temp;
if (nvr->regs[RTC_REGB] & REGB_DM) {
/* NVR is in Binary data mode. */
@@ -373,7 +373,7 @@ static void
time_set(nvr_t *nvr, struct tm *tm)
{
const local_t *local = (local_t *) nvr->data;
int year = (tm->tm_year + 1900);
int year = (tm->tm_year + 1900);
if (nvr->regs[RTC_REGB] & REGB_DM) {
/* NVR is in Binary data mode. */

View File

@@ -1000,11 +1000,11 @@ pit_ps2_init(int type)
}
void
pit_set_clock(int clock)
pit_set_clock(uint32_t clock)
{
/* Set default CPU/crystal clock and xt_cpu_multi. */
if (cpu_s->cpu_type >= CPU_286) {
int remainder = (clock % 100000000);
uint32_t remainder = (clock % 100000000);
if (remainder == 66666666)
cpuclock = (double) (clock - remainder) + (200000000.0 / 3.0);
else if (remainder == 33333333)

View File

@@ -122,7 +122,10 @@ msgid "&Square pixels (Keep ratio)"
msgstr "&Píxels quadrats (Mant. aspecte)"
msgid "&Integer scale"
msgstr "&Escalat valor sencer"
msgstr "&Escala de valor enter"
msgid "4:&3 Integer scale"
msgstr "Escala de valor enter 4:&3"
msgid "E&GA/(S)VGA settings"
msgstr "&Ajustaments EGA/(S)VGA"
@@ -1219,3 +1222,5 @@ msgstr "Lent"
msgid "Fast"
msgstr "Ràpid"
msgid "&Auto-pause on focus loss"
msgstr "&Pausa automàtica en la pèrdua del focus"

View File

@@ -124,6 +124,9 @@ msgstr "&Zachovat poměr stran"
msgid "&Integer scale"
msgstr "&Celočíselné škálování"
msgid "4:&3 Integer scale"
msgstr "4:&3 Celočíselné škálování"
msgid "E&GA/(S)VGA settings"
msgstr "Nastavení pro E&GA a (S)VGA"
@@ -1218,3 +1221,6 @@ msgstr "Pomalý"
msgid "Fast"
msgstr "Rychlý"
msgid "&Auto-pause on focus loss"
msgstr "&Automatická pauza při ztrátě zaměření okna"

View File

@@ -124,6 +124,9 @@ msgstr "&Quadratische Pixel (Seitenverhältnis beibehalten)"
msgid "&Integer scale"
msgstr "&Integer-Skalierung"
msgid "4:&3 Integer scale"
msgstr "4:&3 Integer-Skalierung"
msgid "E&GA/(S)VGA settings"
msgstr "E&GA/(S)VGA-Einstellungen"
@@ -1219,3 +1222,5 @@ msgstr "Langsam"
msgid "Fast"
msgstr "Schnell"
msgid "&Auto-pause on focus loss"
msgstr "&Auto-Pause bei Fokusverlust"

View File

@@ -124,6 +124,9 @@ msgstr "&Square pixels (Keep ratio)"
msgid "&Integer scale"
msgstr "&Integer scale"
msgid "4:&3 Integer scale"
msgstr "4:&3 Integer scale"
msgid "E&GA/(S)VGA settings"
msgstr "E&GA/(S)VGA settings"
@@ -1219,3 +1222,5 @@ msgstr "Slow"
msgid "Fast"
msgstr "Fast"
msgid "&Auto-pause on focus loss"
msgstr "&Auto-pause on focus loss"

View File

@@ -124,6 +124,9 @@ msgstr "&Square pixels (Keep ratio)"
msgid "&Integer scale"
msgstr "&Integer scale"
msgid "4:&3 Integer scale"
msgstr "4:&3 Integer scale"
msgid "E&GA/(S)VGA settings"
msgstr "E&GA/(S)VGA settings"
@@ -1219,3 +1222,5 @@ msgstr "Slow"
msgid "Fast"
msgstr "Fast"
msgid "&Auto-pause on focus loss"
msgstr "&Auto-pause on focus loss"

View File

@@ -124,6 +124,9 @@ msgstr "&Píxeles cuadrados (Mant. aspecto)"
msgid "&Integer scale"
msgstr "&Escalado valor entero"
msgid "4:&3 Integer scale"
msgstr "Escalado valor entero 4:&3"
msgid "E&GA/(S)VGA settings"
msgstr "&Configuraciones EGA/(S)VGA"
@@ -1219,3 +1222,5 @@ msgstr "Lenta"
msgid "Fast"
msgstr "Rápida"
msgid "&Auto-pause on focus loss"
msgstr "&Pausa automática al perder el foco"

View File

@@ -124,6 +124,9 @@ msgstr "&Tasasivuiset kuvapisteet (säilytä kuvasuhde)"
msgid "&Integer scale"
msgstr "&Kokonaislukuskaalaus"
msgid "4:&3 Integer scale"
msgstr "4:&3 Kokonaislukuskaalaus"
msgid "E&GA/(S)VGA settings"
msgstr "&EGA/(S)VGA-asetukset"
@@ -1219,3 +1222,5 @@ msgstr "Hidas"
msgid "Fast"
msgstr "Nopea"
msgid "&Auto-pause on focus loss"
msgstr "&Automaattinen tauko tarkennuksen hävitessä"

View File

@@ -124,6 +124,9 @@ msgstr "pixels &Carrés(Keep ratio)"
msgid "&Integer scale"
msgstr "Echelle &Entière"
msgid "4:&3 Integer scale"
msgstr "Echelle Entière 4:&3"
msgid "E&GA/(S)VGA settings"
msgstr "Réglages E&GA/(S)VGA"
@@ -1219,3 +1222,6 @@ msgstr "Lent"
msgid "Fast"
msgstr "Rapide"
msgid "&Auto-pause on focus loss"
msgstr "&Pause automatique à perte de mise au point"

View File

@@ -124,6 +124,9 @@ msgstr "&Kvadratni pikseli (zadrži omjer)"
msgid "&Integer scale"
msgstr "&Cijelobrojno skaliranje"
msgid "4:&3 Integer scale"
msgstr "4:&3 Cijelobrojno skaliranje"
msgid "E&GA/(S)VGA settings"
msgstr "E&GA/(S)VGA postavke"
@@ -1219,3 +1222,5 @@ msgstr "Spori"
msgid "Fast"
msgstr "Brzi"
msgid "&Auto-pause on focus loss"
msgstr "&Automatska pauza pri gubitku fokusa"

View File

@@ -124,6 +124,9 @@ msgstr "&Négyzetes képpontok (aránytartás)"
msgid "&Integer scale"
msgstr "&Egész tényezős nagyítás"
msgid "4:&3 Integer scale"
msgstr "4:&3 Egész tényezős nagyítás"
msgid "E&GA/(S)VGA settings"
msgstr "E&GA/(S)VGA beállítások"
@@ -1219,3 +1222,5 @@ msgstr "Lassú"
msgid "Fast"
msgstr "Gyors"
msgid "&Auto-pause on focus loss"
msgstr "&Automatikus szünet fókuszvesztéskor"

View File

@@ -124,6 +124,9 @@ msgstr "&Pixel quadrati (mantiene l'aspetto)"
msgid "&Integer scale"
msgstr "&Scala intera"
msgid "4:&3 Integer scale"
msgstr "Scala intera 4:&3"
msgid "E&GA/(S)VGA settings"
msgstr "Impostazioni E&GA/(S)VGA"
@@ -1219,3 +1222,5 @@ msgstr "Lenta"
msgid "Fast"
msgstr "Veloce"
msgid "&Auto-pause on focus loss"
msgstr "&Pausa automatica alla perdita della messa a fuoco"

View File

@@ -124,6 +124,9 @@ msgstr "正方形ピクセル(アスペクト比を維持)(&S)"
msgid "&Integer scale"
msgstr "整数倍(&I)"
msgid "4:&3 Integer scale"
msgstr "4:3 整数倍(&3)"
msgid "E&GA/(S)VGA settings"
msgstr "E&GA/(S)VGAの設定"
@@ -1219,3 +1222,5 @@ msgstr "遅い"
msgid "Fast"
msgstr "速い"
msgid "&Auto-pause on focus loss"
msgstr "フォーカスが外れると自動ポーズ(&A)"

View File

@@ -124,6 +124,9 @@ msgstr "정사각형 픽셀 (비율 유지)(&S)"
msgid "&Integer scale"
msgstr "정수배 확대(&I)"
msgid "4:&3 Integer scale"
msgstr "4:3 정수배 확대(&3)"
msgid "E&GA/(S)VGA settings"
msgstr "E&GA/(S)VGA 설정"
@@ -1219,3 +1222,5 @@ msgstr "느린"
msgid "Fast"
msgstr "빠른"
msgid "&Auto-pause on focus loss"
msgstr "집중력 저하 시 자동 일시 중지(&A)"

View File

@@ -124,6 +124,9 @@ msgstr "&Kwadratowe piksele (Zachowaj proporcje)"
msgid "&Integer scale"
msgstr "&Skalowanie całkowite"
msgid "4:&3 Integer scale"
msgstr "Skalowanie całkowite 4:&3"
msgid "E&GA/(S)VGA settings"
msgstr "Ustawienia E&GA/(S)VGA"
@@ -1219,3 +1222,5 @@ msgstr "Powolny"
msgid "Fast"
msgstr "Szybki"
msgid "&Auto-pause on focus loss"
msgstr "&Automatyczna pauza po utracie fokusu"

View File

@@ -124,6 +124,9 @@ msgstr "Pixel&s quadrados (manter proporção)"
msgid "&Integer scale"
msgstr "&Redimensionamento com valores inteiros"
msgid "4:&3 Integer scale"
msgstr "Redimensionamento com valores inteiros 4:&3"
msgid "E&GA/(S)VGA settings"
msgstr "Configurações E&GA/(S)VGA"
@@ -1219,3 +1222,5 @@ msgstr "Lento"
msgid "Fast"
msgstr "Rápido"
msgid "&Auto-pause on focus loss"
msgstr "Pausa &automática ao perder o foco"

View File

@@ -124,6 +124,9 @@ msgstr "Pixels &quadrados (Manter rácio)"
msgid "&Integer scale"
msgstr "Escala &inteira"
msgid "4:&3 Integer scale"
msgstr "Escala inteira 4:&3"
msgid "E&GA/(S)VGA settings"
msgstr "Definições E&GA/(S)VGA"
@@ -1219,3 +1222,5 @@ msgstr "Lento"
msgid "Fast"
msgstr "Rápido"
msgid "&Auto-pause on focus loss"
msgstr "Pausa &automática na perda de focagem"

View File

@@ -124,6 +124,9 @@ msgstr "&Квадратные пиксели (сохранить соотнош
msgid "&Integer scale"
msgstr "&Целочисленное масштабирование"
msgid "4:&3 Integer scale"
msgstr "4:&3 Целочисленное масштабирование"
msgid "E&GA/(S)VGA settings"
msgstr "Настройки E&GA/(S)VGA"
@@ -1219,3 +1222,5 @@ msgstr "Медленный"
msgid "Fast"
msgstr "Быстрый"
msgid "&Auto-pause on focus loss"
msgstr "&Автопауза при потере фокуса"

View File

@@ -124,6 +124,9 @@ msgstr "&Zachovať pomer strán"
msgid "&Integer scale"
msgstr "&Celočíselné škálovanie"
msgid "4:&3 Integer scale"
msgstr "4:&3 Celočíselné škálovanie"
msgid "E&GA/(S)VGA settings"
msgstr "Nastavenia pre E&GA a (S)VGA"
@@ -1218,3 +1221,6 @@ msgstr "Pomalý"
msgid "Fast"
msgstr "Rýchly"
msgid "&Auto-pause on focus loss"
msgstr "&Automatická pauza pri strate fokusu okna"

View File

@@ -124,6 +124,9 @@ msgstr "&Kvadratni piksli (ohrani razmerje)"
msgid "&Integer scale"
msgstr "&Celoštevilsko raztezanje"
msgid "4:&3 Integer scale"
msgstr "Celoštevilsko raztezanje 4:&3"
msgid "E&GA/(S)VGA settings"
msgstr "Nastavitve E&GA/(S)VGA"
@@ -1219,3 +1222,5 @@ msgstr "Počasni"
msgid "Fast"
msgstr "Hitri"
msgid "&Auto-pause on focus loss"
msgstr "&Samodejni premor ob izgubi fokusa"

View File

@@ -124,6 +124,9 @@ msgstr "&Kare piksel (ölçeği koru)"
msgid "&Integer scale"
msgstr "Tam &sayı ölçeklemesi"
msgid "4:&3 Integer scale"
msgstr "4:&3 Tam sayı ölçeklemesi"
msgid "E&GA/(S)VGA settings"
msgstr "EGA/&(S)VGA ayarları"
@@ -1219,3 +1222,5 @@ msgstr "Yavaş"
msgid "Fast"
msgstr "Hızlı"
msgid "&Auto-pause on focus loss"
msgstr "&Odak kaybında otomatik duraklatma"

View File

@@ -124,6 +124,9 @@ msgstr "&Квадратні пікселі (зберегти відношенн
msgid "&Integer scale"
msgstr "&Цілісночисленне масштабування"
msgid "4:&3 Integer scale"
msgstr "Цілісночисленне масштабування 4:&3"
msgid "E&GA/(S)VGA settings"
msgstr "Налаштування E&GA/(S)VGA"
@@ -1219,3 +1222,5 @@ msgstr "Повільний"
msgid "Fast"
msgstr "Швидкий"
msgid "&Auto-pause on focus loss"
msgstr "&Автопауза при втраті фокусу"

View File

@@ -124,6 +124,9 @@ msgstr "保持比例(&S)"
msgid "&Integer scale"
msgstr "整数比例(&I)"
msgid "4:&3 Integer scale"
msgstr "4:3 整数比例(&3)"
msgid "E&GA/(S)VGA settings"
msgstr "EGA/(S)VGA 设置(&G)"
@@ -1219,3 +1222,6 @@ msgstr "慢"
msgid "Fast"
msgstr "快"
msgid "&Auto-pause on focus loss"
msgstr "&失焦自动暂停"

View File

@@ -124,6 +124,9 @@ msgstr "保持比例(&S)"
msgid "&Integer scale"
msgstr "整數比例(&I)"
msgid "4:&3 Integer scale"
msgstr "4:3 整數比例(&3)"
msgid "E&GA/(S)VGA settings"
msgstr "EGA/(S)VGA 設定(&G)"
@@ -1219,3 +1222,5 @@ msgstr "慢"
msgid "Fast"
msgstr "快"
msgid "&Auto-pause on focus loss"
msgstr "&失去焦點時自動暫停"

View File

@@ -211,7 +211,11 @@ MainWindow::MainWindow(QWidget *parent)
connect(this, &MainWindow::hardResetCompleted, this, [this]() {
ui->actionMCA_devices->setVisible(machine_has_bus(machine, MACHINE_BUS_MCA));
QApplication::setOverrideCursor(Qt::ArrowCursor);
#ifdef USE_WACOM
ui->menuTablet_tool->menuAction()->setVisible(mouse_mode >= 1);
#else
ui->menuTablet_tool->menuAction()->setVisible(false);
#endif
});
connect(this, &MainWindow::showMessageForNonQtThread, this, &MainWindow::showMessage_, Qt::BlockingQueuedConnection);
@@ -268,8 +272,20 @@ MainWindow::MainWindow(QWidget *parent)
});
connect(qApp, &QGuiApplication::applicationStateChanged, [this](Qt::ApplicationState state) {
if (mouse_capture && state != Qt::ApplicationState::ApplicationActive)
emit setMouseCapture(false);
if (state == Qt::ApplicationState::ApplicationActive) {
if (auto_paused) {
plat_pause(0);
auto_paused = 0;
}
} else {
if (mouse_capture)
emit setMouseCapture(false);
if (do_auto_pause && !dopause) {
auto_paused = 1;
plat_pause(1);
}
}
});
connect(this, &MainWindow::resizeContents, this, [this](int w, int h) {
@@ -530,6 +546,9 @@ MainWindow::MainWindow(QWidget *parent)
case FULLSCR_SCALE_INT:
ui->actionFullScreen_int->setChecked(true);
break;
case FULLSCR_SCALE_INT43:
ui->actionFullScreen_int43->setChecked(true);
break;
}
actGroup = new QActionGroup(this);
actGroup->addAction(ui->actionFullScreen_stretch);
@@ -583,6 +602,9 @@ MainWindow::MainWindow(QWidget *parent)
if (vid_cga_contrast > 0) {
ui->actionChange_contrast_for_monochrome_display->setChecked(true);
}
if (do_auto_pause > 0) {
ui->actionAuto_pause->setChecked(true);
}
#ifdef Q_OS_MACOS
ui->actionCtrl_Alt_Del->setShortcutVisibleInContextMenu(true);
@@ -1559,6 +1581,13 @@ MainWindow::on_actionFullScreen_int_triggered()
update_fullscreen_scale_checkboxes(ui, ui->actionFullScreen_int);
}
void
MainWindow::on_actionFullScreen_int43_triggered()
{
video_fullscreen_scale = FULLSCR_SCALE_INT43;
update_fullscreen_scale_checkboxes(ui, ui->actionFullScreen_int43);
}
static void
update_greyscale_checkboxes(Ui::MainWindow *ui, QAction *selected, int value)
{
@@ -1709,6 +1738,13 @@ MainWindow::on_actionForce_4_3_display_ratio_triggered()
video_toggle_option(ui->actionForce_4_3_display_ratio, &force_43);
}
void
MainWindow::on_actionAuto_pause_triggered()
{
do_auto_pause ^= 1;
ui->actionAuto_pause->setChecked(do_auto_pause > 0 ? true : false);
}
void
MainWindow::on_actionRemember_size_and_position_triggered()
{

View File

@@ -69,6 +69,7 @@ private slots:
void on_actionFullscreen_triggered();
void on_actionSettings_triggered();
void on_actionExit_triggered();
void on_actionAuto_pause_triggered();
void on_actionPause_triggered();
void on_actionCtrl_Alt_Del_triggered();
void on_actionCtrl_Alt_Esc_triggered();
@@ -90,6 +91,7 @@ private slots:
void on_actionLinear_triggered();
void on_actionNearest_triggered();
void on_actionFullScreen_int_triggered();
void on_actionFullScreen_int43_triggered();
void on_actionFullScreen_keepRatio_triggered();
void on_actionFullScreen_43_triggered();
void on_actionFullScreen_stretch_triggered();

View File

@@ -68,17 +68,19 @@
<addaction name="actionPen"/>
<addaction name="actionCursor_Puck"/>
</widget>
<addaction name="actionAuto_pause"/>
<addaction name="separator"/>
<addaction name="actionKeyboard_requires_capture"/>
<addaction name="actionRight_CTRL_is_left_ALT"/>
<addaction name="menuTablet_tool"/>
<addaction name="separator"/>
<addaction name="actionPause"/>
<addaction name="separator"/>
<addaction name="actionHard_Reset"/>
<addaction name="actionCtrl_Alt_Del"/>
<addaction name="separator"/>
<addaction name="actionCtrl_Alt_Esc"/>
<addaction name="separator"/>
<addaction name="actionPause"/>
<addaction name="separator"/>
<addaction name="actionExit"/>
</widget>
<widget class="QMenu" name="menuTools">
@@ -148,6 +150,7 @@
<addaction name="actionFullScreen_43"/>
<addaction name="actionFullScreen_keepRatio"/>
<addaction name="actionFullScreen_int"/>
<addaction name="actionFullScreen_int43"/>
</widget>
<widget class="QMenu" name="menuEGA_S_VGA_settings">
<property name="title">
@@ -263,6 +266,14 @@
<addaction name="separator"/>
<addaction name="actionSettings"/>
</widget>
<action name="actionAuto_pause">
<property name="checkable">
<bool>true</bool>
</property>
<property name="text">
<string>&amp;Auto-pause on focus loss</string>
</property>
</action>
<action name="actionKeyboard_requires_capture">
<property name="checkable">
<bool>true</bool>
@@ -586,6 +597,14 @@
<string>&amp;Integer scale</string>
</property>
</action>
<action name="actionFullScreen_int43">
<property name="checkable">
<bool>true</bool>
</property>
<property name="text">
<string>4:&amp;3 Integer scale</string>
</property>
</action>
<action name="actionInverted_VGA_monitor">
<property name="checkable">
<bool>true</bool>

View File

@@ -76,7 +76,12 @@ RendererCommon::onResize(int width, int height)
switch (video_fullscreen_scale) {
case FULLSCR_SCALE_INT:
gsr = gw / gh;
case FULLSCR_SCALE_INT43:
if (video_fullscreen_scale == FULLSCR_SCALE_INT43)
gsr = 4.0 / 3.0;
else
gsr = gw / gh;
if (gsr <= hsr) {
dw = hh * gsr;
dh = hh;
@@ -138,5 +143,4 @@ RendererCommon::eventDelegate(QEvent *event, bool &result)
result = QApplication::sendEvent(parentWidget, event);
return true;
}
return false;
}

View File

@@ -1500,8 +1500,6 @@ xga_bitblt(svga_t *svga)
int mix = 0;
int xdir;
int ydir;
int x = 0;
int y = 0;
if (xga->accel.octant & 0x02) {
ydir = -1;
@@ -1704,10 +1702,8 @@ xga_bitblt(svga_t *svga)
xga->accel.px = ((xga->accel.px + 1) & patwidth) | (xga->accel.px & ~patwidth);
xga->accel.dx++;
xga->accel.x--;
x++;
if (xga->accel.x < 0) {
area_state = 0;
x = 0;
xga->accel.y--;
xga->accel.x = xga->accel.blt_width & 0xfff;
@@ -1720,7 +1716,6 @@ xga_bitblt(svga_t *svga)
xga->accel.sy = ((xga->accel.sy + ydir) & srcheight) | (xga->accel.sy & ~srcheight);
xga->accel.py += ydir;
xga->accel.dy += ydir;
y++;
if (xga->accel.y < 0) {
xga->accel.dst_map_x = xga->accel.dx;
@@ -3369,7 +3364,7 @@ xga_init(const device_t *info)
rom = malloc(xga->bios_rom.sz);
memset(rom, 0xff, xga->bios_rom.sz);
(void) fread(rom, xga->bios_rom.sz, 1, fp);
(void) !fread(rom, xga->bios_rom.sz, 1, fp);
(void) fclose(fp);
xga->bios_rom.rom = rom;