Merge branch 'master' of https://github.com/86Box/86Box into feature/savquest

This commit is contained in:
RichardG867
2021-07-18 16:33:09 -03:00
46 changed files with 621 additions and 270 deletions

View File

@@ -2441,6 +2441,8 @@ machine_amstrad_init(const machine_t *model, int type)
ams->language = 7;
video_reset(gfxcard);
if (gfxcard == VID_INTERNAL) switch(type) {
case AMS_PC1512:
loadfont("roms/machines/pc1512/40078", 8);

View File

@@ -323,7 +323,10 @@ machine_at_gw286ct_init(const machine_t *model)
device_add(&f82c710_device);
machine_at_scat_init(model, 1);
machine_at_common_init(model);
device_add(&keyboard_at_device);
device_add(&scat_4_device);
device_add(&ide_isa_device);

View File

@@ -823,6 +823,8 @@ machine_at_compaq_init(const machine_t *model, int type)
write_ram, write_ramw, write_raml,
0xa0000+ram, MEM_MAPPING_INTERNAL, NULL);
video_reset(gfxcard);
switch(type) {
case COMPAQ_PORTABLEII:
break;

View File

@@ -365,6 +365,7 @@ void t3100e_map_ram(uint8_t val)
int n;
int32_t upper_len;
#ifdef ENABLE_T3100E_LOG
t3100e_log("OUT 0x8084, %02x [ set memory mapping :", val | 0x40);
if (val & 1) t3100e_log("ENABLE_EMS ");
if (val & 2) t3100e_log("ENABLE_XMS ");
@@ -372,6 +373,7 @@ void t3100e_map_ram(uint8_t val)
if (val & 8) t3100e_log("X8X ");
if (val & 16) t3100e_log("UPPER_IS_XMS ");
t3100e_log("\n");
#endif
/* Bit 2 controls size of conventional memory */
if (val & 4)
@@ -632,7 +634,7 @@ static uint16_t ems_read_ramw(uint32_t addr, void *priv)
struct t3100e_ems_regs *regs = (struct t3100e_ems_regs *)priv;
int pg = addr_to_page(addr);
if (pg < 0) return 0xFF;
if (pg < 0) return 0xFFFF;
//t3100e_log("ems_read_ramw addr=%05x ", addr);
addr = regs->page_exec[pg] + (addr & 0x3FFF);
//t3100e_log("-> %06x val=%04x\n", addr, *(uint16_t *)&ram[addr]);
@@ -645,7 +647,7 @@ static uint32_t ems_read_raml(uint32_t addr, void *priv)
struct t3100e_ems_regs *regs = (struct t3100e_ems_regs *)priv;
int pg = addr_to_page(addr);
if (pg < 0) return 0xFF;
if (pg < 0) return 0xFFFFFFFF;
addr = regs->page_exec[pg] + (addr & 0x3FFF);
return *(uint32_t *)&ram[addr];
}

View File

