Thoroughly clean up the code to vastly reduce the number of compiler warnings and found and fixed several bugs in the process; Applied all mainline PCem commits; Added SCSI hard disk emulation; Commented out all unfinished machines and graphics cards; Added the AOpen AP53 and ASUS P/I-P55T2 machines as well as another Tyan 440FX machine, all three with AMI WinBIOS (patch from TheCollector1995); Added the Diamond Stealth 3D 3000 (S3 ViRGE/VX) graphics card (patch from TheCollector1995); Added the PS/2 XT IDE (AccuLogic) HDD Controller (patch from TheCollector1995); Added Microsoft/Logitech Bus Mouse emulation (patch from waltje); Overhauled the makefiles (patch from waltje); Added the Adaptec AHA-1542CF SCSI controller (patch from waltje); Added preliminary (but still unfinished) Adaptec AHA-154x SCSI controller BIOS support (patch from waltje); Added an ISABugger debugging device (patch from waltje); Added sanity checks to the Direct3D code.
68 lines
2.0 KiB
C
68 lines
2.0 KiB
C
#include <math.h>
|
|
#ifndef INFINITY
|
|
# define INFINITY (__builtin_inff())
|
|
#endif
|
|
#include "ibm.h"
|
|
#include "cpu.h"
|
|
#include "x86.h"
|
|
#include "x86_ops.h"
|
|
#include "x87.h"
|
|
#include "x86_flags.h"
|
|
#include "mem.h"
|
|
#include "codegen.h"
|
|
#include "pic.h"
|
|
|
|
#define CPU_BLOCK_END() cpu_block_end = 1
|
|
|
|
#include "386_common.h"
|
|
|
|
|
|
extern uint16_t *mod1add[2][8];
|
|
extern uint32_t *mod1seg[8];
|
|
|
|
static __inline void fetch_ea_32_long(uint32_t rmdat)
|
|
{
|
|
eal_r = eal_w = NULL;
|
|
easeg = cpu_state.ea_seg->base;
|
|
ea_rseg = cpu_state.ea_seg->seg;
|
|
if (easeg != 0xFFFFFFFF && ((easeg + cpu_state.eaaddr) & 0xFFF) <= 0xFFC)
|
|
{
|
|
uint32_t addr = easeg + cpu_state.eaaddr;
|
|
if ( readlookup2[addr >> 12] != -1)
|
|
eal_r = (uint32_t *)(readlookup2[addr >> 12] + addr);
|
|
if (writelookup2[addr >> 12] != -1)
|
|
eal_w = (uint32_t *)(writelookup2[addr >> 12] + addr);
|
|
}
|
|
cpu_state.last_ea = cpu_state.eaaddr;
|
|
}
|
|
|
|
static __inline void fetch_ea_16_long(uint32_t rmdat)
|
|
{
|
|
eal_r = eal_w = NULL;
|
|
easeg = cpu_state.ea_seg->base;
|
|
ea_rseg = cpu_state.ea_seg->seg;
|
|
if (easeg != 0xFFFFFFFF && ((easeg + cpu_state.eaaddr) & 0xFFF) <= 0xFFC)
|
|
{
|
|
uint32_t addr = easeg + cpu_state.eaaddr;
|
|
if ( readlookup2[addr >> 12] != -1)
|
|
eal_r = (uint32_t *)(readlookup2[addr >> 12] + addr);
|
|
if (writelookup2[addr >> 12] != -1)
|
|
eal_w = (uint32_t *)(writelookup2[addr >> 12] + addr);
|
|
}
|
|
cpu_state.last_ea = cpu_state.eaaddr;
|
|
}
|
|
|
|
#define fetch_ea_16(rmdat) cpu_state.pc++; if (cpu_mod != 3) fetch_ea_16_long(rmdat);
|
|
#define fetch_ea_32(rmdat) cpu_state.pc++; if (cpu_mod != 3) fetch_ea_32_long(rmdat);
|
|
|
|
|
|
#define PREFETCH_RUN(instr_cycles, bytes, modrm, reads, read_ls, writes, write_ls, ea32)
|
|
#define PREFETCH_PREFIX()
|
|
#define PREFETCH_FLUSH()
|
|
|
|
#define OP_TABLE(name) dynarec_ops_ ## name
|
|
#define CLOCK_CYCLES(c)
|
|
#define CLOCK_CYCLES_ALWAYS(c) cycles -= (c)
|
|
|
|
#include "386_ops.h"
|