2017-05-05 01:49:42 +02:00
|
|
|
/*
|
|
|
|
|
* 86Box A hypervisor and IBM PC system emulator that specializes in
|
|
|
|
|
* running old operating systems and software designed for IBM
|
|
|
|
|
* PC systems and compatibles from 1981 through fairly recent
|
|
|
|
|
* system designs based on the PCI bus.
|
|
|
|
|
*
|
|
|
|
|
* This file is part of the 86Box distribution.
|
|
|
|
|
*
|
2017-05-07 23:42:05 -04:00
|
|
|
* Implementation of the AHA-154x series of SCSI Host Adapters
|
|
|
|
|
* made by Adaptec, Inc. These controllers were designed for
|
|
|
|
|
* the ISA bus.
|
2017-05-05 01:49:42 +02:00
|
|
|
*
|
2020-03-25 00:46:02 +02:00
|
|
|
*
|
2017-05-07 23:42:05 -04:00
|
|
|
*
|
|
|
|
|
* Authors: Fred N. van Kempen, <decwiz@yahoo.com>
|
2017-05-30 03:38:38 +02:00
|
|
|
* Original Buslogic version by SA1988 and Miran Grca.
|
2017-10-10 03:07:29 -04:00
|
|
|
*
|
2018-02-18 10:32:51 +01:00
|
|
|
* Copyright 2017,2018 Fred N. van Kempen.
|
2017-05-05 01:49:42 +02:00
|
|
|
*/
|
|
|
|
|
#include <stdio.h>
|
2017-09-25 04:31:20 -04:00
|
|
|
#include <stdint.h>
|
2017-05-05 01:49:42 +02:00
|
|
|
#include <string.h>
|
2017-09-25 04:31:20 -04:00
|
|
|
#include <stdlib.h>
|
2017-05-07 23:42:05 -04:00
|
|
|
#include <stdarg.h>
|
2017-09-25 04:31:20 -04:00
|
|
|
#include <wchar.h>
|
2017-12-10 02:53:10 -05:00
|
|
|
#define HAVE_STDARG_H
|
2020-03-29 14:24:42 +02:00
|
|
|
#include <86box/86box.h>
|
|
|
|
|
#include <86box/io.h>
|
|
|
|
|
#include <86box/timer.h>
|
|
|
|
|
#include <86box/mca.h>
|
|
|
|
|
#include <86box/mem.h>
|
|
|
|
|
#include <86box/mca.h>
|
|
|
|
|
#include <86box/rom.h>
|
|
|
|
|
#include <86box/device.h>
|
|
|
|
|
#include <86box/nvr.h>
|
|
|
|
|
#include <86box/dma.h>
|
|
|
|
|
#include <86box/pic.h>
|
|
|
|
|
#include <86box/plat.h>
|
2020-06-17 00:32:48 +02:00
|
|
|
#include <86box/fdd.h>
|
|
|
|
|
#include <86box/fdc.h>
|
2021-03-20 18:29:58 -03:00
|
|
|
#include <86box/isapnp.h>
|
2020-03-29 14:24:42 +02:00
|
|
|
#include <86box/scsi.h>
|
2021-07-22 20:13:44 +02:00
|
|
|
#include <86box/scsi_device.h>
|
2020-03-29 14:24:42 +02:00
|
|
|
#include <86box/scsi_aha154x.h>
|
|
|
|
|
#include <86box/scsi_x54x.h>
|
2017-05-05 01:49:42 +02:00
|
|
|
|
|
|
|
|
|
2017-10-14 07:03:19 +02:00
|
|
|
enum {
|
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
|
|
|
AHA_154xA,
|
2017-10-14 07:03:19 +02:00
|
|
|
AHA_154xB,
|
|
|
|
|
AHA_154xC,
|
|
|
|
|
AHA_154xCF,
|
|
|
|
|
AHA_154xCP,
|
|
|
|
|
AHA_1640
|
|
|
|
|
};
|
2017-08-03 14:07:03 -04:00
|
|
|
|
2017-05-05 01:49:42 +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
|
|
|
|
2017-08-22 02:15:02 -04:00
|
|
|
#define CMD_WRITE_EEPROM 0x22 /* UNDOC: Write EEPROM */
|
|
|
|
|
#define CMD_READ_EEPROM 0x23 /* UNDOC: Read EEPROM */
|
|
|
|
|
#define CMD_SHADOW_RAM 0x24 /* UNDOC: BIOS shadow ram */
|
|
|
|
|
#define CMD_BIOS_MBINIT 0x25 /* UNDOC: BIOS mailbox initialization */
|
|
|
|
|
#define CMD_MEMORY_MAP_1 0x26 /* UNDOC: Memory Mapper */
|
|
|
|
|
#define CMD_MEMORY_MAP_2 0x27 /* UNDOC: Memory Mapper */
|
|
|
|
|
#define CMD_EXTBIOS 0x28 /* UNDOC: return extended BIOS info */
|
|
|
|
|
#define CMD_MBENABLE 0x29 /* set mailbox interface enable */
|
|
|
|
|
#define CMD_BIOS_SCSI 0x82 /* start ROM BIOS SCSI command */
|
2017-05-07 23:42:05 -04:00
|
|
|
|
|
|
|
|
|
2017-10-14 07:03:19 +02:00
|
|
|
uint16_t aha_ports[] = {
|
2017-08-22 02:15:02 -04:00
|
|
|
0x0330, 0x0334, 0x0230, 0x0234,
|
|
|
|
|
0x0130, 0x0134, 0x0000, 0x0000
|
|
|
|
|
};
|
|
|
|
|
|
2021-03-22 21:24:48 -03:00
|
|
|
static uint8_t *aha1542cp_pnp_rom = NULL;
|
2021-03-20 18:29:58 -03:00
|
|
|
|
2017-09-01 19:36:08 +02:00
|
|
|
|
2017-10-17 00:49:32 +02:00
|
|
|
#pragma pack(push,1)
|
2017-10-14 07:03:19 +02:00
|
|
|
typedef struct {
|
|
|
|
|
uint8_t CustomerSignature[20];
|
|
|
|
|
uint8_t uAutoRetry;
|
|
|
|
|
uint8_t uBoardSwitches;
|
|
|
|
|
uint8_t uChecksum;
|
|
|
|
|
uint8_t uUnknown;
|
|
|
|
|
addr24 BIOSMailboxAddress;
|
|
|
|
|
} aha_setup_t;
|
2017-10-17 00:49:32 +02:00
|
|
|
#pragma pack(pop)
|
2017-09-01 19:36:08 +02:00
|
|
|
|
|
|
|
|
|
2017-10-11 05:40:44 -04:00
|
|
|
#ifdef ENABLE_AHA154X_LOG
|
2017-08-27 21:46:51 -04:00
|
|
|
int aha_do_log = ENABLE_AHA154X_LOG;
|
2017-08-22 02:15:02 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
static void
|
2017-08-27 21:46:51 -04:00
|
|
|
aha_log(const char *fmt, ...)
|
2017-08-22 02:15:02 -04:00
|
|
|
{
|
|
|
|
|
va_list ap;
|
|
|
|
|
|
|
|
|
|
if (aha_do_log) {
|
2017-08-27 21:46:51 -04:00
|
|
|
va_start(ap, fmt);
|
2017-12-10 02:53:10 -05:00
|
|
|
pclog_ex(fmt, ap);
|
2017-08-22 02:15:02 -04:00
|
|
|
va_end(ap);
|
|
|
|
|
}
|
|
|
|
|
}
|
2018-10-19 00:39:32 +02:00
|
|
|
#else
|
|
|
|
|
#define aha_log(fmt, ...)
|
|
|
|
|
#endif
|
2017-08-22 02:15:02 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* Write data to the BIOS space.
|
|
|
|
|
*
|
|
|
|
|
* AHA-1542C's and up have a feature where they map a 128-byte
|
|
|
|
|
* RAM space into the ROM BIOS' address space, and then use it
|
|
|
|
|
* as working memory. This function implements the writing to
|
|
|
|
|
* that memory.
|
|
|
|
|
*
|
|
|
|
|
* We enable/disable this memory through AHA command 0x24.
|
|
|
|
|
*/
|
|
|
|
|
static void
|
|
|
|
|
aha_mem_write(uint32_t addr, uint8_t val, void *priv)
|
|
|
|
|
{
|
2017-10-14 07:03:19 +02:00
|
|
|
x54x_t *dev = (x54x_t *)priv;
|
2017-10-10 04:15:29 +02:00
|
|
|
|
|
|
|
|
addr &= 0x3fff;
|
2017-08-22 02:15:02 -04:00
|
|
|
|
2017-10-10 04:15:29 +02:00
|
|
|
if ((addr >= dev->rom_shram) && (dev->shram_mode & 1))
|
|
|
|
|
dev->shadow_ram[addr & (dev->rom_shramsz - 1)] = val;
|
2017-08-22 02:15:02 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
static uint8_t
|
|
|
|
|
aha_mem_read(uint32_t addr, void *priv)
|
|
|
|
|
{
|
2017-10-14 07:03:19 +02:00
|
|
|
x54x_t *dev = (x54x_t *)priv;
|
2017-10-10 04:15:29 +02:00
|
|
|
rom_t *rom = &dev->bios;
|
2017-08-22 02:15:02 -04:00
|
|
|
|
2017-10-10 04:15:29 +02:00
|
|
|
addr &= 0x3fff;
|
2017-08-22 02:15:02 -04:00
|
|
|
|
2017-10-10 04:15:29 +02:00
|
|
|
if ((addr >= dev->rom_shram) && (dev->shram_mode & 2))
|
|
|
|
|
return dev->shadow_ram[addr & (dev->rom_shramsz - 1)];
|
2017-08-22 02:15:02 -04:00
|
|
|
|
2017-10-10 04:15:29 +02:00
|
|
|
return(rom->rom[addr]);
|
2017-08-22 02:15:02 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
static uint8_t
|
2017-10-14 07:03:19 +02:00
|
|
|
aha154x_shram(x54x_t *dev, uint8_t cmd)
|
2017-08-22 02:15:02 -04:00
|
|
|
{
|
|
|
|
|
/* If not supported, give up. */
|
|
|
|
|
if (dev->rom_shram == 0x0000) return(0x04);
|
|
|
|
|
|
2017-10-10 04:15:29 +02:00
|
|
|
/* Bit 0 = Shadow RAM write enable;
|
|
|
|
|
Bit 1 = Shadow RAM read enable. */
|
|
|
|
|
dev->shram_mode = cmd;
|
2017-08-22 02:15:02 -04:00
|
|
|
|
|
|
|
|
/* Firmware expects 04 status. */
|
|
|
|
|
return(0x04);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2017-10-14 07:03:19 +02:00
|
|
|
static void
|
|
|
|
|
aha_eeprom_save(x54x_t *dev)
|
2017-08-22 02:15:02 -04:00
|
|
|
{
|
2017-10-10 04:15:29 +02:00
|
|
|
FILE *f;
|
2017-10-14 07:03:19 +02:00
|
|
|
|
2021-03-14 20:35:01 +01:00
|
|
|
f = nvr_fopen(dev->nvr_path, "wb");
|
2017-10-14 07:03:19 +02:00
|
|
|
if (f)
|
|
|
|
|
{
|
|
|
|
|
fwrite(dev->nvr, 1, NVR_SIZE, f);
|
|
|
|
|
fclose(f);
|
|
|
|
|
f = NULL;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
static uint8_t
|
|
|
|
|
aha154x_eeprom(x54x_t *dev, uint8_t cmd,uint8_t arg,uint8_t len,uint8_t off,uint8_t *bufp)
|
|
|
|
|
{
|
2017-08-22 02:15:02 -04:00
|
|
|
uint8_t r = 0xff;
|
2017-10-14 19:14:17 +02:00
|
|
|
int c;
|
2017-08-22 02:15:02 -04:00
|
|
|
|
2017-08-27 21:46:51 -04:00
|
|
|
aha_log("%s: EEPROM cmd=%02x, arg=%02x len=%d, off=%02x\n",
|
2017-08-22 02:15:02 -04:00
|
|
|
dev->name, cmd, arg, len, off);
|
|
|
|
|
|
|
|
|
|
/* Only if we can handle it.. */
|
|
|
|
|
if (dev->nvr == NULL) return(r);
|
|
|
|
|
|
|
|
|
|
if (cmd == 0x22) {
|
|
|
|
|
/* Write data to the EEPROM. */
|
2017-10-14 19:14:17 +02:00
|
|
|
for (c = 0; c < len; c++)
|
|
|
|
|
dev->nvr[(off + c) & 0xff] = bufp[c];
|
2017-08-22 02:15:02 -04:00
|
|
|
r = 0;
|
2017-10-10 04:15:29 +02:00
|
|
|
|
2017-10-14 07:03:19 +02:00
|
|
|
aha_eeprom_save(dev);
|
2021-03-20 18:29:58 -03:00
|
|
|
|
2020-06-17 00:32:48 +02:00
|
|
|
if (dev->type == AHA_154xCF) {
|
|
|
|
|
if (dev->fdc_address > 0) {
|
|
|
|
|
fdc_remove(dev->fdc);
|
2021-03-20 19:41:07 +01:00
|
|
|
fdc_set_base(dev->fdc, (dev->nvr[0] & EE0_ALTFLOP) ? 0x370 : 0x3f0);
|
2020-06-17 00:32:48 +02:00
|
|
|
}
|
|
|
|
|
}
|
2017-08-22 02:15:02 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (cmd == 0x23) {
|
|
|
|
|
/* Read data from the EEPROM. */
|
2017-10-14 19:14:17 +02:00
|
|
|
for (c = 0; c < len; c++)
|
|
|
|
|
bufp[c] = dev->nvr[(off + c) & 0xff];
|
2017-08-22 02:15:02 -04:00
|
|
|
r = len;
|
|
|
|
|
}
|
2017-05-07 23:42:05 -04:00
|
|
|
|
2017-08-22 02:15:02 -04:00
|
|
|
return(r);
|
|
|
|
|
}
|
2017-05-07 23:42:05 -04:00
|
|
|
|
|
|
|
|
|
2017-10-10 03:07:29 -04:00
|
|
|
/* Map either the main or utility (Select) ROM into the memory space. */
|
2017-08-22 02:15:02 -04:00
|
|
|
static uint8_t
|
2017-10-14 07:03:19 +02:00
|
|
|
aha154x_mmap(x54x_t *dev, uint8_t cmd)
|
2017-08-22 02:15:02 -04:00
|
|
|
{
|
2017-08-27 21:46:51 -04:00
|
|
|
aha_log("%s: MEMORY cmd=%02x\n", dev->name, cmd);
|
2017-08-22 02:15:02 -04:00
|
|
|
|
2017-08-24 02:35:44 -04:00
|
|
|
switch(cmd) {
|
|
|
|
|
case 0x26:
|
|
|
|
|
/* Disable the mapper, so, set ROM1 active. */
|
2017-08-27 21:46:51 -04:00
|
|
|
dev->bios.rom = dev->rom1;
|
2017-08-24 02:35:44 -04:00
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case 0x27:
|
|
|
|
|
/* Enable the mapper, so, set ROM2 active. */
|
2017-08-27 21:46:51 -04:00
|
|
|
dev->bios.rom = dev->rom2;
|
2017-08-24 02:35:44 -04:00
|
|
|
break;
|
2017-08-22 02:15:02 -04:00
|
|
|
}
|
2017-05-07 23:42:05 -04:00
|
|
|
|
2017-08-22 02:15:02 -04:00
|
|
|
return(0);
|
|
|
|
|
}
|
2017-05-07 23:42:05 -04:00
|
|
|
|
|
|
|
|
|
2017-08-27 21:46:51 -04:00
|
|
|
static uint8_t
|
2017-10-14 07:03:19 +02:00
|
|
|
aha_get_host_id(void *p)
|
2017-08-27 21:46:51 -04:00
|
|
|
{
|
2017-10-14 07:03:19 +02:00
|
|
|
x54x_t *dev = (x54x_t *)p;
|
2017-08-27 21:46:51 -04:00
|
|
|
|
2017-10-14 18:52:25 +02:00
|
|
|
return dev->nvr[0] & 0x07;
|
2017-08-27 21:46:51 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2017-10-14 07:03:19 +02:00
|
|
|
static uint8_t
|
|
|
|
|
aha_get_irq(void *p)
|
2017-10-09 06:16:37 +02:00
|
|
|
{
|
2017-10-14 07:03:19 +02:00
|
|
|
x54x_t *dev = (x54x_t *)p;
|
2017-08-27 21:46:51 -04:00
|
|
|
|
2017-10-14 18:52:25 +02:00
|
|
|
return (dev->nvr[1] & 0x07) + 9;
|
2017-08-27 21:46:51 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2017-10-14 07:03:19 +02:00
|
|
|
static uint8_t
|
|
|
|
|
aha_get_dma(void *p)
|
2017-08-27 21:46:51 -04:00
|
|
|
{
|
2017-10-14 07:03:19 +02:00
|
|
|
x54x_t *dev = (x54x_t *)p;
|
2017-08-27 21:46:51 -04:00
|
|
|
|
2017-10-14 18:52:25 +02:00
|
|
|
return (dev->nvr[1] >> 4) & 0x07;
|
2017-08-27 21:46:51 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2017-10-14 07:03:19 +02:00
|
|
|
static uint8_t
|
|
|
|
|
aha_cmd_is_fast(void *p)
|
|
|
|
|
{
|
|
|
|
|
x54x_t *dev = (x54x_t *)p;
|
2017-08-27 21:46:51 -04:00
|
|
|
|
2017-10-14 07:03:19 +02:00
|
|
|
if (dev->Command == CMD_BIOS_SCSI)
|
|
|
|
|
return 1;
|
|
|
|
|
else
|
|
|
|
|
return 0;
|
2017-08-27 21:46:51 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2017-10-14 07:03:19 +02:00
|
|
|
static uint8_t
|
|
|
|
|
aha_fast_cmds(void *p, uint8_t cmd)
|
2017-08-27 21:46:51 -04:00
|
|
|
{
|
2017-10-14 07:03:19 +02:00
|
|
|
x54x_t *dev = (x54x_t *)p;
|
|
|
|
|
|
|
|
|
|
if (cmd == CMD_BIOS_SCSI) {
|
|
|
|
|
dev->BIOSMailboxReq++;
|
|
|
|
|
return 1;
|
2017-10-11 03:44:41 +02:00
|
|
|
}
|
2017-10-14 07:03:19 +02:00
|
|
|
|
|
|
|
|
return 0;
|
2017-08-27 21:46:51 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2017-10-11 03:44:41 +02:00
|
|
|
static uint8_t
|
2017-10-14 07:03:19 +02:00
|
|
|
aha_param_len(void *p)
|
2017-08-27 21:46:51 -04:00
|
|
|
{
|
2017-10-14 07:03:19 +02:00
|
|
|
x54x_t *dev = (x54x_t *)p;
|
2017-08-27 21:46:51 -04:00
|
|
|
|
2017-10-14 07:03:19 +02:00
|
|
|
switch (dev->Command) {
|
|
|
|
|
case CMD_BIOS_MBINIT:
|
|
|
|
|
/* Same as 0x01 for AHA. */
|
|
|
|
|
return sizeof(MailboxInit_t);
|
|
|
|
|
break;
|
2017-08-27 21:46:51 -04:00
|
|
|
|
2017-10-14 07:03:19 +02:00
|
|
|
case CMD_SHADOW_RAM:
|
|
|
|
|
return 1;
|
2022-02-20 02:26:27 -05:00
|
|
|
break;
|
2017-10-11 03:44:41 +02:00
|
|
|
|
2017-10-14 07:03:19 +02:00
|
|
|
case CMD_WRITE_EEPROM:
|
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 35;
|
2017-10-14 07:03:19 +02:00
|
|
|
break;
|
2017-10-11 03:44:41 +02:00
|
|
|
|
2017-10-14 07:03:19 +02:00
|
|
|
case CMD_READ_EEPROM:
|
|
|
|
|
return 3;
|
2017-10-11 03:44:41 +02:00
|
|
|
|
2017-10-14 07:03:19 +02:00
|
|
|
case CMD_MBENABLE:
|
|
|
|
|
return 2;
|
2017-10-11 03:44:41 +02:00
|
|
|
|
2021-03-22 21:24:48 -03:00
|
|
|
case 0x39:
|
|
|
|
|
return 3;
|
|
|
|
|
|
|
|
|
|
case 0x40:
|
|
|
|
|
return 2;
|
|
|
|
|
|
2017-10-14 07:03:19 +02:00
|
|
|
default:
|
|
|
|
|
return 0;
|
2017-08-27 21:46:51 -04:00
|
|
|
}
|
2017-10-14 07:03:19 +02:00
|
|
|
}
|
2017-10-10 04:15:29 +02:00
|
|
|
|
2017-10-11 03:44:41 +02:00
|
|
|
|
2017-10-14 07:03:19 +02:00
|
|
|
static uint8_t
|
|
|
|
|
aha_cmds(void *p)
|
|
|
|
|
{
|
|
|
|
|
x54x_t *dev = (x54x_t *)p;
|
|
|
|
|
MailboxInit_t *mbi;
|
|
|
|
|
|
|
|
|
|
if (! dev->CmdParamLeft) {
|
|
|
|
|
aha_log("Running Operation Code 0x%02X\n", dev->Command);
|
|
|
|
|
switch (dev->Command) {
|
|
|
|
|
case CMD_WRITE_EEPROM: /* write EEPROM */
|
|
|
|
|
/* Sent by CF BIOS. */
|
|
|
|
|
dev->DataReplyLeft =
|
|
|
|
|
aha154x_eeprom(dev,
|
|
|
|
|
dev->Command,
|
|
|
|
|
dev->CmdBuf[0],
|
|
|
|
|
dev->CmdBuf[1],
|
|
|
|
|
dev->CmdBuf[2],
|
2017-10-14 19:14:17 +02:00
|
|
|
&(dev->CmdBuf[3]));
|
2017-10-14 07:03:19 +02:00
|
|
|
if (dev->DataReplyLeft == 0xff) {
|
|
|
|
|
dev->DataReplyLeft = 0;
|
|
|
|
|
dev->Status |= STAT_INVCMD;
|
|
|
|
|
}
|
|
|
|
|
break;
|
2017-10-11 03:44:41 +02:00
|
|
|
|
2017-10-14 07:03:19 +02:00
|
|
|
case CMD_READ_EEPROM: /* read EEPROM */
|
|
|
|
|
/* Sent by CF BIOS. */
|
|
|
|
|
dev->DataReplyLeft =
|
|
|
|
|
aha154x_eeprom(dev,
|
|
|
|
|
dev->Command,
|
|
|
|
|
dev->CmdBuf[0],
|
|
|
|
|
dev->CmdBuf[1],
|
|
|
|
|
dev->CmdBuf[2],
|
|
|
|
|
dev->DataBuf);
|
|
|
|
|
if (dev->DataReplyLeft == 0xff) {
|
|
|
|
|
dev->DataReplyLeft = 0;
|
|
|
|
|
dev->Status |= STAT_INVCMD;
|
|
|
|
|
}
|
|
|
|
|
break;
|
2017-10-11 03:44:41 +02:00
|
|
|
|
2017-10-14 07:03:19 +02:00
|
|
|
case CMD_SHADOW_RAM: /* Shadow RAM */
|
|
|
|
|
/*
|
|
|
|
|
* For AHA1542CF, this is the command
|
|
|
|
|
* to play with the Shadow RAM. BIOS
|
|
|
|
|
* gives us one argument (00,02,03)
|
|
|
|
|
* and expects a 0x04 back in the INTR
|
|
|
|
|
* register. --FvK
|
|
|
|
|
*/
|
|
|
|
|
/* dev->Interrupt = aha154x_shram(dev,val); */
|
|
|
|
|
dev->Interrupt = aha154x_shram(dev, dev->CmdBuf[0]);
|
|
|
|
|
break;
|
2017-10-11 03:44:41 +02:00
|
|
|
|
2017-10-14 07:03:19 +02:00
|
|
|
case CMD_BIOS_MBINIT: /* BIOS Mailbox Initialization */
|
|
|
|
|
/* Sent by CF BIOS. */
|
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
|
|
|
dev->flags |= X54X_MBX_24BIT;
|
2017-10-10 04:15:29 +02:00
|
|
|
|
2017-10-14 07:03:19 +02:00
|
|
|
mbi = (MailboxInit_t *)dev->CmdBuf;
|
2017-10-10 04:15:29 +02:00
|
|
|
|
2017-10-14 07:03:19 +02:00
|
|
|
dev->BIOSMailboxInit = 1;
|
|
|
|
|
dev->BIOSMailboxCount = mbi->Count;
|
|
|
|
|
dev->BIOSMailboxOutAddr = ADDR_TO_U32(mbi->Address);
|
2017-10-11 03:44:41 +02:00
|
|
|
|
2017-10-14 07:03:19 +02:00
|
|
|
aha_log("Initialize BIOS Mailbox: MBO=0x%08lx, %d entries at 0x%08lx\n",
|
|
|
|
|
dev->BIOSMailboxOutAddr,
|
|
|
|
|
mbi->Count,
|
|
|
|
|
ADDR_TO_U32(mbi->Address));
|
2017-08-27 21:46:51 -04:00
|
|
|
|
2017-10-14 07:03:19 +02:00
|
|
|
dev->Status &= ~STAT_INIT;
|
|
|
|
|
dev->DataReplyLeft = 0;
|
|
|
|
|
break;
|
2017-08-27 21:46:51 -04:00
|
|
|
|
2017-10-14 07:03:19 +02:00
|
|
|
case CMD_MEMORY_MAP_1: /* AHA memory mapper */
|
|
|
|
|
case CMD_MEMORY_MAP_2: /* AHA memory mapper */
|
|
|
|
|
/* Sent by CF BIOS. */
|
|
|
|
|
dev->DataReplyLeft =
|
|
|
|
|
aha154x_mmap(dev, dev->Command);
|
|
|
|
|
break;
|
2017-10-09 06:16:37 +02:00
|
|
|
|
2017-10-14 07:03:19 +02:00
|
|
|
case CMD_EXTBIOS: /* Return extended BIOS information */
|
|
|
|
|
dev->DataBuf[0] = 0x08;
|
|
|
|
|
dev->DataBuf[1] = dev->Lock;
|
|
|
|
|
dev->DataReplyLeft = 2;
|
|
|
|
|
break;
|
2022-02-20 02:26:27 -05:00
|
|
|
|
2017-10-14 07:03:19 +02:00
|
|
|
case CMD_MBENABLE: /* Mailbox interface enable Command */
|
|
|
|
|
dev->DataReplyLeft = 0;
|
|
|
|
|
if (dev->CmdBuf[1] == dev->Lock) {
|
|
|
|
|
if (dev->CmdBuf[0] & 1) {
|
|
|
|
|
dev->Lock = 1;
|
|
|
|
|
} else {
|
|
|
|
|
dev->Lock = 0;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
break;
|
2017-10-09 06:16:37 +02:00
|
|
|
|
2021-03-22 21:24:48 -03:00
|
|
|
case 0x2C: /* Detect termination status */
|
|
|
|
|
/* Bits 7,6 are termination status and must be 1,0 for the BIOS to work. */
|
|
|
|
|
dev->DataBuf[0] = 0x40;
|
2017-10-14 07:03:19 +02:00
|
|
|
dev->DataReplyLeft = 1;
|
|
|
|
|
break;
|
2017-08-27 21:46:51 -04:00
|
|
|
|
2021-03-22 21:24:48 -03:00
|
|
|
case 0x2D: /* ???? - Returns two bytes according to the microcode */
|
|
|
|
|
dev->DataBuf[0] = 0x00;
|
2017-10-14 07:03:19 +02:00
|
|
|
dev->DataBuf[0] = 0x00;
|
2021-03-22 21:24:48 -03:00
|
|
|
dev->DataReplyLeft = 2;
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case 0x33: /* Send the SCSISelect code decompressor program */
|
|
|
|
|
if (dev->cmd_33_len == 0x0000) {
|
|
|
|
|
/* If we are on a controller without this command, return invalid command. */
|
|
|
|
|
dev->DataReplyLeft = 0;
|
|
|
|
|
dev->Status |= STAT_INVCMD;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* We have to send (decompressor program length + 2 bytes of little endian size). */
|
|
|
|
|
dev->DataReplyLeft = dev->cmd_33_len + 2;
|
|
|
|
|
memset(dev->DataBuf, 0x00, dev->DataReplyLeft);
|
|
|
|
|
dev->DataBuf[0] = dev->cmd_33_len & 0xff;
|
|
|
|
|
dev->DataBuf[1] = (dev->cmd_33_len >> 8) & 0xff;
|
|
|
|
|
memcpy(&(dev->DataBuf[2]), dev->cmd_33_buf, dev->cmd_33_len);
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case 0x39: /* Receive 3 bytes: address high, address low, byte to write to that address. */
|
|
|
|
|
/* Since we are not running the actual microcode, just log the received values
|
|
|
|
|
(if logging is enabled) and break. */
|
|
|
|
|
aha_log("aha_cmds(): Command 0x39: %02X -> %02X%02X\n",
|
|
|
|
|
dev->CmdBuf[2], dev->CmdBuf[0], dev->CmdBuf[1]);
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case 0x40: /* Receive 2 bytes: address high, address low, then return one byte from that
|
|
|
|
|
address. */
|
|
|
|
|
aha_log("aha_cmds(): Command 0x40: %02X%02X\n",
|
|
|
|
|
dev->CmdBuf[0], dev->CmdBuf[1]);
|
|
|
|
|
dev->DataReplyLeft = 1;
|
|
|
|
|
dev->DataBuf[0] = 0xff;
|
2017-10-14 07:03:19 +02:00
|
|
|
break;
|
2017-09-01 19:36:08 +02:00
|
|
|
|
2017-10-14 07:03:19 +02:00
|
|
|
default:
|
|
|
|
|
dev->DataReplyLeft = 0;
|
|
|
|
|
dev->Status |= STAT_INVCMD;
|
|
|
|
|
break;
|
2017-10-11 03:44:41 +02:00
|
|
|
}
|
2017-09-01 19:36:08 +02:00
|
|
|
}
|
|
|
|
|
|
2017-10-14 07:03:19 +02:00
|
|
|
return 0;
|
2017-08-27 21:46:51 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2017-10-14 07:03:19 +02:00
|
|
|
static void
|
|
|
|
|
aha_setup_data(void *p)
|
2017-05-07 23:42:05 -04:00
|
|
|
{
|
2017-10-14 07:03:19 +02:00
|
|
|
x54x_t *dev = (x54x_t *)p;
|
|
|
|
|
ReplyInquireSetupInformation *ReplyISI;
|
|
|
|
|
aha_setup_t *aha_setup;
|
2017-05-07 23:42:05 -04:00
|
|
|
|
2017-10-14 07:03:19 +02:00
|
|
|
ReplyISI = (ReplyInquireSetupInformation *)dev->DataBuf;
|
|
|
|
|
aha_setup = (aha_setup_t *)ReplyISI->VendorSpecificData;
|
2017-05-07 23:42:05 -04:00
|
|
|
|
2017-10-17 02:50:54 +02:00
|
|
|
ReplyISI->fSynchronousInitiationEnabled = dev->sync & 1;
|
|
|
|
|
ReplyISI->fParityCheckingEnabled = dev->parity & 1;
|
|
|
|
|
|
2017-10-14 07:03:19 +02:00
|
|
|
U32_TO_ADDR(aha_setup->BIOSMailboxAddress, dev->BIOSMailboxOutAddr);
|
|
|
|
|
aha_setup->uChecksum = 0xA3;
|
|
|
|
|
aha_setup->uUnknown = 0xC2;
|
2017-05-07 23:42:05 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
static void
|
2017-10-14 07:03:19 +02:00
|
|
|
aha_do_bios_mail(x54x_t *dev)
|
2017-05-07 23:42:05 -04:00
|
|
|
{
|
2017-10-14 07:03:19 +02:00
|
|
|
dev->MailboxIsBIOS = 1;
|
2017-05-07 23:42:05 -04:00
|
|
|
|
2017-10-14 07:03:19 +02:00
|
|
|
if (!dev->BIOSMailboxCount) {
|
|
|
|
|
aha_log("aha_do_bios_mail(): No BIOS Mailboxes\n");
|
|
|
|
|
return;
|
|
|
|
|
}
|
2017-05-07 23:42:05 -04:00
|
|
|
|
2017-10-14 07:03:19 +02:00
|
|
|
/* Search for a filled mailbox - stop if we have scanned all mailboxes. */
|
|
|
|
|
for (dev->BIOSMailboxOutPosCur = 0; dev->BIOSMailboxOutPosCur < dev->BIOSMailboxCount; dev->BIOSMailboxOutPosCur++) {
|
|
|
|
|
if (x54x_mbo_process(dev))
|
2017-05-07 23:42:05 -04:00
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
static void
|
2018-03-07 20:06:08 +01:00
|
|
|
aha_callback(void *p)
|
2017-05-07 23:42:05 -04:00
|
|
|
{
|
2017-10-14 07:03:19 +02:00
|
|
|
x54x_t *dev = (x54x_t *)p;
|
|
|
|
|
|
|
|
|
|
if (dev->BIOSMailboxInit && dev->BIOSMailboxReq)
|
|
|
|
|
aha_do_bios_mail(dev);
|
2017-05-07 23:42:05 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2017-08-22 02:15:02 -04:00
|
|
|
static uint8_t
|
|
|
|
|
aha_mca_read(int port, void *priv)
|
2017-05-14 16:46:15 +02:00
|
|
|
{
|
2017-10-14 07:03:19 +02:00
|
|
|
x54x_t *dev = (x54x_t *)priv;
|
2017-05-14 16:46:15 +02:00
|
|
|
|
2017-08-22 02:15:02 -04:00
|
|
|
return(dev->pos_regs[port & 7]);
|
2017-05-14 16:46:15 +02:00
|
|
|
}
|
|
|
|
|
|
2017-08-22 02:15:02 -04:00
|
|
|
|
|
|
|
|
static void
|
|
|
|
|
aha_mca_write(int port, uint8_t val, void *priv)
|
2017-05-14 16:46:15 +02:00
|
|
|
{
|
2017-10-14 07:03:19 +02:00
|
|
|
x54x_t *dev = (x54x_t *)priv;
|
2017-05-14 16:46:15 +02:00
|
|
|
|
2017-08-27 21:46:51 -04:00
|
|
|
/* MCA does not write registers below 0x0100. */
|
|
|
|
|
if (port < 0x0102) return;
|
2017-08-25 23:12:44 -04:00
|
|
|
|
|
|
|
|
/* Save the MCA register value. */
|
2017-08-22 02:15:02 -04:00
|
|
|
dev->pos_regs[port & 7] = val;
|
|
|
|
|
|
2017-10-14 07:03:19 +02:00
|
|
|
/* This is always necessary so that the old handler doesn't remain. */
|
2017-10-23 01:36:00 +02:00
|
|
|
x54x_io_remove(dev, dev->Base, 4);
|
2017-10-14 07:03:19 +02:00
|
|
|
|
2017-10-17 02:50:54 +02:00
|
|
|
/* Get the new assigned I/O base address. */
|
|
|
|
|
dev->Base = (dev->pos_regs[3] & 7) << 8;
|
2017-12-05 22:39:21 +01:00
|
|
|
dev->Base |= ((dev->pos_regs[3] & 0xc0) ? 0x34 : 0x30);
|
2017-10-17 02:50:54 +02:00
|
|
|
|
2017-08-27 21:46:51 -04:00
|
|
|
/* Save the new IRQ and DMA channel values. */
|
|
|
|
|
dev->Irq = (dev->pos_regs[4] & 0x07) + 8;
|
2022-02-20 02:26:27 -05:00
|
|
|
dev->DmaChannel = dev->pos_regs[5] & 0x0f;
|
2017-08-25 23:12:44 -04:00
|
|
|
|
2017-08-27 21:46:51 -04:00
|
|
|
/* Extract the BIOS ROM address info. */
|
|
|
|
|
if (! (dev->pos_regs[2] & 0x80)) switch(dev->pos_regs[3] & 0x38) {
|
|
|
|
|
case 0x38: /* [1]=xx11 1xxx */
|
|
|
|
|
dev->rom_addr = 0xDC000;
|
|
|
|
|
break;
|
2017-08-25 23:12:44 -04:00
|
|
|
|
2017-08-27 21:46:51 -04:00
|
|
|
case 0x30: /* [1]=xx11 0xxx */
|
|
|
|
|
dev->rom_addr = 0xD8000;
|
|
|
|
|
break;
|
2017-08-25 23:12:44 -04:00
|
|
|
|
2017-08-27 21:46:51 -04:00
|
|
|
case 0x28: /* [1]=xx10 1xxx */
|
|
|
|
|
dev->rom_addr = 0xD4000;
|
|
|
|
|
break;
|
2017-08-25 23:12:44 -04:00
|
|
|
|
2017-08-27 21:46:51 -04:00
|
|
|
case 0x20: /* [1]=xx10 0xxx */
|
|
|
|
|
dev->rom_addr = 0xD0000;
|
|
|
|
|
break;
|
2017-08-25 23:12:44 -04:00
|
|
|
|
2017-08-27 21:46:51 -04:00
|
|
|
case 0x18: /* [1]=xx01 1xxx */
|
|
|
|
|
dev->rom_addr = 0xCC000;
|
|
|
|
|
break;
|
2017-08-25 23:12:44 -04:00
|
|
|
|
2017-08-27 21:46:51 -04:00
|
|
|
case 0x10: /* [1]=xx01 0xxx */
|
|
|
|
|
dev->rom_addr = 0xC8000;
|
|
|
|
|
break;
|
|
|
|
|
} else {
|
|
|
|
|
/* Disabled. */
|
|
|
|
|
dev->rom_addr = 0x000000;
|
2017-08-22 02:15:02 -04:00
|
|
|
}
|
2017-08-25 02:21:26 -04:00
|
|
|
|
2017-08-27 21:46:51 -04:00
|
|
|
/*
|
|
|
|
|
* Get misc SCSI config stuff. For now, we are only
|
|
|
|
|
* interested in the configured HA target ID:
|
|
|
|
|
*
|
|
|
|
|
* pos[2]=111xxxxx = 7
|
|
|
|
|
* pos[2]=000xxxxx = 0
|
|
|
|
|
*/
|
2017-10-22 03:16:52 +02:00
|
|
|
dev->HostID = (dev->pos_regs[4] >> 5) & 0x07;
|
2017-08-27 21:46:51 -04:00
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* SYNC mode is pos[2]=xxxx1xxx.
|
|
|
|
|
*
|
|
|
|
|
* SCSI Parity is pos[2]=xxx1xxxx.
|
|
|
|
|
*/
|
2017-10-22 03:16:52 +02:00
|
|
|
dev->sync = (dev->pos_regs[4] >> 3) & 1;
|
|
|
|
|
dev->parity = (dev->pos_regs[4] >> 4) & 1;
|
2017-08-27 21:46:51 -04:00
|
|
|
|
2017-08-28 00:30:08 -04:00
|
|
|
/*
|
|
|
|
|
* The PS/2 Model 80 BIOS always enables a card if it finds one,
|
|
|
|
|
* even if no resources were assigned yet (because we only added
|
|
|
|
|
* the card, but have not run AutoConfig yet...)
|
|
|
|
|
*
|
|
|
|
|
* So, remove current address, if any.
|
|
|
|
|
*/
|
|
|
|
|
mem_mapping_disable(&dev->bios.mapping);
|
|
|
|
|
|
2017-08-25 02:21:26 -04:00
|
|
|
/* Initialize the device if fully configured. */
|
2017-08-27 21:46:51 -04:00
|
|
|
if (dev->pos_regs[2] & 0x01) {
|
2017-08-28 00:30:08 -04:00
|
|
|
/* Card enabled; register (new) I/O handler. */
|
2017-10-23 01:36:00 +02:00
|
|
|
x54x_io_set(dev, dev->Base, 4);
|
2017-08-27 21:46:51 -04:00
|
|
|
|
|
|
|
|
/* Reset the device. */
|
2017-10-14 07:03:19 +02:00
|
|
|
x54x_reset_ctrl(dev, CTRL_HRST);
|
2017-08-25 23:12:44 -04:00
|
|
|
|
2017-08-28 00:30:08 -04:00
|
|
|
/* Enable or disable the BIOS ROM. */
|
2017-08-25 23:12:44 -04:00
|
|
|
if (dev->rom_addr != 0x000000) {
|
2017-08-27 21:46:51 -04:00
|
|
|
mem_mapping_enable(&dev->bios.mapping);
|
|
|
|
|
mem_mapping_set_addr(&dev->bios.mapping, dev->rom_addr, ROM_SIZE);
|
2017-08-25 23:12:44 -04:00
|
|
|
}
|
2017-12-05 22:39:21 +01:00
|
|
|
|
|
|
|
|
/* Say hello. */
|
2018-07-15 01:41:53 +02:00
|
|
|
aha_log("AHA-1640: I/O=%04x, IRQ=%d, DMA=%d, BIOS @%05X, HOST ID %i\n",
|
2017-12-05 22:39:21 +01:00
|
|
|
dev->Base, dev->Irq, dev->DmaChannel, dev->rom_addr, dev->HostID);
|
2017-08-25 02:21:26 -04:00
|
|
|
}
|
2017-05-14 16:46:15 +02:00
|
|
|
}
|
|
|
|
|
|
2017-08-22 02:15:02 -04: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
|
|
|
static uint8_t
|
|
|
|
|
aha_mca_feedb(void *priv)
|
|
|
|
|
{
|
|
|
|
|
x54x_t *dev = (x54x_t *)priv;
|
|
|
|
|
|
|
|
|
|
return (dev->pos_regs[2] & 0x01);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2021-03-20 18:29:58 -03:00
|
|
|
static void
|
|
|
|
|
aha_pnp_config_changed(uint8_t ld, isapnp_device_config_t *config, void *priv)
|
|
|
|
|
{
|
|
|
|
|
x54x_t *dev = (x54x_t *) priv;
|
2021-03-22 21:24:48 -03:00
|
|
|
int i;
|
2021-03-20 18:29:58 -03:00
|
|
|
|
|
|
|
|
switch (ld) {
|
|
|
|
|
case 0:
|
|
|
|
|
if (dev->Base) {
|
|
|
|
|
x54x_io_remove(dev, dev->Base, 4);
|
|
|
|
|
dev->Base = 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
dev->Irq = 0;
|
|
|
|
|
dev->DmaChannel = ISAPNP_DMA_DISABLED;
|
|
|
|
|
dev->rom_addr = 0;
|
|
|
|
|
|
|
|
|
|
mem_mapping_disable(&dev->bios.mapping);
|
|
|
|
|
|
|
|
|
|
if (config->activate) {
|
|
|
|
|
dev->Base = config->io[0].base;
|
|
|
|
|
if (dev->Base != ISAPNP_IO_DISABLED)
|
|
|
|
|
x54x_io_set(dev, dev->Base, 4);
|
|
|
|
|
|
2021-03-22 21:24:48 -03:00
|
|
|
/*
|
|
|
|
|
* Patch the ROM BIOS image for stuff Adaptec deliberately
|
|
|
|
|
* made hard to understand. Well, maybe not, maybe it was
|
|
|
|
|
* their way of handling issues like these at the time..
|
|
|
|
|
*
|
|
|
|
|
* Patch 1: emulate the I/O ADDR SW setting by patching a
|
|
|
|
|
* byte in the BIOS that indicates the I/O ADDR
|
|
|
|
|
* switch setting on the board.
|
|
|
|
|
*/
|
|
|
|
|
if (dev->rom_ioaddr != 0x0000) {
|
|
|
|
|
/* Look up the I/O address in the table. */
|
|
|
|
|
for (i=0; i<8; i++)
|
|
|
|
|
if (aha_ports[i] == dev->Base) break;
|
|
|
|
|
if (i == 8) {
|
|
|
|
|
aha_log("%s: invalid I/O address %04x selected!\n",
|
|
|
|
|
dev->name, dev->Base);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
dev->bios.rom[dev->rom_ioaddr] = (uint8_t)i;
|
|
|
|
|
/* Negation of the DIP switches to satify the checksum. */
|
|
|
|
|
dev->bios.rom[dev->rom_ioaddr + 1] = (uint8_t)((i ^ 0xff) + 1);
|
|
|
|
|
}
|
|
|
|
|
|
2021-03-20 18:29:58 -03:00
|
|
|
dev->Irq = config->irq[0].irq;
|
|
|
|
|
dev->DmaChannel = config->dma[0].dma;
|
|
|
|
|
|
2021-03-22 21:24:48 -03:00
|
|
|
dev->nvr[1] = (dev->Irq - 9) | (dev->DmaChannel << 4);
|
|
|
|
|
aha_eeprom_save(dev);
|
|
|
|
|
|
2021-03-20 18:29:58 -03:00
|
|
|
dev->rom_addr = config->mem[0].base;
|
|
|
|
|
if (dev->rom_addr) {
|
|
|
|
|
mem_mapping_enable(&dev->bios.mapping);
|
2021-03-22 21:24:48 -03:00
|
|
|
aha_log("SCSI BIOS set to: %08X-%08X\n", dev->rom_addr, dev->rom_addr + config->mem[0].size - 1);
|
2021-03-20 18:29:58 -03:00
|
|
|
mem_mapping_set_addr(&dev->bios.mapping, dev->rom_addr, config->mem[0].size);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
2021-03-22 21:24:48 -03:00
|
|
|
#ifdef AHA1542CP_FDC
|
2021-03-20 18:29:58 -03:00
|
|
|
case 1:
|
|
|
|
|
if (dev->fdc_address) {
|
|
|
|
|
fdc_remove(dev->fdc);
|
|
|
|
|
dev->fdc_address = 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
fdc_set_irq(dev->fdc, 0);
|
|
|
|
|
fdc_set_dma_ch(dev->fdc, ISAPNP_DMA_DISABLED);
|
|
|
|
|
|
|
|
|
|
if (config->activate) {
|
|
|
|
|
dev->fdc_address = config->io[0].base;
|
|
|
|
|
if (dev->fdc_address != ISAPNP_IO_DISABLED)
|
|
|
|
|
fdc_set_base(dev->fdc, dev->fdc_address);
|
|
|
|
|
|
|
|
|
|
fdc_set_irq(dev->fdc, config->irq[0].irq);
|
|
|
|
|
fdc_set_dma_ch(dev->fdc, config->dma[0].dma);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
break;
|
2021-03-22 21:24:48 -03:00
|
|
|
#endif
|
2021-03-20 18:29:58 -03:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2017-08-22 02:15:02 -04:00
|
|
|
/* Initialize the board's ROM BIOS. */
|
|
|
|
|
static void
|
2017-10-14 07:03:19 +02:00
|
|
|
aha_setbios(x54x_t *dev)
|
2017-08-22 02:15:02 -04:00
|
|
|
{
|
|
|
|
|
uint32_t size;
|
|
|
|
|
uint32_t mask;
|
|
|
|
|
uint32_t temp;
|
|
|
|
|
FILE *f;
|
|
|
|
|
int i;
|
|
|
|
|
|
|
|
|
|
/* Only if this device has a BIOS ROM. */
|
|
|
|
|
if (dev->bios_path == NULL) return;
|
|
|
|
|
|
|
|
|
|
/* Open the BIOS image file and make sure it exists. */
|
2021-03-14 20:35:01 +01:00
|
|
|
aha_log("%s: loading BIOS from '%s'\n", dev->name, dev->bios_path);
|
|
|
|
|
if ((f = rom_fopen(dev->bios_path, "rb")) == NULL) {
|
2017-10-14 18:52:25 +02:00
|
|
|
aha_log("%s: BIOS ROM not found!\n", dev->name);
|
2017-08-22 02:15:02 -04:00
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* Manually load and process the ROM image.
|
|
|
|
|
*
|
|
|
|
|
* We *could* use the system "rom_init" function here, but for
|
|
|
|
|
* this special case, we can't: we may need WRITE access to the
|
|
|
|
|
* memory later on.
|
|
|
|
|
*/
|
|
|
|
|
(void)fseek(f, 0L, SEEK_END);
|
|
|
|
|
temp = ftell(f);
|
|
|
|
|
(void)fseek(f, 0L, SEEK_SET);
|
|
|
|
|
|
|
|
|
|
/* Load first chunk of BIOS (which is the main BIOS, aka ROM1.) */
|
2017-08-27 21:46:51 -04:00
|
|
|
dev->rom1 = malloc(ROM_SIZE);
|
|
|
|
|
(void)fread(dev->rom1, ROM_SIZE, 1, f);
|
2017-08-22 02:15:02 -04:00
|
|
|
temp -= ROM_SIZE;
|
|
|
|
|
if (temp > 0) {
|
2017-08-27 21:46:51 -04:00
|
|
|
dev->rom2 = malloc(ROM_SIZE);
|
|
|
|
|
(void)fread(dev->rom2, ROM_SIZE, 1, f);
|
2017-08-22 02:15:02 -04:00
|
|
|
temp -= ROM_SIZE;
|
|
|
|
|
} else {
|
2017-08-27 21:46:51 -04:00
|
|
|
dev->rom2 = NULL;
|
2017-08-22 02:15:02 -04:00
|
|
|
}
|
|
|
|
|
if (temp != 0) {
|
2017-10-14 18:52:25 +02:00
|
|
|
aha_log("%s: BIOS ROM size invalid!\n", dev->name);
|
2017-08-27 21:46:51 -04:00
|
|
|
free(dev->rom1);
|
|
|
|
|
if (dev->rom2 != NULL)
|
|
|
|
|
free(dev->rom2);
|
2017-08-22 02:15:02 -04:00
|
|
|
(void)fclose(f);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
temp = ftell(f);
|
|
|
|
|
if (temp > ROM_SIZE)
|
|
|
|
|
temp = ROM_SIZE;
|
|
|
|
|
(void)fclose(f);
|
|
|
|
|
|
|
|
|
|
/* Adjust BIOS size in chunks of 2K, as per BIOS spec. */
|
|
|
|
|
size = 0x10000;
|
|
|
|
|
if (temp <= 0x8000)
|
|
|
|
|
size = 0x8000;
|
|
|
|
|
if (temp <= 0x4000)
|
|
|
|
|
size = 0x4000;
|
|
|
|
|
if (temp <= 0x2000)
|
|
|
|
|
size = 0x2000;
|
|
|
|
|
mask = (size - 1);
|
2017-10-14 18:52:25 +02:00
|
|
|
aha_log("%s: BIOS at 0x%06lX, size %lu, mask %08lx\n",
|
2017-08-27 21:46:51 -04:00
|
|
|
dev->name, dev->rom_addr, size, mask);
|
2017-08-22 02:15:02 -04:00
|
|
|
|
|
|
|
|
/* Initialize the ROM entry for this BIOS. */
|
2017-08-27 21:46:51 -04:00
|
|
|
memset(&dev->bios, 0x00, sizeof(rom_t));
|
2017-08-22 02:15:02 -04:00
|
|
|
|
|
|
|
|
/* Enable ROM1 into the memory map. */
|
2017-08-27 21:46:51 -04:00
|
|
|
dev->bios.rom = dev->rom1;
|
2017-08-22 02:15:02 -04:00
|
|
|
|
|
|
|
|
/* Set up an address mask for this memory. */
|
2017-08-27 21:46:51 -04:00
|
|
|
dev->bios.mask = mask;
|
2017-08-22 02:15:02 -04:00
|
|
|
|
|
|
|
|
/* Map this system into the memory map. */
|
2017-08-27 21:46:51 -04:00
|
|
|
mem_mapping_add(&dev->bios.mapping, dev->rom_addr, size,
|
2017-10-10 04:15:29 +02:00
|
|
|
aha_mem_read, NULL, NULL, /* aha_mem_readw, aha_mem_readl, */
|
2017-08-22 02:15:02 -04:00
|
|
|
aha_mem_write, NULL, NULL,
|
2017-10-10 04:15:29 +02:00
|
|
|
dev->bios.rom, MEM_MAPPING_EXTERNAL, dev);
|
2017-08-27 21:46:51 -04:00
|
|
|
mem_mapping_disable(&dev->bios.mapping);
|
2017-08-22 02:15:02 -04:00
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* Patch the ROM BIOS image for stuff Adaptec deliberately
|
|
|
|
|
* made hard to understand. Well, maybe not, maybe it was
|
|
|
|
|
* their way of handling issues like these at the time..
|
|
|
|
|
*
|
|
|
|
|
* Patch 1: emulate the I/O ADDR SW setting by patching a
|
|
|
|
|
* byte in the BIOS that indicates the I/O ADDR
|
|
|
|
|
* switch setting on the board.
|
|
|
|
|
*/
|
|
|
|
|
if (dev->rom_ioaddr != 0x0000) {
|
|
|
|
|
/* Look up the I/O address in the table. */
|
|
|
|
|
for (i=0; i<8; i++)
|
|
|
|
|
if (aha_ports[i] == dev->Base) break;
|
|
|
|
|
if (i == 8) {
|
2017-10-14 18:52:25 +02:00
|
|
|
aha_log("%s: invalid I/O address %04x selected!\n",
|
2017-08-22 02:15:02 -04:00
|
|
|
dev->name, dev->Base);
|
|
|
|
|
return;
|
|
|
|
|
}
|
2017-08-27 21:46:51 -04:00
|
|
|
dev->bios.rom[dev->rom_ioaddr] = (uint8_t)i;
|
2017-10-10 04:15:29 +02:00
|
|
|
/* Negation of the DIP switches to satify the checksum. */
|
|
|
|
|
dev->bios.rom[dev->rom_ioaddr + 1] = (uint8_t)((i ^ 0xff) + 1);
|
2017-08-22 02:15:02 -04:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2021-03-22 21:24:48 -03:00
|
|
|
/* Get the SCSISelect code decompressor program from the microcode rom for the
|
|
|
|
|
AHA-1542CP. */
|
|
|
|
|
static void
|
|
|
|
|
aha_setmcode(x54x_t *dev)
|
|
|
|
|
{
|
|
|
|
|
uint32_t temp;
|
|
|
|
|
FILE *f;
|
|
|
|
|
|
|
|
|
|
/* Only if this device has a BIOS ROM. */
|
|
|
|
|
if (dev->mcode_path == NULL) return;
|
|
|
|
|
|
|
|
|
|
/* Open the microcode image file and make sure it exists. */
|
|
|
|
|
aha_log("%s: loading microcode from '%ls'\n", dev->name, dev->bios_path);
|
2021-03-14 20:35:01 +01:00
|
|
|
if ((f = rom_fopen(dev->mcode_path, "rb")) == NULL) {
|
2021-03-22 21:24:48 -03:00
|
|
|
aha_log("%s: microcode ROM not found!\n", dev->name);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* Manually load and process the ROM image.
|
|
|
|
|
*
|
|
|
|
|
* We *could* use the system "rom_init" function here, but for
|
|
|
|
|
* this special case, we can't: we may need WRITE access to the
|
|
|
|
|
* memory later on.
|
|
|
|
|
*/
|
|
|
|
|
(void)fseek(f, 0L, SEEK_END);
|
|
|
|
|
temp = ftell(f);
|
|
|
|
|
(void)fseek(f, 0L, SEEK_SET);
|
|
|
|
|
|
|
|
|
|
if (temp < (dev->cmd_33_offset + dev->cmd_33_len - 1)) {
|
|
|
|
|
aha_log("%s: microcode ROM size invalid!\n", dev->name);
|
|
|
|
|
(void)fclose(f);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* Allocate the buffer and then read the real PnP ROM into it. */
|
|
|
|
|
if (aha1542cp_pnp_rom != NULL) {
|
|
|
|
|
free(aha1542cp_pnp_rom);
|
|
|
|
|
aha1542cp_pnp_rom = NULL;
|
|
|
|
|
}
|
|
|
|
|
aha1542cp_pnp_rom = (uint8_t *) malloc(dev->pnp_len + 7);
|
|
|
|
|
fseek(f, dev->pnp_offset, SEEK_SET);
|
|
|
|
|
(void)fread(aha1542cp_pnp_rom, dev->pnp_len, 1, f);
|
|
|
|
|
memset(&(aha1542cp_pnp_rom[4]), 0x00, 5);
|
|
|
|
|
fseek(f, dev->pnp_offset + 4, SEEK_SET);
|
|
|
|
|
(void)fread(&(aha1542cp_pnp_rom[9]), dev->pnp_len - 4, 1, f);
|
|
|
|
|
/* Even the real AHA-1542CP microcode seem to be flipping bit
|
|
|
|
|
4 to not erroneously indicate there is a range length. */
|
|
|
|
|
aha1542cp_pnp_rom[0x87] |= 0x04;
|
|
|
|
|
/* Insert the terminator and the checksum byte that will later
|
|
|
|
|
be filled in by the isapnp code. */
|
|
|
|
|
aha1542cp_pnp_rom[dev->pnp_len + 5] = 0x79;
|
|
|
|
|
aha1542cp_pnp_rom[dev->pnp_len + 6] = 0x00;
|
|
|
|
|
|
|
|
|
|
/* Load the SCSISelect decompression code. */
|
|
|
|
|
fseek(f, dev->cmd_33_offset, SEEK_SET);
|
|
|
|
|
(void)fread(dev->cmd_33_buf, dev->cmd_33_len, 1, f);
|
|
|
|
|
|
|
|
|
|
(void)fclose(f);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2017-08-22 02:15:02 -04:00
|
|
|
static void
|
2017-10-14 07:03:19 +02:00
|
|
|
aha_initnvr(x54x_t *dev)
|
2017-08-22 02:15:02 -04:00
|
|
|
{
|
|
|
|
|
/* Initialize the on-board EEPROM. */
|
2017-08-27 21:46:51 -04:00
|
|
|
dev->nvr[0] = dev->HostID; /* SCSI ID 7 */
|
2017-08-22 02:15:02 -04:00
|
|
|
dev->nvr[0] |= (0x10 | 0x20 | 0x40);
|
2020-06-17 00:32:48 +02:00
|
|
|
if (dev->fdc_address == 0x370)
|
|
|
|
|
dev->nvr[0] |= EE0_ALTFLOP;
|
2017-08-22 02:15:02 -04:00
|
|
|
dev->nvr[1] = dev->Irq-9; /* IRQ15 */
|
|
|
|
|
dev->nvr[1] |= (dev->DmaChannel<<4); /* DMA6 */
|
|
|
|
|
dev->nvr[2] = (EE2_HABIOS | /* BIOS enabled */
|
|
|
|
|
EE2_DYNSCAN | /* scan bus */
|
|
|
|
|
EE2_EXT1G | EE2_RMVOK); /* Imm return on seek */
|
|
|
|
|
dev->nvr[3] = SPEED_50; /* speed 5.0 MB/s */
|
|
|
|
|
dev->nvr[6] = (EE6_TERM | /* host term enable */
|
|
|
|
|
EE6_RSTBUS); /* reset SCSI bus on boot*/
|
2017-06-14 03:03:29 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2017-10-10 04:15:29 +02:00
|
|
|
/* Initialize the board's EEPROM (NVR.) */
|
|
|
|
|
static void
|
2017-10-14 07:03:19 +02:00
|
|
|
aha_setnvr(x54x_t *dev)
|
2017-10-10 04:15:29 +02:00
|
|
|
{
|
|
|
|
|
FILE *f;
|
|
|
|
|
|
|
|
|
|
/* Only if this device has an EEPROM. */
|
|
|
|
|
if (dev->nvr_path == NULL) return;
|
|
|
|
|
|
|
|
|
|
/* Allocate and initialize the EEPROM. */
|
|
|
|
|
dev->nvr = (uint8_t *)malloc(NVR_SIZE);
|
|
|
|
|
memset(dev->nvr, 0x00, NVR_SIZE);
|
|
|
|
|
|
2021-03-14 20:35:01 +01:00
|
|
|
f = nvr_fopen(dev->nvr_path, "rb");
|
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
|
|
|
if (f) {
|
2020-01-15 04:58:28 +01:00
|
|
|
if (fread(dev->nvr, 1, NVR_SIZE, f) != NVR_SIZE)
|
|
|
|
|
fatal("aha_setnvr(): Error reading data\n");
|
2017-10-10 04:15:29 +02:00
|
|
|
fclose(f);
|
|
|
|
|
f = NULL;
|
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
|
|
|
} else
|
2017-10-10 04:15:29 +02:00
|
|
|
aha_initnvr(dev);
|
2021-03-20 19:41:07 +01:00
|
|
|
|
|
|
|
|
if (dev->type == AHA_154xCF) {
|
|
|
|
|
if (dev->fdc_address > 0) {
|
|
|
|
|
fdc_remove(dev->fdc);
|
|
|
|
|
fdc_set_base(dev->fdc, (dev->nvr[0] & EE0_ALTFLOP) ? 0x370 : 0x3f0);
|
|
|
|
|
}
|
|
|
|
|
}
|
2017-10-10 04:15:29 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2021-03-22 21:24:48 -03:00
|
|
|
void
|
|
|
|
|
aha1542cp_close(void *priv)
|
|
|
|
|
{
|
|
|
|
|
if (aha1542cp_pnp_rom != NULL) {
|
|
|
|
|
free(aha1542cp_pnp_rom);
|
|
|
|
|
aha1542cp_pnp_rom = NULL;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
x54x_close(priv);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2017-08-22 02:15:02 -04:00
|
|
|
/* General initialization routine for all boards. */
|
2017-05-07 23:42:05 -04:00
|
|
|
static void *
|
2018-03-19 01:02:04 +01:00
|
|
|
aha_init(const device_t *info)
|
2017-05-07 23:42:05 -04:00
|
|
|
{
|
2017-10-14 07:03:19 +02:00
|
|
|
x54x_t *dev;
|
2017-05-07 23:42:05 -04:00
|
|
|
|
2017-10-14 07:03:19 +02:00
|
|
|
/* Call common initializer. */
|
|
|
|
|
dev = x54x_init(info);
|
2021-07-22 20:13:44 +02:00
|
|
|
dev->bus = scsi_get_bus();
|
2017-08-22 02:15:02 -04:00
|
|
|
|
2017-08-25 02:21:26 -04:00
|
|
|
/*
|
|
|
|
|
* Set up the (initial) I/O address, IRQ and DMA info.
|
|
|
|
|
*
|
|
|
|
|
* Note that on MCA, configuration is handled by the BIOS,
|
|
|
|
|
* and so any info we get here will be overwritten by the
|
|
|
|
|
* MCA-assigned values later on!
|
|
|
|
|
*/
|
2017-08-23 00:38:25 -04:00
|
|
|
dev->Base = device_get_config_hex16("base");
|
|
|
|
|
dev->Irq = device_get_config_int("irq");
|
|
|
|
|
dev->DmaChannel = device_get_config_int("dma");
|
2017-08-27 21:46:51 -04:00
|
|
|
dev->rom_addr = device_get_config_hex20("bios_addr");
|
2021-07-22 20:13:44 +02:00
|
|
|
if (!(dev->card_bus & DEVICE_MCA))
|
2020-06-17 00:32:48 +02:00
|
|
|
dev->fdc_address = device_get_config_hex16("fdc_addr");
|
|
|
|
|
else
|
|
|
|
|
dev->fdc_address = 0;
|
2017-08-27 21:46:51 -04:00
|
|
|
dev->HostID = 7; /* default HA ID */
|
2017-10-14 07:03:19 +02:00
|
|
|
dev->setup_info_len = sizeof(aha_setup_t);
|
|
|
|
|
dev->max_id = 7;
|
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
|
|
|
dev->flags = 0;
|
2017-10-14 07:03:19 +02:00
|
|
|
|
2018-03-07 20:06:08 +01:00
|
|
|
dev->ven_callback = aha_callback;
|
2017-10-14 07:03:19 +02:00
|
|
|
dev->ven_cmd_is_fast = aha_cmd_is_fast;
|
|
|
|
|
dev->ven_fast_cmds = aha_fast_cmds;
|
|
|
|
|
dev->get_ven_param_len = aha_param_len;
|
|
|
|
|
dev->ven_cmds = aha_cmds;
|
|
|
|
|
dev->get_ven_data = aha_setup_data;
|
|
|
|
|
|
2021-03-22 21:24:48 -03:00
|
|
|
dev->mcode_path = NULL;
|
|
|
|
|
dev->cmd_33_len = 0x0000;
|
|
|
|
|
dev->cmd_33_offset = 0x0000;
|
|
|
|
|
memset(dev->cmd_33_buf, 0x00, 4096);
|
|
|
|
|
|
2017-10-14 07:03:19 +02:00
|
|
|
strcpy(dev->vendor, "Adaptec");
|
2017-05-07 23:42:05 -04:00
|
|
|
|
2017-08-27 21:46:51 -04:00
|
|
|
/* Perform per-board initialization. */
|
2017-10-07 22:18:30 -04:00
|
|
|
switch(dev->type) {
|
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
|
|
|
case AHA_154xA:
|
|
|
|
|
strcpy(dev->name, "AHA-154xA");
|
|
|
|
|
dev->fw_rev = "A003"; /* The 3.07 microcode says A006. */
|
2021-03-14 20:35:01 +01:00
|
|
|
dev->bios_path = "roms/scsi/adaptec/aha1540a307.bin"; /*Only for port 0x330*/
|
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
|
|
|
/* This is configurable from the configuration for the 154xB, the rest of the controllers read it from the EEPROM. */
|
|
|
|
|
dev->HostID = device_get_config_int("hostid");
|
|
|
|
|
dev->rom_shram = 0x3F80; /* shadow RAM address base */
|
|
|
|
|
dev->rom_shramsz = 128; /* size of shadow RAM */
|
|
|
|
|
dev->ha_bps = 5000000.0; /* normal SCSI */
|
|
|
|
|
break;
|
2022-02-20 02:26:27 -05:00
|
|
|
|
2017-08-22 02:15:02 -04:00
|
|
|
case AHA_154xB:
|
|
|
|
|
strcpy(dev->name, "AHA-154xB");
|
2017-08-23 00:38:25 -04:00
|
|
|
switch(dev->Base) {
|
|
|
|
|
case 0x0330:
|
|
|
|
|
dev->bios_path =
|
2021-03-14 20:35:01 +01:00
|
|
|
"roms/scsi/adaptec/aha1540b320_330.bin";
|
2017-08-23 00:38:25 -04:00
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case 0x0334:
|
|
|
|
|
dev->bios_path =
|
2021-03-14 20:35:01 +01:00
|
|
|
"roms/scsi/adaptec/aha1540b320_334.bin";
|
2017-08-23 00:38:25 -04:00
|
|
|
break;
|
2017-08-22 15:43:04 +02:00
|
|
|
}
|
2018-02-18 10:32:51 +01:00
|
|
|
dev->fw_rev = "A005"; /* The 3.2 microcode says A012. */
|
2017-10-14 07:03:19 +02:00
|
|
|
/* This is configurable from the configuration for the 154xB, the rest of the controllers read it from the EEPROM. */
|
|
|
|
|
dev->HostID = device_get_config_int("hostid");
|
2018-02-18 10:32:51 +01:00
|
|
|
dev->rom_shram = 0x3F80; /* shadow RAM address base */
|
|
|
|
|
dev->rom_shramsz = 128; /* size of shadow RAM */
|
2018-03-07 20:06:08 +01:00
|
|
|
dev->ha_bps = 5000000.0; /* normal SCSI */
|
2017-08-22 02:15:02 -04:00
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case AHA_154xC:
|
|
|
|
|
strcpy(dev->name, "AHA-154xC");
|
2021-03-14 20:35:01 +01:00
|
|
|
dev->bios_path = "roms/scsi/adaptec/aha1542c102.bin";
|
|
|
|
|
dev->nvr_path = "aha1542c.nvr";
|
2017-10-14 07:03:19 +02:00
|
|
|
dev->fw_rev = "D001";
|
2017-08-22 02:15:02 -04:00
|
|
|
dev->rom_shram = 0x3F80; /* shadow RAM address base */
|
|
|
|
|
dev->rom_shramsz = 128; /* size of shadow RAM */
|
|
|
|
|
dev->rom_ioaddr = 0x3F7E; /* [2:0] idx into addr table */
|
|
|
|
|
dev->rom_fwhigh = 0x0022; /* firmware version (hi/lo) */
|
2017-10-14 07:03:19 +02:00
|
|
|
dev->ven_get_host_id = aha_get_host_id; /* function to return host ID from EEPROM */
|
|
|
|
|
dev->ven_get_irq = aha_get_irq; /* function to return IRQ from EEPROM */
|
|
|
|
|
dev->ven_get_dma = aha_get_dma; /* function to return DMA channel from EEPROM */
|
2018-03-07 20:06:08 +01:00
|
|
|
dev->ha_bps = 5000000.0; /* normal SCSI */
|
2017-08-22 02:15:02 -04:00
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case AHA_154xCF:
|
|
|
|
|
strcpy(dev->name, "AHA-154xCF");
|
2021-03-14 20:35:01 +01:00
|
|
|
dev->bios_path = "roms/scsi/adaptec/aha1542cf211.bin";
|
|
|
|
|
dev->nvr_path = "aha1542cf.nvr";
|
2017-10-14 07:03:19 +02:00
|
|
|
dev->fw_rev = "E001";
|
2017-08-22 02:15:02 -04:00
|
|
|
dev->rom_shram = 0x3F80; /* shadow RAM address base */
|
|
|
|
|
dev->rom_shramsz = 128; /* size of shadow RAM */
|
|
|
|
|
dev->rom_ioaddr = 0x3F7E; /* [2:0] idx into addr table */
|
|
|
|
|
dev->rom_fwhigh = 0x0022; /* firmware version (hi/lo) */
|
2021-03-20 18:29:58 -03:00
|
|
|
dev->flags |= X54X_CDROM_BOOT;
|
2017-10-14 07:03:19 +02:00
|
|
|
dev->ven_get_host_id = aha_get_host_id; /* function to return host ID from EEPROM */
|
|
|
|
|
dev->ven_get_irq = aha_get_irq; /* function to return IRQ from EEPROM */
|
|
|
|
|
dev->ven_get_dma = aha_get_dma; /* function to return DMA channel from EEPROM */
|
2018-03-07 20:06:08 +01:00
|
|
|
dev->ha_bps = 10000000.0; /* fast SCSI */
|
2020-06-17 00:32:48 +02:00
|
|
|
if (dev->fdc_address > 0)
|
|
|
|
|
dev->fdc = device_add(&fdc_at_device);
|
2017-08-22 02:15:02 -04:00
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case AHA_154xCP:
|
|
|
|
|
strcpy(dev->name, "AHA-154xCP");
|
2021-03-14 20:35:01 +01:00
|
|
|
dev->bios_path = "roms/scsi/adaptec/aha1542cp102.bin";
|
|
|
|
|
dev->mcode_path = "roms/scsi/adaptec/908301-00_f_mcode_17c9.u12";
|
|
|
|
|
dev->nvr_path = "aha1542cp.nvr";
|
2017-10-14 07:03:19 +02:00
|
|
|
dev->fw_rev = "F001";
|
2017-08-22 02:15:02 -04:00
|
|
|
dev->rom_shram = 0x3F80; /* shadow RAM address base */
|
|
|
|
|
dev->rom_shramsz = 128; /* size of shadow RAM */
|
|
|
|
|
dev->rom_ioaddr = 0x3F7E; /* [2:0] idx into addr table */
|
|
|
|
|
dev->rom_fwhigh = 0x0055; /* firmware version (hi/lo) */
|
2021-03-22 21:24:48 -03:00
|
|
|
dev->flags |= X54X_CDROM_BOOT;
|
2021-03-20 18:29:58 -03:00
|
|
|
dev->flags |= X54X_ISAPNP;
|
2017-10-14 07:03:19 +02:00
|
|
|
dev->ven_get_host_id = aha_get_host_id; /* function to return host ID from EEPROM */
|
|
|
|
|
dev->ven_get_irq = aha_get_irq; /* function to return IRQ from EEPROM */
|
|
|
|
|
dev->ven_get_dma = aha_get_dma; /* function to return DMA channel from EEPROM */
|
2021-03-22 21:24:48 -03:00
|
|
|
dev->ha_bps = 10000000.0; /* fast SCSI */
|
|
|
|
|
dev->pnp_len = 0x00be; /* length of the PnP ROM */
|
|
|
|
|
dev->pnp_offset = 0x533d; /* offset of the PnP ROM in the microcode ROM */
|
|
|
|
|
dev->cmd_33_len = 0x06dc; /* length of the SCSISelect code expansion routine returned by
|
|
|
|
|
SCSI controller command 0x33 */
|
|
|
|
|
dev->cmd_33_offset = 0x7000; /* offset of the SCSISelect code expansion routine in the
|
|
|
|
|
microcode ROM */
|
|
|
|
|
aha_setmcode(dev);
|
2021-03-22 21:45:58 -03:00
|
|
|
if (aha1542cp_pnp_rom)
|
|
|
|
|
isapnp_add_card(aha1542cp_pnp_rom, dev->pnp_len + 7, aha_pnp_config_changed, NULL, NULL, NULL, dev);
|
2021-03-22 21:24:48 -03:00
|
|
|
#ifdef AHA1542CP_FDC
|
2021-03-20 18:29:58 -03:00
|
|
|
dev->fdc = device_add(&fdc_at_device);
|
2021-03-22 21:24:48 -03:00
|
|
|
#endif
|
2017-08-22 02:15:02 -04:00
|
|
|
break;
|
2017-08-23 00:38:25 -04:00
|
|
|
|
|
|
|
|
case AHA_1640:
|
2017-08-25 02:21:26 -04:00
|
|
|
strcpy(dev->name, "AHA-1640");
|
2021-03-14 20:35:01 +01:00
|
|
|
dev->bios_path = "roms/scsi/adaptec/aha1640.bin";
|
2017-10-14 07:03:19 +02:00
|
|
|
dev->fw_rev = "BB01";
|
2017-08-25 02:21:26 -04: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
|
|
|
dev->flags |= X54X_LBA_BIOS;
|
2017-12-05 22:39:21 +01:00
|
|
|
|
2017-08-23 00:38:25 -04:00
|
|
|
/* Enable MCA. */
|
2017-08-26 17:52:59 -04:00
|
|
|
dev->pos_regs[0] = 0x1F; /* MCA board ID */
|
2022-02-20 02:26:27 -05:00
|
|
|
dev->pos_regs[1] = 0x0F;
|
2020-03-25 00:49:25 +01:00
|
|
|
mca_add(aha_mca_read, aha_mca_write, aha_mca_feedb, NULL, dev);
|
2018-03-07 20:06:08 +01:00
|
|
|
dev->ha_bps = 5000000.0; /* normal SCSI */
|
2017-08-23 00:38:25 -04:00
|
|
|
break;
|
2022-02-20 02:26:27 -05:00
|
|
|
}
|
2017-08-25 23:12:44 -04:00
|
|
|
|
2017-08-22 02:15:02 -04:00
|
|
|
/* Initialize ROM BIOS if needed. */
|
2017-08-27 21:46:51 -04:00
|
|
|
aha_setbios(dev);
|
2017-08-22 02:15:02 -04:00
|
|
|
|
|
|
|
|
/* Initialize EEPROM (NVR) if needed. */
|
|
|
|
|
aha_setnvr(dev);
|
|
|
|
|
|
2017-08-23 00:38:25 -04:00
|
|
|
if (dev->Base != 0) {
|
2017-08-25 02:21:26 -04:00
|
|
|
/* Initialize the device. */
|
2017-10-16 18:40:34 +02:00
|
|
|
x54x_device_reset(dev);
|
2017-08-23 00:38:25 -04:00
|
|
|
|
2021-07-22 20:13:44 +02:00
|
|
|
if (!(dev->card_bus & DEVICE_MCA) && !(dev->flags & X54X_ISAPNP)) {
|
2017-10-14 07:03:19 +02:00
|
|
|
/* Register our address space. */
|
2017-10-23 01:36:00 +02:00
|
|
|
x54x_io_set(dev, dev->Base, 4);
|
2017-10-14 07:03:19 +02:00
|
|
|
|
|
|
|
|
/* Enable the memory. */
|
|
|
|
|
if (dev->rom_addr != 0x000000) {
|
|
|
|
|
mem_mapping_enable(&dev->bios.mapping);
|
|
|
|
|
mem_mapping_set_addr(&dev->bios.mapping, dev->rom_addr, ROM_SIZE);
|
|
|
|
|
}
|
2017-08-27 21:46:51 -04:00
|
|
|
}
|
2017-08-25 23:12:44 -04:00
|
|
|
}
|
|
|
|
|
|
2017-05-07 23:42:05 -04:00
|
|
|
return(dev);
|
|
|
|
|
}
|
|
|
|
|
|
2022-02-26 23:31:28 -05:00
|
|
|
// clang-format off
|
2018-03-19 01:02:04 +01:00
|
|
|
static const device_config_t aha_154xb_config[] = {
|
2022-02-26 23:31:28 -05:00
|
|
|
{
|
|
|
|
|
"base", "Address", CONFIG_HEX16, "", 0x334, "", { 0 },
|
2017-10-14 07:03:19 +02:00
|
|
|
{
|
2022-02-26 23:31:28 -05:00
|
|
|
{ "None", 0 },
|
|
|
|
|
{ "0x330", 0x330 },
|
|
|
|
|
{ "0x334", 0x334 },
|
|
|
|
|
{ "0x230", 0x230 },
|
|
|
|
|
{ "0x234", 0x234 },
|
|
|
|
|
{ "0x130", 0x130 },
|
|
|
|
|
{ "0x134", 0x134 },
|
|
|
|
|
{ "" }
|
2017-10-14 07:03:19 +02:00
|
|
|
},
|
2022-02-26 23:31:28 -05:00
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"irq", "IRQ", CONFIG_SELECTION, "", 11, "", { 0 },
|
2017-10-14 07:03:19 +02:00
|
|
|
{
|
2022-02-26 23:31:28 -05:00
|
|
|
{ "IRQ 9", 9 },
|
|
|
|
|
{ "IRQ 10", 10 },
|
|
|
|
|
{ "IRQ 11", 11 },
|
|
|
|
|
{ "IRQ 12", 12 },
|
|
|
|
|
{ "IRQ 14", 14 },
|
|
|
|
|
{ "IRQ 15", 15 },
|
|
|
|
|
{ "" }
|
2017-10-14 07:03:19 +02:00
|
|
|
},
|
2022-02-26 23:31:28 -05:00
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"dma", "DMA channel", CONFIG_SELECTION, "", 6, "", { 0 },
|
2017-10-14 07:03:19 +02:00
|
|
|
{
|
2022-02-26 23:31:28 -05:00
|
|
|
{ "DMA 5", 5 },
|
|
|
|
|
{ "DMA 6", 6 },
|
|
|
|
|
{ "DMA 7", 7 },
|
|
|
|
|
{ "" }
|
2017-10-14 07:03:19 +02:00
|
|
|
},
|
2022-02-26 23:31:28 -05:00
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"hostid", "Host ID", CONFIG_SELECTION, "", 7, "", { 0 },
|
2017-10-14 07:03:19 +02:00
|
|
|
{
|
2022-02-26 23:31:28 -05:00
|
|
|
{ "0", 0 },
|
|
|
|
|
{ "1", 1 },
|
|
|
|
|
{ "2", 2 },
|
|
|
|
|
{ "3", 3 },
|
|
|
|
|
{ "4", 4 },
|
|
|
|
|
{ "5", 5 },
|
|
|
|
|
{ "6", 6 },
|
|
|
|
|
{ "7", 7 },
|
|
|
|
|
{ "" }
|
2017-10-14 07:03:19 +02:00
|
|
|
},
|
2022-02-26 23:31:28 -05:00
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"bios_addr", "BIOS Address", CONFIG_HEX20, "", 0, "", { 0 },
|
2017-10-14 07:03:19 +02:00
|
|
|
{
|
2022-02-26 23:31:28 -05:00
|
|
|
{ "Disabled", 0 },
|
|
|
|
|
{ "C800H", 0xc8000 },
|
|
|
|
|
{ "D000H", 0xd0000 },
|
|
|
|
|
{ "D800H", 0xd8000 },
|
|
|
|
|
{ "DC00H", 0xdc000 },
|
|
|
|
|
{ "" }
|
2017-10-14 07:03:19 +02:00
|
|
|
},
|
2022-02-26 23:31:28 -05:00
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"", "", -1
|
|
|
|
|
}
|
2017-10-14 07:03:19 +02:00
|
|
|
};
|
2017-08-27 21:46:51 -04:00
|
|
|
|
2018-03-19 01:02:04 +01:00
|
|
|
static const device_config_t aha_154x_config[] = {
|
2022-02-26 23:31:28 -05:00
|
|
|
{
|
|
|
|
|
"base", "Address", CONFIG_HEX16, "", 0x334, "", { 0 },
|
2017-05-07 23:42:05 -04:00
|
|
|
{
|
2022-02-26 23:31:28 -05:00
|
|
|
{ "None", 0 },
|
|
|
|
|
{ "0x330", 0x330 },
|
|
|
|
|
{ "0x334", 0x334 },
|
|
|
|
|
{ "0x230", 0x230 },
|
|
|
|
|
{ "0x234", 0x234 },
|
|
|
|
|
{ "0x130", 0x130 },
|
|
|
|
|
{ "0x134", 0x134 },
|
|
|
|
|
{ "" }
|
2017-05-07 23:42:05 -04:00
|
|
|
},
|
2022-02-26 23:31:28 -05:00
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"irq", "IRQ", CONFIG_SELECTION, "", 11, "", { 0 },
|
2017-05-07 23:42:05 -04:00
|
|
|
{
|
2022-02-26 23:31:28 -05:00
|
|
|
{ "IRQ 9", 9 },
|
|
|
|
|
{ "IRQ 10", 10 },
|
|
|
|
|
{ "IRQ 11", 11 },
|
|
|
|
|
{ "IRQ 12", 12 },
|
|
|
|
|
{ "IRQ 14", 14 },
|
|
|
|
|
{ "IRQ 15", 15 },
|
|
|
|
|
{ "" }
|
2017-05-07 23:42:05 -04:00
|
|
|
},
|
2022-02-26 23:31:28 -05:00
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"dma", "DMA channel", CONFIG_SELECTION, "", 6, "", { 0 },
|
2017-05-07 23:42:05 -04:00
|
|
|
{
|
2022-02-26 23:31:28 -05:00
|
|
|
{ "DMA 5", 5 },
|
|
|
|
|
{ "DMA 6", 6 },
|
|
|
|
|
{ "DMA 7", 7 },
|
|
|
|
|
{ "" }
|
2017-05-07 23:42:05 -04:00
|
|
|
},
|
2022-02-26 23:31:28 -05:00
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"bios_addr", "BIOS Address", CONFIG_HEX20, "", 0, "", { 0 },
|
2017-05-07 23:42:05 -04:00
|
|
|
{
|
2022-02-26 23:31:28 -05:00
|
|
|
{ "Disabled", 0 },
|
|
|
|
|
{ "C800H", 0xc8000 },
|
|
|
|
|
{ "D000H", 0xd0000 },
|
|
|
|
|
{ "D800H", 0xd8000 },
|
|
|
|
|
{ "DC00H", 0xdc000 },
|
|
|
|
|
{ "" }
|
|
|
|
|
},
|
2017-05-07 23:42:05 -04:00
|
|
|
},
|
2022-02-26 23:31:28 -05:00
|
|
|
{
|
|
|
|
|
"", "", -1
|
|
|
|
|
}
|
2017-05-07 23:42:05 -04:00
|
|
|
};
|
|
|
|
|
|
2017-08-22 02:15:02 -04:00
|
|
|
|
2020-06-17 00:32:48 +02:00
|
|
|
static const device_config_t aha_154xcf_config[] = {
|
2022-02-26 23:31:28 -05:00
|
|
|
{
|
|
|
|
|
"base", "Address", CONFIG_HEX16, "", 0x334, "", { 0 },
|
2020-06-17 00:32:48 +02:00
|
|
|
{
|
2022-02-26 23:31:28 -05:00
|
|
|
{ "None", 0 },
|
|
|
|
|
{ "0x330", 0x330 },
|
|
|
|
|
{ "0x334", 0x334 },
|
|
|
|
|
{ "0x230", 0x230 },
|
|
|
|
|
{ "0x234", 0x234 },
|
|
|
|
|
{ "0x130", 0x130 },
|
|
|
|
|
{ "0x134", 0x134 },
|
|
|
|
|
{ "" }
|
2020-06-17 00:32:48 +02:00
|
|
|
},
|
2022-02-26 23:31:28 -05:00
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"irq", "IRQ", CONFIG_SELECTION, "", 11, "", { 0 },
|
2020-06-17 00:32:48 +02:00
|
|
|
{
|
2022-02-26 23:31:28 -05:00
|
|
|
{ "IRQ 9", 9 },
|
|
|
|
|
{ "IRQ 10", 10 },
|
|
|
|
|
{ "IRQ 11", 11 },
|
|
|
|
|
{ "IRQ 12", 12 },
|
|
|
|
|
{ "IRQ 14", 14 },
|
|
|
|
|
{ "IRQ 15", 15 },
|
|
|
|
|
{ "" }
|
2020-06-17 00:32:48 +02:00
|
|
|
},
|
2022-02-26 23:31:28 -05:00
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"dma", "DMA channel", CONFIG_SELECTION, "", 6, "", { 0 },
|
2020-06-17 00:32:48 +02:00
|
|
|
{
|
2022-02-26 23:31:28 -05:00
|
|
|
{ "DMA 5", 5 },
|
|
|
|
|
{ "DMA 6", 6 },
|
|
|
|
|
{ "DMA 7", 7 },
|
|
|
|
|
{ "" }
|
2020-06-17 00:32:48 +02:00
|
|
|
},
|
2022-02-26 23:31:28 -05:00
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"bios_addr", "BIOS Address", CONFIG_HEX20, "", 0, "", { 0 },
|
2020-06-17 00:32:48 +02:00
|
|
|
{
|
2022-02-26 23:31:28 -05:00
|
|
|
{ "Disabled", 0 },
|
|
|
|
|
{ "C800H", 0xc8000 },
|
|
|
|
|
{ "CC00H", 0xcc000 },
|
|
|
|
|
{ "D000H", 0xd0000 },
|
|
|
|
|
{ "D400H", 0xd4000 },
|
|
|
|
|
{ "D800H", 0xd8000 },
|
|
|
|
|
{ "DC00H", 0xdc000 },
|
|
|
|
|
{ "" }
|
2020-06-17 00:32:48 +02:00
|
|
|
},
|
2022-02-26 23:31:28 -05:00
|
|
|
},
|
|
|
|
|
{
|
2020-11-16 00:01:21 +01:00
|
|
|
"fdc_addr", "FDC address", CONFIG_HEX16, "", 0, "", { 0 },
|
2022-02-26 23:31:28 -05:00
|
|
|
{
|
|
|
|
|
{ "None", 0 },
|
|
|
|
|
{ "0x3f0", 0x3f0 },
|
|
|
|
|
{ "0x370", 0x370 },
|
|
|
|
|
{ "" }
|
2020-06-17 00:32:48 +02:00
|
|
|
},
|
2022-02-26 23:31:28 -05:00
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"", "", -1
|
|
|
|
|
}
|
2020-06-17 00:32:48 +02:00
|
|
|
};
|
2022-02-26 23:31:28 -05:00
|
|
|
// clang-format on
|
2020-06-17 00:32:48 +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
|
|
|
const device_t aha154xa_device = {
|
|
|
|
|
"Adaptec AHA-154xA",
|
2022-01-13 21:06:11 -05:00
|
|
|
"aha154xa",
|
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_ISA | DEVICE_AT,
|
|
|
|
|
AHA_154xA,
|
|
|
|
|
aha_init, x54x_close, NULL,
|
2020-11-16 00:01:21 +01:00
|
|
|
{ NULL }, NULL, NULL,
|
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
|
|
|
aha_154xb_config
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
const device_t aha154xb_device = {
|
|
|
|
|
"Adaptec AHA-154xB",
|
2022-01-13 21:06:11 -05:00
|
|
|
"aha154xb",
|
2017-10-10 00:14:15 +02:00
|
|
|
DEVICE_ISA | DEVICE_AT,
|
2017-10-08 05:04:38 +02:00
|
|
|
AHA_154xB,
|
2017-10-14 07:03:19 +02:00
|
|
|
aha_init, x54x_close, NULL,
|
2020-11-16 00:01:21 +01:00
|
|
|
{ NULL }, NULL, NULL,
|
2017-10-14 07:03:19 +02:00
|
|
|
aha_154xb_config
|
2017-10-07 00:46:54 -04: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
|
|
|
const device_t aha154xc_device = {
|
|
|
|
|
"Adaptec AHA-154xC",
|
2022-01-13 21:06:11 -05:00
|
|
|
"aha154xc",
|
2017-10-10 00:14:15 +02:00
|
|
|
DEVICE_ISA | DEVICE_AT,
|
2017-10-07 22:18:30 -04:00
|
|
|
AHA_154xC,
|
2017-10-14 07:03:19 +02:00
|
|
|
aha_init, x54x_close, NULL,
|
2020-11-16 00:01:21 +01:00
|
|
|
{ NULL }, NULL, NULL,
|
2017-08-23 00:38:25 -04:00
|
|
|
aha_154x_config
|
2017-05-07 23:42:05 -04: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
|
|
|
const device_t aha154xcf_device = {
|
|
|
|
|
"Adaptec AHA-154xCF",
|
2022-01-13 21:06:11 -05:00
|
|
|
"aha154xcf",
|
2017-10-10 00:14:15 +02:00
|
|
|
DEVICE_ISA | DEVICE_AT,
|
2017-10-07 22:18:30 -04:00
|
|
|
AHA_154xCF,
|
2017-10-14 07:03:19 +02:00
|
|
|
aha_init, x54x_close, NULL,
|
2020-11-16 00:01:21 +01:00
|
|
|
{ NULL }, NULL, NULL,
|
2020-06-17 00:32:48 +02:00
|
|
|
aha_154xcf_config
|
2017-05-07 23:42:05 -04:00
|
|
|
};
|
2017-05-14 16:46:15 +02:00
|
|
|
|
2021-03-20 18:29:58 -03:00
|
|
|
const device_t aha154xcp_device = {
|
|
|
|
|
"Adaptec AHA-154xCP",
|
2022-01-13 21:06:11 -05:00
|
|
|
"aha154xcp",
|
2021-03-20 18:29:58 -03:00
|
|
|
DEVICE_ISA | DEVICE_AT,
|
|
|
|
|
AHA_154xCP,
|
2021-03-22 21:24:48 -03:00
|
|
|
aha_init, aha1542cp_close, NULL,
|
2021-03-20 18:29:58 -03:00
|
|
|
{ NULL }, NULL, NULL,
|
|
|
|
|
NULL
|
|
|
|
|
};
|
|
|
|
|
|
2018-03-19 01:02:04 +01:00
|
|
|
const device_t aha1640_device = {
|
2017-05-14 16:46:15 +02:00
|
|
|
"Adaptec AHA-1640",
|
2022-01-13 21:06:11 -05:00
|
|
|
"aha1640",
|
2017-05-14 16:46:15 +02:00
|
|
|
DEVICE_MCA,
|
2017-10-07 22:18:30 -04:00
|
|
|
AHA_1640,
|
2017-10-14 07:03:19 +02:00
|
|
|
aha_init, x54x_close, NULL,
|
2020-11-16 00:01:21 +01:00
|
|
|
{ NULL }, NULL, NULL,
|
2017-06-15 05:17:34 +02:00
|
|
|
NULL
|
2017-07-16 15:28:09 +01:00
|
|
|
};
|