@@ -824,6 +824,7 @@ machine_pcjr_init(const machine_t *model)
cpu_set();
/* Initialize the video controller. */
video_reset(gfxcard);
loadfont("roms/video/mda/mda.rom", 0);
mem_mapping_add(&pcjr->mapping, 0xb8000, 0x08000,
vid_read, NULL, NULL,

View File

@@ -1509,6 +1509,8 @@ machine_tandy1k_init(const machine_t *model, int type)
if (fdc_type == FDC_INTERNAL)
device_add(&fdc_xt_tandy_device);
video_reset(gfxcard);
switch(type) {
case TYPE_TANDY:
keyboard_set_table(scancode_tandy);

View File

@@ -98,6 +98,9 @@ static int key_queue_start = 0,
video_timings_t timing_m19_vid = {VIDEO_ISA, 8, 16, 32, 8, 16, 32};
const device_t m19_vid_device;
#ifdef ENABLE_M24VID_LOG
int m24vid_do_log = ENABLE_M24VID_LOG;
@@ -529,6 +532,8 @@ m19_vid_speed_changed(void *priv)
static void
m19_vid_init(m19_vid_t *vid)
{
device_context(&m19_vid_device);
/* int display_type; */
vid->mode = OLIVETTI_OGC_MODE;
@@ -540,23 +545,23 @@ m19_vid_init(m19_vid_t *vid)
loadfont_ex("roms/machines/m19/BIOS.BIN", 1, 90);
/* composite is not working yet */
vid->ogc.cga.composite = 0; // (display_type != CGA_RGB);
/* vid->ogc.cga.snow_enabled = device_get_config_int("snow_enabled"); */
vid->ogc.cga.revision = device_get_config_int("composite_type");
vid->ogc.cga.snow_enabled = device_get_config_int("snow_enabled");
vid->ogc.cga.vram = malloc(0x8000);
/* cga_comp_init(vid->ogc.cga.revision); */
/* vid->ogc.cga.rgb_type = device_get_config_int("rgb_type"); */
/* cga_palette = (vid->ogc.cga.rgb_type << 1); */
cga_palette = 0;
vid->ogc.cga.rgb_type = device_get_config_int("rgb_type");
cga_palette = (vid->ogc.cga.rgb_type << 1);
cgapal_rebuild();
ogc_mdaattr_rebuild();
/* color display */
/* if (device_get_config_int("rgb_type")==0 || device_get_config_int("rgb_type") == 4) */
vid->ogc.mono_display = 1;
/* else */
/* vid->ogc.mono_display = 1; */
if (device_get_config_int("rgb_type")==0 || device_get_config_int("rgb_type") == 4)
vid->ogc.mono_display = 0;
else
vid->ogc.mono_display = 1;
/* OGC emulation part end */
/* Plantronics emulation part begin*/
@@ -576,6 +581,8 @@ m19_vid_init(m19_vid_t *vid)
io_sethandler(0x03d0, 0x0010, m19_vid_in, NULL, NULL, m19_vid_out, NULL, NULL, vid);
vid->mode = OLIVETTI_OGC_MODE;
device_context_restore();
}
@@ -589,6 +596,37 @@ const device_t m24_kbd_device = {
{ NULL }, NULL, NULL
};
const device_config_t m19_vid_config[] =
{
{
/* Olivetti / ATT compatible displays */
"rgb_type", "RGB type", CONFIG_SELECTION, "", CGA_RGB, "", { 0 },
{
{
"Color", 0
},
{
"Green Monochrome", 1
},
{
"Amber Monochrome", 2
},
{
"Gray Monochrome", 3
},
{
""
}
}
},
{
"snow_enabled", "Snow emulation", CONFIG_BINARY, "", 1,
},
{
"", "", -1
}
};
const device_t m19_vid_device = {
"Olivetti M19 graphics card",
0, 0,
@@ -596,7 +634,7 @@ const device_t m19_vid_device = {
{ NULL },
m19_vid_speed_changed,
NULL,
NULL
m19_vid_config
};
const device_t *
@@ -707,6 +745,7 @@ int
machine_xt_m24_init(const machine_t *model)
{
int ret;
m24_kbd_t *m24_kbd;
ret = bios_load_interleaved("roms/machines/m24/olivetti_m24_version_1.43_low.bin",
"roms/machines/m24/olivetti_m24_version_1.43_high.bin",
@@ -715,11 +754,6 @@ machine_xt_m24_init(const machine_t *model)
if (bios_only || !ret)
return ret;
if (gfxcard == VID_INTERNAL)
device_add(&ogc_m24_device);
m24_kbd_t *m24_kbd;
m24_kbd = (m24_kbd_t *) malloc(sizeof(m24_kbd_t));
memset(m24_kbd, 0x00, sizeof(m24_kbd_t));
@@ -732,9 +766,6 @@ machine_xt_m24_init(const machine_t *model)
/* Address 66-67 = mainboard dip-switch settings */
io_sethandler(0x0066, 2, m24_read, NULL, NULL, NULL, NULL, NULL, NULL);
m24_kbd_init(m24_kbd);
device_add_ex(&m24_kbd_device, m24_kbd);
/* FIXME: make sure this is correct?? */
device_add(&at_nvr_device);
@@ -742,6 +773,14 @@ machine_xt_m24_init(const machine_t *model)
nmi_init();
video_reset(gfxcard);
if (gfxcard == VID_INTERNAL)
device_add(&ogc_m24_device);
m24_kbd_init(m24_kbd);
device_add_ex(&m24_kbd_device, m24_kbd);
return ret;
}
@@ -813,16 +852,21 @@ machine_xt_m19_init(const machine_t *model)
machine_common_init(model);
pit_ctr_set_out_func(&pit->counters[1], pit_refresh_timer_xt);
/* On-board FDC cannot be disabled */
device_add(&fdc_xt_device);
nmi_init();
video_reset(gfxcard);
m19_vid_init(vid);
device_add_ex(&m19_vid_device, vid);
device_add(&keyboard_xt_olivetti_device);
nmi_init();
pit_set_clock(14318184.0);
return ret;
}

View File

@@ -82,6 +82,9 @@ machine_init_ex(int m)
AT = IS_AT(machine);
PCI = IS_ARCH(machine, MACHINE_BUS_PCI);
cpu_set();
pc_speed_changed();
/* Reset the memory state. */
mem_reset();
smbase = is_am486dxl ? 0x00060000 : 0x00030000;
@@ -132,7 +135,5 @@ machine_common_init(const machine_t *model)
pic_init();
dma_init();
cpu_set();
pit_common_init(!!AT, pit_irq0_timer, NULL);
}

View File

@@ -75,7 +75,7 @@ const machine_t machines[] = {
{ "[8088] Juko XT clone", "jukopc", MACHINE_TYPE_8088, CPU_PKG_8088, 0, 0, 0, 0, 0, 0, 0, MACHINE_PC, 64, 640, 64, 0, machine_xt_jukopc_init, NULL },
{ "[8088] Multitech PC-700", "pc700", MACHINE_TYPE_8088, CPU_PKG_8088, 0, 0, 0, 0, 0, 0, 0, MACHINE_PC, 128, 640, 64, 0, machine_xt_pc700_init, NULL },
{ "[8088] NCR PC4i", "pc4i", MACHINE_TYPE_8088, CPU_PKG_8088, 0, 0, 0, 0, 0, 0, 0, MACHINE_PC, 256, 640, 256, 0, machine_xt_pc4i_init, NULL },
{ "[8088] Olivetti M19", "m19", MACHINE_TYPE_8088, CPU_PKG_8088, 0, 0, 0, 0, 0, 0, 0, MACHINE_PC | MACHINE_VIDEO_FIXED, 256, 640, 256, 0, machine_xt_m19_init, NULL },
{ "[8088] Olivetti M19", "m19", MACHINE_TYPE_8088, CPU_PKG_8088, 0, 4772728, 7159092, 0, 0, 0, 0, MACHINE_PC | MACHINE_VIDEO_FIXED, 256, 640, 256, 0, machine_xt_m19_init, m19_get_device },
{ "[8088] OpenXT", "openxt", MACHINE_TYPE_8088, CPU_PKG_8088, 0, 0, 0, 0, 0, 0, 0, MACHINE_PC, 64, 640, 64, 0, machine_xt_openxt_init, NULL },
{ "[8088] Philips P3105/NMS9100", "p3105", MACHINE_TYPE_8088, CPU_PKG_8088, 0, 0, 0, 0, 0, 0, 0, MACHINE_PC | MACHINE_XTA, 256, 768, 256, 0, machine_xt_p3105_init, NULL },
{ "[8088] Phoenix XT clone", "pxxt", MACHINE_TYPE_8088, CPU_PKG_8088, 0, 0, 0, 0, 0, 0, 0, MACHINE_PC, 64, 640, 64, 0, machine_xt_pxxt_init, NULL },