mirror of
https://github.com/86Box/86Box.git
synced 2026-02-25 04:45:31 -07:00
Merge branch 'master' of https://github.com/86Box/86Box.git into EngiNerd
This commit is contained in:
22
.github/workflows/c-cpp.yml
vendored
22
.github/workflows/c-cpp.yml
vendored
@@ -14,6 +14,7 @@ on:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build (DEV_BUILD=${{ matrix.dev-build }}, NEW_DYNAREC=${{ matrix.new-dynarec }}, X64=${{ matrix.target-arch.x64 }})
|
||||
|
||||
runs-on: windows-latest
|
||||
|
||||
@@ -25,14 +26,29 @@ jobs:
|
||||
matrix:
|
||||
dev-build: ['y', 'n']
|
||||
new-dynarec: ['y', 'n']
|
||||
target-arch:
|
||||
- x64: 'n'
|
||||
msystem: MINGW32
|
||||
prefix: mingw-w64-i686
|
||||
- x64: 'y'
|
||||
msystem: MINGW64
|
||||
prefix: mingw-w64-x86_64
|
||||
|
||||
steps:
|
||||
- uses: msys2/setup-msys2@v2
|
||||
with:
|
||||
update: true
|
||||
msystem: MINGW32
|
||||
install: 'make mingw-w64-i686-toolchain mingw-w64-i686-openal mingw-w64-i686-freetype mingw-w64-i686-SDL2 mingw-w64-i686-zlib mingw-w64-i686-libpng mingw-w64-i686-libvncserver'
|
||||
msystem: ${{ matrix.target-arch.msystem }}
|
||||
install: >-
|
||||
make
|
||||
${{ matrix.target-arch.prefix }}-toolchain
|
||||
${{ matrix.target-arch.prefix }}-openal
|
||||
${{ matrix.target-arch.prefix }}-freetype
|
||||
${{ matrix.target-arch.prefix }}-SDL2
|
||||
${{ matrix.target-arch.prefix }}-zlib
|
||||
${{ matrix.target-arch.prefix }}-libpng
|
||||
${{ matrix.target-arch.prefix }}-libvncserver
|
||||
- uses: actions/checkout@v2
|
||||
- name: make
|
||||
run: make -fwin/makefile.mingw -j DEV_BUILD=${{ matrix.dev-build }} NEW_DYNAREC=${{ matrix.new-dynarec }} VNC=n
|
||||
run: make -fwin/makefile.mingw -j DEV_BUILD=${{ matrix.dev-build }} NEW_DYNAREC=${{ matrix.new-dynarec }} X64=${{ matrix.target-arch.x64 }} VNC=n
|
||||
working-directory: ./src
|
||||
|
||||
@@ -425,8 +425,8 @@ int
|
||||
cdi_read_sectors(cd_img_t *cdi, uint8_t *buffer, int raw, uint32_t sector, uint32_t num)
|
||||
{
|
||||
int sector_size, success = 1;
|
||||
uint8_t buf_len, *buf;
|
||||
uint32_t i;
|
||||
uint8_t *buf;
|
||||
uint32_t buf_len, i;
|
||||
|
||||
/* TODO: This fails to account for Mode 2. Shouldn't we have a function
|
||||
to get sector size? */
|
||||
|
||||
@@ -202,15 +202,12 @@ pipc_reset_hard(void *priv)
|
||||
switch (dev->local) {
|
||||
case VIA_PIPC_586A:
|
||||
case VIA_PIPC_586B:
|
||||
case VIA_PIPC_596A:
|
||||
dev->usb_regs[i][0x08] = 0x02;
|
||||
break;
|
||||
|
||||
case VIA_PIPC_596A:
|
||||
dev->usb_regs[i][0x08] = 0x08;
|
||||
break;
|
||||
|
||||
case VIA_PIPC_596B:
|
||||
dev->usb_regs[i][0x08] = 0x11;
|
||||
dev->usb_regs[i][0x08] = 0x08;
|
||||
break;
|
||||
|
||||
case VIA_PIPC_686A:
|
||||
@@ -218,7 +215,7 @@ pipc_reset_hard(void *priv)
|
||||
break;
|
||||
|
||||
case VIA_PIPC_686B:
|
||||
dev->usb_regs[i][0x08] = 0x16;
|
||||
dev->usb_regs[i][0x08] = 0x1a;
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
@@ -146,7 +146,7 @@ static uint32_t ropFSTs(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint3
|
||||
static uint32_t ropFSTd(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
|
||||
{
|
||||
x86seg *target_seg;
|
||||
int host_reg1, host_reg2;
|
||||
int host_reg1, host_reg2 = 0;
|
||||
|
||||
FP_ENTER();
|
||||
op_pc--;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
static uint32_t ropMOVQ_q_mm(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
|
||||
{
|
||||
int host_reg1, host_reg2;
|
||||
int host_reg1, host_reg2 = 0;
|
||||
|
||||
MMX_ENTER();
|
||||
|
||||
|
||||
@@ -124,6 +124,33 @@ static inline void load_param_2_64(codeblock_t *block, uint64_t param)
|
||||
#endif
|
||||
addquad(param);
|
||||
}
|
||||
static inline void load_param_2_reg_64(int reg)
|
||||
{
|
||||
if (reg & 8)
|
||||
{
|
||||
#if WIN64
|
||||
addbyte(0x4c); /*MOVL EDX,reg*/
|
||||
addbyte(0x89);
|
||||
addbyte(0xc0 | REG_EDX | ((reg & 7) << 3));
|
||||
#else
|
||||
addbyte(0x4c); /*MOVL ESI,reg*/
|
||||
addbyte(0x89);
|
||||
addbyte(0xc0 | REG_ESI | ((reg & 7) << 3));
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
#if WIN64
|
||||
addbyte(0x48); /*MOVL EDX,reg*/
|
||||
addbyte(0x89);
|
||||
addbyte(0xc0 | REG_EDX | ((reg & 7) << 3));
|
||||
#else
|
||||
addbyte(0x48); /*MOVL ESI,reg*/
|
||||
addbyte(0x89);
|
||||
addbyte(0xc0 | REG_ESI | ((reg & 7) << 3));
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
static inline void load_param_3_reg_32(int reg)
|
||||
{
|
||||
@@ -270,33 +297,26 @@ static inline void STORE_REG_TARGET_B_RELEASE(int host_reg, int guest_reg)
|
||||
addbyte(0x44);
|
||||
addbyte(0x89);
|
||||
addbyte(0xc0 | ((host_reg & 3) << 3));
|
||||
if (host_reg & 0x10)
|
||||
{
|
||||
addbyte(0x66); /*AND AX, 0xff00*/
|
||||
addbyte(0x25);
|
||||
addword(0xff00);
|
||||
}
|
||||
else
|
||||
{
|
||||
addbyte(0x66); /*SHL AX, 8*/
|
||||
addbyte(0xc1);
|
||||
addbyte(0xe0);
|
||||
addbyte(0x08);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (host_reg)
|
||||
{
|
||||
addbyte(0x66); /*MOV AX, host_reg*/
|
||||
addbyte(0x89);
|
||||
addbyte(0xc0 | ((host_reg & 3) << 3));
|
||||
}
|
||||
addbyte(0x66); /*SHL AX, 8*/
|
||||
addbyte(0xc1);
|
||||
addbyte(0xe0);
|
||||
addbyte(0x08);
|
||||
else if (host_reg & 3)
|
||||
{
|
||||
addbyte(0x66); /*MOV AX, host_reg*/
|
||||
addbyte(0x89);
|
||||
addbyte(0xc0 | ((host_reg & 3) << 3));
|
||||
}
|
||||
if (host_reg & 0x10)
|
||||
{
|
||||
addbyte(0x66); /*AND AX, 0xff00*/
|
||||
addbyte(0x25);
|
||||
addword(0xff00);
|
||||
}
|
||||
else
|
||||
{
|
||||
addbyte(0x66); /*SHL AX, 8*/
|
||||
addbyte(0xc1);
|
||||
addbyte(0xe0);
|
||||
addbyte(0x08);
|
||||
}
|
||||
addbyte(0x66); /*AND dest_reg, 0x00ff*/
|
||||
addbyte(0x41);
|
||||
addbyte(0x81);
|
||||
@@ -1396,7 +1416,11 @@ static inline void MEM_STORE_ADDR_EA_B(x86seg *seg, int host_reg)
|
||||
addbyte(REG_EDI | (REG_ESI << 3));
|
||||
}
|
||||
addbyte(0xeb); /*JMP done*/
|
||||
addbyte(2+2+3+12+4+6);
|
||||
if (host_reg & 8) {
|
||||
addbyte(2+2+3+12+4+6);
|
||||
} else {
|
||||
addbyte(2+2+2+12+4+6);
|
||||
}
|
||||
/*slowpath:*/
|
||||
addbyte(0x01); /*ADD ECX,EAX*/
|
||||
addbyte(0xc1);
|
||||
@@ -1488,7 +1512,11 @@ static inline void MEM_STORE_ADDR_EA_W(x86seg *seg, int host_reg)
|
||||
addbyte(REG_EDI | (REG_ESI << 3));
|
||||
}
|
||||
addbyte(0xeb); /*JMP done*/
|
||||
addbyte(2+2+3+12+4+6);
|
||||
if (host_reg & 8) {
|
||||
addbyte(2+2+3+12+4+6);
|
||||
} else {
|
||||
addbyte(2+2+2+12+4+6);
|
||||
}
|
||||
/*slowpath:*/
|
||||
addbyte(0x01); /*ADD ECX,EAX*/
|
||||
addbyte(0xc1);
|
||||
@@ -1578,7 +1606,11 @@ static inline void MEM_STORE_ADDR_EA_L(x86seg *seg, int host_reg)
|
||||
addbyte(REG_EDI | (REG_ESI << 3));
|
||||
}
|
||||
addbyte(0xeb); /*JMP done*/
|
||||
addbyte(2+2+3+12+4+6);
|
||||
if (host_reg & 8) {
|
||||
addbyte(2+2+3+12+4+6);
|
||||
} else {
|
||||
addbyte(2+2+2+12+4+6);
|
||||
}
|
||||
/*slowpath:*/
|
||||
addbyte(0x01); /*ADD ECX,EAX*/
|
||||
addbyte(0xc1);
|
||||
@@ -6032,12 +6064,16 @@ static inline void MEM_STORE_ADDR_EA_B_NO_ABRT(x86seg *seg, int host_reg)
|
||||
addbyte(REG_EDI | (REG_ESI << 3));
|
||||
}
|
||||
addbyte(0xeb); /*JMP done*/
|
||||
addbyte(2+2+3+12);
|
||||
if (host_reg & 8) {
|
||||
addbyte(2+2+3+12);
|
||||
} else {
|
||||
addbyte(2+2+2+12);
|
||||
}
|
||||
/*slowpath:*/
|
||||
load_param_2_reg_32(host_reg);
|
||||
addbyte(0x01); /*ADD ECX,EAX*/
|
||||
addbyte(0xc1);
|
||||
load_param_1_reg_32(REG_ECX);
|
||||
addbyte(0x01); /*ADD EBX,EAX*/
|
||||
addbyte(0xc3);
|
||||
load_param_1_reg_32(REG_EBX);
|
||||
call_long((uintptr_t)writemembl);
|
||||
/*done:*/
|
||||
}
|
||||
@@ -6117,12 +6153,16 @@ static inline void MEM_STORE_ADDR_EA_W_NO_ABRT(x86seg *seg, int host_reg)
|
||||
addbyte(REG_EDI | (REG_ESI << 3));
|
||||
}
|
||||
addbyte(0xeb); /*JMP done*/
|
||||
addbyte(2+2+3+12);
|
||||
if (host_reg & 8) {
|
||||
addbyte(2+2+3+12);
|
||||
} else {
|
||||
addbyte(2+2+2+12);
|
||||
}
|
||||
/*slowpath:*/
|
||||
load_param_2_reg_32(host_reg);
|
||||
addbyte(0x01); /*ADD ECX,EAX*/
|
||||
addbyte(0xc1);
|
||||
load_param_1_reg_32(REG_ECX);
|
||||
addbyte(0x01); /*ADD EBX,EAX*/
|
||||
addbyte(0xc3);
|
||||
load_param_1_reg_32(REG_EBX);
|
||||
call_long((uintptr_t)writememwl);
|
||||
/*done:*/
|
||||
}
|
||||
@@ -6200,12 +6240,16 @@ static inline void MEM_STORE_ADDR_EA_L_NO_ABRT(x86seg *seg, int host_reg)
|
||||
addbyte(REG_EDI | (REG_ESI << 3));
|
||||
}
|
||||
addbyte(0xeb); /*JMP done*/
|
||||
addbyte(2+2+3+12);
|
||||
if (host_reg & 8) {
|
||||
addbyte(2+2+3+12);
|
||||
} else {
|
||||
addbyte(2+2+2+12);
|
||||
}
|
||||
/*slowpath:*/
|
||||
load_param_2_reg_32(host_reg);
|
||||
addbyte(0x01); /*ADD ECX,EAX*/
|
||||
addbyte(0xc1);
|
||||
load_param_1_reg_32(REG_ECX);
|
||||
addbyte(0x01); /*ADD EBX,EAX*/
|
||||
addbyte(0xc3);
|
||||
load_param_1_reg_32(REG_EBX);
|
||||
call_long((uintptr_t)writememll);
|
||||
/*done:*/
|
||||
}
|
||||
|
||||
@@ -44,9 +44,6 @@ OP_XCHG_EAX_(EBP)
|
||||
|
||||
static uint32_t ropXCHG_b(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
|
||||
{
|
||||
/* #ifdef __amd64__
|
||||
return 0;
|
||||
#else */
|
||||
int src_reg, dst_reg, temp_reg;
|
||||
|
||||
if ((fetchdat & 0xc0) != 0xc0)
|
||||
@@ -59,7 +56,6 @@ static uint32_t ropXCHG_b(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uin
|
||||
STORE_REG_TARGET_B_RELEASE(temp_reg, fetchdat & 7);
|
||||
|
||||
return op_pc + 1;
|
||||
/* #endif */
|
||||
}
|
||||
static uint32_t ropXCHG_w(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
|
||||
{
|
||||
|
||||
30
src/config.c
30
src/config.c
@@ -1,4 +1,4 @@
|
||||
/*
|
||||
/*
|
||||
* 86Box A hypervisor and IBM PC system emulator that specializes in
|
||||
* running old operating systems and software designed for IBM
|
||||
* PC systems and compatibles from 1981 through fairly recent
|
||||
@@ -541,6 +541,7 @@ load_machine(void)
|
||||
if (machine >= machine_count())
|
||||
machine = machine_count() - 1;
|
||||
|
||||
cpu_override = config_get_int(cat, "cpu_override", 0);
|
||||
cpu_f = NULL;
|
||||
p = config_get_string(cat, "cpu_family", NULL);
|
||||
if (p) {
|
||||
@@ -627,7 +628,6 @@ load_machine(void)
|
||||
}
|
||||
}
|
||||
cpu_s = (CPU *) &cpu_f->cpus[cpu];
|
||||
cpu_override = config_get_int(cat, "cpu_override", 0);
|
||||
|
||||
cpu_waitstates = config_get_int(cat, "cpu_waitstates", 0);
|
||||
|
||||
@@ -715,7 +715,20 @@ load_input_devices(void)
|
||||
else
|
||||
mouse_type = 0;
|
||||
|
||||
joystick_type = config_get_int(cat, "joystick_type", JOYSTICK_TYPE_NONE);
|
||||
p = config_get_string(cat, "joystick_type", NULL);
|
||||
if (p != NULL) {
|
||||
joystick_type = joystick_get_from_internal_name(p);
|
||||
if (!joystick_type) {
|
||||
/* Try to read an integer for backwards compatibility with old configs */
|
||||
c = config_get_int(cat, "joystick_type", 8);
|
||||
if ((c >= 0) && (c < 8))
|
||||
/* "None" was type 8 instead of 0 previously, shift the number accordingly */
|
||||
joystick_type = c + 1;
|
||||
else
|
||||
joystick_type = 0;
|
||||
}
|
||||
} else
|
||||
joystick_type = 0;
|
||||
|
||||
for (c=0; c<joystick_get_max_joysticks(joystick_type); c++) {
|
||||
sprintf(temp, "joystick_%i_nr", c);
|
||||
@@ -1672,7 +1685,6 @@ config_load(void)
|
||||
gfxcard = video_get_video_from_internal_name("cga");
|
||||
vid_api = plat_vidapi("default");
|
||||
time_sync = TIME_SYNC_ENABLED;
|
||||
joystick_type = JOYSTICK_TYPE_NONE;
|
||||
hdc_current = hdc_get_from_internal_name("none");
|
||||
serial_enabled[0] = 1;
|
||||
serial_enabled[1] = 1;
|
||||
@@ -1885,7 +1897,7 @@ save_machine(void)
|
||||
continue;
|
||||
|
||||
i = 0;
|
||||
do {
|
||||
while (cpu_legacy_table[c].tables[legacy_mfg][i].family) {
|
||||
legacy_table_entry = (cpu_legacy_table_t *) &cpu_legacy_table[c].tables[legacy_mfg][i];
|
||||
|
||||
/* Match the family name, speed and multiplier. */
|
||||
@@ -1899,7 +1911,9 @@ save_machine(void)
|
||||
closest_legacy_cpu = i;
|
||||
}
|
||||
}
|
||||
} while (cpu_legacy_table[c].tables[legacy_mfg][++i].family);
|
||||
|
||||
i++;
|
||||
}
|
||||
|
||||
/* Use the closest speed match if no exact match was found. */
|
||||
if ((legacy_cpu == -1) && (closest_legacy_cpu > -1)) {
|
||||
@@ -1975,7 +1989,7 @@ save_input_devices(void)
|
||||
|
||||
config_set_string(cat, "mouse_type", mouse_get_internal_name(mouse_type));
|
||||
|
||||
if (joystick_type == JOYSTICK_TYPE_NONE) {
|
||||
if (!joystick_type) {
|
||||
config_delete_var(cat, "joystick_type");
|
||||
|
||||
for (c = 0; c < 16; c++) {
|
||||
@@ -1996,7 +2010,7 @@ save_input_devices(void)
|
||||
}
|
||||
}
|
||||
} else {
|
||||
config_set_int(cat, "joystick_type", joystick_type);
|
||||
config_set_string(cat, "joystick_type", joystick_get_internal_name(joystick_type));
|
||||
|
||||
for (c = 0; c < joystick_get_max_joysticks(joystick_type); c++) {
|
||||
sprintf(tmp2, "joystick_%i_nr", c);
|
||||
|
||||
@@ -462,9 +462,9 @@ static void
|
||||
writemem(uint32_t s, uint16_t v)
|
||||
{
|
||||
if (opcode & 1)
|
||||
return writememw(s, cpu_state.eaaddr, v);
|
||||
writememw(s, cpu_state.eaaddr, v);
|
||||
else
|
||||
return writememb(s, cpu_state.eaaddr, (uint8_t) (v & 0xff));
|
||||
writememb(s, cpu_state.eaaddr, (uint8_t) (v & 0xff));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -370,32 +370,47 @@ cpu_is_eligible(const cpu_family_t *cpu_family, int cpu, int machine)
|
||||
if (machine_s->cpu_max_voltage && (cpu_s->voltage > (machine_s->cpu_max_voltage + 100))) /* maximum voltage with 0.1V tolerance */
|
||||
return 0;
|
||||
|
||||
/* Account for CPUs that use a different internal multiplier than specified by jumpers. */
|
||||
/* Account for CPUs which use a different internal multiplier than specified by jumpers. */
|
||||
double multi = cpu_s->multi;
|
||||
if (cpu_s->cpu_flags & CPU_FIXED_MULTIPLIER) {
|
||||
multi = machine_s->cpu_min_multi;
|
||||
return 1; /* don't care about multiplier compatibility on fixed multiplier CPUs */
|
||||
} else if (cpu_family->package & CPU_PKG_SOCKET5_7) {
|
||||
if (multi == 1.75) /* K5 */
|
||||
if ((multi == 1.5) && (cpu_s->cpu_type & CPU_5K86) && (machine_s->cpu_min_multi > 1.5)) /* K5 5k86 */
|
||||
multi = 2.0;
|
||||
else if (multi == 1.75) /* K5 5k86 */
|
||||
multi = 2.5;
|
||||
else if ((multi == 2.0) && (cpu_s->cpu_type & CPU_5K86)) /* K5 */
|
||||
multi = 3.0;
|
||||
else if ((multi == 2.0) && (cpu_s->cpu_type & (CPU_K6_2P | CPU_K6_3P))) /* K6-2+ / K6-3+ */
|
||||
multi = 2.5;
|
||||
else if (multi == (7.0 / 3.0)) /* WinChip 2A */
|
||||
else if (multi == 2.0) {
|
||||
if (cpu_s->cpu_type & CPU_5K86) /* K5 5k86 */
|
||||
multi = 3.0;
|
||||
else if (cpu_s->cpu_type & (CPU_K6_2P | CPU_K6_3P)) /* K6-2+ / K6-3+ */
|
||||
multi = 2.5;
|
||||
else if ((cpu_s->cpu_type & (CPU_WINCHIP | CPU_WINCHIP2)) && (machine_s->cpu_min_multi > 2.0)) /* WinChip (2) */
|
||||
multi = 2.5;
|
||||
}
|
||||
else if (multi == (7.0 / 3.0)) /* WinChip 2A - 2.33x */
|
||||
multi = 5.0;
|
||||
else if (multi == (8.0 / 3.0)) /* WinChip 2A */
|
||||
else if (multi == (8.0 / 3.0)) /* WinChip 2A - 2.66x */
|
||||
multi = 5.5;
|
||||
else if ((multi == 3.0) && (cpu_s->cpu_type & (CPU_Cx6x86 | CPU_Cx6x86L))) /* 6x86(L) */
|
||||
multi = 1.5;
|
||||
else if (multi == (10.0 / 3.0)) /* WinChip 2A */
|
||||
else if (multi == (10.0 / 3.0)) /* WinChip 2A - 3.33x */
|
||||
multi = 2.0;
|
||||
else if (multi == 3.5) /* standard set by the Pentium MMX */
|
||||
else if ((multi == 3.5) && (machine_s->cpu_min_multi < 3.5)) /* standard set by the Pentium MMX */
|
||||
multi = 1.5;
|
||||
else if ((multi == 4.0) && (cpu_s->cpu_type & (CPU_WINCHIP | CPU_WINCHIP2))) /* WinChip (2) */
|
||||
multi = 1.5;
|
||||
else if ((multi == 4.0) && (cpu_s->cpu_type & (CPU_Cx6x86 | CPU_Cx6x86L))) /* 6x86(L) */
|
||||
multi = 3.0;
|
||||
else if (multi == 6.0) /* K6-2 */
|
||||
else if (multi == 4.0) {
|
||||
if (cpu_s->cpu_type & (CPU_WINCHIP | CPU_WINCHIP2)) { /* WinChip (2) */
|
||||
if (machine_s->cpu_min_multi >= 1.5)
|
||||
multi = 1.5;
|
||||
else if (machine_s->cpu_min_multi >= 3.5)
|
||||
multi = 3.5;
|
||||
else if (machine_s->cpu_min_multi >= 4.5)
|
||||
multi = 4.5;
|
||||
} else if (cpu_s->cpu_type & (CPU_Cx6x86 | CPU_Cx6x86L)) /* 6x86(L) */
|
||||
multi = 3.0;
|
||||
}
|
||||
else if ((multi == 5.0) && (cpu_s->cpu_type & (CPU_WINCHIP | CPU_WINCHIP2)) && (machine_s->cpu_min_multi > 5.0)) /* WinChip (2) */
|
||||
multi = 5.5;
|
||||
else if ((multi == 6.0) && (machine_s->cpu_max_multi < 6.0)) /* K6-2(+) / K6-3(+) */
|
||||
multi = 2.0;
|
||||
}
|
||||
|
||||
|
||||
@@ -240,35 +240,22 @@ typedef struct {
|
||||
uint64_t fcr2, fcr3;
|
||||
} msr_t;
|
||||
|
||||
typedef union {
|
||||
uint32_t l;
|
||||
uint16_t w;
|
||||
} cr0_t;
|
||||
|
||||
|
||||
typedef struct {
|
||||
x86reg regs[8];
|
||||
|
||||
uint8_t tag[8];
|
||||
|
||||
int8_t ssegs, ismmx,
|
||||
abrt, pad;
|
||||
|
||||
uint16_t npxs, npxc, flags, eflags,
|
||||
old_npxc, new_npxc;
|
||||
|
||||
uint16_t MM_w4[8];
|
||||
|
||||
int _cycles,
|
||||
flags_op, TOP;
|
||||
|
||||
uint32_t flags_res,
|
||||
flags_op1, flags_op2,
|
||||
pc, oldpc, eaaddr, op32;
|
||||
|
||||
cr0_t CR0;
|
||||
|
||||
x86seg *ea_seg;
|
||||
uint32_t eaaddr;
|
||||
|
||||
int flags_op;
|
||||
uint32_t flags_res,
|
||||
flags_op1, flags_op2;
|
||||
|
||||
uint32_t pc,
|
||||
oldpc, op32;
|
||||
|
||||
int TOP;
|
||||
|
||||
union {
|
||||
struct {
|
||||
@@ -279,10 +266,21 @@ typedef struct {
|
||||
int32_t rm_mod_reg_data;
|
||||
} rm_data;
|
||||
|
||||
int8_t ssegs, ismmx,
|
||||
abrt, pad;
|
||||
|
||||
int _cycles;
|
||||
|
||||
uint16_t npxs, npxc;
|
||||
|
||||
double ST[8];
|
||||
|
||||
uint16_t MM_w4[8];
|
||||
|
||||
MMX_REG MM[8];
|
||||
|
||||
uint16_t old_npxc, new_npxc;
|
||||
|
||||
#ifdef USE_NEW_DYNAREC
|
||||
uint32_t old_fp_control, new_fp_control;
|
||||
#if defined i386 || defined __i386 || defined __i386__ || defined _X86_ || defined _M_IX86
|
||||
@@ -295,6 +293,13 @@ typedef struct {
|
||||
|
||||
x86seg seg_cs, seg_ds, seg_es, seg_ss,
|
||||
seg_fs, seg_gs;
|
||||
|
||||
union {
|
||||
uint32_t l;
|
||||
uint16_t w;
|
||||
} CR0;
|
||||
|
||||
uint16_t flags, eflags;
|
||||
} cpu_state_t;
|
||||
|
||||
/*The cpu_state.flags below must match in both cpu_cur_status and block->status for a block
|
||||
|
||||
@@ -1611,40 +1611,40 @@ static const cpu_legacy_table_t cpus_Cyrix3[] = {
|
||||
{NULL, 0, 0}
|
||||
};
|
||||
|
||||
static const cpu_legacy_table_t *cputables_8088[] = {cpus_8088};
|
||||
static const cpu_legacy_table_t *cputables_pcjr[] = {cpus_pcjr};
|
||||
static const cpu_legacy_table_t *cputables_europc[] = {cpus_europc};
|
||||
static const cpu_legacy_table_t *cputables_pc1512[] = {cpus_pc1512};
|
||||
static const cpu_legacy_table_t *cputables_8086[] = {cpus_8086};
|
||||
static const cpu_legacy_table_t *cputables_286[] = {cpus_286};
|
||||
static const cpu_legacy_table_t *cputables_ibmat[] = {cpus_ibmat};
|
||||
static const cpu_legacy_table_t *cputables_ps1_m2011[] = {cpus_ps1_m2011};
|
||||
static const cpu_legacy_table_t *cputables_ps2_m30_286_IBM486SLC[] = {cpus_ps2_m30_286, cpus_IBM486SLC};
|
||||
static const cpu_legacy_table_t *cputables_ibmxt286[] = {cpus_ibmxt286};
|
||||
static const cpu_legacy_table_t *cputables_i386SX_Am386SX_486SLC[] = {cpus_i386SX, cpus_Am386SX, cpus_486SLC};
|
||||
static const cpu_legacy_table_t *cputables_ALiM6117[] = {cpus_ALiM6117};
|
||||
static const cpu_legacy_table_t *cputables_i386SX_Am386SX_486SLC_IBM486SLC[] = {cpus_i386SX, cpus_Am386SX, cpus_486SLC, cpus_IBM486SLC};
|
||||
static const cpu_legacy_table_t *cputables_i386DX_Am386DX_486DLC[] = {cpus_i386DX, cpus_Am386DX, cpus_486DLC};
|
||||
static const cpu_legacy_table_t *cputables_i386DX_Am386DX_486DLC_IBM486BL[] = {cpus_i386DX, cpus_Am386DX, cpus_486DLC, cpus_IBM486BL};
|
||||
static const cpu_legacy_table_t *cputables_i486_Am486_Cx486[] = {cpus_i486, cpus_Am486, cpus_Cx486};
|
||||
static const cpu_legacy_table_t *cputables_i486S1_Am486S1_Cx486S1[] = {cpus_i486S1, cpus_Am486S1, cpus_Cx486S1};
|
||||
static const cpu_legacy_table_t *cputables_IBM486SLC[] = {cpus_IBM486SLC};
|
||||
static const cpu_legacy_table_t *cputables_i486_PC330[] = {cpus_i486_PC330};
|
||||
static const cpu_legacy_table_t *cputables_STPCDX[] = {cpus_STPCDX};
|
||||
static const cpu_legacy_table_t *cputables_STPCDX2[] = {cpus_STPCDX2};
|
||||
static const cpu_legacy_table_t *cputables_Pentium5V[] = {cpus_Pentium5V};
|
||||
static const cpu_legacy_table_t *cputables_PentiumS5_WinChip_K5[] = {cpus_PentiumS5, cpus_WinChip, cpus_K5};
|
||||
static const cpu_legacy_table_t *cputables_Pentium3V_WinChip_K5_6x863V[] = {cpus_Pentium3V, cpus_WinChip, cpus_K5, cpus_6x863V};
|
||||
static const cpu_legacy_table_t *cputables_Pentium3V_K5[] = {cpus_Pentium3V, cpus_K5};
|
||||
static const cpu_legacy_table_t *cputables_Pentium_WinChip_K56_6x86[] = {cpus_Pentium, cpus_WinChip, cpus_K56, cpus_6x86};
|
||||
static const cpu_legacy_table_t *cputables_Pentium_WinChip_SS7_K56_SS7_6x86SS7[] = {cpus_Pentium, cpus_WinChip_SS7, cpus_K56_SS7, cpus_6x86SS7};
|
||||
static const cpu_legacy_table_t *cputables_PentiumPro[] = {cpus_PentiumPro};
|
||||
static const cpu_legacy_table_t *cputables_PentiumII66[] = {cpus_PentiumII66};
|
||||
static const cpu_legacy_table_t *cputables_PentiumII_Celeron_Cyrix3[] = {cpus_PentiumII, cpus_Celeron, cpus_Cyrix3};
|
||||
static const cpu_legacy_table_t *cputables_Xeon[] = {cpus_Xeon};
|
||||
static const cpu_legacy_table_t *cputables_Celeron_Cyrix3[] = {cpus_Celeron, cpus_Cyrix3};
|
||||
static const cpu_legacy_table_t *cputables_Celeron[] = {cpus_Celeron};
|
||||
static const cpu_legacy_table_t *cputables_PentiumIID_Celeron[] = {cpus_PentiumIID, cpus_Celeron};
|
||||
static const cpu_legacy_table_t *cputables_8088[4] = {cpus_8088};
|
||||
static const cpu_legacy_table_t *cputables_pcjr[4] = {cpus_pcjr};
|
||||
static const cpu_legacy_table_t *cputables_europc[4] = {cpus_europc};
|
||||
static const cpu_legacy_table_t *cputables_pc1512[4] = {cpus_pc1512};
|
||||
static const cpu_legacy_table_t *cputables_8086[4] = {cpus_8086};
|
||||
static const cpu_legacy_table_t *cputables_286[4] = {cpus_286};
|
||||
static const cpu_legacy_table_t *cputables_ibmat[4] = {cpus_ibmat};
|
||||
static const cpu_legacy_table_t *cputables_ps1_m2011[4] = {cpus_ps1_m2011};
|
||||
static const cpu_legacy_table_t *cputables_ps2_m30_286_IBM486SLC[4] = {cpus_ps2_m30_286, cpus_IBM486SLC};
|
||||
static const cpu_legacy_table_t *cputables_ibmxt286[4] = {cpus_ibmxt286};
|
||||
static const cpu_legacy_table_t *cputables_i386SX_Am386SX_486SLC[4] = {cpus_i386SX, cpus_Am386SX, cpus_486SLC};
|
||||
static const cpu_legacy_table_t *cputables_ALiM6117[4] = {cpus_ALiM6117};
|
||||
static const cpu_legacy_table_t *cputables_i386SX_Am386SX_486SLC_IBM486SLC[4] = {cpus_i386SX, cpus_Am386SX, cpus_486SLC, cpus_IBM486SLC};
|
||||
static const cpu_legacy_table_t *cputables_i386DX_Am386DX_486DLC[4] = {cpus_i386DX, cpus_Am386DX, cpus_486DLC};
|
||||
static const cpu_legacy_table_t *cputables_i386DX_Am386DX_486DLC_IBM486BL[4] = {cpus_i386DX, cpus_Am386DX, cpus_486DLC, cpus_IBM486BL};
|
||||
static const cpu_legacy_table_t *cputables_i486_Am486_Cx486[4] = {cpus_i486, cpus_Am486, cpus_Cx486};
|
||||
static const cpu_legacy_table_t *cputables_i486S1_Am486S1_Cx486S1[4] = {cpus_i486S1, cpus_Am486S1, cpus_Cx486S1};
|
||||
static const cpu_legacy_table_t *cputables_IBM486SLC[4] = {cpus_IBM486SLC};
|
||||
static const cpu_legacy_table_t *cputables_i486_PC330[4] = {cpus_i486_PC330};
|
||||
static const cpu_legacy_table_t *cputables_STPCDX[4] = {cpus_STPCDX};
|
||||
static const cpu_legacy_table_t *cputables_STPCDX2[4] = {cpus_STPCDX2};
|
||||
static const cpu_legacy_table_t *cputables_Pentium5V[4] = {cpus_Pentium5V};
|
||||
static const cpu_legacy_table_t *cputables_PentiumS5_WinChip_K5[4] = {cpus_PentiumS5, cpus_WinChip, cpus_K5};
|
||||
static const cpu_legacy_table_t *cputables_Pentium3V_WinChip_K5_6x863V[4] = {cpus_Pentium3V, cpus_WinChip, cpus_K5, cpus_6x863V};
|
||||
static const cpu_legacy_table_t *cputables_Pentium3V_K5[4] = {cpus_Pentium3V, cpus_K5};
|
||||
static const cpu_legacy_table_t *cputables_Pentium_WinChip_K56_6x86[4] = {cpus_Pentium, cpus_WinChip, cpus_K56, cpus_6x86};
|
||||
static const cpu_legacy_table_t *cputables_Pentium_WinChip_SS7_K56_SS7_6x86SS7[4] = {cpus_Pentium, cpus_WinChip_SS7, cpus_K56_SS7, cpus_6x86SS7};
|
||||
static const cpu_legacy_table_t *cputables_PentiumPro[4] = {cpus_PentiumPro};
|
||||
static const cpu_legacy_table_t *cputables_PentiumII66[4] = {cpus_PentiumII66};
|
||||
static const cpu_legacy_table_t *cputables_PentiumII_Celeron_Cyrix3[4] = {cpus_PentiumII, cpus_Celeron, cpus_Cyrix3};
|
||||
static const cpu_legacy_table_t *cputables_Xeon[4] = {cpus_Xeon};
|
||||
static const cpu_legacy_table_t *cputables_Celeron_Cyrix3[4] = {cpus_Celeron, cpus_Cyrix3};
|
||||
static const cpu_legacy_table_t *cputables_Celeron[4] = {cpus_Celeron};
|
||||
static const cpu_legacy_table_t *cputables_PentiumIID_Celeron[4] = {cpus_PentiumIID, cpus_Celeron};
|
||||
|
||||
const cpu_legacy_machine_t cpu_legacy_table[] = {
|
||||
{"ibmpc", cputables_8088},
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -213,20 +213,6 @@ i2c_handler(int set, void *bus_handle, uint8_t base, int size,
|
||||
}
|
||||
|
||||
|
||||
uint8_t
|
||||
i2c_has_device(void *bus_handle, uint8_t addr)
|
||||
{
|
||||
i2c_bus_t *bus = (i2c_bus_t *) bus_handle;
|
||||
|
||||
if (!bus)
|
||||
return 0;
|
||||
|
||||
i2c_log("I2C: has_device(%s, %02X) = %d\n", bus->name, addr, !!bus->devices[addr]);
|
||||
|
||||
return(!!bus->devices[addr]);
|
||||
}
|
||||
|
||||
|
||||
uint8_t
|
||||
i2c_start(void *bus_handle, uint8_t addr, uint8_t read)
|
||||
{
|
||||
@@ -247,7 +233,7 @@ i2c_start(void *bus_handle, uint8_t addr, uint8_t read)
|
||||
}
|
||||
}
|
||||
|
||||
i2c_log("I2C: start(%s, %02X)\n", bus->name, addr);
|
||||
i2c_log("I2C %s: start(%02X) = %d\n", bus->name, addr, ret);
|
||||
|
||||
return(ret);
|
||||
}
|
||||
@@ -274,7 +260,7 @@ i2c_read(void *bus_handle, uint8_t addr)
|
||||
}
|
||||
}
|
||||
|
||||
i2c_log("I2C: read(%s, %02X) = %02X\n", bus->name, addr, ret);
|
||||
i2c_log("I2C %s: read(%02X) = %02X\n", bus->name, addr, ret);
|
||||
|
||||
return(ret);
|
||||
}
|
||||
@@ -300,7 +286,7 @@ i2c_write(void *bus_handle, uint8_t addr, uint8_t data)
|
||||
}
|
||||
}
|
||||
|
||||
i2c_log("I2C: write(%s, %02X, %02X) = %d\n", bus->name, addr, data, ret);
|
||||
i2c_log("I2C %s: write(%02X, %02X) = %d\n", bus->name, addr, data, ret);
|
||||
|
||||
return(ret);
|
||||
}
|
||||
@@ -325,5 +311,5 @@ i2c_stop(void *bus_handle, uint8_t addr)
|
||||
}
|
||||
}
|
||||
|
||||
i2c_log("I2C: stop(%s, %02X)\n", bus->name, addr);
|
||||
i2c_log("I2C %s: stop(%02X)\n", bus->name, addr);
|
||||
}
|
||||
|
||||
@@ -95,11 +95,15 @@ i2c_gpio_set(void *dev_handle, uint8_t scl, uint8_t sda)
|
||||
i2c_gpio_log(2, "I2C GPIO %s: Start condition\n", dev->bus_name);
|
||||
dev->started = 1;
|
||||
dev->pos = 0;
|
||||
dev->slave_addr = 0xff;
|
||||
dev->slave_read = 2; /* start with address transfer */
|
||||
dev->slave_sda = 1;
|
||||
} else if (!dev->prev_sda && sda) {
|
||||
i2c_gpio_log(2, "I2C GPIO %s: Stop condition\n", dev->bus_name);
|
||||
dev->started = 0;
|
||||
if (dev->slave_addr != 0xff)
|
||||
i2c_stop(dev->i2c, dev->slave_addr);
|
||||
dev->slave_addr = 0xff;
|
||||
dev->slave_sda = 1;
|
||||
}
|
||||
} else if (!dev->prev_scl && scl && dev->started) {
|
||||
@@ -125,7 +129,7 @@ i2c_gpio_set(void *dev_handle, uint8_t scl, uint8_t sda)
|
||||
dev->slave_read = dev->byte & 1;
|
||||
|
||||
/* slave ACKs? */
|
||||
dev->slave_sda = !(i2c_has_device(dev->i2c, dev->slave_addr) && i2c_start(dev->i2c, dev->slave_addr, dev->slave_read));
|
||||
dev->slave_sda = !i2c_start(dev->i2c, dev->slave_addr, dev->slave_read);
|
||||
i2c_gpio_log(2, "I2C GPIO %s: Slave %02X %s %sACK\n", dev->bus_name, dev->slave_addr, dev->slave_read ? "read" : "write", dev->slave_sda ? "N" : "");
|
||||
|
||||
if (!dev->slave_sda && dev->slave_read) /* read first byte on an ACKed read transfer */
|
||||
|
||||
@@ -131,7 +131,7 @@ smbus_piix4_write(uint16_t addr, uint8_t val, void *priv)
|
||||
smbus_piix4_log("SMBus PIIX4: addr=%02X read=%d protocol=%X cmd=%02X data0=%02X data1=%02X\n", smbus_addr, read, cmd, dev->cmd, dev->data0, dev->data1);
|
||||
|
||||
/* Raise DEV_ERR if no device is at this address, or if the device returned NAK when starting the transfer. */
|
||||
if (!i2c_has_device(i2c_smbus, smbus_addr) || !i2c_start(i2c_smbus, smbus_addr, read)) {
|
||||
if (!i2c_start(i2c_smbus, smbus_addr, read)) {
|
||||
dev->next_stat = 0x04;
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -68,11 +68,11 @@ typedef struct _gameport_ {
|
||||
} gameport_t;
|
||||
|
||||
|
||||
int joystick_type;
|
||||
int joystick_type = 0;
|
||||
|
||||
|
||||
static const joystick_if_t joystick_none = {
|
||||
"No joystick",
|
||||
"None",
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
@@ -85,17 +85,20 @@ static const joystick_if_t joystick_none = {
|
||||
};
|
||||
|
||||
|
||||
static const joystick_if_t *joystick_list[] = {
|
||||
&joystick_standard,
|
||||
&joystick_standard_4button,
|
||||
&joystick_standard_6button,
|
||||
&joystick_standard_8button,
|
||||
&joystick_4axis_4button,
|
||||
&joystick_ch_flightstick_pro,
|
||||
&joystick_sw_pad,
|
||||
&joystick_tm_fcs,
|
||||
&joystick_none,
|
||||
NULL
|
||||
static const struct {
|
||||
const char *internal_name;
|
||||
const joystick_if_t *joystick;
|
||||
} joysticks[] = {
|
||||
{ "none", &joystick_none },
|
||||
{ "standard_2button", &joystick_standard },
|
||||
{ "standard_4button", &joystick_standard_4button },
|
||||
{ "standard_6button", &joystick_standard_6button },
|
||||
{ "standard_8button", &joystick_standard_8button },
|
||||
{ "4axis_4button", &joystick_4axis_4button },
|
||||
{ "ch_flighstick_pro", &joystick_ch_flightstick_pro },
|
||||
{ "sidewinder_pad", &joystick_sw_pad },
|
||||
{ "thrustmaster_fcs", &joystick_tm_fcs },
|
||||
{ "", NULL }
|
||||
};
|
||||
static gameport_t *gameport_global = NULL;
|
||||
|
||||
@@ -103,58 +106,81 @@ static gameport_t *gameport_global = NULL;
|
||||
char *
|
||||
joystick_get_name(int js)
|
||||
{
|
||||
if (! joystick_list[js])
|
||||
if (! joysticks[js].joystick)
|
||||
return(NULL);
|
||||
return((char *)joystick_list[js]->name);
|
||||
return((char *)joysticks[js].joystick->name);
|
||||
}
|
||||
|
||||
|
||||
char *
|
||||
joystick_get_internal_name(int js)
|
||||
{
|
||||
return((char *) joysticks[js].internal_name);
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
joystick_get_from_internal_name(char *s)
|
||||
{
|
||||
int c = 0;
|
||||
|
||||
while (strlen((char *) joysticks[c].internal_name))
|
||||
{
|
||||
if (!strcmp((char *) joysticks[c].internal_name, s))
|
||||
return c;
|
||||
c++;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
joystick_get_max_joysticks(int js)
|
||||
{
|
||||
return(joystick_list[js]->max_joysticks);
|
||||
return(joysticks[js].joystick->max_joysticks);
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
joystick_get_axis_count(int js)
|
||||
{
|
||||
return(joystick_list[js]->axis_count);
|
||||
return(joysticks[js].joystick->axis_count);
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
joystick_get_button_count(int js)
|
||||
{
|
||||
return(joystick_list[js]->button_count);
|
||||
return(joysticks[js].joystick->button_count);
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
joystick_get_pov_count(int js)
|
||||
{
|
||||
return(joystick_list[js]->pov_count);
|
||||
return(joysticks[js].joystick->pov_count);
|
||||
}
|
||||
|
||||
|
||||
char *
|
||||
joystick_get_axis_name(int js, int id)
|
||||
{
|
||||
return((char *)joystick_list[js]->axis_names[id]);
|
||||
return((char *)joysticks[js].joystick->axis_names[id]);
|
||||
}
|
||||
|
||||
|
||||
char *
|
||||
joystick_get_button_name(int js, int id)
|
||||
{
|
||||
return((char *)joystick_list[js]->button_names[id]);
|
||||
return((char *)joysticks[js].joystick->button_names[id]);
|
||||
}
|
||||
|
||||
|
||||
char *
|
||||
joystick_get_pov_name(int js, int id)
|
||||
{
|
||||
return (char *)joystick_list[js]->pov_names[id];
|
||||
return (char *)joysticks[js].joystick->pov_names[id];
|
||||
}
|
||||
|
||||
|
||||
@@ -239,7 +265,7 @@ init_common(void)
|
||||
timer_add(&p->axis[2].timer, timer_over, &p->axis[2], 0);
|
||||
timer_add(&p->axis[3].timer, timer_over, &p->axis[3], 0);
|
||||
|
||||
p->joystick = joystick_list[joystick_type];
|
||||
p->joystick = joysticks[joystick_type].joystick;
|
||||
p->joystick_dat = p->joystick->init();
|
||||
|
||||
gameport_global = p;
|
||||
@@ -255,7 +281,7 @@ gameport_update_joystick_type(void)
|
||||
|
||||
if (p != NULL) {
|
||||
p->joystick->close(p->joystick_dat);
|
||||
p->joystick = joystick_list[joystick_type];
|
||||
p->joystick = joysticks[joystick_type].joystick;
|
||||
p->joystick_dat = p->joystick->init();
|
||||
}
|
||||
}
|
||||
@@ -266,7 +292,7 @@ gameport_init(const device_t *info)
|
||||
{
|
||||
gameport_t *p = NULL;
|
||||
|
||||
if (joystick_type == JOYSTICK_TYPE_NONE) {
|
||||
if (!joystick_type) {
|
||||
p = NULL;
|
||||
return(p);
|
||||
}
|
||||
@@ -285,7 +311,7 @@ gameport_201_init(const device_t *info)
|
||||
{
|
||||
gameport_t *p;
|
||||
|
||||
if (joystick_type == JOYSTICK_TYPE_NONE) {
|
||||
if (!joystick_type) {
|
||||
p = NULL;
|
||||
return(p);
|
||||
}
|
||||
|
||||
@@ -18,28 +18,51 @@
|
||||
# define EMU_CLOCK_H
|
||||
|
||||
/* clock_ics9xxx.c */
|
||||
extern const device_t ics9xxx_detect_device;
|
||||
extern const device_t ics9150_08_device;
|
||||
extern const device_t ics9248_39_device;
|
||||
extern const device_t ics9248_81_device;
|
||||
extern const device_t ics9248_98_device;
|
||||
extern const device_t ics9248_101_device;
|
||||
extern const device_t ics9250_08_device;
|
||||
extern const device_t ics9250_10_device;
|
||||
extern const device_t ics9250_13_device;
|
||||
extern const device_t ics9250_14_device;
|
||||
extern const device_t ics9250_16_device;
|
||||
extern const device_t ics9250_18_device;
|
||||
extern const device_t ics9250_19_device;
|
||||
extern const device_t ics9250_23_device;
|
||||
extern const device_t ics9250_25_device;
|
||||
extern const device_t ics9250_26_device;
|
||||
extern const device_t ics9250_27_device;
|
||||
extern const device_t ics9250_28_device;
|
||||
extern const device_t ics9250_29_device;
|
||||
extern const device_t ics9250_30_device;
|
||||
extern const device_t ics9250_32_device;
|
||||
extern const device_t ics9250_38_device;
|
||||
extern const device_t ics9250_50_device;
|
||||
enum {
|
||||
ICS9xxx_xx,
|
||||
ICS9150_08,
|
||||
#if 0
|
||||
ICS9248_39,
|
||||
ICS9248_81,
|
||||
ICS9248_95,
|
||||
ICS9248_98,
|
||||
ICS9248_101,
|
||||
ICS9248_103,
|
||||
ICS9248_107,
|
||||
ICS9248_112,
|
||||
ICS9248_138,
|
||||
ICS9248_141,
|
||||
ICS9248_143,
|
||||
ICS9248_151,
|
||||
ICS9248_192,
|
||||
#endif
|
||||
ICS9250_08,
|
||||
#if 0
|
||||
ICS9250_10,
|
||||
ICS9250_13,
|
||||
ICS9250_14,
|
||||
ICS9250_16,
|
||||
#endif
|
||||
ICS9250_18,
|
||||
#if 0
|
||||
ICS9250_19,
|
||||
ICS9250_23,
|
||||
ICS9250_25,
|
||||
ICS9250_26,
|
||||
ICS9250_27,
|
||||
ICS9250_28,
|
||||
ICS9250_29,
|
||||
ICS9250_30,
|
||||
ICS9250_32,
|
||||
ICS9250_38,
|
||||
ICS9250_50,
|
||||
#endif
|
||||
ICS9xxx_MAX
|
||||
};
|
||||
|
||||
|
||||
/* clock_ics9xxx.c */
|
||||
extern device_t *ics9xxx_get(uint8_t model);
|
||||
|
||||
|
||||
#endif /*EMU_CLOCK_H*/
|
||||
|
||||
@@ -48,7 +48,6 @@
|
||||
#define SLIDER 0x20000000
|
||||
|
||||
#define AXIS_NOT_PRESENT -99999
|
||||
#define JOYSTICK_TYPE_NONE 8
|
||||
|
||||
#define JOYSTICK_PRESENT(n) (joystick_state[n].plat_joystick_nr != 0)
|
||||
|
||||
@@ -140,6 +139,8 @@ extern void joystick_close(void);
|
||||
extern void joystick_process(void);
|
||||
|
||||
extern char *joystick_get_name(int js);
|
||||
extern char *joystick_get_internal_name(int js);
|
||||
extern int joystick_get_from_internal_name(char *s);
|
||||
extern int joystick_get_max_joysticks(int js);
|
||||
extern int joystick_get_axis_count(int js);
|
||||
extern int joystick_get_button_count(int js);
|
||||
|
||||
@@ -48,7 +48,6 @@ extern void i2c_handler(int set, void *bus_handle, uint8_t base, int size,
|
||||
void (*stop)(void *bus, uint8_t addr, void *priv),
|
||||
void *priv);
|
||||
|
||||
extern uint8_t i2c_has_device(void *bus_handle, uint8_t addr);
|
||||
extern uint8_t i2c_start(void *bus_handle, uint8_t addr, uint8_t read);
|
||||
extern uint8_t i2c_read(void *bus_handle, uint8_t addr);
|
||||
extern uint8_t i2c_write(void *bus_handle, uint8_t addr, uint8_t data);
|
||||
|
||||
@@ -124,7 +124,7 @@ typedef struct svga_t
|
||||
int override;
|
||||
void *p;
|
||||
|
||||
uint8_t crtc[128], gdcreg[64], attrregs[32], seqregs[64],
|
||||
uint8_t crtc[256], gdcreg[64], attrregs[32], seqregs[256],
|
||||
egapal[16],
|
||||
*vram, *changedvram;
|
||||
|
||||
|
||||
@@ -2507,7 +2507,7 @@ machine_amstrad_init(const machine_t *model, int type)
|
||||
mouse_set_poll(ms_poll, ams);
|
||||
}
|
||||
|
||||
if (joystick_type != JOYSTICK_TYPE_NONE)
|
||||
if (joystick_type)
|
||||
device_add(&gameport_device);
|
||||
}
|
||||
|
||||
|
||||
@@ -74,7 +74,7 @@ machine_at_common_init_ex(const machine_t *model, int type)
|
||||
else if (type == 0)
|
||||
device_add(&at_nvr_device);
|
||||
|
||||
if (joystick_type != JOYSTICK_TYPE_NONE)
|
||||
if (joystick_type)
|
||||
device_add(&gameport_device);
|
||||
}
|
||||
|
||||
|
||||
@@ -215,7 +215,7 @@ machine_at_p2bls_init(const machine_t *model)
|
||||
device_add(&piix4e_device);
|
||||
device_add(&keyboard_ps2_ami_pci_device);
|
||||
device_add(&w83977ef_device);
|
||||
device_add(&ics9150_08_device);
|
||||
device_add(ics9xxx_get(ICS9150_08));
|
||||
device_add(&sst_flash_39sf020_device);
|
||||
spd_register(SPD_TYPE_SDRAM, 0xF, 256);
|
||||
device_add(&w83781d_device); /* fans: Chassis, CPU, Power; temperatures: MB, unused, CPU */
|
||||
@@ -253,7 +253,7 @@ machine_at_p3bf_init(const machine_t *model)
|
||||
device_add(&piix4e_device);
|
||||
device_add(&keyboard_ps2_ami_pci_device);
|
||||
device_add(&w83977ef_device);
|
||||
device_add(&ics9250_08_device);
|
||||
device_add(ics9xxx_get(ICS9250_08));
|
||||
device_add(&sst_flash_39sf020_device);
|
||||
spd_register(SPD_TYPE_SDRAM, 0xF, 256);
|
||||
device_add(&as99127f_device); /* fans: Chassis, CPU, Power; temperatures: MB, JTPWR, CPU */
|
||||
@@ -577,7 +577,7 @@ machine_at_p3v4x_init(const machine_t *model)
|
||||
device_add(&via_vt82c596b_device);
|
||||
device_add(&w83977ef_device);
|
||||
device_add(&keyboard_ps2_ami_pci_device);
|
||||
device_add(&ics9250_18_device);
|
||||
device_add(ics9xxx_get(ICS9250_18));
|
||||
device_add(&sst_flash_39sf020_device);
|
||||
spd_register(SPD_TYPE_SDRAM, 0xF, 512);
|
||||
device_add(&as99127f_device); /* fans: Chassis, CPU, Power; temperatures: MB, JTPWR, CPU */
|
||||
|
||||
@@ -163,7 +163,7 @@ machine_at_cubx_init(const machine_t *model)
|
||||
device_add(&piix4e_device);
|
||||
device_add(&keyboard_ps2_ami_pci_device);
|
||||
device_add(&w83977ef_device);
|
||||
device_add(&ics9250_08_device);
|
||||
device_add(ics9xxx_get(ICS9250_08));
|
||||
device_add(&sst_flash_39sf020_device);
|
||||
spd_register(SPD_TYPE_SDRAM, 0xF, 256);
|
||||
device_add(&as99127f_device); /* fans: Chassis, CPU, Power; temperatures: MB, JTPWR, CPU */
|
||||
@@ -397,7 +397,7 @@ machine_at_cuv4xls_init(const machine_t *model)
|
||||
device_add(&via_vt82c686b_device);
|
||||
device_add(&via_vt82c686_sio_device);
|
||||
device_add(&keyboard_ps2_ami_pci_device);
|
||||
device_add(&ics9250_18_device);
|
||||
device_add(ics9xxx_get(ICS9250_18));
|
||||
device_add(&sst_flash_39sf020_device);
|
||||
spd_register(SPD_TYPE_SDRAM, 0xF, 512);
|
||||
device_add(&as99127f_device); /* fans: Chassis, CPU, Power; temperatures: MB, JTPWR, CPU */
|
||||
@@ -431,7 +431,7 @@ machine_at_6via90ap_init(const machine_t *model)
|
||||
device_add(&via_vt82c686b_device);
|
||||
device_add(&via_vt82c686_sio_device);
|
||||
device_add(&keyboard_ps2_ami_pci_device);
|
||||
device_add(&ics9250_18_device);
|
||||
device_add(ics9xxx_get(ICS9250_18));
|
||||
device_add(&sst_flash_39sf020_device);
|
||||
spd_register(SPD_TYPE_SDRAM, 0x7, 512);
|
||||
device_add(&via_vt82c686_hwm_device); /* fans: CPU1, CPU2; temperatures: CPU, System, unused */
|
||||
|
||||
@@ -615,7 +615,7 @@ europc_boot(const device_t *info)
|
||||
mouse_bus_set_irq(sys->mouse, 2);
|
||||
/* Configure the port for (Bus Mouse Compatible) Mouse. */
|
||||
b |= 0x01;
|
||||
} else if (joystick_type != JOYSTICK_TYPE_NONE)
|
||||
} else if (joystick_type)
|
||||
b |= 0x02; /* enable port as joysticks */
|
||||
sys->nvr.regs[MRTC_CONF_C] = b;
|
||||
|
||||
|
||||
@@ -517,7 +517,7 @@ ps1_common_init(const machine_t *model)
|
||||
device_add(&keyboard_ps2_ps1_device);
|
||||
|
||||
/* Audio uses ports 200h and 202-207h, so only initialize gameport on 201h. */
|
||||
if (joystick_type != JOYSTICK_TYPE_NONE)
|
||||
if (joystick_type)
|
||||
device_add(&gameport_201_device);
|
||||
}
|
||||
|
||||
|
||||
@@ -1535,7 +1535,7 @@ machine_tandy1k_init(const machine_t *model, int type)
|
||||
break;
|
||||
}
|
||||
|
||||
if (joystick_type != JOYSTICK_TYPE_NONE)
|
||||
if (joystick_type)
|
||||
device_add(&gameport_device);
|
||||
|
||||
eep_data_out = 0x0000;
|
||||
|
||||
@@ -29,7 +29,7 @@ machine_xt_common_init(const machine_t *model)
|
||||
device_add(&fdc_xt_device);
|
||||
|
||||
nmi_init();
|
||||
if (joystick_type != JOYSTICK_TYPE_NONE)
|
||||
if (joystick_type)
|
||||
device_add(&gameport_device);
|
||||
}
|
||||
|
||||
|
||||
@@ -56,7 +56,7 @@ machine_xt_compaq_deskpro_init(const machine_t *model)
|
||||
if (fdc_type == FDC_INTERNAL)
|
||||
device_add(&fdc_xt_device);
|
||||
nmi_init();
|
||||
if (joystick_type != JOYSTICK_TYPE_NONE)
|
||||
if (joystick_type)
|
||||
device_add(&gameport_device);
|
||||
|
||||
lpt1_remove();
|
||||
@@ -85,7 +85,7 @@ machine_xt_compaq_portable_init(const machine_t *model)
|
||||
if (fdc_type == FDC_INTERNAL)
|
||||
device_add(&fdc_xt_device);
|
||||
nmi_init();
|
||||
if (joystick_type != JOYSTICK_TYPE_NONE)
|
||||
if (joystick_type)
|
||||
device_add(&gameport_device);
|
||||
|
||||
lpt1_remove();
|
||||
|
||||
@@ -171,7 +171,7 @@ machine_xt_lxt3_init(const machine_t *model)
|
||||
device_add(&keyboard_xt_lxt3_device);
|
||||
device_add(&fdc_xt_device);
|
||||
nmi_init();
|
||||
if (joystick_type != JOYSTICK_TYPE_NONE)
|
||||
if (joystick_type)
|
||||
device_add(&gameport_device);
|
||||
|
||||
laserxt_init(1);
|
||||
|
||||
@@ -717,7 +717,7 @@ machine_xt_olim24_init(const machine_t *model)
|
||||
/* FIXME: make sure this is correct?? */
|
||||
device_add(&at_nvr_device);
|
||||
|
||||
if (joystick_type != JOYSTICK_TYPE_NONE)
|
||||
if (joystick_type)
|
||||
device_add(&gameport_device);
|
||||
|
||||
nmi_init();
|
||||
@@ -760,7 +760,7 @@ machine_xt_olim240_init(const machine_t *model)
|
||||
if (fdc_type == FDC_INTERNAL)
|
||||
device_add(&fdc_xt_device);
|
||||
|
||||
if (joystick_type != JOYSTICK_TYPE_NONE)
|
||||
if (joystick_type)
|
||||
device_add(&gameport_device);
|
||||
|
||||
nmi_init();
|
||||
@@ -833,7 +833,7 @@ machine_xt_olim15_init(const machine_t *model)
|
||||
if (fdc_type == FDC_INTERNAL)
|
||||
device_add(&fdc_xt_device);
|
||||
|
||||
if (joystick_type != JOYSTICK_TYPE_NONE)
|
||||
if (joystick_type)
|
||||
device_add(&gameport_device);
|
||||
|
||||
nmi_init();
|
||||
|
||||
@@ -177,7 +177,7 @@ machine_xt_xi8088_init(const machine_t *model)
|
||||
nmi_init();
|
||||
device_add(&ibmat_nvr_device);
|
||||
pic2_init();
|
||||
if (joystick_type != JOYSTICK_TYPE_NONE)
|
||||
if (joystick_type)
|
||||
device_add(&gameport_device);
|
||||
|
||||
return ret;
|
||||
|
||||
@@ -63,10 +63,12 @@ const machine_t machines[] = {
|
||||
{ "[8088] IBM XT (1986)", "ibmxt86", MACHINE_TYPE_8088, CPU_PKG_8088, 0, 0, 0, 0, 0, 0, 0, MACHINE_PC, 256, 640, 64, 0, machine_xt86_init, NULL },
|
||||
{ "[8088] American XT Computer", "americxt", MACHINE_TYPE_8088, CPU_PKG_8088, 0, 0, 0, 0, 0, 0, 0, MACHINE_PC, 64, 640, 64, 0, machine_xt_americxt_init, NULL },
|
||||
{ "[8088] AMI XT clone", "amixt", MACHINE_TYPE_8088, CPU_PKG_8088, 0, 0, 0, 0, 0, 0, 0, MACHINE_PC, 64, 640, 64, 0, machine_xt_amixt_init, NULL },
|
||||
{ "[8088] Compaq Portable", "portable", MACHINE_TYPE_8088, CPU_PKG_8088, 0, 0, 0, 0, 0, 0, 0, MACHINE_PC | MACHINE_VIDEO, 128, 640, 128, 0, machine_xt_compaq_portable_init, NULL },
|
||||
{ "[8088] Compaq Portable", "portable", MACHINE_TYPE_8088, CPU_PKG_8088, 0, 0, 0, 0, 0, 0, 0, MACHINE_PC, 128, 640, 128, 0, machine_xt_compaq_portable_init, NULL },
|
||||
{ "[8088] DTK XT clone", "dtk", MACHINE_TYPE_8088, CPU_PKG_8088, 0, 0, 0, 0, 0, 0, 0, MACHINE_PC, 64, 640, 64, 0, machine_xt_dtk_init, NULL },
|
||||
{ "[8088] Generic XT clone", "genxt", MACHINE_TYPE_8088, CPU_PKG_8088, 0, 0, 0, 0, 0, 0, 0, MACHINE_PC, 64, 640, 64, 0, machine_genxt_init, NULL },
|
||||
{ "[8088] Juko XT clone", "jukopc", MACHINE_TYPE_8088, CPU_PKG_8088, 0, 0, 0, 0, 0, 0, 0, MACHINE_PC, 64, 640, 64, 0, machine_xt_jukopc_init, NULL },
|
||||
{ "[8088] NCR PC4i", "ncr_pc4i", MACHINE_TYPE_8088, CPU_PKG_8088, 0, 0, 0, 0, 0, 0, 0, MACHINE_PC, 256, 640, 256, 0, machine_xt_ncrpc4i_init, NULL },
|
||||
{ "[8088] Olivetti M19", "olivetti_m19", MACHINE_TYPE_8088, CPU_PKG_8088, 0, 0, 0, 0, 0, 0, 0, MACHINE_PC | MACHINE_VIDEO_FIXED, 256, 640, 256, 0, machine_xt_olim19_init, NULL },
|
||||
{ "[8088] OpenXT", "open_xt", MACHINE_TYPE_8088, CPU_PKG_8088, 0, 0, 0, 0, 0, 0, 0, MACHINE_PC, 64, 640, 64, 0, machine_xt_open_xt_init, NULL },
|
||||
{ "[8088] Phoenix XT clone", "pxxt", MACHINE_TYPE_8088, CPU_PKG_8088, 0, 0, 0, 0, 0, 0, 0, MACHINE_PC, 64, 640, 64, 0, machine_xt_pxxt_init, NULL },
|
||||
{ "[8088] Schneider EuroPC", "europc", MACHINE_TYPE_8088, CPU_PKG_8088_EUROPC, 0, 0, 0, 0, 0, 0, 0, MACHINE_PC | MACHINE_XTA | MACHINE_MOUSE, 512, 640, 128, 15, machine_europc_init, NULL },
|
||||
@@ -79,23 +81,19 @@ const machine_t machines[] = {
|
||||
{ "[8088] Xi8088", "xi8088", MACHINE_TYPE_8088, CPU_PKG_8088, 0, 0, 0, 0, 0, 0, 0, MACHINE_AT | MACHINE_BUS_PS2, 64, 1024, 128, 127, machine_xt_xi8088_init, xi8088_get_device },
|
||||
{ "[8088] Zenith Data SupersPort", "zdsupers", MACHINE_TYPE_8088, CPU_PKG_8088, 0, 0, 0, 0, 0, 0, 0, MACHINE_PC, 128, 640, 128, 0, machine_xt_zenith_init, NULL },
|
||||
|
||||
{ "[8088] Olivetti M19", "olivetti_m19", MACHINE_TYPE_8088, CPU_PKG_8088, 0, 0, 0, 0, 0, 0, 0, MACHINE_PC | MACHINE_VIDEO_FIXED, 256, 640, 256, 0, machine_xt_olim19_init, NULL },
|
||||
{ "[8088] NCR PC4i", "ncr_pc4i", MACHINE_TYPE_8088, CPU_PKG_8088, 0, 0, 0, 0, 0, 0, 0, MACHINE_PC, 256, 640, 256, 0, machine_xt_ncrpc4i_init, NULL },
|
||||
|
||||
/* 8086 Machines */
|
||||
{ "[8086] Amstrad PC1512", "pc1512", MACHINE_TYPE_8086, CPU_PKG_8086, 0, 8000000, 8000000, 0, 0, 0, 0, MACHINE_PC | MACHINE_VIDEO_FIXED | MACHINE_MOUSE, 512, 640, 128, 63, machine_pc1512_init, pc1512_get_device },
|
||||
{ "[8086] Amstrad PC1640", "pc1640", MACHINE_TYPE_8086, CPU_PKG_8086, 0, 0, 0, 0, 0, 0, 0, MACHINE_PC | MACHINE_VIDEO | MACHINE_MOUSE, 640, 640, 0, 63, machine_pc1640_init, pc1640_get_device },
|
||||
{ "[8086] Amstrad PC2086", "pc2086", MACHINE_TYPE_8086, CPU_PKG_8086, 0, 0, 0, 0, 0, 0, 0, MACHINE_PC | MACHINE_VIDEO_FIXED | MACHINE_MOUSE, 640, 640, 0, 63, machine_pc2086_init, pc2086_get_device },
|
||||
{ "[8086] Amstrad PC3086", "pc3086", MACHINE_TYPE_8086, CPU_PKG_8086, 0, 0, 0, 0, 0, 0, 0, MACHINE_PC | MACHINE_VIDEO_FIXED | MACHINE_MOUSE, 640, 640, 0, 63, machine_pc3086_init, pc3086_get_device },
|
||||
{ "[8086] Amstrad PC1640", "pc1640", MACHINE_TYPE_8086, CPU_PKG_8086, 0, 0, 0, 0, 0, 0, 0, MACHINE_PC | MACHINE_VIDEO | MACHINE_MOUSE, 640, 640, 640, 63, machine_pc1640_init, pc1640_get_device },
|
||||
{ "[8086] Amstrad PC2086", "pc2086", MACHINE_TYPE_8086, CPU_PKG_8086, 0, 0, 0, 0, 0, 0, 0, MACHINE_PC | MACHINE_VIDEO_FIXED | MACHINE_MOUSE, 640, 640, 640, 63, machine_pc2086_init, pc2086_get_device },
|
||||
{ "[8086] Amstrad PC3086", "pc3086", MACHINE_TYPE_8086, CPU_PKG_8086, 0, 0, 0, 0, 0, 0, 0, MACHINE_PC | MACHINE_VIDEO_FIXED | MACHINE_MOUSE, 640, 640, 640, 63, machine_pc3086_init, pc3086_get_device },
|
||||
{ "[8086] Amstrad PC20(0)", "pc200", MACHINE_TYPE_8086, CPU_PKG_8086, 0, 0, 0, 0, 0, 0, 0, MACHINE_PC | MACHINE_VIDEO | MACHINE_MOUSE | MACHINE_NONMI, 512, 640, 128, 63, machine_pc200_init, pc200_get_device },
|
||||
{ "[8086] Amstrad PPC512/640", "ppc512", MACHINE_TYPE_8086, CPU_PKG_8086, 0, 0, 0, 0, 0, 0, 0, MACHINE_PC | MACHINE_VIDEO | MACHINE_MOUSE | MACHINE_NONMI, 512, 640, 128, 63, machine_ppc512_init, ppc512_get_device },
|
||||
{ "[8086] Compaq Deskpro", "deskpro", MACHINE_TYPE_8086, CPU_PKG_8086, 0, 0, 0, 0, 0, 0, 0, MACHINE_PC, 128, 640, 128, 0, machine_xt_compaq_deskpro_init, NULL },
|
||||
{ "[8086] Olivetti M21/24/24SP", "olivetti_m24", MACHINE_TYPE_8086, CPU_PKG_8086, 0, 0, 0, 0, 0, 0, 0, MACHINE_PC | MACHINE_VIDEO | MACHINE_MOUSE, 128, 640, 128, 0, machine_xt_olim24_init, m24_get_device },
|
||||
{ "[8086] Compaq Deskpro", "deskpro", MACHINE_TYPE_8086, CPU_PKG_8086, 0, 0, 0, 0, 0, 0, 0, MACHINE_PC, 128, 640, 128, 0, machine_xt_compaq_deskpro_init, NULL },
|
||||
{ "[8086] Olivetti M21/24/24SP", "olivetti_m24", MACHINE_TYPE_8086, CPU_PKG_8086, 0, 0, 0, 0, 0, 0, 0, MACHINE_PC | MACHINE_VIDEO | MACHINE_MOUSE, 128, 640, 128, 0, machine_xt_olim24_init, m24_get_device },
|
||||
{ "[8086] Olivetti M240", "olivetti_m240", MACHINE_TYPE_8086, CPU_PKG_8086, 0, 0, 0, 0, 0, 0, 0, MACHINE_PC, 128, 640, 128, 0, machine_xt_olim240_init, NULL },
|
||||
{ "[8086] Schetmash Iskra-3104", "iskra3104", MACHINE_TYPE_8086, CPU_PKG_8086, 0, 0, 0, 0, 0, 0, 0, MACHINE_PC, 128, 640, 128, 0, machine_xt_iskra3104_init, NULL },
|
||||
{ "[8086] Tandy 1000 SL/2", "tandy1000sl2", MACHINE_TYPE_8086, CPU_PKG_8086, 0, 0, 0, 0, 0, 0, 0, MACHINE_PC | MACHINE_VIDEO_FIXED, 512, 768, 128, 0, machine_tandy1000sl2_init, tandy1k_sl_get_device },
|
||||
{ "[8086] Toshiba T1200", "t1200", MACHINE_TYPE_8086, CPU_PKG_8086, 0, 0, 0, 0, 0, 0, 0, MACHINE_PC | MACHINE_VIDEO, 1024, 2048,1024, 63, machine_xt_t1200_init, t1200_get_device },
|
||||
|
||||
{ "[8086] Olivetti M240", "olivetti_m240", MACHINE_TYPE_8086, CPU_PKG_8086, 0, 0, 0, 0, 0, 0, 0, MACHINE_PC, 128, 640, 128, 0, machine_xt_olim240_init, NULL },
|
||||
|
||||
#if defined(DEV_BRANCH) && defined(USE_LASERXT)
|
||||
{ "[8086] VTech Laser XT3", "lxt3", MACHINE_TYPE_8086, CPU_PKG_8086, 0, 0, 0, 0, 0, 0, 0, MACHINE_PC, 256, 640, 256, 0, machine_xt_lxt3_init, NULL },
|
||||
@@ -243,7 +241,7 @@ const machine_t machines[] = {
|
||||
{ "[i430LX] Packard Bell PB520R", "pb520r", MACHINE_TYPE_SOCKET4, CPU_PKG_SOCKET4, 0, 60000000, 66666667, 0, 0, MACHINE_MULTIPLIER_FIXED, MACHINE_PCI | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL | MACHINE_VIDEO, 8192, 139264, 2048, 127, machine_at_pb520r_init, at_pb520r_get_device },
|
||||
|
||||
/* OPTi 596/597 */
|
||||
{ "[OPTi 597] AMI Excalibur VLB", "excalibur", MACHINE_TYPE_SOCKET4, CPU_PKG_SOCKET4, 0, 60000000, 66666667, 0, 0, 1.0, 1.0, MACHINE_VLB | MACHINE_IDE, 2048, 65536, 2048, 127, machine_at_excalibur_init, NULL },
|
||||
{ "[OPTi 597] AMI Excalibur VLB", "excalibur", MACHINE_TYPE_SOCKET4, CPU_PKG_SOCKET4, 0, 60000000, 66666667, 0, 0, MACHINE_MULTIPLIER_FIXED, MACHINE_VLB | MACHINE_IDE, 2048, 65536, 2048, 127, machine_at_excalibur_init, NULL },
|
||||
|
||||
/* Socket 5 machines */
|
||||
/* 430NX */
|
||||
@@ -276,7 +274,7 @@ const machine_t machines[] = {
|
||||
{ "[i430HX] Biostar MB-8500TUC", "8500tuc", MACHINE_TYPE_SOCKET7_3V, CPU_PKG_SOCKET5_7, 0, 50000000, 66666667, 3380, 3520, 1.5, 3.0, MACHINE_PCI | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL, 8192, 524288, 8192, 127, machine_at_8500tuc_init, NULL },
|
||||
{ "[i430HX] SuperMicro Super P55T2S", "p55t2s", MACHINE_TYPE_SOCKET7_3V, CPU_PKG_SOCKET5_7, 0, 50000000, 66666667, 3300, 3520, 1.5, 3.0, MACHINE_PCI | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL, 8192, 786432, 8192, 127, machine_at_p55t2s_init, NULL },
|
||||
|
||||
{ "[i430HX] Acer V35N", "acerv35n", MACHINE_TYPE_SOCKET7, CPU_PKG_SOCKET5_7, 0, 50000000, 66666667, 2800, 3520, 1.5, 3.0, MACHINE_PCI | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL, 8192, 196608, 8192, 127, machine_at_acerv35n_init, NULL },
|
||||
{ "[i430HX] Acer V35N", "acerv35n", MACHINE_TYPE_SOCKET7, CPU_PKG_SOCKET5_7, CPU_Cx6x86MX, 50000000, 66666667, 2800, 3520, 1.5, 3.0, MACHINE_PCI | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL, 8192, 196608, 8192, 127, machine_at_acerv35n_init, NULL },
|
||||
{ "[i430HX] ASUS P/I-P55T2P4", "p55t2p4", MACHINE_TYPE_SOCKET7, CPU_PKG_SOCKET5_7, 0, 50000000, 83333333, 2500, 3520, 1.5, 3.0, MACHINE_PCI | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL, 8192, 262144, 8192, 127, machine_at_p55t2p4_init, NULL },
|
||||
{ "[i430HX] Micronics M7S-Hi", "m7shi", MACHINE_TYPE_SOCKET7, CPU_PKG_SOCKET5_7, 0, 50000000, 66666667, 2800, 3520, 1.5, 3.0, MACHINE_PCI | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL, 8192, 131072, 8192, 511, machine_at_m7shi_init, NULL },
|
||||
{ "[i430HX] Intel TC430HX", "tc430hx", MACHINE_TYPE_SOCKET7, CPU_PKG_SOCKET5_7, 0, 50000000, 66666667, 2800, 3520, 1.5, 3.0, MACHINE_PCI | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL, 8192, 131072, 8192, 255, machine_at_tc430hx_init, NULL },
|
||||
|
||||
@@ -110,6 +110,17 @@ i2c_eeprom_write(void *bus, uint8_t addr, uint8_t data, void *priv)
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
i2c_eeprom_stop(void *bus, uint8_t addr, void *priv)
|
||||
{
|
||||
i2c_eeprom_t *dev = (i2c_eeprom_t *) priv;
|
||||
|
||||
i2c_eeprom_log("I2C EEPROM %s %02X: stop()\n", i2c_getbusname(dev->i2c), dev->addr);
|
||||
|
||||
dev->addr_pos = 0;
|
||||
}
|
||||
|
||||
|
||||
uint8_t
|
||||
log2i(uint32_t i)
|
||||
{
|
||||
@@ -142,7 +153,7 @@ i2c_eeprom_init(void *i2c, uint8_t addr, uint8_t *data, uint32_t size, uint8_t w
|
||||
dev->addr_len = (size >= 4096) ? 16 : 8; /* use 16-bit addresses on 24C32 and above */
|
||||
dev->addr_mask = size - 1;
|
||||
|
||||
i2c_sethandler(dev->i2c, dev->addr & ~(dev->addr_mask >> dev->addr_len), (dev->addr_mask >> dev->addr_len) + 1, i2c_eeprom_start, i2c_eeprom_read, i2c_eeprom_write, NULL, dev);
|
||||
i2c_sethandler(dev->i2c, dev->addr & ~(dev->addr_mask >> dev->addr_len), (dev->addr_mask >> dev->addr_len) + 1, i2c_eeprom_start, i2c_eeprom_read, i2c_eeprom_write, i2c_eeprom_stop, dev);
|
||||
|
||||
return dev;
|
||||
}
|
||||
@@ -155,7 +166,7 @@ i2c_eeprom_close(void *dev_handle)
|
||||
|
||||
i2c_eeprom_log("I2C EEPROM %s %02X: close()\n", i2c_getbusname(dev->i2c), dev->addr);
|
||||
|
||||
i2c_removehandler(dev->i2c, dev->addr & ~(dev->addr_mask >> dev->addr_len), (dev->addr_mask >> dev->addr_len) + 1, i2c_eeprom_start, i2c_eeprom_read, i2c_eeprom_write, NULL, dev);
|
||||
i2c_removehandler(dev->i2c, dev->addr & ~(dev->addr_mask >> dev->addr_len), (dev->addr_mask >> dev->addr_len) + 1, i2c_eeprom_start, i2c_eeprom_read, i2c_eeprom_write, i2c_eeprom_stop, dev);
|
||||
|
||||
free(dev);
|
||||
}
|
||||
|
||||
@@ -150,7 +150,7 @@ net_slirp_notify(void *opaque)
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
ssize_t
|
||||
net_slirp_send_packet(const void *qp, size_t pkt_len, void *opaque)
|
||||
{
|
||||
slirp_t *slirp = (slirp_t *) opaque;
|
||||
|
||||
2
src/pc.c
2
src/pc.c
@@ -809,7 +809,7 @@ pc_reset_hard_init(void)
|
||||
/* Reset and reconfigure the Network Card layer. */
|
||||
network_reset();
|
||||
|
||||
if (joystick_type != JOYSTICK_TYPE_NONE)
|
||||
if (joystick_type)
|
||||
gameport_update_joystick_type();
|
||||
|
||||
ui_sb_update_panes();
|
||||
|
||||
@@ -1741,7 +1741,6 @@ static void mach64_vblank_start(svga_t *svga)
|
||||
uint8_t mach64_ext_readb(uint32_t addr, void *p)
|
||||
{
|
||||
mach64_t *mach64 = (mach64_t *)p;
|
||||
uint8_t gpio_state;
|
||||
|
||||
uint8_t ret = 0xff;
|
||||
if (!(addr & 0x400))
|
||||
@@ -1878,18 +1877,11 @@ uint8_t mach64_ext_readb(uint32_t addr, void *p)
|
||||
case 0xc7:
|
||||
READ8(addr, mach64->dac_cntl);
|
||||
if (mach64->type == MACH64_VT2) {
|
||||
gpio_state = 6;
|
||||
|
||||
if ((ret & (1 << 4)) && !(ret & (1 << 1)))
|
||||
gpio_state &= ~(1 << 1);
|
||||
if (!(ret & (1 << 4)) && !i2c_gpio_get_sda(mach64->i2c))
|
||||
gpio_state &= ~(1 << 1);
|
||||
if ((ret & (1 << 5)) && !(ret & (1 << 2)))
|
||||
gpio_state &= ~(1 << 2);
|
||||
if (!(ret & (1 << 5)) && !i2c_gpio_get_scl(mach64->i2c))
|
||||
gpio_state &= ~(1 << 2);
|
||||
|
||||
ret = (ret & ~6) | gpio_state;
|
||||
ret &= 0xf9;
|
||||
if (i2c_gpio_get_scl(mach64->i2c))
|
||||
ret |= 0x04;
|
||||
if (i2c_gpio_get_sda(mach64->i2c))
|
||||
ret |= 0x02;
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -2190,7 +2182,6 @@ void mach64_ext_writeb(uint32_t addr, uint8_t val, void *p)
|
||||
{
|
||||
mach64_t *mach64 = (mach64_t *)p;
|
||||
svga_t *svga = &mach64->svga;
|
||||
int data, clk;
|
||||
|
||||
mach64_log("mach64_ext_writeb : addr %08X val %02X\n", addr, val);
|
||||
|
||||
@@ -2382,9 +2373,7 @@ void mach64_ext_writeb(uint32_t addr, uint8_t val, void *p)
|
||||
WRITE8(addr, mach64->dac_cntl, val);
|
||||
svga_set_ramdac_type(svga, (mach64->dac_cntl & 0x100) ? RAMDAC_8BIT : RAMDAC_6BIT);
|
||||
ati68860_set_ramdac_type(mach64->svga.ramdac, (mach64->dac_cntl & 0x100) ? RAMDAC_8BIT : RAMDAC_6BIT);
|
||||
data = (val & (1 << 4)) ? ((val & (1 << 1)) ? 1 : 0) : 1;
|
||||
clk = (val & (1 << 5)) ? ((val & (1 << 2)) ? 1 : 0) : 1;
|
||||
i2c_gpio_set(mach64->i2c, clk, data);
|
||||
i2c_gpio_set(mach64->i2c, !(mach64->dac_cntl & 0x20000000) || (mach64->dac_cntl & 0x04000000), !(mach64->dac_cntl & 0x10000000) || (mach64->dac_cntl & 0x02000000));
|
||||
break;
|
||||
|
||||
case 0xd0: case 0xd1: case 0xd2: case 0xd3:
|
||||
|
||||
@@ -91,6 +91,8 @@ video_cards[] = {
|
||||
{ "mda", &mda_device },
|
||||
{ "genius", &genius_device },
|
||||
{ "metheus928_isa", &s3_metheus_86c928_isa_device },
|
||||
{ "nga", &nga_device },
|
||||
{ "ogc", &ogc_device },
|
||||
{ "oti037c", &oti037c_device },
|
||||
{ "oti067", &oti067_device },
|
||||
{ "oti077", &oti077_device },
|
||||
@@ -177,8 +179,6 @@ video_cards[] = {
|
||||
{ "virge375_vbe20_vlb", &s3_virge_375_4_vlb_device },
|
||||
{ "tgui9400cxi_vlb", &tgui9400cxi_device },
|
||||
{ "tgui9440_vlb", &tgui9440_vlb_device },
|
||||
{ "ogc", &ogc_device },
|
||||
{ "nga", &nga_device },
|
||||
{ "", NULL }
|
||||
};
|
||||
|
||||
|
||||
@@ -294,7 +294,7 @@ BEGIN
|
||||
PUSHBUTTON "Cancel",IDCANCEL,57,24,50,14
|
||||
CONTROL "Gain",IDC_SLIDER_GAIN,"msctls_trackbar32",TBS_VERT |
|
||||
TBS_BOTH | TBS_AUTOTICKS | WS_TABSTOP,15,20,20,109
|
||||
CTEXT "Gain",IDT_1746,16,7,32,9,SS_CENTERIMAGE
|
||||
CTEXT "Gain",IDT_1746,10,7,32,9,SS_CENTERIMAGE
|
||||
END
|
||||
|
||||
DLG_NEW_FLOPPY DIALOG DISCARDABLE 0, 0, 226, 86
|
||||
@@ -302,12 +302,12 @@ STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "New Image"
|
||||
FONT 9, "Segoe UI"
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "OK",IDOK,74,65,50,14
|
||||
PUSHBUTTON "Cancel",IDCANCEL,129,65,50,14
|
||||
DEFPUSHBUTTON "OK",IDOK,104,65,50,14
|
||||
PUSHBUTTON "Cancel",IDCANCEL,162,65,50,14
|
||||
LTEXT "File name:",IDT_1749,7,6,44,12,SS_CENTERIMAGE
|
||||
LTEXT "Disk size:",IDT_1750,7,25,44,12,SS_CENTERIMAGE
|
||||
LTEXT "RPM mode:",IDT_1751,7,45,44,12,SS_CENTERIMAGE
|
||||
EDITTEXT IDC_EDIT_FILE_NAME,53,5,154,14,ES_AUTOHSCROLL | ES_READONLY
|
||||
EDITTEXT IDC_EDIT_FILE_NAME,53,5,150,14,ES_AUTOHSCROLL | ES_READONLY
|
||||
COMBOBOX IDC_COMBO_DISK_SIZE,53,25,166,14,CBS_DROPDOWNLIST |
|
||||
WS_VSCROLL | WS_TABSTOP
|
||||
COMBOBOX IDC_COMBO_RPM_MODE,53,45,166,14,CBS_DROPDOWNLIST |
|
||||
|
||||
@@ -33,9 +33,6 @@ ifeq ($(DEV_BUILD), y)
|
||||
ifndef DEV_BRANCH
|
||||
DEV_BRANCH := y
|
||||
endif
|
||||
ifndef 596B
|
||||
596B := y
|
||||
endif
|
||||
ifndef AMD_K5
|
||||
AMD_K5 := y
|
||||
endif
|
||||
@@ -96,12 +93,6 @@ ifeq ($(DEV_BUILD), y)
|
||||
ifndef XL24
|
||||
XL24 := y
|
||||
endif
|
||||
ifndef NO_SIO
|
||||
NO_SIO := y
|
||||
endif
|
||||
ifndef GUSMAX
|
||||
GUSMAX := y
|
||||
endif
|
||||
ifndef USE_VECT486VL
|
||||
USE_VECT486VL := y
|
||||
endif
|
||||
@@ -115,9 +106,6 @@ else
|
||||
ifndef DEV_BRANCH
|
||||
DEV_BRANCH := n
|
||||
endif
|
||||
ifndef 596B
|
||||
596B := n
|
||||
endif
|
||||
ifndef AMD_K5
|
||||
AMD_K5 := n
|
||||
endif
|
||||
@@ -178,12 +166,6 @@ else
|
||||
ifndef XL24
|
||||
XL24 := n
|
||||
endif
|
||||
ifndef NO_SIO
|
||||
NO_SIO := n
|
||||
endif
|
||||
ifndef GUSMAX
|
||||
GUSMAX := n
|
||||
endif
|
||||
ifndef USE_VECT486VL
|
||||
USE_VECT486VL := n
|
||||
endif
|
||||
@@ -513,6 +495,10 @@ ifeq ($(CYRIX_6X86), y)
|
||||
OPTS += -DUSE_CYRIX_6X86
|
||||
endif
|
||||
|
||||
ifeq ($(GUSMAX), y)
|
||||
OPTS += -DUSE_GUSMAX
|
||||
endif
|
||||
|
||||
ifeq ($(HEDAKA), y)
|
||||
OPTS += -DUSE_HEDAKA
|
||||
endif
|
||||
@@ -527,6 +513,10 @@ OPTS += -DUSE_MGA
|
||||
DEVBROBJ += vid_mga.o
|
||||
endif
|
||||
|
||||
ifeq ($(NO_SIO), y)
|
||||
OPTS += -DNO_SIO
|
||||
endif
|
||||
|
||||
ifeq ($(OPEN_AT), y)
|
||||
OPTS += -DUSE_OPEN_AT
|
||||
endif
|
||||
@@ -568,10 +558,6 @@ OPTS += -DUSE_M6117
|
||||
DEVBROBJ += ali6117.o
|
||||
endif
|
||||
|
||||
ifeq ($(596B), y)
|
||||
OPTS += -DUSE_596B
|
||||
endif
|
||||
|
||||
ifeq ($(VGAWONDER), y)
|
||||
OPTS += -DUSE_VGAWONDER
|
||||
endif
|
||||
@@ -580,14 +566,6 @@ ifeq ($(XL24), y)
|
||||
OPTS += -DUSE_XL24
|
||||
endif
|
||||
|
||||
ifeq ($(NO_SIO), y)
|
||||
OPTS += -DNO_SIO
|
||||
endif
|
||||
|
||||
ifeq ($(GUSMAX), y)
|
||||
OPTS += -DUSE_GUSMAX
|
||||
endif
|
||||
|
||||
ifeq ($(USE_VECT486VL), y)
|
||||
OPTS += -DUSE_VECT486VL
|
||||
endif
|
||||
|
||||
@@ -263,7 +263,7 @@ void joystick_process(void)
|
||||
{
|
||||
int c, d;
|
||||
|
||||
if (joystick_type == JOYSTICK_TYPE_NONE) return;
|
||||
if (!joystick_type) return;
|
||||
|
||||
for (c = 0; c < joysticks_present; c++)
|
||||
{
|
||||
|
||||
@@ -217,7 +217,7 @@ void joystick_process(void)
|
||||
{
|
||||
int c, d;
|
||||
|
||||
if (joystick_type == JOYSTICK_TYPE_NONE) return;
|
||||
if (!joystick_type) return;
|
||||
|
||||
joystick_poll();
|
||||
|
||||
|
||||
@@ -324,7 +324,7 @@ uint8_t joystickconfig_open(HWND hwnd, int joy_nr, int type)
|
||||
|
||||
*data++ = 0; /*no menu*/
|
||||
*data++ = 0; /*predefined dialog box class*/
|
||||
data += MultiByteToWideChar(CP_ACP, 0, "Device Configuration", -1, data, 50);
|
||||
data += MultiByteToWideChar(CP_ACP, 0, "Joystick Configuration", -1, data, 50);
|
||||
|
||||
*data++ = 9; /*Point*/
|
||||
data += MultiByteToWideChar(CP_ACP, 0, "Segoe UI", -1, data, 50);
|
||||
@@ -342,7 +342,7 @@ uint8_t joystickconfig_open(HWND hwnd, int joy_nr, int type)
|
||||
item->cx = 140;
|
||||
item->cy = 150;
|
||||
|
||||
item->style = WS_CHILD | WS_VISIBLE | CBS_DROPDOWN | WS_VSCROLL;
|
||||
item->style = WS_CHILD | WS_VISIBLE | CBS_DROPDOWNLIST | WS_VSCROLL;
|
||||
|
||||
data = (uint16_t *)(item + 1);
|
||||
*data++ = 0xFFFF;
|
||||
@@ -357,7 +357,7 @@ uint8_t joystickconfig_open(HWND hwnd, int joy_nr, int type)
|
||||
/*Static text*/
|
||||
item = (DLGITEMTEMPLATE *)data;
|
||||
item->x = 10;
|
||||
item->y = y;
|
||||
item->y = y + 2;
|
||||
item->id = id++;
|
||||
|
||||
item->cx = 60;
|
||||
@@ -369,7 +369,7 @@ uint8_t joystickconfig_open(HWND hwnd, int joy_nr, int type)
|
||||
*data++ = 0xFFFF;
|
||||
*data++ = 0x0082; /* static class */
|
||||
|
||||
data += MultiByteToWideChar(CP_ACP, 0, "Device :", -1, data, 256);
|
||||
data += MultiByteToWideChar(CP_ACP, 0, "Device", -1, data, 256);
|
||||
*data++ = 0; /* no creation data */
|
||||
|
||||
if (((uintptr_t)data) & 2)
|
||||
@@ -389,7 +389,7 @@ uint8_t joystickconfig_open(HWND hwnd, int joy_nr, int type)
|
||||
item->cx = 140;
|
||||
item->cy = 150;
|
||||
|
||||
item->style = WS_CHILD | WS_VISIBLE | CBS_DROPDOWN | WS_VSCROLL;
|
||||
item->style = WS_CHILD | WS_VISIBLE | CBS_DROPDOWNLIST | WS_VSCROLL;
|
||||
|
||||
data = (uint16_t *)(item + 1);
|
||||
*data++ = 0xFFFF;
|
||||
@@ -404,7 +404,7 @@ uint8_t joystickconfig_open(HWND hwnd, int joy_nr, int type)
|
||||
/*Static text*/
|
||||
item = (DLGITEMTEMPLATE *)data;
|
||||
item->x = 10;
|
||||
item->y = y;
|
||||
item->y = y + 2;
|
||||
item->id = id++;
|
||||
|
||||
item->cx = 60;
|
||||
@@ -436,7 +436,7 @@ uint8_t joystickconfig_open(HWND hwnd, int joy_nr, int type)
|
||||
item->cx = 140;
|
||||
item->cy = 150;
|
||||
|
||||
item->style = WS_CHILD | WS_VISIBLE | CBS_DROPDOWN | WS_VSCROLL;
|
||||
item->style = WS_CHILD | WS_VISIBLE | CBS_DROPDOWNLIST | WS_VSCROLL;
|
||||
|
||||
data = (uint16_t *)(item + 1);
|
||||
*data++ = 0xFFFF;
|
||||
@@ -451,7 +451,7 @@ uint8_t joystickconfig_open(HWND hwnd, int joy_nr, int type)
|
||||
/*Static text*/
|
||||
item = (DLGITEMTEMPLATE *)data;
|
||||
item->x = 10;
|
||||
item->y = y;
|
||||
item->y = y + 2;
|
||||
item->id = id++;
|
||||
|
||||
item->cx = 60;
|
||||
@@ -483,7 +483,7 @@ uint8_t joystickconfig_open(HWND hwnd, int joy_nr, int type)
|
||||
item->cx = 140;
|
||||
item->cy = 150;
|
||||
|
||||
item->style = WS_CHILD | WS_VISIBLE | CBS_DROPDOWN | WS_VSCROLL;
|
||||
item->style = WS_CHILD | WS_VISIBLE | CBS_DROPDOWNLIST | WS_VSCROLL;
|
||||
|
||||
data = (uint16_t *)(item + 1);
|
||||
*data++ = 0xFFFF;
|
||||
@@ -502,7 +502,7 @@ uint8_t joystickconfig_open(HWND hwnd, int joy_nr, int type)
|
||||
/*Static text*/
|
||||
item = (DLGITEMTEMPLATE *)data;
|
||||
item->x = 10;
|
||||
item->y = y;
|
||||
item->y = y + 2;
|
||||
item->id = id++;
|
||||
|
||||
item->cx = 60;
|
||||
@@ -526,8 +526,8 @@ uint8_t joystickconfig_open(HWND hwnd, int joy_nr, int type)
|
||||
dlg->cdit = (id - IDC_CONFIG_BASE) + 2;
|
||||
|
||||
item = (DLGITEMTEMPLATE *)data;
|
||||
item->x = 20;
|
||||
item->y = y;
|
||||
item->x = 100;
|
||||
item->y = y + 5;
|
||||
item->cx = 50;
|
||||
item->cy = 14;
|
||||
item->id = IDOK; /* OK button identifier */
|
||||
@@ -544,8 +544,8 @@ uint8_t joystickconfig_open(HWND hwnd, int joy_nr, int type)
|
||||
data++;
|
||||
|
||||
item = (DLGITEMTEMPLATE *)data;
|
||||
item->x = 80;
|
||||
item->y = y;
|
||||
item->x = 160;
|
||||
item->y = y + 5;
|
||||
item->cx = 50;
|
||||
item->cy = 14;
|
||||
item->id = IDCANCEL; /* Cancel button identifier */
|
||||
@@ -558,7 +558,7 @@ uint8_t joystickconfig_open(HWND hwnd, int joy_nr, int type)
|
||||
data += MultiByteToWideChar(CP_ACP, 0, "Cancel", -1, data, 50);
|
||||
*data++ = 0; /* no creation data */
|
||||
|
||||
dlg->cy = y + 20;
|
||||
dlg->cy = y + 25;
|
||||
|
||||
DialogBoxIndirect(hinstance, dlg, hwnd, joystickconfig_dlgproc);
|
||||
|
||||
|
||||
@@ -806,6 +806,9 @@ win_settings_machine_recalc_machine(HWND hdlg)
|
||||
SendMessage(h, WM_SETTEXT, 0, win_get_string(IDS_2086));
|
||||
}
|
||||
|
||||
settings_enable_window(hdlg, IDC_MEMSPIN, machines[temp_machine].min_ram != machines[temp_machine].max_ram);
|
||||
settings_enable_window(hdlg, IDC_MEMTEXT, machines[temp_machine].min_ram != machines[temp_machine].max_ram);
|
||||
|
||||
free(lptsTemp);
|
||||
}
|
||||
|
||||
@@ -5007,7 +5010,7 @@ win_settings_confirm(HWND hdlg)
|
||||
SendMessage(hwndChildDialog, WM_SAVESETTINGS, 0, 0);
|
||||
|
||||
if (win_settings_changed()) {
|
||||
if (confirm_save)
|
||||
if (confirm_save && !settings_only)
|
||||
i = settings_msgbox_ex(MBX_QUESTION_OK | MBX_WARNING | MBX_DONTASK, (wchar_t *) IDS_2121, (wchar_t *) IDS_2122, (wchar_t *) IDS_2123, NULL, NULL);
|
||||
else
|
||||
i = 0;
|
||||
|
||||
Reference in New Issue
Block a user