Changes to logging - nothing (other than some parts of pc.c) uses the global pclog anymore (and logs will be almost empty (until the base set logging flags is agreed upon);
Fixes to various hard disk controllers; Added the Packard Bell PB640; Fixed the InPort mouse emulation - now it works correctly on Windows NT 3.1; Removed the status window and the associated variables; Completely removed the Green B 486 machine; Fixed the MDSI Genius; Fixed the single-sided 5.25" floppy drive; Ported a CPU-related commit from VARCem.
This commit is contained in:
@@ -1,23 +1,43 @@
|
||||
/*
|
||||
* 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.
|
||||
* VARCem Virtual ARchaeological Computer EMulator.
|
||||
* An emulator of (mostly) x86-based PC systems and devices,
|
||||
* using the ISA,EISA,VLB,MCA and PCI system buses, roughly
|
||||
* spanning the era between 1981 and 1995.
|
||||
*
|
||||
* This file is part of the 86Box distribution.
|
||||
* This file is part of the VARCem Project.
|
||||
*
|
||||
* 286/386+ instruction handlers list.
|
||||
*
|
||||
* Version: @(#)386_ops.h 1.0.3 2018/04/25
|
||||
* Version: @(#)386_ops.h 1.0.2 2018/05/05
|
||||
*
|
||||
* Author: Sarah Walker, <http://pcem-emulator.co.uk/>
|
||||
* Authors: Fred N. van Kempen, <decwiz@yahoo.com>
|
||||
* Sarah Walker, <tommowalker@tommowalker.co.uk>
|
||||
* leilei,
|
||||
* Miran Grca, <mgrca8@gmail.com>
|
||||
*
|
||||
* Copyright 2018 Fred N. van Kempen.
|
||||
* Copyright 2008-2018 Sarah Walker.
|
||||
* Copyright 2016-2018 leilei.
|
||||
* Copyright 2016-2018 Miran Grca.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the:
|
||||
*
|
||||
* Free Software Foundation, Inc.
|
||||
* 59 Temple Place - Suite 330
|
||||
* Boston, MA 02111-1307
|
||||
* USA.
|
||||
*/
|
||||
|
||||
#include "x86_ops.h"
|
||||
|
||||
|
||||
@@ -147,20 +167,9 @@ static int ILLEGAL(uint32_t fetchdat)
|
||||
return 0;
|
||||
}
|
||||
|
||||
#if defined(DEV_BRANCH) && (defined(USE_AMD_K) || defined(USE_I686))
|
||||
static int internal_illegal(char *s)
|
||||
{
|
||||
cpu_state.pc = cpu_state.oldpc;
|
||||
x86gpf(s, 0);
|
||||
return cpu_state.abrt;
|
||||
}
|
||||
#endif
|
||||
|
||||
#include "x86seg.h"
|
||||
#ifdef DEV_BRANCH
|
||||
#ifdef USE_AMD_K
|
||||
#include "x86_ops_amd.h"
|
||||
#endif
|
||||
#if defined(DEV_BRANCH) && defined(USE_AMD_K)
|
||||
# include "x86_ops_amd.h"
|
||||
#endif
|
||||
#include "x86_ops_arith.h"
|
||||
#include "x86_ops_atomic.h"
|
||||
@@ -176,10 +185,8 @@ static int internal_illegal(char *s)
|
||||
#include "x86_ops_jump.h"
|
||||
#include "x86_ops_misc.h"
|
||||
#include "x87_ops.h"
|
||||
#ifdef DEV_BRANCH
|
||||
#ifdef USE_I686
|
||||
#include "x86_ops_i686.h"
|
||||
#endif
|
||||
#if defined(DEV_BRANCH) && defined(USE_I686)
|
||||
# include "x86_ops_i686.h"
|
||||
#endif
|
||||
#include "x86_ops_mmx.h"
|
||||
#include "x86_ops_mmx_arith.h"
|
||||
@@ -204,6 +211,7 @@ static int internal_illegal(char *s)
|
||||
#include "x86_ops_string.h"
|
||||
#include "x86_ops_xchg.h"
|
||||
|
||||
|
||||
static int op0F_w_a16(uint32_t fetchdat)
|
||||
{
|
||||
int opcode = fetchdat & 0xff;
|
||||
@@ -245,7 +253,8 @@ static int op0F_l_a32(uint32_t fetchdat)
|
||||
return x86_opcodes_0f[opcode | 0x300](fetchdat >> 8);
|
||||
}
|
||||
|
||||
OpFn OP_TABLE(286_0f)[1024] =
|
||||
|
||||
const OpFn OP_TABLE(286_0f)[1024] =
|
||||
{
|
||||
/*16-bit data, 16-bit addr*/
|
||||
/* 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f*/
|
||||
@@ -336,7 +345,7 @@ OpFn OP_TABLE(286_0f)[1024] =
|
||||
/*f0*/ ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
|
||||
};
|
||||
|
||||
OpFn OP_TABLE(386_0f)[1024] =
|
||||
const OpFn OP_TABLE(386_0f)[1024] =
|
||||
{
|
||||
/*16-bit data, 16-bit addr*/
|
||||
/* 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f*/
|
||||
@@ -427,7 +436,7 @@ OpFn OP_TABLE(386_0f)[1024] =
|
||||
/*f0*/ ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
|
||||
};
|
||||
|
||||
OpFn OP_TABLE(486_0f)[1024] =
|
||||
const OpFn OP_TABLE(486_0f)[1024] =
|
||||
{
|
||||
/*16-bit data, 16-bit addr*/
|
||||
/* 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f*/
|
||||
@@ -518,7 +527,7 @@ OpFn OP_TABLE(486_0f)[1024] =
|
||||
/*f0*/ ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
|
||||
};
|
||||
|
||||
OpFn OP_TABLE(winchip_0f)[1024] =
|
||||
const OpFn OP_TABLE(winchip_0f)[1024] =
|
||||
{
|
||||
/*16-bit data, 16-bit addr*/
|
||||
/* 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f*/
|
||||
@@ -609,7 +618,7 @@ OpFn OP_TABLE(winchip_0f)[1024] =
|
||||
/*f0*/ ILLEGAL, opPSLLW_a32, opPSLLD_a32, opPSLLQ_a32, ILLEGAL, opPMADDWD_a32, ILLEGAL, ILLEGAL, opPSUBB_a32, opPSUBW_a32, opPSUBD_a32, ILLEGAL, opPADDB_a32, opPADDW_a32, opPADDD_a32, ILLEGAL,
|
||||
};
|
||||
|
||||
OpFn OP_TABLE(pentium_0f)[1024] =
|
||||
const OpFn OP_TABLE(pentium_0f)[1024] =
|
||||
{
|
||||
/*16-bit data, 16-bit addr*/
|
||||
/* 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f*/
|
||||
@@ -700,7 +709,7 @@ OpFn OP_TABLE(pentium_0f)[1024] =
|
||||
/*f0*/ ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
|
||||
};
|
||||
|
||||
OpFn OP_TABLE(pentiummmx_0f)[1024] =
|
||||
const OpFn OP_TABLE(pentiummmx_0f)[1024] =
|
||||
{
|
||||
/*16-bit data, 16-bit addr*/
|
||||
/* 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f*/
|
||||
@@ -791,9 +800,8 @@ OpFn OP_TABLE(pentiummmx_0f)[1024] =
|
||||
/*f0*/ ILLEGAL, opPSLLW_a32, opPSLLD_a32, opPSLLQ_a32, ILLEGAL, opPMADDWD_a32, ILLEGAL, ILLEGAL, opPSUBB_a32, opPSUBW_a32, opPSUBD_a32, ILLEGAL, opPADDB_a32, opPADDW_a32, opPADDD_a32, ILLEGAL,
|
||||
};
|
||||
|
||||
#ifdef DEV_BRANCH
|
||||
#ifdef USE_AMD_K
|
||||
OpFn OP_TABLE(k6_0f)[1024] =
|
||||
#if defined(DEV_BRANCH) && defined(USE_AMD_K)
|
||||
const OpFn OP_TABLE(k6_0f)[1024] =
|
||||
{
|
||||
/*16-bit data, 16-bit addr*/
|
||||
/* 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f*/
|
||||
@@ -884,9 +892,8 @@ OpFn OP_TABLE(k6_0f)[1024] =
|
||||
/*f0*/ ILLEGAL, opPSLLW_a32, opPSLLD_a32, opPSLLQ_a32, ILLEGAL, opPMADDWD_a32, ILLEGAL, ILLEGAL, opPSUBB_a32, opPSUBW_a32, opPSUBD_a32, ILLEGAL, opPADDB_a32, opPADDW_a32, opPADDD_a32, ILLEGAL,
|
||||
};
|
||||
#endif
|
||||
#endif
|
||||
|
||||
OpFn OP_TABLE(c6x86mx_0f)[1024] =
|
||||
const OpFn OP_TABLE(c6x86mx_0f)[1024] =
|
||||
{
|
||||
/*16-bit data, 16-bit addr*/
|
||||
/* 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f*/
|
||||
@@ -979,7 +986,7 @@ OpFn OP_TABLE(c6x86mx_0f)[1024] =
|
||||
|
||||
#ifdef DEV_BRANCH
|
||||
#ifdef USE_I686
|
||||
OpFn OP_TABLE(pentiumpro_0f)[1024] =
|
||||
const OpFn OP_TABLE(pentiumpro_0f)[1024] =
|
||||
{
|
||||
/*16-bit data, 16-bit addr*/
|
||||
/* 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f*/
|
||||
@@ -1071,7 +1078,7 @@ OpFn OP_TABLE(pentiumpro_0f)[1024] =
|
||||
};
|
||||
|
||||
#if 0
|
||||
OpFn OP_TABLE(pentium2_0f)[1024] =
|
||||
const OpFn OP_TABLE(pentium2_0f)[1024] =
|
||||
{
|
||||
/*16-bit data, 16-bit addr*/
|
||||
/* 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f*/
|
||||
@@ -1163,7 +1170,7 @@ OpFn OP_TABLE(pentium2_0f)[1024] =
|
||||
};
|
||||
#endif
|
||||
|
||||
OpFn OP_TABLE(pentium2d_0f)[1024] =
|
||||
const OpFn OP_TABLE(pentium2d_0f)[1024] =
|
||||
{
|
||||
/*16-bit data, 16-bit addr*/
|
||||
/* 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f*/
|
||||
@@ -1256,7 +1263,7 @@ OpFn OP_TABLE(pentium2d_0f)[1024] =
|
||||
#endif
|
||||
#endif
|
||||
|
||||
OpFn OP_TABLE(286)[1024] =
|
||||
const OpFn OP_TABLE(286)[1024] =
|
||||
{
|
||||
/*16-bit data, 16-bit addr*/
|
||||
/* 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f*/
|
||||
@@ -1347,7 +1354,7 @@ OpFn OP_TABLE(286)[1024] =
|
||||
/*f0*/ opLOCK, opLOCK, opREPNE, opREPE, opHLT, opCMC, opF6_a16, opF7_w_a16, opCLC, opSTC, opCLI, opSTI, opCLD, opSTD, opINCDEC_b_a16, opFF_w_a16,
|
||||
};
|
||||
|
||||
OpFn OP_TABLE(386)[1024] =
|
||||
const OpFn OP_TABLE(386)[1024] =
|
||||
{
|
||||
/*16-bit data, 16-bit addr*/
|
||||
/* 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f*/
|
||||
@@ -1438,7 +1445,7 @@ OpFn OP_TABLE(386)[1024] =
|
||||
/*f0*/ opLOCK, opINT1, opREPNE, opREPE, opHLT, opCMC, opF6_a32, opF7_l_a32, opCLC, opSTC, opCLI, opSTI, opCLD, opSTD, opINCDEC_b_a32, opFF_l_a32,
|
||||
};
|
||||
|
||||
OpFn OP_TABLE(REPE)[1024] =
|
||||
const OpFn OP_TABLE(REPE)[1024] =
|
||||
{
|
||||
/*16-bit data, 16-bit addr*/
|
||||
/* 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f*/
|
||||
@@ -1529,7 +1536,7 @@ OpFn OP_TABLE(REPE)[1024] =
|
||||
/*f0*/ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
};
|
||||
|
||||
OpFn OP_TABLE(REPNE)[1024] =
|
||||
const OpFn OP_TABLE(REPNE)[1024] =
|
||||
{
|
||||
/*16-bit data, 16-bit addr*/
|
||||
/* 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f*/
|
||||
|
||||
Reference in New Issue
Block a user