2018-09-03 13:55:09 +02:00
|
|
|
/*
|
|
|
|
|
* VARCem Virtual ARchaeological Computer EMulator.
|
|
|
|
|
* An emulator of (mostly) x86-based PC systems and devices,
|
|
|
|
|
* using the ISA,EISA,VLB,MCA and PCI system buses, roughly
|
|
|
|
|
* spanning the era between 1981 and 1995.
|
|
|
|
|
*
|
|
|
|
|
* This file is part of the VARCem Project.
|
|
|
|
|
*
|
|
|
|
|
* Implementation of MCA-based PS/2 machines.
|
|
|
|
|
*
|
2020-03-25 00:46:02 +02:00
|
|
|
*
|
2018-09-03 13:55:09 +02:00
|
|
|
*
|
|
|
|
|
* Authors: Fred N. van Kempen, <decwiz@yahoo.com>
|
|
|
|
|
* Miran Grca, <mgrca8@gmail.com>
|
|
|
|
|
* Sarah Walker, <tommowalker@tommowalker.co.uk>
|
|
|
|
|
*
|
2019-11-01 14:23:52 +01:00
|
|
|
* Copyright 2017-2019 Fred N. van Kempen.
|
|
|
|
|
* Copyright 2016-2019 Miran Grca.
|
|
|
|
|
* Copyright 2008-2019 Sarah Walker.
|
2018-09-03 13:55:09 +02:00
|
|
|
*
|
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
|
|
|
* (at your option) any later version.
|
|
|
|
|
*
|
|
|
|
|
* This program is distributed in the hope that it will be useful, but
|
|
|
|
|
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
|
* General Public License for more details.
|
|
|
|
|
*
|
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
|
* along with this program; if not, write to the:
|
|
|
|
|
*
|
|
|
|
|
* Free Software Foundation, Inc.
|
|
|
|
|
* 59 Temple Place - Suite 330
|
|
|
|
|
* Boston, MA 02111-1307
|
|
|
|
|
* USA.
|
|
|
|
|
*/
|
2018-05-21 19:04:05 +02:00
|
|
|
#include <stdarg.h>
|
2017-09-25 04:31:20 -04:00
|
|
|
#include <stdint.h>
|
2018-05-21 19:04:05 +02:00
|
|
|
#include <stdio.h>
|
2017-09-25 04:31:20 -04:00
|
|
|
#include <string.h>
|
|
|
|
|
#include <wchar.h>
|
2018-05-21 19:04:05 +02:00
|
|
|
#define HAVE_STDARG_H
|
2020-03-29 14:24:42 +02:00
|
|
|
#include <86box/86box.h>
|
2020-02-29 19:12:23 +01:00
|
|
|
#include "cpu.h"
|
|
|
|
|
#include "x86.h"
|
2020-03-29 14:24:42 +02:00
|
|
|
#include <86box/timer.h>
|
|
|
|
|
#include <86box/io.h>
|
|
|
|
|
#include <86box/dma.h>
|
|
|
|
|
#include <86box/pic.h>
|
|
|
|
|
#include <86box/pit.h>
|
|
|
|
|
#include <86box/mca.h>
|
|
|
|
|
#include <86box/mem.h>
|
|
|
|
|
#include <86box/nmi.h>
|
|
|
|
|
#include <86box/rom.h>
|
|
|
|
|
#include <86box/device.h>
|
|
|
|
|
#include <86box/fdd.h>
|
|
|
|
|
#include <86box/fdc.h>
|
2021-02-07 17:27:14 +02:00
|
|
|
#include <86box/fdc_ext.h>
|
2020-03-29 14:24:42 +02:00
|
|
|
#include <86box/nvr.h>
|
|
|
|
|
#include <86box/nvr_ps2.h>
|
|
|
|
|
#include <86box/keyboard.h>
|
|
|
|
|
#include <86box/lpt.h>
|
|
|
|
|
#include <86box/mouse.h>
|
2021-07-04 17:40:39 +02:00
|
|
|
#include <86box/port_6x.h>
|
2020-03-29 14:24:42 +02:00
|
|
|
#include <86box/port_92.h>
|
|
|
|
|
#include <86box/serial.h>
|
|
|
|
|
#include <86box/video.h>
|
|
|
|
|
#include <86box/machine.h>
|
2017-05-06 17:48:33 +02:00
|
|
|
|
2017-05-05 01:49:42 +02:00
|
|
|
|
|
|
|
|
static struct
|
|
|
|
|
{
|
|
|
|
|
uint8_t adapter_setup;
|
|
|
|
|
uint8_t option[4];
|
|
|
|
|
uint8_t pos_vga;
|
|
|
|
|
uint8_t setup;
|
|
|
|
|
uint8_t sys_ctrl_port_a;
|
|
|
|
|
uint8_t subaddr_lo, subaddr_hi;
|
|
|
|
|
|
|
|
|
|
uint8_t memory_bank[8];
|
2021-06-15 17:38:31 +02:00
|
|
|
|
2017-05-05 01:49:42 +02:00
|
|
|
uint8_t io_id;
|
2021-06-15 17:38:31 +02:00
|
|
|
uint16_t planar_id;
|
2017-05-05 01:49:42 +02:00
|
|
|
|
|
|
|
|
mem_mapping_t shadow_mapping;
|
2018-03-16 00:08:43 +01:00
|
|
|
mem_mapping_t split_mapping;
|
2017-05-05 01:49:42 +02:00
|
|
|
mem_mapping_t expansion_mapping;
|
2018-03-16 00:08:43 +01:00
|
|
|
mem_mapping_t cache_mapping;
|
2017-05-05 01:49:42 +02:00
|
|
|
|
|
|
|
|
uint8_t (*planar_read)(uint16_t port);
|
|
|
|
|
void (*planar_write)(uint16_t port, uint8_t val);
|
|
|
|
|
|
|
|
|
|
uint8_t mem_regs[3];
|
|
|
|
|
|
2017-12-11 19:41:58 +01:00
|
|
|
uint32_t split_addr, split_size;
|
2018-03-16 00:08:43 +01:00
|
|
|
uint32_t split_phys;
|
2017-05-05 01:49:42 +02:00
|
|
|
|
|
|
|
|
uint8_t mem_pos_regs[8];
|
2018-01-19 15:39:13 +01:00
|
|
|
uint8_t mem_2mb_pos_regs[8];
|
2018-03-11 18:26:44 +01:00
|
|
|
|
2018-03-16 00:08:43 +01:00
|
|
|
int pending_cache_miss;
|
2019-02-06 03:34:39 +01:00
|
|
|
|
|
|
|
|
serial_t *uart;
|
2017-05-05 01:49:42 +02:00
|
|
|
} ps2;
|
|
|
|
|
|
2018-03-11 18:26:44 +01:00
|
|
|
/*The model 70 type 3/4 BIOS performs cache testing. Since 86Box doesn't have any
|
|
|
|
|
proper cache emulation, it's faked a bit here.
|
|
|
|
|
|
|
|
|
|
Port E2 is used for cache diagnostics. Bit 7 seems to be set on a cache miss,
|
|
|
|
|
toggling bit 2 seems to clear this. The BIOS performs at least the following
|
|
|
|
|
tests :
|
|
|
|
|
|
|
|
|
|
- Disable RAM, access low 64kb (386) / 8kb (486), execute code from cache to
|
|
|
|
|
access low memory and verify that there are no cache misses.
|
|
|
|
|
- Write to low memory using DMA, read low memory and verify that all accesses
|
|
|
|
|
cause cache misses.
|
|
|
|
|
- Read low memory, verify that first access is cache miss. Read again and
|
|
|
|
|
verify that second access is cache hit.
|
|
|
|
|
|
|
|
|
|
These tests are also performed on the 486 model 70, despite there being no
|
|
|
|
|
external cache on this system. Port E2 seems to control the internal cache on
|
|
|
|
|
these systems. Presumably this port is connected to KEN#/FLUSH# on the 486.
|
|
|
|
|
This behaviour is required to pass the timer interrupt test on the 486 version
|
|
|
|
|
- the BIOS uses a fixed length loop that will terminate too early on a 486/25
|
|
|
|
|
if it executes from internal cache.
|
|
|
|
|
|
|
|
|
|
To handle this, 86Box uses some basic heuristics :
|
|
|
|
|
- If cache is enabled but RAM is disabled, accesses to low memory go directly
|
|
|
|
|
to cache memory.
|
|
|
|
|
- Reads to cache addresses not 'valid' will set the cache miss flag, and mark
|
|
|
|
|
that line as valid.
|
|
|
|
|
- Cache flushes will clear the valid array.
|
|
|
|
|
- DMA via the undocumented PS/2 command 0xb will clear the valid array.
|
|
|
|
|
- Disabling the cache will clear the valid array.
|
|
|
|
|
- Disabling the cache will also mark shadowed ROM areas as using ROM timings.
|
|
|
|
|
This works around the timing loop mentioned above.
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
static uint8_t ps2_cache[65536];
|
|
|
|
|
static int ps2_cache_valid[65536/8];
|
|
|
|
|
|
2018-05-21 19:04:05 +02:00
|
|
|
|
|
|
|
|
#ifdef ENABLE_PS2_MCA_LOG
|
|
|
|
|
int ps2_mca_do_log = ENABLE_PS2_MCA_LOG;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
static void
|
2018-10-22 04:22:00 +02:00
|
|
|
ps2_mca_log(const char *fmt, ...)
|
2018-05-21 19:04:05 +02:00
|
|
|
{
|
|
|
|
|
va_list ap;
|
|
|
|
|
|
|
|
|
|
if (ps2_mca_do_log) {
|
2018-10-22 04:22:00 +02:00
|
|
|
va_start(ap, fmt);
|
|
|
|
|
pclog_ex(fmt, ap);
|
2018-05-21 19:04:05 +02:00
|
|
|
va_end(ap);
|
|
|
|
|
}
|
|
|
|
|
}
|
2018-10-22 04:22:00 +02:00
|
|
|
#else
|
|
|
|
|
#define ps2_mca_log(fmt, ...)
|
|
|
|
|
#endif
|
2018-05-21 19:04:05 +02:00
|
|
|
|
|
|
|
|
|
2018-03-11 18:26:44 +01:00
|
|
|
static uint8_t ps2_read_cache_ram(uint32_t addr, void *priv)
|
|
|
|
|
{
|
2018-05-21 19:04:05 +02:00
|
|
|
ps2_mca_log("ps2_read_cache_ram: addr=%08x %i %04x:%04x\n", addr, ps2_cache_valid[addr >> 3], CS,cpu_state.pc);
|
2018-03-11 18:26:44 +01:00
|
|
|
if (!ps2_cache_valid[addr >> 3])
|
|
|
|
|
{
|
|
|
|
|
ps2_cache_valid[addr >> 3] = 1;
|
|
|
|
|
ps2.mem_regs[2] |= 0x80;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
ps2.pending_cache_miss = 0;
|
|
|
|
|
|
|
|
|
|
return ps2_cache[addr];
|
|
|
|
|
}
|
|
|
|
|
static uint16_t ps2_read_cache_ramw(uint32_t addr, void *priv)
|
|
|
|
|
{
|
2018-05-21 19:04:05 +02:00
|
|
|
ps2_mca_log("ps2_read_cache_ramw: addr=%08x %i %04x:%04x\n", addr, ps2_cache_valid[addr >> 3], CS,cpu_state.pc);
|
2018-03-11 18:26:44 +01:00
|
|
|
if (!ps2_cache_valid[addr >> 3])
|
|
|
|
|
{
|
|
|
|
|
ps2_cache_valid[addr >> 3] = 1;
|
|
|
|
|
ps2.mem_regs[2] |= 0x80;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
ps2.pending_cache_miss = 0;
|
|
|
|
|
|
|
|
|
|
return *(uint16_t *)&ps2_cache[addr];
|
|
|
|
|
}
|
|
|
|
|
static uint32_t ps2_read_cache_raml(uint32_t addr, void *priv)
|
|
|
|
|
{
|
2018-05-21 19:04:05 +02:00
|
|
|
ps2_mca_log("ps2_read_cache_raml: addr=%08x %i %04x:%04x\n", addr, ps2_cache_valid[addr >> 3], CS,cpu_state.pc);
|
2018-03-11 18:26:44 +01:00
|
|
|
if (!ps2_cache_valid[addr >> 3])
|
|
|
|
|
{
|
|
|
|
|
ps2_cache_valid[addr >> 3] = 1;
|
|
|
|
|
ps2.mem_regs[2] |= 0x80;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
ps2.pending_cache_miss = 0;
|
|
|
|
|
|
|
|
|
|
return *(uint32_t *)&ps2_cache[addr];
|
|
|
|
|
}
|
|
|
|
|
static void ps2_write_cache_ram(uint32_t addr, uint8_t val, void *priv)
|
|
|
|
|
{
|
2018-05-21 19:04:05 +02:00
|
|
|
ps2_mca_log("ps2_write_cache_ram: addr=%08x val=%02x %04x:%04x %i\n", addr, val, CS,cpu_state.pc, ins);
|
2018-03-11 18:26:44 +01:00
|
|
|
ps2_cache[addr] = val;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void ps2_cache_clean(void)
|
|
|
|
|
{
|
|
|
|
|
memset(ps2_cache_valid, 0, sizeof(ps2_cache_valid));
|
|
|
|
|
}
|
2017-05-05 01:49:42 +02:00
|
|
|
|
|
|
|
|
static uint8_t ps2_read_shadow_ram(uint32_t addr, void *priv)
|
|
|
|
|
{
|
|
|
|
|
addr = (addr & 0x1ffff) + 0xe0000;
|
|
|
|
|
return mem_read_ram(addr, priv);
|
|
|
|
|
}
|
|
|
|
|
static uint16_t ps2_read_shadow_ramw(uint32_t addr, void *priv)
|
|
|
|
|
{
|
|
|
|
|
addr = (addr & 0x1ffff) + 0xe0000;
|
|
|
|
|
return mem_read_ramw(addr, priv);
|
|
|
|
|
}
|
|
|
|
|
static uint32_t ps2_read_shadow_raml(uint32_t addr, void *priv)
|
|
|
|
|
{
|
|
|
|
|
addr = (addr & 0x1ffff) + 0xe0000;
|
|
|
|
|
return mem_read_raml(addr, priv);
|
|
|
|
|
}
|
|
|
|
|
static void ps2_write_shadow_ram(uint32_t addr, uint8_t val, void *priv)
|
|
|
|
|
{
|
|
|
|
|
addr = (addr & 0x1ffff) + 0xe0000;
|
|
|
|
|
mem_write_ram(addr, val, priv);
|
|
|
|
|
}
|
|
|
|
|
static void ps2_write_shadow_ramw(uint32_t addr, uint16_t val, void *priv)
|
|
|
|
|
{
|
|
|
|
|
addr = (addr & 0x1ffff) + 0xe0000;
|
|
|
|
|
mem_write_ramw(addr, val, priv);
|
|
|
|
|
}
|
|
|
|
|
static void ps2_write_shadow_raml(uint32_t addr, uint32_t val, void *priv)
|
|
|
|
|
{
|
|
|
|
|
addr = (addr & 0x1ffff) + 0xe0000;
|
|
|
|
|
mem_write_raml(addr, val, priv);
|
|
|
|
|
}
|
|
|
|
|
|
2018-03-16 00:08:43 +01:00
|
|
|
static uint8_t ps2_read_split_ram(uint32_t addr, void *priv)
|
|
|
|
|
{
|
|
|
|
|
addr = (addr % (ps2.split_size << 10)) + ps2.split_phys;
|
|
|
|
|
return mem_read_ram(addr, priv);
|
|
|
|
|
}
|
|
|
|
|
static uint16_t ps2_read_split_ramw(uint32_t addr, void *priv)
|
|
|
|
|
{
|
|
|
|
|
addr = (addr % (ps2.split_size << 10)) + ps2.split_phys;
|
|
|
|
|
return mem_read_ramw(addr, priv);
|
|
|
|
|
}
|
|
|
|
|
static uint32_t ps2_read_split_raml(uint32_t addr, void *priv)
|
|
|
|
|
{
|
|
|
|
|
addr = (addr % (ps2.split_size << 10)) + ps2.split_phys;
|
|
|
|
|
return mem_read_raml(addr, priv);
|
|
|
|
|
}
|
|
|
|
|
static void ps2_write_split_ram(uint32_t addr, uint8_t val, void *priv)
|
|
|
|
|
{
|
|
|
|
|
addr = (addr % (ps2.split_size << 10)) + ps2.split_phys;
|
|
|
|
|
mem_write_ram(addr, val, priv);
|
|
|
|
|
}
|
|
|
|
|
static void ps2_write_split_ramw(uint32_t addr, uint16_t val, void *priv)
|
|
|
|
|
{
|
|
|
|
|
addr = (addr % (ps2.split_size << 10)) + ps2.split_phys;
|
|
|
|
|
mem_write_ramw(addr, val, priv);
|
|
|
|
|
}
|
|
|
|
|
static void ps2_write_split_raml(uint32_t addr, uint32_t val, void *priv)
|
|
|
|
|
{
|
|
|
|
|
addr = (addr % (ps2.split_size << 10)) + ps2.split_phys;
|
|
|
|
|
mem_write_raml(addr, val, priv);
|
|
|
|
|
}
|
|
|
|
|
|
2017-05-05 01:49:42 +02:00
|
|
|
|
|
|
|
|
#define PS2_SETUP_IO 0x80
|
|
|
|
|
#define PS2_SETUP_VGA 0x20
|
|
|
|
|
|
|
|
|
|
#define PS2_ADAPTER_SETUP 0x08
|
|
|
|
|
|
|
|
|
|
static uint8_t model_50_read(uint16_t port)
|
|
|
|
|
{
|
|
|
|
|
switch (port)
|
|
|
|
|
{
|
|
|
|
|
case 0x100:
|
|
|
|
|
return 0xff;
|
|
|
|
|
case 0x101:
|
|
|
|
|
return 0xfb;
|
|
|
|
|
case 0x102:
|
|
|
|
|
return ps2.option[0];
|
|
|
|
|
case 0x103:
|
|
|
|
|
return ps2.option[1];
|
|
|
|
|
case 0x104:
|
|
|
|
|
return ps2.option[2];
|
|
|
|
|
case 0x105:
|
|
|
|
|
return ps2.option[3];
|
|
|
|
|
case 0x106:
|
|
|
|
|
return ps2.subaddr_lo;
|
|
|
|
|
case 0x107:
|
|
|
|
|
return ps2.subaddr_hi;
|
|
|
|
|
}
|
|
|
|
|
return 0xff;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static uint8_t model_55sx_read(uint16_t port)
|
|
|
|
|
{
|
|
|
|
|
switch (port)
|
|
|
|
|
{
|
|
|
|
|
case 0x100:
|
|
|
|
|
return 0xff;
|
|
|
|
|
case 0x101:
|
|
|
|
|
return 0xfb;
|
|
|
|
|
case 0x102:
|
|
|
|
|
return ps2.option[0];
|
|
|
|
|
case 0x103:
|
|
|
|
|
return ps2.option[1];
|
|
|
|
|
case 0x104:
|
|
|
|
|
return ps2.memory_bank[ps2.option[3] & 7];
|
|
|
|
|
case 0x105:
|
|
|
|
|
return ps2.option[3];
|
|
|
|
|
case 0x106:
|
|
|
|
|
return ps2.subaddr_lo;
|
|
|
|
|
case 0x107:
|
|
|
|
|
return ps2.subaddr_hi;
|
|
|
|
|
}
|
|
|
|
|
return 0xff;
|
|
|
|
|
}
|
|
|
|
|
|
2018-03-11 18:26:44 +01:00
|
|
|
static uint8_t model_70_type3_read(uint16_t port)
|
|
|
|
|
{
|
|
|
|
|
switch (port)
|
|
|
|
|
{
|
|
|
|
|
case 0x100:
|
2021-06-15 17:38:31 +02:00
|
|
|
return ps2.planar_id & 0xff;
|
2018-03-11 18:26:44 +01:00
|
|
|
case 0x101:
|
2021-06-15 17:38:31 +02:00
|
|
|
return ps2.planar_id >> 8;
|
2018-03-11 18:26:44 +01:00
|
|
|
case 0x102:
|
|
|
|
|
return ps2.option[0];
|
|
|
|
|
case 0x103:
|
|
|
|
|
return ps2.option[1];
|
|
|
|
|
case 0x104:
|
|
|
|
|
return ps2.option[2];
|
|
|
|
|
case 0x105:
|
|
|
|
|
return ps2.option[3];
|
|
|
|
|
case 0x106:
|
|
|
|
|
return ps2.subaddr_lo;
|
|
|
|
|
case 0x107:
|
|
|
|
|
return ps2.subaddr_hi;
|
|
|
|
|
}
|
|
|
|
|
return 0xff;
|
|
|
|
|
}
|
|
|
|
|
|
2017-05-05 01:49:42 +02:00
|
|
|
static uint8_t model_80_read(uint16_t port)
|
|
|
|
|
{
|
|
|
|
|
switch (port)
|
|
|
|
|
{
|
|
|
|
|
case 0x100:
|
|
|
|
|
return 0xff;
|
|
|
|
|
case 0x101:
|
|
|
|
|
return 0xfd;
|
|
|
|
|
case 0x102:
|
|
|
|
|
return ps2.option[0];
|
|
|
|
|
case 0x103:
|
|
|
|
|
return ps2.option[1];
|
|
|
|
|
case 0x104:
|
|
|
|
|
return ps2.option[2];
|
|
|
|
|
case 0x105:
|
|
|
|
|
return ps2.option[3];
|
|
|
|
|
case 0x106:
|
|
|
|
|
return ps2.subaddr_lo;
|
|
|
|
|
case 0x107:
|
|
|
|
|
return ps2.subaddr_hi;
|
|
|
|
|
}
|
|
|
|
|
return 0xff;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void model_50_write(uint16_t port, uint8_t val)
|
|
|
|
|
{
|
|
|
|
|
switch (port)
|
|
|
|
|
{
|
|
|
|
|
case 0x100:
|
|
|
|
|
ps2.io_id = val;
|
|
|
|
|
break;
|
|
|
|
|
case 0x101:
|
|
|
|
|
break;
|
|
|
|
|
case 0x102:
|
|
|
|
|
lpt1_remove();
|
2019-02-06 03:34:39 +01:00
|
|
|
serial_remove(ps2.uart);
|
2017-05-05 01:49:42 +02:00
|
|
|
if (val & 0x04)
|
|
|
|
|
{
|
|
|
|
|
if (val & 0x08)
|
2019-02-06 03:34:39 +01:00
|
|
|
serial_setup(ps2.uart, SERIAL1_ADDR, SERIAL1_IRQ);
|
2017-05-05 01:49:42 +02:00
|
|
|
else
|
2019-02-06 03:34:39 +01:00
|
|
|
serial_setup(ps2.uart, SERIAL2_ADDR, SERIAL2_IRQ);
|
2017-05-05 01:49:42 +02:00
|
|
|
}
|
|
|
|
|
if (val & 0x10)
|
|
|
|
|
{
|
|
|
|
|
switch ((val >> 5) & 3)
|
|
|
|
|
{
|
|
|
|
|
case 0:
|
|
|
|
|
lpt1_init(0x3bc);
|
|
|
|
|
break;
|
|
|
|
|
case 1:
|
|
|
|
|
lpt1_init(0x378);
|
|
|
|
|
break;
|
|
|
|
|
case 2:
|
|
|
|
|
lpt1_init(0x278);
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
ps2.option[0] = val;
|
|
|
|
|
break;
|
|
|
|
|
case 0x103:
|
|
|
|
|
ps2.option[1] = val;
|
|
|
|
|
break;
|
|
|
|
|
case 0x104:
|
|
|
|
|
ps2.option[2] = val;
|
|
|
|
|
break;
|
|
|
|
|
case 0x105:
|
|
|
|
|
ps2.option[3] = val;
|
|
|
|
|
break;
|
|
|
|
|
case 0x106:
|
|
|
|
|
ps2.subaddr_lo = val;
|
|
|
|
|
break;
|
|
|
|
|
case 0x107:
|
|
|
|
|
ps2.subaddr_hi = val;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void model_55sx_write(uint16_t port, uint8_t val)
|
|
|
|
|
{
|
2021-12-06 22:33:52 +01:00
|
|
|
int remap_size;
|
|
|
|
|
|
2017-05-05 01:49:42 +02:00
|
|
|
switch (port)
|
|
|
|
|
{
|
|
|
|
|
case 0x100:
|
|
|
|
|
ps2.io_id = val;
|
|
|
|
|
break;
|
|
|
|
|
case 0x101:
|
|
|
|
|
break;
|
|
|
|
|
case 0x102:
|
|
|
|
|
lpt1_remove();
|
2019-02-06 03:34:39 +01:00
|
|
|
serial_remove(ps2.uart);
|
2017-05-05 01:49:42 +02:00
|
|
|
if (val & 0x04)
|
|
|
|
|
{
|
|
|
|
|
if (val & 0x08)
|
2019-02-06 03:34:39 +01:00
|
|
|
serial_setup(ps2.uart, SERIAL1_ADDR, SERIAL1_IRQ);
|
2017-05-05 01:49:42 +02:00
|
|
|
else
|
2019-02-06 03:34:39 +01:00
|
|
|
serial_setup(ps2.uart, SERIAL2_ADDR, SERIAL2_IRQ);
|
2017-05-05 01:49:42 +02:00
|
|
|
}
|
|
|
|
|
if (val & 0x10)
|
|
|
|
|
{
|
|
|
|
|
switch ((val >> 5) & 3)
|
|
|
|
|
{
|
|
|
|
|
case 0:
|
|
|
|
|
lpt1_init(0x3bc);
|
|
|
|
|
break;
|
|
|
|
|
case 1:
|
|
|
|
|
lpt1_init(0x378);
|
|
|
|
|
break;
|
|
|
|
|
case 2:
|
|
|
|
|
lpt1_init(0x278);
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
ps2.option[0] = val;
|
|
|
|
|
break;
|
|
|
|
|
case 0x103:
|
|
|
|
|
ps2.option[1] = val;
|
|
|
|
|
break;
|
|
|
|
|
case 0x104:
|
|
|
|
|
ps2.memory_bank[ps2.option[3] & 7] &= ~0xf;
|
|
|
|
|
ps2.memory_bank[ps2.option[3] & 7] |= (val & 0xf);
|
2018-05-21 19:04:05 +02:00
|
|
|
ps2_mca_log("Write memory bank %i %02x\n", ps2.option[3] & 7, val);
|
2017-05-05 01:49:42 +02:00
|
|
|
break;
|
|
|
|
|
case 0x105:
|
2018-05-21 19:04:05 +02:00
|
|
|
ps2_mca_log("Write POS3 %02x\n", val);
|
2017-05-05 01:49:42 +02:00
|
|
|
ps2.option[3] = val;
|
2021-12-06 22:33:52 +01:00
|
|
|
shadowbios = !(val & 0x10) && !(val & 0x20);
|
|
|
|
|
shadowbios_write = (val & 0x10) && !(val & 0x20);
|
2017-05-05 01:49:42 +02:00
|
|
|
|
|
|
|
|
if (shadowbios)
|
|
|
|
|
{
|
|
|
|
|
mem_set_mem_state(0xe0000, 0x20000, MEM_READ_INTERNAL | MEM_WRITE_DISABLED);
|
|
|
|
|
mem_mapping_disable(&ps2.shadow_mapping);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
2021-12-06 22:33:52 +01:00
|
|
|
mem_set_mem_state(0xe0000, 0x20000, MEM_READ_EXTANY | MEM_WRITE_DISABLED);
|
2017-05-05 01:49:42 +02:00
|
|
|
mem_mapping_enable(&ps2.shadow_mapping);
|
|
|
|
|
}
|
|
|
|
|
|
2021-12-06 22:33:52 +01:00
|
|
|
remap_size = (val & 0x10) ? 384 : 256;
|
2021-12-06 22:36:42 +01:00
|
|
|
mem_set_mem_state(mem_size * 1024, 384 * 1024, MEM_READ_EXTANY | MEM_WRITE_EXTANY);
|
2021-12-06 22:33:52 +01:00
|
|
|
|
|
|
|
|
if (val & 0x20)
|
|
|
|
|
mem_set_mem_state(mem_size * 1024, remap_size * 1024, MEM_READ_EXTANY | MEM_WRITE_EXTANY);
|
2017-05-05 01:49:42 +02:00
|
|
|
else
|
2021-12-06 22:33:52 +01:00
|
|
|
mem_set_mem_state(mem_size * 1024, remap_size * 1024, MEM_READ_INTERNAL | MEM_WRITE_INTERNAL);
|
2021-11-20 10:32:02 +01:00
|
|
|
|
|
|
|
|
flushmmucache_nopc();
|
2017-05-05 01:49:42 +02:00
|
|
|
break;
|
|
|
|
|
case 0x106:
|
|
|
|
|
ps2.subaddr_lo = val;
|
|
|
|
|
break;
|
|
|
|
|
case 0x107:
|
|
|
|
|
ps2.subaddr_hi = val;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2018-03-11 18:26:44 +01:00
|
|
|
static void model_70_type3_write(uint16_t port, uint8_t val)
|
|
|
|
|
{
|
|
|
|
|
switch (port)
|
|
|
|
|
{
|
|
|
|
|
case 0x100:
|
|
|
|
|
break;
|
|
|
|
|
case 0x101:
|
|
|
|
|
break;
|
|
|
|
|
case 0x102:
|
|
|
|
|
lpt1_remove();
|
2019-02-06 03:34:39 +01:00
|
|
|
serial_remove(ps2.uart);
|
2018-03-11 18:26:44 +01:00
|
|
|
if (val & 0x04)
|
|
|
|
|
{
|
|
|
|
|
if (val & 0x08)
|
2019-02-06 03:34:39 +01:00
|
|
|
serial_setup(ps2.uart, SERIAL1_ADDR, SERIAL1_IRQ);
|
2018-03-11 18:26:44 +01:00
|
|
|
else
|
2019-02-06 03:34:39 +01:00
|
|
|
serial_setup(ps2.uart, SERIAL2_ADDR, SERIAL2_IRQ);
|
2018-03-11 18:26:44 +01:00
|
|
|
}
|
|
|
|
|
if (val & 0x10)
|
|
|
|
|
{
|
|
|
|
|
switch ((val >> 5) & 3)
|
|
|
|
|
{
|
|
|
|
|
case 0:
|
|
|
|
|
lpt1_init(0x3bc);
|
|
|
|
|
break;
|
|
|
|
|
case 1:
|
|
|
|
|
lpt1_init(0x378);
|
|
|
|
|
break;
|
|
|
|
|
case 2:
|
|
|
|
|
lpt1_init(0x278);
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
ps2.option[0] = val;
|
|
|
|
|
break;
|
2021-06-15 17:38:31 +02:00
|
|
|
case 0x103:
|
|
|
|
|
if (ps2.planar_id == 0xfff9)
|
|
|
|
|
ps2.option[1] = (ps2.option[1] & 0x0f) | (val & 0xf0);
|
|
|
|
|
break;
|
|
|
|
|
case 0x104:
|
|
|
|
|
if (ps2.planar_id == 0xfff9)
|
|
|
|
|
ps2.option[2] = val;
|
|
|
|
|
break;
|
2018-03-11 18:26:44 +01:00
|
|
|
case 0x105:
|
|
|
|
|
ps2.option[3] = val;
|
|
|
|
|
break;
|
|
|
|
|
case 0x106:
|
|
|
|
|
ps2.subaddr_lo = val;
|
|
|
|
|
break;
|
|
|
|
|
case 0x107:
|
|
|
|
|
ps2.subaddr_hi = val;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2017-05-05 01:49:42 +02:00
|
|
|
static void model_80_write(uint16_t port, uint8_t val)
|
|
|
|
|
{
|
|
|
|
|
switch (port)
|
|
|
|
|
{
|
|
|
|
|
case 0x100:
|
|
|
|
|
break;
|
|
|
|
|
case 0x101:
|
|
|
|
|
break;
|
|
|
|
|
case 0x102:
|
|
|
|
|
lpt1_remove();
|
2019-02-06 03:34:39 +01:00
|
|
|
serial_remove(ps2.uart);
|
2017-05-05 01:49:42 +02:00
|
|
|
if (val & 0x04)
|
|
|
|
|
{
|
|
|
|
|
if (val & 0x08)
|
2019-02-06 03:34:39 +01:00
|
|
|
serial_setup(ps2.uart, SERIAL1_ADDR, SERIAL1_IRQ);
|
2017-05-05 01:49:42 +02:00
|
|
|
else
|
2019-02-06 03:34:39 +01:00
|
|
|
serial_setup(ps2.uart, SERIAL2_ADDR, SERIAL2_IRQ);
|
2017-05-05 01:49:42 +02:00
|
|
|
}
|
|
|
|
|
if (val & 0x10)
|
|
|
|
|
{
|
|
|
|
|
switch ((val >> 5) & 3)
|
|
|
|
|
{
|
|
|
|
|
case 0:
|
|
|
|
|
lpt1_init(0x3bc);
|
|
|
|
|
break;
|
|
|
|
|
case 1:
|
|
|
|
|
lpt1_init(0x378);
|
|
|
|
|
break;
|
|
|
|
|
case 2:
|
|
|
|
|
lpt1_init(0x278);
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
ps2.option[0] = val;
|
|
|
|
|
break;
|
|
|
|
|
case 0x103:
|
|
|
|
|
ps2.option[1] = (ps2.option[1] & 0x0f) | (val & 0xf0);
|
|
|
|
|
break;
|
|
|
|
|
case 0x104:
|
|
|
|
|
ps2.option[2] = val;
|
|
|
|
|
break;
|
|
|
|
|
case 0x105:
|
|
|
|
|
ps2.option[3] = val;
|
|
|
|
|
break;
|
|
|
|
|
case 0x106:
|
|
|
|
|
ps2.subaddr_lo = val;
|
|
|
|
|
break;
|
|
|
|
|
case 0x107:
|
|
|
|
|
ps2.subaddr_hi = val;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
uint8_t ps2_mca_read(uint16_t port, void *p)
|
|
|
|
|
{
|
|
|
|
|
uint8_t temp;
|
|
|
|
|
|
|
|
|
|
switch (port)
|
|
|
|
|
{
|
|
|
|
|
case 0x91:
|
Added the IBM 5161 ISA expansion for PC and XT;
Cleaned up the parallel port emulation, added IRQ support, and made enabling/disabling per port;
Added the Award 430NX and the Intel Classic/PCI (Alfredo, 420TX);
Finished the 586MC1;
Added 8087 emulation;
Moved Cyrix 6x86'es to the Dev branch;
Sanitized/cleaned up memregs.c/h and intel.c/h;
Split the chipsets from machines and sanitized Port 92 emulation;
Added support for the 15bpp mode to the Compaq ATI 28800;
Moved the MR 386DX and 486 machines to the Dev branch;
Ported the new dynamic recompiler from PCem, but it remains in Dev branch until after v2.00;
Ported the new timer code from PCem;
Cleaned up the CPU table of unused stuff and better optimized its structure;
Ported the Open-XT and Open-AT from VARCem, the Open-AT is in the Dev branch;
Ported the XT MFM controller rewrite and adding of more controllers (incl. two RLL ones), from VARCem;
Added the AHA-1540A and the BusTek BT-542B;
Moved the Sumo SCSI-AT to the Dev branch;
Minor IDE, FDC, and floppy drive code clean-ups;
Made NCR 5380/53C400-based cards' BIOS address configurable;
Got rid of the legacy romset variable;
Unified (video) buffer and buffer32 into one and make the unified buffer 32-bit;
Added the Amstead PPC512 per PCem patch by John Elliott;
Switched memory mapping granularity from 16k to 4k (less than 1k not possible due to internal pages);
Rewrote the CL-GD 54xx blitter, fixes Win-OS/2 on the 54x6 among other thing;
Added the Image Manager 1024 and Professional Graphics Controller per PCem patch by John Elliott and work done on VARCem;
Added Headland HT-216, GC-205 and Video 7 VGA 1024i emulation based on PCem commit;
Implemented the fuction keys for the Toshiba T1000/T1200/T3100 enhancement;
Amstrad MegaPC does now works correctly with non-internal graphics card;
The SLiRP code no longer casts a packed struct type to a non-packed struct type;
The Xi8088 and PB410a no longer hang on 86Box when PS/2 mouse is not present;
The S3 Virge on BeOS is no longer broken (was broken by build #1591);
OS/2 2.0 build 6.167 now sees key presses again;
Xi8088 now work on CGA again;
86F images converted from either the old or new variants of the HxC MFM format now work correctly;
Hardware interrupts with a vector of 0xFF are now handled correctly;
OPTi 495SX boards no longer incorrectly have 64 MB maximum RAM when 32 MB is correct;
Fixed VNC keyboard input bugs;
Fixed AT RTC periodic interrupt - Chicago 58s / 73f / 73g / 81 MIDI play no longer hangs with the build's own VTD driver;
Fixed mouse polling with internal mice - Amstrad and Olivetti mice now work correctly;
Triones ATAPI DMA driver now correctly reads a file at the end of a CD image with a sectors number not divisible by 4;
Compaq Portable now works with all graphics cards;
Fixed various MDSI Genius bugs;
Added segment limit checks and improved page fault checks for several CPU instructions - Memphis 15xx WINSETUP and Chicago 58s WINDISK.CPL no longer issue a GPF, and some S3 drivers that used to have glitches, now work correctly;
Further improved the 808x emulation, also fixes the noticably choppy sound when using 808x CPU's, also fixes #355;
OS/2 installer no logner locks up on splash screen on PS/2 Model 70 and 80, fixes #400.
Fixed several Amstead bugs, GEM no longer crashes on the Amstrad 1640, fixes #391.
Ported John Elliott's Amstrad fixes and improvement from PCem, and fixed the default language so it's correctly Engliish, fixes #278, fixes #389.
Fixed a minor IDE timing bug, fixes #388.
Fixed Toshiba T1000 RAM issues, fixes #379.
Fixed EGA/(S)VGA overscan border handling, fixes #378;
Got rid of the now long useless IDE channel 2 auto-removal, fixes #370;
Fixed the BIOS files used by the AMSTRAD PC1512, fixes #366;
Ported the Unicode CD image file name fix from VARCem, fixes #365;
Fixed high density floppy disks on the Xi8088, fixes #359;
Fixed some bugs in the Hercules emulation, fixes #346, fixes #358;
Fixed the SCSI hard disk mode sense pages, fixes #356;
Removed the AMI Unknown 386SX because of impossibility to identify the chipset, closes #349;
Fixed bugs in the serial mouse emulation, fixes #344;
Compiled 86Box binaries now include all the required .DLL's, fixes #341;
Made some combo boxes in the Settings dialog slightly wider, fixes #276.
2019-09-20 14:02:30 +02:00
|
|
|
// fatal("Read 91 setup=%02x adapter=%02x\n", ps2.setup, ps2.adapter_setup);
|
|
|
|
|
if (!(ps2.setup & PS2_SETUP_IO))
|
|
|
|
|
temp = 0x00;
|
|
|
|
|
else if (!(ps2.setup & PS2_SETUP_VGA))
|
|
|
|
|
temp = 0x00;
|
|
|
|
|
else if (ps2.adapter_setup & PS2_ADAPTER_SETUP)
|
|
|
|
|
temp = 0x00;
|
|
|
|
|
else
|
|
|
|
|
temp = !mca_feedb();
|
|
|
|
|
temp |= 0xfe;
|
|
|
|
|
break;
|
2017-05-05 01:49:42 +02:00
|
|
|
case 0x94:
|
|
|
|
|
temp = ps2.setup;
|
|
|
|
|
break;
|
|
|
|
|
case 0x96:
|
|
|
|
|
temp = ps2.adapter_setup | 0x70;
|
|
|
|
|
break;
|
|
|
|
|
case 0x100:
|
|
|
|
|
if (!(ps2.setup & PS2_SETUP_IO))
|
|
|
|
|
temp = ps2.planar_read(port);
|
|
|
|
|
else if (!(ps2.setup & PS2_SETUP_VGA))
|
|
|
|
|
temp = 0xfd;
|
|
|
|
|
else if (ps2.adapter_setup & PS2_ADAPTER_SETUP)
|
|
|
|
|
temp = mca_read(port);
|
|
|
|
|
else
|
|
|
|
|
temp = 0xff;
|
|
|
|
|
break;
|
|
|
|
|
case 0x101:
|
|
|
|
|
if (!(ps2.setup & PS2_SETUP_IO))
|
|
|
|
|
temp = ps2.planar_read(port);
|
|
|
|
|
else if (!(ps2.setup & PS2_SETUP_VGA))
|
|
|
|
|
temp = 0xef;
|
|
|
|
|
else if (ps2.adapter_setup & PS2_ADAPTER_SETUP)
|
|
|
|
|
temp = mca_read(port);
|
|
|
|
|
else
|
|
|
|
|
temp = 0xff;
|
|
|
|
|
break;
|
|
|
|
|
case 0x102:
|
|
|
|
|
if (!(ps2.setup & PS2_SETUP_IO))
|
|
|
|
|
temp = ps2.planar_read(port);
|
|
|
|
|
else if (!(ps2.setup & PS2_SETUP_VGA))
|
|
|
|
|
temp = ps2.pos_vga;
|
2021-06-15 17:38:31 +02:00
|
|
|
else if (ps2.adapter_setup & PS2_ADAPTER_SETUP)
|
2017-05-05 01:49:42 +02:00
|
|
|
temp = mca_read(port);
|
|
|
|
|
else
|
|
|
|
|
temp = 0xff;
|
|
|
|
|
break;
|
|
|
|
|
case 0x103:
|
|
|
|
|
if (!(ps2.setup & PS2_SETUP_IO))
|
|
|
|
|
temp = ps2.planar_read(port);
|
|
|
|
|
else if ((ps2.setup & PS2_SETUP_VGA) && (ps2.adapter_setup & PS2_ADAPTER_SETUP))
|
|
|
|
|
temp = mca_read(port);
|
|
|
|
|
else
|
|
|
|
|
temp = 0xff;
|
|
|
|
|
break;
|
|
|
|
|
case 0x104:
|
|
|
|
|
if (!(ps2.setup & PS2_SETUP_IO))
|
|
|
|
|
temp = ps2.planar_read(port);
|
|
|
|
|
else if ((ps2.setup & PS2_SETUP_VGA) && (ps2.adapter_setup & PS2_ADAPTER_SETUP))
|
|
|
|
|
temp = mca_read(port);
|
|
|
|
|
else
|
|
|
|
|
temp = 0xff;
|
|
|
|
|
break;
|
|
|
|
|
case 0x105:
|
|
|
|
|
if (!(ps2.setup & PS2_SETUP_IO))
|
|
|
|
|
temp = ps2.planar_read(port);
|
|
|
|
|
else if ((ps2.setup & PS2_SETUP_VGA) && (ps2.adapter_setup & PS2_ADAPTER_SETUP))
|
|
|
|
|
temp = mca_read(port);
|
|
|
|
|
else
|
|
|
|
|
temp = 0xff;
|
|
|
|
|
break;
|
|
|
|
|
case 0x106:
|
|
|
|
|
if (!(ps2.setup & PS2_SETUP_IO))
|
|
|
|
|
temp = ps2.planar_read(port);
|
|
|
|
|
else if ((ps2.setup & PS2_SETUP_VGA) && (ps2.adapter_setup & PS2_ADAPTER_SETUP))
|
|
|
|
|
temp = mca_read(port);
|
|
|
|
|
else
|
|
|
|
|
temp = 0xff;
|
|
|
|
|
break;
|
|
|
|
|
case 0x107:
|
|
|
|
|
if (!(ps2.setup & PS2_SETUP_IO))
|
|
|
|
|
temp = ps2.planar_read(port);
|
|
|
|
|
else if ((ps2.setup & PS2_SETUP_VGA) && (ps2.adapter_setup & PS2_ADAPTER_SETUP))
|
|
|
|
|
temp = mca_read(port);
|
|
|
|
|
else
|
|
|
|
|
temp = 0xff;
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
default:
|
|
|
|
|
temp = 0xff;
|
|
|
|
|
break;
|
|
|
|
|
}
|
2018-01-04 07:44:33 +01:00
|
|
|
|
2018-05-21 19:04:05 +02:00
|
|
|
ps2_mca_log("ps2_read: port=%04x temp=%02x\n", port, temp);
|
|
|
|
|
|
|
|
|
|
return temp;
|
2017-05-05 01:49:42 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void ps2_mca_write(uint16_t port, uint8_t val, void *p)
|
|
|
|
|
{
|
2018-05-21 19:04:05 +02:00
|
|
|
ps2_mca_log("ps2_write: port=%04x val=%02x %04x:%04x\n", port, val, CS,cpu_state.pc);
|
2017-05-05 01:49:42 +02:00
|
|
|
|
|
|
|
|
switch (port)
|
|
|
|
|
{
|
|
|
|
|
case 0x94:
|
|
|
|
|
ps2.setup = val;
|
|
|
|
|
break;
|
|
|
|
|
case 0x96:
|
2020-03-25 00:49:25 +01:00
|
|
|
if ((val & 0x80) && !(ps2.adapter_setup & 0x80))
|
|
|
|
|
mca_reset();
|
2017-05-05 01:49:42 +02:00
|
|
|
ps2.adapter_setup = val;
|
|
|
|
|
mca_set_index(val & 7);
|
|
|
|
|
break;
|
|
|
|
|
case 0x100:
|
|
|
|
|
if (!(ps2.setup & PS2_SETUP_IO))
|
|
|
|
|
ps2.planar_write(port, val);
|
|
|
|
|
else if ((ps2.setup & PS2_SETUP_VGA) && (ps2.adapter_setup & PS2_ADAPTER_SETUP))
|
|
|
|
|
mca_write(port, val);
|
|
|
|
|
break;
|
|
|
|
|
case 0x101:
|
|
|
|
|
if (!(ps2.setup & PS2_SETUP_IO))
|
|
|
|
|
ps2.planar_write(port, val);
|
|
|
|
|
else if ((ps2.setup & PS2_SETUP_VGA) && (ps2.setup & PS2_SETUP_VGA) && (ps2.adapter_setup & PS2_ADAPTER_SETUP))
|
|
|
|
|
mca_write(port, val);
|
|
|
|
|
break;
|
|
|
|
|
case 0x102:
|
|
|
|
|
if (!(ps2.setup & PS2_SETUP_IO))
|
|
|
|
|
ps2.planar_write(port, val);
|
|
|
|
|
else if (!(ps2.setup & PS2_SETUP_VGA))
|
|
|
|
|
ps2.pos_vga = val;
|
|
|
|
|
else if (ps2.adapter_setup & PS2_ADAPTER_SETUP)
|
|
|
|
|
mca_write(port, val);
|
|
|
|
|
break;
|
|
|
|
|
case 0x103:
|
|
|
|
|
if (!(ps2.setup & PS2_SETUP_IO))
|
|
|
|
|
ps2.planar_write(port, val);
|
|
|
|
|
else if (ps2.adapter_setup & PS2_ADAPTER_SETUP)
|
|
|
|
|
mca_write(port, val);
|
|
|
|
|
break;
|
|
|
|
|
case 0x104:
|
|
|
|
|
if (!(ps2.setup & PS2_SETUP_IO))
|
|
|
|
|
ps2.planar_write(port, val);
|
|
|
|
|
else if (ps2.adapter_setup & PS2_ADAPTER_SETUP)
|
|
|
|
|
mca_write(port, val);
|
|
|
|
|
break;
|
|
|
|
|
case 0x105:
|
|
|
|
|
if (!(ps2.setup & PS2_SETUP_IO))
|
|
|
|
|
ps2.planar_write(port, val);
|
|
|
|
|
else if (ps2.adapter_setup & PS2_ADAPTER_SETUP)
|
|
|
|
|
mca_write(port, val);
|
|
|
|
|
break;
|
|
|
|
|
case 0x106:
|
|
|
|
|
if (!(ps2.setup & PS2_SETUP_IO))
|
|
|
|
|
ps2.planar_write(port, val);
|
|
|
|
|
else if (ps2.adapter_setup & PS2_ADAPTER_SETUP)
|
|
|
|
|
mca_write(port, val);
|
|
|
|
|
break;
|
|
|
|
|
case 0x107:
|
|
|
|
|
if (!(ps2.setup & PS2_SETUP_IO))
|
|
|
|
|
ps2.planar_write(port, val);
|
|
|
|
|
else if (ps2.adapter_setup & PS2_ADAPTER_SETUP)
|
|
|
|
|
mca_write(port, val);
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void ps2_mca_board_common_init()
|
|
|
|
|
{
|
2018-01-07 20:36:30 +01:00
|
|
|
io_sethandler(0x0091, 0x0001, ps2_mca_read, NULL, NULL, ps2_mca_write, NULL, NULL, NULL);
|
2017-05-05 01:49:42 +02:00
|
|
|
io_sethandler(0x0094, 0x0001, ps2_mca_read, NULL, NULL, ps2_mca_write, NULL, NULL, NULL);
|
|
|
|
|
io_sethandler(0x0096, 0x0001, ps2_mca_read, NULL, NULL, ps2_mca_write, NULL, NULL, NULL);
|
|
|
|
|
io_sethandler(0x0100, 0x0008, ps2_mca_read, NULL, NULL, ps2_mca_write, NULL, NULL, NULL);
|
2018-01-07 20:36:30 +01:00
|
|
|
|
2021-07-04 17:40:39 +02:00
|
|
|
device_add(&port_6x_ps2_device);
|
|
|
|
|
device_add(&port_92_device);
|
2018-01-07 20:36:30 +01:00
|
|
|
|
2017-05-05 01:49:42 +02:00
|
|
|
ps2.setup = 0xff;
|
|
|
|
|
|
|
|
|
|
lpt1_init(0x3bc);
|
|
|
|
|
}
|
|
|
|
|
|
2018-01-19 15:39:13 +01:00
|
|
|
static uint8_t ps2_mem_expansion_read(int port, void *p)
|
|
|
|
|
{
|
|
|
|
|
return ps2.mem_pos_regs[port & 7];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void ps2_mem_expansion_write(int port, uint8_t val, void *p)
|
|
|
|
|
{
|
|
|
|
|
if (port < 0x102 || port == 0x104)
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
ps2.mem_pos_regs[port & 7] = val;
|
|
|
|
|
|
|
|
|
|
if (ps2.mem_pos_regs[2] & 1)
|
|
|
|
|
mem_mapping_enable(&ps2.expansion_mapping);
|
|
|
|
|
else
|
|
|
|
|
mem_mapping_disable(&ps2.expansion_mapping);
|
|
|
|
|
}
|
|
|
|
|
|
Added the IBM 5161 ISA expansion for PC and XT;
Cleaned up the parallel port emulation, added IRQ support, and made enabling/disabling per port;
Added the Award 430NX and the Intel Classic/PCI (Alfredo, 420TX);
Finished the 586MC1;
Added 8087 emulation;
Moved Cyrix 6x86'es to the Dev branch;
Sanitized/cleaned up memregs.c/h and intel.c/h;
Split the chipsets from machines and sanitized Port 92 emulation;
Added support for the 15bpp mode to the Compaq ATI 28800;
Moved the MR 386DX and 486 machines to the Dev branch;
Ported the new dynamic recompiler from PCem, but it remains in Dev branch until after v2.00;
Ported the new timer code from PCem;
Cleaned up the CPU table of unused stuff and better optimized its structure;
Ported the Open-XT and Open-AT from VARCem, the Open-AT is in the Dev branch;
Ported the XT MFM controller rewrite and adding of more controllers (incl. two RLL ones), from VARCem;
Added the AHA-1540A and the BusTek BT-542B;
Moved the Sumo SCSI-AT to the Dev branch;
Minor IDE, FDC, and floppy drive code clean-ups;
Made NCR 5380/53C400-based cards' BIOS address configurable;
Got rid of the legacy romset variable;
Unified (video) buffer and buffer32 into one and make the unified buffer 32-bit;
Added the Amstead PPC512 per PCem patch by John Elliott;
Switched memory mapping granularity from 16k to 4k (less than 1k not possible due to internal pages);
Rewrote the CL-GD 54xx blitter, fixes Win-OS/2 on the 54x6 among other thing;
Added the Image Manager 1024 and Professional Graphics Controller per PCem patch by John Elliott and work done on VARCem;
Added Headland HT-216, GC-205 and Video 7 VGA 1024i emulation based on PCem commit;
Implemented the fuction keys for the Toshiba T1000/T1200/T3100 enhancement;
Amstrad MegaPC does now works correctly with non-internal graphics card;
The SLiRP code no longer casts a packed struct type to a non-packed struct type;
The Xi8088 and PB410a no longer hang on 86Box when PS/2 mouse is not present;
The S3 Virge on BeOS is no longer broken (was broken by build #1591);
OS/2 2.0 build 6.167 now sees key presses again;
Xi8088 now work on CGA again;
86F images converted from either the old or new variants of the HxC MFM format now work correctly;
Hardware interrupts with a vector of 0xFF are now handled correctly;
OPTi 495SX boards no longer incorrectly have 64 MB maximum RAM when 32 MB is correct;
Fixed VNC keyboard input bugs;
Fixed AT RTC periodic interrupt - Chicago 58s / 73f / 73g / 81 MIDI play no longer hangs with the build's own VTD driver;
Fixed mouse polling with internal mice - Amstrad and Olivetti mice now work correctly;
Triones ATAPI DMA driver now correctly reads a file at the end of a CD image with a sectors number not divisible by 4;
Compaq Portable now works with all graphics cards;
Fixed various MDSI Genius bugs;
Added segment limit checks and improved page fault checks for several CPU instructions - Memphis 15xx WINSETUP and Chicago 58s WINDISK.CPL no longer issue a GPF, and some S3 drivers that used to have glitches, now work correctly;
Further improved the 808x emulation, also fixes the noticably choppy sound when using 808x CPU's, also fixes #355;
OS/2 installer no logner locks up on splash screen on PS/2 Model 70 and 80, fixes #400.
Fixed several Amstead bugs, GEM no longer crashes on the Amstrad 1640, fixes #391.
Ported John Elliott's Amstrad fixes and improvement from PCem, and fixed the default language so it's correctly Engliish, fixes #278, fixes #389.
Fixed a minor IDE timing bug, fixes #388.
Fixed Toshiba T1000 RAM issues, fixes #379.
Fixed EGA/(S)VGA overscan border handling, fixes #378;
Got rid of the now long useless IDE channel 2 auto-removal, fixes #370;
Fixed the BIOS files used by the AMSTRAD PC1512, fixes #366;
Ported the Unicode CD image file name fix from VARCem, fixes #365;
Fixed high density floppy disks on the Xi8088, fixes #359;
Fixed some bugs in the Hercules emulation, fixes #346, fixes #358;
Fixed the SCSI hard disk mode sense pages, fixes #356;
Removed the AMI Unknown 386SX because of impossibility to identify the chipset, closes #349;
Fixed bugs in the serial mouse emulation, fixes #344;
Compiled 86Box binaries now include all the required .DLL's, fixes #341;
Made some combo boxes in the Settings dialog slightly wider, fixes #276.
2019-09-20 14:02:30 +02:00
|
|
|
static uint8_t ps2_mem_expansion_feedb(void *p)
|
|
|
|
|
{
|
|
|
|
|
return (ps2.mem_pos_regs[2] & 1);
|
|
|
|
|
}
|
|
|
|
|
|
2018-03-22 19:05:51 +01:00
|
|
|
static void ps2_mca_mem_fffc_init(int start_mb)
|
|
|
|
|
{
|
|
|
|
|
uint32_t planar_size, expansion_start;
|
|
|
|
|
|
|
|
|
|
if (start_mb == 2) {
|
|
|
|
|
planar_size = 0x160000;
|
|
|
|
|
expansion_start = 0x260000;
|
|
|
|
|
} else {
|
|
|
|
|
planar_size = (start_mb - 1) << 20;
|
|
|
|
|
expansion_start = start_mb << 20;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
mem_mapping_set_addr(&ram_high_mapping, 0x100000, planar_size);
|
|
|
|
|
|
|
|
|
|
ps2.mem_pos_regs[0] = 0xff;
|
|
|
|
|
ps2.mem_pos_regs[1] = 0xfc;
|
|
|
|
|
|
|
|
|
|
switch ((mem_size / 1024) - start_mb)
|
|
|
|
|
{
|
|
|
|
|
case 1:
|
|
|
|
|
ps2.mem_pos_regs[4] = 0xfc; /* 11 11 11 00 = 0 0 0 1 */
|
|
|
|
|
break;
|
|
|
|
|
case 2:
|
|
|
|
|
ps2.mem_pos_regs[4] = 0xfe; /* 11 11 11 10 = 0 0 0 2 */
|
|
|
|
|
break;
|
|
|
|
|
case 3:
|
|
|
|
|
ps2.mem_pos_regs[4] = 0xf2; /* 11 11 00 10 = 0 0 1 2 */
|
|
|
|
|
break;
|
|
|
|
|
case 4:
|
|
|
|
|
ps2.mem_pos_regs[4] = 0xfa; /* 11 11 10 10 = 0 0 2 2 */
|
|
|
|
|
break;
|
|
|
|
|
case 5:
|
|
|
|
|
ps2.mem_pos_regs[4] = 0xca; /* 11 00 10 10 = 0 1 2 2 */
|
|
|
|
|
break;
|
|
|
|
|
case 6:
|
|
|
|
|
ps2.mem_pos_regs[4] = 0xea; /* 11 10 10 10 = 0 2 2 2 */
|
|
|
|
|
break;
|
|
|
|
|
case 7:
|
|
|
|
|
ps2.mem_pos_regs[4] = 0x2a; /* 00 10 10 10 = 1 2 2 2 */
|
|
|
|
|
break;
|
|
|
|
|
case 8:
|
|
|
|
|
ps2.mem_pos_regs[4] = 0xaa; /* 10 10 10 10 = 2 2 2 2 */
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
|
2020-03-25 00:49:25 +01:00
|
|
|
mca_add(ps2_mem_expansion_read, ps2_mem_expansion_write, ps2_mem_expansion_feedb, NULL, NULL);
|
2018-03-22 19:05:51 +01:00
|
|
|
mem_mapping_add(&ps2.expansion_mapping,
|
|
|
|
|
expansion_start,
|
|
|
|
|
(mem_size - (start_mb << 10)) << 10,
|
|
|
|
|
mem_read_ram,
|
|
|
|
|
mem_read_ramw,
|
|
|
|
|
mem_read_raml,
|
|
|
|
|
mem_write_ram,
|
|
|
|
|
mem_write_ramw,
|
|
|
|
|
mem_write_raml,
|
|
|
|
|
&ram[expansion_start],
|
|
|
|
|
MEM_MAPPING_INTERNAL,
|
|
|
|
|
NULL);
|
|
|
|
|
mem_mapping_disable(&ps2.expansion_mapping);
|
|
|
|
|
}
|
|
|
|
|
|
2017-09-02 20:39:57 +02:00
|
|
|
static void ps2_mca_board_model_50_init()
|
2017-05-05 01:49:42 +02:00
|
|
|
{
|
|
|
|
|
ps2_mca_board_common_init();
|
|
|
|
|
|
2018-09-03 13:55:09 +02:00
|
|
|
mem_remap_top(384);
|
2017-05-05 01:49:42 +02:00
|
|
|
mca_init(4);
|
Added the IBM 5161 ISA expansion for PC and XT;
Cleaned up the parallel port emulation, added IRQ support, and made enabling/disabling per port;
Added the Award 430NX and the Intel Classic/PCI (Alfredo, 420TX);
Finished the 586MC1;
Added 8087 emulation;
Moved Cyrix 6x86'es to the Dev branch;
Sanitized/cleaned up memregs.c/h and intel.c/h;
Split the chipsets from machines and sanitized Port 92 emulation;
Added support for the 15bpp mode to the Compaq ATI 28800;
Moved the MR 386DX and 486 machines to the Dev branch;
Ported the new dynamic recompiler from PCem, but it remains in Dev branch until after v2.00;
Ported the new timer code from PCem;
Cleaned up the CPU table of unused stuff and better optimized its structure;
Ported the Open-XT and Open-AT from VARCem, the Open-AT is in the Dev branch;
Ported the XT MFM controller rewrite and adding of more controllers (incl. two RLL ones), from VARCem;
Added the AHA-1540A and the BusTek BT-542B;
Moved the Sumo SCSI-AT to the Dev branch;
Minor IDE, FDC, and floppy drive code clean-ups;
Made NCR 5380/53C400-based cards' BIOS address configurable;
Got rid of the legacy romset variable;
Unified (video) buffer and buffer32 into one and make the unified buffer 32-bit;
Added the Amstead PPC512 per PCem patch by John Elliott;
Switched memory mapping granularity from 16k to 4k (less than 1k not possible due to internal pages);
Rewrote the CL-GD 54xx blitter, fixes Win-OS/2 on the 54x6 among other thing;
Added the Image Manager 1024 and Professional Graphics Controller per PCem patch by John Elliott and work done on VARCem;
Added Headland HT-216, GC-205 and Video 7 VGA 1024i emulation based on PCem commit;
Implemented the fuction keys for the Toshiba T1000/T1200/T3100 enhancement;
Amstrad MegaPC does now works correctly with non-internal graphics card;
The SLiRP code no longer casts a packed struct type to a non-packed struct type;
The Xi8088 and PB410a no longer hang on 86Box when PS/2 mouse is not present;
The S3 Virge on BeOS is no longer broken (was broken by build #1591);
OS/2 2.0 build 6.167 now sees key presses again;
Xi8088 now work on CGA again;
86F images converted from either the old or new variants of the HxC MFM format now work correctly;
Hardware interrupts with a vector of 0xFF are now handled correctly;
OPTi 495SX boards no longer incorrectly have 64 MB maximum RAM when 32 MB is correct;
Fixed VNC keyboard input bugs;
Fixed AT RTC periodic interrupt - Chicago 58s / 73f / 73g / 81 MIDI play no longer hangs with the build's own VTD driver;
Fixed mouse polling with internal mice - Amstrad and Olivetti mice now work correctly;
Triones ATAPI DMA driver now correctly reads a file at the end of a CD image with a sectors number not divisible by 4;
Compaq Portable now works with all graphics cards;
Fixed various MDSI Genius bugs;
Added segment limit checks and improved page fault checks for several CPU instructions - Memphis 15xx WINSETUP and Chicago 58s WINDISK.CPL no longer issue a GPF, and some S3 drivers that used to have glitches, now work correctly;
Further improved the 808x emulation, also fixes the noticably choppy sound when using 808x CPU's, also fixes #355;
OS/2 installer no logner locks up on splash screen on PS/2 Model 70 and 80, fixes #400.
Fixed several Amstead bugs, GEM no longer crashes on the Amstrad 1640, fixes #391.
Ported John Elliott's Amstrad fixes and improvement from PCem, and fixed the default language so it's correctly Engliish, fixes #278, fixes #389.
Fixed a minor IDE timing bug, fixes #388.
Fixed Toshiba T1000 RAM issues, fixes #379.
Fixed EGA/(S)VGA overscan border handling, fixes #378;
Got rid of the now long useless IDE channel 2 auto-removal, fixes #370;
Fixed the BIOS files used by the AMSTRAD PC1512, fixes #366;
Ported the Unicode CD image file name fix from VARCem, fixes #365;
Fixed high density floppy disks on the Xi8088, fixes #359;
Fixed some bugs in the Hercules emulation, fixes #346, fixes #358;
Fixed the SCSI hard disk mode sense pages, fixes #356;
Removed the AMI Unknown 386SX because of impossibility to identify the chipset, closes #349;
Fixed bugs in the serial mouse emulation, fixes #344;
Compiled 86Box binaries now include all the required .DLL's, fixes #341;
Made some combo boxes in the Settings dialog slightly wider, fixes #276.
2019-09-20 14:02:30 +02:00
|
|
|
device_add(&keyboard_ps2_mca_2_device);
|
|
|
|
|
|
2017-05-05 01:49:42 +02:00
|
|
|
ps2.planar_read = model_50_read;
|
|
|
|
|
ps2.planar_write = model_50_write;
|
2017-11-05 20:43:01 -05:00
|
|
|
|
2018-01-19 15:39:13 +01:00
|
|
|
if (mem_size > 2048)
|
|
|
|
|
{
|
|
|
|
|
/* Only 2 MB supported on planar, create a memory expansion card for the rest */
|
2018-03-22 19:05:51 +01:00
|
|
|
ps2_mca_mem_fffc_init(2);
|
2018-01-19 15:39:13 +01:00
|
|
|
}
|
|
|
|
|
|
2018-09-19 20:13:32 +02:00
|
|
|
if (gfxcard == VID_INTERNAL)
|
|
|
|
|
device_add(&ps1vga_mca_device);
|
2017-05-05 01:49:42 +02:00
|
|
|
}
|
|
|
|
|
|
2017-09-02 20:39:57 +02:00
|
|
|
static void ps2_mca_board_model_55sx_init()
|
2017-05-05 01:49:42 +02:00
|
|
|
{
|
|
|
|
|
ps2_mca_board_common_init();
|
|
|
|
|
|
|
|
|
|
mem_mapping_add(&ps2.shadow_mapping,
|
|
|
|
|
(mem_size+256) * 1024,
|
|
|
|
|
128*1024,
|
|
|
|
|
ps2_read_shadow_ram,
|
|
|
|
|
ps2_read_shadow_ramw,
|
|
|
|
|
ps2_read_shadow_raml,
|
|
|
|
|
ps2_write_shadow_ram,
|
|
|
|
|
ps2_write_shadow_ramw,
|
|
|
|
|
ps2_write_shadow_raml,
|
|
|
|
|
&ram[0xe0000],
|
|
|
|
|
MEM_MAPPING_INTERNAL,
|
|
|
|
|
NULL);
|
|
|
|
|
|
|
|
|
|
|
2018-09-03 13:55:09 +02:00
|
|
|
mem_remap_top(256);
|
2017-05-05 01:49:42 +02:00
|
|
|
ps2.option[3] = 0x10;
|
|
|
|
|
|
|
|
|
|
memset(ps2.memory_bank, 0xf0, 8);
|
|
|
|
|
switch (mem_size/1024)
|
|
|
|
|
{
|
|
|
|
|
case 1:
|
|
|
|
|
ps2.memory_bank[0] = 0x61;
|
|
|
|
|
break;
|
|
|
|
|
case 2:
|
|
|
|
|
ps2.memory_bank[0] = 0x51;
|
|
|
|
|
break;
|
|
|
|
|
case 3:
|
|
|
|
|
ps2.memory_bank[0] = 0x51;
|
|
|
|
|
ps2.memory_bank[1] = 0x61;
|
|
|
|
|
break;
|
|
|
|
|
case 4:
|
|
|
|
|
ps2.memory_bank[0] = 0x51;
|
|
|
|
|
ps2.memory_bank[1] = 0x51;
|
|
|
|
|
break;
|
|
|
|
|
case 5:
|
|
|
|
|
ps2.memory_bank[0] = 0x01;
|
|
|
|
|
ps2.memory_bank[1] = 0x61;
|
|
|
|
|
break;
|
|
|
|
|
case 6:
|
|
|
|
|
ps2.memory_bank[0] = 0x01;
|
|
|
|
|
ps2.memory_bank[1] = 0x51;
|
|
|
|
|
break;
|
|
|
|
|
case 7: /*Not supported*/
|
|
|
|
|
ps2.memory_bank[0] = 0x01;
|
|
|
|
|
ps2.memory_bank[1] = 0x51;
|
|
|
|
|
break;
|
|
|
|
|
case 8:
|
|
|
|
|
ps2.memory_bank[0] = 0x01;
|
|
|
|
|
ps2.memory_bank[1] = 0x01;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
mca_init(4);
|
Added the IBM 5161 ISA expansion for PC and XT;
Cleaned up the parallel port emulation, added IRQ support, and made enabling/disabling per port;
Added the Award 430NX and the Intel Classic/PCI (Alfredo, 420TX);
Finished the 586MC1;
Added 8087 emulation;
Moved Cyrix 6x86'es to the Dev branch;
Sanitized/cleaned up memregs.c/h and intel.c/h;
Split the chipsets from machines and sanitized Port 92 emulation;
Added support for the 15bpp mode to the Compaq ATI 28800;
Moved the MR 386DX and 486 machines to the Dev branch;
Ported the new dynamic recompiler from PCem, but it remains in Dev branch until after v2.00;
Ported the new timer code from PCem;
Cleaned up the CPU table of unused stuff and better optimized its structure;
Ported the Open-XT and Open-AT from VARCem, the Open-AT is in the Dev branch;
Ported the XT MFM controller rewrite and adding of more controllers (incl. two RLL ones), from VARCem;
Added the AHA-1540A and the BusTek BT-542B;
Moved the Sumo SCSI-AT to the Dev branch;
Minor IDE, FDC, and floppy drive code clean-ups;
Made NCR 5380/53C400-based cards' BIOS address configurable;
Got rid of the legacy romset variable;
Unified (video) buffer and buffer32 into one and make the unified buffer 32-bit;
Added the Amstead PPC512 per PCem patch by John Elliott;
Switched memory mapping granularity from 16k to 4k (less than 1k not possible due to internal pages);
Rewrote the CL-GD 54xx blitter, fixes Win-OS/2 on the 54x6 among other thing;
Added the Image Manager 1024 and Professional Graphics Controller per PCem patch by John Elliott and work done on VARCem;
Added Headland HT-216, GC-205 and Video 7 VGA 1024i emulation based on PCem commit;
Implemented the fuction keys for the Toshiba T1000/T1200/T3100 enhancement;
Amstrad MegaPC does now works correctly with non-internal graphics card;
The SLiRP code no longer casts a packed struct type to a non-packed struct type;
The Xi8088 and PB410a no longer hang on 86Box when PS/2 mouse is not present;
The S3 Virge on BeOS is no longer broken (was broken by build #1591);
OS/2 2.0 build 6.167 now sees key presses again;
Xi8088 now work on CGA again;
86F images converted from either the old or new variants of the HxC MFM format now work correctly;
Hardware interrupts with a vector of 0xFF are now handled correctly;
OPTi 495SX boards no longer incorrectly have 64 MB maximum RAM when 32 MB is correct;
Fixed VNC keyboard input bugs;
Fixed AT RTC periodic interrupt - Chicago 58s / 73f / 73g / 81 MIDI play no longer hangs with the build's own VTD driver;
Fixed mouse polling with internal mice - Amstrad and Olivetti mice now work correctly;
Triones ATAPI DMA driver now correctly reads a file at the end of a CD image with a sectors number not divisible by 4;
Compaq Portable now works with all graphics cards;
Fixed various MDSI Genius bugs;
Added segment limit checks and improved page fault checks for several CPU instructions - Memphis 15xx WINSETUP and Chicago 58s WINDISK.CPL no longer issue a GPF, and some S3 drivers that used to have glitches, now work correctly;
Further improved the 808x emulation, also fixes the noticably choppy sound when using 808x CPU's, also fixes #355;
OS/2 installer no logner locks up on splash screen on PS/2 Model 70 and 80, fixes #400.
Fixed several Amstead bugs, GEM no longer crashes on the Amstrad 1640, fixes #391.
Ported John Elliott's Amstrad fixes and improvement from PCem, and fixed the default language so it's correctly Engliish, fixes #278, fixes #389.
Fixed a minor IDE timing bug, fixes #388.
Fixed Toshiba T1000 RAM issues, fixes #379.
Fixed EGA/(S)VGA overscan border handling, fixes #378;
Got rid of the now long useless IDE channel 2 auto-removal, fixes #370;
Fixed the BIOS files used by the AMSTRAD PC1512, fixes #366;
Ported the Unicode CD image file name fix from VARCem, fixes #365;
Fixed high density floppy disks on the Xi8088, fixes #359;
Fixed some bugs in the Hercules emulation, fixes #346, fixes #358;
Fixed the SCSI hard disk mode sense pages, fixes #356;
Removed the AMI Unknown 386SX because of impossibility to identify the chipset, closes #349;
Fixed bugs in the serial mouse emulation, fixes #344;
Compiled 86Box binaries now include all the required .DLL's, fixes #341;
Made some combo boxes in the Settings dialog slightly wider, fixes #276.
2019-09-20 14:02:30 +02:00
|
|
|
device_add(&keyboard_ps2_mca_device);
|
|
|
|
|
|
2017-05-05 01:49:42 +02:00
|
|
|
ps2.planar_read = model_55sx_read;
|
|
|
|
|
ps2.planar_write = model_55sx_write;
|
2017-11-05 20:43:01 -05:00
|
|
|
|
2018-09-19 20:13:32 +02:00
|
|
|
if (gfxcard == VID_INTERNAL)
|
|
|
|
|
device_add(&ps1vga_mca_device);
|
2017-05-05 01:49:42 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void mem_encoding_update()
|
|
|
|
|
{
|
2018-03-16 00:08:43 +01:00
|
|
|
mem_mapping_disable(&ps2.split_mapping);
|
2020-07-02 00:21:46 +02:00
|
|
|
|
|
|
|
|
if (ps2.split_size > 0)
|
|
|
|
|
mem_set_mem_state(ps2.split_addr, ps2.split_size << 10, MEM_READ_EXTANY | MEM_WRITE_EXTANY);
|
|
|
|
|
if (((mem_size << 10) - (1 << 20)) > 0)
|
|
|
|
|
mem_set_mem_state(1 << 20, (mem_size << 10) - (1 << 20), MEM_READ_INTERNAL | MEM_WRITE_INTERNAL);
|
2017-05-05 01:49:42 +02:00
|
|
|
|
2017-12-10 15:16:24 +01:00
|
|
|
ps2.split_addr = ((uint32_t) (ps2.mem_regs[0] & 0xf)) << 20;
|
2017-05-05 01:49:42 +02:00
|
|
|
|
2017-12-10 15:16:24 +01:00
|
|
|
if (ps2.mem_regs[1] & 2) {
|
2019-11-01 14:23:52 +01:00
|
|
|
mem_set_mem_state(0xe0000, 0x20000, MEM_READ_EXTANY | MEM_WRITE_INTERNAL);
|
2018-05-21 19:04:05 +02:00
|
|
|
ps2_mca_log("PS/2 Model 80-111: ROM space enabled\n");
|
2017-12-10 15:16:24 +01:00
|
|
|
} else {
|
2017-05-05 01:49:42 +02:00
|
|
|
mem_set_mem_state(0xe0000, 0x20000, MEM_READ_INTERNAL | MEM_WRITE_DISABLED);
|
2018-05-21 19:04:05 +02:00
|
|
|
ps2_mca_log("PS/2 Model 80-111: ROM space disabled\n");
|
2017-12-10 15:16:24 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (ps2.mem_regs[1] & 4) {
|
|
|
|
|
mem_mapping_set_addr(&ram_low_mapping, 0x00000, 0x80000);
|
2018-05-21 19:04:05 +02:00
|
|
|
ps2_mca_log("PS/2 Model 80-111: 00080000- 0009FFFF disabled\n");
|
2017-12-10 15:16:24 +01:00
|
|
|
} else {
|
|
|
|
|
mem_mapping_set_addr(&ram_low_mapping, 0x00000, 0xa0000);
|
2018-05-21 19:04:05 +02:00
|
|
|
ps2_mca_log("PS/2 Model 80-111: 00080000- 0009FFFF enabled\n");
|
2017-12-10 15:16:24 +01:00
|
|
|
}
|
2017-05-05 01:49:42 +02:00
|
|
|
|
|
|
|
|
if (!(ps2.mem_regs[1] & 8))
|
|
|
|
|
{
|
2018-03-16 00:08:43 +01:00
|
|
|
if (ps2.mem_regs[1] & 4) {
|
2017-12-11 19:41:58 +01:00
|
|
|
ps2.split_size = 384;
|
2018-03-16 00:08:43 +01:00
|
|
|
ps2.split_phys = 0x80000;
|
|
|
|
|
} else {
|
2017-12-11 19:41:58 +01:00
|
|
|
ps2.split_size = 256;
|
2018-03-16 00:08:43 +01:00
|
|
|
ps2.split_phys = 0xa0000;
|
|
|
|
|
}
|
2017-12-11 19:41:58 +01:00
|
|
|
|
2020-07-02 00:21:46 +02:00
|
|
|
mem_set_mem_state(ps2.split_addr, ps2.split_size << 10, MEM_READ_INTERNAL | MEM_WRITE_INTERNAL);
|
2018-03-16 00:08:43 +01:00
|
|
|
mem_mapping_set_exec(&ps2.split_mapping, &ram[ps2.split_phys]);
|
|
|
|
|
mem_mapping_set_addr(&ps2.split_mapping, ps2.split_addr, ps2.split_size << 10);
|
2017-12-10 15:16:24 +01:00
|
|
|
|
2018-05-21 19:04:05 +02:00
|
|
|
ps2_mca_log("PS/2 Model 80-111: Split memory block enabled at %08X\n", ps2.split_addr);
|
2020-07-02 00:21:46 +02:00
|
|
|
} else {
|
|
|
|
|
ps2.split_size = 0;
|
2018-05-21 19:04:05 +02:00
|
|
|
ps2_mca_log("PS/2 Model 80-111: Split memory block disabled\n");
|
2020-07-02 00:21:46 +02:00
|
|
|
}
|
2021-11-19 23:13:46 +01:00
|
|
|
|
|
|
|
|
flushmmucache_nopc();
|
2017-05-05 01:49:42 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static uint8_t mem_encoding_read(uint16_t addr, void *p)
|
|
|
|
|
{
|
|
|
|
|
switch (addr)
|
|
|
|
|
{
|
|
|
|
|
case 0xe0:
|
|
|
|
|
return ps2.mem_regs[0];
|
|
|
|
|
case 0xe1:
|
|
|
|
|
return ps2.mem_regs[1];
|
|
|
|
|
}
|
|
|
|
|
return 0xff;
|
|
|
|
|
}
|
|
|
|
|
static void mem_encoding_write(uint16_t addr, uint8_t val, void *p)
|
|
|
|
|
{
|
|
|
|
|
switch (addr)
|
|
|
|
|
{
|
|
|
|
|
case 0xe0:
|
|
|
|
|
ps2.mem_regs[0] = val;
|
|
|
|
|
break;
|
|
|
|
|
case 0xe1:
|
|
|
|
|
ps2.mem_regs[1] = val;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
mem_encoding_update();
|
|
|
|
|
}
|
|
|
|
|
|
2018-03-11 18:26:44 +01:00
|
|
|
static uint8_t mem_encoding_read_cached(uint16_t addr, void *p)
|
|
|
|
|
{
|
|
|
|
|
switch (addr)
|
|
|
|
|
{
|
|
|
|
|
case 0xe0:
|
|
|
|
|
return ps2.mem_regs[0];
|
|
|
|
|
case 0xe1:
|
|
|
|
|
return ps2.mem_regs[1];
|
|
|
|
|
case 0xe2:
|
|
|
|
|
return ps2.mem_regs[2];
|
|
|
|
|
}
|
|
|
|
|
return 0xff;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void mem_encoding_write_cached(uint16_t addr, uint8_t val, void *p)
|
|
|
|
|
{
|
|
|
|
|
uint8_t old;
|
|
|
|
|
|
|
|
|
|
switch (addr)
|
|
|
|
|
{
|
2018-03-20 22:06:15 +01:00
|
|
|
case 0xe0:
|
|
|
|
|
ps2.mem_regs[0] = val;
|
|
|
|
|
break;
|
|
|
|
|
case 0xe1:
|
|
|
|
|
ps2.mem_regs[1] = val;
|
2018-03-11 18:26:44 +01:00
|
|
|
break;
|
|
|
|
|
case 0xe2:
|
|
|
|
|
old = ps2.mem_regs[2];
|
|
|
|
|
ps2.mem_regs[2] = (ps2.mem_regs[2] & 0x80) | (val & ~0x88);
|
|
|
|
|
if (val & 2)
|
|
|
|
|
{
|
2018-05-21 19:04:05 +02:00
|
|
|
ps2_mca_log("Clear latch - %i\n", ps2.pending_cache_miss);
|
2018-03-11 18:26:44 +01:00
|
|
|
if (ps2.pending_cache_miss)
|
|
|
|
|
ps2.mem_regs[2] |= 0x80;
|
|
|
|
|
else
|
|
|
|
|
ps2.mem_regs[2] &= ~0x80;
|
|
|
|
|
ps2.pending_cache_miss = 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if ((val & 0x21) == 0x20 && (old & 0x21) != 0x20)
|
|
|
|
|
ps2.pending_cache_miss = 1;
|
|
|
|
|
if ((val & 0x21) == 0x01 && (old & 0x21) != 0x01)
|
|
|
|
|
ps2_cache_clean();
|
2018-09-03 13:55:09 +02:00
|
|
|
#if 1
|
|
|
|
|
// FIXME: Look into this!!!
|
2018-03-11 18:26:44 +01:00
|
|
|
if (val & 0x01)
|
2021-04-29 07:37:05 +02:00
|
|
|
ram_mid_mapping.flags |= MEM_MAPPING_ROM_WS;
|
2018-03-11 18:26:44 +01:00
|
|
|
else
|
2021-04-29 07:37:05 +02:00
|
|
|
ram_mid_mapping.flags &= ~MEM_MAPPING_ROM_WS;
|
2018-09-03 13:55:09 +02:00
|
|
|
#endif
|
2018-03-11 18:26:44 +01:00
|
|
|
break;
|
|
|
|
|
}
|
2018-05-21 19:04:05 +02:00
|
|
|
ps2_mca_log("mem_encoding_write: addr=%02x val=%02x %04x:%04x %02x %02x\n", addr, val, CS,cpu_state.pc, ps2.mem_regs[1],ps2.mem_regs[2]);
|
2018-03-11 18:26:44 +01:00
|
|
|
mem_encoding_update();
|
|
|
|
|
if ((ps2.mem_regs[1] & 0x10) && (ps2.mem_regs[2] & 0x21) == 0x20)
|
|
|
|
|
{
|
|
|
|
|
mem_mapping_disable(&ram_low_mapping);
|
|
|
|
|
mem_mapping_enable(&ps2.cache_mapping);
|
|
|
|
|
flushmmucache();
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
mem_mapping_disable(&ps2.cache_mapping);
|
|
|
|
|
mem_mapping_enable(&ram_low_mapping);
|
|
|
|
|
flushmmucache();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2021-06-15 17:38:31 +02:00
|
|
|
static void ps2_mca_board_model_70_type34_init(int is_type4, int slots)
|
2018-03-11 18:26:44 +01:00
|
|
|
{
|
|
|
|
|
ps2_mca_board_common_init();
|
|
|
|
|
|
|
|
|
|
ps2.split_addr = mem_size * 1024;
|
2021-06-15 17:38:31 +02:00
|
|
|
mca_init(slots);
|
Added the IBM 5161 ISA expansion for PC and XT;
Cleaned up the parallel port emulation, added IRQ support, and made enabling/disabling per port;
Added the Award 430NX and the Intel Classic/PCI (Alfredo, 420TX);
Finished the 586MC1;
Added 8087 emulation;
Moved Cyrix 6x86'es to the Dev branch;
Sanitized/cleaned up memregs.c/h and intel.c/h;
Split the chipsets from machines and sanitized Port 92 emulation;
Added support for the 15bpp mode to the Compaq ATI 28800;
Moved the MR 386DX and 486 machines to the Dev branch;
Ported the new dynamic recompiler from PCem, but it remains in Dev branch until after v2.00;
Ported the new timer code from PCem;
Cleaned up the CPU table of unused stuff and better optimized its structure;
Ported the Open-XT and Open-AT from VARCem, the Open-AT is in the Dev branch;
Ported the XT MFM controller rewrite and adding of more controllers (incl. two RLL ones), from VARCem;
Added the AHA-1540A and the BusTek BT-542B;
Moved the Sumo SCSI-AT to the Dev branch;
Minor IDE, FDC, and floppy drive code clean-ups;
Made NCR 5380/53C400-based cards' BIOS address configurable;
Got rid of the legacy romset variable;
Unified (video) buffer and buffer32 into one and make the unified buffer 32-bit;
Added the Amstead PPC512 per PCem patch by John Elliott;
Switched memory mapping granularity from 16k to 4k (less than 1k not possible due to internal pages);
Rewrote the CL-GD 54xx blitter, fixes Win-OS/2 on the 54x6 among other thing;
Added the Image Manager 1024 and Professional Graphics Controller per PCem patch by John Elliott and work done on VARCem;
Added Headland HT-216, GC-205 and Video 7 VGA 1024i emulation based on PCem commit;
Implemented the fuction keys for the Toshiba T1000/T1200/T3100 enhancement;
Amstrad MegaPC does now works correctly with non-internal graphics card;
The SLiRP code no longer casts a packed struct type to a non-packed struct type;
The Xi8088 and PB410a no longer hang on 86Box when PS/2 mouse is not present;
The S3 Virge on BeOS is no longer broken (was broken by build #1591);
OS/2 2.0 build 6.167 now sees key presses again;
Xi8088 now work on CGA again;
86F images converted from either the old or new variants of the HxC MFM format now work correctly;
Hardware interrupts with a vector of 0xFF are now handled correctly;
OPTi 495SX boards no longer incorrectly have 64 MB maximum RAM when 32 MB is correct;
Fixed VNC keyboard input bugs;
Fixed AT RTC periodic interrupt - Chicago 58s / 73f / 73g / 81 MIDI play no longer hangs with the build's own VTD driver;
Fixed mouse polling with internal mice - Amstrad and Olivetti mice now work correctly;
Triones ATAPI DMA driver now correctly reads a file at the end of a CD image with a sectors number not divisible by 4;
Compaq Portable now works with all graphics cards;
Fixed various MDSI Genius bugs;
Added segment limit checks and improved page fault checks for several CPU instructions - Memphis 15xx WINSETUP and Chicago 58s WINDISK.CPL no longer issue a GPF, and some S3 drivers that used to have glitches, now work correctly;
Further improved the 808x emulation, also fixes the noticably choppy sound when using 808x CPU's, also fixes #355;
OS/2 installer no logner locks up on splash screen on PS/2 Model 70 and 80, fixes #400.
Fixed several Amstead bugs, GEM no longer crashes on the Amstrad 1640, fixes #391.
Ported John Elliott's Amstrad fixes and improvement from PCem, and fixed the default language so it's correctly Engliish, fixes #278, fixes #389.
Fixed a minor IDE timing bug, fixes #388.
Fixed Toshiba T1000 RAM issues, fixes #379.
Fixed EGA/(S)VGA overscan border handling, fixes #378;
Got rid of the now long useless IDE channel 2 auto-removal, fixes #370;
Fixed the BIOS files used by the AMSTRAD PC1512, fixes #366;
Ported the Unicode CD image file name fix from VARCem, fixes #365;
Fixed high density floppy disks on the Xi8088, fixes #359;
Fixed some bugs in the Hercules emulation, fixes #346, fixes #358;
Fixed the SCSI hard disk mode sense pages, fixes #356;
Removed the AMI Unknown 386SX because of impossibility to identify the chipset, closes #349;
Fixed bugs in the serial mouse emulation, fixes #344;
Compiled 86Box binaries now include all the required .DLL's, fixes #341;
Made some combo boxes in the Settings dialog slightly wider, fixes #276.
2019-09-20 14:02:30 +02:00
|
|
|
device_add(&keyboard_ps2_mca_device);
|
|
|
|
|
|
2018-03-11 18:26:44 +01:00
|
|
|
ps2.planar_read = model_70_type3_read;
|
|
|
|
|
ps2.planar_write = model_70_type3_write;
|
|
|
|
|
|
|
|
|
|
device_add(&ps2_nvr_device);
|
|
|
|
|
|
|
|
|
|
io_sethandler(0x00e0, 0x0003, mem_encoding_read_cached, NULL, NULL, mem_encoding_write_cached, NULL, NULL, NULL);
|
2018-03-22 19:05:51 +01:00
|
|
|
|
2018-03-11 18:26:44 +01:00
|
|
|
ps2.mem_regs[1] = 2;
|
|
|
|
|
|
|
|
|
|
switch (mem_size/1024)
|
|
|
|
|
{
|
|
|
|
|
case 2:
|
|
|
|
|
ps2.option[1] = 0xa6;
|
|
|
|
|
ps2.option[2] = 0x01;
|
|
|
|
|
break;
|
|
|
|
|
case 4:
|
|
|
|
|
ps2.option[1] = 0xaa;
|
|
|
|
|
ps2.option[2] = 0x01;
|
|
|
|
|
break;
|
|
|
|
|
case 6:
|
|
|
|
|
ps2.option[1] = 0xca;
|
|
|
|
|
ps2.option[2] = 0x01;
|
|
|
|
|
break;
|
|
|
|
|
case 8:
|
|
|
|
|
default:
|
|
|
|
|
ps2.option[1] = 0xca;
|
|
|
|
|
ps2.option[2] = 0x02;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (is_type4)
|
|
|
|
|
ps2.option[2] |= 0x04; /*486 CPU*/
|
|
|
|
|
|
2018-03-20 22:06:15 +01:00
|
|
|
mem_mapping_add(&ps2.split_mapping,
|
|
|
|
|
(mem_size+256) * 1024,
|
|
|
|
|
256*1024,
|
|
|
|
|
ps2_read_split_ram,
|
|
|
|
|
ps2_read_split_ramw,
|
|
|
|
|
ps2_read_split_raml,
|
|
|
|
|
ps2_write_split_ram,
|
|
|
|
|
ps2_write_split_ramw,
|
|
|
|
|
ps2_write_split_raml,
|
|
|
|
|
&ram[0xa0000],
|
|
|
|
|
MEM_MAPPING_INTERNAL,
|
|
|
|
|
NULL);
|
|
|
|
|
mem_mapping_disable(&ps2.split_mapping);
|
|
|
|
|
|
2018-03-11 18:26:44 +01:00
|
|
|
mem_mapping_add(&ps2.cache_mapping,
|
|
|
|
|
0,
|
2021-06-15 17:38:31 +02:00
|
|
|
(is_type4) ? (8 * 1024) : (64 * 1024),
|
2018-03-11 18:26:44 +01:00
|
|
|
ps2_read_cache_ram,
|
|
|
|
|
ps2_read_cache_ramw,
|
|
|
|
|
ps2_read_cache_raml,
|
2018-03-20 22:06:15 +01:00
|
|
|
ps2_write_cache_ram,
|
2018-03-11 18:26:44 +01:00
|
|
|
NULL,
|
|
|
|
|
NULL,
|
|
|
|
|
ps2_cache,
|
|
|
|
|
MEM_MAPPING_INTERNAL,
|
|
|
|
|
NULL);
|
|
|
|
|
mem_mapping_disable(&ps2.cache_mapping);
|
2021-06-15 17:38:31 +02:00
|
|
|
|
|
|
|
|
if (ps2.planar_id == 0xfff9) {
|
|
|
|
|
if (mem_size > 4096)
|
|
|
|
|
{
|
|
|
|
|
/* Only 4 MB supported on planar, create a memory expansion card for the rest */
|
|
|
|
|
ps2_mca_mem_fffc_init(4);
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
if (mem_size > 8192)
|
|
|
|
|
{
|
|
|
|
|
/* Only 8 MB supported on planar, create a memory expansion card for the rest */
|
|
|
|
|
ps2_mca_mem_fffc_init(8);
|
|
|
|
|
}
|
|
|
|
|
}
|
2018-03-20 22:06:15 +01:00
|
|
|
|
2018-09-19 20:13:32 +02:00
|
|
|
if (gfxcard == VID_INTERNAL)
|
|
|
|
|
device_add(&ps1vga_mca_device);
|
2018-03-11 18:26:44 +01:00
|
|
|
}
|
|
|
|
|
|
2017-12-05 22:58:34 +01:00
|
|
|
static void ps2_mca_board_model_80_type2_init(int is486)
|
2017-05-05 01:49:42 +02:00
|
|
|
{
|
|
|
|
|
ps2_mca_board_common_init();
|
|
|
|
|
|
|
|
|
|
ps2.split_addr = mem_size * 1024;
|
2017-12-10 15:16:24 +01:00
|
|
|
mca_init(8);
|
Added the IBM 5161 ISA expansion for PC and XT;
Cleaned up the parallel port emulation, added IRQ support, and made enabling/disabling per port;
Added the Award 430NX and the Intel Classic/PCI (Alfredo, 420TX);
Finished the 586MC1;
Added 8087 emulation;
Moved Cyrix 6x86'es to the Dev branch;
Sanitized/cleaned up memregs.c/h and intel.c/h;
Split the chipsets from machines and sanitized Port 92 emulation;
Added support for the 15bpp mode to the Compaq ATI 28800;
Moved the MR 386DX and 486 machines to the Dev branch;
Ported the new dynamic recompiler from PCem, but it remains in Dev branch until after v2.00;
Ported the new timer code from PCem;
Cleaned up the CPU table of unused stuff and better optimized its structure;
Ported the Open-XT and Open-AT from VARCem, the Open-AT is in the Dev branch;
Ported the XT MFM controller rewrite and adding of more controllers (incl. two RLL ones), from VARCem;
Added the AHA-1540A and the BusTek BT-542B;
Moved the Sumo SCSI-AT to the Dev branch;
Minor IDE, FDC, and floppy drive code clean-ups;
Made NCR 5380/53C400-based cards' BIOS address configurable;
Got rid of the legacy romset variable;
Unified (video) buffer and buffer32 into one and make the unified buffer 32-bit;
Added the Amstead PPC512 per PCem patch by John Elliott;
Switched memory mapping granularity from 16k to 4k (less than 1k not possible due to internal pages);
Rewrote the CL-GD 54xx blitter, fixes Win-OS/2 on the 54x6 among other thing;
Added the Image Manager 1024 and Professional Graphics Controller per PCem patch by John Elliott and work done on VARCem;
Added Headland HT-216, GC-205 and Video 7 VGA 1024i emulation based on PCem commit;
Implemented the fuction keys for the Toshiba T1000/T1200/T3100 enhancement;
Amstrad MegaPC does now works correctly with non-internal graphics card;
The SLiRP code no longer casts a packed struct type to a non-packed struct type;
The Xi8088 and PB410a no longer hang on 86Box when PS/2 mouse is not present;
The S3 Virge on BeOS is no longer broken (was broken by build #1591);
OS/2 2.0 build 6.167 now sees key presses again;
Xi8088 now work on CGA again;
86F images converted from either the old or new variants of the HxC MFM format now work correctly;
Hardware interrupts with a vector of 0xFF are now handled correctly;
OPTi 495SX boards no longer incorrectly have 64 MB maximum RAM when 32 MB is correct;
Fixed VNC keyboard input bugs;
Fixed AT RTC periodic interrupt - Chicago 58s / 73f / 73g / 81 MIDI play no longer hangs with the build's own VTD driver;
Fixed mouse polling with internal mice - Amstrad and Olivetti mice now work correctly;
Triones ATAPI DMA driver now correctly reads a file at the end of a CD image with a sectors number not divisible by 4;
Compaq Portable now works with all graphics cards;
Fixed various MDSI Genius bugs;
Added segment limit checks and improved page fault checks for several CPU instructions - Memphis 15xx WINSETUP and Chicago 58s WINDISK.CPL no longer issue a GPF, and some S3 drivers that used to have glitches, now work correctly;
Further improved the 808x emulation, also fixes the noticably choppy sound when using 808x CPU's, also fixes #355;
OS/2 installer no logner locks up on splash screen on PS/2 Model 70 and 80, fixes #400.
Fixed several Amstead bugs, GEM no longer crashes on the Amstrad 1640, fixes #391.
Ported John Elliott's Amstrad fixes and improvement from PCem, and fixed the default language so it's correctly Engliish, fixes #278, fixes #389.
Fixed a minor IDE timing bug, fixes #388.
Fixed Toshiba T1000 RAM issues, fixes #379.
Fixed EGA/(S)VGA overscan border handling, fixes #378;
Got rid of the now long useless IDE channel 2 auto-removal, fixes #370;
Fixed the BIOS files used by the AMSTRAD PC1512, fixes #366;
Ported the Unicode CD image file name fix from VARCem, fixes #365;
Fixed high density floppy disks on the Xi8088, fixes #359;
Fixed some bugs in the Hercules emulation, fixes #346, fixes #358;
Fixed the SCSI hard disk mode sense pages, fixes #356;
Removed the AMI Unknown 386SX because of impossibility to identify the chipset, closes #349;
Fixed bugs in the serial mouse emulation, fixes #344;
Compiled 86Box binaries now include all the required .DLL's, fixes #341;
Made some combo boxes in the Settings dialog slightly wider, fixes #276.
2019-09-20 14:02:30 +02:00
|
|
|
device_add(&keyboard_ps2_mca_device);
|
2017-05-05 01:49:42 +02:00
|
|
|
|
|
|
|
|
ps2.planar_read = model_80_read;
|
|
|
|
|
ps2.planar_write = model_80_write;
|
|
|
|
|
|
|
|
|
|
device_add(&ps2_nvr_device);
|
|
|
|
|
|
|
|
|
|
io_sethandler(0x00e0, 0x0002, mem_encoding_read, NULL, NULL, mem_encoding_write, NULL, NULL, NULL);
|
|
|
|
|
|
|
|
|
|
ps2.mem_regs[1] = 2;
|
2017-12-10 15:16:24 +01:00
|
|
|
|
|
|
|
|
/* Note by Kotori: I rewrote this because the original code was using
|
|
|
|
|
Model 80 Type 1-style 1 MB memory card settings, which are *NOT*
|
|
|
|
|
supported by Model 80 Type 2. */
|
2017-05-05 01:49:42 +02:00
|
|
|
switch (mem_size/1024)
|
|
|
|
|
{
|
|
|
|
|
case 1:
|
2017-12-10 15:16:24 +01:00
|
|
|
ps2.option[1] = 0x0e; /* 11 10 = 0 2 */
|
|
|
|
|
ps2.mem_regs[1] = 0xd2; /* 01 = 1 (first) */
|
|
|
|
|
ps2.mem_regs[0] = 0xf0; /* 11 = invalid */
|
2017-05-05 01:49:42 +02:00
|
|
|
break;
|
|
|
|
|
case 2:
|
2017-12-10 15:16:24 +01:00
|
|
|
ps2.option[1] = 0x0e; /* 11 10 = 0 2 */
|
|
|
|
|
ps2.mem_regs[1] = 0xc2; /* 00 = 2 */
|
|
|
|
|
ps2.mem_regs[0] = 0xf0; /* 11 = invalid */
|
2017-05-05 01:49:42 +02:00
|
|
|
break;
|
|
|
|
|
case 3:
|
2017-12-10 15:16:24 +01:00
|
|
|
ps2.option[1] = 0x0a; /* 10 10 = 2 2 */
|
|
|
|
|
ps2.mem_regs[1] = 0xc2; /* 00 = 2 */
|
|
|
|
|
ps2.mem_regs[0] = 0xd0; /* 01 = 1 (first) */
|
2017-05-05 01:49:42 +02:00
|
|
|
break;
|
|
|
|
|
case 4:
|
|
|
|
|
default:
|
2017-12-10 15:16:24 +01:00
|
|
|
ps2.option[1] = 0x0a; /* 10 10 = 2 2 */
|
|
|
|
|
ps2.mem_regs[1] = 0xc2; /* 00 = 2 */
|
|
|
|
|
ps2.mem_regs[0] = 0xc0; /* 00 = 2 */
|
2017-05-05 01:49:42 +02:00
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
|
2017-12-10 15:16:24 +01:00
|
|
|
ps2.mem_regs[0] |= ((mem_size/1024) & 0x0f);
|
|
|
|
|
|
2018-03-16 00:08:43 +01:00
|
|
|
mem_mapping_add(&ps2.split_mapping,
|
|
|
|
|
(mem_size+256) * 1024,
|
|
|
|
|
256*1024,
|
|
|
|
|
ps2_read_split_ram,
|
|
|
|
|
ps2_read_split_ramw,
|
|
|
|
|
ps2_read_split_raml,
|
|
|
|
|
ps2_write_split_ram,
|
|
|
|
|
ps2_write_split_ramw,
|
|
|
|
|
ps2_write_split_raml,
|
|
|
|
|
&ram[0xa0000],
|
|
|
|
|
MEM_MAPPING_INTERNAL,
|
|
|
|
|
NULL);
|
|
|
|
|
mem_mapping_disable(&ps2.split_mapping);
|
|
|
|
|
|
2017-12-05 22:58:34 +01:00
|
|
|
if ((mem_size > 4096) && !is486)
|
2017-05-05 01:49:42 +02:00
|
|
|
{
|
|
|
|
|
/* Only 4 MB supported on planar, create a memory expansion card for the rest */
|
2018-03-22 19:05:51 +01:00
|
|
|
ps2_mca_mem_fffc_init(4);
|
2017-05-05 01:49:42 +02:00
|
|
|
}
|
2017-11-05 20:43:01 -05:00
|
|
|
|
2018-09-19 20:13:32 +02:00
|
|
|
if (gfxcard == VID_INTERNAL)
|
|
|
|
|
device_add(&ps1vga_mca_device);
|
2020-07-02 00:21:46 +02:00
|
|
|
|
|
|
|
|
ps2.split_size = 0;
|
2017-05-05 01:49:42 +02:00
|
|
|
}
|
2017-09-02 20:39:57 +02:00
|
|
|
|
2017-10-07 22:18:30 -04:00
|
|
|
|
|
|
|
|
static void
|
2018-03-19 01:02:04 +01:00
|
|
|
machine_ps2_common_init(const machine_t *model)
|
2017-09-02 20:39:57 +02:00
|
|
|
{
|
2017-10-07 22:18:30 -04:00
|
|
|
machine_common_init(model);
|
2021-02-07 17:27:14 +02:00
|
|
|
|
|
|
|
|
if (fdc_type == FDC_INTERNAL)
|
2018-01-17 18:43:36 +01:00
|
|
|
device_add(&fdc_at_device);
|
2017-10-07 22:18:30 -04:00
|
|
|
|
2017-09-02 20:39:57 +02:00
|
|
|
dma16_init();
|
|
|
|
|
ps2_dma_init();
|
2018-04-25 23:51:13 +02:00
|
|
|
device_add(&ps_nvr_device);
|
2017-09-02 20:39:57 +02:00
|
|
|
pic2_init();
|
|
|
|
|
|
|
|
|
|
pit_ps2_init();
|
2017-12-10 15:16:24 +01:00
|
|
|
|
|
|
|
|
nmi_mask = 0x80;
|
2019-02-06 03:34:39 +01:00
|
|
|
|
Added the IBM 5161 ISA expansion for PC and XT;
Cleaned up the parallel port emulation, added IRQ support, and made enabling/disabling per port;
Added the Award 430NX and the Intel Classic/PCI (Alfredo, 420TX);
Finished the 586MC1;
Added 8087 emulation;
Moved Cyrix 6x86'es to the Dev branch;
Sanitized/cleaned up memregs.c/h and intel.c/h;
Split the chipsets from machines and sanitized Port 92 emulation;
Added support for the 15bpp mode to the Compaq ATI 28800;
Moved the MR 386DX and 486 machines to the Dev branch;
Ported the new dynamic recompiler from PCem, but it remains in Dev branch until after v2.00;
Ported the new timer code from PCem;
Cleaned up the CPU table of unused stuff and better optimized its structure;
Ported the Open-XT and Open-AT from VARCem, the Open-AT is in the Dev branch;
Ported the XT MFM controller rewrite and adding of more controllers (incl. two RLL ones), from VARCem;
Added the AHA-1540A and the BusTek BT-542B;
Moved the Sumo SCSI-AT to the Dev branch;
Minor IDE, FDC, and floppy drive code clean-ups;
Made NCR 5380/53C400-based cards' BIOS address configurable;
Got rid of the legacy romset variable;
Unified (video) buffer and buffer32 into one and make the unified buffer 32-bit;
Added the Amstead PPC512 per PCem patch by John Elliott;
Switched memory mapping granularity from 16k to 4k (less than 1k not possible due to internal pages);
Rewrote the CL-GD 54xx blitter, fixes Win-OS/2 on the 54x6 among other thing;
Added the Image Manager 1024 and Professional Graphics Controller per PCem patch by John Elliott and work done on VARCem;
Added Headland HT-216, GC-205 and Video 7 VGA 1024i emulation based on PCem commit;
Implemented the fuction keys for the Toshiba T1000/T1200/T3100 enhancement;
Amstrad MegaPC does now works correctly with non-internal graphics card;
The SLiRP code no longer casts a packed struct type to a non-packed struct type;
The Xi8088 and PB410a no longer hang on 86Box when PS/2 mouse is not present;
The S3 Virge on BeOS is no longer broken (was broken by build #1591);
OS/2 2.0 build 6.167 now sees key presses again;
Xi8088 now work on CGA again;
86F images converted from either the old or new variants of the HxC MFM format now work correctly;
Hardware interrupts with a vector of 0xFF are now handled correctly;
OPTi 495SX boards no longer incorrectly have 64 MB maximum RAM when 32 MB is correct;
Fixed VNC keyboard input bugs;
Fixed AT RTC periodic interrupt - Chicago 58s / 73f / 73g / 81 MIDI play no longer hangs with the build's own VTD driver;
Fixed mouse polling with internal mice - Amstrad and Olivetti mice now work correctly;
Triones ATAPI DMA driver now correctly reads a file at the end of a CD image with a sectors number not divisible by 4;
Compaq Portable now works with all graphics cards;
Fixed various MDSI Genius bugs;
Added segment limit checks and improved page fault checks for several CPU instructions - Memphis 15xx WINSETUP and Chicago 58s WINDISK.CPL no longer issue a GPF, and some S3 drivers that used to have glitches, now work correctly;
Further improved the 808x emulation, also fixes the noticably choppy sound when using 808x CPU's, also fixes #355;
OS/2 installer no logner locks up on splash screen on PS/2 Model 70 and 80, fixes #400.
Fixed several Amstead bugs, GEM no longer crashes on the Amstrad 1640, fixes #391.
Ported John Elliott's Amstrad fixes and improvement from PCem, and fixed the default language so it's correctly Engliish, fixes #278, fixes #389.
Fixed a minor IDE timing bug, fixes #388.
Fixed Toshiba T1000 RAM issues, fixes #379.
Fixed EGA/(S)VGA overscan border handling, fixes #378;
Got rid of the now long useless IDE channel 2 auto-removal, fixes #370;
Fixed the BIOS files used by the AMSTRAD PC1512, fixes #366;
Ported the Unicode CD image file name fix from VARCem, fixes #365;
Fixed high density floppy disks on the Xi8088, fixes #359;
Fixed some bugs in the Hercules emulation, fixes #346, fixes #358;
Fixed the SCSI hard disk mode sense pages, fixes #356;
Removed the AMI Unknown 386SX because of impossibility to identify the chipset, closes #349;
Fixed bugs in the serial mouse emulation, fixes #344;
Compiled 86Box binaries now include all the required .DLL's, fixes #341;
Made some combo boxes in the Settings dialog slightly wider, fixes #276.
2019-09-20 14:02:30 +02:00
|
|
|
ps2.uart = device_add_inst(&ns16550_device, 1);
|
2017-09-02 20:39:57 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
Added the IBM 5161 ISA expansion for PC and XT;
Cleaned up the parallel port emulation, added IRQ support, and made enabling/disabling per port;
Added the Award 430NX and the Intel Classic/PCI (Alfredo, 420TX);
Finished the 586MC1;
Added 8087 emulation;
Moved Cyrix 6x86'es to the Dev branch;
Sanitized/cleaned up memregs.c/h and intel.c/h;
Split the chipsets from machines and sanitized Port 92 emulation;
Added support for the 15bpp mode to the Compaq ATI 28800;
Moved the MR 386DX and 486 machines to the Dev branch;
Ported the new dynamic recompiler from PCem, but it remains in Dev branch until after v2.00;
Ported the new timer code from PCem;
Cleaned up the CPU table of unused stuff and better optimized its structure;
Ported the Open-XT and Open-AT from VARCem, the Open-AT is in the Dev branch;
Ported the XT MFM controller rewrite and adding of more controllers (incl. two RLL ones), from VARCem;
Added the AHA-1540A and the BusTek BT-542B;
Moved the Sumo SCSI-AT to the Dev branch;
Minor IDE, FDC, and floppy drive code clean-ups;
Made NCR 5380/53C400-based cards' BIOS address configurable;
Got rid of the legacy romset variable;
Unified (video) buffer and buffer32 into one and make the unified buffer 32-bit;
Added the Amstead PPC512 per PCem patch by John Elliott;
Switched memory mapping granularity from 16k to 4k (less than 1k not possible due to internal pages);
Rewrote the CL-GD 54xx blitter, fixes Win-OS/2 on the 54x6 among other thing;
Added the Image Manager 1024 and Professional Graphics Controller per PCem patch by John Elliott and work done on VARCem;
Added Headland HT-216, GC-205 and Video 7 VGA 1024i emulation based on PCem commit;
Implemented the fuction keys for the Toshiba T1000/T1200/T3100 enhancement;
Amstrad MegaPC does now works correctly with non-internal graphics card;
The SLiRP code no longer casts a packed struct type to a non-packed struct type;
The Xi8088 and PB410a no longer hang on 86Box when PS/2 mouse is not present;
The S3 Virge on BeOS is no longer broken (was broken by build #1591);
OS/2 2.0 build 6.167 now sees key presses again;
Xi8088 now work on CGA again;
86F images converted from either the old or new variants of the HxC MFM format now work correctly;
Hardware interrupts with a vector of 0xFF are now handled correctly;
OPTi 495SX boards no longer incorrectly have 64 MB maximum RAM when 32 MB is correct;
Fixed VNC keyboard input bugs;
Fixed AT RTC periodic interrupt - Chicago 58s / 73f / 73g / 81 MIDI play no longer hangs with the build's own VTD driver;
Fixed mouse polling with internal mice - Amstrad and Olivetti mice now work correctly;
Triones ATAPI DMA driver now correctly reads a file at the end of a CD image with a sectors number not divisible by 4;
Compaq Portable now works with all graphics cards;
Fixed various MDSI Genius bugs;
Added segment limit checks and improved page fault checks for several CPU instructions - Memphis 15xx WINSETUP and Chicago 58s WINDISK.CPL no longer issue a GPF, and some S3 drivers that used to have glitches, now work correctly;
Further improved the 808x emulation, also fixes the noticably choppy sound when using 808x CPU's, also fixes #355;
OS/2 installer no logner locks up on splash screen on PS/2 Model 70 and 80, fixes #400.
Fixed several Amstead bugs, GEM no longer crashes on the Amstrad 1640, fixes #391.
Ported John Elliott's Amstrad fixes and improvement from PCem, and fixed the default language so it's correctly Engliish, fixes #278, fixes #389.
Fixed a minor IDE timing bug, fixes #388.
Fixed Toshiba T1000 RAM issues, fixes #379.
Fixed EGA/(S)VGA overscan border handling, fixes #378;
Got rid of the now long useless IDE channel 2 auto-removal, fixes #370;
Fixed the BIOS files used by the AMSTRAD PC1512, fixes #366;
Ported the Unicode CD image file name fix from VARCem, fixes #365;
Fixed high density floppy disks on the Xi8088, fixes #359;
Fixed some bugs in the Hercules emulation, fixes #346, fixes #358;
Fixed the SCSI hard disk mode sense pages, fixes #356;
Removed the AMI Unknown 386SX because of impossibility to identify the chipset, closes #349;
Fixed bugs in the serial mouse emulation, fixes #344;
Compiled 86Box binaries now include all the required .DLL's, fixes #341;
Made some combo boxes in the Settings dialog slightly wider, fixes #276.
2019-09-20 14:02:30 +02:00
|
|
|
int
|
2018-03-19 01:02:04 +01:00
|
|
|
machine_ps2_model_50_init(const machine_t *model)
|
2017-09-02 20:39:57 +02:00
|
|
|
{
|
Added the IBM 5161 ISA expansion for PC and XT;
Cleaned up the parallel port emulation, added IRQ support, and made enabling/disabling per port;
Added the Award 430NX and the Intel Classic/PCI (Alfredo, 420TX);
Finished the 586MC1;
Added 8087 emulation;
Moved Cyrix 6x86'es to the Dev branch;
Sanitized/cleaned up memregs.c/h and intel.c/h;
Split the chipsets from machines and sanitized Port 92 emulation;
Added support for the 15bpp mode to the Compaq ATI 28800;
Moved the MR 386DX and 486 machines to the Dev branch;
Ported the new dynamic recompiler from PCem, but it remains in Dev branch until after v2.00;
Ported the new timer code from PCem;
Cleaned up the CPU table of unused stuff and better optimized its structure;
Ported the Open-XT and Open-AT from VARCem, the Open-AT is in the Dev branch;
Ported the XT MFM controller rewrite and adding of more controllers (incl. two RLL ones), from VARCem;
Added the AHA-1540A and the BusTek BT-542B;
Moved the Sumo SCSI-AT to the Dev branch;
Minor IDE, FDC, and floppy drive code clean-ups;
Made NCR 5380/53C400-based cards' BIOS address configurable;
Got rid of the legacy romset variable;
Unified (video) buffer and buffer32 into one and make the unified buffer 32-bit;
Added the Amstead PPC512 per PCem patch by John Elliott;
Switched memory mapping granularity from 16k to 4k (less than 1k not possible due to internal pages);
Rewrote the CL-GD 54xx blitter, fixes Win-OS/2 on the 54x6 among other thing;
Added the Image Manager 1024 and Professional Graphics Controller per PCem patch by John Elliott and work done on VARCem;
Added Headland HT-216, GC-205 and Video 7 VGA 1024i emulation based on PCem commit;
Implemented the fuction keys for the Toshiba T1000/T1200/T3100 enhancement;
Amstrad MegaPC does now works correctly with non-internal graphics card;
The SLiRP code no longer casts a packed struct type to a non-packed struct type;
The Xi8088 and PB410a no longer hang on 86Box when PS/2 mouse is not present;
The S3 Virge on BeOS is no longer broken (was broken by build #1591);
OS/2 2.0 build 6.167 now sees key presses again;
Xi8088 now work on CGA again;
86F images converted from either the old or new variants of the HxC MFM format now work correctly;
Hardware interrupts with a vector of 0xFF are now handled correctly;
OPTi 495SX boards no longer incorrectly have 64 MB maximum RAM when 32 MB is correct;
Fixed VNC keyboard input bugs;
Fixed AT RTC periodic interrupt - Chicago 58s / 73f / 73g / 81 MIDI play no longer hangs with the build's own VTD driver;
Fixed mouse polling with internal mice - Amstrad and Olivetti mice now work correctly;
Triones ATAPI DMA driver now correctly reads a file at the end of a CD image with a sectors number not divisible by 4;
Compaq Portable now works with all graphics cards;
Fixed various MDSI Genius bugs;
Added segment limit checks and improved page fault checks for several CPU instructions - Memphis 15xx WINSETUP and Chicago 58s WINDISK.CPL no longer issue a GPF, and some S3 drivers that used to have glitches, now work correctly;
Further improved the 808x emulation, also fixes the noticably choppy sound when using 808x CPU's, also fixes #355;
OS/2 installer no logner locks up on splash screen on PS/2 Model 70 and 80, fixes #400.
Fixed several Amstead bugs, GEM no longer crashes on the Amstrad 1640, fixes #391.
Ported John Elliott's Amstrad fixes and improvement from PCem, and fixed the default language so it's correctly Engliish, fixes #278, fixes #389.
Fixed a minor IDE timing bug, fixes #388.
Fixed Toshiba T1000 RAM issues, fixes #379.
Fixed EGA/(S)VGA overscan border handling, fixes #378;
Got rid of the now long useless IDE channel 2 auto-removal, fixes #370;
Fixed the BIOS files used by the AMSTRAD PC1512, fixes #366;
Ported the Unicode CD image file name fix from VARCem, fixes #365;
Fixed high density floppy disks on the Xi8088, fixes #359;
Fixed some bugs in the Hercules emulation, fixes #346, fixes #358;
Fixed the SCSI hard disk mode sense pages, fixes #356;
Removed the AMI Unknown 386SX because of impossibility to identify the chipset, closes #349;
Fixed bugs in the serial mouse emulation, fixes #344;
Compiled 86Box binaries now include all the required .DLL's, fixes #341;
Made some combo boxes in the Settings dialog slightly wider, fixes #276.
2019-09-20 14:02:30 +02:00
|
|
|
int ret;
|
|
|
|
|
|
2021-03-14 20:35:01 +01:00
|
|
|
ret = bios_load_interleaved("roms/machines/ibmps2_m50/90x7420.zm13",
|
|
|
|
|
"roms/machines/ibmps2_m50/90x7429.zm18",
|
Added the IBM 5161 ISA expansion for PC and XT;
Cleaned up the parallel port emulation, added IRQ support, and made enabling/disabling per port;
Added the Award 430NX and the Intel Classic/PCI (Alfredo, 420TX);
Finished the 586MC1;
Added 8087 emulation;
Moved Cyrix 6x86'es to the Dev branch;
Sanitized/cleaned up memregs.c/h and intel.c/h;
Split the chipsets from machines and sanitized Port 92 emulation;
Added support for the 15bpp mode to the Compaq ATI 28800;
Moved the MR 386DX and 486 machines to the Dev branch;
Ported the new dynamic recompiler from PCem, but it remains in Dev branch until after v2.00;
Ported the new timer code from PCem;
Cleaned up the CPU table of unused stuff and better optimized its structure;
Ported the Open-XT and Open-AT from VARCem, the Open-AT is in the Dev branch;
Ported the XT MFM controller rewrite and adding of more controllers (incl. two RLL ones), from VARCem;
Added the AHA-1540A and the BusTek BT-542B;
Moved the Sumo SCSI-AT to the Dev branch;
Minor IDE, FDC, and floppy drive code clean-ups;
Made NCR 5380/53C400-based cards' BIOS address configurable;
Got rid of the legacy romset variable;
Unified (video) buffer and buffer32 into one and make the unified buffer 32-bit;
Added the Amstead PPC512 per PCem patch by John Elliott;
Switched memory mapping granularity from 16k to 4k (less than 1k not possible due to internal pages);
Rewrote the CL-GD 54xx blitter, fixes Win-OS/2 on the 54x6 among other thing;
Added the Image Manager 1024 and Professional Graphics Controller per PCem patch by John Elliott and work done on VARCem;
Added Headland HT-216, GC-205 and Video 7 VGA 1024i emulation based on PCem commit;
Implemented the fuction keys for the Toshiba T1000/T1200/T3100 enhancement;
Amstrad MegaPC does now works correctly with non-internal graphics card;
The SLiRP code no longer casts a packed struct type to a non-packed struct type;
The Xi8088 and PB410a no longer hang on 86Box when PS/2 mouse is not present;
The S3 Virge on BeOS is no longer broken (was broken by build #1591);
OS/2 2.0 build 6.167 now sees key presses again;
Xi8088 now work on CGA again;
86F images converted from either the old or new variants of the HxC MFM format now work correctly;
Hardware interrupts with a vector of 0xFF are now handled correctly;
OPTi 495SX boards no longer incorrectly have 64 MB maximum RAM when 32 MB is correct;
Fixed VNC keyboard input bugs;
Fixed AT RTC periodic interrupt - Chicago 58s / 73f / 73g / 81 MIDI play no longer hangs with the build's own VTD driver;
Fixed mouse polling with internal mice - Amstrad and Olivetti mice now work correctly;
Triones ATAPI DMA driver now correctly reads a file at the end of a CD image with a sectors number not divisible by 4;
Compaq Portable now works with all graphics cards;
Fixed various MDSI Genius bugs;
Added segment limit checks and improved page fault checks for several CPU instructions - Memphis 15xx WINSETUP and Chicago 58s WINDISK.CPL no longer issue a GPF, and some S3 drivers that used to have glitches, now work correctly;
Further improved the 808x emulation, also fixes the noticably choppy sound when using 808x CPU's, also fixes #355;
OS/2 installer no logner locks up on splash screen on PS/2 Model 70 and 80, fixes #400.
Fixed several Amstead bugs, GEM no longer crashes on the Amstrad 1640, fixes #391.
Ported John Elliott's Amstrad fixes and improvement from PCem, and fixed the default language so it's correctly Engliish, fixes #278, fixes #389.
Fixed a minor IDE timing bug, fixes #388.
Fixed Toshiba T1000 RAM issues, fixes #379.
Fixed EGA/(S)VGA overscan border handling, fixes #378;
Got rid of the now long useless IDE channel 2 auto-removal, fixes #370;
Fixed the BIOS files used by the AMSTRAD PC1512, fixes #366;
Ported the Unicode CD image file name fix from VARCem, fixes #365;
Fixed high density floppy disks on the Xi8088, fixes #359;
Fixed some bugs in the Hercules emulation, fixes #346, fixes #358;
Fixed the SCSI hard disk mode sense pages, fixes #356;
Removed the AMI Unknown 386SX because of impossibility to identify the chipset, closes #349;
Fixed bugs in the serial mouse emulation, fixes #344;
Compiled 86Box binaries now include all the required .DLL's, fixes #341;
Made some combo boxes in the Settings dialog slightly wider, fixes #276.
2019-09-20 14:02:30 +02:00
|
|
|
0x000f0000, 131072, 0);
|
2021-03-14 20:35:01 +01:00
|
|
|
ret &= bios_load_aux_interleaved("roms/machines/ibmps2_m50/90x7423.zm14",
|
|
|
|
|
"roms/machines/ibmps2_m50/90x7426.zm16",
|
Added the IBM 5161 ISA expansion for PC and XT;
Cleaned up the parallel port emulation, added IRQ support, and made enabling/disabling per port;
Added the Award 430NX and the Intel Classic/PCI (Alfredo, 420TX);
Finished the 586MC1;
Added 8087 emulation;
Moved Cyrix 6x86'es to the Dev branch;
Sanitized/cleaned up memregs.c/h and intel.c/h;
Split the chipsets from machines and sanitized Port 92 emulation;
Added support for the 15bpp mode to the Compaq ATI 28800;
Moved the MR 386DX and 486 machines to the Dev branch;
Ported the new dynamic recompiler from PCem, but it remains in Dev branch until after v2.00;
Ported the new timer code from PCem;
Cleaned up the CPU table of unused stuff and better optimized its structure;
Ported the Open-XT and Open-AT from VARCem, the Open-AT is in the Dev branch;
Ported the XT MFM controller rewrite and adding of more controllers (incl. two RLL ones), from VARCem;
Added the AHA-1540A and the BusTek BT-542B;
Moved the Sumo SCSI-AT to the Dev branch;
Minor IDE, FDC, and floppy drive code clean-ups;
Made NCR 5380/53C400-based cards' BIOS address configurable;
Got rid of the legacy romset variable;
Unified (video) buffer and buffer32 into one and make the unified buffer 32-bit;
Added the Amstead PPC512 per PCem patch by John Elliott;
Switched memory mapping granularity from 16k to 4k (less than 1k not possible due to internal pages);
Rewrote the CL-GD 54xx blitter, fixes Win-OS/2 on the 54x6 among other thing;
Added the Image Manager 1024 and Professional Graphics Controller per PCem patch by John Elliott and work done on VARCem;
Added Headland HT-216, GC-205 and Video 7 VGA 1024i emulation based on PCem commit;
Implemented the fuction keys for the Toshiba T1000/T1200/T3100 enhancement;
Amstrad MegaPC does now works correctly with non-internal graphics card;
The SLiRP code no longer casts a packed struct type to a non-packed struct type;
The Xi8088 and PB410a no longer hang on 86Box when PS/2 mouse is not present;
The S3 Virge on BeOS is no longer broken (was broken by build #1591);
OS/2 2.0 build 6.167 now sees key presses again;
Xi8088 now work on CGA again;
86F images converted from either the old or new variants of the HxC MFM format now work correctly;
Hardware interrupts with a vector of 0xFF are now handled correctly;
OPTi 495SX boards no longer incorrectly have 64 MB maximum RAM when 32 MB is correct;
Fixed VNC keyboard input bugs;
Fixed AT RTC periodic interrupt - Chicago 58s / 73f / 73g / 81 MIDI play no longer hangs with the build's own VTD driver;
Fixed mouse polling with internal mice - Amstrad and Olivetti mice now work correctly;
Triones ATAPI DMA driver now correctly reads a file at the end of a CD image with a sectors number not divisible by 4;
Compaq Portable now works with all graphics cards;
Fixed various MDSI Genius bugs;
Added segment limit checks and improved page fault checks for several CPU instructions - Memphis 15xx WINSETUP and Chicago 58s WINDISK.CPL no longer issue a GPF, and some S3 drivers that used to have glitches, now work correctly;
Further improved the 808x emulation, also fixes the noticably choppy sound when using 808x CPU's, also fixes #355;
OS/2 installer no logner locks up on splash screen on PS/2 Model 70 and 80, fixes #400.
Fixed several Amstead bugs, GEM no longer crashes on the Amstrad 1640, fixes #391.
Ported John Elliott's Amstrad fixes and improvement from PCem, and fixed the default language so it's correctly Engliish, fixes #278, fixes #389.
Fixed a minor IDE timing bug, fixes #388.
Fixed Toshiba T1000 RAM issues, fixes #379.
Fixed EGA/(S)VGA overscan border handling, fixes #378;
Got rid of the now long useless IDE channel 2 auto-removal, fixes #370;
Fixed the BIOS files used by the AMSTRAD PC1512, fixes #366;
Ported the Unicode CD image file name fix from VARCem, fixes #365;
Fixed high density floppy disks on the Xi8088, fixes #359;
Fixed some bugs in the Hercules emulation, fixes #346, fixes #358;
Fixed the SCSI hard disk mode sense pages, fixes #356;
Removed the AMI Unknown 386SX because of impossibility to identify the chipset, closes #349;
Fixed bugs in the serial mouse emulation, fixes #344;
Compiled 86Box binaries now include all the required .DLL's, fixes #341;
Made some combo boxes in the Settings dialog slightly wider, fixes #276.
2019-09-20 14:02:30 +02:00
|
|
|
0x000e0000, 65536, 0);
|
|
|
|
|
|
|
|
|
|
if (bios_only || !ret)
|
|
|
|
|
return ret;
|
|
|
|
|
|
2017-10-07 22:18:30 -04:00
|
|
|
machine_ps2_common_init(model);
|
|
|
|
|
|
2017-09-02 20:39:57 +02:00
|
|
|
ps2_mca_board_model_50_init();
|
Added the IBM 5161 ISA expansion for PC and XT;
Cleaned up the parallel port emulation, added IRQ support, and made enabling/disabling per port;
Added the Award 430NX and the Intel Classic/PCI (Alfredo, 420TX);
Finished the 586MC1;
Added 8087 emulation;
Moved Cyrix 6x86'es to the Dev branch;
Sanitized/cleaned up memregs.c/h and intel.c/h;
Split the chipsets from machines and sanitized Port 92 emulation;
Added support for the 15bpp mode to the Compaq ATI 28800;
Moved the MR 386DX and 486 machines to the Dev branch;
Ported the new dynamic recompiler from PCem, but it remains in Dev branch until after v2.00;
Ported the new timer code from PCem;
Cleaned up the CPU table of unused stuff and better optimized its structure;
Ported the Open-XT and Open-AT from VARCem, the Open-AT is in the Dev branch;
Ported the XT MFM controller rewrite and adding of more controllers (incl. two RLL ones), from VARCem;
Added the AHA-1540A and the BusTek BT-542B;
Moved the Sumo SCSI-AT to the Dev branch;
Minor IDE, FDC, and floppy drive code clean-ups;
Made NCR 5380/53C400-based cards' BIOS address configurable;
Got rid of the legacy romset variable;
Unified (video) buffer and buffer32 into one and make the unified buffer 32-bit;
Added the Amstead PPC512 per PCem patch by John Elliott;
Switched memory mapping granularity from 16k to 4k (less than 1k not possible due to internal pages);
Rewrote the CL-GD 54xx blitter, fixes Win-OS/2 on the 54x6 among other thing;
Added the Image Manager 1024 and Professional Graphics Controller per PCem patch by John Elliott and work done on VARCem;
Added Headland HT-216, GC-205 and Video 7 VGA 1024i emulation based on PCem commit;
Implemented the fuction keys for the Toshiba T1000/T1200/T3100 enhancement;
Amstrad MegaPC does now works correctly with non-internal graphics card;
The SLiRP code no longer casts a packed struct type to a non-packed struct type;
The Xi8088 and PB410a no longer hang on 86Box when PS/2 mouse is not present;
The S3 Virge on BeOS is no longer broken (was broken by build #1591);
OS/2 2.0 build 6.167 now sees key presses again;
Xi8088 now work on CGA again;
86F images converted from either the old or new variants of the HxC MFM format now work correctly;
Hardware interrupts with a vector of 0xFF are now handled correctly;
OPTi 495SX boards no longer incorrectly have 64 MB maximum RAM when 32 MB is correct;
Fixed VNC keyboard input bugs;
Fixed AT RTC periodic interrupt - Chicago 58s / 73f / 73g / 81 MIDI play no longer hangs with the build's own VTD driver;
Fixed mouse polling with internal mice - Amstrad and Olivetti mice now work correctly;
Triones ATAPI DMA driver now correctly reads a file at the end of a CD image with a sectors number not divisible by 4;
Compaq Portable now works with all graphics cards;
Fixed various MDSI Genius bugs;
Added segment limit checks and improved page fault checks for several CPU instructions - Memphis 15xx WINSETUP and Chicago 58s WINDISK.CPL no longer issue a GPF, and some S3 drivers that used to have glitches, now work correctly;
Further improved the 808x emulation, also fixes the noticably choppy sound when using 808x CPU's, also fixes #355;
OS/2 installer no logner locks up on splash screen on PS/2 Model 70 and 80, fixes #400.
Fixed several Amstead bugs, GEM no longer crashes on the Amstrad 1640, fixes #391.
Ported John Elliott's Amstrad fixes and improvement from PCem, and fixed the default language so it's correctly Engliish, fixes #278, fixes #389.
Fixed a minor IDE timing bug, fixes #388.
Fixed Toshiba T1000 RAM issues, fixes #379.
Fixed EGA/(S)VGA overscan border handling, fixes #378;
Got rid of the now long useless IDE channel 2 auto-removal, fixes #370;
Fixed the BIOS files used by the AMSTRAD PC1512, fixes #366;
Ported the Unicode CD image file name fix from VARCem, fixes #365;
Fixed high density floppy disks on the Xi8088, fixes #359;
Fixed some bugs in the Hercules emulation, fixes #346, fixes #358;
Fixed the SCSI hard disk mode sense pages, fixes #356;
Removed the AMI Unknown 386SX because of impossibility to identify the chipset, closes #349;
Fixed bugs in the serial mouse emulation, fixes #344;
Compiled 86Box binaries now include all the required .DLL's, fixes #341;
Made some combo boxes in the Settings dialog slightly wider, fixes #276.
2019-09-20 14:02:30 +02:00
|
|
|
|
|
|
|
|
return ret;
|
2017-09-02 20:39:57 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
Added the IBM 5161 ISA expansion for PC and XT;
Cleaned up the parallel port emulation, added IRQ support, and made enabling/disabling per port;
Added the Award 430NX and the Intel Classic/PCI (Alfredo, 420TX);
Finished the 586MC1;
Added 8087 emulation;
Moved Cyrix 6x86'es to the Dev branch;
Sanitized/cleaned up memregs.c/h and intel.c/h;
Split the chipsets from machines and sanitized Port 92 emulation;
Added support for the 15bpp mode to the Compaq ATI 28800;
Moved the MR 386DX and 486 machines to the Dev branch;
Ported the new dynamic recompiler from PCem, but it remains in Dev branch until after v2.00;
Ported the new timer code from PCem;
Cleaned up the CPU table of unused stuff and better optimized its structure;
Ported the Open-XT and Open-AT from VARCem, the Open-AT is in the Dev branch;
Ported the XT MFM controller rewrite and adding of more controllers (incl. two RLL ones), from VARCem;
Added the AHA-1540A and the BusTek BT-542B;
Moved the Sumo SCSI-AT to the Dev branch;
Minor IDE, FDC, and floppy drive code clean-ups;
Made NCR 5380/53C400-based cards' BIOS address configurable;
Got rid of the legacy romset variable;
Unified (video) buffer and buffer32 into one and make the unified buffer 32-bit;
Added the Amstead PPC512 per PCem patch by John Elliott;
Switched memory mapping granularity from 16k to 4k (less than 1k not possible due to internal pages);
Rewrote the CL-GD 54xx blitter, fixes Win-OS/2 on the 54x6 among other thing;
Added the Image Manager 1024 and Professional Graphics Controller per PCem patch by John Elliott and work done on VARCem;
Added Headland HT-216, GC-205 and Video 7 VGA 1024i emulation based on PCem commit;
Implemented the fuction keys for the Toshiba T1000/T1200/T3100 enhancement;
Amstrad MegaPC does now works correctly with non-internal graphics card;
The SLiRP code no longer casts a packed struct type to a non-packed struct type;
The Xi8088 and PB410a no longer hang on 86Box when PS/2 mouse is not present;
The S3 Virge on BeOS is no longer broken (was broken by build #1591);
OS/2 2.0 build 6.167 now sees key presses again;
Xi8088 now work on CGA again;
86F images converted from either the old or new variants of the HxC MFM format now work correctly;
Hardware interrupts with a vector of 0xFF are now handled correctly;
OPTi 495SX boards no longer incorrectly have 64 MB maximum RAM when 32 MB is correct;
Fixed VNC keyboard input bugs;
Fixed AT RTC periodic interrupt - Chicago 58s / 73f / 73g / 81 MIDI play no longer hangs with the build's own VTD driver;
Fixed mouse polling with internal mice - Amstrad and Olivetti mice now work correctly;
Triones ATAPI DMA driver now correctly reads a file at the end of a CD image with a sectors number not divisible by 4;
Compaq Portable now works with all graphics cards;
Fixed various MDSI Genius bugs;
Added segment limit checks and improved page fault checks for several CPU instructions - Memphis 15xx WINSETUP and Chicago 58s WINDISK.CPL no longer issue a GPF, and some S3 drivers that used to have glitches, now work correctly;
Further improved the 808x emulation, also fixes the noticably choppy sound when using 808x CPU's, also fixes #355;
OS/2 installer no logner locks up on splash screen on PS/2 Model 70 and 80, fixes #400.
Fixed several Amstead bugs, GEM no longer crashes on the Amstrad 1640, fixes #391.
Ported John Elliott's Amstrad fixes and improvement from PCem, and fixed the default language so it's correctly Engliish, fixes #278, fixes #389.
Fixed a minor IDE timing bug, fixes #388.
Fixed Toshiba T1000 RAM issues, fixes #379.
Fixed EGA/(S)VGA overscan border handling, fixes #378;
Got rid of the now long useless IDE channel 2 auto-removal, fixes #370;
Fixed the BIOS files used by the AMSTRAD PC1512, fixes #366;
Ported the Unicode CD image file name fix from VARCem, fixes #365;
Fixed high density floppy disks on the Xi8088, fixes #359;
Fixed some bugs in the Hercules emulation, fixes #346, fixes #358;
Fixed the SCSI hard disk mode sense pages, fixes #356;
Removed the AMI Unknown 386SX because of impossibility to identify the chipset, closes #349;
Fixed bugs in the serial mouse emulation, fixes #344;
Compiled 86Box binaries now include all the required .DLL's, fixes #341;
Made some combo boxes in the Settings dialog slightly wider, fixes #276.
2019-09-20 14:02:30 +02:00
|
|
|
int
|
2018-03-19 01:02:04 +01:00
|
|
|
machine_ps2_model_55sx_init(const machine_t *model)
|
2017-09-02 20:39:57 +02:00
|
|
|
{
|
Added the IBM 5161 ISA expansion for PC and XT;
Cleaned up the parallel port emulation, added IRQ support, and made enabling/disabling per port;
Added the Award 430NX and the Intel Classic/PCI (Alfredo, 420TX);
Finished the 586MC1;
Added 8087 emulation;
Moved Cyrix 6x86'es to the Dev branch;
Sanitized/cleaned up memregs.c/h and intel.c/h;
Split the chipsets from machines and sanitized Port 92 emulation;
Added support for the 15bpp mode to the Compaq ATI 28800;
Moved the MR 386DX and 486 machines to the Dev branch;
Ported the new dynamic recompiler from PCem, but it remains in Dev branch until after v2.00;
Ported the new timer code from PCem;
Cleaned up the CPU table of unused stuff and better optimized its structure;
Ported the Open-XT and Open-AT from VARCem, the Open-AT is in the Dev branch;
Ported the XT MFM controller rewrite and adding of more controllers (incl. two RLL ones), from VARCem;
Added the AHA-1540A and the BusTek BT-542B;
Moved the Sumo SCSI-AT to the Dev branch;
Minor IDE, FDC, and floppy drive code clean-ups;
Made NCR 5380/53C400-based cards' BIOS address configurable;
Got rid of the legacy romset variable;
Unified (video) buffer and buffer32 into one and make the unified buffer 32-bit;
Added the Amstead PPC512 per PCem patch by John Elliott;
Switched memory mapping granularity from 16k to 4k (less than 1k not possible due to internal pages);
Rewrote the CL-GD 54xx blitter, fixes Win-OS/2 on the 54x6 among other thing;
Added the Image Manager 1024 and Professional Graphics Controller per PCem patch by John Elliott and work done on VARCem;
Added Headland HT-216, GC-205 and Video 7 VGA 1024i emulation based on PCem commit;
Implemented the fuction keys for the Toshiba T1000/T1200/T3100 enhancement;
Amstrad MegaPC does now works correctly with non-internal graphics card;
The SLiRP code no longer casts a packed struct type to a non-packed struct type;
The Xi8088 and PB410a no longer hang on 86Box when PS/2 mouse is not present;
The S3 Virge on BeOS is no longer broken (was broken by build #1591);
OS/2 2.0 build 6.167 now sees key presses again;
Xi8088 now work on CGA again;
86F images converted from either the old or new variants of the HxC MFM format now work correctly;
Hardware interrupts with a vector of 0xFF are now handled correctly;
OPTi 495SX boards no longer incorrectly have 64 MB maximum RAM when 32 MB is correct;
Fixed VNC keyboard input bugs;
Fixed AT RTC periodic interrupt - Chicago 58s / 73f / 73g / 81 MIDI play no longer hangs with the build's own VTD driver;
Fixed mouse polling with internal mice - Amstrad and Olivetti mice now work correctly;
Triones ATAPI DMA driver now correctly reads a file at the end of a CD image with a sectors number not divisible by 4;
Compaq Portable now works with all graphics cards;
Fixed various MDSI Genius bugs;
Added segment limit checks and improved page fault checks for several CPU instructions - Memphis 15xx WINSETUP and Chicago 58s WINDISK.CPL no longer issue a GPF, and some S3 drivers that used to have glitches, now work correctly;
Further improved the 808x emulation, also fixes the noticably choppy sound when using 808x CPU's, also fixes #355;
OS/2 installer no logner locks up on splash screen on PS/2 Model 70 and 80, fixes #400.
Fixed several Amstead bugs, GEM no longer crashes on the Amstrad 1640, fixes #391.
Ported John Elliott's Amstrad fixes and improvement from PCem, and fixed the default language so it's correctly Engliish, fixes #278, fixes #389.
Fixed a minor IDE timing bug, fixes #388.
Fixed Toshiba T1000 RAM issues, fixes #379.
Fixed EGA/(S)VGA overscan border handling, fixes #378;
Got rid of the now long useless IDE channel 2 auto-removal, fixes #370;
Fixed the BIOS files used by the AMSTRAD PC1512, fixes #366;
Ported the Unicode CD image file name fix from VARCem, fixes #365;
Fixed high density floppy disks on the Xi8088, fixes #359;
Fixed some bugs in the Hercules emulation, fixes #346, fixes #358;
Fixed the SCSI hard disk mode sense pages, fixes #356;
Removed the AMI Unknown 386SX because of impossibility to identify the chipset, closes #349;
Fixed bugs in the serial mouse emulation, fixes #344;
Compiled 86Box binaries now include all the required .DLL's, fixes #341;
Made some combo boxes in the Settings dialog slightly wider, fixes #276.
2019-09-20 14:02:30 +02:00
|
|
|
int ret;
|
|
|
|
|
|
2021-03-14 20:35:01 +01:00
|
|
|
ret = bios_load_interleaved("roms/machines/ibmps2_m55sx/33f8146.zm41",
|
|
|
|
|
"roms/machines/ibmps2_m55sx/33f8145.zm40",
|
Added the IBM 5161 ISA expansion for PC and XT;
Cleaned up the parallel port emulation, added IRQ support, and made enabling/disabling per port;
Added the Award 430NX and the Intel Classic/PCI (Alfredo, 420TX);
Finished the 586MC1;
Added 8087 emulation;
Moved Cyrix 6x86'es to the Dev branch;
Sanitized/cleaned up memregs.c/h and intel.c/h;
Split the chipsets from machines and sanitized Port 92 emulation;
Added support for the 15bpp mode to the Compaq ATI 28800;
Moved the MR 386DX and 486 machines to the Dev branch;
Ported the new dynamic recompiler from PCem, but it remains in Dev branch until after v2.00;
Ported the new timer code from PCem;
Cleaned up the CPU table of unused stuff and better optimized its structure;
Ported the Open-XT and Open-AT from VARCem, the Open-AT is in the Dev branch;
Ported the XT MFM controller rewrite and adding of more controllers (incl. two RLL ones), from VARCem;
Added the AHA-1540A and the BusTek BT-542B;
Moved the Sumo SCSI-AT to the Dev branch;
Minor IDE, FDC, and floppy drive code clean-ups;
Made NCR 5380/53C400-based cards' BIOS address configurable;
Got rid of the legacy romset variable;
Unified (video) buffer and buffer32 into one and make the unified buffer 32-bit;
Added the Amstead PPC512 per PCem patch by John Elliott;
Switched memory mapping granularity from 16k to 4k (less than 1k not possible due to internal pages);
Rewrote the CL-GD 54xx blitter, fixes Win-OS/2 on the 54x6 among other thing;
Added the Image Manager 1024 and Professional Graphics Controller per PCem patch by John Elliott and work done on VARCem;
Added Headland HT-216, GC-205 and Video 7 VGA 1024i emulation based on PCem commit;
Implemented the fuction keys for the Toshiba T1000/T1200/T3100 enhancement;
Amstrad MegaPC does now works correctly with non-internal graphics card;
The SLiRP code no longer casts a packed struct type to a non-packed struct type;
The Xi8088 and PB410a no longer hang on 86Box when PS/2 mouse is not present;
The S3 Virge on BeOS is no longer broken (was broken by build #1591);
OS/2 2.0 build 6.167 now sees key presses again;
Xi8088 now work on CGA again;
86F images converted from either the old or new variants of the HxC MFM format now work correctly;
Hardware interrupts with a vector of 0xFF are now handled correctly;
OPTi 495SX boards no longer incorrectly have 64 MB maximum RAM when 32 MB is correct;
Fixed VNC keyboard input bugs;
Fixed AT RTC periodic interrupt - Chicago 58s / 73f / 73g / 81 MIDI play no longer hangs with the build's own VTD driver;
Fixed mouse polling with internal mice - Amstrad and Olivetti mice now work correctly;
Triones ATAPI DMA driver now correctly reads a file at the end of a CD image with a sectors number not divisible by 4;
Compaq Portable now works with all graphics cards;
Fixed various MDSI Genius bugs;
Added segment limit checks and improved page fault checks for several CPU instructions - Memphis 15xx WINSETUP and Chicago 58s WINDISK.CPL no longer issue a GPF, and some S3 drivers that used to have glitches, now work correctly;
Further improved the 808x emulation, also fixes the noticably choppy sound when using 808x CPU's, also fixes #355;
OS/2 installer no logner locks up on splash screen on PS/2 Model 70 and 80, fixes #400.
Fixed several Amstead bugs, GEM no longer crashes on the Amstrad 1640, fixes #391.
Ported John Elliott's Amstrad fixes and improvement from PCem, and fixed the default language so it's correctly Engliish, fixes #278, fixes #389.
Fixed a minor IDE timing bug, fixes #388.
Fixed Toshiba T1000 RAM issues, fixes #379.
Fixed EGA/(S)VGA overscan border handling, fixes #378;
Got rid of the now long useless IDE channel 2 auto-removal, fixes #370;
Fixed the BIOS files used by the AMSTRAD PC1512, fixes #366;
Ported the Unicode CD image file name fix from VARCem, fixes #365;
Fixed high density floppy disks on the Xi8088, fixes #359;
Fixed some bugs in the Hercules emulation, fixes #346, fixes #358;
Fixed the SCSI hard disk mode sense pages, fixes #356;
Removed the AMI Unknown 386SX because of impossibility to identify the chipset, closes #349;
Fixed bugs in the serial mouse emulation, fixes #344;
Compiled 86Box binaries now include all the required .DLL's, fixes #341;
Made some combo boxes in the Settings dialog slightly wider, fixes #276.
2019-09-20 14:02:30 +02:00
|
|
|
0x000e0000, 131072, 0);
|
|
|
|
|
|
|
|
|
|
if (bios_only || !ret)
|
|
|
|
|
return ret;
|
|
|
|
|
|
2017-10-07 22:18:30 -04:00
|
|
|
machine_ps2_common_init(model);
|
|
|
|
|
|
2017-09-02 20:39:57 +02:00
|
|
|
ps2_mca_board_model_55sx_init();
|
Added the IBM 5161 ISA expansion for PC and XT;
Cleaned up the parallel port emulation, added IRQ support, and made enabling/disabling per port;
Added the Award 430NX and the Intel Classic/PCI (Alfredo, 420TX);
Finished the 586MC1;
Added 8087 emulation;
Moved Cyrix 6x86'es to the Dev branch;
Sanitized/cleaned up memregs.c/h and intel.c/h;
Split the chipsets from machines and sanitized Port 92 emulation;
Added support for the 15bpp mode to the Compaq ATI 28800;
Moved the MR 386DX and 486 machines to the Dev branch;
Ported the new dynamic recompiler from PCem, but it remains in Dev branch until after v2.00;
Ported the new timer code from PCem;
Cleaned up the CPU table of unused stuff and better optimized its structure;
Ported the Open-XT and Open-AT from VARCem, the Open-AT is in the Dev branch;
Ported the XT MFM controller rewrite and adding of more controllers (incl. two RLL ones), from VARCem;
Added the AHA-1540A and the BusTek BT-542B;
Moved the Sumo SCSI-AT to the Dev branch;
Minor IDE, FDC, and floppy drive code clean-ups;
Made NCR 5380/53C400-based cards' BIOS address configurable;
Got rid of the legacy romset variable;
Unified (video) buffer and buffer32 into one and make the unified buffer 32-bit;
Added the Amstead PPC512 per PCem patch by John Elliott;
Switched memory mapping granularity from 16k to 4k (less than 1k not possible due to internal pages);
Rewrote the CL-GD 54xx blitter, fixes Win-OS/2 on the 54x6 among other thing;
Added the Image Manager 1024 and Professional Graphics Controller per PCem patch by John Elliott and work done on VARCem;
Added Headland HT-216, GC-205 and Video 7 VGA 1024i emulation based on PCem commit;
Implemented the fuction keys for the Toshiba T1000/T1200/T3100 enhancement;
Amstrad MegaPC does now works correctly with non-internal graphics card;
The SLiRP code no longer casts a packed struct type to a non-packed struct type;
The Xi8088 and PB410a no longer hang on 86Box when PS/2 mouse is not present;
The S3 Virge on BeOS is no longer broken (was broken by build #1591);
OS/2 2.0 build 6.167 now sees key presses again;
Xi8088 now work on CGA again;
86F images converted from either the old or new variants of the HxC MFM format now work correctly;
Hardware interrupts with a vector of 0xFF are now handled correctly;
OPTi 495SX boards no longer incorrectly have 64 MB maximum RAM when 32 MB is correct;
Fixed VNC keyboard input bugs;
Fixed AT RTC periodic interrupt - Chicago 58s / 73f / 73g / 81 MIDI play no longer hangs with the build's own VTD driver;
Fixed mouse polling with internal mice - Amstrad and Olivetti mice now work correctly;
Triones ATAPI DMA driver now correctly reads a file at the end of a CD image with a sectors number not divisible by 4;
Compaq Portable now works with all graphics cards;
Fixed various MDSI Genius bugs;
Added segment limit checks and improved page fault checks for several CPU instructions - Memphis 15xx WINSETUP and Chicago 58s WINDISK.CPL no longer issue a GPF, and some S3 drivers that used to have glitches, now work correctly;
Further improved the 808x emulation, also fixes the noticably choppy sound when using 808x CPU's, also fixes #355;
OS/2 installer no logner locks up on splash screen on PS/2 Model 70 and 80, fixes #400.
Fixed several Amstead bugs, GEM no longer crashes on the Amstrad 1640, fixes #391.
Ported John Elliott's Amstrad fixes and improvement from PCem, and fixed the default language so it's correctly Engliish, fixes #278, fixes #389.
Fixed a minor IDE timing bug, fixes #388.
Fixed Toshiba T1000 RAM issues, fixes #379.
Fixed EGA/(S)VGA overscan border handling, fixes #378;
Got rid of the now long useless IDE channel 2 auto-removal, fixes #370;
Fixed the BIOS files used by the AMSTRAD PC1512, fixes #366;
Ported the Unicode CD image file name fix from VARCem, fixes #365;
Fixed high density floppy disks on the Xi8088, fixes #359;
Fixed some bugs in the Hercules emulation, fixes #346, fixes #358;
Fixed the SCSI hard disk mode sense pages, fixes #356;
Removed the AMI Unknown 386SX because of impossibility to identify the chipset, closes #349;
Fixed bugs in the serial mouse emulation, fixes #344;
Compiled 86Box binaries now include all the required .DLL's, fixes #341;
Made some combo boxes in the Settings dialog slightly wider, fixes #276.
2019-09-20 14:02:30 +02:00
|
|
|
|
|
|
|
|
return ret;
|
2017-09-02 20:39:57 +02:00
|
|
|
}
|
|
|
|
|
|
Added the IBM 5161 ISA expansion for PC and XT;
Cleaned up the parallel port emulation, added IRQ support, and made enabling/disabling per port;
Added the Award 430NX and the Intel Classic/PCI (Alfredo, 420TX);
Finished the 586MC1;
Added 8087 emulation;
Moved Cyrix 6x86'es to the Dev branch;
Sanitized/cleaned up memregs.c/h and intel.c/h;
Split the chipsets from machines and sanitized Port 92 emulation;
Added support for the 15bpp mode to the Compaq ATI 28800;
Moved the MR 386DX and 486 machines to the Dev branch;
Ported the new dynamic recompiler from PCem, but it remains in Dev branch until after v2.00;
Ported the new timer code from PCem;
Cleaned up the CPU table of unused stuff and better optimized its structure;
Ported the Open-XT and Open-AT from VARCem, the Open-AT is in the Dev branch;
Ported the XT MFM controller rewrite and adding of more controllers (incl. two RLL ones), from VARCem;
Added the AHA-1540A and the BusTek BT-542B;
Moved the Sumo SCSI-AT to the Dev branch;
Minor IDE, FDC, and floppy drive code clean-ups;
Made NCR 5380/53C400-based cards' BIOS address configurable;
Got rid of the legacy romset variable;
Unified (video) buffer and buffer32 into one and make the unified buffer 32-bit;
Added the Amstead PPC512 per PCem patch by John Elliott;
Switched memory mapping granularity from 16k to 4k (less than 1k not possible due to internal pages);
Rewrote the CL-GD 54xx blitter, fixes Win-OS/2 on the 54x6 among other thing;
Added the Image Manager 1024 and Professional Graphics Controller per PCem patch by John Elliott and work done on VARCem;
Added Headland HT-216, GC-205 and Video 7 VGA 1024i emulation based on PCem commit;
Implemented the fuction keys for the Toshiba T1000/T1200/T3100 enhancement;
Amstrad MegaPC does now works correctly with non-internal graphics card;
The SLiRP code no longer casts a packed struct type to a non-packed struct type;
The Xi8088 and PB410a no longer hang on 86Box when PS/2 mouse is not present;
The S3 Virge on BeOS is no longer broken (was broken by build #1591);
OS/2 2.0 build 6.167 now sees key presses again;
Xi8088 now work on CGA again;
86F images converted from either the old or new variants of the HxC MFM format now work correctly;
Hardware interrupts with a vector of 0xFF are now handled correctly;
OPTi 495SX boards no longer incorrectly have 64 MB maximum RAM when 32 MB is correct;
Fixed VNC keyboard input bugs;
Fixed AT RTC periodic interrupt - Chicago 58s / 73f / 73g / 81 MIDI play no longer hangs with the build's own VTD driver;
Fixed mouse polling with internal mice - Amstrad and Olivetti mice now work correctly;
Triones ATAPI DMA driver now correctly reads a file at the end of a CD image with a sectors number not divisible by 4;
Compaq Portable now works with all graphics cards;
Fixed various MDSI Genius bugs;
Added segment limit checks and improved page fault checks for several CPU instructions - Memphis 15xx WINSETUP and Chicago 58s WINDISK.CPL no longer issue a GPF, and some S3 drivers that used to have glitches, now work correctly;
Further improved the 808x emulation, also fixes the noticably choppy sound when using 808x CPU's, also fixes #355;
OS/2 installer no logner locks up on splash screen on PS/2 Model 70 and 80, fixes #400.
Fixed several Amstead bugs, GEM no longer crashes on the Amstrad 1640, fixes #391.
Ported John Elliott's Amstrad fixes and improvement from PCem, and fixed the default language so it's correctly Engliish, fixes #278, fixes #389.
Fixed a minor IDE timing bug, fixes #388.
Fixed Toshiba T1000 RAM issues, fixes #379.
Fixed EGA/(S)VGA overscan border handling, fixes #378;
Got rid of the now long useless IDE channel 2 auto-removal, fixes #370;
Fixed the BIOS files used by the AMSTRAD PC1512, fixes #366;
Ported the Unicode CD image file name fix from VARCem, fixes #365;
Fixed high density floppy disks on the Xi8088, fixes #359;
Fixed some bugs in the Hercules emulation, fixes #346, fixes #358;
Fixed the SCSI hard disk mode sense pages, fixes #356;
Removed the AMI Unknown 386SX because of impossibility to identify the chipset, closes #349;
Fixed bugs in the serial mouse emulation, fixes #344;
Compiled 86Box binaries now include all the required .DLL's, fixes #341;
Made some combo boxes in the Settings dialog slightly wider, fixes #276.
2019-09-20 14:02:30 +02:00
|
|
|
|
|
|
|
|
int
|
2018-03-19 01:02:04 +01:00
|
|
|
machine_ps2_model_70_type3_init(const machine_t *model)
|
2018-03-11 18:26:44 +01:00
|
|
|
{
|
Added the IBM 5161 ISA expansion for PC and XT;
Cleaned up the parallel port emulation, added IRQ support, and made enabling/disabling per port;
Added the Award 430NX and the Intel Classic/PCI (Alfredo, 420TX);
Finished the 586MC1;
Added 8087 emulation;
Moved Cyrix 6x86'es to the Dev branch;
Sanitized/cleaned up memregs.c/h and intel.c/h;
Split the chipsets from machines and sanitized Port 92 emulation;
Added support for the 15bpp mode to the Compaq ATI 28800;
Moved the MR 386DX and 486 machines to the Dev branch;
Ported the new dynamic recompiler from PCem, but it remains in Dev branch until after v2.00;
Ported the new timer code from PCem;
Cleaned up the CPU table of unused stuff and better optimized its structure;
Ported the Open-XT and Open-AT from VARCem, the Open-AT is in the Dev branch;
Ported the XT MFM controller rewrite and adding of more controllers (incl. two RLL ones), from VARCem;
Added the AHA-1540A and the BusTek BT-542B;
Moved the Sumo SCSI-AT to the Dev branch;
Minor IDE, FDC, and floppy drive code clean-ups;
Made NCR 5380/53C400-based cards' BIOS address configurable;
Got rid of the legacy romset variable;
Unified (video) buffer and buffer32 into one and make the unified buffer 32-bit;
Added the Amstead PPC512 per PCem patch by John Elliott;
Switched memory mapping granularity from 16k to 4k (less than 1k not possible due to internal pages);
Rewrote the CL-GD 54xx blitter, fixes Win-OS/2 on the 54x6 among other thing;
Added the Image Manager 1024 and Professional Graphics Controller per PCem patch by John Elliott and work done on VARCem;
Added Headland HT-216, GC-205 and Video 7 VGA 1024i emulation based on PCem commit;
Implemented the fuction keys for the Toshiba T1000/T1200/T3100 enhancement;
Amstrad MegaPC does now works correctly with non-internal graphics card;
The SLiRP code no longer casts a packed struct type to a non-packed struct type;
The Xi8088 and PB410a no longer hang on 86Box when PS/2 mouse is not present;
The S3 Virge on BeOS is no longer broken (was broken by build #1591);
OS/2 2.0 build 6.167 now sees key presses again;
Xi8088 now work on CGA again;
86F images converted from either the old or new variants of the HxC MFM format now work correctly;
Hardware interrupts with a vector of 0xFF are now handled correctly;
OPTi 495SX boards no longer incorrectly have 64 MB maximum RAM when 32 MB is correct;
Fixed VNC keyboard input bugs;
Fixed AT RTC periodic interrupt - Chicago 58s / 73f / 73g / 81 MIDI play no longer hangs with the build's own VTD driver;
Fixed mouse polling with internal mice - Amstrad and Olivetti mice now work correctly;
Triones ATAPI DMA driver now correctly reads a file at the end of a CD image with a sectors number not divisible by 4;
Compaq Portable now works with all graphics cards;
Fixed various MDSI Genius bugs;
Added segment limit checks and improved page fault checks for several CPU instructions - Memphis 15xx WINSETUP and Chicago 58s WINDISK.CPL no longer issue a GPF, and some S3 drivers that used to have glitches, now work correctly;
Further improved the 808x emulation, also fixes the noticably choppy sound when using 808x CPU's, also fixes #355;
OS/2 installer no logner locks up on splash screen on PS/2 Model 70 and 80, fixes #400.
Fixed several Amstead bugs, GEM no longer crashes on the Amstrad 1640, fixes #391.
Ported John Elliott's Amstrad fixes and improvement from PCem, and fixed the default language so it's correctly Engliish, fixes #278, fixes #389.
Fixed a minor IDE timing bug, fixes #388.
Fixed Toshiba T1000 RAM issues, fixes #379.
Fixed EGA/(S)VGA overscan border handling, fixes #378;
Got rid of the now long useless IDE channel 2 auto-removal, fixes #370;
Fixed the BIOS files used by the AMSTRAD PC1512, fixes #366;
Ported the Unicode CD image file name fix from VARCem, fixes #365;
Fixed high density floppy disks on the Xi8088, fixes #359;
Fixed some bugs in the Hercules emulation, fixes #346, fixes #358;
Fixed the SCSI hard disk mode sense pages, fixes #356;
Removed the AMI Unknown 386SX because of impossibility to identify the chipset, closes #349;
Fixed bugs in the serial mouse emulation, fixes #344;
Compiled 86Box binaries now include all the required .DLL's, fixes #341;
Made some combo boxes in the Settings dialog slightly wider, fixes #276.
2019-09-20 14:02:30 +02:00
|
|
|
int ret;
|
|
|
|
|
|
2021-03-14 20:35:01 +01:00
|
|
|
ret = bios_load_interleaved("roms/machines/ibmps2_m70_type3/70-a_even.bin",
|
|
|
|
|
"roms/machines/ibmps2_m70_type3/70-a_odd.bin",
|
Added the IBM 5161 ISA expansion for PC and XT;
Cleaned up the parallel port emulation, added IRQ support, and made enabling/disabling per port;
Added the Award 430NX and the Intel Classic/PCI (Alfredo, 420TX);
Finished the 586MC1;
Added 8087 emulation;
Moved Cyrix 6x86'es to the Dev branch;
Sanitized/cleaned up memregs.c/h and intel.c/h;
Split the chipsets from machines and sanitized Port 92 emulation;
Added support for the 15bpp mode to the Compaq ATI 28800;
Moved the MR 386DX and 486 machines to the Dev branch;
Ported the new dynamic recompiler from PCem, but it remains in Dev branch until after v2.00;
Ported the new timer code from PCem;
Cleaned up the CPU table of unused stuff and better optimized its structure;
Ported the Open-XT and Open-AT from VARCem, the Open-AT is in the Dev branch;
Ported the XT MFM controller rewrite and adding of more controllers (incl. two RLL ones), from VARCem;
Added the AHA-1540A and the BusTek BT-542B;
Moved the Sumo SCSI-AT to the Dev branch;
Minor IDE, FDC, and floppy drive code clean-ups;
Made NCR 5380/53C400-based cards' BIOS address configurable;
Got rid of the legacy romset variable;
Unified (video) buffer and buffer32 into one and make the unified buffer 32-bit;
Added the Amstead PPC512 per PCem patch by John Elliott;
Switched memory mapping granularity from 16k to 4k (less than 1k not possible due to internal pages);
Rewrote the CL-GD 54xx blitter, fixes Win-OS/2 on the 54x6 among other thing;
Added the Image Manager 1024 and Professional Graphics Controller per PCem patch by John Elliott and work done on VARCem;
Added Headland HT-216, GC-205 and Video 7 VGA 1024i emulation based on PCem commit;
Implemented the fuction keys for the Toshiba T1000/T1200/T3100 enhancement;
Amstrad MegaPC does now works correctly with non-internal graphics card;
The SLiRP code no longer casts a packed struct type to a non-packed struct type;
The Xi8088 and PB410a no longer hang on 86Box when PS/2 mouse is not present;
The S3 Virge on BeOS is no longer broken (was broken by build #1591);
OS/2 2.0 build 6.167 now sees key presses again;
Xi8088 now work on CGA again;
86F images converted from either the old or new variants of the HxC MFM format now work correctly;
Hardware interrupts with a vector of 0xFF are now handled correctly;
OPTi 495SX boards no longer incorrectly have 64 MB maximum RAM when 32 MB is correct;
Fixed VNC keyboard input bugs;
Fixed AT RTC periodic interrupt - Chicago 58s / 73f / 73g / 81 MIDI play no longer hangs with the build's own VTD driver;
Fixed mouse polling with internal mice - Amstrad and Olivetti mice now work correctly;
Triones ATAPI DMA driver now correctly reads a file at the end of a CD image with a sectors number not divisible by 4;
Compaq Portable now works with all graphics cards;
Fixed various MDSI Genius bugs;
Added segment limit checks and improved page fault checks for several CPU instructions - Memphis 15xx WINSETUP and Chicago 58s WINDISK.CPL no longer issue a GPF, and some S3 drivers that used to have glitches, now work correctly;
Further improved the 808x emulation, also fixes the noticably choppy sound when using 808x CPU's, also fixes #355;
OS/2 installer no logner locks up on splash screen on PS/2 Model 70 and 80, fixes #400.
Fixed several Amstead bugs, GEM no longer crashes on the Amstrad 1640, fixes #391.
Ported John Elliott's Amstrad fixes and improvement from PCem, and fixed the default language so it's correctly Engliish, fixes #278, fixes #389.
Fixed a minor IDE timing bug, fixes #388.
Fixed Toshiba T1000 RAM issues, fixes #379.
Fixed EGA/(S)VGA overscan border handling, fixes #378;
Got rid of the now long useless IDE channel 2 auto-removal, fixes #370;
Fixed the BIOS files used by the AMSTRAD PC1512, fixes #366;
Ported the Unicode CD image file name fix from VARCem, fixes #365;
Fixed high density floppy disks on the Xi8088, fixes #359;
Fixed some bugs in the Hercules emulation, fixes #346, fixes #358;
Fixed the SCSI hard disk mode sense pages, fixes #356;
Removed the AMI Unknown 386SX because of impossibility to identify the chipset, closes #349;
Fixed bugs in the serial mouse emulation, fixes #344;
Compiled 86Box binaries now include all the required .DLL's, fixes #341;
Made some combo boxes in the Settings dialog slightly wider, fixes #276.
2019-09-20 14:02:30 +02:00
|
|
|
0x000e0000, 131072, 0);
|
|
|
|
|
|
|
|
|
|
if (bios_only || !ret)
|
|
|
|
|
return ret;
|
|
|
|
|
|
2018-03-11 18:26:44 +01:00
|
|
|
machine_ps2_common_init(model);
|
2021-06-15 17:38:31 +02:00
|
|
|
|
|
|
|
|
ps2.planar_id = 0xf9ff;
|
2018-03-11 18:26:44 +01:00
|
|
|
|
2021-06-15 17:38:31 +02:00
|
|
|
ps2_mca_board_model_70_type34_init(0, 4);
|
Added the IBM 5161 ISA expansion for PC and XT;
Cleaned up the parallel port emulation, added IRQ support, and made enabling/disabling per port;
Added the Award 430NX and the Intel Classic/PCI (Alfredo, 420TX);
Finished the 586MC1;
Added 8087 emulation;
Moved Cyrix 6x86'es to the Dev branch;
Sanitized/cleaned up memregs.c/h and intel.c/h;
Split the chipsets from machines and sanitized Port 92 emulation;
Added support for the 15bpp mode to the Compaq ATI 28800;
Moved the MR 386DX and 486 machines to the Dev branch;
Ported the new dynamic recompiler from PCem, but it remains in Dev branch until after v2.00;
Ported the new timer code from PCem;
Cleaned up the CPU table of unused stuff and better optimized its structure;
Ported the Open-XT and Open-AT from VARCem, the Open-AT is in the Dev branch;
Ported the XT MFM controller rewrite and adding of more controllers (incl. two RLL ones), from VARCem;
Added the AHA-1540A and the BusTek BT-542B;
Moved the Sumo SCSI-AT to the Dev branch;
Minor IDE, FDC, and floppy drive code clean-ups;
Made NCR 5380/53C400-based cards' BIOS address configurable;
Got rid of the legacy romset variable;
Unified (video) buffer and buffer32 into one and make the unified buffer 32-bit;
Added the Amstead PPC512 per PCem patch by John Elliott;
Switched memory mapping granularity from 16k to 4k (less than 1k not possible due to internal pages);
Rewrote the CL-GD 54xx blitter, fixes Win-OS/2 on the 54x6 among other thing;
Added the Image Manager 1024 and Professional Graphics Controller per PCem patch by John Elliott and work done on VARCem;
Added Headland HT-216, GC-205 and Video 7 VGA 1024i emulation based on PCem commit;
Implemented the fuction keys for the Toshiba T1000/T1200/T3100 enhancement;
Amstrad MegaPC does now works correctly with non-internal graphics card;
The SLiRP code no longer casts a packed struct type to a non-packed struct type;
The Xi8088 and PB410a no longer hang on 86Box when PS/2 mouse is not present;
The S3 Virge on BeOS is no longer broken (was broken by build #1591);
OS/2 2.0 build 6.167 now sees key presses again;
Xi8088 now work on CGA again;
86F images converted from either the old or new variants of the HxC MFM format now work correctly;
Hardware interrupts with a vector of 0xFF are now handled correctly;
OPTi 495SX boards no longer incorrectly have 64 MB maximum RAM when 32 MB is correct;
Fixed VNC keyboard input bugs;
Fixed AT RTC periodic interrupt - Chicago 58s / 73f / 73g / 81 MIDI play no longer hangs with the build's own VTD driver;
Fixed mouse polling with internal mice - Amstrad and Olivetti mice now work correctly;
Triones ATAPI DMA driver now correctly reads a file at the end of a CD image with a sectors number not divisible by 4;
Compaq Portable now works with all graphics cards;
Fixed various MDSI Genius bugs;
Added segment limit checks and improved page fault checks for several CPU instructions - Memphis 15xx WINSETUP and Chicago 58s WINDISK.CPL no longer issue a GPF, and some S3 drivers that used to have glitches, now work correctly;
Further improved the 808x emulation, also fixes the noticably choppy sound when using 808x CPU's, also fixes #355;
OS/2 installer no logner locks up on splash screen on PS/2 Model 70 and 80, fixes #400.
Fixed several Amstead bugs, GEM no longer crashes on the Amstrad 1640, fixes #391.
Ported John Elliott's Amstrad fixes and improvement from PCem, and fixed the default language so it's correctly Engliish, fixes #278, fixes #389.
Fixed a minor IDE timing bug, fixes #388.
Fixed Toshiba T1000 RAM issues, fixes #379.
Fixed EGA/(S)VGA overscan border handling, fixes #378;
Got rid of the now long useless IDE channel 2 auto-removal, fixes #370;
Fixed the BIOS files used by the AMSTRAD PC1512, fixes #366;
Ported the Unicode CD image file name fix from VARCem, fixes #365;
Fixed high density floppy disks on the Xi8088, fixes #359;
Fixed some bugs in the Hercules emulation, fixes #346, fixes #358;
Fixed the SCSI hard disk mode sense pages, fixes #356;
Removed the AMI Unknown 386SX because of impossibility to identify the chipset, closes #349;
Fixed bugs in the serial mouse emulation, fixes #344;
Compiled 86Box binaries now include all the required .DLL's, fixes #341;
Made some combo boxes in the Settings dialog slightly wider, fixes #276.
2019-09-20 14:02:30 +02:00
|
|
|
|
|
|
|
|
return ret;
|
2018-03-11 18:26:44 +01:00
|
|
|
}
|
|
|
|
|
|
Added the IBM 5161 ISA expansion for PC and XT;
Cleaned up the parallel port emulation, added IRQ support, and made enabling/disabling per port;
Added the Award 430NX and the Intel Classic/PCI (Alfredo, 420TX);
Finished the 586MC1;
Added 8087 emulation;
Moved Cyrix 6x86'es to the Dev branch;
Sanitized/cleaned up memregs.c/h and intel.c/h;
Split the chipsets from machines and sanitized Port 92 emulation;
Added support for the 15bpp mode to the Compaq ATI 28800;
Moved the MR 386DX and 486 machines to the Dev branch;
Ported the new dynamic recompiler from PCem, but it remains in Dev branch until after v2.00;
Ported the new timer code from PCem;
Cleaned up the CPU table of unused stuff and better optimized its structure;
Ported the Open-XT and Open-AT from VARCem, the Open-AT is in the Dev branch;
Ported the XT MFM controller rewrite and adding of more controllers (incl. two RLL ones), from VARCem;
Added the AHA-1540A and the BusTek BT-542B;
Moved the Sumo SCSI-AT to the Dev branch;
Minor IDE, FDC, and floppy drive code clean-ups;
Made NCR 5380/53C400-based cards' BIOS address configurable;
Got rid of the legacy romset variable;
Unified (video) buffer and buffer32 into one and make the unified buffer 32-bit;
Added the Amstead PPC512 per PCem patch by John Elliott;
Switched memory mapping granularity from 16k to 4k (less than 1k not possible due to internal pages);
Rewrote the CL-GD 54xx blitter, fixes Win-OS/2 on the 54x6 among other thing;
Added the Image Manager 1024 and Professional Graphics Controller per PCem patch by John Elliott and work done on VARCem;
Added Headland HT-216, GC-205 and Video 7 VGA 1024i emulation based on PCem commit;
Implemented the fuction keys for the Toshiba T1000/T1200/T3100 enhancement;
Amstrad MegaPC does now works correctly with non-internal graphics card;
The SLiRP code no longer casts a packed struct type to a non-packed struct type;
The Xi8088 and PB410a no longer hang on 86Box when PS/2 mouse is not present;
The S3 Virge on BeOS is no longer broken (was broken by build #1591);
OS/2 2.0 build 6.167 now sees key presses again;
Xi8088 now work on CGA again;
86F images converted from either the old or new variants of the HxC MFM format now work correctly;
Hardware interrupts with a vector of 0xFF are now handled correctly;
OPTi 495SX boards no longer incorrectly have 64 MB maximum RAM when 32 MB is correct;
Fixed VNC keyboard input bugs;
Fixed AT RTC periodic interrupt - Chicago 58s / 73f / 73g / 81 MIDI play no longer hangs with the build's own VTD driver;
Fixed mouse polling with internal mice - Amstrad and Olivetti mice now work correctly;
Triones ATAPI DMA driver now correctly reads a file at the end of a CD image with a sectors number not divisible by 4;
Compaq Portable now works with all graphics cards;
Fixed various MDSI Genius bugs;
Added segment limit checks and improved page fault checks for several CPU instructions - Memphis 15xx WINSETUP and Chicago 58s WINDISK.CPL no longer issue a GPF, and some S3 drivers that used to have glitches, now work correctly;
Further improved the 808x emulation, also fixes the noticably choppy sound when using 808x CPU's, also fixes #355;
OS/2 installer no logner locks up on splash screen on PS/2 Model 70 and 80, fixes #400.
Fixed several Amstead bugs, GEM no longer crashes on the Amstrad 1640, fixes #391.
Ported John Elliott's Amstrad fixes and improvement from PCem, and fixed the default language so it's correctly Engliish, fixes #278, fixes #389.
Fixed a minor IDE timing bug, fixes #388.
Fixed Toshiba T1000 RAM issues, fixes #379.
Fixed EGA/(S)VGA overscan border handling, fixes #378;
Got rid of the now long useless IDE channel 2 auto-removal, fixes #370;
Fixed the BIOS files used by the AMSTRAD PC1512, fixes #366;
Ported the Unicode CD image file name fix from VARCem, fixes #365;
Fixed high density floppy disks on the Xi8088, fixes #359;
Fixed some bugs in the Hercules emulation, fixes #346, fixes #358;
Fixed the SCSI hard disk mode sense pages, fixes #356;
Removed the AMI Unknown 386SX because of impossibility to identify the chipset, closes #349;
Fixed bugs in the serial mouse emulation, fixes #344;
Compiled 86Box binaries now include all the required .DLL's, fixes #341;
Made some combo boxes in the Settings dialog slightly wider, fixes #276.
2019-09-20 14:02:30 +02:00
|
|
|
|
|
|
|
|
int
|
2018-03-19 01:02:04 +01:00
|
|
|
machine_ps2_model_80_init(const machine_t *model)
|
2017-09-02 20:39:57 +02:00
|
|
|
{
|
Added the IBM 5161 ISA expansion for PC and XT;
Cleaned up the parallel port emulation, added IRQ support, and made enabling/disabling per port;
Added the Award 430NX and the Intel Classic/PCI (Alfredo, 420TX);
Finished the 586MC1;
Added 8087 emulation;
Moved Cyrix 6x86'es to the Dev branch;
Sanitized/cleaned up memregs.c/h and intel.c/h;
Split the chipsets from machines and sanitized Port 92 emulation;
Added support for the 15bpp mode to the Compaq ATI 28800;
Moved the MR 386DX and 486 machines to the Dev branch;
Ported the new dynamic recompiler from PCem, but it remains in Dev branch until after v2.00;
Ported the new timer code from PCem;
Cleaned up the CPU table of unused stuff and better optimized its structure;
Ported the Open-XT and Open-AT from VARCem, the Open-AT is in the Dev branch;
Ported the XT MFM controller rewrite and adding of more controllers (incl. two RLL ones), from VARCem;
Added the AHA-1540A and the BusTek BT-542B;
Moved the Sumo SCSI-AT to the Dev branch;
Minor IDE, FDC, and floppy drive code clean-ups;
Made NCR 5380/53C400-based cards' BIOS address configurable;
Got rid of the legacy romset variable;
Unified (video) buffer and buffer32 into one and make the unified buffer 32-bit;
Added the Amstead PPC512 per PCem patch by John Elliott;
Switched memory mapping granularity from 16k to 4k (less than 1k not possible due to internal pages);
Rewrote the CL-GD 54xx blitter, fixes Win-OS/2 on the 54x6 among other thing;
Added the Image Manager 1024 and Professional Graphics Controller per PCem patch by John Elliott and work done on VARCem;
Added Headland HT-216, GC-205 and Video 7 VGA 1024i emulation based on PCem commit;
Implemented the fuction keys for the Toshiba T1000/T1200/T3100 enhancement;
Amstrad MegaPC does now works correctly with non-internal graphics card;
The SLiRP code no longer casts a packed struct type to a non-packed struct type;
The Xi8088 and PB410a no longer hang on 86Box when PS/2 mouse is not present;
The S3 Virge on BeOS is no longer broken (was broken by build #1591);
OS/2 2.0 build 6.167 now sees key presses again;
Xi8088 now work on CGA again;
86F images converted from either the old or new variants of the HxC MFM format now work correctly;
Hardware interrupts with a vector of 0xFF are now handled correctly;
OPTi 495SX boards no longer incorrectly have 64 MB maximum RAM when 32 MB is correct;
Fixed VNC keyboard input bugs;
Fixed AT RTC periodic interrupt - Chicago 58s / 73f / 73g / 81 MIDI play no longer hangs with the build's own VTD driver;
Fixed mouse polling with internal mice - Amstrad and Olivetti mice now work correctly;
Triones ATAPI DMA driver now correctly reads a file at the end of a CD image with a sectors number not divisible by 4;
Compaq Portable now works with all graphics cards;
Fixed various MDSI Genius bugs;
Added segment limit checks and improved page fault checks for several CPU instructions - Memphis 15xx WINSETUP and Chicago 58s WINDISK.CPL no longer issue a GPF, and some S3 drivers that used to have glitches, now work correctly;
Further improved the 808x emulation, also fixes the noticably choppy sound when using 808x CPU's, also fixes #355;
OS/2 installer no logner locks up on splash screen on PS/2 Model 70 and 80, fixes #400.
Fixed several Amstead bugs, GEM no longer crashes on the Amstrad 1640, fixes #391.
Ported John Elliott's Amstrad fixes and improvement from PCem, and fixed the default language so it's correctly Engliish, fixes #278, fixes #389.
Fixed a minor IDE timing bug, fixes #388.
Fixed Toshiba T1000 RAM issues, fixes #379.
Fixed EGA/(S)VGA overscan border handling, fixes #378;
Got rid of the now long useless IDE channel 2 auto-removal, fixes #370;
Fixed the BIOS files used by the AMSTRAD PC1512, fixes #366;
Ported the Unicode CD image file name fix from VARCem, fixes #365;
Fixed high density floppy disks on the Xi8088, fixes #359;
Fixed some bugs in the Hercules emulation, fixes #346, fixes #358;
Fixed the SCSI hard disk mode sense pages, fixes #356;
Removed the AMI Unknown 386SX because of impossibility to identify the chipset, closes #349;
Fixed bugs in the serial mouse emulation, fixes #344;
Compiled 86Box binaries now include all the required .DLL's, fixes #341;
Made some combo boxes in the Settings dialog slightly wider, fixes #276.
2019-09-20 14:02:30 +02:00
|
|
|
int ret;
|
|
|
|
|
|
2021-03-14 20:35:01 +01:00
|
|
|
ret = bios_load_interleaved("roms/machines/ibmps2_m80/15f6637.bin",
|
|
|
|
|
"roms/machines/ibmps2_m80/15f6639.bin",
|
Added the IBM 5161 ISA expansion for PC and XT;
Cleaned up the parallel port emulation, added IRQ support, and made enabling/disabling per port;
Added the Award 430NX and the Intel Classic/PCI (Alfredo, 420TX);
Finished the 586MC1;
Added 8087 emulation;
Moved Cyrix 6x86'es to the Dev branch;
Sanitized/cleaned up memregs.c/h and intel.c/h;
Split the chipsets from machines and sanitized Port 92 emulation;
Added support for the 15bpp mode to the Compaq ATI 28800;
Moved the MR 386DX and 486 machines to the Dev branch;
Ported the new dynamic recompiler from PCem, but it remains in Dev branch until after v2.00;
Ported the new timer code from PCem;
Cleaned up the CPU table of unused stuff and better optimized its structure;
Ported the Open-XT and Open-AT from VARCem, the Open-AT is in the Dev branch;
Ported the XT MFM controller rewrite and adding of more controllers (incl. two RLL ones), from VARCem;
Added the AHA-1540A and the BusTek BT-542B;
Moved the Sumo SCSI-AT to the Dev branch;
Minor IDE, FDC, and floppy drive code clean-ups;
Made NCR 5380/53C400-based cards' BIOS address configurable;
Got rid of the legacy romset variable;
Unified (video) buffer and buffer32 into one and make the unified buffer 32-bit;
Added the Amstead PPC512 per PCem patch by John Elliott;
Switched memory mapping granularity from 16k to 4k (less than 1k not possible due to internal pages);
Rewrote the CL-GD 54xx blitter, fixes Win-OS/2 on the 54x6 among other thing;
Added the Image Manager 1024 and Professional Graphics Controller per PCem patch by John Elliott and work done on VARCem;
Added Headland HT-216, GC-205 and Video 7 VGA 1024i emulation based on PCem commit;
Implemented the fuction keys for the Toshiba T1000/T1200/T3100 enhancement;
Amstrad MegaPC does now works correctly with non-internal graphics card;
The SLiRP code no longer casts a packed struct type to a non-packed struct type;
The Xi8088 and PB410a no longer hang on 86Box when PS/2 mouse is not present;
The S3 Virge on BeOS is no longer broken (was broken by build #1591);
OS/2 2.0 build 6.167 now sees key presses again;
Xi8088 now work on CGA again;
86F images converted from either the old or new variants of the HxC MFM format now work correctly;
Hardware interrupts with a vector of 0xFF are now handled correctly;
OPTi 495SX boards no longer incorrectly have 64 MB maximum RAM when 32 MB is correct;
Fixed VNC keyboard input bugs;
Fixed AT RTC periodic interrupt - Chicago 58s / 73f / 73g / 81 MIDI play no longer hangs with the build's own VTD driver;
Fixed mouse polling with internal mice - Amstrad and Olivetti mice now work correctly;
Triones ATAPI DMA driver now correctly reads a file at the end of a CD image with a sectors number not divisible by 4;
Compaq Portable now works with all graphics cards;
Fixed various MDSI Genius bugs;
Added segment limit checks and improved page fault checks for several CPU instructions - Memphis 15xx WINSETUP and Chicago 58s WINDISK.CPL no longer issue a GPF, and some S3 drivers that used to have glitches, now work correctly;
Further improved the 808x emulation, also fixes the noticably choppy sound when using 808x CPU's, also fixes #355;
OS/2 installer no logner locks up on splash screen on PS/2 Model 70 and 80, fixes #400.
Fixed several Amstead bugs, GEM no longer crashes on the Amstrad 1640, fixes #391.
Ported John Elliott's Amstrad fixes and improvement from PCem, and fixed the default language so it's correctly Engliish, fixes #278, fixes #389.
Fixed a minor IDE timing bug, fixes #388.
Fixed Toshiba T1000 RAM issues, fixes #379.
Fixed EGA/(S)VGA overscan border handling, fixes #378;
Got rid of the now long useless IDE channel 2 auto-removal, fixes #370;
Fixed the BIOS files used by the AMSTRAD PC1512, fixes #366;
Ported the Unicode CD image file name fix from VARCem, fixes #365;
Fixed high density floppy disks on the Xi8088, fixes #359;
Fixed some bugs in the Hercules emulation, fixes #346, fixes #358;
Fixed the SCSI hard disk mode sense pages, fixes #356;
Removed the AMI Unknown 386SX because of impossibility to identify the chipset, closes #349;
Fixed bugs in the serial mouse emulation, fixes #344;
Compiled 86Box binaries now include all the required .DLL's, fixes #341;
Made some combo boxes in the Settings dialog slightly wider, fixes #276.
2019-09-20 14:02:30 +02:00
|
|
|
0x000e0000, 131072, 0);
|
|
|
|
|
|
|
|
|
|
if (bios_only || !ret)
|
|
|
|
|
return ret;
|
|
|
|
|
|
2017-10-07 22:18:30 -04:00
|
|
|
machine_ps2_common_init(model);
|
|
|
|
|
|
2017-12-05 22:58:34 +01:00
|
|
|
ps2_mca_board_model_80_type2_init(0);
|
Added the IBM 5161 ISA expansion for PC and XT;
Cleaned up the parallel port emulation, added IRQ support, and made enabling/disabling per port;
Added the Award 430NX and the Intel Classic/PCI (Alfredo, 420TX);
Finished the 586MC1;
Added 8087 emulation;
Moved Cyrix 6x86'es to the Dev branch;
Sanitized/cleaned up memregs.c/h and intel.c/h;
Split the chipsets from machines and sanitized Port 92 emulation;
Added support for the 15bpp mode to the Compaq ATI 28800;
Moved the MR 386DX and 486 machines to the Dev branch;
Ported the new dynamic recompiler from PCem, but it remains in Dev branch until after v2.00;
Ported the new timer code from PCem;
Cleaned up the CPU table of unused stuff and better optimized its structure;
Ported the Open-XT and Open-AT from VARCem, the Open-AT is in the Dev branch;
Ported the XT MFM controller rewrite and adding of more controllers (incl. two RLL ones), from VARCem;
Added the AHA-1540A and the BusTek BT-542B;
Moved the Sumo SCSI-AT to the Dev branch;
Minor IDE, FDC, and floppy drive code clean-ups;
Made NCR 5380/53C400-based cards' BIOS address configurable;
Got rid of the legacy romset variable;
Unified (video) buffer and buffer32 into one and make the unified buffer 32-bit;
Added the Amstead PPC512 per PCem patch by John Elliott;
Switched memory mapping granularity from 16k to 4k (less than 1k not possible due to internal pages);
Rewrote the CL-GD 54xx blitter, fixes Win-OS/2 on the 54x6 among other thing;
Added the Image Manager 1024 and Professional Graphics Controller per PCem patch by John Elliott and work done on VARCem;
Added Headland HT-216, GC-205 and Video 7 VGA 1024i emulation based on PCem commit;
Implemented the fuction keys for the Toshiba T1000/T1200/T3100 enhancement;
Amstrad MegaPC does now works correctly with non-internal graphics card;
The SLiRP code no longer casts a packed struct type to a non-packed struct type;
The Xi8088 and PB410a no longer hang on 86Box when PS/2 mouse is not present;
The S3 Virge on BeOS is no longer broken (was broken by build #1591);
OS/2 2.0 build 6.167 now sees key presses again;
Xi8088 now work on CGA again;
86F images converted from either the old or new variants of the HxC MFM format now work correctly;
Hardware interrupts with a vector of 0xFF are now handled correctly;
OPTi 495SX boards no longer incorrectly have 64 MB maximum RAM when 32 MB is correct;
Fixed VNC keyboard input bugs;
Fixed AT RTC periodic interrupt - Chicago 58s / 73f / 73g / 81 MIDI play no longer hangs with the build's own VTD driver;
Fixed mouse polling with internal mice - Amstrad and Olivetti mice now work correctly;
Triones ATAPI DMA driver now correctly reads a file at the end of a CD image with a sectors number not divisible by 4;
Compaq Portable now works with all graphics cards;
Fixed various MDSI Genius bugs;
Added segment limit checks and improved page fault checks for several CPU instructions - Memphis 15xx WINSETUP and Chicago 58s WINDISK.CPL no longer issue a GPF, and some S3 drivers that used to have glitches, now work correctly;
Further improved the 808x emulation, also fixes the noticably choppy sound when using 808x CPU's, also fixes #355;
OS/2 installer no logner locks up on splash screen on PS/2 Model 70 and 80, fixes #400.
Fixed several Amstead bugs, GEM no longer crashes on the Amstrad 1640, fixes #391.
Ported John Elliott's Amstrad fixes and improvement from PCem, and fixed the default language so it's correctly Engliish, fixes #278, fixes #389.
Fixed a minor IDE timing bug, fixes #388.
Fixed Toshiba T1000 RAM issues, fixes #379.
Fixed EGA/(S)VGA overscan border handling, fixes #378;
Got rid of the now long useless IDE channel 2 auto-removal, fixes #370;
Fixed the BIOS files used by the AMSTRAD PC1512, fixes #366;
Ported the Unicode CD image file name fix from VARCem, fixes #365;
Fixed high density floppy disks on the Xi8088, fixes #359;
Fixed some bugs in the Hercules emulation, fixes #346, fixes #358;
Fixed the SCSI hard disk mode sense pages, fixes #356;
Removed the AMI Unknown 386SX because of impossibility to identify the chipset, closes #349;
Fixed bugs in the serial mouse emulation, fixes #344;
Compiled 86Box binaries now include all the required .DLL's, fixes #341;
Made some combo boxes in the Settings dialog slightly wider, fixes #276.
2019-09-20 14:02:30 +02:00
|
|
|
|
|
|
|
|
return ret;
|
2017-09-02 20:39:57 +02:00
|
|
|
}
|
2021-06-15 17:38:31 +02:00
|
|
|
|
|
|
|
|
int
|
|
|
|
|
machine_ps2_model_80_axx_init(const machine_t *model)
|
|
|
|
|
{
|
|
|
|
|
int ret;
|
|
|
|
|
|
|
|
|
|
ret = bios_load_interleaved("roms/machines/ibmps2_m80/64f4356.bin",
|
|
|
|
|
"roms/machines/ibmps2_m80/64f4355.bin",
|
|
|
|
|
0x000e0000, 131072, 0);
|
|
|
|
|
|
|
|
|
|
if (bios_only || !ret)
|
|
|
|
|
return ret;
|
|
|
|
|
|
|
|
|
|
machine_ps2_common_init(model);
|
|
|
|
|
|
|
|
|
|
ps2.planar_id = 0xfff9;
|
|
|
|
|
|
|
|
|
|
ps2_mca_board_model_70_type34_init(0, 8);
|
|
|
|
|
|
|
|
|
|
return ret;
|
|
|
|
|
}
|