Merge pull request #5208 from jriwanek-forks/cleanup

Next batch of cleanups
This commit is contained in:
Miran Grča
2025-02-08 09:11:34 +01:00
committed by GitHub
102 changed files with 7267 additions and 7324 deletions

View File

@@ -460,11 +460,11 @@ const device_t mitsumi_cdrom_device = {
.name = "Mitsumi CD-ROM interface",
.internal_name = "mcd",
.flags = DEVICE_ISA | DEVICE_AT,
.local = 1,
.local = 0,
.init = mitsumi_cdrom_init,
.close = mitsumi_cdrom_close,
.reset = NULL,
{ .available = NULL },
.available = NULL,
.speed_changed = NULL,
.force_redraw = NULL,
.config = NULL

View File

@@ -21,8 +21,7 @@
#define MAX_INSTRUCTION_COUNT 50
static struct
{
static struct {
uint32_t pc;
int op_ssegs;
x86seg *op_ea_seg;

View File

@@ -8,8 +8,7 @@
#include "codegen_accumulate.h"
#include "codegen_ir.h"
static struct
{
static struct {
int count;
int dest_reg;
} acc_regs[] = {

View File

@@ -16,28 +16,29 @@
#include "codegen_ops_3dnow.h"
#include "codegen_ops_helpers.h"
#define ropParith(func) \
uint32_t rop##func(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), uint32_t fetchdat, uint32_t op_32, uint32_t op_pc) \
{ \
int dest_reg = (fetchdat >> 3) & 7; \
\
uop_MMX_ENTER(ir); \
codegen_mark_code_present(block, cs + op_pc, 1); \
if ((fetchdat & 0xc0) == 0xc0) { \
int src_reg = fetchdat & 7; \
uop_##func(ir, IREG_MM(dest_reg), IREG_MM(dest_reg), IREG_MM(src_reg)); \
} else { \
x86seg *target_seg; \
\
uop_MOV_IMM(ir, IREG_oldpc, cpu_state.oldpc); \
target_seg = codegen_generate_ea(ir, op_ea_seg, fetchdat, op_ssegs, &op_pc, op_32, 0); \
codegen_check_seg_read(block, ir, target_seg); \
uop_MEM_LOAD_REG(ir, IREG_temp0_Q, ireg_seg_base(target_seg), IREG_eaaddr); \
uop_##func(ir, IREG_MM(dest_reg), IREG_MM(dest_reg), IREG_temp0_Q); \
} \
\
codegen_mark_code_present(block, cs + op_pc + 1, 1); \
return op_pc + 2; \
#define ropParith(func) \
uint32_t rop##func(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), \
uint32_t fetchdat, uint32_t op_32, uint32_t op_pc) \
{ \
int dest_reg = (fetchdat >> 3) & 7; \
\
uop_MMX_ENTER(ir); \
codegen_mark_code_present(block, cs + op_pc, 1); \
if ((fetchdat & 0xc0) == 0xc0) { \
int src_reg = fetchdat & 7; \
uop_##func(ir, IREG_MM(dest_reg), IREG_MM(dest_reg), IREG_MM(src_reg)); \
} else { \
x86seg *target_seg; \
\
uop_MOV_IMM(ir, IREG_oldpc, cpu_state.oldpc); \
target_seg = codegen_generate_ea(ir, op_ea_seg, fetchdat, op_ssegs, &op_pc, op_32, 0); \
codegen_check_seg_read(block, ir, target_seg); \
uop_MEM_LOAD_REG(ir, IREG_temp0_Q, ireg_seg_base(target_seg), IREG_eaaddr); \
uop_##func(ir, IREG_MM(dest_reg), IREG_MM(dest_reg), IREG_temp0_Q); \
} \
\
codegen_mark_code_present(block, cs + op_pc + 1, 1); \
return op_pc + 2; \
}
// clang-format off

View File

@@ -815,41 +815,56 @@ ropJNLE_common(codeblock_t *block, ir_data_t *ir, uint32_t dest_addr, uint32_t n
}
}
#define ropJ(cond) \
uint32_t ropJ##cond##_8(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), UNUSED(uint32_t fetchdat), uint32_t op_32, uint32_t op_pc) \
{ \
uint32_t offset = (int32_t) (int8_t) fastreadb(cs + op_pc); \
uint32_t dest_addr = op_pc + 1 + offset; \
int ret; \
\
if (!(op_32 & 0x100)) \
dest_addr &= 0xffff; \
ret = ropJ##cond##_common(block, ir, dest_addr, op_pc + 1); \
\
codegen_mark_code_present(block, cs + op_pc, 1); \
return ret ? dest_addr : (op_pc + 1); \
} \
uint32_t ropJ##cond##_16(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), UNUSED(uint32_t fetchdat), UNUSED(uint32_t op_32), uint32_t op_pc) \
{ \
uint32_t offset = (int32_t) (int16_t) fastreadw(cs + op_pc); \
uint32_t dest_addr = (op_pc + 2 + offset) & 0xffff; \
int ret; \
\
ret = ropJ##cond##_common(block, ir, dest_addr, op_pc + 2); \
\
codegen_mark_code_present(block, cs + op_pc, 2); \
return ret ? dest_addr : (op_pc + 2); \
} \
uint32_t ropJ##cond##_32(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), UNUSED(uint32_t fetchdat), UNUSED(uint32_t op_32), uint32_t op_pc) \
{ \
uint32_t offset = fastreadl(cs + op_pc); \
uint32_t dest_addr = op_pc + 4 + offset; \
int ret; \
\
ret = ropJ##cond##_common(block, ir, dest_addr, op_pc + 4); \
\
codegen_mark_code_present(block, cs + op_pc, 4); \
return ret ? dest_addr : (op_pc + 4); \
#define ropJ(cond) \
uint32_t ropJ##cond##_8(codeblock_t *block, \
ir_data_t *ir, \
UNUSED(uint8_t opcode), \
UNUSED(uint32_t fetchdat), \
uint32_t op_32, \
uint32_t op_pc) \
{ \
uint32_t offset = (int32_t) (int8_t) fastreadb(cs + op_pc); \
uint32_t dest_addr = op_pc + 1 + offset; \
int ret; \
\
if (!(op_32 & 0x100)) \
dest_addr &= 0xffff; \
ret = ropJ##cond##_common(block, ir, dest_addr, op_pc + 1); \
\
codegen_mark_code_present(block, cs + op_pc, 1); \
return ret ? dest_addr : (op_pc + 1); \
} \
uint32_t ropJ##cond##_16(codeblock_t *block, \
ir_data_t *ir, \
UNUSED(uint8_t opcode), \
UNUSED(uint32_t fetchdat), \
UNUSED(uint32_t op_32), \
uint32_t op_pc) \
{ \
uint32_t offset = (int32_t) (int16_t) fastreadw(cs + op_pc); \
uint32_t dest_addr = (op_pc + 2 + offset) & 0xffff; \
int ret; \
\
ret = ropJ##cond##_common(block, ir, dest_addr, op_pc + 2); \
\
codegen_mark_code_present(block, cs + op_pc, 2); \
return ret ? dest_addr : (op_pc + 2); \
} \
uint32_t ropJ##cond##_32(codeblock_t *block, \
ir_data_t *ir, \
UNUSED(uint8_t opcode), \
UNUSED(uint32_t fetchdat), \
UNUSED(uint32_t op_32), \
uint32_t op_pc) \
{ \
uint32_t offset = fastreadl(cs + op_pc); \
uint32_t dest_addr = op_pc + 4 + offset; \
int ret; \
\
ret = ropJ##cond##_common(block, ir, dest_addr, op_pc + 4); \
\
codegen_mark_code_present(block, cs + op_pc, 4); \
return ret ? dest_addr : (op_pc + 4); \
}
// clang-format off

View File

@@ -300,131 +300,139 @@ ropFUCOMPP(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), UNUSED(uin
return op_pc;
}
#define ropF_arith_mem(name, load_uop) \
uint32_t ropFADD##name(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), uint32_t fetchdat, uint32_t op_32, uint32_t op_pc) \
{ \
x86seg *target_seg; \
\
if ((cpu_state.npxc >> 10) & 3) \
return 0; \
uop_FP_ENTER(ir); \
uop_MOV_IMM(ir, IREG_oldpc, cpu_state.oldpc); \
op_pc--; \
target_seg = codegen_generate_ea(ir, op_ea_seg, fetchdat, op_ssegs, &op_pc, op_32, 0); \
codegen_check_seg_read(block, ir, target_seg); \
load_uop(ir, IREG_temp0_D, ireg_seg_base(target_seg), IREG_eaaddr); \
uop_FADD(ir, IREG_ST(0), IREG_ST(0), IREG_temp0_D); \
uop_MOV_IMM(ir, IREG_tag(0), TAG_VALID); \
\
return op_pc + 1; \
} \
uint32_t ropFCOM##name(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), uint32_t fetchdat, uint32_t op_32, uint32_t op_pc) \
{ \
x86seg *target_seg; \
\
uop_FP_ENTER(ir); \
uop_MOV_IMM(ir, IREG_oldpc, cpu_state.oldpc); \
op_pc--; \
target_seg = codegen_generate_ea(ir, op_ea_seg, fetchdat, op_ssegs, &op_pc, op_32, 0); \
codegen_check_seg_read(block, ir, target_seg); \
load_uop(ir, IREG_temp0_D, ireg_seg_base(target_seg), IREG_eaaddr); \
uop_FCOM(ir, IREG_temp1_W, IREG_ST(0), IREG_temp0_D); \
uop_AND_IMM(ir, IREG_NPXS, IREG_NPXS, ~(FPU_SW_C0 | FPU_SW_C2 | FPU_SW_C3)); \
uop_OR(ir, IREG_NPXS, IREG_NPXS, IREG_temp1_W); \
\
return op_pc + 1; \
} \
uint32_t ropFCOMP##name(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), uint32_t fetchdat, uint32_t op_32, uint32_t op_pc) \
{ \
x86seg *target_seg; \
\
uop_FP_ENTER(ir); \
uop_MOV_IMM(ir, IREG_oldpc, cpu_state.oldpc); \
op_pc--; \
target_seg = codegen_generate_ea(ir, op_ea_seg, fetchdat, op_ssegs, &op_pc, op_32, 0); \
codegen_check_seg_read(block, ir, target_seg); \
load_uop(ir, IREG_temp0_D, ireg_seg_base(target_seg), IREG_eaaddr); \
uop_FCOM(ir, IREG_temp1_W, IREG_ST(0), IREG_temp0_D); \
uop_AND_IMM(ir, IREG_NPXS, IREG_NPXS, ~(FPU_SW_C0 | FPU_SW_C2 | FPU_SW_C3)); \
uop_OR(ir, IREG_NPXS, IREG_NPXS, IREG_temp1_W); \
fpu_POP(block, ir); \
\
return op_pc + 1; \
} \
uint32_t ropFDIV##name(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), uint32_t fetchdat, uint32_t op_32, uint32_t op_pc) \
{ \
x86seg *target_seg; \
\
uop_FP_ENTER(ir); \
uop_MOV_IMM(ir, IREG_oldpc, cpu_state.oldpc); \
op_pc--; \
target_seg = codegen_generate_ea(ir, op_ea_seg, fetchdat, op_ssegs, &op_pc, op_32, 0); \
codegen_check_seg_read(block, ir, target_seg); \
load_uop(ir, IREG_temp0_D, ireg_seg_base(target_seg), IREG_eaaddr); \
uop_FDIV(ir, IREG_ST(0), IREG_ST(0), IREG_temp0_D); \
uop_MOV_IMM(ir, IREG_tag(0), TAG_VALID); \
\
return op_pc + 1; \
} \
uint32_t ropFDIVR##name(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), uint32_t fetchdat, uint32_t op_32, uint32_t op_pc) \
{ \
x86seg *target_seg; \
\
uop_FP_ENTER(ir); \
uop_MOV_IMM(ir, IREG_oldpc, cpu_state.oldpc); \
op_pc--; \
target_seg = codegen_generate_ea(ir, op_ea_seg, fetchdat, op_ssegs, &op_pc, op_32, 0); \
codegen_check_seg_read(block, ir, target_seg); \
load_uop(ir, IREG_temp0_D, ireg_seg_base(target_seg), IREG_eaaddr); \
uop_FDIV(ir, IREG_ST(0), IREG_temp0_D, IREG_ST(0)); \
uop_MOV_IMM(ir, IREG_tag(0), TAG_VALID); \
\
return op_pc + 1; \
} \
uint32_t ropFMUL##name(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), uint32_t fetchdat, uint32_t op_32, uint32_t op_pc) \
{ \
x86seg *target_seg; \
\
uop_FP_ENTER(ir); \
uop_MOV_IMM(ir, IREG_oldpc, cpu_state.oldpc); \
op_pc--; \
target_seg = codegen_generate_ea(ir, op_ea_seg, fetchdat, op_ssegs, &op_pc, op_32, 0); \
codegen_check_seg_read(block, ir, target_seg); \
load_uop(ir, IREG_temp0_D, ireg_seg_base(target_seg), IREG_eaaddr); \
uop_FMUL(ir, IREG_ST(0), IREG_ST(0), IREG_temp0_D); \
uop_MOV_IMM(ir, IREG_tag(0), TAG_VALID); \
\
return op_pc + 1; \
} \
uint32_t ropFSUB##name(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), uint32_t fetchdat, uint32_t op_32, uint32_t op_pc) \
{ \
x86seg *target_seg; \
\
uop_FP_ENTER(ir); \
uop_MOV_IMM(ir, IREG_oldpc, cpu_state.oldpc); \
op_pc--; \
target_seg = codegen_generate_ea(ir, op_ea_seg, fetchdat, op_ssegs, &op_pc, op_32, 0); \
codegen_check_seg_read(block, ir, target_seg); \
load_uop(ir, IREG_temp0_D, ireg_seg_base(target_seg), IREG_eaaddr); \
uop_FSUB(ir, IREG_ST(0), IREG_ST(0), IREG_temp0_D); \
uop_MOV_IMM(ir, IREG_tag(0), TAG_VALID); \
\
return op_pc + 1; \
} \
uint32_t ropFSUBR##name(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), uint32_t fetchdat, uint32_t op_32, uint32_t op_pc) \
{ \
x86seg *target_seg; \
\
uop_FP_ENTER(ir); \
uop_MOV_IMM(ir, IREG_oldpc, cpu_state.oldpc); \
op_pc--; \
target_seg = codegen_generate_ea(ir, op_ea_seg, fetchdat, op_ssegs, &op_pc, op_32, 0); \
codegen_check_seg_read(block, ir, target_seg); \
load_uop(ir, IREG_temp0_D, ireg_seg_base(target_seg), IREG_eaaddr); \
uop_FSUB(ir, IREG_ST(0), IREG_temp0_D, IREG_ST(0)); \
uop_MOV_IMM(ir, IREG_tag(0), TAG_VALID); \
\
return op_pc + 1; \
#define ropF_arith_mem(name, load_uop) \
uint32_t ropFADD##name(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), \
uint32_t fetchdat, uint32_t op_32, uint32_t op_pc) \
{ \
x86seg *target_seg; \
\
if ((cpu_state.npxc >> 10) & 3) \
return 0; \
uop_FP_ENTER(ir); \
uop_MOV_IMM(ir, IREG_oldpc, cpu_state.oldpc); \
op_pc--; \
target_seg = codegen_generate_ea(ir, op_ea_seg, fetchdat, op_ssegs, &op_pc, op_32, 0); \
codegen_check_seg_read(block, ir, target_seg); \
load_uop(ir, IREG_temp0_D, ireg_seg_base(target_seg), IREG_eaaddr); \
uop_FADD(ir, IREG_ST(0), IREG_ST(0), IREG_temp0_D); \
uop_MOV_IMM(ir, IREG_tag(0), TAG_VALID); \
\
return op_pc + 1; \
} \
uint32_t ropFCOM##name(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), \
uint32_t fetchdat, uint32_t op_32, uint32_t op_pc) \
{ \
x86seg *target_seg; \
\
uop_FP_ENTER(ir); \
uop_MOV_IMM(ir, IREG_oldpc, cpu_state.oldpc); \
op_pc--; \
target_seg = codegen_generate_ea(ir, op_ea_seg, fetchdat, op_ssegs, &op_pc, op_32, 0); \
codegen_check_seg_read(block, ir, target_seg); \
load_uop(ir, IREG_temp0_D, ireg_seg_base(target_seg), IREG_eaaddr); \
uop_FCOM(ir, IREG_temp1_W, IREG_ST(0), IREG_temp0_D); \
uop_AND_IMM(ir, IREG_NPXS, IREG_NPXS, ~(FPU_SW_C0 | FPU_SW_C2 | FPU_SW_C3)); \
uop_OR(ir, IREG_NPXS, IREG_NPXS, IREG_temp1_W); \
\
return op_pc + 1; \
} \
uint32_t ropFCOMP##name(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), \
uint32_t fetchdat, uint32_t op_32, uint32_t op_pc) \
{ \
x86seg *target_seg; \
\
uop_FP_ENTER(ir); \
uop_MOV_IMM(ir, IREG_oldpc, cpu_state.oldpc); \
op_pc--; \
target_seg = codegen_generate_ea(ir, op_ea_seg, fetchdat, op_ssegs, &op_pc, op_32, 0); \
codegen_check_seg_read(block, ir, target_seg); \
load_uop(ir, IREG_temp0_D, ireg_seg_base(target_seg), IREG_eaaddr); \
uop_FCOM(ir, IREG_temp1_W, IREG_ST(0), IREG_temp0_D); \
uop_AND_IMM(ir, IREG_NPXS, IREG_NPXS, ~(FPU_SW_C0 | FPU_SW_C2 | FPU_SW_C3)); \
uop_OR(ir, IREG_NPXS, IREG_NPXS, IREG_temp1_W); \
fpu_POP(block, ir); \
\
return op_pc + 1; \
} \
uint32_t ropFDIV##name(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), \
uint32_t fetchdat, uint32_t op_32, uint32_t op_pc) \
{ \
x86seg *target_seg; \
\
uop_FP_ENTER(ir); \
uop_MOV_IMM(ir, IREG_oldpc, cpu_state.oldpc); \
op_pc--; \
target_seg = codegen_generate_ea(ir, op_ea_seg, fetchdat, op_ssegs, &op_pc, op_32, 0); \
codegen_check_seg_read(block, ir, target_seg); \
load_uop(ir, IREG_temp0_D, ireg_seg_base(target_seg), IREG_eaaddr); \
uop_FDIV(ir, IREG_ST(0), IREG_ST(0), IREG_temp0_D); \
uop_MOV_IMM(ir, IREG_tag(0), TAG_VALID); \
\
return op_pc + 1; \
} \
uint32_t ropFDIVR##name(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), \
uint32_t fetchdat, uint32_t op_32, uint32_t op_pc) \
{ \
x86seg *target_seg; \
\
uop_FP_ENTER(ir); \
uop_MOV_IMM(ir, IREG_oldpc, cpu_state.oldpc); \
op_pc--; \
target_seg = codegen_generate_ea(ir, op_ea_seg, fetchdat, op_ssegs, &op_pc, op_32, 0); \
codegen_check_seg_read(block, ir, target_seg); \
load_uop(ir, IREG_temp0_D, ireg_seg_base(target_seg), IREG_eaaddr); \
uop_FDIV(ir, IREG_ST(0), IREG_temp0_D, IREG_ST(0)); \
uop_MOV_IMM(ir, IREG_tag(0), TAG_VALID); \
\
return op_pc + 1; \
} \
uint32_t ropFMUL##name(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), \
uint32_t fetchdat, uint32_t op_32, uint32_t op_pc) \
{ \
x86seg *target_seg; \
\
uop_FP_ENTER(ir); \
uop_MOV_IMM(ir, IREG_oldpc, cpu_state.oldpc); \
op_pc--; \
target_seg = codegen_generate_ea(ir, op_ea_seg, fetchdat, op_ssegs, &op_pc, op_32, 0); \
codegen_check_seg_read(block, ir, target_seg); \
load_uop(ir, IREG_temp0_D, ireg_seg_base(target_seg), IREG_eaaddr); \
uop_FMUL(ir, IREG_ST(0), IREG_ST(0), IREG_temp0_D); \
uop_MOV_IMM(ir, IREG_tag(0), TAG_VALID); \
\
return op_pc + 1; \
} \
uint32_t ropFSUB##name(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), \
uint32_t fetchdat, uint32_t op_32, uint32_t op_pc) \
{ \
x86seg *target_seg; \
\
uop_FP_ENTER(ir); \
uop_MOV_IMM(ir, IREG_oldpc, cpu_state.oldpc); \
op_pc--; \
target_seg = codegen_generate_ea(ir, op_ea_seg, fetchdat, op_ssegs, &op_pc, op_32, 0); \
codegen_check_seg_read(block, ir, target_seg); \
load_uop(ir, IREG_temp0_D, ireg_seg_base(target_seg), IREG_eaaddr); \
uop_FSUB(ir, IREG_ST(0), IREG_ST(0), IREG_temp0_D); \
uop_MOV_IMM(ir, IREG_tag(0), TAG_VALID); \
\
return op_pc + 1; \
} \
uint32_t ropFSUBR##name(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), \
uint32_t fetchdat, uint32_t op_32, uint32_t op_pc) \
{ \
x86seg *target_seg; \
\
uop_FP_ENTER(ir); \
uop_MOV_IMM(ir, IREG_oldpc, cpu_state.oldpc); \
op_pc--; \
target_seg = codegen_generate_ea(ir, op_ea_seg, fetchdat, op_ssegs, &op_pc, op_32, 0); \
codegen_check_seg_read(block, ir, target_seg); \
load_uop(ir, IREG_temp0_D, ireg_seg_base(target_seg), IREG_eaaddr); \
uop_FSUB(ir, IREG_ST(0), IREG_temp0_D, IREG_ST(0)); \
uop_MOV_IMM(ir, IREG_tag(0), TAG_VALID); \
\
return op_pc + 1; \
}
// clang-format off
@@ -432,137 +440,145 @@ ropF_arith_mem(s, uop_MEM_LOAD_SINGLE)
ropF_arith_mem(d, uop_MEM_LOAD_DOUBLE)
// clang-format on
#define ropFI_arith_mem(name, temp_reg) \
uint32_t ropFIADD##name(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), uint32_t fetchdat, uint32_t op_32, uint32_t op_pc) \
{ \
x86seg *target_seg; \
\
uop_FP_ENTER(ir); \
uop_MOV_IMM(ir, IREG_oldpc, cpu_state.oldpc); \
op_pc--; \
target_seg = codegen_generate_ea(ir, op_ea_seg, fetchdat, op_ssegs, &op_pc, op_32, 0); \
codegen_check_seg_read(block, ir, target_seg); \
uop_MEM_LOAD_REG(ir, temp_reg, ireg_seg_base(target_seg), IREG_eaaddr); \
uop_MOV_DOUBLE_INT(ir, IREG_temp0_D, temp_reg); \
uop_FADD(ir, IREG_ST(0), IREG_ST(0), IREG_temp0_D); \
uop_MOV_IMM(ir, IREG_tag(0), TAG_VALID); \
\
return op_pc + 1; \
} \
uint32_t ropFICOM##name(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), uint32_t fetchdat, uint32_t op_32, uint32_t op_pc) \
{ \
x86seg *target_seg; \
\
uop_FP_ENTER(ir); \
uop_MOV_IMM(ir, IREG_oldpc, cpu_state.oldpc); \
op_pc--; \
target_seg = codegen_generate_ea(ir, op_ea_seg, fetchdat, op_ssegs, &op_pc, op_32, 0); \
codegen_check_seg_read(block, ir, target_seg); \
uop_MEM_LOAD_REG(ir, temp_reg, ireg_seg_base(target_seg), IREG_eaaddr); \
uop_MOV_DOUBLE_INT(ir, IREG_temp0_D, temp_reg); \
uop_FCOM(ir, IREG_temp1_W, IREG_ST(0), IREG_temp0_D); \
uop_AND_IMM(ir, IREG_NPXS, IREG_NPXS, ~(FPU_SW_C0 | FPU_SW_C2 | FPU_SW_C3)); \
uop_OR(ir, IREG_NPXS, IREG_NPXS, IREG_temp1_W); \
\
return op_pc + 1; \
} \
uint32_t ropFICOMP##name(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), uint32_t fetchdat, uint32_t op_32, uint32_t op_pc) \
{ \
x86seg *target_seg; \
\
uop_FP_ENTER(ir); \
uop_MOV_IMM(ir, IREG_oldpc, cpu_state.oldpc); \
op_pc--; \
target_seg = codegen_generate_ea(ir, op_ea_seg, fetchdat, op_ssegs, &op_pc, op_32, 0); \
codegen_check_seg_read(block, ir, target_seg); \
uop_MEM_LOAD_REG(ir, temp_reg, ireg_seg_base(target_seg), IREG_eaaddr); \
uop_MOV_DOUBLE_INT(ir, IREG_temp0_D, temp_reg); \
uop_FCOM(ir, IREG_temp1_W, IREG_ST(0), IREG_temp0_D); \
uop_AND_IMM(ir, IREG_NPXS, IREG_NPXS, ~(FPU_SW_C0 | FPU_SW_C2 | FPU_SW_C3)); \
uop_OR(ir, IREG_NPXS, IREG_NPXS, IREG_temp1_W); \
fpu_POP(block, ir); \
\
return op_pc + 1; \
} \
uint32_t ropFIDIV##name(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), uint32_t fetchdat, uint32_t op_32, uint32_t op_pc) \
{ \
x86seg *target_seg; \
\
uop_FP_ENTER(ir); \
uop_MOV_IMM(ir, IREG_oldpc, cpu_state.oldpc); \
op_pc--; \
target_seg = codegen_generate_ea(ir, op_ea_seg, fetchdat, op_ssegs, &op_pc, op_32, 0); \
codegen_check_seg_read(block, ir, target_seg); \
uop_MEM_LOAD_REG(ir, temp_reg, ireg_seg_base(target_seg), IREG_eaaddr); \
uop_MOV_DOUBLE_INT(ir, IREG_temp0_D, temp_reg); \
uop_FDIV(ir, IREG_ST(0), IREG_ST(0), IREG_temp0_D); \
uop_MOV_IMM(ir, IREG_tag(0), TAG_VALID); \
\
return op_pc + 1; \
} \
uint32_t ropFIDIVR##name(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), uint32_t fetchdat, uint32_t op_32, uint32_t op_pc) \
{ \
x86seg *target_seg; \
\
uop_FP_ENTER(ir); \
uop_MOV_IMM(ir, IREG_oldpc, cpu_state.oldpc); \
op_pc--; \
target_seg = codegen_generate_ea(ir, op_ea_seg, fetchdat, op_ssegs, &op_pc, op_32, 0); \
codegen_check_seg_read(block, ir, target_seg); \
uop_MEM_LOAD_REG(ir, temp_reg, ireg_seg_base(target_seg), IREG_eaaddr); \
uop_MOV_DOUBLE_INT(ir, IREG_temp0_D, temp_reg); \
uop_FDIV(ir, IREG_ST(0), IREG_temp0_D, IREG_ST(0)); \
uop_MOV_IMM(ir, IREG_tag(0), TAG_VALID); \
\
return op_pc + 1; \
} \
uint32_t ropFIMUL##name(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), uint32_t fetchdat, uint32_t op_32, uint32_t op_pc) \
{ \
x86seg *target_seg; \
\
uop_FP_ENTER(ir); \
uop_MOV_IMM(ir, IREG_oldpc, cpu_state.oldpc); \
op_pc--; \
target_seg = codegen_generate_ea(ir, op_ea_seg, fetchdat, op_ssegs, &op_pc, op_32, 0); \
codegen_check_seg_read(block, ir, target_seg); \
uop_MEM_LOAD_REG(ir, temp_reg, ireg_seg_base(target_seg), IREG_eaaddr); \
uop_MOV_DOUBLE_INT(ir, IREG_temp0_D, temp_reg); \
uop_FMUL(ir, IREG_ST(0), IREG_ST(0), IREG_temp0_D); \
uop_MOV_IMM(ir, IREG_tag(0), TAG_VALID); \
\
return op_pc + 1; \
} \
uint32_t ropFISUB##name(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), uint32_t fetchdat, uint32_t op_32, uint32_t op_pc) \
{ \
x86seg *target_seg; \
\
uop_FP_ENTER(ir); \
uop_MOV_IMM(ir, IREG_oldpc, cpu_state.oldpc); \
op_pc--; \
target_seg = codegen_generate_ea(ir, op_ea_seg, fetchdat, op_ssegs, &op_pc, op_32, 0); \
codegen_check_seg_read(block, ir, target_seg); \
uop_MEM_LOAD_REG(ir, temp_reg, ireg_seg_base(target_seg), IREG_eaaddr); \
uop_MOV_DOUBLE_INT(ir, IREG_temp0_D, temp_reg); \
uop_FSUB(ir, IREG_ST(0), IREG_ST(0), IREG_temp0_D); \
uop_MOV_IMM(ir, IREG_tag(0), TAG_VALID); \
\
return op_pc + 1; \
} \
uint32_t ropFISUBR##name(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), uint32_t fetchdat, uint32_t op_32, uint32_t op_pc) \
{ \
x86seg *target_seg; \
\
uop_FP_ENTER(ir); \
uop_MOV_IMM(ir, IREG_oldpc, cpu_state.oldpc); \
op_pc--; \
target_seg = codegen_generate_ea(ir, op_ea_seg, fetchdat, op_ssegs, &op_pc, op_32, 0); \
codegen_check_seg_read(block, ir, target_seg); \
uop_MEM_LOAD_REG(ir, temp_reg, ireg_seg_base(target_seg), IREG_eaaddr); \
uop_MOV_DOUBLE_INT(ir, IREG_temp0_D, temp_reg); \
uop_FSUB(ir, IREG_ST(0), IREG_temp0_D, IREG_ST(0)); \
uop_MOV_IMM(ir, IREG_tag(0), TAG_VALID); \
\
return op_pc + 1; \
#define ropFI_arith_mem(name, temp_reg) \
uint32_t ropFIADD##name(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), \
uint32_t fetchdat, uint32_t op_32, uint32_t op_pc) \
{ \
x86seg *target_seg; \
\
uop_FP_ENTER(ir); \
uop_MOV_IMM(ir, IREG_oldpc, cpu_state.oldpc); \
op_pc--; \
target_seg = codegen_generate_ea(ir, op_ea_seg, fetchdat, op_ssegs, &op_pc, op_32, 0); \
codegen_check_seg_read(block, ir, target_seg); \
uop_MEM_LOAD_REG(ir, temp_reg, ireg_seg_base(target_seg), IREG_eaaddr); \
uop_MOV_DOUBLE_INT(ir, IREG_temp0_D, temp_reg); \
uop_FADD(ir, IREG_ST(0), IREG_ST(0), IREG_temp0_D); \
uop_MOV_IMM(ir, IREG_tag(0), TAG_VALID); \
\
return op_pc + 1; \
} \
uint32_t ropFICOM##name(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), \
uint32_t fetchdat, uint32_t op_32, uint32_t op_pc) \
{ \
x86seg *target_seg; \
\
uop_FP_ENTER(ir); \
uop_MOV_IMM(ir, IREG_oldpc, cpu_state.oldpc); \
op_pc--; \
target_seg = codegen_generate_ea(ir, op_ea_seg, fetchdat, op_ssegs, &op_pc, op_32, 0); \
codegen_check_seg_read(block, ir, target_seg); \
uop_MEM_LOAD_REG(ir, temp_reg, ireg_seg_base(target_seg), IREG_eaaddr); \
uop_MOV_DOUBLE_INT(ir, IREG_temp0_D, temp_reg); \
uop_FCOM(ir, IREG_temp1_W, IREG_ST(0), IREG_temp0_D); \
uop_AND_IMM(ir, IREG_NPXS, IREG_NPXS, ~(FPU_SW_C0 | FPU_SW_C2 | FPU_SW_C3)); \
uop_OR(ir, IREG_NPXS, IREG_NPXS, IREG_temp1_W); \
\
return op_pc + 1; \
} \
uint32_t ropFICOMP##name(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), \
uint32_t fetchdat, uint32_t op_32, uint32_t op_pc) \
{ \
x86seg *target_seg; \
\
uop_FP_ENTER(ir); \
uop_MOV_IMM(ir, IREG_oldpc, cpu_state.oldpc); \
op_pc--; \
target_seg = codegen_generate_ea(ir, op_ea_seg, fetchdat, op_ssegs, &op_pc, op_32, 0); \
codegen_check_seg_read(block, ir, target_seg); \
uop_MEM_LOAD_REG(ir, temp_reg, ireg_seg_base(target_seg), IREG_eaaddr); \
uop_MOV_DOUBLE_INT(ir, IREG_temp0_D, temp_reg); \
uop_FCOM(ir, IREG_temp1_W, IREG_ST(0), IREG_temp0_D); \
uop_AND_IMM(ir, IREG_NPXS, IREG_NPXS, ~(FPU_SW_C0 | FPU_SW_C2 | FPU_SW_C3)); \
uop_OR(ir, IREG_NPXS, IREG_NPXS, IREG_temp1_W); \
fpu_POP(block, ir); \
\
return op_pc + 1; \
} \
uint32_t ropFIDIV##name(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), \
uint32_t fetchdat, uint32_t op_32, uint32_t op_pc) \
{ \
x86seg *target_seg; \
\
uop_FP_ENTER(ir); \
uop_MOV_IMM(ir, IREG_oldpc, cpu_state.oldpc); \
op_pc--; \
target_seg = codegen_generate_ea(ir, op_ea_seg, fetchdat, op_ssegs, &op_pc, op_32, 0); \
codegen_check_seg_read(block, ir, target_seg); \
uop_MEM_LOAD_REG(ir, temp_reg, ireg_seg_base(target_seg), IREG_eaaddr); \
uop_MOV_DOUBLE_INT(ir, IREG_temp0_D, temp_reg); \
uop_FDIV(ir, IREG_ST(0), IREG_ST(0), IREG_temp0_D); \
uop_MOV_IMM(ir, IREG_tag(0), TAG_VALID); \
\
return op_pc + 1; \
} \
uint32_t ropFIDIVR##name(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), \
uint32_t fetchdat, uint32_t op_32, uint32_t op_pc) \
{ \
x86seg *target_seg; \
\
uop_FP_ENTER(ir); \
uop_MOV_IMM(ir, IREG_oldpc, cpu_state.oldpc); \
op_pc--; \
target_seg = codegen_generate_ea(ir, op_ea_seg, fetchdat, op_ssegs, &op_pc, op_32, 0); \
codegen_check_seg_read(block, ir, target_seg); \
uop_MEM_LOAD_REG(ir, temp_reg, ireg_seg_base(target_seg), IREG_eaaddr); \
uop_MOV_DOUBLE_INT(ir, IREG_temp0_D, temp_reg); \
uop_FDIV(ir, IREG_ST(0), IREG_temp0_D, IREG_ST(0)); \
uop_MOV_IMM(ir, IREG_tag(0), TAG_VALID); \
\
return op_pc + 1; \
} \
uint32_t ropFIMUL##name(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), \
uint32_t fetchdat, uint32_t op_32, uint32_t op_pc) \
{ \
x86seg *target_seg; \
\
uop_FP_ENTER(ir); \
uop_MOV_IMM(ir, IREG_oldpc, cpu_state.oldpc); \
op_pc--; \
target_seg = codegen_generate_ea(ir, op_ea_seg, fetchdat, op_ssegs, &op_pc, op_32, 0); \
codegen_check_seg_read(block, ir, target_seg); \
uop_MEM_LOAD_REG(ir, temp_reg, ireg_seg_base(target_seg), IREG_eaaddr); \
uop_MOV_DOUBLE_INT(ir, IREG_temp0_D, temp_reg); \
uop_FMUL(ir, IREG_ST(0), IREG_ST(0), IREG_temp0_D); \
uop_MOV_IMM(ir, IREG_tag(0), TAG_VALID); \
\
return op_pc + 1; \
} \
uint32_t ropFISUB##name(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), \
uint32_t fetchdat, uint32_t op_32, uint32_t op_pc) \
{ \
x86seg *target_seg; \
\
uop_FP_ENTER(ir); \
uop_MOV_IMM(ir, IREG_oldpc, cpu_state.oldpc); \
op_pc--; \
target_seg = codegen_generate_ea(ir, op_ea_seg, fetchdat, op_ssegs, &op_pc, op_32, 0); \
codegen_check_seg_read(block, ir, target_seg); \
uop_MEM_LOAD_REG(ir, temp_reg, ireg_seg_base(target_seg), IREG_eaaddr); \
uop_MOV_DOUBLE_INT(ir, IREG_temp0_D, temp_reg); \
uop_FSUB(ir, IREG_ST(0), IREG_ST(0), IREG_temp0_D); \
uop_MOV_IMM(ir, IREG_tag(0), TAG_VALID); \
\
return op_pc + 1; \
} \
uint32_t ropFISUBR##name(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), \
uint32_t fetchdat, uint32_t op_32, uint32_t op_pc) \
{ \
x86seg *target_seg; \
\
uop_FP_ENTER(ir); \
uop_MOV_IMM(ir, IREG_oldpc, cpu_state.oldpc); \
op_pc--; \
target_seg = codegen_generate_ea(ir, op_ea_seg, fetchdat, op_ssegs, &op_pc, op_32, 0); \
codegen_check_seg_read(block, ir, target_seg); \
uop_MEM_LOAD_REG(ir, temp_reg, ireg_seg_base(target_seg), IREG_eaaddr); \
uop_MOV_DOUBLE_INT(ir, IREG_temp0_D, temp_reg); \
uop_FSUB(ir, IREG_ST(0), IREG_temp0_D, IREG_ST(0)); \
uop_MOV_IMM(ir, IREG_tag(0), TAG_VALID); \
\
return op_pc + 1; \
}
// clang-format off

View File

@@ -519,57 +519,61 @@ ropCWDE(UNUSED(codeblock_t *block), ir_data_t *ir, UNUSED(uint8_t opcode), UNUSE
return op_pc;
}
#define ropLxS(name, seg) \
uint32_t rop##name##_16(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), uint32_t fetchdat, uint32_t op_32, uint32_t op_pc) \
{ \
x86seg *target_seg = NULL; \
int dest_reg = (fetchdat >> 3) & 7; \
\
if ((fetchdat & 0xc0) == 0xc0) \
return 0; \
\
codegen_mark_code_present(block, cs + op_pc, 1); \
uop_MOV_IMM(ir, IREG_oldpc, cpu_state.oldpc); \
target_seg = codegen_generate_ea(ir, op_ea_seg, fetchdat, op_ssegs, &op_pc, op_32, 0); \
codegen_check_seg_read(block, ir, target_seg); \
uop_MEM_LOAD_REG(ir, IREG_temp0_W, ireg_seg_base(target_seg), IREG_eaaddr); \
uop_MEM_LOAD_REG_OFFSET(ir, IREG_temp1_W, ireg_seg_base(target_seg), IREG_eaaddr, 2); \
uop_LOAD_SEG(ir, seg, IREG_temp1_W); \
uop_MOV(ir, IREG_16(dest_reg), IREG_temp0_W); \
\
if (seg == &cpu_state.seg_ss) \
CPU_BLOCK_END(); \
\
return op_pc + 1; \
} \
uint32_t rop##name##_32(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), uint32_t fetchdat, uint32_t op_32, uint32_t op_pc) \
{ \
x86seg *target_seg = NULL; \
int dest_reg = (fetchdat >> 3) & 7; \
\
if ((fetchdat & 0xc0) == 0xc0) \
return 0; \
\
codegen_mark_code_present(block, cs + op_pc, 1); \
uop_MOV_IMM(ir, IREG_oldpc, cpu_state.oldpc); \
target_seg = codegen_generate_ea(ir, op_ea_seg, fetchdat, op_ssegs, &op_pc, op_32, 0); \
codegen_check_seg_read(block, ir, target_seg); \
uop_MEM_LOAD_REG(ir, IREG_temp0, ireg_seg_base(target_seg), IREG_eaaddr); \
uop_MEM_LOAD_REG_OFFSET(ir, IREG_temp1_W, ireg_seg_base(target_seg), IREG_eaaddr, 4); \
uop_LOAD_SEG(ir, seg, IREG_temp1_W); \
uop_MOV(ir, IREG_32(dest_reg), IREG_temp0); \
\
if (seg == &cpu_state.seg_ss) \
CPU_BLOCK_END(); \
\
return op_pc + 1; \
#define ropLxS(name, seg) \
uint32_t rop##name##_16(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), \
uint32_t fetchdat, uint32_t op_32, uint32_t op_pc) \
{ \
x86seg *target_seg = NULL; \
int dest_reg = (fetchdat >> 3) & 7; \
\
if ((fetchdat & 0xc0) == 0xc0) \
return 0; \
\
codegen_mark_code_present(block, cs + op_pc, 1); \
uop_MOV_IMM(ir, IREG_oldpc, cpu_state.oldpc); \
target_seg = codegen_generate_ea(ir, op_ea_seg, fetchdat, op_ssegs, &op_pc, op_32, 0); \
codegen_check_seg_read(block, ir, target_seg); \
uop_MEM_LOAD_REG(ir, IREG_temp0_W, ireg_seg_base(target_seg), IREG_eaaddr); \
uop_MEM_LOAD_REG_OFFSET(ir, IREG_temp1_W, ireg_seg_base(target_seg), IREG_eaaddr, 2); \
uop_LOAD_SEG(ir, seg, IREG_temp1_W); \
uop_MOV(ir, IREG_16(dest_reg), IREG_temp0_W); \
\
if (seg == &cpu_state.seg_ss) \
CPU_BLOCK_END(); \
\
return op_pc + 1; \
} \
uint32_t rop##name##_32(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), \
uint32_t fetchdat, uint32_t op_32, uint32_t op_pc) \
{ \
x86seg *target_seg = NULL; \
int dest_reg = (fetchdat >> 3) & 7; \
\
if ((fetchdat & 0xc0) == 0xc0) \
return 0; \
\
codegen_mark_code_present(block, cs + op_pc, 1); \
uop_MOV_IMM(ir, IREG_oldpc, cpu_state.oldpc); \
target_seg = codegen_generate_ea(ir, op_ea_seg, fetchdat, op_ssegs, &op_pc, op_32, 0); \
codegen_check_seg_read(block, ir, target_seg); \
uop_MEM_LOAD_REG(ir, IREG_temp0, ireg_seg_base(target_seg), IREG_eaaddr); \
uop_MEM_LOAD_REG_OFFSET(ir, IREG_temp1_W, ireg_seg_base(target_seg), IREG_eaaddr, 4); \
uop_LOAD_SEG(ir, seg, IREG_temp1_W); \
uop_MOV(ir, IREG_32(dest_reg), IREG_temp0); \
\
if (seg == &cpu_state.seg_ss) \
CPU_BLOCK_END(); \
\
return op_pc + 1; \
}
// clang-format off
ropLxS(LDS, &cpu_state.seg_ds)
ropLxS(LES, &cpu_state.seg_es)
ropLxS(LFS, &cpu_state.seg_fs)
ropLxS(LGS, &cpu_state.seg_gs)
ropLxS(LSS, &cpu_state.seg_ss)
// clang-format on
uint32_t
ropCLC(UNUSED(codeblock_t *block), ir_data_t *ir, UNUSED(uint8_t opcode), UNUSED(uint32_t fetchdat), UNUSED(uint32_t op_32), uint32_t op_pc)

View File

@@ -16,27 +16,28 @@
#include "codegen_ops_mmx_arith.h"
#include "codegen_ops_helpers.h"
#define ropParith(func) \
uint32_t rop##func(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), uint32_t fetchdat, uint32_t op_32, uint32_t op_pc) \
{ \
int dest_reg = (fetchdat >> 3) & 7; \
\
uop_MMX_ENTER(ir); \
codegen_mark_code_present(block, cs + op_pc, 1); \
if ((fetchdat & 0xc0) == 0xc0) { \
int src_reg = fetchdat & 7; \
uop_##func(ir, IREG_MM(dest_reg), IREG_MM(dest_reg), IREG_MM(src_reg)); \
} else { \
x86seg *target_seg; \
\
uop_MOV_IMM(ir, IREG_oldpc, cpu_state.oldpc); \
target_seg = codegen_generate_ea(ir, op_ea_seg, fetchdat, op_ssegs, &op_pc, op_32, 0); \
codegen_check_seg_read(block, ir, target_seg); \
uop_MEM_LOAD_REG(ir, IREG_temp0_Q, ireg_seg_base(target_seg), IREG_eaaddr); \
uop_##func(ir, IREG_MM(dest_reg), IREG_MM(dest_reg), IREG_temp0_Q); \
} \
\
return op_pc + 1; \
#define ropParith(func) \
uint32_t rop##func(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), \
uint32_t fetchdat, uint32_t op_32, uint32_t op_pc) \
{ \
int dest_reg = (fetchdat >> 3) & 7; \
\
uop_MMX_ENTER(ir); \
codegen_mark_code_present(block, cs + op_pc, 1); \
if ((fetchdat & 0xc0) == 0xc0) { \
int src_reg = fetchdat & 7; \
uop_##func(ir, IREG_MM(dest_reg), IREG_MM(dest_reg), IREG_MM(src_reg)); \
} else { \
x86seg *target_seg; \
\
uop_MOV_IMM(ir, IREG_oldpc, cpu_state.oldpc); \
target_seg = codegen_generate_ea(ir, op_ea_seg, fetchdat, op_ssegs, &op_pc, op_32, 0); \
codegen_check_seg_read(block, ir, target_seg); \
uop_MEM_LOAD_REG(ir, IREG_temp0_Q, ireg_seg_base(target_seg), IREG_eaaddr); \
uop_##func(ir, IREG_MM(dest_reg), IREG_MM(dest_reg), IREG_temp0_Q); \
} \
\
return op_pc + 1; \
}
// clang-format off

View File

@@ -16,27 +16,28 @@
#include "codegen_ops_mmx_cmp.h"
#include "codegen_ops_helpers.h"
#define ropPcmp(func) \
uint32_t rop##func(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), uint32_t fetchdat, uint32_t op_32, uint32_t op_pc) \
{ \
int dest_reg = (fetchdat >> 3) & 7; \
\
uop_MMX_ENTER(ir); \
codegen_mark_code_present(block, cs + op_pc, 1); \
if ((fetchdat & 0xc0) == 0xc0) { \
int src_reg = fetchdat & 7; \
uop_##func(ir, IREG_MM(dest_reg), IREG_MM(dest_reg), IREG_MM(src_reg)); \
} else { \
x86seg *target_seg; \
\
uop_MOV_IMM(ir, IREG_oldpc, cpu_state.oldpc); \
target_seg = codegen_generate_ea(ir, op_ea_seg, fetchdat, op_ssegs, &op_pc, op_32, 0); \
codegen_check_seg_read(block, ir, target_seg); \
uop_MEM_LOAD_REG(ir, IREG_temp0_Q, ireg_seg_base(target_seg), IREG_eaaddr); \
uop_##func(ir, IREG_MM(dest_reg), IREG_MM(dest_reg), IREG_temp0_Q); \
} \
\
return op_pc + 1; \
#define ropPcmp(func) \
uint32_t rop##func(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), \
uint32_t fetchdat, uint32_t op_32, uint32_t op_pc) \
{ \
int dest_reg = (fetchdat >> 3) & 7; \
\
uop_MMX_ENTER(ir); \
codegen_mark_code_present(block, cs + op_pc, 1); \
if ((fetchdat & 0xc0) == 0xc0) { \
int src_reg = fetchdat & 7; \
uop_##func(ir, IREG_MM(dest_reg), IREG_MM(dest_reg), IREG_MM(src_reg)); \
} else { \
x86seg *target_seg; \
\
uop_MOV_IMM(ir, IREG_oldpc, cpu_state.oldpc); \
target_seg = codegen_generate_ea(ir, op_ea_seg, fetchdat, op_ssegs, &op_pc, op_32, 0); \
codegen_check_seg_read(block, ir, target_seg); \
uop_MEM_LOAD_REG(ir, IREG_temp0_Q, ireg_seg_base(target_seg), IREG_eaaddr); \
uop_##func(ir, IREG_MM(dest_reg), IREG_MM(dest_reg), IREG_temp0_Q); \
} \
\
return op_pc + 1; \
}
// clang-format off

View File

@@ -16,27 +16,28 @@
#include "codegen_ops_mmx_pack.h"
#include "codegen_ops_helpers.h"
#define ropPpack(func) \
uint32_t rop##func(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), uint32_t fetchdat, uint32_t op_32, uint32_t op_pc) \
{ \
int dest_reg = (fetchdat >> 3) & 7; \
\
uop_MMX_ENTER(ir); \
codegen_mark_code_present(block, cs + op_pc, 1); \
if ((fetchdat & 0xc0) == 0xc0) { \
int src_reg = fetchdat & 7; \
uop_##func(ir, IREG_MM(dest_reg), IREG_MM(dest_reg), IREG_MM(src_reg)); \
} else { \
x86seg *target_seg; \
\
uop_MOV_IMM(ir, IREG_oldpc, cpu_state.oldpc); \
target_seg = codegen_generate_ea(ir, op_ea_seg, fetchdat, op_ssegs, &op_pc, op_32, 0); \
codegen_check_seg_read(block, ir, target_seg); \
uop_MEM_LOAD_REG(ir, IREG_temp0_Q, ireg_seg_base(target_seg), IREG_eaaddr); \
uop_##func(ir, IREG_MM(dest_reg), IREG_MM(dest_reg), IREG_temp0_Q); \
} \
\
return op_pc + 1; \
#define ropPpack(func) \
uint32_t rop##func(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), \
uint32_t fetchdat, uint32_t op_32, uint32_t op_pc) \
{ \
int dest_reg = (fetchdat >> 3) & 7; \
\
uop_MMX_ENTER(ir); \
codegen_mark_code_present(block, cs + op_pc, 1); \
if ((fetchdat & 0xc0) == 0xc0) { \
int src_reg = fetchdat & 7; \
uop_##func(ir, IREG_MM(dest_reg), IREG_MM(dest_reg), IREG_MM(src_reg)); \
} else { \
x86seg *target_seg; \
\
uop_MOV_IMM(ir, IREG_oldpc, cpu_state.oldpc); \
target_seg = codegen_generate_ea(ir, op_ea_seg, fetchdat, op_ssegs, &op_pc, op_32, 0); \
codegen_check_seg_read(block, ir, target_seg); \
uop_MEM_LOAD_REG(ir, IREG_temp0_Q, ireg_seg_base(target_seg), IREG_eaaddr); \
uop_##func(ir, IREG_MM(dest_reg), IREG_MM(dest_reg), IREG_temp0_Q); \
} \
\
return op_pc + 1; \
}
// clang-format off

View File

@@ -196,61 +196,65 @@ ropPOP_L(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), uint32_t fet
return op_pc + 1;
}
#define ROP_PUSH_SEG(seg) \
uint32_t ropPUSH_##seg##_16(UNUSED(codeblock_t *block), ir_data_t *ir, UNUSED(uint8_t opcode), UNUSED(uint32_t fetchdat), UNUSED(uint32_t op_32), uint32_t op_pc) \
{ \
int sp_reg; \
\
uop_MOV_IMM(ir, IREG_oldpc, cpu_state.oldpc); \
sp_reg = LOAD_SP_WITH_OFFSET(ir, -2); \
uop_MEM_STORE_REG(ir, IREG_SS_base, sp_reg, IREG_##seg##_seg_W); \
SUB_SP(ir, 2); \
\
return op_pc; \
} \
uint32_t ropPUSH_##seg##_32(UNUSED(codeblock_t *block), ir_data_t *ir, UNUSED(uint8_t opcode), UNUSED(uint32_t fetchdat), UNUSED(uint32_t op_32), uint32_t op_pc) \
{ \
int sp_reg; \
\
uop_MOV_IMM(ir, IREG_oldpc, cpu_state.oldpc); \
sp_reg = LOAD_SP_WITH_OFFSET(ir, -4); \
uop_MOVZX(ir, IREG_temp0, IREG_##seg##_seg_W); \
uop_MEM_STORE_REG(ir, IREG_SS_base, sp_reg, IREG_temp0); \
SUB_SP(ir, 4); \
\
return op_pc; \
#define ROP_PUSH_SEG(seg) \
uint32_t ropPUSH_##seg##_16(UNUSED(codeblock_t *block), ir_data_t *ir, UNUSED(uint8_t opcode), \
UNUSED(uint32_t fetchdat), UNUSED(uint32_t op_32), uint32_t op_pc) \
{ \
int sp_reg; \
\
uop_MOV_IMM(ir, IREG_oldpc, cpu_state.oldpc); \
sp_reg = LOAD_SP_WITH_OFFSET(ir, -2); \
uop_MEM_STORE_REG(ir, IREG_SS_base, sp_reg, IREG_##seg##_seg_W); \
SUB_SP(ir, 2); \
\
return op_pc; \
} \
uint32_t ropPUSH_##seg##_32(UNUSED(codeblock_t *block), ir_data_t *ir, UNUSED(uint8_t opcode), \
UNUSED(uint32_t fetchdat), UNUSED(uint32_t op_32), uint32_t op_pc) \
{ \
int sp_reg; \
\
uop_MOV_IMM(ir, IREG_oldpc, cpu_state.oldpc); \
sp_reg = LOAD_SP_WITH_OFFSET(ir, -4); \
uop_MOVZX(ir, IREG_temp0, IREG_##seg##_seg_W); \
uop_MEM_STORE_REG(ir, IREG_SS_base, sp_reg, IREG_temp0); \
SUB_SP(ir, 4); \
\
return op_pc; \
}
#define ROP_POP_SEG(seg, rseg) \
uint32_t ropPOP_##seg##_16(UNUSED(codeblock_t *block), ir_data_t *ir, UNUSED(uint8_t opcode), UNUSED(uint32_t fetchdat), UNUSED(uint32_t op_32), uint32_t op_pc) \
{ \
uop_MOV_IMM(ir, IREG_oldpc, cpu_state.oldpc); \
\
if (stack32) \
uop_MEM_LOAD_REG(ir, IREG_temp0_W, IREG_SS_base, IREG_ESP); \
else { \
uop_MOVZX(ir, IREG_eaaddr, IREG_SP); \
uop_MEM_LOAD_REG(ir, IREG_temp0_W, IREG_SS_base, IREG_eaaddr); \
} \
uop_LOAD_SEG(ir, &rseg, IREG_temp0_W); \
ADD_SP(ir, 2); \
\
return op_pc; \
} \
uint32_t ropPOP_##seg##_32(UNUSED(codeblock_t *block), ir_data_t *ir, UNUSED(uint8_t opcode), UNUSED(uint32_t fetchdat), UNUSED(uint32_t op_32), uint32_t op_pc) \
{ \
uop_MOV_IMM(ir, IREG_oldpc, cpu_state.oldpc); \
\
if (stack32) \
uop_MEM_LOAD_REG(ir, IREG_temp0_W, IREG_SS_base, IREG_ESP); \
else { \
uop_MOVZX(ir, IREG_eaaddr, IREG_SP); \
uop_MEM_LOAD_REG(ir, IREG_temp0_W, IREG_SS_base, IREG_eaaddr); \
} \
uop_LOAD_SEG(ir, &rseg, IREG_temp0_W); \
ADD_SP(ir, 4); \
\
return op_pc; \
#define ROP_POP_SEG(seg, rseg) \
uint32_t ropPOP_##seg##_16(UNUSED(codeblock_t *block), ir_data_t *ir, UNUSED(uint8_t opcode), \
UNUSED(uint32_t fetchdat), UNUSED(uint32_t op_32), uint32_t op_pc) \
{ \
uop_MOV_IMM(ir, IREG_oldpc, cpu_state.oldpc); \
\
if (stack32) \
uop_MEM_LOAD_REG(ir, IREG_temp0_W, IREG_SS_base, IREG_ESP); \
else { \
uop_MOVZX(ir, IREG_eaaddr, IREG_SP); \
uop_MEM_LOAD_REG(ir, IREG_temp0_W, IREG_SS_base, IREG_eaaddr); \
} \
uop_LOAD_SEG(ir, &rseg, IREG_temp0_W); \
ADD_SP(ir, 2); \
\
return op_pc; \
} \
uint32_t ropPOP_##seg##_32(UNUSED(codeblock_t *block), ir_data_t *ir, UNUSED(uint8_t opcode), \
UNUSED(uint32_t fetchdat), UNUSED(uint32_t op_32), uint32_t op_pc) \
{ \
uop_MOV_IMM(ir, IREG_oldpc, cpu_state.oldpc); \
\
if (stack32) \
uop_MEM_LOAD_REG(ir, IREG_temp0_W, IREG_SS_base, IREG_ESP); \
else { \
uop_MOVZX(ir, IREG_eaaddr, IREG_SP); \
uop_MEM_LOAD_REG(ir, IREG_temp0_W, IREG_SS_base, IREG_eaaddr); \
} \
uop_LOAD_SEG(ir, &rseg, IREG_temp0_W); \
ADD_SP(ir, 4); \
\
return op_pc; \
}
// clang-format off

View File

@@ -883,7 +883,7 @@ machine_get_config_string(char *str)
return NULL;
}
const device_t*
const device_t *
device_context_get_device(void)
{
return device_current.dev;

File diff suppressed because it is too large Load Diff

View File

@@ -631,23 +631,24 @@ static const device_config_t ev170_config[] = {
.name = "base",
.description = "Address",
.type = CONFIG_HEX16,
.default_string = "",
.default_string = NULL,
.default_int = 0x02C0,
.file_filter = "",
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "240H", .value = 0x0240 },
{ .description = "2C0H", .value = 0x02c0 },
{ .description = "" }
},
.bios = { { 0 } }
},
{
.name = "irq",
.description = "IRQ",
.type = CONFIG_SELECTION,
.default_string = "",
.default_string = NULL,
.default_int = -1,
.file_filter = "",
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "Disabled", .value = -1 },
@@ -656,6 +657,7 @@ static const device_config_t ev170_config[] = {
{ .description = "IRQ7", .value = 7 },
{ .description = "" }
},
.bios = { { 0 } }
},
{ .name = "", .description = "", .type = CONFIG_END }
// clang-format on
@@ -681,15 +683,16 @@ static const device_config_t pii147_config[] = {
.name = "base",
.description = "Address",
.type = CONFIG_HEX16,
.default_string = "",
.default_string = NULL,
.default_int = 0x0240,
.file_filter = "",
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "Clock 1", .value = 0x0240 },
{ .description = "Clock 2", .value = 0x0340 },
{ .description = "" }
},
.bios = { { 0 } }
},
{ .name = "", .description = "", .type = CONFIG_END }
// clang-format on
@@ -715,9 +718,9 @@ static const device_config_t p5pak_config[] = {
.name = "irq",
.description = "IRQ",
.type = CONFIG_SELECTION,
.default_string = "",
.default_string = NULL,
.default_int = -1,
.file_filter = "",
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "Disabled", -1 },
@@ -726,6 +729,7 @@ static const device_config_t p5pak_config[] = {
{ .description = "IRQ5", 5 },
{ .description = "" }
},
.bios = { { 0 } }
},
{ .name = "", .description = "", .type = CONFIG_END }
// clang-format on
@@ -751,9 +755,9 @@ static const device_config_t a6pak_config[] = {
.name = "irq",
.description = "IRQ",
.type = CONFIG_SELECTION,
.default_string = "",
.default_string = NULL,
.default_int = -1,
.file_filter = "",
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "Disabled", .value = -1 },
@@ -762,6 +766,7 @@ static const device_config_t a6pak_config[] = {
{ .description = "IRQ5", .value = 5 },
{ .description = "" }
},
.bios = { { 0 } }
},
{ .name = "", .description = "", .type = CONFIG_END }
// clang-format on
@@ -787,42 +792,44 @@ static const device_config_t mm58167_config[] = {
.name = "base",
.description = "Address",
.type = CONFIG_HEX16,
.default_string = "",
.default_string = NULL,
.default_int = 0x02C0,
.file_filter = "",
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ "240H", 0x0240 },
{ "2C0H", 0x02c0 },
{ "340H", 0x0340 },
{ "" }
{ .description = "240H", .value = 0x0240 },
{ .description = "2C0H", .value = 0x02c0 },
{ .description = "340H", .value = 0x0340 },
{ .description = "" }
},
.bios = { { 0 } }
},
{
.name = "irq",
.description = "IRQ",
.type = CONFIG_SELECTION,
.default_string = "",
.default_string = NULL,
.default_int = -1,
.file_filter = "",
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ "Disabled", -1 },
{ "IRQ2", 2 },
{ "IRQ5", 5 },
{ "IRQ7", 7 },
{ "" }
{ .description = "Disabled", .value = -1 },
{ .description = "IRQ2", .value = 2 },
{ .description = "IRQ5", .value = 5 },
{ .description = "IRQ7", .value = 7 },
{ .description = "" }
},
.bios = { { 0 } }
},
{
.name = "bios_addr",
.description = "BIOS Address",
.type = CONFIG_HEX20,
.default_string = "",
.default_int = 0xcc000,
.file_filter = "",
.spinner = { 0 },
.selection = {
.name = "bios_addr",
.description = "BIOS Address",
.type = CONFIG_HEX20,
.default_string = NULL,
.default_int = 0xcc000,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "Disabled", .value = -1 },
{ .description = "C800H", .value = 0xc8000 },
{ .description = "CA00H", .value = 0xca000 },
@@ -846,6 +853,7 @@ static const device_config_t mm58167_config[] = {
{ .description = "EE00H", .value = 0xee000 },
{ .description = "" }
},
.bios = { { 0 } }
},
{ .name = "", .description = "", .type = CONFIG_END }
// clang-format on

View File

@@ -2187,14 +2187,14 @@ keyboard_at_close(void *priv)
static const device_config_t keyboard_at_config[] = {
// clang-format off
{
.name = "type",
.description = "Type",
.type = CONFIG_SELECTION,
.default_string = "",
.default_int = 1,
.file_filter = "",
.spinner = { 0 },
.selection = {
.name = "type",
.description = "Type",
.type = CONFIG_SELECTION,
.default_string = NULL,
.default_int = 1,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "AT 84-key", .value = FLAG_AT | KBD_84_KEY },
{ .description = "AT 101/102/106-key", .value = FLAG_AT | KBD_101_KEY },
{ .description = "AT Korean", .value = FLAG_AT | KBD_KOREAN },
@@ -2203,7 +2203,8 @@ static const device_config_t keyboard_at_config[] = {
{ .description = "PS/2 106-key JIS", .value = FLAG_PS2 | KBD_JIS },
{ .description = "PS/2 Korean", .value = FLAG_PS2 | KBD_KOREAN },
{ .description = "" }
}
},
.bios = { { 0 } }
},
{
.name = "", .description = "", .type = CONFIG_END
@@ -2220,7 +2221,7 @@ const device_t keyboard_at_generic_device = {
.init = keyboard_at_init,
.close = keyboard_at_close,
.reset = NULL,
{ .poll = NULL },
.poll = NULL,
.speed_changed = NULL,
.force_redraw = NULL,
.config = keyboard_at_config

View File

@@ -686,66 +686,70 @@ bm_init(const device_t *info)
static const device_config_t lt_config[] = {
// clang-format off
{
.name = "base",
.description = "Address",
.type = CONFIG_HEX16,
.default_string = "",
.default_int = 0x23c,
.file_filter = "",
.spinner = { 0 },
.selection = {
.name = "base",
.description = "Address",
.type = CONFIG_HEX16,
.default_string = NULL,
.default_int = 0x23c,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "0x230", .value = 0x230 },
{ .description = "0x234", .value = 0x234 },
{ .description = "0x238", .value = 0x238 },
{ .description = "0x23C", .value = 0x23c },
{ .description = "" }
}
},
.bios = { { 0 } }
},
{
.name = "irq",
.description = "IRQ",
.type = CONFIG_SELECTION,
.default_string = "",
.default_int = 5,
.file_filter = "",
.spinner = { 0 },
.selection = {
.name = "irq",
.description = "IRQ",
.type = CONFIG_SELECTION,
.default_string = NULL,
.default_int = 5,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "IRQ 2", .value = 2 },
{ .description = "IRQ 3", .value = 3 },
{ .description = "IRQ 4", .value = 4 },
{ .description = "IRQ 5", .value = 5 },
{ .description = "" }
}
},
.bios = { { 0 } }
},
{
.name = "hz",
.description = "Hz",
.type = CONFIG_SELECTION,
.default_string = "",
.default_int = 45,
.file_filter = "",
.spinner = { 0 },
.selection = {
.name = "hz",
.description = "Hz",
.type = CONFIG_SELECTION,
.default_string = NULL,
.default_int = 45,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "Non-timed (original)", .value = 0 },
{ .description = "30 Hz (JMP2 = 1)", .value = 30 },
{ .description = "45 Hz (JMP2 not populated)", .value = 45 },
{ .description = "60 Hz (JMP2 = 2)", .value = 60 },
{ .description = "" }
}
},
.bios = { { 0 } }
},
{
.name = "buttons",
.description = "Buttons",
.type = CONFIG_SELECTION,
.default_string = "",
.default_int = 2,
.file_filter = "",
.spinner = { 0 },
.selection = {
.name = "buttons",
.description = "Buttons",
.type = CONFIG_SELECTION,
.default_string = NULL,
.default_int = 2,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "Two", .value = 2 },
{ .description = "Three", .value = 3 },
{ .description = "" }
}
},
.bios = { { 0 } }
},
{ .name = "", .description = "", .type = CONFIG_END }
// clang-format on
@@ -754,50 +758,53 @@ static const device_config_t lt_config[] = {
static const device_config_t ms_config[] = {
// clang-format off
{
.name = "base",
.description = "Address",
.type = CONFIG_HEX16,
.default_string = "",
.default_int = 0x23c,
.file_filter = "",
.spinner = { 0 },
.selection = {
.name = "base",
.description = "Address",
.type = CONFIG_HEX16,
.default_string = NULL,
.default_int = 0x23c,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "0x230", .value = 0x230 },
{ .description = "0x234", .value = 0x234 },
{ .description = "0x238", .value = 0x238 },
{ .description = "0x23C", .value = 0x23c },
{ .description = "" }
}
},
.bios = { { 0 } }
},
{
.name = "irq",
.description = "IRQ",
.type = CONFIG_SELECTION,
.default_string = "",
.default_int = 5,
.file_filter = "",
.spinner = { 0 },
.selection = {
.name = "irq",
.description = "IRQ",
.type = CONFIG_SELECTION,
.default_string = NULL,
.default_int = 5,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "IRQ 2", .value = 2 },
{ .description = "IRQ 3", .value = 3 },
{ .description = "IRQ 4", .value = 4 },
{ .description = "IRQ 5", .value = 5 },
{ .description = "" }
}
},
.bios = { { 0 } }
},
{
.name = "buttons",
.description = "Buttons",
.type = CONFIG_SELECTION,
.default_string = "",
.default_int = 2,
.file_filter = "",
.spinner = { 0 },
.selection = {
.name = "buttons",
.description = "Buttons",
.type = CONFIG_SELECTION,
.default_string = NULL,
.default_int = 2,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "Two", .value = 2 },
{ .description = "Three", .value = 3 },
{ .description = "" }
}
},
.bios = { { 0 } }
},
{ .name = "", .description = "", .type = CONFIG_END }
// clang-format on

View File

@@ -549,42 +549,49 @@ mtouch_close(void *priv)
static const device_config_t mtouch_config[] = {
// clang-format off
{
.name = "port",
.description = "Serial Port",
.type = CONFIG_SELECTION,
.default_string = "",
.default_int = 0,
.file_filter = "",
.spinner = { 0 },
.selection = {
.name = "port",
.description = "Serial Port",
.type = CONFIG_SELECTION,
.default_string = NULL,
.default_int = 0,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "COM1", .value = 0 },
{ .description = "COM2", .value = 1 },
{ .description = "COM3", .value = 2 },
{ .description = "COM4", .value = 3 },
{ .description = "" }
}
},
.bios = { { 0 } }
},
{
.name = "identity",
.description = "Controller",
.type = CONFIG_SELECTION,
.default_string = "",
.default_int = 0,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "A3 - SMT2 Serial / SMT3(R)V", .value = 0 },
{ .description = "A4 - SMT2 PCBus", .value = 1 },
{ .description = "P5 - TouchPen 4(+)", .value = 2 },
{ .description = "Q1 - SMT3(R) Serial", .value = 3 }
}
.name = "identity",
.description = "Controller",
.type = CONFIG_SELECTION,
.default_string = NULL,
.default_int = 0,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "A3 - SMT2 Serial / SMT3(R)V", .value = 0 },
{ .description = "A4 - SMT2 PCBus", .value = 1 },
{ .description = "P5 - TouchPen 4(+)", .value = 2 },
{ .description = "Q1 - SMT3(R) Serial", .value = 3 },
{ .description = "" }
},
.bios = { { 0 } }
},
{
.name = "crosshair",
.description = "Show Crosshair",
.type = CONFIG_BINARY,
.default_string = "",
.default_int = 1
.name = "crosshair",
.description = "Show Crosshair",
.type = CONFIG_BINARY,
.default_string = NULL,
.default_int = 1,
.file_filter = NULL,
.spinner = { 0 },
.selection = { { 0 } },
.bios = { { 0 } }
},
{ .name = "", .description = "", .type = CONFIG_END }
// clang-format on

View File

@@ -367,20 +367,21 @@ ps2_close(void *priv)
static const device_config_t ps2_config[] = {
// clang-format off
{
.name = "buttons",
.description = "Buttons",
.type = CONFIG_SELECTION,
.default_string = "",
.default_int = 2,
.file_filter = "",
.spinner = { 0 },
.selection = {
.name = "buttons",
.description = "Buttons",
.type = CONFIG_SELECTION,
.default_string = NULL,
.default_int = 2,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "Two", .value = 2 },
{ .description = "Three", .value = 3 },
{ .description = "Wheel", .value = 4 },
{ .description = "Five + Wheel", .value = 5 },
{ .description = "" }
}
},
.bios = { { 0 } }
},
{
.name = "", .description = "", .type = CONFIG_END

View File

@@ -916,41 +916,47 @@ sermouse_init(const device_t *info)
static const device_config_t msssermouse_config[] = {
// clang-format off
{
.name = "port",
.description = "Serial Port",
.type = CONFIG_SELECTION,
.default_string = "",
.default_int = 0,
.file_filter = "",
.spinner = { 0 },
.selection = {
.name = "port",
.description = "Serial Port",
.type = CONFIG_SELECTION,
.default_string = NULL,
.default_int = 0,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "COM1", .value = 0 },
{ .description = "COM2", .value = 1 },
{ .description = "COM3", .value = 2 },
{ .description = "COM4", .value = 3 },
{ .description = "" }
}
},
.bios = { { 0 } }
},
{
.name = "buttons",
.description = "Buttons",
.type = CONFIG_SELECTION,
.default_string = "",
.default_int = 2,
.file_filter = "",
.spinner = { 0 },
.selection = {
.name = "buttons",
.description = "Buttons",
.type = CONFIG_SELECTION,
.default_string = NULL,
.default_int = 2,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "Two", .value = 2 },
{ .description = "Three", .value = 3 },
{ .description = "" }
}
},
.bios = { { 0 } }
},
{
.name = "rts_toggle",
.description = "RTS toggle",
.type = CONFIG_BINARY,
.default_string = "",
.default_int = 0
.name = "rts_toggle",
.description = "RTS toggle",
.type = CONFIG_BINARY,
.default_string = NULL,
.default_int = 0,
.file_filter = NULL,
.spinner = { 0 },
.selection = { { 0 } },
.bios = { { 0 } }
},
{ .name = "", .description = "", .type = CONFIG_END }
// clang-format on
@@ -959,35 +965,37 @@ static const device_config_t msssermouse_config[] = {
static const device_config_t mssermouse_config[] = {
// clang-format off
{
.name = "port",
.description = "Serial Port",
.type = CONFIG_SELECTION,
.default_string = "",
.default_int = 0,
.file_filter = "",
.spinner = { 0 },
.selection = {
.name = "port",
.description = "Serial Port",
.type = CONFIG_SELECTION,
.default_string = NULL,
.default_int = 0,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "COM1", .value = 0 },
{ .description = "COM2", .value = 1 },
{ .description = "COM3", .value = 2 },
{ .description = "COM4", .value = 3 },
{ .description = "" }
}
},
.bios = { { 0 } }
},
{
.name = "buttons",
.description = "Buttons",
.type = CONFIG_SELECTION,
.default_string = "",
.default_int = 2,
.file_filter = "",
.spinner = { 0 },
.selection = {
.name = "buttons",
.description = "Buttons",
.type = CONFIG_SELECTION,
.default_string = NULL,
.default_int = 2,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "Two", .value = 2 },
{ .description = "Three", .value = 3 },
{ .description = "Wheel", .value = 4 },
{ .description = "" }
}
},
.bios = { { 0 } }
},
{ .name = "", .description = "", .type = CONFIG_END }
// clang-format on
@@ -996,57 +1004,64 @@ static const device_config_t mssermouse_config[] = {
static const device_config_t ltsermouse_config[] = {
// clang-format off
{
.name = "port",
.description = "Serial Port",
.type = CONFIG_SELECTION,
.default_string = "",
.default_int = 0,
.file_filter = "",
.spinner = { 0 },
.selection = {
.name = "port",
.description = "Serial Port",
.type = CONFIG_SELECTION,
.default_string = NULL,
.default_int = 0,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "COM1", .value = 0 },
{ .description = "COM2", .value = 1 },
{ .description = "COM3", .value = 2 },
{ .description = "COM4", .value = 3 },
{ .description = "" }
}
},
.bios = { { 0 } }
},
{
.name = "buttons",
.description = "Buttons",
.type = CONFIG_SELECTION,
.default_string = "",
.default_int = 2,
.file_filter = "",
.spinner = { 0 },
.selection = {
.name = "buttons",
.description = "Buttons",
.type = CONFIG_SELECTION,
.default_string = NULL,
.default_int = 2,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "Two", .value = 2 },
{ .description = "Three", .value = 3 },
{ .description = "" }
}
},
.bios = { { 0 } }
},
{
.name = "revision",
.description = "Revision",
.type = CONFIG_SELECTION,
.default_string = "",
.default_int = 3,
.file_filter = "",
.spinner = { 0 },
.selection = {
.name = "revision",
.description = "Revision",
.type = CONFIG_SELECTION,
.default_string = NULL,
.default_int = 3,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "LOGIMOUSE R7 1.0", .value = 1 },
{ .description = "LOGIMOUSE R7 2.0", .value = 2 },
{ .description = "LOGIMOUSE C7 3.0", .value = 3 },
{ .description = "Logitech MouseMan", .value = 4 },
{ .description = "" }
}
},
.bios = { { 0 } }
},
{
.name = "rts_toggle",
.description = "RTS toggle",
.type = CONFIG_BINARY,
.default_string = "",
.default_int = 0
.name = "rts_toggle",
.description = "RTS toggle",
.type = CONFIG_BINARY,
.default_string = NULL,
.default_int = 0,
.file_filter = NULL,
.spinner = { 0 },
.selection = { { 0 } },
.bios = { { 0 } }
},
{ .name = "", .description = "", .type = CONFIG_END }
// clang-format on

View File

@@ -693,20 +693,21 @@ wacom_close(void *priv)
static const device_config_t wacom_config[] = {
// clang-format off
{
.name = "port",
.description = "Serial Port",
.type = CONFIG_SELECTION,
.name = "port",
.description = "Serial Port",
.type = CONFIG_SELECTION,
.default_string = "",
.default_int = 0,
.file_filter = "",
.spinner = { 0 },
.selection = {
.default_int = 0,
.file_filter = "",
.spinner = { 0 },
.selection = {
{ .description = "COM1", .value = 0 },
{ .description = "COM2", .value = 1 },
{ .description = "COM3", .value = 2 },
{ .description = "COM4", .value = 3 },
{ .description = "" }
}
},
.bios = { { 0 } }
},
{ .name = "", .description = "", .type = CONFIG_END }
// clang-format on

View File

@@ -27,8 +27,7 @@
#include <86box/plat.h>
#include <86box/novell_cardkey.h>
typedef struct novell_cardkey_t
{
typedef struct novell_cardkey_t {
char serial_number_str[13];
} novell_cardkey_t;
@@ -95,14 +94,15 @@ void novell_cardkey_close(void* priv)
static const device_config_t keycard_config[] = {
// clang-format off
{
.name = "serial_number",
.description = "Serial Number",
.type = CONFIG_STRING,
.name = "serial_number",
.description = "Serial Number",
.type = CONFIG_STRING,
.default_string = "",
.default_int = 0,
.file_filter = "",
.spinner = { 0 },
.selection = { { 0 } }
.default_int = 0,
.file_filter = NULL,
.spinner = { 0 },
.selection = { { 0 } },
.bios = { { 0 } }
},
{ .name = "", .description = "", .type = CONFIG_END }
// clang-format on

View File

@@ -231,138 +231,129 @@ const char *serpt_mode_names[SERPT_MODES_MAX] = {
// clang-format off
static const device_config_t serial_passthrough_config[] = {
{
.name = "mode",
.description = "Passthrough Mode",
.type = CONFIG_SELECTION,
.default_string = "",
.default_int = 0,
.file_filter = "",
.spinner = { 0 },
.selection = {
.name = "mode",
.description = "Passthrough Mode",
.type = CONFIG_SELECTION,
.default_string = NULL,
.default_int = 0,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
#ifdef _WIN32
{
.description = "Named Pipe (Server)",
.value = SERPT_MODE_VCON
},
{ .description = "Named Pipe (Server)", .value = SERPT_MODE_VCON },
#if 0 /* TODO */
{
.description = "Named Pipe (Client)",
.value = SERPT_MODE_VCON
},
#endif
#else
{
.description = "Pseudo Terminal/Virtual Console",
.value = SERPT_MODE_VCON
},
{ .description = "Named Pipe (Client)", .value = SERPT_MODE_VCON },
#endif
#else /* _WIN32 */
{ .description = "Pseudo Terminal/Virtual Console", .value = SERPT_MODE_VCON },
#endif /* _WIN32 */
#if 0 /* TODO */
{
.description = "TCP Server",
.value = SERPT_MODE_TCPSRV
},
{
.description = "TCP Client",
.value = SERPT_MODE_TCPCLNT
},
{ .description = "TCP Server", .value = SERPT_MODE_TCPSRV },
{ .description = "TCP Client", .value = SERPT_MODE_TCPCLNT },
#endif
{
.description = "Host Serial Passthrough",
.value = SERPT_MODE_HOSTSER
},
{
.description = ""
}
}
{ .description = "Host Serial Passthrough", .value = SERPT_MODE_HOSTSER },
{ .description = "" }
},
.bios = { { 0 } }
},
{
.name = "host_serial_path",
.description = "Host Serial Device",
.type = CONFIG_SERPORT,
.default_string = "",
.file_filter = NULL,
.spinner = { 0 },
.selection = { { 0 } }
.name = "host_serial_path",
.description = "Host Serial Device",
.type = CONFIG_SERPORT,
.default_string = NULL,
.default_int = 0,
.file_filter = NULL,
.spinner = { 0 },
.selection = { { 0 } },
.bios = { { 0 } }
},
#ifdef _WIN32
{
.name = "named_pipe",
.description = "Name of pipe",
.type = CONFIG_STRING,
.name = "named_pipe",
.description = "Name of pipe",
.type = CONFIG_STRING,
.default_string = "\\\\.\\pipe\\86Box\\test",
.file_filter = NULL,
.spinner = { 0 },
.selection = { { 0 } }
.default_int = 0,
.file_filter = NULL,
.spinner = { 0 },
.selection = { { 0 } },
.bios = { { 0 } }
},
#endif
#endif /* _WIN32 */
{
.name = "data_bits",
.description = "Data bits",
.type = CONFIG_SELECTION,
.default_string = "8",
.default_int = 8,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
.name = "data_bits",
.description = "Data bits",
.type = CONFIG_SELECTION,
.default_string = NULL,
.default_int = 8,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
#if 0 /* Mentioned by WFW 3.1x, not supported, atleast on Linux */
{ .description = "4", .value = 4 },
#endif
{ .description = "5", .value = 5 },
{ .description = "6", .value = 6 },
{ .description = "7", .value = 7 },
{ .description = "8", .value = 8 }
}
{ .description = "8", .value = 8 },
{ .description = "" }
},
.bios = { { 0 } }
},
{
.name = "stop_bits",
.description = "Stop bits",
.type = CONFIG_SELECTION,
.default_string = "1",
.default_int = 1,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
.name = "stop_bits",
.description = "Stop bits",
.type = CONFIG_SELECTION,
.default_string = NULL,
.default_int = 1,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "1", .value = 1 },
#if 0
{ .description = "1.5", .value = 1.5 },
#endif
{ .description = "2", .value = 2 }
}
{ .description = "2", .value = 2 },
{ .description = "" }
},
.bios = { { 0 } }
},
{
.name = "baudrate",
.description = "Baud Rate of Passthrough",
.type = CONFIG_SELECTION,
.default_string = "",
.default_int = 115200,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
.name = "baudrate",
.description = "Baud Rate of Passthrough",
.type = CONFIG_SELECTION,
.default_string = NULL,
.default_int = 115200,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
#if 0
{ .description = "256000", .value = 256000 },
{ .description = "128000", .value = 128000 },
{ .description = "256000", .value = 256000 },
{ .description = "128000", .value = 128000 },
#endif
{ .description = "115200", .value = 115200 },
{ .description = "57600", .value = 57600 },
{ .description = "56000", .value = 56000 },
{ .description = "38400", .value = 38400 },
{ .description = "19200", .value = 19200 },
{ .description = "14400", .value = 14400 },
{ .description = "9600", .value = 9600 },
{ .description = "7200", .value = 7200 },
{ .description = "4800", .value = 4800 },
{ .description = "2400", .value = 2400 },
{ .description = "1800", .value = 1800 },
{ .description = "1200", .value = 1200 },
{ .description = "600", .value = 600 },
{ .description = "300", .value = 300 },
{ .description = "150", .value = 150 },
{ .description = "115200", .value = 115200 },
{ .description = "57600", .value = 57600 },
{ .description = "56000", .value = 56000 },
{ .description = "38400", .value = 38400 },
{ .description = "19200", .value = 19200 },
{ .description = "14400", .value = 14400 },
{ .description = "9600", .value = 9600 },
{ .description = "7200", .value = 7200 },
{ .description = "4800", .value = 4800 },
{ .description = "2400", .value = 2400 },
{ .description = "1800", .value = 1800 },
{ .description = "1200", .value = 1200 },
{ .description = "600", .value = 600 },
{ .description = "300", .value = 300 },
{ .description = "150", .value = 150 },
#if 0
{ .description = "134.5", .value = 134.5 },
#endif
{ .description = "110", .value = 110 },
{ .description = "75", .value = 75 }
}
{ .description = "110", .value = 110 },
{ .description = "75", .value = 75 },
{ .description = "" }
},
.bios = { { 0 } }
},
{ .name = "", .description = "", .type = CONFIG_END }
};

View File

@@ -114,19 +114,6 @@ static struct unittester_state unittester_defaults = {
.cmd_id = UT_CMD_NOOP,
};
static const device_config_t unittester_config[] = {
// clang-format off
{
.name = "exit_enabled",
.description = "Enable 0x04 \"Exit 86Box\" command",
.type = CONFIG_BINARY,
.default_int = 1,
.default_string = ""
},
{ .name = "", .description = "", .type = CONFIG_END }
// clang-format on
};
/* Kept separate, as we will be reusing this object */
static bitmap_t *unittester_screen_buffer = NULL;
@@ -624,6 +611,23 @@ unittester_close(UNUSED(void *priv))
unittester_log("[UT] 86Box Unit Tester closed\n");
}
static const device_config_t unittester_config[] = {
// clang-format off
{
.name = "exit_enabled",
.description = "Enable 0x04 \"Exit 86Box\" command",
.type = CONFIG_BINARY,
.default_int = 1,
.default_string = NULL,
.file_filter = NULL,
.spinner = { 0 },
.selection = { { 0 } },
.bios = { { 0 } }
},
{ .name = "", .description = "", .type = CONFIG_END }
// clang-format on
};
const device_t unittester_device = {
.name = "86Box Unit Tester",
.internal_name = "unittester",

View File

@@ -3359,18 +3359,17 @@ const device_t mcide_device = {
.config = NULL
};
// clang-format off
static const device_config_t ide_ter_config[] = {
{
.name = "irq",
.description = "IRQ",
.type = CONFIG_SELECTION,
.default_string = "",
.default_int = HDC_TERTIARY_IRQ,
.file_filter = "",
.spinner = { 0 },
.selection = {
.name = "irq",
.description = "IRQ",
.type = CONFIG_SELECTION,
.default_string = NULL,
.default_int = HDC_TERTIARY_IRQ,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "Plug and Play", .value = -1 },
{ .description = "IRQ 2", .value = 2 },
{ .description = "IRQ 3", .value = 3 },
@@ -3382,21 +3381,22 @@ static const device_config_t ide_ter_config[] = {
{ .description = "IRQ 11", .value = 11 },
{ .description = "IRQ 12", .value = 12 },
{ .description = "" }
}
},
.bios = { { 0 } }
},
{ .name = "", .description = "", .type = CONFIG_END }
};
static const device_config_t ide_qua_config[] = {
{
.name = "irq",
.description = "IRQ",
.type = CONFIG_SELECTION,
.default_string = "",
.default_int = HDC_QUATERNARY_IRQ,
.file_filter = "",
.spinner = { 0 },
.selection = {
.name = "irq",
.description = "IRQ",
.type = CONFIG_SELECTION,
.default_string = NULL,
.default_int = HDC_QUATERNARY_IRQ,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "Plug and Play", .value = -1 },
{ .description = "IRQ 2", .value = 2 },
{ .description = "IRQ 3", .value = 3 },
@@ -3408,7 +3408,8 @@ static const device_config_t ide_qua_config[] = {
{ .description = "IRQ 11", .value = 11 },
{ .description = "IRQ 12", .value = 12 },
{ .description = "" }
}
},
.bios = { { 0 } }
},
{ .name = "", .description = "", .type = CONFIG_END }
};

View File

@@ -1914,335 +1914,356 @@ victor_v86p_available(void)
// clang-format off
static const device_config_t dtc_config[] = {
{
.name = "bios_addr",
.description = "BIOS Address",
.type = CONFIG_HEX20,
.default_string = "",
.default_int = 0xc8000,
.file_filter = "",
.spinner = { 0 },
.selection = {
.name = "bios_addr",
.description = "BIOS Address",
.type = CONFIG_HEX20,
.default_string = NULL,
.default_int = 0xc8000,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "Disabled", .value = 0x00000 },
{ .description = "C800H", .value = 0xc8000 },
{ .description = "CA00H", .value = 0xca000 },
{ .description = "D800H", .value = 0xd8000 },
{ .description = "F400H", .value = 0xf4000 },
{ .description = "" }
}
},
.bios = { { 0 } }
},
{ .name = "", .description = "", .type = CONFIG_END }
};
static const device_config_t st11_config[] = {
{
.name = "base",
.description = "Address",
.type = CONFIG_HEX16,
.default_string = "",
.default_int = 0x0320,
.file_filter = "",
.spinner = { 0 },
.selection = {
.name = "base",
.description = "Address",
.type = CONFIG_HEX16,
.default_string = NULL,
.default_int = 0x0320,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "320H", .value = 0x0320 },
{ .description = "324H", .value = 0x0324 },
{ .description = "328H", .value = 0x0328 },
{ .description = "32CH", .value = 0x032c },
{ .description = "" }
}
},
.bios = { { 0 } }
},
{
.name = "irq",
.description = "IRQ",
.type = CONFIG_SELECTION,
.default_string = "",
.default_int = 5,
.file_filter = "",
.spinner = { 0 },
.selection = {
.name = "irq",
.description = "IRQ",
.type = CONFIG_SELECTION,
.default_string = NULL,
.default_int = 5,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "IRQ 2", .value = 2 },
{ .description = "IRQ 5", .value = 5 },
{ .description = "" }
}
},
.bios = { { 0 } }
},
{
.name = "bios_addr",
.description = "BIOS Address",
.type = CONFIG_HEX20,
.default_string = "",
.default_int = 0xc8000,
.file_filter = "",
.spinner = { 0 },
.selection = {
.name = "bios_addr",
.description = "BIOS Address",
.type = CONFIG_HEX20,
.default_string = NULL,
.default_int = 0xc8000,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "Disabled", .value = 0x00000 },
{ .description = "C800H", .value = 0xc8000 },
{ .description = "D000H", .value = 0xd0000 },
{ .description = "D800H", .value = 0xd8000 },
{ .description = "E000H", .value = 0xe0000 },
{ .description = "" }
}
},
.bios = { { 0 } }
},
{
.name = "revision",
.description = "BIOS Revision",
.type = CONFIG_SELECTION,
.default_string = "",
.default_int = 19,
.file_filter = "",
.spinner = { 0 },
.selection = {
.name = "revision",
.description = "BIOS Revision",
.type = CONFIG_SELECTION,
.default_string = NULL,
.default_int = 19,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "v1.7", .value = 5 },
{ .description = "v2.0", .value = 19 },
{ .description = "" }
}
},
.bios = { { 0 } }
},
{ .name = "", .description = "", .type = CONFIG_END }
};
static const device_config_t wd_config[] = {
{
.name = "bios_addr",
.description = "BIOS Address",
.type = CONFIG_HEX20,
.default_string = "",
.default_int = 0xc8000,
.file_filter = "",
.spinner = { 0 },
.selection = {
.name = "bios_addr",
.description = "BIOS Address",
.type = CONFIG_HEX20,
.default_string = NULL,
.default_int = 0xc8000,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "Disabled", .value = 0x00000 },
{ .description = "C800H", .value = 0xc8000 },
{ .description = "" }
}
},
.bios = { { 0 } }
},
{
.name = "base",
.description = "Address",
.type = CONFIG_HEX16,
.default_string = "",
.default_int = 0x0320,
.file_filter = "",
.spinner = { 0 },
.selection = {
.name = "base",
.description = "Address",
.type = CONFIG_HEX16,
.default_string = NULL,
.default_int = 0x0320,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "320H", .value = 0x0320 },
{ .description = "324H", .value = 0x0324 },
{ .description = "" }
}
},
.bios = { { 0 } }
},
{
.name = "irq",
.description = "IRQ",
.type = CONFIG_SELECTION,
.default_string = "",
.default_int = 5,
.file_filter = "",
.spinner = { 0 },
.selection = {
.name = "irq",
.description = "IRQ",
.type = CONFIG_SELECTION,
.default_string = NULL,
.default_int = 5,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "IRQ 2", .value = 2 },
{ .description = "IRQ 5", .value = 5 },
{ .description = "" }
}
},
.bios = { { 0 } }
},
{ .name = "", .description = "", .type = CONFIG_END }
};
static const device_config_t wd_nobios_config[] = {
{
.name = "base",
.description = "Address",
.type = CONFIG_HEX16,
.default_string = "",
.default_int = 0x0320,
.file_filter = "",
.spinner = { 0 },
.selection = {
.name = "base",
.description = "Address",
.type = CONFIG_HEX16,
.default_string = NULL,
.default_int = 0x0320,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "320H", .value = 0x0320 },
{ .description = "324H", .value = 0x0324 },
{ .description = "" }
}
},
.bios = { { 0 } }
},
{
.name = "irq",
.description = "IRQ",
.type = CONFIG_SELECTION,
.default_string = "",
.default_int = 5,
.file_filter = "",
.spinner = { 0 },
.selection = {
.name = "irq",
.description = "IRQ",
.type = CONFIG_SELECTION,
.default_string = NULL,
.default_int = 5,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "IRQ 2", .value = 2 },
{ .description = "IRQ 5", .value = 5 },
{ .description = "" }
}
},
.bios = { { 0 } }
},
{ .name = "", .description = "", .type = CONFIG_END }
};
static const device_config_t wd_rll_config[] = {
{
.name = "bios_addr",
.description = "BIOS Address",
.type = CONFIG_HEX20,
.default_string = "",
.default_int = 0xc8000,
.file_filter = "",
.spinner = { 0 },
.selection = {
.name = "bios_addr",
.description = "BIOS Address",
.type = CONFIG_HEX20,
.default_string = NULL,
.default_int = 0xc8000,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "Disabled", .value = 0x00000 },
{ .description = "C800H", .value = 0xc8000 },
{ .description = "" }
}
},
.bios = { { 0 } }
},
{
.name = "base",
.description = "Address",
.type = CONFIG_HEX16,
.default_string = "",
.default_int = 0x0320,
.file_filter = "",
.spinner = { 0 },
.selection = {
.name = "base",
.description = "Address",
.type = CONFIG_HEX16,
.default_string = NULL,
.default_int = 0x0320,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "320H", .value = 0x0320 },
{ .description = "324H", .value = 0x0324 },
{ .description = "" }
}
},
.bios = { { 0 } }
},
{
.name = "irq",
.description = "IRQ",
.type = CONFIG_SELECTION,
.default_string = "",
.default_int = 5,
.file_filter = "",
.spinner = { 0 },
.selection = {
.name = "irq",
.description = "IRQ",
.type = CONFIG_SELECTION,
.default_string = NULL,
.default_int = 5,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "IRQ 2", .value = 2 },
{ .description = "IRQ 5", .value = 5 },
{ .description = "" }
}
},
.bios = { { 0 } }
},
{
.name = "translate",
.description = "Translate 26 -> 17",
.type = CONFIG_SELECTION,
.default_string = "",
.default_int = 0,
.file_filter = "",
.spinner = { 0 },
.selection = {
.name = "translate",
.description = "Translate 26 -> 17",
.type = CONFIG_SELECTION,
.default_string = NULL,
.default_int = 0,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "Off", .value = 0 },
{ .description = "On", .value = 1 },
{ .description = "" }
}
},
.bios = { { 0 } }
},
{ .name = "", .description = "", .type = CONFIG_END }
};
static const device_config_t wd1004a_config[] = {
{
.name = "bios_addr",
.description = "BIOS Address",
.type = CONFIG_HEX20,
.default_string = "",
.default_int = 0xc8000,
.file_filter = "",
.spinner = { 0 },
.selection = {
.name = "bios_addr",
.description = "BIOS Address",
.type = CONFIG_HEX20,
.default_string = NULL,
.default_int = 0xc8000,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "Disabled", .value = 0x00000 },
{ .description = "C800H", .value = 0xc8000 },
{ .description = "" }
}
},
.bios = { { 0 } }
},
{
.name = "base",
.description = "Address",
.type = CONFIG_HEX16,
.default_string = "",
.default_int = 0x0320,
.file_filter = "",
.spinner = { 0 },
.selection = {
.name = "base",
.description = "Address",
.type = CONFIG_HEX16,
.default_string = NULL,
.default_int = 0x0320,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "320H", .value = 0x0320 },
{ .description = "324H", .value = 0x0324 },
{ .description = "" }
}
},
.bios = { { 0 } }
},
{
.name = "irq",
.description = "IRQ",
.type = CONFIG_SELECTION,
.default_string = "",
.default_int = 5,
.file_filter = "",
.spinner = { 0 },
.selection = {
.name = "irq",
.description = "IRQ",
.type = CONFIG_SELECTION,
.default_string = NULL,
.default_int = 5,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "IRQ 2", .value = 2 },
{ .description = "IRQ 5", .value = 5 },
{ .description = "" }
}
},
.bios = { { 0 } }
},
{ .name = "", .description = "", .type = CONFIG_END }
};
static const device_config_t wd1004_rll_config[] = {
{
.name = "bios_addr",
.description = "BIOS Address",
.type = CONFIG_HEX20,
.default_string = "",
.default_int = 0xc8000,
.file_filter = "",
.spinner = { 0 },
.selection = {
.name = "bios_addr",
.description = "BIOS Address",
.type = CONFIG_HEX20,
.default_string = NULL,
.default_int = 0xc8000,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "Disabled", .value = 0x00000 },
{ .description = "C800H", .value = 0xc8000 },
{ .description = "CA00H", .value = 0xca000 },
{ .description = "CC00H", .value = 0xcc000 },
{ .description = "CE00H", .value = 0xce000 },
{ .description = "" }
}
},
.bios = { { 0 } }
},
{
.name = "base",
.description = "Address",
.type = CONFIG_HEX16,
.default_string = "",
.default_int = 0x0320,
.file_filter = "",
.spinner = { 0 },
.selection = {
.name = "base",
.description = "Address",
.type = CONFIG_HEX16,
.default_string = NULL,
.default_int = 0x0320,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "320H", .value = 0x0320 },
{ .description = "324H", .value = 0x0324 },
{ .description = "328H", .value = 0x0328 },
{ .description = "32CH", .value = 0x032c },
{ .description = "" }
}
},
.bios = { { 0 } }
},
{
.name = "irq",
.description = "IRQ",
.type = CONFIG_SELECTION,
.default_string = "",
.default_int = 5,
.file_filter = "",
.spinner = { 0 },
.selection = {
.name = "irq",
.description = "IRQ",
.type = CONFIG_SELECTION,
.default_string = NULL,
.default_int = 5,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "IRQ 2", .value = 2 },
{ .description = "IRQ 5", .value = 5 },
{ .description = "" }
}
},
.bios = { { 0 } }
},
{
.name = "translate",
.description = "Translate 26 -> 17",
.type = CONFIG_SELECTION,
.default_string = "",
.default_int = 0,
.file_filter = "",
.spinner = { 0 },
.selection = {
.name = "translate",
.description = "Translate 26 -> 17",
.type = CONFIG_SELECTION,
.default_string = NULL,
.default_int = 0,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "Off", .value = 0 },
{ .description = "On", .value = 1 },
{ .description = "" }
}
},
.bios = { { 0 } }
},
{ .name = "", .description = "", .type = CONFIG_END }
};

View File

@@ -1107,60 +1107,77 @@ xta_close(void *priv)
static const device_config_t wdxt150_config[] = {
// clang-format off
{
.name = "base",
.description = "Address",
.type = CONFIG_HEX16,
.default_string = "",
.default_int = 0x0320,
.file_filter = "",
.spinner = { 0 },
.selection = {
.name = "base",
.description = "Address",
.type = CONFIG_HEX16,
.default_string = NULL,
.default_int = 0x0320,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "320H", .value = 0x0320 },
{ .description = "324H", .value = 0x0324 },
{ .description = "" }
},
.bios = { { 0 } }
},
{
.name = "irq",
.description = "IRQ",
.type = CONFIG_SELECTION,
.default_string = "",
.default_int = 5,
.file_filter = "",
.spinner = { 0 },
.selection = {
.name = "irq",
.description = "IRQ",
.type = CONFIG_SELECTION,
.default_string = NULL,
.default_int = 5,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "IRQ 5", .value = 5 },
{ .description = "IRQ 4", .value = 4 },
{ .description = "" }
},
.bios = { { 0 } }
},
{
.name = "bios_addr",
.description = "BIOS Address",
.type = CONFIG_HEX20,
.default_string = "",
.default_int = 0xc8000,
.file_filter = "",
.spinner = { 0 },
.selection = {
.name = "bios_addr",
.description = "BIOS Address",
.type = CONFIG_HEX20,
.default_string = NULL,
.default_int = 0xc8000,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "C800H", .value = 0xc8000 },
{ .description = "CA00H", .value = 0xca000 },
{ .description = "" }
},
.bios = { { 0 } }
},
{
.name = "bios_rev",
.description = "BIOS Revision",
.type = CONFIG_BIOS,
.name = "bios_rev",
.description = "BIOS Revision",
.type = CONFIG_BIOS,
.default_string = "rev_1",
.default_int = 0,
.file_filter = "",
.spinner = { 0 },
.bios = {
{ .name = "Revision 1.0", .internal_name = "rev_1", .bios_type = BIOS_NORMAL,
.files_no = 1, .local = 0, .size = 8192, .files = { WD_REV_1_BIOS_FILE, "" } },
{ .name = "Revision 2.0", .internal_name = "rev_2", .bios_type = BIOS_NORMAL,
.files_no = 1, .local = 0, .size = 8192, .files = { WD_REV_2_BIOS_FILE, "" } },
.default_int = 0,
.file_filter = NULL,
.spinner = { 0 },
.bios = {
{
.name = "Revision 1.0",
.internal_name = "rev_1",
.bios_type = BIOS_NORMAL,
.files_no = 1,
.local = 0,
.size = 8192,
.files = { WD_REV_1_BIOS_FILE, "" }
},
{
.name = "Revision 2.0",
.internal_name = "rev_2",
.bios_type = BIOS_NORMAL,
.files_no = 1,
.local = 0,
.size = 8192,
.files = { WD_REV_2_BIOS_FILE, "" }
},
{ .files_no = 0 }
},
},

View File

@@ -224,18 +224,33 @@ xtide_at_close(void *priv)
static const device_config_t xtide_config[] = {
// clang-format off
{
.name = "bios",
.description = "BIOS Revision",
.type = CONFIG_BIOS,
.name = "bios",
.description = "BIOS Revision",
.type = CONFIG_BIOS,
.default_string = "xt",
.default_int = 0,
.file_filter = "",
.spinner = { 0 },
.bios = {
{ .name = "Regular XT", .internal_name = "xt", .bios_type = BIOS_NORMAL,
.files_no = 1, .local = 0, .size = 8192, .files = { ROM_PATH_XT, "" } },
{ .name = "XT+ (V20/V30/8018x)", .internal_name = "xt_plus", .bios_type = BIOS_NORMAL,
.files_no = 1, .local = 0, .size = 8192, .files = { ROM_PATH_XTP, "" } },
.default_int = 0,
.file_filter = NULL,
.spinner = { 0 },
.selection = { { 0 } },
.bios = {
{
.name = "Regular XT",
.internal_name = "xt",
.bios_type = BIOS_NORMAL,
.files_no = 1,
.local = 0,
.size = 8192,
.files = { ROM_PATH_XT, "" }
},
{
.name = "XT+ (V20/V30/8018x)",
.internal_name = "xt_plus",
.bios_type = BIOS_NORMAL,
.files_no = 1,
.local = 0,
.size = 8192,
.files = { ROM_PATH_XTP, "" }
},
{ .files_no = 0 }
},
},
@@ -246,18 +261,33 @@ static const device_config_t xtide_config[] = {
static const device_config_t xtide_at_config[] = {
// clang-format off
{
.name = "bios",
.description = "BIOS Revision",
.type = CONFIG_BIOS,
.name = "bios",
.description = "BIOS Revision",
.type = CONFIG_BIOS,
.default_string = "at",
.default_int = 0,
.file_filter = "",
.spinner = { 0 },
.bios = {
{ .name = "Regular AT", .internal_name = "at", .bios_type = BIOS_NORMAL,
.files_no = 1, .local = 0, .size = 8192, .files = { ROM_PATH_AT, "" } },
{ .name = "386", .internal_name = "at_386", .bios_type = BIOS_NORMAL,
.files_no = 1, .local = 0, .size = 8192, .files = { ROM_PATH_AT_386, "" } },
.default_int = 0,
.file_filter = NULL,
.spinner = { 0 },
.selection = { { 0 } },
.bios = {
{
.name = "Regular AT",
.internal_name = "at",
.bios_type = BIOS_NORMAL,
.files_no = 1,
.local = 0,
.size = 8192,
.files = { ROM_PATH_AT, "" }
},
{
.name = "386",
.internal_name = "at_386",
.bios_type = BIOS_NORMAL,
.files_no = 1,
.local = 0,
.size = 8192,
.files = { ROM_PATH_AT_386, "" }
},
{ .files_no = 0 }
},
},

View File

@@ -63,22 +63,23 @@ lba_enhancer_available(void)
// clang-format off
static const device_config_t lba_enhancer_config[] = {
{
.name = "bios_addr",
.description = "BIOS Address",
.type = CONFIG_HEX20,
.default_string = "",
.default_int = 0xc8000,
.file_filter = "",
.spinner = { 0 },
.selection = {
{ .description = "C800H", .value = 0xc8000 },
{ .description = "CC00H", .value = 0xcc000 },
{ .description = "D000H", .value = 0xd0000 },
{ .description = "D400H", .value = 0xd4000 },
{ .description = "D800H", .value = 0xd8000 },
{ .description = "DC00H", .value = 0xdc000 },
{ .description = "" }
.name = "bios_addr",
.description = "BIOS Address",
.type = CONFIG_HEX20,
.default_string = NULL,
.default_int = 0xc8000,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "C800H", .value = 0xc8000 },
{ .description = "CC00H", .value = 0xcc000 },
{ .description = "D000H", .value = 0xd0000 },
{ .description = "D400H", .value = 0xd4000 },
{ .description = "D800H", .value = 0xd8000 },
{ .description = "DC00H", .value = 0xdc000 },
{ .description = "" }
},
.bios = { { 0 } }
},
{ .name = "", .description = "", .type = CONFIG_END }
};

View File

@@ -157,9 +157,9 @@ static const device_config_t compaticard_i_config[] = {
.name = "base",
.description = "Address",
.type = CONFIG_HEX16,
.default_string = "",
.default_string = NULL,
.default_int = 0x3f0,
.file_filter = "",
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "0x3f0", .value = 0x3f0 },
@@ -167,7 +167,8 @@ static const device_config_t compaticard_i_config[] = {
{ .description = "0x360", .value = 0x360 },
{ .description = "0x3e0", .value = 0x3e0 },
{ .description = "" }
}
},
.bios = { { 0 } }
},
{ .name = "", .description = "", .type = CONFIG_END }
// clang-format on
@@ -179,9 +180,9 @@ static const device_config_t compaticard_ii_config[] = {
.name = "base",
.description = "Address",
.type = CONFIG_HEX16,
.default_string = "",
.default_string = NULL,
.default_int = 0x3f0,
.file_filter = "",
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "0x3f0", .value = 0x3f0 },
@@ -189,15 +190,16 @@ static const device_config_t compaticard_ii_config[] = {
{ .description = "0x360", .value = 0x360 },
{ .description = "0x3e0", .value = 0x3e0 },
{ .description = "" }
}
},
.bios = { { 0 } }
},
{
.name = "irq",
.description = "IRQ",
.type = CONFIG_SELECTION,
.default_string = "",
.default_string = NULL,
.default_int = 6,
.file_filter = "",
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "IRQ 2", .value = 2 },
@@ -207,22 +209,24 @@ static const device_config_t compaticard_ii_config[] = {
{ .description = "IRQ 6", .value = 6 },
{ .description = "IRQ 7", .value = 7 },
{ .description = "" }
}
},
.bios = { { 0 } }
},
{
.name = "dma",
.description = "DMA channel",
.type = CONFIG_SELECTION,
.default_string = "",
.default_string = NULL,
.default_int = 2,
.file_filter = "",
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "DMA 1", .value = 1 },
{ .description = "DMA 2", .value = 2 },
{ .description = "DMA 3", .value = 3 },
{ .description = "" }
}
},
.bios = { { 0 } }
},
{ .name = "", .description = "", .type = CONFIG_END }
// clang-format on
@@ -234,9 +238,9 @@ static const device_config_t compaticard_iv_config[] = {
.name = "base",
.description = "Address",
.type = CONFIG_HEX16,
.default_string = "",
.default_string = NULL,
.default_int = 0x3f0,
.file_filter = "",
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "0x3f0", .value = 0x3f0 },
@@ -244,15 +248,16 @@ static const device_config_t compaticard_iv_config[] = {
{ .description = "0x360", .value = 0x360 },
{ .description = "0x3e0", .value = 0x3e0 },
{ .description = "" }
}
},
.bios = { { 0 } }
},
{
.name = "irq",
.description = "IRQ",
.type = CONFIG_SELECTION,
.default_string = "",
.default_string = NULL,
.default_int = 6,
.file_filter = "",
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "IRQ 2", .value = 2 },
@@ -262,30 +267,32 @@ static const device_config_t compaticard_iv_config[] = {
{ .description = "IRQ 6", .value = 6 },
{ .description = "IRQ 7", .value = 7 },
{ .description = "" }
}
},
.bios = { { 0 } }
},
{
.name = "dma",
.description = "DMA channel",
.type = CONFIG_SELECTION,
.default_string = "",
.default_string = NULL,
.default_int = 2,
.file_filter = "",
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "DMA 1", .value = 1 },
{ .description = "DMA 2", .value = 2 },
{ .description = "DMA 3", .value = 3 },
{ .description = "" }
}
},
.bios = { { 0 } }
},
{
.name = "bios_addr",
.description = "BIOS Address:",
.type = CONFIG_HEX20,
.default_string = "",
.default_string = NULL,
.default_int = 0xce000,
.file_filter = "",
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "Disabled", .value = 0 },
@@ -298,15 +305,20 @@ static const device_config_t compaticard_iv_config[] = {
{ .description = "E800H", .value = 0xe8000 },
{ .description = "EE00H", .value = 0xee000 },
{ .description = "" }
}
},
.bios = { { 0 } }
},
#if 0
{
.name = "autoboot_enabled",
.description = "Enable Autoboot",
.type = CONFIG_BINARY,
.default_string = "",
.default_int = 0
.default_string = NULL,
.default_int = 0,
.file_filter = NULL,
.spinner = { 0 },
.selection = { { 0 } },
.bios = { { 0 } }
},
#endif
{ .name = "", .description = "", .type = CONFIG_END }

View File

@@ -109,18 +109,19 @@ b215_available(void)
static const device_config_t b215_config[] = {
// clang-format off
{
.name = "bios_addr",
.description = "BIOS Address",
.type = CONFIG_HEX20,
.default_string = "",
.default_int = 0xca000,
.file_filter = "",
.spinner = { 0 },
.selection = {
.name = "bios_addr",
.description = "BIOS Address",
.type = CONFIG_HEX20,
.default_string = NULL,
.default_int = 0xca000,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "CA00H", .value = 0xca000 },
{ .description = "CC00H", .value = 0xcc000 },
{ .description = "" }
}
},
.bios = { { 0 } }
},
{ .name = "", .description = "", .type = CONFIG_END }
// clang-format on

View File

@@ -165,82 +165,61 @@ static const device_config_t monster_fdc_config[] = {
// clang-format off
#if 0
{
.name = "sec_enabled",
.description = "Enable Secondary Controller",
.type = CONFIG_BINARY,
.default_string = "",
.default_int = 0
.name = "sec_enabled",
.description = "Enable Secondary Controller",
.type = CONFIG_BINARY,
.default_string = NULL,
.default_int = 0,
.file_filter = NULL,
.spinner = { 0 },
.selection = { { 0 } },
.bios = { { 0 } }
},
{
.name = "sec_irq",
.description = "Secondary Controller IRQ",
.type = CONFIG_SELECTION,
.default_string = "",
.default_int = 6,
.file_filter = "",
.spinner = { 0 },
.selection = {
{
.description = "IRQ 2",
.value = 2
},
{
.description = "IRQ 3",
.value = 3
},
{
.description = "IRQ 4",
.value = 4
},
{
.description = "IRQ 5",
.value = 5
},
{
.description = "IRQ 6",
.value = 6
},
{
.description = "IRQ 7",
.value = 7
},
{ .description = "" }
}
.name = "sec_irq",
.description = "Secondary Controller IRQ",
.type = CONFIG_SELECTION,
.default_string = NULL,
.default_int = 6,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "IRQ 2", .value = 2 },
{ .description = "IRQ 3", .value = 3 },
{ .description = "IRQ 4", .value = 4 },
{ .description = "IRQ 5", .value = 5 },
{ .description = "IRQ 6", .value = 6 },
{ .description = "IRQ 7", .value = 7 },
{ .description = "" }
},
.bios = { { 0 } }
},
{
.name = "sec_dma",
.description = "Secondary Controller DMA",
.type = CONFIG_SELECTION,
.default_string = "",
.default_int = 2,
.file_filter = "",
.spinner = { 0 },
.selection = {
{
.description = "DMA 1",
.value = 1
},
{
.description = "DMA 2",
.value = 2
},
{
.description = "DMA 3",
.value = 3
},
{ .description = "" }
}
.name = "sec_dma",
.description = "Secondary Controller DMA",
.type = CONFIG_SELECTION,
.default_string = NULL,
.default_int = 2,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "DMA 1", .value = 1 },
{ .description = "DMA 2", .value = 2 },
{ .description = "DMA 3", .value = 3 },
{ .description = "" }
},
.bios = { { 0 } }
},
#endif
{
.name = "bios_addr",
.description = "BIOS Address",
.type = CONFIG_HEX20,
.default_string = "",
.default_int = 0xc8000,
.file_filter = "",
.spinner = { 0 },
.selection = {
.name = "bios_addr",
.description = "BIOS Address",
.type = CONFIG_HEX20,
.default_string = NULL,
.default_int = 0xc8000,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "Disabled", .value = 0 },
{ .description = "C000H", .value = 0xc0000 },
{ .description = "C800H", .value = 0xc8000 },
@@ -249,30 +228,36 @@ static const device_config_t monster_fdc_config[] = {
{ .description = "E000H", .value = 0xe0000 },
{ .description = "E800H", .value = 0xe8000 },
{ .description = "" }
}
},
.bios = { { 0 } }
},
#if 0
{
.name = "bios_size",
.description = "BIOS Size:",
.type = CONFIG_HEX20,
.default_string = "32",
.default_int = 0xc8000,
.file_filter = "",
.spinner = { 0 },
.selection = {
.name = "bios_size",
.description = "BIOS Size:",
.type = CONFIG_HEX20,
.default_string = NULL,
.default_int = 32,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "8K", .value = 8 },
{ .description = "32K", .value = 32 },
{ .description = "" }
}
},
.bios = { { 0 } }
},
#endif
{
.name = "rom_writes_enabled",
.description = "Enable BIOS extension ROM Writes",
.type = CONFIG_BINARY,
.default_string = "",
.default_int = 0
.name = "rom_writes_enabled",
.description = "Enable BIOS extension ROM Writes",
.type = CONFIG_BINARY,
.default_string = NULL,
.default_int = 0,
.file_filter = NULL,
.spinner = { 0 },
.selection = { { 0 } },
.bios = { { 0 } }
},
{ .name = "", .description = "", .type = CONFIG_END }
// clang-format on

View File

@@ -122,20 +122,21 @@ pii_158_available(void)
static const device_config_t pii_config[] = {
// clang-format off
{
.name = "bios_addr",
.description = "BIOS Address",
.type = CONFIG_HEX20,
.default_string = "",
.default_int = 0xce000,
.file_filter = "",
.spinner = { 0 },
.selection = {
.name = "bios_addr",
.description = "BIOS Address",
.type = CONFIG_HEX20,
.default_string = NULL,
.default_int = 0xce000,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "Disabled", .value = 0 },
{ .description = "CA00H", .value = 0xca000 },
{ .description = "CC00H", .value = 0xcc000 },
{ .description = "CE00H", .value = 0xce000 },
{ .description = "" }
}
},
.bios = { { 0 } }
},
{ .name = "", .description = "", .type = CONFIG_END }
// clang-format on

View File

@@ -88,18 +88,18 @@ static const joystick_if_t joystick_none = {
static const struct {
const joystick_if_t *joystick;
} joysticks[] = {
{ &joystick_none },
{ &joystick_2axis_2button },
{ &joystick_2axis_4button },
{ &joystick_2axis_6button },
{ &joystick_2axis_8button },
{ &joystick_3axis_2button },
{ &joystick_3axis_4button },
{ &joystick_4axis_4button },
{ &joystick_none },
{ &joystick_2axis_2button },
{ &joystick_2axis_4button },
{ &joystick_2axis_6button },
{ &joystick_2axis_8button },
{ &joystick_3axis_2button },
{ &joystick_3axis_4button },
{ &joystick_4axis_4button },
{ &joystick_ch_flightstick_pro },
{ &joystick_sw_pad },
{ &joystick_tm_fcs },
{ NULL }
{ &joystick_sw_pad },
{ &joystick_tm_fcs },
{ NULL }
};
static joystick_instance_t *joystick_instance[GAMEPORT_MAX] = { NULL, NULL };
@@ -613,38 +613,40 @@ const device_t gameport_20f_device = {
static const device_config_t tmacm_config[] = {
// clang-format off
{
.name = "port1_addr",
.description = "Port 1 Address",
.type = CONFIG_HEX16,
.default_string = "",
.default_int = 0x0201,
.file_filter = "",
.spinner = { 0 },
.selection = {
.name = "port1_addr",
.description = "Port 1 Address",
.type = CONFIG_HEX16,
.default_string = NULL,
.default_int = 0x0201,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "201h", .value = 0x0201 },
{ .description = "203h", .value = 0x0203 },
{ .description = "205h", .value = 0x0205 },
{ .description = "207h", .value = 0x0207 },
{ .description = "Disabled", .value = 0x0000 },
{ "" }
}
{ .description = "" }
},
.bios = { { 0 } }
},
{
.name = "port2_addr",
.description = "Port 2 Address",
.type = CONFIG_HEX16,
.default_string = "",
.default_int = 0x0209,
.file_filter = "",
.spinner = { 0 },
.selection = {
.name = "port2_addr",
.description = "Port 2 Address",
.type = CONFIG_HEX16,
.default_string = NULL,
.default_int = 0x0209,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "209h", .value = 0x0209 },
{ .description = "20Bh", .value = 0x020B },
{ .description = "20Dh", .value = 0x020D },
{ .description = "20Fh", .value = 0x020F },
{ .description = "Disabled", .value = 0x0000 },
{ "" }
}
{ .description = "" }
},
.bios = { { 0 } }
},
{ .name = "", .description = "", .type = CONFIG_END }
// clang-format on

View File

@@ -1154,30 +1154,31 @@ threec501_nic_close(void *priv)
static const device_config_t threec501_config[] = {
{
.name = "base",
.description = "Address",
.type = CONFIG_HEX16,
.default_string = "",
.default_int = 0x300,
.file_filter = "",
.spinner = { 0 },
.selection = {
.name = "base",
.description = "Address",
.type = CONFIG_HEX16,
.default_string = NULL,
.default_int = 0x300,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "0x280", .value = 0x280 },
{ .description = "0x300", .value = 0x300 },
{ .description = "0x310", .value = 0x310 },
{ .description = "0x320", .value = 0x320 },
{ .description = "" }
},
.bios = { { 0 } }
},
{
.name = "irq",
.description = "IRQ",
.type = CONFIG_SELECTION,
.default_string = "",
.default_int = 3,
.file_filter = "",
.spinner = { 0 },
.selection = {
.name = "irq",
.description = "IRQ",
.type = CONFIG_SELECTION,
.default_string = NULL,
.default_int = 3,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "IRQ 2/9", .value = 9 },
{ .description = "IRQ 3", .value = 3 },
{ .description = "IRQ 4", .value = 4 },
@@ -1186,28 +1187,34 @@ static const device_config_t threec501_config[] = {
{ .description = "IRQ 7", .value = 7 },
{ .description = "" }
},
.bios = { { 0 } }
},
{
.name = "dma",
.description = "DMA",
.type = CONFIG_SELECTION,
.default_string = "",
.default_int = 3,
.file_filter = "",
.spinner = { 0 },
.selection = {
.type = CONFIG_SELECTION,
.default_string = NULL,
.default_int = 3,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "DMA 1", .value = 1 },
{ .description = "DMA 2", .value = 2 },
{ .description = "DMA 3", .value = 3 },
{ .description = "" }
},
.bios = { { 0 } }
},
{
.name = "mac",
.description = "MAC Address",
.type = CONFIG_MAC,
.default_string = "",
.default_int = -1
.name = "mac",
.description = "MAC Address",
.type = CONFIG_MAC,
.default_string = NULL,
.default_int = -1,
.file_filter = NULL,
.spinner = { 0 },
.selection = { { 0 } },
.bios = { { 0 } }
},
{ .name = "", .description = "", .type = CONFIG_END }
};

View File

@@ -654,14 +654,14 @@ threec503_nic_close(void *priv)
static const device_config_t threec503_config[] = {
// clang-format off
{
.name = "base",
.description = "Address",
.type = CONFIG_HEX16,
.default_string = "",
.default_int = 0x300,
.file_filter = "",
.spinner = { 0 },
.selection = {
.name = "base",
.description = "Address",
.type = CONFIG_HEX16,
.default_string = NULL,
.default_int = 0x300,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "0x250", .value = 0x250 },
{ .description = "0x280", .value = 0x280 },
{ .description = "0x2a0", .value = 0x2a0 },
@@ -672,65 +672,68 @@ static const device_config_t threec503_config[] = {
{ .description = "0x350", .value = 0x350 },
{ .description = "", .value = 0 }
},
.bios = { { 0 } }
},
{
.name = "irq",
.description = "IRQ",
.type = CONFIG_SELECTION,
.default_string = "",
.default_int = 3,
.file_filter = "",
.spinner = { 0 },
.selection = {
.name = "irq",
.description = "IRQ",
.type = CONFIG_SELECTION,
.default_string = NULL,
.default_int = 3,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "IRQ 2", .value = 2 },
{ .description = "IRQ 3", .value = 3 },
{ .description = "IRQ 4", .value = 4 },
{ .description = "IRQ 5", .value = 5 },
{ .description = "", .value = 0 }
},
.bios = { { 0 } }
},
{
.name = "dma",
.description = "DMA",
.type = CONFIG_SELECTION,
.name = "dma",
.description = "DMA",
.type = CONFIG_SELECTION,
.default_string = "",
.default_int = 3,
.file_filter = "",
.spinner = { 0 },
.selection = {
.default_int = 3,
.file_filter = "",
.spinner = { 0 },
.selection = {
{ .description = "DMA 1", .value = 1 },
{ .description = "DMA 2", .value = 2 },
{ .description = "DMA 3", .value = 3 },
{ .description = "", .value = 0 }
},
.bios = { { 0 } }
},
{
.name = "mac",
.description = "MAC Address",
.type = CONFIG_MAC,
.default_string = "",
.default_int = -1,
.file_filter = "",
.spinner = { 0 },
.selection = {
{ .description = "", .value = 0 }
},
.name = "mac",
.description = "MAC Address",
.type = CONFIG_MAC,
.default_string = NULL,
.default_int = -1,
.file_filter = NULL,
.spinner = { 0 },
.selection = { { 0 } },
.bios = { { 0 } }
},
{
.name = "bios_addr",
.description = "BIOS Address",
.type = CONFIG_HEX20,
.default_string = "",
.default_int = 0xCC000,
.file_filter = "",
.spinner = { 0 },
.selection = {
.name = "bios_addr",
.description = "BIOS Address",
.type = CONFIG_HEX20,
.default_string = NULL,
.default_int = 0xCC000,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "DC00", .value = 0xDC000 },
{ .description = "D800", .value = 0xD8000 },
{ .description = "C800", .value = 0xC8000 },
{ .description = "CC00", .value = 0xCC000 },
{ .description = "", .value = 0 }
{ .description = "", .value = 0 }
},
.bios = { { 0 } }
},
{ .name = "", .description = "", .type = CONFIG_END }
// clang-format off

View File

@@ -1531,30 +1531,31 @@ modem_close(void *priv)
// clang-format off
static const device_config_t modem_config[] = {
{
.name = "port",
.description = "Serial Port",
.type = CONFIG_SELECTION,
.default_string = "",
.default_int = 0,
.file_filter = "",
.spinner = { 0 },
.selection = {
.name = "port",
.description = "Serial Port",
.type = CONFIG_SELECTION,
.default_string = NULL,
.default_int = 0,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "COM1", .value = 0 },
{ .description = "COM2", .value = 1 },
{ .description = "COM3", .value = 2 },
{ .description = "COM4", .value = 3 },
{ .description = "" }
}
},
.bios = { { 0 } }
},
{
.name = "baudrate",
.description = "Baud Rate",
.type = CONFIG_SELECTION,
.default_string = "",
.default_int = 115200,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
.name = "baudrate",
.description = "Baud Rate",
.type = CONFIG_SELECTION,
.default_string = NULL,
.default_int = 115200,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "115200", .value = 115200 },
{ .description = "57600", .value = 57600 },
{ .description = "56000", .value = 56000 },
@@ -1569,32 +1570,44 @@ static const device_config_t modem_config[] = {
{ .description = "1200", .value = 1200 },
{ .description = "600", .value = 600 },
{ .description = "300", .value = 300 },
}
{ .description = "" }
},
.bios = { { 0 } }
},
{
.name = "listen_port",
.description = "TCP/IP listening port",
.type = CONFIG_SPINNER,
.spinner =
{
.min = 0,
.name = "listen_port",
.description = "TCP/IP listening port",
.type = CONFIG_SPINNER,
.default_string = NULL,
.default_int = 0,
.file_filter = NULL,
.spinner = {
.min = 0,
.max = 32767
},
.default_int = 0
.selection = { { 0 } },
.bios = { { 0 } }
},
{
.name = "phonebook_file",
.description = "Phonebook File",
.type = CONFIG_FNAME,
.default_string = "",
.file_filter = "Text files (*.txt)|*.txt"
.name = "phonebook_file",
.description = "Phonebook File",
.type = CONFIG_FNAME,
.default_string = NULL,
.file_filter = "Text files (*.txt)|*.txt",
.spinner = { 0 },
.selection = { { 0 } },
.bios = { { 0 } }
},
{
.name = "telnet_mode",
.description = "Telnet emulation",
.type = CONFIG_BINARY,
.default_string = "",
.default_int = 0
.name = "telnet_mode",
.description = "Telnet emulation",
.type = CONFIG_BINARY,
.default_string = NULL,
.default_int = 0,
.file_filter = NULL,
.spinner = { 0 },
.selection = { { 0 } },
.bios = { { 0 } }
},
{ .name = "", .description = "", .type = CONFIG_END }
};

View File

@@ -1234,14 +1234,14 @@ de220p_available(void)
// clang-format off
static const device_config_t ne1000_config[] = {
{
.name = "base",
.description = "Address",
.type = CONFIG_HEX16,
.default_string = "",
.default_int = 0x300,
.file_filter = "",
.spinner = { 0 },
.selection = {
.name = "base",
.description = "Address",
.type = CONFIG_HEX16,
.default_string = NULL,
.default_int = 0x300,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
/* Source: Windows 95 .INF file. */
{ .description = "0x300", .value = 0x300 },
{ .description = "0x320", .value = 0x320 },
@@ -1249,16 +1249,17 @@ static const device_config_t ne1000_config[] = {
{ .description = "0x360", .value = 0x360 },
{ .description = "" }
},
.bios = { { 0 } }
},
{
.name = "irq",
.description = "IRQ",
.type = CONFIG_SELECTION,
.default_string = "",
.default_int = 3,
.file_filter = "",
.spinner = { 0 },
.selection = {
.name = "irq",
.description = "IRQ",
.type = CONFIG_SELECTION,
.default_string = NULL,
.default_int = 3,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
/* Source: Windows 95 .INF file. */
{ .description = "IRQ 2", .value = 2 },
{ .description = "IRQ 3", .value = 3 },
@@ -1267,27 +1268,32 @@ static const device_config_t ne1000_config[] = {
{ .description = "IRQ 9", .value = 9 },
{ .description = "" }
},
.bios = { { 0 } }
},
{
.name = "mac",
.description = "MAC Address",
.type = CONFIG_MAC,
.default_string = "",
.default_int = -1
.name = "mac",
.description = "MAC Address",
.type = CONFIG_MAC,
.default_string = NULL,
.default_int = -1,
.file_filter = NULL,
.spinner = { 0 },
.selection = { { 0 } },
.bios = { { 0 } }
},
{ .name = "", .description = "", .type = CONFIG_END }
};
static const device_config_t ne1000_compat_config[] = {
{
.name = "base",
.description = "Address",
.type = CONFIG_HEX16,
.default_string = "",
.default_int = 0x300,
.file_filter = "",
.spinner = { 0 },
.selection = {
.name = "base",
.description = "Address",
.type = CONFIG_HEX16,
.default_string = NULL,
.default_int = 0x300,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
/* Source: Windows 95 .INF file. */
{ .description = "0x200", .value = 0x200 },
{ .description = "0x220", .value = 0x220 },
@@ -1307,16 +1313,17 @@ static const device_config_t ne1000_compat_config[] = {
{ .description = "0x3e0", .value = 0x3e0 },
{ .description = "" }
},
.bios = { { 0 } }
},
{
.name = "irq",
.description = "IRQ",
.type = CONFIG_SELECTION,
.default_string = "",
.default_int = 3,
.file_filter = "",
.spinner = { 0 },
.selection = {
.name = "irq",
.description = "IRQ",
.type = CONFIG_SELECTION,
.default_string = NULL,
.default_int = 3,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
/* Source: Windows 95 .INF file. */
{ .description = "IRQ 2", .value = 2 },
{ .description = "IRQ 3", .value = 3 },
@@ -1326,34 +1333,43 @@ static const device_config_t ne1000_compat_config[] = {
{ .description = "IRQ 9", .value = 9 },
{ .description = "" }
},
.bios = { { 0 } }
},
{
.name = "mac",
.description = "MAC Address",
.type = CONFIG_MAC,
.default_string = "",
.default_int = -1
.name = "mac",
.description = "MAC Address",
.type = CONFIG_MAC,
.default_string = NULL,
.default_int = -1,
.file_filter = NULL,
.spinner = { 0 },
.selection = { { 0 } },
.bios = { { 0 } }
},
{
.name = "mac_oui",
.description = "MAC Address OUI",
.type = CONFIG_MAC,
.default_string = "",
.default_int = -1
.name = "mac_oui",
.description = "MAC Address OUI",
.type = CONFIG_MAC,
.default_string = NULL,
.default_int = -1,
.file_filter = NULL,
.spinner = { 0 },
.selection = { { 0 } },
.bios = { { 0 } }
},
{ .name = "", .description = "", .type = CONFIG_END }
};
static const device_config_t ne2000_config[] = {
{
.name = "base",
.description = "Address",
.type = CONFIG_HEX16,
.default_string = "",
.default_int = 0x300,
.file_filter = "",
.spinner = { 0 },
.selection = {
.name = "base",
.description = "Address",
.type = CONFIG_HEX16,
.default_string = NULL,
.default_int = 0x300,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
/* Source: Windows 95 .INF file. */
{ .description = "0x300", .value = 0x300 },
{ .description = "0x320", .value = 0x320 },
@@ -1361,16 +1377,17 @@ static const device_config_t ne2000_config[] = {
{ .description = "0x360", .value = 0x360 },
{ .description = "" }
},
.bios = { { 0 } }
},
{
.name = "irq",
.description = "IRQ",
.type = CONFIG_SELECTION,
.default_string = "",
.default_int = 3,
.file_filter = "",
.spinner = { 0 },
.selection = {
.name = "irq",
.description = "IRQ",
.type = CONFIG_SELECTION,
.default_string = NULL,
.default_int = 3,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
/* Source: Windows 95 .INF file. */
{ .description = "IRQ 2", .value = 2 },
{ .description = "IRQ 3", .value = 3 },
@@ -1379,43 +1396,49 @@ static const device_config_t ne2000_config[] = {
{ .description = "IRQ 9", .value = 9 },
{ .description = "" }
},
.bios = { { 0 } }
},
{
.name = "mac",
.description = "MAC Address",
.type = CONFIG_MAC,
.default_string = "",
.default_int = -1
.name = "mac",
.description = "MAC Address",
.type = CONFIG_MAC,
.default_string = NULL,
.default_int = -1,
.file_filter = NULL,
.spinner = { 0 },
.selection = { { 0 } },
.bios = { { 0 } }
},
{
.name = "bios_addr",
.description = "BIOS Address",
.type = CONFIG_HEX20,
.default_string = "",
.default_int = 0,
.file_filter = "",
.spinner = { 0 },
.selection = {
.default_string = NULL,
.default_int = 0,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "Disabled", .value = 0x00000 },
{ .description = "D000", .value = 0xD0000 },
{ .description = "D800", .value = 0xD8000 },
{ .description = "C800", .value = 0xC8000 },
{ .description = "" }
},
.bios = { { 0 } }
},
{ .name = "", .description = "", .type = CONFIG_END }
};
static const device_config_t ne2000_compat_config[] = {
{
.name = "base",
.description = "Address",
.type = CONFIG_HEX16,
.default_string = "",
.default_int = 0x300,
.file_filter = "",
.spinner = { 0 },
.selection = {
.name = "base",
.description = "Address",
.type = CONFIG_HEX16,
.default_string = NULL,
.default_int = 0x300,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
/* Source: Windows 95 .INF file. */
{ .description = "0x200", .value = 0x200 },
{ .description = "0x220", .value = 0x220 },
@@ -1435,16 +1458,17 @@ static const device_config_t ne2000_compat_config[] = {
{ .description = "0x3e0", .value = 0x3e0 },
{ .description = "" }
},
.bios = { { 0 } }
},
{
.name = "irq",
.description = "IRQ",
.type = CONFIG_SELECTION,
.default_string = "",
.default_int = 10,
.file_filter = "",
.spinner = { 0 },
.selection = {
.name = "irq",
.description = "IRQ",
.type = CONFIG_SELECTION,
.default_string = NULL,
.default_int = 10,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
/* Source: Windows 95 .INF file - not giving impossible IRQ's
such as 6, 8, or 13. */
{ .description = "IRQ 3", .value = 3 },
@@ -1459,50 +1483,60 @@ static const device_config_t ne2000_compat_config[] = {
{ .description = "IRQ 15", .value = 15 },
{ .description = "" }
},
.bios = { { 0 } }
},
{
.name = "mac",
.description = "MAC Address",
.type = CONFIG_MAC,
.default_string = "",
.default_int = -1
.name = "mac",
.description = "MAC Address",
.type = CONFIG_MAC,
.default_string = NULL,
.default_int = -1,
.file_filter = NULL,
.spinner = { 0 },
.selection = { { 0 } },
.bios = { { 0 } }
},
{
.name = "mac_oui",
.description = "MAC Address OUI",
.type = CONFIG_MAC,
.default_string = "",
.default_int = -1
.name = "mac_oui",
.description = "MAC Address OUI",
.type = CONFIG_MAC,
.default_string = NULL,
.default_int = -1,
.file_filter = NULL,
.spinner = { 0 },
.selection = { { 0 } },
.bios = { { 0 } }
},
{
.name = "bios_addr",
.description = "BIOS Address",
.type = CONFIG_HEX20,
.default_string = "",
.default_int = 0,
.file_filter = "",
.spinner = { 0 },
.selection = {
.name = "bios_addr",
.description = "BIOS Address",
.type = CONFIG_HEX20,
.default_string = NULL,
.default_int = 0,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "Disabled", .value = 0x00000 },
{ .description = "D000", .value = 0xD0000 },
{ .description = "D800", .value = 0xD8000 },
{ .description = "C800", .value = 0xC8000 },
{ .description = "" }
},
.bios = { { 0 } }
},
{ .name = "", .description = "", .type = CONFIG_END }
};
static const device_config_t ne2000_compat_8bit_config[] = {
{
.name = "base",
.description = "Address",
.type = CONFIG_HEX16,
.default_string = "",
.default_int = 0x320,
.file_filter = "",
.spinner = { 0 },
.selection = {
.name = "base",
.description = "Address",
.type = CONFIG_HEX16,
.default_string = NULL,
.default_int = 0x320,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
/* Source: board docs, https://github.com/skiselev/isa8_eth */
{ .description = "0x200", .value = 0x200 },
{ .description = "0x220", .value = 0x220 },
@@ -1522,16 +1556,17 @@ static const device_config_t ne2000_compat_8bit_config[] = {
{ .description = "0x3e0", .value = 0x3e0 },
{ .description = "" }
},
.bios = { { 0 } }
},
{
.name = "irq",
.description = "IRQ",
.type = CONFIG_SELECTION,
.default_string = "",
.default_int = 3,
.file_filter = "",
.spinner = { 0 },
.selection = {
.name = "irq",
.description = "IRQ",
.type = CONFIG_SELECTION,
.default_string = NULL,
.default_int = 3,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
/* Source: board docs, https://github.com/skiselev/isa8_eth */
{ .description = "IRQ 2", .value = 2 },
{ .description = "IRQ 3", .value = 3 },
@@ -1540,30 +1575,39 @@ static const device_config_t ne2000_compat_8bit_config[] = {
{ .description = "IRQ 9", .value = 9 },
{ .description = "" }
},
.bios = { { 0 } }
},
{
.name = "mac",
.description = "MAC Address",
.type = CONFIG_MAC,
.default_string = "",
.default_int = -1
.name = "mac",
.description = "MAC Address",
.type = CONFIG_MAC,
.default_string = NULL,
.default_int = -1,
.file_filter = NULL,
.spinner = { 0 },
.selection = { { 0 } },
.bios = { { 0 } }
},
{
.name = "mac_oui",
.description = "MAC Address OUI",
.type = CONFIG_MAC,
.default_string = "",
.default_int = -1
.name = "mac_oui",
.description = "MAC Address OUI",
.type = CONFIG_MAC,
.default_string = NULL,
.default_int = -1,
.file_filter = NULL,
.spinner = { 0 },
.selection = { { 0 } },
.bios = { { 0 } }
},
{
.name = "bios_addr",
.description = "BIOS Address",
.type = CONFIG_HEX20,
.default_string = "",
.default_int = 0,
.file_filter = "",
.spinner = { 0 },
.selection = {
.name = "bios_addr",
.description = "BIOS Address",
.type = CONFIG_HEX20,
.default_string = NULL,
.default_int = 0,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
/* Source: board docs, https://github.com/skiselev/isa8_eth */
{ .description = "Disabled", .value = 0x00000 },
{ .description = "C000", .value = 0xC0000 },
@@ -1576,6 +1620,7 @@ static const device_config_t ne2000_compat_8bit_config[] = {
{ .description = "DC00", .value = 0xDC000 },
{ .description = "" }
},
.bios = { { 0 } }
},
{ .name = "", .description = "", .type = CONFIG_END }
};
@@ -1583,40 +1628,56 @@ static const device_config_t ne2000_compat_8bit_config[] = {
static const device_config_t rtl8019as_config[] = {
{
.name = "mac",
.description = "MAC Address",
.type = CONFIG_MAC,
.default_string = "",
.default_int = -1
.name = "mac",
.description = "MAC Address",
.type = CONFIG_MAC,
.default_string = NULL,
.default_int = -1,
.file_filter = NULL,
.spinner = { 0 },
.selection = { { 0 } },
.bios = { { 0 } }
},
{ .name = "", .description = "", .type = CONFIG_END }
};
static const device_config_t rtl8029as_config[] = {
{
.name = "bios",
.description = "Enable BIOS",
.type = CONFIG_BINARY,
.default_string = "",
.default_int = 0
.name = "bios",
.description = "Enable BIOS",
.type = CONFIG_BINARY,
.default_string = NULL,
.default_int = 0,
.file_filter = NULL,
.spinner = { 0 },
.selection = { { 0 } },
.bios = { { 0 } }
},
{
.name = "mac",
.description = "MAC Address",
.type = CONFIG_MAC,
.default_string = "",
.default_int = -1
.name = "mac",
.description = "MAC Address",
.type = CONFIG_MAC,
.default_string = NULL,
.default_int = -1,
.file_filter = NULL,
.spinner = { 0 },
.selection = { { 0 } },
.bios = { { 0 } }
},
{ .name = "", .description = "", .type = CONFIG_END }
};
static const device_config_t mca_mac_config[] = {
{
.name = "mac",
.description = "MAC Address",
.type = CONFIG_MAC,
.default_string = "",
.default_int = -1
.name = "mac",
.description = "MAC Address",
.type = CONFIG_MAC,
.default_string = NULL,
.default_int = -1,
.file_filter = NULL,
.spinner = { 0 },
.selection = { { 0 } },
.bios = { { 0 } }
},
{ .name = "", .description = "", .type = CONFIG_END }
};

View File

@@ -3088,62 +3088,68 @@ pcnet_close(void *priv)
// clang-format off
static const device_config_t pcnet_pci_config[] = {
{
.name = "mac",
.description = "MAC Address",
.type = CONFIG_MAC,
.default_string = "",
.default_int = -1
.name = "mac",
.description = "MAC Address",
.type = CONFIG_MAC,
.default_string = NULL,
.default_int = -1,
.file_filter = NULL,
.spinner = { 0 },
.selection = { { 0 } },
.bios = { { 0 } }
},
{ .name = "", .description = "", .type = CONFIG_END }
};
static const device_config_t pcnet_isa_config[] = {
{
.name = "base",
.description = "Address",
.type = CONFIG_HEX16,
.default_string = "",
.default_int = 0x300,
.file_filter = "",
.spinner = { 0 },
.selection = {
.name = "base",
.description = "Address",
.type = CONFIG_HEX16,
.default_string = NULL,
.default_int = 0x300,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "0x300", .value = 0x300 },
{ .description = "0x320", .value = 0x320 },
{ .description = "0x340", .value = 0x340 },
{ .description = "0x360", .value = 0x360 },
{ .description = "" }
},
.bios = { { 0 } }
},
{
.name = "irq",
.description = "IRQ",
.type = CONFIG_SELECTION,
.default_string = "",
.default_int = 3,
.file_filter = "",
.spinner = { 0 },
.selection = {
{ .description = "IRQ 3", .value = 3 },
{ .description = "IRQ 4", .value = 4 },
{ .description = "IRQ 5", .value = 5 },
{ .description = "IRQ 7", .value = 7 },
{ .description = "IRQ 9", .value = 9 },
.name = "irq",
.description = "IRQ",
.type = CONFIG_SELECTION,
.default_string = NULL,
.default_int = 3,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "IRQ 3", .value = 3 },
{ .description = "IRQ 4", .value = 4 },
{ .description = "IRQ 5", .value = 5 },
{ .description = "IRQ 7", .value = 7 },
{ .description = "IRQ 9", .value = 9 },
{ .description = "IRQ 10", .value = 10 },
{ .description = "IRQ 11", .value = 11 },
{ .description = "IRQ 12", .value = 12 },
{ .description = "IRQ 15", .value = 15 },
{ .description = "" }
{ .description = "" }
},
.bios = { { 0 } }
},
{
.name = "dma",
.description = "DMA",
.type = CONFIG_SELECTION,
.default_string = "",
.default_int = 5,
.file_filter = "",
.spinner = { 0 },
.selection = {
.name = "dma",
.description = "DMA",
.type = CONFIG_SELECTION,
.default_string = NULL,
.default_int = 5,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "DMA 0", .value = 0 },
{ .description = "DMA 3", .value = 3 },
{ .description = "DMA 5", .value = 5 },
@@ -3151,61 +3157,72 @@ static const device_config_t pcnet_isa_config[] = {
{ .description = "DMA 7", .value = 7 },
{ .description = "" }
},
.bios = { { 0 } }
},
{
.name = "mac",
.description = "MAC Address",
.type = CONFIG_MAC,
.default_string = "",
.default_int = -1
.name = "mac",
.description = "MAC Address",
.type = CONFIG_MAC,
.default_string = NULL,
.default_int = -1,
.file_filter = NULL,
.spinner = { 0 },
.selection = { { 0 } },
.bios = { { 0 } }
},
{ .name = "", .description = "", .type = CONFIG_END }
};
static const device_config_t pcnet_vlb_config[] = {
{
.name = "base",
.description = "Address",
.type = CONFIG_HEX16,
.default_string = "",
.default_int = 0x300,
.file_filter = "",
.spinner = { 0 },
.selection = {
.name = "base",
.description = "Address",
.type = CONFIG_HEX16,
.default_string = NULL,
.default_int = 0x300,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "0x300", .value = 0x300 },
{ .description = "0x320", .value = 0x320 },
{ .description = "0x340", .value = 0x340 },
{ .description = "0x360", .value = 0x360 },
{ .description = "" }
},
.bios = { { 0 } }
},
{
.name = "irq",
.description = "IRQ",
.type = CONFIG_SELECTION,
.default_string = "",
.default_int = 3,
.file_filter = "",
.spinner = { 0 },
.name = "irq",
.description = "IRQ",
.type = CONFIG_SELECTION,
.default_string = NULL,
.default_int = 3,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "IRQ 3", .value = 3 },
{ .description = "IRQ 4", .value = 4 },
{ .description = "IRQ 5", .value = 5 },
{ .description = "IRQ 7", .value = 7 },
{ .description = "IRQ 9", .value = 9 },
{ .description = "IRQ 3", .value = 3 },
{ .description = "IRQ 4", .value = 4 },
{ .description = "IRQ 5", .value = 5 },
{ .description = "IRQ 7", .value = 7 },
{ .description = "IRQ 9", .value = 9 },
{ .description = "IRQ 10", .value = 10 },
{ .description = "IRQ 11", .value = 11 },
{ .description = "IRQ 12", .value = 12 },
{ .description = "IRQ 15", .value = 15 },
{ .description = "" }
{ .description = "" }
},
.bios = { { 0 } }
},
{
.name = "mac",
.description = "MAC Address",
.type = CONFIG_MAC,
.name = "mac",
.description = "MAC Address",
.type = CONFIG_MAC,
.default_string = "",
.default_int = -1
.default_int = -1,
.file_filter = NULL,
.spinner = { 0 },
.selection = { { 0 } },
.bios = { { 0 } }
},
{ .name = "", .description = "", .type = CONFIG_END }
};

View File

@@ -3315,11 +3315,15 @@ nic_close(void *priv)
// clang-format off
static const device_config_t rtl8139c_config[] = {
{
.name = "mac",
.description = "MAC Address",
.type = CONFIG_MAC,
.default_string = "",
.default_int = -1
.name = "mac",
.description = "MAC Address",
.type = CONFIG_MAC,
.default_string = NULL,
.default_int = -1,
.file_filter = NULL,
.spinner = { 0 },
.selection = { { 0 } },
.bios = { { 0 } }
},
{ .name = "", .description = "", .type = CONFIG_END }
};

View File

@@ -1664,29 +1664,41 @@ nic_close(void *priv)
// clang-format off
static const device_config_t dec_tulip_21143_config[] = {
{
.name = "mac",
.description = "MAC Address",
.type = CONFIG_MAC,
.default_string = "",
.default_int = -1
.name = "mac",
.description = "MAC Address",
.type = CONFIG_MAC,
.default_string = NULL,
.default_int = -1,
.file_filter = NULL,
.spinner = { 0 },
.selection = { { 0 } },
.bios = { { 0 } }
},
{ .name = "", .description = "", .type = CONFIG_END }
};
static const device_config_t dec_tulip_21140_config[] = {
{
.name = "bios",
.description = "Enable BIOS",
.type = CONFIG_BINARY,
.default_string = "",
.default_int = 0
.name = "bios",
.description = "Enable BIOS",
.type = CONFIG_BINARY,
.default_string = NULL,
.default_int = 0,
.file_filter = NULL,
.spinner = { 0 },
.selection = { { 0 } },
.bios = { { 0 } }
},
{
.name = "mac",
.description = "MAC Address",
.type = CONFIG_MAC,
.default_string = "",
.default_int = -1
.name = "mac",
.description = "MAC Address",
.type = CONFIG_MAC,
.default_string = NULL,
.default_int = -1,
.file_filter = NULL,
.spinner = { 0 },
.selection = { { 0 } },
.bios = { { 0 } }
},
{ .name = "", .description = "", .type = CONFIG_END }
};

View File

@@ -806,46 +806,48 @@ wd_close(void *priv)
// clang-format off
static const device_config_t wd8003_config[] = {
{
.name = "base",
.description = "Address",
.type = CONFIG_HEX16,
.default_string = "",
.default_int = 0x300,
.file_filter = "",
.spinner = { 0 },
.selection = {
.name = "base",
.description = "Address",
.type = CONFIG_HEX16,
.default_string = NULL,
.default_int = 0x300,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "0x240", .value = 0x240 },
{ .description = "0x280", .value = 0x280 },
{ .description = "0x300", .value = 0x300 },
{ .description = "0x380", .value = 0x380 },
{ .description = "" }
},
.bios = { { 0 } }
},
{
.name = "irq",
.description = "IRQ",
.type = CONFIG_SELECTION,
.default_string = "",
.default_int = 3,
.file_filter = "",
.spinner = { 0 },
.selection = {
.name = "irq",
.description = "IRQ",
.type = CONFIG_SELECTION,
.default_string = NULL,
.default_int = 3,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "IRQ 2", .value = 2 },
{ .description = "IRQ 3", .value = 3 },
{ .description = "IRQ 5", .value = 5 },
{ .description = "IRQ 7", .value = 7 },
{ .description = "" }
},
.bios = { { 0 } }
},
{
.name = "ram_addr",
.description = "RAM Address",
.type = CONFIG_HEX20,
.default_string = "",
.default_int = 0xD0000,
.file_filter = "",
.spinner = { 0 },
.selection = {
.name = "ram_addr",
.description = "RAM Address",
.type = CONFIG_HEX20,
.default_string = NULL,
.default_int = 0xD0000,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "C800", .value = 0xC8000 },
{ .description = "CC00", .value = 0xCC000 },
{ .description = "D000", .value = 0xD0000 },
@@ -854,27 +856,32 @@ static const device_config_t wd8003_config[] = {
{ .description = "DC00", .value = 0xDC000 },
{ .description = "" }
},
.bios = { { 0 } }
},
{
.name = "mac",
.description = "MAC Address",
.type = CONFIG_MAC,
.default_string = "",
.default_int = -1
.name = "mac",
.description = "MAC Address",
.type = CONFIG_MAC,
.default_string = NULL,
.default_int = -1,
.file_filter = NULL,
.spinner = { 0 },
.selection = { { 0 } },
.bios = { { 0 } }
},
{ .name = "", .description = "", .type = CONFIG_END }
};
static const device_config_t wd8003eb_config[] = {
{
.name = "base",
.description = "Address",
.type = CONFIG_HEX16,
.default_string = "",
.default_int = 0x280,
.file_filter = "",
.spinner = { 0 },
.selection = {
.name = "base",
.description = "Address",
.type = CONFIG_HEX16,
.default_string = NULL,
.default_int = 0x280,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "0x200", .value = 0x200 },
{ .description = "0x220", .value = 0x220 },
{ .description = "0x240", .value = 0x240 },
@@ -887,32 +894,34 @@ static const device_config_t wd8003eb_config[] = {
{ .description = "0x380", .value = 0x380 },
{ .description = "" }
},
.bios = { { 0 } }
},
{
.name = "irq",
.description = "IRQ",
.type = CONFIG_SELECTION,
.default_string = "",
.default_int = 3,
.file_filter = "",
.spinner = { 0 },
.selection = {
.name = "irq",
.description = "IRQ",
.type = CONFIG_SELECTION,
.default_string = NULL,
.default_int = 3,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "IRQ 2/9", .value = 9 },
{ .description = "IRQ 3", .value = 3 },
{ .description = "IRQ 4", .value = 4 },
{ .description = "IRQ 7", .value = 7 },
{ .description = "" }
},
.bios = { { 0 } }
},
{
.name = "ram_addr",
.description = "RAM Address",
.type = CONFIG_HEX20,
.default_string = "",
.default_int = 0xD0000,
.file_filter = "",
.spinner = { 0 },
.selection = {
.name = "ram_addr",
.description = "RAM Address",
.type = CONFIG_HEX20,
.default_string = NULL,
.default_int = 0xD0000,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "C000", .value = 0xC0000 },
{ .description = "C400", .value = 0xC4000 },
{ .description = "C800", .value = 0xC8000 },
@@ -923,27 +932,33 @@ static const device_config_t wd8003eb_config[] = {
{ .description = "DC00", .value = 0xDC000 },
{ .description = "" }
},
.bios = { { 0 } }
},
{
.name = "ram_size",
.description = "RAM size",
.type = CONFIG_SELECTION,
.default_string = "",
.default_int = 8192,
.file_filter = "",
.spinner = { 0 },
.selection = {
.name = "ram_size",
.description = "RAM size",
.type = CONFIG_SELECTION,
.default_string = NULL,
.default_int = 8192,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "8 KB", .value = 8192 },
{ .description = "32 KB", .value = 32768 },
{ .description = "" }
},
.bios = { { 0 } }
},
{
.name = "mac",
.description = "MAC Address",
.type = CONFIG_MAC,
.default_string = "",
.default_int = -1
.name = "mac",
.description = "MAC Address",
.type = CONFIG_MAC,
.default_string = NULL,
.default_int = -1,
.file_filter = NULL,
.spinner = { 0 },
.selection = { { 0 } },
.bios = { { 0 } }
},
{ .name = "", .description = "", .type = CONFIG_END }
};
@@ -952,14 +967,14 @@ static const device_config_t wd8003eb_config[] = {
http://www.stack.nl/~marcolz/network/wd80x3.html#WD8013EBT */
static const device_config_t wd8013_config[] = {
{
.name = "base",
.description = "Address",
.type = CONFIG_HEX16,
.default_string = "",
.default_int = 0x280,
.file_filter = "",
.spinner = { 0 },
.selection = {
.name = "base",
.description = "Address",
.type = CONFIG_HEX16,
.default_string = NULL,
.default_int = 0x280,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "0x200", .value = 0x200 },
{ .description = "0x220", .value = 0x220 },
{ .description = "0x240", .value = 0x240 },
@@ -972,16 +987,17 @@ static const device_config_t wd8013_config[] = {
{ .description = "0x380", .value = 0x380 },
{ .description = "" }
},
.bios = { { 0 } }
},
{
.name = "irq",
.description = "IRQ",
.type = CONFIG_SELECTION,
.default_string = "",
.default_int = 3,
.file_filter = "",
.spinner = { 0 },
.selection = {
.name = "irq",
.description = "IRQ",
.type = CONFIG_SELECTION,
.default_string = NULL,
.default_int = 3,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "IRQ 2/9", .value = 9 },
{ .description = "IRQ 3", .value = 3 },
{ .description = "IRQ 4", .value = 4 },
@@ -992,16 +1008,17 @@ static const device_config_t wd8013_config[] = {
{ .description = "IRQ 15", .value = 15 },
{ .description = "" }
},
.bios = { { 0 } }
},
{
.name = "ram_addr",
.description = "RAM Address",
.type = CONFIG_HEX20,
.default_string = "",
.default_int = 0xD0000,
.file_filter = "",
.spinner = { 0 },
.selection = {
.name = "ram_addr",
.description = "RAM Address",
.type = CONFIG_HEX20,
.default_string = NULL,
.default_int = 0xD0000,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "C000", .value = 0xC0000 },
{ .description = "C400", .value = 0xC4000 },
{ .description = "C800", .value = 0xC8000 },
@@ -1012,63 +1029,78 @@ static const device_config_t wd8013_config[] = {
{ .description = "DC00", .value = 0xDC000 },
{ .description = "" }
},
.bios = { { 0 } }
},
{
.name = "ram_size",
.description = "RAM size",
.type = CONFIG_SELECTION,
.default_string = "",
.default_int = 16384,
.file_filter = "",
.spinner = { 0 },
.selection = {
.name = "ram_size",
.description = "RAM size",
.type = CONFIG_SELECTION,
.default_string = NULL,
.default_int = 16384,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "16 KB", .value = 16384 },
{ .description = "64 KB", .value = 65536 },
{ .description = "" }
},
.bios = { { 0 } }
},
{
.name = "mac",
.description = "MAC Address",
.type = CONFIG_MAC,
.default_string = "",
.default_int = -1
.name = "mac",
.description = "MAC Address",
.type = CONFIG_MAC,
.default_string = NULL,
.default_int = -1,
.file_filter = NULL,
.spinner = { 0 },
.selection = { { 0 } },
.bios = { { 0 } }
},
{ .name = "", .description = "", .type = CONFIG_END }
};
static const device_config_t wd8013epa_config[] = {
{
.name = "ram_size",
.description = "Initial RAM size",
.type = CONFIG_SELECTION,
.default_string = "",
.default_int = 16384,
.file_filter = "",
.spinner = { 0 },
.selection = {
.name = "ram_size",
.description = "Initial RAM size",
.type = CONFIG_SELECTION,
.default_string = NULL,
.default_int = 16384,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "8 KB", .value = 8192 },
{ .description = "16 KB", .value = 16384 },
{ .description = "" }
},
.bios = { { 0 } }
},
{
.name = "mac",
.description = "MAC Address",
.type = CONFIG_MAC,
.default_string = "",
.default_int = -1
.name = "mac",
.description = "MAC Address",
.type = CONFIG_MAC,
.default_string = NULL,
.default_int = -1,
.file_filter = NULL,
.spinner = { 0 },
.selection = { { 0 } },
.bios = { { 0 } }
},
{ .name = "", .description = "", .type = CONFIG_END }
};
static const device_config_t mca_mac_config[] = {
{
.name = "mac",
.description = "MAC Address",
.type = CONFIG_MAC,
.default_string = "",
.default_int = -1
.name = "mac",
.description = "MAC Address",
.type = CONFIG_MAC,
.default_string = NULL,
.default_int = -1,
.file_filter = NULL,
.spinner = { 0 },
.selection = { { 0 } },
.bios = { { 0 } }
},
{ .name = "", .description = "", .type = CONFIG_END }
};

View File

@@ -1158,14 +1158,14 @@ aha_init(const device_t *info)
// clang-format off
static const device_config_t aha_154xb_config[] = {
{
.name = "base",
.description = "Address",
.type = CONFIG_HEX16,
.default_string = "",
.default_int = 0x334,
.file_filter = "",
.spinner = { 0 },
.selection = {
.name = "base",
.description = "Address",
.type = CONFIG_HEX16,
.default_string = NULL,
.default_int = 0x334,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "None", .value = 0 },
{ .description = "0x330", .value = 0x330 },
{ .description = "0x334", .value = 0x334 },
@@ -1175,16 +1175,17 @@ static const device_config_t aha_154xb_config[] = {
{ .description = "0x134", .value = 0x134 },
{ .description = "" }
},
.bios = { { 0 } }
},
{
.name = "irq",
.description = "IRQ",
.type = CONFIG_SELECTION,
.default_string = "",
.default_int = 11,
.file_filter = "",
.spinner = { 0 },
.selection = {
.name = "irq",
.description = "IRQ",
.type = CONFIG_SELECTION,
.default_string = NULL,
.default_int = 11,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "IRQ 9", .value = 9 },
{ .description = "IRQ 10", .value = 10 },
{ .description = "IRQ 11", .value = 11 },
@@ -1193,31 +1194,33 @@ static const device_config_t aha_154xb_config[] = {
{ .description = "IRQ 15", .value = 15 },
{ .description = "" }
},
.bios = { { 0 } }
},
{
.name = "dma",
.description = "DMA",
.type = CONFIG_SELECTION,
.default_string = "",
.default_int = 6,
.file_filter = "",
.spinner = { 0 },
.selection = {
.name = "dma",
.description = "DMA",
.type = CONFIG_SELECTION,
.default_string = NULL,
.default_int = 6,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "DMA 5", .value = 5 },
{ .description = "DMA 6", .value = 6 },
{ .description = "DMA 7", .value = 7 },
{ .description = "" }
},
.bios = { { 0 } }
},
{
.name = "hostid",
.description = "Host ID",
.type = CONFIG_SELECTION,
.default_string = "",
.default_int = 7,
.file_filter = "",
.spinner = { 0 },
.selection = {
.name = "hostid",
.description = "Host ID",
.type = CONFIG_SELECTION,
.default_string = NULL,
.default_int = 7,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "0", .value = 0 },
{ .description = "1", .value = 1 },
{ .description = "2", .value = 2 },
@@ -1228,16 +1231,17 @@ static const device_config_t aha_154xb_config[] = {
{ .description = "7", .value = 7 },
{ .description = "" }
},
.bios = { { 0 } }
},
{
.name = "bios_addr",
.description = "BIOS Address",
.type = CONFIG_HEX20,
.default_string = "",
.default_int = 0,
.file_filter = "",
.spinner = { 0 },
.selection = {
.name = "bios_addr",
.description = "BIOS Address",
.type = CONFIG_HEX20,
.default_string = NULL,
.default_int = 0,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "Disabled", .value = 0 },
{ .description = "C800H", .value = 0xc8000 },
{ .description = "D000H", .value = 0xd0000 },
@@ -1245,20 +1249,21 @@ static const device_config_t aha_154xb_config[] = {
{ .description = "DC00H", .value = 0xdc000 },
{ .description = "" }
},
.bios = { { 0 } }
},
{ .name = "", .description = "", .type = CONFIG_END }
};
static const device_config_t aha_154x_config[] = {
{
.name = "base",
.description = "Address",
.type = CONFIG_HEX16,
.default_string = "",
.default_int = 0x334,
.file_filter = "",
.spinner = { 0 },
.selection = {
.name = "base",
.description = "Address",
.type = CONFIG_HEX16,
.default_string = NULL,
.default_int = 0x334,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "None", .value = 0 },
{ .description = "0x330", .value = 0x330 },
{ .description = "0x334", .value = 0x334 },
@@ -1268,16 +1273,17 @@ static const device_config_t aha_154x_config[] = {
{ .description = "0x134", .value = 0x134 },
{ .description = "" }
},
.bios = { { 0 } }
},
{
.name = "irq",
.description = "IRQ",
.type = CONFIG_SELECTION,
.default_string = "",
.default_int = 11,
.file_filter = "",
.spinner = { 0 },
.selection = {
.name = "irq",
.description = "IRQ",
.type = CONFIG_SELECTION,
.default_string = NULL,
.default_int = 11,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "IRQ 9", .value = 9 },
{ .description = "IRQ 10", .value = 10 },
{ .description = "IRQ 11", .value = 11 },
@@ -1286,52 +1292,55 @@ static const device_config_t aha_154x_config[] = {
{ .description = "IRQ 15", .value = 15 },
{ .description = "" }
},
.bios = { { 0 } }
},
{
.name = "dma",
.description = "DMA",
.type = CONFIG_SELECTION,
.default_string = "",
.default_int = 6,
.file_filter = "",
.spinner = { 0 },
.selection = {
.name = "dma",
.description = "DMA",
.type = CONFIG_SELECTION,
.default_string = NULL,
.default_int = 6,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "DMA 5", .value = 5 },
{ .description = "DMA 6", .value = 6 },
{ .description = "DMA 7", .value = 7 },
{ .description = "" }
},
.bios = { { 0 } }
},
{
.name = "bios_addr",
.description = "BIOS Address",
.type = CONFIG_HEX20,
.default_string = "",
.default_int = 0,
.file_filter = "",
.spinner = { 0 },
.selection = {
.name = "bios_addr",
.description = "BIOS Address",
.type = CONFIG_HEX20,
.default_string = NULL,
.default_int = 0,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "Disabled", .value = 0 },
{ .description = "C800H", .value = 0xc8000 },
{ .description = "D000H", .value = 0xd0000 },
{ .description = "D800H", .value = 0xd8000 },
{ .description = "DC00H", .value = 0xdc000 },
{ .description = "" }
},
},
.bios = { { 0 } }
},
{ .name = "", .description = "", .type = CONFIG_END }
};
static const device_config_t aha_154xcf_config[] = {
{
.name = "base",
.description = "Address",
.type = CONFIG_HEX16,
.default_string = "",
.default_int = 0x334,
.file_filter = "",
.spinner = { 0 },
.selection = {
.name = "base",
.description = "Address",
.type = CONFIG_HEX16,
.default_string = NULL,
.default_int = 0x334,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "None", .value = 0 },
{ .description = "0x330", .value = 0x330 },
{ .description = "0x334", .value = 0x334 },
@@ -1341,16 +1350,17 @@ static const device_config_t aha_154xcf_config[] = {
{ .description = "0x134", .value = 0x134 },
{ .description = "" }
},
.bios = { { 0 } }
},
{
.name = "irq",
.description = "IRQ",
.type = CONFIG_SELECTION,
.default_string = "",
.default_int = 11,
.file_filter = "",
.spinner = { 0 },
.selection = {
.name = "irq",
.description = "IRQ",
.type = CONFIG_SELECTION,
.default_string = NULL,
.default_int = 11,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "IRQ 9", .value = 9 },
{ .description = "IRQ 10", .value = 10 },
{ .description = "IRQ 11", .value = 11 },
@@ -1359,31 +1369,33 @@ static const device_config_t aha_154xcf_config[] = {
{ .description = "IRQ 15", .value = 15 },
{ .description = "" }
},
.bios = { { 0 } }
},
{
.name = "dma",
.description = "DMA",
.type = CONFIG_SELECTION,
.default_string = "",
.default_int = 6,
.file_filter = "",
.spinner = { 0 },
.selection = {
.name = "dma",
.description = "DMA",
.type = CONFIG_SELECTION,
.default_string = NULL,
.default_int = 6,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "DMA 5", .value = 5 },
{ .description = "DMA 6", .value = 6 },
{ .description = "DMA 7", .value = 7 },
{ .description = "" }
},
.bios = { { 0 } }
},
{
.name = "bios_addr",
.description = "BIOS Address",
.type = CONFIG_HEX20,
.default_string = "",
.default_int = 0,
.file_filter = "",
.spinner = { 0 },
.selection = {
.name = "bios_addr",
.description = "BIOS Address",
.type = CONFIG_HEX20,
.default_string = NULL,
.default_int = 0,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "Disabled", .value = 0 },
{ .description = "C800H", .value = 0xc8000 },
{ .description = "CC00H", .value = 0xcc000 },
@@ -1393,44 +1405,64 @@ static const device_config_t aha_154xcf_config[] = {
{ .description = "DC00H", .value = 0xdc000 },
{ .description = "" }
},
.bios = { { 0 } }
},
{
.name = "fdc_addr",
.description = "FDC Address",
.type = CONFIG_HEX16,
.default_string = "",
.default_int = 0,
.file_filter = "",
.spinner = { 0 },
.selection = {
.name = "fdc_addr",
.description = "FDC Address",
.type = CONFIG_HEX16,
.default_string = NULL,
.default_int = 0,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "None", .value = 0 },
{ .description = "0x3f0", .value = FDC_PRIMARY_ADDR },
{ .description = "0x370", .value = FDC_SECONDARY_ADDR },
{ .description = "" }
},
.bios = { { 0 } }
},
{ .name = "", .description = "", .type = CONFIG_END }
};
static const device_config_t aha_154xcp_config[] = {
{
.name = "bios_rev",
.description = "BIOS Revision",
.type = CONFIG_BIOS,
.name = "bios_rev",
.description = "BIOS Revision",
.type = CONFIG_BIOS,
.default_string = "v1_02_en",
.default_int = 0,
.file_filter = "",
.spinner = { 0 },
.bios = {
{ .name = "Version 1.02 (English)", .internal_name = "v1_02_en", .bios_type = BIOS_NORMAL,
.files_no = 2, .local = 0, .size = 32768, .files = { "roms/scsi/adaptec/aha1542cp102.bin",
"roms/scsi/adaptec/908301-00_f_mcode_17c9.u12", "" } },
{ .name = "Version 1.02 (German)", .internal_name = "v1_02_de", .bios_type = BIOS_NORMAL,
.files_no = 2, .local = 0, .size = 32768, .files = { "roms/scsi/adaptec/buff_1-0_bios.bin",
"roms/scsi/adaptec/buff_1-0_mcode.bin", "" } },
{ .name = "Version 1.03 (English)", .internal_name = "v1_03_en", .bios_type = BIOS_NORMAL,
.files_no = 2, .local = 0, .size = 32768, .files = { "roms/scsi/adaptec/aha1542cp103.bin",
"roms/scsi/adaptec/908301-00_g_mcode_144c.u12.bin", "" } },
.default_int = 0,
.file_filter = NULL,
.spinner = { 0 },
.bios = {
{
.name = "Version 1.02 (English)",
.internal_name = "v1_02_en",
.bios_type = BIOS_NORMAL,
.files_no = 2,
.local = 0,
.size = 32768,
.files = { "roms/scsi/adaptec/aha1542cp102.bin", "roms/scsi/adaptec/908301-00_f_mcode_17c9.u12", "" }
},
{
.name = "Version 1.02 (German)",
.internal_name = "v1_02_de",
.bios_type = BIOS_NORMAL,
.files_no = 2,
.local = 0,
.size = 32768,
.files = { "roms/scsi/adaptec/buff_1-0_bios.bin", "roms/scsi/adaptec/buff_1-0_mcode.bin", "" }
},
{
.name = "Version 1.03 (English)",
.internal_name = "v1_03_en",
.bios_type = BIOS_NORMAL,
.files_no = 2,
.local = 0,
.size = 32768,
.files = { "roms/scsi/adaptec/aha1542cp103.bin", "roms/scsi/adaptec/908301-00_g_mcode_144c.u12.bin", "" }
},
{ .files_no = 0 }
},
},

View File

@@ -1780,14 +1780,14 @@ buslogic_init(const device_t *info)
// clang-format off
static const device_config_t BT_ISA_Config[] = {
{
.name = "base",
.description = "Address",
.type = CONFIG_HEX16,
.default_string = "",
.default_int = 0x334,
.file_filter = "",
.spinner = { 0 },
.selection = {
.name = "base",
.description = "Address",
.type = CONFIG_HEX16,
.default_string = NULL,
.default_int = 0x334,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "0x330", .value = 0x330 },
{ .description = "0x334", .value = 0x334 },
{ .description = "0x230", .value = 0x230 },
@@ -1796,16 +1796,17 @@ static const device_config_t BT_ISA_Config[] = {
{ .description = "0x134", .value = 0x134 },
{ .description = "", .value = 0 }
},
.bios = { { 0 } }
},
{
.name = "irq",
.description = "IRQ",
.type = CONFIG_SELECTION,
.default_string = "",
.default_int = 11,
.file_filter = "",
.spinner = { 0 },
.selection = {
.name = "irq",
.description = "IRQ",
.type = CONFIG_SELECTION,
.default_string = NULL,
.default_int = 11,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "IRQ 9", .value = 9 },
{ .description = "IRQ 10", .value = 10 },
{ .description = "IRQ 11", .value = 11 },
@@ -1814,48 +1815,55 @@ static const device_config_t BT_ISA_Config[] = {
{ .description = "IRQ 15", .value = 15 },
{ .description = "", 0 }
},
.bios = { { 0 } }
},
{
.name = "dma",
.description = "DMA",
.type = CONFIG_SELECTION,
.default_string = "",
.default_int = 6,
.file_filter = "",
.spinner = { 0 },
.selection = {
.name = "dma",
.description = "DMA",
.type = CONFIG_SELECTION,
.default_string = NULL,
.default_int = 6,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "DMA 5", .value = 5 },
{ .description = "DMA 6", .value = 6 },
{ .description = "DMA 7", .value = 7 },
{ .description = "", .value = 0 }
},
.bios = { { 0 } }
},
{
.name = "bios_addr",
.description = "BIOS Address",
.type = CONFIG_HEX20,
.default_string = "",
.default_int = 0,
.file_filter = "",
.spinner = { 0 },
.selection = {
.name = "bios_addr",
.description = "BIOS Address",
.type = CONFIG_HEX20,
.default_string = NULL,
.default_int = 0,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "Disabled", .value = 0 },
{ .description = "C800H", .value = 0xc8000 },
{ .description = "D000H", .value = 0xd0000 },
{ .description = "D800H", .value = 0xd8000 },
{ .description = "", .value = 0 }
},
.bios = { { 0 } }
},
{ .name = "", .description = "", .type = CONFIG_END }
};
static const device_config_t BT958D_Config[] = {
{
.name = "bios",
.description = "Enable BIOS",
.type = CONFIG_BINARY,
.default_string = "",
.default_int = 0
.name = "bios",
.description = "Enable BIOS",
.type = CONFIG_BINARY,
.default_string = NULL,
.default_int = 0,
.file_filter = NULL,
.spinner = { 0 },
.selection = { { 0 } },
.bios = { { 0 } }
},
{ .name = "", .description = "", .type = CONFIG_END }
};

View File

@@ -778,14 +778,14 @@ corel_ls2000_available(void)
// clang-format off
static const device_config_t ncr53c400_mmio_config[] = {
{
.name = "bios_addr",
.description = "BIOS Address",
.type = CONFIG_HEX20,
.default_string = "",
.default_int = 0xD8000,
.file_filter = "",
.spinner = { 0 },
.selection = {
.name = "bios_addr",
.description = "BIOS Address",
.type = CONFIG_HEX20,
.default_string = NULL,
.default_int = 0xD8000,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "C800H", .value = 0xc8000 },
{ .description = "CC00H", .value = 0xcc000 },
{ .description = "D000H", .value = 0xd0000 },
@@ -794,36 +794,38 @@ static const device_config_t ncr53c400_mmio_config[] = {
{ .description = "DC00H", .value = 0xdc000 },
{ .description = "" }
},
.bios = { { 0 } }
},
{
.name = "irq",
.description = "IRQ",
.type = CONFIG_SELECTION,
.default_string = "",
.default_int = 5,
.file_filter = "",
.spinner = { 0 },
.selection = {
.name = "irq",
.description = "IRQ",
.type = CONFIG_SELECTION,
.default_string = NULL,
.default_int = 5,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "None", .value = -1 },
{ .description = "IRQ 3", .value = 3 },
{ .description = "IRQ 5", .value = 5 },
{ .description = "IRQ 7", .value = 7 },
{ .description = "" }
{ .description = "IRQ 3", .value = 3 },
{ .description = "IRQ 5", .value = 5 },
{ .description = "IRQ 7", .value = 7 },
{ .description = "" }
},
.bios = { { 0 } }
},
{ .name = "", .description = "", .type = CONFIG_END }
};
static const device_config_t rt1000b_config[] = {
{
.name = "bios_addr",
.description = "BIOS Address",
.type = CONFIG_HEX20,
.default_string = "",
.default_int = 0xD8000,
.file_filter = "",
.spinner = { 0 },
.selection = {
.name = "bios_addr",
.description = "BIOS Address",
.type = CONFIG_HEX20,
.default_string = NULL,
.default_int = 0xD8000,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "C800H", .value = 0xc8000 },
{ .description = "CC00H", .value = 0xcc000 },
{ .description = "D000H", .value = 0xd0000 },
@@ -832,36 +834,53 @@ static const device_config_t rt1000b_config[] = {
{ .description = "DC00H", .value = 0xdc000 },
{ .description = "" }
},
.bios = { { 0 } }
},
{
.name = "irq",
.description = "IRQ",
.type = CONFIG_SELECTION,
.default_string = "",
.default_int = 5,
.file_filter = "",
.spinner = { 0 },
.selection = {
.name = "irq",
.description = "IRQ",
.type = CONFIG_SELECTION,
.default_string = NULL,
.default_int = 5,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "None", .value = -1 },
{ .description = "IRQ 3", .value = 3 },
{ .description = "IRQ 5", .value = 5 },
{ .description = "IRQ 7", .value = 7 },
{ .description = "" }
{ .description = "IRQ 3", .value = 3 },
{ .description = "IRQ 5", .value = 5 },
{ .description = "IRQ 7", .value = 7 },
{ .description = "" }
},
.bios = { { 0 } }
},
{
.name = "bios_ver",
.description = "BIOS Revision",
.type = CONFIG_BIOS,
.name = "bios_ver",
.description = "BIOS Revision",
.type = CONFIG_BIOS,
.default_string = "v8_10r",
.default_int = 0,
.file_filter = "",
.spinner = { 0 },
.default_int = 0,
.file_filter = NULL,
.spinner = { 0 },
.selection = { { 0 } },
.bios = {
{ .name = "Version 8.10R", .internal_name = "v8_10r", .bios_type = BIOS_NORMAL,
.files_no = 1, .local = 0, .size = 8192, .files = { RT1000B_810R_ROM, "" } },
{ .name = "Version 8.20R", .internal_name = "v8_20r", .bios_type = BIOS_NORMAL,
.files_no = 1, .local = 0, .size = 8192, .files = { RT1000B_820R_ROM, "" } },
{
.name = "Version 8.10R",
.internal_name = "v8_10r",
.bios_type = BIOS_NORMAL,
.files_no = 1,
.local = 0,
.size = 8192,
.files = { RT1000B_810R_ROM, "" }
},
{
.name = "Version 8.20R",
.internal_name = "v8_20r",
.bios_type = BIOS_NORMAL,
.files_no = 1,
.local = 0,
.size = 8192,
.files = { RT1000B_820R_ROM, "" }
},
{ .files_no = 0 }
},
},
@@ -870,34 +889,35 @@ static const device_config_t rt1000b_config[] = {
static const device_config_t rt1000b_mc_config[] = {
{
.name = "irq",
.description = "IRQ",
.type = CONFIG_SELECTION,
.default_string = "",
.default_int = 5,
.file_filter = "",
.spinner = { 0 },
.selection = {
.name = "irq",
.description = "IRQ",
.type = CONFIG_SELECTION,
.default_string = NULL,
.default_int = 5,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "None", .value = -1 },
{ .description = "IRQ 3", .value = 3 },
{ .description = "IRQ 5", .value = 5 },
{ .description = "IRQ 7", .value = 7 },
{ .description = "" }
{ .description = "IRQ 3", .value = 3 },
{ .description = "IRQ 5", .value = 5 },
{ .description = "IRQ 7", .value = 7 },
{ .description = "" }
},
.bios = { { 0 } }
},
{ .name = "", .description = "", .type = CONFIG_END }
};
static const device_config_t t130b_config[] = {
{
.name = "bios_addr",
.description = "BIOS Address",
.type = CONFIG_HEX20,
.default_string = "",
.default_int = 0xD8000,
.file_filter = "",
.spinner = { 0 },
.selection = {
.name = "bios_addr",
.description = "BIOS Address",
.type = CONFIG_HEX20,
.default_string = NULL,
.default_int = 0xD8000,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "Disabled", .value = 0 },
{ .description = "C800H", .value = 0xc8000 },
{ .description = "CC00H", .value = 0xcc000 },
@@ -905,38 +925,41 @@ static const device_config_t t130b_config[] = {
{ .description = "DC00H", .value = 0xdc000 },
{ .description = "" }
},
.bios = { { 0 } }
},
{
.name = "base",
.description = "Address",
.type = CONFIG_HEX16,
.default_string = "",
.default_int = 0x0350,
.file_filter = "",
.spinner = { 0 },
.selection = {
.name = "base",
.description = "Address",
.type = CONFIG_HEX16,
.default_string = NULL,
.default_int = 0x0350,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "240H", .value = 0x0240 },
{ .description = "250H", .value = 0x0250 },
{ .description = "340H", .value = 0x0340 },
{ .description = "350H", .value = 0x0350 },
{ .description = "" }
},
.bios = { { 0 } }
},
{
.name = "irq",
.description = "IRQ",
.type = CONFIG_SELECTION,
.default_string = "",
.default_int = 5,
.file_filter = "",
.spinner = { 0 },
.selection = {
.name = "irq",
.description = "IRQ",
.type = CONFIG_SELECTION,
.default_string = NULL,
.default_int = 5,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "None", .value = -1 },
{ .description = "IRQ 3", .value = 3 },
{ .description = "IRQ 5", .value = 5 },
{ .description = "IRQ 7", .value = 7 },
{ .description = "" }
{ .description = "IRQ 3", .value = 3 },
{ .description = "IRQ 5", .value = 5 },
{ .description = "IRQ 7", .value = 7 },
{ .description = "" }
},
.bios = { { 0 } }
},
{ .name = "", .description = "", .type = CONFIG_END }
};

View File

@@ -2663,19 +2663,20 @@ ncr53c8xx_close(void *priv)
static const device_config_t ncr53c8xx_pci_config[] = {
// clang-format off
{
.name = "bios",
.description = "BIOS Revision",
.type = CONFIG_SELECTION,
.default_string = "",
.default_int = 1,
.file_filter = "",
.spinner = { 0 },
.selection = {
.name = "bios",
.description = "BIOS Revision",
.type = CONFIG_SELECTION,
.default_string = NULL,
.default_int = 1,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "SDMS 4.x BIOS", .value = 2 },
{ .description = "SDMS 3.x BIOS", .value = 1 },
{ .description = "Disable BIOS", .value = 0 },
{ .description = "" }
},
.bios = { { 0 } }
},
{ .name = "", .description = "", .type = CONFIG_END }
// clang-format on

View File

@@ -2458,11 +2458,15 @@ esp_close(void *priv)
static const device_config_t bios_enable_config[] = {
// clang-format off
{
.name = "bios",
.description = "Enable BIOS",
.type = CONFIG_BINARY,
.default_string = "",
.default_int = 0
.name = "bios",
.description = "Enable BIOS",
.type = CONFIG_BINARY,
.default_string = NULL,
.default_int = 0,
.file_filter = NULL,
.spinner = { 0 },
.selection = { { 0 } },
.bios = { { 0 } }
},
{ .name = "", .description = "", .type = CONFIG_END }
// clang-format on

View File

@@ -1231,18 +1231,19 @@ spock_available(void)
static const device_config_t spock_rom_config[] = {
// clang-format off
{
.name = "bios_ver",
.description = "BIOS Revision",
.type = CONFIG_SELECTION,
.default_string = "",
.default_int = 1,
.file_filter = "",
.spinner = { 0 },
.selection = {
.name = "bios_ver",
.description = "BIOS Revision",
.type = CONFIG_SELECTION,
.default_string = NULL,
.default_int = 1,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "1991 BIOS (>1GB)", .value = 1 },
{ .description = "1990 BIOS", .value = 0 },
{ .description = "" }
},
.bios = { { 0 } }
},
{ .name = "", .description = "", .type = CONFIG_END }
// clang-format on

View File

@@ -554,43 +554,49 @@ t128_available(void)
// clang-format off
static const device_config_t t128_config[] = {
{
.name = "bios_addr",
.description = "BIOS Address",
.type = CONFIG_HEX20,
.default_string = "",
.default_int = 0xD8000,
.file_filter = "",
.spinner = { 0 },
.selection = {
.name = "bios_addr",
.description = "BIOS Address",
.type = CONFIG_HEX20,
.default_string = NULL,
.default_int = 0xD8000,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "C800H", .value = 0xc8000 },
{ .description = "CC00H", .value = 0xcc000 },
{ .description = "D800H", .value = 0xd8000 },
{ .description = "DC00H", .value = 0xdc000 },
{ .description = "" }
},
.bios = { { 0 } }
},
{
.name = "irq",
.description = "IRQ",
.type = CONFIG_SELECTION,
.default_string = "",
.default_int = 5,
.file_filter = "",
.spinner = { 0 },
.selection = {
.name = "irq",
.description = "IRQ",
.type = CONFIG_SELECTION,
.default_string = NULL,
.default_int = 5,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "None", .value = -1 },
{ .description = "IRQ 3", .value = 3 },
{ .description = "IRQ 5", .value = 5 },
{ .description = "IRQ 7", .value = 7 },
{ .description = "" }
},
.bios = { { 0 } }
},
{
.name = "boot",
.description = "Enable BIOS",
.type = CONFIG_BINARY,
.default_string = "",
.default_int = 1
.name = "boot",
.description = "Enable BIOS",
.type = CONFIG_BINARY,
.default_string = NULL,
.default_int = 1,
.file_filter = NULL,
.spinner = { 0 },
.selection = { { 0 } },
.bios = { { 0 } }
},
{ .name = "", .description = "", .type = CONFIG_END }
};
@@ -618,6 +624,7 @@ const device_t scsi_t228_device = {
.local = 0,
.init = t128_init,
.close = t128_close,
.close = t128_close,
.reset = NULL,
.available = t128_available,
.speed_changed = NULL,

View File

@@ -319,153 +319,195 @@ fluidsynth_close(void *priv)
static const device_config_t fluidsynth_config[] = {
// clang-format off
{
.name = "sound_font",
.description = "SoundFont",
.type = CONFIG_FNAME,
.default_string = "",
.file_filter = "SF2 Sound Fonts (*.sf2)|*.sf2"
.name = "sound_font",
.description = "SoundFont",
.type = CONFIG_FNAME,
.default_string = NULL,
.default_int = 0,
.file_filter = "SF2 Sound Fonts (*.sf2)|*.sf2",
.spinner = { 0 },
.selection = { { 0 } },
.bios = { { 0 } }
},
{
.name = "output_gain",
.description = "Output Gain",
.type = CONFIG_SPINNER,
.spinner = {
.min = 0,
.name = "output_gain",
.description = "Output Gain",
.type = CONFIG_SPINNER,
.default_string = NULL,
.default_int = 100,
.file_filter = NULL,
.spinner = {
.min = 0,
.max = 100
},
.default_int = 100
.selection = { { 0 } },
.bios = { { 0 } }
},
{
.name = "chorus",
.description = "Chorus",
.type = CONFIG_BINARY,
.default_int = 1
.name = "chorus",
.description = "Chorus",
.type = CONFIG_BINARY,
.default_string = NULL,
.default_int = 1,
.file_filter = NULL,
.spinner = { 0 },
.selection = { { 0 } },
.bios = { { 0 } }
},
{
.name = "chorus_voices",
.description = "Chorus Voices",
.type = CONFIG_SPINNER,
.name = "chorus_voices",
.description = "Chorus Voices",
.type = CONFIG_SPINNER,
.default_string = NULL,
.default_int = 3,
.file_filter = NULL,
.spinner = {
.min = 0,
.min = 0,
.max = 99
},
.default_int = 3
.selection = { { 0 } },
.bios = { { 0 } }
},
{
.name = "chorus_level",
.description = "Chorus Level",
.type = CONFIG_SPINNER,
.spinner = {
.min = 0,
.name = "chorus_level",
.description = "Chorus Level",
.type = CONFIG_SPINNER,
.default_string = NULL,
.default_int = 20,
.file_filter = NULL,
.spinner = {
.min = 0,
.max = 100
},
.default_int = 20
.selection = { { 0 } },
.bios = { { 0 } }
},
{
.name = "chorus_speed",
.description = "Chorus Speed",
.type = CONFIG_SPINNER,
.name = "chorus_speed",
.description = "Chorus Speed",
.type = CONFIG_SPINNER,
.default_string = NULL,
.default_int = 30,
.file_filter = NULL,
.spinner = {
.min = 10,
.min = 10,
.max = 500
},
.default_int = 30
.selection = { { 0 } },
.bios = { { 0 } }
},
{
.name = "chorus_depth",
.description = "Chorus Depth",
.type = CONFIG_SPINNER,
.name = "chorus_depth",
.description = "Chorus Depth",
.type = CONFIG_SPINNER,
.default_string = NULL,
.default_int = 80,
.file_filter = NULL,
.spinner = {
.min = 0,
.min = 0,
.max = 2560
},
.default_int = 80
.selection = { { 0 } },
.bios = { { 0 } }
},
{
.name = "chorus_waveform",
.description = "Chorus Waveform",
.type = CONFIG_SELECTION,
.selection = {
{
.description = "Sine",
.value = 0
},
{
.description = "Triangle",
.value = 1
}
.name = "chorus_waveform",
.description = "Chorus Waveform",
.type = CONFIG_SELECTION,
.default_string = NULL,
.default_int = 0,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "Sine", .value = 0 },
{ .description = "Triangle", .value = 1 },
{ .description = "" }
},
.default_int = 0
.bios = { { 0 } }
},
{
.name = "reverb",
.description = "Reverb",
.type = CONFIG_BINARY,
.default_int = 1
.name = "reverb",
.description = "Reverb",
.type = CONFIG_BINARY,
.default_string = NULL,
.default_int = 1,
.file_filter = NULL,
.spinner = { 0 },
.selection = { { 0 } },
.bios = { { 0 } }
},
{
.name = "reverb_room_size",
.description = "Reverb Room Size",
.type = CONFIG_SPINNER,
.name = "reverb_room_size",
.description = "Reverb Room Size",
.type = CONFIG_SPINNER,
.default_string = NULL,
.default_int = 20,
.file_filter = NULL,
.spinner = {
.min = 0,
.min = 0,
.max = 100
},
.default_int = 20
.selection = { { 0 } },
.bios = { { 0 } }
},
{
.name = "reverb_damping",
.description = "Reverb Damping",
.type = CONFIG_SPINNER,
.name = "reverb_damping",
.description = "Reverb Damping",
.type = CONFIG_SPINNER,
.default_string = NULL,
.default_int = 0,
.file_filter = NULL,
.spinner = {
.min = 0,
.min = 0,
.max = 100
},
.default_int = 0
.selection = { { 0 } },
.bios = { { 0 } }
},
{
.name = "reverb_width",
.description = "Reverb Width",
.type = CONFIG_SPINNER,
.spinner = {
.min = 0,
.name = "reverb_width",
.description = "Reverb Width",
.type = CONFIG_SPINNER,
.default_string = NULL,
.default_int = 5,
.file_filter = NULL,
.spinner = {
.min = 0,
.max = 1000
},
.default_int = 5
.selection = { { 0 } },
.bios = { { 0 } }
},
{
.name = "reverb_level",
.description = "Reverb Level",
.type = CONFIG_SPINNER,
.spinner = {
.min = 0,
.name = "reverb_level",
.description = "Reverb Level",
.type = CONFIG_SPINNER,
.default_string = NULL,
.default_int = 90,
.file_filter = NULL,
.spinner = {
.min = 0,
.max = 100
},
.default_int = 90
.selection = { { 0 } },
.bios = { { 0 } }
},
{
.name = "interpolation",
.description = "Interpolation Method",
.type = CONFIG_SELECTION,
.selection = {
{
.description = "None",
.value = 0
},
{
.description = "Linear",
.value = 1
},
{
.description = "4th Order",
.value = 2
},
{
.description = "7th Order",
.value = 3
}
.name = "interpolation",
.description = "Interpolation Method",
.type = CONFIG_SELECTION,
.default_string = NULL,
.default_int = 2,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "None", .value = 0 },
{ .description = "Linear", .value = 1 },
{ .description = "4th Order", .value = 2 },
{ .description = "7th Order", .value = 3 },
{ .description = "" }
},
.default_int = 2
.bios = { { 0 } }
},
{ .name = "", .description = "", .type = CONFIG_END }
// clang-format on
@@ -484,4 +526,3 @@ const device_t fluidsynth_device = {
.force_redraw = NULL,
.config = fluidsynth_config
};

View File

@@ -377,42 +377,60 @@ mt32_close(void *priv)
static const device_config_t mt32_config[] = {
// clang-format off
{
.name = "output_gain",
.description = "Output Gain",
.type = CONFIG_SPINNER,
.spinner = {
.name = "output_gain",
.description = "Output Gain",
.type = CONFIG_SPINNER,
.default_string = NULL,
.default_int = 100,
.file_filter = NULL,
.spinner = {
.min = 0,
.max = 100
},
.selection = { { 0 } }
},
{
.name = "reverb",
.description = "Reverb",
.type = CONFIG_BINARY,
.default_string = NULL,
.default_int = 1,
.file_filter = NULL,
.spinner = { 0 },
.selection = { { 0 } }
},
{
.name = "reverb_output_gain",
.description = "Reverb Output Gain",
.type = CONFIG_SPINNER,
.default_string = NULL,
.default_int = 100,
.file_filter = NULL,
.spinner = {
.min = 0,
.max = 100
},
.default_int = 100
.selection = { { 0 } }
},
{
.name = "reverb",
.description = "Reverb",
.type = CONFIG_BINARY,
.default_int = 1
.name = "reversed_stereo",
.description = "Reversed stereo",
.type = CONFIG_BINARY,
.default_string = NULL,
.default_int = 0,
.file_filter = NULL,
.spinner = { 0 },
.selection = { { 0 } }
},
{
.name = "reverb_output_gain",
.description = "Reverb Output Gain",
.type = CONFIG_SPINNER,
.spinner = {
.min = 0,
.max = 100
},
.default_int = 100
},
{
.name = "reversed_stereo",
.description = "Reversed stereo",
.type = CONFIG_BINARY,
.default_int = 0
},
{
.name = "nice_ramp",
.description = "Nice ramp",
.type = CONFIG_BINARY,
.default_int = 1
.name = "nice_ramp",
.description = "Nice ramp",
.type = CONFIG_BINARY,
.default_string = NULL,
.default_int = 1,
.file_filter = NULL,
.spinner = { 0 },
.selection = { { 0 } }
},
{ .name = "", .description = "", .type = CONFIG_END }
// clang-format on

View File

@@ -231,11 +231,15 @@ rtmidi_in_get_dev_name(int num, char *s)
static const device_config_t system_midi_config[] = {
// clang-format off
{
.name = "midi",
.description = "MIDI Output Device",
.type = CONFIG_MIDI_OUT,
.default_string = "",
.default_int = 0
.name = "midi",
.description = "MIDI Output Device",
.type = CONFIG_MIDI_OUT,
.default_string = NULL,
.default_int = 0,
.file_filter = NULL,
.spinner = { 0 },
.selection = { { 0 } },
.bios = { { 0 } }
},
{ .name = "", .description = "", .type = CONFIG_END }
// clang-format on
@@ -244,32 +248,48 @@ static const device_config_t system_midi_config[] = {
static const device_config_t midi_input_config[] = {
// clang-format off
{
.name = "midi_input",
.description = "MIDI Input Device",
.type = CONFIG_MIDI_IN,
.default_string = "",
.default_int = 0
.name = "midi_input",
.description = "MIDI Input Device",
.type = CONFIG_MIDI_IN,
.default_string = NULL,
.default_int = 0,
.file_filter = NULL,
.spinner = { 0 },
.selection = { { 0 } },
.bios = { { 0 } }
},
{
.name = "realtime",
.description = "MIDI Real time",
.type = CONFIG_BINARY,
.default_string = "",
.default_int = 0
.name = "realtime",
.description = "MIDI Real time",
.type = CONFIG_BINARY,
.default_string = NULL,
.default_int = 0,
.file_filter = NULL,
.spinner = { 0 },
.selection = { { 0 } },
.bios = { { 0 } }
},
{
.name = "thruchan",
.description = "MIDI Thru",
.type = CONFIG_BINARY,
.default_string = "",
.default_int = 1
.name = "thruchan",
.description = "MIDI Thru",
.type = CONFIG_BINARY,
.default_string = NULL,
.default_int = 1,
.file_filter = NULL,
.spinner = { 0 },
.selection = { { 0 } },
.bios = { { 0 } }
},
{
.name = "clockout",
.description = "MIDI Clockout",
.type = CONFIG_BINARY,
.default_string = "",
.default_int = 1
.name = "clockout",
.description = "MIDI Clockout",
.type = CONFIG_BINARY,
.default_string = NULL,
.default_int = 1,
.file_filter = NULL,
.spinner = { 0 },
.selection = { { 0 } },
.bios = { { 0 } }
},
{ .name = "", .description = "", .type = CONFIG_END }
// clang-format on

View File

@@ -1192,73 +1192,69 @@ adgold_close(void *priv)
static const device_config_t adgold_config[] = {
// clang-format off
{
.name = "irq",
.description = "IRQ",
.type = CONFIG_SELECTION,
.default_string = "",
.default_int = 7,
.file_filter = "",
.spinner = { 0 },
.selection = {
{
.description = "IRQ 3",
.value = 3
},
{
.description = "IRQ 4",
.value = 4
},
{
.description = "IRQ 5",
.value = 5
},
{
.description = "IRQ 7",
.value = 7
},
{ .description = "" }
}
.name = "irq",
.description = "IRQ",
.type = CONFIG_SELECTION,
.default_string = NULL,
.default_int = 7,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "IRQ 3", .value = 3 },
{ .description = "IRQ 4", .value = 4 },
{ .description = "IRQ 5", .value = 5 },
{ .description = "IRQ 7", .value = 7 },
{ .description = "" }
},
.bios = { { 0 } }
},
{
.name = "dma",
.description = "Low DMA",
.type = CONFIG_SELECTION,
.default_string = "",
.default_int = 1,
.file_filter = "",
.spinner = { 0 },
.selection = {
{
.description = "DMA 1",
.value = 1
},
{
.description = "DMA 3",
.value = 3
},
{ .description = "" }
}
.name = "dma",
.description = "Low DMA",
.type = CONFIG_SELECTION,
.default_string = NULL,
.default_int = 1,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "DMA 1", .value = 1 },
{ .description = "DMA 3", .value = 3 },
{ .description = "" }
},
.bios = { { 0 } }
},
{
.name = "gameport",
.description = "Enable Game port",
.type = CONFIG_BINARY,
.default_string = "",
.default_int = 1
.name = "gameport",
.description = "Enable Game port",
.type = CONFIG_BINARY,
.default_string = NULL,
.default_int = 1,
.file_filter = NULL,
.spinner = { 0 },
.selection = { { 0 } },
.bios = { { 0 } }
},
{
.name = "surround",
.description = "Surround module",
.type = CONFIG_BINARY,
.default_string = "",
.default_int = 1
.name = "surround",
.description = "Surround module",
.type = CONFIG_BINARY,
.default_string = NULL,
.default_int = 1,
.file_filter = NULL,
.spinner = { 0 },
.selection = { { 0 } },
.bios = { { 0 } }
},
{
.name = "receive_input",
.description = "Receive MIDI input",
.type = CONFIG_BINARY,
.default_string = "",
.default_int = 1
.name = "receive_input",
.description = "Receive MIDI input",
.type = CONFIG_BINARY,
.default_string = NULL,
.default_int = 1,
.file_filter = NULL,
.spinner = { 0 },
.selection = { { 0 } },
.bios = { { 0 } }
},
{ .name = "", .description = "", .type = CONFIG_END }
// clang-format on

View File

@@ -2737,11 +2737,15 @@ es137x_speed_changed(void *priv)
static const device_config_t es1370_config[] = {
// clang-format off
{
.name = "receive_input",
.description = "Receive input (MIDI)",
.type = CONFIG_BINARY,
.default_string = "",
.default_int = 1
.name = "receive_input",
.description = "Receive input (MIDI)",
.type = CONFIG_BINARY,
.default_string = NULL,
.default_int = 1,
.file_filter = NULL,
.spinner = { 0 },
.selection = { { 0 } },
.bios = { { 0 } }
},
{ .name = "", .description = "", .type = CONFIG_END }
// clang-format on
@@ -2750,28 +2754,30 @@ static const device_config_t es1370_config[] = {
static const device_config_t es1371_config[] = {
// clang-format off
{
.name = "codec",
.description = "Codec",
.type = CONFIG_SELECTION,
.selection = {
{
.description = "Asahi Kasei AK4540",
.value = AC97_CODEC_AK4540
},
{
.description = "TriTech TR28023 / Creative CT1297",
.value = AC97_CODEC_TR28023
},
{ .description = "" }
.name = "codec",
.description = "Codec",
.type = CONFIG_SELECTION,
.default_string = NULL,
.default_int = AC97_CODEC_TR28023,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "Asahi Kasei AK4540", .value = AC97_CODEC_AK4540 },
{ .description = "TriTech TR28023 / Creative CT1297", .value = AC97_CODEC_TR28023 },
{ .description = "" }
},
.default_int = AC97_CODEC_TR28023
.bios = { { 0 } }
},
{
.name = "receive_input",
.description = "Receive MIDI input",
.type = CONFIG_BINARY,
.default_string = "",
.default_int = 1
.name = "receive_input",
.description = "Receive MIDI input",
.type = CONFIG_BINARY,
.default_string = NULL,
.default_int = 1,
.file_filter = NULL,
.spinner = { 0 },
.selection = { { 0 } },
.bios = { { 0 } }
},
{ .name = "", .description = "", .type = CONFIG_END }
// clang-format on
@@ -2780,32 +2786,31 @@ static const device_config_t es1371_config[] = {
static const device_config_t es1373_config[] = {
// clang-format off
{
.name = "codec",
.description = "Codec",
.type = CONFIG_SELECTION,
.selection = {
{
.description = "Crystal CS4297A",
.value = AC97_CODEC_CS4297A
},
{
.description = "SigmaTel STAC9721T",
.value = AC97_CODEC_STAC9721
},
{
.description = "TriTech TR28023 / Creative CT1297",
.value = AC97_CODEC_TR28023
},
.name = "codec",
.description = "Codec",
.type = CONFIG_SELECTION,
.default_string = NULL,
.default_int = AC97_CODEC_CS4297A,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "Crystal CS4297A", .value = AC97_CODEC_CS4297A },
{ .description = "SigmaTel STAC9721T", .value = AC97_CODEC_STAC9721 },
{ .description = "TriTech TR28023 / Creative CT1297", .value = AC97_CODEC_TR28023 },
{ .description = "" }
},
.default_int = AC97_CODEC_CS4297A
.bios = { { 0 } }
},
{
.name = "receive_input",
.description = "Receive MIDI input",
.type = CONFIG_BINARY,
.default_string = "",
.default_int = 1
.name = "receive_input",
.description = "Receive MIDI input",
.type = CONFIG_BINARY,
.default_string = NULL,
.default_int = 1,
.file_filter = NULL,
.spinner = { 0 },
.selection = { { 0 } },
.bios = { { 0 } }
},
{ .name = "", .description = "", .type = CONFIG_END }
// clang-format on
@@ -2814,32 +2819,31 @@ static const device_config_t es1373_config[] = {
static const device_config_t ct5880_config[] = {
// clang-format off
{
.name = "codec",
.description = "Codec",
.type = CONFIG_SELECTION,
.selection = {
{
.description = "SigmaTel STAC9708T",
.value = AC97_CODEC_STAC9708
},
{
.description = "SigmaTel STAC9721T (stereo)",
.value = AC97_CODEC_STAC9721
},
{
.description = "TriTech TR28023 / Creative CT1297",
.value = AC97_CODEC_TR28023
},
{ .description = "" }
.name = "codec",
.description = "Codec",
.type = CONFIG_SELECTION,
.default_string = NULL,
.default_int = AC97_CODEC_STAC9708,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "SigmaTel STAC9708T", .value = AC97_CODEC_STAC9708 },
{ .description = "SigmaTel STAC9721T (stereo)", .value = AC97_CODEC_STAC9721 },
{ .description = "TriTech TR28023 / Creative CT1297", .value = AC97_CODEC_TR28023 },
{ .description = "" }
},
.default_int = AC97_CODEC_STAC9708
.bios = { { 0 } }
},
{
.name = "receive_input",
.description = "Receive MIDI input",
.type = CONFIG_BINARY,
.default_string = "",
.default_int = 1
.name = "receive_input",
.description = "Receive MIDI input",
.type = CONFIG_BINARY,
.default_string = NULL,
.default_int = 1,
.file_filter = NULL,
.spinner = { 0 },
.selection = { { 0 } },
.bios = { { 0 } }
},
{ .name = "", .description = "", .type = CONFIG_END }
// clang-format on
@@ -2848,11 +2852,14 @@ static const device_config_t ct5880_config[] = {
static const device_config_t es1371_onboard_config[] = {
// clang-format off
{
.name = "receive_input",
.description = "Receive MIDI input",
.type = CONFIG_BINARY,
.default_string = "",
.default_int = 1
.name = "receive_input",
.description = "Receive MIDI input",
.type = CONFIG_BINARY,
.default_string = NULL,
.default_int = 1,
.file_filter = NULL,
.spinner = { 0 },
.selection = { { 0 } }
},
{ .name = "", .description = "", .type = CONFIG_END }
// clang-format on

View File

@@ -1315,142 +1315,127 @@ azt_speed_changed(void *priv)
static const device_config_t azt1605_config[] = {
// clang-format off
{
.name = "codec",
.description = "CODEC",
.type = CONFIG_SELECTION,
.selection = {
{
.description = "CS4248",
.value = AD1848_TYPE_CS4248
},
{
.description = "CS4231",
.value = AD1848_TYPE_CS4231
},
.name = "codec",
.description = "CODEC",
.type = CONFIG_SELECTION,
.default_string = NULL,
.default_int = AD1848_TYPE_CS4248,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "CS4248", .value = AD1848_TYPE_CS4248 },
{ .description = "CS4231", .value = AD1848_TYPE_CS4231 },
{ .description = "" }
},
.default_int = AD1848_TYPE_CS4248
.bios = { { 0 } }
},
{
.name = "wss_interrupt_after_config",
.description = "Raise CODEC interrupt on CODEC setup (needed by some drivers)",
.type = CONFIG_BINARY,
.default_int = 0
.name = "wss_interrupt_after_config",
.description = "Raise CODEC interrupt on CODEC setup (needed by some drivers)",
.type = CONFIG_BINARY,
.default_string = NULL,
.default_int = 0,
.file_filter = NULL,
.spinner = { 0 },
.selection = { { 0 } },
.bios = { { 0 } }
},
{
.name = "addr",
.description = "SB Address",
.type = CONFIG_HEX16,
.default_string = "",
.default_int = 0,
.file_filter = "",
.spinner = { 0 },
.selection = {
{
.description = "0x220",
.value = 0x220
},
{
.description = "0x240",
.value = 0x240
},
{
.description = "Use EEPROM setting",
.value = 0
},
{
.description = ""
}
}
},
{
.name = "sb_dma8",
.description = "SB low DMA",
.type = CONFIG_SELECTION,
.selection = {
{
.description = "DMA 0",
.value = 0
},
{
.description = "DMA 1",
.value = 1
},
{
.description = "DMA 3",
.value = 3
},
{
.description = ""
}
.name = "addr",
.description = "SB Address",
.type = CONFIG_HEX16,
.default_string = NULL,
.default_int = 0,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "0x220", .value = 0x220 },
{ .description = "0x240", .value = 0x240 },
{ .description = "Use EEPROM setting", .value = 0 },
{ .description = "" }
},
.default_int = 1
.bios = { { 0 } }
},
{
.name = "wss_irq",
.description = "WSS IRQ",
.type = CONFIG_SELECTION,
.selection = {
{
.description = "IRQ 11",
.value = 11
},
{
.description = "IRQ 10",
.value = 10
},
{
.description = "IRQ 7",
.value = 7
},
{
.description = ""
}
.name = "sb_dma8",
.description = "SB low DMA",
.type = CONFIG_SELECTION,
.default_string = NULL,
.default_int = 1,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "DMA 0", .value = 0 },
{ .description = "DMA 1", .value = 1 },
{ .description = "DMA 3", .value = 3 },
{ .description = "" }
},
.default_int = 10
.bios = { { 0 } }
},
{
.name = "wss_dma",
.description = "WSS DMA",
.type = CONFIG_SELECTION,
.selection = {
{
.description = "DMA 0",
.value = 0
},
{
.description = "DMA 1",
.value = 1
},
{
.description = "DMA 3",
.value = 3
},
{
.description = ""
}
},
.default_int = 0
{
.name = "wss_irq",
.description = "WSS IRQ",
.type = CONFIG_SELECTION,
.default_string = NULL,
.default_int = 10,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "IRQ 11", .value = 11 },
{ .description = "IRQ 10", .value = 10 },
{ .description = "IRQ 7", .value = 7 },
{ .description = "" }
},
{
.name = "opl",
.description = "Enable OPL",
.type = CONFIG_BINARY,
.default_string = "",
.default_int = 1
.bios = { { 0 } }
},
{
.name = "receive_input",
.description = "Receive MIDI input",
.type = CONFIG_BINARY,
.default_string = "",
.default_int = 1
.name = "wss_dma",
.description = "WSS DMA",
.type = CONFIG_SELECTION,
.default_string = NULL,
.default_int = 0,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "DMA 0", .value = 0 },
{ .description = "DMA 1", .value = 1 },
{ .description = "DMA 3", .value = 3 },
{ .description = "" }
},
.bios = { { 0 } }
},
{
.name = "receive_input401",
.description = "Receive MIDI input (MPU-401)",
.type = CONFIG_BINARY,
.default_string = "",
.default_int = 0
.name = "opl",
.description = "Enable OPL",
.type = CONFIG_BINARY,
.default_string = NULL,
.default_int = 1,
.file_filter = NULL,
.spinner = { 0 },
.selection = { { 0 } },
.bios = { { 0 } }
},
{
.name = "receive_input",
.description = "Receive MIDI input",
.type = CONFIG_BINARY,
.default_string = NULL,
.default_int = 1,
.file_filter = NULL,
.spinner = { 0 },
.selection = { { 0 } },
.bios = { { 0 } }
},
{
.name = "receive_input401",
.description = "Receive MIDI input (MPU-401)",
.type = CONFIG_BINARY,
.default_string = NULL,
.default_int = 0,
.file_filter = NULL,
.spinner = { 0 },
.selection = { { 0 } },
.bios = { { 0 } }
},
{ .name = "", .description = "", .type = CONFIG_END }
// clang-format on
@@ -1459,119 +1444,111 @@ static const device_config_t azt1605_config[] = {
static const device_config_t azt2316a_config[] = {
// clang-format off
{
.name = "codec",
.description = "CODEC",
.type = CONFIG_SELECTION,
.selection = {
{
.description = "CS4248",
.value = AD1848_TYPE_CS4248
},
{
.description = "CS4231",
.value = AD1848_TYPE_CS4231
},
.name = "codec",
.description = "CODEC",
.type = CONFIG_SELECTION,
.default_string = NULL,
.default_int = AD1848_TYPE_CS4248,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "CS4248", .value = AD1848_TYPE_CS4248 },
{ .description = "CS4231", .value = AD1848_TYPE_CS4231 },
{ .description = "" }
},
.default_int = AD1848_TYPE_CS4248
.bios = { { 0 } }
},
{
.name = "wss_interrupt_after_config",
.description = "Raise CODEC interrupt on CODEC setup (needed by some drivers)",
.type = CONFIG_BINARY,
.default_int = 0
.name = "wss_interrupt_after_config",
.description = "Raise CODEC interrupt on CODEC setup (needed by some drivers)",
.type = CONFIG_BINARY,
.default_string = NULL,
.default_int = 0,
.file_filter = NULL,
.spinner = { 0 },
.selection = { { 0 } },
.bios = { { 0 } }
},
{
.name = "addr",
.description = "SB Address",
.type = CONFIG_HEX16,
.default_string = "",
.default_int = 0,
.file_filter = "",
.spinner = { 0 },
.selection = {
{
.description = "0x220",
.value = 0x220
},
{
.description = "0x240",
.value = 0x240
},
{
.description = "Use EEPROM setting",
.value = 0
},
{
.description = ""
}
}
},
{
.name = "wss_irq",
.description = "WSS IRQ",
.type = CONFIG_SELECTION,
.selection = {
{
.description = "IRQ 11",
.value = 11
},
{
.description = "IRQ 10",
.value = 10
},
{
.description = "IRQ 7",
.value = 7
},
{
.description = ""
}
.name = "addr",
.description = "SB Address",
.type = CONFIG_HEX16,
.default_string = NULL,
.default_int = 0,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "0x220", .value = 0x220 },
{ .description = "0x240", .value = 0x240 },
{ .description = "Use EEPROM setting", .value = 0 },
{ .description = "" }
},
.default_int = 10
.bios = { { 0 } }
},
{
.name = "wss_dma",
.description = "WSS DMA",
.type = CONFIG_SELECTION,
.selection = {
{
.description = "DMA 0",
.value = 0
},
{
.description = "DMA 1",
.value = 1
},
{
.description = "DMA 3",
.value = 3
},
{
.description = ""
}
.name = "wss_irq",
.description = "WSS IRQ",
.type = CONFIG_SELECTION,
.default_string = NULL,
.default_int = 10,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "IRQ 11", .value = 11 },
{ .description = "IRQ 10", .value = 10 },
{ .description = "IRQ 7", .value = 7 },
{ .description = "" }
},
.default_int = 0
.bios = { { 0 } }
},
{
.name = "opl",
.description = "Enable OPL",
.type = CONFIG_BINARY,
.default_string = "",
.default_int = 1
.name = "wss_dma",
.description = "WSS DMA",
.type = CONFIG_SELECTION,
.default_string = NULL,
.default_int = 0,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "DMA 0", .value = 0 },
{ .description = "DMA 1", .value = 1 },
{ .description = "DMA 3", .value = 3 },
{ .description = "" }
},
.bios = { { 0 } }
},
{
.name = "receive_input",
.description = "Receive MIDI input",
.type = CONFIG_BINARY,
.default_string = "",
.default_int = 1
.name = "opl",
.description = "Enable OPL",
.type = CONFIG_BINARY,
.default_string = NULL,
.default_int = 1,
.file_filter = NULL,
.spinner = { 0 },
.selection = { { 0 } },
.bios = { { 0 } }
},
{
.name = "receive_input401",
.description = "Receive MIDI input",
.type = CONFIG_BINARY,
.default_string = "",
.default_int = 0
.name = "receive_input",
.description = "Receive MIDI input",
.type = CONFIG_BINARY,
.default_string = NULL,
.default_int = 1,
.file_filter = NULL,
.spinner = { 0 },
.selection = { { 0 } },
.bios = { { 0 } }
},
{
.name = "receive_input401",
.description = "Receive MIDI input",
.type = CONFIG_BINARY,
.default_string = NULL,
.default_int = 0,
.file_filter = NULL,
.spinner = { 0 },
.selection = { { 0 } },
.bios = { { 0 } }
},
{ .name = "", .description = "", .type = CONFIG_END }
// clang-format on

View File

@@ -1508,11 +1508,15 @@ cmi8x38_close(void *priv)
static const device_config_t cmi8x38_config[] = {
// clang-format off
{
.name = "receive_input",
.description = "Receive MIDI input",
.type = CONFIG_BINARY,
.default_string = "",
.default_int = 1
.name = "receive_input",
.description = "Receive MIDI input",
.type = CONFIG_BINARY,
.default_string = NULL,
.default_int = 1,
.file_filter = NULL,
.spinner = { 0 },
.selection = { { 0 } },
.bios = { { 0 } }
},
{ .name = "", .description = "", .type = CONFIG_END }
// clang-format on
@@ -1521,18 +1525,26 @@ static const device_config_t cmi8x38_config[] = {
static const device_config_t cmi8738_config[] = {
// clang-format off
{
.name = "six_channel",
.description = "6CH variant (6-channel)",
.type = CONFIG_BINARY,
.default_string = "",
.default_int = 1
.name = "six_channel",
.description = "6CH variant (6-channel)",
.type = CONFIG_BINARY,
.default_string = NULL,
.default_int = 1,
.file_filter = NULL,
.spinner = { 0 },
.selection = { { 0 } },
.bios = { { 0 } }
},
{
.name = "receive_input",
.description = "Receive MIDI input",
.type = CONFIG_BINARY,
.default_string = "",
.default_int = 1
.name = "receive_input",
.description = "Receive MIDI input",
.type = CONFIG_BINARY,
.default_string = NULL,
.default_int = 1,
.file_filter = NULL,
.spinner = { 0 },
.selection = { { 0 } },
.bios = { { 0 } }
},
{ .name = "", .description = "", .type = CONFIG_END }
// clang-format on

View File

@@ -200,42 +200,23 @@ cms_close(void *priv)
static const device_config_t cms_config[] = {
// clang-format off
{
.name = "base",
.description = "Address",
.type = CONFIG_HEX16,
.default_string = "",
.default_int = 0x220,
.file_filter = "",
.spinner = { 0 },
.selection = {
{
.description = "0x210",
.value = 0x210
},
{
.description = "0x220",
.value = 0x220
},
{
.description = "0x230",
.value = 0x230
},
{
.description = "0x240",
.value = 0x240
},
{
.description = "0x250",
.value = 0x250
},
{
.description = "0x260",
.value = 0x260
},
{
.description = ""
}
}
.name = "base",
.description = "Address",
.type = CONFIG_HEX16,
.default_string = NULL,
.default_int = 0x220,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "0x210", .value = 0x210 },
{ .description = "0x220", .value = 0x220 },
{ .description = "0x230", .value = 0x230 },
{ .description = "0x240", .value = 0x240 },
{ .description = "0x250", .value = 0x250 },
{ .description = "0x260", .value = 0x260 },
{ .description = "" }
},
.bios = { { 0 } }
},
{ .name = "", .description = "", .type = CONFIG_END }
// clang-format on

View File

@@ -1431,92 +1431,67 @@ gus_speed_changed(void *priv)
static const device_config_t gus_config[] = {
// clang-format off
{
.name = "type",
.description = "GUS type",
.type = CONFIG_SELECTION,
.default_string = "",
.default_int = 0,
.file_filter = "",
.spinner = { 0 },
.selection = {
{
.description = "Classic",
.value = GUS_CLASSIC
},
.name = "type",
.description = "GUS type",
.type = CONFIG_SELECTION,
.default_string = NULL,
.default_int = 0,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "Classic", .value = GUS_CLASSIC },
#ifdef USE_GUSMAX
{
.description = "MAX",
.value = GUS_MAX
},
{ .description = "MAX", .value = GUS_MAX },
#endif /*USE_GUSMAX */
{ NULL }
{ NULL }
},
.bios = { { 0 } }
},
{
.name = "base",
.description = "Address",
.type = CONFIG_HEX16,
.default_string = "",
.default_int = 0x220,
.file_filter = "",
.spinner = { 0 },
.selection = {
{
.description = "210H",
.value = 0x210
},
{
.description = "220H",
.value = 0x220
},
{
.description = "230H",
.value = 0x230
},
{
.description = "240H",
.value = 0x240
},
{
.description = "250H",
.value = 0x250
},
{
.description = "260H",
.value = 0x260
},
.name = "base",
.description = "Address",
.type = CONFIG_HEX16,
.default_string = NULL,
.default_int = 0x220,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "210H", .value = 0x210 },
{ .description = "220H", .value = 0x220 },
{ .description = "230H", .value = 0x230 },
{ .description = "240H", .value = 0x240 },
{ .description = "250H", .value = 0x250 },
{ .description = "260H", .value = 0x260 },
{ NULL }
},
.bios = { { 0 } }
},
{
.name = "gus_ram",
"Memory size",
.type = CONFIG_SELECTION,
.default_string = "",
.default_int = 0,
.file_filter = "",
.spinner = { 0 },
.selection = {
{
.description = "256 KB",
.value = 0
},
{
.description = "512 KB",
.value = 1
},
{
.description = "1 MB",
.value = 2
},
{ NULL }
}
.name = "gus_ram",
.description = "Memory size",
.type = CONFIG_SELECTION,
.default_string = NULL,
.default_int = 0,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "256 KB", .value = 0 },
{ .description = "512 KB", .value = 1 },
{ .description = "1 MB", .value = 2 },
{ NULL }
},
.bios = { { 0 } }
},
{
.name = "receive_input",
.description = "Receive MIDI input",
.type = CONFIG_BINARY,
.default_string = "",
.default_int = 1
.name = "receive_input",
.description = "Receive MIDI input",
.type = CONFIG_BINARY,
.default_string = NULL,
.default_int = 1,
.file_filter = NULL,
.spinner = { 0 },
.selection = { { 0 } },
.bios = { { 0 } }
},
{ .name = "", .description = "", .type = CONFIG_END }
// clang-format off

View File

@@ -1804,106 +1804,59 @@ mpu401_standalone_close(void *priv)
static const device_config_t mpu401_standalone_config[] = {
// clang-format off
{
.name = "base",
.description = "MPU-401 Address",
.type = CONFIG_HEX16,
.default_string = "",
.default_int = 0x330,
.file_filter = "",
.spinner = { 0 },
.selection = {
{
.description = "0x220",
.value = 0x220
},
{
.description = "0x230",
.value = 0x230
},
{
.description = "0x240",
.value = 0x240
},
{
.description = "0x250",
.value = 0x250
},
{
.description = "0x300",
.value = 0x300
},
{
.description = "0x320",
.value = 0x320
},
{
.description = "0x330",
.value = 0x330
},
{
.description = "0x332",
.value = 0x332
},
{
.description = "0x334",
.value = 0x334
},
{
.description = "0x336",
.value = 0x336
},
{
.description = "0x340",
.value = 0x340
},
{
.description = "0x350",
.value = 0x350
},
{ .description = "" }
}
.name = "base",
.description = "MPU-401 Address",
.type = CONFIG_HEX16,
.default_string = NULL,
.default_int = 0x330,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "0x220", .value = 0x220 },
{ .description = "0x230", .value = 0x230 },
{ .description = "0x240", .value = 0x240 },
{ .description = "0x250", .value = 0x250 },
{ .description = "0x300", .value = 0x300 },
{ .description = "0x320", .value = 0x320 },
{ .description = "0x330", .value = 0x330 },
{ .description = "0x332", .value = 0x332 },
{ .description = "0x334", .value = 0x334 },
{ .description = "0x336", .value = 0x336 },
{ .description = "0x340", .value = 0x340 },
{ .description = "0x350", .value = 0x350 },
{ .description = "" }
},
.bios = { { 0 } }
},
{
.name = "irq",
.description = "MPU-401 IRQ",
.type = CONFIG_SELECTION,
.default_string = "",
.default_int = 2,
.file_filter = "",
.spinner = { 0 },
.selection = {
{
.description = "IRQ 2",
.value = 2
},
{
.description = "IRQ 3",
.value = 3
},
{
.description = "IRQ 4",
.value = 4
},
{
.description = "IRQ 5",
.value = 5
},
{
.description = "IRQ 6",
.value = 6
},
{
.description = "IRQ 7",
.value = 7
},
{ .description = "" }
}
.name = "irq",
.description = "MPU-401 IRQ",
.type = CONFIG_SELECTION,
.default_string = NULL,
.default_int = 2,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "IRQ 2", .value = 2 },
{ .description = "IRQ 3", .value = 3 },
{ .description = "IRQ 4", .value = 4 },
{ .description = "IRQ 5", .value = 5 },
{ .description = "IRQ 6", .value = 6 },
{ .description = "IRQ 7", .value = 7 },
{ .description = "" }
},
.bios = { { 0 } }
},
{
.name = "receive_input",
.description = "Receive MIDI input",
.type = CONFIG_BINARY,
.default_int = 1
.name = "receive_input",
.description = "Receive MIDI input",
.type = CONFIG_BINARY,
.default_string = NULL,
.default_int = 1,
.file_filter = NULL,
.spinner = { 0 },
.selection = { { 0 } },
.bios = { { 0 } }
},
{ .name = "", .description = "", .type = CONFIG_END }
// clang-format on
@@ -1912,46 +1865,34 @@ static const device_config_t mpu401_standalone_config[] = {
static const device_config_t mpu401_standalone_mca_config[] = {
// clang-format off
{
.name = "irq",
.description = "MPU-401 IRQ",
.type = CONFIG_SELECTION,
.default_string = "",
.default_int = 9,
.file_filter = "",
.spinner = { 0 },
.selection = {
{
.description = "IRQ 3",
.value = 3
},
{
.description = "IRQ 4",
.value = 4
},
{
.description = "IRQ 5",
.value = 5
},
{
.description = "IRQ 6",
.value = 6
},
{
.description = "IRQ 7",
.value = 7
},
{
.description = "IRQ 9",
.value = 9
},
{ .description = "" }
}
.name = "irq",
.description = "MPU-401 IRQ",
.type = CONFIG_SELECTION,
.default_string = NULL,
.default_int = 9,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "IRQ 3", .value = 3 },
{ .description = "IRQ 4", .value = 4 },
{ .description = "IRQ 5", .value = 5 },
{ .description = "IRQ 6", .value = 6 },
{ .description = "IRQ 7", .value = 7 },
{ .description = "IRQ 9", .value = 9 },
{ .description = "" }
},
.bios = { { 0 } }
},
{
.name = "receive_input",
.description = "Receive MIDI input",
.type = CONFIG_BINARY,
.default_int = 1
.name = "receive_input",
.description = "Receive MIDI input",
.type = CONFIG_BINARY,
.default_string = NULL,
.default_int = 1,
.file_filter = NULL,
.spinner = { 0 },
.selection = { { 0 } },
.bios = { { 0 } }
},
{ .name = "", .description = "", .type = CONFIG_END }
// clang-format on

View File

@@ -167,13 +167,15 @@ opl2board_device_close(void *priv)
static const device_config_t opl2board_config[] = {
{
.name = "host_serial_path",
.description = "Host Serial Device",
.type = CONFIG_SERPORT,
.name = "host_serial_path",
.description = "Host Serial Device",
.type = CONFIG_SERPORT,
.default_string = "",
.file_filter = NULL,
.spinner = { 0 },
.selection = { { 0 } }
.default_int = 0,
.file_filter = NULL,
.spinner = { 0 },
.selection = { { 0 } },
.bios = { { 0 } }
},
{ .name = "", .description = "", .type = CONFIG_END }
};

View File

@@ -456,18 +456,26 @@ mirosound_pcm10_available(void)
static const device_config_t optimc_config[] = {
// clang-format off
{
.name = "receive_input",
.description = "Receive MIDI input",
.type = CONFIG_BINARY,
.default_string = "",
.default_int = 1
.name = "receive_input",
.description = "Receive MIDI input",
.type = CONFIG_BINARY,
.default_string = NULL,
.default_int = 1,
.file_filter = NULL,
.spinner = { 0 },
.selection = { { 0 } },
.bios = { { 0 } }
},
{
.name = "receive_input401",
.description = "Receive MIDI input (MPU-401)",
.type = CONFIG_BINARY,
.default_string = "",
.default_int = 0
.name = "receive_input401",
.description = "Receive MIDI input (MPU-401)",
.type = CONFIG_BINARY,
.default_string = NULL,
.default_int = 0,
.file_filter = NULL,
.spinner = { 0 },
.selection = { { 0 } },
.bios = { { 0 } }
},
{ .name = "", .description = "", .type = CONFIG_END }
// clang-format on

View File

@@ -2401,25 +2401,37 @@ pas16_close(void *priv)
static const device_config_t pas16_config[] = {
{
.name = "control_pc_speaker",
.description = "Control PC speaker",
.type = CONFIG_BINARY,
.default_string = "",
.default_int = 0
.name = "control_pc_speaker",
.description = "Control PC speaker",
.type = CONFIG_BINARY,
.default_string = NULL,
.default_int = 0,
.file_filter = NULL,
.spinner = { 0 },
.selection = { { 0 } },
.bios = { { 0 } }
},
{
.name = "receive_input",
.description = "Receive MIDI input",
.type = CONFIG_BINARY,
.default_string = "",
.default_int = 1
.name = "receive_input",
.description = "Receive MIDI input",
.type = CONFIG_BINARY,
.default_string = NULL,
.default_int = 1,
.file_filter = NULL,
.spinner = { 0 },
.selection = { { 0 } },
.bios = { { 0 } }
},
{
.name = "receive_input401",
.description = "Receive MIDI input (MPU-401)",
.type = CONFIG_BINARY,
.default_string = "",
.default_int = 0
.name = "receive_input401",
.description = "Receive MIDI input (MPU-401)",
.type = CONFIG_BINARY,
.default_string = NULL,
.default_int = 0,
.file_filter = NULL,
.spinner = { 0 },
.selection = { { 0 } },
.bios = { { 0 } }
},
{ .name = "", .description = "", .type = CONFIG_END }
};

View File

@@ -245,40 +245,23 @@ pssj_close(void *priv)
static const device_config_t pssj_isa_config[] = {
// clang-format off
{
.name = "base",
.description = "Address",
.type = CONFIG_HEX16,
.default_string = "",
.default_int = 0x2C0,
.file_filter = "",
.spinner = { 0 },
.selection = {
{
.description = "0x0C0",
.value = 0x0C0
},
{
.description = "0x0E0",
.value = 0x0E0
},
{
.description = "0x1C0",
.value = 0x1C0
},
{
.description = "0x1E0",
.value = 0x1E0
},
{
.description = "0x2C0",
.value = 0x2C0
},
{
.description = "0x2E0",
.value = 0x2E0
},
{ .description = "" }
}
.name = "base",
.description = "Address",
.type = CONFIG_HEX16,
.default_string = NULL,
.default_int = 0x2C0,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "0x0C0", .value = 0x0C0 },
{ .description = "0x0E0", .value = 0x0E0 },
{ .description = "0x1C0", .value = 0x1C0 },
{ .description = "0x1E0", .value = 0x1E0 },
{ .description = "0x2C0", .value = 0x2C0 },
{ .description = "0x2E0", .value = 0x2E0 },
{ .description = "" }
},
.bios = { { 0 } }
},
{ .name = "", .description = "", .type = CONFIG_END }
// clang-format on

File diff suppressed because it is too large Load Diff

View File

@@ -268,40 +268,23 @@ sn76489_device_close(void *priv)
static const device_config_t tndy_config[] = {
// clang-format off
{
.name = "base",
.description = "Address",
.type = CONFIG_HEX16,
.default_string = "",
.default_int = 0x0C0,
.file_filter = "",
.spinner = { 0 },
.selection = {
{
.description = "0x0C0",
.value = 0x0C0
},
{
.description = "0x0E0",
.value = 0x0E0
},
{
.description = "0x1C0",
.value = 0x1C0
},
{
.description = "0x1E0",
.value = 0x1E0
},
{
.description = "0x2C0",
.value = 0x2C0
},
{
.description = "0x2E0",
.value = 0x2E0
},
{ .description = "" }
}
.name = "base",
.description = "Address",
.type = CONFIG_HEX16,
.default_string = NULL,
.default_int = 0x0C0,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "0x0C0", .value = 0x0C0 },
{ .description = "0x0E0", .value = 0x0E0 },
{ .description = "0x1C0", .value = 0x1C0 },
{ .description = "0x1E0", .value = 0x1E0 },
{ .description = "0x2C0", .value = 0x2C0 },
{ .description = "0x2E0", .value = 0x2E0 },
{ .description = "" }
},
.bios = { { 0 } }
},
{ .name = "", .description = "", .type = CONFIG_END }
// clang-format on

View File

@@ -136,39 +136,32 @@ entertainer_close(void *priv)
static const device_config_t ssi2001_config[] = {
// clang-format off
{
.name = "base",
.description = "Address",
.type = CONFIG_HEX16,
.default_string = "",
.default_int = 0x280,
.file_filter = "",
.spinner = { 0 },
.selection = {
{
.description = "0x280",
.value = 0x280
},
{
.description = "0x2A0",
.value = 0x2A0
},
{
.description = "0x2C0",
.value = 0x2C0
},
{
.description = "0x2E0",
.value = 0x2E0
},
{ .description = "" }
}
.name = "base",
.description = "Address",
.type = CONFIG_HEX16,
.default_string = NULL,
.default_int = 0x280,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "0x280", .value = 0x280 },
{ .description = "0x2A0", .value = 0x2A0 },
{ .description = "0x2C0", .value = 0x2C0 },
{ .description = "0x2E0", .value = 0x2E0 },
{ .description = "" }
},
.bios = { { 0 } }
},
{
.name = "gameport",
.description = "Enable Game port",
.type = CONFIG_BINARY,
.default_string = "",
.default_int = 1
.name = "gameport",
.description = "Enable Game port",
.type = CONFIG_BINARY,
.default_string = NULL,
.default_int = 1,
.file_filter = NULL,
.spinner = { 0 },
.selection = { { 0 } },
.bios = { { 0 } }
},
{ .name = "", .description = "", .type = CONFIG_END }
// clang-format off
@@ -177,11 +170,15 @@ static const device_config_t ssi2001_config[] = {
static const device_config_t entertainer_config[] = {
// clang-format off
{
.name = "gameport",
.description = "Enable Game port",
.type = CONFIG_BINARY,
.default_string = "",
.default_int = 1
.name = "gameport",
.description = "Enable Game port",
.type = CONFIG_BINARY,
.default_string = NULL,
.default_int = 1,
.file_filter = NULL,
.spinner = { 0 },
.selection = { { 0 } },
.bios = { { 0 } }
},
{ .name = "", .description = "", .type = CONFIG_END }
// clang-format off

View File

@@ -245,39 +245,32 @@ wss_speed_changed(void *priv)
static const device_config_t wss_config[] = {
// clang-format off
{
.name = "base",
.description = "Address",
.type = CONFIG_HEX16,
.default_string = "",
.default_int = 0x530,
.file_filter = "",
.spinner = { 0 },
.selection = {
{
.description = "0x530",
.value = 0x530
},
{
.description = "0x604",
.value = 0x604
},
{
.description = "0xe80",
.value = 0xe80
},
{
.description = "0xf40",
.value = 0xf40
},
{ .description = "" }
}
.name = "base",
.description = "Address",
.type = CONFIG_HEX16,
.default_string = NULL,
.default_int = 0x530,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "0x530", .value = 0x530 },
{ .description = "0x604", .value = 0x604 },
{ .description = "0xe80", .value = 0xe80 },
{ .description = "0xf40", .value = 0xf40 },
{ .description = "" }
},
.bios = { { 0 } }
},
{
.name = "opl",
.description = "Enable OPL",
.type = CONFIG_BINARY,
.default_string = "",
.default_int = 1
.name = "opl",
.description = "Enable OPL",
.type = CONFIG_BINARY,
.default_string = NULL,
.default_int = 1,
.file_filter = NULL,
.spinner = { 0 },
.selection = { { 0 } },
.bios = { { 0 } }
},
{ .name = "", .description = "", .type = CONFIG_END }
// clang-format on

View File

@@ -13,23 +13,72 @@
# Copyright 2020-2021 David Hrdlička.
#
add_library(vid OBJECT agpgart.c video.c vid_table.c vid_cga.c vid_cga_comp.c
vid_compaq_cga.c vid_mda.c vid_hercules.c vid_herculesplus.c
vid_incolor.c vid_colorplus.c vid_genius.c vid_pgc.c vid_im1024.c
vid_sigma.c vid_wy700.c vid_ega.c vid_ega_render.c vid_svga.c vid_8514a.c
vid_svga_render.c vid_ddc.c vid_vga.c vid_ati_eeprom.c vid_ati18800.c
vid_ati28800.c vid_ati_mach8.c vid_ati_mach64.c vid_ati68875_ramdac.c
vid_ati68860_ramdac.c vid_bt481_ramdac.c vid_bt48x_ramdac.c vid_chips_69000.c
vid_av9194.c vid_icd2061.c vid_ics2494.c vid_ics2595.c vid_cl54xx.c
vid_et3000.c vid_et4000.c vid_sc1148x_ramdac.c vid_sc1502x_ramdac.c
vid_et4000w32.c vid_stg_ramdac.c vid_ht216.c vid_oak_oti.c vid_paradise.c
vid_rtg310x.c vid_f82c425.c vid_ti_cf62011.c vid_tvga.c vid_tgui9440.c
vid_tkd8001_ramdac.c vid_att20c49x_ramdac.c vid_s3.c vid_s3_virge.c
vid_ibm_rgb528_ramdac.c vid_sdac_ramdac.c vid_ogc.c vid_mga.c vid_nga.c
vid_tvp3026_ramdac.c vid_att2xc498_ramdac.c vid_xga.c
add_library(vid OBJECT
agpgart.c
video.c
vid_table.c
vid_cga.c
vid_cga_comp.c
vid_compaq_cga.c
vid_mda.c
vid_hercules.c
vid_herculesplus.c
vid_incolor.c
vid_colorplus.c
vid_genius.c
vid_pgc.c
vid_im1024.c
vid_sigma.c
vid_wy700.c
vid_ega.c
vid_ega_render.c
vid_svga.c
vid_8514a.c
vid_svga_render.c
vid_ddc.c
vid_vga.c
vid_ati_eeprom.c
vid_ati18800.c
vid_ati28800.c
vid_ati_mach8.c
vid_ati_mach64.c
vid_ati68875_ramdac.c
vid_ati68860_ramdac.c
vid_bt481_ramdac.c
vid_bt48x_ramdac.c
vid_chips_69000.c
vid_av9194.c
vid_icd2061.c
vid_ics2494.c
vid_ics2595.c
vid_cl54xx.c
vid_et3000.c
vid_et4000.c
vid_sc1148x_ramdac.c
vid_sc1502x_ramdac.c
vid_et4000w32.c
vid_stg_ramdac.c
vid_ht216.c
vid_oak_oti.c
vid_paradise.c
vid_rtg310x.c
vid_f82c425.c
vid_ti_cf62011.c
vid_tvga.c vid_tgui9440.c
vid_tkd8001_ramdac.c
vid_att20c49x_ramdac.c
vid_s3.c vid_s3_virge.c
vid_ibm_rgb528_ramdac.c
vid_sdac_ramdac.c
vid_ogc.c
vid_mga.c
vid_nga.c
vid_tvp3026_ramdac.c
vid_att2xc498_ramdac.c
vid_xga.c
vid_bochs_vbe.c
nv/nv_rivatimer.c
)
)
if(G100)
target_compile_definitions(vid PRIVATE USE_G100)
@@ -39,10 +88,19 @@ if(XL24)
target_compile_definitions(vid PRIVATE USE_XL24)
endif()
add_library(voodoo OBJECT vid_voodoo.c vid_voodoo_banshee.c
vid_voodoo_banshee_blitter.c vid_voodoo_blitter.c vid_voodoo_display.c
vid_voodoo_fb.c vid_voodoo_fifo.c vid_voodoo_reg.c vid_voodoo_render.c
vid_voodoo_setup.c vid_voodoo_texture.c)
add_library(voodoo OBJECT
vid_voodoo.c
vid_voodoo_banshee.c
vid_voodoo_banshee_blitter.c
vid_voodoo_blitter.c
vid_voodoo_display.c
vid_voodoo_fb.c
vid_voodoo_fifo.c
vid_voodoo_reg.c
vid_voodoo_render.c
vid_voodoo_setup.c
vid_voodoo_texture.c
)
if(NOT MSVC AND (ARCH STREQUAL "i386" OR ARCH STREQUAL "x86_64"))
target_compile_options(voodoo PRIVATE "-msse2")

View File

@@ -47,7 +47,6 @@
# undef CLAMP
#endif
#define BIOS_MACH8_ROM_PATH "roms/video/mach8/11301113140_4k.BIN"
static void ibm8514_accel_outb(uint16_t port, uint8_t val, void *priv);
@@ -84,14 +83,14 @@ CLAMP(int16_t in, int16_t min, int16_t max)
return in;
}
#define WRITE8(addr, var, val) \
switch ((addr) & 1) { \
case 0: \
var = (var & 0xff00) | (val); \
break; \
case 1: \
var = (var & 0x00ff) | ((val) << 8); \
break; \
#define WRITE8(addr, var, val) \
switch ((addr) & 1) { \
case 0: \
var = (var & 0xff00) | (val); \
break; \
case 1: \
var = (var & 0x00ff) | ((val) << 8); \
break; \
}
#define READ8(addr, var) \
@@ -105,139 +104,139 @@ CLAMP(int16_t in, int16_t min, int16_t max)
}
#define READ_PIXTRANS_WORD(cx, n) \
if ((cmd <= 1) || (cmd == 5)) { \
#define READ_PIXTRANS_WORD(cx, n) \
if ((cmd <= 1) || (cmd == 5)) { \
temp = dev->vram[((dev->accel.cy * dev->pitch) + (cx) + (n)) & dev->vram_mask]; \
temp |= (dev->vram[((dev->accel.cy * dev->pitch) + (cx) + (n + 1)) & dev->vram_mask] << 8); \
} else { \
temp = dev->vram[(dev->accel.dest + (cx) + (n)) & dev->vram_mask]; \
temp |= (dev->vram[(dev->accel.dest + (cx) + (n + 1)) & dev->vram_mask] << 8); \
} \
} else { \
temp = dev->vram[(dev->accel.dest + (cx) + (n)) & dev->vram_mask]; \
temp |= (dev->vram[(dev->accel.dest + (cx) + (n + 1)) & dev->vram_mask] << 8); \
} \
#define READ(addr, dat) \
if (dev->bpp) \
#define READ(addr, dat) \
if (dev->bpp) \
dat = vram_w[(addr) & (dev->vram_mask >> 1)]; \
else \
else \
dat = (dev->vram[(addr) & (dev->vram_mask)]); \
#define READ_HIGH(addr, dat) \
#define READ_HIGH(addr, dat) \
dat |= (dev->vram[(addr) & (dev->vram_mask)] << 8);
#define MIX(mixmode, dest_dat, src_dat) \
{ \
switch ((mixmode) ? (dev->accel.frgd_mix & 0x1f) : (dev->accel.bkgd_mix & 0x1f)) { \
case 0x00: \
dest_dat = ~dest_dat; \
break; \
case 0x01: \
dest_dat = 0; \
break; \
case 0x02: \
dest_dat = ~0; \
break; \
case 0x03: \
dest_dat = dest_dat; \
break; \
case 0x04: \
dest_dat = ~src_dat; \
break; \
case 0x05: \
dest_dat = src_dat ^ dest_dat; \
break; \
case 0x06: \
dest_dat = ~(src_dat ^ dest_dat); \
break; \
case 0x07: \
dest_dat = src_dat; \
break; \
case 0x08: \
dest_dat = ~(src_dat & dest_dat); \
break; \
case 0x09: \
dest_dat = ~src_dat | dest_dat; \
break; \
case 0x0a: \
dest_dat = src_dat | ~dest_dat; \
break; \
case 0x0b: \
dest_dat = src_dat | dest_dat; \
break; \
case 0x0c: \
dest_dat = src_dat & dest_dat; \
break; \
case 0x0d: \
dest_dat = src_dat & ~dest_dat; \
break; \
case 0x0e: \
dest_dat = ~src_dat & dest_dat; \
break; \
case 0x0f: \
dest_dat = ~(src_dat | dest_dat); \
break; \
case 0x10: \
dest_dat = MIN(src_dat, dest_dat); \
break; \
case 0x11: \
dest_dat = dest_dat - src_dat; \
break; \
case 0x12: \
dest_dat = src_dat - dest_dat; \
break; \
case 0x13: \
dest_dat = src_dat + dest_dat; \
break; \
case 0x14: \
dest_dat = MAX(src_dat, dest_dat); \
break; \
case 0x15: \
dest_dat = (dest_dat - src_dat) >> 1; \
break; \
case 0x16: \
dest_dat = (src_dat - dest_dat) >> 1; \
break; \
case 0x17: \
dest_dat = (dest_dat + src_dat) >> 1; \
break; \
case 0x18: \
dest_dat = MAX(0, (dest_dat - src_dat)); \
break; \
case 0x19: \
dest_dat = MAX(0, (dest_dat - src_dat)); \
break; \
case 0x1a: \
dest_dat = MAX(0, (src_dat - dest_dat)); \
break; \
case 0x1b: \
if (dev->bpp) \
dest_dat = MIN(0xffff, (dest_dat + src_dat)); \
else \
dest_dat = MIN(0xff, (dest_dat + src_dat)); \
break; \
case 0x1c: \
dest_dat = MAX(0, (dest_dat - src_dat)) / 2; \
break; \
case 0x1d: \
dest_dat = MAX(0, (dest_dat - src_dat)) / 2; \
break; \
case 0x1e: \
dest_dat = MAX(0, (src_dat - dest_dat)) / 2; \
break; \
case 0x1f: \
if (dev->bpp) \
#define MIX(mixmode, dest_dat, src_dat) \
{ \
switch ((mixmode) ? (dev->accel.frgd_mix & 0x1f) : (dev->accel.bkgd_mix & 0x1f)) { \
case 0x00: \
dest_dat = ~dest_dat; \
break; \
case 0x01: \
dest_dat = 0; \
break; \
case 0x02: \
dest_dat = ~0; \
break; \
case 0x03: \
dest_dat = dest_dat; \
break; \
case 0x04: \
dest_dat = ~src_dat; \
break; \
case 0x05: \
dest_dat = src_dat ^ dest_dat; \
break; \
case 0x06: \
dest_dat = ~(src_dat ^ dest_dat); \
break; \
case 0x07: \
dest_dat = src_dat; \
break; \
case 0x08: \
dest_dat = ~(src_dat & dest_dat); \
break; \
case 0x09: \
dest_dat = ~src_dat | dest_dat; \
break; \
case 0x0a: \
dest_dat = src_dat | ~dest_dat; \
break; \
case 0x0b: \
dest_dat = src_dat | dest_dat; \
break; \
case 0x0c: \
dest_dat = src_dat & dest_dat; \
break; \
case 0x0d: \
dest_dat = src_dat & ~dest_dat; \
break; \
case 0x0e: \
dest_dat = ~src_dat & dest_dat; \
break; \
case 0x0f: \
dest_dat = ~(src_dat | dest_dat); \
break; \
case 0x10: \
dest_dat = MIN(src_dat, dest_dat); \
break; \
case 0x11: \
dest_dat = dest_dat - src_dat; \
break; \
case 0x12: \
dest_dat = src_dat - dest_dat; \
break; \
case 0x13: \
dest_dat = src_dat + dest_dat; \
break; \
case 0x14: \
dest_dat = MAX(src_dat, dest_dat); \
break; \
case 0x15: \
dest_dat = (dest_dat - src_dat) >> 1; \
break; \
case 0x16: \
dest_dat = (src_dat - dest_dat) >> 1; \
break; \
case 0x17: \
dest_dat = (dest_dat + src_dat) >> 1; \
break; \
case 0x18: \
dest_dat = MAX(0, (dest_dat - src_dat)); \
break; \
case 0x19: \
dest_dat = MAX(0, (dest_dat - src_dat)); \
break; \
case 0x1a: \
dest_dat = MAX(0, (src_dat - dest_dat)); \
break; \
case 0x1b: \
if (dev->bpp) \
dest_dat = MIN(0xffff, (dest_dat + src_dat)); \
else \
dest_dat = MIN(0xff, (dest_dat + src_dat)); \
break; \
case 0x1c: \
dest_dat = MAX(0, (dest_dat - src_dat)) / 2; \
break; \
case 0x1d: \
dest_dat = MAX(0, (dest_dat - src_dat)) / 2; \
break; \
case 0x1e: \
dest_dat = MAX(0, (src_dat - dest_dat)) / 2; \
break; \
case 0x1f: \
if (dev->bpp) \
dest_dat = (0xffff < (src_dat + dest_dat)) ? 0xffff : ((src_dat + dest_dat) / 2); \
else \
dest_dat = (0xff < (src_dat + dest_dat)) ? 0xff : ((src_dat + dest_dat) / 2); \
break; \
} \
else \
dest_dat = (0xff < (src_dat + dest_dat)) ? 0xff : ((src_dat + dest_dat) / 2); \
break; \
} \
}
#define WRITE(addr, dat) \
if (dev->bpp) { \
vram_w[((addr)) & (dev->vram_mask >> 1)] = dat; \
#define WRITE(addr, dat) \
if (dev->bpp) { \
vram_w[((addr)) & (dev->vram_mask >> 1)] = dat; \
dev->changedvram[(((addr)) & (dev->vram_mask >> 1)) >> 11] = changeframecount; \
} else { \
dev->vram[((addr)) & (dev->vram_mask)] = dat; \
dev->changedvram[(((addr)) & (dev->vram_mask)) >> 12] = changeframecount; \
} else { \
dev->vram[((addr)) & (dev->vram_mask)] = dat; \
dev->changedvram[(((addr)) & (dev->vram_mask)) >> 12] = changeframecount; \
}
int ibm8514_active = 0;
@@ -3977,52 +3976,44 @@ ibm8514_force_redraw(void *priv)
// clang-format off
static const device_config_t isa_ext8514_config[] = {
{
.name = "memory",
.description = "Memory size",
.type = CONFIG_SELECTION,
.default_int = 1024,
.selection = {
{
.description = "512 KB",
.value = 512
},
{
.description = "1 MB",
.value = 1024
},
{
.description = ""
}
}
.name = "memory",
.description = "Memory size",
.type = CONFIG_SELECTION,
.default_string = NULL,
.default_int = 1024,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "512 KB", .value = 512 },
{ .description = "1 MB", .value = 1024 },
{ .description = "" }
},
.bios = { { 0 } }
},
{
.name = "extensions",
.description = "Vendor",
.type = CONFIG_SELECTION,
.default_int = 0,
.selection = {
{
.description = "IBM",
.value = 0
},
{
.description = "ATI",
.value = 1
},
{
.description = ""
}
}
.name = "extensions",
.description = "Vendor",
.type = CONFIG_SELECTION,
.default_string = NULL,
.default_int = 0,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "IBM", .value = 0 },
{ .description = "ATI", .value = 1 },
{ .description = "" }
},
.bios = { { 0 } }
},
{
.name = "bios_addr",
.description = "BIOS Address",
.type = CONFIG_HEX20,
.default_string = "",
.default_int = 0xc8000,
.file_filter = "",
.spinner = { 0 },
.selection = {
.name = "bios_addr",
.description = "BIOS Address",
.type = CONFIG_HEX20,
.default_string = NULL,
.default_int = 0xc8000,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "C800h", .value = 0xc8000 },
{ .description = "CA00h", .value = 0xca000 },
{ .description = "CC00h", .value = 0xcc000 },
@@ -4035,8 +4026,9 @@ static const device_config_t isa_ext8514_config[] = {
{ .description = "DA00h", .value = 0xda000 },
{ .description = "DC00h", .value = 0xdc000 },
{ .description = "DE00h", .value = 0xde000 },
{ .description = "" }
{ .description = "" }
},
.bios = { { 0 } }
},
{ .name = "", .description = "", .type = CONFIG_END }
};
@@ -4044,76 +4036,67 @@ static const device_config_t isa_ext8514_config[] = {
// clang-format off
static const device_config_t mca_ext8514_config[] = {
{
.name = "memory",
.description = "Memory size",
.type = CONFIG_SELECTION,
.default_int = 1024,
.selection = {
{
.description = "512 KB",
.value = 512
},
{
.description = "1 MB",
.value = 1024
},
{
.description = ""
}
}
.name = "memory",
.description = "Memory size",
.type = CONFIG_SELECTION,
.default_string = NULL,
.default_int = 1024,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "512 KB", .value = 512 },
{ .description = "1 MB", .value = 1024 },
{ .description = "" }
},
.bios = { { 0 } }
},
{
.name = "extensions",
.description = "Vendor",
.type = CONFIG_SELECTION,
.default_int = 0,
.selection = {
{
.description = "IBM",
.value = 0
},
{
.description = "ATI",
.value = 1
},
{
.description = ""
}
}
.name = "extensions",
.description = "Vendor",
.type = CONFIG_SELECTION,
.default_string = NULL,
.default_int = 0,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "IBM", .value = 0 },
{ .description = "ATI", .value = 1 },
{ .description = "" }
},
.bios = { { 0 } }
},
{ .name = "", .description = "", .type = CONFIG_END }
};
// clang-format off
const device_t gen8514_isa_device = {
.name = "IBM 8514/A clone (ISA)",
.name = "IBM 8514/A clone (ISA)",
.internal_name = "8514_isa",
.flags = DEVICE_AT | DEVICE_ISA,
.local = 0,
.init = ibm8514_init,
.close = ibm8514_close,
.reset = NULL,
.flags = DEVICE_AT | DEVICE_ISA,
.local = 0,
.init = ibm8514_init,
.close = ibm8514_close,
.reset = NULL,
.available = NULL,
.speed_changed = ibm8514_speed_changed,
.force_redraw = ibm8514_force_redraw,
.config = isa_ext8514_config
.force_redraw = ibm8514_force_redraw,
.config = isa_ext8514_config
};
const device_t ibm8514_mca_device = {
.name = "IBM 8514/A (MCA)",
.name = "IBM 8514/A (MCA)",
.internal_name = "8514_mca",
.flags = DEVICE_MCA,
.local = 0,
.init = ibm8514_init,
.close = ibm8514_close,
.reset = NULL,
.flags = DEVICE_MCA,
.local = 0,
.init = ibm8514_init,
.close = ibm8514_close,
.reset = NULL,
.available = NULL,
.speed_changed = ibm8514_speed_changed,
.force_redraw = ibm8514_force_redraw,
.config = mca_ext8514_config
.force_redraw = ibm8514_force_redraw,
.config = mca_ext8514_config
};
void
ibm8514_device_add(void)
{

View File

@@ -329,23 +329,19 @@ ati18800_force_redraw(void *priv)
static const device_config_t ati18800_wonder_config[] = {
{
.name = "memory",
.description = "Memory size",
.type = CONFIG_SELECTION,
.default_int = 512,
.name = "memory",
.description = "Memory size",
.type = CONFIG_SELECTION,
.default_string = NULL,
.default_int = 512,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{
.description = "256 KB",
.value = 256
},
{
.description = "512 KB",
.value = 512
},
{
.description = ""
}
}
{ .description = "256 KB", .value = 256 },
{ .description = "512 KB", .value = 512 },
{ .description = "" }
},
.bios = { { 0 } }
},
{ .name = "", .description = "", .type = CONFIG_END }
};

View File

@@ -744,27 +744,20 @@ ati28800_force_redraw(void *priv)
// clang-format off
static const device_config_t ati28800_config[] = {
{
.name = "memory",
.description = "Memory size",
.type = CONFIG_SELECTION,
.default_int = 512,
.selection = {
{
.description = "256 KB",
.value = 256
},
{
.description = "512 KB",
.value = 512
},
{
.description = "1 MB",
.value = 1024
},
{
.description = ""
}
}
.name = "memory",
.description = "Memory size",
.type = CONFIG_SELECTION,
.default_string = NULL,
.default_int = 512,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "256 KB", .value = 256 },
{ .description = "512 KB", .value = 512 },
{ .description = "1 MB", .value = 1024 },
{ .description = "" }
},
.bios = { { 0 } }
},
{ .name = "", .description = "", .type = CONFIG_END }
};
@@ -772,27 +765,20 @@ static const device_config_t ati28800_config[] = {
#ifdef USE_XL24
static const device_config_t ati28800_wonderxl_config[] = {
{
.name = "memory",
.description = "Memory size",
.type = CONFIG_SELECTION,
.default_int = 512,
.selection = {
{
.description = "256 KB",
.value = 256
},
{
.description = "512 KB",
.value = 512
},
{
.description = "1 MB",
.value = 1024
},
{
.description = ""
}
}
.name = "memory",
.description = "Memory size",
.type = CONFIG_SELECTION,
.default_string = NULL,
.default_int = 512,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "256 KB", .value = 256 },
{ .description = "512 KB", .value = 512 },
{ .description = "1 MB", .value = 1024 },
{ .description = "" }
},
.bios = { { 0 } }
},
{ .name = "", .description = "", .type = CONFIG_END }
};

View File

@@ -1508,16 +1508,16 @@ mach64_start_line(mach64_t *mach64)
mach64->accel.op = OP_LINE;
}
#define READ(addr, dat, width) \
if (width == 0) \
dat = svga->vram[((addr)) & mach64->vram_mask]; \
else if (width == 1) \
dat = *(uint16_t *) &svga->vram[((addr) << 1) & mach64->vram_mask]; \
else if (width == 2) \
dat = *(uint32_t *) &svga->vram[((addr) << 2) & mach64->vram_mask]; \
else if (mach64->dp_pix_width & DP_BYTE_PIX_ORDER) \
dat = (svga->vram[((addr) >> 3) & mach64->vram_mask] >> ((addr) &7)) & 1; \
else \
#define READ(addr, dat, width) \
if (width == 0) \
dat = svga->vram[((addr)) & mach64->vram_mask]; \
else if (width == 1) \
dat = *(uint16_t *) &svga->vram[((addr) << 1) & mach64->vram_mask]; \
else if (width == 2) \
dat = *(uint32_t *) &svga->vram[((addr) << 2) & mach64->vram_mask]; \
else if (mach64->dp_pix_width & DP_BYTE_PIX_ORDER) \
dat = (svga->vram[((addr) >> 3) & mach64->vram_mask] >> ((addr) &7)) & 1; \
else \
dat = (svga->vram[((addr) >> 3) & mach64->vram_mask] >> (7 - ((addr) &7))) & 1;
#define MIX \
@@ -1575,29 +1575,29 @@ mach64_start_line(mach64_t *mach64)
break; \
}
#define WRITE(addr, width) \
if (width == 0) { \
svga->vram[(addr) &mach64->vram_mask] = dest_dat; \
svga->changedvram[((addr) &mach64->vram_mask) >> 12] = svga->monitor->mon_changeframecount; \
} else if (width == 1) { \
*(uint16_t *) &svga->vram[((addr) << 1) & mach64->vram_mask] = dest_dat; \
svga->changedvram[(((addr) << 1) & mach64->vram_mask) >> 12] = svga->monitor->mon_changeframecount; \
} else if (width == 2) { \
*(uint32_t *) &svga->vram[((addr) << 2) & mach64->vram_mask] = dest_dat; \
svga->changedvram[(((addr) << 2) & mach64->vram_mask) >> 12] = svga->monitor->mon_changeframecount; \
} else { \
if (dest_dat & 1) { \
if (mach64->dp_pix_width & DP_BYTE_PIX_ORDER) \
svga->vram[((addr) >> 3) & mach64->vram_mask] |= 1 << ((addr) &7); \
else \
svga->vram[((addr) >> 3) & mach64->vram_mask] |= 1 << (7 - ((addr) &7)); \
} else { \
if (mach64->dp_pix_width & DP_BYTE_PIX_ORDER) \
svga->vram[((addr) >> 3) & mach64->vram_mask] &= ~(1 << ((addr) &7)); \
else \
svga->vram[((addr) >> 3) & mach64->vram_mask] &= ~(1 << (7 - ((addr) &7))); \
} \
svga->changedvram[(((addr) >> 3) & mach64->vram_mask) >> 12] = svga->monitor->mon_changeframecount; \
#define WRITE(addr, width) \
if (width == 0) { \
svga->vram[(addr) &mach64->vram_mask] = dest_dat; \
svga->changedvram[((addr) &mach64->vram_mask) >> 12] = svga->monitor->mon_changeframecount; \
} else if (width == 1) { \
*(uint16_t *) &svga->vram[((addr) << 1) & mach64->vram_mask] = dest_dat; \
svga->changedvram[(((addr) << 1) & mach64->vram_mask) >> 12] = svga->monitor->mon_changeframecount; \
} else if (width == 2) { \
*(uint32_t *) &svga->vram[((addr) << 2) & mach64->vram_mask] = dest_dat; \
svga->changedvram[(((addr) << 2) & mach64->vram_mask) >> 12] = svga->monitor->mon_changeframecount; \
} else { \
if (dest_dat & 1) { \
if (mach64->dp_pix_width & DP_BYTE_PIX_ORDER) \
svga->vram[((addr) >> 3) & mach64->vram_mask] |= 1 << ((addr) &7); \
else \
svga->vram[((addr) >> 3) & mach64->vram_mask] |= 1 << (7 - ((addr) &7)); \
} else { \
if (mach64->dp_pix_width & DP_BYTE_PIX_ORDER) \
svga->vram[((addr) >> 3) & mach64->vram_mask] &= ~(1 << ((addr) &7)); \
else \
svga->vram[((addr) >> 3) & mach64->vram_mask] &= ~(1 << (7 - ((addr) &7))); \
} \
svga->changedvram[(((addr) >> 3) & mach64->vram_mask) >> 12] = svga->monitor->mon_changeframecount; \
}
void
@@ -4711,50 +4711,39 @@ mach64_force_redraw(void *priv)
// clang-format off
static const device_config_t mach64gx_config[] = {
{
.name = "memory",
.description = "Memory size",
.type = CONFIG_SELECTION,
.default_int = 4,
.selection = {
{
.description = "1 MB",
.value = 1
},
{
.description = "2 MB",
.value = 2
},
{
.description = "4 MB",
.value = 4
},
{
.description = ""
}
}
.name = "memory",
.description = "Memory size",
.type = CONFIG_SELECTION,
.default_string = NULL,
.default_int = 4,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "1 MB", .value = 1 },
{ .description = "2 MB", .value = 2 },
{ .description = "4 MB", .value = 4 },
{ .description = "" }
},
.bios = { { 0 } }
},
{ .name = "", .description = "", .type = CONFIG_END }
};
static const device_config_t mach64vt2_config[] = {
{
.name = "memory",
.description = "Memory size",
.type = CONFIG_SELECTION,
.default_int = 4,
.selection = {
{
.description = "2 MB",
.value = 2
},
{
.description = "4 MB",
.value = 4
},
{
.description = ""
}
}
.name = "memory",
.description = "Memory size",
.type = CONFIG_SELECTION,
.default_string = NULL,
.default_int = 4,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "2 MB", .value = 2 },
{ .description = "4 MB", .value = 4 },
{ .description = "" }
},
.bios = { { 0 } }
},
{ .name = "", .description = "", .type = CONFIG_END }
};

View File

@@ -49,10 +49,10 @@
#define BIOS_MACH32_MCA_ROM_PATH "roms/video/mach32/MACH32MCA_Olivetti.BIN"
#define BIOS_MACH32_PCI_ROM_PATH "roms/video/mach32/intelopt_00000.rom"
static video_timings_t timing_gfxultra_isa = { .type = VIDEO_ISA, .write_b = 3, .write_w = 3, .write_l = 6, .read_b = 5, .read_w = 5, .read_l = 10 };
static video_timings_t timing_mach32_vlb = { .type = VIDEO_BUS, .write_b = 2, .write_w = 2, .write_l = 1, .read_b = 20, .read_w = 20, .read_l = 21 };
static video_timings_t timing_mach32_mca = { .type = VIDEO_MCA, .write_b = 4, .write_w = 5, .write_l = 10, .read_b = 5, .read_w = 5, .read_l = 10 };
static video_timings_t timing_mach32_pci = { .type = VIDEO_PCI, .write_b = 2, .write_w = 2, .write_l = 1, .read_b = 20, .read_w = 20, .read_l = 21 };
static video_timings_t timing_gfxultra_isa = { .type = VIDEO_ISA, .write_b = 3, .write_w = 3, .write_l = 6, .read_b = 5, .read_w = 5, .read_l = 10 };
static video_timings_t timing_mach32_vlb = { .type = VIDEO_BUS, .write_b = 2, .write_w = 2, .write_l = 1, .read_b = 20, .read_w = 20, .read_l = 21 };
static video_timings_t timing_mach32_mca = { .type = VIDEO_MCA, .write_b = 4, .write_w = 5, .write_l = 10, .read_b = 5, .read_w = 5, .read_l = 10 };
static video_timings_t timing_mach32_pci = { .type = VIDEO_PCI, .write_b = 2, .write_w = 2, .write_l = 1, .read_b = 20, .read_w = 20, .read_l = 21 };
static void mach_accel_outb(uint16_t port, uint8_t val, void *priv);
static void mach_accel_outw(uint16_t port, uint16_t val, void *priv);
@@ -88,14 +88,14 @@ mach_log(const char *fmt, ...)
# define mach_log(fmt, ...)
#endif
#define WRITE8(addr, var, val) \
switch ((addr) & 1) { \
case 0: \
var = (var & 0xff00) | (val); \
break; \
case 1: \
var = (var & 0x00ff) | ((val) << 8); \
break; \
#define WRITE8(addr, var, val) \
switch ((addr) & 1) { \
case 0: \
var = (var & 0xff00) | (val); \
break; \
case 1: \
var = (var & 0x00ff) | ((val) << 8); \
break; \
}
#define READ8(addr, var) \
@@ -110,166 +110,164 @@ mach_log(const char *fmt, ...)
#define READ_PIXTRANS_BYTE_IO(cx, n) \
if ((mach->accel.cmd_type == 2) || (mach->accel.cmd_type == 5)) { \
if (dev->bpp) { \
if (n == 0)\
if (dev->bpp) { \
if (n == 0) \
mach->accel.pix_trans[(n)] = vram_w[(dev->accel.dest + (cx) + (n)) & (dev->vram_mask >> 1)] & 0xff; \
else \
mach->accel.pix_trans[(n)] = vram_w[(dev->accel.dest + (cx) + (n)) & (dev->vram_mask >> 1)] >> 8; \
\
} else \
mach->accel.pix_trans[(n)] = dev->vram[(dev->accel.dest + (cx) + (n)) & dev->vram_mask]; \
\
else \
mach->accel.pix_trans[(n)] = vram_w[(dev->accel.dest + (cx) + (n)) & (dev->vram_mask >> 1)] >> 8; \
} else \
mach->accel.pix_trans[(n)] = dev->vram[(dev->accel.dest + (cx) + (n)) & dev->vram_mask]; \
}
#define READ_PIXTRANS_WORD(cx, n) \
if ((cmd == 0) || (cmd == 1) || (cmd == 5) || (mach->accel.cmd_type == -1)) { \
if (dev->bpp) \
temp = vram_w[((dev->accel.cy * dev->pitch) + (cx) + (n)) & (dev->vram_mask >> 1)]; \
else { \
temp = dev->vram[((dev->accel.cy * dev->pitch) + (cx) + (n)) & dev->vram_mask]; \
temp |= (dev->vram[((dev->accel.cy * dev->pitch) + (cx) + (n + 1)) & dev->vram_mask] << 8); \
} \
} else if ((mach->accel.cmd_type == 2) || (mach->accel.cmd_type == 5)) { \
if (dev->bpp) \
temp = vram_w[((dev->accel.dest) + (cx) + (n)) & (dev->vram_mask >> 1)]; \
else { \
temp = dev->vram[((dev->accel.dest) + (cx) + (n)) & dev->vram_mask]; \
temp |= (dev->vram[((dev->accel.dest) + (cx) + (n + 1)) & dev->vram_mask] << 8); \
} \
} else if ((mach->accel.cmd_type == 3) || (mach->accel.cmd_type == 4)) { \
if (dev->bpp) \
temp = vram_w[((mach->accel.ge_offset << 1) + ((dev->accel.cy) * (dev->pitch)) + (cx) + (n)) & (dev->vram_mask >> 1)]; \
else { \
temp = dev->vram[((mach->accel.ge_offset << 2) + ((dev->accel.cy) * (dev->pitch)) + (cx) + (n)) & dev->vram_mask]; \
#define READ_PIXTRANS_WORD(cx, n) \
if ((cmd == 0) || (cmd == 1) || (cmd == 5) || (mach->accel.cmd_type == -1)) { \
if (dev->bpp) \
temp = vram_w[((dev->accel.cy * dev->pitch) + (cx) + (n)) & (dev->vram_mask >> 1)]; \
else { \
temp = dev->vram[((dev->accel.cy * dev->pitch) + (cx) + (n)) & dev->vram_mask]; \
temp |= (dev->vram[((dev->accel.cy * dev->pitch) + (cx) + (n + 1)) & dev->vram_mask] << 8); \
} \
} else if ((mach->accel.cmd_type == 2) || (mach->accel.cmd_type == 5)) { \
if (dev->bpp) \
temp = vram_w[((dev->accel.dest) + (cx) + (n)) & (dev->vram_mask >> 1)]; \
else { \
temp = dev->vram[((dev->accel.dest) + (cx) + (n)) & dev->vram_mask]; \
temp |= (dev->vram[((dev->accel.dest) + (cx) + (n + 1)) & dev->vram_mask] << 8); \
} \
} else if ((mach->accel.cmd_type == 3) || (mach->accel.cmd_type == 4)) { \
if (dev->bpp) \
temp = vram_w[((mach->accel.ge_offset << 1) + ((dev->accel.cy) * (dev->pitch)) + (cx) + (n)) & (dev->vram_mask >> 1)]; \
else { \
temp = dev->vram[((mach->accel.ge_offset << 2) + ((dev->accel.cy) * (dev->pitch)) + (cx) + (n)) & dev->vram_mask]; \
temp |= (dev->vram[((mach->accel.ge_offset << 2) + ((dev->accel.cy) * (dev->pitch)) + (cx) + (n + 1)) & dev->vram_mask] << 8); \
} \
} \
}
#define READ(addr, dat) \
if (dev->bpp) \
#define READ(addr, dat) \
if (dev->bpp) \
dat = vram_w[(addr) & (dev->vram_mask >> 1)]; \
else \
else \
dat = (dev->vram[(addr) & (dev->vram_mask)]);
#define READ_HIGH(addr, dat) \
#define READ_HIGH(addr, dat) \
dat |= (dev->vram[(addr) & (dev->vram_mask)] << 8);
#define MIX(mixmode, dest_dat, src_dat) \
{ \
switch ((mixmode) ? (dev->accel.frgd_mix & 0x1f) : (dev->accel.bkgd_mix & 0x1f)) { \
case 0x00: \
dest_dat = ~dest_dat; \
break; \
case 0x01: \
dest_dat = 0; \
break; \
case 0x02: \
dest_dat = ~0; \
break; \
case 0x03: \
dest_dat = dest_dat; \
break; \
case 0x04: \
dest_dat = ~src_dat; \
break; \
case 0x05: \
dest_dat = src_dat ^ dest_dat; \
break; \
case 0x06: \
dest_dat = ~(src_dat ^ dest_dat); \
break; \
case 0x07: \
dest_dat = src_dat; \
break; \
case 0x08: \
dest_dat = ~(src_dat & dest_dat); \
break; \
case 0x09: \
dest_dat = ~src_dat | dest_dat; \
break; \
case 0x0a: \
dest_dat = src_dat | ~dest_dat; \
break; \
case 0x0b: \
dest_dat = src_dat | dest_dat; \
break; \
case 0x0c: \
dest_dat = src_dat & dest_dat; \
break; \
case 0x0d: \
dest_dat = src_dat & ~dest_dat; \
break; \
case 0x0e: \
dest_dat = ~src_dat & dest_dat; \
break; \
case 0x0f: \
dest_dat = ~(src_dat | dest_dat); \
break; \
case 0x10: \
dest_dat = MIN(src_dat, dest_dat); \
break; \
case 0x11: \
dest_dat = dest_dat - src_dat; \
break; \
case 0x12: \
dest_dat = src_dat - dest_dat; \
break; \
case 0x13: \
dest_dat = src_dat + dest_dat; \
break; \
case 0x14: \
dest_dat = MAX(src_dat, dest_dat); \
break; \
case 0x15: \
dest_dat = (dest_dat - src_dat) / 2; \
break; \
case 0x16: \
dest_dat = (src_dat - dest_dat) / 2; \
break; \
case 0x17: \
dest_dat = (dest_dat + src_dat) / 2; \
break; \
case 0x18: \
dest_dat = MAX(0, (dest_dat - src_dat)); \
break; \
case 0x19: \
dest_dat = MAX(0, (dest_dat - src_dat)); \
break; \
case 0x1a: \
dest_dat = MAX(0, (src_dat - dest_dat)); \
break; \
case 0x1b: \
if (dev->bpp) \
dest_dat = MIN(0xffff, (dest_dat + src_dat)); \
else \
dest_dat = MIN(0xff, (dest_dat + src_dat)); \
break; \
case 0x1c: \
dest_dat = MAX(0, (dest_dat - src_dat)) / 2; \
break; \
case 0x1d: \
dest_dat = MAX(0, (dest_dat - src_dat)) / 2; \
break; \
case 0x1e: \
dest_dat = MAX(0, (src_dat - dest_dat)) / 2; \
break; \
case 0x1f: \
if (dev->bpp) \
#define MIX(mixmode, dest_dat, src_dat) \
{ \
switch ((mixmode) ? (dev->accel.frgd_mix & 0x1f) : (dev->accel.bkgd_mix & 0x1f)) { \
case 0x00: \
dest_dat = ~dest_dat; \
break; \
case 0x01: \
dest_dat = 0; \
break; \
case 0x02: \
dest_dat = ~0; \
break; \
case 0x03: \
dest_dat = dest_dat; \
break; \
case 0x04: \
dest_dat = ~src_dat; \
break; \
case 0x05: \
dest_dat = src_dat ^ dest_dat; \
break; \
case 0x06: \
dest_dat = ~(src_dat ^ dest_dat); \
break; \
case 0x07: \
dest_dat = src_dat; \
break; \
case 0x08: \
dest_dat = ~(src_dat & dest_dat); \
break; \
case 0x09: \
dest_dat = ~src_dat | dest_dat; \
break; \
case 0x0a: \
dest_dat = src_dat | ~dest_dat; \
break; \
case 0x0b: \
dest_dat = src_dat | dest_dat; \
break; \
case 0x0c: \
dest_dat = src_dat & dest_dat; \
break; \
case 0x0d: \
dest_dat = src_dat & ~dest_dat; \
break; \
case 0x0e: \
dest_dat = ~src_dat & dest_dat; \
break; \
case 0x0f: \
dest_dat = ~(src_dat | dest_dat); \
break; \
case 0x10: \
dest_dat = MIN(src_dat, dest_dat); \
break; \
case 0x11: \
dest_dat = dest_dat - src_dat; \
break; \
case 0x12: \
dest_dat = src_dat - dest_dat; \
break; \
case 0x13: \
dest_dat = src_dat + dest_dat; \
break; \
case 0x14: \
dest_dat = MAX(src_dat, dest_dat); \
break; \
case 0x15: \
dest_dat = (dest_dat - src_dat) / 2; \
break; \
case 0x16: \
dest_dat = (src_dat - dest_dat) / 2; \
break; \
case 0x17: \
dest_dat = (dest_dat + src_dat) / 2; \
break; \
case 0x18: \
dest_dat = MAX(0, (dest_dat - src_dat)); \
break; \
case 0x19: \
dest_dat = MAX(0, (dest_dat - src_dat)); \
break; \
case 0x1a: \
dest_dat = MAX(0, (src_dat - dest_dat)); \
break; \
case 0x1b: \
if (dev->bpp) \
dest_dat = MIN(0xffff, (dest_dat + src_dat)); \
else \
dest_dat = MIN(0xff, (dest_dat + src_dat)); \
break; \
case 0x1c: \
dest_dat = MAX(0, (dest_dat - src_dat)) / 2; \
break; \
case 0x1d: \
dest_dat = MAX(0, (dest_dat - src_dat)) / 2; \
break; \
case 0x1e: \
dest_dat = MAX(0, (src_dat - dest_dat)) / 2; \
break; \
case 0x1f: \
if (dev->bpp) \
dest_dat = (0xffff < (src_dat + dest_dat)) ? 0xffff : ((src_dat + dest_dat) / 2); \
else \
dest_dat = (0xff < (src_dat + dest_dat)) ? 0xff : ((src_dat + dest_dat) / 2); \
break; \
} \
else \
dest_dat = (0xff < (src_dat + dest_dat)) ? 0xff : ((src_dat + dest_dat) / 2); \
break; \
} \
}
#define WRITE(addr, dat) \
if (dev->bpp) { \
vram_w[((addr)) & (dev->vram_mask >> 1)] = dat; \
#define WRITE(addr, dat) \
if (dev->bpp) { \
vram_w[((addr)) & (dev->vram_mask >> 1)] = dat; \
dev->changedvram[(((addr)) & (dev->vram_mask >> 1)) >> 11] = changeframecount; \
} else { \
dev->vram[((addr)) & (dev->vram_mask)] = dat; \
dev->changedvram[(((addr)) & (dev->vram_mask)) >> 12] = changeframecount; \
} else { \
dev->vram[((addr)) & (dev->vram_mask)] = dat; \
dev->changedvram[(((addr)) & (dev->vram_mask)) >> 12] = changeframecount; \
}
static int
@@ -338,7 +336,9 @@ mach_accel_start(int cmd_type, int cpu_input, int count, uint32_t mix_dat, uint3
}
if ((dev->accel_bpp == 8) || (dev->accel_bpp == 15) || (dev->accel_bpp == 16) || (dev->accel_bpp == 24))
mach_log("RdMask=%04x, DPCONFIG=%04x, Clipping: l=%d, r=%d, t=%d, b=%d, LineDrawOpt=%04x, BPP=%d, CMDType = %d, offs=%08x, cnt = %d, input = %d, mono_src = %d, frgdsel = %d, d(%d,%d), dstxend = %d, pitch = %d, extcrt = %d, rw = %x, monpattern = %x.\n", dev->accel.rd_mask, mach->accel.dp_config, clip_l, clip_r, clip_t, clip_b, mach->accel.linedraw_opt, dev->accel_bpp, cmd_type, mach->accel.ge_offset, count, cpu_input, mono_src, frgd_sel, dev->accel.cur_x, dev->accel.cur_y, mach->accel.dest_x_end, dev->ext_pitch, dev->ext_crt_pitch, mach->accel.dp_config & 1, mach->accel.mono_pattern_enable);
mach_log("RdMask=%04x, DPCONFIG=%04x, Clipping: l=%d, r=%d, t=%d, b=%d, LineDrawOpt=%04x, BPP=%d, CMDType = %d, offs=%08x, cnt = %d, input = %d, mono_src = %d, frgdsel = %d, d(%d,%d), dstxend = %d, pitch = %d, extcrt = %d, rw = %x, monpattern = %x.\n",
dev->accel.rd_mask, mach->accel.dp_config, clip_l, clip_r, clip_t, clip_b, mach->accel.linedraw_opt, dev->accel_bpp, cmd_type, mach->accel.ge_offset, count, cpu_input, mono_src, frgd_sel, dev->accel.cur_x, dev->accel.cur_y,
mach->accel.dest_x_end, dev->ext_pitch, dev->ext_crt_pitch, mach->accel.dp_config & 1, mach->accel.mono_pattern_enable);
switch (cmd_type) {
case 1: /*Extended Raw Linedraw from bres_count register (0x96ee)*/
@@ -366,7 +366,9 @@ mach_accel_start(int cmd_type, int cpu_input, int count, uint32_t mix_dat, uint3
mach->accel.stepx = (mach->accel.linedraw_opt & 0x20) ? 1 : -1;
mach->accel.stepy = (mach->accel.linedraw_opt & 0x80) ? 1 : -1;
mach_log("Extended bresenham, CUR(%d,%d), DEST(%d,%d), width = %d, options = %04x, dpconfig = %04x, opt_ena = %03x.\n", dev->accel.dx, dev->accel.dy, dev->accel.cx, dev->accel.cy, mach->accel.width, mach->accel.linedraw_opt, mach->accel.dp_config, mach->accel.max_waitstates & 0x100);
mach_log("Extended bresenham, CUR(%d,%d), DEST(%d,%d), width = %d, options = %04x, dpconfig = %04x, opt_ena = %03x.\n",
dev->accel.dx, dev->accel.dy, dev->accel.cx, dev->accel.cy, mach->accel.width, mach->accel.linedraw_opt,
mach->accel.dp_config, mach->accel.max_waitstates & 0x100);
if ((mono_src == 2) || (bkgd_sel == 2) || (frgd_sel == 2) || mach_pixel_read(mach)) {
if (mach_pixel_write(mach)) {
@@ -853,11 +855,14 @@ mach_accel_start(int cmd_type, int cpu_input, int count, uint32_t mix_dat, uint3
mach->accel.stepx = -1;
if (dev->accel.dx > 0)
dev->accel.dx--;
mach_log("BitBLT: Dst Negative X, dxstart = %d, end = %d, width = %d, dx = %d, dpconfig = %04x.\n", mach->accel.dest_x_start, mach->accel.dest_x_end, mach->accel.width, dev->accel.dx, mach->accel.dp_config);
mach_log("BitBLT: Dst Negative X, dxstart = %d, end = %d, width = %d, dx = %d, dpconfig = %04x.\n",
mach->accel.dest_x_start, mach->accel.dest_x_end, mach->accel.width, dev->accel.dx,
mach->accel.dp_config);
} else {
mach->accel.stepx = 1;
mach->accel.width = 0;
mach_log("BitBLT: Dst Indeterminate X, dpconfig = %04x, destxend = %d, destxstart = %d.\n", mach->accel.dp_config, mach->accel.dest_x_end, mach->accel.dest_x_start);
mach_log("BitBLT: Dst Indeterminate X, dpconfig = %04x, destxend = %d, destxstart = %d.\n",
mach->accel.dp_config, mach->accel.dest_x_end, mach->accel.dest_x_start);
}
dev->accel.sx = 0;
@@ -914,17 +919,23 @@ mach_accel_start(int cmd_type, int cpu_input, int count, uint32_t mix_dat, uint3
if (mach->accel.sx_end > mach->accel.sx_start) {
mach->accel.src_width = (mach->accel.sx_end - mach->accel.sx_start);
mach->accel.src_stepx = 1;
mach_log("BitBLT: Src Positive X: wh(%d,%d), srcwidth = %d, coordinates: %d,%d px, start: %d, end: %d px, stepx = %d, dpconfig = %04x, oddwidth = %d.\n", mach->accel.width, mach->accel.height, mach->accel.src_width, dev->accel.cx, dev->accel.cy, mach->accel.src_x_start, mach->accel.src_x_end, mach->accel.src_stepx, mach->accel.dp_config, mach->accel.src_width & 1);
mach_log("BitBLT: Src Positive X: wh(%d,%d), srcwidth = %d, coordinates: %d,%d px, start: %d, end: %d px, stepx = %d, dpconfig = %04x, oddwidth = %d.\n",
mach->accel.width, mach->accel.height, mach->accel.src_width, dev->accel.cx, dev->accel.cy, mach->accel.src_x_start, mach->accel.src_x_end,
mach->accel.src_stepx, mach->accel.dp_config, mach->accel.src_width & 1);
} else if (mach->accel.sx_end < mach->accel.sx_start) {
mach->accel.src_width = (mach->accel.sx_start - mach->accel.sx_end);
mach->accel.src_stepx = -1;
if (dev->accel.cx > 0)
dev->accel.cx--;
mach_log("BitBLT: Src Negative X: width = %d, coordinates: %d,%d px, end: %d px, stepx = %d, dpconfig = %04x, oddwidth = %d.\n", mach->accel.src_width, dev->accel.cx, dev->accel.cy, mach->accel.src_x_end, mach->accel.src_stepx, mach->accel.dp_config, mach->accel.src_width & 1);
mach_log("BitBLT: Src Negative X: width = %d, coordinates: %d,%d px, end: %d px, stepx = %d, dpconfig = %04x, oddwidth = %d.\n",
mach->accel.src_width, dev->accel.cx, dev->accel.cy, mach->accel.src_x_end, mach->accel.src_stepx, mach->accel.dp_config
mach->accel.src_width & 1);
} else {
mach->accel.src_stepx = 1;
mach->accel.src_width = 0;
mach_log("BitBLT: Src Indeterminate X: width = %d, coordinates: %d,%d px, end: %d px, stepx = %d, dpconfig = %04x, oddwidth = %d.\n", mach->accel.src_width, dev->accel.cx, dev->accel.cy, mach->accel.src_x_end, mach->accel.src_stepx, mach->accel.dp_config, mach->accel.src_width & 1);
mach_log("BitBLT: Src Indeterminate X: width = %d, coordinates: %d,%d px, end: %d px, stepx = %d, dpconfig = %04x, oddwidth = %d.\n",
mach->accel.src_width, dev->accel.cx, dev->accel.cy, mach->accel.src_x_end, mach->accel.src_stepx,
mach->accel.dp_config, mach->accel.src_width & 1);
}
mach->accel.sx = 0;
if (mach->accel.patt_data_idx < 16)
@@ -996,7 +1007,8 @@ mach_accel_start(int cmd_type, int cpu_input, int count, uint32_t mix_dat, uint3
if (cpu_input) {
if (mach->accel.dp_config == 0x3251) {
mach_log("DPCONFIG 3251: monosrc=%d, frgdsel=%d, bkgdsel=%d, pitch=%d.\n", mono_src, frgd_sel, bkgd_sel, dev->pitch);
mach_log("DPCONFIG 3251: monosrc=%d, frgdsel=%d, bkgdsel=%d, pitch=%d.\n",
mono_src, frgd_sel, bkgd_sel, dev->pitch);
if (dev->accel.sy == mach->accel.height) {
mach_log("No Blit on DPCONFIG=3251.\n");
dev->accel.cmd_back = 1;
@@ -1156,7 +1168,10 @@ mach_accel_start(int cmd_type, int cpu_input, int count, uint32_t mix_dat, uint3
cpu_dat >>= 8;
if (mach->accel.dp_config == 0x2071 || (mach->accel.dp_config == 0x2011))
mach_log("FontBlit: SX=%d, C(%d,%d), SRCWidth=%d, frgdmix=%d, bkgdmix=%d, rdmask=%04x, D(%d,%d), geoffset=%x, addr=%08x,.\n", mach->accel.sx, dev->accel.cx, dev->accel.cy, mach->accel.src_width, dev->accel.frgd_mix & 0x1f, dev->accel.bkgd_mix & 0x1f, rd_mask, dev->accel.dx, dev->accel.dy, dev->accel.ge_offset, (dev->accel.src + dev->accel.cx) & dev->vram_mask);
mach_log("FontBlit: SX=%d, C(%d,%d), SRCWidth=%d, frgdmix=%d, bkgdmix=%d, rdmask=%04x, D(%d,%d), geoffset=%x, addr=%08x,.\n",
mach->accel.sx, dev->accel.cx, dev->accel.cy, mach->accel.src_width, dev->accel.frgd_mix & 0x1f,
dev->accel.bkgd_mix & 0x1f, rd_mask, dev->accel.dx, dev->accel.dy, dev->accel.ge_offset,
(dev->accel.src + dev->accel.cx) & dev->vram_mask);
if ((mono_src == 3) || (frgd_sel == 3) || (bkgd_sel == 3) || (mach->accel.dp_config & 0x02)) {
dev->accel.cx += mach->accel.src_stepx;
@@ -1248,7 +1263,9 @@ mach_accel_start(int cmd_type, int cpu_input, int count, uint32_t mix_dat, uint3
dev->accel.sx = 0;
mach_log("Linedraw: c(%d,%d), d(%d,%d), cend(%d,%d), bounds: l=%d, r=%d, t=%d, b=%d.\n", dev->accel.cur_x, dev->accel.cur_y, dev->accel.dx, dev->accel.dy, mach->accel.cx_end_line, mach->accel.cy_end_line, mach->accel.bleft, mach->accel.bright, mach->accel.btop, mach->accel.bbottom);
mach_log("Linedraw: c(%d,%d), d(%d,%d), cend(%d,%d), bounds: l=%d, r=%d, t=%d, b=%d.\n",
dev->accel.cur_x, dev->accel.cur_y, dev->accel.dx, dev->accel.dy, mach->accel.cx_end_line,
mach->accel.cy_end_line, mach->accel.bleft, mach->accel.bright, mach->accel.btop, mach->accel.bbottom);
if ((mono_src == 2) || (bkgd_sel == 2) || (frgd_sel == 2) || mach_pixel_read(mach)) {
if (mach_pixel_write(mach)) {
@@ -1944,7 +1961,9 @@ mach_accel_start(int cmd_type, int cpu_input, int count, uint32_t mix_dat, uint3
else
dev->accel.src = (mach->accel.ge_offset << 2) + (dev->accel.cy * (dev->pitch));
mach_log("ScanToX=%04x, MonoSRC=%d, FrgdSel=%d, BkgdSel=%d, Pitch=%d, C(%d,%d), SRCWidth=%d, WH(%d,%d), colorpattidx=%d, pattlen=%d.\n", mach->accel.dp_config, mono_src, frgd_sel, bkgd_sel, dev->ext_pitch, dev->accel.cx, dev->accel.cy, mach->accel.src_width, mach->accel.width, mach->accel.height, mach->accel.color_pattern_idx, mach->accel.patt_len);
mach_log("ScanToX=%04x, MonoSRC=%d, FrgdSel=%d, BkgdSel=%d, Pitch=%d, C(%d,%d), SRCWidth=%d, WH(%d,%d), colorpattidx=%d, pattlen=%d.\n",
mach->accel.dp_config, mono_src, frgd_sel, bkgd_sel, dev->ext_pitch, dev->accel.cx, dev->accel.cy, mach->accel.src_width,
mach->accel.width, mach->accel.height, mach->accel.color_pattern_idx, mach->accel.patt_len);
if ((mono_src == 2) || (bkgd_sel == 2) || (frgd_sel == 2) || mach_pixel_read(mach)) {
if (mach_pixel_write(mach)) {
@@ -2197,9 +2216,11 @@ mach_out(uint16_t addr, uint8_t val, void *priv)
if (((dev->disp_cntl & 0x60) == 0x20) && ((dev->local & 0xff) >= 0x02)) {
if ((addr >= 0x3c6) && (addr <= 0x3c9)) {
mach_log("VGA DAC write regs=%03x, on=%d, display control=%02x, on1=%x, clocksel=%02x.\n", addr, dev->on, dev->disp_cntl & 0x60, dev->accel.advfunc_cntl & 0x01, mach->accel.clock_sel & 0x01);
mach_log("VGA DAC write regs=%03x, on=%d, display control=%02x, on1=%x, clocksel=%02x.\n",
addr, dev->on, dev->disp_cntl & 0x60, dev->accel.advfunc_cntl & 0x01, mach->accel.clock_sel & 0x01);
} else if ((addr >= 0x2ea) && (addr <= 0x2ed))
mach_log("8514/A DAC write regs=%03x, on=%d, display control=%02x, on1=%x, clocksel=%02x.\n", addr, dev->on, dev->disp_cntl & 0x60, dev->accel.advfunc_cntl & 0x01, mach->accel.clock_sel & 0x01);
mach_log("8514/A DAC write regs=%03x, on=%d, display control=%02x, on1=%x, clocksel=%02x.\n",
addr, dev->on, dev->disp_cntl & 0x60, dev->accel.advfunc_cntl & 0x01, mach->accel.clock_sel & 0x01);
}
switch (addr) {
@@ -2609,7 +2630,8 @@ ati8514_recalctimings(svga_t *svga)
dev->accel.ge_offset = (mach->accel.ge_offset_lo | (mach->accel.ge_offset_hi << 16));
mach->accel.ge_offset = dev->accel.ge_offset;
mach_log("HDISP=%d, VDISP=%d, shadowset=%x, 8514/A mode=%x, clocksel=%02x.\n", dev->hdisp, dev->vdisp, mach->shadow_set & 0x03, dev->accel.advfunc_cntl & 0x05, mach->accel.clock_sel & 0x01);
mach_log("HDISP=%d, VDISP=%d, shadowset=%x, 8514/A mode=%x, clocksel=%02x.\n",
dev->hdisp, dev->vdisp, mach->shadow_set & 0x03, dev->accel.advfunc_cntl & 0x05, mach->accel.clock_sel & 0x01);
if (mach->accel.clock_sel & 0x01) {
dev->h_disp = dev->hdisp;
@@ -2637,7 +2659,9 @@ ati8514_recalctimings(svga_t *svga)
if (dev->interlace)
dev->dispend >>= 1;
mach_log("cntl=%d, hv(%d,%d), pitch=%d, rowoffset=%d, gextconfig=%03x, shadow=%x interlace=%d.\n", dev->accel.advfunc_cntl & 0x04, dev->h_disp, dev->dispend, dev->pitch, dev->rowoffset, mach->accel.ext_ge_config & 0xcec0, mach->shadow_set & 3, dev->interlace);
mach_log("cntl=%d, hv(%d,%d), pitch=%d, rowoffset=%d, gextconfig=%03x, shadow=%x interlace=%d.\n",
dev->accel.advfunc_cntl & 0x04, dev->h_disp, dev->dispend, dev->pitch, dev->rowoffset,
mach->accel.ext_ge_config & 0xcec0, mach->shadow_set & 3, dev->interlace);
if (dev->vram_512k_8514) {
if (dev->h_disp == 640) {
dev->ext_pitch = 640;
@@ -2713,7 +2737,9 @@ mach_recalctimings(svga_t *svga)
dev->accel.ge_offset = (mach->accel.ge_offset_lo | (mach->accel.ge_offset_hi << 16));
mach->accel.ge_offset = dev->accel.ge_offset;
mach_log("HDISP=%d, VDISP=%d, shadowset=%x, 8514/A mode=%x, clocksel=%02x, interlace=%x.\n", dev->hdisp, dev->vdisp, mach->shadow_set & 0x03, dev->accel.advfunc_cntl & 0x04, mach->accel.clock_sel & 0xfe, dev->interlace);
mach_log("HDISP=%d, VDISP=%d, shadowset=%x, 8514/A mode=%x, clocksel=%02x, interlace=%x.\n",
dev->hdisp, dev->vdisp, mach->shadow_set & 0x03, dev->accel.advfunc_cntl & 0x04,
mach->accel.clock_sel & 0xfe, dev->interlace);
if ((dev->local & 0xff) >= 0x02) {
if (dev->bpp || ((mach->accel.ext_ge_config & 0x30) == 0x30) || (mach->accel.clock_sel & 0x01)) {
dev->h_disp = dev->hdisp;
@@ -2788,7 +2814,9 @@ mach_recalctimings(svga_t *svga)
}
svga->render8514 = ibm8514_render_blank;
mach_log("hv(%d,%d), pitch=%d, rowoffset=%d, gextconfig=%03x, bpp=%d, shadow=%x, vgahdisp=%d.\n", dev->h_disp, dev->dispend, dev->pitch, dev->ext_crt_pitch, mach->accel.ext_ge_config & 0xcec0, dev->accel_bpp, mach->shadow_set & 3, svga->hdisp);
mach_log("hv(%d,%d), pitch=%d, rowoffset=%d, gextconfig=%03x, bpp=%d, shadow=%x, vgahdisp=%d.\n",
dev->h_disp, dev->dispend, dev->pitch, dev->ext_crt_pitch, mach->accel.ext_ge_config & 0xcec0,
dev->accel_bpp, mach->shadow_set & 3, svga->hdisp);
switch (dev->accel_bpp) {
case 8:
svga->render8514 = ibm8514_render_8bpp;
@@ -2814,7 +2842,9 @@ mach_recalctimings(svga_t *svga)
}
} else {
svga->render8514 = ibm8514_render_blank;
mach_log("cntl=%d, hv(%d,%d), pitch=%d, rowoffset=%d, gextconfig=%03x, shadow=%x interlace=%d.\n", dev->accel.advfunc_cntl & 0x04, dev->h_disp, dev->dispend, dev->pitch, dev->rowoffset, mach->accel.ext_ge_config & 0xcec0, mach->shadow_set & 3, dev->interlace);
mach_log("cntl=%d, hv(%d,%d), pitch=%d, rowoffset=%d, gextconfig=%03x, shadow=%x interlace=%d.\n",
dev->accel.advfunc_cntl & 0x04, dev->h_disp, dev->dispend, dev->pitch, dev->rowoffset,
mach->accel.ext_ge_config & 0xcec0, mach->shadow_set & 3, dev->interlace);
if (dev->vram_512k_8514) {
if (dev->h_disp == 640) {
dev->ext_pitch = 640;
@@ -2829,7 +2859,8 @@ mach_recalctimings(svga_t *svga)
}
} else {
if (!svga->scrblank && (svga->crtc[0x17] & 0x80) && svga->attr_palette_enable) {
mach_log("GDCREG5=%02x, ATTR10=%02x, ATI B0 bit 5=%02x, ON=%d.\n", svga->gdcreg[5] & 0x60, svga->attrregs[0x10] & 0x40, mach->regs[0xb0] & 0x20, dev->on);
mach_log("GDCREG5=%02x, ATTR10=%02x, ATI B0 bit 5=%02x, ON=%d.\n",
svga->gdcreg[5] & 0x60, svga->attrregs[0x10] & 0x40, mach->regs[0xb0] & 0x20, dev->on);
if ((svga->gdcreg[6] & 0x01) || (svga->attrregs[0x10] & 0x01)) {
if ((svga->gdcreg[5] & 0x40) || (svga->attrregs[0x10] & 0x40) || (mach->regs[0xb0] & 0x20)) {
svga->clock = (cpuclock * (double) (1ULL << 32)) / svga->getclock(clock_sel, svga->clock_gen);
@@ -3405,7 +3436,8 @@ mach_accel_out_call(uint16_t port, uint8_t val, mach_t *mach, svga_t *svga, ibm8
} else if (((mach->shadow_set & 0x03) == 0x00) && !(mach->accel.clock_sel & 0x01))
dev->hdisp2 = (val + 1) << 3;
}
mach_log("[%04X:%08X]: ATI 8514/A: (0x%04x): hdisp=0x%02x, shadowcntl=%02x, shadowset=%02x.\n", CS, cpu_state.pc, port, val, mach->shadow_cntl & 0x08, mach->shadow_set & 0x03);
mach_log("[%04X:%08X]: ATI 8514/A: (0x%04x): hdisp=0x%02x, shadowcntl=%02x, shadowset=%02x.\n",
CS, cpu_state.pc, port, val, mach->shadow_cntl & 0x08, mach->shadow_set & 0x03);
svga_recalctimings(svga);
break;
@@ -3475,7 +3507,8 @@ mach_accel_out_call(uint16_t port, uint8_t val, mach_t *mach, svga_t *svga, ibm8
dev->interlace = !!(dev->disp_cntl & 0x10);
}
}
mach_log("ATI 8514/A: DISP_CNTL write %04x=%02x, written=%02x, interlace=%d.\n", port, val & 0x70, dev->disp_cntl & 0x70, dev->interlace);
mach_log("ATI 8514/A: DISP_CNTL write %04x=%02x, written=%02x, interlace=%d.\n",
port, val & 0x70, dev->disp_cntl & 0x70, dev->interlace);
svga_recalctimings(svga);
break;
@@ -3483,7 +3516,8 @@ mach_accel_out_call(uint16_t port, uint8_t val, mach_t *mach, svga_t *svga, ibm8
dev->accel.advfunc_cntl = val;
dev->on = dev->accel.advfunc_cntl & 0x01;
dev->vendor_mode = 0;
mach_log("[%04X:%08X]: ATI 8514/A: (0x%04x): ON=%d, shadow crt=%x, hdisp=%d, vdisp=%d.\n", CS, cpu_state.pc, port, val & 0x01, dev->accel.advfunc_cntl & 0x04, dev->hdisp, dev->vdisp);
mach_log("[%04X:%08X]: ATI 8514/A: (0x%04x): ON=%d, shadow crt=%x, hdisp=%d, vdisp=%d.\n",
CS, cpu_state.pc, port, val & 0x01, dev->accel.advfunc_cntl & 0x04, dev->hdisp, dev->vdisp);
if ((dev->local & 0xff) < 0x02) {
dev->ext_crt_pitch = 128;
@@ -3630,8 +3664,10 @@ mach_accel_out_call(uint16_t port, uint8_t val, mach_t *mach, svga_t *svga, ibm8
WRITE8(port, mach->accel.clock_sel, val);
dev->on = mach->accel.clock_sel & 0x01;
dev->vendor_mode = 1;
mach_log("ATI 8514/A: (0x%04x): ON=%d, val=%04x, hdisp=%d, vdisp=%d.\n", port, mach->accel.clock_sel & 0x01, val, dev->hdisp, dev->vdisp);
mach_log("Vendor ATI mode set %s resolution.\n", (dev->accel.advfunc_cntl & 0x04) ? "2: 1024x768" : "1: 640x480");
mach_log("ATI 8514/A: (0x%04x): ON=%d, val=%04x, hdisp=%d, vdisp=%d.\n",
port, mach->accel.clock_sel & 0x01, val, dev->hdisp, dev->vdisp);
mach_log("Vendor ATI mode set %s resolution.\n",
(dev->accel.advfunc_cntl & 0x04) ? "2: 1024x768" : "1: 640x480");
svga_recalctimings(svga);
if ((dev->local & 0xff) >= 0x01)
mach32_updatemapping(mach, svga);
@@ -5160,7 +5196,8 @@ mach32_ap_writeb(uint32_t addr, uint8_t val, void *priv)
mach_accel_outb(0x02e8 + (addr & 1) + (port_dword << 8), val, mach);
}
} else {
mach_log("Linear WORDB Write=%08x, val=%02x, ON=%x, dpconfig=%04x, apsize=%08x.\n", addr & dev->vram_mask, val, dev->on, mach->accel.dp_config, mach->ap_size << 20);
mach_log("Linear WORDB Write=%08x, val=%02x, ON=%x, dpconfig=%04x, apsize=%08x.\n",
addr & dev->vram_mask, val, dev->on, mach->accel.dp_config, mach->ap_size << 20);
if (dev->on)
mach32_write_common(addr, val, 1, mach, svga);
else
@@ -5186,7 +5223,8 @@ mach32_ap_writew(uint32_t addr, uint16_t val, void *priv)
mach_accel_outw(0x02e8 + (port_dword << 8), val, mach);
}
} else {
mach_log("Linear WORDW Write=%08x, val=%04x, ON=%x, dpconfig=%04x, apsize=%08x.\n", addr & dev->vram_mask, val, dev->on, mach->accel.dp_config, mach->ap_size << 20);
mach_log("Linear WORDW Write=%08x, val=%04x, ON=%x, dpconfig=%04x, apsize=%08x.\n",
addr & dev->vram_mask, val, dev->on, mach->accel.dp_config, mach->ap_size << 20);
if (dev->on)
mach32_writew_linear(addr, val, mach);
else
@@ -5214,7 +5252,8 @@ mach32_ap_writel(uint32_t addr, uint32_t val, void *priv)
mach_accel_outw(0x02e8 + (port_dword << 8) + 4, val >> 16, mach);
}
} else {
mach_log("Linear WORDL Write=%08x, val=%08x, ON=%x, dpconfig=%04x, apsize=%08x.\n", addr & dev->vram_mask, val, dev->on, mach->accel.dp_config, mach->ap_size << 20);
mach_log("Linear WORDL Write=%08x, val=%08x, ON=%x, dpconfig=%04x, apsize=%08x.\n",
addr & dev->vram_mask, val, dev->on, mach->accel.dp_config, mach->ap_size << 20);
if (dev->on)
mach32_writel_linear(addr, val, mach);
else
@@ -5354,7 +5393,8 @@ mach32_updatemapping(mach_t *mach, svga_t *svga)
}
}
mach_log("Linear base = %08x, aperture = %04x, localcntl = %02x svgagdc = %x.\n", mach->linear_base, mach->memory_aperture, mach->local_cntl, svga->gdcreg[6] & 0x0c);
mach_log("Linear base = %08x, aperture = %04x, localcntl = %02x svgagdc = %x.\n",
mach->linear_base, mach->memory_aperture, mach->local_cntl, svga->gdcreg[6] & 0x0c);
if (mach->linear_base) {
if (((mach->memory_aperture & 3) == 1) && !mach->pci_bus) {
/*1 MB aperture*/
@@ -5832,7 +5872,8 @@ mach_mca_write(int port, uint8_t val, void *priv)
return;
mach->pos_regs[port & 7] = val;
mach_log("[%04X]: MCA write port = %x, val = %02x, biosaddr = %05x.\n", CS, port & 7, mach->pos_regs[port & 7], (((mach->pos_regs[3] & 0x3e) << 0x0c) >> 1) + 0xc0000);
mach_log("[%04X]: MCA write port = %x, val = %02x, biosaddr = %05x.\n",
CS, port & 7, mach->pos_regs[port & 7], (((mach->pos_regs[3] & 0x3e) << 0x0c) >> 1) + 0xc0000);
mem_mapping_disable(&mach->bios_rom.mapping);
mem_mapping_disable(&mach->bios_rom2.mapping);
if (mach->pos_regs[2] & 0x01) {
@@ -5882,7 +5923,8 @@ ati8514_mca_write(int port, uint8_t val, void *priv)
return;
dev->pos_regs[port & 7] = val;
mach_log("[%04X]: MCA write port = %x, val = %02x, biosaddr = %05x.\n", CS, port & 7, dev->pos_regs[port & 7], (((dev->pos_regs[3] & 0x3e) << 0x0c) >> 1) + 0xc0000);
mach_log("[%04X]: MCA write port = %x, val = %02x, biosaddr = %05x.\n",
CS, port & 7, dev->pos_regs[port & 7], (((dev->pos_regs[3] & 0x3e) << 0x0c) >> 1) + 0xc0000);
mem_mapping_disable(&dev->bios_rom.mapping);
if (dev->pos_regs[2] & 0x01)
@@ -6311,104 +6353,76 @@ mach_force_redraw(void *priv)
// clang-format off
static const device_config_t mach8_config[] = {
{
.name = "memory",
.description = "Memory size",
.type = CONFIG_SELECTION,
.default_int = 1024,
.selection = {
{
.description = "512 KB",
.value = 512
},
{
.description = "1 MB",
.value = 1024
},
{
.description = ""
}
}
.name = "memory",
.description = "Memory size",
.type = CONFIG_SELECTION,
.default_string = NULL,
.default_int = 1024,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "512 KB", .value = 512 },
{ .description = "1 MB", .value = 1024 },
{ .description = "" }
},
.bios = { { 0 } }
},
{ .name = "", .description = "", .type = CONFIG_END }
};
static const device_config_t mach32_config[] = {
{
.name = "memory",
.description = "Memory size",
.type = CONFIG_SELECTION,
.default_int = 2048,
.selection = {
{
.description = "512 KB",
.value = 512
},
{
.description = "1 MB",
.value = 1024
},
{
.description = "2 MB",
.value = 2048
},
{
.description = "4 MB",
.value = 4096
},
{
.description = ""
}
}
.name = "memory",
.description = "Memory size",
.type = CONFIG_SELECTION,
.default_string = NULL,
.default_int = 2048,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "512 KB", .value = 512 },
{ .description = "1 MB", .value = 1024 },
{ .description = "2 MB", .value = 2048 },
{ .description = "4 MB", .value = 4096 },
{ .description = "" }
},
.bios = { { 0 } }
},
{ .name = "", .description = "", .type = CONFIG_END }
};
static const device_config_t mach32_pci_config[] = {
{
.name = "ramdac",
.description = "RAMDAC type",
.type = CONFIG_SELECTION,
.default_int = 0,
.selection = {
{
.description = "ATI 68860",
.value = 0
},
{
.description = "ATI 68875",
.value = 1
},
{
.description = ""
}
}
.name = "ramdac",
.description = "RAMDAC type",
.type = CONFIG_SELECTION,
.default_string = NULL,
.default_int = 0,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "ATI 68860", .value = 0 },
{ .description = "ATI 68875", .value = 1 },
{ .description = "" }
},
.bios = { { 0 } }
},
{
.name = "memory",
.description = "Memory size",
.type = CONFIG_SELECTION,
.default_int = 2048,
.selection = {
{
.description = "512 KB",
.value = 512
},
{
.description = "1 MB",
.value = 1024
},
{
.description = "2 MB",
.value = 2048
},
{
.description = "4 MB",
.value = 4096
},
{
.description = ""
}
}
.name = "memory",
.description = "Memory size",
.type = CONFIG_SELECTION,
.default_string = NULL,
.default_int = 2048,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "512 KB", .value = 512 },
{ .description = "1 MB", .value = 1024 },
{ .description = "2 MB", .value = 2048 },
{ .description = "4 MB", .value = 4096 },
{ .description = "" }
},
.bios = { { 0 } }
},
{ .name = "", .description = "", .type = CONFIG_END }
};

View File

@@ -921,46 +921,35 @@ bochs_vbe_force_redraw(void *priv)
static const device_config_t bochs_vbe_config[] = {
// clang-format off
{
.name = "revision",
.description = "Revision",
.type = CONFIG_SELECTION,
.selection = {
{
.description = "VirtualBox",
.value = VBE_DISPI_ID4
},
{
.description = "Bochs latest",
.value = VBE_DISPI_ID5
},
{
.description = ""
}
.name = "revision",
.description = "Revision",
.type = CONFIG_SELECTION,
.default_string = NULL,
.default_int = VBE_DISPI_ID5,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "VirtualBox", .value = VBE_DISPI_ID4 },
{ .description = "Bochs latest", .value = VBE_DISPI_ID5 },
{ .description = "" }
},
.default_int = VBE_DISPI_ID5
.bios = { { 0 } }
},
{
.name = "memory",
.description = "Memory size",
.type = CONFIG_SELECTION,
.selection = {
{
.description = "4 MB",
.value = 4
},
{
.description = "8 MB",
.value = 8
},
{
.description = "16 MB",
.value = 16
},
{
.description = ""
}
.name = "memory",
.description = "Memory size",
.type = CONFIG_SELECTION,
.default_string = NULL,
.default_int = 16,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "4 MB", .value = 4 },
{ .description = "8 MB", .value = 8 },
{ .description = "16 MB", .value = 16 },
{ .description = "" }
},
.default_int = 16
.bios = { { 0 } }
},
{ .name = "", .description = "", .type = CONFIG_END }
// clang-format on
@@ -974,7 +963,7 @@ const device_t bochs_svga_device = {
.init = bochs_vbe_init,
.close = bochs_vbe_close,
.reset = bochs_vbe_reset,
.available = bochs_vbe_available,
.available = bochs_vbe_available,
.speed_changed = bochs_vbe_speed_changed,
.force_redraw = bochs_vbe_force_redraw,
.config = bochs_vbe_config

View File

@@ -809,110 +809,81 @@ cga_speed_changed(void *priv)
// clang-format off
const device_config_t cga_config[] = {
{
.name = "display_type",
.description = "Display type",
.type = CONFIG_SELECTION,
.default_int = CGA_RGB,
.selection = {
{
.description = "RGB",
.value = CGA_RGB
},
{
.description = "Composite",
.value = CGA_COMPOSITE
},
{
.description = ""
}
}
.name = "display_type",
.description = "Display type",
.type = CONFIG_SELECTION,
.default_string = NULL,
.default_int = CGA_RGB,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "RGB", .value = CGA_RGB },
{ .description = "Composite", .value = CGA_COMPOSITE },
{ .description = "" }
},
.bios = { { 0 } }
},
{
.name = "composite_type",
.description = "Composite type",
.type = CONFIG_SELECTION,
.default_int = COMPOSITE_OLD,
.selection = {
{
.description = "Old",
.value = COMPOSITE_OLD
},
{
.description = "New",
.value = COMPOSITE_NEW
},
{
.description = ""
}
}
.name = "composite_type",
.description = "Composite type",
.type = CONFIG_SELECTION,
.default_string = NULL,
.default_int = COMPOSITE_OLD,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "Old", .value = COMPOSITE_OLD },
{ .description = "New", .value = COMPOSITE_NEW },
{ .description = "" }
},
.bios = { { 0 } }
},
{
.name = "rgb_type",
.description = "RGB type",
.type = CONFIG_SELECTION,
.default_int = 5,
.selection = {
{
.description = "Color (generic)",
.value = 0
},
{
.description = "Green Monochrome",
.value = 1
},
{
.description = "Amber Monochrome",
.value = 2
},
{
.description = "Gray Monochrome",
.value = 3
},
{
.description = "Color (no brown)",
.value = 4
},
{
.description = "Color (IBM 5153)",
.value = 5
},
{
.description = ""
}
}
.name = "rgb_type",
.description = "RGB type",
.type = CONFIG_SELECTION,
.default_string = NULL,
.default_int = 5,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "Color (generic)", .value = 0 },
{ .description = "Green Monochrome", .value = 1 },
{ .description = "Amber Monochrome", .value = 2 },
{ .description = "Gray Monochrome", .value = 3 },
{ .description = "Color (no brown)", .value = 4 },
{ .description = "Color (IBM 5153)", .value = 5 },
{ .description = "" }
},
.bios = { { 0 } }
},
{
.name = "double_type",
.description = "Line doubling type",
.type = CONFIG_SELECTION,
.default_int = DOUBLE_NONE,
.selection = {
{
.description = "None",
.value = DOUBLE_NONE
},
{
.description = "Simple doubling",
.value = DOUBLE_SIMPLE
},
{
.description = "sRGB interpolation",
.value = DOUBLE_INTERPOLATE_SRGB
},
{
.description = "Linear interpolation",
.value = DOUBLE_INTERPOLATE_LINEAR
},
{
.description = ""
}
}
.name = "double_type",
.description = "Line doubling type",
.type = CONFIG_SELECTION,
.default_string = NULL,
.default_int = DOUBLE_NONE,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "None", .value = DOUBLE_NONE },
{ .description = "Simple doubling", .value = DOUBLE_SIMPLE },
{ .description = "sRGB interpolation", .value = DOUBLE_INTERPOLATE_SRGB },
{ .description = "Linear interpolation", .value = DOUBLE_INTERPOLATE_LINEAR },
{ .description = "" }
},
.bios = { { 0 } }
},
{
.name = "snow_enabled",
.description = "Snow emulation",
.type = CONFIG_BINARY,
.default_int = 1
.name = "snow_enabled",
.description = "Snow emulation",
.type = CONFIG_BINARY,
.default_string = NULL,
.default_int = 1,
.file_filter = NULL,
.spinner = { 0 },
.selection = { { 0 } },
.bios = { { 0 } }
},
{ .name = "", .description = "", .type = CONFIG_END }
};

View File

@@ -44,22 +44,22 @@ static const double tau = 6.28318531; /* == 2*pi */
static unsigned char chroma_multiplexer[256] = {
// clang-format off
2, 2, 2, 2, 114,174, 4, 3, 2, 1,133,135, 2,113,150, 4,
133, 2, 1, 99, 151,152, 2, 1, 3, 2, 96,136, 151,152,151,152,
2, 56, 62, 4, 111,250,118, 4, 0, 51,207,137, 1,171,209, 5,
140, 50, 54,100, 133,202, 57, 4, 2, 50,153,149, 128,198,198,135,
32, 1, 36, 81, 147,158, 1, 42, 33, 1,210,254, 34,109,169, 77,
177, 2, 0,165, 189,154, 3, 44, 33, 0, 91,197, 178,142,144,192,
4, 2, 61, 67, 117,151,112, 83, 4, 0,249,255, 3,107,249,117,
147, 1, 50,162, 143,141, 52, 54, 3, 0,145,206, 124,123,192,193,
72, 78, 2, 0, 159,208, 4, 0, 53, 58,164,159, 37,159,171, 1,
248,117, 4, 98, 212,218, 5, 2, 54, 59, 93,121, 176,181,134,130,
1, 61, 31, 0, 160,255, 34, 1, 1, 58,197,166, 0,177,194, 2,
162,111, 34, 96, 205,253, 32, 1, 1, 57,123,125, 119,188,150,112,
78, 4, 0, 75, 166,180, 20, 38, 78, 1,143,246, 42,113,156, 37,
252, 4, 1,188, 175,129, 1, 37, 118, 4, 88,249, 202,150,145,200,
61, 59, 60, 60, 228,252,117, 77, 60, 58,248,251, 81,212,254,107,
198, 59, 58,169, 250,251, 81, 80, 100, 58,154,250, 251,252,252,252
2, 2, 2, 2, 114, 174, 4, 3, 2, 1, 133, 135, 2, 113, 150, 4,
133, 2, 1, 99, 151, 152, 2, 1, 3, 2, 96, 136, 151, 152, 151, 152,
2, 56, 62, 4, 111, 250, 118, 4, 0, 51, 207, 137, 1, 171, 209, 5,
140, 50, 54, 100, 133, 202, 57, 4, 2, 50, 153, 149, 128, 198, 198, 135,
32, 1, 36, 81, 147, 158, 1, 42, 33, 1, 210, 254, 34, 109, 169, 77,
177, 2, 0, 165, 189, 154, 3, 44, 33, 0, 91, 197, 178, 142, 144, 192,
4, 2, 61, 67, 117, 151, 112, 83, 4, 0, 249, 255, 3, 107, 249, 117,
147, 1, 50, 162, 143, 141, 52, 54, 3, 0, 145, 206, 124, 123, 192, 193,
72, 78, 2, 0, 159, 208, 4, 0, 53, 58, 164, 159, 37, 159, 171, 1,
248, 117, 4, 98, 212, 218, 5, 2, 54, 59, 93, 121, 176, 181, 134, 130,
1, 61, 31, 0, 160, 255, 34, 1, 1, 58, 197, 166, 0, 177, 194, 2,
162, 111, 34, 96, 205, 253, 32, 1, 1, 57, 123, 125, 119, 188, 150, 112,
78, 4, 0, 75, 166, 180, 20, 38, 78, 1, 143, 246, 42, 113, 156, 37,
252, 4, 1, 188, 175, 129, 1, 37, 118, 4, 88, 249, 202, 150, 145, 200,
61, 59, 60, 60, 228, 252, 117, 77, 60, 58, 248, 251, 81, 212, 254, 107,
198, 59, 58, 169, 250, 251, 81, 80, 100, 58, 154, 250, 251, 252, 252, 252
// clang-format on
};

View File

@@ -4701,200 +4701,156 @@ gd54xx_force_redraw(void *priv)
// clang-format off
static const device_config_t gd542x_config[] = {
{
.name = "memory",
.description = "Memory size",
.type = CONFIG_SELECTION,
.selection = {
{
.description = "512 KB",
.value = 512
},
{
.description = "1 MB",
.value = 1024
},
{
.description = ""
}
.name = "memory",
.description = "Memory size",
.type = CONFIG_SELECTION,
.default_string = NULL,
.default_int = 512,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "512 KB", .value = 512 },
{ .description = "1 MB", .value = 1024 },
{ .description = "" }
},
.default_int = 512
.bios = { { 0 } }
},
{ .name = "", .description = "", .type = CONFIG_END }
};
static const device_config_t gd5426_config[] = {
{
.name = "memory",
.description = "Memory size",
.type = CONFIG_SELECTION,
.selection = {
{
.description = "512 KB",
.value = 512
},
{
.description = "1 MB",
.value = 1024
},
{
.description = "2 MB",
.value = 2048
},
{
.description = ""
}
.name = "memory",
.description = "Memory size",
.type = CONFIG_SELECTION,
.default_string = NULL,
.default_int = 2048,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "512 KB", .value = 512 },
{ .description = "1 MB", .value = 1024 },
{ .description = "2 MB", .value = 2048 },
{ .description = "" }
},
.default_int = 2048
.bios = { { 0 } }
},
{ .name = "", .description = "", .type = CONFIG_END }
};
static const device_config_t gd5428_onboard_config[] = {
{
.name = "memory",
.description = "Memory size",
.type = CONFIG_SELECTION,
.selection = {
{
.description = "512 KB",
.value = 512
},
{
.description = "1 MB",
.value = 1024
},
{
.description = "2 MB",
.value = 2048
},
{
.description = ""
}
.name = "memory",
.description = "Memory size",
.type = CONFIG_SELECTION,
.default_string = NULL,
.default_int = 2048,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "512 KB", .value = 512 },
{ .description = "1 MB", .value = 1024 },
{ .description = "2 MB", .value = 2048 },
{ .description = "" }
},
.default_int = 2048
.bios = { { 0 } }
},
{ .name = "", .description = "", .type = CONFIG_END }
};
static const device_config_t gd5429_config[] = {
{
.name = "memory",
.description = "Memory size",
.type = CONFIG_SELECTION,
.selection = {
{
.description = "1 MB",
.value = 1
},
{
.description = "2 MB",
.value = 2
},
{
.description = ""
}
.name = "memory",
.description = "Memory size",
.type = CONFIG_SELECTION,
.default_string = NULL,
.default_int = 2,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "1 MB", .value = 1 },
{ .description = "2 MB", .value = 2 },
{ .description = "" }
},
.default_int = 2
.bios = { { 0 } }
},
{ .name = "", .description = "", .type = CONFIG_END }
};
static const device_config_t gd5440_onboard_config[] = {
{
.name = "memory",
.description = "Memory size",
.type = CONFIG_SELECTION,
.selection = {
{
.description = "1 MB",
.value = 1
},
{
.description = "2 MB",
.value = 2
},
{
.description = ""
}
.name = "memory",
.description = "Memory size",
.type = CONFIG_SELECTION,
.default_string = NULL,
.default_int = 2,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "1 MB", .value = 1 },
{ .description = "2 MB", .value = 2 },
{ .description = "" }
},
.default_int = 2
.bios = { { 0 } }
},
{ .name = "", .description = "", .type = CONFIG_END }
};
static const device_config_t gd5434_config[] = {
{
.name = "memory",
.description = "Memory size",
.type = CONFIG_SELECTION,
.selection = {
{
.description = "1 MB",
.value = 1
},
{
.description = "2 MB",
.value = 2
},
{
.description = "4 MB",
.value = 4
},
{
.description = ""
}
.name = "memory",
.description = "Memory size",
.type = CONFIG_SELECTION,
.default_string = NULL,
.default_int = 4,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "1 MB", .value = 1 },
{ .description = "2 MB", .value = 2 },
{ .description = "4 MB", .value = 4 },
{ .description = "" }
},
.default_int = 4
.bios = { { 0 } }
},
{ .name = "", .description = "", .type = CONFIG_END }
};
static const device_config_t gd5434_onboard_config[] = {
{
.name = "memory",
.description = "Memory size",
.type = CONFIG_SELECTION,
.selection = {
{
.description = "1 MB",
.value = 1
},
{
.description = "2 MB",
.value = 2
},
{
.description = "4 MB",
.value = 4
},
{
.description = ""
}
.name = "memory",
.description = "Memory size",
.type = CONFIG_SELECTION,
.default_string = NULL,
.default_int = 4,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "1 MB", .value = 1 },
{ .description = "2 MB", .value = 2 },
{ .description = "4 MB", .value = 4 },
{ .description = "" }
},
.default_int = 4
.bios = { { 0 } }
},
{ .name = "", .description = "", .type = CONFIG_END }
};
static const device_config_t gd5480_config[] = {
{
.name = "memory",
.description = "Memory size",
.type = CONFIG_SELECTION,
.selection = {
{
.description = "2 MB",
.value = 2
},
{
.description = "4 MB",
.value = 4
},
{
.description = ""
}
.name = "memory",
.description = "Memory size",
.type = CONFIG_SELECTION,
.default_string = NULL,
.default_int = 4,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "2 MB", .value = 2 },
{ .description = "4 MB", .value = 4 },
{ .description = "" }
},
.default_int = 4
.bios = { { 0 } }
},
{ .name = "", .description = "", .type = CONFIG_END }
};

View File

@@ -382,48 +382,45 @@ colorplus_speed_changed(void *priv)
static const device_config_t colorplus_config[] = {
// clang-format off
{
.name = "display_type",
.description = "Display type",
.type = CONFIG_SELECTION,
.default_int = CGA_RGB,
.selection = {
{
.description = "RGB",
.value = CGA_RGB
},
{
.description = "Composite",
.value = CGA_COMPOSITE
},
{
.description = ""
}
}
.name = "display_type",
.description = "Display type",
.type = CONFIG_SELECTION,
.default_string = NULL,
.default_int = CGA_RGB,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "RGB", .value = CGA_RGB },
{ .description = "Composite", .value = CGA_COMPOSITE },
{ .description = "" }
},
.bios = { { 0 } }
},
{
.name = "composite_type",
.description = "Composite type",
.type = CONFIG_SELECTION,
.default_int = COMPOSITE_OLD,
.selection = {
{
.description = "Old",
.value = COMPOSITE_OLD
},
{
.description = "New",
.value = COMPOSITE_NEW
},
{
.description = ""
}
}
.name = "composite_type",
.description = "Composite type",
.type = CONFIG_SELECTION,
.default_string = NULL,
.default_int = COMPOSITE_OLD,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "Old", .value = COMPOSITE_OLD },
{ .description = "New", .value = COMPOSITE_NEW },
{ .description = "" }
},
.bios = { { 0 } }
},
{
.name = "snow_enabled",
.description = "Snow emulation",
.type = CONFIG_BINARY,
.default_int = 1
.name = "snow_enabled",
.description = "Snow emulation",
.type = CONFIG_BINARY,
.default_string = NULL,
.default_int = 1,
.file_filter = NULL,
.spinner = { 0 },
.selection = { { 0 } },
.bios = { { 0 } }
},
{ .name = "", .description = "", .type = CONFIG_END }
// clang-format on

View File

@@ -1590,70 +1590,41 @@ ega_speed_changed(void *priv)
static const device_config_t ega_config[] = {
// clang-format off
{
.name = "memory",
.description = "Memory size",
.type = CONFIG_SELECTION,
.default_int = 256,
.selection = {
{
.description = "32 KB",
.value = 32
},
{
.description = "64 KB",
.value = 64
},
{
.description = "128 KB",
.value = 128
},
{
.description = "256 KB",
.value = 256
},
{
.description = ""
}
}
.name = "memory",
.description = "Memory size",
.type = CONFIG_SELECTION,
.default_string = NULL,
.default_int = 256,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "32 KB", .value = 32 },
{ .description = "64 KB", .value = 64 },
{ .description = "128 KB", .value = 128 },
{ .description = "256 KB", .value = 256 },
{ .description = "" }
},
.bios = { { 0 } }
},
{
.name = "monitor_type",
.description = "Monitor type",
.type = CONFIG_SELECTION,
.selection = {
{
.description = "Monochrome (5151/MDA) (white)",
.value = 0x0B | (DISPLAY_WHITE << 4)
},
{
.description = "Monochrome (5151/MDA) (green)",
.value = 0x0B | (DISPLAY_GREEN << 4)
},
{
.description = "Monochrome (5151/MDA) (amber)",
.value = 0x0B | (DISPLAY_AMBER << 4)
},
{
.description = "Color 40x25 (5153/CGA)",
.value = 0x06
},
{
.description = "Color 80x25 (5153/CGA)",
.value = 0x07
},
{
.description = "Enhanced Color - Normal Mode (5154/ECD)",
.value = 0x08
},
{
.description = "Enhanced Color - Enhanced Mode (5154/ECD)",
.value = 0x09
},
{
.description = ""
}
.name = "monitor_type",
.description = "Monitor type",
.type = CONFIG_SELECTION,
.default_string = NULL,
.default_int = 9,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "Monochrome (5151/MDA) (white)", .value = 0x0B | (DISPLAY_WHITE << 4) },
{ .description = "Monochrome (5151/MDA) (green)", .value = 0x0B | (DISPLAY_GREEN << 4) },
{ .description = "Monochrome (5151/MDA) (amber)", .value = 0x0B | (DISPLAY_AMBER << 4) },
{ .description = "Color 40x25 (5153/CGA)", .value = 0x06 },
{ .description = "Color 80x25 (5153/CGA)", .value = 0x07 },
{ .description = "Enhanced Color - Normal Mode (5154/ECD)", .value = 0x08 },
{ .description = "Enhanced Color - Enhanced Mode (5154/ECD)", .value = 0x09 },
{ .description = "" }
},
.default_int = 9
.bios = { { 0 } }
},
{ .name = "", .description = "", .type = CONFIG_END }
// clang-format on

View File

@@ -550,15 +550,19 @@ et3000_available(void)
static const device_config_t et3000_config[] = {
// clang-format off
{
.name = "memory",
.description = "Memory size",
.type = CONFIG_SELECTION,
.default_int = 512,
.selection = {
{ .description = "256 KB", .value = 256 },
{ .description = "512 KB", .value = 512 },
{ .description = "" }
}
.name = "memory",
.description = "Memory size",
.type = CONFIG_SELECTION,
.default_string = NULL,
.default_int = 512,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "256 KB", .value = 256 },
{ .description = "512 KB", .value = 512 },
{ .description = "" }
},
.bios = { { 0 } }
},
{ .name = "", .description = "", .type = CONFIG_END }
// clang-format on

View File

@@ -82,8 +82,8 @@ typedef struct {
rom_t bios_rom;
uint8_t banking;
uint32_t vram_size,
vram_mask;
uint32_t vram_size;
uint32_t vram_mask;
uint8_t port_22cb_val;
uint8_t port_32cb_val;
@@ -943,43 +943,51 @@ et4000_kasan_available(void)
static const device_config_t et4000_tc6058af_config[] = {
// clang-format off
{
.name = "memory",
.description = "Memory size",
.type = CONFIG_SELECTION,
.default_int = 512,
.selection = {
{
.description = "256 KB",
.value = 256
},
{
.description = "512 KB",
.value = 512
},
{
.description = "1 MB",
.value = 1024
},
{
.description = ""
}
}
.name = "memory",
.description = "Memory size",
.type = CONFIG_SELECTION,
.default_string = NULL,
.default_int = 512,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "256 KB", .value = 256 },
{ .description = "512 KB", .value = 512 },
{ .description = "1 MB", .value = 1024 },
{ .description = "" }
},
.bios = { { 0 } }
},
{
.name = "bios_ver",
.description = "BIOS Revision",
.type = CONFIG_BIOS,
.name = "bios_ver",
.description = "BIOS Revision",
.type = CONFIG_BIOS,
.default_string = "v1_10",
.default_int = 0,
.file_filter = "",
.spinner = { 0 },
.bios = {
{ .name = "Version 1.10", .internal_name = "v1_10", .bios_type = BIOS_NORMAL,
.files_no = 1, .local = 0, .size = 32768, .files = { TC6058AF_BIOS_ROM_PATH, "" } },
{ .name = "Version 1.21", .internal_name = "v1_21", .bios_type = BIOS_NORMAL,
.files_no = 1, .local = 0, .size = 32768, .files = { V1_21_BIOS_ROM_PATH, "" } },
.default_int = 0,
.file_filter = NULL,
.spinner = { 0 },
.selection = { { 0 } },
.bios = {
{
.name = "Version 1.10",
.internal_name = "v1_10",
.bios_type = BIOS_NORMAL,
.files_no = 1,
.local = 0,
.size = 32768,
.files = { TC6058AF_BIOS_ROM_PATH, "" }
},
{
.name = "Version 1.21",
.internal_name = "v1_21",
.bios_type = BIOS_NORMAL,
.files_no = 1,
.local = 0,
.size = 32768,
.files = { V1_21_BIOS_ROM_PATH, "" }
},
{ .files_no = 0 }
},
}
},
{ .name = "", .description = "", .type = CONFIG_END }
// clang-format on
@@ -988,43 +996,51 @@ static const device_config_t et4000_tc6058af_config[] = {
static const device_config_t et4000_bios_config[] = {
// clang-format off
{
.name = "memory",
.description = "Memory size",
.type = CONFIG_SELECTION,
.default_int = 1024,
.selection = {
{
.description = "256 KB",
.value = 256
},
{
.description = "512 KB",
.value = 512
},
{
.description = "1 MB",
.value = 1024
},
{
.description = ""
}
}
.name = "memory",
.description = "Memory size",
.type = CONFIG_SELECTION,
.default_string = NULL,
.default_int = 1024,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "256 KB", .value = 256 },
{ .description = "512 KB", .value = 512 },
{ .description = "1 MB", .value = 1024 },
{ .description = "" }
},
.bios = { { 0 } }
},
{
.name = "bios_ver",
.description = "BIOS Revision",
.type = CONFIG_BIOS,
.name = "bios_ver",
.description = "BIOS Revision",
.type = CONFIG_BIOS,
.default_string = "v8_01",
.default_int = 0,
.file_filter = "",
.spinner = { 0 },
.bios = {
{ .name = "Version 8.01", .internal_name = "v8_01", .bios_type = BIOS_NORMAL,
.files_no = 1, .local = 0, .size = 32768, .files = { BIOS_ROM_PATH, "" } },
{ .name = "Version 8.06", .internal_name = "v8_06", .bios_type = BIOS_NORMAL,
.files_no = 1, .local = 0, .size = 32768, .files = { V8_06_BIOS_ROM_PATH, "" } },
.default_int = 0,
.file_filter = NULL,
.spinner = { 0 },
.selection = { { 0 } },
.bios = {
{
.name = "Version 8.01",
.internal_name = "v8_01",
.bios_type = BIOS_NORMAL,
.files_no = 1,
.local = 0,
.size = 32768,
.files = { BIOS_ROM_PATH, "" }
},
{
.name = "Version 8.06",
.internal_name = "v8_06",
.bios_type = BIOS_NORMAL,
.files_no = 1,
.local = 0,
.size = 32768,
.files = { V8_06_BIOS_ROM_PATH, "" }
},
{ .files_no = 0 }
},
}
},
{ .name = "", .description = "", .type = CONFIG_END }
// clang-format on
@@ -1033,27 +1049,20 @@ static const device_config_t et4000_bios_config[] = {
static const device_config_t et4000_config[] = {
// clang-format off
{
.name = "memory",
.description = "Memory size",
.type = CONFIG_SELECTION,
.default_int = 1024,
.selection = {
{
.description = "256 KB",
.value = 256
},
{
.description = "512 KB",
.value = 512
},
{
.description = "1 MB",
.value = 1024
},
{
.description = ""
}
}
.name = "memory",
.description = "Memory size",
.type = CONFIG_SELECTION,
.default_string = NULL,
.default_int = 1024,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "256 KB", .value = 256 },
{ .description = "512 KB", .value = 512 },
{ .description = "1 MB", .value = 1024 },
{ .description = "" }
},
.bios = { { 0 } }
},
{ .name = "", .description = "", .type = CONFIG_END }
// clang-format on

View File

@@ -2943,23 +2943,19 @@ et4000w32p_force_redraw(void *priv)
static const device_config_t et4000w32p_config[] = {
// clang-format off
{
.name = "memory",
.description = "Memory size",
.type = CONFIG_SELECTION,
.default_int = 2,
.selection = {
{
.description = "1 MB",
.value = 1
},
{
.description = "2 MB",
.value = 2
},
{
.description = ""
}
}
.name = "memory",
.description = "Memory size",
.type = CONFIG_SELECTION,
.default_string = NULL,
.default_int = 2,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "1 MB", .value = 1 },
{ .description = "2 MB", .value = 2 },
{ .description = "" }
},
.bios = { { 0 } }
},
{ .name = "", .description = "", .type = CONFIG_END }
// clang-format on

View File

@@ -615,37 +615,32 @@ speed_changed(void *priv)
static const device_config_t hercules_config[] = {
// clang-format off
{
.name = "rgb_type",
.description = "Display type",
.type = CONFIG_SELECTION,
.default_int = 0,
.selection = {
{
.description = "Default",
.value = 0
},
{
.description = "Green",
.value = 1
},
{
.description = "Amber",
.value = 2
},
{
.description = "Gray",
.value = 3
},
{
.description = ""
}
}
.name = "rgb_type",
.description = "Display type",
.type = CONFIG_SELECTION,
.default_string = NULL,
.default_int = 0,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "Default", .value = 0 },
{ .description = "Green", .value = 1 },
{ .description = "Amber", .value = 2 },
{ .description = "Gray", .value = 3 },
{ .description = "" }
},
.bios = { { 0 } }
},
{
.name = "blend",
.description = "Blend",
.type = CONFIG_BINARY,
.default_int = 1
.name = "blend",
.description = "Blend",
.type = CONFIG_BINARY,
.default_string = NULL,
.default_int = 1,
.file_filter = NULL,
.spinner = { 0 },
.selection = { { 0 } },
.bios = { { 0 } }
},
{ .name = "", .description = "", .type = CONFIG_END }
// clang-format on

View File

@@ -700,37 +700,32 @@ speed_changed(void *priv)
static const device_config_t herculesplus_config[] = {
// clang-format off
{
.name = "rgb_type",
.description = "Display type",
.type = CONFIG_SELECTION,
.default_int = 0,
.selection = {
{
.description = "Default",
.value = 0
},
{
.description = "Green",
.value = 1
},
{
.description = "Amber",
.value = 2
},
{
.description = "Gray",
.value = 3
},
{
.description = ""
}
}
.name = "rgb_type",
.description = "Display type",
.type = CONFIG_SELECTION,
.default_string = NULL,
.default_int = 0,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "Default", .value = 0 },
{ .description = "Green", .value = 1 },
{ .description = "Amber", .value = 2 },
{ .description = "Gray", .value = 3 },
{ .description = "" }
},
.bios = { { 0 } }
},
{
.name = "blend",
.description = "Blend",
.type = CONFIG_BINARY,
.default_int = 1
.name = "blend",
.description = "Blend",
.type = CONFIG_BINARY,
.default_string = NULL,
.default_int = 1,
.file_filter = NULL,
.spinner = { 0 },
.selection = { { 0 } },
.bios = { { 0 } }
},
{ .name = "", .description = "", .type = CONFIG_END }
// clang-format on

View File

@@ -1721,32 +1721,40 @@ ht216_force_redraw(void *priv)
// clang-format off
static const device_config_t v7_vga_1024i_config[] = {
{
.name = "memory",
.description = "Memory size",
.type = CONFIG_SELECTION,
.default_int = 512,
.selection = {
{ .description = "256 KB", .value = 256 },
{ .description = "512 KB", .value = 512 },
{ .description = "" }
}
.name = "memory",
.description = "Memory size",
.type = CONFIG_SELECTION,
.default_string = NULL,
.default_int = 512,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "256 KB", .value = 256 },
{ .description = "512 KB", .value = 512 },
{ .description = "" }
},
.bios = { { 0 } }
},
{ .name = "", .description = "", .type = CONFIG_END }
};
static const device_config_t ht216_32_standalone_config[] = {
{
.name = "monitor_type",
.description = "Monitor type",
.type = CONFIG_SELECTION,
.default_int = 0x18,
.selection = {
.name = "monitor_type",
.description = "Monitor type",
.type = CONFIG_SELECTION,
.default_string = NULL,
.default_int = 0x18,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "Mono Interlaced", .value = 0x00 },
{ .description = "Mono Non-Interlaced", .value = 0x08 },
{ .description = "Color Interlaced", .value = 0x10 },
{ .description = "Color Non-Interlaced", .value = 0x18 },
{ .description = "" }
}
{ .description = "" }
},
.bios = { { 0 } }
},
{ .name = "", .description = "", .type = CONFIG_END }
};

View File

@@ -353,31 +353,21 @@ mda_speed_changed(void *priv)
static const device_config_t mda_config[] = {
// clang-format off
{
.name = "rgb_type",
.description = "Display type",
.type = CONFIG_SELECTION,
.default_int = 0,
.selection = {
{
.description = "Default",
.value = 0
},
{
.description = "Green",
.value = 1
},
{
.description = "Amber",
.value = 2
},
{
.description = "Gray",
.value = 3
},
{
.description = ""
}
}
.name = "rgb_type",
.description = "Display type",
.type = CONFIG_SELECTION,
.default_string = NULL,
.default_int = 0,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "Default", .value = 0 },
{ .description = "Green", .value = 1 },
{ .description = "Amber", .value = 2 },
{ .description = "Gray", .value = 3 },
{ .description = "" }
},
.bios = { { 0 } }
},
{ .name = "", .description = "", .type = CONFIG_END }
// clang-format on

View File

@@ -427,8 +427,7 @@ enum {
DMA_STATE_SEC
};
typedef struct
{
typedef struct {
uint32_t addr_type;
uint32_t val;
} fifo_entry_t;
@@ -484,13 +483,11 @@ typedef struct mystique_t {
event_t *wake_fifo_thread, *fifo_not_full_event;
struct
{
struct {
int m, n, p, s;
} xpixpll[3];
struct
{
struct {
uint8_t funcnt : 7, stylelen,
dmamod;
@@ -521,27 +518,23 @@ typedef struct mystique_t {
uint64_t extended_dr[4];
struct
{
struct {
int sdydxl, scanleft, sdxl, sdy,
sdxr;
} sgn;
} dwgreg;
struct
{
struct {
uint8_t r, g, b;
} lut[256];
struct
{
struct {
uint16_t pos_x, pos_y,
addr;
uint32_t col[3];
} cursor;
struct
{
struct {
atomic_int pri_state, sec_state, iload_state, state;
atomic_uint primaddress, primend, secaddress, secend,
@@ -6852,25 +6845,20 @@ mystique_force_redraw(void *priv)
static const device_config_t mystique_config[] = {
// clang-format off
{
.name = "memory",
.description = "Memory size",
.type = CONFIG_SELECTION,
.selection = {
{
.description = "2 MB",
.value = 2
},
{
.description = "4 MB",
.value = 4
},
{
.description = "8 MB",
.value = 8
},
{ .description = "" }
.name = "memory",
.description = "Memory size",
.type = CONFIG_SELECTION,
.default_string = NULL,
.default_int = 8,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "2 MB", .value = 2 },
{ .description = "4 MB", .value = 4 },
{ .description = "8 MB", .value = 8 },
{ .description = "" }
},
.default_int = 8
.bios = { { 0 } }
},
{ .name = "", .description = "", .type = CONFIG_END }
// clang-format on
@@ -6879,25 +6867,20 @@ static const device_config_t mystique_config[] = {
static const device_config_t millennium_ii_config[] = {
// clang-format off
{
.name = "memory",
.description = "Memory size",
.type = CONFIG_SELECTION,
.selection = {
{
.description = "4 MB",
.value = 4
},
{
.description = "8 MB",
.value = 8
},
{
.description = "16 MB",
.value = 16
},
{ .description = "" }
.name = "memory",
.description = "Memory size",
.type = CONFIG_SELECTION,
.default_string = NULL,
.default_int = 8,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "4 MB", .value = 4 },
{ .description = "8 MB", .value = 8 },
{ .description = "16 MB", .value = 16 },
{ .description = "" }
},
.default_int = 8
.bios = { { 0 } }
},
{ .name = "", .description = "", .type = CONFIG_END }
// clang-format on

View File

@@ -600,87 +600,65 @@ nga_init(UNUSED(const device_t *info))
const device_config_t nga_config[] = {
// clang-format off
{
.name = "rgb_type",
.description = "RGB type",
.type = CONFIG_SELECTION,
.default_int = 0,
.selection = {
{
.description = "Color",
.value = 0
},
{
.description = "Green Monochrome",
.value = 1
},
{
.description = "Amber Monochrome",
.value = 2
},
{
.description = "Gray Monochrome",
.value = 3
},
{
.description = "Color (no brown)",
.value = 4
},
{
.description = ""
}
}
.name = "rgb_type",
.description = "RGB type",
.type = CONFIG_SELECTION,
.default_string = NULL,
.default_int = 0,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "Color", .value = 0 },
{ .description = "Green Monochrome", .value = 1 },
{ .description = "Amber Monochrome", .value = 2 },
{ .description = "Gray Monochrome", .value = 3 },
{ .description = "Color (no brown)", .value = 4 },
{ .description = "" }
},
.bios = { { 0 } }
},
{
.name = "snow_enabled",
.description = "Snow emulation",
.type = CONFIG_BINARY,
.default_int = 1
.name = "snow_enabled",
.description = "Snow emulation",
.type = CONFIG_BINARY,
.default_string = NULL,
.default_int = 1,
.file_filter = NULL,
.spinner = { 0 },
.selection = { { 0 } },
.bios = { { 0 } }
},
{
.name = "memory",
.description = "Memory size",
.type = CONFIG_SELECTION,
.default_int = 64,
.selection = {
{
.description = "32 KB",
.value = 32
},
{
.description = "64 KB",
.value = 64
},
{
.description = ""
}
}
.name = "memory",
.description = "Memory size",
.type = CONFIG_SELECTION,
.default_string = NULL,
.default_int = 64,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "32 KB", .value = 32 },
{ .description = "64 KB", .value = 64 },
{ .description = "" }
},
.bios = { { 0 } }
},
{
.name = "charset",
.description = "Character set",
.type = CONFIG_SELECTION,
.default_int = 0,
.selection = {
{
.description = "U.S. English",
.value = 0
},
{
.description = "Scandinavian",
.value = 1
},
{
.description = "Other languages",
.value = 2
},
{
.description = "E.F. Hutton",
.value = 3
},
{
.description = ""
}
}
.name = "charset",
.description = "Character set",
.type = CONFIG_SELECTION,
.default_string = NULL,
.default_int = 0,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "U.S. English", .value = 0 },
{ .description = "Scandinavian", .value = 1 },
{ .description = "Other languages", .value = 2 },
{ .description = "E.F. Hutton", .value = 3 },
{ .description = "" }
},
.bios = { { 0 } }
},
{ .name = "", .description = "", .type = CONFIG_END }
// clang-format on

View File

@@ -571,100 +571,78 @@ oti067_m300_available(void)
// clang-format off
static const device_config_t oti067_config[] = {
{
.name = "memory",
.description = "Memory size",
.type = CONFIG_SELECTION,
.default_int = 512,
.selection = {
{
.description = "256 KB",
.value = 256
},
{
.description = "512 KB",
.value = 512
},
{
.description = ""
}
}
.name = "memory",
.description = "Memory size",
.type = CONFIG_SELECTION,
.default_string = NULL,
.default_int = 512,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "256 KB", .value = 256 },
{ .description = "512 KB", .value = 512 },
{ .description = "" }
},
.bios = { { 0 } }
},
{ .name = "", .description = "", .type = CONFIG_END }
};
static const device_config_t oti067_ama932j_config[] = {
{
.name = "memory",
.description = "Memory size",
.type = CONFIG_SELECTION,
.default_int = 256,
.selection = {
{
.description = "256 KB",
.value = 256
},
{
.description = "512 KB",
.value = 512
},
{
.description = ""
}
}
.name = "memory",
.description = "Memory size",
.type = CONFIG_SELECTION,
.default_string = NULL,
.default_int = 256,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "256 KB", .value = 256 },
{ .description = "512 KB", .value = 512 },
{ .description = "" }
},
.bios = { { 0 } }
},
{ .name = "", .description = "", .type = CONFIG_END }
};
static const device_config_t oti077_acer100t_config[] = {
{
.name = "memory",
.description = "Memory size",
.type = CONFIG_SELECTION,
.default_int = 512,
.selection = {
{
.description = "256 KB",
.value = 256
},
{
.description = "512 KB",
.value = 512
},
{
.description = "1 MB",
.value = 1024
},
{
.description = ""
}
}
.name = "memory",
.description = "Memory size",
.type = CONFIG_SELECTION,
.default_string = NULL,
.default_int = 512,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "256 KB", .value = 256 },
{ .description = "512 KB", .value = 512 },
{ .description = "1 MB", .value = 1024 },
{ .description = "" }
},
.bios = { { 0 } }
},
{ .name = "", .description = "", .type = CONFIG_END }
};
static const device_config_t oti077_config[] = {
{
.name = "memory",
.description = "Memory size",
.type = CONFIG_SELECTION,
.default_int = 1024,
.selection = {
{
.description = "256 KB",
.value = 256
},
{
.description = "512 KB",
.value = 512
},
{
.description = "1 MB",
.value = 1024
},
{
.description = ""
}
}
.name = "memory",
.description = "Memory size",
.type = CONFIG_SELECTION,
.default_string = NULL,
.default_int = 1024,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "256 KB", .value = 256 },
{ .description = "512 KB", .value = 512 },
{ .description = "1 MB", .value = 1024 },
{ .description = "" }
},
.bios = { { 0 } }
},
{ .name = "", .description = "", .type = CONFIG_END }
};

View File

@@ -634,37 +634,32 @@ const device_config_t ogc_m24_config[] = {
// clang-format off
{
/* Olivetti / ATT compatible displays */
.name = "rgb_type",
.description = "RGB type",
.type = CONFIG_SELECTION,
.default_int = CGA_RGB,
.selection = {
{
.description = "Color",
.value = 0
},
{
.description = "Green Monochrome",
.value = 1
},
{
.description = "Amber Monochrome",
.value = 2
},
{
.description = "Gray Monochrome",
.value = 3
},
{
.description = ""
}
}
.name = "rgb_type",
.description = "RGB type",
.type = CONFIG_SELECTION,
.default_string = NULL,
.default_int = CGA_RGB,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "Color", .value = 0 },
{ .description = "Green Monochrome", .value = 1 },
{ .description = "Amber Monochrome", .value = 2 },
{ .description = "Gray Monochrome", .value = 3 },
{ .description = "" }
},
.bios = { { 0 } }
},
{
.name = "snow_enabled",
.description = "Snow emulation",
.type = CONFIG_BINARY,
.default_int = 1,
.name = "snow_enabled",
.description = "Snow emulation",
.type = CONFIG_BINARY,
.default_string = NULL,
.default_int = 1,
.file_filter = NULL,
.spinner = { 0 },
.selection = { { 0 } },
.bios = { { 0 } }
},
{ .name = "", .description = "", .type = CONFIG_END }
// clang-format on

View File

@@ -68,7 +68,7 @@ typedef struct paradise_t {
} paradise_t;
static video_timings_t timing_paradise_pvga1a = { .type = VIDEO_ISA, .write_b = 6, .write_w = 8, .write_l = 16, .read_b = 6, .read_w = 8, .read_l = 16 };
static video_timings_t timing_paradise_wd90c = { .type = VIDEO_ISA, .write_b = 3, .write_w = 3, .write_l = 6, .read_b = 5, .read_w = 5, .read_l = 10 };
static video_timings_t timing_paradise_wd90c = { .type = VIDEO_ISA, .write_b = 3, .write_w = 3, .write_l = 6, .read_b = 5, .read_w = 5, .read_l = 10 };
void paradise_remap(paradise_t *paradise);
@@ -735,23 +735,19 @@ const device_t paradise_pvga1a_pc3086_device = {
static const device_config_t paradise_pvga1a_config[] = {
// clang-format off
{
.name = "memory",
.description = "Memory size",
.type = CONFIG_SELECTION,
.default_int = 512,
.selection = {
{
.description = "256 KB",
.value = 256
},
{
.description = "512 KB",
.value = 512
},
{
.description = ""
}
}
.name = "memory",
.description = "Memory size",
.type = CONFIG_SELECTION,
.default_string = NULL,
.default_int = 512,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "256 KB", .value = 256 },
{ .description = "512 KB", .value = 512 },
{ .description = "" }
},
.bios = { { 0 } }
},
{ .name = "", .description = "", .type = CONFIG_END }
// clang-format on
@@ -816,27 +812,20 @@ const device_t paradise_wd90c11_device = {
static const device_config_t paradise_wd90c30_config[] = {
// clang-format off
{
.name = "memory",
.description = "Memory size",
.type = CONFIG_SELECTION,
.default_int = 1024,
.selection = {
{
.description = "256 KB",
.value = 256
},
{
.description = "512 KB",
.value = 512
},
{
.description = "1 MB",
.value = 1024
},
{
.description = ""
}
}
.name = "memory",
.description = "Memory size",
.type = CONFIG_SELECTION,
.default_string = NULL,
.default_int = 1024,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "256 KB", .value = 256 },
{ .description = "512 KB", .value = 512 },
{ .description = "1 MB", .value = 1024 },
{ .description = "" }
},
.bios = { { 0 } }
},
{ .name = "", .description = "", .type = CONFIG_END }
// clang-format on

View File

@@ -387,23 +387,19 @@ rtg3106_available(void)
static const device_config_t rtg3105_config[] = {
// clang-format off
{
.name = "memory",
.description = "Memory size",
.type = CONFIG_SELECTION,
.default_int = 512,
.selection = {
{
.description = "256 KB",
.value = 256
},
{
.description = "512 KB",
.value = 512
},
{
.description = ""
}
}
.name = "memory",
.description = "Memory size",
.type = CONFIG_SELECTION,
.default_string = NULL,
.default_int = 512,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "256 KB", .value = 256 },
{ .description = "512 KB", .value = 512 },
{ .description = "" }
},
.bios = { { 0 } }
},
{ .name = "", .description = "", .type = CONFIG_END }
// clang-format on
@@ -412,27 +408,20 @@ static const device_config_t rtg3105_config[] = {
static const device_config_t rtg3106_config[] = {
// clang-format off
{
.name = "memory",
.description = "Memory size",
.type = CONFIG_SELECTION,
.default_int = 1024,
.selection = {
{
.description = "256 KB",
.value = 256
},
{
.description = "512 KB",
.value = 512
},
{
.description = "1 MB",
.value = 1024
},
{
.description = ""
}
}
.name = "memory",
.description = "Memory size",
.type = CONFIG_SELECTION,
.default_string = NULL,
.default_int = 1024,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "256 KB", .value = 256 },
{ .description = "512 KB", .value = 512 },
{ .description = "1 MB", .value = 1024 },
{ .description = "" }
},
.bios = { { 0 } }
},
{ .name = "", .description = "", .type = CONFIG_END }
// clang-format on

View File

@@ -537,15 +537,15 @@ static void s3_visionx68_video_engine_op(uint32_t cpu_dat, s3_t *s3);
#define READ_PIXTRANS_BYTE_MM \
temp = svga->vram[dword_remap(svga, (s3->accel.dest + s3->accel.cx)) & s3->vram_mask];
#define READ_PIXTRANS_WORD \
if ((s3->bpp == 0) && !s3->color_16bit) { \
temp = svga->vram[dword_remap(svga, (s3->accel.dest + s3->accel.cx)) & s3->vram_mask]; \
temp |= (svga->vram[dword_remap(svga, (s3->accel.dest + s3->accel.cx + 1)) & s3->vram_mask] << 8); \
} else \
#define READ_PIXTRANS_WORD \
if ((s3->bpp == 0) && !s3->color_16bit) { \
temp = svga->vram[dword_remap(svga, (s3->accel.dest + s3->accel.cx)) & s3->vram_mask]; \
temp |= (svga->vram[dword_remap(svga, (s3->accel.dest + s3->accel.cx + 1)) & s3->vram_mask] << 8); \
} else \
temp = vram_w[dword_remap_w(svga, (s3->accel.dest + s3->accel.cx - s3->accel.minus)) & (s3->vram_mask >> 1)];
#define READ_PIXTRANS_LONG \
if ((s3->bpp == 0) && !s3->color_16bit) { \
if ((s3->bpp == 0) && !s3->color_16bit) { \
temp = svga->vram[dword_remap(svga, (s3->accel.dest + s3->accel.cx)) & s3->vram_mask]; \
temp |= (svga->vram[dword_remap(svga, (s3->accel.dest + s3->accel.cx + 1)) & s3->vram_mask] << 8); \
temp |= (svga->vram[dword_remap(svga, (s3->accel.dest + s3->accel.cx + 2)) & s3->vram_mask] << 16); \
@@ -6583,9 +6583,9 @@ polygon_setup(s3_t *s3)
#define READ(addr, dat) \
if (((s3->bpp == 0) && !s3->color_16bit) || (s3->bpp == 2)) \
dat = svga->vram[dword_remap(svga, addr) & s3->vram_mask]; \
else if ((s3->bpp == 1) || s3->color_16bit) \
else if ((s3->bpp == 1) || s3->color_16bit) \
dat = vram_w[dword_remap_w(svga, addr) & (s3->vram_mask >> 1)]; \
else \
else \
dat = vram_l[dword_remap_l(svga, addr) & (s3->vram_mask >> 2)];
#define MIX_READ \
@@ -6642,11 +6642,11 @@ polygon_setup(s3_t *s3)
} \
}
#define MIX \
{ \
old_dest_dat = dest_dat; \
MIX_READ \
dest_dat = (dest_dat & wrt_mask) | (old_dest_dat & ~wrt_mask); \
#define MIX \
{ \
old_dest_dat = dest_dat; \
MIX_READ \
dest_dat = (dest_dat & wrt_mask) | (old_dest_dat & ~wrt_mask); \
}
#define ROPMIX_READ(D, P, S) \
@@ -7431,14 +7431,14 @@ polygon_setup(s3_t *s3)
}
#define WRITE(addr, dat) \
if (((s3->bpp == 0) && !s3->color_16bit) || (s3->bpp == 2)) { \
svga->vram[dword_remap(svga, addr) & s3->vram_mask] = dat; \
if (((s3->bpp == 0) && !s3->color_16bit) || (s3->bpp == 2)) { \
svga->vram[dword_remap(svga, addr) & s3->vram_mask] = dat; \
svga->changedvram[(dword_remap(svga, addr) & s3->vram_mask) >> 12] = svga->monitor->mon_changeframecount; \
} else if ((s3->bpp == 1) || s3->color_16bit) { \
} else if ((s3->bpp == 1) || s3->color_16bit) { \
vram_w[dword_remap_w(svga, addr) & (s3->vram_mask >> 1)] = dat; \
svga->changedvram[(dword_remap_w(svga, addr) & (s3->vram_mask >> 1)) >> 11] = svga->monitor->mon_changeframecount; \
} else { \
vram_l[dword_remap_l(svga, addr) & (s3->vram_mask >> 2)] = dat; \
vram_l[dword_remap_l(svga, addr) & (s3->vram_mask >> 2)] = dat; \
svga->changedvram[(dword_remap_l(svga, addr) & (s3->vram_mask >> 2)) >> 10] = svga->monitor->mon_changeframecount; \
}
@@ -10543,100 +10543,126 @@ s3_force_redraw(void *priv)
s3->svga.fullchange = s3->svga.monitor->mon_changeframecount;
}
// clang-format off
static const device_config_t s3_orchid_86c911_config[] = {
{
.name = "memory",
.description = "Memory size",
.type = CONFIG_SELECTION,
.default_int = 1,
.selection = {
.name = "memory",
.description = "Memory size",
.type = CONFIG_SELECTION,
.default_string = NULL,
.default_int = 1,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "512 KB", .value = 0 },
{ .description = "1 MB", .value = 1 },
{ .description = "" }
}
},
.bios = { { 0 } }
},
{ .name = "", .description = "", .type = CONFIG_END }
};
static const device_config_t s3_9fx_config[] = {
{
.name = "memory",
.description = "Memory size",
.type = CONFIG_SELECTION,
.default_int = 2,
.selection = {
.name = "memory",
.description = "Memory size",
.type = CONFIG_SELECTION,
.default_string = NULL,
.default_int = 2,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "1 MB", .value = 1 },
{ .description = "2 MB", .value = 2 },
/* Trio64 also supports 4 MB, however the Number Nine BIOS does not */
{ .description = "" }
}
},
.bios = { { 0 } }
},
{ .name = "", .description = "", .type = CONFIG_END }
};
static const device_config_t s3_phoenix_trio32_config[] = {
{
.name = "memory",
.description = "Memory size",
.type = CONFIG_SELECTION,
.default_int = 2,
.selection = {
.name = "memory",
.description = "Memory size",
.type = CONFIG_SELECTION,
.default_string = NULL,
.default_int = 2,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "512 KB", .value = 0 },
{ .description = "1 MB", .value = 1 },
{ .description = "2 MB", .value = 2 },
{ .description = "" }
}
},
.bios = { { 0 } }
},
{ .name = "", .description = "", .type = CONFIG_END }
};
static const device_config_t s3_standard_config[] = {
{
.name = "memory",
.description = "Memory size",
.type = CONFIG_SELECTION,
.default_int = 4,
.selection = {
.name = "memory",
.description = "Memory size",
.type = CONFIG_SELECTION,
.default_string = NULL,
.default_int = 4,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "1 MB", .value = 1 },
{ .description = "2 MB", .value = 2 },
{ .description = "4 MB", .value = 4 },
{ .description = "" }
}
},
.bios = { { 0 } }
},
{ .name = "", .description = "", .type = CONFIG_END }
};
static const device_config_t s3_968_config[] = {
{
.name = "memory",
.description = "Memory size",
.type = CONFIG_SELECTION,
.default_int = 4,
.selection = {
.name = "memory",
.description = "Memory size",
.type = CONFIG_SELECTION,
.default_string = NULL,
.default_int = 4,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "1 MB", .value = 1 },
{ .description = "2 MB", .value = 2 },
{ .description = "4 MB", .value = 4 },
{ .description = "8 MB", .value = 8 },
{ .description = "" }
}
},
.bios = { { 0 } }
},
{ .name = "", .description = "", .type = CONFIG_END }
};
static const device_config_t s3_standard_config2[] = {
{
.name = "memory",
.description = "Memory size",
.type = CONFIG_SELECTION,
.default_int = 4,
.selection = {
.name = "memory",
.description = "Memory size",
.type = CONFIG_SELECTION,
.default_string = NULL,
.default_int = 4,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "2 MB", .value = 2 },
{ .description = "4 MB", .value = 4 },
{ .description = "" }
}
},
.bios = { { 0 } }
},
{ .name = "", .description = "", .type = CONFIG_END }
};
// clang-format on
const device_t s3_orchid_86c911_isa_device = {
.name = "S3 86c911 ISA (Orchid Fahrenheit 1280)",

View File

@@ -2088,127 +2088,127 @@ s3_virge_mmio_write_l(uint32_t addr, uint32_t val, void *priv)
}
}
#define READ(addr, val) \
do { \
switch (bpp) { \
case 0: /*8 bpp*/ \
#define READ(addr, val) \
do { \
switch (bpp) { \
case 0: /*8 bpp*/ \
val = vram[addr & virge->vram_mask]; \
break; \
case 1: /*16 bpp*/ \
break; \
case 1: /*16 bpp*/ \
val = *(uint16_t *)&vram[addr & virge->vram_mask]; \
break; \
case 2: /*24 bpp*/ \
break; \
case 2: /*24 bpp*/ \
val = (*(uint32_t *)&vram[addr & virge->vram_mask]) & 0xffffff; \
break; \
} \
break; \
} \
} while (0)
#define Z_READ(addr) *(uint16_t *)&vram[addr & virge->vram_mask]
#define Z_WRITE(addr, val) \
if (!(s3d_tri->cmd_set & CMD_SET_ZB_MODE)) \
#define Z_WRITE(addr, val) \
if (!(s3d_tri->cmd_set & CMD_SET_ZB_MODE)) \
*(uint16_t *)&vram[addr & virge->vram_mask] = val
#define CLIP(x, y) \
do { \
if ((virge->s3d.cmd_set & CMD_SET_HC) && \
(x < virge->s3d.clip_l || x > virge->s3d.clip_r || \
y < virge->s3d.clip_t || y > virge->s3d.clip_b)) \
update = 0; \
#define CLIP(x, y) \
do { \
if ((virge->s3d.cmd_set & CMD_SET_HC) && \
(x < virge->s3d.clip_l || x > virge->s3d.clip_r || \
y < virge->s3d.clip_t || y > virge->s3d.clip_b)) \
update = 0; \
} while (0)
#define CLIP_3D(x, y) \
do { \
if ((s3d_tri->cmd_set & CMD_SET_HC) && (x < s3d_tri->clip_l || \
x > s3d_tri->clip_r || y < s3d_tri->clip_t || \
y > s3d_tri->clip_b)) \
update = 0; \
#define CLIP_3D(x, y) \
do { \
if ((s3d_tri->cmd_set & CMD_SET_HC) && (x < s3d_tri->clip_l || \
x > s3d_tri->clip_r || y < s3d_tri->clip_t || \
y > s3d_tri->clip_b)) \
update = 0; \
} while (0)
#define Z_CLIP(Zzb, Zs) \
do { \
if (!(s3d_tri->cmd_set & CMD_SET_ZB_MODE)) \
switch ((s3d_tri->cmd_set >> 20) & 7) { \
case 0: \
update = 0; \
break; \
case 1: \
if (Zs <= Zzb) \
update = 0; \
else \
Zzb = Zs; \
break; \
case 2: \
if (Zs != Zzb) \
update = 0; \
else \
Zzb = Zs; \
break; \
case 3: \
if (Zs < Zzb) \
update = 0; \
else \
Zzb = Zs; \
break; \
case 4: \
if (Zs >= Zzb) \
update = 0; \
else \
Zzb = Zs; \
break; \
case 5: \
if (Zs == Zzb) \
update = 0; \
else \
Zzb = Zs; \
break; \
case 6: \
if (Zs > Zzb) \
update = 0; \
else \
Zzb = Zs; \
break; \
case 7: \
update = 1; \
Zzb = Zs; \
break; \
} \
#define Z_CLIP(Zzb, Zs) \
do { \
if (!(s3d_tri->cmd_set & CMD_SET_ZB_MODE)) \
switch ((s3d_tri->cmd_set >> 20) & 7) { \
case 0: \
update = 0; \
break; \
case 1: \
if (Zs <= Zzb) \
update = 0; \
else \
Zzb = Zs; \
break; \
case 2: \
if (Zs != Zzb) \
update = 0; \
else \
Zzb = Zs; \
break; \
case 3: \
if (Zs < Zzb) \
update = 0; \
else \
Zzb = Zs; \
break; \
case 4: \
if (Zs >= Zzb) \
update = 0; \
else \
Zzb = Zs; \
break; \
case 5: \
if (Zs == Zzb) \
update = 0; \
else \
Zzb = Zs; \
break; \
case 6: \
if (Zs > Zzb) \
update = 0; \
else \
Zzb = Zs; \
break; \
case 7: \
update = 1; \
Zzb = Zs; \
break; \
} \
} while (0)
#define MIX() \
do { \
int c; \
for (c = 0; c < 24; c++) { \
int d = (dest & (1 << c)) ? 1 : 0; \
if (source & (1 << c)) \
d |= 2; \
if (pattern & (1 << c)) \
d |= 4; \
if (virge->s3d.rop & (1 << d)) \
out |= (1 << c); \
} \
#define MIX() \
do { \
int c; \
for (c = 0; c < 24; c++) { \
int d = (dest & (1 << c)) ? 1 : 0; \
if (source & (1 << c)) \
d |= 2; \
if (pattern & (1 << c)) \
d |= 4; \
if (virge->s3d.rop & (1 << d)) \
out |= (1 << c); \
} \
} while (0)
#define WRITE(addr, val) \
do { \
switch (bpp) { \
case 0: /*8 bpp*/ \
vram[addr & virge->vram_mask] = val; \
virge->svga.changedvram[(addr & virge->vram_mask) >> 12] = \
changeframecount; \
break; \
case 1: /*16 bpp*/ \
*(uint16_t *)&vram[addr & virge->vram_mask] = val; \
virge->svga.changedvram[(addr & virge->vram_mask) >> 12] = \
changeframecount; \
break; \
case 2: /*24 bpp*/ \
*(uint32_t *)&vram[addr & virge->vram_mask] = (val & 0xffffff) |\
(vram[(addr + 3) & virge->vram_mask] << 24); \
virge->svga.changedvram[(addr & virge->vram_mask) >> 12] = \
changeframecount; \
break; \
} \
#define WRITE(addr, val) \
do { \
switch (bpp) { \
case 0: /*8 bpp*/ \
vram[addr & virge->vram_mask] = val; \
virge->svga.changedvram[(addr & virge->vram_mask) >> 12] = \
changeframecount; \
break; \
case 1: /*16 bpp*/ \
*(uint16_t *)&vram[addr & virge->vram_mask] = val; \
virge->svga.changedvram[(addr & virge->vram_mask) >> 12] = \
changeframecount; \
break; \
case 2: /*24 bpp*/ \
*(uint32_t *)&vram[addr & virge->vram_mask] = (val & 0xffffff) | \
(vram[(addr + 3) & virge->vram_mask] << 24); \
virge->svga.changedvram[(addr & virge->vram_mask) >> 12] = \
changeframecount; \
break; \
} \
} while (0)
static void
@@ -2573,23 +2573,23 @@ skip_line:
g = ((val & 0x03e0) >> 2) | ((val & 0x03e0) >> 7); \
r = ((val & 0x7c00) >> 7) | ((val & 0x7c00) >> 12);
#define RGB24_TO_24(val, r, g, b) \
b = val & 0xff; \
g = (val & 0xff00) >> 8; \
#define RGB24_TO_24(val, r, g, b) \
b = val & 0xff; \
g = (val & 0xff00) >> 8; \
r = (val & 0xff0000) >> 16
#define RGB15(r, g, b, dest) \
if (virge->dithering_enabled) { \
int add = dither[_y & 3][_x & 3]; \
int _r = (r > 248) ? 248 : r + add; \
int _g = (g > 248) ? 248 : g + add; \
int _b = (b > 248) ? 248 : b + add; \
dest = ((_b >> 3) & 0x1f) | \
(((_g >> 3) & 0x1f) << 5) | \
(((_r >> 3) & 0x1f) << 10); \
} else \
dest = ((b >> 3) & 0x1f) | \
(((g >> 3) & 0x1f) << 5) | \
#define RGB15(r, g, b, dest) \
if (virge->dithering_enabled) { \
int add = dither[_y & 3][_x & 3]; \
int _r = (r > 248) ? 248 : r + add; \
int _g = (g > 248) ? 248 : g + add; \
int _b = (b > 248) ? 248 : b + add; \
dest = ((_b >> 3) & 0x1f) | \
(((_g >> 3) & 0x1f) << 5) | \
(((_r >> 3) & 0x1f) << 10); \
} else \
dest = ((b >> 3) & 0x1f) | \
(((g >> 3) & 0x1f) << 5) | \
(((r >> 3) & 0x1f) << 10)
#define RGB24(r, g, b) ((b) | ((g) << 8) | ((r) << 16))
@@ -3753,103 +3753,99 @@ s3_virge_hwcursor_draw(svga_t *svga, int displine)
svga->hwcursor_latch.addr += 16;
}
#define DECODE_YCbCr() \
do { \
int c; \
\
for (c = 0; c < 2; c++) { \
uint8_t y1, y2; \
int8_t Cr; \
int8_t Cb; \
int dR; \
int dG; \
int dB; \
\
y1 = src[0]; \
Cr = src[1] - 0x80; \
y2 = src[2]; \
Cb = src[3] - 0x80; \
src += 4; \
\
dR = (359 * Cr) >> 8; \
dG = (88 * Cb + 183 * Cr) >> 8; \
dB = (453 * Cb) >> 8; \
\
r[x_write] = y1 + dR; \
CLAMP(r[x_write]); \
g[x_write] = y1 - dG; \
CLAMP(g[x_write]); \
b[x_write] = y1 + dB; \
CLAMP(b[x_write]); \
\
r[x_write + 1] = y2 + dR; \
CLAMP(r[x_write + 1]); \
g[x_write + 1] = y2 - dG; \
CLAMP(g[x_write + 1]); \
b[x_write + 1] = y2 + dB; \
CLAMP(b[x_write + 1]); \
\
x_write = (x_write + 2) & 7; \
} \
#define DECODE_YCbCr() \
do { \
for (uint8_t c = 0; c < 2; c++) { \
uint8_t y1, y2; \
int8_t Cr; \
int8_t Cb; \
int dR; \
int dG; \
int dB; \
\
y1 = src[0]; \
Cr = src[1] - 0x80; \
y2 = src[2]; \
Cb = src[3] - 0x80; \
src += 4; \
\
dR = (359 * Cr) >> 8; \
dG = (88 * Cb + 183 * Cr) >> 8; \
dB = (453 * Cb) >> 8; \
\
r[x_write] = y1 + dR; \
CLAMP(r[x_write]); \
g[x_write] = y1 - dG; \
CLAMP(g[x_write]); \
b[x_write] = y1 + dB; \
CLAMP(b[x_write]); \
\
r[x_write + 1] = y2 + dR; \
CLAMP(r[x_write + 1]); \
g[x_write + 1] = y2 - dG; \
CLAMP(g[x_write + 1]); \
b[x_write + 1] = y2 + dB; \
CLAMP(b[x_write + 1]); \
\
x_write = (x_write + 2) & 7; \
} \
} while (0)
/*Both YUV formats are untested*/
#define DECODE_YUV211() \
do { \
uint8_t y1, y2, y3, y4; \
int8_t U, V; \
int dR; \
int dG; \
int dB; \
\
U = src[0] - 0x80; \
y1 = (298 * (src[1] - 16)) >> 8; \
y2 = (298 * (src[2] - 16)) >> 8; \
V = src[3] - 0x80; \
y3 = (298 * (src[4] - 16)) >> 8; \
y4 = (298 * (src[5] - 16)) >> 8; \
src += 6; \
\
dR = (309 * V) >> 8; \
dG = (100 * U + 208 * V) >> 8; \
dB = (516 * U) >> 8; \
\
r[x_write] = y1 + dR; \
CLAMP(r[x_write]); \
g[x_write] = y1 - dG; \
CLAMP(g[x_write]); \
b[x_write] = y1 + dB; \
CLAMP(b[x_write]); \
\
r[x_write + 1] = y2 + dR; \
CLAMP(r[x_write + 1]); \
g[x_write + 1] = y2 - dG; \
CLAMP(g[x_write + 1]); \
b[x_write + 1] = y2 + dB; \
CLAMP(b[x_write + 1]); \
\
r[x_write + 2] = y3 + dR; \
CLAMP(r[x_write + 2]); \
g[x_write + 2] = y3 - dG; \
CLAMP(g[x_write + 2]); \
b[x_write + 2] = y3 + dB; \
CLAMP(b[x_write + 2]); \
\
r[x_write + 3] = y4 + dR; \
CLAMP(r[x_write + 3]); \
g[x_write + 3] = y4 - dG; \
CLAMP(g[x_write + 3]); \
b[x_write + 3] = y4 + dB; \
CLAMP(b[x_write + 3]); \
\
x_write = (x_write + 4) & 7; \
#define DECODE_YUV211() \
do { \
uint8_t y1, y2, y3, y4; \
int8_t U, V; \
int dR; \
int dG; \
int dB; \
\
U = src[0] - 0x80; \
y1 = (298 * (src[1] - 16)) >> 8; \
y2 = (298 * (src[2] - 16)) >> 8; \
V = src[3] - 0x80; \
y3 = (298 * (src[4] - 16)) >> 8; \
y4 = (298 * (src[5] - 16)) >> 8; \
src += 6; \
\
dR = (309 * V) >> 8; \
dG = (100 * U + 208 * V) >> 8; \
dB = (516 * U) >> 8; \
\
r[x_write] = y1 + dR; \
CLAMP(r[x_write]); \
g[x_write] = y1 - dG; \
CLAMP(g[x_write]); \
b[x_write] = y1 + dB; \
CLAMP(b[x_write]); \
\
r[x_write + 1] = y2 + dR; \
CLAMP(r[x_write + 1]); \
g[x_write + 1] = y2 - dG; \
CLAMP(g[x_write + 1]); \
b[x_write + 1] = y2 + dB; \
CLAMP(b[x_write + 1]); \
\
r[x_write + 2] = y3 + dR; \
CLAMP(r[x_write + 2]); \
g[x_write + 2] = y3 - dG; \
CLAMP(g[x_write + 2]); \
b[x_write + 2] = y3 + dB; \
CLAMP(b[x_write + 2]); \
\
r[x_write + 3] = y4 + dR; \
CLAMP(r[x_write + 3]); \
g[x_write + 3] = y4 - dG; \
CLAMP(g[x_write + 3]); \
b[x_write + 3] = y4 + dB; \
CLAMP(b[x_write + 3]); \
\
x_write = (x_write + 4) & 7; \
} while (0)
#define DECODE_YUV422() \
do { \
int c; \
\
for (c = 0; c < 2; c++) { \
for (uint8_t c = 0; c < 2; c++) { \
uint8_t y1; \
uint8_t y2; \
int8_t U; \
@@ -3886,104 +3882,96 @@ s3_virge_hwcursor_draw(svga_t *svga, int displine)
} \
} while (0)
#define DECODE_RGB555() \
do { \
int c; \
\
for (c = 0; c < 4; c++) { \
uint16_t dat; \
\
dat = *(uint16_t *)src; \
src += 2; \
\
r[x_write + c] = \
((dat & 0x001f) << 3) | \
((dat & 0x001f) >> 2); \
g[x_write + c] = \
((dat & 0x03e0) >> 2) | \
((dat & 0x03e0) >> 7); \
b[x_write + c] = \
((dat & 0x7c00) >> 7) | \
((dat & 0x7c00) >> 12); \
} \
x_write = (x_write + 4) & 7; \
#define DECODE_RGB555() \
do { \
for (uint8_t c = 0; c < 4; c++) { \
uint16_t dat; \
\
dat = *(uint16_t *)src; \
src += 2; \
\
r[x_write + c] = \
((dat & 0x001f) << 3) | \
((dat & 0x001f) >> 2); \
g[x_write + c] = \
((dat & 0x03e0) >> 2) | \
((dat & 0x03e0) >> 7); \
b[x_write + c] = \
((dat & 0x7c00) >> 7) | \
((dat & 0x7c00) >> 12); \
} \
x_write = (x_write + 4) & 7; \
} while (0)
#define DECODE_RGB565() \
do { \
int c; \
\
for (c = 0; c < 4; c++) { \
uint16_t dat; \
\
dat = *(uint16_t *)src; \
src += 2; \
\
r[x_write + c] = \
((dat & 0x001f) << 3) | \
((dat & 0x001f) >> 2); \
g[x_write + c] = \
((dat & 0x07e0) >> 3) | \
((dat & 0x07e0) >> 9); \
b[x_write + c] = \
((dat & 0xf800) >> 8) | \
((dat & 0xf800) >> 13); \
} \
x_write = (x_write + 4) & 7; \
#define DECODE_RGB565() \
do { \
for (uint8_t c = 0; c < 4; c++) { \
uint16_t dat; \
\
dat = *(uint16_t *)src; \
src += 2; \
\
r[x_write + c] = \
((dat & 0x001f) << 3) | \
((dat & 0x001f) >> 2); \
g[x_write + c] = \
((dat & 0x07e0) >> 3) | \
((dat & 0x07e0) >> 9); \
b[x_write + c] = \
((dat & 0xf800) >> 8) | \
((dat & 0xf800) >> 13); \
} \
x_write = (x_write + 4) & 7; \
} while (0)
#define DECODE_RGB888() \
do { \
int c; \
\
for (c = 0; c < 4; c++) { \
r[x_write + c] = src[0]; \
g[x_write + c] = src[1]; \
b[x_write + c] = src[2]; \
src += 3; \
} \
x_write = (x_write + 4) & 7; \
#define DECODE_RGB888() \
do { \
for (uint8_t c = 0; c < 4; c++) { \
r[x_write + c] = src[0]; \
g[x_write + c] = src[1]; \
b[x_write + c] = src[2]; \
src += 3; \
} \
x_write = (x_write + 4) & 7; \
} while (0)
#define DECODE_XRGB8888() \
do { \
int c; \
\
for (c = 0; c < 4; c++) { \
r[x_write + c] = src[0]; \
g[x_write + c] = src[1]; \
b[x_write + c] = src[2]; \
src += 4; \
} \
x_write = (x_write + 4) & 7; \
#define DECODE_XRGB8888() \
do { \
for (uint8_t c = 0; c < 4; c++) { \
r[x_write + c] = src[0]; \
g[x_write + c] = src[1]; \
b[x_write + c] = src[2]; \
src += 4; \
} \
x_write = (x_write + 4) & 7; \
} while (0)
#define OVERLAY_SAMPLE() \
do { \
switch (virge->streams.sdif) { \
case 1: \
DECODE_YCbCr(); \
break; \
case 2: \
DECODE_YUV422(); \
break; \
case 3: \
DECODE_RGB555(); \
break; \
case 4: \
DECODE_YUV211(); \
break; \
case 5: \
DECODE_RGB565(); \
break; \
case 6: \
DECODE_RGB888(); \
break; \
case 7: \
default: \
DECODE_XRGB8888(); \
break; \
} \
#define OVERLAY_SAMPLE() \
do { \
switch (virge->streams.sdif) { \
case 1: \
DECODE_YCbCr(); \
break; \
case 2: \
DECODE_YUV422(); \
break; \
case 3: \
DECODE_RGB555(); \
break; \
case 4: \
DECODE_YUV211(); \
break; \
case 5: \
DECODE_RGB565(); \
break; \
case 6: \
DECODE_RGB888(); \
break; \
case 7: \
default: \
DECODE_XRGB8888(); \
break; \
} \
} while (0)
static void
@@ -4704,35 +4692,38 @@ s3_virge_force_redraw(void *priv)
static const device_config_t s3_virge_config[] = {
// clang-format off
{
.name = "memory",
.description = "Memory size",
.type = CONFIG_SELECTION,
.default_int = 4,
.selection = {
{
.description = "2 MB",
.value = 2
},
{
.description = "4 MB",
.value = 4
},
{
.description = ""
}
}
.name = "memory",
.description = "Memory size",
.type = CONFIG_SELECTION,
.default_int = 4,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "2 MB", .value = 2 },
{ .description = "4 MB", .value = 4 },
{ .description = "" }
},
.bios = { { 0 } }
},
{
.name = "bilinear",
.description = "Bilinear filtering",
.type = CONFIG_BINARY,
.default_int = 1
.name = "bilinear",
.description = "Bilinear filtering",
.type = CONFIG_BINARY,
.default_int = 1,
.file_filter = NULL,
.spinner = { 0 },
.selection = { { 0 } },
.bios = { { 0 } }
},
{
.name = "dithering",
.description = "Dithering",
.type = CONFIG_BINARY,
.default_int = 1
.name = "dithering",
.description = "Dithering",
.type = CONFIG_BINARY,
.default_int = 1,
.file_filter = NULL,
.spinner = { 0 },
.selection = { { 0 } },
.bios = { { 0 } }
},
{ .name = "", .description = "", .type = CONFIG_END }
// clang-format on
@@ -4741,39 +4732,39 @@ static const device_config_t s3_virge_config[] = {
static const device_config_t s3_virge_stb_config[] = {
// clang-format off
{
.name = "memory",
.description = "Memory size",
.type = CONFIG_SELECTION,
.default_int = 4,
.selection = {
{
.description = "2 MB",
.value = 2
},
{
.description = "4 MB",
.value = 4
},
{
.description = "8 MB",
.value = 8
},
{
.description = ""
}
}
.name = "memory",
.description = "Memory size",
.type = CONFIG_SELECTION,
.default_int = 4,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "2 MB", .value = 2 },
{ .description = "4 MB", .value = 4 },
{ .description = "8 MB", .value = 8 },
{ .description = "" }
},
.bios = { { 0 } }
},
{
.name = "bilinear",
.description = "Bilinear filtering",
.type = CONFIG_BINARY,
.default_int = 1
.name = "bilinear",
.description = "Bilinear filtering",
.type = CONFIG_BINARY,
.default_int = 1,
.file_filter = NULL,
.spinner = { 0 },
.selection = { { 0 } },
.bios = { { 0 } }
},
{
.name = "dithering",
.description = "Dithering",
.type = CONFIG_BINARY,
.default_int = 1
.name = "dithering",
.description = "Dithering",
.type = CONFIG_BINARY,
.default_int = 1,
.file_filter = NULL,
.spinner = { 0 },
.selection = { { 0 } },
.bios = { { 0 } }
},
{ .name = "", .description = "", .type = CONFIG_END }
// clang-format on
@@ -4782,16 +4773,24 @@ static const device_config_t s3_virge_stb_config[] = {
static const device_config_t s3_virge_357_config[] = {
// clang-format off
{
.name = "bilinear",
.description = "Bilinear filtering",
.type = CONFIG_BINARY,
.default_int = 1
.name = "bilinear",
.description = "Bilinear filtering",
.type = CONFIG_BINARY,
.default_int = 1,
.file_filter = NULL,
.spinner = { 0 },
.selection = { { 0 } },
.bios = { { 0 } }
},
{
.name = "dithering",
.description = "Dithering",
.type = CONFIG_BINARY,
.default_int = 1
.name = "dithering",
.description = "Dithering",
.type = CONFIG_BINARY,
.default_int = 1,
.file_filter = NULL,
.spinner = { 0 },
.selection = { { 0 } },
.bios = { { 0 } }
},
{ .name = "", .description = "", .type = CONFIG_END }
// clang-format on
@@ -4800,35 +4799,41 @@ static const device_config_t s3_virge_357_config[] = {
static const device_config_t s3_trio3d2x_config[] = {
// clang-format off
{
.name = "memory",
.description = "Memory size",
.type = CONFIG_SELECTION,
.default_int = 4,
.selection = {
{
.description = "4 MB",
.value = 4
},
{
.description = "8 MB",
.value = 8
},
{
.description = ""
}
}
.name = "memory",
.description = "Memory size",
.type = CONFIG_SELECTION,
.default_string = NULL,
.default_int = 4,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "4 MB", .value = 4 },
{ .description = "8 MB", .value = 8 },
{ .description = "" }
},
.bios = { { 0 } }
},
{
.name = "bilinear",
.description = "Bilinear filtering",
.type = CONFIG_BINARY,
.default_int = 1
.name = "bilinear",
.description = "Bilinear filtering",
.type = CONFIG_BINARY,
.default_string = NULL,
.default_int = 1,
.file_filter = NULL,
.spinner = { 0 },
.selection = { { 0 } },
.bios = { { 0 } }
},
{
.name = "dithering",
.description = "Dithering",
.type = CONFIG_BINARY,
.default_int = 1
.name = "dithering",
.description = "Dithering",
.type = CONFIG_BINARY,
.default_string = NULL,
.default_int = 1,
.file_filter = NULL,
.spinner = { 0 },
.selection = { { 0 } },
.bios = { { 0 } }
},
{ .name = "", .description = "", .type = CONFIG_END }
// clang-format on

View File

@@ -860,96 +860,57 @@ sigma_speed_changed(void *priv)
device_config_t sigma_config[] = {
// clang-format off
{
.name = "rgb_type",
.description = "RGB type",
.type = CONFIG_SELECTION,
.default_int = 0,
.selection = {
{
.description = "Color",
.value = 0
},
{
.description = "Green Monochrome",
.value = 1
},
{
.description = "Amber Monochrome",
.value = 2
},
{
.description = "Gray Monochrome",
.value = 3
},
{
.description = "Color (no brown)",
.value = 4
},
{
.description = ""
}
}
},
{
.name = "enable_nmi",
.description = "Enable NMI for CGA emulation",
.type = CONFIG_BINARY,
.default_int = 1
},
{
.name = "bios_addr",
.description = "BIOS Address",
.type = CONFIG_HEX20,
.default_int = 0xc0000,
.selection = {
{
.description = "C000H",
.value = 0xc0000
},
{
.description = "C800H",
.value = 0xc8000
},
{
.description = "CC00H",
.value = 0xcc000
},
{
.description = "D000H",
.value = 0xd0000
},
{
.description = "D400H",
.value = 0xd4000
},
{
.description = "D800H",
.value = 0xd8000
},
{
.description = "DC00H",
.value = 0xdc000
},
{
.description = "E000H",
.value = 0xe0000
},
{
.description = "E400H",
.value = 0xe4000
},
{
.description = "E800H",
.value = 0xe8000
},
{
.description = "EC00H",
.value = 0xec000
},
{
.description = ""
}
.name = "rgb_type",
.description = "RGB type",
.type = CONFIG_SELECTION,
.default_string = NULL,
.default_int = 0,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "Color", .value = 0 },
{ .description = "Green Monochrome", .value = 1 },
{ .description = "Amber Monochrome", .value = 2 },
{ .description = "Gray Monochrome", .value = 3 },
{ .description = "Color (no brown)", .value = 4 },
{ .description = "" }
},
.bios = { { 0 } }
},
{
.name = "enable_nmi",
.description = "Enable NMI for CGA emulation",
.type = CONFIG_BINARY,
.default_string = NULL,
.default_int = 1,
.file_filter = NULL,
.spinner = { 0 },
.selection = { { 0 } },
.bios = { { 0 } }
},
{
.name = "bios_addr",
.description = "BIOS Address",
.type = CONFIG_HEX20,
.default_string = NULL,
.default_int = 0xc0000,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "C000H", .value = 0xc0000 },
{ .description = "C800H", .value = 0xc8000 },
{ .description = "CC00H", .value = 0xcc000 },
{ .description = "D000H", .value = 0xd0000 },
{ .description = "D400H", .value = 0xd4000 },
{ .description = "D800H", .value = 0xd8000 },
{ .description = "DC00H", .value = 0xdc000 },
{ .description = "E000H", .value = 0xe0000 },
{ .description = "E400H", .value = 0xe4000 },
{ .description = "E800H", .value = 0xe8000 },
{ .description = "EC00H", .value = 0xec000 },
{ .description = "" }
},
.bios = { { 0 } }
},
{ .name = "", .description = "", .type = CONFIG_END }
// clang-format on

View File

@@ -112,8 +112,7 @@ typedef struct tgui_t {
uint8_t int_line;
uint8_t pci_regs[256];
struct
{
struct {
int16_t src_x, src_y;
int16_t src_x_clip, src_y_clip;
int16_t dst_x, dst_y;
@@ -350,7 +349,9 @@ tgui_out(uint16_t addr, uint8_t val, void *priv)
if (tgui->ramdac_state == 4) {
tgui->ramdac_state = 0;
tgui->ramdac_ctrl = val;
//pclog("TGUI ramdac ctrl=%02x.\n", (tgui->ramdac_ctrl >> 4) & 0x0f);
#if 0
pclog("TGUI ramdac ctrl=%02x.\n", (tgui->ramdac_ctrl >> 4) & 0x0f);
#endif
svga_recalctimings(svga);
return;
}
@@ -718,7 +719,9 @@ tgui_recalctimings(svga_t *svga)
if (((svga->crtc[0x29] & 0x30) && (svga->bpp >= 15)) || !svga->rowoffset)
svga->rowoffset |= 0x100;
//pclog("BPP=%d, DataWidth=%02x, CRTC29 bit 4-5=%02x, pixbusmode=%02x, rowoffset=%02x, doublerowoffset=%x.\n", svga->bpp, svga->crtc[0x2a] & 0x40, svga->crtc[0x29] & 0x30, svga->crtc[0x38], svga->rowoffset, svga->gdcreg[0x2f] & 4);
#if 0
pclog("BPP=%d, DataWidth=%02x, CRTC29 bit 4-5=%02x, pixbusmode=%02x, rowoffset=%02x, doublerowoffset=%x.\n", svga->bpp, svga->crtc[0x2a] & 0x40, svga->crtc[0x29] & 0x30, svga->crtc[0x38], svga->rowoffset, svga->gdcreg[0x2f] & 4);
#endif
if ((svga->crtc[0x1e] & 0xA0) == 0xA0)
svga->ma_latch |= 0x10000;
@@ -1468,15 +1471,15 @@ enum {
} \
} while (0)
#define WRITE(addr, dat) \
if (tgui->accel.bpp == 0) { \
svga->vram[(addr) &tgui->vram_mask] = dat; \
#define WRITE(addr, dat) \
if (tgui->accel.bpp == 0) { \
svga->vram[(addr) &tgui->vram_mask] = dat; \
svga->changedvram[((addr) & (tgui->vram_mask)) >> 12] = svga->monitor->mon_changeframecount; \
} else if (tgui->accel.bpp == 1) { \
vram_w[(addr) & (tgui->vram_mask >> 1)] = dat; \
} else if (tgui->accel.bpp == 1) { \
vram_w[(addr) & (tgui->vram_mask >> 1)] = dat; \
svga->changedvram[((addr) & (tgui->vram_mask >> 1)) >> 11] = svga->monitor->mon_changeframecount; \
} else { \
vram_l[(addr) & (tgui->vram_mask >> 2)] = dat; \
} else { \
vram_l[(addr) & (tgui->vram_mask >> 2)] = dat; \
svga->changedvram[((addr) & (tgui->vram_mask >> 2)) >> 10] = svga->monitor->mon_changeframecount; \
}
@@ -2115,7 +2118,9 @@ tgui_accel_out(uint16_t addr, uint8_t val, void *priv)
case 0x2123:
tgui->accel.ger22 = (tgui->accel.ger22 & 0xff) | (val << 8);
//pclog("Pitch IO23: val = %02x, rowoffset = %x.\n", tgui->accel.ger22, svga->crtc[0x13]);
#if 0
pclog("Pitch IO23: val = %02x, rowoffset = %x.\n", tgui->accel.ger22, svga->crtc[0x13]);
#endif
switch (svga->bpp) {
case 8:
case 24:
@@ -3364,50 +3369,39 @@ tgui_force_redraw(void *priv)
// clang-format off
static const device_config_t tgui9440_config[] = {
{
.name = "memory",
.description = "Memory size",
.type = CONFIG_SELECTION,
.selection = {
{
.description = "1 MB",
.value = 1
},
{
.description = "2 MB",
.value = 2
},
{
.description = ""
}
.name = "memory",
.description = "Memory size",
.type = CONFIG_SELECTION,
.default_string = NULL,
.default_int = 2,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "1 MB", .value = 1 },
{ .description = "2 MB", .value = 2 },
{ .description = "" }
},
.default_int = 2
.bios = { { 0 } }
},
{ .name = "", .description = "", .type = CONFIG_END }
};
static const device_config_t tgui96xx_config[] = {
{
.name = "memory",
.description = "Memory size",
.type = CONFIG_SELECTION,
.selection = {
{
.description = "1 MB",
.value = 1
},
{
.description = "2 MB",
.value = 2
},
{
.description = "4 MB",
.value = 4
},
{
.description = ""
}
.name = "memory",
.description = "Memory size",
.type = CONFIG_SELECTION,
.default_string = NULL,
.default_int = 4,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "1 MB", .value = 1 },
{ .description = "2 MB", .value = 2 },
{ .description = "4 MB", .value = 4 },
{ .description = "" }
},
.default_int = 4
.bios = { { 0 } }
},
{ .name = "", .description = "", .type = CONFIG_END }
};

View File

@@ -521,28 +521,21 @@ tvga_force_redraw(void *priv)
static const device_config_t tvga_config[] = {
// clang-format off
{
.name = "memory",
.description = "Memory size",
.type = CONFIG_SELECTION,
.default_int = 1024,
.selection = {
{
.description = "256 KB",
.value = 256
},
{
.description = "512 KB",
.value = 512
},
{
.description = "1 MB",
.value = 1024
},
.name = "memory",
.description = "Memory size",
.type = CONFIG_SELECTION,
.default_string = NULL,
.default_int = 1024,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "256 KB", .value = 256 },
{ .description = "512 KB", .value = 512 },
{ .description = "1 MB", .value = 1024 },
/*Chip supports 2mb, but drivers are buggy*/
{
.description = ""
}
}
{ .description = "" }
},
.bios = { { 0 } }
},
{ .name = "", .description = "", .type = CONFIG_END }
// clang-format off

View File

@@ -1308,119 +1308,121 @@ voodoo_close(void *priv)
static const device_config_t voodoo_config[] = {
// clang-format off
{
.name = "type",
.description = "Voodoo type",
.type = CONFIG_SELECTION,
.name = "type",
.description = "Voodoo type",
.type = CONFIG_SELECTION,
.default_int = 0,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{
.description = "3Dfx Voodoo Graphics",
.value = VOODOO_1
},
{
.description = "Obsidian SB50 + Amethyst (2 TMUs)",
.value = VOODOO_SB50
},
{
.description = "3Dfx Voodoo 2",
.value = VOODOO_2
},
{
.description = ""
}
{ .description = "3Dfx Voodoo Graphics", .value = VOODOO_1 },
{ .description = "Obsidian SB50 + Amethyst (2 TMUs)", .value = VOODOO_SB50 },
{ .description = "3Dfx Voodoo 2", .value = VOODOO_2 },
{ .description = "" }
},
.default_int = 0
.bios = { { 0 } }
},
{
.name = "framebuffer_memory",
.description = "Framebuffer memory size",
.type = CONFIG_SELECTION,
.selection = {
{
.description = "2 MB",
.value = 2
},
{
.description = "4 MB",
.value = 4
},
{
.description = ""
}
.name = "framebuffer_memory",
.description = "Framebuffer memory size",
.type = CONFIG_SELECTION,
.default_string = NULL,
.default_int = 2,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "2 MB", .value = 2 },
{ .description = "4 MB", .value = 4 },
{ .description = "" }
},
.default_int = 2
.bios = { { 0 } }
},
{
.name = "texture_memory",
.description = "Texture memory size",
.type = CONFIG_SELECTION,
.selection = {
{
.description = "2 MB",
.value = 2
},
{
.description = "4 MB",
.value = 4
},
{
.description = ""
}
.name = "texture_memory",
.description = "Texture memory size",
.type = CONFIG_SELECTION,
.default_string = NULL,
.default_int = 2,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "2 MB", .value = 2 },
{ .description = "4 MB", .value = 4 },
{ .description = "" }
},
.default_int = 2
.bios = { { 0 } }
},
{
.name = "bilinear",
.description = "Bilinear filtering",
.type = CONFIG_BINARY,
.default_int = 1
.name = "bilinear",
.description = "Bilinear filtering",
.type = CONFIG_BINARY,
.default_string = NULL,
.default_int = 1,
.file_filter = NULL,
.spinner = { 0 },
.selection = { { 0 } },
.bios = { { 0 } }
},
{
.name = "dithersub",
.description = "Dither subtraction",
.type = CONFIG_BINARY,
.default_int = 1
.name = "dithersub",
.description = "Dither subtraction",
.type = CONFIG_BINARY,
.default_string = NULL,
.default_int = 1,
.file_filter = NULL,
.spinner = { 0 },
.selection = { { 0 } },
.bios = { { 0 } }
},
{
.name = "dacfilter",
.description = "Screen Filter",
.type = CONFIG_BINARY,
.default_int = 0
.name = "dacfilter",
.description = "Screen Filter",
.type = CONFIG_BINARY,
.default_string = NULL,
.default_int = 0,
.file_filter = NULL,
.spinner = { 0 },
.selection = { { 0 } },
.bios = { { 0 } }
},
{
.name = "render_threads",
.description = "Render threads",
.type = CONFIG_SELECTION,
.selection = {
{
.description = "1",
.value = 1
},
{
.description = "2",
.value = 2
},
{
.description = "4",
.value = 4
},
{
.description = ""
}
.name = "render_threads",
.description = "Render threads",
.type = CONFIG_SELECTION,
.default_string = NULL,
.default_int = 2,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "1", .value = 1 },
{ .description = "2", .value = 2 },
{ .description = "4", .value = 4 },
{ .description = "" }
},
.default_int = 2
.bios = { { 0 } }
},
{
.name = "sli",
.description = "SLI",
.type = CONFIG_BINARY,
.default_int = 0
.name = "sli",
.description = "SLI",
.type = CONFIG_BINARY,
.default_string = NULL,
.default_int = 0,
.file_filter = NULL,
.spinner = { 0 },
.selection = { { 0 } },
.bios = { { 0 } }
},
#ifndef NO_CODEGEN
{
.name = "recompiler",
.description = "Dynamic Recompiler",
.type = CONFIG_BINARY,
.default_int = 1
.name = "recompiler",
.description = "Dynamic Recompiler",
.type = CONFIG_BINARY,
.default_string = NULL,
.default_int = 1,
.file_filter = NULL,
.spinner = { 0 },
.selection = { { 0 } },
.bios = { { 0 } }
},
#endif
{ .name = "", .description = "", .type = CONFIG_END }

View File

@@ -441,7 +441,9 @@ banshee_updatemapping(banshee_t *banshee)
svga_t *svga = &banshee->svga;
if (!(banshee->pci_regs[PCI_REG_COMMAND] & PCI_COMMAND_MEM)) {
// banshee_log("Update mapping - PCI disabled\n");
#if 0
banshee_log("Update mapping - PCI disabled\n");
#endif
mem_mapping_disable(&svga->mapping);
mem_mapping_disable(&banshee->linear_mapping);
mem_mapping_disable(&banshee->reg_mapping_low);
@@ -1082,7 +1084,9 @@ banshee_ext_in(uint16_t addr, void *priv)
break;
}
// banshee_log("banshee_ext_in: addr=%04x val=%02x\n", addr, ret);
#if 0
banshee_log("banshee_ext_in: addr=%04x val=%02x\n", addr, ret);
#endif
return ret;
}
@@ -1273,7 +1277,9 @@ banshee_ext_inl(uint16_t addr, void *priv)
break;
default:
// fatal("bad banshee_ext_inl: addr=%04x\n", addr);
#if 0
fatal("bad banshee_ext_inl: addr=%04x\n", addr);
#endif
break;
}
@@ -1334,17 +1340,23 @@ banshee_cmd_read(banshee_t *banshee, uint32_t addr)
case cmdBaseAddr0:
ret = voodoo->cmdfifo_base >> 12;
// banshee_log("Read cmdfifo_base %08x\n", ret);
#if 0
banshee_log("Read cmdfifo_base %08x\n", ret);
#endif
break;
case cmdRdPtrL0:
ret = voodoo->cmdfifo_rp;
// banshee_log("Read cmdfifo_rp %08x\n", ret);
#if 0
banshee_log("Read cmdfifo_rp %08x\n", ret);
#endif
break;
case cmdFifoDepth0:
ret = voodoo->cmdfifo_depth_wr - voodoo->cmdfifo_depth_rd;
// banshee_log("Read cmdfifo_depth %08x\n", ret);
#if 0
banshee_log("Read cmdfifo_depth %08x\n", ret);
#endif
break;
case cmdStatus0:
@@ -1357,17 +1369,23 @@ banshee_cmd_read(banshee_t *banshee, uint32_t addr)
case cmdBaseAddr1:
ret = voodoo->cmdfifo_base_2 >> 12;
// banshee_log("Read cmdfifo_base %08x\n", ret);
#if 0
banshee_log("Read cmdfifo_base %08x\n", ret);
#endif
break;
case cmdRdPtrL1:
ret = voodoo->cmdfifo_rp_2;
// banshee_log("Read cmdfifo_rp %08x\n", ret);
#if 0
banshee_log("Read cmdfifo_rp %08x\n", ret);
#endif
break;
case cmdFifoDepth1:
ret = voodoo->cmdfifo_depth_wr_2 - voodoo->cmdfifo_depth_rd_2;
// banshee_log("Read cmdfifo_depth %08x\n", ret);
#if 0
banshee_log("Read cmdfifo_depth %08x\n", ret);
#endif
break;
case cmdStatus1:
@@ -2833,7 +2851,9 @@ banshee_pci_read(int func, int addr, void *priv)
if (func)
return 0xff;
// banshee_log("Banshee PCI read %08X ", addr);
#if 0
banshee_log("Banshee PCI read %08X ", addr);
#endif
switch (addr) {
case 0x00:
ret = 0x1a;
@@ -3158,186 +3178,6 @@ banshee_pci_write(int func, int addr, uint8_t val, void *priv)
}
}
// clang-format off
static const device_config_t banshee_sgram_config[] = {
{
.name = "memory",
.description = "Memory size",
.type = CONFIG_SELECTION,
.selection = {
{
.description = "8 MB",
.value = 8
},
{
.description = "16 MB",
.value = 16
},
{
.description = ""
}
},
.default_int = 16
},
{
.name = "bilinear",
.description = "Bilinear filtering",
.type = CONFIG_BINARY,
.default_int = 1
},
{
.name = "dithersub",
.description = "Dither subtraction",
.type = CONFIG_BINARY,
.default_int = 1
},
{
.name = "dacfilter",
.description = "Screen Filter",
.type = CONFIG_BINARY,
.default_int = 0
},
{
.name = "render_threads",
.description = "Render threads",
.type = CONFIG_SELECTION,
.selection = {
{
.description = "1",
.value = 1
},
{
.description = "2",
.value = 2
},
{
.description = "4",
.value = 4
},
{
.description = ""
}
},
.default_int = 2
},
#ifndef NO_CODEGEN
{
.name = "recompiler",
.description = "Dynamic Recompiler",
.type = CONFIG_BINARY,
.default_int = 1
},
#endif
{ .name = "", .description = "", .type = CONFIG_END }
};
static const device_config_t banshee_sgram_16mbonly_config[] = {
{
.name = "bilinear",
.description = "Bilinear filtering",
.type = CONFIG_BINARY,
.default_int = 1
},
{
.name = "dithersub",
.description = "Dither subtraction",
.type = CONFIG_BINARY,
.default_int = 1
},
{
.name = "dacfilter",
.description = "Screen Filter",
.type = CONFIG_BINARY,
.default_int = 0
},
{
.name = "render_threads",
.description = "Render threads",
.type = CONFIG_SELECTION,
.selection = {
{
.description = "1",
.value = 1
},
{
.description = "2",
.value = 2
},
{
.description = "4",
.value = 4
},
{
.description = ""
}
},
.default_int = 2
},
#ifndef NO_CODEGEN
{
.name = "recompiler",
.description = "Dynamic Recompiler",
.type = CONFIG_BINARY,
.default_int = 1
},
#endif
{ .name = "", .description = "", .type = CONFIG_END }
};
static const device_config_t banshee_sdram_config[] = {
{
.name = "bilinear",
.description = "Bilinear filtering",
.type = CONFIG_BINARY,
.default_int = 1
},
{
.name = "dithersub",
.description = "Dither subtraction",
.type = CONFIG_BINARY,
.default_int = 1
},
{
.name = "dacfilter",
.description = "Screen Filter",
.type = CONFIG_BINARY,
.default_int = 0
},
{
.name = "render_threads",
.description = "Render threads",
.type = CONFIG_SELECTION,
.selection = {
{
.description = "1",
.value = 1
},
{
.description = "2",
.value = 2
},
{
.description = "4",
.value = 4
},
{
.description = ""
}
},
.default_int = 2
},
#ifndef NO_CODEGEN
{
.name = "recompiler",
.description = "Dynamic Recompiler",
.type = CONFIG_BINARY,
.default_int = 1
},
#endif
{ .name = "", .description = "", .type = CONFIG_END }
};
// clang-format on
static void *
banshee_init_common(const device_t *info, char *fn, int has_sgram, int type, int voodoo_type, int agp)
{
@@ -3729,6 +3569,221 @@ banshee_force_redraw(void *priv)
banshee->svga.fullchange = changeframecount;
}
// clang-format off
static const device_config_t banshee_sgram_config[] = {
{
.name = "memory",
.description = "Memory size",
.type = CONFIG_SELECTION,
.default_string = NULL,
.default_int = 16,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "8 MB", .value = 8 },
{ .description = "16 MB", .value = 16 },
{ .description = "" }
},
.bios = { { 0 } }
},
{
.name = "bilinear",
.description = "Bilinear filtering",
.type = CONFIG_BINARY,
.default_string = NULL,
.default_int = 1,
.file_filter = NULL,
.spinner = { 0 },
.selection = { { 0 } },
.bios = { { 0 } }
},
{
.name = "dithersub",
.description = "Dither subtraction",
.type = CONFIG_BINARY,
.default_string = NULL,
.default_int = 1,
.file_filter = NULL,
.spinner = { 0 },
.selection = { { 0 } },
.bios = { { 0 } }
},
{
.name = "dacfilter",
.description = "Screen Filter",
.type = CONFIG_BINARY,
.default_string = NULL,
.default_int = 0,
.file_filter = NULL,
.spinner = { 0 },
.selection = { { 0 } },
.bios = { { 0 } }
},
{
.name = "render_threads",
.description = "Render threads",
.type = CONFIG_SELECTION,
.default_string = NULL,
.default_int = 2,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "1", .value = 1 },
{ .description = "2", .value = 2 },
{ .description = "4", .value = 4 },
{ .description = "" }
},
.bios = { { 0 } }
},
#ifndef NO_CODEGEN
{
.name = "recompiler",
.description = "Dynamic Recompiler",
.type = CONFIG_BINARY,
.default_string = NULL,
.default_int = 1,
.file_filter = NULL,
.spinner = { 0 },
.selection = { { 0 } },
.bios = { { 0 } }
},
#endif
{ .name = "", .description = "", .type = CONFIG_END }
};
static const device_config_t banshee_sgram_16mbonly_config[] = {
{
.name = "bilinear",
.description = "Bilinear filtering",
.type = CONFIG_BINARY,
.default_string = NULL,
.default_int = 1,
.file_filter = NULL,
.spinner = { 0 },
.selection = { { 0 } },
.bios = { { 0 } }
},
{
.name = "dithersub",
.description = "Dither subtraction",
.type = CONFIG_BINARY,
.default_string = NULL,
.default_int = 1,
.file_filter = NULL,
.spinner = { 0 },
.selection = { { 0 } },
.bios = { { 0 } }
},
{
.name = "dacfilter",
.description = "Screen Filter",
.type = CONFIG_BINARY,
.default_string = NULL,
.default_int = 0,
.file_filter = NULL,
.spinner = { 0 },
.selection = { { 0 } },
.bios = { { 0 } }
},
{
.name = "render_threads",
.description = "Render threads",
.type = CONFIG_SELECTION,
.default_string = NULL,
.default_int = 2,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "1", .value = 1 },
{ .description = "2", .value = 2 },
{ .description = "4", .value = 4 },
{ .description = "" }
},
.bios = { { 0 } }
},
#ifndef NO_CODEGEN
{
.name = "recompiler",
.description = "Dynamic Recompiler",
.type = CONFIG_BINARY,
.default_string = NULL,
.default_int = 1,
.file_filter = NULL,
.spinner = { 0 },
.selection = { { 0 } },
.bios = { { 0 } }
},
#endif
{ .name = "", .description = "", .type = CONFIG_END }
};
static const device_config_t banshee_sdram_config[] = {
{
.name = "bilinear",
.description = "Bilinear filtering",
.type = CONFIG_BINARY,
.default_string = NULL,
.default_int = 1,
.file_filter = NULL,
.spinner = { 0 },
.selection = { { 0 } },
.bios = { { 0 } }
},
{
.name = "dithersub",
.description = "Dither subtraction",
.type = CONFIG_BINARY,
.default_string = NULL,
.default_int = 1,
.file_filter = NULL,
.spinner = { 0 },
.selection = { { 0 } },
.bios = { { 0 } }
},
{
.name = "dacfilter",
.description = "Screen Filter",
.type = CONFIG_BINARY,
.default_string = NULL,
.default_int = 0,
.file_filter = NULL,
.spinner = { 0 },
.selection = { { 0 } },
.bios = { { 0 } }
},
{
.name = "render_threads",
.description = "Render threads",
.type = CONFIG_SELECTION,
.default_string = NULL,
.default_int = 2,
.file_filter = NULL,
.spinner = { 0 },
.selection = {
{ .description = "1", .value = 1 },
{ .description = "2", .value = 2 },
{ .description = "4", .value = 4 },
{ .description = "" }
},
.bios = { { 0 } }
},
#ifndef NO_CODEGEN
{
.name = "recompiler",
.description = "Dynamic Recompiler",
.type = CONFIG_BINARY,
.default_string = NULL,
.default_int = 1,
.file_filter = NULL,
.spinner = { 0 },
.selection = { { 0 } },
.bios = { { 0 } }
},
#endif
{ .name = "", .description = "", .type = CONFIG_END }
};
// clang-format on
const device_t voodoo_banshee_device = {
.name = "3Dfx Voodoo Banshee",
.internal_name = "voodoo_banshee_pci",

View File

@@ -43,8 +43,7 @@
typedef struct voodoo_state_t {
int xstart, xend, xdir;
uint32_t base_r, base_g, base_b, base_a, base_z;
struct
{
struct {
int64_t base_s, base_t, base_w;
int lod;
} tmu[2];
@@ -1424,11 +1423,14 @@ voodoo_triangle(voodoo_t *voodoo, voodoo_params_t *params, int odd_even)
if ((params->vertexAy & 0xf) > 8)
dy += 16;
/* voodoo_render_log("voodoo_triangle %i %i %i : vA %f, %f vB %f, %f vC %f, %f f %i,%i %08x %08x %08x,%08x tex=%i,%i fogMode=%08x\n", odd_even, voodoo->params_read_idx[odd_even], voodoo->params_read_idx[odd_even] & PARAM_MASK, (float)params->vertexAx / 16.0, (float)params->vertexAy / 16.0,
(float)params->vertexBx / 16.0, (float)params->vertexBy / 16.0,
(float)params->vertexCx / 16.0, (float)params->vertexCy / 16.0,
(params->fbzColorPath & FBZCP_TEXTURE_ENABLED) ? params->tformat[0] : 0,
(params->fbzColorPath & FBZCP_TEXTURE_ENABLED) ? params->tformat[1] : 0, params->fbzColorPath, params->alphaMode, params->textureMode[0],params->textureMode[1], params->tex_entry[0],params->tex_entry[1], params->fogMode);*/
#if 0
voodoo_render_log("voodoo_triangle %i %i %i : vA %f, %f vB %f, %f vC %f, %f f %i,%i %08x %08x %08x,%08x tex=%i,%i fogMode=%08x\n",
odd_even, voodoo->params_read_idx[odd_even], voodoo->params_read_idx[odd_even] & PARAM_MASK, (float)params->vertexAx / 16.0, (float)params->vertexAy / 16.0,
(float)params->vertexBx / 16.0, (float)params->vertexBy / 16.0,
(float)params->vertexCx / 16.0, (float)params->vertexCy / 16.0,
(params->fbzColorPath & FBZCP_TEXTURE_ENABLED) ? params->tformat[0] : 0,
(params->fbzColorPath & FBZCP_TEXTURE_ENABLED) ? params->tformat[1] : 0, params->fbzColorPath, params->alphaMode, params->textureMode[0],params->textureMode[1], params->tex_entry[0],params->tex_entry[1], params->fogMode);
#endif
state.base_r = params->startR;
state.base_g = params->startG;

View File

@@ -191,8 +191,8 @@ voodoo_triangle_setup(voodoo_t *voodoo)
voodoo->params.dWdX = (int64_t) (((verts[va].sWb - verts[vb].sWb) * dyBC - (verts[vb].sWb - verts[vc].sWb) * dyAB) * 4294967296.0f);
voodoo->params.dWdY = (int64_t) (((verts[vb].sWb - verts[vc].sWb) * dxAB - (verts[va].sWb - verts[vb].sWb) * dxBC) * 4294967296.0f);
voodoo->params.tmu[0].startW = voodoo->params.tmu[1].startW = voodoo->params.startW;
voodoo->params.tmu[0].dWdX = voodoo->params.tmu[1].dWdX = voodoo->params.dWdX;
voodoo->params.tmu[0].dWdY = voodoo->params.tmu[1].dWdY = voodoo->params.dWdY;
voodoo->params.tmu[0].dWdX = voodoo->params.tmu[1].dWdX = voodoo->params.dWdX;
voodoo->params.tmu[0].dWdY = voodoo->params.tmu[1].dWdY = voodoo->params.dWdY;
}
if (voodoo->sSetupMode & SETUPMODE_W0) {
voodoo->params.tmu[0].startW = (int64_t) (verts[va].sW0 * 4294967296.0f);

Some files were not shown because too many files have changed in this diff Show More