mirror of
https://github.com/86Box/86Box.git
synced 2026-02-22 01:25:33 -07:00
808x and Vx0: Fix the remaining multiple definitions.
This commit is contained in:
@@ -729,6 +729,7 @@ extern int idivl(int32_t val);
|
||||
extern void resetmcr(void);
|
||||
extern void resetx86(void);
|
||||
extern void refreshread(void);
|
||||
extern void refreshread_vx0(void);
|
||||
extern void resetreadlookup(void);
|
||||
extern void softresetx86(void);
|
||||
extern void hardresetx86(void);
|
||||
|
||||
@@ -222,10 +222,6 @@ const uint8_t opf_0f[256] = { 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, /* F0 */
|
||||
0, 0, 0, 0, 0, 0, 0, 0 }; /* F8 */
|
||||
|
||||
uint8_t use_custom_nmi_vector = 0;
|
||||
|
||||
uint32_t custom_nmi_vector = 0x00000000;
|
||||
|
||||
/* Is the CPU 8088 or 8086. */
|
||||
int is8086 = 0;
|
||||
int nx = 0;
|
||||
@@ -422,12 +418,6 @@ sync_to_i8080(void)
|
||||
emulated_processor.interrupt_delay = noint;
|
||||
}
|
||||
|
||||
uint16_t
|
||||
get_last_addr(void)
|
||||
{
|
||||
return last_addr;
|
||||
}
|
||||
|
||||
static void
|
||||
set_ip(uint16_t new_ip)
|
||||
{
|
||||
|
||||
@@ -287,6 +287,15 @@ bus_inw(uint16_t port)
|
||||
return ret;
|
||||
}
|
||||
|
||||
void
|
||||
resub_cycles_vx0(int old_cycles)
|
||||
{
|
||||
if (old_cycles > cycles)
|
||||
wait_states = old_cycles - cycles;
|
||||
|
||||
cycles = old_cycles;
|
||||
}
|
||||
|
||||
static void
|
||||
bus_do_io(int io_type)
|
||||
{
|
||||
@@ -310,7 +319,7 @@ bus_do_io(int io_type)
|
||||
AL = bus_inb((uint16_t) cpu_state.eaaddr);
|
||||
}
|
||||
|
||||
resub_cycles(old_cycles);
|
||||
resub_cycles_vx0(old_cycles);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -370,7 +379,7 @@ bus_do_mem(int io_type)
|
||||
mem_data = (mem_data & 0xff00) | ((uint16_t) bus_readb(mem_seg, (uint32_t) mem_addr));
|
||||
}
|
||||
|
||||
resub_cycles(old_cycles);
|
||||
resub_cycles_vx0(old_cycles);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -510,15 +519,6 @@ do_bus_access(void)
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
resub_cycles(int old_cycles)
|
||||
{
|
||||
if (old_cycles > cycles)
|
||||
wait_states = old_cycles - cycles;
|
||||
|
||||
cycles = old_cycles;
|
||||
}
|
||||
|
||||
static uint8_t
|
||||
biu_queue_has_room(void)
|
||||
{
|
||||
@@ -715,7 +715,7 @@ wait(int c)
|
||||
|
||||
/* This is for external subtraction of cycles, ie. wait states. */
|
||||
void
|
||||
sub_cycles(int c)
|
||||
sub_cycles_vx0(int c)
|
||||
{
|
||||
cycles -= c;
|
||||
}
|
||||
@@ -1143,7 +1143,7 @@ biu_suspend_fetch(void)
|
||||
|
||||
/* Memory refresh read - called by reads and writes on DMA channel 0. */
|
||||
void
|
||||
refreshread(void)
|
||||
refreshread_vx0(void)
|
||||
{
|
||||
if (dma_state == DMA_STATE_IDLE) {
|
||||
dma_state = DMA_STATE_TIMER;
|
||||
|
||||
@@ -581,7 +581,7 @@ FPU_ILLEGAL_a32(uint32_t fetchdat)
|
||||
#define ILLEGAL_a16 FPU_ILLEGAL_a16
|
||||
|
||||
#ifdef FPU_8087
|
||||
const OpFn OP_TABLE(sf_fpu_8087_d8)[32] = {
|
||||
static const OpFn OP_TABLE(sf_fpu_8087_d8)[32] = {
|
||||
// clang-format off
|
||||
sf_FADDs_a16, sf_FMULs_a16, sf_FCOMs_a16, sf_FCOMPs_a16, sf_FSUBs_a16, sf_FSUBRs_a16, sf_FDIVs_a16, sf_FDIVRs_a16,
|
||||
sf_FADDs_a16, sf_FMULs_a16, sf_FCOMs_a16, sf_FCOMPs_a16, sf_FSUBs_a16, sf_FSUBRs_a16, sf_FDIVs_a16, sf_FDIVRs_a16,
|
||||
@@ -590,7 +590,7 @@ const OpFn OP_TABLE(sf_fpu_8087_d8)[32] = {
|
||||
// clang-format on
|
||||
};
|
||||
|
||||
const OpFn OP_TABLE(sf_fpu_8087_d9)[256] = {
|
||||
static const OpFn OP_TABLE(sf_fpu_8087_d9)[256] = {
|
||||
// clang-format off
|
||||
sf_FLDs_a16, sf_FLDs_a16, sf_FLDs_a16, sf_FLDs_a16, sf_FLDs_a16, sf_FLDs_a16, sf_FLDs_a16, sf_FLDs_a16,
|
||||
ILLEGAL_a16, ILLEGAL_a16, ILLEGAL_a16, ILLEGAL_a16, ILLEGAL_a16, ILLEGAL_a16, ILLEGAL_a16, ILLEGAL_a16,
|
||||
@@ -630,7 +630,7 @@ const OpFn OP_TABLE(sf_fpu_8087_d9)[256] = {
|
||||
// clang-format on
|
||||
};
|
||||
|
||||
const OpFn OP_TABLE(sf_fpu_8087_da)[256] = {
|
||||
static const OpFn OP_TABLE(sf_fpu_8087_da)[256] = {
|
||||
// clang-format off
|
||||
sf_FADDil_a16, sf_FADDil_a16, sf_FADDil_a16, sf_FADDil_a16, sf_FADDil_a16, sf_FADDil_a16, sf_FADDil_a16, sf_FADDil_a16,
|
||||
sf_FMULil_a16, sf_FMULil_a16, sf_FMULil_a16, sf_FMULil_a16, sf_FMULil_a16, sf_FMULil_a16, sf_FMULil_a16, sf_FMULil_a16,
|
||||
@@ -670,7 +670,7 @@ const OpFn OP_TABLE(sf_fpu_8087_da)[256] = {
|
||||
// clang-format on
|
||||
};
|
||||
|
||||
const OpFn OP_TABLE(sf_fpu_8087_db)[256] = {
|
||||
static const OpFn OP_TABLE(sf_fpu_8087_db)[256] = {
|
||||
// clang-format off
|
||||
sf_FILDil_a16, sf_FILDil_a16, sf_FILDil_a16, sf_FILDil_a16, sf_FILDil_a16, sf_FILDil_a16, sf_FILDil_a16, sf_FILDil_a16,
|
||||
ILLEGAL_a16, ILLEGAL_a16, ILLEGAL_a16, ILLEGAL_a16, ILLEGAL_a16, ILLEGAL_a16, ILLEGAL_a16, ILLEGAL_a16,
|
||||
@@ -710,7 +710,7 @@ const OpFn OP_TABLE(sf_fpu_8087_db)[256] = {
|
||||
// clang-format on
|
||||
};
|
||||
|
||||
const OpFn OP_TABLE(sf_fpu_8087_dc)[32] = {
|
||||
static const OpFn OP_TABLE(sf_fpu_8087_dc)[32] = {
|
||||
// clang-format off
|
||||
sf_FADDd_a16, sf_FMULd_a16, sf_FCOMd_a16, sf_FCOMPd_a16, sf_FSUBd_a16, sf_FSUBRd_a16, sf_FDIVd_a16, sf_FDIVRd_a16,
|
||||
sf_FADDd_a16, sf_FMULd_a16, sf_FCOMd_a16, sf_FCOMPd_a16, sf_FSUBd_a16, sf_FSUBRd_a16, sf_FDIVd_a16, sf_FDIVRd_a16,
|
||||
@@ -719,7 +719,7 @@ const OpFn OP_TABLE(sf_fpu_8087_dc)[32] = {
|
||||
// clang-format on
|
||||
};
|
||||
|
||||
const OpFn OP_TABLE(sf_fpu_8087_dd)[256] = {
|
||||
static const OpFn OP_TABLE(sf_fpu_8087_dd)[256] = {
|
||||
// clang-format off
|
||||
sf_FLDd_a16, sf_FLDd_a16, sf_FLDd_a16, sf_FLDd_a16, sf_FLDd_a16, sf_FLDd_a16, sf_FLDd_a16, sf_FLDd_a16,
|
||||
ILLEGAL_a16, ILLEGAL_a16, ILLEGAL_a16, ILLEGAL_a16, ILLEGAL_a16, ILLEGAL_a16, ILLEGAL_a16, ILLEGAL_a16,
|
||||
@@ -759,7 +759,7 @@ const OpFn OP_TABLE(sf_fpu_8087_dd)[256] = {
|
||||
// clang-format on
|
||||
};
|
||||
|
||||
const OpFn OP_TABLE(sf_fpu_8087_de)[256] = {
|
||||
static const OpFn OP_TABLE(sf_fpu_8087_de)[256] = {
|
||||
// clang-format off
|
||||
sf_FADDiw_a16, sf_FADDiw_a16, sf_FADDiw_a16, sf_FADDiw_a16, sf_FADDiw_a16, sf_FADDiw_a16, sf_FADDiw_a16, sf_FADDiw_a16,
|
||||
sf_FMULiw_a16, sf_FMULiw_a16, sf_FMULiw_a16, sf_FMULiw_a16, sf_FMULiw_a16, sf_FMULiw_a16, sf_FMULiw_a16, sf_FMULiw_a16,
|
||||
@@ -799,7 +799,7 @@ const OpFn OP_TABLE(sf_fpu_8087_de)[256] = {
|
||||
// clang-format on
|
||||
};
|
||||
|
||||
const OpFn OP_TABLE(sf_fpu_8087_df)[256] = {
|
||||
static const OpFn OP_TABLE(sf_fpu_8087_df)[256] = {
|
||||
// clang-format off
|
||||
sf_FILDiw_a16, sf_FILDiw_a16, sf_FILDiw_a16, sf_FILDiw_a16, sf_FILDiw_a16, sf_FILDiw_a16, sf_FILDiw_a16, sf_FILDiw_a16,
|
||||
ILLEGAL_a16, ILLEGAL_a16, ILLEGAL_a16, ILLEGAL_a16, ILLEGAL_a16, ILLEGAL_a16, ILLEGAL_a16, ILLEGAL_a16,
|
||||
@@ -839,7 +839,7 @@ const OpFn OP_TABLE(sf_fpu_8087_df)[256] = {
|
||||
// clang-format on
|
||||
};
|
||||
|
||||
const OpFn OP_TABLE(fpu_8087_d8)[32] = {
|
||||
static const OpFn OP_TABLE(fpu_8087_d8)[32] = {
|
||||
// clang-format off
|
||||
opFADDs_a16, opFMULs_a16, opFCOMs_a16, opFCOMPs_a16, opFSUBs_a16, opFSUBRs_a16, opFDIVs_a16, opFDIVRs_a16,
|
||||
opFADDs_a16, opFMULs_a16, opFCOMs_a16, opFCOMPs_a16, opFSUBs_a16, opFSUBRs_a16, opFDIVs_a16, opFDIVRs_a16,
|
||||
@@ -848,7 +848,7 @@ const OpFn OP_TABLE(fpu_8087_d8)[32] = {
|
||||
// clang-format on
|
||||
};
|
||||
|
||||
const OpFn OP_TABLE(fpu_8087_d9)[256] = {
|
||||
static const OpFn OP_TABLE(fpu_8087_d9)[256] = {
|
||||
// clang-format off
|
||||
opFLDs_a16, opFLDs_a16, opFLDs_a16, opFLDs_a16, opFLDs_a16, opFLDs_a16, opFLDs_a16, opFLDs_a16,
|
||||
ILLEGAL_a16, ILLEGAL_a16, ILLEGAL_a16, ILLEGAL_a16, ILLEGAL_a16, ILLEGAL_a16, ILLEGAL_a16, ILLEGAL_a16,
|
||||
@@ -888,7 +888,7 @@ const OpFn OP_TABLE(fpu_8087_d9)[256] = {
|
||||
// clang-format on
|
||||
};
|
||||
|
||||
const OpFn OP_TABLE(fpu_8087_da)[256] = {
|
||||
static const OpFn OP_TABLE(fpu_8087_da)[256] = {
|
||||
// clang-format off
|
||||
opFADDil_a16, opFADDil_a16, opFADDil_a16, opFADDil_a16, opFADDil_a16, opFADDil_a16, opFADDil_a16, opFADDil_a16,
|
||||
opFMULil_a16, opFMULil_a16, opFMULil_a16, opFMULil_a16, opFMULil_a16, opFMULil_a16, opFMULil_a16, opFMULil_a16,
|
||||
@@ -928,7 +928,7 @@ const OpFn OP_TABLE(fpu_8087_da)[256] = {
|
||||
// clang-format on
|
||||
};
|
||||
|
||||
const OpFn OP_TABLE(fpu_8087_db)[256] = {
|
||||
static const OpFn OP_TABLE(fpu_8087_db)[256] = {
|
||||
// clang-format off
|
||||
opFILDil_a16, opFILDil_a16, opFILDil_a16, opFILDil_a16, opFILDil_a16, opFILDil_a16, opFILDil_a16, opFILDil_a16,
|
||||
ILLEGAL_a16, ILLEGAL_a16, ILLEGAL_a16, ILLEGAL_a16, ILLEGAL_a16, ILLEGAL_a16, ILLEGAL_a16, ILLEGAL_a16,
|
||||
@@ -968,7 +968,7 @@ const OpFn OP_TABLE(fpu_8087_db)[256] = {
|
||||
// clang-format on
|
||||
};
|
||||
|
||||
const OpFn OP_TABLE(fpu_8087_dc)[32] = {
|
||||
static const OpFn OP_TABLE(fpu_8087_dc)[32] = {
|
||||
// clang-format off
|
||||
opFADDd_a16, opFMULd_a16, opFCOMd_a16, opFCOMPd_a16, opFSUBd_a16, opFSUBRd_a16, opFDIVd_a16, opFDIVRd_a16,
|
||||
opFADDd_a16, opFMULd_a16, opFCOMd_a16, opFCOMPd_a16, opFSUBd_a16, opFSUBRd_a16, opFDIVd_a16, opFDIVRd_a16,
|
||||
@@ -977,7 +977,7 @@ const OpFn OP_TABLE(fpu_8087_dc)[32] = {
|
||||
// clang-format on
|
||||
};
|
||||
|
||||
const OpFn OP_TABLE(fpu_8087_dd)[256] = {
|
||||
static const OpFn OP_TABLE(fpu_8087_dd)[256] = {
|
||||
// clang-format off
|
||||
opFLDd_a16, opFLDd_a16, opFLDd_a16, opFLDd_a16, opFLDd_a16, opFLDd_a16, opFLDd_a16, opFLDd_a16,
|
||||
ILLEGAL_a16, ILLEGAL_a16, ILLEGAL_a16, ILLEGAL_a16, ILLEGAL_a16, ILLEGAL_a16, ILLEGAL_a16, ILLEGAL_a16,
|
||||
@@ -1017,7 +1017,7 @@ const OpFn OP_TABLE(fpu_8087_dd)[256] = {
|
||||
// clang-format on
|
||||
};
|
||||
|
||||
const OpFn OP_TABLE(fpu_8087_de)[256] = {
|
||||
static const OpFn OP_TABLE(fpu_8087_de)[256] = {
|
||||
// clang-format off
|
||||
opFADDiw_a16, opFADDiw_a16, opFADDiw_a16, opFADDiw_a16, opFADDiw_a16, opFADDiw_a16, opFADDiw_a16, opFADDiw_a16,
|
||||
opFMULiw_a16, opFMULiw_a16, opFMULiw_a16, opFMULiw_a16, opFMULiw_a16, opFMULiw_a16, opFMULiw_a16, opFMULiw_a16,
|
||||
@@ -1057,7 +1057,7 @@ const OpFn OP_TABLE(fpu_8087_de)[256] = {
|
||||
// clang-format on
|
||||
};
|
||||
|
||||
const OpFn OP_TABLE(fpu_8087_df)[256] = {
|
||||
static const OpFn OP_TABLE(fpu_8087_df)[256] = {
|
||||
// clang-format off
|
||||
opFILDiw_a16, opFILDiw_a16, opFILDiw_a16, opFILDiw_a16, opFILDiw_a16, opFILDiw_a16, opFILDiw_a16, opFILDiw_a16,
|
||||
ILLEGAL_a16, ILLEGAL_a16, ILLEGAL_a16, ILLEGAL_a16, ILLEGAL_a16, ILLEGAL_a16, ILLEGAL_a16, ILLEGAL_a16,
|
||||
|
||||
@@ -1503,7 +1503,7 @@ dma_channel_read_only(int channel)
|
||||
dma_channel_advance(channel);
|
||||
|
||||
if (!dma_at && !channel)
|
||||
refreshread();
|
||||
is_nec ? refreshread_vx0() : refreshread();
|
||||
|
||||
if (!dma_c->size) {
|
||||
temp = _dma_read(dma_c->ac, dma_c);
|
||||
@@ -1611,7 +1611,7 @@ dma_channel_read(int channel)
|
||||
dma_channel_advance(channel);
|
||||
|
||||
if (!dma_at && !channel)
|
||||
refreshread();
|
||||
is_nec ? refreshread_vx0() : refreshread();
|
||||
|
||||
if (!dma_c->size) {
|
||||
temp = _dma_read(dma_c->ac, dma_c);
|
||||
|
||||
@@ -315,6 +315,9 @@ extern uint16_t get_last_addr(void);
|
||||
extern void sub_cycles(int c);
|
||||
extern void resub_cycles(int old_cycles);
|
||||
|
||||
extern void sub_cycles_vx0(int c);
|
||||
extern void resub_cycles_vx0(int old_cycles);
|
||||
|
||||
extern void ack_pause(void);
|
||||
extern void do_pause(int p);
|
||||
|
||||
|
||||
@@ -106,7 +106,11 @@ compaq_plasma_waitstates(UNUSED(void *priv))
|
||||
int ws;
|
||||
|
||||
ws = ws_array[cycles & 0xf];
|
||||
sub_cycles(ws);
|
||||
|
||||
if (is_nec)
|
||||
sub_cycles_vx0(ws);
|
||||
else
|
||||
sub_cycles(ws);
|
||||
}
|
||||
|
||||
static void
|
||||
|
||||
@@ -91,7 +91,11 @@ nga_waitstates(UNUSED(void *priv))
|
||||
int ws;
|
||||
|
||||
ws = ws_array[cycles & 0xf];
|
||||
sub_cycles(ws);
|
||||
|
||||
if (is_nec)
|
||||
sub_cycles_vx0(ws);
|
||||
else
|
||||
sub_cycles(ws);
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
@@ -157,7 +157,11 @@ ogc_waitstates(UNUSED(void *priv))
|
||||
int ws;
|
||||
|
||||
ws = ws_array[cycles & 0xf];
|
||||
sub_cycles(ws);
|
||||
|
||||
if (is_nec)
|
||||
sub_cycles_vx0(ws);
|
||||
else
|
||||
sub_cycles(ws);
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
Reference in New Issue
Block a user