mirror of
https://github.com/86Box/86Box.git
synced 2026-02-22 09:35:32 -07:00
Merge remote-tracking branch 'upstream/master' into feature/ich2
This commit is contained in:
1
.github/workflows/c-cpp.yml
vendored
1
.github/workflows/c-cpp.yml
vendored
@@ -60,6 +60,7 @@ jobs:
|
||||
make
|
||||
${{ matrix.environment.prefix }}-gcc
|
||||
${{ matrix.environment.prefix }}-pkg-config
|
||||
${{ matrix.environment.prefix }}-openal
|
||||
${{ matrix.environment.prefix }}-freetype
|
||||
${{ matrix.environment.prefix }}-SDL2
|
||||
${{ matrix.environment.prefix }}-zlib
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
#
|
||||
|
||||
# Define our flags
|
||||
string(APPEND CMAKE_C_FLAGS_INIT " -fomit-frame-pointer -Wall -fno-strict-aliasing")
|
||||
string(APPEND CMAKE_C_FLAGS_INIT " -fomit-frame-pointer -Wall -fno-strict-aliasing -Werror=implicit-int -Werror=implicit-function-declaration -Werror=int-conversion -Werror=strict-prototypes -Werror=old-style-definition")
|
||||
string(APPEND CMAKE_CXX_FLAGS_INIT " -fomit-frame-pointer -Wall -fno-strict-aliasing")
|
||||
string(APPEND CMAKE_C_FLAGS_RELEASE_INIT " -g0 -O3")
|
||||
string(APPEND CMAKE_CXX_FLAGS_RELEASE_INIT " -g0 -O3")
|
||||
@@ -32,4 +32,4 @@ foreach(LANG C;CXX)
|
||||
set(CMAKE_${LANG}_FLAGS_${CONFIG} "${CMAKE_${LANG}_FLAGS_${CONFIG}_INIT}" CACHE STRING "Flags used by the ${LANG} compiler during ${CONFIG} builds.")
|
||||
mark_as_advanced(CMAKE_${LANG}_FLAGS_${CONFIG})
|
||||
endforeach()
|
||||
endforeach()
|
||||
endforeach()
|
||||
|
||||
@@ -1121,7 +1121,7 @@ pc_reset_hard_init(void)
|
||||
}
|
||||
|
||||
void
|
||||
update_mouse_msg()
|
||||
update_mouse_msg(void)
|
||||
{
|
||||
wchar_t wcpufamily[2048], wcpu[2048], wmachine[2048], *wcp;
|
||||
|
||||
|
||||
@@ -66,7 +66,7 @@ acpi_log(const char *fmt, ...)
|
||||
#endif
|
||||
|
||||
static uint64_t
|
||||
acpi_clock_get()
|
||||
acpi_clock_get(void)
|
||||
{
|
||||
return tsc * cpu_to_acpi;
|
||||
}
|
||||
|
||||
@@ -9,12 +9,12 @@
|
||||
#include "x86_ops.h"
|
||||
#include "codegen.h"
|
||||
|
||||
void (*codegen_timing_start)();
|
||||
void (*codegen_timing_start)(void);
|
||||
void (*codegen_timing_prefix)(uint8_t prefix, uint32_t fetchdat);
|
||||
void (*codegen_timing_opcode)(uint8_t opcode, uint32_t fetchdat, int op_32, uint32_t op_pc);
|
||||
void (*codegen_timing_block_start)();
|
||||
void (*codegen_timing_block_end)();
|
||||
int (*codegen_timing_jump_cycles)();
|
||||
void (*codegen_timing_block_start)(void);
|
||||
void (*codegen_timing_block_end)(void);
|
||||
int (*codegen_timing_jump_cycles)(void);
|
||||
|
||||
void codegen_timing_set(codegen_timing_t *timing)
|
||||
{
|
||||
|
||||
@@ -292,39 +292,39 @@ extern codeblock_t *codeblock;
|
||||
|
||||
extern codeblock_t **codeblock_hash;
|
||||
|
||||
void codegen_init();
|
||||
void codegen_reset();
|
||||
void codegen_block_init(uint32_t phys_addr);
|
||||
void codegen_block_remove();
|
||||
void codegen_block_start_recompile(codeblock_t *block);
|
||||
void codegen_block_end_recompile(codeblock_t *block);
|
||||
void codegen_block_end();
|
||||
void codegen_generate_call(uint8_t opcode, OpFn op, uint32_t fetchdat, uint32_t new_pc, uint32_t old_pc);
|
||||
void codegen_generate_seg_restore();
|
||||
void codegen_set_op32();
|
||||
void codegen_flush();
|
||||
void codegen_check_flush(page_t *page, uint64_t mask, uint32_t phys_addr);
|
||||
extern void codegen_init(void);
|
||||
extern void codegen_reset(void);
|
||||
extern void codegen_block_init(uint32_t phys_addr);
|
||||
extern void codegen_block_remove(void);
|
||||
extern void codegen_block_start_recompile(codeblock_t *block);
|
||||
extern void codegen_block_end_recompile(codeblock_t *block);
|
||||
extern void codegen_block_end(void);
|
||||
extern void codegen_generate_call(uint8_t opcode, OpFn op, uint32_t fetchdat, uint32_t new_pc, uint32_t old_pc);
|
||||
extern void codegen_generate_seg_restore(void);
|
||||
extern void codegen_set_op32(void);
|
||||
extern void codegen_flush(void);
|
||||
extern void codegen_check_flush(page_t *page, uint64_t mask, uint32_t phys_addr);
|
||||
|
||||
extern int cpu_block_end;
|
||||
extern uint32_t codegen_endpc;
|
||||
|
||||
extern int codegen_block_cycles;
|
||||
|
||||
extern void (*codegen_timing_start)();
|
||||
extern void (*codegen_timing_start)(void);
|
||||
extern void (*codegen_timing_prefix)(uint8_t prefix, uint32_t fetchdat);
|
||||
extern void (*codegen_timing_opcode)(uint8_t opcode, uint32_t fetchdat, int op_32, uint32_t op_pc);
|
||||
extern void (*codegen_timing_block_start)();
|
||||
extern void (*codegen_timing_block_end)();
|
||||
extern int (*codegen_timing_jump_cycles)();
|
||||
extern void (*codegen_timing_block_start)(void);
|
||||
extern void (*codegen_timing_block_end)(void);
|
||||
extern int (*codegen_timing_jump_cycles)(void);
|
||||
|
||||
typedef struct codegen_timing_t
|
||||
{
|
||||
void (*start)();
|
||||
void (*start)(void);
|
||||
void (*prefix)(uint8_t prefix, uint32_t fetchdat);
|
||||
void (*opcode)(uint8_t opcode, uint32_t fetchdat, int op_32, uint32_t op_pc);
|
||||
void (*block_start)();
|
||||
void (*block_end)();
|
||||
int (*jump_cycles)();
|
||||
void (*block_start)(void);
|
||||
void (*block_end)(void);
|
||||
int (*jump_cycles)(void);
|
||||
} codegen_timing_t;
|
||||
|
||||
extern codegen_timing_t codegen_timing_pentium;
|
||||
|
||||
@@ -9,4 +9,4 @@ struct ir_data_t;
|
||||
|
||||
void codegen_accumulate(int acc_reg, int delta);
|
||||
void codegen_accumulate_flush(void);
|
||||
void codegen_accumulate_reset();
|
||||
void codegen_accumulate_reset(void);
|
||||
|
||||
@@ -61,7 +61,7 @@ void codegen_accumulate_flush(void)
|
||||
acc_regs[0].count = 0;
|
||||
}
|
||||
|
||||
void codegen_accumulate_reset()
|
||||
void codegen_accumulate_reset(void)
|
||||
{
|
||||
acc_regs[0].count = 0;
|
||||
}
|
||||
|
||||
@@ -58,7 +58,7 @@ void codegen_accumulate_flush(void)
|
||||
acc_regs[0].count = 0;
|
||||
}
|
||||
|
||||
void codegen_accumulate_reset()
|
||||
void codegen_accumulate_reset(void)
|
||||
{
|
||||
acc_regs[0].count = 0;
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -60,7 +60,7 @@ static uint32_t last_op32;
|
||||
static x86seg *last_ea_seg;
|
||||
static int last_ssegs;
|
||||
|
||||
void codegen_init()
|
||||
void codegen_init(void)
|
||||
{
|
||||
int c;
|
||||
|
||||
@@ -80,7 +80,7 @@ void codegen_init()
|
||||
codeblock[c].valid = 0;
|
||||
}
|
||||
|
||||
void codegen_reset()
|
||||
void codegen_reset(void)
|
||||
{
|
||||
int c;
|
||||
|
||||
@@ -92,7 +92,7 @@ void codegen_reset()
|
||||
codeblock[c].valid = 0;
|
||||
}
|
||||
|
||||
void dump_block()
|
||||
void dump_block(void)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -381,7 +381,7 @@ void codegen_block_start_recompile(codeblock_t *block)
|
||||
codegen_flat_ss = !(cpu_cur_status & CPU_STATUS_NOTFLATSS);
|
||||
}
|
||||
|
||||
void codegen_block_remove()
|
||||
void codegen_block_remove(void)
|
||||
{
|
||||
codeblock_t *block = &codeblock[block_current];
|
||||
|
||||
@@ -390,7 +390,7 @@ void codegen_block_remove()
|
||||
recomp_page = -1;
|
||||
}
|
||||
|
||||
void codegen_block_generate_end_mask()
|
||||
void codegen_block_generate_end_mask(void)
|
||||
{
|
||||
codeblock_t *block = &codeblock[block_current];
|
||||
uint32_t start_pc;
|
||||
@@ -448,7 +448,7 @@ void codegen_block_generate_end_mask()
|
||||
recomp_page = -1;
|
||||
}
|
||||
|
||||
void codegen_block_end()
|
||||
void codegen_block_end(void)
|
||||
{
|
||||
codeblock_t *block = &codeblock[block_current];
|
||||
|
||||
@@ -491,7 +491,7 @@ void codegen_block_end_recompile(codeblock_t *block)
|
||||
add_to_block_list(block);
|
||||
}
|
||||
|
||||
void codegen_flush()
|
||||
void codegen_flush(void)
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -541,7 +541,7 @@ int opcode_0f_modrm[256] =
|
||||
0, 1, 1, 1, 0, 1, 0, 0, 1, 1, 1, 0, 1, 1, 1, 0 /*f0*/
|
||||
};
|
||||
|
||||
void codegen_debug()
|
||||
void codegen_debug(void)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -120,7 +120,7 @@ uint32_t mem_check_write;
|
||||
uint32_t mem_check_write_w;
|
||||
uint32_t mem_check_write_l;
|
||||
|
||||
static uint32_t gen_MEM_LOAD_ADDR_EA_B()
|
||||
static uint32_t gen_MEM_LOAD_ADDR_EA_B(void)
|
||||
{
|
||||
uint32_t addr = (uint32_t)&codeblock[block_current].data[block_pos];
|
||||
|
||||
@@ -171,7 +171,7 @@ static uint32_t gen_MEM_LOAD_ADDR_EA_B()
|
||||
return addr;
|
||||
}
|
||||
|
||||
static uint32_t gen_MEM_LOAD_ADDR_EA_W()
|
||||
static uint32_t gen_MEM_LOAD_ADDR_EA_W(void)
|
||||
{
|
||||
uint32_t addr = (uint32_t)&codeblock[block_current].data[block_pos];
|
||||
|
||||
@@ -227,7 +227,7 @@ static uint32_t gen_MEM_LOAD_ADDR_EA_W()
|
||||
return addr;
|
||||
}
|
||||
|
||||
static uint32_t gen_MEM_LOAD_ADDR_EA_L()
|
||||
static uint32_t gen_MEM_LOAD_ADDR_EA_L(void)
|
||||
{
|
||||
uint32_t addr = (uint32_t)&codeblock[block_current].data[block_pos];
|
||||
|
||||
@@ -279,7 +279,7 @@ static uint32_t gen_MEM_LOAD_ADDR_EA_L()
|
||||
return addr;
|
||||
}
|
||||
|
||||
static uint32_t gen_MEM_LOAD_ADDR_EA_Q()
|
||||
static uint32_t gen_MEM_LOAD_ADDR_EA_Q(void)
|
||||
{
|
||||
uint32_t addr = (uint32_t)&codeblock[block_current].data[block_pos];
|
||||
|
||||
@@ -335,7 +335,7 @@ static uint32_t gen_MEM_LOAD_ADDR_EA_Q()
|
||||
return addr;
|
||||
}
|
||||
|
||||
static uint32_t gen_MEM_STORE_ADDR_EA_B()
|
||||
static uint32_t gen_MEM_STORE_ADDR_EA_B(void)
|
||||
{
|
||||
uint32_t addr = (uint32_t)&codeblock[block_current].data[block_pos];
|
||||
|
||||
@@ -384,7 +384,7 @@ static uint32_t gen_MEM_STORE_ADDR_EA_B()
|
||||
return addr;
|
||||
}
|
||||
|
||||
static uint32_t gen_MEM_STORE_ADDR_EA_W()
|
||||
static uint32_t gen_MEM_STORE_ADDR_EA_W(void)
|
||||
{
|
||||
uint32_t addr = (uint32_t)&codeblock[block_current].data[block_pos];
|
||||
|
||||
@@ -439,7 +439,7 @@ static uint32_t gen_MEM_STORE_ADDR_EA_W()
|
||||
return addr;
|
||||
}
|
||||
|
||||
static uint32_t gen_MEM_STORE_ADDR_EA_L()
|
||||
static uint32_t gen_MEM_STORE_ADDR_EA_L(void)
|
||||
{
|
||||
uint32_t addr = (uint32_t)&codeblock[block_current].data[block_pos];
|
||||
|
||||
@@ -493,7 +493,7 @@ static uint32_t gen_MEM_STORE_ADDR_EA_L()
|
||||
return addr;
|
||||
}
|
||||
|
||||
static uint32_t gen_MEM_STORE_ADDR_EA_Q()
|
||||
static uint32_t gen_MEM_STORE_ADDR_EA_Q(void)
|
||||
{
|
||||
uint32_t addr = (uint32_t)&codeblock[block_current].data[block_pos];
|
||||
|
||||
@@ -555,7 +555,7 @@ static uint32_t gen_MEM_STORE_ADDR_EA_Q()
|
||||
#ifndef RELEASE_BUILD
|
||||
static char gen_MEM_LOAD_ADDR_EA_B_NO_ABRT_err[] = "gen_MEM_LOAD_ADDR_EA_B_NO_ABRT aborted\n";
|
||||
#endif
|
||||
static uint32_t gen_MEM_LOAD_ADDR_EA_B_NO_ABRT()
|
||||
static uint32_t gen_MEM_LOAD_ADDR_EA_B_NO_ABRT(void)
|
||||
{
|
||||
uint32_t addr = (uint32_t)&codeblock[block_current].data[block_pos];
|
||||
|
||||
@@ -620,7 +620,7 @@ static uint32_t gen_MEM_LOAD_ADDR_EA_B_NO_ABRT()
|
||||
#ifndef RELEASE_BUILD
|
||||
static char gen_MEM_LOAD_ADDR_EA_W_NO_ABRT_err[] = "gen_MEM_LOAD_ADDR_EA_W_NO_ABRT aborted\n";
|
||||
#endif
|
||||
static uint32_t gen_MEM_LOAD_ADDR_EA_W_NO_ABRT()
|
||||
static uint32_t gen_MEM_LOAD_ADDR_EA_W_NO_ABRT(void)
|
||||
{
|
||||
uint32_t addr = (uint32_t)&codeblock[block_current].data[block_pos];
|
||||
|
||||
@@ -690,7 +690,7 @@ static uint32_t gen_MEM_LOAD_ADDR_EA_W_NO_ABRT()
|
||||
#ifndef RELEASE_BUILD
|
||||
static char gen_MEM_LOAD_ADDR_EA_L_NO_ABRT_err[] = "gen_MEM_LOAD_ADDR_EA_L_NO_ABRT aborted\n";
|
||||
#endif
|
||||
static uint32_t gen_MEM_LOAD_ADDR_EA_L_NO_ABRT()
|
||||
static uint32_t gen_MEM_LOAD_ADDR_EA_L_NO_ABRT(void)
|
||||
{
|
||||
uint32_t addr = (uint32_t)&codeblock[block_current].data[block_pos];
|
||||
|
||||
@@ -759,7 +759,7 @@ static uint32_t gen_MEM_LOAD_ADDR_EA_L_NO_ABRT()
|
||||
#ifndef RELEASE_BUILD
|
||||
static char gen_MEM_STORE_ADDR_EA_B_NO_ABRT_err[] = "gen_MEM_STORE_ADDR_EA_B_NO_ABRT aborted\n";
|
||||
#endif
|
||||
static uint32_t gen_MEM_STORE_ADDR_EA_B_NO_ABRT()
|
||||
static uint32_t gen_MEM_STORE_ADDR_EA_B_NO_ABRT(void)
|
||||
{
|
||||
uint32_t addr = (uint32_t)&codeblock[block_current].data[block_pos];
|
||||
|
||||
@@ -820,7 +820,7 @@ static uint32_t gen_MEM_STORE_ADDR_EA_B_NO_ABRT()
|
||||
#ifndef RELEASE_BUILD
|
||||
static char gen_MEM_STORE_ADDR_EA_W_NO_ABRT_err[] = "gen_MEM_STORE_ADDR_EA_W_NO_ABRT aborted\n";
|
||||
#endif
|
||||
static uint32_t gen_MEM_STORE_ADDR_EA_W_NO_ABRT()
|
||||
static uint32_t gen_MEM_STORE_ADDR_EA_W_NO_ABRT(void)
|
||||
{
|
||||
uint32_t addr = (uint32_t)&codeblock[block_current].data[block_pos];
|
||||
|
||||
@@ -887,7 +887,7 @@ static uint32_t gen_MEM_STORE_ADDR_EA_W_NO_ABRT()
|
||||
#ifndef RELEASE_BUILD
|
||||
static char gen_MEM_STORE_ADDR_EA_L_NO_ABRT_err[] = "gen_MEM_STORE_ADDR_EA_L_NO_ABRT aborted\n";
|
||||
#endif
|
||||
static uint32_t gen_MEM_STORE_ADDR_EA_L_NO_ABRT()
|
||||
static uint32_t gen_MEM_STORE_ADDR_EA_L_NO_ABRT(void)
|
||||
{
|
||||
uint32_t addr = (uint32_t)&codeblock[block_current].data[block_pos];
|
||||
|
||||
@@ -950,7 +950,7 @@ static uint32_t gen_MEM_STORE_ADDR_EA_L_NO_ABRT()
|
||||
return addr;
|
||||
}
|
||||
|
||||
static uint32_t gen_MEM_CHECK_WRITE()
|
||||
static uint32_t gen_MEM_CHECK_WRITE(void)
|
||||
{
|
||||
uint32_t addr = (uint32_t)&codeblock[block_current].data[block_pos];
|
||||
|
||||
@@ -1007,7 +1007,7 @@ static uint32_t gen_MEM_CHECK_WRITE()
|
||||
return addr;
|
||||
}
|
||||
|
||||
static uint32_t gen_MEM_CHECK_WRITE_W()
|
||||
static uint32_t gen_MEM_CHECK_WRITE_W(void)
|
||||
{
|
||||
uint32_t addr = (uint32_t)&codeblock[block_current].data[block_pos];
|
||||
|
||||
@@ -1089,7 +1089,7 @@ static uint32_t gen_MEM_CHECK_WRITE_W()
|
||||
return addr;
|
||||
}
|
||||
|
||||
static uint32_t gen_MEM_CHECK_WRITE_L()
|
||||
static uint32_t gen_MEM_CHECK_WRITE_L(void)
|
||||
{
|
||||
uint32_t addr = (uint32_t)&codeblock[block_current].data[block_pos];
|
||||
|
||||
@@ -1171,7 +1171,7 @@ static uint32_t gen_MEM_CHECK_WRITE_L()
|
||||
return addr;
|
||||
}
|
||||
|
||||
void codegen_init()
|
||||
void codegen_init(void)
|
||||
{
|
||||
#ifdef _WIN32
|
||||
codeblock = VirtualAlloc(NULL, (BLOCK_SIZE+1) * sizeof(codeblock_t), MEM_COMMIT, PAGE_EXECUTE_READWRITE);
|
||||
@@ -1244,14 +1244,14 @@ void codegen_init()
|
||||
#endif
|
||||
}
|
||||
|
||||
void codegen_reset()
|
||||
void codegen_reset(void)
|
||||
{
|
||||
memset(codeblock, 0, BLOCK_SIZE * sizeof(codeblock_t));
|
||||
memset(codeblock_hash, 0, HASH_SIZE * sizeof(codeblock_t *));
|
||||
mem_reset_page_blocks();
|
||||
}
|
||||
|
||||
void dump_block()
|
||||
void dump_block(void)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -1512,7 +1512,7 @@ void codegen_block_start_recompile(codeblock_t *block)
|
||||
codegen_accumulate_reset();
|
||||
}
|
||||
|
||||
void codegen_block_remove()
|
||||
void codegen_block_remove(void)
|
||||
{
|
||||
codeblock_t *block = &codeblock[block_current];
|
||||
|
||||
@@ -1521,7 +1521,7 @@ void codegen_block_remove()
|
||||
recomp_page = -1;
|
||||
}
|
||||
|
||||
void codegen_block_generate_end_mask()
|
||||
void codegen_block_generate_end_mask(void)
|
||||
{
|
||||
codeblock_t *block = &codeblock[block_current];
|
||||
uint32_t start_pc;
|
||||
@@ -1581,7 +1581,7 @@ void codegen_block_generate_end_mask()
|
||||
recomp_page = -1;
|
||||
}
|
||||
|
||||
void codegen_block_end()
|
||||
void codegen_block_end(void)
|
||||
{
|
||||
codeblock_t *block = &codeblock[block_current];
|
||||
|
||||
@@ -1618,7 +1618,7 @@ void codegen_block_end_recompile(codeblock_t *block)
|
||||
block->flags &= ~CODEBLOCK_STATIC_TOP;
|
||||
}
|
||||
|
||||
void codegen_flush()
|
||||
void codegen_flush(void)
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -1668,7 +1668,7 @@ int opcode_0f_modrm[256] =
|
||||
0, 1, 1, 1, 0, 1, 0, 0, 1, 1, 1, 0, 1, 1, 1, 0 /*f0*/
|
||||
};
|
||||
|
||||
void codegen_debug()
|
||||
void codegen_debug(void)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -58,12 +58,12 @@ int has_ea;
|
||||
codeblock_t *codeblock;
|
||||
uint16_t *codeblock_hash;
|
||||
|
||||
void (*codegen_timing_start)();
|
||||
void (*codegen_timing_start)(void);
|
||||
void (*codegen_timing_prefix)(uint8_t prefix, uint32_t fetchdat);
|
||||
void (*codegen_timing_opcode)(uint8_t opcode, uint32_t fetchdat, int op_32, uint32_t op_pc);
|
||||
void (*codegen_timing_block_start)();
|
||||
void (*codegen_timing_block_end)();
|
||||
int (*codegen_timing_jump_cycles)();
|
||||
void (*codegen_timing_block_start)(void);
|
||||
void (*codegen_timing_block_end)(void);
|
||||
int (*codegen_timing_jump_cycles)(void);
|
||||
|
||||
void codegen_timing_set(codegen_timing_t *timing)
|
||||
{
|
||||
@@ -81,7 +81,7 @@ static int last_op_ssegs;
|
||||
static x86seg *last_op_ea_seg;
|
||||
static uint32_t last_op_32;
|
||||
|
||||
void codegen_generate_reset()
|
||||
void codegen_generate_reset(void)
|
||||
{
|
||||
last_op_ssegs = -1;
|
||||
last_op_ea_seg = NULL;
|
||||
|
||||
@@ -314,29 +314,29 @@ static inline void codegen_mark_code_present(codeblock_t *block, uint32_t start_
|
||||
codegen_mark_code_present_multibyte(block, start_pc, len);
|
||||
}
|
||||
|
||||
void codegen_init();
|
||||
void codegen_close();
|
||||
void codegen_reset();
|
||||
void codegen_block_init(uint32_t phys_addr);
|
||||
void codegen_block_remove();
|
||||
void codegen_block_start_recompile(codeblock_t *block);
|
||||
void codegen_block_end_recompile(codeblock_t *block);
|
||||
void codegen_block_end();
|
||||
void codegen_delete_block(codeblock_t *block);
|
||||
void codegen_generate_call(uint8_t opcode, OpFn op, uint32_t fetchdat, uint32_t new_pc, uint32_t old_pc);
|
||||
void codegen_generate_seg_restore();
|
||||
void codegen_set_op32();
|
||||
void codegen_flush();
|
||||
void codegen_check_flush(struct page_t *page, uint64_t mask, uint32_t phys_addr);
|
||||
extern void codegen_init(void);
|
||||
extern void codegen_close(void);
|
||||
extern void codegen_reset(void);
|
||||
extern void codegen_block_init(uint32_t phys_addr);
|
||||
extern void codegen_block_remove(void);
|
||||
extern void codegen_block_start_recompile(codeblock_t *block);
|
||||
extern void codegen_block_end_recompile(codeblock_t *block);
|
||||
extern void codegen_block_end(void);
|
||||
extern void codegen_delete_block(codeblock_t *block);
|
||||
extern void codegen_generate_call(uint8_t opcode, OpFn op, uint32_t fetchdat, uint32_t new_pc, uint32_t old_pc);
|
||||
extern void codegen_generate_seg_restore(void);
|
||||
extern void codegen_set_op32(void);
|
||||
extern void codegen_flush(void);
|
||||
extern void codegen_check_flush(struct page_t *page, uint64_t mask, uint32_t phys_addr);
|
||||
struct ir_data_t;
|
||||
x86seg *codegen_generate_ea(struct ir_data_t *ir, x86seg *op_ea_seg, uint32_t fetchdat, int op_ssegs, uint32_t *op_pc, uint32_t op_32, int stack_offset);
|
||||
void codegen_check_seg_read(codeblock_t *block, struct ir_data_t *ir, x86seg *seg);
|
||||
void codegen_check_seg_write(codeblock_t *block, struct ir_data_t *ir, x86seg *seg);
|
||||
extern void codegen_check_seg_read(codeblock_t *block, struct ir_data_t *ir, x86seg *seg);
|
||||
extern void codegen_check_seg_write(codeblock_t *block, struct ir_data_t *ir, x86seg *seg);
|
||||
|
||||
int codegen_purge_purgable_list();
|
||||
extern int codegen_purge_purgable_list(void);
|
||||
/*Delete a random code block to free memory. This is obviously quite expensive, and
|
||||
will only be called when the allocator is out of memory*/
|
||||
void codegen_delete_random_block(int required_mem_block);
|
||||
extern void codegen_delete_random_block(int required_mem_block);
|
||||
|
||||
extern int cpu_block_end;
|
||||
extern uint32_t codegen_endpc;
|
||||
@@ -346,21 +346,21 @@ extern int cpu_notreps;
|
||||
|
||||
extern int codegen_block_cycles;
|
||||
|
||||
extern void (*codegen_timing_start)();
|
||||
extern void (*codegen_timing_start)(void);
|
||||
extern void (*codegen_timing_prefix)(uint8_t prefix, uint32_t fetchdat);
|
||||
extern void (*codegen_timing_opcode)(uint8_t opcode, uint32_t fetchdat, int op_32, uint32_t op_pc);
|
||||
extern void (*codegen_timing_block_start)();
|
||||
extern void (*codegen_timing_block_end)();
|
||||
extern int (*codegen_timing_jump_cycles)();
|
||||
extern void (*codegen_timing_block_start)(void);
|
||||
extern void (*codegen_timing_block_end)(void);
|
||||
extern int (*codegen_timing_jump_cycles)(void);
|
||||
|
||||
typedef struct codegen_timing_t
|
||||
{
|
||||
void (*start)();
|
||||
void (*start)(void);
|
||||
void (*prefix)(uint8_t prefix, uint32_t fetchdat);
|
||||
void (*opcode)(uint8_t opcode, uint32_t fetchdat, int op_32, uint32_t op_pc);
|
||||
void (*block_start)();
|
||||
void (*block_end)();
|
||||
int (*jump_cycles)();
|
||||
void (*block_start)(void);
|
||||
void (*block_end)(void);
|
||||
int (*jump_cycles)(void);
|
||||
} codegen_timing_t;
|
||||
|
||||
extern codegen_timing_t codegen_timing_pentium;
|
||||
@@ -398,7 +398,7 @@ extern int codegen_reg_loaded[8];
|
||||
|
||||
extern int codegen_in_recompile;
|
||||
|
||||
void codegen_generate_reset();
|
||||
void codegen_generate_reset(void);
|
||||
|
||||
int codegen_get_instruction_uop(codeblock_t *block, uint32_t pc, int *first_instruction, int *TOP);
|
||||
void codegen_set_loop_start(struct ir_data_t *ir, int first_instruction);
|
||||
|
||||
@@ -36,7 +36,7 @@ void codegen_accumulate_flush(ir_data_t *ir)
|
||||
acc_regs[0].count = 0;
|
||||
}
|
||||
|
||||
void codegen_accumulate_reset()
|
||||
void codegen_accumulate_reset(void)
|
||||
{
|
||||
acc_regs[0].count = 0;
|
||||
}
|
||||
|
||||
@@ -9,4 +9,4 @@ struct ir_data_t;
|
||||
|
||||
void codegen_accumulate(struct ir_data_t *ir, int acc_reg, int delta);
|
||||
void codegen_accumulate_flush(struct ir_data_t *ir);
|
||||
void codegen_accumulate_reset();
|
||||
void codegen_accumulate_reset(void);
|
||||
|
||||
@@ -30,7 +30,7 @@ static uint8_t *mem_block_alloc = NULL;
|
||||
|
||||
int codegen_allocator_usage = 0;
|
||||
|
||||
void codegen_allocator_init()
|
||||
void codegen_allocator_init(void)
|
||||
{
|
||||
int c;
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
#define MEM_BLOCK_MASK (MEM_BLOCK_NR-1)
|
||||
#define MEM_BLOCK_SIZE 0x3c0
|
||||
|
||||
void codegen_allocator_init();
|
||||
void codegen_allocator_init(void);
|
||||
/*Allocate a mem_block_t, and the associated backing memory.
|
||||
If parent is non-NULL, then the new block will be added to the list in
|
||||
parent->next*/
|
||||
|
||||
@@ -13,14 +13,14 @@
|
||||
#error Dynamic recompiler not implemented on your platform
|
||||
#endif
|
||||
|
||||
void codegen_backend_init();
|
||||
void codegen_backend_init(void);
|
||||
void codegen_backend_prologue(codeblock_t *block);
|
||||
void codegen_backend_epilogue(codeblock_t *block);
|
||||
|
||||
struct ir_data_t;
|
||||
struct uop_t;
|
||||
|
||||
struct ir_data_t *codegen_get_ir_data();
|
||||
struct ir_data_t *codegen_get_ir_data(void);
|
||||
|
||||
typedef int (*uOpFn)(codeblock_t *codeblock, struct uop_t *uop);
|
||||
|
||||
|
||||
@@ -290,7 +290,7 @@ static void build_fp_round_routine(codeblock_t *block)
|
||||
host_arm_MOV_REG(block, REG_PC, REG_LR);
|
||||
}
|
||||
|
||||
void codegen_backend_init()
|
||||
void codegen_backend_init(void)
|
||||
{
|
||||
codeblock_t *block;
|
||||
int c;
|
||||
|
||||
@@ -277,7 +277,7 @@ static void build_fp_round_routine(codeblock_t *block, int is_quad)
|
||||
host_arm64_RET(block, REG_X30);
|
||||
}
|
||||
|
||||
void codegen_backend_init()
|
||||
void codegen_backend_init(void)
|
||||
{
|
||||
codeblock_t *block;
|
||||
int c;
|
||||
|
||||
@@ -290,7 +290,7 @@ static void build_loadstore_routines(codeblock_t *block)
|
||||
build_store_routine(block, 8, 1);
|
||||
}
|
||||
|
||||
void codegen_backend_init()
|
||||
void codegen_backend_init(void)
|
||||
{
|
||||
codeblock_t *block;
|
||||
int c;
|
||||
|
||||
@@ -264,7 +264,7 @@ static void build_loadstore_routines(codeblock_t *block)
|
||||
build_store_routine(block, 8, 1);
|
||||
}
|
||||
|
||||
void codegen_backend_init()
|
||||
void codegen_backend_init(void)
|
||||
{
|
||||
codeblock_t *block;
|
||||
int c;
|
||||
|
||||
@@ -154,7 +154,7 @@ static void block_dirty_list_remove(codeblock_t *block)
|
||||
block->flags &= ~CODEBLOCK_IN_DIRTY_LIST;
|
||||
}
|
||||
|
||||
int codegen_purge_purgable_list()
|
||||
int codegen_purge_purgable_list(void)
|
||||
{
|
||||
if (purgable_page_list_head)
|
||||
{
|
||||
@@ -171,7 +171,7 @@ int codegen_purge_purgable_list()
|
||||
return 0;
|
||||
}
|
||||
|
||||
static codeblock_t *block_free_list_get()
|
||||
static codeblock_t *block_free_list_get(void)
|
||||
{
|
||||
codeblock_t *block = NULL;
|
||||
|
||||
@@ -210,7 +210,7 @@ static codeblock_t *block_free_list_get()
|
||||
return block;
|
||||
}
|
||||
|
||||
void codegen_init()
|
||||
void codegen_init(void)
|
||||
{
|
||||
int c;
|
||||
|
||||
@@ -227,7 +227,7 @@ void codegen_init()
|
||||
#endif
|
||||
}
|
||||
|
||||
void codegen_close()
|
||||
void codegen_close(void)
|
||||
{
|
||||
#ifdef DEBUG_EXTRA
|
||||
pclog("Instruction counts :\n");
|
||||
@@ -256,7 +256,7 @@ void codegen_close()
|
||||
#endif
|
||||
}
|
||||
|
||||
void codegen_reset()
|
||||
void codegen_reset(void)
|
||||
{
|
||||
int c;
|
||||
|
||||
@@ -284,7 +284,7 @@ void codegen_reset()
|
||||
}
|
||||
}
|
||||
|
||||
void dump_block()
|
||||
void dump_block(void)
|
||||
{
|
||||
/* codeblock_t *block = pages[0x119000 >> 12].block;
|
||||
|
||||
@@ -574,7 +574,7 @@ void codegen_block_init(uint32_t phys_addr)
|
||||
|
||||
static ir_data_t *ir_data;
|
||||
|
||||
ir_data_t *codegen_get_ir_data()
|
||||
ir_data_t *codegen_get_ir_data(void)
|
||||
{
|
||||
return ir_data;
|
||||
}
|
||||
@@ -645,7 +645,7 @@ void codegen_block_start_recompile(codeblock_t *block)
|
||||
}
|
||||
|
||||
|
||||
void codegen_block_remove()
|
||||
void codegen_block_remove(void)
|
||||
{
|
||||
codeblock_t *block = &codeblock[block_current];
|
||||
|
||||
@@ -654,7 +654,7 @@ void codegen_block_remove()
|
||||
recomp_page = -1;
|
||||
}
|
||||
|
||||
void codegen_block_generate_end_mask_recompile()
|
||||
void codegen_block_generate_end_mask_recompile(void)
|
||||
{
|
||||
codeblock_t *block = &codeblock[block_current];
|
||||
page_t *p;
|
||||
@@ -721,7 +721,7 @@ void codegen_block_generate_end_mask_recompile()
|
||||
recomp_page = -1;
|
||||
}
|
||||
|
||||
void codegen_block_generate_end_mask_mark()
|
||||
void codegen_block_generate_end_mask_mark(void)
|
||||
{
|
||||
codeblock_t *block = &codeblock[block_current];
|
||||
uint32_t start_pc;
|
||||
@@ -799,7 +799,7 @@ void codegen_block_generate_end_mask_mark()
|
||||
recomp_page = -1;
|
||||
}
|
||||
|
||||
void codegen_block_end()
|
||||
void codegen_block_end(void)
|
||||
{
|
||||
codeblock_t *block = &codeblock[block_current];
|
||||
|
||||
@@ -828,7 +828,7 @@ void codegen_block_end_recompile(codeblock_t *block)
|
||||
codegen_ir_compile(ir_data, block);
|
||||
}
|
||||
|
||||
void codegen_flush()
|
||||
void codegen_flush(void)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@ static ir_data_t ir_block;
|
||||
static int codegen_unroll_start, codegen_unroll_count;
|
||||
static int codegen_unroll_first_instruction;
|
||||
|
||||
ir_data_t *codegen_ir_init()
|
||||
ir_data_t *codegen_ir_init(void)
|
||||
{
|
||||
ir_block.wr_pos = 0;
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#include "codegen_ir_defs.h"
|
||||
|
||||
ir_data_t *codegen_ir_init();
|
||||
ir_data_t *codegen_ir_init(void);
|
||||
|
||||
void codegen_ir_set_unroll(int count, int start, int first_instruction);
|
||||
void codegen_ir_compile(ir_data_t *ir, codeblock_t *block);
|
||||
|
||||
@@ -13,11 +13,11 @@
|
||||
#include "codegen_ops_helpers.h"
|
||||
#include "codegen_ops_mov.h"
|
||||
|
||||
static int NF_SET_01()
|
||||
static int NF_SET_01(void)
|
||||
{
|
||||
return NF_SET() ? 1 : 0;
|
||||
}
|
||||
static int VF_SET_01()
|
||||
static int VF_SET_01(void)
|
||||
{
|
||||
return VF_SET() ? 1 : 0;
|
||||
}
|
||||
|
||||
@@ -184,7 +184,7 @@ struct
|
||||
[IREG_temp1d] = {REG_DOUBLE, (void *)48, REG_FP, REG_VOLATILE},
|
||||
};
|
||||
|
||||
void codegen_reg_mark_as_required()
|
||||
void codegen_reg_mark_as_required(void)
|
||||
{
|
||||
int reg;
|
||||
|
||||
@@ -224,7 +224,7 @@ int reg_is_native_size(ir_reg_t ir_reg)
|
||||
return 0;
|
||||
}
|
||||
|
||||
void codegen_reg_reset()
|
||||
void codegen_reg_reset(void)
|
||||
{
|
||||
int c;
|
||||
|
||||
|
||||
@@ -395,7 +395,7 @@ static inline int ir_reg_is_invalid(ir_reg_t ir_reg)
|
||||
|
||||
struct ir_data_t;
|
||||
|
||||
void codegen_reg_reset();
|
||||
void codegen_reg_reset(void);
|
||||
/*Write back all dirty registers*/
|
||||
void codegen_reg_flush(struct ir_data_t *ir, codeblock_t *block);
|
||||
/*Write back and evict all registers*/
|
||||
@@ -414,6 +414,6 @@ ir_host_reg_t codegen_reg_alloc_write_reg(codeblock_t *block, ir_reg_t ir_reg);
|
||||
|
||||
void codegen_reg_rename(codeblock_t *block, ir_reg_t src, ir_reg_t dst);
|
||||
|
||||
void codegen_reg_mark_as_required();
|
||||
void codegen_reg_mark_as_required(void);
|
||||
void codegen_reg_process_dead_list(struct ir_data_t *ir);
|
||||
#endif
|
||||
|
||||
@@ -1452,7 +1452,7 @@ x86_int_sw_rm(int num)
|
||||
|
||||
|
||||
void
|
||||
x86illegal()
|
||||
x86illegal(void)
|
||||
{
|
||||
x86_int(6);
|
||||
}
|
||||
@@ -1550,14 +1550,14 @@ idivl(int32_t val)
|
||||
|
||||
|
||||
void
|
||||
cpu_386_flags_extract()
|
||||
cpu_386_flags_extract(void)
|
||||
{
|
||||
flags_extract();
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
cpu_386_flags_rebuild()
|
||||
cpu_386_flags_rebuild(void)
|
||||
{
|
||||
flags_rebuild();
|
||||
}
|
||||
|
||||
@@ -225,25 +225,25 @@ static __inline void *get_ram_ptr(uint32_t a)
|
||||
}
|
||||
}
|
||||
|
||||
static __inline uint8_t getbyte()
|
||||
static __inline uint8_t getbyte(void)
|
||||
{
|
||||
cpu_state.pc++;
|
||||
return fastreadb(cs + (cpu_state.pc - 1));
|
||||
}
|
||||
|
||||
static __inline uint16_t getword()
|
||||
static __inline uint16_t getword(void)
|
||||
{
|
||||
cpu_state.pc+=2;
|
||||
return fastreadw(cs+(cpu_state.pc-2));
|
||||
}
|
||||
|
||||
static __inline uint32_t getlong()
|
||||
static __inline uint32_t getlong(void)
|
||||
{
|
||||
cpu_state.pc+=4;
|
||||
return fastreadl(cs+(cpu_state.pc-4));
|
||||
}
|
||||
|
||||
static __inline uint64_t getquad()
|
||||
static __inline uint64_t getquad(void)
|
||||
{
|
||||
cpu_state.pc+=8;
|
||||
return fastreadl(cs+(cpu_state.pc-8)) | ((uint64_t)fastreadl(cs+(cpu_state.pc-4)) << 32);
|
||||
@@ -251,7 +251,7 @@ static __inline uint64_t getquad()
|
||||
|
||||
|
||||
|
||||
static __inline uint8_t geteab()
|
||||
static __inline uint8_t geteab(void)
|
||||
{
|
||||
if (cpu_mod == 3)
|
||||
return (cpu_rm & 4) ? cpu_state.regs[cpu_rm & 3].b.h : cpu_state.regs[cpu_rm&3].b.l;
|
||||
@@ -260,7 +260,7 @@ static __inline uint8_t geteab()
|
||||
return readmemb(easeg, cpu_state.eaaddr);
|
||||
}
|
||||
|
||||
static __inline uint16_t geteaw()
|
||||
static __inline uint16_t geteaw(void)
|
||||
{
|
||||
if (cpu_mod == 3)
|
||||
return cpu_state.regs[cpu_rm].w;
|
||||
@@ -269,7 +269,7 @@ static __inline uint16_t geteaw()
|
||||
return readmemw(easeg, cpu_state.eaaddr);
|
||||
}
|
||||
|
||||
static __inline uint32_t geteal()
|
||||
static __inline uint32_t geteal(void)
|
||||
{
|
||||
if (cpu_mod == 3)
|
||||
return cpu_state.regs[cpu_rm].l;
|
||||
@@ -278,22 +278,22 @@ static __inline uint32_t geteal()
|
||||
return readmeml(easeg, cpu_state.eaaddr);
|
||||
}
|
||||
|
||||
static __inline uint64_t geteaq()
|
||||
static __inline uint64_t geteaq(void)
|
||||
{
|
||||
return readmemq(easeg, cpu_state.eaaddr);
|
||||
}
|
||||
|
||||
static __inline uint8_t geteab_mem()
|
||||
static __inline uint8_t geteab_mem(void)
|
||||
{
|
||||
if (eal_r) return *(uint8_t *)eal_r;
|
||||
return readmemb(easeg,cpu_state.eaaddr);
|
||||
}
|
||||
static __inline uint16_t geteaw_mem()
|
||||
static __inline uint16_t geteaw_mem(void)
|
||||
{
|
||||
if (eal_r) return *(uint16_t *)eal_r;
|
||||
return readmemw(easeg,cpu_state.eaaddr);
|
||||
}
|
||||
static __inline uint32_t geteal_mem()
|
||||
static __inline uint32_t geteal_mem(void)
|
||||
{
|
||||
if (eal_r) return *eal_r;
|
||||
return readmeml(easeg,cpu_state.eaaddr);
|
||||
|
||||
@@ -260,7 +260,7 @@ static void prefetch_run(int instr_cycles, int bytes, int modrm, int reads, int
|
||||
prefetch_bytes = 16;
|
||||
}
|
||||
|
||||
static void prefetch_flush()
|
||||
static void prefetch_flush(void)
|
||||
{
|
||||
prefetch_bytes = 0;
|
||||
}
|
||||
@@ -541,7 +541,7 @@ exec386_dynarec_dyn(void)
|
||||
if (valid_block && block->was_recompiled)
|
||||
#endif
|
||||
{
|
||||
void (*code)() = (void *)&block->data[BLOCK_START];
|
||||
void (*code)(void) = (void *)&block->data[BLOCK_START];
|
||||
|
||||
#ifndef USE_NEW_DYNAREC
|
||||
codeblock_hash[hash] = block;
|
||||
|
||||
@@ -80,7 +80,7 @@ static __inline void PUSH_L(uint32_t val)
|
||||
}
|
||||
}
|
||||
|
||||
static __inline uint16_t POP_W()
|
||||
static __inline uint16_t POP_W(void)
|
||||
{
|
||||
uint16_t ret;
|
||||
if (stack32)
|
||||
@@ -96,7 +96,7 @@ static __inline uint16_t POP_W()
|
||||
return ret;
|
||||
}
|
||||
|
||||
static __inline uint32_t POP_L()
|
||||
static __inline uint32_t POP_L(void)
|
||||
{
|
||||
uint32_t ret;
|
||||
if (stack32)
|
||||
|
||||
@@ -494,7 +494,7 @@ pfq_fetchw(void)
|
||||
}
|
||||
|
||||
static uint16_t
|
||||
pfq_fetch()
|
||||
pfq_fetch(void)
|
||||
{
|
||||
if (opcode & 1)
|
||||
return pfq_fetchw();
|
||||
@@ -520,7 +520,7 @@ pfq_add(int c, int add)
|
||||
|
||||
/* Clear the prefetch queue - called on reset and on anything that affects either CS or IP. */
|
||||
static void
|
||||
pfq_clear()
|
||||
pfq_clear(void)
|
||||
{
|
||||
pfq_pos = 0;
|
||||
prefetching = 0;
|
||||
|
||||
@@ -50,11 +50,11 @@
|
||||
#endif
|
||||
|
||||
|
||||
extern void codegen_init();
|
||||
extern void codegen_init(void);
|
||||
#ifdef USE_NEW_DYNAREC
|
||||
extern void codegen_close();
|
||||
extern void codegen_close(void);
|
||||
#endif
|
||||
extern void codegen_flush();
|
||||
extern void codegen_flush(void);
|
||||
|
||||
|
||||
/*Current physical page of block being recompiled. -1 if no recompilation taking place */
|
||||
|
||||
@@ -283,12 +283,12 @@ static inline int COUNT(int *c, int op_32)
|
||||
return *c;
|
||||
}
|
||||
|
||||
void codegen_timing_486_block_start()
|
||||
void codegen_timing_486_block_start(void)
|
||||
{
|
||||
regmask_modified = 0;
|
||||
}
|
||||
|
||||
void codegen_timing_486_start()
|
||||
void codegen_timing_486_start(void)
|
||||
{
|
||||
timing_count = 0;
|
||||
last_prefix = 0;
|
||||
@@ -406,7 +406,7 @@ void codegen_timing_486_opcode(uint8_t opcode, uint32_t fetchdat, int op_32, uin
|
||||
regmask_modified = get_dstdep_mask(deps[opcode], fetchdat, bit8);
|
||||
}
|
||||
|
||||
void codegen_timing_486_block_end()
|
||||
void codegen_timing_486_block_end(void)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -774,13 +774,13 @@ static inline int COUNT(uint32_t c, int op_32)
|
||||
return c & CYCLES_MASK;
|
||||
}
|
||||
|
||||
void codegen_timing_686_block_start()
|
||||
void codegen_timing_686_block_start(void)
|
||||
{
|
||||
prev_full = decode_delay = 0;
|
||||
regmask_modified = last_regmask_modified = 0;
|
||||
}
|
||||
|
||||
void codegen_timing_686_start()
|
||||
void codegen_timing_686_start(void)
|
||||
{
|
||||
decode_delay = 0;
|
||||
last_prefix = 0;
|
||||
@@ -1036,7 +1036,7 @@ void codegen_timing_686_opcode(uint8_t opcode, uint32_t fetchdat, int op_32, uin
|
||||
}
|
||||
}
|
||||
|
||||
void codegen_timing_686_block_end()
|
||||
void codegen_timing_686_block_end(void)
|
||||
{
|
||||
if (prev_full)
|
||||
{
|
||||
|
||||
@@ -1858,7 +1858,7 @@ static int fpu_st_timestamp[8];
|
||||
dependent uop chains*/
|
||||
static int last_uop_timestamp = 0;
|
||||
|
||||
void decode_flush()
|
||||
void decode_flush(void)
|
||||
{
|
||||
int c;
|
||||
int uop_timestamp = 0;
|
||||
@@ -2112,7 +2112,7 @@ static void decode_instruction(const risc86_instruction_t *ins, uint64_t deps, u
|
||||
}
|
||||
}
|
||||
|
||||
void codegen_timing_k6_block_start()
|
||||
void codegen_timing_k6_block_start(void)
|
||||
{
|
||||
int c;
|
||||
|
||||
@@ -2136,7 +2136,7 @@ void codegen_timing_k6_block_start()
|
||||
fpu_st_timestamp[c] = 0;
|
||||
}
|
||||
|
||||
void codegen_timing_k6_start()
|
||||
void codegen_timing_k6_start(void)
|
||||
{
|
||||
if (cpu_s->cpu_type == CPU_K6)
|
||||
{
|
||||
@@ -2324,7 +2324,7 @@ void codegen_timing_k6_opcode(uint8_t opcode, uint32_t fetchdat, int op_32, uint
|
||||
codegen_block_cycles += (last_complete_timestamp - old_last_complete_timestamp);
|
||||
}
|
||||
|
||||
void codegen_timing_k6_block_end()
|
||||
void codegen_timing_k6_block_end(void)
|
||||
{
|
||||
if (decode_buffer.nr_uops)
|
||||
{
|
||||
@@ -2334,7 +2334,7 @@ void codegen_timing_k6_block_end()
|
||||
}
|
||||
}
|
||||
|
||||
int codegen_timing_k6_jump_cycles()
|
||||
int codegen_timing_k6_jump_cycles(void)
|
||||
{
|
||||
if (decode_buffer.nr_uops)
|
||||
return 1;
|
||||
|
||||
@@ -1691,7 +1691,7 @@ static int fpu_st_timestamp[8];
|
||||
dependent uop chains*/
|
||||
static int last_uop_timestamp = 0;
|
||||
|
||||
void decode_flush_p6()
|
||||
void decode_flush_p6(void)
|
||||
{
|
||||
int c;
|
||||
int start_timestamp, uop_timestamp = 0;
|
||||
@@ -1926,7 +1926,7 @@ static void decode_instruction(const macro_op_t *ins, uint64_t deps, uint32_t fe
|
||||
}
|
||||
}
|
||||
|
||||
void codegen_timing_p6_block_start()
|
||||
void codegen_timing_p6_block_start(void)
|
||||
{
|
||||
int c;
|
||||
|
||||
@@ -1946,7 +1946,7 @@ void codegen_timing_p6_block_start()
|
||||
fpu_st_timestamp[c] = 0;
|
||||
}
|
||||
|
||||
void codegen_timing_p6_start()
|
||||
void codegen_timing_p6_start(void)
|
||||
{
|
||||
if (cpu_s->cpu_type == CPU_PENTIUMPRO)
|
||||
{
|
||||
@@ -2083,7 +2083,7 @@ void codegen_timing_p6_opcode(uint8_t opcode, uint32_t fetchdat, int op_32, uint
|
||||
codegen_block_cycles += (last_complete_timestamp - old_last_complete_timestamp);
|
||||
}
|
||||
|
||||
void codegen_timing_p6_block_end()
|
||||
void codegen_timing_p6_block_end(void)
|
||||
{
|
||||
if (decode_buffer.nr_uops)
|
||||
{
|
||||
@@ -2093,7 +2093,7 @@ void codegen_timing_p6_block_end()
|
||||
}
|
||||
}
|
||||
|
||||
int codegen_timing_p6_jump_cycles()
|
||||
int codegen_timing_p6_jump_cycles(void)
|
||||
{
|
||||
if (decode_buffer.nr_uops)
|
||||
return 1;
|
||||
|
||||
@@ -931,12 +931,12 @@ static inline int codegen_timing_instr_length(uint64_t timing, uint32_t fetchdat
|
||||
return len;
|
||||
}
|
||||
|
||||
void codegen_timing_pentium_block_start()
|
||||
void codegen_timing_pentium_block_start(void)
|
||||
{
|
||||
u_pipe_full = decode_delay = decode_delay_offset = 0;
|
||||
}
|
||||
|
||||
void codegen_timing_pentium_start()
|
||||
void codegen_timing_pentium_start(void)
|
||||
{
|
||||
last_prefix = 0;
|
||||
prefixes = 0;
|
||||
@@ -1296,7 +1296,7 @@ nopair:
|
||||
addr_regmask = 0;
|
||||
}
|
||||
|
||||
void codegen_timing_pentium_block_end()
|
||||
void codegen_timing_pentium_block_end(void)
|
||||
{
|
||||
if (u_pipe_full)
|
||||
{
|
||||
|
||||
@@ -283,12 +283,12 @@ static inline int COUNT(int *c, int op_32)
|
||||
return *c;
|
||||
}
|
||||
|
||||
void codegen_timing_winchip_block_start()
|
||||
void codegen_timing_winchip_block_start(void)
|
||||
{
|
||||
regmask_modified = 0;
|
||||
}
|
||||
|
||||
void codegen_timing_winchip_start()
|
||||
void codegen_timing_winchip_start(void)
|
||||
{
|
||||
timing_count = 0;
|
||||
last_prefix = 0;
|
||||
@@ -406,7 +406,7 @@ void codegen_timing_winchip_opcode(uint8_t opcode, uint32_t fetchdat, int op_32,
|
||||
regmask_modified = get_dstdep_mask(deps[opcode], fetchdat, bit8);
|
||||
}
|
||||
|
||||
void codegen_timing_winchip_block_end()
|
||||
void codegen_timing_winchip_block_end(void)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -541,14 +541,14 @@ static void codegen_instruction(uint32_t *timings, uint64_t *deps, uint8_t opcod
|
||||
}
|
||||
}
|
||||
|
||||
static void codegen_timing_winchip2_block_start()
|
||||
static void codegen_timing_winchip2_block_start(void)
|
||||
{
|
||||
regmask_modified = 0;
|
||||
decode_delay = decode_delay_offset = 0;
|
||||
u_pipe_full = 0;
|
||||
}
|
||||
|
||||
static void codegen_timing_winchip2_start()
|
||||
static void codegen_timing_winchip2_start(void)
|
||||
{
|
||||
timing_count = 0;
|
||||
last_prefix = 0;
|
||||
@@ -719,7 +719,7 @@ static void codegen_timing_winchip2_opcode(uint8_t opcode, uint32_t fetchdat, in
|
||||
regmask_modified = get_dstdep_mask(deps[opcode], fetchdat, bit8);
|
||||
}
|
||||
|
||||
static void codegen_timing_winchip2_block_end()
|
||||
static void codegen_timing_winchip2_block_end(void)
|
||||
{
|
||||
if (u_pipe_full)
|
||||
{
|
||||
|
||||
@@ -746,7 +746,7 @@ extern void cpu_fast_off_advance(void);
|
||||
extern void cpu_fast_off_period_set(uint16_t vla, double period);
|
||||
extern void cpu_fast_off_reset(void);
|
||||
|
||||
extern void smi_raise();
|
||||
extern void nmi_raise();
|
||||
extern void smi_raise(void);
|
||||
extern void nmi_raise(void);
|
||||
|
||||
#endif /*EMU_CPU_H*/
|
||||
|
||||
@@ -77,7 +77,7 @@ enum
|
||||
|
||||
|
||||
extern void x86_doabrt(int x86_abrt);
|
||||
extern void x86illegal();
|
||||
extern void x86seg_reset();
|
||||
extern void x86illegal(void);
|
||||
extern void x86seg_reset(void);
|
||||
extern void x86gpf(char *s, uint16_t error);
|
||||
extern void x86gpf_expected(char *s, uint16_t error);
|
||||
|
||||
@@ -58,7 +58,7 @@ enum
|
||||
#endif
|
||||
};
|
||||
|
||||
static __inline int ZF_SET()
|
||||
static __inline int ZF_SET(void)
|
||||
{
|
||||
switch (cpu_state.flags_op)
|
||||
{
|
||||
@@ -117,7 +117,7 @@ static __inline int ZF_SET()
|
||||
#endif
|
||||
}
|
||||
|
||||
static __inline int NF_SET()
|
||||
static __inline int NF_SET(void)
|
||||
{
|
||||
switch (cpu_state.flags_op)
|
||||
{
|
||||
@@ -184,7 +184,7 @@ static __inline int NF_SET()
|
||||
#endif
|
||||
}
|
||||
|
||||
static __inline int PF_SET()
|
||||
static __inline int PF_SET(void)
|
||||
{
|
||||
switch (cpu_state.flags_op)
|
||||
{
|
||||
@@ -243,7 +243,7 @@ static __inline int PF_SET()
|
||||
#endif
|
||||
}
|
||||
|
||||
static __inline int VF_SET()
|
||||
static __inline int VF_SET(void)
|
||||
{
|
||||
switch (cpu_state.flags_op)
|
||||
{
|
||||
@@ -336,7 +336,7 @@ static __inline int VF_SET()
|
||||
#endif
|
||||
}
|
||||
|
||||
static __inline int AF_SET()
|
||||
static __inline int AF_SET(void)
|
||||
{
|
||||
switch (cpu_state.flags_op)
|
||||
{
|
||||
@@ -409,7 +409,7 @@ static __inline int AF_SET()
|
||||
#endif
|
||||
}
|
||||
|
||||
static __inline int CF_SET()
|
||||
static __inline int CF_SET(void)
|
||||
{
|
||||
switch (cpu_state.flags_op)
|
||||
{
|
||||
@@ -502,7 +502,7 @@ static __inline int CF_SET()
|
||||
#endif
|
||||
}
|
||||
|
||||
static __inline void flags_rebuild()
|
||||
static __inline void flags_rebuild(void)
|
||||
{
|
||||
if (cpu_state.flags_op != FLAGS_UNKNOWN)
|
||||
{
|
||||
@@ -518,12 +518,12 @@ static __inline void flags_rebuild()
|
||||
}
|
||||
}
|
||||
|
||||
static __inline void flags_extract()
|
||||
static __inline void flags_extract(void)
|
||||
{
|
||||
cpu_state.flags_op = FLAGS_UNKNOWN;
|
||||
}
|
||||
|
||||
static __inline void flags_rebuild_c()
|
||||
static __inline void flags_rebuild_c(void)
|
||||
{
|
||||
if (cpu_state.flags_op != FLAGS_UNKNOWN)
|
||||
{
|
||||
@@ -535,7 +535,7 @@ static __inline void flags_rebuild_c()
|
||||
}
|
||||
|
||||
#ifdef USE_NEW_DYNAREC
|
||||
static __inline int flags_res_valid()
|
||||
static __inline int flags_res_valid(void)
|
||||
{
|
||||
if (cpu_state.flags_op == FLAGS_UNKNOWN ||
|
||||
(cpu_state.flags_op >= FLAGS_ROL8 && cpu_state.flags_op <= FLAGS_ROR32))
|
||||
@@ -779,5 +779,5 @@ static __inline void setsbc32(uint32_t a, uint32_t b)
|
||||
}
|
||||
#endif
|
||||
|
||||
extern void cpu_386_flags_extract();
|
||||
extern void cpu_386_flags_rebuild();
|
||||
extern void cpu_386_flags_extract(void);
|
||||
extern void cpu_386_flags_rebuild(void);
|
||||
|
||||
@@ -94,7 +94,7 @@ seg_reset(x86seg *s)
|
||||
|
||||
|
||||
void
|
||||
x86seg_reset()
|
||||
x86seg_reset(void)
|
||||
{
|
||||
seg_reset(&cpu_state.seg_cs);
|
||||
seg_reset(&cpu_state.seg_ds);
|
||||
@@ -838,7 +838,7 @@ PUSHL(uint32_t v)
|
||||
|
||||
|
||||
uint16_t
|
||||
POPW()
|
||||
POPW(void)
|
||||
{
|
||||
uint16_t tempw;
|
||||
if (stack32) {
|
||||
@@ -857,7 +857,7 @@ POPW()
|
||||
|
||||
|
||||
uint32_t
|
||||
POPL()
|
||||
POPL(void)
|
||||
{
|
||||
uint32_t templ;
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@ fpu_log(const char *fmt, ...)
|
||||
#define X87_TAG_EMPTY 3
|
||||
|
||||
#ifdef USE_NEW_DYNAREC
|
||||
uint16_t x87_gettag()
|
||||
uint16_t x87_gettag(void)
|
||||
{
|
||||
uint16_t ret = 0;
|
||||
int c;
|
||||
@@ -84,7 +84,7 @@ void x87_settag(uint16_t new_tag)
|
||||
}
|
||||
}
|
||||
#else
|
||||
uint16_t x87_gettag()
|
||||
uint16_t x87_gettag(void)
|
||||
{
|
||||
uint16_t ret = 0;
|
||||
int c;
|
||||
@@ -115,7 +115,7 @@ void x87_settag(uint16_t new_tag)
|
||||
|
||||
|
||||
#ifdef ENABLE_808X_LOG
|
||||
void x87_dumpregs()
|
||||
void x87_dumpregs(void)
|
||||
{
|
||||
if (cpu_state.ismmx)
|
||||
{
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
extern uint32_t x87_pc_off,x87_op_off;
|
||||
extern uint16_t x87_pc_seg,x87_op_seg;
|
||||
|
||||
static __inline void x87_set_mmx()
|
||||
static __inline void x87_set_mmx(void)
|
||||
{
|
||||
uint64_t *p;
|
||||
cpu_state.TOP = 0;
|
||||
@@ -15,7 +15,7 @@ static __inline void x87_set_mmx()
|
||||
cpu_state.ismmx = 1;
|
||||
}
|
||||
|
||||
static __inline void x87_emms()
|
||||
static __inline void x87_emms(void)
|
||||
{
|
||||
uint64_t *p;
|
||||
p = (uint64_t *)cpu_state.tag;
|
||||
@@ -24,7 +24,7 @@ static __inline void x87_emms()
|
||||
}
|
||||
|
||||
|
||||
uint16_t x87_gettag();
|
||||
uint16_t x87_gettag(void);
|
||||
void x87_settag(uint16_t new_tag);
|
||||
|
||||
#define TAG_EMPTY 0
|
||||
|
||||
@@ -97,7 +97,7 @@ static int rounding_modes[4] = {FE_TONEAREST, FE_DOWNWARD, FE_UPWARD, FE_TOWARDZ
|
||||
} while (0)
|
||||
#endif
|
||||
|
||||
static __inline void x87_checkexceptions()
|
||||
static __inline void x87_checkexceptions(void)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -139,7 +139,7 @@ static __inline void x87_push_u64(uint64_t i)
|
||||
#endif
|
||||
}
|
||||
|
||||
static __inline double x87_pop()
|
||||
static __inline double x87_pop(void)
|
||||
{
|
||||
double t = cpu_state.ST[cpu_state.TOP&7];
|
||||
cpu_state.tag[cpu_state.TOP&7] = TAG_EMPTY;
|
||||
@@ -242,7 +242,7 @@ static __inline int64_t x87_fround(double b)
|
||||
|
||||
#include "x87_ops_conv.h"
|
||||
|
||||
static __inline double x87_ld80()
|
||||
static __inline double x87_ld80(void)
|
||||
{
|
||||
x87_conv_t test;
|
||||
test.eind.ll = readmeml(easeg,cpu_state.eaaddr);
|
||||
|
||||
@@ -119,7 +119,7 @@ static int opFSTP(uint32_t fetchdat)
|
||||
|
||||
|
||||
|
||||
static int FSTOR()
|
||||
static int FSTOR(void)
|
||||
{
|
||||
uint64_t *p;
|
||||
FP_ENTER();
|
||||
@@ -191,7 +191,7 @@ static int opFSTOR_a32(uint32_t fetchdat)
|
||||
}
|
||||
#endif
|
||||
|
||||
static int FSAVE()
|
||||
static int FSAVE(void)
|
||||
{
|
||||
uint64_t *p;
|
||||
|
||||
@@ -751,7 +751,7 @@ static int opFCOS(uint32_t fetchdat)
|
||||
#endif
|
||||
|
||||
|
||||
static int FLDENV()
|
||||
static int FLDENV(void)
|
||||
{
|
||||
FP_ENTER();
|
||||
switch ((cr0 & 1) | (cpu_state.op32 & 0x100))
|
||||
@@ -828,7 +828,7 @@ static int opFLDCW_a32(uint32_t fetchdat)
|
||||
}
|
||||
#endif
|
||||
|
||||
static int FSTENV()
|
||||
static int FSTENV(void)
|
||||
{
|
||||
FP_ENTER();
|
||||
cpu_state.npxs = (cpu_state.npxs & ~(7 << 11)) | ((cpu_state.TOP & 7) << 11);
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
hwm_values_t hwm_values;
|
||||
|
||||
uint16_t
|
||||
hwm_get_vcore()
|
||||
hwm_get_vcore(void)
|
||||
{
|
||||
/* Determine Vcore for the active CPU. */
|
||||
return cpu_s->voltage;
|
||||
|
||||
@@ -367,7 +367,7 @@ kbd_log(const char *fmt, ...)
|
||||
#endif
|
||||
|
||||
static uint8_t
|
||||
get_fdd_switch_settings()
|
||||
get_fdd_switch_settings(void)
|
||||
{
|
||||
|
||||
int i, fdd_count = 0;
|
||||
@@ -384,7 +384,7 @@ get_fdd_switch_settings()
|
||||
}
|
||||
|
||||
static uint8_t
|
||||
get_videomode_switch_settings()
|
||||
get_videomode_switch_settings(void)
|
||||
{
|
||||
|
||||
if (video_is_mda())
|
||||
|
||||
@@ -87,7 +87,7 @@ static mouse_t mouse_devices[] = {
|
||||
static const device_t *mouse_curr;
|
||||
static void *mouse_priv;
|
||||
static int mouse_nbut;
|
||||
static int (*mouse_dev_poll)();
|
||||
static int (*mouse_dev_poll)(int x, int y, int z, int b, void *priv);
|
||||
|
||||
#ifdef ENABLE_MOUSE_LOG
|
||||
int mouse_do_log = ENABLE_MOUSE_LOG;
|
||||
|
||||
@@ -132,7 +132,7 @@ discord_update_activity(int paused)
|
||||
}
|
||||
|
||||
int
|
||||
discord_load()
|
||||
discord_load(void)
|
||||
{
|
||||
if (discord_handle != NULL)
|
||||
return (1);
|
||||
@@ -152,7 +152,7 @@ discord_load()
|
||||
}
|
||||
|
||||
void
|
||||
discord_init()
|
||||
discord_init(void)
|
||||
{
|
||||
enum EDiscordResult result;
|
||||
struct DiscordCreateParams params;
|
||||
@@ -177,7 +177,7 @@ discord_init()
|
||||
}
|
||||
|
||||
void
|
||||
discord_close()
|
||||
discord_close(void)
|
||||
{
|
||||
if (discord_core != NULL)
|
||||
discord_core->destroy(discord_core);
|
||||
@@ -187,7 +187,7 @@ discord_close()
|
||||
}
|
||||
|
||||
void
|
||||
discord_run_callbacks()
|
||||
discord_run_callbacks(void)
|
||||
{
|
||||
if (discord_core == NULL)
|
||||
return;
|
||||
|
||||
@@ -437,7 +437,7 @@ static hdd_preset_t hdd_speed_presets[] = {
|
||||
};
|
||||
|
||||
int
|
||||
hdd_preset_get_num()
|
||||
hdd_preset_get_num(void)
|
||||
{
|
||||
return sizeof(hdd_speed_presets) / sizeof(hdd_preset_t);
|
||||
}
|
||||
|
||||
@@ -162,7 +162,7 @@ extern void set_screen_size_monitor(int x, int y, int monitor_index);
|
||||
extern void reset_screen_size(void);
|
||||
extern void reset_screen_size_monitor(int monitor_index);
|
||||
extern void set_screen_size_natural(void);
|
||||
extern void update_mouse_msg();
|
||||
extern void update_mouse_msg(void);
|
||||
#if 0
|
||||
extern void pc_reload(wchar_t *fn);
|
||||
#endif
|
||||
|
||||
@@ -73,6 +73,7 @@
|
||||
)
|
||||
#endif /*HAVE_BYTESWAP_H*/
|
||||
|
||||
#if __GNUC__ >= 10
|
||||
#if defined __has_builtin && __has_builtin(__builtin_bswap16)
|
||||
#define bswap16(x) __builtin_bswap16(x)
|
||||
#else
|
||||
@@ -81,7 +82,14 @@ static __inline uint16_t bswap16(uint16_t x)
|
||||
return bswap_16(x);
|
||||
}
|
||||
#endif
|
||||
#else
|
||||
static __inline uint16_t bswap16(uint16_t x)
|
||||
{
|
||||
return bswap_16(x);
|
||||
}
|
||||
#endif
|
||||
|
||||
#if __GNUC__ >= 10
|
||||
#if defined __has_builtin && __has_builtin(__builtin_bswap32)
|
||||
#define bswap32(x) __builtin_bswap32(x)
|
||||
#else
|
||||
@@ -90,7 +98,14 @@ static __inline uint32_t bswap32(uint32_t x)
|
||||
return bswap_32(x);
|
||||
}
|
||||
#endif
|
||||
#else
|
||||
static __inline uint32_t bswap32(uint32_t x)
|
||||
{
|
||||
return bswap_32(x);
|
||||
}
|
||||
#endif
|
||||
|
||||
#if __GNUC__ >= 10
|
||||
#if defined __has_builtin && __has_builtin(__builtin_bswap64)
|
||||
#define bswap64(x) __builtin_bswap64(x)
|
||||
#else
|
||||
@@ -99,6 +114,12 @@ static __inline uint64_t bswap64(uint64_t x)
|
||||
return bswap_64(x);
|
||||
}
|
||||
#endif
|
||||
#else
|
||||
static __inline uint64_t bswap64(uint64_t x)
|
||||
{
|
||||
return bswap_64(x);
|
||||
}
|
||||
#endif
|
||||
|
||||
static __inline void bswap16s(uint16_t *s)
|
||||
{
|
||||
|
||||
@@ -23,11 +23,11 @@ extern "C" {
|
||||
|
||||
extern int discord_loaded;
|
||||
|
||||
extern int discord_load();
|
||||
extern void discord_init();
|
||||
extern void discord_close();
|
||||
extern int discord_load(void);
|
||||
extern void discord_init(void);
|
||||
extern void discord_close(void);
|
||||
extern void discord_update_activity(int paused);
|
||||
extern void discord_run_callbacks();
|
||||
extern void discord_run_callbacks(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
@@ -213,7 +213,7 @@ extern int image_is_vhd(const char *s, int check_signature);
|
||||
extern double hdd_timing_write(hard_disk_t *hdd, uint32_t addr, uint32_t len);
|
||||
extern double hdd_timing_read(hard_disk_t *hdd, uint32_t addr, uint32_t len);
|
||||
extern double hdd_seek_get_time(hard_disk_t *hdd, uint32_t dst_addr, uint8_t operation, uint8_t continuous, double max_seek_time);
|
||||
int hdd_preset_get_num();
|
||||
int hdd_preset_get_num(void);
|
||||
const char *hdd_preset_getname(int preset);
|
||||
extern const char *hdd_preset_get_internal_name(int preset);
|
||||
extern int hdd_preset_get_from_internal_name(char *s);
|
||||
|
||||
@@ -38,7 +38,7 @@ typedef struct {
|
||||
} lm75_t;
|
||||
|
||||
/* hwm.c */
|
||||
extern uint16_t hwm_get_vcore();
|
||||
extern uint16_t hwm_get_vcore(void);
|
||||
|
||||
/* hwm_lm75.c */
|
||||
extern void lm75_remap(lm75_t *dev, uint8_t addr);
|
||||
|
||||
@@ -62,6 +62,6 @@ extern void i2c_gpio_close(void *dev_handle);
|
||||
extern void i2c_gpio_set(void *dev_handle, uint8_t scl, uint8_t sda);
|
||||
extern uint8_t i2c_gpio_get_scl(void *dev_handle);
|
||||
extern uint8_t i2c_gpio_get_sda(void *dev_handle);
|
||||
extern void *i2c_gpio_get_bus();
|
||||
extern void *i2c_gpio_get_bus(void *dev_handle);
|
||||
|
||||
#endif /*EMU_I2C_H*/
|
||||
|
||||
@@ -43,10 +43,10 @@ typedef struct i8080
|
||||
uint16_t* cpu_flags;
|
||||
void (*writemembyte)(uint32_t, uint8_t);
|
||||
uint8_t (*readmembyte)(uint32_t);
|
||||
void (*startclock)();
|
||||
void (*endclock)();
|
||||
void (*checkinterrupts)();
|
||||
uint8_t (*fetchinstruction)();
|
||||
void (*startclock)(void);
|
||||
void (*endclock)(void);
|
||||
void (*checkinterrupts)(void);
|
||||
uint8_t (*fetchinstruction)(void *);
|
||||
} i8080;
|
||||
|
||||
#define C_FLAG_I8080 (1 << 0)
|
||||
|
||||
@@ -5,9 +5,9 @@
|
||||
|
||||
extern const device_t xi8088_device;
|
||||
|
||||
uint8_t xi8088_turbo_get();
|
||||
uint8_t xi8088_turbo_get(void);
|
||||
void xi8088_turbo_set(uint8_t value);
|
||||
void xi8088_bios_128kb_set(int val);
|
||||
int xi8088_bios_128kb();
|
||||
int xi8088_bios_128kb(void);
|
||||
|
||||
#endif /*MACHINE_XI80888_H*/
|
||||
|
||||
@@ -27,6 +27,6 @@ typedef struct {
|
||||
|
||||
extern machine_status_t machine_status;
|
||||
|
||||
extern void machine_status_init();
|
||||
extern void machine_status_init(void);
|
||||
|
||||
#endif /*EMU_MACHINE_STATUS_H*/
|
||||
@@ -25,13 +25,13 @@ extern char *midi_out_device_get_internal_name(int card);
|
||||
extern char *midi_in_device_get_internal_name(int card);
|
||||
extern int midi_out_device_get_from_internal_name(char *s);
|
||||
extern int midi_in_device_get_from_internal_name(char *s);
|
||||
extern void midi_out_device_init();
|
||||
extern void midi_in_device_init();
|
||||
extern void midi_out_device_init(void);
|
||||
extern void midi_in_device_init(void);
|
||||
|
||||
typedef struct midi_device_t {
|
||||
void (*play_sysex)(uint8_t *sysex, unsigned int len);
|
||||
void (*play_msg)(uint8_t *msg);
|
||||
void (*poll)();
|
||||
void (*poll)(void);
|
||||
int (*write)(uint8_t val);
|
||||
} midi_device_t;
|
||||
|
||||
@@ -60,13 +60,13 @@ extern midi_t *midi_out, *midi_in;
|
||||
|
||||
extern void midi_out_init(midi_device_t *device);
|
||||
extern void midi_in_init(midi_device_t *device, midi_t **mididev);
|
||||
extern void midi_out_close();
|
||||
extern void midi_out_close(void);
|
||||
extern void midi_in_close(void);
|
||||
extern void midi_raw_out_rt_byte(uint8_t val);
|
||||
extern void midi_raw_out_thru_rt_byte(uint8_t val);
|
||||
extern void midi_raw_out_byte(uint8_t val);
|
||||
extern void midi_clear_buffer(void);
|
||||
extern void midi_poll();
|
||||
extern void midi_poll(void);
|
||||
|
||||
extern void midi_in_handler(int set, void (*msg)(void *p, uint8_t *msg, uint32_t len), int (*sysex)(void *p, uint8_t *buffer, uint32_t len, int abort), void *p);
|
||||
extern void midi_in_handlers_clear(void);
|
||||
|
||||
@@ -168,7 +168,7 @@ extern void mo_hard_reset(void);
|
||||
|
||||
extern void mo_reset(scsi_common_t *sc);
|
||||
extern int mo_load(mo_t *dev, char *fn);
|
||||
extern void mo_close();
|
||||
extern void mo_close(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
@@ -111,7 +111,7 @@ extern int nvr_save(void);
|
||||
|
||||
extern int nvr_is_leap(int year);
|
||||
extern int nvr_get_days(int month, int year);
|
||||
extern void nvr_time_sync();
|
||||
extern void nvr_time_sync(void);
|
||||
extern void nvr_time_get(struct tm *);
|
||||
extern void nvr_time_set(struct tm *);
|
||||
|
||||
|
||||
@@ -113,7 +113,7 @@ extern uint8_t pci_get_int(uint8_t card, uint8_t pci_int);
|
||||
|
||||
extern void pci_reset(void);
|
||||
extern void pci_init(int type);
|
||||
extern uint8_t pci_register_bus();
|
||||
extern uint8_t pci_register_bus(void);
|
||||
extern void pci_set_pmc(uint8_t pmc);
|
||||
extern void pci_remap_bus(uint8_t bus_index, uint8_t bus_number);
|
||||
extern void pci_relocate_slot(int type, int new_slot);
|
||||
|
||||
@@ -106,7 +106,7 @@ extern int plat_getcwd(char *bufp, int max);
|
||||
extern int plat_chdir(char *path);
|
||||
extern void plat_tempfile(char *bufp, char *prefix, char *suffix);
|
||||
extern void plat_get_exe_name(char *s, int size);
|
||||
extern void plat_init_rom_paths();
|
||||
extern void plat_init_rom_paths(void);
|
||||
extern int plat_dir_check(char *path);
|
||||
extern int plat_dir_create(char *path);
|
||||
extern void *plat_mmap(size_t size, uint8_t executable);
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
void *sid_init();
|
||||
void *sid_init(void);
|
||||
void sid_close(void *p);
|
||||
void sid_reset(void *p);
|
||||
uint8_t sid_read(uint16_t addr, void *p);
|
||||
|
||||
@@ -25,7 +25,7 @@ extern int speaker_mute;
|
||||
extern int speaker_gated;
|
||||
extern int speaker_enable, was_speaker_enable;
|
||||
|
||||
extern void speaker_init();
|
||||
extern void speaker_init(void);
|
||||
|
||||
extern void speaker_set_count(uint8_t new_m, int new_count);
|
||||
extern void speaker_update(void);
|
||||
|
||||
@@ -42,7 +42,7 @@ void nga_write(uint32_t addr, uint8_t val, void *priv);
|
||||
uint8_t nga_read(uint32_t addr, void *priv);
|
||||
void nga_poll(void *priv);
|
||||
void nga_close(void *priv);
|
||||
void nga_mdaattr_rebuild();
|
||||
void nga_mdaattr_rebuild(void);
|
||||
|
||||
#ifdef EMU_DEVICE_H
|
||||
extern const device_config_t nga_config[];
|
||||
|
||||
@@ -42,7 +42,7 @@ void ogc_write(uint32_t addr, uint8_t val, void *priv);
|
||||
uint8_t ogc_read(uint32_t addr, void *priv);
|
||||
void ogc_poll(void *priv);
|
||||
void ogc_close(void *priv);
|
||||
void ogc_mdaattr_rebuild();
|
||||
void ogc_mdaattr_rebuild(void);
|
||||
|
||||
#ifdef EMU_DEVICE_H
|
||||
extern const device_config_t ogc_config[];
|
||||
|
||||
@@ -211,7 +211,7 @@ extern uint8_t svga_rotate[8][256];
|
||||
void svga_out(uint16_t addr, uint8_t val, void *p);
|
||||
uint8_t svga_in(uint16_t addr, void *p);
|
||||
|
||||
svga_t *svga_get_pri();
|
||||
svga_t *svga_get_pri(void);
|
||||
void svga_set_override(svga_t *svga, int val);
|
||||
|
||||
void svga_set_ramdac_type(svga_t *svga, int type);
|
||||
|
||||
@@ -148,9 +148,9 @@ extern int win_get_system_metrics(int i, int dpi);
|
||||
|
||||
extern LPARAM win_get_string(int id);
|
||||
|
||||
extern void win_clear_icon_set();
|
||||
extern void win_system_icon_set();
|
||||
extern void win_load_icon_set();
|
||||
extern void win_clear_icon_set(void);
|
||||
extern void win_system_icon_set(void);
|
||||
extern void win_load_icon_set(void);
|
||||
extern void win_get_icons_path(char *path_root);
|
||||
|
||||
extern intptr_t fdd_type_to_icon(int type);
|
||||
@@ -209,7 +209,7 @@ extern int MediaMenuHandler(HWND hwnd, UINT message, WPARAM wParam, LPARAM lPar
|
||||
/* Functions in win_toolbar.c */
|
||||
extern HWND hwndRebar;
|
||||
extern void ToolBarCreate(HWND hwndParent, HINSTANCE hInst);
|
||||
extern void ToolBarLoadIcons();
|
||||
extern void ToolBarLoadIcons(void);
|
||||
extern void ToolBarUpdatePause(int paused);
|
||||
|
||||
/* Functions in win_dialog.c: */
|
||||
@@ -223,8 +223,8 @@ extern int file_dlg_st(HWND hwnd, int i, char *fn, char *title, int save);
|
||||
extern wchar_t *BrowseFolder(wchar_t *saved_path, wchar_t *title);
|
||||
|
||||
/* Functions in win_media_menu.c */
|
||||
extern void media_menu_init();
|
||||
extern void media_menu_reset();
|
||||
extern void media_menu_init(void);
|
||||
extern void media_menu_reset(void);
|
||||
extern int media_menu_proc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam);
|
||||
extern HMENU media_menu_get_cassette(void);
|
||||
extern HMENU media_menu_get_cartridge(int id);
|
||||
@@ -241,7 +241,7 @@ extern void media_menu_update_mo(int id);
|
||||
|
||||
/* Functions in win_ui.c */
|
||||
extern HMENU menuMain;
|
||||
extern void ResetAllMenus();
|
||||
extern void ResetAllMenus(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
@@ -19,6 +19,6 @@
|
||||
#include <glad/glad.h>
|
||||
|
||||
GLuint load_custom_shaders(const char *path);
|
||||
GLuint load_default_shaders();
|
||||
GLuint load_default_shaders(void);
|
||||
|
||||
#endif /*!WIN_OPENGL_GLSLP_H*/
|
||||
|
||||
@@ -113,7 +113,7 @@ extern void zip_hard_reset(void);
|
||||
|
||||
extern void zip_reset(scsi_common_t *sc);
|
||||
extern int zip_load(zip_t *dev, char *fn);
|
||||
extern void zip_close();
|
||||
extern void zip_close(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
@@ -492,7 +492,7 @@ ini_write(ini_t ini, char *fn)
|
||||
}
|
||||
|
||||
ini_t
|
||||
ini_new()
|
||||
ini_new(void)
|
||||
{
|
||||
ini_t ini = malloc(sizeof(list_t));
|
||||
memset(ini, 0, sizeof(list_t));
|
||||
|
||||
@@ -84,7 +84,7 @@ cbm_io_write(uint16_t port, uint8_t val, void *p)
|
||||
}
|
||||
|
||||
static void
|
||||
cbm_io_init()
|
||||
cbm_io_init(void)
|
||||
{
|
||||
io_sethandler(0x0230, 0x0001, NULL, NULL, NULL, cbm_io_write, NULL, NULL, NULL);
|
||||
}
|
||||
|
||||
@@ -169,7 +169,7 @@
|
||||
|
||||
extern uint8_t *ram; /* Physical RAM */
|
||||
|
||||
void at_init();
|
||||
void at_init(void);
|
||||
|
||||
/* The T3100e motherboard can (and does) dynamically reassign RAM between
|
||||
* conventional, XMS and EMS. This translates to monkeying with the mappings.
|
||||
@@ -336,7 +336,7 @@ port_to_page(uint16_t addr)
|
||||
}
|
||||
|
||||
/* Used to dump the memory mapping table, for debugging
|
||||
void dump_mappings()
|
||||
void dump_mappings(void)
|
||||
{
|
||||
mem_mapping_t *mm = base_mapping.next;
|
||||
|
||||
|
||||
@@ -102,7 +102,7 @@ t3100e_display_set(uint8_t internal)
|
||||
}
|
||||
|
||||
uint8_t
|
||||
t3100e_display_get()
|
||||
t3100e_display_get(void)
|
||||
{
|
||||
return st_display_internal;
|
||||
}
|
||||
|
||||
@@ -806,7 +806,7 @@ ps2_mca_write(uint16_t port, uint8_t val, void *p)
|
||||
}
|
||||
|
||||
static void
|
||||
ps2_mca_board_common_init()
|
||||
ps2_mca_board_common_init(void)
|
||||
{
|
||||
io_sethandler(0x0091, 0x0001, ps2_mca_read, NULL, NULL, ps2_mca_write, NULL, NULL, NULL);
|
||||
io_sethandler(0x0094, 0x0001, ps2_mca_read, NULL, NULL, ps2_mca_write, NULL, NULL, NULL);
|
||||
|
||||
@@ -201,7 +201,7 @@ mm58174_time_get(uint8_t *regs, struct tm *tm)
|
||||
|
||||
/* One more second has passed, update the internal clock. */
|
||||
static void
|
||||
mm58x74_recalc()
|
||||
mm58x74_recalc(void)
|
||||
{
|
||||
/* Ping the internal clock. */
|
||||
if (++intclk.tm_sec == 60) {
|
||||
|
||||
@@ -94,7 +94,7 @@ t1000_display_set(uint8_t internal)
|
||||
}
|
||||
|
||||
uint8_t
|
||||
t1000_display_get()
|
||||
t1000_display_get(void)
|
||||
{
|
||||
return (uint8_t) st_display_internal;
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@ typedef struct xi8088_t {
|
||||
static xi8088_t xi8088;
|
||||
|
||||
uint8_t
|
||||
xi8088_turbo_get()
|
||||
xi8088_turbo_get(void)
|
||||
{
|
||||
return xi8088.turbo;
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
machine_status_t machine_status;
|
||||
|
||||
void
|
||||
machine_status_init()
|
||||
machine_status_init(void)
|
||||
{
|
||||
for (size_t i = 0; i < FDD_NUM; ++i) {
|
||||
machine_status.fdd[i].empty = (strlen(floppyfns[i]) == 0);
|
||||
|
||||
@@ -1044,7 +1044,7 @@ pci_init(int type)
|
||||
}
|
||||
|
||||
uint8_t
|
||||
pci_register_bus()
|
||||
pci_register_bus(void)
|
||||
{
|
||||
return last_pci_bus++;
|
||||
}
|
||||
|
||||
@@ -249,7 +249,7 @@ pic_callback(void *priv)
|
||||
}
|
||||
|
||||
void
|
||||
pic_reset()
|
||||
pic_reset(void)
|
||||
{
|
||||
int is_at = IS_AT(machine);
|
||||
is_at = is_at || !strcmp(machine_get_internal_name(), "xi8088");
|
||||
@@ -714,7 +714,7 @@ pic_irq_ack(void)
|
||||
}
|
||||
|
||||
int
|
||||
picinterrupt()
|
||||
picinterrupt(void)
|
||||
{
|
||||
int i, ret = -1;
|
||||
|
||||
|
||||
@@ -229,7 +229,7 @@ void joystick_get_device_name(raw_joystick_t* rawjoy, plat_joystick_t* joy, PRID
|
||||
info->hid.dwProductId);
|
||||
}
|
||||
|
||||
void joystick_init()
|
||||
void joystick_init(void)
|
||||
{
|
||||
UINT size = 0;
|
||||
atexit(joystick_close);
|
||||
@@ -295,7 +295,7 @@ void joystick_init()
|
||||
fatal("plat_joystick_init: RegisterRawInputDevices failed\n");
|
||||
}
|
||||
|
||||
void joystick_close()
|
||||
void joystick_close(void)
|
||||
{
|
||||
RAWINPUTDEVICE ridev[2];
|
||||
ridev[0].dwFlags = RIDEV_REMOVE;
|
||||
|
||||
@@ -172,7 +172,7 @@ midi_out_device_get_from_internal_name(char *s)
|
||||
}
|
||||
|
||||
void
|
||||
midi_out_device_init()
|
||||
midi_out_device_init(void)
|
||||
{
|
||||
if (devices[midi_output_device_current].device)
|
||||
device_add(devices[midi_output_device_current].device);
|
||||
@@ -290,7 +290,7 @@ midi_in_device_get_from_internal_name(char *s)
|
||||
}
|
||||
|
||||
void
|
||||
midi_in_device_init()
|
||||
midi_in_device_init(void)
|
||||
{
|
||||
if (midi_in_devices[midi_input_device_current].device)
|
||||
device_add(midi_in_devices[midi_input_device_current].device);
|
||||
|
||||
@@ -119,7 +119,7 @@ mt32_check(const char *func, mt32emu_return_code ret, mt32emu_return_code expect
|
||||
}
|
||||
|
||||
int
|
||||
mt32_old_available()
|
||||
mt32_old_available(void)
|
||||
{
|
||||
if (roms_present[0] < 0)
|
||||
roms_present[0] = (rom_present(MT32_OLD_CTRL_ROM) && rom_present(MT32_OLD_PCM_ROM));
|
||||
@@ -127,7 +127,7 @@ mt32_old_available()
|
||||
}
|
||||
|
||||
int
|
||||
mt32_new_available()
|
||||
mt32_new_available(void)
|
||||
{
|
||||
if (roms_present[0] < 0)
|
||||
roms_present[0] = (rom_present(MT32_NEW_CTRL_ROM) && rom_present(MT32_NEW_PCM_ROM));
|
||||
@@ -135,7 +135,7 @@ mt32_new_available()
|
||||
}
|
||||
|
||||
int
|
||||
cm32l_available()
|
||||
cm32l_available(void)
|
||||
{
|
||||
if (roms_present[1] < 0)
|
||||
roms_present[1] = (rom_present(CM32L_CTRL_ROM) && rom_present(CM32L_PCM_ROM));
|
||||
@@ -143,7 +143,7 @@ cm32l_available()
|
||||
}
|
||||
|
||||
int
|
||||
cm32ln_available()
|
||||
cm32ln_available(void)
|
||||
{
|
||||
if (roms_present[1] < 0)
|
||||
roms_present[1] = (rom_present(CM32LN_CTRL_ROM) && rom_present(CM32LN_PCM_ROM));
|
||||
@@ -199,7 +199,7 @@ mt32_stream_int16(int16_t *stream, int len)
|
||||
}
|
||||
|
||||
void
|
||||
mt32_poll()
|
||||
mt32_poll(void)
|
||||
{
|
||||
midi_pos++;
|
||||
if (midi_pos == 48000 / RENDER_RATE) {
|
||||
|
||||
@@ -131,7 +131,7 @@ static int treble_cut[6] = {
|
||||
(int) (0.354 * 16384) /*-3 dB - filter output is at +6 dB*/
|
||||
};
|
||||
|
||||
void adgold_timer_poll();
|
||||
void adgold_timer_poll(void *p);
|
||||
void adgold_update(adgold_t *adgold);
|
||||
|
||||
void
|
||||
|
||||
@@ -2035,37 +2035,37 @@ sb_16_compat_init(const device_t *info)
|
||||
}
|
||||
|
||||
static int
|
||||
sb_awe32_available()
|
||||
sb_awe32_available(void)
|
||||
{
|
||||
return rom_present("roms/sound/awe32.raw");
|
||||
}
|
||||
|
||||
static int
|
||||
sb_32_pnp_available()
|
||||
sb_32_pnp_available(void)
|
||||
{
|
||||
return sb_awe32_available() && rom_present("roms/sound/CT3600 PnP.BIN");
|
||||
}
|
||||
|
||||
static int
|
||||
sb_awe32_pnp_available()
|
||||
sb_awe32_pnp_available(void)
|
||||
{
|
||||
return sb_awe32_available() && rom_present("roms/sound/CT3980 PnP.BIN");
|
||||
}
|
||||
|
||||
static int
|
||||
sb_awe64_value_available()
|
||||
sb_awe64_value_available(void)
|
||||
{
|
||||
return sb_awe32_available() && rom_present("roms/sound/CT4520 PnP.BIN");
|
||||
}
|
||||
|
||||
static int
|
||||
sb_awe64_available()
|
||||
sb_awe64_available(void)
|
||||
{
|
||||
return sb_awe32_available() && rom_present("roms/sound/CT4520 PnP.BIN");
|
||||
}
|
||||
|
||||
static int
|
||||
sb_awe64_gold_available()
|
||||
sb_awe64_gold_available(void)
|
||||
{
|
||||
return sb_awe32_available() && rom_present("roms/sound/CT4540 PnP.BIN");
|
||||
}
|
||||
|
||||
@@ -107,7 +107,7 @@ static IXAudio2VoiceCallback callbacks = { &callbacksVtbl };
|
||||
#endif
|
||||
|
||||
void
|
||||
inital()
|
||||
inital(void)
|
||||
{
|
||||
#if defined(_WIN32) && !defined(USE_FAUDIO)
|
||||
if (xaudio2_handle == NULL) {
|
||||
@@ -182,7 +182,7 @@ inital()
|
||||
}
|
||||
|
||||
void
|
||||
closeal()
|
||||
closeal(void)
|
||||
{
|
||||
if (!initialized)
|
||||
return;
|
||||
|
||||
@@ -96,7 +96,7 @@ f82c425_display_set(uint8_t internal)
|
||||
}
|
||||
|
||||
uint8_t
|
||||
f82c425_display_get()
|
||||
f82c425_display_get(void)
|
||||
{
|
||||
return (uint8_t) st_display_internal;
|
||||
}
|
||||
|
||||
@@ -783,7 +783,7 @@ genius_close(void *p)
|
||||
}
|
||||
|
||||
static int
|
||||
genius_available()
|
||||
genius_available(void)
|
||||
{
|
||||
return rom_present(BIOS_ROM_PATH);
|
||||
}
|
||||
|
||||
@@ -1034,7 +1034,7 @@ im1024_close(void *priv)
|
||||
}
|
||||
|
||||
static int
|
||||
im1024_available()
|
||||
im1024_available(void)
|
||||
{
|
||||
return rom_present(BIOS_ROM_PATH);
|
||||
}
|
||||
|
||||
@@ -535,7 +535,7 @@ ogc_speed_changed(void *priv)
|
||||
}
|
||||
|
||||
void
|
||||
ogc_mdaattr_rebuild()
|
||||
ogc_mdaattr_rebuild(void)
|
||||
{
|
||||
int c;
|
||||
|
||||
|
||||
@@ -876,12 +876,15 @@ s3_accel_out_fifo(s3_t *s3, uint16_t port, uint8_t val)
|
||||
s3->accel.short_stroke = (s3->accel.short_stroke & 0xff) | (val << 8);
|
||||
s3->accel.ssv_state = 1;
|
||||
|
||||
s3->accel.cx = s3->accel.cur_x;
|
||||
if (s3->accel.cur_x_bit12)
|
||||
s3->accel.cx |= ~0xfff;
|
||||
s3->accel.cy = s3->accel.cur_y;
|
||||
if (s3->accel.cur_y_bit12)
|
||||
s3->accel.cy |= ~0xfff;
|
||||
s3->accel.cx = s3->accel.cur_x & 0x7ff;
|
||||
s3->accel.cy = s3->accel.cur_y & 0x7ff;
|
||||
|
||||
if (s3->accel.cur_x & 0x800) {
|
||||
s3->accel.cx |= ~0x7ff;
|
||||
}
|
||||
if (s3->accel.cur_y & 0x800) {
|
||||
s3->accel.cy |= ~0x7ff;
|
||||
}
|
||||
|
||||
if (s3->accel.cmd & 0x1000) {
|
||||
s3_short_stroke_start(-1, 0, 0xffffffff, 0, s3, s3->accel.short_stroke & 0xff);
|
||||
@@ -1414,12 +1417,15 @@ s3_accel_out_fifo_w(s3_t *s3, uint16_t port, uint16_t val)
|
||||
s3->accel.short_stroke = val;
|
||||
s3->accel.ssv_state = 1;
|
||||
|
||||
s3->accel.cx = s3->accel.cur_x;
|
||||
if (s3->accel.cur_x_bit12)
|
||||
s3->accel.cx |= ~0xfff;
|
||||
s3->accel.cy = s3->accel.cur_y;
|
||||
if (s3->accel.cur_y_bit12)
|
||||
s3->accel.cy |= ~0xfff;
|
||||
s3->accel.cx = s3->accel.cur_x & 0x7ff;
|
||||
s3->accel.cy = s3->accel.cur_y & 0x7ff;
|
||||
|
||||
if (s3->accel.cur_x & 0x800) {
|
||||
s3->accel.cx |= ~0x7ff;
|
||||
}
|
||||
if (s3->accel.cur_y & 0x800) {
|
||||
s3->accel.cy |= ~0x7ff;
|
||||
}
|
||||
|
||||
if (s3->accel.cmd & 0x1000) {
|
||||
s3_short_stroke_start(-1, 0, 0xffffffff, 0, s3, s3->accel.short_stroke & 0xff);
|
||||
@@ -1687,8 +1693,15 @@ s3_accel_write_fifo(s3_t *s3, uint32_t addr, uint8_t val)
|
||||
}
|
||||
} else {
|
||||
if (addr & 0x8000) {
|
||||
s3_accel_out_fifo(s3, addr & 0xffff, val);
|
||||
if ((addr == 0xe2e8) || (addr == 0xe2e9)) {
|
||||
if ((s3->chip == S3_86C801) || (s3->chip == S3_86C805))
|
||||
goto mmio_byte_write;
|
||||
else
|
||||
s3_accel_out_fifo(s3, addr & 0xffff, val);
|
||||
} else
|
||||
s3_accel_out_fifo(s3, addr & 0xffff, val);
|
||||
} else {
|
||||
mmio_byte_write:
|
||||
if (s3->accel.cmd & 0x100) {
|
||||
if ((s3->accel.cmd & 0x600) == 0x200) {
|
||||
if (((s3->accel.multifunc[0xa] & 0xc0) == 0x80) || (s3->accel.cmd & 2)) {
|
||||
@@ -1740,8 +1753,8 @@ s3_accel_write_fifo_w(s3_t *s3, uint32_t addr, uint16_t val)
|
||||
if (addr == 0x811c)
|
||||
s3_accel_out_fifo_w(s3, 0x9ee8, val);
|
||||
else {
|
||||
if (addr == 0xe2e8 || addr == 0xe2ea) {
|
||||
if (s3->chip == S3_86C928 || s3->chip == S3_86C928PCI)
|
||||
if ((addr == 0xe2e8) || (addr == 0xe2ea)) {
|
||||
if ((s3->chip == S3_86C801) || (s3->chip == S3_86C805) || (s3->chip == S3_86C928) || (s3->chip == S3_86C928PCI))
|
||||
s3_accel_out_pixtrans_w(s3, val);
|
||||
else {
|
||||
s3_accel_write_fifo(s3, addr, val);
|
||||
@@ -3142,8 +3155,12 @@ s3_recalctimings(svga_t *svga)
|
||||
svga->render = svga_render_8bpp_highres;
|
||||
if (s3->chip != S3_VISION868) {
|
||||
if (s3->chip == S3_86C928) {
|
||||
if (s3->width == 2048 || s3->width == 1280 || s3->width == 1600)
|
||||
svga->hdisp <<= 1;
|
||||
if (s3->width == 2048 || s3->width == 1280 || s3->width == 1600) {
|
||||
if ((s3->width != 1600) && (svga->dispend == 1024) && (svga->hdisp != 1280))
|
||||
svga->hdisp <<= 2;
|
||||
else
|
||||
svga->hdisp <<= 1;
|
||||
}
|
||||
} else if ((s3->chip != S3_86C801) && (s3->chip != S3_86C805) && (s3->chip != S3_TRIO32) && (s3->chip != S3_TRIO64) && (s3->chip != S3_VISION964) && (s3->chip != S3_VISION968)) {
|
||||
if (s3->width == 1280 || s3->width == 1600)
|
||||
svga->hdisp <<= 1;
|
||||
@@ -3554,9 +3571,8 @@ s3_updatemapping(s3_t *s3)
|
||||
mem_mapping_set_addr(&s3->mmio_mapping, 0xb8000, 0x8000);
|
||||
else
|
||||
mem_mapping_set_addr(&s3->mmio_mapping, 0xa0000, 0x10000);
|
||||
} else {
|
||||
mem_mapping_enable(&s3->mmio_mapping);
|
||||
}
|
||||
mem_mapping_enable(&s3->mmio_mapping);
|
||||
} else {
|
||||
mem_mapping_disable(&s3->mmio_mapping);
|
||||
}
|
||||
@@ -6214,12 +6230,15 @@ s3_accel_start(int count, int cpu_input, uint32_t mix_dat, uint32_t cpu_dat, s3_
|
||||
|
||||
case 1: /*Draw line*/
|
||||
if (!cpu_input) {
|
||||
s3->accel.cx = s3->accel.cur_x;
|
||||
if (s3->accel.cur_x_bit12)
|
||||
s3->accel.cx |= ~0xfff;
|
||||
s3->accel.cy = s3->accel.cur_y;
|
||||
if (s3->accel.cur_y_bit12)
|
||||
s3->accel.cy |= ~0xfff;
|
||||
s3->accel.cx = s3->accel.cur_x & 0x7ff;
|
||||
s3->accel.cy = s3->accel.cur_y & 0x7ff;
|
||||
|
||||
if (s3->accel.cur_x & 0x800) {
|
||||
s3->accel.cx |= ~0x7ff;
|
||||
}
|
||||
if (s3->accel.cur_y & 0x800) {
|
||||
s3->accel.cy |= ~0x7ff;
|
||||
}
|
||||
|
||||
s3->accel.sy = s3->accel.maj_axis_pcnt;
|
||||
|
||||
@@ -6434,23 +6453,15 @@ s3_accel_start(int count, int cpu_input, uint32_t mix_dat, uint32_t cpu_dat, s3_
|
||||
{
|
||||
s3->accel.sx = s3->accel.maj_axis_pcnt & 0xfff;
|
||||
s3->accel.sy = s3->accel.multifunc[0] & 0xfff;
|
||||
s3->accel.cx = s3->accel.cur_x;
|
||||
s3->accel.cy = s3->accel.cur_y;
|
||||
s3->accel.cx = s3->accel.cur_x & 0x7ff;
|
||||
s3->accel.cy = s3->accel.cur_y & 0x7ff;
|
||||
|
||||
if (s3->accel.cur_x_bit12) {
|
||||
if (s3->accel.cx <= 0x7ff) {
|
||||
s3->accel.cx = s3->accel.cur_x_bitres & 0xfff;
|
||||
} else {
|
||||
s3->accel.cx |= ~0xfff;
|
||||
}
|
||||
}
|
||||
if (s3->accel.cur_y_bit12) {
|
||||
if (s3->accel.cy <= 0x7ff) {
|
||||
s3->accel.cy = s3->accel.cur_y_bitres & 0xfff;
|
||||
} else {
|
||||
s3->accel.cy |= ~0xfff;
|
||||
}
|
||||
}
|
||||
if (s3->accel.cur_x & 0x800) {
|
||||
s3->accel.cx |= ~0x7ff;
|
||||
}
|
||||
if (s3->accel.cur_y & 0x800) {
|
||||
s3->accel.cy |= ~0x7ff;
|
||||
}
|
||||
|
||||
s3->accel.dest = dstbase + s3->accel.cy * s3->width;
|
||||
|
||||
@@ -6659,43 +6670,20 @@ s3_accel_start(int count, int cpu_input, uint32_t mix_dat, uint32_t cpu_dat, s3_
|
||||
s3->accel.sx = s3->accel.maj_axis_pcnt & 0xfff;
|
||||
s3->accel.sy = s3->accel.multifunc[0] & 0xfff;
|
||||
|
||||
s3->accel.dx = s3->accel.destx_distp & 0xfff;
|
||||
if (s3->accel.destx_distp & 0x1000)
|
||||
s3->accel.dx |= ~0xfff;
|
||||
s3->accel.dy = s3->accel.desty_axstp & 0xfff;
|
||||
if (s3->accel.desty_axstp & 0x1000)
|
||||
s3->accel.dy |= ~0xfff;
|
||||
s3->accel.dx = s3->accel.destx_distp & 0x7ff;
|
||||
if (s3->accel.destx_distp & 0x800) s3->accel.dx |= ~0x7ff;
|
||||
s3->accel.dy = s3->accel.desty_axstp & 0x7ff;
|
||||
if (s3->accel.desty_axstp & 0x800) s3->accel.dy |= ~0x7ff;
|
||||
|
||||
s3->accel.cx = s3->accel.cur_x;
|
||||
s3->accel.cy = s3->accel.cur_y;
|
||||
s3->accel.cx = s3->accel.cur_x & 0x7ff;
|
||||
s3->accel.cy = s3->accel.cur_y & 0x7ff;
|
||||
|
||||
if (s3->accel.destx_distp >= 0xfffff000) { /* avoid overflow */
|
||||
s3->accel.dx = s3->accel.destx_distp & 0xfff;
|
||||
if (s3->accel.cur_x_bit12) {
|
||||
if (s3->accel.cx <= 0x7ff) {
|
||||
s3->accel.cx = s3->accel.cur_x_bitres & 0xfff;
|
||||
} else {
|
||||
s3->accel.cx |= ~0xfff;
|
||||
}
|
||||
}
|
||||
if (s3->accel.cur_y_bitres > 0xfff)
|
||||
s3->accel.cy = s3->accel.cur_y_bitres;
|
||||
} else {
|
||||
if (s3->accel.cur_x_bit12) {
|
||||
if (s3->accel.cx <= 0x7ff) { /* overlap x */
|
||||
s3->accel.cx = s3->accel.cur_x_bitres & 0xfff;
|
||||
} else { /* x end is negative */
|
||||
s3->accel.cx |= ~0xfff;
|
||||
}
|
||||
}
|
||||
if (s3->accel.cur_y_bit12) {
|
||||
if (s3->accel.cy <= 0x7ff) { /* overlap y */
|
||||
s3->accel.cy = s3->accel.cur_y_bitres & 0xfff;
|
||||
} else { /* y end is negative */
|
||||
s3->accel.cy |= ~0xfff;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (s3->accel.cur_x & 0x800) {
|
||||
s3->accel.cx |= ~0x7ff;
|
||||
}
|
||||
if (s3->accel.cur_y & 0x800) {
|
||||
s3->accel.cy |= ~0x7ff;
|
||||
}
|
||||
|
||||
s3->accel.src = srcbase + s3->accel.cy * s3->width;
|
||||
s3->accel.dest = dstbase + s3->accel.dy * s3->width;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user