mirror of
https://github.com/86Box/86Box.git
synced 2026-02-23 18:08:20 -07:00
Merge remote-tracking branch 'upstream/master' into feature/ich2
This commit is contained in:
@@ -14,21 +14,22 @@ Features
|
||||
* MIDI output to Windows built-in MIDI support, FluidSynth, or emulated Roland synthesizers
|
||||
* Supports running MS-DOS, older Windows versions, OS/2, many Linux distributions, or vintage systems such as BeOS or NEXTSTEP, and applications for these systems
|
||||
|
||||
System requirements and recommendations
|
||||
---------------------------------------
|
||||
Minimum system requirements and recommendations
|
||||
-----------------------------------------------
|
||||
* Intel Core 2 or AMD Athlon 64 processor
|
||||
* Windows version: Windows 7 Service Pack 1, Windows 8.1 or Windows 10
|
||||
* Linux version: Ubuntu 16.04, Debian 9.0 or other distributions from 2016 onwards
|
||||
* macOS version: macOS High Sierra 10.13
|
||||
* 4 GB of RAM
|
||||
|
||||
Performance may vary depending on both host and guest configuration. Most emulation logic is executed in a single thread, therefore generally systems with better IPC (instructions per clock) should be able to emulate higher clock speeds.
|
||||
Performance may vary depending on both host and guest configuration. Most emulation logic is executed in a single thread; therefore, systems with better IPC (instructions per clock) generally should be able to emulate higher clock speeds.
|
||||
|
||||
It is also recommended to use a manager application with 86Box for easier handling of multiple virtual machines.
|
||||
* [86Box Manager](https://github.com/86Box/86BoxManager) by [Overdoze](https://github.com/daviunic) (Windows only)
|
||||
* [86Box Manager Lite](https://github.com/insanemal/86box_manager_py) by [Insanemal](https://github.com/insanemal)
|
||||
* [WinBox for 86Box](https://github.com/86Box/WinBox-for-86Box) by Laci bá' (Windows only)
|
||||
|
||||
However, it is also possible to use 86Box on its own with the `--vmpath`/`-P` command line option.
|
||||
It is also possible to use 86Box on its own with the `--vmpath`/`-P` command line option.
|
||||
|
||||
Getting started
|
||||
---------------
|
||||
|
||||
@@ -13,4 +13,4 @@
|
||||
# Copyright 2020,2021 David Hrdlička.
|
||||
#
|
||||
|
||||
add_library(cdrom OBJECT cdrom.c cdrom_image_backend.c cdrom_image.c)
|
||||
add_library(cdrom OBJECT cdrom.c cdrom_image_backend.c cdrom_image_viso.c cdrom_image.c)
|
||||
|
||||
@@ -268,14 +268,16 @@ cdrom_image_open(cdrom_t *dev, const char *fn)
|
||||
dev->image = img;
|
||||
|
||||
/* Open the image. */
|
||||
if (!cdi_set_device(img, fn))
|
||||
int i = cdi_set_device(img, fn);
|
||||
if (!i)
|
||||
return image_open_abort(dev);
|
||||
|
||||
/* All good, reset state. */
|
||||
if (!strcasecmp(path_get_extension((char *) fn), "ISO"))
|
||||
if (i >= 2)
|
||||
dev->cd_status = CD_STATUS_DATA_ONLY;
|
||||
else
|
||||
dev->cd_status = CD_STATUS_STOPPED;
|
||||
dev->is_dir = (i == 3);
|
||||
dev->seek_pos = 0;
|
||||
dev->cd_buflen = 0;
|
||||
dev->cdrom_capacity = image_get_capacity(dev);
|
||||
|
||||
@@ -1,36 +1,37 @@
|
||||
/*
|
||||
* 86Box A hypervisor and IBM PC system emulator that specializes in
|
||||
* running old operating systems and software designed for IBM
|
||||
* PC systems and compatibles from 1981 through fairly recent
|
||||
* system designs based on the PCI bus.
|
||||
* 86Box A hypervisor and IBM PC system emulator that specializes in
|
||||
* running old operating systems and software designed for IBM
|
||||
* PC systems and compatibles from 1981 through fairly recent
|
||||
* system designs based on the PCI bus.
|
||||
*
|
||||
* This file is part of the 86Box distribution.
|
||||
* This file is part of the 86Box distribution.
|
||||
*
|
||||
* CD-ROM image file handling module, translated to C from
|
||||
* cdrom_dosbox.cpp.
|
||||
* CD-ROM image file handling module, translated to C from
|
||||
* cdrom_dosbox.cpp.
|
||||
*
|
||||
* Authors: Miran Grca, <mgrca8@gmail.com>
|
||||
* Fred N. van Kempen, <decwiz@yahoo.com>
|
||||
* The DOSBox Team, <unknown>
|
||||
* Authors: Miran Grca, <mgrca8@gmail.com>
|
||||
* Fred N. van Kempen, <decwiz@yahoo.com>
|
||||
* The DOSBox Team, <unknown>
|
||||
*
|
||||
* Copyright 2016-2020 Miran Grca.
|
||||
* Copyright 2017-2020 Fred N. van Kempen.
|
||||
* Copyright 2002-2020 The DOSBox Team.
|
||||
* Copyright 2016-2020 Miran Grca.
|
||||
* Copyright 2017-2020 Fred N. van Kempen.
|
||||
* Copyright 2002-2020 The DOSBox Team.
|
||||
*/
|
||||
#define __STDC_FORMAT_MACROS
|
||||
#include <stdarg.h>
|
||||
#include <inttypes.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
#include <inttypes.h>
|
||||
#include <stdarg.h>
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <sys/stat.h>
|
||||
#ifdef _WIN32
|
||||
# include <string.h>
|
||||
# include <sys/types.h>
|
||||
#else
|
||||
# include <libgen.h>
|
||||
#endif
|
||||
#include <wchar.h>
|
||||
#define HAVE_STDARG_H
|
||||
#include <86box/86box.h>
|
||||
#include <86box/path.h>
|
||||
@@ -132,6 +133,7 @@ static track_file_t *
|
||||
bin_init(const char *filename, int *error)
|
||||
{
|
||||
track_file_t *tf = (track_file_t *) malloc(sizeof(track_file_t));
|
||||
struct stat stats;
|
||||
|
||||
if (tf == NULL) {
|
||||
*error = 1;
|
||||
@@ -143,7 +145,11 @@ bin_init(const char *filename, int *error)
|
||||
tf->file = plat_fopen64(tf->fn, "rb");
|
||||
cdrom_image_backend_log("CDROM: binary_open(%s) = %08lx\n", tf->fn, tf->file);
|
||||
|
||||
*error = (tf->file == NULL);
|
||||
if (stat(tf->fn, &stats) != 0) {
|
||||
/* Use a blank structure if stat failed. */
|
||||
memset(&stats, 0, sizeof(struct stat));
|
||||
}
|
||||
*error = ((tf->file == NULL) || ((stats.st_mode & S_IFMT) == S_IFDIR));
|
||||
|
||||
/* Set the function pointers. */
|
||||
if (!*error) {
|
||||
@@ -222,11 +228,13 @@ cdi_close(cd_img_t *cdi)
|
||||
int
|
||||
cdi_set_device(cd_img_t *cdi, const char *path)
|
||||
{
|
||||
if (cdi_load_cue(cdi, path))
|
||||
return 1;
|
||||
int ret;
|
||||
|
||||
if (cdi_load_iso(cdi, path))
|
||||
return 1;
|
||||
if ((ret = cdi_load_cue(cdi, path)))
|
||||
return ret;
|
||||
|
||||
if ((ret = cdi_load_iso(cdi, path)))
|
||||
return ret;
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -532,7 +540,7 @@ cdi_track_push_back(cd_img_t *cdi, track_t *trk)
|
||||
int
|
||||
cdi_load_iso(cd_img_t *cdi, const char *filename)
|
||||
{
|
||||
int error;
|
||||
int error, ret = 2;
|
||||
track_t trk;
|
||||
|
||||
cdi->tracks = NULL;
|
||||
@@ -545,7 +553,13 @@ cdi_load_iso(cd_img_t *cdi, const char *filename)
|
||||
if (error) {
|
||||
if ((trk.file != NULL) && (trk.file->close != NULL))
|
||||
trk.file->close(trk.file);
|
||||
return 0;
|
||||
ret = 3;
|
||||
trk.file = viso_init(filename, &error);
|
||||
if (error) {
|
||||
if ((trk.file != NULL) && (trk.file->close != NULL))
|
||||
trk.file->close(trk.file);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
trk.number = 1;
|
||||
trk.track_number = 1;
|
||||
@@ -585,7 +599,7 @@ cdi_load_iso(cd_img_t *cdi, const char *filename)
|
||||
trk.file = NULL;
|
||||
cdi_track_push_back(cdi, &trk);
|
||||
|
||||
return 1;
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int
|
||||
|
||||
1489
src/cdrom/cdrom_image_viso.c
Normal file
1489
src/cdrom/cdrom_image_viso.c
Normal file
File diff suppressed because it is too large
Load Diff
@@ -47,17 +47,17 @@ void codegen_accumulate(int acc_reg, int delta)
|
||||
|
||||
void codegen_accumulate_flush(void)
|
||||
{
|
||||
intptr_t rip;
|
||||
|
||||
if (acc_regs[0].count) {
|
||||
addbyte(0x55); /*push rbp*/
|
||||
addbyte(0x48); /*mov rbp,val*/
|
||||
addbyte(0xbd);
|
||||
addlong((uint32_t) (acc_regs[0].dest_reg & 0xffffffffULL));
|
||||
addlong((uint32_t) (acc_regs[0].dest_reg >> 32ULL));
|
||||
addbyte(0x81); /* add d,[rbp][0],val */
|
||||
addbyte(0x45);
|
||||
addbyte(0x00);
|
||||
/* To reduce the size of the generated code, we take advantage of
|
||||
the fact that the target offset points to _cycles within cpu_state,
|
||||
so we can just use our existing infrastracture for variables
|
||||
relative to cpu_state. */
|
||||
addbyte(0x81); /*ADDL $acc_regs[0].count,(_cycles)*/
|
||||
addbyte(0x45);
|
||||
addbyte((uint8_t)cpu_state_offset(_cycles));
|
||||
addlong(acc_regs[0].count);
|
||||
addbyte(0x5d); /*pop rbp*/
|
||||
}
|
||||
|
||||
acc_regs[0].count = 0;
|
||||
|
||||
@@ -45,9 +45,13 @@ void codegen_accumulate(int acc_reg, int delta)
|
||||
void codegen_accumulate_flush(void)
|
||||
{
|
||||
if (acc_regs[0].count) {
|
||||
addbyte(0x81); /*ADD $acc_regs[0].count,acc_regs[0].dest*/
|
||||
addbyte(0x05);
|
||||
addlong((uint32_t) acc_regs[0].dest_reg);
|
||||
/* To reduce the size of the generated code, we take advantage of
|
||||
the fact that the target offset points to _cycles within cpu_state,
|
||||
so we can just use our existing infrastracture for variables
|
||||
relative to cpu_state. */
|
||||
addbyte(0x81); /*MOVL $acc_regs[0].count,(_cycles)*/
|
||||
addbyte(0x45);
|
||||
addbyte((uint8_t)cpu_state_offset(_cycles));
|
||||
addlong(acc_regs[0].count);
|
||||
}
|
||||
|
||||
|
||||
17
src/config.c
17
src/config.c
@@ -1291,6 +1291,14 @@ load_floppy_and_cdrom_drives(void)
|
||||
sprintf(temp, "fdd_%02i_check_bpb", c + 1);
|
||||
ini_section_delete_var(cat, temp);
|
||||
}
|
||||
for (int i = 0; i < MAX_PREV_IMAGES; i++) {
|
||||
fdd_image_history[c][i] = (char *) calloc(MAX_IMAGE_PATH_LEN + 1, sizeof(char));
|
||||
sprintf(temp, "fdd_%02i_image_history_%02i", c + 1, i + 1);
|
||||
p = ini_section_get_string(cat, temp, NULL);
|
||||
if (p) {
|
||||
sprintf(fdd_image_history[c][i], "%s", p);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
memset(temp, 0x00, sizeof(temp));
|
||||
@@ -2680,6 +2688,15 @@ save_floppy_and_cdrom_drives(void)
|
||||
ini_section_delete_var(cat, temp);
|
||||
else
|
||||
ini_section_set_int(cat, temp, fdd_get_check_bpb(c));
|
||||
|
||||
for (int i = 0; i < MAX_PREV_IMAGES; i++) {
|
||||
sprintf(temp, "fdd_%02i_image_history_%02i", c + 1, i + 1);
|
||||
if ((fdd_image_history[c][i] == 0) || strlen(fdd_image_history[c][i]) == 0) {
|
||||
ini_section_delete_var(cat, temp);
|
||||
} else {
|
||||
ini_section_set_string(cat, temp, fdd_image_history[c][i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (c = 0; c < CDROM_NUM; c++) {
|
||||
|
||||
@@ -158,10 +158,13 @@ static const macro_op_t lods_op =
|
||||
};
|
||||
static const macro_op_t loop_op =
|
||||
{
|
||||
.nr_uops = 2,
|
||||
.nr_uops = 5,
|
||||
.decode_type = DECODE_COMPLEX,
|
||||
.uop[0] = {.type = UOP_ALU, .latency = 1},
|
||||
.uop[1] = {.type = UOP_BRANCH, .latency = 2}
|
||||
.uop[1] = {.type = UOP_ALU, .latency = 1},
|
||||
.uop[2] = {.type = UOP_ALU, .latency = 1},
|
||||
.uop[3] = {.type = UOP_ALU, .latency = 1},
|
||||
.uop[4] = {.type = UOP_BRANCH, .latency = 1}
|
||||
};
|
||||
static const macro_op_t mov_reg_seg_op =
|
||||
{
|
||||
|
||||
@@ -442,16 +442,16 @@ hdd_preset_get_num()
|
||||
return sizeof(hdd_speed_presets) / sizeof(hdd_preset_t);
|
||||
}
|
||||
|
||||
char *
|
||||
const char *
|
||||
hdd_preset_getname(int preset)
|
||||
{
|
||||
return (char *) hdd_speed_presets[preset].name;
|
||||
return hdd_speed_presets[preset].name;
|
||||
}
|
||||
|
||||
char *
|
||||
const char *
|
||||
hdd_preset_get_internal_name(int preset)
|
||||
{
|
||||
return (char *) hdd_speed_presets[preset].internal_name;
|
||||
return hdd_speed_presets[preset].internal_name;
|
||||
}
|
||||
|
||||
int
|
||||
|
||||
@@ -76,6 +76,7 @@ typedef struct {
|
||||
fdd_t fdd[FDD_NUM];
|
||||
|
||||
char floppyfns[FDD_NUM][512];
|
||||
char *fdd_image_history[FDD_NUM][FLOPPY_IMAGE_HISTORY];
|
||||
|
||||
pc_timer_t fdd_poll_time[FDD_NUM];
|
||||
|
||||
|
||||
@@ -102,7 +102,7 @@ typedef struct cdrom {
|
||||
media status. */
|
||||
speed, cur_speed;
|
||||
|
||||
FILE *img_fp;
|
||||
int is_dir;
|
||||
void *priv;
|
||||
|
||||
char image_path[1024],
|
||||
|
||||
@@ -52,6 +52,7 @@ typedef struct {
|
||||
|
||||
char fn[260];
|
||||
FILE *file;
|
||||
void *priv;
|
||||
} track_file_t;
|
||||
|
||||
typedef struct {
|
||||
@@ -88,4 +89,10 @@ extern int cdi_load_cue(cd_img_t *cdi, const char *cuefile);
|
||||
extern int cdi_has_data_track(cd_img_t *cdi);
|
||||
extern int cdi_has_audio_track(cd_img_t *cdi);
|
||||
|
||||
/* Virtual ISO functions. */
|
||||
extern int viso_read(void *p, uint8_t *buffer, uint64_t seek, size_t count);
|
||||
extern uint64_t viso_get_length(void *p);
|
||||
extern void viso_close(void *p);
|
||||
extern track_file_t *viso_init(const char *dirname, int *error);
|
||||
|
||||
#endif /*CDROM_IMAGE_BACKEND_H*/
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
#define EMU_FDD_H
|
||||
|
||||
#define FDD_NUM 4
|
||||
#define FLOPPY_IMAGE_HISTORY 4
|
||||
#define SEEK_RECALIBRATE -999
|
||||
|
||||
#ifdef __cplusplus
|
||||
@@ -83,6 +84,7 @@ typedef struct {
|
||||
|
||||
extern DRIVE drives[FDD_NUM];
|
||||
extern char floppyfns[FDD_NUM][512];
|
||||
extern char *fdd_image_history[FDD_NUM][FLOPPY_IMAGE_HISTORY];
|
||||
extern pc_timer_t fdd_poll_time[FDD_NUM];
|
||||
extern int ui_writeprot[FDD_NUM];
|
||||
|
||||
|
||||
@@ -203,13 +203,13 @@ extern int image_is_hdi(const char *s);
|
||||
extern int image_is_hdx(const char *s, int check_signature);
|
||||
extern int image_is_vhd(const char *s, int check_signature);
|
||||
|
||||
extern double hdd_timing_write(hard_disk_t *hdd, uint32_t addr, uint32_t len);
|
||||
extern double hdd_timing_read(hard_disk_t *hdd, uint32_t addr, uint32_t len);
|
||||
extern double hdd_seek_get_time(hard_disk_t *hdd, uint32_t dst_addr, uint8_t operation, uint8_t continuous, double max_seek_time);
|
||||
int hdd_preset_get_num();
|
||||
char *hdd_preset_getname(int preset);
|
||||
extern char *hdd_preset_get_internal_name(int preset);
|
||||
extern int hdd_preset_get_from_internal_name(char *s);
|
||||
extern void hdd_preset_apply(int hdd_id);
|
||||
extern double hdd_timing_write(hard_disk_t *hdd, uint32_t addr, uint32_t len);
|
||||
extern double hdd_timing_read(hard_disk_t *hdd, uint32_t addr, uint32_t len);
|
||||
extern double hdd_seek_get_time(hard_disk_t *hdd, uint32_t dst_addr, uint8_t operation, uint8_t continuous, double max_seek_time);
|
||||
int hdd_preset_get_num();
|
||||
const char *hdd_preset_getname(int preset);
|
||||
extern const char *hdd_preset_get_internal_name(int preset);
|
||||
extern int hdd_preset_get_from_internal_name(char *s);
|
||||
extern void hdd_preset_apply(int hdd_id);
|
||||
|
||||
#endif /*EMU_HDD_H*/
|
||||
|
||||
@@ -789,6 +789,7 @@ extern int machine_xt_sansx16_init(const machine_t *);
|
||||
extern int machine_xt_bw230_init(const machine_t *);
|
||||
|
||||
extern int machine_xt_iskra3104_init(const machine_t *);
|
||||
extern int machine_xt_pravetz16_imko4_init(const machine_t *);
|
||||
|
||||
/* m_xt_compaq.c */
|
||||
extern int machine_xt_compaq_deskpro_init(const machine_t *);
|
||||
|
||||
@@ -76,6 +76,10 @@ extern "C" {
|
||||
# define atomic_bool_t atomic_bool
|
||||
#endif
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
# define ssize_t intptr_t
|
||||
#endif
|
||||
|
||||
/* Global variables residing in the platform module. */
|
||||
extern int dopause, /* system is paused */
|
||||
mouse_capture; /* mouse is captured in app */
|
||||
|
||||
@@ -17,6 +17,8 @@
|
||||
#ifndef PLAT_DIR_H
|
||||
#define PLAT_DIR_H
|
||||
|
||||
/* Windows needs the POSIX re-implementations */
|
||||
#if defined(_WIN32)
|
||||
#ifdef _MAX_FNAME
|
||||
# define MAXNAMLEN _MAX_FNAME
|
||||
#else
|
||||
@@ -63,5 +65,10 @@ extern void seekdir(DIR *, long);
|
||||
extern int closedir(DIR *);
|
||||
|
||||
#define rewinddir(dirp) seekdir(dirp, 0L)
|
||||
#else
|
||||
/* On linux and macOS, use the standard functions and types */
|
||||
#include <sys/dir.h>
|
||||
#endif
|
||||
|
||||
|
||||
#endif /*PLAT_DIR_H*/
|
||||
|
||||
@@ -445,7 +445,8 @@
|
||||
#define IDM_CDROM_EMPTY 0x4300
|
||||
#define IDM_CDROM_RELOAD 0x4400
|
||||
#define IDM_CDROM_IMAGE 0x4500
|
||||
#define IDM_CDROM_HOST_DRIVE 0x4600
|
||||
#define IDM_CDROM_DIR 0x4600
|
||||
#define IDM_CDROM_HOST_DRIVE 0x4700
|
||||
|
||||
#define IDM_ZIP_IMAGE_NEW 0x5200
|
||||
#define IDM_ZIP_IMAGE_EXISTING 0x5300
|
||||
|
||||
@@ -509,6 +509,7 @@ extern const device_t ibm_ps1_2121_device;
|
||||
extern const device_t tvga8900b_device;
|
||||
extern const device_t tvga8900d_device;
|
||||
extern const device_t tvga9000b_device;
|
||||
extern const device_t nec_sv9000_device;
|
||||
|
||||
/* IBM VGA */
|
||||
extern const device_t vga_device;
|
||||
|
||||
@@ -328,6 +328,24 @@ machine_xt_iskra3104_init(const machine_t *model)
|
||||
return ret;
|
||||
}
|
||||
|
||||
int
|
||||
machine_xt_pravetz16_imko4_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = bios_load_linear("roms/machines/pravetz16/BIOS_IMKO4_FE00.bin",
|
||||
0x000fe000, 8192, 0);
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
device_add(&keyboard_at_device);
|
||||
|
||||
machine_xt_common_init(model);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int
|
||||
machine_xt_pc4i_init(const machine_t *model)
|
||||
{
|
||||
|
||||
@@ -1611,6 +1611,42 @@ const machine_t machines[] = {
|
||||
.snd_device = NULL,
|
||||
.net_device = NULL
|
||||
},
|
||||
{
|
||||
.name = "[8088] Pravetz 16 / IMKO-4",
|
||||
.internal_name = "pravetz16",
|
||||
.type = MACHINE_TYPE_8088,
|
||||
.chipset = MACHINE_CHIPSET_DISCRETE,
|
||||
.init = machine_xt_pravetz16_imko4_init,
|
||||
.pad = 0,
|
||||
.pad0 = 0,
|
||||
.pad1 = MACHINE_AVAILABLE,
|
||||
.pad2 = 0,
|
||||
.cpu = {
|
||||
.package = CPU_PKG_8088,
|
||||
.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_PC,
|
||||
.flags = MACHINE_FLAGS_NONE,
|
||||
.ram = {
|
||||
.min = 64,
|
||||
.max = 640,
|
||||
.step = 64
|
||||
},
|
||||
.nvrmask = 0,
|
||||
.kbc = KBC_IBM_PC_XT,
|
||||
.kbc_p1 = 0xff00,
|
||||
.gpio = 0xffffffff,
|
||||
.device = NULL,
|
||||
.vid_device = NULL,
|
||||
.snd_device = NULL,
|
||||
.net_device = NULL
|
||||
},
|
||||
|
||||
/* 8086 Machines */
|
||||
{
|
||||
|
||||
@@ -229,6 +229,9 @@ msgstr "&Načíst znova předchozí obraz"
|
||||
msgid "&Image"
|
||||
msgstr "&Obraz..."
|
||||
|
||||
msgid "&Folder..."
|
||||
msgstr "&Folder..."
|
||||
|
||||
msgid "Target &framerate"
|
||||
msgstr "&Cílová snímková frekvence"
|
||||
|
||||
|
||||
@@ -229,6 +229,9 @@ msgstr "&Voriges Image neu laden"
|
||||
msgid "&Image"
|
||||
msgstr "&Image"
|
||||
|
||||
msgid "&Folder..."
|
||||
msgstr "&Folder..."
|
||||
|
||||
msgid "Target &framerate"
|
||||
msgstr "Ziel&framerate"
|
||||
|
||||
|
||||
@@ -229,6 +229,9 @@ msgstr "&Reload previous image"
|
||||
msgid "&Image"
|
||||
msgstr "&Image"
|
||||
|
||||
msgid "&Folder..."
|
||||
msgstr "&Folder..."
|
||||
|
||||
msgid "Target &framerate"
|
||||
msgstr "Target &framerate"
|
||||
|
||||
|
||||
@@ -229,6 +229,9 @@ msgstr "&Reload previous image"
|
||||
msgid "&Image"
|
||||
msgstr "&Image"
|
||||
|
||||
msgid "&Folder..."
|
||||
msgstr "&Folder..."
|
||||
|
||||
msgid "Target &framerate"
|
||||
msgstr "Target &framerate"
|
||||
|
||||
|
||||
@@ -229,6 +229,9 @@ msgstr "&Recargar imagen previa"
|
||||
msgid "&Image"
|
||||
msgstr "&Imagen..."
|
||||
|
||||
msgid "&Folder..."
|
||||
msgstr "&Folder..."
|
||||
|
||||
msgid "Target &framerate"
|
||||
msgstr "&Tasa de refresco objetivo"
|
||||
|
||||
|
||||
@@ -229,6 +229,9 @@ msgstr "&Lataa edellinen levykuva uudelleen"
|
||||
msgid "&Image"
|
||||
msgstr "L&evykuva"
|
||||
|
||||
msgid "&Folder..."
|
||||
msgstr "&Folder..."
|
||||
|
||||
msgid "Target &framerate"
|
||||
msgstr "&Kuvataajuustavoite"
|
||||
|
||||
|
||||
@@ -229,6 +229,9 @@ msgstr "&Recharger image précedente"
|
||||
msgid "&Image"
|
||||
msgstr "&Image"
|
||||
|
||||
msgid "&Folder..."
|
||||
msgstr "&Folder..."
|
||||
|
||||
msgid "Target &framerate"
|
||||
msgstr "&Taux de rafraîchissement cible"
|
||||
|
||||
|
||||
@@ -229,6 +229,9 @@ msgstr "&Ponovo učitaj prethodnu sliku"
|
||||
msgid "&Image"
|
||||
msgstr "&Slika"
|
||||
|
||||
msgid "&Folder..."
|
||||
msgstr "&Folder..."
|
||||
|
||||
msgid "Target &framerate"
|
||||
msgstr "&Ciljni broj okvira u sekundi"
|
||||
|
||||
|
||||
@@ -229,6 +229,9 @@ msgstr "Előző képfájl &újratöltése"
|
||||
msgid "&Image"
|
||||
msgstr "&Meglévő képfájl &megnyitása..."
|
||||
|
||||
msgid "&Folder..."
|
||||
msgstr "&Folder..."
|
||||
|
||||
msgid "Target &framerate"
|
||||
msgstr "Cél &képkockasebesség"
|
||||
|
||||
|
||||
@@ -229,6 +229,9 @@ msgstr "&Ricarica l'immagine precedente"
|
||||
msgid "&Image"
|
||||
msgstr "&Immagine"
|
||||
|
||||
msgid "&Folder..."
|
||||
msgstr "&Folder..."
|
||||
|
||||
msgid "Target &framerate"
|
||||
msgstr "Imposta obiettivo &fotogrammi"
|
||||
|
||||
|
||||
@@ -229,6 +229,9 @@ msgstr "前のイメージを再読み込み(&R)"
|
||||
msgid "&Image"
|
||||
msgstr "イメージ(&I)"
|
||||
|
||||
msgid "&Folder..."
|
||||
msgstr "&Folder..."
|
||||
|
||||
msgid "Target &framerate"
|
||||
msgstr "目標フレームレート(&F)"
|
||||
|
||||
|
||||
@@ -229,6 +229,9 @@ msgstr "이전 이미지 다시 불러오기(&R)"
|
||||
msgid "&Image"
|
||||
msgstr "이미지(&I)"
|
||||
|
||||
msgid "&Folder..."
|
||||
msgstr "&Folder..."
|
||||
|
||||
msgid "Target &framerate"
|
||||
msgstr "목표 프레임 레이트(&F)"
|
||||
|
||||
|
||||
@@ -229,6 +229,9 @@ msgstr "&Przeładuj poprzedni obraz"
|
||||
msgid "&Image"
|
||||
msgstr "&Obraz"
|
||||
|
||||
msgid "&Folder..."
|
||||
msgstr "&Folder..."
|
||||
|
||||
msgid "Target &framerate"
|
||||
msgstr "Docelowa &liczba klatek na sekundę"
|
||||
|
||||
|
||||
@@ -229,6 +229,9 @@ msgstr "&Recarregar imagem anterior"
|
||||
msgid "&Image"
|
||||
msgstr "&Imagem"
|
||||
|
||||
msgid "&Folder..."
|
||||
msgstr "&Pasta..."
|
||||
|
||||
msgid "Target &framerate"
|
||||
msgstr "&Taxa de quadro pretendida"
|
||||
|
||||
|
||||
@@ -229,6 +229,9 @@ msgstr "&Recarregar imagem anterior"
|
||||
msgid "&Image"
|
||||
msgstr "&Imagem"
|
||||
|
||||
msgid "&Folder..."
|
||||
msgstr "&Folder..."
|
||||
|
||||
msgid "Target &framerate"
|
||||
msgstr "&Taxa de quadros de destino"
|
||||
|
||||
|
||||
@@ -229,6 +229,9 @@ msgstr "&Снова загрузить предыдущий образ"
|
||||
msgid "&Image"
|
||||
msgstr "&Образ..."
|
||||
|
||||
msgid "&Folder..."
|
||||
msgstr "&Folder..."
|
||||
|
||||
msgid "Target &framerate"
|
||||
msgstr "Целевая &частота кадров"
|
||||
|
||||
|
||||
@@ -229,6 +229,9 @@ msgstr "&Naloži zadnjo sliko"
|
||||
msgid "&Image"
|
||||
msgstr "&Slika"
|
||||
|
||||
msgid "&Folder..."
|
||||
msgstr "&Folder..."
|
||||
|
||||
msgid "Target &framerate"
|
||||
msgstr "&Ciljno št. sličic na sekundo"
|
||||
|
||||
|
||||
@@ -229,6 +229,9 @@ msgstr "&Önceki imajı seç"
|
||||
msgid "&Image"
|
||||
msgstr "&İmaj seç"
|
||||
|
||||
msgid "&Folder..."
|
||||
msgstr "&Folder..."
|
||||
|
||||
msgid "Target &framerate"
|
||||
msgstr "Hedef &kare oranı"
|
||||
|
||||
|
||||
@@ -229,6 +229,9 @@ msgstr "&Знову завантажити попередній образ"
|
||||
msgid "&Image"
|
||||
msgstr "&Образ..."
|
||||
|
||||
msgid "&Folder..."
|
||||
msgstr "&Folder..."
|
||||
|
||||
msgid "Target &framerate"
|
||||
msgstr "Цільова &частота кадрів"
|
||||
|
||||
|
||||
@@ -229,6 +229,9 @@ msgstr "载入上一个镜像(&R)"
|
||||
msgid "&Image"
|
||||
msgstr "镜像(&I)"
|
||||
|
||||
msgid "&Folder..."
|
||||
msgstr "&Folder..."
|
||||
|
||||
msgid "Target &framerate"
|
||||
msgstr "目标帧率(&F)"
|
||||
|
||||
|
||||
@@ -202,7 +202,8 @@ MainWindow::MainWindow(QWidget *parent) :
|
||||
}
|
||||
}
|
||||
#endif
|
||||
ui->actionPause->setChecked(dopause);
|
||||
ui->actionPause->setChecked(false);
|
||||
ui->actionPause->setCheckable(false);
|
||||
});
|
||||
connect(this, &MainWindow::getTitleForNonQtThread, this, &MainWindow::getTitle_, Qt::BlockingQueuedConnection);
|
||||
|
||||
@@ -753,6 +754,10 @@ void MainWindow::on_actionCtrl_Alt_Esc_triggered() {
|
||||
|
||||
void MainWindow::on_actionPause_triggered() {
|
||||
plat_pause(dopause ^ 1);
|
||||
auto pause_icon = dopause ? QIcon(":/menuicons/win/icons/run.ico") : QIcon(":/menuicons/win/icons/pause.ico");
|
||||
auto tooltip_text = dopause ? QString(tr("Resume execution")) : QString(tr("Pause execution"));
|
||||
ui->actionPause->setIcon(pause_icon);
|
||||
ui->actionPause->setToolTip(tooltip_text);
|
||||
}
|
||||
|
||||
void MainWindow::on_actionExit_triggered() {
|
||||
|
||||
@@ -21,10 +21,15 @@
|
||||
#include <QMetaEnum>
|
||||
#include <QStringBuilder>
|
||||
#include <utility>
|
||||
|
||||
#include "86box/cdrom.h"
|
||||
#include "qt_mediahistorymanager.hpp"
|
||||
|
||||
extern "C"
|
||||
{
|
||||
#include <86box/timer.h>
|
||||
#include <86box/cdrom.h>
|
||||
#include <86box/fdd.h>
|
||||
}
|
||||
|
||||
namespace ui {
|
||||
|
||||
MediaHistoryManager::MediaHistoryManager() {
|
||||
@@ -158,6 +163,9 @@ void MediaHistoryManager::initialDeduplication()
|
||||
case ui::MediaType::Optical:
|
||||
current_image = cdrom[device_index].image_path;
|
||||
break;
|
||||
case ui::MediaType::Floppy:
|
||||
current_image = floppyfns[device_index];
|
||||
break;
|
||||
default:
|
||||
continue;
|
||||
break;
|
||||
@@ -180,6 +188,8 @@ char ** MediaHistoryManager::getEmuHistoryVarForType(ui::MediaType type, int ind
|
||||
switch (type) {
|
||||
case ui::MediaType::Optical:
|
||||
return &cdrom[index].image_history[0];
|
||||
case ui::MediaType::Floppy:
|
||||
return &fdd_image_history[index][0];
|
||||
default:
|
||||
return nullptr;
|
||||
|
||||
|
||||
@@ -59,7 +59,8 @@ namespace ui {
|
||||
// Used to iterate over all supported types when preparing data structures
|
||||
// Also useful to indicate which types support history
|
||||
static const MediaType AllSupportedMediaHistoryTypes[] = {
|
||||
MediaType::Optical
|
||||
MediaType::Optical,
|
||||
MediaType::Floppy,
|
||||
};
|
||||
|
||||
class MediaHistoryManager {
|
||||
@@ -87,7 +88,7 @@ namespace ui {
|
||||
|
||||
// Main hash of hash of vector of strings
|
||||
master_list_t master_list;
|
||||
const master_list_t &getMasterList() const;
|
||||
[[nodiscard]] const master_list_t &getMasterList() const;
|
||||
void setMasterList(const master_list_t &masterList);
|
||||
|
||||
device_index_list_t index_list, empty_device_index_list;
|
||||
|
||||
@@ -105,6 +105,11 @@ void MediaMenu::refresh(QMenu *parentMenu) {
|
||||
menu->addAction(tr("&Existing image..."), [this, i]() { floppySelectImage(i, false); });
|
||||
menu->addAction(tr("Existing image (&Write-protected)..."), [this, i]() { floppySelectImage(i, true); });
|
||||
menu->addSeparator();
|
||||
for (int slot = 0; slot < MAX_PREV_IMAGES; slot++) {
|
||||
floppyImageHistoryPos[slot] = menu->children().count();
|
||||
menu->addAction(QString::asprintf(tr("Image %i").toUtf8().constData(), slot), [this, i, slot]() { floppyMenuSelect(i, slot); })->setCheckable(false);
|
||||
}
|
||||
menu->addSeparator();
|
||||
floppyExportPos = menu->children().count();
|
||||
menu->addAction(tr("E&xport to 86F..."), [this, i]() { floppyExportTo86f(i); });
|
||||
menu->addSeparator();
|
||||
@@ -120,7 +125,8 @@ void MediaMenu::refresh(QMenu *parentMenu) {
|
||||
cdromMutePos = menu->children().count();
|
||||
menu->addAction(tr("&Mute"), [this, i]() { cdromMute(i); })->setCheckable(true);
|
||||
menu->addSeparator();
|
||||
menu->addAction(tr("&Image..."), [this, i]() { cdromMount(i); })->setCheckable(false);
|
||||
menu->addAction(tr("&Image..."), [this, i]() { cdromMount(i, 0); })->setCheckable(false);
|
||||
menu->addAction(tr("&Folder..."), [this, i]() { cdromMount(i, 1); })->setCheckable(false);
|
||||
menu->addSeparator();
|
||||
for (int slot = 0; slot < MAX_PREV_IMAGES; slot++) {
|
||||
cdromImageHistoryPos[slot] = menu->children().count();
|
||||
@@ -128,6 +134,7 @@ void MediaMenu::refresh(QMenu *parentMenu) {
|
||||
}
|
||||
menu->addSeparator();
|
||||
cdromImagePos = menu->children().count();
|
||||
cdromDirPos = menu->children().count();
|
||||
menu->addAction(tr("E&ject"), [this, i]() { cdromEject(i); })->setCheckable(false);
|
||||
cdromMenus[i] = menu;
|
||||
cdromUpdateMenu(i);
|
||||
@@ -328,6 +335,7 @@ void MediaMenu::floppySelectImage(int i, bool wp) {
|
||||
}
|
||||
|
||||
void MediaMenu::floppyMount(int i, const QString &filename, bool wp) {
|
||||
auto previous_image = QFileInfo(floppyfns[i]);
|
||||
fdd_close(i);
|
||||
ui_writeprot[i] = wp ? 1 : 0;
|
||||
if (! filename.isEmpty()) {
|
||||
@@ -335,12 +343,14 @@ void MediaMenu::floppyMount(int i, const QString &filename, bool wp) {
|
||||
fdd_load(i, filenameBytes.data());
|
||||
}
|
||||
ui_sb_update_icon_state(SB_FLOPPY | i, filename.isEmpty() ? 1 : 0);
|
||||
mhm.addImageToHistory(i, ui::MediaType::Floppy, previous_image.filePath(), filename);
|
||||
floppyUpdateMenu(i);
|
||||
ui_sb_update_tip(SB_FLOPPY | i);
|
||||
config_save();
|
||||
}
|
||||
|
||||
void MediaMenu::floppyEject(int i) {
|
||||
mhm.addImageToHistory(i, ui::MediaType::Floppy, floppyfns[i], QString());
|
||||
fdd_close(i);
|
||||
ui_sb_update_icon_state(SB_FLOPPY | i, 1);
|
||||
floppyUpdateMenu(i);
|
||||
@@ -376,11 +386,22 @@ void MediaMenu::floppyUpdateMenu(int i) {
|
||||
ejectMenu->setText(QString::asprintf(tr("Eject %s").toUtf8().constData(), name.isEmpty() ? QString().toUtf8().constData() : fi.fileName().toUtf8().constData()));
|
||||
exportMenu->setEnabled(!name.isEmpty());
|
||||
|
||||
for (int slot = 0; slot < MAX_PREV_IMAGES; slot++) {
|
||||
updateImageHistory(i, slot, ui::MediaType::Floppy);
|
||||
}
|
||||
|
||||
int type = fdd_get_type(i);
|
||||
//floppyMenus[i]->setTitle(tr("Floppy %1 (%2): %3").arg(QString::number(i+1), fdd_getname(type), name.isEmpty() ? tr("(empty)") : name));
|
||||
floppyMenus[i]->setTitle(QString::asprintf(tr("Floppy %i (%s): %ls").toUtf8().constData(), i + 1, fdd_getname(type), name.isEmpty() ? tr("(empty)").toStdU16String().data() : name.toStdU16String().data()));
|
||||
}
|
||||
|
||||
void MediaMenu::floppyMenuSelect(int index, int slot) {
|
||||
QString filename = mhm.getImageForSlot(index, slot, ui::MediaType::Floppy);
|
||||
floppyMount(index, filename.toUtf8().constData(), false);
|
||||
floppyUpdateMenu(index);
|
||||
ui_sb_update_tip(SB_FLOPPY | index);
|
||||
}
|
||||
|
||||
void MediaMenu::cdromMute(int i) {
|
||||
cdrom[i].sound_on ^= 1;
|
||||
config_save();
|
||||
@@ -415,16 +436,23 @@ void MediaMenu::cdromMount(int i, const QString &filename)
|
||||
config_save();
|
||||
}
|
||||
|
||||
void MediaMenu::cdromMount(int i) {
|
||||
void MediaMenu::cdromMount(int i, int dir) {
|
||||
QString filename;
|
||||
QFileInfo fi(cdrom[i].image_path);
|
||||
|
||||
auto filename = QFileDialog::getOpenFileName(
|
||||
parentWidget,
|
||||
QString(),
|
||||
getMediaOpenDirectory(),
|
||||
tr("CD-ROM images") %
|
||||
util::DlgFilter({ "iso","cue" }) %
|
||||
tr("All files") %
|
||||
util::DlgFilter({ "*" }, true));
|
||||
if (dir) {
|
||||
filename = QFileDialog::getExistingDirectory(
|
||||
parentWidget);
|
||||
} else {
|
||||
filename = QFileDialog::getOpenFileName(
|
||||
parentWidget,
|
||||
QString(),
|
||||
QString(),
|
||||
tr("CD-ROM images") %
|
||||
util::DlgFilter({ "iso","cue" }) %
|
||||
tr("All files") %
|
||||
util::DlgFilter({ "*" }, true));
|
||||
}
|
||||
|
||||
if (filename.isEmpty()) {
|
||||
return;
|
||||
@@ -501,8 +529,9 @@ void MediaMenu::cdromUpdateMenu(int i) {
|
||||
imageMenu->setEnabled(!name.isEmpty());
|
||||
imageMenu->setText(QString::asprintf(tr("Eject %s").toUtf8().constData(), name.isEmpty() ? QString().toUtf8().constData() : fi.fileName().toUtf8().constData()));
|
||||
|
||||
for (int slot = 0; slot < MAX_PREV_IMAGES; slot++)
|
||||
for (int slot = 0; slot < MAX_PREV_IMAGES; slot++) {
|
||||
updateImageHistory(i, slot, ui::MediaType::Optical);
|
||||
}
|
||||
|
||||
QString busName = tr("Unknown Bus");
|
||||
switch (cdrom[i].bus_type) {
|
||||
|
||||
@@ -37,11 +37,12 @@ public:
|
||||
void floppySelectImage(int i, bool wp);
|
||||
void floppyMount(int i, const QString& filename, bool wp);
|
||||
void floppyEject(int i);
|
||||
void floppyMenuSelect(int index, int slot);
|
||||
void floppyExportTo86f(int i);
|
||||
void floppyUpdateMenu(int i);
|
||||
|
||||
void cdromMute(int i);
|
||||
void cdromMount(int i);
|
||||
void cdromMount(int i, int dir);
|
||||
void cdromMount(int i, const QString& filename);
|
||||
void cdromEject(int i);
|
||||
void cdromReload(int index, int slot);
|
||||
@@ -94,6 +95,7 @@ private:
|
||||
int cdromMutePos;
|
||||
int cdromReloadPos;
|
||||
int cdromImagePos;
|
||||
int cdromDirPos;
|
||||
int cdromImageHistoryPos[MAX_PREV_IMAGES];
|
||||
int floppyImageHistoryPos[MAX_PREV_IMAGES];
|
||||
|
||||
|
||||
@@ -161,7 +161,13 @@ plat_timer_read(void)
|
||||
FILE *
|
||||
plat_fopen(const char *path, const char *mode)
|
||||
{
|
||||
#if defined(Q_OS_MACOS) or defined(Q_OS_LINUX)
|
||||
QFileInfo fi(path);
|
||||
QString filename = (fi.isRelative() && !fi.filePath().isEmpty()) ? usr_path + fi.filePath() : fi.filePath();
|
||||
return fopen(filename.toUtf8().constData(), mode);
|
||||
#else
|
||||
return fopen(QString::fromUtf8(path).toLocal8Bit(), mode);
|
||||
#endif
|
||||
}
|
||||
|
||||
FILE *
|
||||
@@ -169,7 +175,7 @@ plat_fopen64(const char *path, const char *mode)
|
||||
{
|
||||
#if defined(Q_OS_MACOS) or defined(Q_OS_LINUX)
|
||||
QFileInfo fi(path);
|
||||
QString filename = fi.isRelative() ? usr_path + fi.filePath() : fi.filePath();
|
||||
QString filename = (fi.isRelative() && !fi.filePath().isEmpty()) ? usr_path + fi.filePath() : fi.filePath();
|
||||
return fopen(filename.toUtf8().constData(), mode);
|
||||
#else
|
||||
return fopen(QString::fromUtf8(path).toLocal8Bit(), mode);
|
||||
|
||||
@@ -154,7 +154,7 @@ void SettingsFloppyCDROM::save() {
|
||||
/* Removable devices category */
|
||||
model = ui->tableViewCDROM->model();
|
||||
for (int i = 0; i < CDROM_NUM; i++) {
|
||||
cdrom[i].img_fp = NULL;
|
||||
cdrom[i].is_dir = 0;
|
||||
cdrom[i].priv = NULL;
|
||||
cdrom[i].ops = NULL;
|
||||
cdrom[i].image = NULL;
|
||||
|
||||
@@ -139,6 +139,7 @@ video_cards[] = {
|
||||
{ &tvga8900b_device },
|
||||
{ &tvga8900d_device },
|
||||
{ &tvga9000b_device },
|
||||
{ &nec_sv9000_device },
|
||||
{ &et4000k_isa_device },
|
||||
{ &et2000_device },
|
||||
{ &et4000_isa_device },
|
||||
|
||||
@@ -35,9 +35,10 @@
|
||||
#define TVGA9000B_ID 0x23
|
||||
#define TVGA8900CLD_ID 0x33
|
||||
|
||||
#define ROM_TVGA_8900B "roms/video/tvga/tvga8900b.vbi"
|
||||
#define ROM_TVGA_8900CLD "roms/video/tvga/trident.bin"
|
||||
#define ROM_TVGA_9000B "roms/video/tvga/tvga9000b.bin"
|
||||
#define ROM_TVGA_8900B "roms/video/tvga/tvga8900b.vbi"
|
||||
#define ROM_TVGA_8900CLD "roms/video/tvga/trident.bin"
|
||||
#define ROM_TVGA_9000B "roms/video/tvga/tvga9000b.bin"
|
||||
#define ROM_TVGA_9000B_NEC_SV9000 "roms/video/tvga/SV9000.VBI"
|
||||
|
||||
typedef struct tvga_t {
|
||||
mem_mapping_t linear_mapping;
|
||||
@@ -389,7 +390,9 @@ tvga_init(const device_t *info)
|
||||
tvga_t *tvga = malloc(sizeof(tvga_t));
|
||||
memset(tvga, 0, sizeof(tvga_t));
|
||||
|
||||
if (info->local == TVGA9000B_ID) {
|
||||
tvga->card_id = info->local & 0xFF;
|
||||
|
||||
if (tvga->card_id == TVGA9000B_ID) {
|
||||
video_inform(VIDEO_FLAG_TYPE_SPECIAL, &timing_tvga9000);
|
||||
tvga->vram_size = 512 << 10;
|
||||
} else {
|
||||
@@ -399,9 +402,7 @@ tvga_init(const device_t *info)
|
||||
|
||||
tvga->vram_mask = tvga->vram_size - 1;
|
||||
|
||||
tvga->card_id = info->local;
|
||||
|
||||
switch (info->local) {
|
||||
switch (tvga->card_id) {
|
||||
case TVGA8900B_ID:
|
||||
bios_fn = ROM_TVGA_8900B;
|
||||
break;
|
||||
@@ -409,7 +410,7 @@ tvga_init(const device_t *info)
|
||||
bios_fn = ROM_TVGA_8900CLD;
|
||||
break;
|
||||
case TVGA9000B_ID:
|
||||
bios_fn = ROM_TVGA_9000B;
|
||||
bios_fn = (info->local & 0x100) ? ROM_TVGA_9000B_NEC_SV9000 : ROM_TVGA_9000B;
|
||||
break;
|
||||
default:
|
||||
free(tvga);
|
||||
@@ -424,7 +425,7 @@ tvga_init(const device_t *info)
|
||||
NULL,
|
||||
NULL);
|
||||
|
||||
if (info->local != TVGA9000B_ID)
|
||||
if (tvga->card_id != TVGA9000B_ID)
|
||||
tvga->svga.ramdac = device_add(&tkd8001_ramdac_device);
|
||||
|
||||
io_sethandler(0x03c0, 0x0020, tvga_in, NULL, NULL, tvga_out, NULL, NULL, tvga);
|
||||
@@ -450,6 +451,12 @@ tvga9000b_available(void)
|
||||
return rom_present(ROM_TVGA_9000B);
|
||||
}
|
||||
|
||||
static int
|
||||
tvga9000b_nec_sv9000_available(void)
|
||||
{
|
||||
return rom_present(ROM_TVGA_9000B_NEC_SV9000);
|
||||
}
|
||||
|
||||
void
|
||||
tvga_close(void *p)
|
||||
{
|
||||
@@ -549,3 +556,17 @@ const device_t tvga9000b_device = {
|
||||
.force_redraw = tvga_force_redraw,
|
||||
.config = NULL
|
||||
};
|
||||
|
||||
const device_t nec_sv9000_device = {
|
||||
.name = "NEC SV9000 (Trident TVGA 9000B)",
|
||||
.internal_name = "nec_sv9000",
|
||||
.flags = DEVICE_ISA,
|
||||
.local = TVGA9000B_ID | 0x100,
|
||||
.init = tvga_init,
|
||||
.close = tvga_close,
|
||||
.reset = NULL,
|
||||
{ .available = tvga9000b_nec_sv9000_available },
|
||||
.speed_changed = tvga_speed_changed,
|
||||
.force_redraw = tvga_force_redraw,
|
||||
.config = NULL
|
||||
};
|
||||
|
||||
@@ -638,7 +638,7 @@ MINIVHDOBJ := cwalk.o libxml2_encoding.o minivhd_convert.o \
|
||||
minivhd_struct_rw.o minivhd_util.o
|
||||
|
||||
CDROMOBJ := cdrom.o \
|
||||
cdrom_image_backend.o cdrom_image.o
|
||||
cdrom_image_backend.o cdrom_image_viso.o cdrom_image.o
|
||||
|
||||
ZIPOBJ := zip.o
|
||||
|
||||
|
||||
@@ -177,6 +177,7 @@ BEGIN
|
||||
MENUITEM "&Načíst znova předchozí obraz", IDM_CDROM_RELOAD
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "&Obraz...", IDM_CDROM_IMAGE
|
||||
MENUITEM "&Folder", IDM_CDROM_DIR
|
||||
END
|
||||
END
|
||||
|
||||
|
||||
@@ -177,6 +177,7 @@ BEGIN
|
||||
MENUITEM "&Voriges Image neu laden", IDM_CDROM_RELOAD
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "&Image", IDM_CDROM_IMAGE
|
||||
MENUITEM "&Folder", IDM_CDROM_DIR
|
||||
END
|
||||
END
|
||||
|
||||
|
||||
@@ -177,6 +177,7 @@ BEGIN
|
||||
MENUITEM "&Reload previous image", IDM_CDROM_RELOAD
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "&Image", IDM_CDROM_IMAGE
|
||||
MENUITEM "&Folder", IDM_CDROM_DIR
|
||||
END
|
||||
END
|
||||
|
||||
|
||||
@@ -177,6 +177,7 @@ BEGIN
|
||||
MENUITEM "&Reload previous image", IDM_CDROM_RELOAD
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "&Image", IDM_CDROM_IMAGE
|
||||
MENUITEM "&Folder", IDM_CDROM_DIR
|
||||
END
|
||||
END
|
||||
|
||||
|
||||
@@ -177,6 +177,7 @@ BEGIN
|
||||
MENUITEM "&Recargar imagen previa", IDM_CDROM_RELOAD
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "&Imagen...", IDM_CDROM_IMAGE
|
||||
MENUITEM "&Folder", IDM_CDROM_DIR
|
||||
END
|
||||
END
|
||||
|
||||
|
||||
@@ -177,6 +177,7 @@ BEGIN
|
||||
MENUITEM "&Lataa edellinen levykuva uudelleen", IDM_CDROM_RELOAD
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "L&evykuva", IDM_CDROM_IMAGE
|
||||
MENUITEM "&Folder", IDM_CDROM_DIR
|
||||
END
|
||||
END
|
||||
|
||||
|
||||
@@ -177,6 +177,7 @@ BEGIN
|
||||
MENUITEM "&Recharger image précedente", IDM_CDROM_RELOAD
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "&Image", IDM_CDROM_IMAGE
|
||||
MENUITEM "&Folder", IDM_CDROM_DIR
|
||||
END
|
||||
END
|
||||
|
||||
|
||||
@@ -177,6 +177,7 @@ BEGIN
|
||||
MENUITEM "&Ponovo učitaj prethodnu sliku", IDM_CDROM_RELOAD
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "&Slika", IDM_CDROM_IMAGE
|
||||
MENUITEM "&Folder", IDM_CDROM_DIR
|
||||
END
|
||||
END
|
||||
|
||||
|
||||
@@ -182,6 +182,7 @@ BEGIN
|
||||
MENUITEM "Előző képfájl &újratöltése", IDM_CDROM_RELOAD
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "&Meglévő képfájl &megnyitása...", IDM_CDROM_IMAGE
|
||||
MENUITEM "&Folder", IDM_CDROM_DIR
|
||||
END
|
||||
END
|
||||
|
||||
|
||||
@@ -178,6 +178,7 @@ BEGIN
|
||||
MENUITEM "&Ricarica l'immagine precedente", IDM_CDROM_RELOAD
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "&Immagine", IDM_CDROM_IMAGE
|
||||
MENUITEM "&Folder", IDM_CDROM_DIR
|
||||
END
|
||||
END
|
||||
|
||||
|
||||
@@ -177,6 +177,7 @@ BEGIN
|
||||
MENUITEM "前のイメージを再読み込み(&R)", IDM_CDROM_RELOAD
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "イメージ(&I)", IDM_CDROM_IMAGE
|
||||
MENUITEM "&Folder", IDM_CDROM_DIR
|
||||
END
|
||||
END
|
||||
|
||||
|
||||
@@ -177,6 +177,7 @@ BEGIN
|
||||
MENUITEM "이전 이미지 다시 불러오기(&R)", IDM_CDROM_RELOAD
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "이미지(&I)", IDM_CDROM_IMAGE
|
||||
MENUITEM "&Folder", IDM_CDROM_DIR
|
||||
END
|
||||
END
|
||||
|
||||
|
||||
@@ -177,6 +177,7 @@ BEGIN
|
||||
MENUITEM "&Przeładuj poprzedni obraz", IDM_CDROM_RELOAD
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "&Obraz", IDM_CDROM_IMAGE
|
||||
MENUITEM "&Folder", IDM_CDROM_DIR
|
||||
END
|
||||
END
|
||||
|
||||
|
||||
@@ -180,6 +180,7 @@ BEGIN
|
||||
MENUITEM "&Recarregar imagem anterior", IDM_CDROM_RELOAD
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "&Imagem", IDM_CDROM_IMAGE
|
||||
MENUITEM "&Pasta", IDM_CDROM_DIR
|
||||
END
|
||||
END
|
||||
|
||||
|
||||
@@ -177,6 +177,7 @@ BEGIN
|
||||
MENUITEM "&Recarregar imagem anterior", IDM_CDROM_RELOAD
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "&Imagem", IDM_CDROM_IMAGE
|
||||
MENUITEM "&Folder", IDM_CDROM_DIR
|
||||
END
|
||||
END
|
||||
|
||||
|
||||
@@ -177,6 +177,7 @@ BEGIN
|
||||
MENUITEM "&Снова загрузить предыдущий образ", IDM_CDROM_RELOAD
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "&Образ...", IDM_CDROM_IMAGE
|
||||
MENUITEM "&Folder", IDM_CDROM_DIR
|
||||
END
|
||||
END
|
||||
|
||||
|
||||
@@ -177,6 +177,7 @@ BEGIN
|
||||
MENUITEM "&Naloži zadnjo sliko", IDM_CDROM_RELOAD
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "&Slika", IDM_CDROM_IMAGE
|
||||
MENUITEM "&Folder", IDM_CDROM_DIR
|
||||
END
|
||||
END
|
||||
|
||||
|
||||
@@ -177,6 +177,7 @@ BEGIN
|
||||
MENUITEM "&Önceki imajı seç", IDM_CDROM_RELOAD
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "&İmaj seç", IDM_CDROM_IMAGE
|
||||
MENUITEM "&Folder", IDM_CDROM_DIR
|
||||
END
|
||||
END
|
||||
|
||||
|
||||
@@ -177,6 +177,7 @@ BEGIN
|
||||
MENUITEM "&Знову завантажити попередній образ", IDM_CDROM_RELOAD
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "&Образ...", IDM_CDROM_IMAGE
|
||||
MENUITEM "&Folder", IDM_CDROM_DIR
|
||||
END
|
||||
END
|
||||
|
||||
|
||||
@@ -177,6 +177,7 @@ BEGIN
|
||||
MENUITEM "载入上一个镜像(&R)", IDM_CDROM_RELOAD
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "镜像(&I)", IDM_CDROM_IMAGE
|
||||
MENUITEM "&Folder", IDM_CDROM_DIR
|
||||
END
|
||||
END
|
||||
|
||||
|
||||
@@ -172,7 +172,8 @@ file_dlg_w(HWND hwnd, WCHAR *f, WCHAR *fn, WCHAR *title, int save)
|
||||
* not use the contents of szFile to initialize itself.
|
||||
*/
|
||||
memset(ofn.lpstrFile, 0x00, 512 * sizeof(WCHAR));
|
||||
memcpy(ofn.lpstrFile, fn, (wcslen(fn) << 1) + 2);
|
||||
if (fn)
|
||||
memcpy(ofn.lpstrFile, fn, (wcslen(fn) << 1) + 2);
|
||||
ofn.nMaxFile = sizeof_w(wopenfilestring);
|
||||
ofn.lpstrFilter = f;
|
||||
ofn.nFilterIndex = 1;
|
||||
@@ -211,11 +212,12 @@ file_dlg(HWND hwnd, WCHAR *f, char *fn, char *title, int save)
|
||||
{
|
||||
WCHAR ufn[512], title_buf[512];
|
||||
|
||||
mbstoc16s(ufn, fn, strlen(fn) + 1);
|
||||
if (fn)
|
||||
mbstoc16s(ufn, fn, strlen(fn) + 1);
|
||||
if (title)
|
||||
mbstoc16s(title_buf, title, sizeof title_buf);
|
||||
|
||||
return (file_dlg_w(hwnd, f, ufn, title ? title_buf : NULL, save));
|
||||
return (file_dlg_w(hwnd, f, fn ? ufn : NULL, title ? title_buf : NULL, save));
|
||||
}
|
||||
|
||||
int
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <windows.h>
|
||||
#include <shlobj.h>
|
||||
#include <86box/86box.h>
|
||||
#include <86box/cdrom.h>
|
||||
#include <86box/config.h>
|
||||
@@ -294,11 +295,13 @@ media_menu_update_cdrom(int id)
|
||||
CheckMenuItem(menus[i], IDM_CDROM_MUTE | id, MF_BYCOMMAND | MF_UNCHECKED);
|
||||
|
||||
if (cdrom[id].host_drive == 200) {
|
||||
CheckMenuItem(menus[i], IDM_CDROM_IMAGE | id, MF_BYCOMMAND | MF_CHECKED);
|
||||
CheckMenuItem(menus[i], IDM_CDROM_IMAGE | id, MF_BYCOMMAND | (cdrom[id].is_dir ? MF_UNCHECKED : MF_CHECKED));
|
||||
CheckMenuItem(menus[i], IDM_CDROM_DIR | id, MF_BYCOMMAND | (cdrom[id].is_dir ? MF_CHECKED : MF_UNCHECKED));
|
||||
CheckMenuItem(menus[i], IDM_CDROM_EMPTY | id, MF_BYCOMMAND | MF_UNCHECKED);
|
||||
} else {
|
||||
cdrom[id].host_drive = 0;
|
||||
CheckMenuItem(menus[i], IDM_CDROM_IMAGE | id, MF_BYCOMMAND | MF_UNCHECKED);
|
||||
CheckMenuItem(menus[i], IDM_CDROM_DIR | id, MF_BYCOMMAND | MF_UNCHECKED);
|
||||
CheckMenuItem(menus[i], IDM_CDROM_EMPTY | id, MF_BYCOMMAND | MF_CHECKED);
|
||||
}
|
||||
|
||||
@@ -629,11 +632,32 @@ media_menu_proc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
break;
|
||||
|
||||
case IDM_CDROM_IMAGE:
|
||||
if (!file_dlg_st(hwnd, IDS_2140, cdrom[id].image_path, NULL, 0)) {
|
||||
if (!file_dlg_st(hwnd, IDS_2140, cdrom[id].is_dir ? NULL : cdrom[id].image_path, NULL, 0)) {
|
||||
cdrom_mount(id, openfilestring);
|
||||
}
|
||||
break;
|
||||
|
||||
case IDM_CDROM_DIR:
|
||||
BROWSEINFO bi = {
|
||||
.hwndOwner = hwnd,
|
||||
.ulFlags = BIF_EDITBOX
|
||||
};
|
||||
OleInitialize(NULL);
|
||||
int old_dopause = dopause;
|
||||
plat_pause(1);
|
||||
LPITEMIDLIST pidl = SHBrowseForFolder(&bi);
|
||||
plat_pause(old_dopause);
|
||||
plat_chdir(usr_path);
|
||||
if (pidl) {
|
||||
wchar_t wbuf[MAX_PATH + 1];
|
||||
if (SHGetPathFromIDList(pidl, wbuf)) {
|
||||
char buf[MAX_PATH + 1];
|
||||
c16stombs(buf, wbuf, sizeof(buf) - 1);
|
||||
cdrom_mount(id, buf);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case IDM_ZIP_IMAGE_NEW:
|
||||
NewFloppyDialogCreate(hwnd, id | 0x80, 0); /* NewZIPDialogCreate */
|
||||
break;
|
||||
|
||||
@@ -51,27 +51,27 @@ typedef struct {
|
||||
} disk_size_t;
|
||||
|
||||
static const disk_size_t disk_sizes[14] = {
|
||||
// { 1, 1, 2, 1, 1, 77, 26, 0, 0, 4, 2, 6, 68 }, /* 250k 8" */
|
||||
// { 1, 2, 2, 1, 1, 77, 26, 0, 0, 4, 2, 6, 68 }, /* 500k 8" */
|
||||
// { 1, 1, 2, 1, 1, 77, 8, 3, 0, 1, 2, 2, 192 }, /* 616k 8" */
|
||||
// { 1, 2, 0, 1, 1, 77, 8, 3, 0, 1, 2, 2, 192 }, /* 1232k 8" */
|
||||
{ 0, 1, 2, 1, 0, 40, 8, 2, 0xfe, 1, 2, 1, 64 }, /* 160k */
|
||||
{ 0, 1, 2, 1, 0, 40, 9, 2, 0xfc, 1, 2, 2, 64 }, /* 180k */
|
||||
{ 0, 2, 2, 1, 0, 40, 8, 2, 0xff, 2, 2, 1, 112 }, /* 320k */
|
||||
{ 0, 2, 2, 1, 0, 40, 9, 2, 0xfd, 2, 2, 2, 112 }, /* 360k */
|
||||
{ 0, 2, 2, 1, 0, 80, 8, 2, 0xfb, 2, 2, 2, 112 }, /* 640k */
|
||||
{ 0, 2, 2, 1, 0, 80, 9, 2, 0xf9, 2, 2, 3, 112 }, /* 720k */
|
||||
{ 1, 2, 0, 1, 1, 80, 15, 2, 0xf9, 1, 2, 7, 224 }, /* 1.2M */
|
||||
{ 1, 2, 0, 1, 1, 77, 8, 3, 0xfe, 1, 2, 2, 192 }, /* 1.25M */
|
||||
{ 1, 2, 0, 1, 0, 80, 18, 2, 0xf0, 1, 2, 9, 224 }, /* 1.44M */
|
||||
{ 1, 2, 0, 1, 0, 80, 21, 2, 0xf0, 2, 2, 5, 16 }, /* DMF cluster 1024 */
|
||||
{ 1, 2, 0, 1, 0, 80, 21, 2, 0xf0, 4, 2, 3, 16 }, /* DMF cluster 2048 */
|
||||
{ 2, 2, 3, 1, 0, 80, 36, 2, 0xf0, 2, 2, 9, 240 }, /* 2.88M */
|
||||
{ 0, 64, 0, 0, 0, 96, 32, 2, 0, 0, 0, 0, 0 }, /* ZIP 100 */
|
||||
{ 0, 64, 0, 0, 0, 239, 32, 2, 0, 0, 0, 0, 0 } }; /* ZIP 250 */
|
||||
|
||||
static unsigned char *empty;
|
||||
// { 1, 1, 2, 1, 1, 77, 26, 0, 0, 4, 2, 6, 68 }, /* 250k 8" */
|
||||
// { 1, 2, 2, 1, 1, 77, 26, 0, 0, 4, 2, 6, 68 }, /* 500k 8" */
|
||||
// { 1, 1, 2, 1, 1, 77, 8, 3, 0, 1, 2, 2, 192 }, /* 616k 8" */
|
||||
// { 1, 2, 0, 1, 1, 77, 8, 3, 0, 1, 2, 2, 192 }, /* 1232k 8" */
|
||||
{0, 1, 2, 1, 0, 40, 8, 2, 0xfe, 1, 2, 1, 64 }, /* 160k */
|
||||
{ 0, 1, 2, 1, 0, 40, 9, 2, 0xfc, 1, 2, 2, 64 }, /* 180k */
|
||||
{ 0, 2, 2, 1, 0, 40, 8, 2, 0xff, 2, 2, 1, 112}, /* 320k */
|
||||
{ 0, 2, 2, 1, 0, 40, 9, 2, 0xfd, 2, 2, 2, 112}, /* 360k */
|
||||
{ 0, 2, 2, 1, 0, 80, 8, 2, 0xfb, 2, 2, 2, 112}, /* 640k */
|
||||
{ 0, 2, 2, 1, 0, 80, 9, 2, 0xf9, 2, 2, 3, 112}, /* 720k */
|
||||
{ 1, 2, 0, 1, 1, 80, 15, 2, 0xf9, 1, 2, 7, 224}, /* 1.2M */
|
||||
{ 1, 2, 0, 1, 1, 77, 8, 3, 0xfe, 1, 2, 2, 192}, /* 1.25M */
|
||||
{ 1, 2, 0, 1, 0, 80, 18, 2, 0xf0, 1, 2, 9, 224}, /* 1.44M */
|
||||
{ 1, 2, 0, 1, 0, 80, 21, 2, 0xf0, 2, 2, 5, 16 }, /* DMF cluster 1024 */
|
||||
{ 1, 2, 0, 1, 0, 80, 21, 2, 0xf0, 4, 2, 3, 16 }, /* DMF cluster 2048 */
|
||||
{ 2, 2, 3, 1, 0, 80, 36, 2, 0xf0, 2, 2, 9, 240}, /* 2.88M */
|
||||
{ 0, 64, 0, 0, 0, 96, 32, 2, 0, 0, 0, 0, 0 }, /* ZIP 100 */
|
||||
{ 0, 64, 0, 0, 0, 239, 32, 2, 0, 0, 0, 0, 0 }
|
||||
}; /* ZIP 250 */
|
||||
|
||||
static unsigned char *empty;
|
||||
|
||||
static int
|
||||
create_86f(char *file_name, disk_size_t disk_size, uint8_t rpm_mode)
|
||||
|
||||
@@ -595,7 +595,7 @@ win_settings_save(void)
|
||||
/* Removable devices category */
|
||||
memcpy(cdrom, temp_cdrom, CDROM_NUM * sizeof(cdrom_t));
|
||||
for (i = 0; i < CDROM_NUM; i++) {
|
||||
cdrom[i].img_fp = NULL;
|
||||
cdrom[i].is_dir = 0;
|
||||
cdrom[i].priv = NULL;
|
||||
cdrom[i].ops = NULL;
|
||||
cdrom[i].image = NULL;
|
||||
|
||||
Reference in New Issue
Block a user