mirror of
https://github.com/86Box/86Box.git
synced 2026-02-22 09:35:32 -07:00
Merge remote-tracking branch 'origin/master' into feature/recompiler_improvements
This commit is contained in:
@@ -3,7 +3,7 @@ In order for everyone to enjoy their time contributing to 86Box or otherwise bei
|
||||
|
||||
## 1. No illegal activity or GitHub ToS violations
|
||||
- 1.1. Do not distribute malware for non-research purposes. Post samples in a clearly named encrypted archive.
|
||||
- 1.2. Posting old software is allowed if at least 10 years old and out of support.
|
||||
- 1.2. Disclosure of copyrighted materials is permitted only if they are demo/trial versions, shareware, freeware, or open-source software, or if they are disclosed by the copyright holder or on the copyright holder’s behalf. If such materials need to be disclosed for testing or bug-fixing purposes, any available private channels should be used. Developers undertake to remove any materials obtained for such purposes as soon as they are no longer needed.
|
||||
- 1.3. Do not post NSFW content (defined at the staff's discretion).
|
||||
- 1.4. Do not do anything forbidden by the law or the Discord or GitHub Terms of Service.
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
The 86Box project welcomes contributions from anyone, as long as some basic guidelines are followed.
|
||||
|
||||
## Emulated hardware
|
||||
In order to accept new emulated hardware, the following criteria must be met:
|
||||
In order to accept new emulated hardware or a request thereof, the following criteria must be met:
|
||||
|
||||
* A ROM must be available and be added to [our ROM repository](https://github.com/86Box/roms)
|
||||
* Documentation must be available or it must be feasible to reverse engineer with a reasonable amount of time and effort
|
||||
|
||||
@@ -1495,6 +1495,7 @@ pc_init_modules(void)
|
||||
fdd_audio_init();
|
||||
}
|
||||
|
||||
hdd_audio_load_profiles();
|
||||
hdd_audio_init();
|
||||
|
||||
sound_init();
|
||||
|
||||
@@ -692,14 +692,14 @@ read_toc_raw(const cdrom_t *dev, unsigned char *b, const unsigned char start_tra
|
||||
int num = 0;
|
||||
int len = 4;
|
||||
|
||||
/* Bytes 2 and 3 = Number of first and last sessions */
|
||||
read_toc_identify_sessions((raw_track_info_t *) rti, num, b);
|
||||
|
||||
cdrom_log(dev->log, "read_toc_raw(%016" PRIXPTR ", %016" PRIXPTR ", %02X)\n",
|
||||
(uintptr_t) dev, (uintptr_t) b, start_track);
|
||||
|
||||
dev->ops->get_raw_track_info(dev->local, &num, rti);
|
||||
|
||||
/* Bytes 2 and 3 = Number of first and last sessions */
|
||||
read_toc_identify_sessions((raw_track_info_t *) rti, num, b);
|
||||
|
||||
if (num != 0) for (int i = 0; i < num; i++)
|
||||
if (t[i].session >= start_track) {
|
||||
memcpy(&(b[len]), &(t[i]), 11);
|
||||
@@ -1654,6 +1654,9 @@ cdrom_audio_play(cdrom_t *dev, const uint32_t pos, const uint32_t len, const int
|
||||
dev->cd_end = len2;
|
||||
dev->cd_status = CD_STATUS_PLAYING;
|
||||
dev->cd_buflen = 0;
|
||||
|
||||
if (dev->cached_sector != dev->seek_pos)
|
||||
dev->cached_sector = -1;
|
||||
} else {
|
||||
cdrom_log(dev->log, "LBA %08X not on an audio track\n", pos);
|
||||
cdrom_stop(dev);
|
||||
|
||||
3508
src/cpu/808x.c
3508
src/cpu/808x.c
File diff suppressed because it is too large
Load Diff
@@ -3616,7 +3616,7 @@ const cpu_family_t cpu_families[] = {
|
||||
{
|
||||
.package = CPU_PKG_SOCKET4,
|
||||
.manufacturer = "Intel",
|
||||
.name = "Pentium",
|
||||
.name = "Pentium (P5)",
|
||||
.internal_name = "pentium_p5",
|
||||
.cpus = (const CPU[]) {
|
||||
{
|
||||
@@ -3736,7 +3736,7 @@ const cpu_family_t cpu_families[] = {
|
||||
{
|
||||
.package = CPU_PKG_SOCKET5_7,
|
||||
.manufacturer = "Intel",
|
||||
.name = "Pentium",
|
||||
.name = "Pentium (P54C)",
|
||||
.internal_name = "pentium_p54c",
|
||||
.cpus = (const CPU[]) {
|
||||
{
|
||||
|
||||
171
src/cpu/vx0.c
171
src/cpu/vx0.c
@@ -6,7 +6,7 @@
|
||||
*
|
||||
* This file is part of the 86Box distribution.
|
||||
*
|
||||
* 808x CPU emulation, mostly ported from reenigne's XTCE, which
|
||||
* Vx0 CPU emulation, mostly ported from reenigne's XTCE, which
|
||||
* is cycle-accurate.
|
||||
*
|
||||
* Authors: Andrew Jenner, <https://www.reenigne.org>
|
||||
@@ -224,20 +224,6 @@ const uint8_t opf_0f[256] = { 0, 0, 0, 0, 0, 0,
|
||||
|
||||
int nx = 0;
|
||||
|
||||
static uint32_t cpu_src = 0;
|
||||
static uint32_t cpu_dest = 0;
|
||||
|
||||
static uint32_t cpu_data = 0;
|
||||
|
||||
static int oldc;
|
||||
static int cpu_alu_op;
|
||||
static int completed = 1;
|
||||
static int in_rep = 0;
|
||||
static int repeating = 0;
|
||||
static int rep_c_flag = 0;
|
||||
static int clear_lock = 0;
|
||||
static int noint = 0;
|
||||
static int tempc_fpu = 0;
|
||||
static int started = 0;
|
||||
static int group_delay = 0;
|
||||
static int modrm_loaded = 0;
|
||||
@@ -246,13 +232,6 @@ static int in_hlt = 0;
|
||||
static int retem = 0;
|
||||
static int halted = 0;
|
||||
|
||||
static uint32_t * ovr_seg = NULL;
|
||||
|
||||
/* Pointer tables needed for segment overrides. */
|
||||
static uint32_t * opseg[4];
|
||||
|
||||
static x86seg * _opseg[4];
|
||||
|
||||
enum {
|
||||
MODRM_ADDR_BX_SI = 0x00,
|
||||
MODRM_ADDR_BX_DI,
|
||||
@@ -338,25 +317,25 @@ static uint8_t modrm_cycs_post[256] = { [MODRM_ADDR_BX_SI] = 0,
|
||||
[MODRM_ADDR_BX_DISP16] = 2,
|
||||
[0x88 ... 0xff] = 0 };
|
||||
|
||||
#ifdef ENABLE_808X_LOG
|
||||
#ifdef ENABLE_VX0_LOG
|
||||
#if 0
|
||||
void dumpregs(int);
|
||||
#endif
|
||||
int x808x_do_log = ENABLE_808X_LOG;
|
||||
int vx0_do_log = ENABLE_VX0_LOG;
|
||||
|
||||
static void
|
||||
x808x_log(const char *fmt, ...)
|
||||
vx0_log(const char *fmt, ...)
|
||||
{
|
||||
va_list ap;
|
||||
|
||||
if (x808x_do_log) {
|
||||
if (vx0_do_log) {
|
||||
va_start(ap, fmt);
|
||||
pclog_ex(fmt, ap);
|
||||
va_end(ap);
|
||||
}
|
||||
}
|
||||
#else
|
||||
# define x808x_log(fmt, ...)
|
||||
# define vx0_log(fmt, ...)
|
||||
#endif
|
||||
|
||||
static i8080 emulated_processor;
|
||||
@@ -489,6 +468,7 @@ void i8080_port_out(UNUSED(void* priv), uint8_t port, uint8_t val)
|
||||
void
|
||||
reset_vx0(int hard)
|
||||
{
|
||||
is_new_biu = 1;
|
||||
halted = 0;
|
||||
in_hlt = 0;
|
||||
in_0f = 0;
|
||||
@@ -604,7 +584,7 @@ geteal(void)
|
||||
uint32_t ret;
|
||||
|
||||
if (cpu_mod == 3) {
|
||||
fatal("808x register geteal()\n");
|
||||
fatal("Vx0 register geteal()\n");
|
||||
ret = 0xffffffff;
|
||||
} else
|
||||
ret = readmeml(easeg, cpu_state.eaaddr);
|
||||
@@ -619,7 +599,7 @@ geteaq(void)
|
||||
uint32_t ret;
|
||||
|
||||
if (cpu_mod == 3) {
|
||||
fatal("808x register geteaq()\n");
|
||||
fatal("Vx0 register geteaq()\n");
|
||||
ret = 0xffffffff;
|
||||
} else
|
||||
ret = readmemq(easeg, cpu_state.eaaddr);
|
||||
@@ -689,7 +669,7 @@ static void
|
||||
seteal(uint32_t val)
|
||||
{
|
||||
if (cpu_mod == 3) {
|
||||
fatal("808x register seteal()\n");
|
||||
fatal("Vx0 register seteal()\n");
|
||||
return;
|
||||
} else
|
||||
writememl(easeg, cpu_state.eaaddr, val);
|
||||
@@ -699,7 +679,7 @@ static void
|
||||
seteaq(uint64_t val)
|
||||
{
|
||||
if (cpu_mod == 3) {
|
||||
fatal("808x register seteaq()\n");
|
||||
fatal("Vx0 register seteaq()\n");
|
||||
return;
|
||||
} else
|
||||
writememq(easeg, cpu_state.eaaddr, val);
|
||||
@@ -1043,7 +1023,7 @@ intr_routine(uint16_t intr, int skip_first)
|
||||
|
||||
if (!(cpu_state.flags & MD_FLAG) && is_nec) {
|
||||
sync_from_i8080();
|
||||
x808x_log("CALLN/INT#/NMI#\n");
|
||||
vx0_log("CALLN/INT#/NMI#\n");
|
||||
}
|
||||
|
||||
if (!skip_first)
|
||||
@@ -1288,7 +1268,7 @@ sw_int(uint16_t intr)
|
||||
|
||||
if (!(cpu_state.flags & MD_FLAG) && is_nec) {
|
||||
sync_from_i8080();
|
||||
x808x_log("CALLN/INT#/NMI#\n");
|
||||
vx0_log("CALLN/INT#/NMI#\n");
|
||||
}
|
||||
|
||||
do_cycles_i(3);
|
||||
@@ -1364,7 +1344,7 @@ interrupt_brkem(uint16_t addr)
|
||||
push(&old_ip);
|
||||
|
||||
sync_to_i8080();
|
||||
x808x_log("BRKEM mode\n");
|
||||
vx0_log("BRKEM mode\n");
|
||||
}
|
||||
|
||||
void
|
||||
@@ -1387,7 +1367,7 @@ retem_i8080(void)
|
||||
|
||||
retem = 1;
|
||||
|
||||
x808x_log("RETEM mode\n");
|
||||
vx0_log("RETEM mode\n");
|
||||
}
|
||||
|
||||
void
|
||||
@@ -1408,7 +1388,7 @@ custom_nmi(void)
|
||||
|
||||
if (!(cpu_state.flags & MD_FLAG) && is_nec) {
|
||||
sync_from_i8080();
|
||||
x808x_log("CALLN/INT#/NMI#\n");
|
||||
vx0_log("CALLN/INT#/NMI#\n");
|
||||
}
|
||||
|
||||
do_cycle_i();
|
||||
@@ -1854,9 +1834,53 @@ do_mod_rm(void)
|
||||
}
|
||||
|
||||
static void
|
||||
decode(void)
|
||||
decode_modrm(void)
|
||||
{
|
||||
uint8_t op_f;
|
||||
|
||||
modrm_loaded = 0;
|
||||
|
||||
if (is_nec) {
|
||||
if (in_0f)
|
||||
op_f = (uint8_t) opf_0f[opcode];
|
||||
else
|
||||
op_f = (uint8_t) opf_nec[opcode];
|
||||
} else
|
||||
op_f = (uint8_t) opf[opcode];
|
||||
|
||||
if (op_f & OP_GRP) {
|
||||
do_mod_rm();
|
||||
modrm_loaded = 1;
|
||||
|
||||
op_f |= (OP_MRM | OP_EA);
|
||||
|
||||
if (opcode >= 0xf0) {
|
||||
op_f |= OP_DELAY;
|
||||
group_delay = 1;
|
||||
}
|
||||
}
|
||||
|
||||
if (!modrm_loaded && (op_f & OP_MRM)) {
|
||||
do_mod_rm();
|
||||
modrm_loaded = 1;
|
||||
}
|
||||
|
||||
if (modrm_loaded && !(op_f & OP_EA)) {
|
||||
if (is_nec)
|
||||
do_cycle();
|
||||
else {
|
||||
if (opcode == 0x8f) {
|
||||
if (cpu_mod == 3)
|
||||
do_cycles_i(2);
|
||||
} else
|
||||
do_cycles_i(2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
decode(void)
|
||||
{
|
||||
uint8_t prefix = 0;
|
||||
|
||||
if (halted)
|
||||
@@ -1864,8 +1888,6 @@ decode(void)
|
||||
else
|
||||
opcode = biu_pfq_fetchb_common();
|
||||
|
||||
modrm_loaded = 0;
|
||||
|
||||
while (1) {
|
||||
prefix = 0;
|
||||
|
||||
@@ -1913,43 +1935,6 @@ decode(void)
|
||||
|
||||
opcode = biu_pfq_fetchb_common();
|
||||
}
|
||||
|
||||
if (is_nec) {
|
||||
if (in_0f)
|
||||
op_f = (uint8_t) opf_0f[opcode];
|
||||
else
|
||||
op_f = (uint8_t) opf_nec[opcode];
|
||||
} else
|
||||
op_f = (uint8_t) opf[opcode];
|
||||
|
||||
if (op_f & OP_GRP) {
|
||||
do_mod_rm();
|
||||
modrm_loaded = 1;
|
||||
|
||||
op_f |= (OP_MRM | OP_EA);
|
||||
|
||||
if (opcode >= 0xf0) {
|
||||
op_f |= OP_DELAY;
|
||||
group_delay = 1;
|
||||
}
|
||||
}
|
||||
|
||||
if (!modrm_loaded && (op_f & OP_MRM)) {
|
||||
do_mod_rm();
|
||||
modrm_loaded = 1;
|
||||
}
|
||||
|
||||
if (modrm_loaded && !(op_f & OP_EA)) {
|
||||
if (is_nec)
|
||||
do_cycle();
|
||||
else {
|
||||
if (opcode == 0x8f) {
|
||||
if (cpu_mod == 3)
|
||||
do_cycles_i(2);
|
||||
} else
|
||||
do_cycles_i(2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -1992,6 +1977,10 @@ string_op(int bits)
|
||||
lods_di(bits);
|
||||
tmpa = cpu_data;
|
||||
lods(bits);
|
||||
/* Swap them or else the operation goes wrong. */
|
||||
uint32_t tmpa2 = tmpa;
|
||||
tmpa = cpu_data;
|
||||
cpu_data = tmpa2;
|
||||
} else {
|
||||
lods(bits);
|
||||
tmpa = cpu_data;
|
||||
@@ -4716,7 +4705,7 @@ execute_instruction(void)
|
||||
break;
|
||||
|
||||
default:
|
||||
x808x_log("Illegal opcode: %02X\n", opcode);
|
||||
vx0_log("Illegal opcode: %02X\n", opcode);
|
||||
biu_pfq_fetchb();
|
||||
do_cycles(8);
|
||||
break;
|
||||
@@ -4735,7 +4724,16 @@ execvx0(int cycs)
|
||||
startx86();
|
||||
}
|
||||
|
||||
#ifdef DEBUG_INSTRUCTIONS
|
||||
if (repeating) {
|
||||
if ((opcode >= MIN_INS) && (opcode <= MAX_INS) && (opcode != SKIP_INS)) {
|
||||
execx86_instruction();
|
||||
goto check_completed;
|
||||
}
|
||||
} else {
|
||||
#else
|
||||
if (!repeating) {
|
||||
#endif
|
||||
cpu_state.oldpc = cpu_state.pc;
|
||||
|
||||
if (clear_lock) {
|
||||
@@ -4743,16 +4741,31 @@ execvx0(int cycs)
|
||||
clear_lock = 0;
|
||||
}
|
||||
|
||||
if (!is_nec || (cpu_state.flags & MD_FLAG))
|
||||
if (!is_nec || (cpu_state.flags & MD_FLAG)) {
|
||||
decode();
|
||||
|
||||
#ifdef DEBUG_INSTRUCTIONS
|
||||
if ((opcode >= MIN_INS) && (opcode <= MAX_INS) && (opcode != SKIP_INS)) {
|
||||
oldc = cpu_state.flags & C_FLAG;
|
||||
|
||||
execx86_instruction();
|
||||
goto check_completed;
|
||||
}
|
||||
#endif
|
||||
|
||||
decode_modrm();
|
||||
}
|
||||
|
||||
oldc = cpu_state.flags & C_FLAG;
|
||||
}
|
||||
|
||||
x808x_log("[%04X:%04X] Opcode: %02X\n", CS, cpu_state.pc, opcode);
|
||||
vx0_log("[%04X:%04X] Opcode: %02X\n", CS, cpu_state.pc, opcode);
|
||||
|
||||
execute_instruction();
|
||||
|
||||
#ifdef DEBUG_INSTRUCTIONS
|
||||
check_completed:
|
||||
#endif
|
||||
if (completed) {
|
||||
if (opcode != 0xf4)
|
||||
finalize();
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
*
|
||||
* This file is part of the 86Box distribution.
|
||||
*
|
||||
* 808x BIU emulation.
|
||||
* Vx0 BIU emulation.
|
||||
*
|
||||
* Authors: Andrew Jenner, <https://www.reenigne.org>
|
||||
* Miran Grca, <mgrca8@gmail.com>
|
||||
@@ -86,22 +86,22 @@ static int dma_wait_states = 0;
|
||||
/* DEBUG stuff. */
|
||||
const char *lpBiuStates[7] = { "Ti ", "Ti S ", "Ti D ", "Ti R ", "Tw ", "T%i PF", "T%i EU" };
|
||||
|
||||
#ifdef ENABLE_808X_BIU_LOG
|
||||
int x808x_biu_do_log = ENABLE_808X_BIU_LOG;
|
||||
#ifdef ENABLE_VX0_BIU_LOG
|
||||
int vx0_biu_do_log = ENABLE_VX0_BIU_LOG;
|
||||
|
||||
static void
|
||||
x808x_biu_log(const char *fmt, ...)
|
||||
vx0_biu_log(const char *fmt, ...)
|
||||
{
|
||||
va_list ap;
|
||||
|
||||
if (x808x_biu_do_log) {
|
||||
if (vx0_biu_do_log) {
|
||||
va_start(ap, fmt);
|
||||
pclog_ex(fmt, ap);
|
||||
va_end(ap);
|
||||
}
|
||||
}
|
||||
#else
|
||||
# define x808x_biu_log(fmt, ...)
|
||||
# define vx0_biu_log(fmt, ...)
|
||||
#endif
|
||||
|
||||
void
|
||||
@@ -301,7 +301,7 @@ bus_do_io(int io_type)
|
||||
{
|
||||
int old_cycles = cycles;
|
||||
|
||||
x808x_biu_log("(%02X) bus_do_io(%02X): %04X\n", opcode, io_type, cpu_state.eaaddr);
|
||||
vx0_biu_log("(%02X) bus_do_io(%02X): %04X\n", opcode, io_type, cpu_state.eaaddr);
|
||||
|
||||
if (io_type & BUS_OUT) {
|
||||
if (io_type & BUS_WIDE)
|
||||
@@ -388,18 +388,18 @@ biu_print_cycle(void)
|
||||
if ((CS == DEBUG_SEG) && (cpu_state.pc >= DEBUG_OFF_L) && (cpu_state.pc <= DEBUG_OFF_H)) {
|
||||
if (biu_state >= BIU_STATE_PF) {
|
||||
if (biu_wait) {
|
||||
x808x_biu_log("[%04X:%04X] [%i, %i] (%i) %s (%i)\n", CS, cpu_state.pc, dma_state, dma_wait_states,
|
||||
pfq_pos, lpBiuStates[BIU_STATE_WAIT], wait_states);
|
||||
vx0_biu_log("[%04X:%04X] [%i, %i] (%i) %s (%i)\n", CS, cpu_state.pc, dma_state, dma_wait_states,
|
||||
pfq_pos, lpBiuStates[BIU_STATE_WAIT], wait_states);
|
||||
} else {
|
||||
char temp[16] = { 0 };
|
||||
|
||||
sprintf(temp, lpBiuStates[biu_state], biu_cycles + 1);
|
||||
x808x_biu_log("[%04X:%04X] [%i, %i] (%i) %s\n", CS, cpu_state.pc, dma_state, dma_wait_states,
|
||||
pfq_pos, temp);
|
||||
vx0_biu_log("[%04X:%04X] [%i, %i] (%i) %s\n", CS, cpu_state.pc, dma_state, dma_wait_states,
|
||||
pfq_pos, temp);
|
||||
}
|
||||
} else {
|
||||
x808x_biu_log("[%04X:%04X] [%i, %i] (%i) %s\n", CS, cpu_state.pc, dma_state, dma_wait_states,
|
||||
pfq_pos, lpBiuStates[biu_state]);
|
||||
vx0_biu_log("[%04X:%04X] [%i, %i] (%i) %s\n", CS, cpu_state.pc, dma_state, dma_wait_states,
|
||||
pfq_pos, lpBiuStates[biu_state]);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -456,8 +456,8 @@ static void
|
||||
biu_cycle_idle(int type)
|
||||
{
|
||||
if ((CS == DEBUG_SEG) && (cpu_state.pc >= DEBUG_OFF_L) && (cpu_state.pc <= DEBUG_OFF_H)) {
|
||||
x808x_biu_log("[%04X:%04X] [%i, %i] (%i) %s\n", CS, cpu_state.pc, dma_state, dma_wait_states,
|
||||
pfq_pos, lpBiuStates[type]);
|
||||
vx0_biu_log("[%04X:%04X] [%i, %i] (%i) %s\n", CS, cpu_state.pc, dma_state, dma_wait_states,
|
||||
pfq_pos, lpBiuStates[type]);
|
||||
}
|
||||
|
||||
run_dma_cycle();
|
||||
@@ -493,7 +493,7 @@ do_bus_access(void)
|
||||
{
|
||||
int io_type = (biu_state == BIU_STATE_EU) ? bus_request_type : BUS_CODE;
|
||||
|
||||
x808x_biu_log("[%04X:%04X] %02X bus access %02X\n", CS, cpu_state.pc, opcode, io_type);
|
||||
vx0_biu_log("[%04X:%04X] %02X bus access %02X\n", CS, cpu_state.pc, opcode, io_type);
|
||||
|
||||
if (io_type != 0) {
|
||||
wait_states = 0;
|
||||
@@ -707,7 +707,7 @@ biu_eu_request(void)
|
||||
void
|
||||
wait_vx0(int c)
|
||||
{
|
||||
x808x_biu_log("[%04X:%04X] %02X %i cycles\n", CS, cpu_state.pc, opcode, c);
|
||||
vx0_biu_log("[%04X:%04X] %02X %i cycles\n", CS, cpu_state.pc, opcode, c);
|
||||
|
||||
for (uint8_t i = 0; i < c; i++)
|
||||
biu_cycle();
|
||||
|
||||
@@ -76,7 +76,8 @@ enum {
|
||||
DMA_STATE_OPERATING
|
||||
};
|
||||
|
||||
/* Temporary BIU externs - move to 808x_biu.h. */
|
||||
extern void execx86_instruction(void);
|
||||
|
||||
extern void biu_resume_on_queue_read(void);
|
||||
extern void wait_vx0(int c);
|
||||
extern void biu_reset(void);
|
||||
@@ -106,6 +107,16 @@ extern void biu_wait_for_read_finish(void);
|
||||
extern uint8_t biu_preload_byte;
|
||||
|
||||
extern int nx;
|
||||
extern int oldc;
|
||||
extern int cpu_alu_op;
|
||||
extern int completed;
|
||||
extern int in_rep;
|
||||
extern int repeating;
|
||||
extern int rep_c_flag;
|
||||
extern int noint;
|
||||
extern int tempc_fpu;
|
||||
extern int clear_lock;
|
||||
extern int is_new_biu;
|
||||
|
||||
extern int schedule_fetch;
|
||||
extern int in_lock;
|
||||
@@ -113,4 +124,15 @@ extern int bus_request_type;
|
||||
extern int pic_data;
|
||||
extern int biu_queue_preload;
|
||||
|
||||
extern uint32_t cpu_src;
|
||||
extern uint32_t cpu_dest;
|
||||
|
||||
extern uint32_t cpu_data;
|
||||
|
||||
extern uint32_t *ovr_seg;
|
||||
|
||||
/* Pointer tables needed for segment overrides. */
|
||||
extern uint32_t * opseg[4];
|
||||
extern x86seg * _opseg[4];
|
||||
|
||||
#endif /*EMU_808X_BIU_H*/
|
||||
|
||||
@@ -143,8 +143,24 @@ sermouse_transmit_byte(mouse_t *dev, int do_next)
|
||||
if (dev->buf_pos == 0)
|
||||
dev->acc_time = 0.0;
|
||||
|
||||
if (dev->serial)
|
||||
if (dev->serial) {
|
||||
if ((dev->state == STATE_TRANSMIT_REPORT) && (dev->format == FORMAT_PB_5BYTE) &&
|
||||
(dev->buf_pos == 3)) {
|
||||
/*
|
||||
The last two bytes are the delta between now and when we originally
|
||||
prepared the report for sending.
|
||||
*/
|
||||
int delta_x = 0;
|
||||
int delta_y = 0;
|
||||
|
||||
mouse_subtract_coords(&delta_x, &delta_y, NULL, NULL, -128, 127, 1, 0);
|
||||
|
||||
dev->buf[3] = delta_x; /* same as byte 1 */
|
||||
dev->buf[4] = delta_y; /* same as byte 2 */
|
||||
}
|
||||
|
||||
serial_write_fifo(dev->serial, dev->buf[dev->buf_pos]);
|
||||
}
|
||||
|
||||
if (do_next) {
|
||||
/* If we have a buffer length of 0, pretend the state is STATE_SKIP_PACKET. */
|
||||
|
||||
@@ -1210,6 +1210,9 @@ extern int machine_at_ma30d_init(const machine_t *);
|
||||
/* i440EX */
|
||||
extern int machine_at_brio83xx_init(const machine_t *);
|
||||
extern int machine_at_p6i440e2_init(const machine_t *);
|
||||
#ifdef EMU_DEVICE_H
|
||||
extern const device_t como_device;
|
||||
#endif
|
||||
extern int machine_at_como_init(const machine_t *);
|
||||
|
||||
/* i440BX */
|
||||
|
||||
@@ -47,4 +47,8 @@
|
||||
#define A4_PAGE_WIDTH 8.25
|
||||
#define A4_PAGE_HEIGHT 11.75
|
||||
|
||||
/* Standard B4 */
|
||||
#define B4_PAGE_WIDTH 9.875
|
||||
#define B4_PAGE_HEIGHT 13.875
|
||||
|
||||
#endif /*EMU_PLAT_FALLTHROUGH_H*/
|
||||
|
||||
@@ -544,17 +544,72 @@ machine_at_brio83xx_init(const machine_t *model)
|
||||
return ret;
|
||||
}
|
||||
|
||||
static const device_config_t como_config[] = {
|
||||
// clang-format off
|
||||
{
|
||||
.name = "bios",
|
||||
.description = "BIOS Version",
|
||||
.type = CONFIG_BIOS,
|
||||
.default_string = "como",
|
||||
.default_int = 0,
|
||||
.file_filter = NULL,
|
||||
.spinner = { 0 },
|
||||
.selection = { { 0 } },
|
||||
.bios = {
|
||||
{
|
||||
.name = "AMIBIOS 6 (071595) - Revision 1.08 (Olivetti OEM)",
|
||||
.internal_name = "como_olivetti",
|
||||
.bios_type = BIOS_NORMAL,
|
||||
.files_no = 1,
|
||||
.local = 0,
|
||||
.size = 262144,
|
||||
.files = { "roms/machines/como/COMO_Olivetti_OEM.ROM", "" }
|
||||
},
|
||||
{
|
||||
.name = "AMIBIOS 6 (071595) - Revision 1.12 (eMachines OEM)",
|
||||
.internal_name = "como",
|
||||
.bios_type = BIOS_NORMAL,
|
||||
.files_no = 1,
|
||||
.local = 0,
|
||||
.size = 262144,
|
||||
.files = { "roms/machines/como/COMO.ROM", "" }
|
||||
},
|
||||
{ .files_no = 0 }
|
||||
}
|
||||
},
|
||||
{ .name = "", .description = "", .type = CONFIG_END }
|
||||
// clang-format on
|
||||
};
|
||||
|
||||
const device_t como_device = {
|
||||
.name = "TriGem Como",
|
||||
.internal_name = "como_device",
|
||||
.flags = 0,
|
||||
.local = 0,
|
||||
.init = NULL,
|
||||
.close = NULL,
|
||||
.reset = NULL,
|
||||
.available = NULL,
|
||||
.speed_changed = NULL,
|
||||
.force_redraw = NULL,
|
||||
.config = como_config
|
||||
};
|
||||
|
||||
int
|
||||
machine_at_como_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
int ret = 0;
|
||||
const char *fn;
|
||||
|
||||
ret = bios_load_linear("roms/machines/como/COMO.ROM",
|
||||
0x000c0000, 262144, 0);
|
||||
|
||||
if (bios_only || !ret)
|
||||
/* No ROMs available */
|
||||
if (!device_available(model->device))
|
||||
return ret;
|
||||
|
||||
device_context(model->device);
|
||||
fn = device_get_bios_file(machine_get_device(machine), device_get_config_bios("bios"), 0);
|
||||
ret = bios_load_linear(fn, 0x000c0000, 262144, 0);
|
||||
device_context_restore();
|
||||
|
||||
machine_at_common_init_ex(model, 2);
|
||||
|
||||
pci_init(PCI_CONFIG_TYPE_1);
|
||||
|
||||
@@ -18511,10 +18511,11 @@ const machine_t machines[] = {
|
||||
.block = CPU_BLOCK(CPU_CYRIX3S),
|
||||
.min_bus = 66666667,
|
||||
.max_bus = 83333333,
|
||||
.min_voltage = 2050,
|
||||
.max_voltage = 3100,
|
||||
.min_multi = 3.5,
|
||||
.max_multi = 5.0
|
||||
/* TODO: to find the actual voltage and multiplier bus speeds. */
|
||||
.min_voltage = 1800,
|
||||
.max_voltage = 3500,
|
||||
.min_multi = 1.5,
|
||||
.max_multi = 8.0
|
||||
},
|
||||
.bus_flags = MACHINE_PS2_PCI | MACHINE_BUS_USB,
|
||||
.flags = MACHINE_IDE_DUAL | MACHINE_SOUND | MACHINE_APM | MACHINE_ACPI | MACHINE_USB,
|
||||
@@ -18531,11 +18532,11 @@ const machine_t machines[] = {
|
||||
.kbc_p1 = 0x00000cf0,
|
||||
.gpio = 0xffffffff,
|
||||
.gpio_acpi = 0xffffffff,
|
||||
.device = NULL,
|
||||
.device = &como_device,
|
||||
.kbd_device = NULL,
|
||||
.fdc_device = NULL,
|
||||
.sio_device = NULL,
|
||||
.vid_device = NULL,
|
||||
.vid_device = NULL, /* Onboard video not yet emulated: ATi Rage IIc AGP */
|
||||
.snd_device = &cs4235_onboard_device,
|
||||
.net_device = NULL
|
||||
},
|
||||
|
||||
@@ -886,7 +886,6 @@ static void
|
||||
tulip_reset(void *priv)
|
||||
{
|
||||
TULIPState *s = (TULIPState *) priv;
|
||||
const uint16_t *eeprom_data = nmc93cxx_eeprom_data(s->eeprom);
|
||||
s->csr[0] = 0xfe000000;
|
||||
s->csr[1] = 0xffffffff;
|
||||
s->csr[2] = 0xffffffff;
|
||||
@@ -901,6 +900,8 @@ tulip_reset(void *priv)
|
||||
s->csr[14] = 0xffffffff;
|
||||
s->csr[15] = 0x8ff00000;
|
||||
if (s->device_info->local != 3) {
|
||||
const uint16_t *eeprom_data = nmc93cxx_eeprom_data(s->eeprom);
|
||||
|
||||
s->subsys_id = eeprom_data[1];
|
||||
s->subsys_ven_id = eeprom_data[0];
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Binary file not shown.
|
Before Width: | Height: | Size: 9.4 KiB After Width: | Height: | Size: 9.4 KiB |
@@ -55,10 +55,10 @@ msgid "&Resizeable window"
|
||||
msgstr "G&rößenverstellbares Fenster"
|
||||
|
||||
msgid "R&emember size && position"
|
||||
msgstr "Größe && &Position merken"
|
||||
msgstr "Größe und &Position merken"
|
||||
|
||||
msgid "Remember size && position"
|
||||
msgstr "Größe && Position merken"
|
||||
msgstr "Größe und Position merken"
|
||||
|
||||
msgid "Re&nderer"
|
||||
msgstr "Re&nderer"
|
||||
@@ -742,10 +742,10 @@ msgid "Video card \"%hs\" is not available due to missing ROMs in the roms/video
|
||||
msgstr "Die Videokarte \"%hs\" ist aufgrund von fehlenden ROMs im Verzeichnis roms/video nicht verfügbar. Es wird auf eine verfügbare Videokarte gewechselt."
|
||||
|
||||
msgid "Video card #2 \"%hs\" is not available due to missing ROMs in the roms/video directory. Disabling the second video card."
|
||||
msgstr "Das Gerät \"%hs\" ist aufgrund von fehlenden ROMs nicht verfügbar. Es wird ignoriert."
|
||||
msgstr "Die Videokarte 2 \"%hs\" ist aufgrund von fehlenden ROMs im Verzeichnis roms/video nicht verfügbar. Es wird deaktiviert."
|
||||
|
||||
msgid "Device \"%hs\" is not available due to missing ROMs. Ignoring the device."
|
||||
msgstr "Die Videokarte 2 \"%hs\" ist aufgrund von fehlenden ROMs im Verzeichnis roms/video nicht verfügbar. Es wird deaktiviert."
|
||||
msgstr "Das Gerät \"%hs\" ist aufgrund von fehlenden ROMs nicht verfügbar. Es wird ignoriert."
|
||||
|
||||
msgid "Machine"
|
||||
msgstr "System"
|
||||
@@ -2848,10 +2848,10 @@ msgid "Hostname:"
|
||||
msgstr "Hostname:"
|
||||
|
||||
msgid "ISA RAM:"
|
||||
msgstr ""
|
||||
msgstr "ISA RAM:"
|
||||
|
||||
msgid "ISA ROM:"
|
||||
msgstr ""
|
||||
msgstr "ISA ROM:"
|
||||
|
||||
msgid "&Wipe NVRAM"
|
||||
msgstr "NVRAM leeren"
|
||||
@@ -2869,7 +2869,7 @@ msgid "An error occurred trying to wipe the NVRAM contents of the virtual machin
|
||||
msgstr "Beim Leeren des NVRAMs der virtuellen Maschine ist ein Fehler aufgetreten \"%1\""
|
||||
|
||||
msgid "%1 VM Manager"
|
||||
msgstr ""
|
||||
msgstr "%1 VM Manager"
|
||||
|
||||
msgid "%n disk(s)"
|
||||
msgstr "%n Festplatte(n)"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#ifndef QT_DEFS_HPP
|
||||
#define QT_DEFS_HPP
|
||||
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(6, 7, 0)
|
||||
#define CHECK_STATE_CHANGED checkStateChanged
|
||||
#else
|
||||
#define CHECK_STATE_CHANGED stateChanged
|
||||
|
||||
@@ -400,7 +400,8 @@ emu_LowLevelKeyboardProc(int nCode, WPARAM wParam, LPARAM lParam)
|
||||
ret = CallNextHookEx(NULL, nCode, wParam, lParam);
|
||||
|
||||
if (lpKdhs->scanCode == 0x00000045) {
|
||||
if ((lpKdhs->flags & LLKHF_EXTENDED) && (lpKdhs->vkCode == 0x00000090)) {
|
||||
if ((lpKdhs->flags & LLKHF_EXTENDED) && ((lpKdhs->vkCode == 0x00000090) ||
|
||||
(lpKdhs->vkCode == 0x00000013))) {
|
||||
/* NumLock. */
|
||||
lpKdhs->flags &= ~LLKHF_EXTENDED;
|
||||
} else if (!(lpKdhs->flags & LLKHF_EXTENDED) && (lpKdhs->vkCode == 0x00000013)) {
|
||||
|
||||
@@ -44,6 +44,9 @@ extern "C" {
|
||||
#include <QApplication>
|
||||
#include <QStyle>
|
||||
|
||||
#include <dirent.h>
|
||||
#include <unistd.h>
|
||||
|
||||
class SettingsModel : public QAbstractListModel {
|
||||
public:
|
||||
SettingsModel(QObject *parent)
|
||||
@@ -236,5 +239,36 @@ Settings::accept()
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
QDialog::accept();
|
||||
}
|
||||
|
||||
static int
|
||||
plat_path_is_empty(char *path)
|
||||
{
|
||||
int n = 0;
|
||||
DIR *dir = opendir(path);
|
||||
struct dirent *d;
|
||||
|
||||
if (dir == NULL)
|
||||
/* Not a directory or doesn't exist. */
|
||||
return 1;
|
||||
|
||||
while ((d = readdir(dir)) != NULL) {
|
||||
if (++n > 2)
|
||||
break;
|
||||
}
|
||||
|
||||
closedir(dir);
|
||||
|
||||
return (n <= 2);
|
||||
}
|
||||
|
||||
void
|
||||
Settings::reject()
|
||||
{
|
||||
if (plat_path_is_empty(usr_path))
|
||||
rmdir(usr_path);
|
||||
|
||||
QDialog::reject();
|
||||
}
|
||||
|
||||
@@ -30,6 +30,7 @@ public:
|
||||
static Settings *settings;
|
||||
protected slots:
|
||||
void accept() override;
|
||||
void reject() override;
|
||||
|
||||
private:
|
||||
Ui::Settings *ui;
|
||||
|
||||
@@ -411,19 +411,6 @@ ad1848_write(uint16_t addr, uint8_t val, void *priv)
|
||||
goto readonly_i;
|
||||
}
|
||||
|
||||
/* HACK: the Windows 9x driver's "Synth" control writes to this
|
||||
register with no remapping, even if internal FM is enabled. */
|
||||
if (ad1848->index == 18) {
|
||||
if (val & 0x80)
|
||||
ad1848->fm_vol_l = 0;
|
||||
else
|
||||
ad1848->fm_vol_l = (int) ad1848_vols_5bits_aux_gain[val & 0x1f];
|
||||
} else {
|
||||
if (val & 0x80)
|
||||
ad1848->fm_vol_r = 0;
|
||||
else
|
||||
ad1848->fm_vol_r = (int) ad1848_vols_5bits_aux_gain[val & 0x1f];
|
||||
}
|
||||
}
|
||||
if ((ad1848->type >= AD1848_TYPE_CS4232) && (ad1848->type <= AD1848_TYPE_CS4236)) {
|
||||
if (ad1848->index == 18) {
|
||||
|
||||
@@ -290,7 +290,7 @@ cs423x_write(uint16_t addr, uint8_t val, void *priv)
|
||||
ad1848_init(&dev->ad1848, dev->ad1848_type);
|
||||
ad1848_set_cd_audio_channel(&dev->ad1848, AD1848_AUX2);
|
||||
}
|
||||
val = 0x00;
|
||||
val &= 0x07;
|
||||
break;
|
||||
|
||||
case 1: /* Version / Chip ID */
|
||||
|
||||
Reference in New Issue
Block a user