Added prefetch timing approximation for 286/386 CPUs, with configurable memory timing.

This commit is contained in:
SarahW 2016-11-25 21:32:02 +00:00
commit 1b73963997
33 changed files with 1139 additions and 261 deletions

View file

@ -8,6 +8,7 @@ static int op ## name ## _w_a16(uint32_t fetchdat) \
cpu_state.ea_seg = &seg; \
cpu_state.ssegs = 1; \
CLOCK_CYCLES(4); \
PREFETCH_PREFIX(); \
\
return x86_opcodes[fetchdat & 0xff](fetchdat >> 8); \
} \
@ -21,6 +22,7 @@ static int op ## name ## _l_a16(uint32_t fetchdat) \
cpu_state.ea_seg = &seg; \
cpu_state.ssegs = 1; \
CLOCK_CYCLES(4); \
PREFETCH_PREFIX(); \
\
return x86_opcodes[(fetchdat & 0xff) | 0x100](fetchdat >> 8); \
} \
@ -34,6 +36,7 @@ static int op ## name ## _w_a32(uint32_t fetchdat) \
cpu_state.ea_seg = &seg; \
cpu_state.ssegs = 1; \
CLOCK_CYCLES(4); \
PREFETCH_PREFIX(); \
\
return x86_opcodes[(fetchdat & 0xff) | 0x200](fetchdat >> 8); \
} \
@ -47,6 +50,7 @@ static int op ## name ## _l_a32(uint32_t fetchdat) \
cpu_state.ea_seg = &seg; \
cpu_state.ssegs = 1; \
CLOCK_CYCLES(4); \
PREFETCH_PREFIX(); \
\
return x86_opcodes[(fetchdat & 0xff) | 0x300](fetchdat >> 8); \
}
@ -66,6 +70,7 @@ static int op_66(uint32_t fetchdat) /*Data size select*/
cpu_state.op32 = ((use32 & 0x100) ^ 0x100) | (cpu_state.op32 & 0x200);
CLOCK_CYCLES(2);
PREFETCH_PREFIX();
return x86_opcodes[(fetchdat & 0xff) | cpu_state.op32](fetchdat >> 8);
}
static int op_67(uint32_t fetchdat) /*Address size select*/
@ -76,5 +81,6 @@ static int op_67(uint32_t fetchdat) /*Address size select*/
cpu_state.op32 = ((use32 & 0x200) ^ 0x200) | (cpu_state.op32 & 0x100);
CLOCK_CYCLES(2);
PREFETCH_PREFIX();
return x86_opcodes[(fetchdat & 0xff) | cpu_state.op32](fetchdat >> 8);
}