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.
This commit is contained in:
OBattler
2019-09-20 14:02:30 +02:00
parent b06296bbf6
commit 552a87ea3d
524 changed files with 129555 additions and 21862 deletions

892
src/rom.c
View File

@@ -11,17 +11,16 @@
* NOTES: - pc2386 BIOS is corrupt (JMP at F000:FFF0 points to RAM)
* - pc2386 video BIOS is underdumped (16k instead of 24k)
* - c386sx16 BIOS fails checksum
* - the loadfont() calls should be done elsewhere
*
* Version: @(#)rom.c 1.0.44 2019/02/08
* Version: @(#)rom.c 1.0.45 2019/03/03
*
* Authors: Sarah Walker, <http://pcem-emulator.co.uk/>
* Miran Grca, <mgrca8@gmail.com>
* Fred N. van Kempen, <decwiz@yahoo.com>
*
* Copyright 2008-2018 Sarah Walker.
* Copyright 2016-2018 Miran Grca.
* Copyright 2018 Fred N. van Kempen.
* Copyright 2008-2019 Sarah Walker.
* Copyright 2016-2019 Miran Grca.
* Copyright 2018,2019 Fred N. van Kempen.
*/
#include <stdarg.h>
#include <stdio.h>
@@ -33,14 +32,11 @@
#include "86box.h"
#include "mem.h"
#include "rom.h"
#include "video/video.h" /* for loadfont() */
#include "plat.h"
#include "machine/machine.h"
#include "machine/m_xt_xi8088.h"
int romspresent[ROM_MAX];
#ifdef ENABLE_ROM_LOG
int rom_do_log = ENABLE_ROM_LOG;
@@ -118,6 +114,10 @@ rom_read(uint32_t addr, void *priv)
rom_log("ROM: read byte from BIOS at %06lX\n", addr);
#endif
if (addr < rom->mapping.base)
return 0xff;
if (addr >= (rom->mapping.base + rom->sz))
return 0xff;
return(rom->rom[addr & rom->mask]);
}
@@ -132,6 +132,10 @@ rom_readw(uint32_t addr, void *priv)
rom_log("ROM: read word from BIOS at %06lX\n", addr);
#endif
if (addr < (rom->mapping.base - 1))
return 0xffff;
if (addr >= (rom->mapping.base + rom->sz))
return 0xffff;
return(*(uint16_t *)&rom->rom[addr & rom->mask]);
}
@@ -146,6 +150,10 @@ rom_readl(uint32_t addr, void *priv)
rom_log("ROM: read long from BIOS at %06lX\n", addr);
#endif
if (addr < (rom->mapping.base - 3))
return 0xffffffff;
if (addr >= (rom->mapping.base + rom->sz))
return 0xffffffff;
return(*(uint32_t *)&rom->rom[addr & rom->mask]);
}
@@ -171,8 +179,11 @@ rom_load_linear(wchar_t *fn, uint32_t addr, int sz, int off, uint8_t *ptr)
addr &= 0x03ffff;
}
(void)fseek(f, off, SEEK_SET);
(void)fread(ptr+addr, sz, 1, f);
if (ptr != NULL) {
(void)fseek(f, off, SEEK_SET);
(void)fread(ptr+addr, sz, 1, f);
}
(void)fclose(f);
return(1);
@@ -206,9 +217,12 @@ rom_load_linear_inverted(wchar_t *fn, uint32_t addr, int sz, int off, uint8_t *p
return(0);
}
(void)fseek(f, off, SEEK_SET);
(void)fread(ptr+addr+0x10000, sz >> 1, 1, f);
(void)fread(ptr+addr, sz >> 1, 1, f);
if (ptr != NULL) {
(void)fseek(f, off, SEEK_SET);
(void)fread(ptr+addr+0x10000, sz >> 1, 1, f);
(void)fread(ptr+addr, sz >> 1, 1, f);
}
(void)fclose(f);
return(1);
@@ -242,12 +256,15 @@ rom_load_interleaved(wchar_t *fnl, wchar_t *fnh, uint32_t addr, int sz, int off,
addr &= 0x03ffff;
}
(void)fseek(fl, off, SEEK_SET);
(void)fseek(fh, off, SEEK_SET);
for (c=0; c<sz; c+=2) {
ptr[addr+c] = fgetc(fl);
ptr[addr+c+1] = fgetc(fh);
if (ptr != NULL) {
(void)fseek(fl, off, SEEK_SET);
(void)fseek(fh, off, SEEK_SET);
for (c=0; c<sz; c+=2) {
ptr[addr+c] = fgetc(fl);
ptr[addr+c+1] = fgetc(fh);
}
}
(void)fclose(fh);
(void)fclose(fl);
@@ -255,9 +272,129 @@ rom_load_interleaved(wchar_t *fnl, wchar_t *fnh, uint32_t addr, int sz, int off,
}
static int
bios_normalize(int n, int up)
{
/* 0x2000 -> 0x0000; 0x4000 -> 0x4000; 0x6000 -> 0x4000 */
int temp_n = n & ~MEM_GRANULARITY_MASK;
/* 0x2000 -> 0x4000; 0x4000 -> 0x4000; 0x6000 -> 0x8000 */
if (up && (n % MEM_GRANULARITY_SIZE))
temp_n += MEM_GRANULARITY_SIZE;
return temp_n;
}
static uint8_t *
rom_reset(uint32_t addr, int sz)
{
biosaddr = bios_normalize(addr, 0);
biosmask = bios_normalize(sz, 1) - 1;
if ((biosaddr + biosmask) > 0x000fffff)
biosaddr = 0x000fffff - biosmask;
rom_log("Load BIOS: %i bytes at %08X-%08X\n", biosmask + 1, biosaddr, biosaddr + biosmask);
/* If not done yet, allocate a 128KB buffer for the BIOS ROM. */
if (rom != NULL) {
rom_log("ROM allocated, freeing...\n");
free(rom);
rom = NULL;
}
rom_log("Allocating ROM...\n");
rom = (uint8_t *)malloc(biosmask + 1);
rom_log("Filling ROM with FF's...\n");
memset(rom, 0xff, biosmask + 1);
return rom;
}
/* These four are for loading the BIOS. */
int
bios_load(wchar_t *fn1, wchar_t *fn2, uint32_t addr, int sz, int off, int flags)
{
uint8_t ret = 0;
uint8_t *ptr = NULL;
int i, old_sz = sz;
/*
f0000, 65536 = prepare 64k rom starting at f0000, load 64k bios at 0000
fe000, 65536 = prepare 64k rom starting at f0000, load 8k bios at e000
fe000, 49152 = prepare 48k rom starting at f4000, load 8k bios at a000
fe000, 8192 = prepare 16k rom starting at fc000, load 8k bios at 2000
*/
if (!bios_only)
ptr = (flags & FLAG_AUX) ? rom : rom_reset(addr, sz);
if (!(flags & FLAG_AUX) && ((addr + sz) > 0x00100000))
sz = 0x00100000 - addr;
#ifdef ENABLE_ROM_LOG
if (!bios_only)
rom_log("%sing %i bytes of %sBIOS starting with ptr[%08X] (ptr = %08X)\n", (bios_only) ? "Check" : "Load", sz, (flags & FLAG_AUX) ? "auxiliary " : "", addr - biosaddr, ptr);
#endif
if (flags & FLAG_INT)
ret = rom_load_interleaved(fn1, fn2, addr - biosaddr, sz, off, ptr);
else {
if (flags & FLAG_INV)
ret = rom_load_linear_inverted(fn1, addr - biosaddr, sz, off, ptr);
else
ret = rom_load_linear(fn1, addr - biosaddr, sz, off, ptr);
}
if (!bios_only && (flags & FLAG_REP) && (old_sz >= 65536) && (sz < old_sz)) {
old_sz /= sz;
for (i = 0; i < (old_sz - 1); i++) {
rom_log("Copying ptr[%08X] to ptr[%08X]\n", addr - biosaddr, i * sz);
memcpy(&(ptr[i * sz]), &(ptr[addr - biosaddr]), sz);
}
}
if (!bios_only && ret && !(flags & FLAG_AUX))
mem_add_bios();
return ret;
}
int
bios_load_linear_combined(wchar_t *fn1, wchar_t *fn2, int sz, int off)
{
uint8_t ret = 0;
ret = bios_load_linear(fn1, 0x000f0000, 131072, 128);
ret &= bios_load_aux_linear(fn2, 0x000e0000, sz - 65536, 128);
return ret;
}
#if defined(DEV_BRANCH) && defined(USE_TC430HX)
int
bios_load_linear_combined2(wchar_t *fn1, wchar_t *fn2, wchar_t *fn3, wchar_t *fn4, wchar_t *fn5, int sz, int off)
{
uint8_t ret = 0;
ret = bios_load_linear(fn3, 0x000f0000, 262144, 128);
ret &= bios_load_aux_linear(fn1, 0x000d0000, 65536, 128);
ret &= bios_load_aux_linear(fn2, 0x000c0000, 65536, 128);
ret &= bios_load_aux_linear(fn4, 0x000e0000, sz - 196608, 128);
ret &= bios_load_aux_linear(fn5, 0x000ec000, 16384, 128);
return ret;
}
#endif
int
rom_init(rom_t *rom, wchar_t *fn, uint32_t addr, int sz, int mask, int off, uint32_t flags)
{
rom_log("rom_init(%08X, %08X, %08X, %08X, %08X, %08X, %08X)\n", rom, fn, addr, sz, mask, off, flags);
/* Allocate a buffer for the image. */
rom->rom = malloc(sz);
memset(rom->rom, 0xff, sz);
@@ -270,6 +407,7 @@ rom_init(rom_t *rom, wchar_t *fn, uint32_t addr, int sz, int mask, int off, uint
return(-1);
}
rom->sz = sz;
rom->mask = mask;
mem_mapping_add(&rom->mapping,
@@ -297,6 +435,7 @@ rom_init_interleaved(rom_t *rom, wchar_t *fnl, wchar_t *fnh, uint32_t addr, int
return(-1);
}
rom->sz = sz;
rom->mask = mask;
mem_mapping_add(&rom->mapping,
@@ -307,718 +446,3 @@ rom_init_interleaved(rom_t *rom, wchar_t *fnl, wchar_t *fnh, uint32_t addr, int
return(0);
}
/* Load the ROM BIOS image(s) for the selected machine into memory. */
int
rom_load_bios(int rom_id)
{
FILE *f;
loadfont(L"roms/video/mda/mda.rom", 0);
/* If not done yet, allocate a 128KB buffer for the BIOS ROM. */
if (rom == NULL)
rom = (uint8_t *)malloc(131072);
memset(rom, 0xff, 131072);
/* Default to a 64K ROM BIOS image. */
biosmask = 0xffff;
/* Zap the BIOS ROM EXTENSION area. */
memset(romext, 0xff, 0x8000);
mem_mapping_disable(&romext_mapping);
switch (rom_id) {
case ROM_IBMPC: /* IBM PC (1981) */
if (! rom_load_linear(
L"roms/machines/ibmpc/BIOS_5150_24APR81_U33.BIN",
0x00e000, 8192, 0, rom)) break;
/* Try to load the (full) BASIC ROM. */
if (rom_load_linear(
L"roms/machines/ibmpc/ibm-basic-1.10.rom",
0x006000, 32768, 0, rom)) return(1);
/* Nope. Try to load the first BASIC ROM image. */
if (! rom_load_linear(
L"roms/machines/ibmpc/basicc11.f6",
0x006000, 8192, 0, rom)) return(1); /* nope */
if (! rom_load_linear(
L"roms/machines/ibmpc/basicc11.f8",
0x008000, 8192, 0, rom)) break; /* nope */
if (! rom_load_linear(
L"roms/machines/ibmpc/basicc11.fa",
0x00a000, 8192, 0, rom)) break; /* nope */
if (! rom_load_linear(
L"roms/machines/ibmpc/basicc11.fc",
0x00c000, 8192, 0, rom)) break; /* nope */
return(1);
case ROM_IBMPC82: /* IBM PC (1982) */
if (! rom_load_linear(
L"roms/machines/ibmpc82/pc102782.bin",
0x00e000, 8192, 0, rom)) break;
/* Try to load the (full) BASIC ROM. */
if (rom_load_linear(
L"roms/machines/ibmpc82/ibm-basic-1.10.rom",
0x006000, 32768, 0, rom)) return(1);
/* Nope. Try to load the first BASIC ROM image. */
if (! rom_load_linear(
L"roms/machines/ibmpc82/basicc11.f6",
0x006000, 8192, 0, rom)) return(1); /* nope */
if (! rom_load_linear(
L"roms/machines/ibmpc82/basicc11.f8",
0x008000, 8192, 0, rom)) break; /* nope */
if (! rom_load_linear(
L"roms/machines/ibmpc82/basicc11.fa",
0x00a000, 8192, 0, rom)) break; /* nope */
if (! rom_load_linear(
L"roms/machines/ibmpc82/basicc11.fc",
0x00c000, 8192, 0, rom)) break; /* nope */
return(1);
case ROM_IBMXT: /* IBM PX-XT (1982) */
if (rom_load_linear(
L"roms/machines/ibmxt/xt.rom",
0x000000, 65536, 0, rom)) return(1);
if (! rom_load_linear(
L"roms/machines/ibmxt/5000027.u19",
0x000000, 32768, 0, rom)) break;
if (rom_load_linear(
L"roms/machines/ibmxt/1501512.u18",
0x008000, 32768, 0, rom)) return(1);
break;
case ROM_IBMXT86: /* IBM PX-XT (1986) */
if (! rom_load_linear(
L"roms/machines/ibmxt86/BIOS_5160_09MAY86_U19_62X0819_68X4370_27256_F000.BIN",
0x000000, 32768, 0, rom)) break;
if (rom_load_linear(
L"roms/machines/ibmxt86/BIOS_5160_09MAY86_U18_59X7268_62X0890_27256_F800.BIN",
0x008000, 32768, 0, rom)) return(1);
break;
case ROM_XI8088:
if (rom_load_linear_inverted(
L"roms/machines/xi8088/bios-xi8088.bin",
0x000000, 131072, 0, rom)) {
biosmask = 0x1ffff;
xi8088_bios_128kb_set(1);
return(1);
} else {
if (rom_load_linear(
L"roms/machines/xi8088/bios-xi8088.bin",
0x000000, 65536, 0, rom)) {
xi8088_bios_128kb_set(0);
return(1);
}
}
break;
case ROM_IBMXT286: /* IBM PX-XT 286 */
if (rom_load_interleaved(
L"roms/machines/ibmxt286/bios_5162_21apr86_u34_78x7460_27256.bin",
L"roms/machines/ibmxt286/bios_5162_21apr86_u35_78x7461_27256.bin",
0x000000, 65536, 0, rom)) return(1);
break;
case ROM_IBMPCJR: /* IBM PCjr */
if (rom_load_linear(
L"roms/machines/ibmpcjr/bios.rom",
0x000000, 65536, 0, rom)) return(1);
break;
case ROM_IBMAT: /* IBM PC-AT */
if (rom_load_interleaved(
L"roms/machines/ibmat/62x0820.u27",
L"roms/machines/ibmat/62x0821.u47",
0x000000, 65536, 0, rom)) return(1);
break;
case ROM_GENXT: /* Generic PC-XT clone */
if (rom_load_linear(
L"roms/machines/genxt/pcxt.rom",
0x00e000, 8192, 0, rom)) return(1);
break;
case ROM_PC1512: /* Amstrad PC-1512 */
if (! rom_load_interleaved(
L"roms/machines/pc1512/40044",
L"roms/machines/pc1512/40043",
0x00c000, 16384, 0, rom)) break;
f = rom_fopen(L"roms/machines/pc1512/40078", L"rb");
if (f == NULL) break;
(void)fclose(f);
return(1);
case ROM_PC1640: /* Amstrad PC-1640 */
if (! rom_load_interleaved(
L"roms/machines/pc1640/40044.v3",
L"roms/machines/pc1640/40043.v3",
0x00c000, 16384, 0, rom)) break;
f = rom_fopen(L"roms/machines/pc1640/40100", L"rb");
if (f == NULL) break;
(void)fclose(f);
return(1);
case ROM_PC200:
if (! rom_load_interleaved(
L"roms/machines/pc200/pc20v2.1",
L"roms/machines/pc200/pc20v2.0",
0x00c000, 16384, 0, rom)) break;
f = rom_fopen(L"roms/machines/pc200/40109", L"rb");
if (f == NULL) break;
(void)fclose(f);
return(1);
case ROM_TANDY:
if (rom_load_linear(
L"roms/machines/tandy/tandy1t1.020",
0x000000, 65536, 0, rom)) return(1);
break;
case ROM_TANDY1000HX:
if (! rom_load_linear(
L"roms/machines/tandy1000hx/v020000.u12",
0x000000, 0x20000, 0, rom)) break;
biosmask = 0x1ffff;
return(1);
case ROM_TANDY1000SL2:
if (rom_load_interleaved(
L"roms/machines/tandy1000sl2/8079047.hu1",
L"roms/machines/tandy1000sl2/8079048.hu2",
0x000000, 65536, 0x30000/2, rom)) return(1);
break;
case ROM_PORTABLE:
if (rom_load_linear(
L"roms/machines/portable/compaq portable plus 100666-001 rev c u47.bin",
0x00e000, 8192, 0, rom)) return(1);
break;
case ROM_PORTABLEII:
if (! rom_load_interleaved(
L"roms/machines/portableii/109740-001.rom",
L"roms/machines/portableii/109739-001.rom",
0x000000, 32768, 0, rom)) break;
biosmask = 0x7fff;
return(1);
#if defined(DEV_BRANCH) && defined(USE_PORTABLE3)
case ROM_PORTABLEIII:
case ROM_PORTABLEIII386:
if (rom_load_interleaved(
L"roms/machines/portableiii/109738-002.bin",
L"roms/machines/portableiii/109737-002.bin",
0x000000, 65536, 0, rom)) return(1);
break;
#endif
case ROM_DTKXT:
if (rom_load_linear(
L"roms/machines/dtk/dtk_erso_2.42_2764.bin",
0x00e000, 8192, 0, rom)) return(1);
break;
case ROM_OLIM24:
if (rom_load_interleaved(
L"roms/machines/olivetti_m24/olivetti_m24_version_1.43_low.bin",
L"roms/machines/olivetti_m24/olivetti_m24_version_1.43_high.bin",
0x00c000, 16384, 0, rom)) return(1);
break;
case ROM_PC2086:
if (! rom_load_interleaved(
L"roms/machines/pc2086/40179.ic129",
L"roms/machines/pc2086/40180.ic132",
0x000000, 16384, 0, rom)) break;
f = rom_fopen(L"roms/machines/pc2086/40186.ic171", L"rb");
if (f == NULL) break;
(void)fclose(f);
biosmask = 0x3fff;
return(1);
case ROM_PC3086:
if (! rom_load_linear(
L"roms/machines/pc3086/fc00.bin",
0x000000, 16384, 0, rom)) break;
f = rom_fopen(L"roms/machines/pc3086/c000.bin", L"rb");
if (f == NULL) break;
(void)fclose(f);
biosmask = 0x3fff;
return(1);
case ROM_ZD_SUPERS: /* [8088] Zenith Data Systems SupersPort */
if (!rom_load_linear(
L"roms/machines/zdsupers/z184m v3.1d.10d",
0x000000, 32768, 0, rom)) break;
biosmask = 0x7fff;
return(1);
case ROM_CMDPC30:
if (! rom_load_interleaved(
L"roms/machines/cmdpc30/commodore pc 30 iii even.bin",
L"roms/machines/cmdpc30/commodore pc 30 iii odd.bin",
0x000000, 32768, 0, rom)) break;
biosmask = 0x7fff;
return(1);
case ROM_TG286M:
if (rom_load_linear(
L"roms/machines/tg286m/ami.bin",
0x000000, 65536, 0, rom)) return(1);
break;
case ROM_AMA932J:
if (rom_load_linear(
L"roms/machines/ama932j/ami.bin",
0x000000, 65536, 0, rom)) return(1);
break;
case ROM_AMI386SX:
if (rom_load_linear(
L"roms/machines/ami386/ami386.bin",
0x000000, 65536, 0, rom)) return(1);
break;
case ROM_AMI386SX_OPTI495: /* uses the OPTi 82C495 chipset */
case ROM_AMI386DX_OPTI495: /* uses the OPTi 82C495 chipset */
case ROM_AMI486_OPTI495: /* uses the OPTi 82C495 chipset */
if (rom_load_linear(
L"roms/machines/ami495/opt495sx.ami",
0x000000, 65536, 0, rom)) return(1);
break;
case ROM_MR386SX_OPTI495: /* uses the OPTi 82C495 chipset */
case ROM_MR386DX_OPTI495: /* uses the OPTi 82C495 chipset */
case ROM_MR486_OPTI495: /* uses the OPTi 82C495 chipset */
if (rom_load_linear(
L"roms/machines/mr495/opt495sx.mr",
0x000000, 65536, 0, rom)) return(1);
break;
case ROM_AWARD386SX_OPTI495: /* uses the OPTi 82C495 chipset */
case ROM_AWARD386DX_OPTI495: /* uses the OPTi 82C495 chipset */
case ROM_AWARD486_OPTI495: /* uses the OPTi 82C495 chipset */
if (rom_load_linear(
L"roms/machines/award495/opt495s.awa",
0x000000, 65536, 0, rom)) return(1);
break;
case ROM_AMI286:
if (rom_load_linear(
L"roms/machines/ami286/amic206.bin",
0x000000, 65536, 0, rom)) return(1);
break;
case ROM_AWARD286:
if (rom_load_linear(
L"roms/machines/award286/award.bin",
0x000000, 65536, 0, rom)) return(1);
break;
case ROM_EUROPC:
if (rom_load_linear(
L"roms/machines/europc/50145",
0x008000, 32768, 0, rom)) return(1);
break;
case ROM_MEGAPC:
case ROM_MEGAPCDX:
if (rom_load_interleaved(
L"roms/machines/megapc/41651-bios lo.u18",
L"roms/machines/megapc/211253-bios hi.u19",
0x000000, 65536, 0x08000, rom)) return(1);
break;
case ROM_AMI486:
if (rom_load_linear(
L"roms/machines/ami486/ami486.bin",
0x000000, 65536, 0, rom)) return(1);
break;
case ROM_WIN486:
if (rom_load_linear(
L"roms/machines/win486/ali1429g.amw",
0x000000, 65536, 0, rom)) return(1);
break;
case ROM_430VX:
if (! rom_load_linear(
L"roms/machines/430vx/55xwuq0e.bin",
0x000000, 131072, 0, rom)) break;
biosmask = 0x1ffff;
return(1);
case ROM_REVENGE:
if (! rom_load_linear(
L"roms/machines/revenge/1009af2_.bio",
0x010000, 65536, 128, rom)) break;
if (! rom_load_linear(
L"roms/machines/revenge/1009af2_.bi1",
0x000000, 0x00c000, 128, rom)) break;
biosmask = 0x1ffff;
return(1);
case ROM_ENDEAVOR:
if (! rom_load_linear(
L"roms/machines/endeavor/1006cb0_.bio",
0x010000, 65536, 128, rom)) break;
if (! rom_load_linear(
L"roms/machines/endeavor/1006cb0_.bi1",
0x000000, 0x00d000, 128, rom)) break;
biosmask = 0x1ffff;
return(1);
case ROM_IBMPS1_2011:
if (! rom_load_linear(
L"roms/machines/ibmps1es/f80000.bin",
0x000000, 131072, 0x60000, rom)) break;
biosmask = 0x1ffff;
return(1);
case ROM_IBMPS1_2121:
case ROM_IBMPS1_2121_ISA:
if (! rom_load_linear(
L"roms/machines/ibmps1_2121/fc0000.bin",
0x000000, 131072, 0x20000, rom)) break;
biosmask = 0x1ffff;
return(1);
case ROM_IBMPS1_2133:
if (! rom_load_linear(
L"roms/machines/ibmps1_2133/ps1_2133_52g2974_rom.bin",
0x000000, 131072, 0, rom)) break;
biosmask = 0x1ffff;
return(1);
#if defined(DEV_BRANCH) && defined(USE_PORTABLE3)
case ROM_DESKPRO_386:
if (! rom_load_interleaved(
L"roms/machines/deskpro386/109592-005.u11.bin",
L"roms/machines/deskpro386/109591-005.u13.bin",
0x000000, 32768, 0, rom)) break;
biosmask = 0x7fff;
return(1);
#endif
case ROM_AMIXT:
if (rom_load_linear(
L"roms/machines/amixt/ami_8088_bios_31jan89.bin",
0x00e000, 8192, 0, rom)) return(1);
break;
#if defined(DEV_BRANCH) && defined(USE_LASERXT)
case ROM_LTXT:
if (rom_load_linear(
L"roms/machines/ltxt/27c64.bin",
0x00e000, 8192, 0, rom)) return(1);
break;
case ROM_LXT3:
if (rom_load_linear(
L"roms/machines/lxt3/27c64d.bin",
0x00e000, 8192, 0, rom)) return(1);
break;
#endif
case ROM_GW286CT:
if (rom_load_linear(
L"roms/machines/gw286ct/2ctc001.bin",
0x000000, 65536, 0, rom)) return(1);
break;
case ROM_SPC4200P: /* Samsung SPC-4200P */
if (rom_load_linear(
L"roms/machines/spc4200p/u8.01",
0x000000, 65536, 0, rom)) return(1);
break;
case ROM_SPC4216P:
if (! rom_load_interleaved(
L"roms/machines/spc4216p/7101.u8",
L"roms/machines/spc4216p/ac64.u10",
0x000000, 65536, 0, rom)) break;
return(1);
case ROM_KMXC02:
if (rom_load_linear(
L"roms/machines/kmxc02/3ctm005.bin",
0x000000, 65536, 0, rom)) return(1);
break;
case ROM_SUPER286TR: /* Hyundai Super-286TR */
if (rom_load_linear(
L"roms/machines/super286tr/hyundai_award286.bin",
0x000000, 65536, 0, rom)) return(1);
break;
case ROM_DTK386: /* uses NEAT chipset */
if (rom_load_linear(
L"roms/machines/dtk386/3cto001.bin",
0x000000, 65536, 0, rom)) return(1);
break;
case ROM_PXXT:
if (rom_load_linear(
L"roms/machines/pxxt/000p001.bin",
0x00e000, 8192, 0, rom)) return(1);
break;
case ROM_JUKOPC:
if (rom_load_linear(
L"roms/machines/jukopc/000o001.bin",
0x00e000, 8192, 0, rom)) return(1);
break;
case ROM_IBMPS2_M30_286:
if (! rom_load_linear(
L"roms/machines/ibmps2_m30_286/33f5381a.bin",
0x000000, 131072, 0, rom)) break;
biosmask = 0x1ffff;
return(1);
case ROM_IBMPS2_M70_TYPE3:
if (! rom_load_interleaved(
L"roms/machines/ibmps2_m70_type3/70-a_even.bin",
L"roms/machines/ibmps2_m70_type3/70-a_odd.bin",
0x000000, 131072, 0, rom)) break;
biosmask = 0x1ffff;
return(1);
#if defined(DEV_BRANCH) && defined(USE_PS2M70T4)
case ROM_IBMPS2_M70_TYPE4:
if (! rom_load_interleaved(
L"roms/machines/ibmps2_m70_type4/70-b_even.bin",
L"roms/machines/ibmps2_m70_type4/70-b_odd.bin",
0x000000, 131072, 0, rom)) break;
biosmask = 0x1ffff;
return(1);
#endif
case ROM_DTK486:
if (rom_load_linear(
L"roms/machines/dtk486/4siw005.bin",
0x000000, 65536, 0, rom)) return(1);
break;
case ROM_R418:
if (! rom_load_linear(
L"roms/machines/r418/r418i.bin",
0x000000, 131072, 0, rom)) break;
biosmask = 0x1ffff;
return(1);
#if 0
case ROM_586MC1:
if (! rom_load_linear(
L"roms/machines/586mc1/is.34",
0x000000, 131072, 0, rom)) break;
biosmask = 0x1ffff;
return(1);
#endif
case ROM_PLATO:
if (! rom_load_linear(
L"roms/machines/plato/1016ax1_.bio",
0x010000, 65536, 128, rom)) break;
if (! rom_load_linear(
L"roms/machines/plato/1016ax1_.bi1",
0x000000, 0x00d000, 128, rom)) break;
biosmask = 0x1ffff;
return(1);
case ROM_MB500N:
if (! rom_load_linear(
L"roms/machines/mb500n/031396s.bin",
0x000000, 131072, 0, rom)) break;
biosmask = 0x1ffff;
return(1);
case ROM_AP53:
if (! rom_load_linear(
L"roms/machines/ap53/ap53r2c0.rom",
0x000000, 131072, 0, rom)) break;
biosmask = 0x1ffff;
return(1);
case ROM_P55T2S:
if (! rom_load_linear(
L"roms/machines/p55t2s/s6y08t.rom",
0x000000, 131072, 0, rom)) break;
biosmask = 0x1ffff;
return(1);
case ROM_PRESIDENT:
if (! rom_load_linear(
L"roms/machines/president/bios.bin",
0x000000, 131072, 0, rom)) break;
biosmask = 0x1ffff;
return(1);
case ROM_P54TP4XE:
if (! rom_load_linear(
L"roms/machines/p54tp4xe/t15i0302.awd",
0x000000, 131072, 0, rom)) break;
biosmask = 0x1ffff;
return(1);
case ROM_ACERM3A:
if (! rom_load_linear(
L"roms/machines/acerm3a/r01-b3.bin",
0x000000, 131072, 0, rom)) break;
biosmask = 0x1ffff;
return(1);
case ROM_ACERV35N:
if (! rom_load_linear(
L"roms/machines/acerv35n/v35nd1s1.bin",
0x000000, 131072, 0, rom)) break;
biosmask = 0x1ffff;
return(1);
case ROM_P55VA:
if (! rom_load_linear(
L"roms/machines/p55va/va021297.bin",
0x000000, 131072, 0, rom)) break;
biosmask = 0x1ffff;
return(1);
case ROM_P55T2P4:
if (! rom_load_linear(
L"roms/machines/p55t2p4/0207_j2.bin",
0x000000, 131072, 0, rom)) break;
biosmask = 0x1ffff;
return(1);
case ROM_P55TVP4:
if (! rom_load_linear(
L"roms/machines/p55tvp4/tv5i0204.awd",
0x000000, 131072, 0, rom)) break;
biosmask = 0x1ffff;
return(1);
case ROM_J656VXD:
if (! rom_load_linear(
L"roms/machines/j656vxd/J656VXD.BIN",
0x000000, 131072, 0, rom)) break;
biosmask = 0x1ffff;
return(1);
#if defined(DEV_BRANCH) && defined(USE_I686)
case ROM_440FX: /* working Tyan BIOS */
if (! rom_load_linear(
L"roms/machines/440fx/ntmaw501.bin",
0x000000, 131072, 0, rom)) break;
biosmask = 0x1ffff;
return(1);
case ROM_S1668: /* working Tyan BIOS */
if (! rom_load_linear(
L"roms/machines/tpatx/s1668p.rom",
0x000000, 131072, 0, rom)) break;
biosmask = 0x1ffff;
return(1);
#endif
case ROM_THOR:
if (! rom_load_linear(
L"roms/machines/thor/1006cn0_.bio",
0x010000, 65536, 128, rom)) break;
if (! rom_load_linear(
L"roms/machines/thor/1006cn0_.bi1",
0x000000, 65536, 128, rom)) break;
biosmask = 0x1ffff;
return(1);
#if defined(DEV_BRANCH) && defined(USE_MRTHOR)
case ROM_MRTHOR:
if (! rom_load_linear(
L"roms/machines/mrthor/mr_atx.bio",
0x000000, 131072, 0, rom)) break;
biosmask = 0x1ffff;
return(1);
#endif
case ROM_PB640:
if (! rom_load_linear(
L"roms/machines/pb640/1007CP0R.BIO",
0x010000, 65536, 128, rom)) break;
if (! rom_load_linear(
L"roms/machines/pb640/1007CP0R.BI1",
0x000000, 0x00d000, 128, rom)) break;
biosmask = 0x1ffff;
return(1);
case ROM_ZAPPA:
if (! rom_load_linear(
L"roms/machines/zappa/1006bs0_.bio",
0x010000, 65536, 128, rom)) break;
if (! rom_load_linear(
L"roms/machines/zappa/1006bs0_.bi1",
0x000000, 65536, 128, rom)) break;
biosmask = 0x1ffff;
return(1);
case ROM_IBMPS2_M50:
if (! rom_load_interleaved(
L"roms/machines/ibmps2_m50/90x7423.zm14",
L"roms/machines/ibmps2_m50/90x7426.zm16",
0x000000, 65536, 0, rom)) break;
if (! rom_load_interleaved(
L"roms/machines/ibmps2_m50/90x7420.zm13",
L"roms/machines/ibmps2_m50/90x7429.zm18",
0x010000, 65536, 0, rom)) break;
biosmask = 0x1ffff;
return(1);
case ROM_IBMPS2_M55SX:
if (! rom_load_interleaved(
L"roms/machines/ibmps2_m55sx/33f8146.zm41",
L"roms/machines/ibmps2_m55sx/33f8145.zm40",
0x000000, 131072, 0, rom)) break;
biosmask = 0x1ffff;
return(1);
case ROM_IBMPS2_M80:
if (! rom_load_interleaved(
L"roms/machines/ibmps2_m80/15f6637.bin",
L"roms/machines/ibmps2_m80/15f6639.bin",
0x000000, 131072, 0, rom)) break;
biosmask = 0x1ffff;
return(1);
case ROM_T1000:
loadfont(L"roms/machines/t1000/t1000font.bin", 2);
if (!rom_load_linear(
L"roms/machines/t1000/t1000.rom",
0x000000, 32768, 0, rom)) break;
biosmask = 0x7fff;
return(1);
case ROM_T1200:
loadfont(L"roms/machines/t1200/t1000font.bin", 2);
if (!rom_load_linear(
L"roms/machines/t1200/t1200_019e.ic15.bin",
0x000000, 32768, 0, rom)) break;
biosmask = 0x7fff;
return(1);
case ROM_T3100E:
loadfont(L"roms/machines/t3100e/t3100e_font.bin", 5);
if (rom_load_linear(
L"roms/machines/t3100e/t3100e.rom",
0x000000, 65536, 0, rom)) return(1);
break;
default:
rom_log("ROM: don't know how to handle ROM set %d !\n", rom_id);
}
return(0);
}