Merge remote-tracking branch 'upstream/master' into HEAD
This commit is contained in:
@@ -1049,7 +1049,9 @@ pc_reset_hard_init(void)
|
||||
pc_full_speed();
|
||||
|
||||
cycles = 0;
|
||||
fpu_cycles = 0;
|
||||
#ifdef FPU_CYCLES
|
||||
fpu_cycles = 0;
|
||||
#endif
|
||||
#ifdef USE_DYNAREC
|
||||
cycles_main = 0;
|
||||
#endif
|
||||
|
@@ -93,12 +93,15 @@ x386_log(const char *fmt, ...)
|
||||
cycles -= (c);\
|
||||
}\
|
||||
}
|
||||
#else
|
||||
#define CLOCK_CYCLES(c) cycles -= (c)
|
||||
#endif
|
||||
|
||||
#define CLOCK_CYCLES_FPU(c) cycles -= (c)
|
||||
#define CONCURRENCY_CYCLES(c) fpu_cycles = (c)
|
||||
#else
|
||||
#define CLOCK_CYCLES(c) cycles -= (c)
|
||||
#define CLOCK_CYCLES_FPU(c) cycles -= (c)
|
||||
#define CONCURRENCY_CYCLES(c)
|
||||
#endif
|
||||
|
||||
#define CLOCK_CYCLES_ALWAYS(c) cycles -= (c)
|
||||
|
||||
#include "x86_ops.h"
|
||||
|
@@ -279,11 +279,13 @@ static void prefetch_flush()
|
||||
cycles -= (c);\
|
||||
}\
|
||||
}
|
||||
#else
|
||||
#define CLOCK_CYCLES(c) cycles -= (c)
|
||||
#endif
|
||||
#define CLOCK_CYCLES_FPU(c) cycles -= (c)
|
||||
#define CONCURRENCY_CYCLES(c) fpu_cycles = (c)
|
||||
#else
|
||||
#define CLOCK_CYCLES(c) cycles -= (c)
|
||||
#define CLOCK_CYCLES_FPU(c) cycles -= (c)
|
||||
#define CONCURRENCY_CYCLES(c)
|
||||
#endif
|
||||
#define CLOCK_CYCLES_ALWAYS(c) cycles -= (c)
|
||||
|
||||
|
||||
|
@@ -65,8 +65,13 @@ static __inline void fetch_ea_16_long(uint32_t rmdat)
|
||||
#define OP_TABLE(name) dynarec_ops_ ## name
|
||||
|
||||
#define CLOCK_CYCLES(c)
|
||||
#if 0
|
||||
#define CLOCK_CYCLES_FPU(c)
|
||||
#define CONCURRENCY_CYCLES(c) fpu_cycles = (c)
|
||||
#else
|
||||
#define CLOCK_CYCLES_FPU(c)
|
||||
#define CONCURRENCY_CYCLES(c)
|
||||
#endif
|
||||
#define CLOCK_CYCLES_ALWAYS(c) cycles -= (c)
|
||||
|
||||
#include "386_ops.h"
|
||||
|
@@ -94,6 +94,7 @@ static int refresh = 0, cycdiff;
|
||||
wait(val, 0); \
|
||||
}
|
||||
|
||||
#if 0
|
||||
#define CLOCK_CYCLES_FPU(val) \
|
||||
{ \
|
||||
wait(val, 0); \
|
||||
@@ -113,6 +114,19 @@ static int refresh = 0, cycdiff;
|
||||
}
|
||||
|
||||
#define CONCURRENCY_CYCLES(c) fpu_cycles = (c)
|
||||
#else
|
||||
#define CLOCK_CYCLES(val) \
|
||||
{ \
|
||||
wait(val, 0); \
|
||||
}
|
||||
|
||||
#define CLOCK_CYCLES_FPU(val) \
|
||||
{ \
|
||||
wait(val, 0); \
|
||||
}
|
||||
|
||||
#define CONCURRENCY_CYCLES(c)
|
||||
#endif
|
||||
|
||||
|
||||
typedef int (*OpFn)(uint32_t fetchdat);
|
||||
|
@@ -354,7 +354,11 @@ typedef struct {
|
||||
uint8_t ssegs, ismmx,
|
||||
abrt, _smi_line;
|
||||
|
||||
#ifdef FPU_CYCLES
|
||||
int _cycles, _fpu_cycles, _in_smm;
|
||||
#else
|
||||
int _cycles, _in_smm;
|
||||
#endif
|
||||
|
||||
uint16_t npxs, npxc;
|
||||
|
||||
@@ -457,7 +461,9 @@ COMPILE_TIME_ASSERT(sizeof(cpu_state_t) <= 128)
|
||||
#define DI cpu_state.regs[7].w
|
||||
|
||||
#define cycles cpu_state._cycles
|
||||
#ifdef FPU_CYCLES
|
||||
#define fpu_cycles cpu_state._fpu_cycles
|
||||
#endif
|
||||
|
||||
#define cpu_rm cpu_state.rm_data.rm_mod_reg.rm
|
||||
#define cpu_mod cpu_state.rm_data.rm_mod_reg.mod
|
||||
|
@@ -106,6 +106,7 @@ speaker_get_buffer(int32_t *buffer, int len, void *p)
|
||||
void
|
||||
speaker_init(void)
|
||||
{
|
||||
memset(speaker_buffer, 0, sizeof(speaker_buffer));
|
||||
sound_add_handler(speaker_get_buffer, NULL);
|
||||
speaker_mute = 0;
|
||||
}
|
||||
|
@@ -344,9 +344,9 @@ sound_realloc_buffers(void)
|
||||
free(outbuffer_ex_int16);
|
||||
|
||||
if (sound_is_float)
|
||||
outbuffer_ex = malloc(SOUNDBUFLEN * 2 * sizeof(float));
|
||||
outbuffer_ex = calloc(SOUNDBUFLEN * 2, sizeof(float));
|
||||
else
|
||||
outbuffer_ex_int16 = malloc(SOUNDBUFLEN * 2 * sizeof(int16_t));
|
||||
outbuffer_ex_int16 = calloc(SOUNDBUFLEN * 2, sizeof(int16_t));
|
||||
}
|
||||
|
||||
|
||||
@@ -359,7 +359,7 @@ sound_init(void)
|
||||
outbuffer_ex = NULL;
|
||||
outbuffer_ex_int16 = NULL;
|
||||
|
||||
outbuffer = malloc(SOUNDBUFLEN * 2 * sizeof(int32_t));
|
||||
outbuffer = calloc(SOUNDBUFLEN * 2, sizeof(int32_t));
|
||||
|
||||
for (i = 0; i < CDROM_NUM; i++) {
|
||||
if (cdrom[i].bus_type != CDROM_BUS_DISABLED)
|
||||
|
Reference in New Issue
Block a user